@andersbakken/fisk-scheduler-ui 0.0.57 → 0.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/browser/favicon.png +0 -0
- package/dist/ui/browser/htaccess +7 -0
- package/dist/ui/browser/index.html +1 -1
- package/dist/ui/browser/{main-6SIZHY3G.js → main-KS4CY54V.js} +1 -1
- package/dist/ui/browser/package.json +50 -0
- package/dist/ui/package.json +50 -0
- package/package.json +1 -1
- package/scripts/mklinks.sh +18 -9
- package/scripts/rmlinks.sh +12 -7
- package/.angular/cache/18.2.21/ui/.tsbuildinfo +0 -1
- package/.angular/cache/18.2.21/ui/angular-compiler.db +0 -0
- package/.angular/cache/18.2.21/ui/angular-compiler.db-lock +0 -0
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common.js +0 -201
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common_http.js +0 -85
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_common_http.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_core.js +0 -932
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_core.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_forms.js +0 -134
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_forms.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_button.js +0 -33
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_button.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_card.js +0 -567
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_card.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_checkbox.js +0 -782
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_checkbox.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_core.js +0 -98
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_core.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_dialog.js +0 -1829
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_dialog.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_form-field.js +0 -45
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_form-field.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_input.js +0 -1014
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_input.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_list.js +0 -2169
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_list.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_select.js +0 -1529
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_select.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_snack-bar.js +0 -940
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_snack-bar.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_tabs.js +0 -2962
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_material_tabs.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser.js +0 -84
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser_animations.js +0 -4136
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_platform-browser_animations.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_router.js +0 -5700
- package/.angular/cache/18.2.21/ui/vite/deps/@angular_router.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/_metadata.json +0 -172
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-2ZKE2YDD.js +0 -1222
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-2ZKE2YDD.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-3OV72XIM.js +0 -64
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-3OV72XIM.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-57TVY4HY.js +0 -2218
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-57TVY4HY.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-A5IWFVHJ.js +0 -2374
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-A5IWFVHJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-DJ6HHZ3S.js +0 -1940
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-DJ6HHZ3S.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-FE6XYTIJ.js +0 -126
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-FE6XYTIJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-ITHJLHIY.js +0 -5795
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-ITHJLHIY.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-MFI342ZJ.js +0 -512
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-MFI342ZJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NPVZU53R.js +0 -6511
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NPVZU53R.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NSRJEU3V.js +0 -27918
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-NSRJEU3V.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-R2N6IWJV.js +0 -5116
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-R2N6IWJV.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-TO3SXVFJ.js +0 -2840
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-TO3SXVFJ.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WFLMTRZP.js +0 -379
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WFLMTRZP.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WQ5YUVUS.js +0 -1534
- package/.angular/cache/18.2.21/ui/vite/deps/chunk-WQ5YUVUS.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/ngx-color-picker.js +0 -2925
- package/.angular/cache/18.2.21/ui/vite/deps/ngx-color-picker.js.map +0 -7
- package/.angular/cache/18.2.21/ui/vite/deps/seedrandom.js +0 -703
- package/.angular/cache/18.2.21/ui/vite/deps/seedrandom.js.map +0 -7
- package/scripts/mock-scheduler.js +0 -350
- package/scripts/test-live-model.js +0 -286
|
@@ -1,940 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MatButton,
|
|
3
|
-
MatButtonModule
|
|
4
|
-
} from "./chunk-2ZKE2YDD.js";
|
|
5
|
-
import {
|
|
6
|
-
Overlay,
|
|
7
|
-
OverlayConfig,
|
|
8
|
-
OverlayModule
|
|
9
|
-
} from "./chunk-TO3SXVFJ.js";
|
|
10
|
-
import {
|
|
11
|
-
BasePortalOutlet,
|
|
12
|
-
CdkPortalOutlet,
|
|
13
|
-
ComponentPortal,
|
|
14
|
-
PortalModule,
|
|
15
|
-
TemplatePortal
|
|
16
|
-
} from "./chunk-57TVY4HY.js";
|
|
17
|
-
import {
|
|
18
|
-
animate,
|
|
19
|
-
state,
|
|
20
|
-
style,
|
|
21
|
-
transition,
|
|
22
|
-
trigger
|
|
23
|
-
} from "./chunk-MFI342ZJ.js";
|
|
24
|
-
import "./chunk-WFLMTRZP.js";
|
|
25
|
-
import {
|
|
26
|
-
BreakpointObserver,
|
|
27
|
-
Breakpoints,
|
|
28
|
-
LiveAnnouncer,
|
|
29
|
-
MatCommonModule,
|
|
30
|
-
Platform
|
|
31
|
-
} from "./chunk-ITHJLHIY.js";
|
|
32
|
-
import {
|
|
33
|
-
DOCUMENT
|
|
34
|
-
} from "./chunk-R2N6IWJV.js";
|
|
35
|
-
import {
|
|
36
|
-
ChangeDetectionStrategy,
|
|
37
|
-
ChangeDetectorRef,
|
|
38
|
-
Component,
|
|
39
|
-
Directive,
|
|
40
|
-
ElementRef,
|
|
41
|
-
Inject,
|
|
42
|
-
Injectable,
|
|
43
|
-
InjectionToken,
|
|
44
|
-
Injector,
|
|
45
|
-
NgModule,
|
|
46
|
-
NgZone,
|
|
47
|
-
Optional,
|
|
48
|
-
SkipSelf,
|
|
49
|
-
Subject,
|
|
50
|
-
TemplateRef,
|
|
51
|
-
ViewChild,
|
|
52
|
-
ViewEncapsulation$1,
|
|
53
|
-
inject,
|
|
54
|
-
setClassMetadata,
|
|
55
|
-
takeUntil,
|
|
56
|
-
ɵɵInheritDefinitionFeature,
|
|
57
|
-
ɵɵStandaloneFeature,
|
|
58
|
-
ɵɵadvance,
|
|
59
|
-
ɵɵattribute,
|
|
60
|
-
ɵɵconditional,
|
|
61
|
-
ɵɵdefineComponent,
|
|
62
|
-
ɵɵdefineDirective,
|
|
63
|
-
ɵɵdefineInjectable,
|
|
64
|
-
ɵɵdefineInjector,
|
|
65
|
-
ɵɵdefineNgModule,
|
|
66
|
-
ɵɵdirectiveInject,
|
|
67
|
-
ɵɵelement,
|
|
68
|
-
ɵɵelementEnd,
|
|
69
|
-
ɵɵelementStart,
|
|
70
|
-
ɵɵgetCurrentView,
|
|
71
|
-
ɵɵinject,
|
|
72
|
-
ɵɵlistener,
|
|
73
|
-
ɵɵloadQuery,
|
|
74
|
-
ɵɵnextContext,
|
|
75
|
-
ɵɵqueryRefresh,
|
|
76
|
-
ɵɵresetView,
|
|
77
|
-
ɵɵrestoreView,
|
|
78
|
-
ɵɵsyntheticHostListener,
|
|
79
|
-
ɵɵsyntheticHostProperty,
|
|
80
|
-
ɵɵtemplate,
|
|
81
|
-
ɵɵtext,
|
|
82
|
-
ɵɵtextInterpolate1,
|
|
83
|
-
ɵɵviewQuery
|
|
84
|
-
} from "./chunk-NSRJEU3V.js";
|
|
85
|
-
import {
|
|
86
|
-
__spreadValues
|
|
87
|
-
} from "./chunk-3OV72XIM.js";
|
|
88
|
-
|
|
89
|
-
// node_modules/@angular/material/fesm2022/snack-bar.mjs
|
|
90
|
-
function SimpleSnackBar_Conditional_2_Template(rf, ctx) {
|
|
91
|
-
if (rf & 1) {
|
|
92
|
-
const _r1 = ɵɵgetCurrentView();
|
|
93
|
-
ɵɵelementStart(0, "div", 1)(1, "button", 2);
|
|
94
|
-
ɵɵlistener("click", function SimpleSnackBar_Conditional_2_Template_button_click_1_listener() {
|
|
95
|
-
ɵɵrestoreView(_r1);
|
|
96
|
-
const ctx_r1 = ɵɵnextContext();
|
|
97
|
-
return ɵɵresetView(ctx_r1.action());
|
|
98
|
-
});
|
|
99
|
-
ɵɵtext(2);
|
|
100
|
-
ɵɵelementEnd()();
|
|
101
|
-
}
|
|
102
|
-
if (rf & 2) {
|
|
103
|
-
const ctx_r1 = ɵɵnextContext();
|
|
104
|
-
ɵɵadvance(2);
|
|
105
|
-
ɵɵtextInterpolate1(" ", ctx_r1.data.action, " ");
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
var _c0 = ["label"];
|
|
109
|
-
function MatSnackBarContainer_ng_template_4_Template(rf, ctx) {
|
|
110
|
-
}
|
|
111
|
-
var MAX_TIMEOUT = Math.pow(2, 31) - 1;
|
|
112
|
-
var MatSnackBarRef = class {
|
|
113
|
-
constructor(containerInstance, _overlayRef) {
|
|
114
|
-
this._overlayRef = _overlayRef;
|
|
115
|
-
this._afterDismissed = new Subject();
|
|
116
|
-
this._afterOpened = new Subject();
|
|
117
|
-
this._onAction = new Subject();
|
|
118
|
-
this._dismissedByAction = false;
|
|
119
|
-
this.containerInstance = containerInstance;
|
|
120
|
-
containerInstance._onExit.subscribe(() => this._finishDismiss());
|
|
121
|
-
}
|
|
122
|
-
/** Dismisses the snack bar. */
|
|
123
|
-
dismiss() {
|
|
124
|
-
if (!this._afterDismissed.closed) {
|
|
125
|
-
this.containerInstance.exit();
|
|
126
|
-
}
|
|
127
|
-
clearTimeout(this._durationTimeoutId);
|
|
128
|
-
}
|
|
129
|
-
/** Marks the snackbar action clicked. */
|
|
130
|
-
dismissWithAction() {
|
|
131
|
-
if (!this._onAction.closed) {
|
|
132
|
-
this._dismissedByAction = true;
|
|
133
|
-
this._onAction.next();
|
|
134
|
-
this._onAction.complete();
|
|
135
|
-
this.dismiss();
|
|
136
|
-
}
|
|
137
|
-
clearTimeout(this._durationTimeoutId);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Marks the snackbar action clicked.
|
|
141
|
-
* @deprecated Use `dismissWithAction` instead.
|
|
142
|
-
* @breaking-change 8.0.0
|
|
143
|
-
*/
|
|
144
|
-
closeWithAction() {
|
|
145
|
-
this.dismissWithAction();
|
|
146
|
-
}
|
|
147
|
-
/** Dismisses the snack bar after some duration */
|
|
148
|
-
_dismissAfter(duration) {
|
|
149
|
-
this._durationTimeoutId = setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));
|
|
150
|
-
}
|
|
151
|
-
/** Marks the snackbar as opened */
|
|
152
|
-
_open() {
|
|
153
|
-
if (!this._afterOpened.closed) {
|
|
154
|
-
this._afterOpened.next();
|
|
155
|
-
this._afterOpened.complete();
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
/** Cleans up the DOM after closing. */
|
|
159
|
-
_finishDismiss() {
|
|
160
|
-
this._overlayRef.dispose();
|
|
161
|
-
if (!this._onAction.closed) {
|
|
162
|
-
this._onAction.complete();
|
|
163
|
-
}
|
|
164
|
-
this._afterDismissed.next({
|
|
165
|
-
dismissedByAction: this._dismissedByAction
|
|
166
|
-
});
|
|
167
|
-
this._afterDismissed.complete();
|
|
168
|
-
this._dismissedByAction = false;
|
|
169
|
-
}
|
|
170
|
-
/** Gets an observable that is notified when the snack bar is finished closing. */
|
|
171
|
-
afterDismissed() {
|
|
172
|
-
return this._afterDismissed;
|
|
173
|
-
}
|
|
174
|
-
/** Gets an observable that is notified when the snack bar has opened and appeared. */
|
|
175
|
-
afterOpened() {
|
|
176
|
-
return this.containerInstance._onEnter;
|
|
177
|
-
}
|
|
178
|
-
/** Gets an observable that is notified when the snack bar action is called. */
|
|
179
|
-
onAction() {
|
|
180
|
-
return this._onAction;
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
var MAT_SNACK_BAR_DATA = new InjectionToken("MatSnackBarData");
|
|
184
|
-
var MatSnackBarConfig = class {
|
|
185
|
-
constructor() {
|
|
186
|
-
this.politeness = "assertive";
|
|
187
|
-
this.announcementMessage = "";
|
|
188
|
-
this.duration = 0;
|
|
189
|
-
this.data = null;
|
|
190
|
-
this.horizontalPosition = "center";
|
|
191
|
-
this.verticalPosition = "bottom";
|
|
192
|
-
}
|
|
193
|
-
};
|
|
194
|
-
var MatSnackBarLabel = class _MatSnackBarLabel {
|
|
195
|
-
static {
|
|
196
|
-
this.ɵfac = function MatSnackBarLabel_Factory(__ngFactoryType__) {
|
|
197
|
-
return new (__ngFactoryType__ || _MatSnackBarLabel)();
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
static {
|
|
201
|
-
this.ɵdir = ɵɵdefineDirective({
|
|
202
|
-
type: _MatSnackBarLabel,
|
|
203
|
-
selectors: [["", "matSnackBarLabel", ""]],
|
|
204
|
-
hostAttrs: [1, "mat-mdc-snack-bar-label", "mdc-snackbar__label"],
|
|
205
|
-
standalone: true
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
(() => {
|
|
210
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MatSnackBarLabel, [{
|
|
211
|
-
type: Directive,
|
|
212
|
-
args: [{
|
|
213
|
-
selector: `[matSnackBarLabel]`,
|
|
214
|
-
standalone: true,
|
|
215
|
-
host: {
|
|
216
|
-
"class": "mat-mdc-snack-bar-label mdc-snackbar__label"
|
|
217
|
-
}
|
|
218
|
-
}]
|
|
219
|
-
}], null, null);
|
|
220
|
-
})();
|
|
221
|
-
var MatSnackBarActions = class _MatSnackBarActions {
|
|
222
|
-
static {
|
|
223
|
-
this.ɵfac = function MatSnackBarActions_Factory(__ngFactoryType__) {
|
|
224
|
-
return new (__ngFactoryType__ || _MatSnackBarActions)();
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
static {
|
|
228
|
-
this.ɵdir = ɵɵdefineDirective({
|
|
229
|
-
type: _MatSnackBarActions,
|
|
230
|
-
selectors: [["", "matSnackBarActions", ""]],
|
|
231
|
-
hostAttrs: [1, "mat-mdc-snack-bar-actions", "mdc-snackbar__actions"],
|
|
232
|
-
standalone: true
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
(() => {
|
|
237
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MatSnackBarActions, [{
|
|
238
|
-
type: Directive,
|
|
239
|
-
args: [{
|
|
240
|
-
selector: `[matSnackBarActions]`,
|
|
241
|
-
standalone: true,
|
|
242
|
-
host: {
|
|
243
|
-
"class": "mat-mdc-snack-bar-actions mdc-snackbar__actions"
|
|
244
|
-
}
|
|
245
|
-
}]
|
|
246
|
-
}], null, null);
|
|
247
|
-
})();
|
|
248
|
-
var MatSnackBarAction = class _MatSnackBarAction {
|
|
249
|
-
static {
|
|
250
|
-
this.ɵfac = function MatSnackBarAction_Factory(__ngFactoryType__) {
|
|
251
|
-
return new (__ngFactoryType__ || _MatSnackBarAction)();
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
static {
|
|
255
|
-
this.ɵdir = ɵɵdefineDirective({
|
|
256
|
-
type: _MatSnackBarAction,
|
|
257
|
-
selectors: [["", "matSnackBarAction", ""]],
|
|
258
|
-
hostAttrs: [1, "mat-mdc-snack-bar-action", "mdc-snackbar__action"],
|
|
259
|
-
standalone: true
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
(() => {
|
|
264
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MatSnackBarAction, [{
|
|
265
|
-
type: Directive,
|
|
266
|
-
args: [{
|
|
267
|
-
selector: `[matSnackBarAction]`,
|
|
268
|
-
standalone: true,
|
|
269
|
-
host: {
|
|
270
|
-
"class": "mat-mdc-snack-bar-action mdc-snackbar__action"
|
|
271
|
-
}
|
|
272
|
-
}]
|
|
273
|
-
}], null, null);
|
|
274
|
-
})();
|
|
275
|
-
var SimpleSnackBar = class _SimpleSnackBar {
|
|
276
|
-
constructor(snackBarRef, data) {
|
|
277
|
-
this.snackBarRef = snackBarRef;
|
|
278
|
-
this.data = data;
|
|
279
|
-
}
|
|
280
|
-
/** Performs the action on the snack bar. */
|
|
281
|
-
action() {
|
|
282
|
-
this.snackBarRef.dismissWithAction();
|
|
283
|
-
}
|
|
284
|
-
/** If the action button should be shown. */
|
|
285
|
-
get hasAction() {
|
|
286
|
-
return !!this.data.action;
|
|
287
|
-
}
|
|
288
|
-
static {
|
|
289
|
-
this.ɵfac = function SimpleSnackBar_Factory(__ngFactoryType__) {
|
|
290
|
-
return new (__ngFactoryType__ || _SimpleSnackBar)(ɵɵdirectiveInject(MatSnackBarRef), ɵɵdirectiveInject(MAT_SNACK_BAR_DATA));
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
static {
|
|
294
|
-
this.ɵcmp = ɵɵdefineComponent({
|
|
295
|
-
type: _SimpleSnackBar,
|
|
296
|
-
selectors: [["simple-snack-bar"]],
|
|
297
|
-
hostAttrs: [1, "mat-mdc-simple-snack-bar"],
|
|
298
|
-
exportAs: ["matSnackBar"],
|
|
299
|
-
standalone: true,
|
|
300
|
-
features: [ɵɵStandaloneFeature],
|
|
301
|
-
decls: 3,
|
|
302
|
-
vars: 2,
|
|
303
|
-
consts: [["matSnackBarLabel", ""], ["matSnackBarActions", ""], ["mat-button", "", "matSnackBarAction", "", 3, "click"]],
|
|
304
|
-
template: function SimpleSnackBar_Template(rf, ctx) {
|
|
305
|
-
if (rf & 1) {
|
|
306
|
-
ɵɵelementStart(0, "div", 0);
|
|
307
|
-
ɵɵtext(1);
|
|
308
|
-
ɵɵelementEnd();
|
|
309
|
-
ɵɵtemplate(2, SimpleSnackBar_Conditional_2_Template, 3, 1, "div", 1);
|
|
310
|
-
}
|
|
311
|
-
if (rf & 2) {
|
|
312
|
-
ɵɵadvance();
|
|
313
|
-
ɵɵtextInterpolate1(" ", ctx.data.message, "\n");
|
|
314
|
-
ɵɵadvance();
|
|
315
|
-
ɵɵconditional(ctx.hasAction ? 2 : -1);
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
dependencies: [MatButton, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction],
|
|
319
|
-
styles: [".mat-mdc-simple-snack-bar{display:flex}"],
|
|
320
|
-
encapsulation: 2,
|
|
321
|
-
changeDetection: 0
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
(() => {
|
|
326
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(SimpleSnackBar, [{
|
|
327
|
-
type: Component,
|
|
328
|
-
args: [{
|
|
329
|
-
selector: "simple-snack-bar",
|
|
330
|
-
exportAs: "matSnackBar",
|
|
331
|
-
encapsulation: ViewEncapsulation$1.None,
|
|
332
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
333
|
-
imports: [MatButton, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction],
|
|
334
|
-
standalone: true,
|
|
335
|
-
host: {
|
|
336
|
-
"class": "mat-mdc-simple-snack-bar"
|
|
337
|
-
},
|
|
338
|
-
template: '<div matSnackBarLabel>\n {{data.message}}\n</div>\n\n@if (hasAction) {\n <div matSnackBarActions>\n <button mat-button matSnackBarAction (click)="action()">\n {{data.action}}\n </button>\n </div>\n}\n',
|
|
339
|
-
styles: [".mat-mdc-simple-snack-bar{display:flex}"]
|
|
340
|
-
}]
|
|
341
|
-
}], () => [{
|
|
342
|
-
type: MatSnackBarRef
|
|
343
|
-
}, {
|
|
344
|
-
type: void 0,
|
|
345
|
-
decorators: [{
|
|
346
|
-
type: Inject,
|
|
347
|
-
args: [MAT_SNACK_BAR_DATA]
|
|
348
|
-
}]
|
|
349
|
-
}], null);
|
|
350
|
-
})();
|
|
351
|
-
var matSnackBarAnimations = {
|
|
352
|
-
/** Animation that shows and hides a snack bar. */
|
|
353
|
-
snackBarState: trigger("state", [state("void, hidden", style({
|
|
354
|
-
transform: "scale(0.8)",
|
|
355
|
-
opacity: 0
|
|
356
|
-
})), state("visible", style({
|
|
357
|
-
transform: "scale(1)",
|
|
358
|
-
opacity: 1
|
|
359
|
-
})), transition("* => visible", animate("150ms cubic-bezier(0, 0, 0.2, 1)")), transition("* => void, * => hidden", animate("75ms cubic-bezier(0.4, 0.0, 1, 1)", style({
|
|
360
|
-
opacity: 0
|
|
361
|
-
})))])
|
|
362
|
-
};
|
|
363
|
-
var uniqueId = 0;
|
|
364
|
-
var MatSnackBarContainer = class _MatSnackBarContainer extends BasePortalOutlet {
|
|
365
|
-
constructor(_ngZone, _elementRef, _changeDetectorRef, _platform, snackBarConfig) {
|
|
366
|
-
super();
|
|
367
|
-
this._ngZone = _ngZone;
|
|
368
|
-
this._elementRef = _elementRef;
|
|
369
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
370
|
-
this._platform = _platform;
|
|
371
|
-
this.snackBarConfig = snackBarConfig;
|
|
372
|
-
this._document = inject(DOCUMENT);
|
|
373
|
-
this._trackedModals = /* @__PURE__ */ new Set();
|
|
374
|
-
this._announceDelay = 150;
|
|
375
|
-
this._destroyed = false;
|
|
376
|
-
this._onAnnounce = new Subject();
|
|
377
|
-
this._onExit = new Subject();
|
|
378
|
-
this._onEnter = new Subject();
|
|
379
|
-
this._animationState = "void";
|
|
380
|
-
this._liveElementId = `mat-snack-bar-container-live-${uniqueId++}`;
|
|
381
|
-
this.attachDomPortal = (portal) => {
|
|
382
|
-
this._assertNotAttached();
|
|
383
|
-
const result = this._portalOutlet.attachDomPortal(portal);
|
|
384
|
-
this._afterPortalAttached();
|
|
385
|
-
return result;
|
|
386
|
-
};
|
|
387
|
-
if (snackBarConfig.politeness === "assertive" && !snackBarConfig.announcementMessage) {
|
|
388
|
-
this._live = "assertive";
|
|
389
|
-
} else if (snackBarConfig.politeness === "off") {
|
|
390
|
-
this._live = "off";
|
|
391
|
-
} else {
|
|
392
|
-
this._live = "polite";
|
|
393
|
-
}
|
|
394
|
-
if (this._platform.FIREFOX) {
|
|
395
|
-
if (this._live === "polite") {
|
|
396
|
-
this._role = "status";
|
|
397
|
-
}
|
|
398
|
-
if (this._live === "assertive") {
|
|
399
|
-
this._role = "alert";
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
/** Attach a component portal as content to this snack bar container. */
|
|
404
|
-
attachComponentPortal(portal) {
|
|
405
|
-
this._assertNotAttached();
|
|
406
|
-
const result = this._portalOutlet.attachComponentPortal(portal);
|
|
407
|
-
this._afterPortalAttached();
|
|
408
|
-
return result;
|
|
409
|
-
}
|
|
410
|
-
/** Attach a template portal as content to this snack bar container. */
|
|
411
|
-
attachTemplatePortal(portal) {
|
|
412
|
-
this._assertNotAttached();
|
|
413
|
-
const result = this._portalOutlet.attachTemplatePortal(portal);
|
|
414
|
-
this._afterPortalAttached();
|
|
415
|
-
return result;
|
|
416
|
-
}
|
|
417
|
-
/** Handle end of animations, updating the state of the snackbar. */
|
|
418
|
-
onAnimationEnd(event) {
|
|
419
|
-
const {
|
|
420
|
-
fromState,
|
|
421
|
-
toState
|
|
422
|
-
} = event;
|
|
423
|
-
if (toState === "void" && fromState !== "void" || toState === "hidden") {
|
|
424
|
-
this._completeExit();
|
|
425
|
-
}
|
|
426
|
-
if (toState === "visible") {
|
|
427
|
-
const onEnter = this._onEnter;
|
|
428
|
-
this._ngZone.run(() => {
|
|
429
|
-
onEnter.next();
|
|
430
|
-
onEnter.complete();
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
/** Begin animation of snack bar entrance into view. */
|
|
435
|
-
enter() {
|
|
436
|
-
if (!this._destroyed) {
|
|
437
|
-
this._animationState = "visible";
|
|
438
|
-
this._changeDetectorRef.markForCheck();
|
|
439
|
-
this._changeDetectorRef.detectChanges();
|
|
440
|
-
this._screenReaderAnnounce();
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
/** Begin animation of the snack bar exiting from view. */
|
|
444
|
-
exit() {
|
|
445
|
-
this._ngZone.run(() => {
|
|
446
|
-
this._animationState = "hidden";
|
|
447
|
-
this._changeDetectorRef.markForCheck();
|
|
448
|
-
this._elementRef.nativeElement.setAttribute("mat-exit", "");
|
|
449
|
-
clearTimeout(this._announceTimeoutId);
|
|
450
|
-
});
|
|
451
|
-
return this._onExit;
|
|
452
|
-
}
|
|
453
|
-
/** Makes sure the exit callbacks have been invoked when the element is destroyed. */
|
|
454
|
-
ngOnDestroy() {
|
|
455
|
-
this._destroyed = true;
|
|
456
|
-
this._clearFromModals();
|
|
457
|
-
this._completeExit();
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
* Removes the element in a microtask. Helps prevent errors where we end up
|
|
461
|
-
* removing an element which is in the middle of an animation.
|
|
462
|
-
*/
|
|
463
|
-
_completeExit() {
|
|
464
|
-
queueMicrotask(() => {
|
|
465
|
-
this._onExit.next();
|
|
466
|
-
this._onExit.complete();
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Called after the portal contents have been attached. Can be
|
|
471
|
-
* used to modify the DOM once it's guaranteed to be in place.
|
|
472
|
-
*/
|
|
473
|
-
_afterPortalAttached() {
|
|
474
|
-
const element = this._elementRef.nativeElement;
|
|
475
|
-
const panelClasses = this.snackBarConfig.panelClass;
|
|
476
|
-
if (panelClasses) {
|
|
477
|
-
if (Array.isArray(panelClasses)) {
|
|
478
|
-
panelClasses.forEach((cssClass) => element.classList.add(cssClass));
|
|
479
|
-
} else {
|
|
480
|
-
element.classList.add(panelClasses);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
this._exposeToModals();
|
|
484
|
-
const label = this._label.nativeElement;
|
|
485
|
-
const labelClass = "mdc-snackbar__label";
|
|
486
|
-
label.classList.toggle(labelClass, !label.querySelector(`.${labelClass}`));
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Some browsers won't expose the accessibility node of the live element if there is an
|
|
490
|
-
* `aria-modal` and the live element is outside of it. This method works around the issue by
|
|
491
|
-
* pointing the `aria-owns` of all modals to the live element.
|
|
492
|
-
*/
|
|
493
|
-
_exposeToModals() {
|
|
494
|
-
const id = this._liveElementId;
|
|
495
|
-
const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');
|
|
496
|
-
for (let i = 0; i < modals.length; i++) {
|
|
497
|
-
const modal = modals[i];
|
|
498
|
-
const ariaOwns = modal.getAttribute("aria-owns");
|
|
499
|
-
this._trackedModals.add(modal);
|
|
500
|
-
if (!ariaOwns) {
|
|
501
|
-
modal.setAttribute("aria-owns", id);
|
|
502
|
-
} else if (ariaOwns.indexOf(id) === -1) {
|
|
503
|
-
modal.setAttribute("aria-owns", ariaOwns + " " + id);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
/** Clears the references to the live element from any modals it was added to. */
|
|
508
|
-
_clearFromModals() {
|
|
509
|
-
this._trackedModals.forEach((modal) => {
|
|
510
|
-
const ariaOwns = modal.getAttribute("aria-owns");
|
|
511
|
-
if (ariaOwns) {
|
|
512
|
-
const newValue = ariaOwns.replace(this._liveElementId, "").trim();
|
|
513
|
-
if (newValue.length > 0) {
|
|
514
|
-
modal.setAttribute("aria-owns", newValue);
|
|
515
|
-
} else {
|
|
516
|
-
modal.removeAttribute("aria-owns");
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
});
|
|
520
|
-
this._trackedModals.clear();
|
|
521
|
-
}
|
|
522
|
-
/** Asserts that no content is already attached to the container. */
|
|
523
|
-
_assertNotAttached() {
|
|
524
|
-
if (this._portalOutlet.hasAttached() && (typeof ngDevMode === "undefined" || ngDevMode)) {
|
|
525
|
-
throw Error("Attempting to attach snack bar content after content is already attached");
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* Starts a timeout to move the snack bar content to the live region so screen readers will
|
|
530
|
-
* announce it.
|
|
531
|
-
*/
|
|
532
|
-
_screenReaderAnnounce() {
|
|
533
|
-
if (!this._announceTimeoutId) {
|
|
534
|
-
this._ngZone.runOutsideAngular(() => {
|
|
535
|
-
this._announceTimeoutId = setTimeout(() => {
|
|
536
|
-
const inertElement = this._elementRef.nativeElement.querySelector("[aria-hidden]");
|
|
537
|
-
const liveElement = this._elementRef.nativeElement.querySelector("[aria-live]");
|
|
538
|
-
if (inertElement && liveElement) {
|
|
539
|
-
let focusedElement = null;
|
|
540
|
-
if (this._platform.isBrowser && document.activeElement instanceof HTMLElement && inertElement.contains(document.activeElement)) {
|
|
541
|
-
focusedElement = document.activeElement;
|
|
542
|
-
}
|
|
543
|
-
inertElement.removeAttribute("aria-hidden");
|
|
544
|
-
liveElement.appendChild(inertElement);
|
|
545
|
-
focusedElement?.focus();
|
|
546
|
-
this._onAnnounce.next();
|
|
547
|
-
this._onAnnounce.complete();
|
|
548
|
-
}
|
|
549
|
-
}, this._announceDelay);
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
static {
|
|
554
|
-
this.ɵfac = function MatSnackBarContainer_Factory(__ngFactoryType__) {
|
|
555
|
-
return new (__ngFactoryType__ || _MatSnackBarContainer)(ɵɵdirectiveInject(NgZone), ɵɵdirectiveInject(ElementRef), ɵɵdirectiveInject(ChangeDetectorRef), ɵɵdirectiveInject(Platform), ɵɵdirectiveInject(MatSnackBarConfig));
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
static {
|
|
559
|
-
this.ɵcmp = ɵɵdefineComponent({
|
|
560
|
-
type: _MatSnackBarContainer,
|
|
561
|
-
selectors: [["mat-snack-bar-container"]],
|
|
562
|
-
viewQuery: function MatSnackBarContainer_Query(rf, ctx) {
|
|
563
|
-
if (rf & 1) {
|
|
564
|
-
ɵɵviewQuery(CdkPortalOutlet, 7);
|
|
565
|
-
ɵɵviewQuery(_c0, 7);
|
|
566
|
-
}
|
|
567
|
-
if (rf & 2) {
|
|
568
|
-
let _t;
|
|
569
|
-
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx._portalOutlet = _t.first);
|
|
570
|
-
ɵɵqueryRefresh(_t = ɵɵloadQuery()) && (ctx._label = _t.first);
|
|
571
|
-
}
|
|
572
|
-
},
|
|
573
|
-
hostAttrs: [1, "mdc-snackbar", "mat-mdc-snack-bar-container"],
|
|
574
|
-
hostVars: 1,
|
|
575
|
-
hostBindings: function MatSnackBarContainer_HostBindings(rf, ctx) {
|
|
576
|
-
if (rf & 1) {
|
|
577
|
-
ɵɵsyntheticHostListener("@state.done", function MatSnackBarContainer_animation_state_done_HostBindingHandler($event) {
|
|
578
|
-
return ctx.onAnimationEnd($event);
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
if (rf & 2) {
|
|
582
|
-
ɵɵsyntheticHostProperty("@state", ctx._animationState);
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
standalone: true,
|
|
586
|
-
features: [ɵɵInheritDefinitionFeature, ɵɵStandaloneFeature],
|
|
587
|
-
decls: 6,
|
|
588
|
-
vars: 3,
|
|
589
|
-
consts: [["label", ""], [1, "mdc-snackbar__surface", "mat-mdc-snackbar-surface"], [1, "mat-mdc-snack-bar-label"], ["aria-hidden", "true"], ["cdkPortalOutlet", ""]],
|
|
590
|
-
template: function MatSnackBarContainer_Template(rf, ctx) {
|
|
591
|
-
if (rf & 1) {
|
|
592
|
-
ɵɵelementStart(0, "div", 1)(1, "div", 2, 0)(3, "div", 3);
|
|
593
|
-
ɵɵtemplate(4, MatSnackBarContainer_ng_template_4_Template, 0, 0, "ng-template", 4);
|
|
594
|
-
ɵɵelementEnd();
|
|
595
|
-
ɵɵelement(5, "div");
|
|
596
|
-
ɵɵelementEnd()();
|
|
597
|
-
}
|
|
598
|
-
if (rf & 2) {
|
|
599
|
-
ɵɵadvance(5);
|
|
600
|
-
ɵɵattribute("aria-live", ctx._live)("role", ctx._role)("id", ctx._liveElementId);
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
dependencies: [CdkPortalOutlet],
|
|
604
|
-
styles: [".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-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}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-app-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(--mdc-snackbar-supporting-text-font, var(--mat-app-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-app-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-app-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-text-button-state-layer-color:currentColor;--mat-text-button-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-app-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],
|
|
605
|
-
encapsulation: 2,
|
|
606
|
-
data: {
|
|
607
|
-
animation: [matSnackBarAnimations.snackBarState]
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
(() => {
|
|
613
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MatSnackBarContainer, [{
|
|
614
|
-
type: Component,
|
|
615
|
-
args: [{
|
|
616
|
-
selector: "mat-snack-bar-container",
|
|
617
|
-
changeDetection: ChangeDetectionStrategy.Default,
|
|
618
|
-
encapsulation: ViewEncapsulation$1.None,
|
|
619
|
-
animations: [matSnackBarAnimations.snackBarState],
|
|
620
|
-
standalone: true,
|
|
621
|
-
imports: [CdkPortalOutlet],
|
|
622
|
-
host: {
|
|
623
|
-
"class": "mdc-snackbar mat-mdc-snack-bar-container",
|
|
624
|
-
"[@state]": "_animationState",
|
|
625
|
-
"(@state.done)": "onAnimationEnd($event)"
|
|
626
|
-
},
|
|
627
|
-
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',
|
|
628
|
-
styles: [".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-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}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-app-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-app-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-app-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(--mdc-snackbar-supporting-text-font, var(--mat-app-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-app-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-app-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-app-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-text-button-state-layer-color:currentColor;--mat-text-button-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-app-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"]
|
|
629
|
-
}]
|
|
630
|
-
}], () => [{
|
|
631
|
-
type: NgZone
|
|
632
|
-
}, {
|
|
633
|
-
type: ElementRef
|
|
634
|
-
}, {
|
|
635
|
-
type: ChangeDetectorRef
|
|
636
|
-
}, {
|
|
637
|
-
type: Platform
|
|
638
|
-
}, {
|
|
639
|
-
type: MatSnackBarConfig
|
|
640
|
-
}], {
|
|
641
|
-
_portalOutlet: [{
|
|
642
|
-
type: ViewChild,
|
|
643
|
-
args: [CdkPortalOutlet, {
|
|
644
|
-
static: true
|
|
645
|
-
}]
|
|
646
|
-
}],
|
|
647
|
-
_label: [{
|
|
648
|
-
type: ViewChild,
|
|
649
|
-
args: ["label", {
|
|
650
|
-
static: true
|
|
651
|
-
}]
|
|
652
|
-
}]
|
|
653
|
-
});
|
|
654
|
-
})();
|
|
655
|
-
function MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY() {
|
|
656
|
-
return new MatSnackBarConfig();
|
|
657
|
-
}
|
|
658
|
-
var MAT_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken("mat-snack-bar-default-options", {
|
|
659
|
-
providedIn: "root",
|
|
660
|
-
factory: MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY
|
|
661
|
-
});
|
|
662
|
-
var MatSnackBar = class _MatSnackBar {
|
|
663
|
-
/** Reference to the currently opened snackbar at *any* level. */
|
|
664
|
-
get _openedSnackBarRef() {
|
|
665
|
-
const parent = this._parentSnackBar;
|
|
666
|
-
return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
|
|
667
|
-
}
|
|
668
|
-
set _openedSnackBarRef(value) {
|
|
669
|
-
if (this._parentSnackBar) {
|
|
670
|
-
this._parentSnackBar._openedSnackBarRef = value;
|
|
671
|
-
} else {
|
|
672
|
-
this._snackBarRefAtThisLevel = value;
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
constructor(_overlay, _live, _injector, _breakpointObserver, _parentSnackBar, _defaultConfig) {
|
|
676
|
-
this._overlay = _overlay;
|
|
677
|
-
this._live = _live;
|
|
678
|
-
this._injector = _injector;
|
|
679
|
-
this._breakpointObserver = _breakpointObserver;
|
|
680
|
-
this._parentSnackBar = _parentSnackBar;
|
|
681
|
-
this._defaultConfig = _defaultConfig;
|
|
682
|
-
this._snackBarRefAtThisLevel = null;
|
|
683
|
-
this.simpleSnackBarComponent = SimpleSnackBar;
|
|
684
|
-
this.snackBarContainerComponent = MatSnackBarContainer;
|
|
685
|
-
this.handsetCssClass = "mat-mdc-snack-bar-handset";
|
|
686
|
-
}
|
|
687
|
-
/**
|
|
688
|
-
* Creates and dispatches a snack bar with a custom component for the content, removing any
|
|
689
|
-
* currently opened snack bars.
|
|
690
|
-
*
|
|
691
|
-
* @param component Component to be instantiated.
|
|
692
|
-
* @param config Extra configuration for the snack bar.
|
|
693
|
-
*/
|
|
694
|
-
openFromComponent(component, config) {
|
|
695
|
-
return this._attach(component, config);
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* Creates and dispatches a snack bar with a custom template for the content, removing any
|
|
699
|
-
* currently opened snack bars.
|
|
700
|
-
*
|
|
701
|
-
* @param template Template to be instantiated.
|
|
702
|
-
* @param config Extra configuration for the snack bar.
|
|
703
|
-
*/
|
|
704
|
-
openFromTemplate(template, config) {
|
|
705
|
-
return this._attach(template, config);
|
|
706
|
-
}
|
|
707
|
-
/**
|
|
708
|
-
* Opens a snackbar with a message and an optional action.
|
|
709
|
-
* @param message The message to show in the snackbar.
|
|
710
|
-
* @param action The label for the snackbar action.
|
|
711
|
-
* @param config Additional configuration options for the snackbar.
|
|
712
|
-
*/
|
|
713
|
-
open(message, action = "", config) {
|
|
714
|
-
const _config = __spreadValues(__spreadValues({}, this._defaultConfig), config);
|
|
715
|
-
_config.data = {
|
|
716
|
-
message,
|
|
717
|
-
action
|
|
718
|
-
};
|
|
719
|
-
if (_config.announcementMessage === message) {
|
|
720
|
-
_config.announcementMessage = void 0;
|
|
721
|
-
}
|
|
722
|
-
return this.openFromComponent(this.simpleSnackBarComponent, _config);
|
|
723
|
-
}
|
|
724
|
-
/**
|
|
725
|
-
* Dismisses the currently-visible snack bar.
|
|
726
|
-
*/
|
|
727
|
-
dismiss() {
|
|
728
|
-
if (this._openedSnackBarRef) {
|
|
729
|
-
this._openedSnackBarRef.dismiss();
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
ngOnDestroy() {
|
|
733
|
-
if (this._snackBarRefAtThisLevel) {
|
|
734
|
-
this._snackBarRefAtThisLevel.dismiss();
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
* Attaches the snack bar container component to the overlay.
|
|
739
|
-
*/
|
|
740
|
-
_attachSnackBarContainer(overlayRef, config) {
|
|
741
|
-
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
742
|
-
const injector = Injector.create({
|
|
743
|
-
parent: userInjector || this._injector,
|
|
744
|
-
providers: [{
|
|
745
|
-
provide: MatSnackBarConfig,
|
|
746
|
-
useValue: config
|
|
747
|
-
}]
|
|
748
|
-
});
|
|
749
|
-
const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);
|
|
750
|
-
const containerRef = overlayRef.attach(containerPortal);
|
|
751
|
-
containerRef.instance.snackBarConfig = config;
|
|
752
|
-
return containerRef.instance;
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* Places a new component or a template as the content of the snack bar container.
|
|
756
|
-
*/
|
|
757
|
-
_attach(content, userConfig) {
|
|
758
|
-
const config = __spreadValues(__spreadValues(__spreadValues({}, new MatSnackBarConfig()), this._defaultConfig), userConfig);
|
|
759
|
-
const overlayRef = this._createOverlay(config);
|
|
760
|
-
const container = this._attachSnackBarContainer(overlayRef, config);
|
|
761
|
-
const snackBarRef = new MatSnackBarRef(container, overlayRef);
|
|
762
|
-
if (content instanceof TemplateRef) {
|
|
763
|
-
const portal = new TemplatePortal(content, null, {
|
|
764
|
-
$implicit: config.data,
|
|
765
|
-
snackBarRef
|
|
766
|
-
});
|
|
767
|
-
snackBarRef.instance = container.attachTemplatePortal(portal);
|
|
768
|
-
} else {
|
|
769
|
-
const injector = this._createInjector(config, snackBarRef);
|
|
770
|
-
const portal = new ComponentPortal(content, void 0, injector);
|
|
771
|
-
const contentRef = container.attachComponentPortal(portal);
|
|
772
|
-
snackBarRef.instance = contentRef.instance;
|
|
773
|
-
}
|
|
774
|
-
this._breakpointObserver.observe(Breakpoints.HandsetPortrait).pipe(takeUntil(overlayRef.detachments())).subscribe((state2) => {
|
|
775
|
-
overlayRef.overlayElement.classList.toggle(this.handsetCssClass, state2.matches);
|
|
776
|
-
});
|
|
777
|
-
if (config.announcementMessage) {
|
|
778
|
-
container._onAnnounce.subscribe(() => {
|
|
779
|
-
this._live.announce(config.announcementMessage, config.politeness);
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
|
-
this._animateSnackBar(snackBarRef, config);
|
|
783
|
-
this._openedSnackBarRef = snackBarRef;
|
|
784
|
-
return this._openedSnackBarRef;
|
|
785
|
-
}
|
|
786
|
-
/** Animates the old snack bar out and the new one in. */
|
|
787
|
-
_animateSnackBar(snackBarRef, config) {
|
|
788
|
-
snackBarRef.afterDismissed().subscribe(() => {
|
|
789
|
-
if (this._openedSnackBarRef == snackBarRef) {
|
|
790
|
-
this._openedSnackBarRef = null;
|
|
791
|
-
}
|
|
792
|
-
if (config.announcementMessage) {
|
|
793
|
-
this._live.clear();
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
if (this._openedSnackBarRef) {
|
|
797
|
-
this._openedSnackBarRef.afterDismissed().subscribe(() => {
|
|
798
|
-
snackBarRef.containerInstance.enter();
|
|
799
|
-
});
|
|
800
|
-
this._openedSnackBarRef.dismiss();
|
|
801
|
-
} else {
|
|
802
|
-
snackBarRef.containerInstance.enter();
|
|
803
|
-
}
|
|
804
|
-
if (config.duration && config.duration > 0) {
|
|
805
|
-
snackBarRef.afterOpened().subscribe(() => snackBarRef._dismissAfter(config.duration));
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* Creates a new overlay and places it in the correct location.
|
|
810
|
-
* @param config The user-specified snack bar config.
|
|
811
|
-
*/
|
|
812
|
-
_createOverlay(config) {
|
|
813
|
-
const overlayConfig = new OverlayConfig();
|
|
814
|
-
overlayConfig.direction = config.direction;
|
|
815
|
-
let positionStrategy = this._overlay.position().global();
|
|
816
|
-
const isRtl = config.direction === "rtl";
|
|
817
|
-
const isLeft = config.horizontalPosition === "left" || config.horizontalPosition === "start" && !isRtl || config.horizontalPosition === "end" && isRtl;
|
|
818
|
-
const isRight = !isLeft && config.horizontalPosition !== "center";
|
|
819
|
-
if (isLeft) {
|
|
820
|
-
positionStrategy.left("0");
|
|
821
|
-
} else if (isRight) {
|
|
822
|
-
positionStrategy.right("0");
|
|
823
|
-
} else {
|
|
824
|
-
positionStrategy.centerHorizontally();
|
|
825
|
-
}
|
|
826
|
-
if (config.verticalPosition === "top") {
|
|
827
|
-
positionStrategy.top("0");
|
|
828
|
-
} else {
|
|
829
|
-
positionStrategy.bottom("0");
|
|
830
|
-
}
|
|
831
|
-
overlayConfig.positionStrategy = positionStrategy;
|
|
832
|
-
return this._overlay.create(overlayConfig);
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* Creates an injector to be used inside of a snack bar component.
|
|
836
|
-
* @param config Config that was used to create the snack bar.
|
|
837
|
-
* @param snackBarRef Reference to the snack bar.
|
|
838
|
-
*/
|
|
839
|
-
_createInjector(config, snackBarRef) {
|
|
840
|
-
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
841
|
-
return Injector.create({
|
|
842
|
-
parent: userInjector || this._injector,
|
|
843
|
-
providers: [{
|
|
844
|
-
provide: MatSnackBarRef,
|
|
845
|
-
useValue: snackBarRef
|
|
846
|
-
}, {
|
|
847
|
-
provide: MAT_SNACK_BAR_DATA,
|
|
848
|
-
useValue: config.data
|
|
849
|
-
}]
|
|
850
|
-
});
|
|
851
|
-
}
|
|
852
|
-
static {
|
|
853
|
-
this.ɵfac = function MatSnackBar_Factory(__ngFactoryType__) {
|
|
854
|
-
return new (__ngFactoryType__ || _MatSnackBar)(ɵɵinject(Overlay), ɵɵinject(LiveAnnouncer), ɵɵinject(Injector), ɵɵinject(BreakpointObserver), ɵɵinject(_MatSnackBar, 12), ɵɵinject(MAT_SNACK_BAR_DEFAULT_OPTIONS));
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
static {
|
|
858
|
-
this.ɵprov = ɵɵdefineInjectable({
|
|
859
|
-
token: _MatSnackBar,
|
|
860
|
-
factory: _MatSnackBar.ɵfac,
|
|
861
|
-
providedIn: "root"
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
(() => {
|
|
866
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MatSnackBar, [{
|
|
867
|
-
type: Injectable,
|
|
868
|
-
args: [{
|
|
869
|
-
providedIn: "root"
|
|
870
|
-
}]
|
|
871
|
-
}], () => [{
|
|
872
|
-
type: Overlay
|
|
873
|
-
}, {
|
|
874
|
-
type: LiveAnnouncer
|
|
875
|
-
}, {
|
|
876
|
-
type: Injector
|
|
877
|
-
}, {
|
|
878
|
-
type: BreakpointObserver
|
|
879
|
-
}, {
|
|
880
|
-
type: MatSnackBar,
|
|
881
|
-
decorators: [{
|
|
882
|
-
type: Optional
|
|
883
|
-
}, {
|
|
884
|
-
type: SkipSelf
|
|
885
|
-
}]
|
|
886
|
-
}, {
|
|
887
|
-
type: MatSnackBarConfig,
|
|
888
|
-
decorators: [{
|
|
889
|
-
type: Inject,
|
|
890
|
-
args: [MAT_SNACK_BAR_DEFAULT_OPTIONS]
|
|
891
|
-
}]
|
|
892
|
-
}], null);
|
|
893
|
-
})();
|
|
894
|
-
var DIRECTIVES = [MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction];
|
|
895
|
-
var MatSnackBarModule = class _MatSnackBarModule {
|
|
896
|
-
static {
|
|
897
|
-
this.ɵfac = function MatSnackBarModule_Factory(__ngFactoryType__) {
|
|
898
|
-
return new (__ngFactoryType__ || _MatSnackBarModule)();
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
static {
|
|
902
|
-
this.ɵmod = ɵɵdefineNgModule({
|
|
903
|
-
type: _MatSnackBarModule,
|
|
904
|
-
imports: [OverlayModule, PortalModule, MatButtonModule, MatCommonModule, SimpleSnackBar, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction],
|
|
905
|
-
exports: [MatCommonModule, MatSnackBarContainer, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction]
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
static {
|
|
909
|
-
this.ɵinj = ɵɵdefineInjector({
|
|
910
|
-
providers: [MatSnackBar],
|
|
911
|
-
imports: [OverlayModule, PortalModule, MatButtonModule, MatCommonModule, SimpleSnackBar, MatCommonModule]
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
|
-
};
|
|
915
|
-
(() => {
|
|
916
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(MatSnackBarModule, [{
|
|
917
|
-
type: NgModule,
|
|
918
|
-
args: [{
|
|
919
|
-
imports: [OverlayModule, PortalModule, MatButtonModule, MatCommonModule, SimpleSnackBar, ...DIRECTIVES],
|
|
920
|
-
exports: [MatCommonModule, ...DIRECTIVES],
|
|
921
|
-
providers: [MatSnackBar]
|
|
922
|
-
}]
|
|
923
|
-
}], null, null);
|
|
924
|
-
})();
|
|
925
|
-
export {
|
|
926
|
-
MAT_SNACK_BAR_DATA,
|
|
927
|
-
MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
|
928
|
-
MAT_SNACK_BAR_DEFAULT_OPTIONS_FACTORY,
|
|
929
|
-
MatSnackBar,
|
|
930
|
-
MatSnackBarAction,
|
|
931
|
-
MatSnackBarActions,
|
|
932
|
-
MatSnackBarConfig,
|
|
933
|
-
MatSnackBarContainer,
|
|
934
|
-
MatSnackBarLabel,
|
|
935
|
-
MatSnackBarModule,
|
|
936
|
-
MatSnackBarRef,
|
|
937
|
-
SimpleSnackBar,
|
|
938
|
-
matSnackBarAnimations
|
|
939
|
-
};
|
|
940
|
-
//# sourceMappingURL=@angular_material_snack-bar.js.map
|