@datarailsshared/datarailsshared 1.6.191 → 1.6.199

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.
Files changed (44) hide show
  1. package/datarailsshared-datarailsshared-1.6.199.tgz +0 -0
  2. package/esm2022/lib/dr-tooltip/components/tooltip-default/tooltip-default.component.mjs +5 -4
  3. package/esm2022/lib/dr-tooltip/components/tooltip-info/tooltip-info.component.mjs +6 -6
  4. package/esm2022/lib/dr-tooltip/dr-tooltip.component.mjs +6 -5
  5. package/esm2022/lib/dr-tooltip/dr-tooltip.directive.mjs +3 -2
  6. package/esm2022/lib/dr-tooltip/dr-tooltip.module.mjs +6 -9
  7. package/esm2022/lib/drawer/drawer-config.mjs +3 -1
  8. package/esm2022/lib/drawer/drawer-container.component.mjs +12 -9
  9. package/esm2022/lib/drawer/drawer-ref.mjs +5 -1
  10. package/esm2022/lib/drawer/drawer.service.mjs +82 -1
  11. package/esm2022/lib/filter-dropdown/filter-dropdown.component.mjs +3 -3
  12. package/fesm2022/datarailsshared-datarailsshared.mjs +115 -28
  13. package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
  14. package/lib/dr-tooltip/components/tooltip-default/tooltip-default.component.d.ts +1 -1
  15. package/lib/dr-tooltip/components/tooltip-info/tooltip-info.component.d.ts +1 -2
  16. package/lib/dr-tooltip/dr-tooltip.component.d.ts +1 -1
  17. package/lib/dr-tooltip/dr-tooltip.directive.d.ts +1 -1
  18. package/lib/dr-tooltip/dr-tooltip.module.d.ts +5 -6
  19. package/lib/drawer/drawer-config.d.ts +5 -0
  20. package/lib/drawer/drawer-container.component.d.ts +1 -1
  21. package/lib/drawer/drawer-ref.d.ts +2 -0
  22. package/lib/drawer/drawer.service.d.ts +17 -0
  23. package/package.json +1 -7
  24. package/datarailsshared-datarailsshared-1.6.191.tgz +0 -0
  25. package/esm2022/src/lib/drawer/drDrawer.mjs +0 -5
  26. package/esm2022/src/lib/drawer/drawer-animation.mjs +0 -18
  27. package/esm2022/src/lib/drawer/drawer-config.mjs +0 -35
  28. package/esm2022/src/lib/drawer/drawer-container.component.mjs +0 -179
  29. package/esm2022/src/lib/drawer/drawer-position-strategy.mjs +0 -14
  30. package/esm2022/src/lib/drawer/drawer-ref.mjs +0 -106
  31. package/esm2022/src/lib/drawer/drawer.module.mjs +0 -19
  32. package/esm2022/src/lib/drawer/drawer.service.mjs +0 -140
  33. package/esm2022/src/lib/drawer/public-api.mjs +0 -6
  34. package/fesm2022/drDrawer.mjs +0 -496
  35. package/fesm2022/drDrawer.mjs.map +0 -1
  36. package/src/lib/drawer/drawer-animation.d.ts +0 -5
  37. package/src/lib/drawer/drawer-config.d.ts +0 -68
  38. package/src/lib/drawer/drawer-container.component.d.ts +0 -45
  39. package/src/lib/drawer/drawer-position-strategy.d.ts +0 -10
  40. package/src/lib/drawer/drawer-ref.d.ts +0 -55
  41. package/src/lib/drawer/drawer.module.d.ts +0 -7
  42. package/src/lib/drawer/drawer.service.d.ts +0 -62
  43. package/src/lib/drawer/index.d.ts +0 -5
  44. package/src/lib/drawer/public-api.d.ts +0 -5
