@arsedizioni/ars-utils 22.1.5 → 22.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +158 -10
  2. package/clipper.ui/clipper.scss +564 -0
  3. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +1 -1
  4. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +11 -7
  6. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +609 -0
  8. package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -0
  9. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +591 -0
  10. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -0
  11. package/fesm2022/arsedizioni-ars-utils-core.mjs +270 -1449
  12. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1 -1
  14. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +1 -1
  16. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +14 -4108
  18. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +962 -0
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -0
  21. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +506 -0
  22. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -0
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +450 -0
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -0
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +184 -0
  26. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -0
  27. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +825 -0
  28. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -0
  29. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +708 -0
  30. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -0
  31. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +426 -0
  32. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -0
  33. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +531 -0
  34. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -0
  35. package/fesm2022/arsedizioni-ars-utils-ui.mjs +54 -1227
  36. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  37. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1049 -0
  38. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -0
  39. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +263 -0
  40. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -0
  41. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +4 -3
  42. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  43. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +53 -0
  44. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -0
  45. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +517 -0
  46. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -0
  47. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +246 -0
  48. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -0
  49. package/fesm2022/arsedizioni-ars-utils.mjs +13 -12
  50. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  51. package/help/package.json +4 -0
  52. package/package.json +80 -14
  53. package/styles/ui.colors.scss +23 -0
  54. package/support.ui/package.json +4 -0
  55. package/tinymce/package.json +4 -0
  56. package/types/arsedizioni-ars-utils-clipper.common.d.ts +1 -2
  57. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +4 -1
  58. package/types/arsedizioni-ars-utils-core.d.ts +684 -1004
  59. package/types/arsedizioni-ars-utils-core.date.d.ts +304 -0
  60. package/types/arsedizioni-ars-utils-core.markdown.d.ts +159 -0
  61. package/types/arsedizioni-ars-utils-ui.application.d.ts +10 -2022
  62. package/types/arsedizioni-ars-utils-ui.controls.d.ts +413 -0
  63. package/types/arsedizioni-ars-utils-ui.d.ts +183 -566
  64. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +224 -0
  65. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +228 -0
  66. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +47 -0
  67. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +309 -0
  68. package/types/arsedizioni-ars-utils-ui.files.d.ts +271 -0
  69. package/types/arsedizioni-ars-utils-ui.filters.d.ts +163 -0
  70. package/types/arsedizioni-ars-utils-ui.help.d.ts +220 -0
  71. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +650 -0
  72. package/types/arsedizioni-ars-utils-ui.notifications.d.ts +73 -0
  73. package/types/arsedizioni-ars-utils-ui.paginator.d.ts +23 -0
  74. package/types/arsedizioni-ars-utils-ui.shell.d.ts +345 -0
  75. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +63 -0
  76. package/types/arsedizioni-ars-utils.d.ts +4 -10
  77. package/ui.tinymce/README.md +12 -0
  78. package/ui.tinymce/langs/it.js +466 -0
@@ -1,13 +1,8 @@
1
- import { MatPaginatorIntl } from '@angular/material/paginator';
1
+ import { Searchable, INode, DateInterval, SearchBag, NameValueItem } from '@arsedizioni/ars-utils/core';
2
+ import { MatFormFieldAppearance } from '@angular/material/form-field';
2
3
  import * as _angular_core from '@angular/core';
3
- import { ElementRef, TemplateRef, InjectionToken, Signal, Renderer2 } from '@angular/core';
4
- import { ComponentType } from '@angular/cdk/portal';
5
- import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
6
- import { MatSnackBarRef } from '@angular/material/snack-bar';
4
+ import { TemplateRef, InjectionToken, Signal, ElementRef, Renderer2 } from '@angular/core';
7
5
  import { Observable } from 'rxjs';
8
- import { MatFormFieldAppearance } from '@angular/material/form-field';
9
- import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
10
- import { PasswordStrength } from '@arsedizioni/ars-utils/core';
11
6
 
