@datarailsshared/datarailsshared 1.5.556 → 1.5.558
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datarailsshared-datarailsshared-1.5.558.tgz +0 -0
- package/esm2022/lib/dr-avatar/dr-avatar.component.mjs +33 -29
- package/esm2022/lib/dr-dialog/services/dialog.service.mjs +4 -1
- package/esm2022/lib/drawer/drawer-config.mjs +1 -1
- package/esm2022/src/lib/drawer/drawer-config.mjs +1 -1
- package/fesm2022/datarailsshared-datarailsshared.mjs +34 -27
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/fesm2022/drDrawer.mjs.map +1 -1
- package/lib/dr-avatar/dr-avatar.component.d.ts +1 -1
- package/lib/dr-dialog/services/dialog.service.d.ts +3 -0
- package/lib/drawer/drawer-config.d.ts +6 -1
- package/package.json +1 -1
- package/src/lib/drawer/drawer-config.d.ts +6 -1
- package/datarailsshared-datarailsshared-1.5.556.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drDrawer.mjs","sources":["../../../projects/datarailsshared/src/lib/drawer/drawer-config.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-animation.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-position-strategy.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-container.component.html","../../../projects/datarailsshared/src/lib/drawer/drawer-container.component.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-ref.ts","../../../projects/datarailsshared/src/lib/drawer/drawer.service.ts","../../../projects/datarailsshared/src/lib/drawer/drawer.module.ts","../../../projects/datarailsshared/src/lib/drawer/drDrawer.ts"],"sourcesContent":["import { Direction } from '@angular/cdk/bidi';\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport { ViewContainerRef } from '@angular/core';\n\n/** Options for where to set focus to automatically on dialog open. */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Possible overrides for a drawer's position. */\nexport type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Configuration used when opening a drawer.\n */\nexport class DrawerConfig<D = any> {\n /** The view container to place the overlay for the drawer into. */\n viewContainerRef?: ViewContainerRef;\n\n /** ID for the drawer. If omitted, a unique one will be generated. */\n id?: string;\n\n /** Extra CSS classes to be added to the drawer container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the drawer. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the drawer has a backdrop. */\n hasBackdrop?: boolean = false;\n\n /** Custom class for the backdrop. */\n backdropClass?: string;\n\n /** Whether the user can use escape or clicking outside to close the drawer. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the drawer element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether the drawer should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n /**\n * Where the drawer should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /**\n * Whether the drawer should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the drawer. */\n scrollStrategy?: ScrollStrategy;\n\n /** Position of the drawer. */\n position?: DrawerPosition = 'bottom';\n\n /** Width of the drawer. */\n width?: string;\n\n /** Height of the drawer. */\n height?: string;\n\n /** Min-width of the drawer. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the drawer. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the drawer. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the drawer. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n}\n","import { animate, state, style, transition, trigger, AnimationTriggerMetadata } from '@angular/animations';\n\n/** Animations used by the drawer. */\nexport const drDrawerAnimations: {\n readonly drawerState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a drawer. */\n drawerState: trigger('state', [\n state(\n 'void, hidden',\n style({\n 'box-shadow': 'none',\n visibility: 'hidden',\n }),\n ),\n state(\n 'visible',\n style({\n transform: 'none',\n visibility: 'visible',\n }),\n ),\n transition('visible => void, visible => hidden', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),\n transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n ]),\n};\n","export interface DrawerPositionStrategy {\n extractMousePosition(event: MouseEvent): number;\n calculateTransform(currentPosition: number, containerPosition: number): string;\n shouldClose(currentPosition: number, initPosition: number, lastPosition: number): boolean;\n}\n\nexport class BottomPositionStrategy implements DrawerPositionStrategy {\n extractMousePosition(event: MouseEvent): number {\n return event.clientY;\n }\n\n calculateTransform(currentPosition: number, containerPosition: number): string {\n return currentPosition > containerPosition\n ? `translate3d(0px, ${currentPosition - containerPosition}px, 0px)`\n : `translate3d(0px, 0px, 0px)`;\n }\n\n shouldClose(currentPosition: number, initPosition: number, lastPosition: number): boolean {\n return Math.abs(currentPosition - initPosition) <= currentPosition - lastPosition;\n }\n}\n","<div *ngIf=\"_config.position === 'bottom'\" #handleRef class=\"handle\"></div>\n<div class=\"dr-drawer-container__wrapper\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusMonitor, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { CdkDialogContainer, DialogModule } from '@angular/cdk/dialog';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';\nimport { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { distinctUntilChanged, finalize, fromEvent, map, Subject, switchMap, takeUntil, tap } from 'rxjs';\nimport { drDrawerAnimations } from './drawer-animation';\nimport { DrawerConfig } from './drawer-config';\nimport { BottomPositionStrategy, DrawerPositionStrategy } from './drawer-position-strategy';\n\n/**\n * Internal component that wraps user-provided drawer content.\n * @docs-private\n */\n@Component({\n selector: 'dr-drawer-container',\n templateUrl: 'drawer-container.component.html',\n styleUrls: ['drawer-container.component.scss'],\n // In Ivy embedded views will be change detected from their declaration place, rather than where\n // they were stamped out. This means that we can't have the drawer container be OnPush,\n // because it might cause the sheets that were opened from a template not to be out of date.\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [drDrawerAnimations.drawerState],\n host: {\n class: 'dr-drawer-container',\n '[class]': '_drawerPosition',\n tabindex: '-1',\n '[id]': '_config.id',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.isModal',\n '[attr.aria-label]': '_config.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n standalone: true,\n imports: [PortalModule, DialogModule, MatCommonModule, CommonModule],\n})\nexport class DrawerContainer extends CdkDialogContainer<DrawerConfig> implements OnDestroy, AfterViewInit {\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, { static: true })\n _portalOutlet!: CdkPortalOutlet;\n\n @ViewChild('handleRef')\n _handleRef!: ElementRef<HTMLDivElement>;\n\n /** The state of the drawer animations. */\n _animationState: 'void' | 'visible' | 'hidden' = 'void';\n\n /** Emits whenever the state of the animation changes. */\n readonly _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** Whether the component has been destroyed. */\n private _destroyed = false;\n\n get _drawerPosition() {\n return `dr-drawer-${this._config.position}`;\n }\n\n private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n\n private readonly destroy$ = new Subject<void>();\n\n positionStrategy!: DrawerPositionStrategy;\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n focusTrapFactory: FocusTrapFactory,\n @Optional() @Inject(DOCUMENT) document: Document,\n config: DrawerConfig,\n checker: InteractivityChecker,\n ngZone: NgZone,\n private overlayRef: OverlayRef,\n focusMonitor?: FocusMonitor,\n ) {\n super(elementRef, focusTrapFactory, document, config, checker, ngZone, overlayRef, focusMonitor);\n }\n\n protected override _contentAttached(): void {\n // Delegate to the original dialog-container initialization (i.e. saving the\n // previous element, setting up the focus trap and moving focus to the container).\n super._contentAttached();\n\n this.enter();\n }\n\n /** Begin animation of bottom sheet entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.markForCheck();\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the bottom sheet exiting from view. */\n exit(): void {\n (this._elementRef.nativeElement as HTMLElement).style.transition = undefined;\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngAfterViewInit(): void {\n this.positionStrategy = this.resolvePositionStrategy();\n if (this.positionStrategy) {\n this.setupDragListener();\n }\n }\n\n private resolvePositionStrategy(): DrawerPositionStrategy {\n switch (this._config.position) {\n case 'bottom':\n return new BottomPositionStrategy();\n }\n }\n\n private setupDragListener(): void {\n const mousedown$ = fromEvent(this._handleRef.nativeElement, 'mousedown');\n const mousemove$ = fromEvent(document, 'mousemove');\n const mouseup$ = fromEvent(document, 'mouseup');\n\n let lastPosition = 0;\n let initPosition = 0;\n let currentPosition = 0;\n const container = this._elementRef.nativeElement as HTMLElement;\n\n setTimeout(() => {\n lastPosition = this.getContainerPosition(container);\n initPosition = lastPosition;\n });\n\n mousedown$\n .pipe(\n switchMap(() =>\n mousemove$.pipe(\n finalize(() => {\n const container = this._elementRef.nativeElement as HTMLElement;\n if (this.positionStrategy.shouldClose(currentPosition, initPosition, lastPosition)) {\n this.overlayRef.dispose();\n return;\n }\n container.style.transition = 'transform 0.5s cubic-bezier(0.32, 0.72, 0, 1)';\n container.style.transform = `translate3d(0px, 0px, 0px)`;\n }),\n takeUntil(mouseup$),\n ),\n ),\n map((event: MouseEvent) => this.positionStrategy.extractMousePosition(event)),\n distinctUntilChanged(),\n tap((position) => {\n let containerPosition = this.getContainerPosition(container);\n\n containerPosition = Math.min(containerPosition, lastPosition);\n lastPosition = Math.min(containerPosition, lastPosition);\n currentPosition = position;\n\n container.style.transition = 'none';\n container.style.transform = this.positionStrategy.calculateTransform(position, containerPosition);\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n private getContainerPosition(container: HTMLElement): number {\n return this._config.position === 'bottom' || this._config.position === 'top'\n ? container.getBoundingClientRect().top\n : container.getBoundingClientRect().left;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n\n this.destroy$.next();\n this.destroy$.complete();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n protected override _captureInitialFocus(): void {}\n}\n","import { DialogRef } from '@angular/cdk/dialog';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { DrawerConfig } from './drawer-config';\nimport { DrawerContainer } from './drawer-container.component';\nimport { ComponentRef } from '@angular/core';\n\n/**\n * Reference to a drawer dispatched from the drawer service.\n */\nexport class DrawerRef<T = any, R = any> {\n /** Instance of the component making up the content of the drawer. */\n get instance(): T {\n return this._ref.componentInstance!;\n }\n\n /**\n * `ComponentRef` of the component opened into the drawer. Will be\n * null when the drawer is opened using a `TemplateRef`.\n */\n get componentRef(): ComponentRef<T> | null {\n return this._ref.componentRef;\n }\n\n /**\n * Instance of the component into which the drawer content is projected.\n * @docs-private\n */\n containerInstance: DrawerContainer;\n\n /** Whether the user is allowed to close the drawer. */\n disableClose: boolean | undefined;\n\n /** Unique ID for the drawer. */\n id: string;\n\n /** Subject for notifying the user that the drawer has been dismissed. */\n private readonly _afterDismissed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the drawer has opened and appeared. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: any;\n\n constructor(\n private _ref: DialogRef<R, T>,\n config: DrawerConfig,\n containerInstance: DrawerContainer,\n ) {\n this.containerInstance = containerInstance;\n this.disableClose = config.disableClose;\n this.id = _ref.id;\n\n // Emit when opening animation completes\n containerInstance._animationStateChanged\n .pipe(\n filter((event) => event.phaseName === 'done' && event.toState === 'visible'),\n take(1),\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(\n filter((event) => event.phaseName === 'done' && event.toState === 'hidden'),\n take(1),\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._ref.close(this._result);\n });\n\n _ref.overlayRef.detachments().subscribe(() => {\n this._ref.close(this._result);\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(this.backdropClick(), this.keydownEvents().pipe(filter((event) => event.keyCode === ESCAPE))).subscribe((event) => {\n if (!this.disableClose && (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the drawer.\n * @param result Data to be passed back to the drawer opener.\n */\n dismiss(result?: R): void {\n this._afterDismissed.next(result);\n this._afterDismissed.complete();\n\n if (this.containerInstance && !this._afterDismissed.closed) {\n // Transition the backdrop in parallel to the drawer.\n this.containerInstance._animationStateChanged\n .pipe(\n filter((event) => event.phaseName === 'start'),\n take(1),\n )\n .subscribe((event) => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._ref.close(this._result);\n }, event.totalTime + 100);\n\n this._ref.overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n this.containerInstance = null!;\n }\n }\n\n /** Gets an observable that is notified when the drawer is dismissed. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\n }\n\n /** Gets an observable that is notified when the drawer is finished closing. */\n afterClosed(): Observable<R | undefined> {\n return this._ref.closed;\n }\n\n /** Gets an observable that is notified when the drawer has opened and appeared. */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._ref.backdropClick;\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._ref.keydownEvents;\n }\n}\n","import { coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { Dialog, DialogConfig } from '@angular/cdk/dialog';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable, InjectionToken, Injector, OnDestroy, Optional, SkipSelf, TemplateRef } from '@angular/core';\nimport { defer, Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { DrawerConfig } from './drawer-config';\nimport { DrawerContainer } from './drawer-container.component';\nimport { DrawerRef } from './drawer-ref';\n\n/** Injection token that can be used to access the data that was passed in to a drawer. */\nexport const DR_DRAWER_DATA = new InjectionToken<any>('DrDrawerData');\n\n/** Injection token that can be used to specify default drawer options. */\nexport const DR_DRAWER_DEFAULT_OPTIONS = new InjectionToken<DrawerConfig>('dr-drawer-default-options');\n\n// Counter for unique drawer ids.\nlet uniqueId = 0;\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({ providedIn: 'root' })\nexport class Drawer implements OnDestroy {\n private readonly _openDrawersAtThisLevel: DrawerRef<any>[] = [];\n private readonly _afterAllDismissedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<DrawerRef<any>>();\n private _dialog: Dialog;\n\n /** Keeps track of the currently-open dialogs. */\n get openDrawers(): DrawerRef[] {\n return this._parentDrawer ? this._parentDrawer.openDrawers : this._openDrawersAtThisLevel;\n }\n\n /** Stream that emits when a drawer has been opened. */\n get afterOpened(): Subject<DrawerRef<any>> {\n return this._parentDrawer ? this._parentDrawer.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n private _getAfterAllDismissed(): Subject<void> {\n const parent = this._parentDrawer;\n return parent ? parent._getAfterAllDismissed() : this._afterAllDismissedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open drawer have finished closing.\n * Will emit on subscribe if there are no open drawers to begin with.\n */\n readonly afterAllDismissed: Observable<void> = defer(() =>\n this.openDrawers.length ? this._getAfterAllDismissed() : this._getAfterAllDismissed().pipe(startWith(undefined)),\n );\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentDrawer: Drawer,\n @Optional()\n @Inject(DR_DRAWER_DEFAULT_OPTIONS)\n private _defaultOptions?: DrawerConfig,\n ) {\n this._dialog = _injector.get(Dialog);\n }\n\n /**\n * Opens a drawer containing the given component.\n * @param component Type of the component to load into the drawer.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(component: ComponentType<T>, config?: DrawerConfig<D>): DrawerRef<T, R>;\n\n /**\n * Opens a drawer containing the given template.\n * @param template TemplateRef to instantiate as the drawer content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(template: TemplateRef<T>, config?: DrawerConfig<D>): DrawerRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: DrawerConfig<D>,\n ): DrawerRef<T, R> {\n let drawerRef!: DrawerRef<T, R>;\n\n const _config = { ...(this._defaultOptions || new DrawerConfig()), ...config };\n _config.id = _config.id || `dr-drawer-${uniqueId++}`;\n\n _config.width =\n _config.position === 'left' || _config.position === 'right' ? coerceCssPixelValue(_config.width) : '100vw';\n\n _config.height =\n _config.position === 'top' || _config.position === 'bottom' ? coerceCssPixelValue(_config.height) : '100vh';\n\n this._dialog.open<R, D, T>(componentOrTemplateRef, {\n ..._config,\n // Disable closing since we need to sync it up to the animation ourselves.\n disableClose: true,\n // Disable closing on detachments so that we can sync up the animation.\n closeOnOverlayDetachments: false,\n container: {\n type: DrawerContainer,\n providers: () => [\n // Provide our config as the CDK config as well since it has the same interface as the\n // CDK one, but it contains the actual values passed in by the user for things like\n // `disableClose` which we disable for the CDK dialog since we handle it ourselves.\n { provide: DrawerConfig, useValue: _config },\n { provide: DialogConfig, useValue: _config },\n ],\n },\n scrollStrategy: _config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global()[_config.position!]('0'),\n templateContext: () => ({ drawerRef }),\n providers: (cdkRef, _cdkConfig, container) => {\n drawerRef = new DrawerRef(cdkRef, _config, container as DrawerContainer);\n return [\n { provide: DrawerRef, useValue: drawerRef },\n { provide: DR_DRAWER_DATA, useValue: _config.data },\n ];\n },\n });\n\n this.openDrawers.push(drawerRef);\n this.afterOpened.next(drawerRef);\n\n drawerRef.afterDismissed().subscribe(() => {\n const index = this.openDrawers.indexOf(drawerRef);\n\n if (index > -1) {\n this.openDrawers.splice(index, 1);\n\n if (!this.openDrawers.length) {\n this._getAfterAllDismissed().next();\n }\n }\n });\n\n return drawerRef;\n }\n\n /**\n * Dismisses all of the currently-open drawers.\n */\n dismissAll(): void {\n this._dismissDrawers(this.openDrawers);\n }\n\n /**\n * Finds an open drawer by its id.\n * @param id ID to use when looking up the drawer.\n */\n getDrawerById(id: string): DrawerRef<any> | undefined {\n return this.openDrawers.find((drawer) => drawer.id === id);\n }\n\n ngOnDestroy() {\n // Only dismiss the drawers at this level on destroy\n // since the parent service may still be active.\n this._dismissDrawers(this._openDrawersAtThisLevel);\n this._afterAllDismissedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n\n private _dismissDrawers(drawers: DrawerRef<any>[]) {\n let i = drawers.length;\n\n while (i--) {\n drawers[i].dismiss();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DrawerContainer } from './drawer-container.component';\nimport { Drawer } from './drawer.service';\n\n@NgModule({\n imports: [DrawerContainer],\n exports: [DrawerContainer],\n providers: [Drawer],\n})\nexport class DrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.DrawerConfig"],"mappings":";;;;;;;;;;;;;;;;AAUA;;AAEG;MACU,YAAY,CAAA;AAAzB,IAAA,WAAA,GAAA;;QAcI,IAAI,CAAA,IAAA,GAAc,IAAI,CAAC;;QAGvB,IAAW,CAAA,WAAA,GAAa,KAAK,CAAC;;QAM9B,IAAY,CAAA,YAAA,GAAa,KAAK,CAAC;;QAG/B,IAAS,CAAA,SAAA,GAAmB,IAAI,CAAC;AAEjC;;;;AAIG;QACH,IAAiB,CAAA,iBAAA,GAAa,IAAI,CAAC;AAEnC;;;;AAIG;QACH,IAAS,CAAA,SAAA,GAAwC,gBAAgB,CAAC;AAElE;;;AAGG;QACH,IAAY,CAAA,YAAA,GAAa,IAAI,CAAC;;QAM9B,IAAQ,CAAA,QAAA,GAAoB,QAAQ,CAAC;KAmBxC;AAAA;;AClFD;AACO,MAAM,kBAAkB,GAE3B;;AAEA,IAAA,WAAW,EAAE,OAAO,CAAC,OAAO,EAAE;AAC1B,QAAA,KAAK,CACD,cAAc,EACd,KAAK,CAAC;AACF,YAAA,YAAY,EAAE,MAAM;AACpB,YAAA,UAAU,EAAE,QAAQ;AACvB,SAAA,CAAC,CACL;AAC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,CAAA,CAAA,EAAA;uGAFV,CAAC,MAAM,CAAC,EAAA,OAAA,EAAA,CAFT,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;uFAIhB,YAAY,EAAA,CAAA;cALxB,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;gBACN,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,SAAS,EAAE,CAAC,MAAM,CAAC;AACtB,aAAA,CAAA;;wFACY,YAAY,EAAA,EAAA,OAAA,EAAA,CAJX,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACN7B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"drDrawer.mjs","sources":["../../../projects/datarailsshared/src/lib/drawer/drawer-config.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-animation.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-position-strategy.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-container.component.html","../../../projects/datarailsshared/src/lib/drawer/drawer-container.component.ts","../../../projects/datarailsshared/src/lib/drawer/drawer-ref.ts","../../../projects/datarailsshared/src/lib/drawer/drawer.service.ts","../../../projects/datarailsshared/src/lib/drawer/drawer.module.ts","../../../projects/datarailsshared/src/lib/drawer/drDrawer.ts"],"sourcesContent":["import { Direction } from '@angular/cdk/bidi';\nimport { ScrollStrategy } from '@angular/cdk/overlay';\nimport { Injector, ViewContainerRef } from '@angular/core';\n\n/** Options for where to set focus to automatically on dialog open. */\nexport type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';\n\n/** Possible overrides for a drawer's position. */\nexport type DrawerPosition = 'top' | 'bottom' | 'left' | 'right';\n\n/**\n * Configuration used when opening a drawer.\n */\nexport class DrawerConfig<D = any> {\n /** The view container to place the overlay for the drawer into. */\n viewContainerRef?: ViewContainerRef;\n\n /** ID for the drawer. If omitted, a unique one will be generated. */\n id?: string;\n\n /** Extra CSS classes to be added to the drawer container. */\n panelClass?: string | string[];\n\n /** Text layout direction for the drawer. */\n direction?: Direction;\n\n /** Data being injected into the child component. */\n data?: D | null = null;\n\n /** Whether the drawer has a backdrop. */\n hasBackdrop?: boolean = false;\n\n /** Custom class for the backdrop. */\n backdropClass?: string;\n\n /** Whether the user can use escape or clicking outside to close the drawer. */\n disableClose?: boolean = false;\n\n /** Aria label to assign to the drawer element. */\n ariaLabel?: string | null = null;\n\n /**\n * Whether the drawer should close when the user goes backwards/forwards in history.\n * Note that this usually doesn't include clicking on links (unless the user is using\n * the `HashLocationStrategy`).\n */\n closeOnNavigation?: boolean = true;\n\n /**\n * Where the drawer should focus on open.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or\n * AutoFocusTarget instead.\n */\n autoFocus?: AutoFocusTarget | string | boolean = 'first-tabbable';\n\n /**\n * Whether the drawer should restore focus to the\n * previously-focused element, after it's closed.\n */\n restoreFocus?: boolean = true;\n\n /** Scroll strategy to be used for the drawer. */\n scrollStrategy?: ScrollStrategy;\n\n /** Position of the drawer. */\n position?: DrawerPosition = 'bottom';\n\n /** Width of the drawer. */\n width?: string;\n\n /** Height of the drawer. */\n height?: string;\n\n /** Min-width of the drawer. If a number is provided, assumes pixel units. */\n minWidth?: number | string;\n\n /** Min-height of the drawer. If a number is provided, assumes pixel units. */\n minHeight?: number | string;\n\n /** Max-width of the drawer. If a number is provided, assumes pixel units. */\n maxWidth?: number | string;\n\n /** Max-height of the drawer. If a number is provided, assumes pixel units. */\n maxHeight?: number | string;\n\n /**\n * Injector used for the instantiation of the component to be attached. If provided,\n * takes precedence over the injector indirectly provided by `ViewContainerRef`.\n */\n injector?: Injector;\n}\n","import { animate, state, style, transition, trigger, AnimationTriggerMetadata } from '@angular/animations';\n\n/** Animations used by the drawer. */\nexport const drDrawerAnimations: {\n readonly drawerState: AnimationTriggerMetadata;\n} = {\n /** Animation that shows and hides a drawer. */\n drawerState: trigger('state', [\n state(\n 'void, hidden',\n style({\n 'box-shadow': 'none',\n visibility: 'hidden',\n }),\n ),\n state(\n 'visible',\n style({\n transform: 'none',\n visibility: 'visible',\n }),\n ),\n transition('visible => void, visible => hidden', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),\n transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n ]),\n};\n","export interface DrawerPositionStrategy {\n extractMousePosition(event: MouseEvent): number;\n calculateTransform(currentPosition: number, containerPosition: number): string;\n shouldClose(currentPosition: number, initPosition: number, lastPosition: number): boolean;\n}\n\nexport class BottomPositionStrategy implements DrawerPositionStrategy {\n extractMousePosition(event: MouseEvent): number {\n return event.clientY;\n }\n\n calculateTransform(currentPosition: number, containerPosition: number): string {\n return currentPosition > containerPosition\n ? `translate3d(0px, ${currentPosition - containerPosition}px, 0px)`\n : `translate3d(0px, 0px, 0px)`;\n }\n\n shouldClose(currentPosition: number, initPosition: number, lastPosition: number): boolean {\n return Math.abs(currentPosition - initPosition) <= currentPosition - lastPosition;\n }\n}\n","<div *ngIf=\"_config.position === 'bottom'\" #handleRef class=\"handle\"></div>\n<div class=\"dr-drawer-container__wrapper\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { AnimationEvent } from '@angular/animations';\nimport { FocusMonitor, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { CdkDialogContainer, DialogModule } from '@angular/cdk/dialog';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';\nimport { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { distinctUntilChanged, finalize, fromEvent, map, Subject, switchMap, takeUntil, tap } from 'rxjs';\nimport { drDrawerAnimations } from './drawer-animation';\nimport { DrawerConfig } from './drawer-config';\nimport { BottomPositionStrategy, DrawerPositionStrategy } from './drawer-position-strategy';\n\n/**\n * Internal component that wraps user-provided drawer content.\n * @docs-private\n */\n@Component({\n selector: 'dr-drawer-container',\n templateUrl: 'drawer-container.component.html',\n styleUrls: ['drawer-container.component.scss'],\n // In Ivy embedded views will be change detected from their declaration place, rather than where\n // they were stamped out. This means that we can't have the drawer container be OnPush,\n // because it might cause the sheets that were opened from a template not to be out of date.\n changeDetection: ChangeDetectionStrategy.Default,\n encapsulation: ViewEncapsulation.None,\n animations: [drDrawerAnimations.drawerState],\n host: {\n class: 'dr-drawer-container',\n '[class]': '_drawerPosition',\n tabindex: '-1',\n '[id]': '_config.id',\n '[attr.role]': '_config.role',\n '[attr.aria-modal]': '_config.isModal',\n '[attr.aria-label]': '_config.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n standalone: true,\n imports: [PortalModule, DialogModule, MatCommonModule, CommonModule],\n})\nexport class DrawerContainer extends CdkDialogContainer<DrawerConfig> implements OnDestroy, AfterViewInit {\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, { static: true })\n _portalOutlet!: CdkPortalOutlet;\n\n @ViewChild('handleRef')\n _handleRef!: ElementRef<HTMLDivElement>;\n\n /** The state of the drawer animations. */\n _animationState: 'void' | 'visible' | 'hidden' = 'void';\n\n /** Emits whenever the state of the animation changes. */\n readonly _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** Whether the component has been destroyed. */\n private _destroyed = false;\n\n get _drawerPosition() {\n return `dr-drawer-${this._config.position}`;\n }\n\n private readonly _changeDetectorRef = inject(ChangeDetectorRef);\n\n private readonly destroy$ = new Subject<void>();\n\n positionStrategy!: DrawerPositionStrategy;\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n focusTrapFactory: FocusTrapFactory,\n @Optional() @Inject(DOCUMENT) document: Document,\n config: DrawerConfig,\n checker: InteractivityChecker,\n ngZone: NgZone,\n private overlayRef: OverlayRef,\n focusMonitor?: FocusMonitor,\n ) {\n super(elementRef, focusTrapFactory, document, config, checker, ngZone, overlayRef, focusMonitor);\n }\n\n protected override _contentAttached(): void {\n // Delegate to the original dialog-container initialization (i.e. saving the\n // previous element, setting up the focus trap and moving focus to the container).\n super._contentAttached();\n\n this.enter();\n }\n\n /** Begin animation of bottom sheet entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.markForCheck();\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the bottom sheet exiting from view. */\n exit(): void {\n (this._elementRef.nativeElement as HTMLElement).style.transition = undefined;\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngAfterViewInit(): void {\n this.positionStrategy = this.resolvePositionStrategy();\n if (this.positionStrategy) {\n this.setupDragListener();\n }\n }\n\n private resolvePositionStrategy(): DrawerPositionStrategy {\n switch (this._config.position) {\n case 'bottom':\n return new BottomPositionStrategy();\n }\n }\n\n private setupDragListener(): void {\n const mousedown$ = fromEvent(this._handleRef.nativeElement, 'mousedown');\n const mousemove$ = fromEvent(document, 'mousemove');\n const mouseup$ = fromEvent(document, 'mouseup');\n\n let lastPosition = 0;\n let initPosition = 0;\n let currentPosition = 0;\n const container = this._elementRef.nativeElement as HTMLElement;\n\n setTimeout(() => {\n lastPosition = this.getContainerPosition(container);\n initPosition = lastPosition;\n });\n\n mousedown$\n .pipe(\n switchMap(() =>\n mousemove$.pipe(\n finalize(() => {\n const container = this._elementRef.nativeElement as HTMLElement;\n if (this.positionStrategy.shouldClose(currentPosition, initPosition, lastPosition)) {\n this.overlayRef.dispose();\n return;\n }\n container.style.transition = 'transform 0.5s cubic-bezier(0.32, 0.72, 0, 1)';\n container.style.transform = `translate3d(0px, 0px, 0px)`;\n }),\n takeUntil(mouseup$),\n ),\n ),\n map((event: MouseEvent) => this.positionStrategy.extractMousePosition(event)),\n distinctUntilChanged(),\n tap((position) => {\n let containerPosition = this.getContainerPosition(container);\n\n containerPosition = Math.min(containerPosition, lastPosition);\n lastPosition = Math.min(containerPosition, lastPosition);\n currentPosition = position;\n\n container.style.transition = 'none';\n container.style.transform = this.positionStrategy.calculateTransform(position, containerPosition);\n }),\n takeUntil(this.destroy$),\n )\n .subscribe();\n }\n\n private getContainerPosition(container: HTMLElement): number {\n return this._config.position === 'bottom' || this._config.position === 'top'\n ? container.getBoundingClientRect().top\n : container.getBoundingClientRect().left;\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n\n this.destroy$.next();\n this.destroy$.complete();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'visible') {\n this._trapFocus();\n }\n\n this._animationStateChanged.emit(event);\n }\n\n _onAnimationStart(event: AnimationEvent) {\n this._animationStateChanged.emit(event);\n }\n\n protected override _captureInitialFocus(): void {}\n}\n","import { DialogRef } from '@angular/cdk/dialog';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { DrawerConfig } from './drawer-config';\nimport { DrawerContainer } from './drawer-container.component';\nimport { ComponentRef } from '@angular/core';\n\n/**\n * Reference to a drawer dispatched from the drawer service.\n */\nexport class DrawerRef<T = any, R = any> {\n /** Instance of the component making up the content of the drawer. */\n get instance(): T {\n return this._ref.componentInstance!;\n }\n\n /**\n * `ComponentRef` of the component opened into the drawer. Will be\n * null when the drawer is opened using a `TemplateRef`.\n */\n get componentRef(): ComponentRef<T> | null {\n return this._ref.componentRef;\n }\n\n /**\n * Instance of the component into which the drawer content is projected.\n * @docs-private\n */\n containerInstance: DrawerContainer;\n\n /** Whether the user is allowed to close the drawer. */\n disableClose: boolean | undefined;\n\n /** Unique ID for the drawer. */\n id: string;\n\n /** Subject for notifying the user that the drawer has been dismissed. */\n private readonly _afterDismissed = new Subject<R | undefined>();\n\n /** Subject for notifying the user that the drawer has opened and appeared. */\n private readonly _afterOpened = new Subject<void>();\n\n /** Result to be passed down to the `afterDismissed` stream. */\n private _result: R | undefined;\n\n /** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */\n private _closeFallbackTimeout: any;\n\n constructor(\n private _ref: DialogRef<R, T>,\n config: DrawerConfig,\n containerInstance: DrawerContainer,\n ) {\n this.containerInstance = containerInstance;\n this.disableClose = config.disableClose;\n this.id = _ref.id;\n\n // Emit when opening animation completes\n containerInstance._animationStateChanged\n .pipe(\n filter((event) => event.phaseName === 'done' && event.toState === 'visible'),\n take(1),\n )\n .subscribe(() => {\n this._afterOpened.next();\n this._afterOpened.complete();\n });\n\n // Dispose overlay when closing animation is complete\n containerInstance._animationStateChanged\n .pipe(\n filter((event) => event.phaseName === 'done' && event.toState === 'hidden'),\n take(1),\n )\n .subscribe(() => {\n clearTimeout(this._closeFallbackTimeout);\n this._ref.close(this._result);\n });\n\n _ref.overlayRef.detachments().subscribe(() => {\n this._ref.close(this._result);\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(this.backdropClick(), this.keydownEvents().pipe(filter((event) => event.keyCode === ESCAPE))).subscribe((event) => {\n if (!this.disableClose && (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))) {\n event.preventDefault();\n this.dismiss();\n }\n });\n }\n\n /**\n * Dismisses the drawer.\n * @param result Data to be passed back to the drawer opener.\n */\n dismiss(result?: R): void {\n this._afterDismissed.next(result);\n this._afterDismissed.complete();\n\n if (this.containerInstance && !this._afterDismissed.closed) {\n // Transition the backdrop in parallel to the drawer.\n this.containerInstance._animationStateChanged\n .pipe(\n filter((event) => event.phaseName === 'start'),\n take(1),\n )\n .subscribe((event) => {\n // The logic that disposes of the overlay depends on the exit animation completing, however\n // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback\n // timeout which will clean everything up if the animation hasn't fired within the specified\n // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the\n // vast majority of cases the timeout will have been cleared before it has fired.\n this._closeFallbackTimeout = setTimeout(() => {\n this._ref.close(this._result);\n }, event.totalTime + 100);\n\n this._ref.overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n this.containerInstance = null!;\n }\n }\n\n /** Gets an observable that is notified when the drawer is dismissed. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\n }\n\n /** Gets an observable that is notified when the drawer is finished closing. */\n afterClosed(): Observable<R | undefined> {\n return this._ref.closed;\n }\n\n /** Gets an observable that is notified when the drawer has opened and appeared. */\n afterOpened(): Observable<void> {\n return this._afterOpened;\n }\n\n /**\n * Gets an observable that emits when the overlay's backdrop has been clicked.\n */\n backdropClick(): Observable<MouseEvent> {\n return this._ref.backdropClick;\n }\n\n /**\n * Gets an observable that emits when keydown events are targeted on the overlay.\n */\n keydownEvents(): Observable<KeyboardEvent> {\n return this._ref.keydownEvents;\n }\n}\n","import { coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { Dialog, DialogConfig } from '@angular/cdk/dialog';\nimport { Overlay } from '@angular/cdk/overlay';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable, InjectionToken, Injector, OnDestroy, Optional, SkipSelf, TemplateRef } from '@angular/core';\nimport { defer, Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { DrawerConfig } from './drawer-config';\nimport { DrawerContainer } from './drawer-container.component';\nimport { DrawerRef } from './drawer-ref';\n\n/** Injection token that can be used to access the data that was passed in to a drawer. */\nexport const DR_DRAWER_DATA = new InjectionToken<any>('DrDrawerData');\n\n/** Injection token that can be used to specify default drawer options. */\nexport const DR_DRAWER_DEFAULT_OPTIONS = new InjectionToken<DrawerConfig>('dr-drawer-default-options');\n\n// Counter for unique drawer ids.\nlet uniqueId = 0;\n\n/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({ providedIn: 'root' })\nexport class Drawer implements OnDestroy {\n private readonly _openDrawersAtThisLevel: DrawerRef<any>[] = [];\n private readonly _afterAllDismissedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<DrawerRef<any>>();\n private _dialog: Dialog;\n\n /** Keeps track of the currently-open dialogs. */\n get openDrawers(): DrawerRef[] {\n return this._parentDrawer ? this._parentDrawer.openDrawers : this._openDrawersAtThisLevel;\n }\n\n /** Stream that emits when a drawer has been opened. */\n get afterOpened(): Subject<DrawerRef<any>> {\n return this._parentDrawer ? this._parentDrawer.afterOpened : this._afterOpenedAtThisLevel;\n }\n\n private _getAfterAllDismissed(): Subject<void> {\n const parent = this._parentDrawer;\n return parent ? parent._getAfterAllDismissed() : this._afterAllDismissedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open drawer have finished closing.\n * Will emit on subscribe if there are no open drawers to begin with.\n */\n readonly afterAllDismissed: Observable<void> = defer(() =>\n this.openDrawers.length ? this._getAfterAllDismissed() : this._getAfterAllDismissed().pipe(startWith(undefined)),\n );\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentDrawer: Drawer,\n @Optional()\n @Inject(DR_DRAWER_DEFAULT_OPTIONS)\n private _defaultOptions?: DrawerConfig,\n ) {\n this._dialog = _injector.get(Dialog);\n }\n\n /**\n * Opens a drawer containing the given component.\n * @param component Type of the component to load into the drawer.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(component: ComponentType<T>, config?: DrawerConfig<D>): DrawerRef<T, R>;\n\n /**\n * Opens a drawer containing the given template.\n * @param template TemplateRef to instantiate as the drawer content.\n * @param config Extra configuration options.\n * @returns Reference to the newly-opened drawer.\n */\n open<T, D = any, R = any>(template: TemplateRef<T>, config?: DrawerConfig<D>): DrawerRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: DrawerConfig<D>,\n ): DrawerRef<T, R> {\n let drawerRef!: DrawerRef<T, R>;\n\n const _config = { ...(this._defaultOptions || new DrawerConfig()), ...config };\n _config.id = _config.id || `dr-drawer-${uniqueId++}`;\n\n _config.width =\n _config.position === 'left' || _config.position === 'right' ? coerceCssPixelValue(_config.width) : '100vw';\n\n _config.height =\n _config.position === 'top' || _config.position === 'bottom' ? coerceCssPixelValue(_config.height) : '100vh';\n\n this._dialog.open<R, D, T>(componentOrTemplateRef, {\n ..._config,\n // Disable closing since we need to sync it up to the animation ourselves.\n disableClose: true,\n // Disable closing on detachments so that we can sync up the animation.\n closeOnOverlayDetachments: false,\n container: {\n type: DrawerContainer,\n providers: () => [\n // Provide our config as the CDK config as well since it has the same interface as the\n // CDK one, but it contains the actual values passed in by the user for things like\n // `disableClose` which we disable for the CDK dialog since we handle it ourselves.\n { provide: DrawerConfig, useValue: _config },\n { provide: DialogConfig, useValue: _config },\n ],\n },\n scrollStrategy: _config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global()[_config.position!]('0'),\n templateContext: () => ({ drawerRef }),\n providers: (cdkRef, _cdkConfig, container) => {\n drawerRef = new DrawerRef(cdkRef, _config, container as DrawerContainer);\n return [\n { provide: DrawerRef, useValue: drawerRef },\n { provide: DR_DRAWER_DATA, useValue: _config.data },\n ];\n },\n });\n\n this.openDrawers.push(drawerRef);\n this.afterOpened.next(drawerRef);\n\n drawerRef.afterDismissed().subscribe(() => {\n const index = this.openDrawers.indexOf(drawerRef);\n\n if (index > -1) {\n this.openDrawers.splice(index, 1);\n\n if (!this.openDrawers.length) {\n this._getAfterAllDismissed().next();\n }\n }\n });\n\n return drawerRef;\n }\n\n /**\n * Dismisses all of the currently-open drawers.\n */\n dismissAll(): void {\n this._dismissDrawers(this.openDrawers);\n }\n\n /**\n * Finds an open drawer by its id.\n * @param id ID to use when looking up the drawer.\n */\n getDrawerById(id: string): DrawerRef<any> | undefined {\n return this.openDrawers.find((drawer) => drawer.id === id);\n }\n\n ngOnDestroy() {\n // Only dismiss the drawers at this level on destroy\n // since the parent service may still be active.\n this._dismissDrawers(this._openDrawersAtThisLevel);\n this._afterAllDismissedAtThisLevel.complete();\n this._afterOpenedAtThisLevel.complete();\n }\n\n private _dismissDrawers(drawers: DrawerRef<any>[]) {\n let i = drawers.length;\n\n while (i--) {\n drawers[i].dismiss();\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DrawerContainer } from './drawer-container.component';\nimport { Drawer } from './drawer.service';\n\n@NgModule({\n imports: [DrawerContainer],\n exports: [DrawerContainer],\n providers: [Drawer],\n})\nexport class DrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.DrawerConfig"],"mappings":";;;;;;;;;;;;;;;;AAUA;;AAEG;MACU,YAAY,CAAA;AAAzB,IAAA,WAAA,GAAA;;QAcI,IAAI,CAAA,IAAA,GAAc,IAAI,CAAC;;QAGvB,IAAW,CAAA,WAAA,GAAa,KAAK,CAAC;;QAM9B,IAAY,CAAA,YAAA,GAAa,KAAK,CAAC;;QAG/B,IAAS,CAAA,SAAA,GAAmB,IAAI,CAAC;AAEjC;;;;AAIG;QACH,IAAiB,CAAA,iBAAA,GAAa,IAAI,CAAC;AAEnC;;;;AAIG;QACH,IAAS,CAAA,SAAA,GAAwC,gBAAgB,CAAC;AAElE;;;AAGG;QACH,IAAY,CAAA,YAAA,GAAa,IAAI,CAAC;;QAM9B,IAAQ,CAAA,QAAA,GAAoB,QAAQ,CAAC;KAyBxC;AAAA;;ACxFD;AACO,MAAM,kBAAkB,GAE3B;;AAEA,IAAA,WAAW,EAAE,OAAO,CAAC,OAAO,EAAE;AAC1B,QAAA,KAAK,CACD,cAAc,EACd,KAAK,CAAC;AACF,YAAA,YAAY,EAAE,MAAM;AACpB,YAAA,UAAU,EAAE,QAAQ;AACvB,SAAA,CAAC,CACL;AACD,QAAA,KAAK,CACD,SAAS,EACT,KAAK,CAAC;AACF,YAAA,SAAS,EAAE,MAAM;AACjB,YAAA,UAAU,EAAE,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AA,EAAA;;uFAIhB,YAAY,EAAA,CAAA;cALxB,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;gBACN,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,OAAO,EAAE,CAAC,eAAe,CAAC;gBAC1B,SAAS,EAAE,CAAC,MAAM,CAAC;AACtB,aAAA,CAAA;;wFACY,YAAY,EAAA,EAAA,OAAA,EAAA,CAJX,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACN7B;;AAEG;;;;"}
|
|
@@ -3,7 +3,7 @@ import { AvatarUser } from './types';
|
|
|
3
3
|
import { ElPosition } from '../models/dropdown';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class DrAvatarComponent<T extends AvatarUser = AvatarUser> {
|
|
6
|
-
set users(users: T[] | T);
|
|
6
|
+
set users(users: T[] | T | null | undefined);
|
|
7
7
|
showUnassigned: boolean;
|
|
8
8
|
drAvatarTooltipPosition: ElPosition;
|
|
9
9
|
drAvatarTooltipClass: string;
|
|
@@ -20,6 +20,9 @@ export declare class DialogService {
|
|
|
20
20
|
* Function to open confirmation modal with inputs
|
|
21
21
|
*/
|
|
22
22
|
openConfirmDialogModal<R = any>(confirmDialogData: ConfirmDialogData): MatDialogRef<DialogModalWrapperComponent, R>;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated use closeDialog function within a concrete component
|
|
25
|
+
*/
|
|
23
26
|
close(params?: any): void;
|
|
24
27
|
/**
|
|
25
28
|
* @deprecated
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Direction } from '@angular/cdk/bidi';
|
|
2
2
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
|
-
import { ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { Injector, ViewContainerRef } from '@angular/core';
|
|
4
4
|
/** Options for where to set focus to automatically on dialog open. */
|
|
5
5
|
export type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
6
6
|
/** Possible overrides for a drawer's position. */
|
|
@@ -60,4 +60,9 @@ export declare class DrawerConfig<D = any> {
|
|
|
60
60
|
maxWidth?: number | string;
|
|
61
61
|
/** Max-height of the drawer. If a number is provided, assumes pixel units. */
|
|
62
62
|
maxHeight?: number | string;
|
|
63
|
+
/**
|
|
64
|
+
* Injector used for the instantiation of the component to be attached. If provided,
|
|
65
|
+
* takes precedence over the injector indirectly provided by `ViewContainerRef`.
|
|
66
|
+
*/
|
|
67
|
+
injector?: Injector;
|
|
63
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Direction } from '@angular/cdk/bidi';
|
|
2
2
|
import { ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
|
-
import { ViewContainerRef } from '@angular/core';
|
|
3
|
+
import { Injector, ViewContainerRef } from '@angular/core';
|
|
4
4
|
/** Options for where to set focus to automatically on dialog open. */
|
|
5
5
|
export type AutoFocusTarget = 'dialog' | 'first-tabbable' | 'first-heading';
|
|
6
6
|
/** Possible overrides for a drawer's position. */
|
|
@@ -60,4 +60,9 @@ export declare class DrawerConfig<D = any> {
|
|
|
60
60
|
maxWidth?: number | string;
|
|
61
61
|
/** Max-height of the drawer. If a number is provided, assumes pixel units. */
|
|
62
62
|
maxHeight?: number | string;
|
|
63
|
+
/**
|
|
64
|
+
* Injector used for the instantiation of the component to be attached. If provided,
|
|
65
|
+
* takes precedence over the injector indirectly provided by `ViewContainerRef`.
|
|
66
|
+
*/
|
|
67
|
+
injector?: Injector;
|
|
63
68
|
}
|
|
Binary file
|