@angular/material 21.0.0-next.9 → 21.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/core/tokens/_classes.scss +1 -1
  2. package/core/tokens/m2/_md-sys-color.scss +17 -17
  3. package/fesm2022/_animation-chunk.mjs +10 -16
  4. package/fesm2022/_animation-chunk.mjs.map +1 -1
  5. package/fesm2022/_date-formats-chunk.mjs +68 -164
  6. package/fesm2022/_date-formats-chunk.mjs.map +1 -1
  7. package/fesm2022/_date-range-input-harness-chunk.mjs +284 -463
  8. package/fesm2022/_date-range-input-harness-chunk.mjs.map +1 -1
  9. package/fesm2022/_error-options-chunk.mjs +56 -19
  10. package/fesm2022/_error-options-chunk.mjs.map +1 -1
  11. package/fesm2022/_error-state-chunk.mjs +24 -31
  12. package/fesm2022/_error-state-chunk.mjs.map +1 -1
  13. package/fesm2022/_form-field-chunk.mjs +1224 -1017
  14. package/fesm2022/_form-field-chunk.mjs.map +1 -1
  15. package/fesm2022/_icon-button-chunk.mjs +243 -187
  16. package/fesm2022/_icon-button-chunk.mjs.map +1 -1
  17. package/fesm2022/_icon-registry-chunk.mjs +350 -575
  18. package/fesm2022/_icon-registry-chunk.mjs.map +1 -1
  19. package/fesm2022/_input-harness-chunk.mjs +56 -107
  20. package/fesm2022/_input-harness-chunk.mjs.map +1 -1
  21. package/fesm2022/_input-value-accessor-chunk.mjs +0 -6
  22. package/fesm2022/_input-value-accessor-chunk.mjs.map +1 -1
  23. package/fesm2022/_internal-form-field-chunk.mjs +59 -19
  24. package/fesm2022/_internal-form-field-chunk.mjs.map +1 -1
  25. package/fesm2022/_line-chunk.mjs +83 -43
  26. package/fesm2022/_line-chunk.mjs.map +1 -1
  27. package/fesm2022/_option-chunk.mjs +348 -311
  28. package/fesm2022/_option-chunk.mjs.map +1 -1
  29. package/fesm2022/_option-harness-chunk.mjs +23 -39
  30. package/fesm2022/_option-harness-chunk.mjs.map +1 -1
  31. package/fesm2022/_option-module-chunk.mjs +36 -10
  32. package/fesm2022/_option-module-chunk.mjs.map +1 -1
  33. package/fesm2022/_pseudo-checkbox-chunk.mjs +79 -44
  34. package/fesm2022/_pseudo-checkbox-chunk.mjs.map +1 -1
  35. package/fesm2022/_pseudo-checkbox-module-chunk.mjs +36 -10
  36. package/fesm2022/_pseudo-checkbox-module-chunk.mjs.map +1 -1
  37. package/fesm2022/_public-api-chunk.mjs +71 -134
  38. package/fesm2022/_public-api-chunk.mjs.map +1 -1
  39. package/fesm2022/_ripple-chunk.mjs +504 -600
  40. package/fesm2022/_ripple-chunk.mjs.map +1 -1
  41. package/fesm2022/_ripple-loader-chunk.mjs +120 -138
  42. package/fesm2022/_ripple-loader-chunk.mjs.map +1 -1
  43. package/fesm2022/_ripple-module-chunk.mjs +36 -10
  44. package/fesm2022/_ripple-module-chunk.mjs.map +1 -1
  45. package/fesm2022/_structural-styles-chunk.mjs +37 -10
  46. package/fesm2022/_structural-styles-chunk.mjs.map +1 -1
  47. package/fesm2022/_tooltip-chunk.mjs +811 -888
  48. package/fesm2022/_tooltip-chunk.mjs.map +1 -1
  49. package/fesm2022/autocomplete-testing.mjs +62 -86
  50. package/fesm2022/autocomplete-testing.mjs.map +1 -1
  51. package/fesm2022/autocomplete.mjs +965 -1126
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge-testing.mjs +38 -54
  54. package/fesm2022/badge-testing.mjs.map +1 -1
  55. package/fesm2022/badge.mjs +321 -272
  56. package/fesm2022/badge.mjs.map +1 -1
  57. package/fesm2022/bottom-sheet-testing.mjs +10 -24
  58. package/fesm2022/bottom-sheet-testing.mjs.map +1 -1
  59. package/fesm2022/bottom-sheet.mjs +349 -344
  60. package/fesm2022/bottom-sheet.mjs.map +1 -1
  61. package/fesm2022/button-testing.mjs +60 -94
  62. package/fesm2022/button-testing.mjs.map +1 -1
  63. package/fesm2022/button-toggle-testing.mjs +76 -125
  64. package/fesm2022/button-toggle-testing.mjs.map +1 -1
  65. package/fesm2022/button-toggle.mjs +752 -662
  66. package/fesm2022/button-toggle.mjs.map +1 -1
  67. package/fesm2022/button.mjs +263 -158
  68. package/fesm2022/button.mjs.map +1 -1
  69. package/fesm2022/card-testing.mjs +19 -33
  70. package/fesm2022/card-testing.mjs.map +1 -1
  71. package/fesm2022/card.mjs +576 -272
  72. package/fesm2022/card.mjs.map +1 -1
  73. package/fesm2022/checkbox-testing.mjs +71 -123
  74. package/fesm2022/checkbox-testing.mjs.map +1 -1
  75. package/fesm2022/checkbox.mjs +515 -477
  76. package/fesm2022/checkbox.mjs.map +1 -1
  77. package/fesm2022/chips-testing.mjs +201 -344
  78. package/fesm2022/chips-testing.mjs.map +1 -1
  79. package/fesm2022/chips.mjs +2552 -2289
  80. package/fesm2022/chips.mjs.map +1 -1
  81. package/fesm2022/core-testing.mjs +14 -28
  82. package/fesm2022/core-testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +357 -328
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/datepicker-testing.mjs +15 -25
  86. package/fesm2022/datepicker-testing.mjs.map +1 -1
  87. package/fesm2022/datepicker.mjs +4826 -4563
  88. package/fesm2022/datepicker.mjs.map +1 -1
  89. package/fesm2022/dialog-testing.mjs +93 -129
  90. package/fesm2022/dialog-testing.mjs.map +1 -1
  91. package/fesm2022/dialog.mjs +810 -829
  92. package/fesm2022/dialog.mjs.map +1 -1
  93. package/fesm2022/divider-testing.mjs +10 -11
  94. package/fesm2022/divider-testing.mjs.map +1 -1
  95. package/fesm2022/divider.mjs +119 -43
  96. package/fesm2022/divider.mjs.map +1 -1
  97. package/fesm2022/expansion-testing.mjs +74 -130
  98. package/fesm2022/expansion-testing.mjs.map +1 -1
  99. package/fesm2022/expansion.mjs +703 -515
  100. package/fesm2022/expansion.mjs.map +1 -1
  101. package/fesm2022/form-field-testing-control.mjs +16 -33
  102. package/fesm2022/form-field-testing-control.mjs.map +1 -1
  103. package/fesm2022/form-field-testing.mjs +118 -179
  104. package/fesm2022/form-field-testing.mjs.map +1 -1
  105. package/fesm2022/form-field.mjs +36 -10
  106. package/fesm2022/form-field.mjs.map +1 -1
  107. package/fesm2022/grid-list-testing.mjs +65 -113
  108. package/fesm2022/grid-list-testing.mjs.map +1 -1
  109. package/fesm2022/grid-list.mjs +559 -494
  110. package/fesm2022/grid-list.mjs.map +1 -1
  111. package/fesm2022/icon-testing.mjs +148 -127
  112. package/fesm2022/icon-testing.mjs.map +1 -1
  113. package/fesm2022/icon.mjs +325 -351
  114. package/fesm2022/icon.mjs.map +1 -1
  115. package/fesm2022/input-testing.mjs +59 -99
  116. package/fesm2022/input-testing.mjs.map +1 -1
  117. package/fesm2022/input.mjs +457 -520
  118. package/fesm2022/input.mjs.map +1 -1
  119. package/fesm2022/list-testing.mjs +251 -434
  120. package/fesm2022/list-testing.mjs.map +1 -1
  121. package/fesm2022/list.mjs +1522 -1204
  122. package/fesm2022/list.mjs.map +1 -1
  123. package/fesm2022/material.mjs +0 -5
  124. package/fesm2022/material.mjs.map +1 -1
  125. package/fesm2022/menu-testing.mjs +159 -228
  126. package/fesm2022/menu-testing.mjs.map +1 -1
  127. package/fesm2022/menu.mjs +1338 -1343
  128. package/fesm2022/menu.mjs.map +1 -1
  129. package/fesm2022/paginator-testing.mjs +55 -79
  130. package/fesm2022/paginator-testing.mjs.map +1 -1
  131. package/fesm2022/paginator.mjs +381 -309
  132. package/fesm2022/paginator.mjs.map +1 -1
  133. package/fesm2022/progress-bar-testing.mjs +12 -21
  134. package/fesm2022/progress-bar-testing.mjs.map +1 -1
  135. package/fesm2022/progress-bar.mjs +224 -169
  136. package/fesm2022/progress-bar.mjs.map +1 -1
  137. package/fesm2022/progress-spinner-testing.mjs +13 -23
  138. package/fesm2022/progress-spinner-testing.mjs.map +1 -1
  139. package/fesm2022/progress-spinner.mjs +235 -160
  140. package/fesm2022/progress-spinner.mjs.map +1 -1
  141. package/fesm2022/radio-testing.mjs +133 -208
  142. package/fesm2022/radio-testing.mjs.map +1 -1
  143. package/fesm2022/radio.mjs +712 -679
  144. package/fesm2022/radio.mjs.map +1 -1
  145. package/fesm2022/select-testing.mjs +83 -117
  146. package/fesm2022/select-testing.mjs.map +1 -1
  147. package/fesm2022/select.mjs +1116 -1246
  148. package/fesm2022/select.mjs.map +1 -1
  149. package/fesm2022/sidenav-testing.mjs +54 -120
  150. package/fesm2022/sidenav-testing.mjs.map +1 -1
  151. package/fesm2022/sidenav.mjs +1078 -995
  152. package/fesm2022/sidenav.mjs.map +1 -1
  153. package/fesm2022/slide-toggle-testing.mjs +57 -92
  154. package/fesm2022/slide-toggle-testing.mjs.map +1 -1
  155. package/fesm2022/slide-toggle.mjs +369 -279
  156. package/fesm2022/slide-toggle.mjs.map +1 -1
  157. package/fesm2022/slider-testing.mjs +90 -138
  158. package/fesm2022/slider-testing.mjs.map +1 -1
  159. package/fesm2022/slider.mjs +1651 -1716
  160. package/fesm2022/slider.mjs.map +1 -1
  161. package/fesm2022/snack-bar-testing.mjs +40 -87
  162. package/fesm2022/snack-bar-testing.mjs.map +1 -1
  163. package/fesm2022/snack-bar.mjs +763 -714
  164. package/fesm2022/snack-bar.mjs.map +1 -1
  165. package/fesm2022/sort-testing.mjs +45 -66
  166. package/fesm2022/sort-testing.mjs.map +1 -1
  167. package/fesm2022/sort.mjs +419 -344
  168. package/fesm2022/sort.mjs.map +1 -1
  169. package/fesm2022/stepper-testing.mjs +78 -154
  170. package/fesm2022/stepper-testing.mjs.map +1 -1
  171. package/fesm2022/stepper.mjs +790 -498
  172. package/fesm2022/stepper.mjs.map +1 -1
  173. package/fesm2022/table-testing.mjs +120 -213
  174. package/fesm2022/table-testing.mjs.map +1 -1
  175. package/fesm2022/table.mjs +1026 -684
  176. package/fesm2022/table.mjs.map +1 -1
  177. package/fesm2022/tabs-testing.mjs +125 -197
  178. package/fesm2022/tabs-testing.mjs.map +1 -1
  179. package/fesm2022/tabs.mjs +2351 -2028
  180. package/fesm2022/tabs.mjs.map +1 -1
  181. package/fesm2022/timepicker-testing.mjs +113 -172
  182. package/fesm2022/timepicker-testing.mjs.map +1 -1
  183. package/fesm2022/timepicker.mjs +1019 -826
  184. package/fesm2022/timepicker.mjs.map +1 -1
  185. package/fesm2022/toolbar-testing.mjs +16 -27
  186. package/fesm2022/toolbar-testing.mjs.map +1 -1
  187. package/fesm2022/toolbar.mjs +163 -78
  188. package/fesm2022/toolbar.mjs.map +1 -1
  189. package/fesm2022/tooltip-testing.mjs +41 -52
  190. package/fesm2022/tooltip-testing.mjs.map +1 -1
  191. package/fesm2022/tooltip.mjs +36 -10
  192. package/fesm2022/tooltip.mjs.map +1 -1
  193. package/fesm2022/tree-testing.mjs +86 -162
  194. package/fesm2022/tree-testing.mjs.map +1 -1
  195. package/fesm2022/tree.mjs +638 -466
  196. package/fesm2022/tree.mjs.map +1 -1
  197. package/package.json +2 -2
  198. package/schematics/ng-add/index.js +1 -1
  199. package/types/expansion.d.ts +4 -2
  200. package/types/menu-testing.d.ts +2 -0
  201. package/types/select.d.ts +1 -1
  202. package/types/timepicker.d.ts +1 -0
