@angular/cdk-experimental 14.0.0-next.9 → 14.0.0-rc.2

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.
Files changed (212) hide show
  1. package/column-resize/index.d.ts +419 -6
  2. package/combobox/index.d.ts +123 -8
  3. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  4. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  5. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  6. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  7. package/esm2020/column-resize/column-resize-module.mjs +9 -9
  8. package/esm2020/column-resize/column-resize-notifier.mjs +7 -7
  9. package/esm2020/column-resize/column-resize.mjs +4 -4
  10. package/esm2020/column-resize/column-size-store.mjs +4 -4
  11. package/esm2020/column-resize/event-dispatcher.mjs +4 -4
  12. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  13. package/esm2020/column-resize/resizable.mjs +4 -4
  14. package/esm2020/column-resize/resize-strategy.mjs +10 -10
  15. package/esm2020/combobox/combobox-module.mjs +5 -5
  16. package/esm2020/combobox/combobox-popup.mjs +4 -4
  17. package/esm2020/combobox/combobox.mjs +4 -4
  18. package/esm2020/listbox/listbox-module.mjs +5 -5
  19. package/esm2020/listbox/listbox.mjs +7 -7
  20. package/esm2020/popover-edit/edit-event-dispatcher.mjs +7 -7
  21. package/esm2020/popover-edit/edit-ref.mjs +4 -4
  22. package/esm2020/popover-edit/edit-services.mjs +4 -4
  23. package/esm2020/popover-edit/focus-dispatcher.mjs +4 -4
  24. package/esm2020/popover-edit/focus-escape-notifier.mjs +6 -6
  25. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  26. package/esm2020/popover-edit/popover-edit-module.mjs +6 -6
  27. package/esm2020/popover-edit/popover-edit-position-strategy-factory.mjs +7 -7
  28. package/esm2020/popover-edit/table-directives.mjs +19 -19
  29. package/esm2020/scrolling/auto-size-virtual-scroll.mjs +4 -4
  30. package/esm2020/scrolling/scrolling-module.mjs +5 -5
  31. package/esm2020/selection/row-selection.mjs +4 -4
  32. package/esm2020/selection/select-all.mjs +4 -4
  33. package/esm2020/selection/selection-column.mjs +10 -10
  34. package/esm2020/selection/selection-module.mjs +5 -5
  35. package/esm2020/selection/selection-toggle.mjs +4 -4
  36. package/esm2020/selection/selection.mjs +4 -4
  37. package/esm2020/table-scroll-container/table-scroll-container-module.mjs +5 -5
  38. package/esm2020/table-scroll-container/table-scroll-container.mjs +4 -4
  39. package/esm2020/version.mjs +1 -1
  40. package/fesm2015/cdk-experimental.mjs +1 -1
  41. package/fesm2015/cdk-experimental.mjs.map +1 -1
  42. package/fesm2015/column-resize.mjs +50 -50
  43. package/fesm2015/column-resize.mjs.map +1 -1
  44. package/fesm2015/combobox.mjs +10 -10
  45. package/fesm2015/combobox.mjs.map +1 -1
  46. package/fesm2015/listbox.mjs +10 -10
  47. package/fesm2015/listbox.mjs.map +1 -1
  48. package/fesm2015/popover-edit.mjs +58 -58
  49. package/fesm2015/popover-edit.mjs.map +1 -1
  50. package/fesm2015/scrolling.mjs +7 -7
  51. package/fesm2015/scrolling.mjs.map +1 -1
  52. package/fesm2015/selection.mjs +23 -23
  53. package/fesm2015/selection.mjs.map +1 -1
  54. package/fesm2015/table-scroll-container.mjs +7 -7
  55. package/fesm2015/table-scroll-container.mjs.map +1 -1
  56. package/fesm2020/cdk-experimental.mjs +1 -1
  57. package/fesm2020/cdk-experimental.mjs.map +1 -1
  58. package/fesm2020/column-resize.mjs +50 -50
  59. package/fesm2020/column-resize.mjs.map +1 -1
  60. package/fesm2020/combobox.mjs +10 -10
  61. package/fesm2020/combobox.mjs.map +1 -1
  62. package/fesm2020/listbox.mjs +10 -10
  63. package/fesm2020/listbox.mjs.map +1 -1
  64. package/fesm2020/popover-edit.mjs +58 -58
  65. package/fesm2020/popover-edit.mjs.map +1 -1
  66. package/fesm2020/scrolling.mjs +7 -7
  67. package/fesm2020/scrolling.mjs.map +1 -1
  68. package/fesm2020/selection.mjs +23 -23
  69. package/fesm2020/selection.mjs.map +1 -1
  70. package/fesm2020/table-scroll-container.mjs +7 -7
  71. package/fesm2020/table-scroll-container.mjs.map +1 -1
  72. package/index.d.ts +6 -8
  73. package/listbox/index.d.ts +197 -8
  74. package/package.json +9 -25
  75. package/popover-edit/index.d.ts +532 -5
  76. package/scrolling/index.d.ts +173 -6
  77. package/selection/index.d.ts +273 -5
  78. package/table-scroll-container/index.d.ts +61 -5
  79. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -28
  80. package/column-resize/column-resize-directives/column-resize.d.ts +0 -28
  81. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  82. package/column-resize/column-resize-directives/default-enabled-column-resize-flex.d.ts +0 -28
  83. package/column-resize/column-resize-directives/default-enabled-column-resize.d.ts +0 -28
  84. package/column-resize/column-resize-module.d.ts +0 -23
  85. package/column-resize/column-resize-notifier.d.ts +0 -49
  86. package/column-resize/column-resize.d.ts +0 -39
  87. package/column-resize/column-resize_public_index.d.ts +0 -4
  88. package/column-resize/column-size-store.d.ts +0 -12
  89. package/column-resize/event-dispatcher.d.ts +0 -44
  90. package/column-resize/overlay-handle.d.ts +0 -43
  91. package/column-resize/package.json +0 -9
  92. package/column-resize/public-api.d.ts +0 -20
  93. package/column-resize/resizable.d.ts +0 -69
  94. package/column-resize/resize-ref.d.ts +0 -17
  95. package/column-resize/resize-strategy.d.ts +0 -83
  96. package/column-resize/selectors.d.ts +0 -10
  97. package/combobox/combobox-module.d.ts +0 -9
  98. package/combobox/combobox-popup.d.ts +0 -27
  99. package/combobox/combobox.d.ts +0 -68
  100. package/combobox/combobox_public_index.d.ts +0 -4
  101. package/combobox/package.json +0 -9
  102. package/combobox/public-api.d.ts +0 -10
  103. package/dialog/dialog-config.d.ts +0 -82
  104. package/dialog/dialog-container.d.ts +0 -99
  105. package/dialog/dialog-injectors.d.ts +0 -30
  106. package/dialog/dialog-module.d.ts +0 -10
  107. package/dialog/dialog-ref.d.ts +0 -57
  108. package/dialog/dialog.d.ts +0 -100
  109. package/dialog/dialog_public_index.d.ts +0 -4
  110. package/dialog/index.d.ts +0 -8
  111. package/dialog/package.json +0 -9
  112. package/dialog/public-api.d.ts +0 -13
  113. package/esm2020/dialog/dialog-config.mjs +0 -43
  114. package/esm2020/dialog/dialog-container.mjs +0 -300
  115. package/esm2020/dialog/dialog-injectors.mjs +0 -30
  116. package/esm2020/dialog/dialog-module.mjs +0 -56
  117. package/esm2020/dialog/dialog-ref.mjs +0 -116
  118. package/esm2020/dialog/dialog.mjs +0 -252
  119. package/esm2020/dialog/dialog_public_index.mjs +0 -5
  120. package/esm2020/dialog/index.mjs +0 -9
  121. package/esm2020/dialog/public-api.mjs +0 -14
  122. package/esm2020/menu/context-menu.mjs +0 -222
  123. package/esm2020/menu/index.mjs +0 -9
  124. package/esm2020/menu/menu-aim.mjs +0 -199
  125. package/esm2020/menu/menu-bar.mjs +0 -164
  126. package/esm2020/menu/menu-base.mjs +0 -129
  127. package/esm2020/menu/menu-errors.mjs +0 -22
  128. package/esm2020/menu/menu-group.mjs +0 -68
  129. package/esm2020/menu/menu-interface.mjs +0 -11
  130. package/esm2020/menu/menu-item-checkbox.mjs +0 -48
  131. package/esm2020/menu/menu-item-radio.mjs +0 -95
  132. package/esm2020/menu/menu-item-selectable.mjs +0 -57
  133. package/esm2020/menu/menu-item-trigger.mjs +0 -276
  134. package/esm2020/menu/menu-item.mjs +0 -250
  135. package/esm2020/menu/menu-module.mjs +0 -60
  136. package/esm2020/menu/menu-stack.mjs +0 -131
  137. package/esm2020/menu/menu-trigger.mjs +0 -70
  138. package/esm2020/menu/menu.mjs +0 -204
  139. package/esm2020/menu/menu_public_index.mjs +0 -5
  140. package/esm2020/menu/pointer-focus-tracker.mjs +0 -49
  141. package/esm2020/menu/public-api.mjs +0 -21
  142. package/fesm2015/dialog.mjs +0 -803
  143. package/fesm2015/dialog.mjs.map +0 -1
  144. package/fesm2015/menu.mjs +0 -1983
  145. package/fesm2015/menu.mjs.map +0 -1
  146. package/fesm2020/dialog.mjs +0 -797
  147. package/fesm2020/dialog.mjs.map +0 -1
  148. package/fesm2020/menu.mjs +0 -1954
  149. package/fesm2020/menu.mjs.map +0 -1
  150. package/listbox/listbox-module.d.ts +0 -7
  151. package/listbox/listbox.d.ts +0 -172
  152. package/listbox/listbox_public_index.d.ts +0 -4
  153. package/listbox/package.json +0 -9
  154. package/listbox/public-api.d.ts +0 -9
  155. package/menu/context-menu.d.ts +0 -84
  156. package/menu/index.d.ts +0 -8
  157. package/menu/menu-aim.d.ts +0 -96
  158. package/menu/menu-bar.d.ts +0 -47
  159. package/menu/menu-base.d.ts +0 -64
  160. package/menu/menu-errors.d.ts +0 -17
  161. package/menu/menu-group.d.ts +0 -33
  162. package/menu/menu-interface.d.ts +0 -23
  163. package/menu/menu-item-checkbox.d.ts +0 -12
  164. package/menu/menu-item-radio.d.ts +0 -36
  165. package/menu/menu-item-selectable.d.ts +0 -31
  166. package/menu/menu-item-trigger.d.ts +0 -89
  167. package/menu/menu-item.d.ts +0 -105
  168. package/menu/menu-module.d.ts +0 -16
  169. package/menu/menu-stack.d.ts +0 -94
  170. package/menu/menu-trigger.d.ts +0 -48
  171. package/menu/menu.d.ts +0 -57
  172. package/menu/menu_public_index.d.ts +0 -4
  173. package/menu/package.json +0 -9
  174. package/menu/pointer-focus-tracker.d.ts +0 -44
  175. package/menu/public-api.d.ts +0 -20
  176. package/popover-edit/constants.d.ts +0 -19
  177. package/popover-edit/edit-event-dispatcher.d.ts +0 -99
  178. package/popover-edit/edit-ref.d.ts +0 -52
  179. package/popover-edit/edit-services.d.ts +0 -37
  180. package/popover-edit/focus-dispatcher.d.ts +0 -31
  181. package/popover-edit/focus-escape-notifier.d.ts +0 -40
  182. package/popover-edit/form-value-container.d.ts +0 -24
  183. package/popover-edit/lens-directives.d.ts +0 -82
  184. package/popover-edit/package.json +0 -9
  185. package/popover-edit/polyfill.d.ts +0 -9
  186. package/popover-edit/popover-edit-module.d.ts +0 -9
  187. package/popover-edit/popover-edit-position-strategy-factory.d.ts +0 -42
  188. package/popover-edit/popover-edit_public_index.d.ts +0 -4
  189. package/popover-edit/public-api.d.ts +0 -17
  190. package/popover-edit/table-directives.d.ts +0 -150
  191. package/public-api.d.ts +0 -8
  192. package/scrolling/auto-size-virtual-scroll.d.ts +0 -160
  193. package/scrolling/package.json +0 -9
  194. package/scrolling/public-api.d.ts +0 -9
  195. package/scrolling/scrolling-module.d.ts +0 -7
  196. package/scrolling/scrolling_public_index.d.ts +0 -4
  197. package/selection/package.json +0 -9
  198. package/selection/public-api.d.ts +0 -14
  199. package/selection/row-selection.d.ts +0 -27
  200. package/selection/select-all.d.ts +0 -52
  201. package/selection/selection-column.d.ts +0 -34
  202. package/selection/selection-module.d.ts +0 -13
  203. package/selection/selection-set.d.ts +0 -56
  204. package/selection/selection-toggle.d.ts +0 -46
  205. package/selection/selection.d.ts +0 -65
  206. package/selection/selection_public_index.d.ts +0 -4
  207. package/table-scroll-container/package.json +0 -9
  208. package/table-scroll-container/public-api.d.ts +0 -9
  209. package/table-scroll-container/table-scroll-container-module.d.ts +0 -7
  210. package/table-scroll-container/table-scroll-container.d.ts +0 -53
  211. package/table-scroll-container/table-scroll-container_public_index.d.ts +0 -4
  212. package/version.d.ts +0 -10
