@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/dialog.mjs
CHANGED
|
@@ -8,885 +8,866 @@ import { CdkDialogContainer, Dialog, DialogConfig, DialogModule } from '@angular
|
|
|
8
8
|
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
9
9
|
import { CdkPortalOutlet, PortalModule } from '@angular/cdk/portal';
|
|
10
10
|
import { _animationsDisabled } from './_animation-chunk.mjs';
|
|
11
|
-
import {
|
|
11
|
+
import { ReplaySubject, merge, Subject, defer } from 'rxjs';
|
|
12
12
|
import { filter, take, startWith } from 'rxjs/operators';
|
|
13
13
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
14
14
|
import { BidiModule } from '@angular/cdk/bidi';
|
|
15
15
|
import '@angular/cdk/layout';
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Configuration for opening a modal dialog with the MatDialog service.
|
|
19
|
-
*/
|
|
20
17
|
class MatDialogConfig {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
height = '';
|
|
51
|
-
/** Min-width of the dialog. If a number is provided, assumes pixel units. */
|
|
52
|
-
minWidth;
|
|
53
|
-
/** Min-height of the dialog. If a number is provided, assumes pixel units. */
|
|
54
|
-
minHeight;
|
|
55
|
-
/** Max-width of the dialog. If a number is provided, assumes pixel units. */
|
|
56
|
-
maxWidth;
|
|
57
|
-
/** Max-height of the dialog. If a number is provided, assumes pixel units. */
|
|
58
|
-
maxHeight;
|
|
59
|
-
/** Position overrides. */
|
|
60
|
-
position;
|
|
61
|
-
/** Data being injected into the child component. */
|
|
62
|
-
data = null;
|
|
63
|
-
/** Layout direction for the dialog's content. */
|
|
64
|
-
direction;
|
|
65
|
-
/** ID of the element that describes the dialog. */
|
|
66
|
-
ariaDescribedBy = null;
|
|
67
|
-
/** ID of the element that labels the dialog. */
|
|
68
|
-
ariaLabelledBy = null;
|
|
69
|
-
/** Aria label to assign to the dialog element. */
|
|
70
|
-
ariaLabel = null;
|
|
71
|
-
/**
|
|
72
|
-
* Whether this is a modal dialog. Used to set the `aria-modal` attribute. Off by default,
|
|
73
|
-
* because it can interfere with other overlay-based components (e.g. `mat-select`) and because
|
|
74
|
-
* it is redundant since the dialog marks all outside content as `aria-hidden` anyway.
|
|
75
|
-
*/
|
|
76
|
-
ariaModal = false;
|
|
77
|
-
/**
|
|
78
|
-
* Where the dialog should focus on open.
|
|
79
|
-
* @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
|
|
80
|
-
* AutoFocusTarget instead.
|
|
81
|
-
*/
|
|
82
|
-
autoFocus = 'first-tabbable';
|
|
83
|
-
/**
|
|
84
|
-
* Whether the dialog should restore focus to the
|
|
85
|
-
* previously-focused element, after it's closed.
|
|
86
|
-
*/
|
|
87
|
-
restoreFocus = true;
|
|
88
|
-
/** Whether to wait for the opening animation to finish before trapping focus. */
|
|
89
|
-
delayFocusTrap = true;
|
|
90
|
-
/** Scroll strategy to be used for the dialog. */
|
|
91
|
-
scrollStrategy;
|
|
92
|
-
/**
|
|
93
|
-
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
94
|
-
* Note that this usually doesn't include clicking on links (unless the user is using
|
|
95
|
-
* the `HashLocationStrategy`).
|
|
96
|
-
*/
|
|
97
|
-
closeOnNavigation = true;
|
|
98
|
-
/**
|
|
99
|
-
* Duration of the enter animation in ms.
|
|
100
|
-
* Should be a number, string type is deprecated.
|
|
101
|
-
* @breaking-change 17.0.0 Remove string signature.
|
|
102
|
-
*/
|
|
103
|
-
enterAnimationDuration;
|
|
104
|
-
/**
|
|
105
|
-
* Duration of the exit animation in ms.
|
|
106
|
-
* Should be a number, string type is deprecated.
|
|
107
|
-
* @breaking-change 17.0.0 Remove string signature.
|
|
108
|
-
*/
|
|
109
|
-
exitAnimationDuration;
|
|
18
|
+
viewContainerRef;
|
|
19
|
+
injector;
|
|
20
|
+
id;
|
|
21
|
+
role = 'dialog';
|
|
22
|
+
panelClass = '';
|
|
23
|
+
hasBackdrop = true;
|
|
24
|
+
backdropClass = '';
|
|
25
|
+
disableClose = false;
|
|
26
|
+
closePredicate;
|
|
27
|
+
width = '';
|
|
28
|
+
height = '';
|
|
29
|
+
minWidth;
|
|
30
|
+
minHeight;
|
|
31
|
+
maxWidth;
|
|
32
|
+
maxHeight;
|
|
33
|
+
position;
|
|
34
|
+
data = null;
|
|
35
|
+
direction;
|
|
36
|
+
ariaDescribedBy = null;
|
|
37
|
+
ariaLabelledBy = null;
|
|
38
|
+
ariaLabel = null;
|
|
39
|
+
ariaModal = false;
|
|
40
|
+
autoFocus = 'first-tabbable';
|
|
41
|
+
restoreFocus = true;
|
|
42
|
+
delayFocusTrap = true;
|
|
43
|
+
scrollStrategy;
|
|
44
|
+
closeOnNavigation = true;
|
|
45
|
+
enterAnimationDuration;
|
|
46
|
+
exitAnimationDuration;
|
|
110
47
|
}
|
|
111
48
|
|
|
112
|
-
/** Class added when the dialog is open. */
|
|
113
49
|
const OPEN_CLASS = 'mdc-dialog--open';
|
|
114
|
-
/** Class added while the dialog is opening. */
|
|
115
50
|
const OPENING_CLASS = 'mdc-dialog--opening';
|
|
116
|
-
/** Class added while the dialog is closing. */
|
|
117
51
|
const CLOSING_CLASS = 'mdc-dialog--closing';
|
|
118
|
-
/** Duration of the opening animation in milliseconds. */
|
|
119
52
|
const OPEN_ANIMATION_DURATION = 150;
|
|
120
|
-
/** Duration of the closing animation in milliseconds. */
|
|
121
53
|
const CLOSE_ANIMATION_DURATION = 75;
|
|
122
54
|
class MatDialogContainer extends CdkDialogContainer {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
this._trapFocus();
|
|
266
|
-
}
|
|
267
|
-
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
268
|
-
}
|
|
269
|
-
ngOnDestroy() {
|
|
270
|
-
super.ngOnDestroy();
|
|
271
|
-
if (this._animationTimer !== null) {
|
|
272
|
-
clearTimeout(this._animationTimer);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
attachComponentPortal(portal) {
|
|
276
|
-
// When a component is passed into the dialog, the host element interrupts
|
|
277
|
-
// the `display:flex` from affecting the dialog title, content, and
|
|
278
|
-
// actions. To fix this, we make the component host `display: contents` by
|
|
279
|
-
// marking its host with the `mat-mdc-dialog-component-host` class.
|
|
280
|
-
//
|
|
281
|
-
// Note that this problem does not exist when a template ref is used since
|
|
282
|
-
// the title, contents, and actions are then nested directly under the
|
|
283
|
-
// dialog surface.
|
|
284
|
-
const ref = super.attachComponentPortal(portal);
|
|
285
|
-
ref.location.nativeElement.classList.add('mat-mdc-dialog-component-host');
|
|
286
|
-
return ref;
|
|
287
|
-
}
|
|
288
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
289
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatDialogContainer, isStandalone: true, selector: "mat-dialog-container", host: { attributes: { "tabindex": "-1" }, properties: { "attr.aria-modal": "_config.ariaModal", "id": "_config.id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByQueue[0]", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null", "class._mat-animation-noopable": "!_animationsEnabled", "class.mat-mdc-dialog-container-with-actions": "_actionSectionCount > 0" }, classAttribute: "mat-mdc-dialog-container mdc-dialog" }, usesInheritance: true, ngImport: i0, template: "<div class=\"mat-mdc-dialog-inner-container mdc-dialog__container\">\n <div class=\"mat-mdc-dialog-surface mdc-dialog__surface\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n", styles: [".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
55
|
+
_animationStateChanged = new EventEmitter();
|
|
56
|
+
_animationsEnabled = !_animationsDisabled();
|
|
57
|
+
_actionSectionCount = 0;
|
|
58
|
+
_hostElement = this._elementRef.nativeElement;
|
|
59
|
+
_enterAnimationDuration = this._animationsEnabled ? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION : 0;
|
|
60
|
+
_exitAnimationDuration = this._animationsEnabled ? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION : 0;
|
|
61
|
+
_animationTimer = null;
|
|
62
|
+
_contentAttached() {
|
|
63
|
+
super._contentAttached();
|
|
64
|
+
this._startOpenAnimation();
|
|
65
|
+
}
|
|
66
|
+
_startOpenAnimation() {
|
|
67
|
+
this._animationStateChanged.emit({
|
|
68
|
+
state: 'opening',
|
|
69
|
+
totalTime: this._enterAnimationDuration
|
|
70
|
+
});
|
|
71
|
+
if (this._animationsEnabled) {
|
|
72
|
+
this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._enterAnimationDuration}ms`);
|
|
73
|
+
this._requestAnimationFrame(() => this._hostElement.classList.add(OPENING_CLASS, OPEN_CLASS));
|
|
74
|
+
this._waitForAnimationToComplete(this._enterAnimationDuration, this._finishDialogOpen);
|
|
75
|
+
} else {
|
|
76
|
+
this._hostElement.classList.add(OPEN_CLASS);
|
|
77
|
+
Promise.resolve().then(() => this._finishDialogOpen());
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
_startExitAnimation() {
|
|
81
|
+
this._animationStateChanged.emit({
|
|
82
|
+
state: 'closing',
|
|
83
|
+
totalTime: this._exitAnimationDuration
|
|
84
|
+
});
|
|
85
|
+
this._hostElement.classList.remove(OPEN_CLASS);
|
|
86
|
+
if (this._animationsEnabled) {
|
|
87
|
+
this._hostElement.style.setProperty(TRANSITION_DURATION_PROPERTY, `${this._exitAnimationDuration}ms`);
|
|
88
|
+
this._requestAnimationFrame(() => this._hostElement.classList.add(CLOSING_CLASS));
|
|
89
|
+
this._waitForAnimationToComplete(this._exitAnimationDuration, this._finishDialogClose);
|
|
90
|
+
} else {
|
|
91
|
+
Promise.resolve().then(() => this._finishDialogClose());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
_updateActionSectionCount(delta) {
|
|
95
|
+
this._actionSectionCount += delta;
|
|
96
|
+
this._changeDetectorRef.markForCheck();
|
|
97
|
+
}
|
|
98
|
+
_finishDialogOpen = () => {
|
|
99
|
+
this._clearAnimationClasses();
|
|
100
|
+
this._openAnimationDone(this._enterAnimationDuration);
|
|
101
|
+
};
|
|
102
|
+
_finishDialogClose = () => {
|
|
103
|
+
this._clearAnimationClasses();
|
|
104
|
+
this._animationStateChanged.emit({
|
|
105
|
+
state: 'closed',
|
|
106
|
+
totalTime: this._exitAnimationDuration
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
_clearAnimationClasses() {
|
|
110
|
+
this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);
|
|
111
|
+
}
|
|
112
|
+
_waitForAnimationToComplete(duration, callback) {
|
|
113
|
+
if (this._animationTimer !== null) {
|
|
114
|
+
clearTimeout(this._animationTimer);
|
|
115
|
+
}
|
|
116
|
+
this._animationTimer = setTimeout(callback, duration);
|
|
117
|
+
}
|
|
118
|
+
_requestAnimationFrame(callback) {
|
|
119
|
+
this._ngZone.runOutsideAngular(() => {
|
|
120
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
121
|
+
requestAnimationFrame(callback);
|
|
122
|
+
} else {
|
|
123
|
+
callback();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
_captureInitialFocus() {
|
|
128
|
+
if (!this._config.delayFocusTrap) {
|
|
129
|
+
this._trapFocus();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
_openAnimationDone(totalTime) {
|
|
133
|
+
if (this._config.delayFocusTrap) {
|
|
134
|
+
this._trapFocus();
|
|
135
|
+
}
|
|
136
|
+
this._animationStateChanged.next({
|
|
137
|
+
state: 'opened',
|
|
138
|
+
totalTime
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
ngOnDestroy() {
|
|
142
|
+
super.ngOnDestroy();
|
|
143
|
+
if (this._animationTimer !== null) {
|
|
144
|
+
clearTimeout(this._animationTimer);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
attachComponentPortal(portal) {
|
|
148
|
+
const ref = super.attachComponentPortal(portal);
|
|
149
|
+
ref.location.nativeElement.classList.add('mat-mdc-dialog-component-host');
|
|
150
|
+
return ref;
|
|
151
|
+
}
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
153
|
+
minVersion: "12.0.0",
|
|
154
|
+
version: "20.2.0-next.2",
|
|
155
|
+
ngImport: i0,
|
|
156
|
+
type: MatDialogContainer,
|
|
157
|
+
deps: null,
|
|
158
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
159
|
+
});
|
|
160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
161
|
+
minVersion: "14.0.0",
|
|
162
|
+
version: "20.2.0-next.2",
|
|
163
|
+
type: MatDialogContainer,
|
|
164
|
+
isStandalone: true,
|
|
165
|
+
selector: "mat-dialog-container",
|
|
166
|
+
host: {
|
|
167
|
+
attributes: {
|
|
168
|
+
"tabindex": "-1"
|
|
169
|
+
},
|
|
170
|
+
properties: {
|
|
171
|
+
"attr.aria-modal": "_config.ariaModal",
|
|
172
|
+
"id": "_config.id",
|
|
173
|
+
"attr.role": "_config.role",
|
|
174
|
+
"attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledByQueue[0]",
|
|
175
|
+
"attr.aria-label": "_config.ariaLabel",
|
|
176
|
+
"attr.aria-describedby": "_config.ariaDescribedBy || null",
|
|
177
|
+
"class._mat-animation-noopable": "!_animationsEnabled",
|
|
178
|
+
"class.mat-mdc-dialog-container-with-actions": "_actionSectionCount > 0"
|
|
179
|
+
},
|
|
180
|
+
classAttribute: "mat-mdc-dialog-container mdc-dialog"
|
|
181
|
+
},
|
|
182
|
+
usesInheritance: true,
|
|
183
|
+
ngImport: i0,
|
|
184
|
+
template: "<div class=\"mat-mdc-dialog-inner-container mdc-dialog__container\">\n <div class=\"mat-mdc-dialog-surface mdc-dialog__surface\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n",
|
|
185
|
+
styles: [".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}\n"],
|
|
186
|
+
dependencies: [{
|
|
187
|
+
kind: "directive",
|
|
188
|
+
type: CdkPortalOutlet,
|
|
189
|
+
selector: "[cdkPortalOutlet]",
|
|
190
|
+
inputs: ["cdkPortalOutlet"],
|
|
191
|
+
outputs: ["attached"],
|
|
192
|
+
exportAs: ["cdkPortalOutlet"]
|
|
193
|
+
}],
|
|
194
|
+
changeDetection: i0.ChangeDetectionStrategy.Default,
|
|
195
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
196
|
+
});
|
|
290
197
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
199
|
+
minVersion: "12.0.0",
|
|
200
|
+
version: "20.2.0-next.2",
|
|
201
|
+
ngImport: i0,
|
|
202
|
+
type: MatDialogContainer,
|
|
203
|
+
decorators: [{
|
|
204
|
+
type: Component,
|
|
205
|
+
args: [{
|
|
206
|
+
selector: 'mat-dialog-container',
|
|
207
|
+
encapsulation: ViewEncapsulation.None,
|
|
208
|
+
changeDetection: ChangeDetectionStrategy.Default,
|
|
209
|
+
imports: [CdkPortalOutlet],
|
|
210
|
+
host: {
|
|
211
|
+
'class': 'mat-mdc-dialog-container mdc-dialog',
|
|
212
|
+
'tabindex': '-1',
|
|
213
|
+
'[attr.aria-modal]': '_config.ariaModal',
|
|
214
|
+
'[id]': '_config.id',
|
|
215
|
+
'[attr.role]': '_config.role',
|
|
216
|
+
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]',
|
|
217
|
+
'[attr.aria-label]': '_config.ariaLabel',
|
|
218
|
+
'[attr.aria-describedby]': '_config.ariaDescribedBy || null',
|
|
219
|
+
'[class._mat-animation-noopable]': '!_animationsEnabled',
|
|
220
|
+
'[class.mat-mdc-dialog-container-with-actions]': '_actionSectionCount > 0'
|
|
221
|
+
},
|
|
222
|
+
template: "<div class=\"mat-mdc-dialog-inner-container mdc-dialog__container\">\n <div class=\"mat-mdc-dialog-surface mdc-dialog__surface\">\n <ng-template cdkPortalOutlet />\n </div>\n</div>\n",
|
|
223
|
+
styles: [".mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mat-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mat-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:\"\";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:\"\";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mat-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mat-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mat-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mat-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mat-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mat-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mat-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mat-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mat-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mat-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mat-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mat-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;box-sizing:border-box;min-height:52px;margin:0;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}\n"]
|
|
224
|
+
}]
|
|
225
|
+
}]
|
|
226
|
+
});
|
|
306
227
|
const TRANSITION_DURATION_PROPERTY = '--mat-dialog-transition-duration';
|
|
307
|
-
// TODO(mmalerba): Remove this function after animation durations are required
|
|
308
|
-
// to be numbers.
|
|
309
|
-
/**
|
|
310
|
-
* Converts a CSS time string to a number in ms. If the given time is already a
|
|
311
|
-
* number, it is assumed to be in ms.
|
|
312
|
-
*/
|
|
313
228
|
function parseCssTime(time) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
229
|
+
if (time == null) {
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
if (typeof time === 'number') {
|
|
233
|
+
return time;
|
|
234
|
+
}
|
|
235
|
+
if (time.endsWith('ms')) {
|
|
236
|
+
return coerceNumberProperty(time.substring(0, time.length - 2));
|
|
237
|
+
}
|
|
238
|
+
if (time.endsWith('s')) {
|
|
239
|
+
return coerceNumberProperty(time.substring(0, time.length - 1)) * 1000;
|
|
240
|
+
}
|
|
241
|
+
if (time === '0') {
|
|
242
|
+
return 0;
|
|
243
|
+
}
|
|
244
|
+
return null;
|
|
330
245
|
}
|
|
331
246
|
|
|
332
247
|
var MatDialogState;
|
|
333
248
|
(function (MatDialogState) {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
249
|
+
MatDialogState[MatDialogState["OPEN"] = 0] = "OPEN";
|
|
250
|
+
MatDialogState[MatDialogState["CLOSING"] = 1] = "CLOSING";
|
|
251
|
+
MatDialogState[MatDialogState["CLOSED"] = 2] = "CLOSED";
|
|
337
252
|
})(MatDialogState || (MatDialogState = {}));
|
|
338
|
-
/**
|
|
339
|
-
* Reference to a dialog opened via the MatDialog service.
|
|
340
|
-
*/
|
|
341
253
|
class MatDialogRef {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
return this._beforeClosed;
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Gets an observable that emits when the overlay's backdrop has been clicked.
|
|
453
|
-
*/
|
|
454
|
-
backdropClick() {
|
|
455
|
-
return this._ref.backdropClick;
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Gets an observable that emits when keydown events are targeted on the overlay.
|
|
459
|
-
*/
|
|
460
|
-
keydownEvents() {
|
|
461
|
-
return this._ref.keydownEvents;
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* Updates the dialog's position.
|
|
465
|
-
* @param position New dialog position.
|
|
466
|
-
*/
|
|
467
|
-
updatePosition(position) {
|
|
468
|
-
let strategy = this._ref.config.positionStrategy;
|
|
469
|
-
if (position && (position.left || position.right)) {
|
|
470
|
-
position.left ? strategy.left(position.left) : strategy.right(position.right);
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
strategy.centerHorizontally();
|
|
474
|
-
}
|
|
475
|
-
if (position && (position.top || position.bottom)) {
|
|
476
|
-
position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
strategy.centerVertically();
|
|
480
|
-
}
|
|
481
|
-
this._ref.updatePosition();
|
|
482
|
-
return this;
|
|
483
|
-
}
|
|
484
|
-
/**
|
|
485
|
-
* Updates the dialog's width and height.
|
|
486
|
-
* @param width New width of the dialog.
|
|
487
|
-
* @param height New height of the dialog.
|
|
488
|
-
*/
|
|
489
|
-
updateSize(width = '', height = '') {
|
|
490
|
-
this._ref.updateSize(width, height);
|
|
491
|
-
return this;
|
|
492
|
-
}
|
|
493
|
-
/** Add a CSS class or an array of classes to the overlay pane. */
|
|
494
|
-
addPanelClass(classes) {
|
|
495
|
-
this._ref.addPanelClass(classes);
|
|
496
|
-
return this;
|
|
497
|
-
}
|
|
498
|
-
/** Remove a CSS class or an array of classes from the overlay pane. */
|
|
499
|
-
removePanelClass(classes) {
|
|
500
|
-
this._ref.removePanelClass(classes);
|
|
501
|
-
return this;
|
|
502
|
-
}
|
|
503
|
-
/** Gets the current state of the dialog's lifecycle. */
|
|
504
|
-
getState() {
|
|
505
|
-
return this._state;
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* Finishes the dialog close by updating the state of the dialog
|
|
509
|
-
* and disposing the overlay.
|
|
510
|
-
*/
|
|
511
|
-
_finishDialogClose() {
|
|
512
|
-
this._state = MatDialogState.CLOSED;
|
|
513
|
-
this._ref.close(this._result, { focusOrigin: this._closeInteractionType });
|
|
514
|
-
this.componentInstance = null;
|
|
515
|
-
}
|
|
254
|
+
_ref;
|
|
255
|
+
_config;
|
|
256
|
+
_containerInstance;
|
|
257
|
+
componentInstance;
|
|
258
|
+
componentRef;
|
|
259
|
+
disableClose;
|
|
260
|
+
id;
|
|
261
|
+
_afterOpened = new ReplaySubject(1);
|
|
262
|
+
_beforeClosed = new ReplaySubject(1);
|
|
263
|
+
_result;
|
|
264
|
+
_closeFallbackTimeout;
|
|
265
|
+
_state = MatDialogState.OPEN;
|
|
266
|
+
_closeInteractionType;
|
|
267
|
+
constructor(_ref, _config, _containerInstance) {
|
|
268
|
+
this._ref = _ref;
|
|
269
|
+
this._config = _config;
|
|
270
|
+
this._containerInstance = _containerInstance;
|
|
271
|
+
this.disableClose = _config.disableClose;
|
|
272
|
+
this.id = _ref.id;
|
|
273
|
+
_ref.addPanelClass('mat-mdc-dialog-panel');
|
|
274
|
+
_containerInstance._animationStateChanged.pipe(filter(event => event.state === 'opened'), take(1)).subscribe(() => {
|
|
275
|
+
this._afterOpened.next();
|
|
276
|
+
this._afterOpened.complete();
|
|
277
|
+
});
|
|
278
|
+
_containerInstance._animationStateChanged.pipe(filter(event => event.state === 'closed'), take(1)).subscribe(() => {
|
|
279
|
+
clearTimeout(this._closeFallbackTimeout);
|
|
280
|
+
this._finishDialogClose();
|
|
281
|
+
});
|
|
282
|
+
_ref.overlayRef.detachments().subscribe(() => {
|
|
283
|
+
this._beforeClosed.next(this._result);
|
|
284
|
+
this._beforeClosed.complete();
|
|
285
|
+
this._finishDialogClose();
|
|
286
|
+
});
|
|
287
|
+
merge(this.backdropClick(), this.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event)))).subscribe(event => {
|
|
288
|
+
if (!this.disableClose) {
|
|
289
|
+
event.preventDefault();
|
|
290
|
+
_closeDialogVia(this, event.type === 'keydown' ? 'keyboard' : 'mouse');
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
close(dialogResult) {
|
|
295
|
+
const closePredicate = this._config.closePredicate;
|
|
296
|
+
if (closePredicate && !closePredicate(dialogResult, this._config, this.componentInstance)) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
this._result = dialogResult;
|
|
300
|
+
this._containerInstance._animationStateChanged.pipe(filter(event => event.state === 'closing'), take(1)).subscribe(event => {
|
|
301
|
+
this._beforeClosed.next(dialogResult);
|
|
302
|
+
this._beforeClosed.complete();
|
|
303
|
+
this._ref.overlayRef.detachBackdrop();
|
|
304
|
+
this._closeFallbackTimeout = setTimeout(() => this._finishDialogClose(), event.totalTime + 100);
|
|
305
|
+
});
|
|
306
|
+
this._state = MatDialogState.CLOSING;
|
|
307
|
+
this._containerInstance._startExitAnimation();
|
|
308
|
+
}
|
|
309
|
+
afterOpened() {
|
|
310
|
+
return this._afterOpened;
|
|
311
|
+
}
|
|
312
|
+
afterClosed() {
|
|
313
|
+
return this._ref.closed;
|
|
314
|
+
}
|
|
315
|
+
beforeClosed() {
|
|
316
|
+
return this._beforeClosed;
|
|
317
|
+
}
|
|
318
|
+
backdropClick() {
|
|
319
|
+
return this._ref.backdropClick;
|
|
320
|
+
}
|
|
321
|
+
keydownEvents() {
|
|
322
|
+
return this._ref.keydownEvents;
|
|
323
|
+
}
|
|
324
|
+
updatePosition(position) {
|
|
325
|
+
let strategy = this._ref.config.positionStrategy;
|
|
326
|
+
if (position && (position.left || position.right)) {
|
|
327
|
+
position.left ? strategy.left(position.left) : strategy.right(position.right);
|
|
328
|
+
} else {
|
|
329
|
+
strategy.centerHorizontally();
|
|
330
|
+
}
|
|
331
|
+
if (position && (position.top || position.bottom)) {
|
|
332
|
+
position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);
|
|
333
|
+
} else {
|
|
334
|
+
strategy.centerVertically();
|
|
335
|
+
}
|
|
336
|
+
this._ref.updatePosition();
|
|
337
|
+
return this;
|
|
338
|
+
}
|
|
339
|
+
updateSize(width = '', height = '') {
|
|
340
|
+
this._ref.updateSize(width, height);
|
|
341
|
+
return this;
|
|
342
|
+
}
|
|
343
|
+
addPanelClass(classes) {
|
|
344
|
+
this._ref.addPanelClass(classes);
|
|
345
|
+
return this;
|
|
346
|
+
}
|
|
347
|
+
removePanelClass(classes) {
|
|
348
|
+
this._ref.removePanelClass(classes);
|
|
349
|
+
return this;
|
|
350
|
+
}
|
|
351
|
+
getState() {
|
|
352
|
+
return this._state;
|
|
353
|
+
}
|
|
354
|
+
_finishDialogClose() {
|
|
355
|
+
this._state = MatDialogState.CLOSED;
|
|
356
|
+
this._ref.close(this._result, {
|
|
357
|
+
focusOrigin: this._closeInteractionType
|
|
358
|
+
});
|
|
359
|
+
this.componentInstance = null;
|
|
360
|
+
}
|
|
516
361
|
}
|
|
517
|
-
/**
|
|
518
|
-
* Closes the dialog with the specified interaction type. This is currently not part of
|
|
519
|
-
* `MatDialogRef` as that would conflict with custom dialog ref mocks provided in tests.
|
|
520
|
-
* More details. See: https://github.com/angular/components/pull/9257#issuecomment-651342226.
|
|
521
|
-
*/
|
|
522
|
-
// TODO: Move this back into `MatDialogRef` when we provide an official mock dialog ref.
|
|
523
362
|
function _closeDialogVia(ref, interactionType, result) {
|
|
524
|
-
|
|
525
|
-
|
|
363
|
+
ref._closeInteractionType = interactionType;
|
|
364
|
+
return ref.close(result);
|
|
526
365
|
}
|
|
527
366
|
|
|
528
|
-
/** Injection token that can be used to access the data that was passed in to a dialog. */
|
|
529
367
|
const MAT_DIALOG_DATA = new InjectionToken('MatMdcDialogData');
|
|
530
|
-
/** Injection token that can be used to specify default dialog options. */
|
|
531
368
|
const MAT_DIALOG_DEFAULT_OPTIONS = new InjectionToken('mat-mdc-dialog-default-options');
|
|
532
|
-
/** Injection token that determines the scroll handling while the dialog is open. */
|
|
533
369
|
const MAT_DIALOG_SCROLL_STRATEGY = new InjectionToken('mat-mdc-dialog-scroll-strategy', {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
370
|
+
providedIn: 'root',
|
|
371
|
+
factory: () => {
|
|
372
|
+
const injector = inject(Injector);
|
|
373
|
+
return () => createBlockScrollStrategy(injector);
|
|
374
|
+
}
|
|
539
375
|
});
|
|
540
|
-
/**
|
|
541
|
-
* Service to open Material Design modal dialogs.
|
|
542
|
-
*/
|
|
543
376
|
class MatDialog {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
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
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
this.openDialogs.
|
|
632
|
-
|
|
633
|
-
dialogRef.afterClosed().subscribe(() => {
|
|
634
|
-
const index = this.openDialogs.indexOf(dialogRef);
|
|
635
|
-
if (index > -1) {
|
|
636
|
-
this.openDialogs.splice(index, 1);
|
|
637
|
-
if (!this.openDialogs.length) {
|
|
638
|
-
this._getAfterAllClosed().next();
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
});
|
|
642
|
-
return dialogRef;
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* Closes all of the currently-open dialogs.
|
|
646
|
-
*/
|
|
647
|
-
closeAll() {
|
|
648
|
-
this._closeDialogs(this.openDialogs);
|
|
649
|
-
}
|
|
650
|
-
/**
|
|
651
|
-
* Finds an open dialog by its id.
|
|
652
|
-
* @param id ID to use when looking up the dialog.
|
|
653
|
-
*/
|
|
654
|
-
getDialogById(id) {
|
|
655
|
-
return this.openDialogs.find(dialog => dialog.id === id);
|
|
656
|
-
}
|
|
657
|
-
ngOnDestroy() {
|
|
658
|
-
// Only close the dialogs at this level on destroy
|
|
659
|
-
// since the parent service may still be active.
|
|
660
|
-
this._closeDialogs(this._openDialogsAtThisLevel);
|
|
661
|
-
this._afterAllClosedAtThisLevel.complete();
|
|
662
|
-
this._afterOpenedAtThisLevel.complete();
|
|
663
|
-
}
|
|
664
|
-
_closeDialogs(dialogs) {
|
|
665
|
-
let i = dialogs.length;
|
|
666
|
-
while (i--) {
|
|
667
|
-
dialogs[i].close();
|
|
377
|
+
_defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, {
|
|
378
|
+
optional: true
|
|
379
|
+
});
|
|
380
|
+
_scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);
|
|
381
|
+
_parentDialog = inject(MatDialog, {
|
|
382
|
+
optional: true,
|
|
383
|
+
skipSelf: true
|
|
384
|
+
});
|
|
385
|
+
_idGenerator = inject(_IdGenerator);
|
|
386
|
+
_injector = inject(Injector);
|
|
387
|
+
_dialog = inject(Dialog);
|
|
388
|
+
_animationsDisabled = _animationsDisabled();
|
|
389
|
+
_openDialogsAtThisLevel = [];
|
|
390
|
+
_afterAllClosedAtThisLevel = new Subject();
|
|
391
|
+
_afterOpenedAtThisLevel = new Subject();
|
|
392
|
+
dialogConfigClass = MatDialogConfig;
|
|
393
|
+
_dialogRefConstructor;
|
|
394
|
+
_dialogContainerType;
|
|
395
|
+
_dialogDataToken;
|
|
396
|
+
get openDialogs() {
|
|
397
|
+
return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
|
|
398
|
+
}
|
|
399
|
+
get afterOpened() {
|
|
400
|
+
return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpenedAtThisLevel;
|
|
401
|
+
}
|
|
402
|
+
_getAfterAllClosed() {
|
|
403
|
+
const parent = this._parentDialog;
|
|
404
|
+
return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;
|
|
405
|
+
}
|
|
406
|
+
afterAllClosed = defer(() => this.openDialogs.length ? this._getAfterAllClosed() : this._getAfterAllClosed().pipe(startWith(undefined)));
|
|
407
|
+
constructor() {
|
|
408
|
+
this._dialogRefConstructor = MatDialogRef;
|
|
409
|
+
this._dialogContainerType = MatDialogContainer;
|
|
410
|
+
this._dialogDataToken = MAT_DIALOG_DATA;
|
|
411
|
+
}
|
|
412
|
+
open(componentOrTemplateRef, config) {
|
|
413
|
+
let dialogRef;
|
|
414
|
+
config = {
|
|
415
|
+
...(this._defaultOptions || new MatDialogConfig()),
|
|
416
|
+
...config
|
|
417
|
+
};
|
|
418
|
+
config.id = config.id || this._idGenerator.getId('mat-mdc-dialog-');
|
|
419
|
+
config.scrollStrategy = config.scrollStrategy || this._scrollStrategy();
|
|
420
|
+
const cdkRef = this._dialog.open(componentOrTemplateRef, {
|
|
421
|
+
...config,
|
|
422
|
+
positionStrategy: createGlobalPositionStrategy(this._injector).centerHorizontally().centerVertically(),
|
|
423
|
+
disableClose: true,
|
|
424
|
+
closePredicate: undefined,
|
|
425
|
+
closeOnDestroy: false,
|
|
426
|
+
closeOnOverlayDetachments: false,
|
|
427
|
+
disableAnimations: this._animationsDisabled || config.enterAnimationDuration?.toLocaleString() === '0' || config.exitAnimationDuration?.toString() === '0',
|
|
428
|
+
container: {
|
|
429
|
+
type: this._dialogContainerType,
|
|
430
|
+
providers: () => [{
|
|
431
|
+
provide: this.dialogConfigClass,
|
|
432
|
+
useValue: config
|
|
433
|
+
}, {
|
|
434
|
+
provide: DialogConfig,
|
|
435
|
+
useValue: config
|
|
436
|
+
}]
|
|
437
|
+
},
|
|
438
|
+
templateContext: () => ({
|
|
439
|
+
dialogRef
|
|
440
|
+
}),
|
|
441
|
+
providers: (ref, cdkConfig, dialogContainer) => {
|
|
442
|
+
dialogRef = new this._dialogRefConstructor(ref, config, dialogContainer);
|
|
443
|
+
dialogRef.updatePosition(config?.position);
|
|
444
|
+
return [{
|
|
445
|
+
provide: this._dialogContainerType,
|
|
446
|
+
useValue: dialogContainer
|
|
447
|
+
}, {
|
|
448
|
+
provide: this._dialogDataToken,
|
|
449
|
+
useValue: cdkConfig.data
|
|
450
|
+
}, {
|
|
451
|
+
provide: this._dialogRefConstructor,
|
|
452
|
+
useValue: dialogRef
|
|
453
|
+
}];
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
dialogRef.componentRef = cdkRef.componentRef;
|
|
457
|
+
dialogRef.componentInstance = cdkRef.componentInstance;
|
|
458
|
+
this.openDialogs.push(dialogRef);
|
|
459
|
+
this.afterOpened.next(dialogRef);
|
|
460
|
+
dialogRef.afterClosed().subscribe(() => {
|
|
461
|
+
const index = this.openDialogs.indexOf(dialogRef);
|
|
462
|
+
if (index > -1) {
|
|
463
|
+
this.openDialogs.splice(index, 1);
|
|
464
|
+
if (!this.openDialogs.length) {
|
|
465
|
+
this._getAfterAllClosed().next();
|
|
668
466
|
}
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
return dialogRef;
|
|
470
|
+
}
|
|
471
|
+
closeAll() {
|
|
472
|
+
this._closeDialogs(this.openDialogs);
|
|
473
|
+
}
|
|
474
|
+
getDialogById(id) {
|
|
475
|
+
return this.openDialogs.find(dialog => dialog.id === id);
|
|
476
|
+
}
|
|
477
|
+
ngOnDestroy() {
|
|
478
|
+
this._closeDialogs(this._openDialogsAtThisLevel);
|
|
479
|
+
this._afterAllClosedAtThisLevel.complete();
|
|
480
|
+
this._afterOpenedAtThisLevel.complete();
|
|
481
|
+
}
|
|
482
|
+
_closeDialogs(dialogs) {
|
|
483
|
+
let i = dialogs.length;
|
|
484
|
+
while (i--) {
|
|
485
|
+
dialogs[i].close();
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
489
|
+
minVersion: "12.0.0",
|
|
490
|
+
version: "20.2.0-next.2",
|
|
491
|
+
ngImport: i0,
|
|
492
|
+
type: MatDialog,
|
|
493
|
+
deps: [],
|
|
494
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
495
|
+
});
|
|
496
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
497
|
+
minVersion: "12.0.0",
|
|
498
|
+
version: "20.2.0-next.2",
|
|
499
|
+
ngImport: i0,
|
|
500
|
+
type: MatDialog,
|
|
501
|
+
providedIn: 'root'
|
|
502
|
+
});
|
|
672
503
|
}
|
|
673
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
504
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
505
|
+
minVersion: "12.0.0",
|
|
506
|
+
version: "20.2.0-next.2",
|
|
507
|
+
ngImport: i0,
|
|
508
|
+
type: MatDialog,
|
|
509
|
+
decorators: [{
|
|
510
|
+
type: Injectable,
|
|
511
|
+
args: [{
|
|
512
|
+
providedIn: 'root'
|
|
513
|
+
}]
|
|
514
|
+
}],
|
|
515
|
+
ctorParameters: () => []
|
|
516
|
+
});
|
|
677
517
|
|
|
678
|
-
/**
|
|
679
|
-
* Button that will close the current dialog.
|
|
680
|
-
*/
|
|
681
518
|
class MatDialogClose {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
519
|
+
dialogRef = inject(MatDialogRef, {
|
|
520
|
+
optional: true
|
|
521
|
+
});
|
|
522
|
+
_elementRef = inject(ElementRef);
|
|
523
|
+
_dialog = inject(MatDialog);
|
|
524
|
+
ariaLabel;
|
|
525
|
+
type = 'button';
|
|
526
|
+
dialogResult;
|
|
527
|
+
_matDialogClose;
|
|
528
|
+
constructor() {}
|
|
529
|
+
ngOnInit() {
|
|
530
|
+
if (!this.dialogRef) {
|
|
531
|
+
this.dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
ngOnChanges(changes) {
|
|
535
|
+
const proxiedChange = changes['_matDialogClose'] || changes['_matDialogCloseResult'];
|
|
536
|
+
if (proxiedChange) {
|
|
537
|
+
this.dialogResult = proxiedChange.currentValue;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
_onButtonClick(event) {
|
|
541
|
+
_closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
|
|
542
|
+
}
|
|
543
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
544
|
+
minVersion: "12.0.0",
|
|
545
|
+
version: "20.2.0-next.2",
|
|
546
|
+
ngImport: i0,
|
|
547
|
+
type: MatDialogClose,
|
|
548
|
+
deps: [],
|
|
549
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
550
|
+
});
|
|
551
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
552
|
+
minVersion: "14.0.0",
|
|
553
|
+
version: "20.2.0-next.2",
|
|
554
|
+
type: MatDialogClose,
|
|
555
|
+
isStandalone: true,
|
|
556
|
+
selector: "[mat-dialog-close], [matDialogClose]",
|
|
557
|
+
inputs: {
|
|
558
|
+
ariaLabel: ["aria-label", "ariaLabel"],
|
|
559
|
+
type: "type",
|
|
560
|
+
dialogResult: ["mat-dialog-close", "dialogResult"],
|
|
561
|
+
_matDialogClose: ["matDialogClose", "_matDialogClose"]
|
|
562
|
+
},
|
|
563
|
+
host: {
|
|
564
|
+
listeners: {
|
|
565
|
+
"click": "_onButtonClick($event)"
|
|
566
|
+
},
|
|
567
|
+
properties: {
|
|
568
|
+
"attr.aria-label": "ariaLabel || null",
|
|
569
|
+
"attr.type": "type"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
exportAs: ["matDialogClose"],
|
|
573
|
+
usesOnChanges: true,
|
|
574
|
+
ngImport: i0
|
|
575
|
+
});
|
|
718
576
|
}
|
|
719
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
577
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
578
|
+
minVersion: "12.0.0",
|
|
579
|
+
version: "20.2.0-next.2",
|
|
580
|
+
ngImport: i0,
|
|
581
|
+
type: MatDialogClose,
|
|
582
|
+
decorators: [{
|
|
583
|
+
type: Directive,
|
|
584
|
+
args: [{
|
|
585
|
+
selector: '[mat-dialog-close], [matDialogClose]',
|
|
586
|
+
exportAs: 'matDialogClose',
|
|
587
|
+
host: {
|
|
588
|
+
'(click)': '_onButtonClick($event)',
|
|
589
|
+
'[attr.aria-label]': 'ariaLabel || null',
|
|
590
|
+
'[attr.type]': 'type'
|
|
591
|
+
}
|
|
592
|
+
}]
|
|
593
|
+
}],
|
|
594
|
+
ctorParameters: () => [],
|
|
595
|
+
propDecorators: {
|
|
596
|
+
ariaLabel: [{
|
|
597
|
+
type: Input,
|
|
598
|
+
args: ['aria-label']
|
|
599
|
+
}],
|
|
600
|
+
type: [{
|
|
601
|
+
type: Input
|
|
602
|
+
}],
|
|
603
|
+
dialogResult: [{
|
|
604
|
+
type: Input,
|
|
605
|
+
args: ['mat-dialog-close']
|
|
606
|
+
}],
|
|
607
|
+
_matDialogClose: [{
|
|
608
|
+
type: Input,
|
|
609
|
+
args: ['matDialogClose']
|
|
610
|
+
}]
|
|
611
|
+
}
|
|
612
|
+
});
|
|
742
613
|
class MatDialogLayoutSection {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
614
|
+
_dialogRef = inject(MatDialogRef, {
|
|
615
|
+
optional: true
|
|
616
|
+
});
|
|
617
|
+
_elementRef = inject(ElementRef);
|
|
618
|
+
_dialog = inject(MatDialog);
|
|
619
|
+
constructor() {}
|
|
620
|
+
ngOnInit() {
|
|
621
|
+
if (!this._dialogRef) {
|
|
622
|
+
this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);
|
|
623
|
+
}
|
|
624
|
+
if (this._dialogRef) {
|
|
625
|
+
Promise.resolve().then(() => {
|
|
626
|
+
this._onAdd();
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
ngOnDestroy() {
|
|
631
|
+
const instance = this._dialogRef?._containerInstance;
|
|
632
|
+
if (instance) {
|
|
633
|
+
Promise.resolve().then(() => {
|
|
634
|
+
this._onRemove();
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
639
|
+
minVersion: "12.0.0",
|
|
640
|
+
version: "20.2.0-next.2",
|
|
641
|
+
ngImport: i0,
|
|
642
|
+
type: MatDialogLayoutSection,
|
|
643
|
+
deps: [],
|
|
644
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
645
|
+
});
|
|
646
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
647
|
+
minVersion: "14.0.0",
|
|
648
|
+
version: "20.2.0-next.2",
|
|
649
|
+
type: MatDialogLayoutSection,
|
|
650
|
+
isStandalone: true,
|
|
651
|
+
ngImport: i0
|
|
652
|
+
});
|
|
769
653
|
}
|
|
770
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
654
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
655
|
+
minVersion: "12.0.0",
|
|
656
|
+
version: "20.2.0-next.2",
|
|
657
|
+
ngImport: i0,
|
|
658
|
+
type: MatDialogLayoutSection,
|
|
659
|
+
decorators: [{
|
|
660
|
+
type: Directive
|
|
661
|
+
}],
|
|
662
|
+
ctorParameters: () => []
|
|
663
|
+
});
|
|
776
664
|
class MatDialogTitle extends MatDialogLayoutSection {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
665
|
+
id = inject(_IdGenerator).getId('mat-mdc-dialog-title-');
|
|
666
|
+
_onAdd() {
|
|
667
|
+
this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id);
|
|
668
|
+
}
|
|
669
|
+
_onRemove() {
|
|
670
|
+
this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id);
|
|
671
|
+
}
|
|
672
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
673
|
+
minVersion: "12.0.0",
|
|
674
|
+
version: "20.2.0-next.2",
|
|
675
|
+
ngImport: i0,
|
|
676
|
+
type: MatDialogTitle,
|
|
677
|
+
deps: null,
|
|
678
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
679
|
+
});
|
|
680
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
681
|
+
minVersion: "14.0.0",
|
|
682
|
+
version: "20.2.0-next.2",
|
|
683
|
+
type: MatDialogTitle,
|
|
684
|
+
isStandalone: true,
|
|
685
|
+
selector: "[mat-dialog-title], [matDialogTitle]",
|
|
686
|
+
inputs: {
|
|
687
|
+
id: "id"
|
|
688
|
+
},
|
|
689
|
+
host: {
|
|
690
|
+
properties: {
|
|
691
|
+
"id": "id"
|
|
692
|
+
},
|
|
693
|
+
classAttribute: "mat-mdc-dialog-title mdc-dialog__title"
|
|
694
|
+
},
|
|
695
|
+
exportAs: ["matDialogTitle"],
|
|
696
|
+
usesInheritance: true,
|
|
697
|
+
ngImport: i0
|
|
698
|
+
});
|
|
788
699
|
}
|
|
789
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
700
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
701
|
+
minVersion: "12.0.0",
|
|
702
|
+
version: "20.2.0-next.2",
|
|
703
|
+
ngImport: i0,
|
|
704
|
+
type: MatDialogTitle,
|
|
705
|
+
decorators: [{
|
|
706
|
+
type: Directive,
|
|
707
|
+
args: [{
|
|
708
|
+
selector: '[mat-dialog-title], [matDialogTitle]',
|
|
709
|
+
exportAs: 'matDialogTitle',
|
|
710
|
+
host: {
|
|
711
|
+
'class': 'mat-mdc-dialog-title mdc-dialog__title',
|
|
712
|
+
'[id]': 'id'
|
|
713
|
+
}
|
|
714
|
+
}]
|
|
715
|
+
}],
|
|
716
|
+
propDecorators: {
|
|
717
|
+
id: [{
|
|
718
|
+
type: Input
|
|
719
|
+
}]
|
|
720
|
+
}
|
|
721
|
+
});
|
|
805
722
|
class MatDialogContent {
|
|
806
|
-
|
|
807
|
-
|
|
723
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
724
|
+
minVersion: "12.0.0",
|
|
725
|
+
version: "20.2.0-next.2",
|
|
726
|
+
ngImport: i0,
|
|
727
|
+
type: MatDialogContent,
|
|
728
|
+
deps: [],
|
|
729
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
730
|
+
});
|
|
731
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
732
|
+
minVersion: "14.0.0",
|
|
733
|
+
version: "20.2.0-next.2",
|
|
734
|
+
type: MatDialogContent,
|
|
735
|
+
isStandalone: true,
|
|
736
|
+
selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]",
|
|
737
|
+
host: {
|
|
738
|
+
classAttribute: "mat-mdc-dialog-content mdc-dialog__content"
|
|
739
|
+
},
|
|
740
|
+
hostDirectives: [{
|
|
741
|
+
directive: i1.CdkScrollable
|
|
742
|
+
}],
|
|
743
|
+
ngImport: i0
|
|
744
|
+
});
|
|
808
745
|
}
|
|
809
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
747
|
+
minVersion: "12.0.0",
|
|
748
|
+
version: "20.2.0-next.2",
|
|
749
|
+
ngImport: i0,
|
|
750
|
+
type: MatDialogContent,
|
|
751
|
+
decorators: [{
|
|
752
|
+
type: Directive,
|
|
753
|
+
args: [{
|
|
754
|
+
selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,
|
|
755
|
+
host: {
|
|
756
|
+
'class': 'mat-mdc-dialog-content mdc-dialog__content'
|
|
757
|
+
},
|
|
758
|
+
hostDirectives: [CdkScrollable]
|
|
759
|
+
}]
|
|
760
|
+
}]
|
|
761
|
+
});
|
|
821
762
|
class MatDialogActions extends MatDialogLayoutSection {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
763
|
+
align;
|
|
764
|
+
_onAdd() {
|
|
765
|
+
this._dialogRef._containerInstance?._updateActionSectionCount?.(1);
|
|
766
|
+
}
|
|
767
|
+
_onRemove() {
|
|
768
|
+
this._dialogRef._containerInstance?._updateActionSectionCount?.(-1);
|
|
769
|
+
}
|
|
770
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
771
|
+
minVersion: "12.0.0",
|
|
772
|
+
version: "20.2.0-next.2",
|
|
773
|
+
ngImport: i0,
|
|
774
|
+
type: MatDialogActions,
|
|
775
|
+
deps: null,
|
|
776
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
777
|
+
});
|
|
778
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
779
|
+
minVersion: "14.0.0",
|
|
780
|
+
version: "20.2.0-next.2",
|
|
781
|
+
type: MatDialogActions,
|
|
782
|
+
isStandalone: true,
|
|
783
|
+
selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
|
|
784
|
+
inputs: {
|
|
785
|
+
align: "align"
|
|
786
|
+
},
|
|
787
|
+
host: {
|
|
788
|
+
properties: {
|
|
789
|
+
"class.mat-mdc-dialog-actions-align-start": "align === \"start\"",
|
|
790
|
+
"class.mat-mdc-dialog-actions-align-center": "align === \"center\"",
|
|
791
|
+
"class.mat-mdc-dialog-actions-align-end": "align === \"end\""
|
|
792
|
+
},
|
|
793
|
+
classAttribute: "mat-mdc-dialog-actions mdc-dialog__actions"
|
|
794
|
+
},
|
|
795
|
+
usesInheritance: true,
|
|
796
|
+
ngImport: i0
|
|
797
|
+
});
|
|
834
798
|
}
|
|
835
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
799
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
800
|
+
minVersion: "12.0.0",
|
|
801
|
+
version: "20.2.0-next.2",
|
|
802
|
+
ngImport: i0,
|
|
803
|
+
type: MatDialogActions,
|
|
804
|
+
decorators: [{
|
|
805
|
+
type: Directive,
|
|
806
|
+
args: [{
|
|
807
|
+
selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,
|
|
808
|
+
host: {
|
|
809
|
+
'class': 'mat-mdc-dialog-actions mdc-dialog__actions',
|
|
810
|
+
'[class.mat-mdc-dialog-actions-align-start]': 'align === "start"',
|
|
811
|
+
'[class.mat-mdc-dialog-actions-align-center]': 'align === "center"',
|
|
812
|
+
'[class.mat-mdc-dialog-actions-align-end]': 'align === "end"'
|
|
813
|
+
}
|
|
814
|
+
}]
|
|
815
|
+
}],
|
|
816
|
+
propDecorators: {
|
|
817
|
+
align: [{
|
|
818
|
+
type: Input
|
|
819
|
+
}]
|
|
820
|
+
}
|
|
821
|
+
});
|
|
854
822
|
function getClosestDialog(element, openDialogs) {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
823
|
+
let parent = element.nativeElement.parentElement;
|
|
824
|
+
while (parent && !parent.classList.contains('mat-mdc-dialog-container')) {
|
|
825
|
+
parent = parent.parentElement;
|
|
826
|
+
}
|
|
827
|
+
return parent ? openDialogs.find(dialog => dialog.id === parent.id) : null;
|
|
860
828
|
}
|
|
861
829
|
|
|
862
|
-
const DIRECTIVES = [
|
|
863
|
-
MatDialogContainer,
|
|
864
|
-
MatDialogClose,
|
|
865
|
-
MatDialogTitle,
|
|
866
|
-
MatDialogActions,
|
|
867
|
-
MatDialogContent,
|
|
868
|
-
];
|
|
830
|
+
const DIRECTIVES = [MatDialogContainer, MatDialogClose, MatDialogTitle, MatDialogActions, MatDialogContent];
|
|
869
831
|
class MatDialogModule {
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
832
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
833
|
+
minVersion: "12.0.0",
|
|
834
|
+
version: "20.2.0-next.2",
|
|
835
|
+
ngImport: i0,
|
|
836
|
+
type: MatDialogModule,
|
|
837
|
+
deps: [],
|
|
838
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
839
|
+
});
|
|
840
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
841
|
+
minVersion: "14.0.0",
|
|
842
|
+
version: "20.2.0-next.2",
|
|
843
|
+
ngImport: i0,
|
|
844
|
+
type: MatDialogModule,
|
|
845
|
+
imports: [DialogModule, OverlayModule, PortalModule, MatDialogContainer, MatDialogClose, MatDialogTitle, MatDialogActions, MatDialogContent],
|
|
846
|
+
exports: [BidiModule, MatDialogContainer, MatDialogClose, MatDialogTitle, MatDialogActions, MatDialogContent]
|
|
847
|
+
});
|
|
848
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
849
|
+
minVersion: "12.0.0",
|
|
850
|
+
version: "20.2.0-next.2",
|
|
851
|
+
ngImport: i0,
|
|
852
|
+
type: MatDialogModule,
|
|
853
|
+
providers: [MatDialog],
|
|
854
|
+
imports: [DialogModule, OverlayModule, PortalModule, BidiModule]
|
|
855
|
+
});
|
|
881
856
|
}
|
|
882
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
857
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
858
|
+
minVersion: "12.0.0",
|
|
859
|
+
version: "20.2.0-next.2",
|
|
860
|
+
ngImport: i0,
|
|
861
|
+
type: MatDialogModule,
|
|
862
|
+
decorators: [{
|
|
863
|
+
type: NgModule,
|
|
864
|
+
args: [{
|
|
865
|
+
imports: [DialogModule, OverlayModule, PortalModule, ...DIRECTIVES],
|
|
866
|
+
exports: [BidiModule, ...DIRECTIVES],
|
|
867
|
+
providers: [MatDialog]
|
|
868
|
+
}]
|
|
869
|
+
}]
|
|
870
|
+
});
|
|
890
871
|
|
|
891
872
|
export { MAT_DIALOG_DATA, MAT_DIALOG_DEFAULT_OPTIONS, MAT_DIALOG_SCROLL_STRATEGY, MatDialog, MatDialogActions, MatDialogClose, MatDialogConfig, MatDialogContainer, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogState, MatDialogTitle, _closeDialogVia };
|
|
892
873
|
//# sourceMappingURL=dialog.mjs.map
|