@@ -18,754 +18,803 @@ import '@angular/cdk/coercion';
18
18
  import './_structural-styles-chunk.mjs';
19
19
  import './_ripple-module-chunk.mjs';
20
20
 
21
- /** Maximum amount of milliseconds that can be passed into setTimeout. */
22
21
  const MAX_TIMEOUT = Math.pow(2, 31) - 1;
23
- /**
24
- * Reference to a snack bar dispatched from the snack bar service.
25
- */
26
22
  class MatSnackBarRef {
27
- _overlayRef;
28
- /** The instance of the component making up the content of the snack bar. */
29
- instance;
30
- /**
31
- * The instance of the component making up the content of the snack bar.
32
- * @docs-private
33
- */
34
- containerInstance;
35
- /** Subject for notifying the user that the snack bar has been dismissed. */
36
- _afterDismissed = new Subject();
37
- /** Subject for notifying the user that the snack bar has opened and appeared. */
38
- _afterOpened = new Subject();
39
- /** Subject for notifying the user that the snack bar action was called. */
40
- _onAction = new Subject();
41
- /**
42
- * Timeout ID for the duration setTimeout call. Used to clear the timeout if the snackbar is
43
- * dismissed before the duration passes.
44
- */
45
- _durationTimeoutId;
46
- /** Whether the snack bar was dismissed using the action button. */
47
- _dismissedByAction = false;
48
- constructor(containerInstance, _overlayRef) {
49
- this._overlayRef = _overlayRef;
50
- this.containerInstance = containerInstance;
51
- containerInstance._onExit.subscribe(() => this._finishDismiss());
52
- }
53
- /** Dismisses the snack bar. */
54
- dismiss() {
55
- if (!this._afterDismissed.closed) {
56
- this.containerInstance.exit();
57
- }
58
- clearTimeout(this._durationTimeoutId);
59
- }
60
- /** Marks the snackbar action clicked. */
61
- dismissWithAction() {
62
- if (!this._onAction.closed) {
63
- this._dismissedByAction = true;
64
- this._onAction.next();
65
- this._onAction.complete();
66
- this.dismiss();
67
- }
68
- clearTimeout(this._durationTimeoutId);
69
- }
70
- /**
71
- * Marks the snackbar action clicked.
72
- * @deprecated Use `dismissWithAction` instead.
73
- * @breaking-change 8.0.0
74
- */
75
- closeWithAction() {
76
- this.dismissWithAction();
77
- }
78
- /** Dismisses the snack bar after some duration */
79
- _dismissAfter(duration) {
80
- // Note that we need to cap the duration to the maximum value for setTimeout, because
81
- // it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.
82
- this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));
83
- }
84
- /** Marks the snackbar as opened */
85
- _open() {
86
- if (!this._afterOpened.closed) {
87
- this._afterOpened.next();
88
- this._afterOpened.complete();
89
- }
90
- }
91
- /** Cleans up the DOM after closing. */
92
- _finishDismiss() {
93
- this._overlayRef.dispose();
94
- if (!this._onAction.closed) {
95
- this._onAction.complete();
96
- }
97
- this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });
98
- this._afterDismissed.complete();
99
- this._dismissedByAction = false;
100
- }
101
- /** Gets an observable that is notified when the snack bar is finished closing. */
102
- afterDismissed() {
103
- return this._afterDismissed;
104
- }
105
- /** Gets an observable that is notified when the snack bar has opened and appeared. */
106
- afterOpened() {
107
- return this.containerInstance._onEnter;
108
- }
109
- /** Gets an observable that is notified when the snack bar action is called. */
110
- onAction() {
111
- return this._onAction;
112
- }
23
+ _overlayRef;
24
+ instance;
25
+ containerInstance;
26
+ _afterDismissed = new Subject();
27
+ _afterOpened = new Subject();
28
+ _onAction = new Subject();
29
+ _durationTimeoutId;
30
+ _dismissedByAction = false;
31
+ constructor(containerInstance, _overlayRef) {
32
+ this._overlayRef = _overlayRef;
33
+ this.containerInstance = containerInstance;
34
+ containerInstance._onExit.subscribe(() => this._finishDismiss());
35
+ }
36
+ dismiss() {
37
+ if (!this._afterDismissed.closed) {
38
+ this.containerInstance.exit();
39
+ }
40
+ clearTimeout(this._durationTimeoutId);
41
+ }
42
+ dismissWithAction() {
43
+ if (!this._onAction.closed) {
44
+ this._dismissedByAction = true;
45
+ this._onAction.next();
46
+ this._onAction.complete();
47
+ this.dismiss();
48
+ }
49
+ clearTimeout(this._durationTimeoutId);
50
+ }
51
+ closeWithAction() {
52
+ this.dismissWithAction();
53
+ }
54
+ _dismissAfter(duration) {
55
+ this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));
56
+ }
57
+ _open() {
58
+ if (!this._afterOpened.closed) {
59
+ this._afterOpened.next();
60
+ this._afterOpened.complete();
61
+ }
62
+ }
63
+ _finishDismiss() {
64
+ this._overlayRef.dispose();
65
+ if (!this._onAction.closed) {
66
+ this._onAction.complete();
67
+ }
68
+ this._afterDismissed.next({
69
+ dismissedByAction: this._dismissedByAction
70
+ });
71
+ this._afterDismissed.complete();
72
+ this._dismissedByAction = false;
73
+ }
74
+ afterDismissed() {
75
+ return this._afterDismissed;
76
+ }
77
+ afterOpened() {
78
+ return this.containerInstance._onEnter;
79
+ }
80
+ onAction() {
81
+ return this._onAction;
82
+ }
113
83
  }
114
84
 
115
- /** Injection token that can be used to access the data that was passed in to a snack bar. */
116
85
  const MAT_SNACK_BAR_DATA = new InjectionToken('MatSnackBarData');