@@ -1,496 +0,0 @@
1
- import * as i1 from '@angular/cdk/a11y';
2
- import { CdkDialogContainer, DialogModule, Dialog, DialogConfig } from '@angular/cdk/dialog';
3
- import * as i3 from '@angular/cdk/overlay';
4
- import * as i4 from '@angular/cdk/portal';
5
- import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
6
- import * as i5 from '@angular/common';
7
- import { DOCUMENT, CommonModule } from '@angular/common';
8
- import * as i0 from '@angular/core';
9
- import { EventEmitter, inject, ChangeDetectorRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, Inject, ViewChild, InjectionToken, Injectable, SkipSelf, NgModule } from '@angular/core';
10
- import { MatCommonModule } from '@angular/material/core';
11
- import { Subject, fromEvent, switchMap, finalize, takeUntil, map, distinctUntilChanged, tap, merge, defer } from 'rxjs';
12
- import { trigger, state, style, transition, animate } from '@angular/animations';
13
- import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
14
- import { filter, take, startWith } from 'rxjs/operators';
15
- import { coerceCssPixelValue } from '@angular/cdk/coercion';
16
-
17
- /**
18
- * Configuration used when opening a drawer.
19
- */
20
- class DrawerConfig {
21
- constructor() {
22
- /** Data being injected into the child component. */
23
- this.data = null;
24
- /** Whether the drawer has a backdrop. */
25
- this.hasBackdrop = false;
26
- /** Whether the user can use escape or clicking outside to close the drawer. */
27
- this.disableClose = false;
28
- /** Aria label to assign to the drawer element. */
29
- this.ariaLabel = null;
30
- /**
31
- * Whether the drawer should close when the user goes backwards/forwards in history.
32
- * Note that this usually doesn't include clicking on links (unless the user is using
33
- * the `HashLocationStrategy`).
34
- */
35
- this.closeOnNavigation = true;
36
- /**
37
- * Where the drawer should focus on open.
38
- * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
39
- * AutoFocusTarget instead.
40
- */
41
- this.autoFocus = 'first-tabbable';
42
- /**
43
- * Whether the drawer should restore focus to the
44
- * previously-focused element, after it's closed.
45
- */
46
- this.restoreFocus = true;
47
- /** Position of the drawer. */
48
- this.position = 'bottom';
49
- }
50
- }
51
-
52
- /** Animations used by the drawer. */
53
- const drDrawerAnimations = {
54
- /** Animation that shows and hides a drawer. */
55
- drawerState: trigger('state', [
56
- state('void, hidden', style({
57
- 'box-shadow': 'none',
58
- visibility: 'hidden',
59
- })),
60
- state('visible', style({
61
- transform: 'none',
62
- visibility: 'visible',
63
- })),
64
- transition('visible => void, visible => hidden', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
65
- transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
66
- ]),
67
- };
68
-
69
- class BottomPositionStrategy {
70
- extractMousePosition(event) {
71
- return event.clientY;
72
- }
73
- calculateTransform(currentPosition, containerPosition) {
74
- return currentPosition > containerPosition
75
- ? `translate3d(0px, ${currentPosition - containerPosition}px, 0px)`
76
- : `translate3d(0px, 0px, 0px)`;
77
- }
78
- shouldClose(currentPosition, initPosition, lastPosition) {
79
- return Math.abs(currentPosition - initPosition) <= currentPosition - lastPosition;
80
- }
81
- }
82
-
83
- const _c0 = ["handleRef"];
84
- function DrawerContainer_div_0_Template(rf, ctx) { if (rf & 1) {
85
- i0.ɵɵelement(0, "div", 3, 4);
86
- } }
87
- function DrawerContainer_ng_template_2_Template(rf, ctx) { }
88
- /**
89
- * Internal component that wraps user-provided drawer content.
90
- * @docs-private
91
- */
92
- class DrawerContainer extends CdkDialogContainer {
93
- get _drawerPosition() {
94
- return `dr-drawer-${this._config.position}`;
95
- }
96
- constructor(elementRef, focusTrapFactory, document, config, checker, ngZone, overlayRef, focusMonitor) {
97
- super(elementRef, focusTrapFactory, document, config, checker, ngZone, overlayRef, focusMonitor);
98
- this.overlayRef = overlayRef;
99
- /** The state of the drawer animations. */
100
- this._animationState = 'void';
101
- /** Emits whenever the state of the animation changes. */
102
- this._animationStateChanged = new EventEmitter();
103
- /** Whether the component has been destroyed. */
104
- this._destroyed = false;
105
- this._changeDetectorRef = inject(ChangeDetectorRef);
106
- this.destroy$ = new Subject();
107
- }
108
- _contentAttached() {
109
- // Delegate to the original dialog-container initialization (i.e. saving the
110
- // previous element, setting up the focus trap and moving focus to the container).
111
- super._contentAttached();
112
- this.enter();
113
- }
114
- /** Begin animation of bottom sheet entrance into view. */
115
- enter() {
116
- if (!this._destroyed) {
117
- this._animationState = 'visible';
118
- this._changeDetectorRef.markForCheck();
119
- this._changeDetectorRef.detectChanges();
120
- }
121
- }
122
- /** Begin animation of the bottom sheet exiting from view. */
123
- exit() {
124
- this._elementRef.nativeElement.style.transition = undefined;
125
- if (!this._destroyed) {
126
- this._animationState = 'hidden';
127
- this._changeDetectorRef.markForCheck();
128
- }
129
- }
130
- ngAfterViewInit() {
131
- this.positionStrategy = this.resolvePositionStrategy();
132
- if (this.positionStrategy) {
133
- this.setupDragListener();
134
- }
135
- }
136
- resolvePositionStrategy() {
137
- switch (this._config.position) {
138
- case 'bottom':
139
- return new BottomPositionStrategy();
140
- }
141
- }
142
- setupDragListener() {
143
- const mousedown$ = fromEvent(this._handleRef.nativeElement, 'mousedown');
144
- const mousemove$ = fromEvent(document, 'mousemove');
145
- const mouseup$ = fromEvent(document, 'mouseup');
146
- let lastPosition = 0;
147
- let initPosition = 0;
148
- let currentPosition = 0;
149
- const container = this._elementRef.nativeElement;
150
- setTimeout(() => {
151
- lastPosition = this.getContainerPosition(container);
152
- initPosition = lastPosition;
153
- });
154
- mousedown$
155
- .pipe(switchMap(() => mousemove$.pipe(finalize(() => {
156
- const container = this._elementRef.nativeElement;
157
- if (this.positionStrategy.shouldClose(currentPosition, initPosition, lastPosition)) {
158
- this.overlayRef.dispose();
159
- return;
160
- }
161
- container.style.transition = 'transform 0.5s cubic-bezier(0.32, 0.72, 0, 1)';
162
- container.style.transform = `translate3d(0px, 0px, 0px)`;
163
- }), takeUntil(mouseup$))), map((event) => this.positionStrategy.extractMousePosition(event)), distinctUntilChanged(), tap((position) => {
164
- let containerPosition = this.getContainerPosition(container);
165
- containerPosition = Math.min(containerPosition, lastPosition);
166
- lastPosition = Math.min(containerPosition, lastPosition);
167
- currentPosition = position;
168
- container.style.transition = 'none';
169
- container.style.transform = this.positionStrategy.calculateTransform(position, containerPosition);
170
- }), takeUntil(this.destroy$))
171
- .subscribe();
172
- }
173
- getContainerPosition(container) {
174
- return this._config.position === 'bottom' || this._config.position === 'top'
175
- ? container.getBoundingClientRect().top
176
- : container.getBoundingClientRect().left;
177
- }
178
- ngOnDestroy() {
179
- super.ngOnDestroy();
180
- this.destroy$.next();
181
- this.destroy$.complete();
182
- this._destroyed = true;
183
- }
184
- _onAnimationDone(event) {
185
- if (event.toState === 'visible') {
186
- this._trapFocus();
187
- }
188
- this._animationStateChanged.emit(event);
189
- }
190
- _onAnimationStart(event) {
191
- this._animationStateChanged.emit(event);
192
- }
193
- _captureInitialFocus() { }
194
- /** @nocollapse */ static { this.ɵfac = function DrawerContainer_Factory(t) { return new (t || DrawerContainer)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusTrapFactory), i0.ɵɵdirectiveInject(DOCUMENT, 8), i0.ɵɵdirectiveInject(DrawerConfig), i0.ɵɵdirectiveInject(i1.InteractivityChecker), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i3.OverlayRef), i0.ɵɵdirectiveInject(i1.FocusMonitor)); }; }
195
- /** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrawerContainer, selectors: [["dr-drawer-container"]], viewQuery: function DrawerContainer_Query(rf, ctx) { if (rf & 1) {
196
- i0.ɵɵviewQuery(CdkPortalOutlet, 7);
197
- i0.ɵɵviewQuery(_c0, 5);
198
- } if (rf & 2) {
199
- let _t;
200
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._portalOutlet = _t.first);
201
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._handleRef = _t.first);
202
- } }, hostAttrs: ["tabindex", "-1", 1, "dr-drawer-container"], hostVars: 7, hostBindings: function DrawerContainer_HostBindings(rf, ctx) { if (rf & 1) {
203
- i0.ɵɵsyntheticHostListener("@state.start", function DrawerContainer_animation_state_start_HostBindingHandler($event) { return ctx._onAnimationStart($event); })("@state.done", function DrawerContainer_animation_state_done_HostBindingHandler($event) { return ctx._onAnimationDone($event); });
204
- } if (rf & 2) {
205
- i0.ɵɵhostProperty("id", ctx._config.id);
206
- i0.ɵɵattribute("role", ctx._config.role)("aria-modal", ctx._config.isModal)("aria-label", ctx._config.ariaLabel);
207
- i0.ɵɵsyntheticHostProperty("@state", ctx._animationState);
208
- i0.ɵɵclassMap(ctx._drawerPosition);
209
- } }, standalone: true, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], decls: 3, vars: 1, consts: [["class", "handle", 4, "ngIf"], [1, "dr-drawer-container__wrapper"], ["cdkPortalOutlet", ""], [1, "handle"], ["handleRef", ""]], template: function DrawerContainer_Template(rf, ctx) { if (rf & 1) {
210
- i0.ɵɵtemplate(0, DrawerContainer_div_0_Template, 2, 0, "div", 0);
211
- i0.ɵɵelementStart(1, "div", 1);
212
- i0.ɵɵtemplate(2, DrawerContainer_ng_template_2_Template, 0, 0, "ng-template", 2);
213
- i0.ɵɵelementEnd();
214
- } if (rf & 2) {
215
- i0.ɵɵproperty("ngIf", ctx._config.position === "bottom");
216
- } }, dependencies: [PortalModule, i4.CdkPortalOutlet, DialogModule, MatCommonModule, CommonModule, i5.NgIf], styles: [".dr-drawer-container{display:flex;flex-direction:column;width:100%;overflow:auto;outline:0;box-sizing:border-box;background-color:#fff;box-shadow:0 4px 14px #d8d9de80}.dr-drawer-container__wrapper{flex:1;overflow:auto}.cdk-high-contrast-active .dr-drawer-container{outline:1px solid}.handle{position:relative;height:24px;cursor:pointer}.handle:after{content:\"\";position:absolute;top:16px;left:50%;transform:translate(-50%,-50%);background-color:#dfe0e3;height:4px;width:64px;border-radius:16px}.dr-drawer-right{transform:translate(100%);border-top-left-radius:16px;border-bottom-left-radius:16px}.dr-drawer-left{transform:translate(-100%);border-top-right-radius:16px;border-bottom-right-radius:16px}.dr-drawer-bottom{transform:translateY(100%);border-top-left-radius:16px;border-top-right-radius:16px}.dr-drawer-top{transform:translateY(-100%);border-bottom-left-radius:16px;border-bottom-right-radius:16px}\n"], encapsulation: 2, data: { animation: [drDrawerAnimations.drawerState] } }); }
217
- }
218
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrawerContainer, [{
219
- type: Component,
220
- args: [{ selector: 'dr-drawer-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [drDrawerAnimations.drawerState], host: {
221
- class: 'dr-drawer-container',
222
- '[class]': '_drawerPosition',
223
- tabindex: '-1',
224
- '[id]': '_config.id',
225
- '[attr.role]': '_config.role',
226
- '[attr.aria-modal]': '_config.isModal',
227
- '[attr.aria-label]': '_config.ariaLabel',
228
- '[@state]': '_animationState',
229
- '(@state.start)': '_onAnimationStart($event)',
230
- '(@state.done)': '_onAnimationDone($event)',
231
- }, standalone: true, imports: [PortalModule, DialogModule, MatCommonModule, CommonModule], template: "<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", styles: [".dr-drawer-container{display:flex;flex-direction:column;width:100%;overflow:auto;outline:0;box-sizing:border-box;background-color:#fff;box-shadow:0 4px 14px #d8d9de80}.dr-drawer-container__wrapper{flex:1;overflow:auto}.cdk-high-contrast-active .dr-drawer-container{outline:1px solid}.handle{position:relative;height:24px;cursor:pointer}.handle:after{content:\"\";position:absolute;top:16px;left:50%;transform:translate(-50%,-50%);background-color:#dfe0e3;height:4px;width:64px;border-radius:16px}.dr-drawer-right{transform:translate(100%);border-top-left-radius:16px;border-bottom-left-radius:16px}.dr-drawer-left{transform:translate(-100%);border-top-right-radius:16px;border-bottom-right-radius:16px}.dr-drawer-bottom{transform:translateY(100%);border-top-left-radius:16px;border-top-right-radius:16px}.dr-drawer-top{transform:translateY(-100%);border-bottom-left-radius:16px;border-bottom-right-radius:16px}\n"] }]
232
- }], function () { return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: Document, decorators: [{
233
- type: Optional
234
- }, {
235
- type: Inject,
236
- args: [DOCUMENT]
237
- }] }, { type: DrawerConfig }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i3.OverlayRef }, { type: i1.FocusMonitor }]; }, { _portalOutlet: [{
238
- type: ViewChild,
239
- args: [CdkPortalOutlet, { static: true }]
240
- }], _handleRef: [{
241
- type: ViewChild,
242
- args: ['handleRef']
243
- }] }); })();
244
-
245
- /**
246
- * Reference to a drawer dispatched from the drawer service.
247
- */
248
- class DrawerRef {
249
- /** Instance of the component making up the content of the drawer. */
250
- get instance() {
251
- return this._ref.componentInstance;
252
- }
253
- /**
254
- * `ComponentRef` of the component opened into the drawer. Will be
255
- * null when the drawer is opened using a `TemplateRef`.
256
- */
257
- get componentRef() {
258
- return this._ref.componentRef;
259
- }
260
- constructor(_ref, config, containerInstance) {
261
- this._ref = _ref;
262
- /** Subject for notifying the user that the drawer has been dismissed. */
263
- this._afterDismissed = new Subject();
264
- /** Subject for notifying the user that the drawer has opened and appeared. */
265
- this._afterOpened = new Subject();
266
- this.containerInstance = containerInstance;
267
- this.disableClose = config.disableClose;
268
- this.id = _ref.id;
269
- // Emit when opening animation completes
270
- containerInstance._animationStateChanged
271
- .pipe(filter((event) => event.phaseName === 'done' && event.toState === 'visible'), take(1))
272
- .subscribe(() => {
273
- this._afterOpened.next();
274
- this._afterOpened.complete();
275
- });
276
- // Dispose overlay when closing animation is complete
277
- containerInstance._animationStateChanged
278
- .pipe(filter((event) => event.phaseName === 'done' && event.toState === 'hidden'), take(1))
279
- .subscribe(() => {
280
- clearTimeout(this._closeFallbackTimeout);
281
- this._ref.close(this._result);
282
- });
283
- _ref.overlayRef.detachments().subscribe(() => {
284
- this._ref.close(this._result);
285
- this._afterDismissed.next(this._result);
286
- this._afterDismissed.complete();
287
- });
288
- merge(this.backdropClick(), this.keydownEvents().pipe(filter((event) => event.keyCode === ESCAPE))).subscribe((event) => {
289
- if (!this.disableClose && (event.type !== 'keydown' || !hasModifierKey(event))) {
290
- event.preventDefault();
291
- this.dismiss();
292
- }
293
- });
294
- }
295
- /**
296
- * Dismisses the drawer.
297
- * @param result Data to be passed back to the drawer opener.
298
- */
299
- dismiss(result) {
300
- this._afterDismissed.next(result);
301
- this._afterDismissed.complete();
302
- if (this.containerInstance && !this._afterDismissed.closed) {
303
- // Transition the backdrop in parallel to the drawer.
304
- this.containerInstance._animationStateChanged
305
- .pipe(filter((event) => event.phaseName === 'start'), take(1))
306
- .subscribe((event) => {
307
- // The logic that disposes of the overlay depends on the exit animation completing, however
308
- // it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback
309
- // timeout which will clean everything up if the animation hasn't fired within the specified
310
- // amount of time plus 100ms. We don't need to run this outside the NgZone, because for the
311
- // vast majority of cases the timeout will have been cleared before it has fired.
312
- this._closeFallbackTimeout = setTimeout(() => {
313
- this._ref.close(this._result);
314
- }, event.totalTime + 100);
315
- this._ref.overlayRef.detachBackdrop();
316
- });
317
- this._result = result;
318
- this.containerInstance.exit();
319
- this.containerInstance = null;
320
- }
321
- }
322
- /** Gets an observable that is notified when the drawer is dismissed. */
323
- afterDismissed() {
324
- return this._afterDismissed;
325
- }
326
- /** Gets an observable that is notified when the drawer is finished closing. */
327
- afterClosed() {
328
- return this._ref.closed;
329
- }
330
- /** Gets an observable that is notified when the drawer has opened and appeared. */
331
- afterOpened() {
332
- return this._afterOpened;
333
- }
334
- /**
335
- * Gets an observable that emits when the overlay's backdrop has been clicked.
336
- */
337
- backdropClick() {
338
- return this._ref.backdropClick;
339
- }
340
- /**
341
- * Gets an observable that emits when keydown events are targeted on the overlay.
342
- */
343
- keydownEvents() {
344
- return this._ref.keydownEvents;
345
- }
346
- }
347
-
348
- /** Injection token that can be used to access the data that was passed in to a drawer. */
349
- const DR_DRAWER_DATA = new InjectionToken('DrDrawerData');
350
- /** Injection token that can be used to specify default drawer options. */
351
- const DR_DRAWER_DEFAULT_OPTIONS = new InjectionToken('dr-drawer-default-options');
352
- // Counter for unique drawer ids.
353
- let uniqueId = 0;
354
- /**
355
- * Service to trigger Material Design bottom sheets.
356
- */
357
- class Drawer {
358
- /** Keeps track of the currently-open dialogs. */
359
- get openDrawers() {
360
- return this._parentDrawer ? this._parentDrawer.openDrawers : this._openDrawersAtThisLevel;
361
- }
362
- /** Stream that emits when a drawer has been opened. */
363
- get afterOpened() {
364
- return this._parentDrawer ? this._parentDrawer.afterOpened : this._afterOpenedAtThisLevel;
365
- }
366
- _getAfterAllDismissed() {
367
- const parent = this._parentDrawer;
368
- return parent ? parent._getAfterAllDismissed() : this._afterAllDismissedAtThisLevel;
369
- }
370
- constructor(_overlay, _injector, _parentDrawer, _defaultOptions) {
371
- this._overlay = _overlay;
372
- this._injector = _injector;
373
- this._parentDrawer = _parentDrawer;
374
- this._defaultOptions = _defaultOptions;
375
- this._openDrawersAtThisLevel = [];
376
- this._afterAllDismissedAtThisLevel = new Subject();
377
- this._afterOpenedAtThisLevel = new Subject();
378
- /**
379
- * Stream that emits when all open drawer have finished closing.
380
- * Will emit on subscribe if there are no open drawers to begin with.
381
- */
382
- this.afterAllDismissed = defer(() => this.openDrawers.length ? this._getAfterAllDismissed() : this._getAfterAllDismissed().pipe(startWith(undefined)));
383
- this._dialog = _injector.get(Dialog);
384
- }
385
- open(componentOrTemplateRef, config) {
386
- let drawerRef;
387
- const _config = { ...(this._defaultOptions || new DrawerConfig()), ...config };
388
- _config.id = _config.id || `dr-drawer-${uniqueId++}`;
389
- _config.width =
390
- _config.position === 'left' || _config.position === 'right' ? coerceCssPixelValue(_config.width) : '100vw';
391
- _config.height =
392
- _config.position === 'top' || _config.position === 'bottom' ? coerceCssPixelValue(_config.height) : '100vh';
393
- this._dialog.open(componentOrTemplateRef, {
394
- ..._config,
395
- // Disable closing since we need to sync it up to the animation ourselves.
396
- disableClose: true,
397
- // Disable closing on detachments so that we can sync up the animation.
398
- closeOnOverlayDetachments: false,
399
- container: {
400
- type: DrawerContainer,
401
- providers: () => [
402
- // Provide our config as the CDK config as well since it has the same interface as the
403
- // CDK one, but it contains the actual values passed in by the user for things like
404
- // `disableClose` which we disable for the CDK dialog since we handle it ourselves.
405
- { provide: DrawerConfig, useValue: _config },
406
- { provide: DialogConfig, useValue: _config },
407
- ],
408
- },
409
- scrollStrategy: _config.scrollStrategy || this._overlay.scrollStrategies.block(),
410
- positionStrategy: this._overlay.position().global()[_config.position]('0'),
411
- templateContext: () => ({ drawerRef }),
412
- providers: (cdkRef, _cdkConfig, container) => {
413
- drawerRef = new DrawerRef(cdkRef, _config, container);
414
- return [
415
- { provide: DrawerRef, useValue: drawerRef },
416
- { provide: DR_DRAWER_DATA, useValue: _config.data },
417
- ];
418
- },
419
- });
420
- this.openDrawers.push(drawerRef);
421
- this.afterOpened.next(drawerRef);
422
- drawerRef.afterDismissed().subscribe(() => {
423
- const index = this.openDrawers.indexOf(drawerRef);
424
- if (index > -1) {
425
- this.openDrawers.splice(index, 1);
426
- if (!this.openDrawers.length) {
427
- this._getAfterAllDismissed().next();
428
- }
429
- }
430
- });
431
- return drawerRef;
432
- }
433
- /**
434
- * Dismisses all of the currently-open drawers.
435
- */
436
- dismissAll() {
437
- this._dismissDrawers(this.openDrawers);
438
- }
439
- /**
440
- * Finds an open drawer by its id.
441
- * @param id ID to use when looking up the drawer.
442
- */
443
- getDrawerById(id) {
444
- return this.openDrawers.find((drawer) => drawer.id === id);
445
- }
446
- ngOnDestroy() {
447
- // Only dismiss the drawers at this level on destroy
448
- // since the parent service may still be active.
449
- this._dismissDrawers(this._openDrawersAtThisLevel);
450
- this._afterAllDismissedAtThisLevel.complete();
451
- this._afterOpenedAtThisLevel.complete();
452
- }
453
- _dismissDrawers(drawers) {
454
- let i = drawers.length;
455
- while (i--) {
456
- drawers[i].dismiss();
457
- }
458
- }
459
- /** @nocollapse */ static { this.ɵfac = function Drawer_Factory(t) { return new (t || Drawer)(i0.ɵɵinject(i3.Overlay), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(Drawer, 12), i0.ɵɵinject(DR_DRAWER_DEFAULT_OPTIONS, 8)); }; }
460
- /** @nocollapse */ static { this.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: Drawer, factory: Drawer.ɵfac, providedIn: 'root' }); }
461
- }
462
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Drawer, [{
463
- type: Injectable,
464
- args: [{ providedIn: 'root' }]
465
- }], function () { return [{ type: i3.Overlay }, { type: i0.Injector }, { type: Drawer, decorators: [{
466
- type: Optional
467
- }, {
468
- type: SkipSelf
469
- }] }, { type: DrawerConfig, decorators: [{
470
- type: Optional
471
- }, {
472
- type: Inject,
473
- args: [DR_DRAWER_DEFAULT_OPTIONS]
474
- }] }]; }, null); })();
475
-
476
- class DrawerModule {
477
- /** @nocollapse */ static { this.ɵfac = function DrawerModule_Factory(t) { return new (t || DrawerModule)(); }; }
478
- /** @nocollapse */ static { this.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: DrawerModule }); }
479
- /** @nocollapse */ static { this.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ providers: [Drawer], imports: [DrawerContainer] }); }
480
- }
481
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrawerModule, [{
482
- type: NgModule,
483
- args: [{
484
- imports: [DrawerContainer],
485
- exports: [DrawerContainer],
486
- providers: [Drawer],
487
- }]
488
- }], null, null); })();
489
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(DrawerModule, { imports: [DrawerContainer], exports: [DrawerContainer] }); })();
490
-
491
- /**
492
- * Generated bundle index. Do not edit.
493
- */
494
-
495
- export { DR_DRAWER_DATA, DR_DRAWER_DEFAULT_OPTIONS, Drawer, DrawerConfig, DrawerContainer, DrawerModule, DrawerRef };
496
- //# sourceMappingURL=drDrawer.mjs.map
@@ -1 +0,0 @@
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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,EAAA,CAAA;cADlB,UAAU;eAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;sBAiCzB,QAAQ;;sBAAI,QAAQ;;sBACpB,QAAQ;;sBACR,MAAM;uBAAC,yBAAyB,CAAA;;;MCjD5B,YAAY,CAAA;gGAAZ,YAAY,GAAA,CAAA,EAAA,CAAA,EAAA;kGAAZ,YAAY,EAAA,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,5 +0,0 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
- /** Animations used by the drawer. */
3
- export declare const drDrawerAnimations: {
4
- readonly drawerState: AnimationTriggerMetadata;
5
- };