@@ -1,803 +0,0 @@
1
- import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
2
- import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
3
- import * as i3 from '@angular/cdk/portal';
4
- import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
5
- import * as i2 from '@angular/common';
6
- import { DOCUMENT } from '@angular/common';
7
- import * as i0 from '@angular/core';
8
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, ViewChild, InjectionToken, Injector, InjectFlags, Injectable, SkipSelf, NgModule } from '@angular/core';
9
- import { Subject, defer, of } from 'rxjs';
10
- import { distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';
11
- import * as i1 from '@angular/cdk/a11y';
12
- import { A11yModule } from '@angular/cdk/a11y';
13
- import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
14
- import { Directionality } from '@angular/cdk/bidi';
15
- import * as i1$1 from '@angular/cdk/overlay';
16
- import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
17
-
18
- class DialogConfig {
19
- constructor() {
20
- /** The ARIA role of the dialog. */
21
- this.role = 'dialog';
22
- /** Custom class(es) for the overlay panel. */
23
- this.panelClass = '';
24
- /** Whether the dialog has a background. */
25
- this.hasBackdrop = true;
26
- /** Custom class(es) for the backdrop. */
27
- this.backdropClass = '';
28
- /** Whether the dialog can be closed by user interaction. */
29
- this.disableClose = false;
30
- /** The width of the dialog. */
31
- this.width = '';
32
- /** The height of the dialog. */
33
- this.height = '';
34
- /** The minimum width of the dialog. */
35
- this.minWidth = '';
36
- /** The minimum height of the dialog. */
37
- this.minHeight = '';
38
- /** The maximum width of the dialog. */
39
- this.maxWidth = '80vw';
40
- /** The maximum height of the dialog. */
41
- this.maxHeight = '';
42
- /** Data to be injected into the dialog content. */
43
- this.data = null;
44
- /** ID of the element that describes the dialog. */
45
- this.ariaDescribedBy = null;
46
- /** Aria label to assign to the dialog element */
47
- this.ariaLabel = null;
48
- /**
49
- * Where the dialog should focus on open.
50
- * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or
51
- * AutoFocusTarget instead.
52
- */
53
- this.autoFocus = 'first-tabbable';
54
- /** Duration of the enter animation. Has to be a valid CSS value (e.g. 100ms). */
55
- this.enterAnimationDuration = '225ms';
56
- /** Duration of the exit animation. Has to be a valid CSS value (e.g. 50ms). */
57
- this.exitAnimationDuration = '225ms';
58
- }
59
- }
60
-
61
- /**
62
- * @license
63
- * Copyright Google LLC All Rights Reserved.
64
- *
65
- * Use of this source code is governed by an MIT-style license that can be
66
- * found in the LICENSE file at https://angular.io/license
67
- */
68
- function throwDialogContentAlreadyAttachedError() {
69
- throw Error('Attempting to attach dialog content after content is already attached');
70
- }
71
- /**
72
- * Internal component that wraps user-provided dialog content.
73
- * @docs-private
74
- */
75
- class CdkDialogContainer extends BasePortalOutlet {
76
- constructor(_elementRef, _focusTrapFactory, _changeDetectorRef, _interactivityChecker, _ngZone, _document,
77
- /** The dialog configuration. */
78
- _config) {
79
- super();
80
- this._elementRef = _elementRef;
81
- this._focusTrapFactory = _focusTrapFactory;
82
- this._changeDetectorRef = _changeDetectorRef;
83
- this._interactivityChecker = _interactivityChecker;
84
- this._ngZone = _ngZone;
85
- this._config = _config;
86
- /** State of the dialog animation. */
87
- this._state = 'enter';
88
- /** Element that was focused before the dialog was opened. Save this to restore upon close. */
89
- this._elementFocusedBeforeDialogWasOpened = null;
90
- /** The class that traps and manages focus within the dialog. */
91
- this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);
92
- /** A subject emitting before the dialog enters the view. */
93
- this._beforeEnter = new Subject();
94
- /** A subject emitting after the dialog enters the view. */
95
- this._afterEnter = new Subject();
96
- /** A subject emitting before the dialog exits the view. */
97
- this._beforeExit = new Subject();
98
- /** A subject emitting after the dialog exits the view. */
99
- this._afterExit = new Subject();
100
- /** Stream of animation `done` events. */
101
- this._animationDone = new Subject();
102
- /**
103
- * Attaches a DOM portal to the dialog container.
104
- * @param portal Portal to be attached.
105
- * @deprecated To be turned into a method.
106
- * @breaking-change 10.0.0
107
- */
108
- this.attachDomPortal = (portal) => {
109
- if (this._portalHost.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
110
- throwDialogContentAlreadyAttachedError();
111
- }
112
- return this._portalHost.attachDomPortal(portal);
113
- };
114
- this._document = _document;
115
- // We use a Subject with a distinctUntilChanged, rather than a callback attached to .done,
116
- // because some browsers fire the done event twice and we don't want to emit duplicate events.
117
- // See: https://github.com/angular/angular/issues/24084
118
- this._animationDone
119
- .pipe(distinctUntilChanged((x, y) => {
120
- return x.fromState === y.fromState && x.toState === y.toState;
121
- }))
122
- .subscribe(event => {
123
- // Emit lifecycle events based on animation `done` callback.
124
- if (event.toState === 'enter') {
125
- this._autoFocus();
126
- this._afterEnter.next();
127
- this._afterEnter.complete();
128
- }
129
- if (event.fromState === 'enter' && (event.toState === 'void' || event.toState === 'exit')) {
130
- this._returnFocusAfterDialog();
131
- this._afterExit.next();
132
- this._afterExit.complete();
133
- }
134
- });
135
- }
136
- /** Initializes the dialog container with the attached content. */
137
- _initializeWithAttachedContent() {
138
- // Save the previously focused element. This element will be re-focused
139
- // when the dialog closes.
140
- this._savePreviouslyFocusedElement();
141
- // Move focus onto the dialog immediately in order to prevent the user
142
- // from accidentally opening multiple dialogs at the same time.
143
- this._focusDialogContainer();
144
- }
145
- /** Destroy focus trap to place focus back to the element focused before the dialog opened. */
146
- ngOnDestroy() {
147
- this._focusTrap.destroy();
148
- this._animationDone.complete();
149
- }
150
- /**
151
- * Attach a ComponentPortal as content to this dialog container.
152
- * @param portal Portal to be attached as the dialog content.
153
- */
154
- attachComponentPortal(portal) {
155
- if (this._portalHost.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
156
- throwDialogContentAlreadyAttachedError();
157
- }
158
- return this._portalHost.attachComponentPortal(portal);
159
- }
160
- /**
161
- * Attach a TemplatePortal as content to this dialog container.
162
- * @param portal Portal to be attached as the dialog content.
163
- */
164
- attachTemplatePortal(portal) {
165
- if (this._portalHost.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
166
- throwDialogContentAlreadyAttachedError();
167
- }
168
- return this._portalHost.attachTemplatePortal(portal);
169
- }
170
- /** Emit lifecycle events based on animation `start` callback. */
171
- _onAnimationStart(event) {
172
- if (event.toState === 'enter') {
173
- this._beforeEnter.next();
174
- this._beforeEnter.complete();
175
- }
176
- if (event.fromState === 'enter' && (event.toState === 'void' || event.toState === 'exit')) {
177
- this._beforeExit.next();
178
- this._beforeExit.complete();
179
- }
180
- }
181
- /** Starts the dialog exit animation. */
182
- _startExiting() {
183
- this._state = 'exit';
184
- // Mark the container for check so it can react if the
185
- // view container is using OnPush change detection.
186
- this._changeDetectorRef.markForCheck();
187
- }
188
- /** Saves a reference to the element that was focused before the dialog was opened. */
189
- _savePreviouslyFocusedElement() {
190
- if (this._document) {
191
- this._elementFocusedBeforeDialogWasOpened = _getFocusedElementPierceShadowDom();
192
- }
193
- }
194
- /** Focuses the dialog container. */
195
- _focusDialogContainer() {
196
- // Note that there is no focus method when rendering on the server.
197
- if (this._elementRef.nativeElement.focus) {
198
- this._elementRef.nativeElement.focus();
199
- }
200
- }
201
- /**
202
- * Focuses the provided element. If the element is not focusable, it will add a tabIndex
203
- * attribute to forcefully focus it. The attribute is removed after focus is moved.
204
- * @param element The element to focus.
205
- */
206
- _forceFocus(element, options) {
207
- if (!this._interactivityChecker.isFocusable(element)) {
208
- element.tabIndex = -1;
209
- // The tabindex attribute should be removed to avoid navigating to that element again
210
- this._ngZone.runOutsideAngular(() => {
211
- const callback = () => {
212
- element.removeEventListener('blur', callback);
213
- element.removeEventListener('mousedown', callback);
214
- element.removeAttribute('tabindex');
215
- };
216
- element.addEventListener('blur', callback);
217
- element.addEventListener('mousedown', callback);
218
- });
219
- }
220
- element.focus(options);
221
- }
222
- /**
223
- * Focuses the first element that matches the given selector within the focus trap.
224
- * @param selector The CSS selector for the element to set focus to.
225
- */
226
- _focusByCssSelector(selector, options) {
227
- let elementToFocus = this._elementRef.nativeElement.querySelector(selector);
228
- if (elementToFocus) {
229
- this._forceFocus(elementToFocus, options);
230
- }
231
- }
232
- /**
233
- * Autofocus the element specified by the autoFocus field. When autoFocus is not 'dialog', if
234
- * for some reason the element cannot be focused, the dialog container will be focused.
235
- */
236
- _autoFocus() {
237
- const element = this._elementRef.nativeElement;
238
- // If were to attempt to focus immediately, then the content of the dialog would not yet be
239
- // ready in instances where change detection has to run first. To deal with this, we simply
240
- // wait for the microtask queue to be empty when setting focus when autoFocus isn't set to
241
- // dialog. If the element inside the dialog can't be focused, then the container is focused
242
- // so the user can't tab into other elements behind it.
243
- switch (this._config.autoFocus) {
244
- case false:
245
- case 'dialog':
246
- const activeElement = _getFocusedElementPierceShadowDom();
247
- // Ensure that focus is on the dialog container. It's possible that a different
248
- // component tried to move focus while the open animation was running. See:
249
- // https://github.com/angular/components/issues/16215. Note that we only want to do this
250
- // if the focus isn't inside the dialog already, because it's possible that the consumer
251
- // turned off `autoFocus` in order to move focus themselves.
252
- if (activeElement !== element && !element.contains(activeElement)) {
253
- element.focus();
254
- }
255
- break;
256
- case true:
257
- case 'first-tabbable':
258
- this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {
259
- if (!hasMovedFocus) {
260
- element.focus();
261
- }
262
- });
263
- break;
264
- case 'first-heading':
265
- this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');
266
- break;
267
- default:
268
- this._focusByCssSelector(this._config.autoFocus);
269
- break;
270
- }
271
- }
272
- /** Returns the focus to the element focused before the dialog was open. */
273
- _returnFocusAfterDialog() {
274
- const toFocus = this._elementFocusedBeforeDialogWasOpened;
275
- // We need the extra check, because IE can set the `activeElement` to null in some cases.
276
- if (toFocus && typeof toFocus.focus === 'function') {
277
- const activeElement = _getFocusedElementPierceShadowDom();
278
- const element = this._elementRef.nativeElement;
279
- // Make sure that focus is still inside the dialog or is on the body (usually because a
280
- // non-focusable element like the backdrop was clicked) before moving it. It's possible that
281
- // the consumer moved it themselves before the animation was done, in which case we shouldn't
282
- // do anything.
283
- if (!activeElement ||
284
- activeElement === this._document.body ||
285
- activeElement === element ||
286
- element.contains(activeElement)) {
287
- toFocus.focus();
288
- }
289
- }
290
- }
291
- }
292
- CdkDialogContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkDialogContainer, deps: [{ token: i0.ElementRef }, { token: i1.FocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: i1.InteractivityChecker }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }, { token: DialogConfig }], target: i0.ɵɵFactoryTarget.Component });
293
- CdkDialogContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "14.0.0-next.9", type: CdkDialogContainer, selector: "cdk-dialog-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, listeners: { "@dialog.start": "_onAnimationStart($event)", "@dialog.done": "_animationDone.next($event)" }, properties: { "@dialog": "{\n value: _state,\n params: {\n enterAnimationDuration: _config.enterAnimationDuration,\n exitAnimationDuration: _config.exitAnimationDuration\n }\n }", "attr.role": "_config.role", "attr.aria-label": "_config.ariaLabel || null", "attr.aria-describedby": "_config.ariaDescribedBy" } }, viewQueries: [{ propertyName: "_portalHost", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: ["cdk-dialog-container{background:#fff;border-radius:5px;display:block;padding:10px}"], directives: [{ type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [
294
- trigger('dialog', [
295
- state('enter', style({ opacity: 1 })),
296
- state('exit, void', style({ opacity: 0 })),
297
- transition('* => enter', group([
298
- animate('{{enterAnimationDuration}}'),
299
- query('@*', animateChild(), { optional: true }),
300
- ])),
301
- transition('* => exit, * => void', group([
302
- animate('{{exitAnimationDuration}}'),
303
- query('@*', animateChild(), { optional: true }),
304
- ])),
305
- ]),
306
- ], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: CdkDialogContainer, decorators: [{
308
- type: Component,
309
- args: [{ selector: 'cdk-dialog-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, animations: [
310
- trigger('dialog', [
311
- state('enter', style({ opacity: 1 })),
312
- state('exit, void', style({ opacity: 0 })),
313
- transition('* => enter', group([
314
- animate('{{enterAnimationDuration}}'),
315
- query('@*', animateChild(), { optional: true }),
316
- ])),
317
- transition('* => exit, * => void', group([
318
- animate('{{exitAnimationDuration}}'),
319
- query('@*', animateChild(), { optional: true }),
320
- ])),
321
- ]),
322
- ], host: {
323
- '[@dialog]': `{
324
- value: _state,
325
- params: {
326
- enterAnimationDuration: _config.enterAnimationDuration,
327
- exitAnimationDuration: _config.exitAnimationDuration
328
- }
329
- }`,
330
- '(@dialog.start)': '_onAnimationStart($event)',
331
- '(@dialog.done)': '_animationDone.next($event)',
332
- 'tabindex': '-1',
333
- '[attr.role]': '_config.role',
334
- 'aria-modal': 'true',
335
- '[attr.aria-label]': '_config.ariaLabel || null',
336
- '[attr.aria-describedby]': '_config.ariaDescribedBy',
337
- }, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: ["cdk-dialog-container{background:#fff;border-radius:5px;display:block;padding:10px}"] }]
338
- }], ctorParameters: function () {
339
- return [{ type: i0.ElementRef }, { type: i1.FocusTrapFactory }, { type: i0.ChangeDetectorRef }, { type: i1.InteractivityChecker }, { type: i0.NgZone }, { type: undefined, decorators: [{
340
- type: Optional
341
- }, {
342
- type: Inject,
343
- args: [DOCUMENT]
344
- }] }, { type: DialogConfig }];
345
- }, propDecorators: { _portalHost: [{
346
- type: ViewChild,
347
- args: [CdkPortalOutlet, { static: true }]
348
- }] } });
349
-
350
- /**
351
- * @license
352
- * Copyright Google LLC All Rights Reserved.
353
- *
354
- * Use of this source code is governed by an MIT-style license that can be
355
- * found in the LICENSE file at https://angular.io/license
356
- */
357
- /** Unique id for the created dialog. */
358
- let uniqueId = 0;
359
- /**
360
- * Reference to a dialog opened via the Dialog service.
361
- */
362
- class DialogRef {
363
- constructor(_overlayRef, _containerInstance, id = `dialog-${uniqueId++}`) {
364
- this._overlayRef = _overlayRef;
365
- this._containerInstance = _containerInstance;
366
- this.id = id;
367
- // If the dialog has a backdrop, handle clicks from the backdrop.
368
- if (_containerInstance._config.hasBackdrop) {
369
- _overlayRef.backdropClick().subscribe(() => {
370
- if (!this.disableClose) {
371
- this.close();
372
- }
373
- });
374
- }
375
- this.beforeClosed().subscribe(() => {
376
- this._overlayRef.detachBackdrop();
377
- });
378
- this.afterClosed().subscribe(() => {
379
- this._overlayRef.detach();
380
- this._overlayRef.dispose();
381
- this.componentInstance = null;
382
- });
383
- // Close when escape keydown event occurs
384
- _overlayRef
385
- .keydownEvents()
386
- .pipe(filter(event => {
387
- return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);
388
- }))
389
- .subscribe(event => {
390
- event.preventDefault();
391
- this.close();
392
- });
393
- }
394
- /** Gets an observable that emits when the overlay's backdrop has been clicked. */
395
- backdropClick() {
396
- return this._overlayRef.backdropClick();
397
- }
398
- /**
399
- * Close the dialog.
400
- * @param dialogResult Optional result to return to the dialog opener.
401
- */
402
- close(dialogResult) {
403
- this._result = dialogResult;
404
- this._containerInstance._startExiting();
405
- }
406
- /**
407
- * Updates the dialog's position.
408
- * @param position New dialog position.
409
- */
410
- updatePosition(position) {
411
- let strategy = this._getPositionStrategy();
412
- if (position && (position.left || position.right)) {
413
- position.left ? strategy.left(position.left) : strategy.right(position.right);
414
- }
415
- else {
416
- strategy.centerHorizontally();
417
- }
418
- if (position && (position.top || position.bottom)) {
419
- position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);
420
- }
421
- else {
422
- strategy.centerVertically();
423
- }
424
- this._overlayRef.updatePosition();
425
- return this;
426
- }
427
- /**
428
- * Gets an observable that emits when keydown events are targeted on the overlay.
429
- */
430
- keydownEvents() {
431
- return this._overlayRef.keydownEvents();
432
- }
433
- /**
434
- * Updates the dialog's width and height, defined, min and max.
435
- * @param size New size for the overlay.
436
- */
437
- updateSize(size) {
438
- this._overlayRef.updateSize(size);
439
- this._overlayRef.updatePosition();
440
- return this;
441
- }
442
- /** Fetches the position strategy object from the overlay ref. */
443
- _getPositionStrategy() {
444
- return this._overlayRef.getConfig().positionStrategy;
445
- }
446
- /** Gets an observable that emits when dialog begins opening. */
447
- beforeOpened() {
448
- return this._containerInstance._beforeEnter;
449
- }
450
- /** Gets an observable that emits when dialog is finished opening. */
451
- afterOpened() {
452
- return this._containerInstance._afterEnter;
453
- }
454
- /** Gets an observable that emits when dialog begins closing. */
455
- beforeClosed() {
456
- return this._containerInstance._beforeExit.pipe(map(() => this._result));
457
- }
458
- /** Gets an observable that emits when dialog is finished closing. */
459
- afterClosed() {
460
- return this._containerInstance._afterExit.pipe(map(() => this._result));
461
- }
462
- }
463
-
464
- /**
465
- * @license
466
- * Copyright Google LLC All Rights Reserved.
467
- *
468
- * Use of this source code is governed by an MIT-style license that can be
469
- * found in the LICENSE file at https://angular.io/license
470
- */
471
- /** Injection token for the Dialog's ScrollStrategy. */
472
- const DIALOG_SCROLL_STRATEGY = new InjectionToken('DialogScrollStrategy');
473
- /** Injection token for the Dialog's Data. */
474
- const DIALOG_DATA = new InjectionToken('DialogData');
475
- /** Injection token for the DialogRef constructor. */
476
- const DIALOG_REF = new InjectionToken('DialogRef');
477
- /** Injection token for the DialogConfig. */
478
- const DIALOG_CONFIG = new InjectionToken('DialogConfig');
479
- /** Injection token for the Dialog's DialogContainer component. */
480
- const DIALOG_CONTAINER = new InjectionToken('DialogContainer');
481
- /** @docs-private */
482
- function MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay) {
483
- return () => overlay.scrollStrategies.block();
484
- }
485
- /** @docs-private */
486
- const MAT_DIALOG_SCROLL_STRATEGY_PROVIDER = {
487
- provide: DIALOG_SCROLL_STRATEGY,
488
- deps: [Overlay],
489
- useFactory: MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY,
490
- };
491
-
492
- /**
493
- * @license
494
- * Copyright Google LLC All Rights Reserved.
495
- *
496
- * Use of this source code is governed by an MIT-style license that can be
497
- * found in the LICENSE file at https://angular.io/license
498
- */
499
- /**
500
- * Service to open modal dialogs.
501
- */
502
- class Dialog {
503
- constructor(_overlay, _injector, _dialogRefConstructor,
504
- // TODO(crisbeto): the `any` here can be replaced
505
- // with the proper type once we start using Ivy.
506
- scrollStrategy, _parentDialog, location) {
507
- this._overlay = _overlay;
508
- this._injector = _injector;
509
- this._dialogRefConstructor = _dialogRefConstructor;
510
- this._parentDialog = _parentDialog;
511
- this._afterAllClosedBase = new Subject();
512
- // TODO(jelbourn): tighten the type on the right-hand side of this expression.
513
- this.afterAllClosed = defer(() => this.openDialogs.length
514
- ? this._getAfterAllClosed()
515
- : this._getAfterAllClosed().pipe(startWith(undefined)));
516
- this._afterOpened = new Subject();
517
- this._openDialogs = [];
518
- // Close all of the dialogs when the user goes forwards/backwards in history or when the
519
- // location hash changes. Note that this usually doesn't include clicking on links (unless
520
- // the user is using the `HashLocationStrategy`).
521
- if (!_parentDialog && location) {
522
- location.subscribe(() => this.closeAll());
523
- }
524
- this._scrollStrategy = scrollStrategy;
525
- }
526
- /** Stream that emits when all dialogs are closed. */
527
- _getAfterAllClosed() {
528
- return this._parentDialog ? this._parentDialog.afterAllClosed : this._afterAllClosedBase;
529
- }
530
- /** Stream that emits when a dialog is opened. */
531
- get afterOpened() {
532
- return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpened;
533
- }
534
- /** Stream that emits when a dialog is opened. */
535
- get openDialogs() {
536
- return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogs;
537
- }
538
- /** Gets an open dialog by id. */
539
- getById(id) {
540
- return this._openDialogs.find(ref => ref.id === id);
541
- }
542
- /** Closes all open dialogs. */
543
- closeAll() {
544
- this.openDialogs.forEach(ref => ref.close());
545
- }
546
- /** Opens a dialog from a component. */
547
- openFromComponent(component, config) {
548
- config = this._applyConfigDefaults(config);
549
- if (config.id && this.getById(config.id) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
550
- throw Error(`Dialog with id "${config.id}" exists already. The dialog id must be unique.`);
551
- }
552
- const overlayRef = this._createOverlay(config);
553
- const dialogContainer = this._attachDialogContainer(overlayRef, config);
554
- const dialogRef = this._attachDialogContentForComponent(component, dialogContainer, overlayRef, config);
555
- this._registerDialogRef(dialogRef);
556
- dialogContainer._initializeWithAttachedContent();
557
- return dialogRef;
558
- }
559
- /** Opens a dialog from a template. */
560
- openFromTemplate(template, config) {
561
- config = this._applyConfigDefaults(config);
562
- if (config.id && this.getById(config.id) && (typeof ngDevMode === 'undefined' || ngDevMode)) {
563
- throw Error(`Dialog with id "${config.id}" exists already. The dialog id must be unique.`);
564
- }
565
- const overlayRef = this._createOverlay(config);
566
- const dialogContainer = this._attachDialogContainer(overlayRef, config);
567
- const dialogRef = this._attachDialogContentForTemplate(template, dialogContainer, overlayRef, config);
568
- this._registerDialogRef(dialogRef);
569
- dialogContainer._initializeWithAttachedContent();
570
- return dialogRef;
571
- }
572
- ngOnDestroy() {
573
- // Only close all the dialogs at this level.
574
- this._openDialogs.forEach(ref => ref.close());
575
- }
576
- /**
577
- * Forwards emitting events for when dialogs are opened and all dialogs are closed.
578
- */
579
- _registerDialogRef(dialogRef) {
580
- this.openDialogs.push(dialogRef);
581
- const dialogOpenSub = dialogRef.afterOpened().subscribe(() => {
582
- this.afterOpened.next(dialogRef);
583
- dialogOpenSub.unsubscribe();
584
- });
585
- const dialogCloseSub = dialogRef.afterClosed().subscribe(() => {
586
- let dialogIndex = this._openDialogs.indexOf(dialogRef);
587
- if (dialogIndex > -1) {
588
- this._openDialogs.splice(dialogIndex, 1);
589
- }
590
- if (!this._openDialogs.length) {
591
- this._afterAllClosedBase.next();
592
- dialogCloseSub.unsubscribe();
593
- }
594
- });
595
- }
596
- /**
597
- * Creates an overlay config from a dialog config.
598
- * @param config The dialog configuration.
599
- * @returns The overlay configuration.
600
- */
601
- _createOverlay(config) {
602
- const overlayConfig = new OverlayConfig({
603
- positionStrategy: this._overlay.position().global(),
604
- scrollStrategy: this._scrollStrategy(),
605
- panelClass: config.panelClass,
606
- hasBackdrop: config.hasBackdrop,
607
- direction: config.direction,
608
- minWidth: config.minWidth,
609
- minHeight: config.minHeight,
610
- maxWidth: config.maxWidth,
611
- maxHeight: config.maxHeight,
612
- });
613
- if (config.backdropClass) {
614
- overlayConfig.backdropClass = config.backdropClass;
615
- }
616
- return this._overlay.create(overlayConfig);
617
- }
618
- /**
619
- * Attaches an MatDialogContainer to a dialog's already-created overlay.
620
- * @param overlay Reference to the dialog's underlying overlay.
621
- * @param config The dialog configuration.
622
- * @returns A promise resolving to a ComponentRef for the attached container.
623
- */
624
- _attachDialogContainer(overlay, config) {
625
- var _a, _b;
626
- const container = config.containerComponent || this._injector.get(DIALOG_CONTAINER);
627
- const userInjector = (_a = config.injector) !== null && _a !== void 0 ? _a : (_b = config.viewContainerRef) === null || _b === void 0 ? void 0 : _b.injector;
628
- const injector = Injector.create({
629
- parent: userInjector || this._injector,
630
- providers: [{ provide: DialogConfig, useValue: config }],
631
- });
632
- const containerPortal = new ComponentPortal(container, config.viewContainerRef, injector);
633
- const containerRef = overlay.attach(containerPortal);
634
- containerRef.instance._config = config;
635
- return containerRef.instance;
636
- }
637
- /**
638
- * Attaches the user-provided component to the already-created MatDialogContainer.
639
- * @param componentOrTemplateRef The type of component being loaded into the dialog,
640
- * or a TemplateRef to instantiate as the content.
641
- * @param dialogContainer Reference to the wrapping MatDialogContainer.
642
- * @param overlayRef Reference to the overlay in which the dialog resides.
643
- * @param config The dialog configuration.
644
- * @returns A promise resolving to the MatDialogRef that should be returned to the user.
645
- */
646
- _attachDialogContentForComponent(componentOrTemplateRef, dialogContainer, overlayRef, config) {
647
- // Create a reference to the dialog we're creating in order to give the user a handle
648
- // to modify and close it.
649
- const dialogRef = this._createDialogRef(overlayRef, dialogContainer, config);
650
- const injector = this._createInjector(config, dialogRef, dialogContainer);
651
- const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, undefined, injector));
652
- dialogRef.componentInstance = contentRef.instance;
653
- return dialogRef;
654
- }
655
- /**
656
- * Attaches the user-provided component to the already-created MatDialogContainer.
657
- * @param componentOrTemplateRef The type of component being loaded into the dialog,
658
- * or a TemplateRef to instantiate as the content.
659
- * @param dialogContainer Reference to the wrapping MatDialogContainer.
660
- * @param overlayRef Reference to the overlay in which the dialog resides.
661
- * @param config The dialog configuration.
662
- * @returns A promise resolving to the MatDialogRef that should be returned to the user.
663
- */
664
- _attachDialogContentForTemplate(componentOrTemplateRef, dialogContainer, overlayRef, config) {
665
- // Create a reference to the dialog we're creating in order to give the user a handle
666
- // to modify and close it.
667
- const dialogRef = this._createDialogRef(overlayRef, dialogContainer, config);
668
- dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, {
669
- $implicit: config.data,
670
- dialogRef,
671
- }));
672
- return dialogRef;
673
- }
674
- /**
675
- * Creates a custom injector to be used inside the dialog. This allows a component loaded inside
676
- * of a dialog to close itself and, optionally, to return a value.
677
- * @param config Config object that is used to construct the dialog.
678
- * @param dialogRef Reference to the dialog.
679
- * @param container Dialog container element that wraps all of the contents.
680
- * @returns The custom injector that can be used inside the dialog.
681
- */
682
- _createInjector(config, dialogRef, dialogContainer) {
683
- const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
684
- const providers = [
685
- { provide: this._injector.get(DIALOG_REF), useValue: dialogRef },
686
- { provide: this._injector.get(DIALOG_CONTAINER), useValue: dialogContainer },
687
- { provide: DIALOG_DATA, useValue: config.data },
688
- ];
689
- if (config.direction &&
690
- (!userInjector ||
691
- !userInjector.get(Directionality, null, InjectFlags.Optional))) {
692
- providers.push({
693
- provide: Directionality,
694
- useValue: { value: config.direction, change: of() },
695
- });
696
- }
697
- return Injector.create({ parent: userInjector || this._injector, providers });
698
- }
699
- /** Creates a new dialog ref. */
700
- _createDialogRef(overlayRef, dialogContainer, config) {
701
- const dialogRef = new this._dialogRefConstructor(overlayRef, dialogContainer, config.id);
702
- dialogRef.disableClose = config.disableClose;
703
- dialogRef.updateSize(config).updatePosition(config.position);
704
- return dialogRef;
705
- }
706
- /**
707
- * Expands the provided configuration object to include the default values for properties which
708
- * are undefined.
709
- */
710
- _applyConfigDefaults(config) {
711
- const dialogConfig = this._injector.get(DIALOG_CONFIG);
712
- return Object.assign(Object.assign({}, new dialogConfig()), config);
713
- }
714
- }
715
- Dialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Dialog, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: DIALOG_REF }, { token: DIALOG_SCROLL_STRATEGY }, { token: Dialog, optional: true, skipSelf: true }, { token: i2.Location, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
716
- Dialog.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Dialog });
717
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: Dialog, decorators: [{
718
- type: Injectable
719
- }], ctorParameters: function () {
720
- return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.Type, decorators: [{
721
- type: Inject,
722
- args: [DIALOG_REF]
723
- }] }, { type: undefined, decorators: [{
724
- type: Inject,
725
- args: [DIALOG_SCROLL_STRATEGY]
726
- }] }, { type: Dialog, decorators: [{
727
- type: Optional
728
- }, {
729
- type: SkipSelf
730
- }] }, { type: i2.Location, decorators: [{
731
- type: Optional
732
- }] }];
733
- } });
734
-
735
- /**
736
- * @license
737
- * Copyright Google LLC All Rights Reserved.
738
- *
739
- * Use of this source code is governed by an MIT-style license that can be
740
- * found in the LICENSE file at https://angular.io/license
741
- */
742
- class DialogModule {
743
- }
744
- DialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: DialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
745
- DialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: DialogModule, declarations: [CdkDialogContainer], imports: [OverlayModule, PortalModule, A11yModule], exports: [
746
- // Re-export the PortalModule so that people extending the `CdkDialogContainer`
747
- // don't have to remember to import it or be faced with an unhelpful error.
748
- PortalModule,
749
- CdkDialogContainer
750
- ] });
751
- DialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: DialogModule, providers: [
752
- Dialog,
753
- MAT_DIALOG_SCROLL_STRATEGY_PROVIDER,
754
- { provide: DIALOG_REF, useValue: DialogRef },
755
- { provide: DIALOG_CONTAINER, useValue: CdkDialogContainer },
756
- { provide: DIALOG_CONFIG, useValue: DialogConfig },
757
- ], imports: [[OverlayModule, PortalModule, A11yModule],
758
- // Re-export the PortalModule so that people extending the `CdkDialogContainer`
759
- // don't have to remember to import it or be faced with an unhelpful error.
760
- PortalModule] });
761
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-next.9", ngImport: i0, type: DialogModule, decorators: [{
762
- type: NgModule,
763
- args: [{
764
- imports: [OverlayModule, PortalModule, A11yModule],
765
- exports: [
766
- // Re-export the PortalModule so that people extending the `CdkDialogContainer`
767
- // don't have to remember to import it or be faced with an unhelpful error.
768
- PortalModule,
769
- CdkDialogContainer,
770
- ],
771
- declarations: [CdkDialogContainer],
772
- providers: [
773
- Dialog,
774
- MAT_DIALOG_SCROLL_STRATEGY_PROVIDER,
775
- { provide: DIALOG_REF, useValue: DialogRef },
776
- { provide: DIALOG_CONTAINER, useValue: CdkDialogContainer },
777
- { provide: DIALOG_CONFIG, useValue: DialogConfig },
778
- ],
779
- }]
780
- }] });
781
-
782
- /**
783
- * @license
784
- * Copyright Google LLC All Rights Reserved.
785
- *
786
- * Use of this source code is governed by an MIT-style license that can be
787
- * found in the LICENSE file at https://angular.io/license
788
- */
789
-
790
- /**
791
- * @license
792
- * Copyright Google LLC All Rights Reserved.
793
- *
794
- * Use of this source code is governed by an MIT-style license that can be
795
- * found in the LICENSE file at https://angular.io/license
796
- */
797
-
798
- /**
799
- * Generated bundle index. Do not edit.
800
- */
801
-
802
- export { CdkDialogContainer, DIALOG_CONFIG, DIALOG_CONTAINER, DIALOG_DATA, DIALOG_REF, DIALOG_SCROLL_STRATEGY, Dialog, DialogConfig, DialogModule, DialogRef, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER, MAT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, throwDialogContentAlreadyAttachedError };
803
- //# sourceMappingURL=dialog.mjs.map