117
- /**
118
- * Configuration used when opening a snack-bar.
119
- */
120
86
  class MatSnackBarConfig {
121
- /** The politeness level for the MatAriaLiveAnnouncer announcement. */
122
- politeness = 'polite';
123
- /**
124
- * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
125
- * component or template, the announcement message will default to the specified message.
126
- */
127
- announcementMessage = '';
128
- /**
129
- * The view container that serves as the parent for the snackbar for the purposes of dependency
130
- * injection. Note: this does not affect where the snackbar is inserted in the DOM.
131
- */
132
- viewContainerRef;
133
- /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
134
- duration = 0;
135
- /** Extra CSS classes to be added to the snack bar container. */
136
- panelClass;
137
- /** Text layout direction for the snack bar. */
138
- direction;
139
- /** Data being injected into the child component. */
140
- data = null;
141
- /** The horizontal position to place the snack bar. */
142
- horizontalPosition = 'center';
143
- /** The vertical position to place the snack bar. */
144
- verticalPosition = 'bottom';
87
+ politeness = 'polite';
88
+ announcementMessage = '';
89
+ viewContainerRef;
90
+ duration = 0;
91
+ panelClass;
92
+ direction;
93
+ data = null;
94
+ horizontalPosition = 'center';
95
+ verticalPosition = 'bottom';
145
96
  }
146
97
 
147
- /** Directive that should be applied to the text element to be rendered in the snack bar. */
148
98
  class MatSnackBarLabel {
149
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
150
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatSnackBarLabel, isStandalone: true, selector: "[matSnackBarLabel]", host: { classAttribute: "mat-mdc-snack-bar-label mdc-snackbar__label" }, ngImport: i0 });
99
+ static ɵfac = i0.ɵɵngDeclareFactory({
100
+ minVersion: "12.0.0",
101
+ version: "20.2.0-next.2",
102
+ ngImport: i0,
103
+ type: MatSnackBarLabel,
104
+ deps: [],
105
+ target: i0.ɵɵFactoryTarget.Directive
106
+ });
107
+ static ɵdir = i0.ɵɵngDeclareDirective({
108
+ minVersion: "14.0.0",
109
+ version: "20.2.0-next.2",
110
+ type: MatSnackBarLabel,
111
+ isStandalone: true,
112
+ selector: "[matSnackBarLabel]",
113
+ host: {
114
+ classAttribute: "mat-mdc-snack-bar-label mdc-snackbar__label"
115
+ },
116
+ ngImport: i0
117
+ });
151
118
  }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarLabel, decorators: [{
153
- type: Directive,
154
- args: [{
155
- selector: `[matSnackBarLabel]`,
156
- host: {
157
- 'class': 'mat-mdc-snack-bar-label mdc-snackbar__label',
158
- },
159
- }]
160
- }] });
161
- /** Directive that should be applied to the element containing the snack bar's action buttons. */
119
+ i0.ɵɵngDeclareClassMetadata({
120
+ minVersion: "12.0.0",
121
+ version: "20.2.0-next.2",
122
+ ngImport: i0,
123
+ type: MatSnackBarLabel,
124
+ decorators: [{
125
+ type: Directive,
126
+ args: [{
127
+ selector: `[matSnackBarLabel]`,
128
+ host: {
129
+ 'class': 'mat-mdc-snack-bar-label mdc-snackbar__label'
130
+ }
131
+ }]
132
+ }]
133
+ });
162
134
  class MatSnackBarActions {
163
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
164
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatSnackBarActions, isStandalone: true, selector: "[matSnackBarActions]", host: { classAttribute: "mat-mdc-snack-bar-actions mdc-snackbar__actions" }, ngImport: i0 });
135
+ static ɵfac = i0.ɵɵngDeclareFactory({
136
+ minVersion: "12.0.0",
137
+ version: "20.2.0-next.2",
138
+ ngImport: i0,
139
+ type: MatSnackBarActions,
140
+ deps: [],
141
+ target: i0.ɵɵFactoryTarget.Directive
142
+ });
143
+ static ɵdir = i0.ɵɵngDeclareDirective({
144
+ minVersion: "14.0.0",
145
+ version: "20.2.0-next.2",
146
+ type: MatSnackBarActions,
147
+ isStandalone: true,
148
+ selector: "[matSnackBarActions]",
149
+ host: {
150
+ classAttribute: "mat-mdc-snack-bar-actions mdc-snackbar__actions"
151
+ },
152
+ ngImport: i0
153
+ });
165
154
  }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarActions, decorators: [{
167
- type: Directive,
168
- args: [{
169
- selector: `[matSnackBarActions]`,
170
- host: {
171
- 'class': 'mat-mdc-snack-bar-actions mdc-snackbar__actions',
172
- },
173
- }]
174
- }] });
175
- /** Directive that should be applied to each of the snack bar's action buttons. */
155
+ i0.ɵɵngDeclareClassMetadata({
156
+ minVersion: "12.0.0",
157
+ version: "20.2.0-next.2",
158
+ ngImport: i0,
159
+ type: MatSnackBarActions,
160
+ decorators: [{
161
+ type: Directive,
162
+ args: [{
163
+ selector: `[matSnackBarActions]`,
164
+ host: {
165
+ 'class': 'mat-mdc-snack-bar-actions mdc-snackbar__actions'
166
+ }
167
+ }]
168
+ }]
169
+ });
176
170
  class MatSnackBarAction {
177
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarAction, deps: [], target: i0.ɵɵFactoryTarget.Directive });
178
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatSnackBarAction, isStandalone: true, selector: "[matSnackBarAction]", host: { classAttribute: "mat-mdc-snack-bar-action mdc-snackbar__action" }, ngImport: i0 });
171
+ static ɵfac = i0.ɵɵngDeclareFactory({
172
+ minVersion: "12.0.0",
173
+ version: "20.2.0-next.2",
174
+ ngImport: i0,
175
+ type: MatSnackBarAction,
176
+ deps: [],
177
+ target: i0.ɵɵFactoryTarget.Directive
178
+ });
179
+ static ɵdir = i0.ɵɵngDeclareDirective({
180
+ minVersion: "14.0.0",
181
+ version: "20.2.0-next.2",
182
+ type: MatSnackBarAction,
183
+ isStandalone: true,
184
+ selector: "[matSnackBarAction]",
185
+ host: {
186
+ classAttribute: "mat-mdc-snack-bar-action mdc-snackbar__action"
187
+ },
188
+ ngImport: i0
189
+ });
179
190
  }
180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarAction, decorators: [{
181
- type: Directive,
182
- args: [{
183
- selector: `[matSnackBarAction]`,
184
- host: {
185
- 'class': 'mat-mdc-snack-bar-action mdc-snackbar__action',
186
- },
187
- }]
188
- }] });
191
+ i0.ɵɵngDeclareClassMetadata({
192
+ minVersion: "12.0.0",
193
+ version: "20.2.0-next.2",
194
+ ngImport: i0,
195
+ type: MatSnackBarAction,
196
+ decorators: [{
197
+ type: Directive,
198
+ args: [{
199
+ selector: `[matSnackBarAction]`,
200
+ host: {
201
+ 'class': 'mat-mdc-snack-bar-action mdc-snackbar__action'
202
+ }
203
+ }]
204
+ }]
205
+ });
189
206
 
190
207
  class SimpleSnackBar {
191
- snackBarRef = inject(MatSnackBarRef);
192
- data = inject(MAT_SNACK_BAR_DATA);
193
- constructor() { }
194
- /** Performs the action on the snack bar. */
195
- action() {
196
- this.snackBarRef.dismissWithAction();
197
- }
198
- /** If the action button should be shown. */
199
- get hasAction() {
200
- return !!this.data.action;
201
- }
202
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: SimpleSnackBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
203
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.0-next.2", type: SimpleSnackBar, isStandalone: true, selector: "simple-snack-bar", host: { classAttribute: "mat-mdc-simple-snack-bar" }, exportAs: ["matSnackBar"], ngImport: i0, template: "<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n@if (hasAction) {\n <div matSnackBarActions>\n <button matButton matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n </div>\n}\n", styles: [".mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}\n"], dependencies: [{ kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatSnackBarLabel, selector: "[matSnackBarLabel]" }, { kind: "directive", type: MatSnackBarActions, selector: "[matSnackBarActions]" }, { kind: "directive", type: MatSnackBarAction, selector: "[matSnackBarAction]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
208
+ snackBarRef = inject(MatSnackBarRef);
209
+ data = inject(MAT_SNACK_BAR_DATA);
210
+ constructor() {}
211
+ action() {
212
+ this.snackBarRef.dismissWithAction();
213
+ }
214
+ get hasAction() {
215
+ return !!this.data.action;
216
+ }
217
+ static ɵfac = i0.ɵɵngDeclareFactory({
218
+ minVersion: "12.0.0",
219
+ version: "20.2.0-next.2",
220
+ ngImport: i0,
221
+ type: SimpleSnackBar,
222
+ deps: [],
223
+ target: i0.ɵɵFactoryTarget.Component
224
+ });
225
+ static ɵcmp = i0.ɵɵngDeclareComponent({
226
+ minVersion: "17.0.0",
227
+ version: "20.2.0-next.2",
228
+ type: SimpleSnackBar,
229
+ isStandalone: true,
230
+ selector: "simple-snack-bar",
231
+ host: {
232
+ classAttribute: "mat-mdc-simple-snack-bar"
233
+ },
234
+ exportAs: ["matSnackBar"],
235
+ ngImport: i0,
236
+ template: "<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n@if (hasAction) {\n <div matSnackBarActions>\n <button matButton matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n </div>\n}\n",
237
+ styles: [".mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}\n"],
238
+ dependencies: [{
239
+ kind: "component",
240
+ type: MatButton,
241
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
242
+ inputs: ["matButton"],
243
+ exportAs: ["matButton", "matAnchor"]
244
+ }, {
245
+ kind: "directive",
246
+ type: MatSnackBarLabel,
247
+ selector: "[matSnackBarLabel]"
248
+ }, {
249
+ kind: "directive",
250
+ type: MatSnackBarActions,
251
+ selector: "[matSnackBarActions]"
252
+ }, {
253
+ kind: "directive",
254
+ type: MatSnackBarAction,
255
+ selector: "[matSnackBarAction]"
256
+ }],
257
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
258
+ encapsulation: i0.ViewEncapsulation.None
259
+ });
204
260
  }
