@angular/material 21.0.0-next.9 → 21.0.0-rc.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/core/tokens/_classes.scss +1 -1
- package/core/tokens/m2/_md-sys-color.scss +17 -17
- package/fesm2022/_animation-chunk.mjs +10 -16
- package/fesm2022/_animation-chunk.mjs.map +1 -1
- package/fesm2022/_date-formats-chunk.mjs +68 -164
- package/fesm2022/_date-formats-chunk.mjs.map +1 -1
- package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
- package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_error-options-chunk.mjs +56 -19
- package/fesm2022/_error-options-chunk.mjs.map +1 -1
- package/fesm2022/_error-state-chunk.mjs +24 -31
- package/fesm2022/_error-state-chunk.mjs.map +1 -1
- package/fesm2022/_form-field-chunk.mjs +1224 -1017
- package/fesm2022/_form-field-chunk.mjs.map +1 -1
- package/fesm2022/_icon-button-chunk.mjs +243 -187
- package/fesm2022/_icon-button-chunk.mjs.map +1 -1
- package/fesm2022/_icon-registry-chunk.mjs +350 -575
- package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
- package/fesm2022/_input-harness-chunk.mjs +56 -107
- package/fesm2022/_input-harness-chunk.mjs.map +1 -1
- package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
- package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
- package/fesm2022/_internal-form-field-chunk.mjs +59 -19
- package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
- package/fesm2022/_line-chunk.mjs +83 -43
- package/fesm2022/_line-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs +348 -311
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_option-harness-chunk.mjs +23 -39
- package/fesm2022/_option-harness-chunk.mjs.map +1 -1
- package/fesm2022/_option-module-chunk.mjs +36 -10
- package/fesm2022/_option-module-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
- package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
- package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
- package/fesm2022/_public-api-chunk.mjs +71 -134
- package/fesm2022/_public-api-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-chunk.mjs +504 -600
- package/fesm2022/_ripple-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-loader-chunk.mjs +120 -138
- package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
- package/fesm2022/_ripple-module-chunk.mjs +36 -10
- package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
- package/fesm2022/_structural-styles-chunk.mjs +37 -10
- package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
- package/fesm2022/_tooltip-chunk.mjs +811 -888
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/autocomplete-testing.mjs +62 -86
- package/fesm2022/autocomplete-testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +965 -1126
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge-testing.mjs +38 -54
- package/fesm2022/badge-testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +321 -272
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet-testing.mjs +10 -24
- package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +349 -344
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-testing.mjs +60 -94
- package/fesm2022/button-testing.mjs.map +1 -1
- package/fesm2022/button-toggle-testing.mjs +76 -125
- package/fesm2022/button-toggle-testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +752 -662
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +263 -158
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card-testing.mjs +19 -33
- package/fesm2022/card-testing.mjs.map +1 -1
- package/fesm2022/card.mjs +576 -272
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox-testing.mjs +71 -123
- package/fesm2022/checkbox-testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +515 -477
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips-testing.mjs +201 -344
- package/fesm2022/chips-testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +2552 -2289
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core-testing.mjs +14 -28
- package/fesm2022/core-testing.mjs.map +1 -1
- package/fesm2022/core.mjs +357 -328
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker-testing.mjs +15 -25
- package/fesm2022/datepicker-testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +4826 -4563
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog-testing.mjs +93 -129
- package/fesm2022/dialog-testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +810 -829
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider-testing.mjs +10 -11
- package/fesm2022/divider-testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +119 -43
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion-testing.mjs +74 -130
- package/fesm2022/expansion-testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +703 -515
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field-testing-control.mjs +16 -33
- package/fesm2022/form-field-testing-control.mjs.map +1 -1
- package/fesm2022/form-field-testing.mjs +118 -179
- package/fesm2022/form-field-testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +36 -10
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list-testing.mjs +65 -113
- package/fesm2022/grid-list-testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +559 -494
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon-testing.mjs +148 -127
- package/fesm2022/icon-testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +325 -351
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input-testing.mjs +59 -99
- package/fesm2022/input-testing.mjs.map +1 -1
- package/fesm2022/input.mjs +457 -520
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list-testing.mjs +251 -434
- package/fesm2022/list-testing.mjs.map +1 -1
- package/fesm2022/list.mjs +1522 -1204
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs +0 -5
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +159 -228
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +1338 -1343
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator-testing.mjs +55 -79
- package/fesm2022/paginator-testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +381 -309
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar-testing.mjs +12 -21
- package/fesm2022/progress-bar-testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +224 -169
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner-testing.mjs +13 -23
- package/fesm2022/progress-spinner-testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +235 -160
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio-testing.mjs +133 -208
- package/fesm2022/radio-testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +712 -679
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select-testing.mjs +83 -117
- package/fesm2022/select-testing.mjs.map +1 -1
- package/fesm2022/select.mjs +1116 -1246
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav-testing.mjs +54 -120
- package/fesm2022/sidenav-testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +1078 -995
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle-testing.mjs +57 -92
- package/fesm2022/slide-toggle-testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +369 -279
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider-testing.mjs +90 -138
- package/fesm2022/slider-testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +1651 -1716
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar-testing.mjs +40 -87
- package/fesm2022/snack-bar-testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +763 -714
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort-testing.mjs +45 -66
- package/fesm2022/sort-testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +419 -344
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper-testing.mjs +78 -154
- package/fesm2022/stepper-testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +790 -498
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table-testing.mjs +120 -213
- package/fesm2022/table-testing.mjs.map +1 -1
- package/fesm2022/table.mjs +1026 -684
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs +125 -197
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2351 -2028
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker-testing.mjs +113 -172
- package/fesm2022/timepicker-testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +1019 -826
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +16 -27
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +163 -78
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip-testing.mjs +41 -52
- package/fesm2022/tooltip-testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +36 -10
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +86 -162
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +638 -466
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/types/expansion.d.ts +4 -2
- package/types/menu-testing.d.ts +2 -0
- package/types/select.d.ts +1 -1
- package/types/timepicker.d.ts +1 -0
package/fesm2022/sidenav.mjs
CHANGED
|
@@ -11,1056 +11,1139 @@ import { filter, map, mapTo, takeUntil, take, startWith, debounceTime } from 'rx
|
|
|
11
11
|
import { _animationsDisabled } from './_animation-chunk.mjs';
|
|
12
12
|
import '@angular/cdk/layout';
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* Throws an exception when two MatDrawer are matching the same position.
|
|
16
|
-
* @docs-private
|
|
17
|
-
*/
|
|
18
14
|
function throwMatDuplicatedDrawerError(position) {
|
|
19
|
-
|
|
15
|
+
throw Error(`A drawer was already declared for 'position="${position}"'`);
|
|
20
16
|
}
|
|
21
|
-
/** Configures whether drawers should use auto sizing by default. */
|
|
22
17
|
const MAT_DRAWER_DEFAULT_AUTOSIZE = new InjectionToken('MAT_DRAWER_DEFAULT_AUTOSIZE', {
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
providedIn: 'root',
|
|
19
|
+
factory: () => false
|
|
25
20
|
});
|
|
26
|
-
/**
|
|
27
|
-
* Used to provide a drawer container to a drawer while avoiding circular references.
|
|
28
|
-
* @docs-private
|
|
29
|
-
*/
|
|
30
21
|
const MAT_DRAWER_CONTAINER = new InjectionToken('MAT_DRAWER_CONTAINER');
|
|
31
22
|
class MatDrawerContent extends CdkScrollable {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
_platform = inject(Platform);
|
|
24
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
25
|
+
_container = inject(MatDrawerContainer);
|
|
26
|
+
constructor() {
|
|
27
|
+
const elementRef = inject(ElementRef);
|
|
28
|
+
const scrollDispatcher = inject(ScrollDispatcher);
|
|
29
|
+
const ngZone = inject(NgZone);
|
|
30
|
+
super(elementRef, scrollDispatcher, ngZone);
|
|
31
|
+
}
|
|
32
|
+
ngAfterContentInit() {
|
|
33
|
+
this._container._contentMarginChanges.subscribe(() => {
|
|
34
|
+
this._changeDetectorRef.markForCheck();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
_shouldBeHidden() {
|
|
38
|
+
if (this._platform.isBrowser) {
|
|
39
|
+
return false;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
41
|
+
const {
|
|
42
|
+
start,
|
|
43
|
+
end
|
|
44
|
+
} = this._container;
|
|
45
|
+
return start != null && start.mode !== 'over' && start.opened || end != null && end.mode !== 'over' && end.opened;
|
|
46
|
+
}
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
48
|
+
minVersion: "12.0.0",
|
|
49
|
+
version: "20.2.0-next.2",
|
|
50
|
+
ngImport: i0,
|
|
51
|
+
type: MatDrawerContent,
|
|
52
|
+
deps: [],
|
|
53
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
54
|
+
});
|
|
55
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
56
|
+
minVersion: "14.0.0",
|
|
57
|
+
version: "20.2.0-next.2",
|
|
58
|
+
type: MatDrawerContent,
|
|
59
|
+
isStandalone: true,
|
|
60
|
+
selector: "mat-drawer-content",
|
|
61
|
+
host: {
|
|
62
|
+
properties: {
|
|
63
|
+
"style.margin-left.px": "_container._contentMargins.left",
|
|
64
|
+
"style.margin-right.px": "_container._contentMargins.right",
|
|
65
|
+
"class.mat-drawer-content-hidden": "_shouldBeHidden()"
|
|
66
|
+
},
|
|
67
|
+
classAttribute: "mat-drawer-content"
|
|
68
|
+
},
|
|
69
|
+
providers: [{
|
|
70
|
+
provide: CdkScrollable,
|
|
71
|
+
useExisting: MatDrawerContent
|
|
72
|
+
}],
|
|
73
|
+
usesInheritance: true,
|
|
74
|
+
ngImport: i0,
|
|
75
|
+
template: '<ng-content></ng-content>',
|
|
76
|
+
isInline: true,
|
|
77
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
78
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
79
|
+
});
|
|
67
80
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
82
|
+
minVersion: "12.0.0",
|
|
83
|
+
version: "20.2.0-next.2",
|
|
84
|
+
ngImport: i0,
|
|
85
|
+
type: MatDrawerContent,
|
|
86
|
+
decorators: [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{
|
|
89
|
+
selector: 'mat-drawer-content',
|
|
90
|
+
template: '<ng-content></ng-content>',
|
|
91
|
+
host: {
|
|
92
|
+
'class': 'mat-drawer-content',
|
|
93
|
+
'[style.margin-left.px]': '_container._contentMargins.left',
|
|
94
|
+
'[style.margin-right.px]': '_container._contentMargins.right',
|
|
95
|
+
'[class.mat-drawer-content-hidden]': '_shouldBeHidden()'
|
|
96
|
+
},
|
|
97
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
98
|
+
encapsulation: ViewEncapsulation.None,
|
|
99
|
+
providers: [{
|
|
100
|
+
provide: CdkScrollable,
|
|
101
|
+
useExisting: MatDrawerContent
|
|
102
|
+
}]
|
|
103
|
+
}]
|
|
104
|
+
}],
|
|
105
|
+
ctorParameters: () => []
|
|
106
|
+
});
|
|
92
107
|
class MatDrawer {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
_elementRef = inject(ElementRef);
|
|
109
|
+
_focusTrapFactory = inject(FocusTrapFactory);
|
|
110
|
+
_focusMonitor = inject(FocusMonitor);
|
|
111
|
+
_platform = inject(Platform);
|
|
112
|
+
_ngZone = inject(NgZone);
|
|
113
|
+
_renderer = inject(Renderer2);
|
|
114
|
+
_interactivityChecker = inject(InteractivityChecker);
|
|
115
|
+
_doc = inject(DOCUMENT);
|
|
116
|
+
_container = inject(MAT_DRAWER_CONTAINER, {
|
|
117
|
+
optional: true
|
|
118
|
+
});
|
|
119
|
+
_focusTrap = null;
|
|
120
|
+
_elementFocusedBeforeDrawerWasOpened = null;
|
|
121
|
+
_eventCleanups;
|
|
122
|
+
_isAttached;
|
|
123
|
+
_anchor;
|
|
124
|
+
get position() {
|
|
125
|
+
return this._position;
|
|
126
|
+
}
|
|
127
|
+
set position(value) {
|
|
128
|
+
value = value === 'end' ? 'end' : 'start';
|
|
129
|
+
if (value !== this._position) {
|
|
130
|
+
if (this._isAttached) {
|
|
131
|
+
this._updatePositionInParent(value);
|
|
132
|
+
}
|
|
133
|
+
this._position = value;
|
|
134
|
+
this.onPositionChanged.emit();
|
|
112
135
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
136
|
+
}
|
|
137
|
+
_position = 'start';
|
|
138
|
+
get mode() {
|
|
139
|
+
return this._mode;
|
|
140
|
+
}
|
|
141
|
+
set mode(value) {
|
|
142
|
+
this._mode = value;
|
|
143
|
+
this._updateFocusTrapState();
|
|
144
|
+
this._modeChanged.next();
|
|
145
|
+
}
|
|
146
|
+
_mode = 'over';
|
|
147
|
+
get disableClose() {
|
|
148
|
+
return this._disableClose;
|
|
149
|
+
}
|
|
150
|
+
set disableClose(value) {
|
|
151
|
+
this._disableClose = coerceBooleanProperty(value);
|
|
152
|
+
}
|
|
153
|
+
_disableClose = false;
|
|
154
|
+
get autoFocus() {
|
|
155
|
+
const value = this._autoFocus;
|
|
156
|
+
if (value == null) {
|
|
157
|
+
if (this.mode === 'side') {
|
|
158
|
+
return 'dialog';
|
|
159
|
+
} else {
|
|
160
|
+
return 'first-tabbable';
|
|
161
|
+
}
|
|
124
162
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
163
|
+
return value;
|
|
164
|
+
}
|
|
165
|
+
set autoFocus(value) {
|
|
166
|
+
if (value === 'true' || value === 'false' || value == null) {
|
|
167
|
+
value = coerceBooleanProperty(value);
|
|
129
168
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
169
|
+
this._autoFocus = value;
|
|
170
|
+
}
|
|
171
|
+
_autoFocus;
|
|
172
|
+
get opened() {
|
|
173
|
+
return this._opened();
|
|
174
|
+
}
|
|
175
|
+
set opened(value) {
|
|
176
|
+
this.toggle(coerceBooleanProperty(value));
|
|
177
|
+
}
|
|
178
|
+
_opened = signal(false, ...(ngDevMode ? [{
|
|
179
|
+
debugName: "_opened"
|
|
180
|
+
}] : []));
|
|
181
|
+
_openedVia;
|
|
182
|
+
_animationStarted = new Subject();
|
|
183
|
+
_animationEnd = new Subject();
|
|
184
|
+
openedChange = new EventEmitter(true);
|
|
185
|
+
_openedStream = this.openedChange.pipe(filter(o => o), map(() => {}));
|
|
186
|
+
openedStart = this._animationStarted.pipe(filter(() => this.opened), mapTo(undefined));
|
|
187
|
+
_closedStream = this.openedChange.pipe(filter(o => !o), map(() => {}));
|
|
188
|
+
closedStart = this._animationStarted.pipe(filter(() => !this.opened), mapTo(undefined));
|
|
189
|
+
_destroyed = new Subject();
|
|
190
|
+
onPositionChanged = new EventEmitter();
|
|
191
|
+
_content;
|
|
192
|
+
_modeChanged = new Subject();
|
|
193
|
+
_injector = inject(Injector);
|
|
194
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
195
|
+
constructor() {
|
|
196
|
+
this.openedChange.pipe(takeUntil(this._destroyed)).subscribe(opened => {
|
|
197
|
+
if (opened) {
|
|
198
|
+
this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;
|
|
199
|
+
this._takeFocus();
|
|
200
|
+
} else if (this._isFocusWithinDrawer()) {
|
|
201
|
+
this._restoreFocus(this._openedVia || 'program');
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
this._ngZone.runOutsideAngular(() => {
|
|
205
|
+
const element = this._elementRef.nativeElement;
|
|
206
|
+
fromEvent(element, 'keydown').pipe(filter(event => {
|
|
207
|
+
return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
|
|
208
|
+
}), takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {
|
|
209
|
+
this.close();
|
|
210
|
+
event.stopPropagation();
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
}));
|
|
213
|
+
this._eventCleanups = [this._renderer.listen(element, 'transitionrun', this._handleTransitionEvent), this._renderer.listen(element, 'transitionend', this._handleTransitionEvent), this._renderer.listen(element, 'transitioncancel', this._handleTransitionEvent)];
|
|
214
|
+
});
|
|
215
|
+
this._animationEnd.subscribe(() => {
|
|
216
|
+
this.openedChange.emit(this.opened);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
_forceFocus(element, options) {
|
|
220
|
+
if (!this._interactivityChecker.isFocusable(element)) {
|
|
221
|
+
element.tabIndex = -1;
|
|
222
|
+
this._ngZone.runOutsideAngular(() => {
|
|
223
|
+
const callback = () => {
|
|
224
|
+
cleanupBlur();
|
|
225
|
+
cleanupMousedown();
|
|
226
|
+
element.removeAttribute('tabindex');
|
|
227
|
+
};
|
|
228
|
+
const cleanupBlur = this._renderer.listen(element, 'blur', callback);
|
|
229
|
+
const cleanupMousedown = this._renderer.listen(element, 'mousedown', callback);
|
|
230
|
+
});
|
|
134
231
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
this._disableClose = coerceBooleanProperty(value);
|
|
142
|
-
}
|
|
143
|
-
_disableClose = false;
|
|
144
|
-
/**
|
|
145
|
-
* Whether the drawer should focus the first focusable element automatically when opened.
|
|
146
|
-
* Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly
|
|
147
|
-
* enabled, focus will be moved into the sidenav in `side` mode as well.
|
|
148
|
-
* @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or AutoFocusTarget
|
|
149
|
-
* instead.
|
|
150
|
-
*/
|
|
151
|
-
get autoFocus() {
|
|
152
|
-
const value = this._autoFocus;
|
|
153
|
-
// Note that usually we don't allow autoFocus to be set to `first-tabbable` in `side` mode,
|
|
154
|
-
// because we don't know how the sidenav is being used, but in some cases it still makes
|
|
155
|
-
// sense to do it. The consumer can explicitly set `autoFocus`.
|
|
156
|
-
if (value == null) {
|
|
157
|
-
if (this.mode === 'side') {
|
|
158
|
-
return 'dialog';
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
return 'first-tabbable';
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
return value;
|
|
165
|
-
}
|
|
166
|
-
set autoFocus(value) {
|
|
167
|
-
if (value === 'true' || value === 'false' || value == null) {
|
|
168
|
-
value = coerceBooleanProperty(value);
|
|
169
|
-
}
|
|
170
|
-
this._autoFocus = value;
|
|
232
|
+
element.focus(options);
|
|
233
|
+
}
|
|
234
|
+
_focusByCssSelector(selector, options) {
|
|
235
|
+
let elementToFocus = this._elementRef.nativeElement.querySelector(selector);
|
|
236
|
+
if (elementToFocus) {
|
|
237
|
+
this._forceFocus(elementToFocus, options);
|
|
171
238
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*/
|
|
177
|
-
get opened() {
|
|
178
|
-
return this._opened();
|
|
239
|
+
}
|
|
240
|
+
_takeFocus() {
|
|
241
|
+
if (!this._focusTrap) {
|
|
242
|
+
return;
|
|
179
243
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/** Event emitted when the drawer has been opened. */
|
|
195
|
-
_openedStream = this.openedChange.pipe(filter(o => o), map(() => { }));
|
|
196
|
-
/** Event emitted when the drawer has started opening. */
|
|
197
|
-
openedStart = this._animationStarted.pipe(filter(() => this.opened), mapTo(undefined));
|
|
198
|
-
/** Event emitted when the drawer has been closed. */
|
|
199
|
-
_closedStream = this.openedChange.pipe(filter(o => !o), map(() => { }));
|
|
200
|
-
/** Event emitted when the drawer has started closing. */
|
|
201
|
-
closedStart = this._animationStarted.pipe(filter(() => !this.opened), mapTo(undefined));
|
|
202
|
-
/** Emits when the component is destroyed. */
|
|
203
|
-
_destroyed = new Subject();
|
|
204
|
-
/** Event emitted when the drawer's position changes. */
|
|
205
|
-
// tslint:disable-next-line:no-output-on-prefix
|
|
206
|
-
onPositionChanged = new EventEmitter();
|
|
207
|
-
/** Reference to the inner element that contains all the content. */
|
|
208
|
-
_content;
|
|
209
|
-
/**
|
|
210
|
-
* An observable that emits when the drawer mode changes. This is used by the drawer container to
|
|
211
|
-
* to know when to when the mode changes so it can adapt the margins on the content.
|
|
212
|
-
*/
|
|
213
|
-
_modeChanged = new Subject();
|
|
214
|
-
_injector = inject(Injector);
|
|
215
|
-
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
216
|
-
constructor() {
|
|
217
|
-
this.openedChange.pipe(takeUntil(this._destroyed)).subscribe((opened) => {
|
|
218
|
-
if (opened) {
|
|
219
|
-
this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;
|
|
220
|
-
this._takeFocus();
|
|
221
|
-
}
|
|
222
|
-
else if (this._isFocusWithinDrawer()) {
|
|
223
|
-
this._restoreFocus(this._openedVia || 'program');
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
/**
|
|
227
|
-
* Listen to `keydown` events outside the zone so that change detection is not run every
|
|
228
|
-
* time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed
|
|
229
|
-
* and we don't have close disabled.
|
|
230
|
-
*/
|
|
231
|
-
this._ngZone.runOutsideAngular(() => {
|
|
232
|
-
const element = this._elementRef.nativeElement;
|
|
233
|
-
fromEvent(element, 'keydown')
|
|
234
|
-
.pipe(filter(event => {
|
|
235
|
-
return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
|
|
236
|
-
}), takeUntil(this._destroyed))
|
|
237
|
-
.subscribe(event => this._ngZone.run(() => {
|
|
238
|
-
this.close();
|
|
239
|
-
event.stopPropagation();
|
|
240
|
-
event.preventDefault();
|
|
241
|
-
}));
|
|
242
|
-
this._eventCleanups = [
|
|
243
|
-
this._renderer.listen(element, 'transitionrun', this._handleTransitionEvent),
|
|
244
|
-
this._renderer.listen(element, 'transitionend', this._handleTransitionEvent),
|
|
245
|
-
this._renderer.listen(element, 'transitioncancel', this._handleTransitionEvent),
|
|
246
|
-
];
|
|
247
|
-
});
|
|
248
|
-
this._animationEnd.subscribe(() => {
|
|
249
|
-
this.openedChange.emit(this.opened);
|
|
244
|
+
const element = this._elementRef.nativeElement;
|
|
245
|
+
switch (this.autoFocus) {
|
|
246
|
+
case false:
|
|
247
|
+
case 'dialog':
|
|
248
|
+
return;
|
|
249
|
+
case true:
|
|
250
|
+
case 'first-tabbable':
|
|
251
|
+
afterNextRender(() => {
|
|
252
|
+
const hasMovedFocus = this._focusTrap.focusInitialElement();
|
|
253
|
+
if (!hasMovedFocus && typeof element.focus === 'function') {
|
|
254
|
+
element.focus();
|
|
255
|
+
}
|
|
256
|
+
}, {
|
|
257
|
+
injector: this._injector
|
|
250
258
|
});
|
|
259
|
+
break;
|
|
260
|
+
case 'first-heading':
|
|
261
|
+
this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');
|
|
262
|
+
break;
|
|
263
|
+
default:
|
|
264
|
+
this._focusByCssSelector(this.autoFocus);
|
|
265
|
+
break;
|
|
251
266
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
*/
|
|
257
|
-
_forceFocus(element, options) {
|
|
258
|
-
if (!this._interactivityChecker.isFocusable(element)) {
|
|
259
|
-
element.tabIndex = -1;
|
|
260
|
-
// The tabindex attribute should be removed to avoid navigating to that element again
|
|
261
|
-
this._ngZone.runOutsideAngular(() => {
|
|
262
|
-
const callback = () => {
|
|
263
|
-
cleanupBlur();
|
|
264
|
-
cleanupMousedown();
|
|
265
|
-
element.removeAttribute('tabindex');
|
|
266
|
-
};
|
|
267
|
-
const cleanupBlur = this._renderer.listen(element, 'blur', callback);
|
|
268
|
-
const cleanupMousedown = this._renderer.listen(element, 'mousedown', callback);
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
element.focus(options);
|
|
267
|
+
}
|
|
268
|
+
_restoreFocus(focusOrigin) {
|
|
269
|
+
if (this.autoFocus === 'dialog') {
|
|
270
|
+
return;
|
|
272
271
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
_focusByCssSelector(selector, options) {
|
|
278
|
-
let elementToFocus = this._elementRef.nativeElement.querySelector(selector);
|
|
279
|
-
if (elementToFocus) {
|
|
280
|
-
this._forceFocus(elementToFocus, options);
|
|
281
|
-
}
|
|
272
|
+
if (this._elementFocusedBeforeDrawerWasOpened) {
|
|
273
|
+
this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, focusOrigin);
|
|
274
|
+
} else {
|
|
275
|
+
this._elementRef.nativeElement.blur();
|
|
282
276
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
// not exist, focus the sidenav itself so the keyboard navigation still works.
|
|
294
|
-
// We need to check that `focus` is a function due to Universal.
|
|
295
|
-
switch (this.autoFocus) {
|
|
296
|
-
case false:
|
|
297
|
-
case 'dialog':
|
|
298
|
-
return;
|
|
299
|
-
case true:
|
|
300
|
-
case 'first-tabbable':
|
|
301
|
-
afterNextRender(() => {
|
|
302
|
-
const hasMovedFocus = this._focusTrap.focusInitialElement();
|
|
303
|
-
if (!hasMovedFocus && typeof element.focus === 'function') {
|
|
304
|
-
element.focus();
|
|
305
|
-
}
|
|
306
|
-
}, { injector: this._injector });
|
|
307
|
-
break;
|
|
308
|
-
case 'first-heading':
|
|
309
|
-
this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');
|
|
310
|
-
break;
|
|
311
|
-
default:
|
|
312
|
-
this._focusByCssSelector(this.autoFocus);
|
|
313
|
-
break;
|
|
314
|
-
}
|
|
277
|
+
this._elementFocusedBeforeDrawerWasOpened = null;
|
|
278
|
+
}
|
|
279
|
+
_isFocusWithinDrawer() {
|
|
280
|
+
const activeEl = this._doc.activeElement;
|
|
281
|
+
return !!activeEl && this._elementRef.nativeElement.contains(activeEl);
|
|
282
|
+
}
|
|
283
|
+
ngAfterViewInit() {
|
|
284
|
+
this._isAttached = true;
|
|
285
|
+
if (this._position === 'end') {
|
|
286
|
+
this._updatePositionInParent('end');
|
|
315
287
|
}
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
*/
|
|
320
|
-
_restoreFocus(focusOrigin) {
|
|
321
|
-
if (this.autoFocus === 'dialog') {
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
if (this._elementFocusedBeforeDrawerWasOpened) {
|
|
325
|
-
this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, focusOrigin);
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
this._elementRef.nativeElement.blur();
|
|
329
|
-
}
|
|
330
|
-
this._elementFocusedBeforeDrawerWasOpened = null;
|
|
288
|
+
if (this._platform.isBrowser) {
|
|
289
|
+
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
|
290
|
+
this._updateFocusTrapState();
|
|
331
291
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
292
|
+
}
|
|
293
|
+
ngOnDestroy() {
|
|
294
|
+
this._eventCleanups.forEach(cleanup => cleanup());
|
|
295
|
+
this._focusTrap?.destroy();
|
|
296
|
+
this._anchor?.remove();
|
|
297
|
+
this._anchor = null;
|
|
298
|
+
this._animationStarted.complete();
|
|
299
|
+
this._animationEnd.complete();
|
|
300
|
+
this._modeChanged.complete();
|
|
301
|
+
this._destroyed.next();
|
|
302
|
+
this._destroyed.complete();
|
|
303
|
+
}
|
|
304
|
+
open(openedVia) {
|
|
305
|
+
return this.toggle(true, openedVia);
|
|
306
|
+
}
|
|
307
|
+
close() {
|
|
308
|
+
return this.toggle(false);
|
|
309
|
+
}
|
|
310
|
+
_closeViaBackdropClick() {
|
|
311
|
+
return this._setOpen(false, true, 'mouse');
|
|
312
|
+
}
|
|
313
|
+
toggle(isOpen = !this.opened, openedVia) {
|
|
314
|
+
if (isOpen && openedVia) {
|
|
315
|
+
this._openedVia = openedVia;
|
|
336
316
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
// the end since we project the sidenav before the content by default.
|
|
341
|
-
if (this._position === 'end') {
|
|
342
|
-
this._updatePositionInParent('end');
|
|
343
|
-
}
|
|
344
|
-
// Needs to happen after the position is updated
|
|
345
|
-
// so the focus trap anchors are in the right place.
|
|
346
|
-
if (this._platform.isBrowser) {
|
|
347
|
-
this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
|
|
348
|
-
this._updateFocusTrapState();
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
ngOnDestroy() {
|
|
352
|
-
this._eventCleanups.forEach(cleanup => cleanup());
|
|
353
|
-
this._focusTrap?.destroy();
|
|
354
|
-
this._anchor?.remove();
|
|
355
|
-
this._anchor = null;
|
|
356
|
-
this._animationStarted.complete();
|
|
357
|
-
this._animationEnd.complete();
|
|
358
|
-
this._modeChanged.complete();
|
|
359
|
-
this._destroyed.next();
|
|
360
|
-
this._destroyed.complete();
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Open the drawer.
|
|
364
|
-
* @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.
|
|
365
|
-
* Used for focus management after the sidenav is closed.
|
|
366
|
-
*/
|
|
367
|
-
open(openedVia) {
|
|
368
|
-
return this.toggle(true, openedVia);
|
|
369
|
-
}
|
|
370
|
-
/** Close the drawer. */
|
|
371
|
-
close() {
|
|
372
|
-
return this.toggle(false);
|
|
317
|
+
const result = this._setOpen(isOpen, !isOpen && this._isFocusWithinDrawer(), this._openedVia || 'program');
|
|
318
|
+
if (!isOpen) {
|
|
319
|
+
this._openedVia = null;
|
|
373
320
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
return this._setOpen(/* isOpen */ false, /* restoreFocus */ true, 'mouse');
|
|
321
|
+
return result;
|
|
322
|
+
}
|
|
323
|
+
_setOpen(isOpen, restoreFocus, focusOrigin) {
|
|
324
|
+
if (isOpen === this.opened) {
|
|
325
|
+
return Promise.resolve(isOpen ? 'open' : 'close');
|
|
380
326
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
// restore the focus to the initially focused element (when the drawer opened).
|
|
390
|
-
if (isOpen && openedVia) {
|
|
391
|
-
this._openedVia = openedVia;
|
|
392
|
-
}
|
|
393
|
-
const result = this._setOpen(isOpen,
|
|
394
|
-
/* restoreFocus */ !isOpen && this._isFocusWithinDrawer(), this._openedVia || 'program');
|
|
395
|
-
if (!isOpen) {
|
|
396
|
-
this._openedVia = null;
|
|
397
|
-
}
|
|
398
|
-
return result;
|
|
327
|
+
this._opened.set(isOpen);
|
|
328
|
+
if (this._container?._transitionsEnabled) {
|
|
329
|
+
this._setIsAnimating(true);
|
|
330
|
+
} else {
|
|
331
|
+
setTimeout(() => {
|
|
332
|
+
this._animationStarted.next();
|
|
333
|
+
this._animationEnd.next();
|
|
334
|
+
});
|
|
399
335
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
* @param restoreFocus Whether focus should be restored on close.
|
|
404
|
-
* @param focusOrigin Origin to use when restoring focus.
|
|
405
|
-
*/
|
|
406
|
-
_setOpen(isOpen, restoreFocus, focusOrigin) {
|
|
407
|
-
if (isOpen === this.opened) {
|
|
408
|
-
return Promise.resolve(isOpen ? 'open' : 'close');
|
|
409
|
-
}
|
|
410
|
-
this._opened.set(isOpen);
|
|
411
|
-
if (this._container?._transitionsEnabled) {
|
|
412
|
-
// Note: it's importatnt to set this as early as possible,
|
|
413
|
-
// otherwise the animation can look glitchy in some cases.
|
|
414
|
-
this._setIsAnimating(true);
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
// Simulate the animation events if animations are disabled.
|
|
418
|
-
setTimeout(() => {
|
|
419
|
-
this._animationStarted.next();
|
|
420
|
-
this._animationEnd.next();
|
|
421
|
-
});
|
|
422
|
-
}
|
|
423
|
-
this._elementRef.nativeElement.classList.toggle('mat-drawer-opened', isOpen);
|
|
424
|
-
if (!isOpen && restoreFocus) {
|
|
425
|
-
this._restoreFocus(focusOrigin);
|
|
426
|
-
}
|
|
427
|
-
// Needed to ensure that the closing sequence fires off correctly.
|
|
428
|
-
this._changeDetectorRef.markForCheck();
|
|
429
|
-
this._updateFocusTrapState();
|
|
430
|
-
return new Promise(resolve => {
|
|
431
|
-
this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));
|
|
432
|
-
});
|
|
336
|
+
this._elementRef.nativeElement.classList.toggle('mat-drawer-opened', isOpen);
|
|
337
|
+
if (!isOpen && restoreFocus) {
|
|
338
|
+
this._restoreFocus(focusOrigin);
|
|
433
339
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
340
|
+
this._changeDetectorRef.markForCheck();
|
|
341
|
+
this._updateFocusTrapState();
|
|
342
|
+
return new Promise(resolve => {
|
|
343
|
+
this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
_setIsAnimating(isAnimating) {
|
|
347
|
+
this._elementRef.nativeElement.classList.toggle('mat-drawer-animating', isAnimating);
|
|
348
|
+
}
|
|
349
|
+
_getWidth() {
|
|
350
|
+
return this._elementRef.nativeElement.offsetWidth || 0;
|
|
351
|
+
}
|
|
352
|
+
_updateFocusTrapState() {
|
|
353
|
+
if (this._focusTrap) {
|
|
354
|
+
this._focusTrap.enabled = !!this._container?.hasBackdrop && this.opened;
|
|
437
355
|
}
|
|
438
|
-
|
|
439
|
-
|
|
356
|
+
}
|
|
357
|
+
_updatePositionInParent(newPosition) {
|
|
358
|
+
if (!this._platform.isBrowser) {
|
|
359
|
+
return;
|
|
440
360
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
361
|
+
const element = this._elementRef.nativeElement;
|
|
362
|
+
const parent = element.parentNode;
|
|
363
|
+
if (newPosition === 'end') {
|
|
364
|
+
if (!this._anchor) {
|
|
365
|
+
this._anchor = this._doc.createComment('mat-drawer-anchor');
|
|
366
|
+
parent.insertBefore(this._anchor, element);
|
|
367
|
+
}
|
|
368
|
+
parent.appendChild(element);
|
|
369
|
+
} else if (this._anchor) {
|
|
370
|
+
this._anchor.parentNode.insertBefore(element, this._anchor);
|
|
448
371
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const parent = element.parentNode;
|
|
462
|
-
if (newPosition === 'end') {
|
|
463
|
-
if (!this._anchor) {
|
|
464
|
-
this._anchor = this._doc.createComment('mat-drawer-anchor');
|
|
465
|
-
parent.insertBefore(this._anchor, element);
|
|
466
|
-
}
|
|
467
|
-
parent.appendChild(element);
|
|
468
|
-
}
|
|
469
|
-
else if (this._anchor) {
|
|
470
|
-
this._anchor.parentNode.insertBefore(element, this._anchor);
|
|
372
|
+
}
|
|
373
|
+
_handleTransitionEvent = event => {
|
|
374
|
+
const element = this._elementRef.nativeElement;
|
|
375
|
+
if (event.target === element) {
|
|
376
|
+
this._ngZone.run(() => {
|
|
377
|
+
if (event.type === 'transitionrun') {
|
|
378
|
+
this._animationStarted.next(event);
|
|
379
|
+
} else {
|
|
380
|
+
if (event.type === 'transitionend') {
|
|
381
|
+
this._setIsAnimating(false);
|
|
382
|
+
}
|
|
383
|
+
this._animationEnd.next(event);
|
|
471
384
|
}
|
|
385
|
+
});
|
|
472
386
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
387
|
+
};
|
|
388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
389
|
+
minVersion: "12.0.0",
|
|
390
|
+
version: "20.2.0-next.2",
|
|
391
|
+
ngImport: i0,
|
|
392
|
+
type: MatDrawer,
|
|
393
|
+
deps: [],
|
|
394
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
395
|
+
});
|
|
396
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
397
|
+
minVersion: "14.0.0",
|
|
398
|
+
version: "20.2.0-next.2",
|
|
399
|
+
type: MatDrawer,
|
|
400
|
+
isStandalone: true,
|
|
401
|
+
selector: "mat-drawer",
|
|
402
|
+
inputs: {
|
|
403
|
+
position: "position",
|
|
404
|
+
mode: "mode",
|
|
405
|
+
disableClose: "disableClose",
|
|
406
|
+
autoFocus: "autoFocus",
|
|
407
|
+
opened: "opened"
|
|
408
|
+
},
|
|
409
|
+
outputs: {
|
|
410
|
+
openedChange: "openedChange",
|
|
411
|
+
_openedStream: "opened",
|
|
412
|
+
openedStart: "openedStart",
|
|
413
|
+
_closedStream: "closed",
|
|
414
|
+
closedStart: "closedStart",
|
|
415
|
+
onPositionChanged: "positionChanged"
|
|
416
|
+
},
|
|
417
|
+
host: {
|
|
418
|
+
properties: {
|
|
419
|
+
"attr.align": "null",
|
|
420
|
+
"class.mat-drawer-end": "position === \"end\"",
|
|
421
|
+
"class.mat-drawer-over": "mode === \"over\"",
|
|
422
|
+
"class.mat-drawer-push": "mode === \"push\"",
|
|
423
|
+
"class.mat-drawer-side": "mode === \"side\"",
|
|
424
|
+
"style.visibility": "(!_container && !opened) ? \"hidden\" : null",
|
|
425
|
+
"attr.tabIndex": "(mode !== \"side\") ? \"-1\" : null"
|
|
426
|
+
},
|
|
427
|
+
classAttribute: "mat-drawer"
|
|
428
|
+
},
|
|
429
|
+
viewQueries: [{
|
|
430
|
+
propertyName: "_content",
|
|
431
|
+
first: true,
|
|
432
|
+
predicate: ["content"],
|
|
433
|
+
descendants: true
|
|
434
|
+
}],
|
|
435
|
+
exportAs: ["matDrawer"],
|
|
436
|
+
ngImport: i0,
|
|
437
|
+
template: "<div class=\"mat-drawer-inner-container\" cdkScrollable #content>\r\n <ng-content></ng-content>\r\n</div>\r\n",
|
|
438
|
+
dependencies: [{
|
|
439
|
+
kind: "directive",
|
|
440
|
+
type: CdkScrollable,
|
|
441
|
+
selector: "[cdk-scrollable], [cdkScrollable]"
|
|
442
|
+
}],
|
|
443
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
444
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
445
|
+
});
|
|
494
446
|
}
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
447
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
448
|
+
minVersion: "12.0.0",
|
|
449
|
+
version: "20.2.0-next.2",
|
|
450
|
+
ngImport: i0,
|
|
451
|
+
type: MatDrawer,
|
|
452
|
+
decorators: [{
|
|
453
|
+
type: Component,
|
|
454
|
+
args: [{
|
|
455
|
+
selector: 'mat-drawer',
|
|
456
|
+
exportAs: 'matDrawer',
|
|
457
|
+
host: {
|
|
458
|
+
'class': 'mat-drawer',
|
|
459
|
+
'[attr.align]': 'null',
|
|
460
|
+
'[class.mat-drawer-end]': 'position === "end"',
|
|
461
|
+
'[class.mat-drawer-over]': 'mode === "over"',
|
|
462
|
+
'[class.mat-drawer-push]': 'mode === "push"',
|
|
463
|
+
'[class.mat-drawer-side]': 'mode === "side"',
|
|
464
|
+
'[style.visibility]': '(!_container && !opened) ? "hidden" : null',
|
|
465
|
+
'[attr.tabIndex]': '(mode !== "side") ? "-1" : null'
|
|
466
|
+
},
|
|
467
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
468
|
+
encapsulation: ViewEncapsulation.None,
|
|
469
|
+
imports: [CdkScrollable],
|
|
470
|
+
template: "<div class=\"mat-drawer-inner-container\" cdkScrollable #content>\r\n <ng-content></ng-content>\r\n</div>\r\n"
|
|
471
|
+
}]
|
|
472
|
+
}],
|
|
473
|
+
ctorParameters: () => [],
|
|
474
|
+
propDecorators: {
|
|
475
|
+
position: [{
|
|
476
|
+
type: Input
|
|
477
|
+
}],
|
|
478
|
+
mode: [{
|
|
479
|
+
type: Input
|
|
480
|
+
}],
|
|
481
|
+
disableClose: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}],
|
|
484
|
+
autoFocus: [{
|
|
485
|
+
type: Input
|
|
486
|
+
}],
|
|
487
|
+
opened: [{
|
|
488
|
+
type: Input
|
|
489
|
+
}],
|
|
490
|
+
openedChange: [{
|
|
491
|
+
type: Output
|
|
492
|
+
}],
|
|
493
|
+
_openedStream: [{
|
|
494
|
+
type: Output,
|
|
495
|
+
args: ['opened']
|
|
496
|
+
}],
|
|
497
|
+
openedStart: [{
|
|
498
|
+
type: Output
|
|
499
|
+
}],
|
|
500
|
+
_closedStream: [{
|
|
501
|
+
type: Output,
|
|
502
|
+
args: ['closed']
|
|
503
|
+
}],
|
|
504
|
+
closedStart: [{
|
|
505
|
+
type: Output
|
|
506
|
+
}],
|
|
507
|
+
onPositionChanged: [{
|
|
508
|
+
type: Output,
|
|
509
|
+
args: ['positionChanged']
|
|
510
|
+
}],
|
|
511
|
+
_content: [{
|
|
512
|
+
type: ViewChild,
|
|
513
|
+
args: ['content']
|
|
514
|
+
}]
|
|
515
|
+
}
|
|
516
|
+
});
|
|
548
517
|
class MatDrawerContainer {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
518
|
+
_dir = inject(Directionality, {
|
|
519
|
+
optional: true
|
|
520
|
+
});
|
|
521
|
+
_element = inject(ElementRef);
|
|
522
|
+
_ngZone = inject(NgZone);
|
|
523
|
+
_changeDetectorRef = inject(ChangeDetectorRef);
|
|
524
|
+
_animationDisabled = _animationsDisabled();
|
|
525
|
+
_transitionsEnabled = false;
|
|
526
|
+
_allDrawers;
|
|
527
|
+
_drawers = new QueryList();
|
|
528
|
+
_content;
|
|
529
|
+
_userContent;
|
|
530
|
+
get start() {
|
|
531
|
+
return this._start;
|
|
532
|
+
}
|
|
533
|
+
get end() {
|
|
534
|
+
return this._end;
|
|
535
|
+
}
|
|
536
|
+
get autosize() {
|
|
537
|
+
return this._autosize;
|
|
538
|
+
}
|
|
539
|
+
set autosize(value) {
|
|
540
|
+
this._autosize = coerceBooleanProperty(value);
|
|
541
|
+
}
|
|
542
|
+
_autosize = inject(MAT_DRAWER_DEFAULT_AUTOSIZE);
|
|
543
|
+
get hasBackdrop() {
|
|
544
|
+
return this._drawerHasBackdrop(this._start) || this._drawerHasBackdrop(this._end);
|
|
545
|
+
}
|
|
546
|
+
set hasBackdrop(value) {
|
|
547
|
+
this._backdropOverride = value == null ? null : coerceBooleanProperty(value);
|
|
548
|
+
}
|
|
549
|
+
_backdropOverride;
|
|
550
|
+
backdropClick = new EventEmitter();
|
|
551
|
+
_start;
|
|
552
|
+
_end;
|
|
553
|
+
_left;
|
|
554
|
+
_right;
|
|
555
|
+
_destroyed = new Subject();
|
|
556
|
+
_doCheckSubject = new Subject();
|
|
557
|
+
_contentMargins = {
|
|
558
|
+
left: null,
|
|
559
|
+
right: null
|
|
560
|
+
};
|
|
561
|
+
_contentMarginChanges = new Subject();
|
|
562
|
+
get scrollable() {
|
|
563
|
+
return this._userContent || this._content;
|
|
564
|
+
}
|
|
565
|
+
_injector = inject(Injector);
|
|
566
|
+
constructor() {
|
|
567
|
+
const platform = inject(Platform);
|
|
568
|
+
const viewportRuler = inject(ViewportRuler);
|
|
569
|
+
this._dir?.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
570
|
+
this._validateDrawers();
|
|
571
|
+
this.updateContentMargins();
|
|
572
|
+
});
|
|
573
|
+
viewportRuler.change().pipe(takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());
|
|
574
|
+
if (!this._animationDisabled && platform.isBrowser) {
|
|
575
|
+
this._ngZone.runOutsideAngular(() => {
|
|
576
|
+
setTimeout(() => {
|
|
577
|
+
this._element.nativeElement.classList.add('mat-drawer-transition');
|
|
578
|
+
this._transitionsEnabled = true;
|
|
579
|
+
}, 200);
|
|
580
|
+
});
|
|
582
581
|
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
582
|
+
}
|
|
583
|
+
ngAfterContentInit() {
|
|
584
|
+
this._allDrawers.changes.pipe(startWith(this._allDrawers), takeUntil(this._destroyed)).subscribe(drawer => {
|
|
585
|
+
this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
|
|
586
|
+
this._drawers.notifyOnChanges();
|
|
587
|
+
});
|
|
588
|
+
this._drawers.changes.pipe(startWith(null)).subscribe(() => {
|
|
589
|
+
this._validateDrawers();
|
|
590
|
+
this._drawers.forEach(drawer => {
|
|
591
|
+
this._watchDrawerToggle(drawer);
|
|
592
|
+
this._watchDrawerPosition(drawer);
|
|
593
|
+
this._watchDrawerMode(drawer);
|
|
594
|
+
});
|
|
595
|
+
if (!this._drawers.length || this._isDrawerOpen(this._start) || this._isDrawerOpen(this._end)) {
|
|
596
|
+
this.updateContentMargins();
|
|
597
|
+
}
|
|
598
|
+
this._changeDetectorRef.markForCheck();
|
|
599
|
+
});
|
|
600
|
+
this._ngZone.runOutsideAngular(() => {
|
|
601
|
+
this._doCheckSubject.pipe(debounceTime(10), takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
ngOnDestroy() {
|
|
605
|
+
this._contentMarginChanges.complete();
|
|
606
|
+
this._doCheckSubject.complete();
|
|
607
|
+
this._drawers.destroy();
|
|
608
|
+
this._destroyed.next();
|
|
609
|
+
this._destroyed.complete();
|
|
610
|
+
}
|
|
611
|
+
open() {
|
|
612
|
+
this._drawers.forEach(drawer => drawer.open());
|
|
613
|
+
}
|
|
614
|
+
close() {
|
|
615
|
+
this._drawers.forEach(drawer => drawer.close());
|
|
616
|
+
}
|
|
617
|
+
updateContentMargins() {
|
|
618
|
+
let left = 0;
|
|
619
|
+
let right = 0;
|
|
620
|
+
if (this._left && this._left.opened) {
|
|
621
|
+
if (this._left.mode == 'side') {
|
|
622
|
+
left += this._left._getWidth();
|
|
623
|
+
} else if (this._left.mode == 'push') {
|
|
624
|
+
const width = this._left._getWidth();
|
|
625
|
+
left += width;
|
|
626
|
+
right -= width;
|
|
627
|
+
}
|
|
591
628
|
}
|
|
592
|
-
|
|
593
|
-
|
|
629
|
+
if (this._right && this._right.opened) {
|
|
630
|
+
if (this._right.mode == 'side') {
|
|
631
|
+
right += this._right._getWidth();
|
|
632
|
+
} else if (this._right.mode == 'push') {
|
|
633
|
+
const width = this._right._getWidth();
|
|
634
|
+
right += width;
|
|
635
|
+
left -= width;
|
|
636
|
+
}
|
|
594
637
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
* They're used as aliases for the above to set the left/right style properly.
|
|
604
|
-
* In LTR, _left == _start and _right == _end.
|
|
605
|
-
* In RTL, _left == _end and _right == _start.
|
|
606
|
-
*/
|
|
607
|
-
_left;
|
|
608
|
-
_right;
|
|
609
|
-
/** Emits when the component is destroyed. */
|
|
610
|
-
_destroyed = new Subject();
|
|
611
|
-
/** Emits on every ngDoCheck. Used for debouncing reflows. */
|
|
612
|
-
_doCheckSubject = new Subject();
|
|
613
|
-
/**
|
|
614
|
-
* Margins to be applied to the content. These are used to push / shrink the drawer content when a
|
|
615
|
-
* drawer is open. We use margin rather than transform even for push mode because transform breaks
|
|
616
|
-
* fixed position elements inside of the transformed element.
|
|
617
|
-
*/
|
|
618
|
-
_contentMargins = { left: null, right: null };
|
|
619
|
-
_contentMarginChanges = new Subject();
|
|
620
|
-
/** Reference to the CdkScrollable instance that wraps the scrollable content. */
|
|
621
|
-
get scrollable() {
|
|
622
|
-
return this._userContent || this._content;
|
|
638
|
+
left = left || null;
|
|
639
|
+
right = right || null;
|
|
640
|
+
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
641
|
+
this._contentMargins = {
|
|
642
|
+
left,
|
|
643
|
+
right
|
|
644
|
+
};
|
|
645
|
+
this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));
|
|
623
646
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
// If a `Dir` directive exists up the tree, listen direction changes
|
|
629
|
-
// and update the left/right properties to point to the proper start/end.
|
|
630
|
-
this._dir?.change.pipe(takeUntil(this._destroyed)).subscribe(() => {
|
|
631
|
-
this._validateDrawers();
|
|
632
|
-
this.updateContentMargins();
|
|
633
|
-
});
|
|
634
|
-
// Since the minimum width of the sidenav depends on the viewport width,
|
|
635
|
-
// we need to recompute the margins if the viewport changes.
|
|
636
|
-
viewportRuler
|
|
637
|
-
.change()
|
|
638
|
-
.pipe(takeUntil(this._destroyed))
|
|
639
|
-
.subscribe(() => this.updateContentMargins());
|
|
640
|
-
if (!this._animationDisabled && platform.isBrowser) {
|
|
641
|
-
this._ngZone.runOutsideAngular(() => {
|
|
642
|
-
// Enable the animations after a delay in order to skip
|
|
643
|
-
// the initial transition if a drawer is open by default.
|
|
644
|
-
setTimeout(() => {
|
|
645
|
-
this._element.nativeElement.classList.add('mat-drawer-transition');
|
|
646
|
-
this._transitionsEnabled = true;
|
|
647
|
-
}, 200);
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
ngAfterContentInit() {
|
|
652
|
-
this._allDrawers.changes
|
|
653
|
-
.pipe(startWith(this._allDrawers), takeUntil(this._destroyed))
|
|
654
|
-
.subscribe((drawer) => {
|
|
655
|
-
this._drawers.reset(drawer.filter(item => !item._container || item._container === this));
|
|
656
|
-
this._drawers.notifyOnChanges();
|
|
657
|
-
});
|
|
658
|
-
this._drawers.changes.pipe(startWith(null)).subscribe(() => {
|
|
659
|
-
this._validateDrawers();
|
|
660
|
-
this._drawers.forEach((drawer) => {
|
|
661
|
-
this._watchDrawerToggle(drawer);
|
|
662
|
-
this._watchDrawerPosition(drawer);
|
|
663
|
-
this._watchDrawerMode(drawer);
|
|
664
|
-
});
|
|
665
|
-
if (!this._drawers.length ||
|
|
666
|
-
this._isDrawerOpen(this._start) ||
|
|
667
|
-
this._isDrawerOpen(this._end)) {
|
|
668
|
-
this.updateContentMargins();
|
|
669
|
-
}
|
|
670
|
-
this._changeDetectorRef.markForCheck();
|
|
671
|
-
});
|
|
672
|
-
// Avoid hitting the NgZone through the debounce timeout.
|
|
673
|
-
this._ngZone.runOutsideAngular(() => {
|
|
674
|
-
this._doCheckSubject
|
|
675
|
-
.pipe(debounceTime(10), // Arbitrary debounce time, less than a frame at 60fps
|
|
676
|
-
takeUntil(this._destroyed))
|
|
677
|
-
.subscribe(() => this.updateContentMargins());
|
|
678
|
-
});
|
|
647
|
+
}
|
|
648
|
+
ngDoCheck() {
|
|
649
|
+
if (this._autosize && this._isPushed()) {
|
|
650
|
+
this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());
|
|
679
651
|
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
652
|
+
}
|
|
653
|
+
_watchDrawerToggle(drawer) {
|
|
654
|
+
drawer._animationStarted.pipe(takeUntil(this._drawers.changes)).subscribe(() => {
|
|
655
|
+
this.updateContentMargins();
|
|
656
|
+
this._changeDetectorRef.markForCheck();
|
|
657
|
+
});
|
|
658
|
+
if (drawer.mode !== 'side') {
|
|
659
|
+
drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() => this._setContainerClass(drawer.opened));
|
|
686
660
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
661
|
+
}
|
|
662
|
+
_watchDrawerPosition(drawer) {
|
|
663
|
+
drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => {
|
|
664
|
+
afterNextRender({
|
|
665
|
+
read: () => this._validateDrawers()
|
|
666
|
+
}, {
|
|
667
|
+
injector: this._injector
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
_watchDrawerMode(drawer) {
|
|
672
|
+
drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed))).subscribe(() => {
|
|
673
|
+
this.updateContentMargins();
|
|
674
|
+
this._changeDetectorRef.markForCheck();
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
_setContainerClass(isAdd) {
|
|
678
|
+
const classList = this._element.nativeElement.classList;
|
|
679
|
+
const className = 'mat-drawer-container-has-open';
|
|
680
|
+
if (isAdd) {
|
|
681
|
+
classList.add(className);
|
|
682
|
+
} else {
|
|
683
|
+
classList.remove(className);
|
|
690
684
|
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
*/
|
|
699
|
-
updateContentMargins() {
|
|
700
|
-
// 1. For drawers in `over` mode, they don't affect the content.
|
|
701
|
-
// 2. For drawers in `side` mode they should shrink the content. We do this by adding to the
|
|
702
|
-
// left margin (for left drawer) or right margin (for right the drawer).
|
|
703
|
-
// 3. For drawers in `push` mode the should shift the content without resizing it. We do this by
|
|
704
|
-
// adding to the left or right margin and simultaneously subtracting the same amount of
|
|
705
|
-
// margin from the other side.
|
|
706
|
-
let left = 0;
|
|
707
|
-
let right = 0;
|
|
708
|
-
if (this._left && this._left.opened) {
|
|
709
|
-
if (this._left.mode == 'side') {
|
|
710
|
-
left += this._left._getWidth();
|
|
711
|
-
}
|
|
712
|
-
else if (this._left.mode == 'push') {
|
|
713
|
-
const width = this._left._getWidth();
|
|
714
|
-
left += width;
|
|
715
|
-
right -= width;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
if (this._right && this._right.opened) {
|
|
719
|
-
if (this._right.mode == 'side') {
|
|
720
|
-
right += this._right._getWidth();
|
|
721
|
-
}
|
|
722
|
-
else if (this._right.mode == 'push') {
|
|
723
|
-
const width = this._right._getWidth();
|
|
724
|
-
right += width;
|
|
725
|
-
left -= width;
|
|
726
|
-
}
|
|
685
|
+
}
|
|
686
|
+
_validateDrawers() {
|
|
687
|
+
this._start = this._end = null;
|
|
688
|
+
this._drawers.forEach(drawer => {
|
|
689
|
+
if (drawer.position == 'end') {
|
|
690
|
+
if (this._end != null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
691
|
+
throwMatDuplicatedDrawerError('end');
|
|
727
692
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
left = left || null;
|
|
733
|
-
right = right || null;
|
|
734
|
-
if (left !== this._contentMargins.left || right !== this._contentMargins.right) {
|
|
735
|
-
this._contentMargins = { left, right };
|
|
736
|
-
// Pull back into the NgZone since in some cases we could be outside. We need to be careful
|
|
737
|
-
// to do it only when something changed, otherwise we can end up hitting the zone too often.
|
|
738
|
-
this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));
|
|
693
|
+
this._end = drawer;
|
|
694
|
+
} else {
|
|
695
|
+
if (this._start != null && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
696
|
+
throwMatDuplicatedDrawerError('start');
|
|
739
697
|
}
|
|
698
|
+
this._start = drawer;
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
this._right = this._left = null;
|
|
702
|
+
if (this._dir && this._dir.value === 'rtl') {
|
|
703
|
+
this._left = this._end;
|
|
704
|
+
this._right = this._start;
|
|
705
|
+
} else {
|
|
706
|
+
this._left = this._start;
|
|
707
|
+
this._right = this._end;
|
|
740
708
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
709
|
+
}
|
|
710
|
+
_isPushed() {
|
|
711
|
+
return this._isDrawerOpen(this._start) && this._start.mode != 'over' || this._isDrawerOpen(this._end) && this._end.mode != 'over';
|
|
712
|
+
}
|
|
713
|
+
_onBackdropClicked() {
|
|
714
|
+
this.backdropClick.emit();
|
|
715
|
+
this._closeModalDrawersViaBackdrop();
|
|
716
|
+
}
|
|
717
|
+
_closeModalDrawersViaBackdrop() {
|
|
718
|
+
[this._start, this._end].filter(drawer => drawer && !drawer.disableClose && this._drawerHasBackdrop(drawer)).forEach(drawer => drawer._closeViaBackdropClick());
|
|
719
|
+
}
|
|
720
|
+
_isShowingBackdrop() {
|
|
721
|
+
return this._isDrawerOpen(this._start) && this._drawerHasBackdrop(this._start) || this._isDrawerOpen(this._end) && this._drawerHasBackdrop(this._end);
|
|
722
|
+
}
|
|
723
|
+
_isDrawerOpen(drawer) {
|
|
724
|
+
return drawer != null && drawer.opened;
|
|
725
|
+
}
|
|
726
|
+
_drawerHasBackdrop(drawer) {
|
|
727
|
+
if (this._backdropOverride == null) {
|
|
728
|
+
return !!drawer && drawer.mode !== 'side';
|
|
747
729
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
}
|
|
810
|
-
this._start = drawer;
|
|
811
|
-
}
|
|
812
|
-
});
|
|
813
|
-
this._right = this._left = null;
|
|
814
|
-
// Detect if we're LTR or RTL.
|
|
815
|
-
if (this._dir && this._dir.value === 'rtl') {
|
|
816
|
-
this._left = this._end;
|
|
817
|
-
this._right = this._start;
|
|
818
|
-
}
|
|
819
|
-
else {
|
|
820
|
-
this._left = this._start;
|
|
821
|
-
this._right = this._end;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
/** Whether the container is being pushed to the side by one of the drawers. */
|
|
825
|
-
_isPushed() {
|
|
826
|
-
return ((this._isDrawerOpen(this._start) && this._start.mode != 'over') ||
|
|
827
|
-
(this._isDrawerOpen(this._end) && this._end.mode != 'over'));
|
|
828
|
-
}
|
|
829
|
-
_onBackdropClicked() {
|
|
830
|
-
this.backdropClick.emit();
|
|
831
|
-
this._closeModalDrawersViaBackdrop();
|
|
832
|
-
}
|
|
833
|
-
_closeModalDrawersViaBackdrop() {
|
|
834
|
-
// Close all open drawers where closing is not disabled and the mode is not `side`.
|
|
835
|
-
[this._start, this._end]
|
|
836
|
-
.filter(drawer => drawer && !drawer.disableClose && this._drawerHasBackdrop(drawer))
|
|
837
|
-
.forEach(drawer => drawer._closeViaBackdropClick());
|
|
838
|
-
}
|
|
839
|
-
_isShowingBackdrop() {
|
|
840
|
-
return ((this._isDrawerOpen(this._start) && this._drawerHasBackdrop(this._start)) ||
|
|
841
|
-
(this._isDrawerOpen(this._end) && this._drawerHasBackdrop(this._end)));
|
|
842
|
-
}
|
|
843
|
-
_isDrawerOpen(drawer) {
|
|
844
|
-
return drawer != null && drawer.opened;
|
|
845
|
-
}
|
|
846
|
-
// Whether argument drawer should have a backdrop when it opens
|
|
847
|
-
_drawerHasBackdrop(drawer) {
|
|
848
|
-
if (this._backdropOverride == null) {
|
|
849
|
-
return !!drawer && drawer.mode !== 'side';
|
|
850
|
-
}
|
|
851
|
-
return this._backdropOverride;
|
|
852
|
-
}
|
|
853
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatDrawerContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
854
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-next.2", type: MatDrawerContainer, isStandalone: true, selector: "mat-drawer-container", inputs: { autosize: "autosize", hasBackdrop: "hasBackdrop" }, outputs: { backdropClick: "backdropClick" }, host: { properties: { "class.mat-drawer-container-explicit-backdrop": "_backdropOverride" }, classAttribute: "mat-drawer-container" }, providers: [
|
|
855
|
-
{
|
|
856
|
-
provide: MAT_DRAWER_CONTAINER,
|
|
857
|
-
useExisting: MatDrawerContainer,
|
|
858
|
-
},
|
|
859
|
-
], queries: [{ propertyName: "_content", first: true, predicate: MatDrawerContent, descendants: true }, { propertyName: "_allDrawers", predicate: MatDrawer, descendants: true }], viewQueries: [{ propertyName: "_userContent", first: true, predicate: MatDrawerContent, descendants: true }], exportAs: ["matDrawerContainer"], ngImport: i0, template: "@if (hasBackdrop) {\n <div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n}\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n\n@if (!_content) {\n <mat-drawer-content>\n <ng-content></ng-content>\n </mat-drawer-content>\n}\n", styles: [".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}\n"], dependencies: [{ kind: "component", type: MatDrawerContent, selector: "mat-drawer-content" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
730
|
+
return this._backdropOverride;
|
|
731
|
+
}
|
|
732
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
733
|
+
minVersion: "12.0.0",
|
|
734
|
+
version: "20.2.0-next.2",
|
|
735
|
+
ngImport: i0,
|
|
736
|
+
type: MatDrawerContainer,
|
|
737
|
+
deps: [],
|
|
738
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
739
|
+
});
|
|
740
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
741
|
+
minVersion: "17.0.0",
|
|
742
|
+
version: "20.2.0-next.2",
|
|
743
|
+
type: MatDrawerContainer,
|
|
744
|
+
isStandalone: true,
|
|
745
|
+
selector: "mat-drawer-container",
|
|
746
|
+
inputs: {
|
|
747
|
+
autosize: "autosize",
|
|
748
|
+
hasBackdrop: "hasBackdrop"
|
|
749
|
+
},
|
|
750
|
+
outputs: {
|
|
751
|
+
backdropClick: "backdropClick"
|
|
752
|
+
},
|
|
753
|
+
host: {
|
|
754
|
+
properties: {
|
|
755
|
+
"class.mat-drawer-container-explicit-backdrop": "_backdropOverride"
|
|
756
|
+
},
|
|
757
|
+
classAttribute: "mat-drawer-container"
|
|
758
|
+
},
|
|
759
|
+
providers: [{
|
|
760
|
+
provide: MAT_DRAWER_CONTAINER,
|
|
761
|
+
useExisting: MatDrawerContainer
|
|
762
|
+
}],
|
|
763
|
+
queries: [{
|
|
764
|
+
propertyName: "_content",
|
|
765
|
+
first: true,
|
|
766
|
+
predicate: MatDrawerContent,
|
|
767
|
+
descendants: true
|
|
768
|
+
}, {
|
|
769
|
+
propertyName: "_allDrawers",
|
|
770
|
+
predicate: MatDrawer,
|
|
771
|
+
descendants: true
|
|
772
|
+
}],
|
|
773
|
+
viewQueries: [{
|
|
774
|
+
propertyName: "_userContent",
|
|
775
|
+
first: true,
|
|
776
|
+
predicate: MatDrawerContent,
|
|
777
|
+
descendants: true
|
|
778
|
+
}],
|
|
779
|
+
exportAs: ["matDrawerContainer"],
|
|
780
|
+
ngImport: i0,
|
|
781
|
+
template: "@if (hasBackdrop) {\n <div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n}\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n\n@if (!_content) {\n <mat-drawer-content>\n <ng-content></ng-content>\n </mat-drawer-content>\n}\n",
|
|
782
|
+
styles: [".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}\n"],
|
|
783
|
+
dependencies: [{
|
|
784
|
+
kind: "component",
|
|
785
|
+
type: MatDrawerContent,
|
|
786
|
+
selector: "mat-drawer-content"
|
|
787
|
+
}],
|
|
788
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
789
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
790
|
+
});
|
|
860
791
|
}
|
|
861
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
792
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
793
|
+
minVersion: "12.0.0",
|
|
794
|
+
version: "20.2.0-next.2",
|
|
795
|
+
ngImport: i0,
|
|
796
|
+
type: MatDrawerContainer,
|
|
797
|
+
decorators: [{
|
|
798
|
+
type: Component,
|
|
799
|
+
args: [{
|
|
800
|
+
selector: 'mat-drawer-container',
|
|
801
|
+
exportAs: 'matDrawerContainer',
|
|
802
|
+
host: {
|
|
803
|
+
'class': 'mat-drawer-container',
|
|
804
|
+
'[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride'
|
|
805
|
+
},
|
|
806
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
807
|
+
encapsulation: ViewEncapsulation.None,
|
|
808
|
+
providers: [{
|
|
809
|
+
provide: MAT_DRAWER_CONTAINER,
|
|
810
|
+
useExisting: MatDrawerContainer
|
|
811
|
+
}],
|
|
812
|
+
imports: [MatDrawerContent],
|
|
813
|
+
template: "@if (hasBackdrop) {\n <div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n}\n\n<ng-content select=\"mat-drawer\"></ng-content>\n\n<ng-content select=\"mat-drawer-content\">\n</ng-content>\n\n@if (!_content) {\n <mat-drawer-content>\n <ng-content></ng-content>\n </mat-drawer-content>\n}\n",
|
|
814
|
+
styles: [".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}\n"]
|
|
815
|
+
}]
|
|
816
|
+
}],
|
|
817
|
+
ctorParameters: () => [],
|
|
818
|
+
propDecorators: {
|
|
819
|
+
_allDrawers: [{
|
|
820
|
+
type: ContentChildren,
|
|
821
|
+
args: [MatDrawer, {
|
|
822
|
+
descendants: true
|
|
823
|
+
}]
|
|
824
|
+
}],
|
|
825
|
+
_content: [{
|
|
826
|
+
type: ContentChild,
|
|
827
|
+
args: [MatDrawerContent]
|
|
828
|
+
}],
|
|
829
|
+
_userContent: [{
|
|
830
|
+
type: ViewChild,
|
|
831
|
+
args: [MatDrawerContent]
|
|
832
|
+
}],
|
|
833
|
+
autosize: [{
|
|
834
|
+
type: Input
|
|
835
|
+
}],
|
|
836
|
+
hasBackdrop: [{
|
|
837
|
+
type: Input
|
|
838
|
+
}],
|
|
839
|
+
backdropClick: [{
|
|
840
|
+
type: Output
|
|
841
|
+
}]
|
|
842
|
+
}
|
|
843
|
+
});
|
|
892
844
|
|
|
893
845
|
class MatSidenavContent extends MatDrawerContent {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
846
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
847
|
+
minVersion: "12.0.0",
|
|
848
|
+
version: "20.2.0-next.2",
|
|
849
|
+
ngImport: i0,
|
|
850
|
+
type: MatSidenavContent,
|
|
851
|
+
deps: null,
|
|
852
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
853
|
+
});
|
|
854
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
855
|
+
minVersion: "14.0.0",
|
|
856
|
+
version: "20.2.0-next.2",
|
|
857
|
+
type: MatSidenavContent,
|
|
858
|
+
isStandalone: true,
|
|
859
|
+
selector: "mat-sidenav-content",
|
|
860
|
+
host: {
|
|
861
|
+
classAttribute: "mat-drawer-content mat-sidenav-content"
|
|
862
|
+
},
|
|
863
|
+
providers: [{
|
|
864
|
+
provide: CdkScrollable,
|
|
865
|
+
useExisting: MatSidenavContent
|
|
866
|
+
}],
|
|
867
|
+
usesInheritance: true,
|
|
868
|
+
ngImport: i0,
|
|
869
|
+
template: '<ng-content></ng-content>',
|
|
870
|
+
isInline: true,
|
|
871
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
872
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
873
|
+
});
|
|
901
874
|
}
|
|
902
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
875
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
876
|
+
minVersion: "12.0.0",
|
|
877
|
+
version: "20.2.0-next.2",
|
|
878
|
+
ngImport: i0,
|
|
879
|
+
type: MatSidenavContent,
|
|
880
|
+
decorators: [{
|
|
881
|
+
type: Component,
|
|
882
|
+
args: [{
|
|
883
|
+
selector: 'mat-sidenav-content',
|
|
884
|
+
template: '<ng-content></ng-content>',
|
|
885
|
+
host: {
|
|
886
|
+
'class': 'mat-drawer-content mat-sidenav-content'
|
|
887
|
+
},
|
|
888
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
889
|
+
encapsulation: ViewEncapsulation.None,
|
|
890
|
+
providers: [{
|
|
891
|
+
provide: CdkScrollable,
|
|
892
|
+
useExisting: MatSidenavContent
|
|
893
|
+
}]
|
|
894
|
+
}]
|
|
895
|
+
}]
|
|
896
|
+
});
|
|
920
897
|
class MatSidenav extends MatDrawer {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
898
|
+
get fixedInViewport() {
|
|
899
|
+
return this._fixedInViewport;
|
|
900
|
+
}
|
|
901
|
+
set fixedInViewport(value) {
|
|
902
|
+
this._fixedInViewport = coerceBooleanProperty(value);
|
|
903
|
+
}
|
|
904
|
+
_fixedInViewport = false;
|
|
905
|
+
get fixedTopGap() {
|
|
906
|
+
return this._fixedTopGap;
|
|
907
|
+
}
|
|
908
|
+
set fixedTopGap(value) {
|
|
909
|
+
this._fixedTopGap = coerceNumberProperty(value);
|
|
910
|
+
}
|
|
911
|
+
_fixedTopGap = 0;
|
|
912
|
+
get fixedBottomGap() {
|
|
913
|
+
return this._fixedBottomGap;
|
|
914
|
+
}
|
|
915
|
+
set fixedBottomGap(value) {
|
|
916
|
+
this._fixedBottomGap = coerceNumberProperty(value);
|
|
917
|
+
}
|
|
918
|
+
_fixedBottomGap = 0;
|
|
919
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
920
|
+
minVersion: "12.0.0",
|
|
921
|
+
version: "20.2.0-next.2",
|
|
922
|
+
ngImport: i0,
|
|
923
|
+
type: MatSidenav,
|
|
924
|
+
deps: null,
|
|
925
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
926
|
+
});
|
|
927
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
928
|
+
minVersion: "14.0.0",
|
|
929
|
+
version: "20.2.0-next.2",
|
|
930
|
+
type: MatSidenav,
|
|
931
|
+
isStandalone: true,
|
|
932
|
+
selector: "mat-sidenav",
|
|
933
|
+
inputs: {
|
|
934
|
+
fixedInViewport: "fixedInViewport",
|
|
935
|
+
fixedTopGap: "fixedTopGap",
|
|
936
|
+
fixedBottomGap: "fixedBottomGap"
|
|
937
|
+
},
|
|
938
|
+
host: {
|
|
939
|
+
properties: {
|
|
940
|
+
"attr.tabIndex": "(mode !== \"side\") ? \"-1\" : null",
|
|
941
|
+
"attr.align": "null",
|
|
942
|
+
"class.mat-drawer-end": "position === \"end\"",
|
|
943
|
+
"class.mat-drawer-over": "mode === \"over\"",
|
|
944
|
+
"class.mat-drawer-push": "mode === \"push\"",
|
|
945
|
+
"class.mat-drawer-side": "mode === \"side\"",
|
|
946
|
+
"class.mat-sidenav-fixed": "fixedInViewport",
|
|
947
|
+
"style.top.px": "fixedInViewport ? fixedTopGap : null",
|
|
948
|
+
"style.bottom.px": "fixedInViewport ? fixedBottomGap : null"
|
|
949
|
+
},
|
|
950
|
+
classAttribute: "mat-drawer mat-sidenav"
|
|
951
|
+
},
|
|
952
|
+
providers: [{
|
|
953
|
+
provide: MatDrawer,
|
|
954
|
+
useExisting: MatSidenav
|
|
955
|
+
}],
|
|
956
|
+
exportAs: ["matSidenav"],
|
|
957
|
+
usesInheritance: true,
|
|
958
|
+
ngImport: i0,
|
|
959
|
+
template: "<div class=\"mat-drawer-inner-container\" cdkScrollable #content>\r\n <ng-content></ng-content>\r\n</div>\r\n",
|
|
960
|
+
dependencies: [{
|
|
961
|
+
kind: "directive",
|
|
962
|
+
type: CdkScrollable,
|
|
963
|
+
selector: "[cdk-scrollable], [cdkScrollable]"
|
|
964
|
+
}],
|
|
965
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
966
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
967
|
+
});
|
|
953
968
|
}
|
|
954
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
969
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
970
|
+
minVersion: "12.0.0",
|
|
971
|
+
version: "20.2.0-next.2",
|
|
972
|
+
ngImport: i0,
|
|
973
|
+
type: MatSidenav,
|
|
974
|
+
decorators: [{
|
|
975
|
+
type: Component,
|
|
976
|
+
args: [{
|
|
977
|
+
selector: 'mat-sidenav',
|
|
978
|
+
exportAs: 'matSidenav',
|
|
979
|
+
host: {
|
|
980
|
+
'class': 'mat-drawer mat-sidenav',
|
|
981
|
+
'[attr.tabIndex]': '(mode !== "side") ? "-1" : null',
|
|
982
|
+
'[attr.align]': 'null',
|
|
983
|
+
'[class.mat-drawer-end]': 'position === "end"',
|
|
984
|
+
'[class.mat-drawer-over]': 'mode === "over"',
|
|
985
|
+
'[class.mat-drawer-push]': 'mode === "push"',
|
|
986
|
+
'[class.mat-drawer-side]': 'mode === "side"',
|
|
987
|
+
'[class.mat-sidenav-fixed]': 'fixedInViewport',
|
|
988
|
+
'[style.top.px]': 'fixedInViewport ? fixedTopGap : null',
|
|
989
|
+
'[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null'
|
|
990
|
+
},
|
|
991
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
992
|
+
encapsulation: ViewEncapsulation.None,
|
|
993
|
+
imports: [CdkScrollable],
|
|
994
|
+
providers: [{
|
|
995
|
+
provide: MatDrawer,
|
|
996
|
+
useExisting: MatSidenav
|
|
997
|
+
}],
|
|
998
|
+
template: "<div class=\"mat-drawer-inner-container\" cdkScrollable #content>\r\n <ng-content></ng-content>\r\n</div>\r\n"
|
|
999
|
+
}]
|
|
1000
|
+
}],
|
|
1001
|
+
propDecorators: {
|
|
1002
|
+
fixedInViewport: [{
|
|
1003
|
+
type: Input
|
|
1004
|
+
}],
|
|
1005
|
+
fixedTopGap: [{
|
|
1006
|
+
type: Input
|
|
1007
|
+
}],
|
|
1008
|
+
fixedBottomGap: [{
|
|
1009
|
+
type: Input
|
|
1010
|
+
}]
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
978
1013
|
class MatSidenavContainer extends MatDrawerContainer {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1014
|
+
_allDrawers = undefined;
|
|
1015
|
+
_content = undefined;
|
|
1016
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1017
|
+
minVersion: "12.0.0",
|
|
1018
|
+
version: "20.2.0-next.2",
|
|
1019
|
+
ngImport: i0,
|
|
1020
|
+
type: MatSidenavContainer,
|
|
1021
|
+
deps: null,
|
|
1022
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1023
|
+
});
|
|
1024
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1025
|
+
minVersion: "17.0.0",
|
|
1026
|
+
version: "20.2.0-next.2",
|
|
1027
|
+
type: MatSidenavContainer,
|
|
1028
|
+
isStandalone: true,
|
|
1029
|
+
selector: "mat-sidenav-container",
|
|
1030
|
+
host: {
|
|
1031
|
+
properties: {
|
|
1032
|
+
"class.mat-drawer-container-explicit-backdrop": "_backdropOverride"
|
|
1033
|
+
},
|
|
1034
|
+
classAttribute: "mat-drawer-container mat-sidenav-container"
|
|
1035
|
+
},
|
|
1036
|
+
providers: [{
|
|
1037
|
+
provide: MAT_DRAWER_CONTAINER,
|
|
1038
|
+
useExisting: MatSidenavContainer
|
|
1039
|
+
}, {
|
|
1040
|
+
provide: MatDrawerContainer,
|
|
1041
|
+
useExisting: MatSidenavContainer
|
|
1042
|
+
}],
|
|
1043
|
+
queries: [{
|
|
1044
|
+
propertyName: "_content",
|
|
1045
|
+
first: true,
|
|
1046
|
+
predicate: MatSidenavContent,
|
|
1047
|
+
descendants: true
|
|
1048
|
+
}, {
|
|
1049
|
+
propertyName: "_allDrawers",
|
|
1050
|
+
predicate: MatSidenav,
|
|
1051
|
+
descendants: true
|
|
1052
|
+
}],
|
|
1053
|
+
exportAs: ["matSidenavContainer"],
|
|
1054
|
+
usesInheritance: true,
|
|
1055
|
+
ngImport: i0,
|
|
1056
|
+
template: "@if (hasBackdrop) {\n <div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n}\n\n<ng-content select=\"mat-sidenav\"></ng-content>\n\n<ng-content select=\"mat-sidenav-content\">\n</ng-content>\n\n@if (!_content) {\n <mat-sidenav-content>\n <ng-content></ng-content>\n </mat-sidenav-content>\n}\n",
|
|
1057
|
+
styles: [".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}\n"],
|
|
1058
|
+
dependencies: [{
|
|
1059
|
+
kind: "component",
|
|
1060
|
+
type: MatSidenavContent,
|
|
1061
|
+
selector: "mat-sidenav-content"
|
|
1062
|
+
}],
|
|
1063
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1064
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
1065
|
+
});
|
|
993
1066
|
}
|
|
994
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1067
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1068
|
+
minVersion: "12.0.0",
|
|
1069
|
+
version: "20.2.0-next.2",
|
|
1070
|
+
ngImport: i0,
|
|
1071
|
+
type: MatSidenavContainer,
|
|
1072
|
+
decorators: [{
|
|
1073
|
+
type: Component,
|
|
1074
|
+
args: [{
|
|
1075
|
+
selector: 'mat-sidenav-container',
|
|
1076
|
+
exportAs: 'matSidenavContainer',
|
|
1077
|
+
host: {
|
|
1078
|
+
'class': 'mat-drawer-container mat-sidenav-container',
|
|
1079
|
+
'[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride'
|
|
1080
|
+
},
|
|
1081
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1082
|
+
encapsulation: ViewEncapsulation.None,
|
|
1083
|
+
providers: [{
|
|
1084
|
+
provide: MAT_DRAWER_CONTAINER,
|
|
1085
|
+
useExisting: MatSidenavContainer
|
|
1086
|
+
}, {
|
|
1087
|
+
provide: MatDrawerContainer,
|
|
1088
|
+
useExisting: MatSidenavContainer
|
|
1089
|
+
}],
|
|
1090
|
+
imports: [MatSidenavContent],
|
|
1091
|
+
template: "@if (hasBackdrop) {\n <div class=\"mat-drawer-backdrop\" (click)=\"_onBackdropClicked()\"\n [class.mat-drawer-shown]=\"_isShowingBackdrop()\"></div>\n}\n\n<ng-content select=\"mat-sidenav\"></ng-content>\n\n<ng-content select=\"mat-sidenav-content\">\n</ng-content>\n\n@if (!_content) {\n <mat-sidenav-content>\n <ng-content></ng-content>\n </mat-sidenav-content>\n}\n",
|
|
1092
|
+
styles: [".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));background-color:var(--mat-sidenav-content-background-color, var(--mat-sys-background));box-sizing:border-box;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color, color-mix(in srgb, var(--mat-sys-neutral-variant20) 40%, transparent))}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}@media(forced-colors: active){.mat-drawer-backdrop{opacity:.5}}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-content.mat-drawer-content-hidden{opacity:0}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color, var(--mat-sys-on-surface-variant));box-shadow:var(--mat-sidenav-container-elevation-shadow, none);background-color:var(--mat-sidenav-container-background-color, var(--mat-sys-surface));border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));width:var(--mat-sidenav-container-width, 360px);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}@media(forced-colors: active){.mat-drawer,[dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}}@media(forced-colors: active){[dir=rtl] .mat-drawer,.mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-left-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-bottom-right-radius:var(--mat-sidenav-container-shape, var(--mat-sys-corner-large));border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-transition .mat-drawer{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating){visibility:hidden;box-shadow:none}.mat-drawer:not(.mat-drawer-opened):not(.mat-drawer-animating) .mat-drawer-inner-container{display:none}.mat-drawer.mat-drawer-opened.mat-drawer-opened{transform:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color, transparent);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color, transparent);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto}.mat-sidenav-fixed{position:fixed}\n"]
|
|
1093
|
+
}]
|
|
1094
|
+
}],
|
|
1095
|
+
propDecorators: {
|
|
1096
|
+
_allDrawers: [{
|
|
1097
|
+
type: ContentChildren,
|
|
1098
|
+
args: [MatSidenav, {
|
|
1099
|
+
descendants: true
|
|
1100
|
+
}]
|
|
1101
|
+
}],
|
|
1102
|
+
_content: [{
|
|
1103
|
+
type: ContentChild,
|
|
1104
|
+
args: [MatSidenavContent]
|
|
1105
|
+
}]
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1020
1108
|
|
|
1021
1109
|
class MatSidenavModule {
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1110
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1111
|
+
minVersion: "12.0.0",
|
|
1112
|
+
version: "20.2.0-next.2",
|
|
1113
|
+
ngImport: i0,
|
|
1114
|
+
type: MatSidenavModule,
|
|
1115
|
+
deps: [],
|
|
1116
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
1117
|
+
});
|
|
1118
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1119
|
+
minVersion: "14.0.0",
|
|
1120
|
+
version: "20.2.0-next.2",
|
|
1121
|
+
ngImport: i0,
|
|
1122
|
+
type: MatSidenavModule,
|
|
1123
|
+
imports: [CdkScrollableModule, MatDrawer, MatDrawerContainer, MatDrawerContent, MatSidenav, MatSidenavContainer, MatSidenavContent],
|
|
1124
|
+
exports: [BidiModule, CdkScrollableModule, MatDrawer, MatDrawerContainer, MatDrawerContent, MatSidenav, MatSidenavContainer, MatSidenavContent]
|
|
1125
|
+
});
|
|
1126
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
1127
|
+
minVersion: "12.0.0",
|
|
1128
|
+
version: "20.2.0-next.2",
|
|
1129
|
+
ngImport: i0,
|
|
1130
|
+
type: MatSidenavModule,
|
|
1131
|
+
imports: [CdkScrollableModule, BidiModule, CdkScrollableModule]
|
|
1132
|
+
});
|
|
1039
1133
|
}
|
|
1040
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
BidiModule,
|
|
1054
|
-
CdkScrollableModule,
|
|
1055
|
-
MatDrawer,
|
|
1056
|
-
MatDrawerContainer,
|
|
1057
|
-
MatDrawerContent,
|
|
1058
|
-
MatSidenav,
|
|
1059
|
-
MatSidenavContainer,
|
|
1060
|
-
MatSidenavContent,
|
|
1061
|
-
],
|
|
1062
|
-
}]
|
|
1063
|
-
}] });
|
|
1134
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1135
|
+
minVersion: "12.0.0",
|
|
1136
|
+
version: "20.2.0-next.2",
|
|
1137
|
+
ngImport: i0,
|
|
1138
|
+
type: MatSidenavModule,
|
|
1139
|
+
decorators: [{
|
|
1140
|
+
type: NgModule,
|
|
1141
|
+
args: [{
|
|
1142
|
+
imports: [CdkScrollableModule, MatDrawer, MatDrawerContainer, MatDrawerContent, MatSidenav, MatSidenavContainer, MatSidenavContent],
|
|
1143
|
+
exports: [BidiModule, CdkScrollableModule, MatDrawer, MatDrawerContainer, MatDrawerContent, MatSidenav, MatSidenavContainer, MatSidenavContent]
|
|
1144
|
+
}]
|
|
1145
|
+
}]
|
|
1146
|
+
});
|
|
1064
1147
|
|
|
1065
1148
|
export { MAT_DRAWER_DEFAULT_AUTOSIZE, MatDrawer, MatDrawerContainer, MatDrawerContent, MatSidenav, MatSidenavContainer, MatSidenavContent, MatSidenavModule, throwMatDuplicatedDrawerError };
|
|
1066
1149
|
//# sourceMappingURL=sidenav.mjs.map
|