UNPKG

@angular/material

Version:
780 lines 106 kB
import { __extends } from "tslib"; import { FocusMonitor, FocusTrapFactory } from '@angular/cdk/a11y'; import { Directionality } from '@angular/cdk/bidi'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes'; import { Platform } from '@angular/cdk/platform'; import { CdkScrollable, ScrollDispatcher, ViewportRuler } from '@angular/cdk/scrolling'; import { DOCUMENT } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ContentChildren, ElementRef, EventEmitter, forwardRef, Inject, InjectionToken, Input, NgZone, Optional, Output, QueryList, ViewChild, ViewEncapsulation, HostListener, HostBinding, } from '@angular/core'; import { fromEvent, merge, Observable, Subject } from 'rxjs'; import { debounceTime, filter, map, startWith, take, takeUntil, distinctUntilChanged, } from 'rxjs/operators'; import { matDrawerAnimations } from './drawer-animations'; import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations'; /** * Throws an exception when two MatDrawer are matching the same position. * @docs-private */ export function throwMatDuplicatedDrawerError(position) { throw Error("A drawer was already declared for 'position=\"" + position + "\"'"); } /** Configures whether drawers should use auto sizing by default. */ export var MAT_DRAWER_DEFAULT_AUTOSIZE = new InjectionToken('MAT_DRAWER_DEFAULT_AUTOSIZE', { providedIn: 'root', factory: MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY, }); /** * Used to provide a drawer container to a drawer while avoiding circular references. * @docs-private */ export var MAT_DRAWER_CONTAINER = new InjectionToken('MAT_DRAWER_CONTAINER'); /** @docs-private */ export function MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY() { return false; } var MatDrawerContent = /** @class */ (function (_super) { __extends(MatDrawerContent, _super); function MatDrawerContent(_changeDetectorRef, _container, elementRef, scrollDispatcher, ngZone) { var _this = _super.call(this, elementRef, scrollDispatcher, ngZone) || this; _this._changeDetectorRef = _changeDetectorRef; _this._container = _container; return _this; } MatDrawerContent.prototype.ngAfterContentInit = function () { var _this = this; this._container._contentMarginChanges.subscribe(function () { _this._changeDetectorRef.markForCheck(); }); }; MatDrawerContent.decorators = [ { type: Component, args: [{ selector: 'mat-drawer-content', template: '<ng-content></ng-content>', host: { 'class': 'mat-drawer-content', '[style.margin-left.px]': '_container._contentMargins.left', '[style.margin-right.px]': '_container._contentMargins.right', }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }] } ]; /** @nocollapse */ MatDrawerContent.ctorParameters = function () { return [ { type: ChangeDetectorRef }, { type: MatDrawerContainer, decorators: [{ type: Inject, args: [forwardRef(function () { return MatDrawerContainer; }),] }] }, { type: ElementRef }, { type: ScrollDispatcher }, { type: NgZone } ]; }; return MatDrawerContent; }(CdkScrollable)); export { MatDrawerContent }; /** * This component corresponds to a drawer that can be opened on the drawer container. */ var MatDrawer = /** @class */ (function () { function MatDrawer(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _doc, /** * @deprecated `_container` parameter to be made required. * @breaking-change 10.0.0 */ _container) { var _this = this; this._elementRef = _elementRef; this._focusTrapFactory = _focusTrapFactory; this._focusMonitor = _focusMonitor; this._platform = _platform; this._ngZone = _ngZone; this._doc = _doc; this._container = _container; this._elementFocusedBeforeDrawerWasOpened = null; /** Whether the drawer is initialized. Used for disabling the initial animation. */ this._enableAnimations = false; this._position = 'start'; this._mode = 'over'; this._disableClose = false; this._opened = false; /** Emits whenever the drawer has started animating. */ this._animationStarted = new Subject(); /** Emits whenever the drawer is done animating. */ this._animationEnd = new Subject(); /** Current state of the sidenav animation. */ // @HostBinding is used in the class as it is expected to be extended. Since @Component decorator // metadata is not inherited by child classes, instead the host binding data is defined in a way // that can be inherited. // tslint:disable:no-host-decorator-in-concrete this._animationState = 'void'; /** Event emitted when the drawer open state is changed. */ this.openedChange = // Note this has to be async in order to avoid some issues with two-bindings (see #8872). new EventEmitter(/* isAsync */ true); /** Emits when the component is destroyed. */ this._destroyed = new Subject(); /** Event emitted when the drawer's position changes. */ // tslint:disable-next-line:no-output-on-prefix this.onPositionChanged = new EventEmitter(); /** * An observable that emits when the drawer mode changes. This is used by the drawer container to * to know when to when the mode changes so it can adapt the margins on the content. */ this._modeChanged = new Subject(); this.openedChange.subscribe(function (opened) { if (opened) { if (_this._doc) { _this._elementFocusedBeforeDrawerWasOpened = _this._doc.activeElement; } _this._takeFocus(); } else { _this._restoreFocus(); } }); /** * Listen to `keydown` events outside the zone so that change detection is not run every * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed * and we don't have close disabled. */ this._ngZone.runOutsideAngular(function () { fromEvent(_this._elementRef.nativeElement, 'keydown').pipe(filter(function (event) { return event.keyCode === ESCAPE && !_this.disableClose && !hasModifierKey(event); }), takeUntil(_this._destroyed)).subscribe(function (event) { return _this._ngZone.run(function () { _this.close(); event.stopPropagation(); event.preventDefault(); }); }); }); // We need a Subject with distinctUntilChanged, because the `done` event // fires twice on some browsers. See https://github.com/angular/angular/issues/24084 this._animationEnd.pipe(distinctUntilChanged(function (x, y) { return x.fromState === y.fromState && x.toState === y.toState; })).subscribe(function (event) { var fromState = event.fromState, toState = event.toState; if ((toState.indexOf('open') === 0 && fromState === 'void') || (toState === 'void' && fromState.indexOf('open') === 0)) { _this.openedChange.emit(_this._opened); } }); } Object.defineProperty(MatDrawer.prototype, "position", { /** The side that the drawer is attached to. */ get: function () { return this._position; }, set: function (value) { // Make sure we have a valid value. value = value === 'end' ? 'end' : 'start'; if (value != this._position) { this._position = value; this.onPositionChanged.emit(); } }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "mode", { /** Mode of the drawer; one of 'over', 'push' or 'side'. */ get: function () { return this._mode; }, set: function (value) { this._mode = value; this._updateFocusTrapState(); this._modeChanged.next(); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "disableClose", { /** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */ get: function () { return this._disableClose; }, set: function (value) { this._disableClose = coerceBooleanProperty(value); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "autoFocus", { /** * Whether the drawer should focus the first focusable element automatically when opened. * Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly * enabled, focus will be moved into the sidenav in `side` mode as well. */ get: function () { var value = this._autoFocus; // Note that usually we disable auto focusing in `side` mode, because we don't know how the // sidenav is being used, but in some cases it still makes sense to do it. If the consumer // explicitly enabled `autoFocus`, we take it as them always wanting to enable it. return value == null ? this.mode !== 'side' : value; }, set: function (value) { this._autoFocus = coerceBooleanProperty(value); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "opened", { /** * Whether the drawer is opened. We overload this because we trigger an event when it * starts or end. */ get: function () { return this._opened; }, set: function (value) { this.toggle(coerceBooleanProperty(value)); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "_openedStream", { /** Event emitted when the drawer has been opened. */ get: function () { return this.openedChange.pipe(filter(function (o) { return o; }), map(function () { })); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "openedStart", { /** Event emitted when the drawer has started opening. */ get: function () { return this._animationStarted.pipe(filter(function (e) { return e.fromState !== e.toState && e.toState.indexOf('open') === 0; }), map(function () { })); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "_closedStream", { /** Event emitted when the drawer has been closed. */ get: function () { return this.openedChange.pipe(filter(function (o) { return !o; }), map(function () { })); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawer.prototype, "closedStart", { /** Event emitted when the drawer has started closing. */ get: function () { return this._animationStarted.pipe(filter(function (e) { return e.fromState !== e.toState && e.toState === 'void'; }), map(function () { })); }, enumerable: true, configurable: true }); /** * Moves focus into the drawer. Note that this works even if * the focus trap is disabled in `side` mode. */ MatDrawer.prototype._takeFocus = function () { var _this = this; if (!this.autoFocus || !this._focusTrap) { return; } this._focusTrap.focusInitialElementWhenReady().then(function (hasMovedFocus) { // If there were no focusable elements, focus the sidenav itself so the keyboard navigation // still works. We need to check that `focus` is a function due to Universal. if (!hasMovedFocus && typeof _this._elementRef.nativeElement.focus === 'function') { _this._elementRef.nativeElement.focus(); } }); }; /** * If focus is currently inside the drawer, restores it to where it was before the drawer * opened. */ MatDrawer.prototype._restoreFocus = function () { if (!this.autoFocus) { return; } var activeEl = this._doc && this._doc.activeElement; if (activeEl && this._elementRef.nativeElement.contains(activeEl)) { if (this._elementFocusedBeforeDrawerWasOpened instanceof HTMLElement) { this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia); } else { this._elementRef.nativeElement.blur(); } } this._elementFocusedBeforeDrawerWasOpened = null; this._openedVia = null; }; MatDrawer.prototype.ngAfterContentInit = function () { this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement); this._updateFocusTrapState(); }; MatDrawer.prototype.ngAfterContentChecked = function () { // Enable the animations after the lifecycle hooks have run, in order to avoid animating // drawers that are open by default. When we're on the server, we shouldn't enable the // animations, because we don't want the drawer to animate the first time the user sees // the page. if (this._platform.isBrowser) { this._enableAnimations = true; } }; MatDrawer.prototype.ngOnDestroy = function () { if (this._focusTrap) { this._focusTrap.destroy(); } this._animationStarted.complete(); this._animationEnd.complete(); this._modeChanged.complete(); this._destroyed.next(); this._destroyed.complete(); }; /** * Open the drawer. * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically. * Used for focus management after the sidenav is closed. */ MatDrawer.prototype.open = function (openedVia) { return this.toggle(true, openedVia); }; /** Close the drawer. */ MatDrawer.prototype.close = function () { return this.toggle(false); }; /** * Toggle this drawer. * @param isOpen Whether the drawer should be open. * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically. * Used for focus management after the sidenav is closed. */ MatDrawer.prototype.toggle = function (isOpen, openedVia) { var _this = this; if (isOpen === void 0) { isOpen = !this.opened; } if (openedVia === void 0) { openedVia = 'program'; } this._opened = isOpen; if (isOpen) { this._animationState = this._enableAnimations ? 'open' : 'open-instant'; this._openedVia = openedVia; } else { this._animationState = 'void'; this._restoreFocus(); } this._updateFocusTrapState(); return new Promise(function (resolve) { _this.openedChange.pipe(take(1)).subscribe(function (open) { return resolve(open ? 'open' : 'close'); }); }); }; Object.defineProperty(MatDrawer.prototype, "_width", { get: function () { return this._elementRef.nativeElement ? (this._elementRef.nativeElement.offsetWidth || 0) : 0; }, enumerable: true, configurable: true }); /** Updates the enabled state of the focus trap. */ MatDrawer.prototype._updateFocusTrapState = function () { if (this._focusTrap) { // The focus trap is only enabled when the drawer is open in any mode other than side. this._focusTrap.enabled = this.opened && this.mode !== 'side'; } }; // We have to use a `HostListener` here in order to support both Ivy and ViewEngine. // In Ivy the `host` bindings will be merged when this class is extended, whereas in // ViewEngine they're overwritten. // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default. // tslint:disable-next-line:no-host-decorator-in-concrete MatDrawer.prototype._animationStartListener = function (event) { this._animationStarted.next(event); }; // We have to use a `HostListener` here in order to support both Ivy and ViewEngine. // In Ivy the `host` bindings will be merged when this class is extended, whereas in // ViewEngine they're overwritten. // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default. // tslint:disable-next-line:no-host-decorator-in-concrete MatDrawer.prototype._animationDoneListener = function (event) { this._animationEnd.next(event); }; MatDrawer.decorators = [ { type: Component, args: [{ selector: 'mat-drawer', exportAs: 'matDrawer', template: "<div class=\"mat-drawer-inner-container\">\r\n <ng-content></ng-content>\r\n</div>\r\n", animations: [matDrawerAnimations.transformDrawer], host: { 'class': 'mat-drawer', // must prevent the browser from aligning text based on value '[attr.align]': 'null', '[class.mat-drawer-end]': 'position === "end"', '[class.mat-drawer-over]': 'mode === "over"', '[class.mat-drawer-push]': 'mode === "push"', '[class.mat-drawer-side]': 'mode === "side"', '[class.mat-drawer-opened]': 'opened', 'tabIndex': '-1', }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None }] } ]; /** @nocollapse */ MatDrawer.ctorParameters = function () { return [ { type: ElementRef }, { type: FocusTrapFactory }, { type: FocusMonitor }, { type: Platform }, { type: NgZone }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT,] }] }, { type: MatDrawerContainer, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DRAWER_CONTAINER,] }] } ]; }; MatDrawer.propDecorators = { position: [{ type: Input }], mode: [{ type: Input }], disableClose: [{ type: Input }], autoFocus: [{ type: Input }], opened: [{ type: Input }], _animationState: [{ type: HostBinding, args: ['@transform',] }], openedChange: [{ type: Output }], _openedStream: [{ type: Output, args: ['opened',] }], openedStart: [{ type: Output }], _closedStream: [{ type: Output, args: ['closed',] }], closedStart: [{ type: Output }], onPositionChanged: [{ type: Output, args: ['positionChanged',] }], _animationStartListener: [{ type: HostListener, args: ['@transform.start', ['$event'],] }], _animationDoneListener: [{ type: HostListener, args: ['@transform.done', ['$event'],] }] }; return MatDrawer; }()); export { MatDrawer }; /** * `<mat-drawer-container>` component. * * This is the parent component to one or two `<mat-drawer>`s that validates the state internally * and coordinates the backdrop and content styling. */ var MatDrawerContainer = /** @class */ (function () { function MatDrawerContainer(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize, _animationMode) { var _this = this; if (defaultAutosize === void 0) { defaultAutosize = false; } this._dir = _dir; this._element = _element; this._ngZone = _ngZone; this._changeDetectorRef = _changeDetectorRef; this._animationMode = _animationMode; /** Drawers that belong to this container. */ this._drawers = new QueryList(); /** Event emitted when the drawer backdrop is clicked. */ this.backdropClick = new EventEmitter(); /** Emits when the component is destroyed. */ this._destroyed = new Subject(); /** Emits on every ngDoCheck. Used for debouncing reflows. */ this._doCheckSubject = new Subject(); /** * Margins to be applied to the content. These are used to push / shrink the drawer content when a * drawer is open. We use margin rather than transform even for push mode because transform breaks * fixed position elements inside of the transformed element. */ this._contentMargins = { left: null, right: null }; this._contentMarginChanges = new Subject(); // If a `Dir` directive exists up the tree, listen direction changes // and update the left/right properties to point to the proper start/end. if (_dir) { _dir.change.pipe(takeUntil(this._destroyed)).subscribe(function () { _this._validateDrawers(); _this.updateContentMargins(); }); } // Since the minimum width of the sidenav depends on the viewport width, // we need to recompute the margins if the viewport changes. viewportRuler.change() .pipe(takeUntil(this._destroyed)) .subscribe(function () { return _this.updateContentMargins(); }); this._autosize = defaultAutosize; } Object.defineProperty(MatDrawerContainer.prototype, "start", { /** The drawer child with the `start` position. */ get: function () { return this._start; }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawerContainer.prototype, "end", { /** The drawer child with the `end` position. */ get: function () { return this._end; }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawerContainer.prototype, "autosize", { /** * Whether to automatically resize the container whenever * the size of any of its drawers changes. * * **Use at your own risk!** Enabling this option can cause layout thrashing by measuring * the drawers on every change detection cycle. Can be configured globally via the * `MAT_DRAWER_DEFAULT_AUTOSIZE` token. */ get: function () { return this._autosize; }, set: function (value) { this._autosize = coerceBooleanProperty(value); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawerContainer.prototype, "hasBackdrop", { /** * Whether the drawer container should have a backdrop while one of the sidenavs is open. * If explicitly set to `true`, the backdrop will be enabled for drawers in the `side` * mode as well. */ get: function () { if (this._backdropOverride == null) { return !this._start || this._start.mode !== 'side' || !this._end || this._end.mode !== 'side'; } return this._backdropOverride; }, set: function (value) { this._backdropOverride = value == null ? null : coerceBooleanProperty(value); }, enumerable: true, configurable: true }); Object.defineProperty(MatDrawerContainer.prototype, "scrollable", { /** Reference to the CdkScrollable instance that wraps the scrollable content. */ get: function () { return this._userContent || this._content; }, enumerable: true, configurable: true }); MatDrawerContainer.prototype.ngAfterContentInit = function () { var _this = this; this._allDrawers.changes .pipe(startWith(this._allDrawers), takeUntil(this._destroyed)) .subscribe(function (drawer) { // @breaking-change 10.0.0 Remove `_container` check once container parameter is required. _this._drawers.reset(drawer.filter(function (item) { return !item._container || item._container === _this; })); _this._drawers.notifyOnChanges(); }); this._drawers.changes.pipe(startWith(null)).subscribe(function () { _this._validateDrawers(); _this._drawers.forEach(function (drawer) { _this._watchDrawerToggle(drawer); _this._watchDrawerPosition(drawer); _this._watchDrawerMode(drawer); }); if (!_this._drawers.length || _this._isDrawerOpen(_this._start) || _this._isDrawerOpen(_this._end)) { _this.updateContentMargins(); } _this._changeDetectorRef.markForCheck(); }); this._doCheckSubject.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps takeUntil(this._destroyed)).subscribe(function () { return _this.updateContentMargins(); }); }; MatDrawerContainer.prototype.ngOnDestroy = function () { this._contentMarginChanges.complete(); this._doCheckSubject.complete(); this._drawers.destroy(); this._destroyed.next(); this._destroyed.complete(); }; /** Calls `open` of both start and end drawers */ MatDrawerContainer.prototype.open = function () { this._drawers.forEach(function (drawer) { return drawer.open(); }); }; /** Calls `close` of both start and end drawers */ MatDrawerContainer.prototype.close = function () { this._drawers.forEach(function (drawer) { return drawer.close(); }); }; /** * Recalculates and updates the inline styles for the content. Note that this should be used * sparingly, because it causes a reflow. */ MatDrawerContainer.prototype.updateContentMargins = function () { var _this = this; // 1. For drawers in `over` mode, they don't affect the content. // 2. For drawers in `side` mode they should shrink the content. We do this by adding to the // left margin (for left drawer) or right margin (for right the drawer). // 3. For drawers in `push` mode the should shift the content without resizing it. We do this by // adding to the left or right margin and simultaneously subtracting the same amount of // margin from the other side. var left = 0; var right = 0; if (this._left && this._left.opened) { if (this._left.mode == 'side') { left += this._left._width; } else if (this._left.mode == 'push') { var width = this._left._width; left += width; right -= width; } } if (this._right && this._right.opened) { if (this._right.mode == 'side') { right += this._right._width; } else if (this._right.mode == 'push') { var width = this._right._width; right += width; left -= width; } } // If either `right` or `left` is zero, don't set a style to the element. This // allows users to specify a custom size via CSS class in SSR scenarios where the // measured widths will always be zero. Note that we reset to `null` here, rather // than below, in order to ensure that the types in the `if` below are consistent. left = left || null; right = right || null; if (left !== this._contentMargins.left || right !== this._contentMargins.right) { this._contentMargins = { left: left, right: right }; // Pull back into the NgZone since in some cases we could be outside. We need to be careful // to do it only when something changed, otherwise we can end up hitting the zone too often. this._ngZone.run(function () { return _this._contentMarginChanges.next(_this._contentMargins); }); } }; MatDrawerContainer.prototype.ngDoCheck = function () { var _this = this; // If users opted into autosizing, do a check every change detection cycle. if (this._autosize && this._isPushed()) { // Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop. this._ngZone.runOutsideAngular(function () { return _this._doCheckSubject.next(); }); } }; /** * Subscribes to drawer events in order to set a class on the main container element when the * drawer is open and the backdrop is visible. This ensures any overflow on the container element * is properly hidden. */ MatDrawerContainer.prototype._watchDrawerToggle = function (drawer) { var _this = this; drawer._animationStarted.pipe(filter(function (event) { return event.fromState !== event.toState; }), takeUntil(this._drawers.changes)) .subscribe(function (event) { // Set the transition class on the container so that the animations occur. This should not // be set initially because animations should only be triggered via a change in state. if (event.toState !== 'open-instant' && _this._animationMode !== 'NoopAnimations') { _this._element.nativeElement.classList.add('mat-drawer-transition'); } _this.updateContentMargins(); _this._changeDetectorRef.markForCheck(); }); if (drawer.mode !== 'side') { drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(function () { return _this._setContainerClass(drawer.opened); }); } }; /** * Subscribes to drawer onPositionChanged event in order to * re-validate drawers when the position changes. */ MatDrawerContainer.prototype._watchDrawerPosition = function (drawer) { var _this = this; if (!drawer) { return; } // NOTE: We need to wait for the microtask queue to be empty before validating, // since both drawers may be swapping positions at the same time. drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(function () { _this._ngZone.onMicrotaskEmpty.asObservable().pipe(take(1)).subscribe(function () { _this._validateDrawers(); }); }); }; /** Subscribes to changes in drawer mode so we can run change detection. */ MatDrawerContainer.prototype._watchDrawerMode = function (drawer) { var _this = this; if (drawer) { drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed))) .subscribe(function () { _this.updateContentMargins(); _this._changeDetectorRef.markForCheck(); }); } }; /** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */ MatDrawerContainer.prototype._setContainerClass = function (isAdd) { var classList = this._element.nativeElement.classList; var className = 'mat-drawer-container-has-open'; if (isAdd) { classList.add(className); } else { classList.remove(className); } }; /** Validate the state of the drawer children components. */ MatDrawerContainer.prototype._validateDrawers = function () { var _this = this; this._start = this._end = null; // Ensure that we have at most one start and one end drawer. this._drawers.forEach(function (drawer) { if (drawer.position == 'end') { if (_this._end != null) { throwMatDuplicatedDrawerError('end'); } _this._end = drawer; } else { if (_this._start != null) { throwMatDuplicatedDrawerError('start'); } _this._start = drawer; } }); this._right = this._left = null; // Detect if we're LTR or RTL. if (this._dir && this._dir.value === 'rtl') { this._left = this._end; this._right = this._start; } else { this._left = this._start; this._right = this._end; } }; /** Whether the container is being pushed to the side by one of the drawers. */ MatDrawerContainer.prototype._isPushed = function () { return (this._isDrawerOpen(this._start) && this._start.mode != 'over') || (this._isDrawerOpen(this._end) && this._end.mode != 'over'); }; MatDrawerContainer.prototype._onBackdropClicked = function () { this.backdropClick.emit(); this._closeModalDrawer(); }; MatDrawerContainer.prototype._closeModalDrawer = function () { var _this = this; // Close all open drawers where closing is not disabled and the mode is not `side`. [this._start, this._end] .filter(function (drawer) { return drawer && !drawer.disableClose && _this._canHaveBackdrop(drawer); }) .forEach(function (drawer) { return drawer.close(); }); }; MatDrawerContainer.prototype._isShowingBackdrop = function () { return (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) || (this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end)); }; MatDrawerContainer.prototype._canHaveBackdrop = function (drawer) { return drawer.mode !== 'side' || !!this._backdropOverride; }; MatDrawerContainer.prototype._isDrawerOpen = function (drawer) { return drawer != null && drawer.opened; }; MatDrawerContainer.decorators = [ { type: Component, args: [{ selector: 'mat-drawer-container', exportAs: 'matDrawerContainer', template: "<div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n<mat-drawer-content *ngIf=\"!_content\">\n <ng-content></ng-content>\n</mat-drawer-content>\n", host: { 'class': 'mat-drawer-container', '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride', }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: MAT_DRAWER_CONTAINER, useExisting: MatDrawerContainer }], styles: [".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n"] }] } ]; /** @nocollapse */ MatDrawerContainer.ctorParameters = function () { return [ { type: Directionality, decorators: [{ type: Optional }] }, { type: ElementRef }, { type: NgZone }, { type: ChangeDetectorRef }, { type: ViewportRuler }, { type: undefined, decorators: [{ type: Inject, args: [MAT_DRAWER_DEFAULT_AUTOSIZE,] }] }, { type: String, decorators: [{ type: Optional }, { type: Inject, args: [ANIMATION_MODULE_TYPE,] }] } ]; }; MatDrawerContainer.propDecorators = { _allDrawers: [{ type: ContentChildren, args: [MatDrawer, { // We need to use `descendants: true`, because Ivy will no longer match // indirect descendants if it's left as false. descendants: true },] }], _content: [{ type: ContentChild, args: [MatDrawerContent,] }], _userContent: [{ type: ViewChild, args: [MatDrawerContent,] }], autosize: [{ type: Input }], hasBackdrop: [{ type: Input }], backdropClick: [{ type: Output }] }; return MatDrawerContainer; }()); export { MatDrawerContainer }; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21hdGVyaWFsL3NpZGVuYXYvZHJhd2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFRQSxPQUFPLEVBQUMsWUFBWSxFQUEwQixnQkFBZ0IsRUFBQyxNQUFNLG1CQUFtQixDQUFDO0FBQ3pGLE9BQU8sRUFBQyxjQUFjLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUNqRCxPQUFPLEVBQWUscUJBQXFCLEVBQ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