205
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: SimpleSnackBar, decorators: [{
206
- type: Component,
207
- args: [{ selector: 'simple-snack-bar', exportAs: 'matSnackBar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction], host: {
208
- 'class': 'mat-mdc-simple-snack-bar',
209
- }, template: "<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n@if (hasAction) {\n <div matSnackBarActions>\n <button matButton matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n </div>\n}\n", styles: [".mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}\n"] }]
210
- }], ctorParameters: () => [] });
261
+ i0.ɵɵngDeclareClassMetadata({
262
+ minVersion: "12.0.0",
263
+ version: "20.2.0-next.2",
264
+ ngImport: i0,
265
+ type: SimpleSnackBar,
266
+ decorators: [{
267
+ type: Component,
268
+ args: [{
269
+ selector: 'simple-snack-bar',
270
+ exportAs: 'matSnackBar',
271
+ encapsulation: ViewEncapsulation.None,
272
+ changeDetection: ChangeDetectionStrategy.OnPush,
273
+ imports: [MatButton, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction],
274
+ host: {
275
+ 'class': 'mat-mdc-simple-snack-bar'
276
+ },
277
+ template: "<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n@if (hasAction) {\n <div matSnackBarActions>\n <button matButton matSnackBarAction (click)=\"action()\">\n {{data.action}}\n </button>\n </div>\n}\n",
278
+ styles: [".mat-mdc-simple-snack-bar{display:flex}.mat-mdc-simple-snack-bar .mat-mdc-snack-bar-label{max-height:50vh;overflow:auto}\n"]
279
+ }]
280
+ }],
281
+ ctorParameters: () => []
282
+ });
211
283
 
212
284
  const ENTER_ANIMATION = '_mat-snack-bar-enter';
213
285
  const EXIT_ANIMATION = '_mat-snack-bar-exit';
