@arsedizioni/ars-utils 22.6.86 → 22.6.88

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