novo-elements
Version:
1 lines • 62 kB
Source Map (JSON)
{"version":3,"file":"novo-elements-elements-layout.mjs","sources":["../../../projects/novo-elements/src/elements/layout/layout.constants.ts","../../../projects/novo-elements/src/elements/layout/content/layout-content.component.ts","../../../projects/novo-elements/src/elements/layout/rail/rail.component.ts","../../../projects/novo-elements/src/elements/layout/sidenav/sidenav.animations.ts","../../../projects/novo-elements/src/elements/layout/sidenav/sidenav.component.ts","../../../projects/novo-elements/src/elements/layout/sidenav/sidenav.component.html","../../../projects/novo-elements/src/elements/layout/container/layout-container.component.ts","../../../projects/novo-elements/src/elements/layout/container/layout-container.component.html","../../../projects/novo-elements/src/elements/layout/layout.module.ts","../../../projects/novo-elements/src/elements/layout/novo-elements-elements-layout.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * Throws an exception when two NovoSidenav are matching the same position.\n * @docs-private\n */\nexport function throwNovoDuplicatedSidenavError(position: string) {\n throw Error(`A drawer was already declared for 'position=\"${position}\"'`);\n}\n\n/** Result of the toggle promise that indicates the state of the drawer. */\nexport type NovoSidenavToggleResult = 'open' | 'close';\n\n/** Sidenav and SideNav display modes. */\nexport type NovoSidenavMode = 'over' | 'push' | 'side';\n\n/** Configures whether drawers should use auto sizing by default. */\nexport const NOVO_LAYOUT_DEFAULT_AUTOSIZE = new InjectionToken<boolean>('NOVO_LAYOUT_DEFAULT_AUTOSIZE', {\n providedIn: 'root',\n factory: NOVO_LAYOUT_DEFAULT_AUTOSIZE_FACTORY,\n});\n\n/**\n * Used to provide a drawer container to a drawer while avoiding circular references.\n * @docs-private\n */\nexport const NOVO_LAYOUT_CONTAINER = new InjectionToken('NOVO_LAYOUT_CONTAINER');\n\n/** @docs-private */\nexport function NOVO_LAYOUT_DEFAULT_AUTOSIZE_FACTORY(): boolean {\n return false;\n}\n","import { CdkScrollable, ScrollDispatcher } from '@angular/cdk/overlay';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n Inject,\n NgZone,\n ViewEncapsulation,\n} from '@angular/core';\nimport { NOVO_LAYOUT_CONTAINER } from '../layout.constants';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'novo-layout-content',\n exportAs: 'novoLayoutContent',\n template: '<ng-content></ng-content>',\n host: {\n class: 'novo-layout-content',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class NovoLayoutContent extends CdkScrollable implements AfterContentInit {\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(NOVO_LAYOUT_CONTAINER) public _container: any,\n elementRef: ElementRef<HTMLElement>,\n scrollDispatcher: ScrollDispatcher,\n ngZone: NgZone,\n private destroyRef: DestroyRef,\n ) {\n super(elementRef, scrollDispatcher, ngZone);\n }\n\n ngAfterContentInit() {\n this._container._contentMarginChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this._changeDetectorRef.markForCheck();\n });\n }\n\n getHostElement() {\n return this.elementRef.nativeElement;\n }\n}\n","import { CdkScrollable, ScrollDispatcher } from '@angular/cdk/overlay';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ElementRef, NgZone, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'novo-rail',\n template: `\n <div class=\"novo-rail-contents\">\n <ng-content></ng-content>\n </div>\n `,\n host: {\n class: 'novo-rail',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: false,\n})\nexport class NovoRailComponent extends CdkScrollable implements AfterContentInit {\n constructor(elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, ngZone: NgZone) {\n super(elementRef, scrollDispatcher, ngZone);\n }\n\n ngAfterContentInit() {}\n}\n","import { animate, AnimationTriggerMetadata, state, style, transition, trigger } from '@angular/animations';\n\n/**\n * Animations used by the Material drawers.\n * @docs-private\n */\nexport const novoSidenavAnimations: {\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(\n 'open, open-instant',\n style({\n transform: 'none',\n visibility: 'visible',\n }),\n ),\n state(\n 'void',\n style({\n // Avoids the shadow showing up when closed in SSR.\n 'box-shadow': 'none',\n visibility: 'hidden',\n }),\n ),\n transition('void => open-instant', animate('0ms')),\n transition('void <=> open, open-instant => void', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),\n ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusMonitor, FocusOrigin, FocusTrap, FocusTrapFactory } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty, coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { hasModifierKey } from '@angular/cdk/keycodes';\nimport { Platform } from '@angular/cdk/platform';\n\nimport {\n AfterContentChecked,\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewEncapsulation,\n DOCUMENT,\n} from '@angular/core';\nimport { Key } from 'novo-elements/utils';\nimport { fromEvent, Observable, Subject } from 'rxjs';\nimport { distinctUntilChanged, filter, map, mapTo, take, takeUntil } from 'rxjs/operators';\nimport { NovoSidenavMode, NovoSidenavToggleResult, NOVO_LAYOUT_CONTAINER } from '../layout.constants';\nimport { novoSidenavAnimations } from './sidenav.animations';\n\n@Component({\n selector: 'novo-sidenav',\n exportAs: 'novoSidenav',\n templateUrl: './sidenav.component.html',\n styleUrls: ['./sidenav.component.scss'],\n animations: [novoSidenavAnimations.transformDrawer],\n host: {\n class: 'novo-sidenav',\n tabIndex: '-1',\n // must prevent the browser from aligning text based on value\n '[attr.align]': 'null',\n '[class.novo-sidenav-end]': 'position === \"end\"',\n '[class.novo-sidenav-over]': 'mode === \"over\"',\n '[class.novo-sidenav-push]': 'mode === \"push\"',\n '[class.novo-sidenav-side]': 'mode === \"side\"',\n '[class.novo-sidenav-opened]': 'opened',\n '[class.novo-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 standalone: false,\n})\nexport class NovoSidenavComponent implements AfterContentInit, AfterContentChecked, OnDestroy {\n /** Whether the sidenav is fixed in the viewport. */\n @Input()\n get fixedInViewport(): boolean {\n return this._fixedInViewport;\n }\n set fixedInViewport(value) {\n this._fixedInViewport = coerceBooleanProperty(value);\n }\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 {\n return this._fixedTopGap;\n }\n set fixedTopGap(value) {\n this._fixedTopGap = coerceNumberProperty(value);\n }\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 {\n return this._fixedBottomGap;\n }\n set fixedBottomGap(value) {\n this._fixedBottomGap = coerceNumberProperty(value);\n }\n private _fixedBottomGap = 0;\n\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' {\n return this._position;\n }\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(): NovoSidenavMode {\n return this._mode;\n }\n set mode(value: NovoSidenavMode) {\n this._mode = value;\n this._updateFocusTrapState();\n this._modeChanged.next();\n }\n private _mode: NovoSidenavMode = '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 {\n return this._disableClose;\n }\n set disableClose(value: boolean) {\n this._disableClose = coerceBooleanProperty(value);\n }\n private _disableClose: boolean = false;\n\n /**\n * Whether the drawer should focus the first focusable element automatically when opened.\n * Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly\n * enabled, focus will be moved into the sidenav in `side` mode as well.\n */\n @Input()\n get autoFocus(): boolean {\n const value = this._autoFocus;\n\n // Note that usually we disable auto focusing in `side` mode, because we don't know how the\n // sidenav is being used, but in some cases it still makes sense to do it. If the consumer\n // explicitly enabled `autoFocus`, we take it as them always wanting to enable it.\n return value == null ? this.mode !== 'side' : value;\n }\n set autoFocus(value: boolean) {\n this._autoFocus = coerceBooleanProperty(value);\n }\n private _autoFocus: boolean | undefined;\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 {\n return this._opened;\n }\n set opened(value: boolean) {\n this.toggle(coerceBooleanProperty(value));\n }\n private _opened: boolean = false;\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 @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 _openedStream = this.openedChange.pipe(\n filter((o) => o),\n map(() => {}),\n );\n\n /** Event emitted when the drawer has started opening. */\n @Output()\n readonly openedStart: Observable<void> = this._animationStarted.pipe(\n filter((e) => e.fromState !== e.toState && e.toState.indexOf('open') === 0),\n mapTo(undefined),\n );\n\n /** Event emitted when the drawer has been closed. */\n @Output('closed')\n _closedStream = this.openedChange.pipe(\n filter((o) => !o),\n map(() => {}),\n );\n\n /** Event emitted when the drawer has started closing. */\n @Output()\n readonly closedStart: Observable<void> = this._animationStarted.pipe(\n filter((e) => e.fromState !== e.toState && e.toState === 'void'),\n mapTo(undefined),\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 @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<void>();\n\n constructor(\n 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 @Optional() @Inject(NOVO_LAYOUT_CONTAINER) public _container?: 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 this._takeFocus();\n } else if (this._isFocusWithinDrawer()) {\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>)\n .pipe(\n filter((event) => {\n return event.key === Key.Escape && !this.disableClose && !hasModifierKey(event);\n }),\n takeUntil(this._destroyed),\n )\n .subscribe((event) =>\n this._ngZone.run(() => {\n this.close();\n event.stopPropagation();\n event.preventDefault();\n }),\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\n .pipe(\n distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n }),\n )\n .subscribe((event: AnimationEvent) => {\n const { fromState, toState } = event;\n\n if ((toState.indexOf('open') === 0 && fromState === 'void') || (toState === 'void' && fromState.indexOf('open') === 0)) {\n this.openedChange.emit(this._opened);\n }\n });\n }\n\n /**\n * Moves focus into the drawer. Note that this works even if\n * the focus trap is disabled in `side` mode.\n */\n private _takeFocus() {\n if (!this.autoFocus || !this._focusTrap) {\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 * Restores focus to the element that was originally focused when the drawer opened.\n * If no element was focused at that time, the focus will be restored to the drawer.\n */\n private _restoreFocus() {\n if (!this.autoFocus) {\n return;\n }\n\n // Note that we don't check via `instanceof HTMLElement` so that we can cover SVGs as well.\n if (this._elementFocusedBeforeDrawerWasOpened) {\n this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, this._openedVia);\n } else {\n this._elementRef.nativeElement.blur();\n }\n\n this._elementFocusedBeforeDrawerWasOpened = null;\n this._openedVia = null;\n }\n\n /** Whether focus is currently within the drawer. */\n private _isFocusWithinDrawer(): boolean {\n const activeEl = this._doc?.activeElement;\n return !!activeEl && this._elementRef.nativeElement.contains(activeEl);\n }\n\n ngAfterContentInit() {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n this._updateFocusTrapState();\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 * 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<NovoSidenavToggleResult> {\n return this.toggle(true, openedVia);\n }\n\n /** Close the drawer. */\n close(): Promise<NovoSidenavToggleResult> {\n return this.toggle(false);\n }\n\n /** Closes the drawer with context that the backdrop was clicked. */\n _closeViaBackdropClick(): Promise<NovoSidenavToggleResult> {\n // If the drawer is closed upon a backdrop click, we always want to restore focus. We\n // don't need to check whether focus is currently in the drawer, as clicking on the\n // backdrop causes blurring of the active element.\n return this._setOpen(/* isOpen */ false, /* restoreFocus */ true);\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): Promise<NovoSidenavToggleResult> {\n // If the focus is currently inside the drawer content and we are closing the drawer,\n // restore the focus to the initially focused element (when the drawer opened).\n return this._setOpen(isOpen, /* restoreFocus */ !isOpen && this._isFocusWithinDrawer(), openedVia);\n }\n\n /**\n * Toggles the opened state of the drawer.\n * @param isOpen Whether the drawer should open or close.\n * @param restoreFocus Whether focus should be restored on close.\n * @param openedVia Focus origin that can be optionally set when opening a drawer. The\n * origin will be used later when focus is restored on drawer close.\n */\n private _setOpen(isOpen: boolean, restoreFocus: boolean, openedVia: FocusOrigin = 'program'): Promise<NovoSidenavToggleResult> {\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 if (restoreFocus) {\n this._restoreFocus();\n }\n }\n\n this._updateFocusTrapState();\n\n return new Promise<NovoSidenavToggleResult>((resolve) => {\n this.openedChange.pipe(take(1)).subscribe((open) => resolve(open ? 'open' : 'close'));\n });\n }\n\n _getWidth(): number {\n return this._elementRef.nativeElement ? this._elementRef.nativeElement.offsetWidth || 0 : 0;\n }\n\n /** Updates the enabled state of the focus trap. */\n private _updateFocusTrapState() {\n if (this._focusTrap) {\n // The focus trap is only enabled when the drawer is open in any mode other than side.\n this._focusTrap.enabled = this.opened && this.mode !== 'side';\n }\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 overwritten.\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 overwritten.\n @HostListener('@transform.done', ['$event'])\n _animationDoneListener(event: AnimationEvent) {\n this._animationEnd.next(event);\n }\n\n static ngAcceptInputType_disableClose: BooleanInput;\n static ngAcceptInputType_autoFocus: BooleanInput;\n static ngAcceptInputType_opened: BooleanInput;\n\n static ngAcceptInputType_fixedInViewport: BooleanInput;\n static ngAcceptInputType_fixedTopGap: NumberInput;\n static ngAcceptInputType_fixedBottomGap: NumberInput;\n}\n","<div class=\"novo-sidenav-inner-container\">\n <ng-content></ng-content>\n</div>","import { AnimationEvent } from '@angular/animations';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CdkScrollable, ViewportRuler } from '@angular/cdk/overlay';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n DoCheck,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { merge, Subject } from 'rxjs';\nimport { debounceTime, filter, startWith, take, takeUntil } from 'rxjs/operators';\nimport { NovoLayoutContent } from '../content/layout-content.component';\nimport { NOVO_LAYOUT_CONTAINER, NOVO_LAYOUT_DEFAULT_AUTOSIZE } from '../layout.constants';\nimport { NovoRailComponent } from '../rail/rail.component';\nimport { NovoSidenavComponent } from '../sidenav/sidenav.component';\n\n@Component({\n selector: 'novo-layout-container',\n exportAs: 'novoLayoutContainer',\n templateUrl: './layout-container.component.html',\n styleUrls: ['./layout-container.component.scss'],\n host: {\n class: 'novo-layout-container',\n '[class.novo-layout-container-explicit-backdrop]': '_backdropOverride',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NOVO_LAYOUT_CONTAINER,\n useExisting: NovoLayoutContainer,\n },\n ],\n standalone: false,\n})\nexport class NovoLayoutContainer implements AfterContentInit, DoCheck, OnDestroy {\n @ContentChildren(NovoSidenavComponent, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true,\n })\n _allDrawers: QueryList<NovoSidenavComponent>;\n\n @ContentChild(NovoRailComponent) _rail: NovoRailComponent;\n\n @ContentChild(NovoLayoutContent) _content: NovoLayoutContent;\n\n /** Drawers that belong to this container. */\n _drawers = new QueryList<NovoSidenavComponent>();\n\n @ViewChild(NovoLayoutContent) _userContent: NovoLayoutContent;\n\n /** The drawer child with the `start` position. */\n get start(): NovoSidenavComponent | null {\n return this._start;\n }\n\n /** The drawer child with the `end` position. */\n get end(): NovoSidenavComponent | null {\n return this._end;\n }\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 {\n return this._autosize;\n }\n set autosize(value: boolean) {\n this._autosize = coerceBooleanProperty(value);\n }\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: NovoSidenavComponent | null;\n private _end: NovoSidenavComponent | 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: NovoSidenavComponent | null;\n private _right: NovoSidenavComponent | 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(\n @Optional() private _dir: Directionality,\n private _element: ElementRef<HTMLElement>,\n private _ngZone: NgZone,\n private _changeDetectorRef: ChangeDetectorRef,\n viewportRuler: ViewportRuler,\n @Inject(NOVO_LAYOUT_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\n .change()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateContentMargins());\n\n this._autosize = defaultAutosize;\n }\n\n ngAfterContentInit() {\n this._allDrawers.changes\n .pipe(startWith(this._allDrawers), takeUntil(this._destroyed))\n .subscribe((drawer: QueryList<NovoSidenavComponent>) => {\n this._drawers.reset(drawer.filter((item) => !item._container || item._container === this));\n this._drawers.notifyOnChanges();\n });\n\n this._drawers.changes.pipe(startWith(null)).subscribe(() => {\n this._validateDrawers();\n\n this._drawers.forEach((drawer: NovoSidenavComponent) => {\n this._watchDrawerToggle(drawer);\n this._watchDrawerPosition(drawer);\n this._watchDrawerMode(drawer);\n });\n\n if (!this._drawers.length || this._isDrawerOpen(this._start) || this._isDrawerOpen(this._end)) {\n this.updateContentMargins();\n }\n\n this._changeDetectorRef.markForCheck();\n });\n\n // Avoid hitting the NgZone through the debounce timeout.\n this._ngZone.runOutsideAngular(() => {\n this._doCheckSubject\n .pipe(\n debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps\n takeUntil(this._destroyed),\n )\n .subscribe(() => this.updateContentMargins());\n });\n }\n\n ngOnDestroy() {\n this._contentMarginChanges.complete();\n this._doCheckSubject.complete();\n this._drawers.destroy();\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._getWidth();\n } else if (this._left.mode === 'push') {\n const width = this._left._getWidth();\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._getWidth();\n } else if (this._right.mode === 'push') {\n const width = this._right._getWidth();\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: NovoSidenavComponent): void {\n drawer._animationStarted\n .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(() => 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: NovoSidenavComponent): 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.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: NovoSidenavComponent): void {\n if (drawer) {\n drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed))).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 const classList = this._element.nativeElement.classList;\n const className = 'mat-drawer-container-has-open';\n\n if (isAdd) {\n classList.add(className);\n } else {\n classList.remove(className);\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 throw new Error('Duplication drawers at end');\n }\n this._end = drawer;\n } else {\n if (this._start != null) {\n throw new Error('Duplication drawers at 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') || (this._isDrawerOpen(this._end) && this._end.mode !== 'over');\n }\n\n _onBackdropClicked() {\n this.backdropClick.emit();\n this._closeModalDrawersViaBackdrop();\n }\n\n _closeModalDrawersViaBackdrop() {\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._closeViaBackdropClick());\n }\n\n _isShowingBackdrop(): boolean {\n return (\n (this._isDrawerOpen(this._start) && this._canHaveBackdrop(this._start)) ||\n (this._isDrawerOpen(this._end) && this._canHaveBackdrop(this._end))\n );\n }\n\n private _canHaveBackdrop(drawer: NovoSidenavComponent): boolean {\n return drawer.mode !== 'side' || !!this._backdropOverride;\n }\n\n private _isDrawerOpen(drawer: NovoSidenavComponent | null): drawer is NovoSidenavComponent {\n return drawer != null && drawer.opened;\n }\n\n static ngAcceptInputType_autosize: BooleanInput;\n static ngAcceptInputType_hasBackdrop: BooleanInput;\n}\n","<div class=\"novo-drawer-backdrop\" (click)=\"_onBackdropClicked()\" *ngIf=\"hasBackdrop\"\n [class.novo-drawer-shown]=\"_isShowingBackdrop()\"></div>\n\n<ng-content select=\"novo-sidenav\"></ng-content>\n\n<div class=\"novo-layout-content-container\"\n [class.and-has-rail]=\"_rail\"\n [style.margin-left.px]=\"_contentMargins.left\"\n [style.margin-right.px]=\"_contentMargins.right\">\n <ng-content select=\"novo-rail\"></ng-content>\n\n <ng-content select=\"novo-layout-content\">\n </ng-content>\n\n <novo-layout-content *ngIf=\"!_content\" cdkScrollable>\n <ng-content></ng-content>\n </novo-layout-content>\n</div>","// NG2\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n// APP\nimport { NovoLayoutContainer } from './container/layout-container.component';\nimport { NovoLayoutContent } from './content/layout-content.component';\nimport { NovoRailComponent } from './rail/rail.component';\nimport { NovoSidenavComponent } from './sidenav/sidenav.component';\n@NgModule({\n imports: [CommonModule],\n declarations: [NovoLayoutContainer, NovoLayoutContent, NovoSidenavComponent, NovoRailComponent],\n exports: [NovoLayoutContainer, NovoLayoutContent, NovoSidenavComponent, NovoRailComponent],\n})\nexport class NovoLayoutModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2","i4.NovoLayoutContent"],"mappings":";;;;;;;;;;;;;;;;;AAEA;;;AAGG;AACG,SAAU,+BAA+B,CAAC,QAAgB,EAAA;AAC9D,IAAA,MAAM,KAAK,CAAC,CAAA,6CAAA,EAAgD,QAAQ,CAAA,EAAA,CAAI,CAAC;AAC3E;AAQA;MACa,4BAA4B,GAAG,IAAI,cAAc,CAAU,8BAA8B,EAAE;AACtG,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,oCAAoC;AAC9C,CAAA;AAED;;;AAGG;MACU,qBAAqB,GAAG,IAAI,cAAc,CAAC,uBAAuB;AAE/E;SACgB,oCAAoC,GAAA;AAClD,IAAA,OAAO,KAAK;AACd;;ACLM,MAAO,iBAAkB,SAAQ,aAAa,CAAA;IAClD,WAAA,CACU,kBAAqC,EACP,UAAe,EACrD,UAAmC,EACnC,gBAAkC,EAClC,MAAc,EACN,UAAsB,EAAA;AAE9B,QAAA,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,MAAM,CAAC;QAPnC,IAAA,CAAA,kBAAkB,GAAlB,kBAAkB;QACY,IAAA,CAAA,UAAU,GAAV,UAAU;QAIxC,IAAA,CAAA,UAAU,GAAV,UAAU;IAGpB;IAEA,kBAAkB,G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