214
- /**
215
- * Internal component that wraps user-provided snack bar content.
216
- * @docs-private
217
- */
218
286
  class MatSnackBarContainer extends BasePortalOutlet {
219
- _ngZone = inject(NgZone);
220
- _elementRef = inject(ElementRef);
221
- _changeDetectorRef = inject(ChangeDetectorRef);
222
- _platform = inject(Platform);
223
- _animationsDisabled = _animationsDisabled();
224
- snackBarConfig = inject(MatSnackBarConfig);
225
- _document = inject(DOCUMENT);
226
- _trackedModals = new Set();
227
- _enterFallback;
228
- _exitFallback;
229
- _injector = inject(Injector);
230
- /** The number of milliseconds to wait before announcing the snack bar's content. */
231
- _announceDelay = 150;
232
- /** The timeout for announcing the snack bar's content. */
233
- _announceTimeoutId;
234
- /** Whether the component has been destroyed. */
235
- _destroyed = false;
236
- /** The portal outlet inside of this container into which the snack bar content will be loaded. */
237
- _portalOutlet;
238
- /** Subject for notifying that the snack bar has announced to screen readers. */
239
- _onAnnounce = new Subject();
240
- /** Subject for notifying that the snack bar has exited from view. */
241
- _onExit = new Subject();
242
- /** Subject for notifying that the snack bar has finished entering the view. */
243
- _onEnter = new Subject();
244
- /** The state of the snack bar animations. */
245
- _animationState = 'void';
246
- /** aria-live value for the live region. */
247
- _live;
248
- /**
249
- * Element that will have the `mdc-snackbar__label` class applied if the attached component
250
- * or template does not have it. This ensures that the appropriate structure, typography, and
251
- * color is applied to the attached view.
252
- */
253
- _label;
254
- /**
255
- * Role of the live region. This is only for Firefox as there is a known issue where Firefox +
256
- * JAWS does not read out aria-live message.
257
- */
258
- _role;
259
- /** Unique ID of the aria-live element. */
260
- _liveElementId = inject(_IdGenerator).getId('mat-snack-bar-container-live-');
261
- constructor() {
262
- super();
263
- const config = this.snackBarConfig;
264
- // Use aria-live rather than a live role like 'alert' or 'status'
265
- // because NVDA and JAWS have show inconsistent behavior with live roles.
266
- if (config.politeness === 'assertive' && !config.announcementMessage) {
267
- this._live = 'assertive';
268
- }
269
- else if (config.politeness === 'off') {
270
- this._live = 'off';
271
- }
272
- else {
273
- this._live = 'polite';
274
- }
275
- // Only set role for Firefox. Set role based on aria-live because setting role="alert" implies
276
- // aria-live="assertive" which may cause issues if aria-live is set to "polite" above.
277
- if (this._platform.FIREFOX) {
278
- if (this._live === 'polite') {
279
- this._role = 'status';
280
- }
281
- if (this._live === 'assertive') {
282
- this._role = 'alert';
283
- }
284
- }
285
- }
286
- /** Attach a component portal as content to this snack bar container. */
287
- attachComponentPortal(portal) {
288
- this._assertNotAttached();
289
- const result = this._portalOutlet.attachComponentPortal(portal);
290
- this._afterPortalAttached();
291
- return result;
292
- }
293
- /** Attach a template portal as content to this snack bar container. */
294
- attachTemplatePortal(portal) {
295
- this._assertNotAttached();
296
- const result = this._portalOutlet.attachTemplatePortal(portal);
297
- this._afterPortalAttached();
298
- return result;
299
- }
300
- /**
301
- * Attaches a DOM portal to the snack bar container.
302
- * @deprecated To be turned into a method.
303
- * @breaking-change 10.0.0
304
- */
305
- attachDomPortal = (portal) => {
306
- this._assertNotAttached();
307
- const result = this._portalOutlet.attachDomPortal(portal);
308
- this._afterPortalAttached();
309
- return result;
310
- };
311
- /** Handle end of animations, updating the state of the snackbar. */
312
- onAnimationEnd(animationName) {
313
- if (animationName === EXIT_ANIMATION) {
314
- this._completeExit();
315
- }
316
- else if (animationName === ENTER_ANIMATION) {
317
- clearTimeout(this._enterFallback);
318
- this._ngZone.run(() => {
319
- this._onEnter.next();
320
- this._onEnter.complete();
321
- });
322
- }
323
- }
324
- /** Begin animation of snack bar entrance into view. */
325
- enter() {
326
- if (!this._destroyed) {
327
- this._animationState = 'visible';
328
- // _animationState lives in host bindings and `detectChanges` does not refresh host bindings
329
- // so we have to call `markForCheck` to ensure the host view is refreshed eventually.
330
- this._changeDetectorRef.markForCheck();
331
- this._changeDetectorRef.detectChanges();
332
- this._screenReaderAnnounce();
333
- if (this._animationsDisabled) {
334
- afterNextRender(() => {
335
- this._ngZone.run(() => queueMicrotask(() => this.onAnimationEnd(ENTER_ANIMATION)));
336
- }, { injector: this._injector });
337
- }
338
- else {
339
- clearTimeout(this._enterFallback);
340
- this._enterFallback = setTimeout(() => {
341
- // The snack bar will stay invisible if it fails to animate. Add a fallback class so it
342
- // becomes visible. This can happen in some apps that do `* {animation: none !important}`.
343
- this._elementRef.nativeElement.classList.add('mat-snack-bar-fallback-visible');
344
- this.onAnimationEnd(ENTER_ANIMATION);
345
- }, 200);
346
- }
347
- }
348
- }
349
- /** Begin animation of the snack bar exiting from view. */
350
- exit() {
351
- if (this._destroyed) {
352
- return of(undefined);
353
- }
354
- // It's common for snack bars to be opened by random outside calls like HTTP requests or
355
- // errors. Run inside the NgZone to ensure that it functions correctly.
356
- this._ngZone.run(() => {
357
- // Note: this one transitions to `hidden`, rather than `void`, in order to handle the case
358
- // where multiple snack bars are opened in quick succession (e.g. two consecutive calls to
359
- // `MatSnackBar.open`).
360
- this._animationState = 'hidden';
361
- this._changeDetectorRef.markForCheck();
362
- // Mark this element with an 'exit' attribute to indicate that the snackbar has
363
- // been dismissed and will soon be removed from the DOM. This is used by the snackbar
364
- // test harness.
365
- this._elementRef.nativeElement.setAttribute('mat-exit', '');
366
- // If the snack bar hasn't been announced by the time it exits it wouldn't have been open
367
- // long enough to visually read it either, so clear the timeout for announcing.
368
- clearTimeout(this._announceTimeoutId);
369
- if (this._animationsDisabled) {
370
- afterNextRender(() => {
371
- this._ngZone.run(() => queueMicrotask(() => this.onAnimationEnd(EXIT_ANIMATION)));
372
- }, { injector: this._injector });
373
- }
374
- else {
375
- clearTimeout(this._exitFallback);
376
- this._exitFallback = setTimeout(() => this.onAnimationEnd(EXIT_ANIMATION), 200);
377
- }
287
+ _ngZone = inject(NgZone);
288
+ _elementRef = inject(ElementRef);
289
+ _changeDetectorRef = inject(ChangeDetectorRef);
290
+ _platform = inject(Platform);
291
+ _animationsDisabled = _animationsDisabled();
292
+ snackBarConfig = inject(MatSnackBarConfig);
293
+ _document = inject(DOCUMENT);
294
+ _trackedModals = new Set();
295
+ _enterFallback;
296
+ _exitFallback;
297
+ _injector = inject(Injector);
298
+ _announceDelay = 150;
299
+ _announceTimeoutId;
300
+ _destroyed = false;
301
+ _portalOutlet;
302
+ _onAnnounce = new Subject();
303
+ _onExit = new Subject();
304
+ _onEnter = new Subject();
305
+ _animationState = 'void';
306
+ _live;
307
+ _label;
308
+ _role;
309
+ _liveElementId = inject(_IdGenerator).getId('mat-snack-bar-container-live-');
310
+ constructor() {
311
+ super();
312
+ const config = this.snackBarConfig;
313
+ if (config.politeness === 'assertive' && !config.announcementMessage) {
314
+ this._live = 'assertive';
315
+ } else if (config.politeness === 'off') {
316
+ this._live = 'off';
317
+ } else {
318
+ this._live = 'polite';
319
+ }
320
+ if (this._platform.FIREFOX) {
321
+ if (this._live === 'polite') {
322
+ this._role = 'status';
323
+ }
324
+ if (this._live === 'assertive') {
325
+ this._role = 'alert';
326
+ }
327
+ }
328
+ }
329
+ attachComponentPortal(portal) {
330
+ this._assertNotAttached();
331
+ const result = this._portalOutlet.attachComponentPortal(portal);
332
+ this._afterPortalAttached();
333
+ return result;
334
+ }
335
+ attachTemplatePortal(portal) {
336
+ this._assertNotAttached();
337
+ const result = this._portalOutlet.attachTemplatePortal(portal);
338
+ this._afterPortalAttached();
339
+ return result;
340
+ }
341
+ attachDomPortal = portal => {
342
+ this._assertNotAttached();
343
+ const result = this._portalOutlet.attachDomPortal(portal);
344
+ this._afterPortalAttached();
345
+ return result;
346
+ };
347
+ onAnimationEnd(animationName) {
348
+ if (animationName === EXIT_ANIMATION) {
349
+ this._completeExit();
350
+ } else if (animationName === ENTER_ANIMATION) {
351
+ clearTimeout(this._enterFallback);
352
+ this._ngZone.run(() => {
353
+ this._onEnter.next();
354
+ this._onEnter.complete();
355
+ });
356
+ }
357
+ }
358
+ enter() {
359
+ if (!this._destroyed) {
360
+ this._animationState = 'visible';
361
+ this._changeDetectorRef.markForCheck();
362
+ this._changeDetectorRef.detectChanges();
363
+ this._screenReaderAnnounce();
364
+ if (this._animationsDisabled) {
365
+ afterNextRender(() => {
366
+ this._ngZone.run(() => queueMicrotask(() => this.onAnimationEnd(ENTER_ANIMATION)));
367
+ }, {
368
+ injector: this._injector
378
369
  });
379
- return this._onExit;
380
- }
381
- /** Makes sure the exit callbacks have been invoked when the element is destroyed. */
382
- ngOnDestroy() {
383
- this._destroyed = true;
384
- this._clearFromModals();
385
- this._completeExit();
386
- }
387
- _completeExit() {
388
- clearTimeout(this._exitFallback);
389
- queueMicrotask(() => {
390
- this._onExit.next();
391
- this._onExit.complete();
370
+ } else {
371
+ clearTimeout(this._enterFallback);
372
+ this._enterFallback = setTimeout(() => {
373
+ this._elementRef.nativeElement.classList.add('mat-snack-bar-fallback-visible');
374
+ this.onAnimationEnd(ENTER_ANIMATION);
375
+ }, 200);
376
+ }
377
+ }
378
+ }
379
+ exit() {
380
+ if (this._destroyed) {
381
+ return of(undefined);
382
+ }
383
+ this._ngZone.run(() => {
384
+ this._animationState = 'hidden';
385
+ this._changeDetectorRef.markForCheck();
386
+ this._elementRef.nativeElement.setAttribute('mat-exit', '');
387
+ clearTimeout(this._announceTimeoutId);
388
+ if (this._animationsDisabled) {
389
+ afterNextRender(() => {
390
+ this._ngZone.run(() => queueMicrotask(() => this.onAnimationEnd(EXIT_ANIMATION)));
391
+ }, {
392
+ injector: this._injector
392
393
  });
393
- }
394
- /**
395
- * Called after the portal contents have been attached. Can be
396
- * used to modify the DOM once it's guaranteed to be in place.
397
- */
398
- _afterPortalAttached() {
399
- const element = this._elementRef.nativeElement;
400
- const panelClasses = this.snackBarConfig.panelClass;
401
- if (panelClasses) {
402
- if (Array.isArray(panelClasses)) {
403
- // Note that we can't use a spread here, because IE doesn't support multiple arguments.
404
- panelClasses.forEach(cssClass => element.classList.add(cssClass));
405
- }
406
- else {
407
- element.classList.add(panelClasses);
408
- }
409
- }
410
- this._exposeToModals();
411
- // Check to see if the attached component or template uses the MDC template structure,
412
- // specifically the MDC label. If not, the container should apply the MDC label class to this
413
- // component's label container, which will apply MDC's label styles to the attached view.
414
- const label = this._label.nativeElement;
415
- const labelClass = 'mdc-snackbar__label';
416
- label.classList.toggle(labelClass, !label.querySelector(`.${labelClass}`));
417
- }
418
- /**
419
- * Some browsers won't expose the accessibility node of the live element if there is an
420
- * `aria-modal` and the live element is outside of it. This method works around the issue by
421
- * pointing the `aria-owns` of all modals to the live element.
422
- */
423
- _exposeToModals() {
424
- // TODO(http://github.com/angular/components/issues/26853): consider de-duplicating this with the
425
- // `LiveAnnouncer` and any other usages.
426
- //
427
- // Note that the selector here is limited to CDK overlays at the moment in order to reduce the
428
- // section of the DOM we need to look through. This should cover all the cases we support, but
429
- // the selector can be expanded if it turns out to be too narrow.
430
- const id = this._liveElementId;
431
- const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');
432
- for (let i = 0; i < modals.length; i++) {
433
- const modal = modals[i];
434
- const ariaOwns = modal.getAttribute('aria-owns');
435
- this._trackedModals.add(modal);
436
- if (!ariaOwns) {
437
- modal.setAttribute('aria-owns', id);
438
- }
439
- else if (ariaOwns.indexOf(id) === -1) {
440
- modal.setAttribute('aria-owns', ariaOwns + ' ' + id);
441
- }
442
- }
443
- }
444
- /** Clears the references to the live element from any modals it was added to. */
445
- _clearFromModals() {
446
- this._trackedModals.forEach(modal => {
447
- const ariaOwns = modal.getAttribute('aria-owns');
448
- if (ariaOwns) {
449
- const newValue = ariaOwns.replace(this._liveElementId, '').trim();
450
- if (newValue.length > 0) {
451
- modal.setAttribute('aria-owns', newValue);
452
- }
453
- else {
454
- modal.removeAttribute('aria-owns');
455
- }
456
- }
457
- });
458
- this._trackedModals.clear();
459
- }
460
- /** Asserts that no content is already attached to the container. */
461
- _assertNotAttached() {
462
- if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
463
- throw Error('Attempting to attach snack bar content after content is already attached');
464
- }
465
- }
466
- /**
467
- * Starts a timeout to move the snack bar content to the live region so screen readers will
468
- * announce it.
469
- */
470
- _screenReaderAnnounce() {
471
- if (this._announceTimeoutId) {
472
- return;
394
+ } else {
395
+ clearTimeout(this._exitFallback);
396
+ this._exitFallback = setTimeout(() => this.onAnimationEnd(EXIT_ANIMATION), 200);
397
+ }
398
+ });
399
+ return this._onExit;
400
+ }
401
+ ngOnDestroy() {
402
+ this._destroyed = true;
403
+ this._clearFromModals();
404
+ this._completeExit();
405
+ }
406
+ _completeExit() {
407
+ clearTimeout(this._exitFallback);
408
+ queueMicrotask(() => {
409
+ this._onExit.next();
410
+ this._onExit.complete();
411
+ });
412
+ }
413
+ _afterPortalAttached() {
414
+ const element = this._elementRef.nativeElement;
415
+ const panelClasses = this.snackBarConfig.panelClass;
416
+ if (panelClasses) {
417
+ if (Array.isArray(panelClasses)) {
418
+ panelClasses.forEach(cssClass => element.classList.add(cssClass));
419
+ } else {
420
+ element.classList.add(panelClasses);
421
+ }
422
+ }
423
+ this._exposeToModals();
424
+ const label = this._label.nativeElement;
425
+ const labelClass = 'mdc-snackbar__label';
426
+ label.classList.toggle(labelClass, !label.querySelector(`.${labelClass}`));
427
+ }
428
+ _exposeToModals() {
429
+ const id = this._liveElementId;
430
+ const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');
431
+ for (let i = 0; i < modals.length; i++) {
432
+ const modal = modals[i];
433
+ const ariaOwns = modal.getAttribute('aria-owns');
434
+ this._trackedModals.add(modal);
435
+ if (!ariaOwns) {
436
+ modal.setAttribute('aria-owns', id);
437
+ } else if (ariaOwns.indexOf(id) === -1) {
438
+ modal.setAttribute('aria-owns', ariaOwns + ' ' + id);
439
+ }
440
+ }
441
+ }
442
+ _clearFromModals() {
443
+ this._trackedModals.forEach(modal => {
444
+ const ariaOwns = modal.getAttribute('aria-owns');
445
+ if (ariaOwns) {
446
+ const newValue = ariaOwns.replace(this._liveElementId, '').trim();
447
+ if (newValue.length > 0) {
448
+ modal.setAttribute('aria-owns', newValue);
449
+ } else {
450
+ modal.removeAttribute('aria-owns');
451
+ }
452
+ }
453
+ });
454
+ this._trackedModals.clear();
455
+ }
456
+ _assertNotAttached() {
457
+ if (this._portalOutlet.hasAttached() && (typeof ngDevMode === 'undefined' || ngDevMode)) {
458
+ throw Error('Attempting to attach snack bar content after content is already attached');
459
+ }
460
+ }
461
+ _screenReaderAnnounce() {
462
+ if (this._announceTimeoutId) {
463
+ return;
464
+ }
465
+ this._ngZone.runOutsideAngular(() => {
466
+ this._announceTimeoutId = setTimeout(() => {
467
+ if (this._destroyed) {
468
+ return;
473
469
  }
474
- this._ngZone.runOutsideAngular(() => {
475
- this._announceTimeoutId = setTimeout(() => {
476
- if (this._destroyed) {
477
- return;
478
- }
479
- const element = this._elementRef.nativeElement;
480
- const inertElement = element.querySelector('[aria-hidden]');
481
- const liveElement = element.querySelector('[aria-live]');
482
- if (inertElement && liveElement) {
483
- // If an element in the snack bar content is focused before being moved
484
- // track it and restore focus after moving to the live region.
485
- let focusedElement = null;
486
- if (this._platform.isBrowser &&
487
- document.activeElement instanceof HTMLElement &&
488
- inertElement.contains(document.activeElement)) {
489
- focusedElement = document.activeElement;
490
- }
491
- inertElement.removeAttribute('aria-hidden');
492
- liveElement.appendChild(inertElement);
493
- focusedElement?.focus();
494
- this._onAnnounce.next();
495
- this._onAnnounce.complete();
496
- }
497
- }, this._announceDelay);
498
- });
499
- }
500
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
501
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.0-next.2", type: MatSnackBarContainer, isStandalone: true, selector: "mat-snack-bar-container", host: { listeners: { "animationend": "onAnimationEnd($event.animationName)", "animationcancel": "onAnimationEnd($event.animationName)" }, properties: { "class.mat-snack-bar-container-enter": "_animationState === \"visible\"", "class.mat-snack-bar-container-exit": "_animationState === \"hidden\"", "class.mat-snack-bar-container-animations-enabled": "!_animationsDisabled" }, classAttribute: "mdc-snackbar mat-mdc-snack-bar-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "_label", first: true, predicate: ["label"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n", styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\n"], dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
470
+ const element = this._elementRef.nativeElement;
471
+ const inertElement = element.querySelector('[aria-hidden]');
472
+ const liveElement = element.querySelector('[aria-live]');
473
+ if (inertElement && liveElement) {
474
+ let focusedElement = null;
475
+ if (this._platform.isBrowser && document.activeElement instanceof HTMLElement && inertElement.contains(document.activeElement)) {
476
+ focusedElement = document.activeElement;
477
+ }
478
+ inertElement.removeAttribute('aria-hidden');
479
+ liveElement.appendChild(inertElement);
480
+ focusedElement?.focus();
481
+ this._onAnnounce.next();
482
+ this._onAnnounce.complete();
483
+ }
484
+ }, this._announceDelay);
485
+ });
486
+ }
487
+ static ɵfac = i0.ɵɵngDeclareFactory({
488
+ minVersion: "12.0.0",
489
+ version: "20.2.0-next.2",
490
+ ngImport: i0,
491
+ type: MatSnackBarContainer,
492
+ deps: [],
493
+ target: i0.ɵɵFactoryTarget.Component
494
+ });
495
+ static ɵcmp = i0.ɵɵngDeclareComponent({
496
+ minVersion: "14.0.0",
497
+ version: "20.2.0-next.2",
498
+ type: MatSnackBarContainer,
499
+ isStandalone: true,
500
+ selector: "mat-snack-bar-container",
501
+ host: {
502
+ listeners: {
503
+ "animationend": "onAnimationEnd($event.animationName)",
504
+ "animationcancel": "onAnimationEnd($event.animationName)"
505
+ },
506
+ properties: {
507
+ "class.mat-snack-bar-container-enter": "_animationState === \"visible\"",
508
+ "class.mat-snack-bar-container-exit": "_animationState === \"hidden\"",
509
+ "class.mat-snack-bar-container-animations-enabled": "!_animationsDisabled"
510
+ },
511
+ classAttribute: "mdc-snackbar mat-mdc-snack-bar-container"
512
+ },
513
+ viewQueries: [{
514
+ propertyName: "_portalOutlet",
515
+ first: true,
516
+ predicate: CdkPortalOutlet,
517
+ descendants: true,
518
+ static: true
519
+ }, {
520
+ propertyName: "_label",
521
+ first: true,
522
+ predicate: ["label"],
523
+ descendants: true,
524
+ static: true
525
+ }],
526
+ usesInheritance: true,
527
+ ngImport: i0,
528
+ template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n",
529
+ styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\n"],
530
+ dependencies: [{
531
+ kind: "directive",
532
+ type: CdkPortalOutlet,
533
+ selector: "[cdkPortalOutlet]",
534
+ inputs: ["cdkPortalOutlet"],
535
+ outputs: ["attached"],
536
+ exportAs: ["cdkPortalOutlet"]
537
+ }],
538
+ changeDetection: i0.ChangeDetectionStrategy.Default,
539
+ encapsulation: i0.ViewEncapsulation.None
540
+ });
502
541
  }
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarContainer, decorators: [{
504
- type: Component,
505
- args: [{ selector: 'mat-snack-bar-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, imports: [CdkPortalOutlet], host: {
506
- 'class': 'mdc-snackbar mat-mdc-snack-bar-container',
507
- '[class.mat-snack-bar-container-enter]': '_animationState === "visible"',
508
- '[class.mat-snack-bar-container-exit]': '_animationState === "hidden"',
509
- '[class.mat-snack-bar-container-animations-enabled]': '!_animationsDisabled',
510
- '(animationend)': 'onAnimationEnd($event.animationName)',
511
- '(animationcancel)': 'onAnimationEnd($event.animationName)',
512
- }, template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n", styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\n"] }]
513
- }], ctorParameters: () => [], propDecorators: { _portalOutlet: [{
514
- type: ViewChild,
515
- args: [CdkPortalOutlet, { static: true }]
516
- }], _label: [{
517
- type: ViewChild,
518
- args: ['label', { static: true }]
519
- }] } });
542
+ i0.ɵɵngDeclareClassMetadata({
543
+ minVersion: "12.0.0",
544
+ version: "20.2.0-next.2",
545
+ ngImport: i0,
546
+ type: MatSnackBarContainer,
547
+ decorators: [{
548
+ type: Component,
549
+ args: [{
550
+ selector: 'mat-snack-bar-container',
551
+ changeDetection: ChangeDetectionStrategy.Default,
552
+ encapsulation: ViewEncapsulation.None,
553
+ imports: [CdkPortalOutlet],
554
+ host: {
555
+ 'class': 'mdc-snackbar mat-mdc-snack-bar-container',
556
+ '[class.mat-snack-bar-container-enter]': '_animationState === "visible"',
557
+ '[class.mat-snack-bar-container-exit]': '_animationState === "hidden"',
558
+ '[class.mat-snack-bar-container-animations-enabled]': '!_animationsDisabled',
559
+ '(animationend)': 'onAnimationEnd($event.animationName)',
560
+ '(animationcancel)': 'onAnimationEnd($event.animationName)'
561
+ },
562
+ template: "<div class=\"mdc-snackbar__surface mat-mdc-snackbar-surface\">\n <!--\n This outer label wrapper will have the class `mdc-snackbar__label` applied if\n the attached template/component does not contain it.\n -->\n <div class=\"mat-mdc-snack-bar-label\" #label>\n <!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n <div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet />\n </div>\n\n <!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n <div [attr.aria-live]=\"_live\" [attr.role]=\"_role\" [attr.id]=\"_liveElementId\"></div>\n </div>\n</div>\n",
563
+ styles: ["@keyframes _mat-snack-bar-enter{from{transform:scale(0.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes _mat-snack-bar-exit{from{opacity:1}to{opacity:0}}.mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-snack-bar-container-animations-enabled{opacity:0}.mat-snack-bar-container-animations-enabled.mat-snack-bar-fallback-visible{opacity:1}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-enter{animation:_mat-snack-bar-enter 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-snack-bar-container-animations-enabled.mat-snack-bar-container-exit{animation:_mat-snack-bar-exit 75ms cubic-bezier(0.4, 0, 1, 1) forwards}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mat-snack-bar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mat-snack-bar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-snack-bar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mat-snack-bar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mat-snack-bar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-snack-bar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mat-snack-bar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-button-text-state-layer-color: currentColor;--mat-button-text-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled).mat-unthemed{color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}\n"]
564
+ }]
565
+ }],
566
+ ctorParameters: () => [],
567
+ propDecorators: {
568
+ _portalOutlet: [{
569
+ type: ViewChild,
570
+ args: [CdkPortalOutlet, {
571
+ static: true
572
+ }]
573
+ }],
574
+ _label: [{
575
+ type: ViewChild,
576
+ args: ['label', {
577
+ static: true
578
+ }]
579
+ }]
580
+ }
581
+ });
520
582
 
