blob: 7b4c39eaa0009e7b269caa970da760a7bbde79ab [file] [log] [blame]
{"version":3,"file":"sidenav.js","sources":["../../../src/material/sidenav/sidenav-module.ts","../../../src/material/sidenav/sidenav.ts","../../../src/material/sidenav/drawer.ts","../../../src/material/sidenav/drawer-animations.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {ScrollingModule} from '@angular/cdk/scrolling';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatDrawer, MatDrawerContainer, MatDrawerContent} from './drawer';\nimport {MatSidenav, MatSidenavContainer, MatSidenavContent} from './sidenav';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatCommonModule,\n ScrollingModule,\n PlatformModule,\n ],\n exports: [\n MatCommonModule,\n MatDrawer,\n MatDrawerContainer,\n MatDrawerContent,\n MatSidenav,\n MatSidenavContainer,\n MatSidenavContent,\n ],\n declarations: [\n MatDrawer,\n MatDrawerContainer,\n MatDrawerContent,\n MatSidenav,\n MatSidenavContainer,\n MatSidenavContent,\n ],\n})\nexport class MatSidenavModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n Inject,\n Input,\n ViewEncapsulation,\n QueryList,\n ElementRef,\n NgZone,\n} from '@angular/core';\nimport {MatDrawer, MatDrawerContainer, MatDrawerContent} from './drawer';\nimport {matDrawerAnimations} from './drawer-animations';\nimport {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {ScrollDispatcher} from '@angular/cdk/scrolling';\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-sidenav-content',\n template: '<ng-content></ng-content>',\n host: {\n 'class': 'mat-drawer-content mat-sidenav-content',\n '[style.margin-left.px]': '_container._contentMargins.left',\n '[style.margin-right.px]': '_container._contentMargins.right',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatSidenavContent extends MatDrawerContent {\n constructor(\n changeDetectorRef: ChangeDetectorRef,\n @Inject(forwardRef(() => MatSidenavContainer)) container: MatSidenavContainer,\n elementRef: ElementRef<HTMLElement>,\n scrollDispatcher: ScrollDispatcher,\n ngZone: NgZone) {\n super(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone);\n }\n}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-sidenav',\n exportAs: 'matSidenav',\n templateUrl: 'drawer.html',\n animations: [matDrawerAnimations.transformDrawer],\n host: {\n 'class': 'mat-drawer mat-sidenav',\n 'tabIndex': '-1',\n // must prevent the browser from aligning text based on value\n '[attr.align]': 'null',\n '[class.mat-drawer-end]': 'position === \"end\"',\n '[class.mat-drawer-over]': 'mode === \"over\"',\n '[class.mat-drawer-push]': 'mode === \"push\"',\n '[class.mat-drawer-side]': 'mode === \"side\"',\n '[class.mat-sidenav-fixed]': 'fixedInViewport',\n '[style.top.px]': 'fixedInViewport ? fixedTopGap : null',\n '[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatSidenav extends MatDrawer {\n /** Whether the sidenav is fixed in the viewport. */\n @Input()\n get fixedInViewport(): boolean { return this._fixedInViewport; }\n set fixedInViewport(value) { this._fixedInViewport = coerceBooleanProperty(value); }\n private _fixedInViewport = false;\n\n /**\n * The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed\n * mode.\n */\n @Input()\n get fixedTopGap(): number { return this._fixedTopGap; }\n set fixedTopGap(value) { this._fixedTopGap = coerceNumberProperty(value); }\n private _fixedTopGap = 0;\n\n /**\n * The gap between the bottom of the sidenav and the bottom of the viewport when the sidenav is in\n * fixed mode.\n */\n @Input()\n get fixedBottomGap(): number { return this._fixedBottomGap; }\n set fixedBottomGap(value) { this._fixedBottomGap = coerceNumberProperty(value); }\n private _fixedBottomGap = 0;\n}\n\n\n@Component({\n moduleId: module.id,\n selector: 'mat-sidenav-container',\n exportAs: 'matSidenavContainer',\n templateUrl: 'sidenav-container.html',\n styleUrls: ['drawer.css'],\n host: {\n 'class': 'mat-drawer-container mat-sidenav-container',\n '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatSidenavContainer extends MatDrawerContainer {\n @ContentChildren(MatSidenav) _drawers: QueryList<MatSidenav>;\n @ContentChild(MatSidenavContent, {static: false}) _content: MatSidenavContent;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationEvent} from '@angular/animations';\nimport {FocusMonitor, FocusOrigin, FocusTrap, FocusTrapFactory} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {Platform} from '@angular/cdk/platform';\nimport {CdkScrollable, ScrollDispatcher, ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n DoCheck,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n HostListener,\n HostBinding,\n} from '@angular/core';\nimport {fromEvent, merge, Observable, Subject} from 'rxjs';\nimport {\n debounceTime,\n filter,\n map,\n startWith,\n take,\n takeUntil,\n distinctUntilChanged,\n} from 'rxjs/operators';\nimport {matDrawerAnimations} from './drawer-animations';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\n/**\n * Throws an exception when two MatDrawer are matching the same position.\n * @docs-private\n */\nexport function throwMatDuplicatedDrawerError(position: string) {\n throw Error(`A drawer was already declared for 'position=\"${position}\"'`);\n}\n\n\n/** Result of the toggle promise that indicates the state of the drawer. */\nexport type MatDrawerToggleResult = 'open' | 'close';\n\n/** Configures whether drawers should use auto sizing by default. */\nexport const MAT_DRAWER_DEFAULT_AUTOSIZE =\n new InjectionToken<boolean>('MAT_DRAWER_DEFAULT_AUTOSIZE', {\n providedIn: 'root',\n factory: MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY(): boolean {\n return false;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'mat-drawer-content',\n template: '<ng-content></ng-content>',\n host: {\n 'class': 'mat-drawer-content',\n '[style.margin-left.px]': '_container._contentMargins.left',\n '[style.margin-right.px]': '_container._contentMargins.right',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatDrawerContent extends CdkScrollable implements AfterContentInit {\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(forwardRef(() => MatDrawerContainer)) public _container: MatDrawerContainer,\n elementRef: ElementRef<HTMLElement>,\n scrollDispatcher: ScrollDispatcher,\n ngZone: NgZone) {\n super(elementRef, scrollDispatcher, ngZone);\n }\n\n ngAfterContentInit() {\n this._container._contentMarginChanges.subscribe(() => {\n this._changeDetectorRef.markForCheck();\n });\n }\n}\n\n\n/**\n * This component corresponds to a drawer that can be opened on the drawer container.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-drawer',\n exportAs: 'matDrawer',\n templateUrl: 'drawer.html',\n animations: [matDrawerAnimations.transformDrawer],\n host: {\n 'class': 'mat-drawer',\n // must prevent the browser from aligning text based on value\n '[attr.align]': 'null',\n '[class.mat-drawer-end]': 'position === \"end\"',\n '[class.mat-drawer-over]': 'mode === \"over\"',\n '[class.mat-drawer-push]': 'mode === \"push\"',\n '[class.mat-drawer-side]': 'mode === \"side\"',\n 'tabIndex': '-1',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatDrawer implements AfterContentInit, AfterContentChecked, OnDestroy {\n private _focusTrap: FocusTrap;\n private _elementFocusedBeforeDrawerWasOpened: HTMLElement | null = null;\n\n /** Whether the drawer is initialized. Used for disabling the initial animation. */\n private _enableAnimations = false;\n\n /** The side that the drawer is attached to. */\n @Input()\n get position(): 'start' | 'end' { return this._position; }\n set position(value: 'start' | 'end') {\n // Make sure we have a valid value.\n value = value === 'end' ? 'end' : 'start';\n if (value != this._position) {\n this._position = value;\n this.onPositionChanged.emit();\n }\n }\n private _position: 'start' | 'end' = 'start';\n\n /** Mode of the drawer; one of 'over', 'push' or 'side'. */\n @Input()\n get mode(): 'over' | 'push' | 'side' { return this._mode; }\n set mode(value: 'over' | 'push' | 'side') {\n this._mode = value;\n this._modeChanged.next();\n }\n private _mode: 'over' | 'push' | 'side' = 'over';\n\n /** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */\n @Input()\n get disableClose(): boolean { return this._disableClose; }\n set disableClose(value: boolean) { this._disableClose = coerceBooleanProperty(value); }\n private _disableClose: boolean = false;\n\n /** Whether the drawer should focus the first focusable element automatically when opened. */\n @Input()\n get autoFocus(): boolean { return this._autoFocus; }\n set autoFocus(value: boolean) { this._autoFocus = coerceBooleanProperty(value); }\n private _autoFocus: boolean = true;\n\n /** How the sidenav was opened (keypress, mouse click etc.) */\n private _openedVia: FocusOrigin | null;\n\n /** Emits whenever the drawer has started animating. */\n _animationStarted = new Subject<AnimationEvent>();\n\n /** Emits whenever the drawer is done animating. */\n _animationEnd = new Subject<AnimationEvent>();\n\n /** Current state of the sidenav animation. */\n // @HostBinding is used in the class as it is expected to be extended. Since @Component decorator\n // metadata is not inherited by child classes, instead the host binding data is defined in a way\n // that can be inherited.\n // tslint:disable:no-host-decorator-in-concrete\n @HostBinding('@transform')\n _animationState: 'open-instant' | 'open' | 'void' = 'void';\n\n /** Event emitted when the drawer open state is changed. */\n @Output() readonly openedChange: EventEmitter<boolean> =\n // Note this has to be async in order to avoid some issues with two-bindings (see #8872).\n new EventEmitter<boolean>(/* isAsync */true);\n\n /** Event emitted when the drawer has been opened. */\n @Output('opened')\n get _openedStream(): Observable<void> {\n return this.openedChange.pipe(filter(o => o), map(() => {}));\n }\n\n /** Event emitted when the drawer has started opening. */\n @Output()\n get openedStart(): Observable<void> {\n return this._animationStarted.pipe(\n filter(e => e.fromState !== e.toState && e.toState.indexOf('open') === 0),\n map(() => {})\n );\n }\n\n /** Event emitted when the drawer has been closed. */\n @Output('closed')\n get _closedStream(): Observable<void> {\n return this.openedChange.pipe(filter(o => !o), map(() => {}));\n }\n\n /** Event emitted when the drawer has started closing. */\n @Output()\n get closedStart(): Observable<void> {\n return this._animationStarted.pipe(\n filter(e => e.fromState !== e.toState && e.toState === 'void'),\n map(() => {})\n );\n }\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** Event emitted when the drawer's position changes. */\n // tslint:disable-next-line:no-output-on-prefix\n @Output('positionChanged') onPositionChanged: EventEmitter<void> = new EventEmitter<void>();\n\n /**\n * An observable that emits when the drawer mode changes. This is used by the drawer container to\n * to know when to when the mode changes so it can adapt the margins on the content.\n */\n readonly _modeChanged = new Subject();\n\n get _isFocusTrapEnabled(): boolean {\n // The focus trap is only enabled when the drawer is open in any mode other than side.\n return this.opened && this.mode !== 'side';\n }\n\n constructor(private _elementRef: ElementRef<HTMLElement>,\n private _focusTrapFactory: FocusTrapFactory,\n private _focusMonitor: FocusMonitor,\n private _platform: Platform,\n private _ngZone: NgZone,\n @Optional() @Inject(DOCUMENT) private _doc: any) {\n\n this.openedChange.subscribe((opened: boolean) => {\n if (opened) {\n if (this._doc) {\n this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement as HTMLElement;\n }\n\n if (this._isFocusTrapEnabled && this._focusTrap) {\n this._trapFocus();\n }\n } else {\n this._restoreFocus();\n }\n });\n\n /**\n * Listen to `keydown` events outside the zone so that change detection is not run every\n * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed\n * and we don't have close disabled.\n */\n this._ngZone.runOutsideAngular(() => {\n (fromEvent(this._elementRef.nativeElement, 'keydown') as Observable<KeyboardEvent>).pipe(\n filter(event => {\n return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);\n }),\n takeUntil(this._destroyed)\n ).subscribe(event => this._ngZone.run(() => {\n this.close();\n event.stopPropagation();\n event.preventDefault();\n }));\n });\n\n // We need a Subject with distinctUntilChanged, because the `done` event\n // fires twice on some browsers. See https://github.com/angular/angular/issues/24084\n this._animationEnd.pipe(distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n })).subscribe((event: AnimationEvent) => {\n const {fromState, toState} = event;\n\n if ((toState.indexOf('open') === 0 && fromState === 'void') ||\n (toState === 'void' && fromState.indexOf('open') === 0)) {\n this.openedChange.emit(this._opened);\n }\n });\n }\n\n /** Traps focus inside the drawer. */\n private _trapFocus() {\n if (!this.autoFocus) {\n return;\n }\n\n this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {\n // If there were no focusable elements, focus the sidenav itself so the keyboard navigation\n // still works. We need to check that `focus` is a function due to Universal.\n if (!hasMovedFocus && typeof this._elementRef.nativeElement.focus === 'function') {\n this._elementRef.nativeElement.focus();\n }\n });\n }\n\n /**\n * If focus is currently inside the drawer, restores it to where it was before the drawer\n * opened.\n */\n private _restoreFocus() {\n if (!this.autoFocus) {\n return;\n }\n\n const activeEl = this._doc && this._doc.activeElement;\n\n if (activeEl && this._elementRef.nativeElement.contains(activeEl)) {\n if (this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement) {\n this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);\n } else {\n this._elementRef.nativeElement.blur();\n }\n }\n\n this._elementFocusedBeforeDrawerWasOpened = null;\n this._openedVia = null;\n }\n\n ngAfterContentInit() {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n this._focusTrap.enabled = this._isFocusTrapEnabled;\n }\n\n ngAfterContentChecked() {\n // Enable the animations after the lifecycle hooks have run, in order to avoid animating\n // drawers that are open by default. When we're on the server, we shouldn't enable the\n // animations, because we don't want the drawer to animate the first time the user sees\n // the page.\n if (this._platform.isBrowser) {\n this._enableAnimations = true;\n }\n }\n\n ngOnDestroy() {\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n\n this._animationStarted.complete();\n this._animationEnd.complete();\n this._modeChanged.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /**\n * Whether the drawer is opened. We overload this because we trigger an event when it\n * starts or end.\n */\n @Input()\n get opened(): boolean { return this._opened; }\n set opened(value: boolean) { this.toggle(coerceBooleanProperty(value)); }\n private _opened: boolean = false;\n\n /**\n * Open the drawer.\n * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.\n * Used for focus management after the sidenav is closed.\n */\n open(openedVia?: FocusOrigin): Promise<MatDrawerToggleResult> {\n return this.toggle(true, openedVia);\n }\n\n /** Close the drawer. */\n close(): Promise<MatDrawerToggleResult> {\n return this.toggle(false);\n }\n\n /**\n * Toggle this drawer.\n * @param isOpen Whether the drawer should be open.\n * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.\n * Used for focus management after the sidenav is closed.\n */\n toggle(isOpen: boolean = !this.opened, openedVia: FocusOrigin = 'program'):\n Promise<MatDrawerToggleResult> {\n\n this._opened = isOpen;\n\n if (isOpen) {\n this._animationState = this._enableAnimations ? 'open' : 'open-instant';\n this._openedVia = openedVia;\n } else {\n this._animationState = 'void';\n this._restoreFocus();\n }\n\n if (this._focusTrap) {\n this._focusTrap.enabled = this._isFocusTrapEnabled;\n }\n\n return new Promise<MatDrawerToggleResult>(resolve => {\n this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));\n });\n }\n\n get _width(): number {\n return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0;\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritte.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('@transform.start', ['$event'])\n _animationStartListener(event: AnimationEvent) {\n this._animationStarted.next(event);\n }\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritte.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('@transform.done', ['$event'])\n _animationDoneListener(event: AnimationEvent) {\n this._animationEnd.next(event);\n }\n}\n\n\n/**\n * `<mat-drawer-container>` component.\n *\n * This is the parent component to one or two `<mat-drawer>`s that validates the state internally\n * and coordinates the backdrop and content styling.\n */\n@Component({\n moduleId: module.id,\n selector: 'mat-drawer-container',\n exportAs: 'matDrawerContainer',\n templateUrl: 'drawer-container.html',\n styleUrls: ['drawer.css'],\n host: {\n 'class': 'mat-drawer-container',\n '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class MatDrawerContainer implements AfterContentInit, DoCheck, OnDestroy {\n @ContentChildren(MatDrawer) _drawers: QueryList<MatDrawer>;\n @ContentChild(MatDrawerContent, {static: false}) _content: MatDrawerContent;\n @ViewChild(MatDrawerContent, {static: false}) _userContent: MatDrawerContent;\n\n /** The drawer child with the `start` position. */\n get start(): MatDrawer | null { return this._start; }\n\n /** The drawer child with the `end` position. */\n get end(): MatDrawer | null { return this._end; }\n\n /**\n * Whether to automatically resize the container whenever\n * the size of any of its drawers changes.\n *\n * **Use at your own risk!** Enabling this option can cause layout thrashing by measuring\n * the drawers on every change detection cycle. Can be configured globally via the\n * `MAT_DRAWER_DEFAULT_AUTOSIZE` token.\n */\n @Input()\n get autosize(): boolean { return this._autosize; }\n set autosize(value: boolean) { this._autosize = coerceBooleanProperty(value); }\n private _autosize: boolean;\n\n /**\n * Whether the drawer container should have a backdrop while one of the sidenavs is open.\n * If explicitly set to `true`, the backdrop will be enabled for drawers in the `side`\n * mode as well.\n */\n @Input()\n get hasBackdrop() {\n if (this._backdropOverride == null) {\n return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side';\n }\n\n return this._backdropOverride;\n }\n set hasBackdrop(value: any) {\n this._backdropOverride = value == null ? null : coerceBooleanProperty(value);\n }\n _backdropOverride: boolean | null;\n\n /** Event emitted when the drawer backdrop is clicked. */\n @Output() readonly backdropClick: EventEmitter<void> = new EventEmitter<void>();\n\n /** The drawer at the start/end position, independent of direction. */\n private _start: MatDrawer | null;\n private _end: MatDrawer | null;\n\n /**\n * The drawer at the left/right. When direction changes, these will change as well.\n * They're used as aliases for the above to set the left/right style properly.\n * In LTR, _left == _start and _right == _end.\n * In RTL, _left == _end and _right == _start.\n */\n private _left: MatDrawer | null;\n private _right: MatDrawer | null;\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n /** Emits on every ngDoCheck. Used for debouncing reflows. */\n private readonly _doCheckSubject = new Subject<void>();\n\n /**\n * Margins to be applied to the content. These are used to push / shrink the drawer content when a\n * drawer is open. We use margin rather than transform even for push mode because transform breaks\n * fixed position elements inside of the transformed element.\n */\n _contentMargins: {left: number|null, right: number|null} = {left: null, right: null};\n\n readonly _contentMarginChanges = new Subject<{left: number|null, right: number|null}>();\n\n /** Reference to the CdkScrollable instance that wraps the scrollable content. */\n get scrollable(): CdkScrollable {\n return this._userContent || this._content;\n }\n\n constructor(@Optional() private _dir: Directionality,\n private _element: ElementRef<HTMLElement>,\n private _ngZone: NgZone,\n private _changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n @Inject(MAT_DRAWER_DEFAULT_AUTOSIZE) defaultAutosize = false,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) private _animationMode?: string) {\n\n // If a `Dir` directive exists up the tree, listen direction changes\n // and update the left/right properties to point to the proper start/end.\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._validateDrawers();\n this.updateContentMargins();\n });\n }\n\n // Since the minimum width of the sidenav depends on the viewport width,\n // we need to recompute the margins if the viewport changes.\n viewportRuler.change()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateContentMargins());\n\n this._autosize = defaultAutosize;\n }\n\n ngAfterContentInit() {\n this._drawers.changes.pipe(startWith(null)).subscribe(() => {\n this._validateDrawers();\n\n this._drawers.forEach((drawer: MatDrawer) => {\n this._watchDrawerToggle(drawer);\n this._watchDrawerPosition(drawer);\n this._watchDrawerMode(drawer);\n });\n\n if (!this._drawers.length ||\n this._isDrawerOpen(this._start) ||\n this._isDrawerOpen(this._end)) {\n this.updateContentMargins();\n }\n\n this._changeDetectorRef.markForCheck();\n });\n\n this._doCheckSubject.pipe(\n debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps\n takeUntil(this._destroyed)\n ).subscribe(() => this.updateContentMargins());\n }\n\n ngOnDestroy() {\n this._contentMarginChanges.complete();\n this._doCheckSubject.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Calls `open` of both start and end drawers */\n open(): void {\n this._drawers.forEach(drawer => drawer.open());\n }\n\n /** Calls `close` of both start and end drawers */\n close(): void {\n this._drawers.forEach(drawer => drawer.close());\n }\n\n /**\n * Recalculates and updates the inline styles for the content. Note that this should be used\n * sparingly, because it causes a reflow.\n */\n updateContentMargins() {\n // 1. For drawers in `over` mode, they don't affect the content.\n // 2. For drawers in `side` mode they should shrink the content. We do this by adding to the\n // left margin (for left drawer) or right margin (for right the drawer).\n // 3. For drawers in `push` mode the should shift the content without resizing it. We do this by\n // adding to the left or right margin and simultaneously subtracting the same amount of\n // margin from the other side.\n let left = 0;\n let right = 0;\n\n if (this._left && this._left.opened) {\n if (this._left.mode == 'side') {\n left += this._left._width;\n } else if (this._left.mode == 'push') {\n const width = this._left._width;\n left += width;\n right -= width;\n }\n }\n\n if (this._right && this._right.opened) {\n if (this._right.mode == 'side') {\n right += this._right._width;\n } else if (this._right.mode == 'push') {\n const width = this._right._width;\n right += width;\n left -= width;\n }\n }\n\n // If either `right` or `left` is zero, don't set a style to the element. This\n // allows users to specify a custom size via CSS class in SSR scenarios where the\n // measured widths will always be zero. Note that we reset to `null` here, rather\n // than below, in order to ensure that the types in the `if` below are consistent.\n left = left || null!;\n right = right || null!;\n\n if (left !== this._contentMargins.left || right !== this._contentMargins.right) {\n this._contentMargins = {left, right};\n\n // Pull back into the NgZone since in some cases we could be outside. We need to be careful\n // to do it only when something changed, otherwise we can end up hitting the zone too often.\n this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));\n }\n }\n\n ngDoCheck() {\n // If users opted into autosizing, do a check every change detection cycle.\n if (this._autosize && this._isPushed()) {\n // Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.\n this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());\n }\n }\n\n /**\n * Subscribes to drawer events in order to set a class on the main container element when the\n * drawer is open and the backdrop is visible. This ensures any overflow on the container element\n * is properly hidden.\n */\n private _watchDrawerToggle(drawer: MatDrawer): void {\n drawer._animationStarted.pipe(\n filter((event: AnimationEvent) => event.fromState !== event.toState),\n takeUntil(this._drawers.changes),\n )\n .subscribe((event: AnimationEvent) => {\n // Set the transition class on the container so that the animations occur. This should not\n // be set initially because animations should only be triggered via a change in state.\n if (event.toState !== 'open-instant' && this._animationMode !== 'NoopAnimations') {\n this._element.nativeElement.classList.add('mat-drawer-transition');\n }\n\n this.updateContentMargins();\n this._changeDetectorRef.markForCheck();\n });\n\n if (drawer.mode !== 'side') {\n drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() =>\n this._setContainerClass(drawer.opened));\n }\n }\n\n /**\n * Subscribes to drawer onPositionChanged event in order to\n * re-validate drawers when the position changes.\n */\n private _watchDrawerPosition(drawer: MatDrawer): void {\n if (!drawer) {\n return;\n }\n // NOTE: We need to wait for the microtask queue to be empty before validating,\n // since both drawers may be swapping positions at the same time.\n drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => {\n this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(() => {\n this._validateDrawers();\n });\n });\n }\n\n /** Subscribes to changes in drawer mode so we can run change detection. */\n private _watchDrawerMode(drawer: MatDrawer): void {\n if (drawer) {\n drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed)))\n .subscribe(() => {\n this.updateContentMargins();\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n\n /** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */\n private _setContainerClass(isAdd: boolean): void {\n if (isAdd) {\n this._element.nativeElement.classList.add('mat-drawer-opened');\n } else {\n this._element.nativeElement.classList.remove('mat-drawer-opened');\n }\n }\n\n /** Validate the state of the drawer children components. */\n private _validateDrawers() {\n this._start = this._end = null;\n\n // Ensure that we have at most one start and one end drawer.\n this._drawers.forEach(drawer => {\n if (drawer.position == 'end') {\n if (this._end != null) {\n throwMatDuplicatedDrawerError('end');\n }\n this._end = drawer;\n } else {\n if (this._start != null) {\n throwMatDuplicatedDrawerError('start');\n }\n this._start = drawer;\n }\n });\n\n this._right = this._left = null;\n\n // Detect if we're LTR or RTL.\n if (this._dir && this._dir.value === 'rtl') {\n this._left = this._end;\n this._right = this._start;\n } else {\n this._left = this._start;\n this._right = this._end;\n }\n }\n\n /** Whether the container is being pushed to the side by one of the drawers. */\n private _isPushed() {\n return (this._isDrawerOpen(this._start) && this._start.mode != 'over') ||\n (this._isDrawerOpen(this._end) && this._end.mode != 'over');\n }\n\n _onBackdropClicked() {\n this.backdropClick.emit();\n this._closeModalDrawer();\n }\n\n _closeModalDrawer() {\n // Close all open drawers where closing is not disabled and the mode is not `side`.\n [this._start, this._end]\n .filter(drawer => drawer && !drawer.disableClose && this._canHaveBackdrop(drawer))\n .forEach(drawer => drawer!.close());\n }\n\n _isShowingBackdrop(): boolean {\n return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||\n (this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end));\n }\n\n private _canHaveBackdrop(drawer: MatDrawer): boolean {\n return drawer.mode !== 'side' || !!this._backdropOverride;\n }\n\n private _isDrawerOpen(drawer: MatDrawer | null): drawer is MatDrawer {\n return drawer != null && drawer.opened;\n }\n\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/**\n * Animations used by the Material drawers.\n * @docs-private\n */\nexport const matDrawerAnimations: {\n readonly transformDrawer: AnimationTriggerMetadata;\n} = {\n /** Animation that slides a drawer in and out. */\n transformDrawer: trigger('transform', [\n // We remove the `transform` here completely, rather than setting it to zero, because:\n // 1. Having a transform can cause elements with ripples or an animated\n // transform to shift around in Chrome with an RTL layout (see #10023).\n // 2. 3d transforms causes text to appear blurry on IE and Edge.\n state('open, open-instant', style({\n 'transform': 'none',\n 'visibility': 'visible',\n })),\n state('void', style({\n // Avoids the shadow showing up when closed in SSR.\n 'box-shadow': 'none',\n 'visibility': 'hidden',\n })),\n transition('void => open-instant', animate('0ms')),\n transition('void <=> open, open-instant => void',\n animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)'))\n ])\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;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