@angular/material 19.0.0-next.8 → 19.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +37 -24
- package/autocomplete/index.d.ts +5 -6
- package/badge/_badge-theme.scss +38 -24
- package/bottom-sheet/_bottom-sheet-theme.scss +32 -20
- package/button/_button-theme.scss +229 -105
- package/button/_fab-theme.scss +95 -44
- package/button/_icon-button-theme.scss +38 -25
- package/button/index.d.ts +3 -3
- package/button-toggle/_button-toggle-theme.scss +62 -37
- package/card/_card-theme.scss +79 -38
- package/card/index.d.ts +2 -3
- package/checkbox/_checkbox-theme.scss +16 -10
- package/chips/_chips-theme.scss +64 -30
- package/core/_core-theme.scss +55 -37
- package/core/_core.scss +3 -6
- package/core/option/_optgroup-theme.scss +29 -18
- package/core/option/_option-theme.scss +34 -21
- package/core/ripple/_ripple-theme.scss +33 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +49 -23
- package/core/theming/_config-validation.scss +4 -4
- package/core/theming/_definition.scss +12 -2
- package/core/tokens/_m3-system.scss +86 -42
- package/core/tokens/_token-utils.scss +91 -34
- package/core/tokens/m2/mat/_badge.scss +12 -3
- package/core/tokens/m2/mdc/_radio.scss +1 -1
- package/core/tokens/m3/definitions/_md-comp-elevated-card.scss +1 -1
- package/core/tokens/m3/mat/_badge.scss +6 -3
- package/datepicker/_datepicker-theme.scss +53 -32
- package/datepicker/index.d.ts +33 -34
- package/dialog/_dialog-theme.scss +46 -23
- package/divider/_divider-theme.scss +28 -17
- package/expansion/_expansion-theme.scss +36 -24
- package/fesm2022/autocomplete/testing.mjs +2 -5
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +225 -148
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs +2 -5
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs +45 -35
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +80 -58
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs +4 -7
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +82 -45
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +106 -79
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs +3 -6
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs +56 -69
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs +4 -7
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +104 -62
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs +11 -14
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +322 -276
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +5 -11
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +242 -187
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs +13 -22
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +827 -582
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs +15 -10
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs +221 -156
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +10 -12
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs +7 -10
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +86 -80
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +12 -15
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field.mjs +179 -132
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs +11 -17
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +75 -56
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +8 -8
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +66 -46
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs +3 -3
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input.mjs +103 -72
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list/testing.mjs +21 -38
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs +197 -195
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +3 -6
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +178 -127
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +10 -13
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +83 -58
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +36 -35
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +28 -14
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs +6 -12
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +123 -87
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +6 -9
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +219 -182
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs +6 -6
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +136 -125
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs +3 -6
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +77 -47
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs +2 -2
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +262 -194
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs +4 -7
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +143 -111
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs +3 -6
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs +94 -74
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs +4 -4
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +146 -113
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table/testing.mjs +13 -25
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs +183 -194
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs +5 -5
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +329 -251
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs +7 -16
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +160 -155
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs +2 -5
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +26 -17
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs +6 -9
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +97 -74
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs +3 -6
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +57 -61
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +114 -61
- package/form-field/index.d.ts +9 -10
- package/grid-list/_grid-list-theme.scss +25 -15
- package/icon/_icon-theme.scss +22 -14
- package/input/_input-theme.scss +18 -11
- package/list/_list-theme.scss +89 -47
- package/list/index.d.ts +20 -21
- package/menu/_menu-theme.scss +33 -21
- package/menu/index.d.ts +8 -9
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +39 -23
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -16
- package/progress-spinner/_progress-spinner-theme.scss +41 -25
- package/progress-spinner/index.d.ts +3 -4
- package/radio/_radio-theme.scss +60 -32
- package/radio/index.d.ts +2 -3
- package/schematics/collection.json +3 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/theming/create-custom-theme.js +1 -6
- package/schematics/ng-add/theming/create-custom-theme.mjs +1 -6
- package/schematics/ng-generate/{m3-theme → theme-color}/index_bundled.js +480 -288
- package/schematics/ng-generate/theme-color/index_bundled.js.map +7 -0
- package/schematics/ng-generate/{m3-theme → theme-color}/schema.json +7 -13
- package/schematics/ng-update/index_bundled.js +6 -1
- package/schematics/ng-update/index_bundled.js.map +1 -1
- package/select/_select-theme.scss +38 -25
- package/select/index.d.ts +6 -7
- package/sidenav/_sidenav-theme.scss +28 -17
- package/slide-toggle/_slide-toggle-theme.scss +52 -28
- package/slider/_slider-theme.scss +62 -38
- package/snack-bar/_snack-bar-theme.scss +29 -17
- package/sort/_sort-theme.scss +33 -21
- package/stepper/_stepper-theme.scss +40 -27
- package/stepper/index.d.ts +14 -15
- package/table/_table-theme.scss +36 -23
- package/tabs/_tabs-theme.scss +97 -50
- package/tabs/index.d.ts +2 -2
- package/timepicker/_timepicker-theme.scss +37 -24
- package/toolbar/_toolbar-theme.scss +35 -22
- package/tooltip/_tooltip-theme.scss +18 -15
- package/tooltip/index.d.ts +5 -6
- package/tree/_tree-theme.scss +33 -21
- package/schematics/ng-generate/m3-theme/index_bundled.js.map +0 -7
package/fesm2022/dialog.mjs
CHANGED
|
@@ -16,52 +16,95 @@ import { trigger, state, style, transition, group, animate, query, animateChild
|
|
|
16
16
|
* Configuration for opening a modal dialog with the MatDialog service.
|
|
17
17
|
*/
|
|
18
18
|
class MatDialogConfig {
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Where the attached component should live in Angular's *logical* component tree.
|
|
21
|
+
* This affects what is available for injection and the change detection order for the
|
|
22
|
+
* component instantiated inside of the dialog. This does not affect where the dialog
|
|
23
|
+
* content will be rendered.
|
|
24
|
+
*/
|
|
25
|
+
viewContainerRef;
|
|
26
|
+
/**
|
|
27
|
+
* Injector used for the instantiation of the component to be attached. If provided,
|
|
28
|
+
* takes precedence over the injector indirectly provided by `ViewContainerRef`.
|
|
29
|
+
*/
|
|
30
|
+
injector;
|
|
31
|
+
/** ID for the dialog. If omitted, a unique one will be generated. */
|
|
32
|
+
id;
|
|
33
|
+
/** The ARIA role of the dialog element. */
|
|
34
|
+
role = 'dialog';
|
|
35
|
+
/** Custom class for the overlay pane. */
|
|
36
|
+
panelClass = '';
|
|
37
|
+
/** Whether the dialog has a backdrop. */
|
|
38
|
+
hasBackdrop = true;
|
|
39
|
+
/** Custom class for the backdrop. */
|
|
40
|
+
backdropClass = '';
|
|
41
|
+
/** Whether the user can use escape or clicking on the backdrop to close the modal. */
|
|
42
|
+
disableClose = false;
|
|
43
|
+
/** Width of the dialog. */
|
|
44
|
+
width = '';
|
|
45
|
+
/** Height of the dialog. */
|
|
46
|
+
height = '';
|
|
47
|
+
/** Min-width of the dialog. If a number is provided, assumes pixel units. */
|
|
48
|
+
minWidth;
|
|
49
|
+
/** Min-height of the dialog. If a number is provided, assumes pixel units. */
|
|
50
|
+
minHeight;
|
|
51
|
+
/** Max-width of the dialog. If a number is provided, assumes pixel units. Defaults to 80vw. */
|
|
52
|
+
maxWidth;
|
|
53
|
+
/** Max-height of the dialog. If a number is provided, assumes pixel units. */
|
|
54
|
+
maxHeight;
|
|
55
|
+
/** Position overrides. */
|
|
56
|
+
position;
|
|
57
|
+
/** Data being injected into the child component. */
|
|
58
|
+
data = null;
|
|
59
|
+
/** Layout direction for the dialog's content. */
|
|
60
|
+
direction;
|
|
61
|
+
/** ID of the element that describes the dialog. */
|
|
62
|
+
ariaDescribedBy = null;
|
|
63
|
+
/** ID of the element that labels the dialog. */
|
|
64
|
+
ariaLabelledBy = null;
|
|
65
|
+
/** Aria label to assign to the dialog element. */
|
|
66
|
+
ariaLabel = null;
|
|
67
|
+
/** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */
|
|
68
|
+
ariaModal = true;
|
|
69
|
+
/**
|
|
70
|
+
* Where the dialog should focus on open.
|
|
71
|
+
* @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
|
|
72
|
+
* AutoFocusTarget instead.
|
|
73
|
+
*/
|
|
74
|
+
autoFocus = 'first-tabbable';
|
|
75
|
+
/**
|
|
76
|
+
* Whether the dialog should restore focus to the
|
|
77
|
+
* previously-focused element, after it's closed.
|
|
78
|
+
*/
|
|
79
|
+
restoreFocus = true;
|
|
80
|
+
/** Whether to wait for the opening animation to finish before trapping focus. */
|
|
81
|
+
delayFocusTrap = true;
|
|
82
|
+
/** Scroll strategy to be used for the dialog. */
|
|
83
|
+
scrollStrategy;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the dialog should close when the user goes backwards/forwards in history.
|
|
86
|
+
* Note that this usually doesn't include clicking on links (unless the user is using
|
|
87
|
+
* the `HashLocationStrategy`).
|
|
88
|
+
*/
|
|
89
|
+
closeOnNavigation = true;
|
|
90
|
+
/**
|
|
91
|
+
* Alternate `ComponentFactoryResolver` to use when resolving the associated component.
|
|
92
|
+
* @deprecated No longer used. Will be removed.
|
|
93
|
+
* @breaking-change 20.0.0
|
|
94
|
+
*/
|
|
95
|
+
componentFactoryResolver;
|
|
96
|
+
/**
|
|
97
|
+
* Duration of the enter animation in ms.
|
|
98
|
+
* Should be a number, string type is deprecated.
|
|
99
|
+
* @breaking-change 17.0.0 Remove string signature.
|
|
100
|
+
*/
|
|
101
|
+
enterAnimationDuration;
|
|
102
|
+
/**
|
|
103
|
+
* Duration of the exit animation in ms.
|
|
104
|
+
* Should be a number, string type is deprecated.
|
|
105
|
+
* @breaking-change 17.0.0 Remove string signature.
|
|
106
|
+
*/
|
|
107
|
+
exitAnimationDuration;
|
|
65
108
|
}
|
|
66
109
|
|
|
67
110
|
/** Class added when the dialog is open. */
|
|
@@ -75,44 +118,25 @@ const OPEN_ANIMATION_DURATION = 150;
|
|
|
75
118
|
/** Duration of the closing animation in milliseconds. */
|
|
76
119
|
const CLOSE_ANIMATION_DURATION = 75;
|
|
77
120
|
class MatDialogContainer extends CdkDialogContainer {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/** Current timer for dialog animations. */
|
|
98
|
-
this._animationTimer = null;
|
|
99
|
-
/**
|
|
100
|
-
* Completes the dialog open by clearing potential animation classes, trapping
|
|
101
|
-
* focus and emitting an opened event.
|
|
102
|
-
*/
|
|
103
|
-
this._finishDialogOpen = () => {
|
|
104
|
-
this._clearAnimationClasses();
|
|
105
|
-
this._openAnimationDone(this._enterAnimationDuration);
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Completes the dialog close by clearing potential animation classes, restoring
|
|
109
|
-
* focus and emitting a closed event.
|
|
110
|
-
*/
|
|
111
|
-
this._finishDialogClose = () => {
|
|
112
|
-
this._clearAnimationClasses();
|
|
113
|
-
this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });
|
|
114
|
-
};
|
|
115
|
-
}
|
|
121
|
+
_animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });
|
|
122
|
+
/** Emits when an animation state changes. */
|
|
123
|
+
_animationStateChanged = new EventEmitter();
|
|
124
|
+
/** Whether animations are enabled. */
|
|
125
|
+
_animationsEnabled = this._animationMode !== 'NoopAnimations';
|
|
126
|
+
/** Number of actions projected in the dialog. */
|
|
127
|
+
_actionSectionCount = 0;
|
|
128
|
+
/** Host element of the dialog container component. */
|
|
129
|
+
_hostElement = this._elementRef.nativeElement;
|
|
130
|
+
/** Duration of the dialog open animation. */
|
|
131
|
+
_enterAnimationDuration = this._animationsEnabled
|
|
132
|
+
? parseCssTime(this._config.enterAnimationDuration) ?? OPEN_ANIMATION_DURATION
|
|
133
|
+
: 0;
|
|
134
|
+
/** Duration of the dialog close animation. */
|
|
135
|
+
_exitAnimationDuration = this._animationsEnabled
|
|
136
|
+
? parseCssTime(this._config.exitAnimationDuration) ?? CLOSE_ANIMATION_DURATION
|
|
137
|
+
: 0;
|
|
138
|
+
/** Current timer for dialog animations. */
|
|
139
|
+
_animationTimer = null;
|
|
116
140
|
_contentAttached() {
|
|
117
141
|
// Delegate to the original dialog-container initialization (i.e. saving the
|
|
118
142
|
// previous element, setting up the focus trap and moving focus to the container).
|
|
@@ -187,6 +211,22 @@ class MatDialogContainer extends CdkDialogContainer {
|
|
|
187
211
|
this._actionSectionCount += delta;
|
|
188
212
|
this._changeDetectorRef.markForCheck();
|
|
189
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Completes the dialog open by clearing potential animation classes, trapping
|
|
216
|
+
* focus and emitting an opened event.
|
|
217
|
+
*/
|
|
218
|
+
_finishDialogOpen = () => {
|
|
219
|
+
this._clearAnimationClasses();
|
|
220
|
+
this._openAnimationDone(this._enterAnimationDuration);
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Completes the dialog close by clearing potential animation classes, restoring
|
|
224
|
+
* focus and emitting a closed event.
|
|
225
|
+
*/
|
|
226
|
+
_finishDialogClose = () => {
|
|
227
|
+
this._clearAnimationClasses();
|
|
228
|
+
this._animationStateChanged.emit({ state: 'closed', totalTime: this._exitAnimationDuration });
|
|
229
|
+
};
|
|
190
230
|
/** Clears all dialog animation classes. */
|
|
191
231
|
_clearAnimationClasses() {
|
|
192
232
|
this._hostElement.classList.remove(OPENING_CLASS, CLOSING_CLASS);
|
|
@@ -244,12 +284,12 @@ class MatDialogContainer extends CdkDialogContainer {
|
|
|
244
284
|
ref.location.nativeElement.classList.add('mat-mdc-dialog-component-host');
|
|
245
285
|
return ref;
|
|
246
286
|
}
|
|
247
|
-
static
|
|
248
|
-
static
|
|
287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
288
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0-next.10", 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(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-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(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-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(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-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;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;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}"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
249
289
|
}
|
|
250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContainer, decorators: [{
|
|
251
291
|
type: Component,
|
|
252
|
-
args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default,
|
|
292
|
+
args: [{ selector: 'mat-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [CdkPortalOutlet], host: {
|
|
253
293
|
'class': 'mat-mdc-dialog-container mdc-dialog',
|
|
254
294
|
'tabindex': '-1',
|
|
255
295
|
'[attr.aria-modal]': '_config.ariaModal',
|
|
@@ -260,7 +300,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
|
|
|
260
300
|
'[attr.aria-describedby]': '_config.ariaDescribedBy || null',
|
|
261
301
|
'[class._mat-animation-noopable]': '!_animationsEnabled',
|
|
262
302
|
'[class.mat-mdc-dialog-container-with-actions]': '_actionSectionCount > 0',
|
|
263
|
-
}, 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(--mdc-dialog-container-shape, var(--mat-
|
|
303
|
+
}, 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(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-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(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-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(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-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;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;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}"] }]
|
|
264
304
|
}] });
|
|
265
305
|
const TRANSITION_DURATION_PROPERTY = '--mat-dialog-transition-duration';
|
|
266
306
|
// TODO(mmalerba): Remove this function after animation durations are required
|
|
@@ -298,15 +338,38 @@ var MatDialogState;
|
|
|
298
338
|
* Reference to a dialog opened via the MatDialog service.
|
|
299
339
|
*/
|
|
300
340
|
class MatDialogRef {
|
|
341
|
+
_ref;
|
|
342
|
+
_containerInstance;
|
|
343
|
+
/** The instance of component opened into the dialog. */
|
|
344
|
+
componentInstance;
|
|
345
|
+
/**
|
|
346
|
+
* `ComponentRef` of the component opened into the dialog. Will be
|
|
347
|
+
* null when the dialog is opened using a `TemplateRef`.
|
|
348
|
+
*/
|
|
349
|
+
componentRef;
|
|
350
|
+
/** Whether the user is allowed to close the dialog. */
|
|
351
|
+
disableClose;
|
|
352
|
+
/** Unique ID for the dialog. */
|
|
353
|
+
id;
|
|
354
|
+
/** Subject for notifying the user that the dialog has finished opening. */
|
|
355
|
+
_afterOpened = new Subject();
|
|
356
|
+
/** Subject for notifying the user that the dialog has started closing. */
|
|
357
|
+
_beforeClosed = new Subject();
|
|
358
|
+
/** Result to be passed to afterClosed. */
|
|
359
|
+
_result;
|
|
360
|
+
/** Handle to the timeout that's running as a fallback in case the exit animation doesn't fire. */
|
|
361
|
+
_closeFallbackTimeout;
|
|
362
|
+
/** Current state of the dialog. */
|
|
363
|
+
_state = MatDialogState.OPEN;
|
|
364
|
+
// TODO(crisbeto): we shouldn't have to declare this property, because `DialogRef.close`
|
|
365
|
+
// already has a second `options` parameter that we can use. The problem is that internal tests
|
|
366
|
+
// have assertions like `expect(MatDialogRef.close).toHaveBeenCalledWith(foo)` which will break,
|
|
367
|
+
// because it'll be called with two arguments by things like `MatDialogClose`.
|
|
368
|
+
/** Interaction that caused the dialog to close. */
|
|
369
|
+
_closeInteractionType;
|
|
301
370
|
constructor(_ref, config, _containerInstance) {
|
|
302
371
|
this._ref = _ref;
|
|
303
372
|
this._containerInstance = _containerInstance;
|
|
304
|
-
/** Subject for notifying the user that the dialog has finished opening. */
|
|
305
|
-
this._afterOpened = new Subject();
|
|
306
|
-
/** Subject for notifying the user that the dialog has started closing. */
|
|
307
|
-
this._beforeClosed = new Subject();
|
|
308
|
-
/** Current state of the dialog. */
|
|
309
|
-
this._state = MatDialogState.OPEN;
|
|
310
373
|
this.disableClose = config.disableClose;
|
|
311
374
|
this.id = _ref.id;
|
|
312
375
|
// Used to target panels specifically tied to dialogs.
|
|
@@ -491,6 +554,18 @@ let uniqueId = 0;
|
|
|
491
554
|
* Service to open Material Design modal dialogs.
|
|
492
555
|
*/
|
|
493
556
|
class MatDialog {
|
|
557
|
+
_overlay = inject(Overlay);
|
|
558
|
+
_defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true });
|
|
559
|
+
_scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);
|
|
560
|
+
_parentDialog = inject(MatDialog, { optional: true, skipSelf: true });
|
|
561
|
+
_dialog = inject(Dialog);
|
|
562
|
+
_openDialogsAtThisLevel = [];
|
|
563
|
+
_afterAllClosedAtThisLevel = new Subject();
|
|
564
|
+
_afterOpenedAtThisLevel = new Subject();
|
|
565
|
+
dialogConfigClass = MatDialogConfig;
|
|
566
|
+
_dialogRefConstructor;
|
|
567
|
+
_dialogContainerType;
|
|
568
|
+
_dialogDataToken;
|
|
494
569
|
/** Keeps track of the currently-open dialogs. */
|
|
495
570
|
get openDialogs() {
|
|
496
571
|
return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
|
|
@@ -503,23 +578,14 @@ class MatDialog {
|
|
|
503
578
|
const parent = this._parentDialog;
|
|
504
579
|
return parent ? parent._getAfterAllClosed() : this._afterAllClosedAtThisLevel;
|
|
505
580
|
}
|
|
581
|
+
/**
|
|
582
|
+
* Stream that emits when all open dialog have finished closing.
|
|
583
|
+
* Will emit on subscribe if there are no open dialogs to begin with.
|
|
584
|
+
*/
|
|
585
|
+
afterAllClosed = defer(() => this.openDialogs.length
|
|
586
|
+
? this._getAfterAllClosed()
|
|
587
|
+
: this._getAfterAllClosed().pipe(startWith(undefined)));
|
|
506
588
|
constructor() {
|
|
507
|
-
this._overlay = inject(Overlay);
|
|
508
|
-
this._defaultOptions = inject(MAT_DIALOG_DEFAULT_OPTIONS, { optional: true });
|
|
509
|
-
this._scrollStrategy = inject(MAT_DIALOG_SCROLL_STRATEGY);
|
|
510
|
-
this._parentDialog = inject(MatDialog, { optional: true, skipSelf: true });
|
|
511
|
-
this._dialog = inject(Dialog);
|
|
512
|
-
this._openDialogsAtThisLevel = [];
|
|
513
|
-
this._afterAllClosedAtThisLevel = new Subject();
|
|
514
|
-
this._afterOpenedAtThisLevel = new Subject();
|
|
515
|
-
this.dialogConfigClass = MatDialogConfig;
|
|
516
|
-
/**
|
|
517
|
-
* Stream that emits when all open dialog have finished closing.
|
|
518
|
-
* Will emit on subscribe if there are no open dialogs to begin with.
|
|
519
|
-
*/
|
|
520
|
-
this.afterAllClosed = defer(() => this.openDialogs.length
|
|
521
|
-
? this._getAfterAllClosed()
|
|
522
|
-
: this._getAfterAllClosed().pipe(startWith(undefined)));
|
|
523
589
|
this._dialogRefConstructor = MatDialogRef;
|
|
524
590
|
this._dialogContainerType = MatDialogContainer;
|
|
525
591
|
this._dialogDataToken = MAT_DIALOG_DATA;
|
|
@@ -605,10 +671,10 @@ class MatDialog {
|
|
|
605
671
|
dialogs[i].close();
|
|
606
672
|
}
|
|
607
673
|
}
|
|
608
|
-
static
|
|
609
|
-
static
|
|
674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialog, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
675
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialog, providedIn: 'root' });
|
|
610
676
|
}
|
|
611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialog, decorators: [{
|
|
612
678
|
type: Injectable,
|
|
613
679
|
args: [{ providedIn: 'root' }]
|
|
614
680
|
}], ctorParameters: () => [] });
|
|
@@ -619,13 +685,17 @@ let dialogElementUid = 0;
|
|
|
619
685
|
* Button that will close the current dialog.
|
|
620
686
|
*/
|
|
621
687
|
class MatDialogClose {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
688
|
+
dialogRef = inject(MatDialogRef, { optional: true });
|
|
689
|
+
_elementRef = inject(ElementRef);
|
|
690
|
+
_dialog = inject(MatDialog);
|
|
691
|
+
/** Screen-reader label for the button. */
|
|
692
|
+
ariaLabel;
|
|
693
|
+
/** Default to "button" to prevents accidental form submits. */
|
|
694
|
+
type = 'button';
|
|
695
|
+
/** Dialog close input. */
|
|
696
|
+
dialogResult;
|
|
697
|
+
_matDialogClose;
|
|
698
|
+
constructor() { }
|
|
629
699
|
ngOnInit() {
|
|
630
700
|
if (!this.dialogRef) {
|
|
631
701
|
// When this directive is included in a dialog via TemplateRef (rather than being
|
|
@@ -649,15 +719,14 @@ class MatDialogClose {
|
|
|
649
719
|
// the FocusMonitor won't detect any origin change, and will always output `program`.
|
|
650
720
|
_closeDialogVia(this.dialogRef, event.screenX === 0 && event.screenY === 0 ? 'keyboard' : 'mouse', this.dialogResult);
|
|
651
721
|
}
|
|
652
|
-
static
|
|
653
|
-
static
|
|
722
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
723
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogClose, isStandalone: true, selector: "[mat-dialog-close], [matDialogClose]", inputs: { ariaLabel: ["aria-label", "ariaLabel"], type: "type", dialogResult: ["mat-dialog-close", "dialogResult"], _matDialogClose: ["matDialogClose", "_matDialogClose"] }, host: { listeners: { "click": "_onButtonClick($event)" }, properties: { "attr.aria-label": "ariaLabel || null", "attr.type": "type" } }, exportAs: ["matDialogClose"], usesOnChanges: true, ngImport: i0 });
|
|
654
724
|
}
|
|
655
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
725
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogClose, decorators: [{
|
|
656
726
|
type: Directive,
|
|
657
727
|
args: [{
|
|
658
728
|
selector: '[mat-dialog-close], [matDialogClose]',
|
|
659
729
|
exportAs: 'matDialogClose',
|
|
660
|
-
standalone: true,
|
|
661
730
|
host: {
|
|
662
731
|
'(click)': '_onButtonClick($event)',
|
|
663
732
|
'[attr.aria-label]': 'ariaLabel || null',
|
|
@@ -677,11 +746,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
|
|
|
677
746
|
args: ['matDialogClose']
|
|
678
747
|
}] } });
|
|
679
748
|
class MatDialogLayoutSection {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}
|
|
749
|
+
_dialogRef = inject(MatDialogRef, { optional: true });
|
|
750
|
+
_elementRef = inject(ElementRef);
|
|
751
|
+
_dialog = inject(MatDialog);
|
|
752
|
+
constructor() { }
|
|
685
753
|
ngOnInit() {
|
|
686
754
|
if (!this._dialogRef) {
|
|
687
755
|
this._dialogRef = getClosestDialog(this._elementRef, this._dialog.openDialogs);
|
|
@@ -702,21 +770,17 @@ class MatDialogLayoutSection {
|
|
|
702
770
|
});
|
|
703
771
|
}
|
|
704
772
|
}
|
|
705
|
-
static
|
|
706
|
-
static
|
|
773
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogLayoutSection, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
774
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogLayoutSection, isStandalone: true, ngImport: i0 });
|
|
707
775
|
}
|
|
708
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
709
|
-
type: Directive
|
|
710
|
-
args: [{ standalone: true }]
|
|
776
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogLayoutSection, decorators: [{
|
|
777
|
+
type: Directive
|
|
711
778
|
}], ctorParameters: () => [] });
|
|
712
779
|
/**
|
|
713
780
|
* Title of a dialog element. Stays fixed to the top of the dialog when scrolling.
|
|
714
781
|
*/
|
|
715
782
|
class MatDialogTitle extends MatDialogLayoutSection {
|
|
716
|
-
|
|
717
|
-
super(...arguments);
|
|
718
|
-
this.id = `mat-mdc-dialog-title-${dialogElementUid++}`;
|
|
719
|
-
}
|
|
783
|
+
id = `mat-mdc-dialog-title-${dialogElementUid++}`;
|
|
720
784
|
_onAdd() {
|
|
721
785
|
// Note: we null check the queue, because there are some internal
|
|
722
786
|
// tests that are mocking out `MatDialogRef` incorrectly.
|
|
@@ -725,15 +789,14 @@ class MatDialogTitle extends MatDialogLayoutSection {
|
|
|
725
789
|
_onRemove() {
|
|
726
790
|
this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id);
|
|
727
791
|
}
|
|
728
|
-
static
|
|
729
|
-
static
|
|
792
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogTitle, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
793
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogTitle, isStandalone: true, selector: "[mat-dialog-title], [matDialogTitle]", inputs: { id: "id" }, host: { properties: { "id": "id" }, classAttribute: "mat-mdc-dialog-title mdc-dialog__title" }, exportAs: ["matDialogTitle"], usesInheritance: true, ngImport: i0 });
|
|
730
794
|
}
|
|
731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogTitle, decorators: [{
|
|
732
796
|
type: Directive,
|
|
733
797
|
args: [{
|
|
734
798
|
selector: '[mat-dialog-title], [matDialogTitle]',
|
|
735
799
|
exportAs: 'matDialogTitle',
|
|
736
|
-
standalone: true,
|
|
737
800
|
host: {
|
|
738
801
|
'class': 'mat-mdc-dialog-title mdc-dialog__title',
|
|
739
802
|
'[id]': 'id',
|
|
@@ -746,15 +809,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
|
|
|
746
809
|
* Scrollable content container of a dialog.
|
|
747
810
|
*/
|
|
748
811
|
class MatDialogContent {
|
|
749
|
-
static
|
|
750
|
-
static
|
|
812
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
813
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogContent, isStandalone: true, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]", host: { classAttribute: "mat-mdc-dialog-content mdc-dialog__content" }, hostDirectives: [{ directive: i1.CdkScrollable }], ngImport: i0 });
|
|
751
814
|
}
|
|
752
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogContent, decorators: [{
|
|
753
816
|
type: Directive,
|
|
754
817
|
args: [{
|
|
755
818
|
selector: `[mat-dialog-content], mat-dialog-content, [matDialogContent]`,
|
|
756
819
|
host: { 'class': 'mat-mdc-dialog-content mdc-dialog__content' },
|
|
757
|
-
standalone: true,
|
|
758
820
|
hostDirectives: [CdkScrollable],
|
|
759
821
|
}]
|
|
760
822
|
}] });
|
|
@@ -763,20 +825,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.8",
|
|
|
763
825
|
* Stays fixed to the bottom when scrolling.
|
|
764
826
|
*/
|
|
765
827
|
class MatDialogActions extends MatDialogLayoutSection {
|
|
828
|
+
/**
|
|
829
|
+
* Horizontal alignment of action buttons.
|
|
830
|
+
*/
|
|
831
|
+
align;
|
|
766
832
|
_onAdd() {
|
|
767
833
|
this._dialogRef._containerInstance?._updateActionSectionCount?.(1);
|
|
768
834
|
}
|
|
769
835
|
_onRemove() {
|
|
770
836
|
this._dialogRef._containerInstance?._updateActionSectionCount?.(-1);
|
|
771
837
|
}
|
|
772
|
-
static
|
|
773
|
-
static
|
|
838
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogActions, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
839
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-next.10", type: MatDialogActions, isStandalone: true, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: { align: "align" }, host: { properties: { "class.mat-mdc-dialog-actions-align-start": "align === \"start\"", "class.mat-mdc-dialog-actions-align-center": "align === \"center\"", "class.mat-mdc-dialog-actions-align-end": "align === \"end\"" }, classAttribute: "mat-mdc-dialog-actions mdc-dialog__actions" }, usesInheritance: true, ngImport: i0 });
|
|
774
840
|
}
|
|
775
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogActions, decorators: [{
|
|
776
842
|
type: Directive,
|
|
777
843
|
args: [{
|
|
778
844
|
selector: `[mat-dialog-actions], mat-dialog-actions, [matDialogActions]`,
|
|
779
|
-
standalone: true,
|
|
780
845
|
host: {
|
|
781
846
|
'class': 'mat-mdc-dialog-actions mdc-dialog__actions',
|
|
782
847
|
'[class.mat-mdc-dialog-actions-align-start]': 'align === "start"',
|
|
@@ -808,8 +873,8 @@ const DIRECTIVES = [
|
|
|
808
873
|
MatDialogContent,
|
|
809
874
|
];
|
|
810
875
|
class MatDialogModule {
|
|
811
|
-
static
|
|
812
|
-
static
|
|
876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
877
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatDialogContainer,
|
|
813
878
|
MatDialogClose,
|
|
814
879
|
MatDialogTitle,
|
|
815
880
|
MatDialogActions,
|
|
@@ -817,10 +882,10 @@ class MatDialogModule {
|
|
|
817
882
|
MatDialogClose,
|
|
818
883
|
MatDialogTitle,
|
|
819
884
|
MatDialogActions,
|
|
820
|
-
MatDialogContent] });
|
|
821
|
-
static
|
|
885
|
+
MatDialogContent] });
|
|
886
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, providers: [MatDialog], imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, MatCommonModule] });
|
|
822
887
|
}
|
|
823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.
|
|
888
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10", ngImport: i0, type: MatDialogModule, decorators: [{
|
|
824
889
|
type: NgModule,
|
|
825
890
|
args: [{
|
|
826
891
|
imports: [DialogModule, OverlayModule, PortalModule, MatCommonModule, ...DIRECTIVES],
|