521
- /** Injection token that can be used to specify default snack bar. */
522
583
  const MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('mat-snack-bar-default-options', {
523
- providedIn: 'root',
524
- factory: () => new MatSnackBarConfig(),
584
+ providedIn: 'root',
585
+ factory: () => new MatSnackBarConfig()
525
586
  });
526
- /**
527
- * Service to dispatch Material Design snack bar messages.
528
- */
529
587
  class MatSnackBar {
530
- _live = inject(LiveAnnouncer);
531
- _injector = inject(Injector);
532
- _breakpointObserver = inject(BreakpointObserver);
533
- _parentSnackBar = inject(MatSnackBar, { optional: true, skipSelf: true });
534
- _defaultConfig = inject(MAT_SNACK_BAR_DEFAULT_OPTIONS);
535
- _animationsDisabled = _animationsDisabled();
536
- /**
537
- * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
538
- * If there is a parent snack-bar service, all operations should delegate to that parent
539
- * via `_openedSnackBarRef`.
540
- */
541
- _snackBarRefAtThisLevel = null;
542
- /** The component that should be rendered as the snack bar's simple component. */
543
- simpleSnackBarComponent = SimpleSnackBar;
544
- /** The container component that attaches the provided template or component. */
545
- snackBarContainerComponent = MatSnackBarContainer;
546
- /** The CSS class to apply for handset mode. */
547
- handsetCssClass = 'mat-mdc-snack-bar-handset';
548
- /** Reference to the currently opened snackbar at *any* level. */
549
- get _openedSnackBarRef() {
550
- const parent = this._parentSnackBar;
551
- return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
552
- }
553
- set _openedSnackBarRef(value) {
554
- if (this._parentSnackBar) {
555
- this._parentSnackBar._openedSnackBarRef = value;
556
- }
557
- else {
558
- this._snackBarRefAtThisLevel = value;
559
- }
560
- }
561
- constructor() { }
562
- /**
563
- * Creates and dispatches a snack bar with a custom component for the content, removing any
564
- * currently opened snack bars.
565
- *
566
- * @param component Component to be instantiated.
567
- * @param config Extra configuration for the snack bar.
568
- */
569
- openFromComponent(component, config) {
570
- return this._attach(component, config);
571
- }
572
- /**
573
- * Creates and dispatches a snack bar with a custom template for the content, removing any
574
- * currently opened snack bars.
575
- *
576
- * @param template Template to be instantiated.
577
- * @param config Extra configuration for the snack bar.
578
- */
579
- openFromTemplate(template, config) {
580
- return this._attach(template, config);
581
- }
582
- /**
583
- * Opens a snackbar with a message and an optional action.
584
- * @param message The message to show in the snackbar.
585
- * @param action The label for the snackbar action.
586
- * @param config Additional configuration options for the snackbar.
587
- */
588
- open(message, action = '', config) {
589
- const _config = { ...this._defaultConfig, ...config };
590
- // Since the user doesn't have access to the component, we can
591
- // override the data to pass in our own message and action.
592
- _config.data = { message, action };
593
- // Since the snack bar has `role="alert"`, we don't
594
- // want to announce the same message twice.
595
- if (_config.announcementMessage === message) {
596
- _config.announcementMessage = undefined;
597
- }
598
- return this.openFromComponent(this.simpleSnackBarComponent, _config);
599
- }
600
- /**
601
- * Dismisses the currently-visible snack bar.
602
- */
603
- dismiss() {
604
- if (this._openedSnackBarRef) {
605
- this._openedSnackBarRef.dismiss();
606
- }
607
- }
608
- ngOnDestroy() {
609
- // Only dismiss the snack bar at the current level on destroy.
610
- if (this._snackBarRefAtThisLevel) {
611
- this._snackBarRefAtThisLevel.dismiss();
612
- }
613
- }
614
- /**
615
- * Attaches the snack bar container component to the overlay.
616
- */
617
- _attachSnackBarContainer(overlayRef, config) {
618
- const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
619
- const injector = Injector.create({
620
- parent: userInjector || this._injector,
621
- providers: [{ provide: MatSnackBarConfig, useValue: config }],
622
- });
623
- const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);
624
- const containerRef = overlayRef.attach(containerPortal);
625
- containerRef.instance.snackBarConfig = config;
626
- return containerRef.instance;
627
- }
628
- /**
629
- * Places a new component or a template as the content of the snack bar container.
630
- */
631
- _attach(content, userConfig) {
632
- const config = { ...new MatSnackBarConfig(), ...this._defaultConfig, ...userConfig };
633
- const overlayRef = this._createOverlay(config);
634
- const container = this._attachSnackBarContainer(overlayRef, config);
635
- const snackBarRef = new MatSnackBarRef(container, overlayRef);
636
- if (content instanceof TemplateRef) {
637
- const portal = new TemplatePortal(content, null, {
638
- $implicit: config.data,
639
- snackBarRef,
640
- });
641
- snackBarRef.instance = container.attachTemplatePortal(portal);
642
- }
643
- else {
644
- const injector = this._createInjector(config, snackBarRef);
645
- const portal = new ComponentPortal(content, undefined, injector);
646
- const contentRef = container.attachComponentPortal(portal);
647
- // We can't pass this via the injector, because the injector is created earlier.
648
- snackBarRef.instance = contentRef.instance;
649
- }
650
- // Subscribe to the breakpoint observer and attach the mat-snack-bar-handset class as
651
- // appropriate. This class is applied to the overlay element because the overlay must expand to
652
- // fill the width of the screen for full width snackbars.
653
- this._breakpointObserver
654
- .observe(Breakpoints.HandsetPortrait)
655
- .pipe(takeUntil(overlayRef.detachments()))
656
- .subscribe(state => {
657
- overlayRef.overlayElement.classList.toggle(this.handsetCssClass, state.matches);
658
- });
659
- if (config.announcementMessage) {
660
- // Wait until the snack bar contents have been announced then deliver this message.
661
- container._onAnnounce.subscribe(() => {
662
- this._live.announce(config.announcementMessage, config.politeness);
663
- });
664
- }
665
- this._animateSnackBar(snackBarRef, config);
666
- this._openedSnackBarRef = snackBarRef;
667
- return this._openedSnackBarRef;
668
- }
669
- /** Animates the old snack bar out and the new one in. */
670
- _animateSnackBar(snackBarRef, config) {
671
- // When the snackbar is dismissed, clear the reference to it.
672
- snackBarRef.afterDismissed().subscribe(() => {
673
- // Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.
674
- if (this._openedSnackBarRef == snackBarRef) {
675
- this._openedSnackBarRef = null;
676
- }
677
- if (config.announcementMessage) {
678
- this._live.clear();
679
- }
680
- });
681
- // If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.
682
- if (config.duration && config.duration > 0) {
683
- snackBarRef.afterOpened().subscribe(() => snackBarRef._dismissAfter(config.duration));
684
- }
685
- if (this._openedSnackBarRef) {
686
- // If a snack bar is already in view, dismiss it and enter the
687
- // new snack bar after exit animation is complete.
688
- this._openedSnackBarRef.afterDismissed().subscribe(() => {
689
- snackBarRef.containerInstance.enter();
690
- });
691
- this._openedSnackBarRef.dismiss();
692
- }
693
- else {
694
- // If no snack bar is in view, enter the new snack bar.
695
- snackBarRef.containerInstance.enter();
696
- }
697
- }
698
- /**
699
- * Creates a new overlay and places it in the correct location.
700
- * @param config The user-specified snack bar config.
701
- */
702
- _createOverlay(config) {
703
- const overlayConfig = new OverlayConfig();
704
- overlayConfig.direction = config.direction;
705
- const positionStrategy = createGlobalPositionStrategy(this._injector);
706
- // Set horizontal position.
707
- const isRtl = config.direction === 'rtl';
708
- const isLeft = config.horizontalPosition === 'left' ||
709
- (config.horizontalPosition === 'start' && !isRtl) ||
710
- (config.horizontalPosition === 'end' && isRtl);
711
- const isRight = !isLeft && config.horizontalPosition !== 'center';
712
- if (isLeft) {
713
- positionStrategy.left('0');
714
- }
715
- else if (isRight) {
716
- positionStrategy.right('0');
717
- }
718
- else {
719
- positionStrategy.centerHorizontally();
720
- }
721
- // Set horizontal position.
722
- if (config.verticalPosition === 'top') {
723
- positionStrategy.top('0');
724
- }
725
- else {
726
- positionStrategy.bottom('0');
727
- }
728
- overlayConfig.positionStrategy = positionStrategy;
729
- overlayConfig.disableAnimations = this._animationsDisabled;
730
- return createOverlayRef(this._injector, overlayConfig);
731
- }
732
- /**
733
- * Creates an injector to be used inside of a snack bar component.
734
- * @param config Config that was used to create the snack bar.
735
- * @param snackBarRef Reference to the snack bar.
736
- */
737
- _createInjector(config, snackBarRef) {
738
- const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
739
- return Injector.create({
740
- parent: userInjector || this._injector,
741
- providers: [
742
- { provide: MatSnackBarRef, useValue: snackBarRef },
743
- { provide: MAT_SNACK_BAR_DATA, useValue: config.data },
744
- ],
745
- });
746
- }
747
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBar, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
748
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBar, providedIn: 'root' });
588
+ _live = inject(LiveAnnouncer);
589
+ _injector = inject(Injector);
590
+ _breakpointObserver = inject(BreakpointObserver);
591
+ _parentSnackBar = inject(MatSnackBar, {
592
+ optional: true,
593
+ skipSelf: true
594
+ });
595
+ _defaultConfig = inject(MAT_SNACK_BAR_DEFAULT_OPTIONS);
596
+ _animationsDisabled = _animationsDisabled();
597
+ _snackBarRefAtThisLevel = null;
598
+ simpleSnackBarComponent = SimpleSnackBar;
599
+ snackBarContainerComponent = MatSnackBarContainer;
600
+ handsetCssClass = 'mat-mdc-snack-bar-handset';
601
+ get _openedSnackBarRef() {
602
+ const parent = this._parentSnackBar;
603
+ return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
604
+ }
605
+ set _openedSnackBarRef(value) {
606
+ if (this._parentSnackBar) {
607
+ this._parentSnackBar._openedSnackBarRef = value;
608
+ } else {
609
+ this._snackBarRefAtThisLevel = value;
610
+ }
611
+ }
612
+ constructor() {}
613
+ openFromComponent(component, config) {
614
+ return this._attach(component, config);
615
+ }
616
+ openFromTemplate(template, config) {
617
+ return this._attach(template, config);
618
+ }
619
+ open(message, action = '', config) {
620
+ const _config = {
621
+ ...this._defaultConfig,
622
+ ...config
623
+ };
624
+ _config.data = {
625
+ message,
626
+ action
627
+ };
628
+ if (_config.announcementMessage === message) {
629
+ _config.announcementMessage = undefined;
630
+ }
631
+ return this.openFromComponent(this.simpleSnackBarComponent, _config);
632
+ }
633
+ dismiss() {
634
+ if (this._openedSnackBarRef) {
635
+ this._openedSnackBarRef.dismiss();
636
+ }
637
+ }
638
+ ngOnDestroy() {
639
+ if (this._snackBarRefAtThisLevel) {
640
+ this._snackBarRefAtThisLevel.dismiss();
641
+ }
642
+ }
643
+ _attachSnackBarContainer(overlayRef, config) {
644
+ const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
645
+ const injector = Injector.create({
646
+ parent: userInjector || this._injector,
647
+ providers: [{
648
+ provide: MatSnackBarConfig,
649
+ useValue: config
650
+ }]
651
+ });
652
+ const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);
653
+ const containerRef = overlayRef.attach(containerPortal);
654
+ containerRef.instance.snackBarConfig = config;
655
+ return containerRef.instance;
656
+ }
657
+ _attach(content, userConfig) {
658
+ const config = {
659
+ ...new MatSnackBarConfig(),
660
+ ...this._defaultConfig,
661
+ ...userConfig
662
+ };
663
+ const overlayRef = this._createOverlay(config);
664
+ const container = this._attachSnackBarContainer(overlayRef, config);
665
+ const snackBarRef = new MatSnackBarRef(container, overlayRef);
666
+ if (content instanceof TemplateRef) {
667
+ const portal = new TemplatePortal(content, null, {
668
+ $implicit: config.data,
669
+ snackBarRef
670
+ });
671
+ snackBarRef.instance = container.attachTemplatePortal(portal);
672
+ } else {
673
+ const injector = this._createInjector(config, snackBarRef);
674
+ const portal = new ComponentPortal(content, undefined, injector);
675
+ const contentRef = container.attachComponentPortal(portal);
676
+ snackBarRef.instance = contentRef.instance;
677
+ }
678
+ this._breakpointObserver.observe(Breakpoints.HandsetPortrait).pipe(takeUntil(overlayRef.detachments())).subscribe(state => {
679
+ overlayRef.overlayElement.classList.toggle(this.handsetCssClass, state.matches);
680
+ });
681
+ if (config.announcementMessage) {
682
+ container._onAnnounce.subscribe(() => {
683
+ this._live.announce(config.announcementMessage, config.politeness);
684
+ });
685
+ }
686
+ this._animateSnackBar(snackBarRef, config);
687
+ this._openedSnackBarRef = snackBarRef;
688
+ return this._openedSnackBarRef;
689
+ }
690
+ _animateSnackBar(snackBarRef, config) {
691
+ snackBarRef.afterDismissed().subscribe(() => {
692
+ if (this._openedSnackBarRef == snackBarRef) {
693
+ this._openedSnackBarRef = null;
694
+ }
695
+ if (config.announcementMessage) {
696
+ this._live.clear();
697
+ }
698
+ });
699
+ if (config.duration && config.duration > 0) {
700
+ snackBarRef.afterOpened().subscribe(() => snackBarRef._dismissAfter(config.duration));
701
+ }
702
+ if (this._openedSnackBarRef) {
703
+ this._openedSnackBarRef.afterDismissed().subscribe(() => {
704
+ snackBarRef.containerInstance.enter();
705
+ });
706
+ this._openedSnackBarRef.dismiss();
707
+ } else {
708
+ snackBarRef.containerInstance.enter();
709
+ }
710
+ }
711
+ _createOverlay(config) {
712
+ const overlayConfig = new OverlayConfig();
713
+ overlayConfig.direction = config.direction;
714
+ const positionStrategy = createGlobalPositionStrategy(this._injector);
715
+ const isRtl = config.direction === 'rtl';
716
+ const isLeft = config.horizontalPosition === 'left' || config.horizontalPosition === 'start' && !isRtl || config.horizontalPosition === 'end' && isRtl;
717
+ const isRight = !isLeft && config.horizontalPosition !== 'center';
718
+ if (isLeft) {
719
+ positionStrategy.left('0');
720
+ } else if (isRight) {
721
+ positionStrategy.right('0');
722
+ } else {
723
+ positionStrategy.centerHorizontally();
724
+ }
725
+ if (config.verticalPosition === 'top') {
726
+ positionStrategy.top('0');
727
+ } else {
728
+ positionStrategy.bottom('0');
729
+ }
730
+ overlayConfig.positionStrategy = positionStrategy;
731
+ overlayConfig.disableAnimations = this._animationsDisabled;
732
+ return createOverlayRef(this._injector, overlayConfig);
733
+ }
734
+ _createInjector(config, snackBarRef) {
735
+ const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
736
+ return Injector.create({
737
+ parent: userInjector || this._injector,
738
+ providers: [{
739
+ provide: MatSnackBarRef,
740
+ useValue: snackBarRef
741
+ }, {
742
+ provide: MAT_SNACK_BAR_DATA,
743
+ useValue: config.data
744
+ }]
745
+ });
746
+ }
747
+ static ɵfac = i0.ɵɵngDeclareFactory({
748
+ minVersion: "12.0.0",
749
+ version: "20.2.0-next.2",
750
+ ngImport: i0,
751
+ type: MatSnackBar,
752
+ deps: [],
753
+ target: i0.ɵɵFactoryTarget.Injectable
754
+ });
755
+ static ɵprov = i0.ɵɵngDeclareInjectable({
756
+ minVersion: "12.0.0",
757
+ version: "20.2.0-next.2",
758
+ ngImport: i0,
759
+ type: MatSnackBar,
760
+ providedIn: 'root'
761
+ });
749
762
  }