12
7
  interface DialogResult {
13
8
  result?: 'ok' | 'cancel' | 'other';
@@ -38,592 +33,214 @@ interface CredentialsDialogResult {
38
33
  code?: string;
39
34
  }
40
35
 
41
- /** Italian localisation for the Material paginator labels. */
42
- declare class PaginatorIntl extends MatPaginatorIntl {
43
- itemsPerPageLabel: string;
44
- nextPageLabel: string;
45
- previousPageLabel: string;
46
- lastPageLabel: string;
47
- firstPageLabel: string;
48
- /**
49
- * Returns the human-readable range label shown inside the paginator.
50
- * @param page - Zero-based index of the current page.
51
- * @param pageSize - Number of items displayed per page.
52
- * @param length - Total number of items, or `-1` when the total is still being calculated.
53
- * @returns A formatted string such as `"1 - 25 di 100"`.
54
- */
55
- getRangeLabel: (page: number, pageSize: number, length: number) => string;
56
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<PaginatorIntl, never>;
57
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<PaginatorIntl>;
36
+ interface SelectDialogResult {
37
+ selectedItems: SelectableItem[];
58
38
  }
59
-
60
- interface ConfirmDialogOption extends DialogOption {
39
+ interface SelectTreeDialogResult {
40
+ selectedItems: ItemNode[];
61
41
  }
62
- interface ConfirmDialogData {
63
- title?: string;
64
- message: string;
65
- okCaption?: string;
66
- cancelCaption?: string;
67
- otherCaption?: string;
68
- options?: ConfirmDialogOption[];
69
- details?: string;
42
+ interface SelectDialogLookup {
43
+ items: SelectableItem[];
44
+ filter?: string;
45
+ params?: any;
46
+ owner?: any;
70
47
  }
71
- declare class ConfirmDialogComponent {
72
- /** Emitted when the user makes a choice. Carries the selected result and any option state. */
73
- readonly choosen: _angular_core.OutputEmitterRef<DialogResult>;
74
- private readonly dialogRef;
75
- /** Dialog configuration, with sensible defaults applied at construction time. */
76
- protected readonly dialogData: _angular_core.WritableSignal<ConfirmDialogData>;
77
- constructor();
78
- /**
79
- * Confirms the dialog, emitting `'ok'` together with the current option selections.
80
- */
81
- ok(): void;
82
- /**
83
- * Cancels the dialog, emitting `'cancel'`.
84
- */
85
- cancel(): void;
86
- /**
87
- * Triggers the tertiary action, emitting `'other'`.
88
- */
89
- other(): void;
90
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
91
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialogComponent, "ng-component", never, {}, { "choosen": "choosen"; }, never, never, true, never>;
48
+ interface SelectDialogFilter {
49
+ items?: SelectableItem[];
50
+ filter?: string;
51
+ filterOption?: SelectableFilter;
52
+ owner?: any;
92
53
  }
93
-
94
- interface InfoDialogData {
95
- title?: string;
96
- message: string;
97
- details?: string;
98
- okCaption?: string;
99
- dismissAfter?: number;
100
- onNavigate?: (url: string) => void;
54
+ interface SelectDialogAppend {
55
+ items: SelectableItem[];
56
+ owner?: any;
101
57
  }
102
- declare class InfoDialogComponent {
103
- private readonly dialogService;
104
- private readonly dialogRef;
105
- private dismissTimer?;
106
- /** Dialog configuration with defaults applied at construction time. */
107
- protected readonly dialogData: _angular_core.WritableSignal<InfoDialogData>;
108
- constructor();
109
- /**
110
- * (Re)schedules the auto-dismiss timer, cancelling any pending one so that
111
- * an earlier (shorter) timer can never close a newer message.
112
- * @param dismissAfter - Delay in milliseconds; no-op when falsy.
113
- */
114
- private scheduleDismiss;
115
- /**
116
- * Replaces the dialog data at runtime (e.g. after an async operation resolves).
117
- * Also re-schedules the auto-dismiss timer if `dismissAfter` is set.
118
- * @param data - The new dialog data to display.
119
- */
120
- setData(data: InfoDialogData): void;
121
- /**
122
- * Invokes the optional navigation callback provided by the caller.
123
- * @param url - The URL to navigate to.
124
- */
125
- protected navigate(url: string): void;
126
- /**
127
- * Copy to clipboard
128
- */
129
- protected copy(): Promise<void>;
130
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<InfoDialogComponent, never>;
131
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<InfoDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
58
+ interface SelectDialogEdit extends SelectDialogAppend {
59
+ item: SelectableItem;
132
60
  }
133
-
134
- interface ToastData {
135
- message: string;
136
- icon?: string;
137
- actionCaption?: string;
61
+ interface SelectDialogDelete {
62
+ items: SelectableItem[];
63
+ selectedItems: SelectableItem[];
64
+ owner?: any;
138
65
  }
139
- declare class ToastComponent {
140
- /** Emitted when the user clicks the optional action button. */
141
- readonly action: _angular_core.OutputEmitterRef<void>;
142
- /** Snack-bar payload with a safe fallback to an empty message when no data is injected. */
143
- protected readonly dialogData: _angular_core.WritableSignal<ToastData>;
144
- /**
145
- * Emits the `action` event to notify the caller that the action button was clicked.
146
- */
147
- protected do(): void;
148
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastComponent, never>;
149
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastComponent, "ng-component", never, {}, { "action": "action"; }, never, never, true, never>;
66
+ interface SelectFileOption {
67
+ description: string;
68
+ value: boolean;
69
+ }
70
+ interface SelectFile {
71
+ file: File;
72
+ options?: SelectFileOption[];
73
+ }
74
+ interface SelectableFilter {
75
+ divider?: boolean;
76
+ description?: string;
77
+ group?: number;
78
+ groupName?: string;
79
+ radio?: boolean;
80
+ checked?: boolean;
81
+ value?: any;
82
+ icon?: string;
83
+ title?: string;
150
84
  }
151
-
152
- declare class UIService {
153
- /**
154
- * The default Material form-field appearance used across dialogs and forms.
155
- * Defaults to `'fill'`.
156
- */
157
- readonly appearance: _angular_core.WritableSignal<"fill" | "outline">;
158
- /**
159
- * Updates the global form-field appearance.
160
- * @param value - The new appearance value. Falls back to `'fill'` when `undefined` is passed.
161
- */
162
- setAppearance(value: 'fill' | 'outline' | undefined): void;
163
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<UIService, never>;
164
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<UIService>;
85
+ interface SelectDialogData {
86
+ title: string;
87
+ description?: string;
88
+ okCaption?: string;
89
+ maxItems?: number;
90
+ multipleSelection?: boolean;
91
+ mustSelect?: boolean;
92
+ width?: number;
93
+ filter?: string;
94
+ filters?: SelectableFilter[];
95
+ items?: SelectableItem[];
96
+ lookupFields?: NameValueItem<string>[];
97
+ lookupOnInit?: boolean;
98
+ emptyMessage?: string;
99
+ canLookupWithOptions?: boolean;
100
+ canLookupWithInlineOptions?: boolean;
101
+ canLookup?: boolean;
102
+ canDelete?: boolean;
103
+ canAppend?: boolean;
104
+ canEdit?: boolean;
105
+ canView?: boolean;
106
+ canFilter?: boolean;
107
+ canPaginate?: boolean;
108
+ pageSize?: number;
109
+ appearance?: MatFormFieldAppearance;
110
+ header?: string;
111
+ searchLabel?: string;
112
+ searchButtonLabel?: string;
165
113
  }
166
-
167
- declare enum DeleteDialogConfirmMode {
168
- None = 0,
169
- Simple = 1,
170
- Strong = 2
114
+ interface SelectTreeDialogData {
115
+ title: string;
116
+ description?: string;
117
+ okCaption?: string;
118
+ nodes?: ItemNode[];
119
+ initialFilter?: string;
120
+ appearance?: MatFormFieldAppearance;
121
+ owner?: any;
122
+ canAppend?: boolean;
171
123
  }
172
- interface DeleteDialogData {
173
- title?: string;
174
- message: string;
175
- confirmMode: DeleteDialogConfirmMode;
124
+ interface SelectFileDialogData {
125
+ title: string;
126
+ description?: string;
176
127
  okCaption?: string;
177
- cancelCaption?: string;
178
- details?: string;
128
+ helpLink?: string;
129
+ helpCaption?: string;
130
+ maxSize?: number;
131
+ options?: any;
132
+ owner?: any;
133
+ accept?: string;
179
134
  appearance?: MatFormFieldAppearance;
180
135
  }
181
- declare class DeleteDialogComponent {
182
- /** Emitted when the user makes a choice. Carries the selected result. */
183
- readonly choosen: _angular_core.OutputEmitterRef<DialogResult>;
184
- private readonly dialogRef;
185
- /** Dialog configuration with defaults applied at construction time. */
186
- protected readonly dialogData: _angular_core.WritableSignal<DeleteDialogData>;
187
- /**
188
- * Whether the user has confirmed the deletion.
189
- * Starts as `true` for all modes except `Simple`, which requires explicit checkbox confirmation.
190
- */
191
- protected readonly confirmed: _angular_core.WritableSignal<boolean>;
192
- /** Current value typed into the strong-confirmation text field. */
193
- protected confirmValue?: string;
194
- /**
195
- * Confirms the deletion, emitting `'ok'` and closing the dialog.
196
- */
197
- ok(): void;
198
- /**
199
- * Cancels the operation, emitting `'cancel'` and closing the dialog.
200
- */
201
- cancel(): void;
202
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeleteDialogComponent, never>;
203
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DeleteDialogComponent, "ng-component", never, {}, { "choosen": "choosen"; }, never, never, true, never>;
136
+ interface SelectPictureFileDialogData extends SelectFileDialogData {
137
+ maxWidth?: number;
138
+ maxHeight?: number;
204
139
  }
205
-
206
- interface IDialogService {
140
+ interface ISelectableItem extends Searchable {
141
+ bag: any;
142
+ template: string;
207
143
  }
208
- declare class BusyTimer {
209
- private readonly dialogService;
210
- private readonly subscription;
211
- constructor(dialogService: DialogService, due?: number, message?: string);
212
- /** Dispose object */
213
- clear(): void;
144
+ declare class SelectableItem implements ISelectableItem {
145
+ bag: any;
146
+ template: string;
147
+ /** Searchable index bag. */
148
+ searchBag: SearchBag;
214
149
  }
215
- declare class DialogService extends UIService {
216
- /**
217
- * Shares the SAME `appearance` signal instance as the root `UIService`:
218
- * `uiService.setAppearance('outline')` is immediately visible here and in
219
- * every dialog opened by this service.
220
- */
221
- readonly appearance: _angular_core.WritableSignal<"fill" | "outline">;
222
- private readonly dialog;
223
- private readonly overlay;
224
- private readonly snackBar;
225
- private readonly location;
226
- private busyDialogRef?;
227
- private busyComponentRef?;
228
- private clearBusyTimer?;
229
- private errorDialogRef?;
230
- private readonly popHistory;
231
- private popState;
232
- private poppingState;
233
- constructor();
234
- /**
235
- * Removes trailing `#` characters from the current URL (e.g. after a page reload).
236
- * @param resetPoppingState - When `true`, resets the internal popping-state flag.
237
- */
238
- clearUrl(resetPoppingState?: boolean): void;
239
- /**
240
- * Close all dialogs
241
- */
242
- closeAll(): void;
243
- /**
244
- * Opens a Material dialog. Returns `null` when not running in a browser.
245
- * @param component - The component to open as a dialog.
246
- * @param config - The dialog configuration.
247
- * @returns The dialog reference, or `null` outside the browser.
248
- */
249
- open<T>(component: ComponentType<T>, config: MatDialogConfig<unknown>): MatDialogRef<T> | null;
250
- /**
251
- * Internal helper that wraps `MatDialog.open`, subscribes to lifecycle hooks
252
- * and manages browser-history push/pop entries.
253
- * @param component - The component to open.
254
- * @param config - The dialog configuration.
255
- * @returns The dialog reference.
256
- */
257
- private openDialog;
258
- /**
259
- * Returns the element height including margins
260
- * @param element - element
261
- * @returns the height
262
- */
263
- private outerHeight;
264
- /**
265
- * Return current dialog height
266
- */
267
- getCurrentDialogHeight(): number;
268
- /**
269
- * Returns the scrollable content area height for the topmost open dialog.
270
- * @param fixedPartsClassName - CSS class names of fixed (non-scrollable) elements whose heights are subtracted.
271
- * @param minimalHeight - Minimum height floor to use when the dialog height is smaller.
272
- * @returns The computed scrollable height in pixels.
273
- */
274
- getCurrentDialogScrollableHeight(fixedPartsClassName: string[], minimalHeight: number): number;
275
- /**
276
- * Push a dialog into the browser history
277
- */
278
- private pushDialog;
279
- /**
280
- * Pop a dialog from the history
281
- */
282
- private popDialog;
283
- /**
284
- * Creates the CDK overlay used to host the busy indicator.
285
- * @returns The new `OverlayRef`.
286
- */
287
- private createBusy;
288
- /**
289
- * Clears the busy overlay after a short grace delay (lets very fast
290
- * operations avoid a visible flicker). The pending detach is cancelled by
291
- * any new `setBusy()` call, so it can never kill a freshly opened overlay.
292
- */
293
- clearBusy(): void;
294
- /**
295
- * Shows or updates the busy overlay.
296
- * @param message - Text to display inside the overlay.
297
- * @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.
298
- * @param progressMode - Progress bar mode. Defaults to `'indeterminate'`.
299
- * @param type - Visual style of the overlay. Defaults to `'bar'`.
300
- * @param action - Optional observable; the overlay is dismissed when it emits.
301
- * @returns `true` if a new overlay was created, `false` if an existing one was updated.
302
- */
303
- setBusy(message: string, progress?: number, progressMode?: 'determinate' | 'indeterminate', type?: 'bar' | 'spinner' | 'wait' | 'hourglass', action?: Observable<unknown>): boolean;
304
- /**
305
- * Shows or updates the busy overlay using the progress-bar style.
306
- * @param message - Text to display inside the overlay.
307
- * @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.
308
- * @param progressMode - Progress bar mode. Defaults to `'indeterminate'`.
309
- * @param action - Optional observable; the overlay is dismissed when it emits.
310
- * @returns `true` if a new overlay was created.
311
- */
312
- busy(message: string, progress?: number, progressMode?: 'determinate' | 'indeterminate', action?: Observable<unknown>): boolean;
313
- /**
314
- * Returns a `BusyTimer` that shows the busy overlay after a debounce delay.
315
- * @param message - Text to display. Defaults to `'Operazione in corso...'`.
316
- * @param due - Delay in milliseconds before the overlay appears. Defaults to `100`.
317
- * @returns A `BusyTimer` that must be disposed with `clear()` when the operation ends.
318
- */
319
- busyTimer(message?: string, due?: number): BusyTimer;
320
- /**
321
- * Shows or updates the busy overlay using the hourglass style.
322
- * @param message - Text to display inside the overlay.
323
- * @param action - Optional observable; the overlay is dismissed when it emits.
324
- * @returns `true` if a new overlay was created.
325
- */
326
- busyHourglass(message: string, action?: Observable<unknown>): boolean;
327
- /**
328
- * Shows or updates the busy overlay using the spinner style.
329
- * @param message - Text to display inside the overlay.
330
- * @param progress - Progress value (`-1` = indeterminate). Defaults to `-1`.
331
- * @param progressMode - Progress mode. Defaults to `'indeterminate'`.
332
- * @param action - Optional observable; the overlay is dismissed when it emits.
333
- * @returns `true` if a new overlay was created.
334
- */
335
- busySpinner(message: string, progress?: number, progressMode?: 'determinate' | 'indeterminate', action?: Observable<unknown>): boolean;
336
- /**
337
- * Shows a minimal wait spinner overlay.
338
- * @param action - Optional observable; the overlay is dismissed when it emits.
339
- * @returns `true` if a new overlay was created.
340
- */
341
- wait(action?: Observable<unknown>): boolean;
342
- /**
343
- * Opens an informational dialog.
344
- * @param message - HTML message to display.
345
- * @param title - Dialog title. Defaults to `'Informazioni'`.
346
- * @param okCaption - Confirmation button label. Defaults to `'Ok'`.
347
- * @param width - Maximum dialog width in pixels. Defaults to `500`.
348
- * @param dismissAfter - Auto-close delay in milliseconds (optional).
349
- * @param details - Optional secondary details text.
350
- * @param onNavigate - Optional navigation callback invoked when the user clicks a link.
351
- * @returns The dialog reference, or `null` outside the browser.
352
- */
353
- info(message: string, title?: string, okCaption?: string, width?: number, dismissAfter?: number, details?: string, onNavigate?: (url: string) => void): MatDialogRef<InfoDialogComponent> | null;
354
- /**
355
- * Opens an error dialog. If one is already open, its content is updated in place.
356
- * @param message - HTML error message to display.
357
- * @param log - Optional technical log / stack trace shown in the details panel.
358
- * @param title - Dialog title. Defaults to `'Errore'`.
359
- * @param okCaption - Confirmation button label. Defaults to `'Ok'`.
360
- * @param width - Maximum dialog width in pixels. Defaults to `500`.
361
- * @param dismissAfter - Auto-close delay in milliseconds (optional).
362
- * @returns The dialog reference, or `null` outside the browser.
363
- */
364
- error(message: string, log?: string, title?: string, okCaption?: string, width?: number, dismissAfter?: number): MatDialogRef<InfoDialogComponent> | null;
365
- /**
366
- * Shows a snack-bar toast notification.
367
- * @param message - HTML message to display.
368
- * @param duration - Visible duration in milliseconds. Defaults to `2000`.
369
- * @param icon - Material icon name shown beside the message. Defaults to `'check'`.
370
- * @param actionCaption - Optional label for the action button.
371
- * @returns The snack-bar reference.
372
- */
373
- toast(message: string, duration?: number, icon?: string, actionCaption?: string): MatSnackBarRef<ToastComponent>;
374
- /**
375
- * Opens a confirmation dialog.
376
- * @param message - HTML message to display.
377
- * @param title - Dialog title. Defaults to `'Conferma'`.
378
- * @param okCaption - Primary action button label. Defaults to `'Si'`.
379
- * @param cancelCaption - Cancel button label. Defaults to `'No'`.
380
- * @param otherCaption - Optional tertiary action button label.
381
- * @param options - Optional list of checkbox options shown to the user.
382
- * @param width - Maximum dialog width in pixels. Defaults to `500`.
383
- * @param details - Optional secondary details text.
384
- * @returns The dialog reference, or `null` outside the browser.
385
- */
386
- confirm(message: string, title?: string, okCaption?: string, cancelCaption?: string, otherCaption?: string, options?: ConfirmDialogOption[], width?: number, details?: string): MatDialogRef<ConfirmDialogComponent> | null;
150
+ declare class ItemNode implements INode {
151
+ id: string;
152
+ name: string;
153
+ count?: number;
154
+ parent?: INode;
155
+ children?: INode[];
156
+ bag?: any;
157
+ }
158
+ declare class SelectableNode extends ItemNode implements Searchable {
159
+ expandable: boolean;
160
+ level: number;
161
+ /** Searchable index bag. */
162
+ searchBag: SearchBag;
387
163
  /**
388
- * Opens a deletion-confirmation dialog.
389
- * @param message - HTML message to display.
390
- * @param title - Dialog title. Defaults to `'Attenzione'`.
391
- * @param confirmMode - Confirmation mode (none / checkbox / type-to-confirm). Defaults to `None`.
392
- * @param okCaption - Primary action button label. Defaults to `'Si'`.
393
- * @param cancelCaption - Cancel button label. Defaults to `'No'`.
394
- * @param width - Maximum dialog width in pixels. Defaults to `500`.
395
- * @param details - Optional secondary details text.
396
- * @returns The dialog reference, or `null` outside the browser.
164
+ * Create a flattened tree node from a source ItemNode.
165
+ * @param item - The source tree node.
166
+ * @param level - The depth level of this node in the tree.
397
167
  */
398
- delete(message: string, title?: string, confirmMode?: DeleteDialogConfirmMode, okCaption?: string, cancelCaption?: string, width?: number, details?: string): MatDialogRef<DeleteDialogComponent> | null;
399
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogService, never>;
400
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogService>;
168
+ constructor(item: ItemNode, level: number);
401
169
  }
402
-
403
170
  /**
404
- * Overlay dialog that blocks interaction while a background operation is in progress.
405
- * Supports four visual styles: progress bar, spinner, hourglass, and wait icon.
171
+ * Minimal contract exposed by the send-to dialog to its host.
172
+ * Declared here (and not on the component) so that `ui` never depends on
173
+ * `ui.dialogs.select`, which would create a circular entry point dependency.
406
174
  */
407
- declare class BusyDialogComponent {
408
- /** Visual style of the busy indicator. */
409
- readonly type: _angular_core.WritableSignal<"bar" | "spinner" | "wait" | "hourglass">;
410
- /** Current progress value (0–100). Used when `progressMode` is `'determinate'`. */
411
- readonly progress: _angular_core.WritableSignal<number>;
412
- /** Progress mode passed to the Material progress components. */
413
- readonly progressMode: _angular_core.WritableSignal<"determinate" | "indeterminate">;
414
- /** Message displayed above the progress indicator. */
415
- readonly message: _angular_core.WritableSignal<string>;
416
- /**
417
- * Updates the busy dialog state.
418
- * @param message - New message to display. Ignored when empty, preserving the previous text.
419
- * @param progress - Current progress value (0–100). A value > 0 forces `'determinate'` mode.
420
- * @param progressMode - Progress bar/spinner mode (default: `'indeterminate'`).
421
- * @param type - Visual style to use (default: `'bar'`).
422
- */
423
- set(message: string, progress: number, progressMode?: 'determinate' | 'indeterminate', type?: 'bar' | 'spinner' | 'wait' | 'hourglass'): void;
424
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BusyDialogComponent, never>;
425
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BusyDialogComponent, "ng-component", never, {}, {}, never, never, true, never>;
426
- }
427
-
428
- interface CredentialsDialogData {
429
- title?: string;
430
- message?: string;
431
- remember?: boolean;
432
- recoverPassword?: boolean;
433
- recoverPasswordUrl?: string;
434
- user?: string;
175
+ interface ISendToDialog {
176
+ /**
177
+ * Replaces the recipient list shown in the dialog.
178
+ * @param recipients - The semicolon separated recipient list.
179
+ */
180
+ updateRecipients(recipients: string): void;
181
+ }
182
+ interface SendToPopulateData {
183
+ item: SendToDialogResult;
184
+ source: ISendToDialog;
185
+ }
186
+ interface SendToDialogResult {
187
+ recipients?: string;
188
+ subject?: string;
189
+ text?: string;
190
+ options?: any;
191
+ }
192
+ interface PromptDialogResult {
193
+ value?: string;
194
+ type?: PromptDialogType;
195
+ options?: any;
196
+ }
197
+ interface PromptDateDialogResult {
198
+ value?: Date | DateInterval;
199
+ type?: PromptDialogType;
200
+ options?: any;
201
+ }
202
+ interface PromptOtpDialogResult {
203
+ value?: string;
204
+ }
205
+ declare enum PromptDialogType {
206
+ Default = 0,
207
+ Date = 1,
208
+ Number = 2,
209
+ Text = 3,
210
+ DateInterval = 4,
211
+ List = 5,
212
+ Time = 6
213
+ }
214
+ interface PromptDialogData {
215
+ title: string;
216
+ type: PromptDialogType;
217
+ description?: string;
435
218
  okCaption?: string;
436
- mode?: 'email' | 'user' | 'otp';
437
- appearance?: MatFormFieldAppearance;
438
- }
439
- declare class CredentialsDialogComponent {
440
- /** Emitted when the user submits the form. Carries the entered credentials. */
441
- readonly done: _angular_core.OutputEmitterRef<CredentialsDialogResult>;
442
- /** Emitted when the user requests a password-recovery flow. */
443
- readonly recoveringPassword: _angular_core.OutputEmitterRef<CredentialsDialogResult>;
444
- /** Dialog configuration with defaults applied at construction time. */
445
- protected readonly dialogData: _angular_core.WritableSignal<CredentialsDialogData>;
446
- /** Current form model, pre-filled with the user name from dialog data when provided. */
447
- protected item: CredentialsDialogResult;
448
- /** Whether the password field is currently shown as plain text. */
449
- protected readonly showPassword: _angular_core.WritableSignal<boolean>;
450
- /**
451
- * Switches the input mode of the dialog at runtime (e.g. from login to OTP).
452
- * Intended to be called from outside via the dialog component reference.
453
- * @param mode - The new input mode (`'email'`, `'user'`, or `'otp'`).
454
- * @param message - Optional new message to display above the form.
455
- */
456
- changeMode(mode: 'email' | 'user' | 'otp', message?: string): void;
457
- /**
458
- * Emits the current form result and closes the dialog.
459
- */
460
- protected ok(): void;
461
- /**
462
- * Emits the current form result for the password-recovery flow and optionally
463
- * opens the recovery URL in a new tab.
464
- */
465
- protected recoverPassword(): void;
466
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CredentialsDialogComponent, never>;
467
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CredentialsDialogComponent, "ng-component", never, {}, { "done": "done"; "recoveringPassword": "recoveringPassword"; }, never, never, true, never>;
468
- }
469
-
470
- interface RecoverPasswordDialogData {
471
- appearance?: MatFormFieldAppearance;
472
- }
473
- declare class RecoverPasswordDialogComponent {
474
- /** Emitted when the user submits the recovery request. Carries the entered email and recaptcha state. */
475
- readonly done: _angular_core.OutputEmitterRef<RecoverPasswordDialogResult>;
476
- /** Dialog configuration with defaults applied at construction time. */
477
- protected readonly dialogData: _angular_core.WritableSignal<RecoverPasswordDialogData>;
478
- /** Current form model bound to the template inputs. */
479
- protected item: RecoverPasswordDialogResult;
480
- /**
481
- * Emits the current form result to trigger the password-recovery flow.
482
- */
483
- protected ok(): void;
484
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RecoverPasswordDialogComponent, never>;
485
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RecoverPasswordDialogComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
486
- }
487
-
488
- type ResetPasswordDialogMode = 'admin' | 'old' | 'otp' | 'forgot';
489
- interface ResetPasswordDialogData {
490
- mode: ResetPasswordDialogMode;
491
- userId?: number;
492
- userEmail?: string;
219
+ cancelCaption?: string;
220
+ initialValue?: any;
221
+ minValue?: number;
222
+ maxValue?: number;
223
+ required?: boolean;
493
224
  appearance?: MatFormFieldAppearance;
225
+ options?: any;
494
226
  }
495
- declare class ResetPasswordDialogComponent {
496
- /** Emitted when the user submits the new password. Carries the entered password data. */
497
- readonly done: _angular_core.OutputEmitterRef<ResetPasswordDialogResult>;
498
- private readonly dialogService;
499
- private readonly dialogRef;
500
- /** Dialog configuration with defaults applied at construction time. */
501
- protected readonly dialogData: _angular_core.WritableSignal<ResetPasswordDialogData>;
502
- /** Current form model bound to the template inputs. */
503
- protected item: ResetPasswordDialogResult;
504
- /** Whether the old-password field is currently shown as plain text. */
505
- protected readonly showOldPassword: _angular_core.WritableSignal<boolean>;
506
- /** Whether the new-password field is currently shown as plain text. */
507
- protected readonly showPassword: _angular_core.WritableSignal<boolean>;
508
- /** Whether the confirm-password field is currently shown as plain text. */
509
- protected readonly showPassword2: _angular_core.WritableSignal<boolean>;
510
- constructor();
511
- /**
512
- * Emits the current form result to trigger the password-reset flow.
513
- */
514
- protected ok(): void;
515
- /**
516
- * Generates a random password and populates both password fields with it.
517
- */
518
- protected generatePassword(): void;
519
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResetPasswordDialogComponent, never>;
520
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ResetPasswordDialogComponent, "ng-component", never, {}, { "done": "done"; }, never, never, true, never>;
521
- }
522
-
523
- declare class OtpInputComponent implements ControlValueAccessor, Validator {
524
- /** Signal-based query for all individual OTP digit input elements. */
525
- readonly otpFields: _angular_core.Signal<readonly ElementRef<HTMLInputElement>[]>;
526
- /** `true` when every digit slot contains a valid single decimal digit. */
527
- readonly isValid: _angular_core.Signal<boolean>;
528
- /** Array of per-digit values backing the OTP display. */
529
- readonly otpArray: _angular_core.WritableSignal<string[]>;
530
- /** Whether the control is currently disabled. */
531
- readonly disabled: _angular_core.WritableSignal<boolean>;
532
- private onChange;
533
- private onTouched;
534
- /**
535
- * Writes a new value into the control from the model.
536
- * @param value - A string of up to 6 digits to pre-fill the OTP fields.
537
- */
538
- writeValue(value: string): void;
539
- /**
540
- * Registers the callback invoked when the control value changes.
541
- * @param fn - The callback function.
542
- */
543
- registerOnChange(fn: (val: string) => void): void;
544
- /**
545
- * Registers the callback invoked when the control is touched.
546
- * @param fn - The callback function.
547
- */
548
- registerOnTouched(fn: () => void): void;
549
- /**
550
- * Enables or disables the control.
551
- * @param isDisabled - `true` to disable all OTP inputs.
552
- */
553
- setDisabledState(isDisabled: boolean): void;
554
- /**
555
- * Validates the OTP value: an empty code is left to `required`, while a
556
- * PARTIAL code (e.g. "12") is reported as invalid. Without this, the joined
557
- * value "12" was a non-empty string and `required` let the form submit
558
- * with an incomplete OTP.
559
- * @param control - The form control bound to this component.
560
- * @returns `null` when empty or complete (6 digits), `{ otp: true }` otherwise.
561
- */
562
- validate(control: AbstractControl): ValidationErrors | null;
563
- /**
564
- * Marks the control as touched when an OTP field loses focus.
565
- */
566
- onBlur(): void;
567
- /**
568
- * Blocks non-digit characters before they are inserted.
569
- * @param event - The `beforeinput` event from the input element.
570
- */
571
- onBeforeInput(event: InputEvent): void;
572
- /**
573
- * Handles digit input, sanitizes it, syncs the DOM, updates the OTP array, and advances focus.
574
- * @param event - The `input` event from the digit field.
575
- * @param index - Zero-based index of the field that received input.
576
- */
577
- onInput(event: Event, index: number): void;
578
- /**
579
- * Handles the Backspace key by moving focus to the previous field when the current one is empty.
580
- * @param event - The `keydown` event.
581
- * @param index - Zero-based index of the field that received the keydown.
582
- */
583
- onKeyDown(event: KeyboardEvent, index: number): void;
584
- /**
585
- * Handles paste events by extracting up to 6 digits and distributing them across the OTP fields.
586
- * @param event - The `ClipboardEvent` from the paste action.
587
- */
588
- onPaste(event: ClipboardEvent): void;
589
- /**
590
- * Clears every digit field, propagates the empty value to the form model and
591
- * moves focus back to the first field. Does not mark the control as touched,
592
- * so no validation error is shown right after the reset.
593
- */
594
- clear(): void;
595
- /**
596
- * Moves focus to the OTP field at the given index.
597
- * @param index - Zero-based index of the target field.
598
- */
599
- private focusField;
600
- /**
601
- * Notifies the form model of the current OTP value and marks the control as touched.
602
- */
603
- private updateModel;
604
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<OtpInputComponent, never>;
605
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<OtpInputComponent, "otp-input", never, {}, {}, never, never, true, never>;
227
+ interface PromptTimeDialogData extends PromptDialogData {
228
+ slots?: string;
606
229
  }
607
230
 
608
- /**
609
- * Displays a password-strength indicator for the provided password string.
610
- * Uses `SystemUtils.calculatePasswordStrength` to derive the score and label.
611
- */
612
- declare class PasswordStrengthComponent {
613
- /** The password to evaluate. An empty string renders the default (score 0) state. */
614
- readonly password: _angular_core.InputSignal<string>;
231
+ declare class UIService {
615
232
  /**
616
- * Computed strength result for the current password.
617
- * Falls back to `DEFAULT_STRENGTH` when the password is empty.
233
+ * The default Material form-field appearance used across dialogs and forms.
234
+ * Defaults to `'fill'`.
618
235
  */
619
- protected readonly strength: _angular_core.Signal<PasswordStrength>;
236
+ readonly appearance: _angular_core.WritableSignal<"fill" | "outline">;
620
237
  /**
621
- * CSS class applied to the label element based on the numeric score (1–6 bands).
622
- * Scores ≤ 2 → `'score-2'`, ≤ 3 → `'score-3'`, etc.
238
+ * Updates the global form-field appearance.
239
+ * @param value - The new appearance value. Falls back to `'fill'` when `undefined` is passed.
623
240
  */
624
- protected readonly scoreClass: _angular_core.Signal<string>;
625
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<PasswordStrengthComponent, never>;
626
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<PasswordStrengthComponent, "password-strength", never, { "password": { "alias": "password"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
241
+ setAppearance(value: 'fill' | 'outline' | undefined): void;
242
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UIService, never>;
243
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<UIService>;
627
244
  }
628
245
 
629
246
  declare class IfBpDirective {
@@ -1292,5 +909,5 @@ declare class FlexLayoutModule {
1292
909
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<FlexLayoutModule>;
1293
910
  }
1294
911
 
1295
- export { ALIAS_FAMILIES, BS5_BREAKPOINTS, BusyDialogComponent, BusyTimer, CANONICAL_ALIASES, ConfirmDialogComponent, CredentialsDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, FlexLayoutModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, InfoDialogComponent, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, OtpInputComponent, PaginatorIntl, PasswordStrengthComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent, ResponsiveBaseDirective, ToastComponent, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
1296
- export type { BpValues, BreakpointAlias, CanonicalKey, ConfirmDialogData, ConfirmDialogOption, CredentialsDialogData, CredentialsDialogResult, DeleteDialogData, DialogOption, DialogResult, IDialogService, InfoDialogData, NcValues, NonCanonicalKey, RecoverPasswordDialogData, RecoverPasswordDialogResult, ResetPasswordDialogData, ResetPasswordDialogMode, ResetPasswordDialogResult, ToastData };
912
+ export { ALIAS_FAMILIES, BS5_BREAKPOINTS, CANONICAL_ALIASES, FlexLayoutModule, FxClassDirective, FxFlexAlignDirective, FxFlexDirective, FxFlexFillDirective, FxFlexOffsetDirective, FxFlexOrderDirective, FxGridAreaDirective, FxGridColumnDirective, FxGridDirective, FxLayoutAlignDirective, FxLayoutDirective, FxLayoutGapDirective, FxLayoutWrapDirective, FxShowHideDirective, FxStyleDirective, IfBpDirective, ItemNode, LAYOUT_BREAKPOINTS, LAYOUT_VALUES, MediaObserver, NON_CANONICAL_PRIORITY, PromptDialogType, ResponsiveBaseDirective, SelectableItem, SelectableNode, UIService, applyVisibility, buildAlignStyles, buildFlexStyles, buildLayoutCSS, resolve, resolveAll, resolveFlexInput, resolveNonCanonical, resolveParentFlow, validateBasis, validateLayoutValue, validateWrapValue };
913
+ export type { BpValues, BreakpointAlias, CanonicalKey, CredentialsDialogResult, DialogOption, DialogResult, ISelectableItem, ISendToDialog, NcValues, NonCanonicalKey, PromptDateDialogResult, PromptDialogData, PromptDialogResult, PromptOtpDialogResult, PromptTimeDialogData, RecoverPasswordDialogResult, ResetPasswordDialogResult, SelectDialogAppend, SelectDialogData, SelectDialogDelete, SelectDialogEdit, SelectDialogFilter, SelectDialogLookup, SelectDialogResult, SelectFile, SelectFileDialogData, SelectFileOption, SelectPictureFileDialogData, SelectTreeDialogData, SelectTreeDialogResult, SelectableFilter, SendToDialogResult, SendToPopulateData };