@ng-matero/extensions 19.2.1 → 19.3.0
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/checkbox-group/checkbox-group.d.ts +3 -3
- package/colorpicker/colorpicker-animations.d.ts +3 -2
- package/colorpicker/colorpicker-content.scss +31 -0
- package/colorpicker/colorpicker.d.ts +21 -4
- package/core/tokens/m2/mtx/_select.scss +1 -0
- package/core/tokens/m3/mtx/_select.scss +4 -0
- package/datetimepicker/calendar.d.ts +0 -3
- package/datetimepicker/datetimepicker-animations.d.ts +5 -4
- package/datetimepicker/datetimepicker-content.scss +48 -1
- package/datetimepicker/datetimepicker.d.ts +22 -6
- package/datetimepicker/month-view.d.ts +0 -3
- package/drawer/drawer-animations.d.ts +6 -3
- package/drawer/drawer-container.d.ts +7 -4
- package/drawer/drawer-container.scss +55 -8
- package/fesm2022/mtxAlert.mjs +7 -7
- package/fesm2022/mtxButton.mjs +7 -7
- package/fesm2022/mtxCheckboxGroup.mjs +9 -7
- package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +137 -48
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +40 -40
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +302 -156
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDrawer.mjs +118 -46
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +87 -86
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +220 -143
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +53 -53
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +10 -10
- package/fesm2022/mtxTooltip.mjs +103 -54
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/column-menu.d.ts +3 -1
- package/grid/grid.d.ts +6 -1
- package/grid/grid.scss +18 -4
- package/grid/interfaces.d.ts +2 -0
- package/package.json +9 -10
- package/popover/popover-animations.d.ts +9 -12
- package/popover/popover-trigger.d.ts +11 -2
- package/popover/popover.d.ts +14 -9
- package/popover/popover.scss +40 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/select/select.scss +22 -33
- package/split/split.d.ts +3 -3
- package/tooltip/tooltip-animations.d.ts +3 -2
- package/tooltip/tooltip.d.ts +19 -11
- package/tooltip/tooltip.scss +1 -1
package/fesm2022/mtxDialog.mjs
CHANGED
|
@@ -20,10 +20,10 @@ class MtxDialogContainer {
|
|
|
20
20
|
_onClose() {
|
|
21
21
|
this.dialogRef.close();
|
|
22
22
|
}
|
|
23
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
24
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.
|
|
23
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: MtxDialogContainer, isStandalone: true, selector: "mtx-dialog-container", host: { classAttribute: "mtx-dialog-container" }, exportAs: ["mtxDialogContainer"], ngImport: i0, template: "@if (data.title) {\n <h1 class=\"mtx-dialog-title\">\n <span>{{data.title | toObservable | async}}</span>\n @if (data.showCloseIcon) {\n <button mat-icon-button (click)=\"_onClose()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </h1>\n}\n@if (data.description) {\n <div class=\"mtx-dialog-content\">\n <p>{{data.description | toObservable | async}}</p>\n </div>\n}\n<div class=\"mtx-dialog-actions\">\n @for (btn of data.buttons; track btn) {\n @switch (btn.type) {\n @case ('raised') {\n @if (btn.focusInitial) {\n <button mat-raised-button cdkFocusInitial\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-raised-button\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('stroked') {\n @if (btn.focusInitial) {\n <button mat-stroked-button cdkFocusInitial\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-stroked-button\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @case ('flat') {\n @if (btn.focusInitial) {\n <button mat-flat-button cdkFocusInitial\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-flat-button\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n @default {\n @if (btn.focusInitial) {\n <button mat-button cdkFocusInitial\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n } @else {\n <button mat-button\n [color]=\"btn.color\" [class]=\"btn.class\" (click)=\"_onClick(btn.onClick!)\">\n {{btn.text | toObservable | async}}\n </button>\n }\n }\n }\n }\n</div>\n", styles: [".mtx-dialog-title{display:flex;justify-content:space-between;align-items:center;padding:8px 24px;margin:0;line-height:48px;font-weight:500;font-size:20px}.mtx-dialog-title .mat-mdc-button-base{margin-right:-16px}[dir=rtl] .mtx-dialog-title .mat-mdc-button-base{margin-right:0;margin-left:-16px}.mtx-dialog-content{display:block;max-height:65vh;padding:0 24px;overflow:auto;-webkit-overflow-scrolling:touch}.mtx-dialog-content p{margin-top:0}.mtx-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:8px}.mtx-dialog-actions .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mtx-dialog-actions .mat-mdc-button-base{margin-left:0;margin-right:8px}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: MtxToObservablePipe, name: "toObservable" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialogContainer, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
28
|
args: [{ selector: 'mtx-dialog-container', exportAs: 'mtxDialogContainer', host: {
|
|
29
29
|
class: 'mtx-dialog-container',
|
|
@@ -94,30 +94,30 @@ class MtxDialog {
|
|
|
94
94
|
],
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
98
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
97
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
98
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialog, providedIn: 'root' }); }
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialog, decorators: [{
|
|
101
101
|
type: Injectable,
|
|
102
102
|
args: [{ providedIn: 'root' }]
|
|
103
103
|
}] });
|
|
104
104
|
|
|
105
105
|
class MtxDialogModule {
|
|
106
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
107
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
106
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
107
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: MtxDialogModule, imports: [CommonModule,
|
|
108
108
|
MatDialogModule,
|
|
109
109
|
MatButtonModule,
|
|
110
110
|
MatIconModule,
|
|
111
111
|
MtxPipesModule,
|
|
112
112
|
MtxDialogContainer], exports: [MtxDialogContainer] }); }
|
|
113
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
113
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialogModule, providers: [MtxDialog], imports: [CommonModule,
|
|
114
114
|
MatDialogModule,
|
|
115
115
|
MatButtonModule,
|
|
116
116
|
MatIconModule,
|
|
117
117
|
MtxPipesModule,
|
|
118
118
|
MtxDialogContainer] }); }
|
|
119
119
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDialogModule, decorators: [{
|
|
121
121
|
type: NgModule,
|
|
122
122
|
args: [{
|
|
123
123
|
imports: [
|
package/fesm2022/mtxDrawer.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular/cdk/dialog';
|
|
2
2
|
import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, InjectionToken,
|
|
4
|
+
import { inject, ANIMATION_MODULE_TYPE, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, InjectionToken, Injectable, NgModule } from '@angular/core';
|
|
5
5
|
import { MatCommonModule } from '@angular/material/core';
|
|
6
6
|
import { coerceCssPixelValue } from '@angular/cdk/coercion';
|
|
7
7
|
import { Overlay } from '@angular/cdk/overlay';
|
|
8
8
|
import { Subject, merge, defer } from 'rxjs';
|
|
9
9
|
import { filter, take, startWith } from 'rxjs/operators';
|
|
10
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
11
10
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
12
11
|
|
|
13
12
|
/**
|
|
@@ -45,23 +44,8 @@ class MtxDrawerConfig {
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
/** Animation that shows and hides a drawer. */
|
|
51
|
-
drawerState: trigger('state', [
|
|
52
|
-
state('void, hidden', style({
|
|
53
|
-
'box-shadow': 'none',
|
|
54
|
-
'visibility': 'hidden',
|
|
55
|
-
})),
|
|
56
|
-
state('visible', style({
|
|
57
|
-
transform: 'none',
|
|
58
|
-
visibility: 'visible',
|
|
59
|
-
})),
|
|
60
|
-
transition('visible => void, visible => hidden', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')),
|
|
61
|
-
transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
62
|
-
]),
|
|
63
|
-
};
|
|
64
|
-
|
|
47
|
+
const ENTER_ANIMATION = '_mtx-drawer-enter';
|
|
48
|
+
const EXIT_ANIMATION = '_mtx-drawer-exit';
|
|
65
49
|
/**
|
|
66
50
|
* Internal component that wraps user-provided drawer content.
|
|
67
51
|
* @docs-private
|
|
@@ -69,6 +53,7 @@ const mtxDrawerAnimations = {
|
|
|
69
53
|
class MtxDrawerContainer extends CdkDialogContainer {
|
|
70
54
|
constructor() {
|
|
71
55
|
super(...arguments);
|
|
56
|
+
this._animationsDisabled = inject(ANIMATION_MODULE_TYPE, { optional: true }) === 'NoopAnimations';
|
|
72
57
|
/** The state of the drawer animations. */
|
|
73
58
|
this._animationState = 'void';
|
|
74
59
|
/** Emits whenever the state of the animation changes. */
|
|
@@ -91,6 +76,9 @@ class MtxDrawerContainer extends CdkDialogContainer {
|
|
|
91
76
|
this._animationState = 'visible';
|
|
92
77
|
this._changeDetectorRef.markForCheck();
|
|
93
78
|
this._changeDetectorRef.detectChanges();
|
|
79
|
+
if (this._animationsDisabled) {
|
|
80
|
+
this._simulateAnimation(ENTER_ANIMATION);
|
|
81
|
+
}
|
|
94
82
|
}
|
|
95
83
|
}
|
|
96
84
|
/** Begin animation of the bottom sheet exiting from view. */
|
|
@@ -98,39 +86,55 @@ class MtxDrawerContainer extends CdkDialogContainer {
|
|
|
98
86
|
if (!this._destroyed) {
|
|
99
87
|
this._animationState = 'hidden';
|
|
100
88
|
this._changeDetectorRef.markForCheck();
|
|
89
|
+
if (this._animationsDisabled) {
|
|
90
|
+
this._simulateAnimation(EXIT_ANIMATION);
|
|
91
|
+
}
|
|
101
92
|
}
|
|
102
93
|
}
|
|
103
94
|
ngOnDestroy() {
|
|
104
95
|
super.ngOnDestroy();
|
|
105
96
|
this._destroyed = true;
|
|
106
97
|
}
|
|
107
|
-
|
|
108
|
-
|
|
98
|
+
_simulateAnimation(name) {
|
|
99
|
+
this._ngZone.run(() => {
|
|
100
|
+
this._handleAnimationEvent(true, name);
|
|
101
|
+
setTimeout(() => this._handleAnimationEvent(false, name));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
_handleAnimationEvent(isStart, animationName) {
|
|
105
|
+
const isEnter = animationName === ENTER_ANIMATION;
|
|
106
|
+
const isExit = animationName === EXIT_ANIMATION;
|
|
107
|
+
if (isEnter) {
|
|
109
108
|
this._trapFocus();
|
|
110
109
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
if (isEnter || isExit) {
|
|
111
|
+
this._animationStateChanged.emit({
|
|
112
|
+
toState: isEnter ? 'visible' : 'hidden',
|
|
113
|
+
phase: isStart ? 'start' : 'done',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
115
116
|
}
|
|
116
117
|
_captureInitialFocus() { }
|
|
117
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
118
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
118
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawerContainer, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
119
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: MtxDrawerContainer, isStandalone: true, selector: "mtx-drawer-container", host: { attributes: { "tabindex": "-1" }, listeners: { "animationstart": "_handleAnimationEvent(true, $event.animationName)", "animationend": "_handleAnimationEvent(false, $event.animationName)", "animationcancel": "_handleAnimationEvent(false, $event.animationName)" }, properties: { "class": "_drawerPosition", "class.mtx-drawer-container-animations-enabled": "!_animationsDisabled", "class.mtx-drawer-container-enter": "_animationState === \"visible\"", "class.mtx-drawer-container-exit": "_animationState === \"hidden\"", "id": "_config.id", "attr.role": "_config.role", "attr.aria-modal": "_config.isModal", "attr.aria-label": "_config.ariaLabel" }, classAttribute: "mtx-drawer-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: ["@keyframes _mtx-drawer-enter{0%{box-shadow:none;visibility:hidden}to{transform:none;visibility:visible}}@keyframes _mtx-drawer-exit{0%{transform:none;visibility:visible}to{box-shadow:none;visibility:hidden}}.mtx-drawer-container{display:block;width:100%;padding:8px 16px;overflow:auto;outline:0;box-sizing:border-box;position:relative;background-color:var(--mtx-drawer-container-background-color, var(--mat-sys-surface));color:var(--mtx-drawer-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mtx-drawer-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12))}@media (forced-colors: active){.mtx-drawer-container{outline:1px solid}}.mtx-drawer-container-animations-enabled.mtx-drawer-container-enter{animation:_mtx-drawer-enter .15s cubic-bezier(0,0,.2,1) forwards}.mtx-drawer-container-animations-enabled.mtx-drawer-container-exit{animation:_mtx-drawer-exit .4s cubic-bezier(.25,.8,.25,1) backwards}.mtx-drawer-container-animations-enabled.mtx-drawer-right{transform:translate(100%)}.mtx-drawer-container-animations-enabled.mtx-drawer-left{transform:translate(-100%)}.mtx-drawer-container-animations-enabled.mtx-drawer-bottom{transform:translateY(100%)}.mtx-drawer-container-animations-enabled.mtx-drawer-top{transform:translateY(-100%)}.mtx-drawer-right{border-top-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}.mtx-drawer-left{border-top-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}.mtx-drawer-bottom{border-top-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-top-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}.mtx-drawer-top{border-bottom-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
119
120
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawerContainer, decorators: [{
|
|
121
122
|
type: Component,
|
|
122
|
-
args: [{ selector: 'mtx-drawer-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None,
|
|
123
|
+
args: [{ selector: 'mtx-drawer-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, host: {
|
|
123
124
|
'class': 'mtx-drawer-container',
|
|
124
125
|
'[class]': '_drawerPosition',
|
|
126
|
+
'[class.mtx-drawer-container-animations-enabled]': '!_animationsDisabled',
|
|
127
|
+
'[class.mtx-drawer-container-enter]': '_animationState === "visible"',
|
|
128
|
+
'[class.mtx-drawer-container-exit]': '_animationState === "hidden"',
|
|
125
129
|
'tabindex': '-1',
|
|
126
130
|
'[id]': '_config.id',
|
|
127
131
|
'[attr.role]': '_config.role',
|
|
128
132
|
'[attr.aria-modal]': '_config.isModal',
|
|
129
133
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
130
|
-
'
|
|
131
|
-
'(
|
|
132
|
-
'(
|
|
133
|
-
}, imports: [CdkPortalOutlet], template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".mtx-drawer-container{display:block;width:100%;padding:8px 16px;overflow:auto;outline:0;box-sizing:border-box;background-color:var(--mtx-drawer-container-background-color, var(--mat-sys-surface));color:var(--mtx-drawer-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mtx-drawer-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12))}@media (forced-colors: active){.mtx-drawer-container{outline:1px solid}}.mtx-drawer-right{transform:translate(100%)
|
|
134
|
+
'(animationstart)': '_handleAnimationEvent(true, $event.animationName)',
|
|
135
|
+
'(animationend)': '_handleAnimationEvent(false, $event.animationName)',
|
|
136
|
+
'(animationcancel)': '_handleAnimationEvent(false, $event.animationName)',
|
|
137
|
+
}, imports: [CdkPortalOutlet], template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: ["@keyframes _mtx-drawer-enter{0%{box-shadow:none;visibility:hidden}to{transform:none;visibility:visible}}@keyframes _mtx-drawer-exit{0%{transform:none;visibility:visible}to{box-shadow:none;visibility:hidden}}.mtx-drawer-container{display:block;width:100%;padding:8px 16px;overflow:auto;outline:0;box-sizing:border-box;position:relative;background-color:var(--mtx-drawer-container-background-color, var(--mat-sys-surface));color:var(--mtx-drawer-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mtx-drawer-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12))}@media (forced-colors: active){.mtx-drawer-container{outline:1px solid}}.mtx-drawer-container-animations-enabled.mtx-drawer-container-enter{animation:_mtx-drawer-enter .15s cubic-bezier(0,0,.2,1) forwards}.mtx-drawer-container-animations-enabled.mtx-drawer-container-exit{animation:_mtx-drawer-exit .4s cubic-bezier(.25,.8,.25,1) backwards}.mtx-drawer-container-animations-enabled.mtx-drawer-right{transform:translate(100%)}.mtx-drawer-container-animations-enabled.mtx-drawer-left{transform:translate(-100%)}.mtx-drawer-container-animations-enabled.mtx-drawer-bottom{transform:translateY(100%)}.mtx-drawer-container-animations-enabled.mtx-drawer-top{transform:translateY(-100%)}.mtx-drawer-right{border-top-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}.mtx-drawer-left{border-top-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}.mtx-drawer-bottom{border-top-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-top-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}.mtx-drawer-top{border-bottom-left-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mtx-drawer-container-shape, var(--mat-sys-corner-large))}\n"] }]
|
|
134
138
|
}], propDecorators: { _portalOutlet: [{
|
|
135
139
|
type: ViewChild,
|
|
136
140
|
args: [CdkPortalOutlet, { static: true }]
|
|
@@ -162,14 +166,14 @@ class MtxDrawerRef {
|
|
|
162
166
|
this.id = _ref.id;
|
|
163
167
|
// Emit when opening animation completes
|
|
164
168
|
containerInstance._animationStateChanged
|
|
165
|
-
.pipe(filter(event => event.
|
|
169
|
+
.pipe(filter(event => event.phase === 'done' && event.toState === 'visible'), take(1))
|
|
166
170
|
.subscribe(() => {
|
|
167
171
|
this._afterOpened.next();
|
|
168
172
|
this._afterOpened.complete();
|
|
169
173
|
});
|
|
170
174
|
// Dispose overlay when closing animation is complete
|
|
171
175
|
containerInstance._animationStateChanged
|
|
172
|
-
.pipe(filter(event => event.
|
|
176
|
+
.pipe(filter(event => event.phase === 'done' && event.toState === 'hidden'), take(1))
|
|
173
177
|
.subscribe(() => {
|
|
174
178
|
clearTimeout(this._closeFallbackTimeout);
|
|
175
179
|
this._ref.close(this._result);
|
|
@@ -193,16 +197,14 @@ class MtxDrawerRef {
|
|
|
193
197
|
if (this.containerInstance && !this._afterDismissed.closed) {
|
|
194
198
|
// Transition the backdrop in parallel to the drawer.
|
|
195
199
|
this.containerInstance._animationStateChanged
|
|
196
|
-
.pipe(filter(event => event.
|
|
200
|
+
.pipe(filter(event => event.phase === 'start'), take(1))
|
|
197
201
|
.subscribe(event => {
|
|
198
202
|
// The logic that disposes of the overlay depends on the exit animation completing, however
|
|
199
203
|
// it isn't guaranteed if the parent view is destroyed while it's running. Add a fallback
|
|
200
204
|
// timeout which will clean everything up if the animation hasn't fired within the specified
|
|
201
205
|
// amount of time plus 100ms. We don't need to run this outside the NgZone, because for the
|
|
202
206
|
// vast majority of cases the timeout will have been cleared before it has fired.
|
|
203
|
-
this._closeFallbackTimeout = setTimeout(() =>
|
|
204
|
-
this._ref.close(this._result);
|
|
205
|
-
}, event.totalTime + 100);
|
|
207
|
+
this._closeFallbackTimeout = setTimeout(() => this._ref.close(this._result), 500);
|
|
206
208
|
this._ref.overlayRef.detachBackdrop();
|
|
207
209
|
});
|
|
208
210
|
this._result = result;
|
|
@@ -348,20 +350,20 @@ class MtxDrawer {
|
|
|
348
350
|
drawers[i].dismiss();
|
|
349
351
|
}
|
|
350
352
|
}
|
|
351
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
352
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
353
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
354
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawer, providedIn: 'root' }); }
|
|
353
355
|
}
|
|
354
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
356
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawer, decorators: [{
|
|
355
357
|
type: Injectable,
|
|
356
358
|
args: [{ providedIn: 'root' }]
|
|
357
359
|
}] });
|
|
358
360
|
|
|
359
361
|
class MtxDrawerModule {
|
|
360
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
361
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
362
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
362
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
363
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawerModule, imports: [DialogModule, PortalModule, MatCommonModule, MtxDrawerContainer], exports: [MtxDrawerContainer, MatCommonModule] }); }
|
|
364
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawerModule, providers: [MtxDrawer], imports: [DialogModule, PortalModule, MatCommonModule, MatCommonModule] }); }
|
|
363
365
|
}
|
|
364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: MtxDrawerModule, decorators: [{
|
|
365
367
|
type: NgModule,
|
|
366
368
|
args: [{
|
|
367
369
|
imports: [DialogModule, PortalModule, MatCommonModule, MtxDrawerContainer],
|
|
@@ -370,6 +372,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImpor
|
|
|
370
372
|
}]
|
|
371
373
|
}] });
|
|
372
374
|
|
|
375
|
+
/**
|
|
376
|
+
* Animations used by the drawer.
|
|
377
|
+
* @deprecated No longer used. Will be removed.
|
|
378
|
+
* @breaking-change 21.0.0
|
|
379
|
+
*/
|
|
380
|
+
const mtxDrawerAnimations = {
|
|
381
|
+
// Represents:
|
|
382
|
+
// drawerState: trigger('state', [
|
|
383
|
+
// state(
|
|
384
|
+
// 'void, hidden',
|
|
385
|
+
// style({
|
|
386
|
+
// 'box-shadow': 'none',
|
|
387
|
+
// 'visibility': 'hidden',
|
|
388
|
+
// })
|
|
389
|
+
// ),
|
|
390
|
+
// state(
|
|
391
|
+
// 'visible',
|
|
392
|
+
// style({
|
|
393
|
+
// transform: 'none',
|
|
394
|
+
// visibility: 'visible',
|
|
395
|
+
// })
|
|
396
|
+
// ),
|
|
397
|
+
// transition(
|
|
398
|
+
// 'visible => void, visible => hidden',
|
|
399
|
+
// animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')
|
|
400
|
+
// ),
|
|
401
|
+
// transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
402
|
+
// ]),
|
|
403
|
+
/** Animation that shows and hides a drawer. */
|
|
404
|
+
drawerState: {
|
|
405
|
+
type: 7,
|
|
406
|
+
name: 'state',
|
|
407
|
+
definitions: [
|
|
408
|
+
{
|
|
409
|
+
type: 0,
|
|
410
|
+
name: 'void, hidden',
|
|
411
|
+
styles: { type: 6, styles: { 'box-shadow': 'none', 'visibility': 'hidden' }, offset: null },
|
|
412
|
+
options: null,
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
type: 0,
|
|
416
|
+
name: 'visible',
|
|
417
|
+
styles: { type: 6, styles: { transform: 'none', visibility: 'visible' }, offset: null },
|
|
418
|
+
options: null,
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
type: 1,
|
|
422
|
+
expr: 'visible => void, visible => hidden',
|
|
423
|
+
animation: {
|
|
424
|
+
type: 4,
|
|
425
|
+
styles: { type: 6, styles: {}, offset: null },
|
|
426
|
+
timings: '400ms cubic-bezier(0.25, 0.8, 0.25, 1)',
|
|
427
|
+
},
|
|
428
|
+
options: null,
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
type: 1,
|
|
432
|
+
expr: 'void => visible',
|
|
433
|
+
animation: {
|
|
434
|
+
type: 4,
|
|
435
|
+
styles: { type: 6, styles: {}, offset: null },
|
|
436
|
+
timings: '150ms cubic-bezier(0, 0, 0.2, 1)',
|
|
437
|
+
},
|
|
438
|
+
options: null,
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
options: {},
|
|
442
|
+
},
|
|
443
|
+
};
|
|
444
|
+
|
|
373
445
|
/**
|
|
374
446
|
* Generated bundle index. Do not edit.
|
|
375
447
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxDrawer.mjs","sources":["../../../projects/extensions/drawer/drawer-config.ts","../../../projects/extensions/drawer/drawer-animations.ts","../../../projects/extensions/drawer/drawer-container.ts","../../../projects/extensions/drawer/drawer-container.html","../../../projects/extensions/drawer/drawer-ref.ts","../../../projects/extensions/drawer/drawer.ts","../../../projects/extensions/drawer/drawer-module.ts","../../../projects/extensions/drawer/mtxDrawer.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 MtxDrawerConfig<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 = true;\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 = 'right';\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 {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/** Animations used by the drawer. */\nexport const mtxDrawerAnimations: {\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(\n 'visible => void, visible => hidden',\n animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')\n ),\n transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n OnDestroy,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { mtxDrawerAnimations } from './drawer-animations';\nimport { MtxDrawerConfig } from './drawer-config';\n\n/**\n * Internal component that wraps user-provided drawer content.\n * @docs-private\n */\n@Component({\n selector: 'mtx-drawer-container',\n templateUrl: 'drawer-container.html',\n styleUrl: 'drawer-container.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: [mtxDrawerAnimations.drawerState],\n host: {\n 'class': 'mtx-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 imports: [CdkPortalOutlet],\n})\nexport class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConfig> implements OnDestroy {\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, { static: true }) _portalOutlet!: CdkPortalOutlet;\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 _animationStateChanged = new EventEmitter<AnimationEvent>();\n\n /** Whether the component has been destroyed. */\n private _destroyed = false;\n\n get _drawerPosition() {\n return `mtx-drawer-${this._config.position}`;\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 if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n\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","<ng-template cdkPortalOutlet></ng-template>\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 { MtxDrawerConfig } from './drawer-config';\nimport { MtxDrawerContainer } from './drawer-container';\nimport { ComponentRef } from '@angular/core';\n\n/**\n * Reference to a drawer dispatched from the drawer service.\n */\nexport class MtxDrawerRef<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: MtxDrawerContainer;\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: MtxDrawerConfig,\n containerInstance: MtxDrawerContainer\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 });\n\n merge(\n this.backdropClick(),\n this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE))\n ).subscribe(event => {\n if (\n !this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))\n ) {\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 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 finished closing. */\n afterDismissed(): 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 {\n Injectable,\n InjectionToken,\n Injector,\n OnDestroy,\n TemplateRef,\n inject,\n} from '@angular/core';\nimport { defer, Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { MtxDrawerConfig } from './drawer-config';\nimport { MtxDrawerContainer } from './drawer-container';\nimport { MtxDrawerRef } from './drawer-ref';\n\n/** Injection token that can be used to access the data that was passed in to a drawer. */\nexport const MTX_DRAWER_DATA = new InjectionToken<any>('MtxDrawerData');\n\n/** Injection token that can be used to specify default drawer options. */\nexport const MTX_DRAWER_DEFAULT_OPTIONS = new InjectionToken<MtxDrawerConfig>(\n 'mtx-drawer-default-options'\n);\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 MtxDrawer implements OnDestroy {\n private _overlay = inject(Overlay);\n private _parentDrawer = inject(MtxDrawer, { optional: true, skipSelf: true });\n private _defaultOptions = inject<MtxDrawerConfig>(MTX_DRAWER_DEFAULT_OPTIONS, { optional: true });\n\n private readonly _openDrawersAtThisLevel: MtxDrawerRef<any>[] = [];\n private readonly _afterAllDismissedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<MtxDrawerRef<any>>();\n private _dialog = inject(Dialog);\n\n /** Keeps track of the currently-open dialogs. */\n get openDrawers(): MtxDrawerRef<any>[] {\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<MtxDrawerRef<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\n ? this._getAfterAllDismissed()\n : this._getAfterAllDismissed().pipe(startWith(undefined))\n ) as Observable<any>;\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>(\n component: ComponentType<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<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>(\n template: TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R> {\n let drawerRef!: MtxDrawerRef<T, R>;\n\n const _config = { ...(this._defaultOptions || new MtxDrawerConfig()), ...config };\n _config.id = _config.id || `mtx-drawer-${uniqueId++}`;\n\n _config.width =\n _config.position === 'left' || _config.position === 'right'\n ? coerceCssPixelValue(_config.width)\n : '100vw';\n\n _config.height =\n _config.position === 'top' || _config.position === 'bottom'\n ? coerceCssPixelValue(_config.height)\n : '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: MtxDrawerContainer,\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: MtxDrawerConfig, 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 MtxDrawerRef(cdkRef, _config, container as MtxDrawerContainer);\n return [\n { provide: MtxDrawerRef, useValue: drawerRef },\n { provide: MTX_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): MtxDrawerRef<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: MtxDrawerRef<any>[]) {\n let i = drawers.length;\n\n while (i--) {\n drawers[i].dismiss();\n }\n }\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MtxDrawer } from './drawer';\nimport { MtxDrawerContainer } from './drawer-container';\n\n@NgModule({\n imports: [DialogModule, PortalModule, MatCommonModule, MtxDrawerContainer],\n exports: [MtxDrawerContainer, MatCommonModule],\n providers: [MtxDrawer],\n})\nexport class MtxDrawerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAUA;;AAEG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;QAcE,IAAI,CAAA,IAAA,GAAc,IAAI;;QAGtB,IAAW,CAAA,WAAA,GAAa,IAAI;;QAM5B,IAAY,CAAA,YAAA,GAA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AA,IAAA,EAAA,SAAS,cADI,MAAM,EAAA,CAAA,CAAA;;2FACnB,SAAS,EAAA,UAAA,EAAA,CAAA;kBADrB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;MCpBrB,eAAe,CAAA;iIAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAf,eAAe,EAAA,OAAA,EAAA,CAJhB,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAC/D,kBAAkB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;kIAGlC,eAAe,EAAA,SAAA,EAFf,CAAC,SAAS,CAAC,EAAA,OAAA,EAAA,CAFZ,YAAY,EAAE,YAAY,EAAE,eAAe,EACvB,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAGlC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,CAAC;AAC1E,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,CAAC;oBAC9C,SAAS,EAAE,CAAC,SAAS,CAAC;AACvB,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mtxDrawer.mjs","sources":["../../../projects/extensions/drawer/drawer-config.ts","../../../projects/extensions/drawer/drawer-container.ts","../../../projects/extensions/drawer/drawer-container.html","../../../projects/extensions/drawer/drawer-ref.ts","../../../projects/extensions/drawer/drawer.ts","../../../projects/extensions/drawer/drawer-module.ts","../../../projects/extensions/drawer/drawer-animations.ts","../../../projects/extensions/drawer/mtxDrawer.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 MtxDrawerConfig<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 = true;\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 = 'right';\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 { CdkDialogContainer } from '@angular/cdk/dialog';\nimport { CdkPortalOutlet } from '@angular/cdk/portal';\nimport {\n ANIMATION_MODULE_TYPE,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n OnDestroy,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MtxDrawerConfig } from './drawer-config';\n\nconst ENTER_ANIMATION = '_mtx-drawer-enter';\nconst EXIT_ANIMATION = '_mtx-drawer-exit';\n\n/**\n * Internal component that wraps user-provided drawer content.\n * @docs-private\n */\n@Component({\n selector: 'mtx-drawer-container',\n templateUrl: 'drawer-container.html',\n styleUrl: 'drawer-container.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 host: {\n 'class': 'mtx-drawer-container',\n '[class]': '_drawerPosition',\n '[class.mtx-drawer-container-animations-enabled]': '!_animationsDisabled',\n '[class.mtx-drawer-container-enter]': '_animationState === \"visible\"',\n '[class.mtx-drawer-container-exit]': '_animationState === \"hidden\"',\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 '(animationstart)': '_handleAnimationEvent(true, $event.animationName)',\n '(animationend)': '_handleAnimationEvent(false, $event.animationName)',\n '(animationcancel)': '_handleAnimationEvent(false, $event.animationName)',\n },\n imports: [CdkPortalOutlet],\n})\nexport class MtxDrawerContainer extends CdkDialogContainer<MtxDrawerConfig> implements OnDestroy {\n /** The portal outlet inside of this container into which the content will be loaded. */\n @ViewChild(CdkPortalOutlet, { static: true }) _portalOutlet!: CdkPortalOutlet;\n\n protected _animationsDisabled =\n inject(ANIMATION_MODULE_TYPE, { optional: true }) === 'NoopAnimations';\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 _animationStateChanged = new EventEmitter<{\n toState: 'visible' | 'hidden';\n phase: 'start' | 'done';\n }>();\n\n /** Whether the component has been destroyed. */\n private _destroyed = false;\n\n get _drawerPosition() {\n return `mtx-drawer-${this._config.position}`;\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 if (this._animationsDisabled) {\n this._simulateAnimation(ENTER_ANIMATION);\n }\n }\n }\n\n /** Begin animation of the bottom sheet exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n if (this._animationsDisabled) {\n this._simulateAnimation(EXIT_ANIMATION);\n }\n }\n }\n\n override ngOnDestroy() {\n super.ngOnDestroy();\n\n this._destroyed = true;\n }\n\n private _simulateAnimation(name: typeof ENTER_ANIMATION | typeof EXIT_ANIMATION) {\n this._ngZone.run(() => {\n this._handleAnimationEvent(true, name);\n setTimeout(() => this._handleAnimationEvent(false, name));\n });\n }\n\n protected _handleAnimationEvent(isStart: boolean, animationName: string) {\n const isEnter = animationName === ENTER_ANIMATION;\n const isExit = animationName === EXIT_ANIMATION;\n\n if (isEnter) {\n this._trapFocus();\n }\n\n if (isEnter || isExit) {\n this._animationStateChanged.emit({\n toState: isEnter ? 'visible' : 'hidden',\n phase: isStart ? 'start' : 'done',\n });\n }\n }\n\n protected override _captureInitialFocus(): void {}\n}\n","<ng-template cdkPortalOutlet></ng-template>\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 { MtxDrawerConfig } from './drawer-config';\nimport { MtxDrawerContainer } from './drawer-container';\nimport { ComponentRef } from '@angular/core';\n\n/**\n * Reference to a drawer dispatched from the drawer service.\n */\nexport class MtxDrawerRef<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: MtxDrawerContainer;\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: MtxDrawerConfig,\n containerInstance: MtxDrawerContainer\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.phase === '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.phase === '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 });\n\n merge(\n this.backdropClick(),\n this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE))\n ).subscribe(event => {\n if (\n !this.disableClose &&\n (event.type !== 'keydown' || !hasModifierKey(event as KeyboardEvent))\n ) {\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 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.phase === '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\n this._closeFallbackTimeout = setTimeout(() => this._ref.close(this._result), 500);\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 finished closing. */\n afterDismissed(): 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, OnDestroy, TemplateRef } from '@angular/core';\nimport { defer, Observable, Subject } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { MtxDrawerConfig } from './drawer-config';\nimport { MtxDrawerContainer } from './drawer-container';\nimport { MtxDrawerRef } from './drawer-ref';\n\n/** Injection token that can be used to access the data that was passed in to a drawer. */\nexport const MTX_DRAWER_DATA = new InjectionToken<any>('MtxDrawerData');\n\n/** Injection token that can be used to specify default drawer options. */\nexport const MTX_DRAWER_DEFAULT_OPTIONS = new InjectionToken<MtxDrawerConfig>(\n 'mtx-drawer-default-options'\n);\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 MtxDrawer implements OnDestroy {\n private _overlay = inject(Overlay);\n private _parentDrawer = inject(MtxDrawer, { optional: true, skipSelf: true });\n private _defaultOptions = inject<MtxDrawerConfig>(MTX_DRAWER_DEFAULT_OPTIONS, { optional: true });\n\n private readonly _openDrawersAtThisLevel: MtxDrawerRef<any>[] = [];\n private readonly _afterAllDismissedAtThisLevel = new Subject<void>();\n private readonly _afterOpenedAtThisLevel = new Subject<MtxDrawerRef<any>>();\n private _dialog = inject(Dialog);\n\n /** Keeps track of the currently-open dialogs. */\n get openDrawers(): MtxDrawerRef<any>[] {\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<MtxDrawerRef<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\n ? this._getAfterAllDismissed()\n : this._getAfterAllDismissed().pipe(startWith(undefined))\n ) as Observable<any>;\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>(\n component: ComponentType<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<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>(\n template: TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R>;\n\n open<T, D = any, R = any>(\n componentOrTemplateRef: ComponentType<T> | TemplateRef<T>,\n config?: MtxDrawerConfig<D>\n ): MtxDrawerRef<T, R> {\n let drawerRef!: MtxDrawerRef<T, R>;\n\n const _config = { ...(this._defaultOptions || new MtxDrawerConfig()), ...config };\n _config.id = _config.id || `mtx-drawer-${uniqueId++}`;\n\n _config.width =\n _config.position === 'left' || _config.position === 'right'\n ? coerceCssPixelValue(_config.width)\n : '100vw';\n\n _config.height =\n _config.position === 'top' || _config.position === 'bottom'\n ? coerceCssPixelValue(_config.height)\n : '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: MtxDrawerContainer,\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: MtxDrawerConfig, 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 MtxDrawerRef(cdkRef, _config, container as MtxDrawerContainer);\n return [\n { provide: MtxDrawerRef, useValue: drawerRef },\n { provide: MTX_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): MtxDrawerRef<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: MtxDrawerRef<any>[]) {\n let i = drawers.length;\n\n while (i--) {\n drawers[i].dismiss();\n }\n }\n}\n","import { DialogModule } from '@angular/cdk/dialog';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MtxDrawer } from './drawer';\nimport { MtxDrawerContainer } from './drawer-container';\n\n@NgModule({\n imports: [DialogModule, PortalModule, MatCommonModule, MtxDrawerContainer],\n exports: [MtxDrawerContainer, MatCommonModule],\n providers: [MtxDrawer],\n})\nexport class MtxDrawerModule {}\n","/**\n * Animations used by the drawer.\n * @deprecated No longer used. Will be removed.\n * @breaking-change 21.0.0\n */\nexport const mtxDrawerAnimations: {\n readonly drawerState: any;\n} = {\n // Represents:\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(\n // 'visible => void, visible => hidden',\n // animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')\n // ),\n // transition('void => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n // ]),\n\n /** Animation that shows and hides a drawer. */\n drawerState: {\n type: 7,\n name: 'state',\n definitions: [\n {\n type: 0,\n name: 'void, hidden',\n styles: { type: 6, styles: { 'box-shadow': 'none', 'visibility': 'hidden' }, offset: null },\n options: null,\n },\n {\n type: 0,\n name: 'visible',\n styles: { type: 6, styles: { transform: 'none', visibility: 'visible' }, offset: null },\n options: null,\n },\n {\n type: 1,\n expr: 'visible => void, visible => hidden',\n animation: {\n type: 4,\n styles: { type: 6, styles: {}, offset: null },\n timings: '400ms cubic-bezier(0.25, 0.8, 0.25, 1)',\n },\n options: null,\n },\n {\n type: 1,\n expr: 'void => visible',\n animation: {\n type: 4,\n styles: { type: 6, styles: {}, offset: null },\n timings: '150ms cubic-bezier(0, 0, 0.2, 1)',\n },\n options: null,\n },\n ],\n options: {},\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAUA;;AAEG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;QAcE,IAAI,CAAA,IAAA,GAAc,IAAI;;QAGtB,IAAW,CAAA,WAAA,GAAa,IAAI;;QAM5B,IAAY,CAAA,YAAA,GAAa,KAAK;;QAG9B,IAAS,CAAA,SAAA,GAAmB,IAAI;AAEhC;;;;AAIG;QACH,IAAiB,CAAA,iBAAA,GAAa,IAAI;AAElC;;;;AAIG;QACH,IAAS,CAAA,SAAA,GAAwC,gBAAgB;AAEjE;;;AAGG;QACH,IAAY,CAAA,YAAA,GAAa,IAAI;;QAM7B,IAAQ,CAAA,QAAA,GAAoB,OAAO;;AAmBpC;;ACtED,MAAM,eAAe,GAAG,mBAAmB;AAC3C,MAAM,cAAc,GAAG,kBAAkB;AAEzC;;;AAGG;AA2BG,MAAO,kBAAmB,SAAQ,kBAAmC,CAAA;AA1B3E,IAAA,WAAA,GAAA;;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