750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBar, decorators: [{
751
- type: Injectable,
752
- args: [{ providedIn: 'root' }]
753
- }], ctorParameters: () => [] });
763
+ i0.ɵɵngDeclareClassMetadata({
764
+ minVersion: "12.0.0",
765
+ version: "20.2.0-next.2",
766
+ ngImport: i0,
767
+ type: MatSnackBar,
768
+ decorators: [{
769
+ type: Injectable,
770
+ args: [{
771
+ providedIn: 'root'
772
+ }]
773
+ }],
774
+ ctorParameters: () => []
775
+ });
754
776
 
755
777
  const DIRECTIVES = [MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction];
756
778
  class MatSnackBarModule {
757
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
758
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarModule, imports: [OverlayModule, PortalModule, MatButtonModule, SimpleSnackBar, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction], exports: [BidiModule, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction] });
759
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarModule, providers: [MatSnackBar], imports: [OverlayModule, PortalModule, MatButtonModule, SimpleSnackBar, BidiModule] });
779
+ static ɵfac = i0.ɵɵngDeclareFactory({
780
+ minVersion: "12.0.0",
781
+ version: "20.2.0-next.2",
782
+ ngImport: i0,
783
+ type: MatSnackBarModule,
784
+ deps: [],
785
+ target: i0.ɵɵFactoryTarget.NgModule
786
+ });
787
+ static ɵmod = i0.ɵɵngDeclareNgModule({
788
+ minVersion: "14.0.0",
789
+ version: "20.2.0-next.2",
790
+ ngImport: i0,
791
+ type: MatSnackBarModule,
792
+ imports: [OverlayModule, PortalModule, MatButtonModule, SimpleSnackBar, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction],
793
+ exports: [BidiModule, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction]
794
+ });
795
+ static ɵinj = i0.ɵɵngDeclareInjector({
796
+ minVersion: "12.0.0",
797
+ version: "20.2.0-next.2",
798
+ ngImport: i0,
799
+ type: MatSnackBarModule,
800
+ providers: [MatSnackBar],
801
+ imports: [OverlayModule, PortalModule, MatButtonModule, SimpleSnackBar, BidiModule]
802
+ });
760
803
  }
