@arsedizioni/ars-utils 22.6.86 → 22.6.89
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/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
- package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
- package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
- package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
- package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
- package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
- package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
- package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
- package/types/arsedizioni-ars-utils.d.ts +1 -3
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { Observable } from
|
|
2
|
-
import * as
|
|
3
|
-
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
4
3
|
/**
|
|
5
4
|
* Content of a shell message.
|
|
6
5
|
*
|
|
7
6
|
* Deliberately a subset of `InfoDialogData`: the shell speaks before a route exists, so it
|
|
8
7
|
* says one thing and offers one way out. Anything richer belongs to `DialogService`.
|
|
9
8
|
*/
|
|
10
|
-
interface ShellMessageData {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
export interface ShellMessageData {
|
|
10
|
+
/** Heading shown above the message. */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** HTML body of the message. */
|
|
13
|
+
message: string;
|
|
14
|
+
/** Optional technical detail (a log, a stack trace) shown in a secondary panel. */
|
|
15
|
+
details?: string;
|
|
16
|
+
/** Label of the dismiss button. */
|
|
17
|
+
okCaption?: string;
|
|
18
|
+
/** Auto-dismiss delay in milliseconds; the message stays until dismissed when omitted. */
|
|
19
|
+
dismissAfter?: number;
|
|
20
|
+
/** Maximum width of the panel in pixels. */
|
|
21
|
+
width?: number;
|
|
23
22
|
}
|
|
24
23
|
/**
|
|
25
24
|
* Handle over an open shell message.
|
|
@@ -28,28 +27,27 @@ interface ShellMessageData {
|
|
|
28
27
|
* uses of one are the same, and mean the same thing, so moving a call site between
|
|
29
28
|
* `DialogService` and `ShellService` does not change how its result is awaited.
|
|
30
29
|
*/
|
|
31
|
-
interface ShellMessageRef {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
export interface ShellMessageRef {
|
|
31
|
+
/**
|
|
32
|
+
* Closes the message. Does nothing when it has already been closed.
|
|
33
|
+
* @returns void
|
|
34
|
+
*/
|
|
35
|
+
close(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Emits once and completes when the message has been taken off the screen, whichever way it
|
|
38
|
+
* was dismissed — the button, Escape, the backdrop, the auto-dismiss timer, or a `close()`.
|
|
39
|
+
*
|
|
40
|
+
* Like `MatDialogRef.afterClosed()`, and like it in the corner case too: subscribing after
|
|
41
|
+
* the message is already gone completes without emitting, so it is not a way to ask whether
|
|
42
|
+
* it was closed.
|
|
43
|
+
* @returns An observable of the dismissal.
|
|
44
|
+
*/
|
|
45
|
+
afterClosed(): Observable<void>;
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
/** Visual style of the busy indicator. */
|
|
50
|
-
type ShellBusyType = 'bar' | 'spinner' | 'wait' | 'hourglass';
|
|
48
|
+
export type ShellBusyType = 'bar' | 'spinner' | 'wait' | 'hourglass';
|
|
51
49
|
/** Progress mode of the bar and of the spinner. */
|
|
52
|
-
type ShellBusyMode = 'determinate' | 'indeterminate';
|
|
50
|
+
export type ShellBusyMode = 'determinate' | 'indeterminate';
|
|
53
51
|
/**
|
|
54
52
|
* Overlay that blocks interaction while an operation is running, in the four styles the
|
|
55
53
|
* applications use: progress bar, spinner, hourglass and bare wait.
|
|
@@ -61,57 +59,56 @@ type ShellBusyMode = 'determinate' | 'indeterminate';
|
|
|
61
59
|
* The instance is created once by {@link ShellService} and then reused: showing and hiding is a
|
|
62
60
|
* class on the host, never a `createComponent`, so the 40-odd calls a screen costs nothing.
|
|
63
61
|
*/
|
|
64
|
-
declare class ShellBusyComponent {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
62
|
+
export declare class ShellBusyComponent {
|
|
63
|
+
private readonly themeService;
|
|
64
|
+
/**
|
|
65
|
+
* True when the panel must paint itself dark.
|
|
66
|
+
*
|
|
67
|
+
* Read from {@link ThemeService} and not from `prefers-color-scheme`, because the two do not
|
|
68
|
+
* always agree: the service is what the user chose, and it may be forcing dark on a machine
|
|
69
|
+
* that is on light. Following the OS instead would leave this panel the only light thing on a
|
|
70
|
+
* dark screen.
|
|
71
|
+
*/
|
|
72
|
+
protected readonly dark: import("@angular/core").WritableSignal<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Keeps {@link dark} in step with the service, now and at every later change.
|
|
75
|
+
*
|
|
76
|
+
* `'auto'` is resolved through `getTheme()`, which is the only thing that knows what the
|
|
77
|
+
* operating system is currently on.
|
|
78
|
+
* @returns void
|
|
79
|
+
*/
|
|
80
|
+
private followTheme;
|
|
81
|
+
/** Whether the overlay is on screen. Hidden with `display: none`, so it costs no layout. */
|
|
82
|
+
readonly visible: import("@angular/core").WritableSignal<boolean>;
|
|
83
|
+
/** Visual style of the indicator. */
|
|
84
|
+
readonly type: import("@angular/core").WritableSignal<ShellBusyType>;
|
|
85
|
+
/** Current progress value (0-100), used when {@link progressMode} is `'determinate'`. */
|
|
86
|
+
readonly progress: import("@angular/core").WritableSignal<number>;
|
|
87
|
+
/** Progress mode of the bar and of the spinner. */
|
|
88
|
+
readonly progressMode: import("@angular/core").WritableSignal<ShellBusyMode>;
|
|
89
|
+
/** Message displayed above the indicator. */
|
|
90
|
+
readonly message: import("@angular/core").WritableSignal<string>;
|
|
91
|
+
/** Circumference of the spinner circle, bound to `stroke-dasharray`. */
|
|
92
|
+
protected readonly circumference: number;
|
|
93
|
+
constructor();
|
|
94
|
+
/** Length of the spinner arc still to be drawn, derived from {@link progress}. */
|
|
95
|
+
protected readonly dashOffset: import("@angular/core").Signal<number>;
|
|
96
|
+
/**
|
|
97
|
+
* Updates the overlay state.
|
|
98
|
+
*
|
|
99
|
+
* Same contract as the `BusyDialogComponent` it replaces, down to the two implicit rules that
|
|
100
|
+
* callers rely on: an empty message keeps the previous text (so `wait()` does not wipe it), and
|
|
101
|
+
* a progress above zero forces `'determinate'` whatever the caller passed.
|
|
102
|
+
* @param message - New message to display. An empty string preserves the current one.
|
|
103
|
+
* @param progress - Current progress value (0-100). Above zero it forces determinate mode.
|
|
104
|
+
* @param progressMode - Progress mode to use. Defaults to `'indeterminate'`.
|
|
105
|
+
* @param type - Visual style to use. Defaults to `'bar'`.
|
|
106
|
+
* @returns void
|
|
107
|
+
*/
|
|
108
|
+
set(message: string, progress: number, progressMode?: ShellBusyMode, type?: ShellBusyType): void;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellBusyComponent, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShellBusyComponent, "ars-shell-busy", never, {}, {}, never, never, true, never>;
|
|
113
111
|
}
|
|
114
|
-
|
|
115
112
|
/**
|
|
116
113
|
* Everything the application can say to the user without asking anything back: a message, an
|
|
117
114
|
* error, and the wait overlay. No Angular Material behind any of it.
|
|
@@ -142,190 +139,189 @@ declare class ShellBusyComponent {
|
|
|
142
139
|
* still there and still correct: it is what orders the overlays on a browser without the Popover
|
|
143
140
|
* API, where the CDK does not use it either.
|
|
144
141
|
*/
|
|
145
|
-
declare class ShellService {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
142
|
+
export declare class ShellService {
|
|
143
|
+
private readonly appRef;
|
|
144
|
+
private readonly environmentInjector;
|
|
145
|
+
private messageRef?;
|
|
146
|
+
private messageKind?;
|
|
147
|
+
private messageClosed?;
|
|
148
|
+
private previousOverflow?;
|
|
149
|
+
private previouslyFocused?;
|
|
150
|
+
private busyRef?;
|
|
151
|
+
private busyVisible;
|
|
152
|
+
private busyActionSubscription?;
|
|
153
|
+
private clearBusyTimer?;
|
|
154
|
+
/** Cached answer of {@link supportsTopLayer}, resolved the first time an overlay is shown. */
|
|
155
|
+
private topLayerSupport?;
|
|
156
|
+
/**
|
|
157
|
+
* Shows an informational message.
|
|
158
|
+
* @param message - HTML message to display.
|
|
159
|
+
* @param title - Heading. Defaults to `'Informazioni'`.
|
|
160
|
+
* @param okCaption - Dismiss button label. Defaults to `'Ok'`.
|
|
161
|
+
* @param width - Maximum panel width in pixels. Defaults to `500`.
|
|
162
|
+
* @param dismissAfter - Auto-close delay in milliseconds (optional).
|
|
163
|
+
* @param details - Optional secondary details text.
|
|
164
|
+
* @returns A handle over the open message, or `null` outside the browser.
|
|
165
|
+
*/
|
|
166
|
+
info(message: string, title?: string, okCaption?: string, width?: number, dismissAfter?: number, details?: string): ShellMessageRef | null;
|
|
167
|
+
/**
|
|
168
|
+
* Shows an error message. When one is already on screen its content is replaced in place: a
|
|
169
|
+
* failing API answers many requests at once, and each of them must not add a panel of its own.
|
|
170
|
+
* @param message - HTML error message to display.
|
|
171
|
+
* @param log - Optional technical log or stack trace shown in the details panel.
|
|
172
|
+
* @param title - Heading. Defaults to `'Errore'`.
|
|
173
|
+
* @param okCaption - Dismiss button label. Defaults to `'Ok'`.
|
|
174
|
+
* @param width - Maximum panel width in pixels. Defaults to `500`.
|
|
175
|
+
* @param dismissAfter - Auto-close delay in milliseconds (optional).
|
|
176
|
+
* @returns A handle over the open message, or `null` outside the browser.
|
|
177
|
+
*/
|
|
178
|
+
error(message: string, log?: string, title?: string, okCaption?: string, width?: number, dismissAfter?: number): ShellMessageRef | null;
|
|
179
|
+
/**
|
|
180
|
+
* Closes the message currently on screen, if any. Does not touch the busy overlay.
|
|
181
|
+
* @returns void
|
|
182
|
+
*/
|
|
183
|
+
closeMessage(): void;
|
|
184
|
+
/**
|
|
185
|
+
* Opens the message panel, or updates the one already open when it is showing the same kind of
|
|
186
|
+
* message.
|
|
187
|
+
* @param kind - Whether this is an informational or an error message.
|
|
188
|
+
* @param data - The content to display.
|
|
189
|
+
* @returns A handle over the open message, or `null` outside the browser.
|
|
190
|
+
*/
|
|
191
|
+
private showMessage;
|
|
192
|
+
/**
|
|
193
|
+
* Builds the handle returned to callers.
|
|
194
|
+
*
|
|
195
|
+
* The subject is captured now rather than read at call time, so `afterClosed()` keeps
|
|
196
|
+
* answering about the message this handle was given for, even once another one has taken
|
|
197
|
+
* its place on screen.
|
|
198
|
+
* @returns The handle over the message currently on screen.
|
|
199
|
+
*/
|
|
200
|
+
private messageHandle;
|
|
201
|
+
/**
|
|
202
|
+
* Shows or updates the busy overlay.
|
|
203
|
+
*
|
|
204
|
+
* Called dozens of times per screen, so it creates nothing after the first time: the component
|
|
205
|
+
* is built once and then kept, and showing it again is a class on the host element. The state
|
|
206
|
+
* is written to signals and checked synchronously before returning, so the message on screen is
|
|
207
|
+
* always the last one asked for — a second `busy()` in the same task never leaves the previous
|
|
208
|
+
* text behind.
|
|
209
|
+
* @param message - Text to display. An empty string keeps the current one.
|
|
210
|
+
* @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.
|
|
211
|
+
* @param progressMode - Progress mode. Defaults to `'indeterminate'`.
|
|
212
|
+
* @param type - Visual style of the overlay. Defaults to `'bar'`.
|
|
213
|
+
* @param action - Optional observable; the overlay is dismissed when it first emits. It
|
|
214
|
+
* replaces the one passed to a previous call, which is unsubscribed.
|
|
215
|
+
* @returns `true` if the overlay was brought up by this call, `false` if it was already up.
|
|
216
|
+
*/
|
|
217
|
+
setBusy(message: string, progress?: number, progressMode?: ShellBusyMode, type?: ShellBusyType, action?: Observable<unknown>): boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Shows or updates the busy overlay using the progress-bar style.
|
|
220
|
+
* @param message - Text to display inside the overlay.
|
|
221
|
+
* @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.
|
|
222
|
+
* @param progressMode - Progress mode. Defaults to `'indeterminate'`.
|
|
223
|
+
* @param action - Optional observable; the overlay is dismissed when it emits.
|
|
224
|
+
* @returns `true` if the overlay was brought up by this call.
|
|
225
|
+
*/
|
|
226
|
+
busy(message: string, progress?: number, progressMode?: ShellBusyMode, action?: Observable<unknown>): boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Shows or updates the busy overlay using the spinner style.
|
|
229
|
+
* @param message - Text to display inside the overlay.
|
|
230
|
+
* @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.
|
|
231
|
+
* @param progressMode - Progress mode. Defaults to `'indeterminate'`.
|
|
232
|
+
* @param action - Optional observable; the overlay is dismissed when it emits.
|
|
233
|
+
* @returns `true` if the overlay was brought up by this call.
|
|
234
|
+
*/
|
|
235
|
+
busySpinner(message: string, progress?: number, progressMode?: ShellBusyMode, action?: Observable<unknown>): boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Shows or updates the busy overlay using the hourglass style.
|
|
238
|
+
* @param message - Text to display inside the overlay.
|
|
239
|
+
* @param action - Optional observable; the overlay is dismissed when it emits.
|
|
240
|
+
* @returns `true` if the overlay was brought up by this call.
|
|
241
|
+
*/
|
|
242
|
+
busyHourglass(message: string, action?: Observable<unknown>): boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Shows a bare wait indicator, with no panel and no message.
|
|
245
|
+
* @param action - Optional observable; the overlay is dismissed when it emits.
|
|
246
|
+
* @returns `true` if the overlay was brought up by this call.
|
|
247
|
+
*/
|
|
248
|
+
wait(action?: Observable<unknown>): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Returns a {@link BusyTimer} that brings the overlay up only if the operation is still running
|
|
251
|
+
* after a debounce delay.
|
|
252
|
+
* @param message - Text to display. Defaults to `'Operazione in corso...'`.
|
|
253
|
+
* @param due - Delay in milliseconds before the overlay appears. Defaults to `100`.
|
|
254
|
+
* @returns A timer that must be disposed with `clear()` when the operation ends.
|
|
255
|
+
*/
|
|
256
|
+
busyTimer(message?: string, due?: number): BusyTimer;
|
|
257
|
+
/**
|
|
258
|
+
* Takes the busy overlay away.
|
|
259
|
+
*
|
|
260
|
+
* By default it waits a short grace period, so that a chain of quick operations does not make
|
|
261
|
+
* the overlay blink between one and the next; any `setBusy()` in the meantime cancels the
|
|
262
|
+
* pending removal. Pass `true` when something is about to be drawn underneath it and the wait
|
|
263
|
+
* would be visible — that is what `DialogService.open()` does.
|
|
264
|
+
* @param immediate - When `true`, removes the overlay without waiting for the grace period.
|
|
265
|
+
* @returns void
|
|
266
|
+
*/
|
|
267
|
+
clearBusy(immediate?: boolean): void;
|
|
268
|
+
/**
|
|
269
|
+
* Hides the busy overlay without destroying it, so the next call can reuse the instance.
|
|
270
|
+
* @returns void
|
|
271
|
+
*/
|
|
272
|
+
private hideBusy;
|
|
273
|
+
/**
|
|
274
|
+
* Returns the busy component, creating and attaching it the first time it is needed.
|
|
275
|
+
* @returns The reused busy component reference.
|
|
276
|
+
*/
|
|
277
|
+
private ensureBusy;
|
|
278
|
+
/**
|
|
279
|
+
* Brings the message currently on screen back to the front of the top layer, if there is one.
|
|
280
|
+
*
|
|
281
|
+
* Called by `DialogService` after opening a dialog: an error the user has not dismissed yet
|
|
282
|
+
* must stay above whatever is opened underneath it.
|
|
283
|
+
* @returns void
|
|
284
|
+
*/
|
|
285
|
+
raiseMessage(): void;
|
|
286
|
+
/**
|
|
287
|
+
* Whether the browser can promote an element to the top layer through the Popover API.
|
|
288
|
+
*
|
|
289
|
+
* Angular CDK 22 opens every overlay as `popover="manual"`, so a Material dialog does not sit
|
|
290
|
+
* at z-index 1000 any more: it sits in the top layer, which is painted above the whole page
|
|
291
|
+
* whatever the z-index of the page says. The only way to put something above it is to be in
|
|
292
|
+
* the top layer too. Where the API is missing the overlays fall back to their z-index, which
|
|
293
|
+
* is also the CDK's own fallback and therefore still the right order.
|
|
294
|
+
* @returns `true` when `showPopover()` is available.
|
|
295
|
+
*/
|
|
296
|
+
private supportsTopLayer;
|
|
297
|
+
/**
|
|
298
|
+
* Promotes an overlay to the top layer, marking it as a manual popover the first time.
|
|
299
|
+
*
|
|
300
|
+
* `manual` and not `auto`: an `auto` popover is light-dismissed by a click anywhere and closed
|
|
301
|
+
* by Escape without telling anyone, which would take the panel off the screen behind the back
|
|
302
|
+
* of the component that owns it.
|
|
303
|
+
* @param el - The host element of the overlay. Ignored when undefined.
|
|
304
|
+
* @returns void
|
|
305
|
+
*/
|
|
306
|
+
private enterTopLayer;
|
|
307
|
+
/**
|
|
308
|
+
* Takes an overlay out of the top layer.
|
|
309
|
+
* @param el - The host element of the overlay. Ignored when undefined.
|
|
310
|
+
* @returns void
|
|
311
|
+
*/
|
|
312
|
+
private leaveTopLayer;
|
|
313
|
+
/**
|
|
314
|
+
* Moves an overlay back to the front of the top layer.
|
|
315
|
+
*
|
|
316
|
+
* The top layer is a stack ordered by promotion, so the only way to raise an element already
|
|
317
|
+
* in it is to take it out and put it back.
|
|
318
|
+
* @param el - The host element of the overlay. Ignored when undefined.
|
|
319
|
+
* @returns void
|
|
320
|
+
*/
|
|
321
|
+
private raiseTopLayer;
|
|
322
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellService, never>;
|
|
323
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
327
324
|
}
|
|
328
|
-
|
|
329
325
|
/**
|
|
330
326
|
* Shows the busy overlay only if the operation is still running after a debounce delay, so that
|
|
331
327
|
* an operation that answers in 30 ms never makes the screen flash.
|
|
@@ -333,24 +329,23 @@ declare class ShellService {
|
|
|
333
329
|
* Whoever creates one owns it: {@link clear} must be called when the operation ends, otherwise
|
|
334
330
|
* the overlay appears after the fact and stays.
|
|
335
331
|
*/
|
|
336
|
-
declare class BusyTimer {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
332
|
+
export declare class BusyTimer {
|
|
333
|
+
private readonly shellService;
|
|
334
|
+
private readonly subscription;
|
|
335
|
+
/**
|
|
336
|
+
* Arms the timer.
|
|
337
|
+
* @param shellService - The service that owns the overlay. A `DialogService` is accepted too,
|
|
338
|
+
* since it extends `ShellService`.
|
|
339
|
+
* @param due - Delay in milliseconds before the overlay appears. Defaults to `100`.
|
|
340
|
+
* @param message - Text to display. Defaults to `'Operazione in corso...'`.
|
|
341
|
+
*/
|
|
342
|
+
constructor(shellService: ShellService, due?: number, message?: string);
|
|
343
|
+
/**
|
|
344
|
+
* Disarms the timer and takes the overlay away.
|
|
345
|
+
* @returns void
|
|
346
|
+
*/
|
|
347
|
+
clear(): void;
|
|
352
348
|
}
|
|
353
|
-
|
|
354
349
|
/**
|
|
355
350
|
* The shell's message panel: a modal that looks like a Material dialog and owes nothing to
|
|
356
351
|
* Material.
|
|
@@ -365,100 +360,99 @@ declare class BusyTimer {
|
|
|
365
360
|
* Instantiated imperatively by {@link ShellService}, never declared in a template: that is
|
|
366
361
|
* what lets an interceptor open it.
|
|
367
362
|
*/
|
|
368
|
-
declare class ShellMessageComponent {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
export type { ShellBusyMode, ShellBusyType, ShellMessageData, ShellMessageRef };
|
|
363
|
+
export declare class ShellMessageComponent {
|
|
364
|
+
/** Emitted when the user dismisses the message, whichever way they did it. */
|
|
365
|
+
readonly closed: import("@angular/core").OutputEmitterRef<void>;
|
|
366
|
+
private readonly themeService;
|
|
367
|
+
private readonly panel;
|
|
368
|
+
private readonly okButton;
|
|
369
|
+
/** Unique id tying the panel to its heading for assistive technology. */
|
|
370
|
+
protected readonly titleId: string;
|
|
371
|
+
/** Unique id tying the details panel to the header that opens it. */
|
|
372
|
+
protected readonly detailsId: string;
|
|
373
|
+
/**
|
|
374
|
+
* Whether the technical details are open.
|
|
375
|
+
*
|
|
376
|
+
* Closed on arrival, and closed again by every {@link setData}: the message is what the user is
|
|
377
|
+
* meant to read, and a stack trace unfolded under it is noise until they ask for it.
|
|
378
|
+
*/
|
|
379
|
+
protected readonly detailsOpen: import("@angular/core").WritableSignal<boolean>;
|
|
380
|
+
/** Current content, with the defaults the shell relies on already applied. */
|
|
381
|
+
protected readonly data: import("@angular/core").WritableSignal<ShellMessageData>;
|
|
382
|
+
/** True for a moment after a successful copy, so the button can acknowledge it. */
|
|
383
|
+
protected readonly copied: import("@angular/core").WritableSignal<boolean>;
|
|
384
|
+
private dismissTimer?;
|
|
385
|
+
private copiedTimer?;
|
|
386
|
+
private closing;
|
|
387
|
+
/**
|
|
388
|
+
* True when the panel must paint itself dark.
|
|
389
|
+
*
|
|
390
|
+
* Read from {@link ThemeService} and not from `prefers-color-scheme`, because the two do not
|
|
391
|
+
* always agree: the service is what the user chose, and it may be forcing dark on a machine
|
|
392
|
+
* that is on light. Following the OS instead would leave this panel the only light thing on a
|
|
393
|
+
* dark screen.
|
|
394
|
+
*/
|
|
395
|
+
protected readonly dark: import("@angular/core").WritableSignal<boolean>;
|
|
396
|
+
/**
|
|
397
|
+
* Keeps {@link dark} in step with the service, now and at every later change.
|
|
398
|
+
*
|
|
399
|
+
* `'auto'` is resolved through `getTheme()`, which is the only thing that knows what the
|
|
400
|
+
* operating system is currently on.
|
|
401
|
+
* @returns void
|
|
402
|
+
*/
|
|
403
|
+
private followTheme;
|
|
404
|
+
constructor();
|
|
405
|
+
/**
|
|
406
|
+
* Replaces the content shown by the panel and restarts the auto-dismiss timer.
|
|
407
|
+
*
|
|
408
|
+
* Called on an already open panel by `ShellService.error()` so that a burst of failures
|
|
409
|
+
* updates one message instead of stacking modals nobody can dismiss.
|
|
410
|
+
* @param data - The new content to display.
|
|
411
|
+
* @returns void
|
|
412
|
+
*/
|
|
413
|
+
setData(data: ShellMessageData): void;
|
|
414
|
+
/**
|
|
415
|
+
* Opens or closes the technical details panel.
|
|
416
|
+
* @returns void
|
|
417
|
+
*/
|
|
418
|
+
protected toggleDetails(): void;
|
|
419
|
+
/**
|
|
420
|
+
* Dismisses the panel. Safe to call more than once: only the first call is announced.
|
|
421
|
+
* @returns void
|
|
422
|
+
*/
|
|
423
|
+
close(): void;
|
|
424
|
+
/**
|
|
425
|
+
* Closes the panel on Escape, mirroring a Material dialog opened with the default config.
|
|
426
|
+
* @param e - The keyboard event captured at document level.
|
|
427
|
+
* @returns void
|
|
428
|
+
*/
|
|
429
|
+
protected onKeydown(e: KeyboardEvent): void;
|
|
430
|
+
/**
|
|
431
|
+
* Keeps Tab inside the panel while the message is up.
|
|
432
|
+
*
|
|
433
|
+
* A hand-rolled two-element version of what `cdk/a11y` does, which is all this panel needs:
|
|
434
|
+
* it never holds more than the copy button and the dismiss button.
|
|
435
|
+
* @param e - The Tab keydown event.
|
|
436
|
+
* @returns void
|
|
437
|
+
*/
|
|
438
|
+
private trapFocus;
|
|
439
|
+
/**
|
|
440
|
+
* (Re)schedules the auto-dismiss timer, cancelling any pending one so a timer armed for an
|
|
441
|
+
* earlier message can never close a newer one.
|
|
442
|
+
* @param dismissAfter - Delay in milliseconds; no-op when falsy.
|
|
443
|
+
* @returns void
|
|
444
|
+
*/
|
|
445
|
+
private scheduleDismiss;
|
|
446
|
+
/**
|
|
447
|
+
* Copies the message and its details to the clipboard, as both HTML and plain text.
|
|
448
|
+
*
|
|
449
|
+
* Unlike `InfoDialogComponent` there is no toast to report the outcome — the shell has no
|
|
450
|
+
* toast — so the button itself acknowledges it for a moment.
|
|
451
|
+
* @returns A promise that resolves once the copy has been attempted.
|
|
452
|
+
*/
|
|
453
|
+
protected copy(): Promise<void>;
|
|
454
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellMessageComponent, never>;
|
|
455
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShellMessageComponent, "ars-shell-message", never, {}, {
|
|
456
|
+
"closed": "closed";
|
|
457
|
+
}, never, never, true, never>;
|
|
458
|
+
}
|