@ng-matero/extensions 17.3.5 → 18.0.1
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/README.md +11 -0
- package/_index.scss +6 -0
- package/alert/_alert-theme.scss +2 -3
- package/colorpicker/_colorpicker-theme.scss +2 -3
- package/colorpicker/colorpicker.d.ts +4 -4
- package/{experimental/theming/_color-api-back-compat.scss → core/theming/_color-api-backwards-compatibility.scss} +1 -1
- package/{experimental → core}/theming/_config-validation.scss +11 -5
- package/{experimental → core}/theming/_definition.scss +4 -3
- package/core/theming/prebuilt/azure-blue.scss +26 -0
- package/core/theming/prebuilt/cyan-orange.scss +26 -0
- package/core/theming/prebuilt/deeppurple-amber.scss +4 -4
- package/core/theming/prebuilt/indigo-pink.scss +4 -4
- package/core/theming/prebuilt/magenta-violet.scss +26 -0
- package/core/theming/prebuilt/pink-bluegrey.scss +4 -4
- package/core/theming/prebuilt/purple-green.scss +4 -4
- package/core/theming/prebuilt/rose-red.scss +26 -0
- package/{experimental/theming/_m3-density.scss → core/tokens/_density.scss} +0 -1
- package/core/tokens/_m3-tokens.scss +350 -0
- package/core/tokens/_token-utils.scss +164 -40
- package/core/tokens/m2/_index.scss +2 -3
- package/core/tokens/m2/mdc/_plain-tooltip.scss +1 -2
- package/core/tokens/m2/mtx/_alert.scss +5 -6
- package/core/tokens/m2/mtx/_colorpicker.scss +2 -3
- package/core/tokens/m2/mtx/_datetimepicker.scss +7 -8
- package/core/tokens/m2/mtx/_drawer.scss +3 -2
- package/core/tokens/m2/mtx/_grid.scss +4 -3
- package/core/tokens/m2/mtx/_loader.scss +2 -3
- package/core/tokens/m2/mtx/_popover.scss +1 -2
- package/core/tokens/m2/mtx/_progress.scss +5 -6
- package/core/tokens/m2/mtx/_select.scss +3 -2
- package/core/tokens/m2/mtx/_split.scss +2 -3
- package/core/tokens/m3/index.scss +45 -0
- package/core/tokens/m3/mtx/_alert.scss +31 -0
- package/core/tokens/m3/mtx/_colorpicker.scss +19 -0
- package/{experimental/theming/_custom-tokens.scss → core/tokens/m3/mtx/_datetimepicker.scss} +15 -191
- package/core/tokens/m3/mtx/_drawer.scss +22 -0
- package/core/tokens/m3/mtx/_grid.scss +34 -0
- package/core/tokens/m3/mtx/_loader.scss +22 -0
- package/core/tokens/m3/mtx/_popover.scss +22 -0
- package/core/tokens/m3/mtx/_progress.scss +31 -0
- package/core/tokens/m3/mtx/_select.scss +72 -0
- package/core/tokens/m3/mtx/_split.scss +30 -0
- package/datetimepicker/_datetimepicker-theme.scss +3 -4
- package/datetimepicker/calendar-body.scss +2 -2
- package/datetimepicker/calendar.d.ts +1 -0
- package/datetimepicker/datetimepicker-content.scss +0 -2
- package/datetimepicker/datetimepicker.d.ts +4 -4
- package/drawer/_drawer-theme.scss +2 -3
- package/drawer/drawer-container.scss +1 -2
- package/esm2022/alert/alert-module.mjs +4 -4
- package/esm2022/alert/alert.mjs +3 -3
- package/esm2022/button/button-loading.mjs +3 -3
- package/esm2022/button/button-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group.mjs +3 -3
- package/esm2022/colorpicker/colorpicker-input.mjs +3 -3
- package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
- package/esm2022/colorpicker/colorpicker-toggle.mjs +6 -6
- package/esm2022/colorpicker/colorpicker.mjs +14 -12
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-module.mjs +4 -4
- package/esm2022/column-resize/column-resize-notifier.mjs +6 -6
- package/esm2022/column-resize/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-size-store.mjs +3 -3
- package/esm2022/column-resize/event-dispatcher.mjs +3 -3
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +9 -9
- package/esm2022/core/datetime/datetime.module.mjs +8 -8
- package/esm2022/core/datetime/native-datetime-adapter.mjs +3 -3
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +3 -3
- package/esm2022/core/pipes/pipes.module.mjs +4 -4
- package/esm2022/core/pipes/to-observable.pipe.mjs +3 -3
- package/esm2022/datetimepicker/calendar-body.mjs +3 -3
- package/esm2022/datetimepicker/calendar.mjs +9 -14
- package/esm2022/datetimepicker/clock.mjs +5 -5
- package/esm2022/datetimepicker/datetimepicker-input.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-module.mjs +4 -4
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +6 -6
- package/esm2022/datetimepicker/datetimepicker.mjs +15 -13
- package/esm2022/datetimepicker/month-view.mjs +3 -3
- package/esm2022/datetimepicker/multi-year-view.mjs +3 -3
- package/esm2022/datetimepicker/time.mjs +6 -6
- package/esm2022/datetimepicker/year-view.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-module.mjs +4 -4
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/drawer/drawer-container.mjs +5 -5
- package/esm2022/drawer/drawer-module.mjs +4 -4
- package/esm2022/drawer/drawer.mjs +3 -3
- package/esm2022/grid/cell.mjs +3 -3
- package/esm2022/grid/column-menu.mjs +5 -5
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -3
- package/esm2022/grid/column-resize/resize-strategy.mjs +3 -3
- package/esm2022/grid/expansion-toggle.mjs +3 -3
- package/esm2022/grid/grid-module.mjs +4 -4
- package/esm2022/grid/grid-pipes.mjs +21 -21
- package/esm2022/grid/grid-utils.mjs +3 -3
- package/esm2022/grid/grid.mjs +3 -3
- package/esm2022/grid/selectable-cell.mjs +3 -3
- package/esm2022/loader/loader-module.mjs +4 -4
- package/esm2022/loader/loader.mjs +3 -3
- package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
- package/esm2022/photoviewer/photoviewer.mjs +3 -3
- package/esm2022/popover/popover-content.mjs +6 -6
- package/esm2022/popover/popover-module.mjs +4 -4
- package/esm2022/popover/popover-target.mjs +3 -3
- package/esm2022/popover/popover-trigger.mjs +6 -8
- package/esm2022/popover/popover.mjs +6 -6
- package/esm2022/progress/progress-module.mjs +4 -4
- package/esm2022/progress/progress.mjs +3 -3
- package/esm2022/select/option.mjs +3 -3
- package/esm2022/select/select-module.mjs +4 -4
- package/esm2022/select/select.mjs +37 -23
- package/esm2022/select/templates.mjs +33 -33
- package/esm2022/split/split-module.mjs +4 -4
- package/esm2022/split/split-pane.mjs +37 -28
- package/esm2022/split/split.mjs +55 -49
- package/esm2022/split/utils.mjs +1 -4
- package/esm2022/tooltip/tooltip-module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +6 -6
- package/fesm2022/mtxAlert.mjs +7 -7
- package/fesm2022/mtxButton.mjs +7 -7
- package/fesm2022/mtxCheckboxGroup.mjs +7 -7
- package/fesm2022/mtxColorpicker.mjs +27 -25
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +40 -40
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +61 -63
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDrawer.mjs +13 -13
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +68 -68
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +24 -26
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +76 -62
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +92 -80
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +12 -12
- package/grid/_grid-theme.scss +3 -4
- package/grid/column-menu.scss +15 -9
- package/grid/grid.scss +2 -2
- package/loader/_loader-theme.scss +2 -3
- package/package.json +18 -18
- package/popover/_popover-theme.scss +2 -3
- package/popover/popover.d.ts +2 -2
- package/prebuilt-themes/azure-blue.css +1 -0
- package/prebuilt-themes/cyan-orange.css +1 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -0
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -0
- package/progress/_progress-theme.scss +3 -4
- package/select/_select-theme.scss +3 -4
- package/select/select.d.ts +17 -2
- package/select/select.scss +2 -4
- package/split/_split-theme.scss +2 -3
- package/split/split-pane.d.ts +29 -13
- package/split/split.d.ts +44 -20
- package/split/utils.d.ts +0 -1
- package/tooltip/_tooltip-theme.scss +4 -5
- package/core/style/_sass-utils.scss +0 -80
- package/experimental/_index.scss +0 -5
- package/experimental/theming/_m3-tokens.scss +0 -308
- /package/{experimental/theming → core/tokens}/_format-tokens.scss +0 -0
package/fesm2022/mtxDialog.mjs
CHANGED
|
@@ -21,10 +21,10 @@ class MtxDialogContainer {
|
|
|
21
21
|
_onClose() {
|
|
22
22
|
this.dialogRef.close();
|
|
23
23
|
}
|
|
24
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
24
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialogContainer, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", 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 }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialogContainer, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{ selector: 'mtx-dialog-container', exportAs: 'mtxDialogContainer', host: {
|
|
30
30
|
class: 'mtx-dialog-container',
|
|
@@ -105,30 +105,30 @@ class MtxDialog {
|
|
|
105
105
|
],
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
109
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
108
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialog, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
109
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialog, providedIn: 'root' }); }
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialog, decorators: [{
|
|
112
112
|
type: Injectable,
|
|
113
113
|
args: [{ providedIn: 'root' }]
|
|
114
114
|
}], ctorParameters: () => [{ type: i1.MatDialog }] });
|
|
115
115
|
|
|
116
116
|
class MtxDialogModule {
|
|
117
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
118
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
117
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
118
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MtxDialogModule, imports: [CommonModule,
|
|
119
119
|
MatDialogModule,
|
|
120
120
|
MatButtonModule,
|
|
121
121
|
MatIconModule,
|
|
122
122
|
MtxPipesModule,
|
|
123
123
|
MtxDialogContainer], exports: [MtxDialogContainer] }); }
|
|
124
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
124
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialogModule, providers: [MtxDialog], imports: [CommonModule,
|
|
125
125
|
MatDialogModule,
|
|
126
126
|
MatButtonModule,
|
|
127
127
|
MatIconModule,
|
|
128
128
|
MtxPipesModule,
|
|
129
129
|
MtxDialogContainer] }); }
|
|
130
130
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDialogModule, decorators: [{
|
|
132
132
|
type: NgModule,
|
|
133
133
|
args: [{
|
|
134
134
|
imports: [
|
package/fesm2022/mtxDrawer.mjs
CHANGED
|
@@ -11,9 +11,9 @@ import * as i2 from '@angular/cdk/layout';
|
|
|
11
11
|
import { Breakpoints } from '@angular/cdk/layout';
|
|
12
12
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
13
13
|
import { DOCUMENT } from '@angular/common';
|
|
14
|
-
import {
|
|
14
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
15
15
|
import * as i1 from '@angular/cdk/a11y';
|
|
16
|
-
import {
|
|
16
|
+
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
17
17
|
import { filter, take } from 'rxjs/operators';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -284,10 +284,10 @@ class MtxDrawerContainer extends BasePortalOutlet {
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
288
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
287
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawerContainer, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FocusTrapFactory }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: i2.BreakpointObserver }, { token: DOCUMENT, optional: true }, { token: MtxDrawerConfig }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
288
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: MtxDrawerContainer, isStandalone: true, selector: "mtx-drawer-container", host: { attributes: { "tabindex": "-1", "role": "dialog", "aria-modal": "true" }, listeners: { "@state.start": "_onAnimationStart($event)", "@state.done": "_onAnimationDone($event)" }, properties: { "class": "_drawerPosition", "attr.aria-label": "drawerConfig?.ariaLabel", "@state": "_animationState" }, classAttribute: "mtx-drawer-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;background-color:var(--mtx-drawer-container-background-color);color:var(--mtx-drawer-container-text-color);box-shadow:var(--mtx-drawer-container-elevation-shadow)}.cdk-high-contrast-active .mtx-drawer-container{outline:1px solid}.mtx-drawer-content-wrapper{box-sizing:border-box;padding:8px 16px;overflow:auto}.mtx-drawer-right{transform:translate(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-bottom-left-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-left{transform:translate(-100%);border-top-right-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-bottom{transform:translateY(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-top-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-top{transform:translateY(-100%);border-bottom-left-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [mtxDrawerAnimations.drawerState], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
289
289
|
}
|
|
290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawerContainer, decorators: [{
|
|
291
291
|
type: Component,
|
|
292
292
|
args: [{ selector: 'mtx-drawer-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [mtxDrawerAnimations.drawerState], host: {
|
|
293
293
|
'class': 'mtx-drawer-container',
|
|
@@ -299,7 +299,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
299
299
|
'[@state]': '_animationState',
|
|
300
300
|
'(@state.start)': '_onAnimationStart($event)',
|
|
301
301
|
'(@state.done)': '_onAnimationDone($event)',
|
|
302
|
-
}, standalone: true, imports: [CdkPortalOutlet], template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;
|
|
302
|
+
}, standalone: true, imports: [CdkPortalOutlet], template: "<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [".mtx-drawer-container{display:block;outline:0;background-color:var(--mtx-drawer-container-background-color);color:var(--mtx-drawer-container-text-color);box-shadow:var(--mtx-drawer-container-elevation-shadow)}.cdk-high-contrast-active .mtx-drawer-container{outline:1px solid}.mtx-drawer-content-wrapper{box-sizing:border-box;padding:8px 16px;overflow:auto}.mtx-drawer-right{transform:translate(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-bottom-left-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-left{transform:translate(-100%);border-top-right-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-bottom{transform:translateY(100%);border-top-left-radius:var(--mtx-drawer-container-shape);border-top-right-radius:var(--mtx-drawer-container-shape)}.mtx-drawer-top{transform:translateY(-100%);border-bottom-left-radius:var(--mtx-drawer-container-shape);border-bottom-right-radius:var(--mtx-drawer-container-shape)}\n"] }]
|
|
303
303
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FocusTrapFactory }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: i2.BreakpointObserver }, { type: undefined, decorators: [{
|
|
304
304
|
type: Optional
|
|
305
305
|
}, {
|
|
@@ -527,10 +527,10 @@ class MtxDrawer {
|
|
|
527
527
|
}
|
|
528
528
|
return Injector.create({ parent: userInjector || this._injector, providers });
|
|
529
529
|
}
|
|
530
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
531
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
530
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawer, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: MtxDrawer, optional: true, skipSelf: true }, { token: MTX_DRAWER_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
531
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawer, providedIn: 'root' }); }
|
|
532
532
|
}
|
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawer, decorators: [{
|
|
534
534
|
type: Injectable,
|
|
535
535
|
args: [{ providedIn: 'root' }]
|
|
536
536
|
}], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: MtxDrawer, decorators: [{
|
|
@@ -554,11 +554,11 @@ function _applyConfigDefaults(defaults, config) {
|
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
class MtxDrawerModule {
|
|
557
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
558
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
559
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
557
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
558
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawerModule, imports: [OverlayModule, PortalModule, MatCommonModule, MtxDrawerContainer], exports: [MtxDrawerContainer, MatCommonModule] }); }
|
|
559
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawerModule, providers: [MtxDrawer], imports: [OverlayModule, PortalModule, MatCommonModule, MatCommonModule] }); }
|
|
560
560
|
}
|
|
561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxDrawerModule, decorators: [{
|
|
562
562
|
type: NgModule,
|
|
563
563
|
args: [{
|
|
564
564
|
imports: [OverlayModule, PortalModule, MatCommonModule, MtxDrawerContainer],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxDrawer.mjs","sources":["../../../projects/extensions/drawer/drawer-config.ts","../../../projects/extensions/drawer/drawer-animation.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 /** 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 // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\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. If a number is provided, assumes pixel units. */\n width?: number | string;\n\n /** Height of the drawer. If a number is provided, assumes pixel units. */\n height?: number | 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 { FocusTrap, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { coerceArray, coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { mtxDrawerAnimations } from './drawer-animation';\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 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'drawerConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n standalone: true,\n imports: [CdkPortalOutlet],\n})\nexport class MtxDrawerContainer extends BasePortalOutlet implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\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 /** The class that traps and manages focus within the drawer. */\n private _focusTrap!: FocusTrap;\n\n /** Element that was focused before the drawer was opened. */\n private _elementFocusedBeforeOpened: HTMLElement | null = null;\n\n /** Server-side rendering-compatible reference to the global document object. */\n private _document: Document;\n\n /** Whether the component has been destroyed. */\n private _destroyed!: boolean;\n\n get _drawerPosition() {\n return `mtx-drawer-${this.drawerConfig.position}`;\n }\n\n get _drawerWidth() {\n return this.drawerConfig.position === 'left' || this.drawerConfig.position === 'right'\n ? coerceCssPixelValue(this.drawerConfig.width)\n : '100vw';\n }\n\n get _drawerHeight() {\n return this.drawerConfig.position === 'top' || this.drawerConfig.position === 'bottom'\n ? coerceCssPixelValue(this.drawerConfig.height)\n : '100vh';\n }\n\n _getDrawerSize() {\n return {\n width: this._drawerWidth,\n height: this._drawerHeight,\n minWidth: coerceCssPixelValue(this.drawerConfig.minWidth),\n minHeight: coerceCssPixelValue(this.drawerConfig.minHeight),\n maxWidth: coerceCssPixelValue(this.drawerConfig.maxWidth),\n maxHeight: coerceCssPixelValue(this.drawerConfig.maxHeight),\n };\n }\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n private readonly _interactivityChecker: InteractivityChecker,\n private readonly _ngZone: NgZone,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The drawer configuration. */\n public drawerConfig: MtxDrawerConfig\n ) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {});\n }\n\n /** Attach a component portal as content to this drawer container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this drawer container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /**\n * Attaches a DOM portal to the drawer container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachDomPortal(portal);\n };\n\n /** Begin animation of drawer entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the drawer exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else 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 private _toggleClass(cssClass: string, add: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, add);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach drawer content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n element.classList.add(...coerceArray(this.drawerConfig.panelClass || []));\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('blur', () => element.removeAttribute('tabindex'));\n element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const elementToFocus = this._elementRef.nativeElement.querySelector(\n selector\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',\n * if focus cannot be moved then focus will go to the drawer container.\n */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If were to attempt to focus immediately, then the content of the drawer would not\n // yet be ready in instances where change detection has to run first. To deal with this,\n // we simply wait for the microtask queue to be empty when setting focus when autoFocus\n // isn't set to drawer. If the element inside the drawer can't be focused,\n // then the container is focused so the user can't tab into other elements behind it.\n switch (this.drawerConfig.autoFocus) {\n case false:\n case 'dialog':\n // eslint-disable-next-line no-case-declarations\n const activeElement = _getFocusedElementPierceShadowDom();\n // Ensure that focus is on the drawer container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the drawer already, because it's possible that the\n // consumer specified `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady();\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.drawerConfig.autoFocus!);\n break;\n }\n }\n\n /** Restores focus to the element that was focused before the drawer was opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this.drawerConfig.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the drawer or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the drawer was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n this._ngZone.runOutsideAngular(() => {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n });\n }\n }\n}\n","<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { MtxDrawerContainer } from './drawer-container';\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 instance!: T;\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 /** 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(containerInstance: MtxDrawerContainer, private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.drawerConfig.disableClose;\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 _overlayRef.dispose();\n });\n\n _overlayRef\n .detachments()\n .pipe(take(1))\n .subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.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._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._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the drawer is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\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._overlayRef.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._overlayRef.keydownEvents();\n }\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Injectable,\n Injector,\n Optional,\n SkipSelf,\n TemplateRef,\n InjectionToken,\n Inject,\n OnDestroy,\n StaticProvider,\n InjectFlags,\n} from '@angular/core';\nimport { of as observableOf } from 'rxjs';\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/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({ providedIn: 'root' })\nexport class MtxDrawer implements OnDestroy {\n private _drawerRefAtThisLevel: MtxDrawerRef<any> | null = null;\n\n /** Reference to the currently opened drawer. */\n get _openedDrawerRef(): MtxDrawerRef<any> | null {\n const parent = this._parentDrawer;\n return parent ? parent._openedDrawerRef : this._drawerRefAtThisLevel;\n }\n\n set _openedDrawerRef(value: MtxDrawerRef<any> | null) {\n if (this._parentDrawer) {\n this._parentDrawer._openedDrawerRef = value;\n } else {\n this._drawerRefAtThisLevel = value;\n }\n }\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentDrawer: MtxDrawer,\n @Optional()\n @Inject(MTX_DRAWER_DEFAULT_OPTIONS)\n private _defaultOptions?: MtxDrawerConfig\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>(\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 const _config = _applyConfigDefaults(this._defaultOptions || new MtxDrawerConfig(), config);\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MtxDrawerRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n drawerRef: ref,\n } as any)\n );\n } else {\n const portal = new ComponentPortal(\n componentOrTemplateRef,\n undefined,\n this._createInjector(_config, ref)\n );\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\n }\n\n // When the drawer is dismissed, clear the reference to it.\n ref.afterDismissed().subscribe(() => {\n // Clear the drawer ref if it hasn't already been replaced by a newer one.\n if (this._openedDrawerRef == ref) {\n this._openedDrawerRef = null;\n }\n });\n\n if (this._openedDrawerRef) {\n // If a drawer is already in view, dismiss it and enter the\n // new drawer after exit animation is complete.\n this._openedDrawerRef.afterDismissed().subscribe(() => ref.containerInstance.enter());\n this._openedDrawerRef.dismiss();\n } else {\n // If no drawer is in view, enter the new drawer.\n ref.containerInstance.enter();\n }\n\n this._openedDrawerRef = ref;\n\n return ref;\n }\n\n /**\n * Dismisses the currently-visible drawer.\n * @param result Data to pass to the drawer instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedDrawerRef) {\n this._openedDrawerRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._drawerRefAtThisLevel) {\n this._drawerRefAtThisLevel.dismiss();\n }\n }\n\n /**\n * Attaches the drawer container component to the overlay.\n */\n private _attachContainer(overlayRef: OverlayRef, config: MtxDrawerConfig): MtxDrawerContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{ provide: MtxDrawerConfig, useValue: config }],\n });\n\n const containerPortal = new ComponentPortal(\n MtxDrawerContainer,\n config.viewContainerRef,\n injector\n );\n const containerRef: ComponentRef<MtxDrawerContainer> = overlayRef.attach(containerPortal);\n return containerRef.instance;\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified drawer config.\n */\n private _createOverlay(config: MtxDrawerConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n direction: config.direction,\n hasBackdrop: config.hasBackdrop,\n disposeOnNavigation: config.closeOnNavigation,\n maxWidth: '100%',\n scrollStrategy: config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global()[config.position!]('0'),\n });\n\n if (config.backdropClass) {\n overlayConfig.backdropClass = config.backdropClass;\n }\n\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an injector to be used inside of a drawer component.\n * @param config Config that was used to create the drawer.\n * @param drawerRef Reference to the drawer.\n */\n private _createInjector<T>(config: MtxDrawerConfig, drawerRef: MtxDrawerRef<T>): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n { provide: MtxDrawerRef, useValue: drawerRef },\n { provide: MTX_DRAWER_DATA, useValue: config.data },\n ];\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))\n ) {\n providers.push({\n provide: Directionality,\n useValue: { value: config.direction, change: observableOf() },\n });\n }\n\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n}\n\n/**\n * Applies default options to the drawer config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(\n defaults: MtxDrawerConfig,\n config?: MtxDrawerConfig\n): MtxDrawerConfig {\n return { ...defaults, ...config };\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\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: [OverlayModule, 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":["i3.MtxDrawerConfig","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;AAUA;;AAEG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;QAWE,IAAI,CAAA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eAAe,EAAA,SAAA,EAFf,CAAC,SAAS,CAAC,EAAA,OAAA,EAAA,CAFZ,aAAa,EAAE,YAAY,EAAE,eAAe,EACxB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGlC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,CAAC;AAC3E,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,eAAe,CAAC;oBAC9C,SAAS,EAAE,CAAC,SAAS,CAAC;AACvB,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mtxDrawer.mjs","sources":["../../../projects/extensions/drawer/drawer-config.ts","../../../projects/extensions/drawer/drawer-animation.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 /** 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 // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\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. If a number is provided, assumes pixel units. */\n width?: number | string;\n\n /** Height of the drawer. If a number is provided, assumes pixel units. */\n height?: number | 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 { FocusTrap, FocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { coerceArray, coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n ComponentPortal,\n DomPortal,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ComponentRef,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Inject,\n NgZone,\n OnDestroy,\n Optional,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { mtxDrawerAnimations } from './drawer-animation';\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 'role': 'dialog',\n 'aria-modal': 'true',\n '[attr.aria-label]': 'drawerConfig?.ariaLabel',\n '[@state]': '_animationState',\n '(@state.start)': '_onAnimationStart($event)',\n '(@state.done)': '_onAnimationDone($event)',\n },\n standalone: true,\n imports: [CdkPortalOutlet],\n})\nexport class MtxDrawerContainer extends BasePortalOutlet implements OnDestroy {\n private _breakpointSubscription: Subscription;\n\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 /** The class that traps and manages focus within the drawer. */\n private _focusTrap!: FocusTrap;\n\n /** Element that was focused before the drawer was opened. */\n private _elementFocusedBeforeOpened: HTMLElement | null = null;\n\n /** Server-side rendering-compatible reference to the global document object. */\n private _document: Document;\n\n /** Whether the component has been destroyed. */\n private _destroyed!: boolean;\n\n get _drawerPosition() {\n return `mtx-drawer-${this.drawerConfig.position}`;\n }\n\n get _drawerWidth() {\n return this.drawerConfig.position === 'left' || this.drawerConfig.position === 'right'\n ? coerceCssPixelValue(this.drawerConfig.width)\n : '100vw';\n }\n\n get _drawerHeight() {\n return this.drawerConfig.position === 'top' || this.drawerConfig.position === 'bottom'\n ? coerceCssPixelValue(this.drawerConfig.height)\n : '100vh';\n }\n\n _getDrawerSize() {\n return {\n width: this._drawerWidth,\n height: this._drawerHeight,\n minWidth: coerceCssPixelValue(this.drawerConfig.minWidth),\n minHeight: coerceCssPixelValue(this.drawerConfig.minHeight),\n maxWidth: coerceCssPixelValue(this.drawerConfig.maxWidth),\n maxHeight: coerceCssPixelValue(this.drawerConfig.maxHeight),\n };\n }\n\n constructor(\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusTrapFactory: FocusTrapFactory,\n private readonly _interactivityChecker: InteractivityChecker,\n private readonly _ngZone: NgZone,\n breakpointObserver: BreakpointObserver,\n @Optional() @Inject(DOCUMENT) document: any,\n /** The drawer configuration. */\n public drawerConfig: MtxDrawerConfig\n ) {\n super();\n\n this._document = document;\n this._breakpointSubscription = breakpointObserver\n .observe([Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])\n .subscribe(() => {});\n }\n\n /** Attach a component portal as content to this drawer container. */\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachComponentPortal(portal);\n }\n\n /** Attach a template portal as content to this drawer container. */\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachTemplatePortal(portal);\n }\n\n /**\n * Attaches a DOM portal to the drawer container.\n * @deprecated To be turned into a method.\n * @breaking-change 10.0.0\n */\n override attachDomPortal = (portal: DomPortal) => {\n this._validatePortalAttached();\n this._setPanelClass();\n this._savePreviouslyFocusedElement();\n return this._portalOutlet.attachDomPortal(portal);\n };\n\n /** Begin animation of drawer entrance into view. */\n enter(): void {\n if (!this._destroyed) {\n this._animationState = 'visible';\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /** Begin animation of the drawer exiting from view. */\n exit(): void {\n if (!this._destroyed) {\n this._animationState = 'hidden';\n this._changeDetectorRef.markForCheck();\n }\n }\n\n ngOnDestroy() {\n this._breakpointSubscription.unsubscribe();\n this._destroyed = true;\n }\n\n _onAnimationDone(event: AnimationEvent) {\n if (event.toState === 'hidden') {\n this._restoreFocus();\n } else 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 private _toggleClass(cssClass: string, add: boolean) {\n this._elementRef.nativeElement.classList.toggle(cssClass, add);\n }\n\n private _validatePortalAttached() {\n if (this._portalOutlet.hasAttached()) {\n throw Error('Attempting to attach drawer content after content is already attached');\n }\n }\n\n private _setPanelClass() {\n const element: HTMLElement = this._elementRef.nativeElement;\n element.classList.add(...coerceArray(this.drawerConfig.panelClass || []));\n }\n\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n private _forceFocus(element: HTMLElement, options?: FocusOptions) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('blur', () => element.removeAttribute('tabindex'));\n element.addEventListener('mousedown', () => element.removeAttribute('tabindex'));\n });\n }\n element.focus(options);\n }\n\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n private _focusByCssSelector(selector: string, options?: FocusOptions) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const elementToFocus = this._elementRef.nativeElement.querySelector(\n selector\n ) as HTMLElement | null;\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n\n /**\n * Moves the focus inside the focus trap. When autoFocus is not set to 'bottom-sheet',\n * if focus cannot be moved then focus will go to the drawer container.\n */\n private _trapFocus() {\n const element = this._elementRef.nativeElement;\n\n if (!this._focusTrap) {\n this._focusTrap = this._focusTrapFactory.create(element);\n }\n\n // If were to attempt to focus immediately, then the content of the drawer would not\n // yet be ready in instances where change detection has to run first. To deal with this,\n // we simply wait for the microtask queue to be empty when setting focus when autoFocus\n // isn't set to drawer. If the element inside the drawer can't be focused,\n // then the container is focused so the user can't tab into other elements behind it.\n switch (this.drawerConfig.autoFocus) {\n case false:\n case 'dialog':\n // eslint-disable-next-line no-case-declarations\n const activeElement = _getFocusedElementPierceShadowDom();\n // Ensure that focus is on the drawer container. It's possible that a different\n // component tried to move focus while the open animation was running. See:\n // https://github.com/angular/components/issues/16215. Note that we only want to do this\n // if the focus isn't inside the drawer already, because it's possible that the\n // consumer specified `autoFocus` in order to move focus themselves.\n if (activeElement !== element && !element.contains(activeElement)) {\n element.focus();\n }\n break;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady();\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.drawerConfig.autoFocus!);\n break;\n }\n }\n\n /** Restores focus to the element that was focused before the drawer was opened. */\n private _restoreFocus() {\n const toFocus = this._elementFocusedBeforeOpened;\n\n // We need the extra check, because IE can set the `activeElement` to null in some cases.\n if (this.drawerConfig.restoreFocus && toFocus && typeof toFocus.focus === 'function') {\n const activeElement = _getFocusedElementPierceShadowDom();\n const element = this._elementRef.nativeElement;\n\n // Make sure that focus is still inside the drawer or is on the body (usually because a\n // non-focusable element like the backdrop was clicked) before moving it. It's possible that\n // the consumer moved it themselves before the animation was done, in which case we shouldn't\n // do anything.\n if (\n !activeElement ||\n activeElement === this._document.body ||\n activeElement === element ||\n element.contains(activeElement)\n ) {\n toFocus.focus();\n }\n }\n\n if (this._focusTrap) {\n this._focusTrap.destroy();\n }\n }\n\n /** Saves a reference to the element that was focused before the drawer was opened. */\n private _savePreviouslyFocusedElement() {\n this._elementFocusedBeforeOpened = _getFocusedElementPierceShadowDom();\n\n // The `focus` method isn't available during server-side rendering.\n if (this._elementRef.nativeElement.focus) {\n this._ngZone.runOutsideAngular(() => {\n Promise.resolve().then(() => this._elementRef.nativeElement.focus());\n });\n }\n }\n}\n","<div class=\"mtx-drawer-content-wrapper\" [style]=\"_getDrawerSize()\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n","import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { merge, Observable, Subject } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { MtxDrawerContainer } from './drawer-container';\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 instance!: T;\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 /** 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(containerInstance: MtxDrawerContainer, private _overlayRef: OverlayRef) {\n this.containerInstance = containerInstance;\n this.disableClose = containerInstance.drawerConfig.disableClose;\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 _overlayRef.dispose();\n });\n\n _overlayRef\n .detachments()\n .pipe(take(1))\n .subscribe(() => {\n this._afterDismissed.next(this._result);\n this._afterDismissed.complete();\n });\n\n merge(\n _overlayRef.backdropClick(),\n _overlayRef.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._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._overlayRef.dispose();\n }, event.totalTime + 100);\n\n this._overlayRef.detachBackdrop();\n });\n\n this._result = result;\n this.containerInstance.exit();\n }\n }\n\n /** Gets an observable that is notified when the drawer is finished closing. */\n afterDismissed(): Observable<R | undefined> {\n return this._afterDismissed;\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._overlayRef.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._overlayRef.keydownEvents();\n }\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ComponentRef,\n Injectable,\n Injector,\n Optional,\n SkipSelf,\n TemplateRef,\n InjectionToken,\n Inject,\n OnDestroy,\n StaticProvider,\n InjectFlags,\n} from '@angular/core';\nimport { of as observableOf } from 'rxjs';\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/**\n * Service to trigger Material Design bottom sheets.\n */\n@Injectable({ providedIn: 'root' })\nexport class MtxDrawer implements OnDestroy {\n private _drawerRefAtThisLevel: MtxDrawerRef<any> | null = null;\n\n /** Reference to the currently opened drawer. */\n get _openedDrawerRef(): MtxDrawerRef<any> | null {\n const parent = this._parentDrawer;\n return parent ? parent._openedDrawerRef : this._drawerRefAtThisLevel;\n }\n\n set _openedDrawerRef(value: MtxDrawerRef<any> | null) {\n if (this._parentDrawer) {\n this._parentDrawer._openedDrawerRef = value;\n } else {\n this._drawerRefAtThisLevel = value;\n }\n }\n\n constructor(\n private _overlay: Overlay,\n private _injector: Injector,\n @Optional() @SkipSelf() private _parentDrawer: MtxDrawer,\n @Optional()\n @Inject(MTX_DRAWER_DEFAULT_OPTIONS)\n private _defaultOptions?: MtxDrawerConfig\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>(\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 const _config = _applyConfigDefaults(this._defaultOptions || new MtxDrawerConfig(), config);\n const overlayRef = this._createOverlay(_config);\n const container = this._attachContainer(overlayRef, _config);\n const ref = new MtxDrawerRef<T, R>(container, overlayRef);\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n container.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null!, {\n $implicit: _config.data,\n drawerRef: ref,\n } as any)\n );\n } else {\n const portal = new ComponentPortal(\n componentOrTemplateRef,\n undefined,\n this._createInjector(_config, ref)\n );\n const contentRef = container.attachComponentPortal(portal);\n ref.instance = contentRef.instance;\n }\n\n // When the drawer is dismissed, clear the reference to it.\n ref.afterDismissed().subscribe(() => {\n // Clear the drawer ref if it hasn't already been replaced by a newer one.\n if (this._openedDrawerRef == ref) {\n this._openedDrawerRef = null;\n }\n });\n\n if (this._openedDrawerRef) {\n // If a drawer is already in view, dismiss it and enter the\n // new drawer after exit animation is complete.\n this._openedDrawerRef.afterDismissed().subscribe(() => ref.containerInstance.enter());\n this._openedDrawerRef.dismiss();\n } else {\n // If no drawer is in view, enter the new drawer.\n ref.containerInstance.enter();\n }\n\n this._openedDrawerRef = ref;\n\n return ref;\n }\n\n /**\n * Dismisses the currently-visible drawer.\n * @param result Data to pass to the drawer instance.\n */\n dismiss<R = any>(result?: R): void {\n if (this._openedDrawerRef) {\n this._openedDrawerRef.dismiss(result);\n }\n }\n\n ngOnDestroy() {\n if (this._drawerRefAtThisLevel) {\n this._drawerRefAtThisLevel.dismiss();\n }\n }\n\n /**\n * Attaches the drawer container component to the overlay.\n */\n private _attachContainer(overlayRef: OverlayRef, config: MtxDrawerConfig): MtxDrawerContainer {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const injector = Injector.create({\n parent: userInjector || this._injector,\n providers: [{ provide: MtxDrawerConfig, useValue: config }],\n });\n\n const containerPortal = new ComponentPortal(\n MtxDrawerContainer,\n config.viewContainerRef,\n injector\n );\n const containerRef: ComponentRef<MtxDrawerContainer> = overlayRef.attach(containerPortal);\n return containerRef.instance;\n }\n\n /**\n * Creates a new overlay and places it in the correct location.\n * @param config The user-specified drawer config.\n */\n private _createOverlay(config: MtxDrawerConfig): OverlayRef {\n const overlayConfig = new OverlayConfig({\n direction: config.direction,\n hasBackdrop: config.hasBackdrop,\n disposeOnNavigation: config.closeOnNavigation,\n maxWidth: '100%',\n scrollStrategy: config.scrollStrategy || this._overlay.scrollStrategies.block(),\n positionStrategy: this._overlay.position().global()[config.position!]('0'),\n });\n\n if (config.backdropClass) {\n overlayConfig.backdropClass = config.backdropClass;\n }\n\n return this._overlay.create(overlayConfig);\n }\n\n /**\n * Creates an injector to be used inside of a drawer component.\n * @param config Config that was used to create the drawer.\n * @param drawerRef Reference to the drawer.\n */\n private _createInjector<T>(config: MtxDrawerConfig, drawerRef: MtxDrawerRef<T>): Injector {\n const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;\n const providers: StaticProvider[] = [\n { provide: MtxDrawerRef, useValue: drawerRef },\n { provide: MTX_DRAWER_DATA, useValue: config.data },\n ];\n\n if (\n config.direction &&\n (!userInjector ||\n !userInjector.get<Directionality | null>(Directionality, null, InjectFlags.Optional))\n ) {\n providers.push({\n provide: Directionality,\n useValue: { value: config.direction, change: observableOf() },\n });\n }\n\n return Injector.create({ parent: userInjector || this._injector, providers });\n }\n}\n\n/**\n * Applies default options to the drawer config.\n * @param defaults Object containing the default values to which to fall back.\n * @param config The configuration to which the defaults will be applied.\n * @returns The new configuration object with defaults applied.\n */\nfunction _applyConfigDefaults(\n defaults: MtxDrawerConfig,\n config?: MtxDrawerConfig\n): MtxDrawerConfig {\n return { ...defaults, ...config };\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\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: [OverlayModule, 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":["i3.MtxDrawerConfig","observableOf"],"mappings":";;;;;;;;;;;;;;;;;;AAUA;;AAEG;MACU,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;;QAWE,IAAI,CAAA,IAAA,GAAc,IAAI,CAAC;;QAGvB,IAAW,CAAA,WAAA,GAAa,IAAI,CAAC;;QAM7B,IAAY,CAAA,YAAA,GAAa,KAAK,CAAC;;QAG/B,IAAS,CAAA,SAAA,GAAmB,IAAI,CAAC;AAEjC;;;;AAIG;QACH,IAAiB,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