761
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.0-next.2", ngImport: i0, type: MatSnackBarModule, decorators: [{
762
- type: NgModule,
763
- args: [{
764
- imports: [OverlayModule, PortalModule, MatButtonModule, SimpleSnackBar, ...DIRECTIVES],
765
- exports: [BidiModule, ...DIRECTIVES],
766
- providers: [MatSnackBar],
767
- }]
768
- }] });
804
+ i0.ɵɵngDeclareClassMetadata({
805
+ minVersion: "12.0.0",
806
+ version: "20.2.0-next.2",
807
+ ngImport: i0,
808
+ type: MatSnackBarModule,
809
+ decorators: [{
810
+ type: NgModule,
811
+ args: [{
812
+ imports: [OverlayModule, PortalModule, MatButtonModule, SimpleSnackBar, ...DIRECTIVES],
813
+ exports: [BidiModule, ...DIRECTIVES],
814
+ providers: [MatSnackBar]
815
+ }]
816
+ }]
817
+ });
769
818
 
770
819
  export { MAT_SNACK_BAR_DATA, MAT_SNACK_BAR_DEFAULT_OPTIONS, MatSnackBar, MatSnackBarAction, MatSnackBarActions, MatSnackBarConfig, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarModule, MatSnackBarRef, SimpleSnackBar };
771
820
  //# sourceMappingURL=snack-bar.mjs.map