@arsedizioni/ars-utils 22.6.85 → 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,187 +1,184 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, PipeTransform, OnDestroy, Signal } from '@angular/core';
3
- import { SelectionModel } from '@angular/cdk/collections';
4
- import { Locale } from 'date-fns';
5
- import { SafeHtml, SafeResourceUrl } from '@angular/platform-browser';
6
- import { Observable } from 'rxjs';
7
-
8
- interface INode {
9
- id: string;
10
- name: string;
11
- count?: number;
12
- children?: INode[];
13
- subFolders?: INode[];
14
- parent?: INode;
15
- level?: number;
16
- bag?: unknown;
1
+ import * as i0 from "@angular/core";
2
+ import { EventEmitter, OnDestroy, PipeTransform, Signal } from "@angular/core";
3
+ import { SelectionModel } from "@angular/cdk/collections";
4
+ import { Locale } from "date-fns";
5
+ import { SafeHtml, SafeResourceUrl } from "@angular/platform-browser";
6
+ import { Observable } from "rxjs";
7
+ export interface INode {
8
+ id: string;
9
+ name: string;
10
+ count?: number;
11
+ children?: INode[];
12
+ subFolders?: INode[];
13
+ parent?: INode;
14
+ level?: number;
15
+ bag?: unknown;
17
16
  }
18
- interface DoneResult<T> {
19
- isNew?: boolean;
20
- data?: T;
17
+ export interface DoneResult<T> {
18
+ isNew?: boolean;
19
+ data?: T;
21
20
  }
22
- interface ApiResponse {
23
- success: boolean;
24
- message: string;
21
+ export interface ApiResponse {
22
+ success: boolean;
23
+ message: string;
25
24
  }
26
- interface ApiResult<T> extends ApiResponse {
27
- value: T;
25
+ export interface ApiResult<T> extends ApiResponse {
26
+ value: T;
28
27
  }
29
- interface Folder extends INode {
30
- teamId?: string;
31
- parentId?: string;
32
- position?: number;
33
- isPrivate?: boolean;
34
- itemsCount?: number;
35
- subItemsCount?: number;
28
+ export interface Folder extends INode {
29
+ teamId?: string;
30
+ parentId?: string;
31
+ position?: number;
32
+ isPrivate?: boolean;
33
+ itemsCount?: number;
34
+ subItemsCount?: number;
36
35
  }
37
- interface FolderTree extends Folder {
38
- children?: Folder[];
39
- path?: string;
36
+ export interface FolderTree extends Folder {
37
+ children?: Folder[];
38
+ path?: string;
40
39
  }
41
- interface File<T> {
42
- ownerId?: T;
43
- id?: number;
44
- fileName: string;
45
- fileData: unknown;
40
+ export interface File<T> {
41
+ ownerId?: T;
42
+ id?: number;
43
+ fileName: string;
44
+ fileData: unknown;
46
45
  }
47
- interface Validated {
48
- isValid(): boolean;
46
+ export interface Validated {
47
+ isValid(): boolean;
49
48
  }
50
- declare class FileInfo implements Validated {
51
- file: any;
52
- valid: boolean;
53
- isValid(): boolean;
49
+ export declare class FileInfo implements Validated {
50
+ file: any;
51
+ valid: boolean;
52
+ isValid(): boolean;
54
53
  }
55
- interface ErrorInfo {
56
- invalidateSession?: boolean;
57
- title?: string;
58
- message?: string;
59
- errorStatus?: number;
60
- service?: string;
54
+ export interface ErrorInfo {
55
+ invalidateSession?: boolean;
56
+ title?: string;
57
+ message?: string;
58
+ errorStatus?: number;
59
+ service?: string;
61
60
  }
62
- interface NameValueItem<T> {
63
- name: string;
64
- value: T;
65
- shortName?: string;
66
- parentName?: string;
67
- parentValue?: T;
68
- header?: string;
69
- bag?: any;
70
- bagInfo?: string;
71
- disabled?: boolean;
72
- selected?: boolean;
61
+ export interface NameValueItem<T> {
62
+ name: string;
63
+ value: T;
64
+ shortName?: string;
65
+ parentName?: string;
66
+ parentValue?: T;
67
+ header?: string;
68
+ bag?: any;
69
+ bagInfo?: string;
70
+ disabled?: boolean;
71
+ selected?: boolean;
73
72
  }
74
- interface Checkable {
75
- checked?: boolean;
76
- bag: unknown;
77
- getId(): unknown;
73
+ export interface Checkable {
74
+ checked?: boolean;
75
+ bag: unknown;
76
+ getId(): unknown;
78
77
  }
79
- declare class ValueModel<T> {
80
- value: T;
78
+ export declare class ValueModel<T> {
79
+ value: T;
81
80
  }
82
- declare class IDModel<T = number> {
83
- id: T;
81
+ export declare class IDModel<T = number> {
82
+ id: T;
84
83
  }
85
- declare class GroupModel<T = number> {
86
- ids: T[];
84
+ export declare class GroupModel<T = number> {
85
+ ids: T[];
87
86
  }
88
- declare class DeleteModel<T = number> extends GroupModel<T> {
89
- mode?: number;
90
- parentId?: T;
87
+ export declare class DeleteModel<T = number> extends GroupModel<T> {
88
+ mode?: number;
89
+ parentId?: T;
91
90
  }
92
- interface DeleteResultModel<T> {
93
- items?: T[];
94
- deleted: number;
95
- total: number;
96
- log?: string;
91
+ export interface DeleteResultModel<T> {
92
+ items?: T[];
93
+ deleted: number;
94
+ total: number;
95
+ log?: string;
97
96
  }
98
- declare class RelationModel<T = number> {
99
- id: T;
100
- parentId: T;
97
+ export declare class RelationModel<T = number> {
98
+ id: T;
99
+ parentId: T;
101
100
  }
102
- declare class UpdateRelationsModel<T = number> {
103
- id: T;
104
- relatedIds: T[];
101
+ export declare class UpdateRelationsModel<T = number> {
102
+ id: T;
103
+ relatedIds: T[];
105
104
  }
106
105
  /** Identifies the external identity provider used for an OAuth login. */
107
- declare enum LoginOAuthType {
108
- None = 0,
109
- Microsoft = 1,
110
- Google = 2
106
+ export declare enum LoginOAuthType {
107
+ None = 0,
108
+ Microsoft = 1,
109
+ Google = 2
111
110
  }
112
111
  /** Payload emitted by the OAuth login components once the provider returned a token. */
113
- interface LoginOAuthResult {
114
- type: LoginOAuthType;
115
- token: string;
112
+ export interface LoginOAuthResult {
113
+ type: LoginOAuthType;
114
+ token: string;
116
115
  }
117
- declare class QueryModel {
118
- any?: string;
119
- sortBy?: string;
120
- sortDescending?: boolean;
121
- first?: number;
122
- count?: number;
116
+ export declare class QueryModel {
117
+ any?: string;
118
+ sortBy?: string;
119
+ sortDescending?: boolean;
120
+ first?: number;
121
+ count?: number;
123
122
  }
124
- interface QueryResultModel<T> {
125
- interval?: string;
126
- items: T[];
127
- total: number;
123
+ export interface QueryResultModel<T> {
124
+ interval?: string;
125
+ items: T[];
126
+ total: number;
128
127
  }
129
- interface UpdateModel<T = number> {
130
- parentId?: T;
131
- ids: T[];
128
+ export interface UpdateModel<T = number> {
129
+ parentId?: T;
130
+ ids: T[];
132
131
  }
133
- interface UpdateResultModel<T> {
134
- items?: T[];
135
- updated: number;
136
- total: number;
137
- log?: string;
132
+ export interface UpdateResultModel<T> {
133
+ items?: T[];
134
+ updated: number;
135
+ total: number;
136
+ log?: string;
138
137
  }
139
- interface AddModel<T> extends UpdateModel<T> {
138
+ export interface AddModel<T> extends UpdateModel<T> {}
139
+ export interface AddResultModel<T> {
140
+ items?: T[];
141
+ added: number;
142
+ total: number;
143
+ log?: string;
140
144
  }
141
- interface AddResultModel<T> {
142
- items?: T[];
143
- added: number;
144
- total: number;
145
- log?: string;
145
+ export declare class ImportModel {
146
+ origin: string;
147
+ dataFile: FileInfo;
148
+ jumpFirstLine?: boolean;
149
+ map?: unknown;
146
150
  }
147
- declare class ImportModel {
148
- origin: string;
149
- dataFile: FileInfo;
150
- jumpFirstLine?: boolean;
151
- map?: unknown;
151
+ export interface EnableDisableModel {
152
+ value: boolean;
152
153
  }
153
- interface EnableDisableModel {
154
- value: boolean;
154
+ export interface SendToModel {
155
+ sendToRecipients?: string;
156
+ sendToSubject?: string;
157
+ sendToText?: string;
155
158
  }
156
- interface SendToModel {
157
- sendToRecipients?: string;
158
- sendToSubject?: string;
159
- sendToText?: string;
159
+ export interface SearchBag {
160
+ name: string;
160
161
  }
161
- interface SearchBag {
162
- name: string;
162
+ export interface Searchable {
163
+ searchBag: SearchBag;
163
164
  }
164
- interface Searchable {
165
- searchBag: SearchBag;
165
+ export interface SearchFilterMetadata {
166
+ total: number;
167
+ count: number;
166
168
  }
167
- interface SearchFilterMetadata {
168
- total: number;
169
- count: number;
169
+ export declare class DateInterval {
170
+ from?: Date;
171
+ to?: Date;
172
+ get fromAsDate(): Date | undefined;
173
+ get toAsDate(): Date | undefined;
174
+ constructor(from?: Date, to?: Date);
175
+ clear(): void;
170
176
  }
171
- declare class DateInterval {
172
- from?: Date;
173
- to?: Date;
174
- get fromAsDate(): Date | undefined;
175
- get toAsDate(): Date | undefined;
176
- constructor(from?: Date, to?: Date);
177
- clear(): void;
177
+ export interface LoginResult<T> extends ApiResult<boolean> {
178
+ context?: T;
179
+ oauth?: number;
180
+ requiresMfa?: boolean;
178
181
  }
179
- interface LoginResult<T> extends ApiResult<boolean> {
180
- context?: T;
181
- oauth?: number;
182
- requiresMfa?: boolean;
183
- }
184
-
185
182
  /**
186
183
  * Conversions between the objects the API speaks (DTOs) and the models a signal form works with.
187
184
  *
@@ -245,71 +242,78 @@ interface LoginResult<T> extends ApiResult<boolean> {
245
242
  * `string` (which is what `''` widens to) narrows to `string`. That is the reason a date field is
246
243
  * `Date | null` and never `Date | string`: the latter could not be narrowed at all.
247
244
  */
248
- type Dto<TModel> = {
249
- [K in keyof TModel]: Exclude<TModel[K], '' | null>;
250
- };
245
+ export type Dto<TModel> = { [K in keyof TModel]: Exclude<TModel[K], '' | null>; };
251
246
  /** The two conversions between an API DTO and the model a signal form works with. */
252
- declare class DtoUtils {
253
- /**
254
- * Builds a form model from the object returned by the API.
255
- *
256
- * The shape of the result is decided by `empty`, never by the DTO: every key of `empty` is in
257
- * the result, taken from the DTO when it carries a usable value and left at its empty value
258
- * otherwise. A DTO field that is absent and one that is explicitly `null` are treated the same,
259
- * because both mean "the record has no value here" and the form wants its empty value for both.
260
- *
261
- * Keys that exist only in the model (a multi-select decomposed from a bitmask, a checkbox
262
- * extracted from a flags value) simply keep their empty value: fill them in around the call.
263
- *
264
- * @param empty - The neutral model: it declares every field the form owns, and the value each
265
- * one takes when the DTO does not carry it.
266
- * @param dto - The object coming from the API, or `undefined` when creating a new record.
267
- * @returns A new model, never the same reference as `empty` nor as `dto`.
268
- */
269
- static toForm<TModel extends object>(empty: TModel, dto?: Partial<TModel> | null): TModel;
270
- /**
271
- * Builds the payload for the API from the current form model.
272
- *
273
- * Every empty value — `''`, `null` or `undefined` — is dropped, so a field the user never filled
274
- * in travels as absent instead of reaching the backend as an empty string that would blank the
275
- * record. `0` and `false` are NOT empty: an amount of zero and a switch left off are data, and a
276
- * filter that wants an unticked box to mean "no filter" has to say so where it builds its query.
277
- *
278
- * The conversion is shallow: nested objects and arrays are passed through as they are, so a
279
- * composite field (a bitmask to rebuild, a nested block to normalize) is handled around the call
280
- * — usually by destructuring it out of the model first.
281
- *
282
- * The return type is {@link Dto}, the model without its empty values, so what the compiler sees
283
- * matches what travels: a `coachLevel: CoachLevel | null` field arrives as `CoachLevel` and fits
284
- * the optional `coachLevel?: CoachLevel` of the API model. At runtime the empty keys are simply
285
- * not there, which is what `HttpClient` serializes anyway.
286
- *
287
- * @param model - The current form model.
288
- * @returns A shallow copy without the empty fields.
289
- */
290
- static toPayload<TModel extends object>(model: TModel): Dto<TModel>;
247
+ export declare class DtoUtils {
248
+ /**
249
+ * Builds a form model from the object returned by the API.
250
+ *
251
+ * The shape of the result is decided by `empty`, never by the DTO: every key of `empty` is in
252
+ * the result, taken from the DTO when it carries a usable value and left at its empty value
253
+ * otherwise. A DTO field that is absent and one that is explicitly `null` are treated the same,
254
+ * because both mean "the record has no value here" and the form wants its empty value for both.
255
+ *
256
+ * Keys that exist only in the model (a multi-select decomposed from a bitmask, a checkbox
257
+ * extracted from a flags value) simply keep their empty value: fill them in around the call.
258
+ *
259
+ * @param empty - The neutral model: it declares every field the form owns, and the value each
260
+ * one takes when the DTO does not carry it.
261
+ * @param dto - The object coming from the API, or `undefined` when creating a new record.
262
+ * @returns A new model, never the same reference as `empty` nor as `dto`.
263
+ */
264
+ static toForm<TModel extends object>(empty: TModel, dto?: Partial<TModel> | null): TModel;
265
+ /**
266
+ * Builds the payload for the API from the current form model.
267
+ *
268
+ * Every empty value — `''`, `null` or `undefined` — is dropped, so a field the user never filled
269
+ * in travels as absent instead of reaching the backend as an empty string that would blank the
270
+ * record. `0` and `false` are NOT empty: an amount of zero and a switch left off are data, and a
271
+ * filter that wants an unticked box to mean "no filter" has to say so where it builds its query.
272
+ *
273
+ * The conversion is shallow: nested objects and arrays are passed through as they are, so a
274
+ * composite field (a bitmask to rebuild, a nested block to normalize) is handled around the call
275
+ * — usually by destructuring it out of the model first.
276
+ *
277
+ * The return type is {@link Dto}, the model without its empty values, so what the compiler sees
278
+ * matches what travels: a `coachLevel: CoachLevel | null` field arrives as `CoachLevel` and fits
279
+ * the optional `coachLevel?: CoachLevel` of the API model. At runtime the empty keys are simply
280
+ * not there, which is what `HttpClient` serializes anyway.
281
+ *
282
+ * @param model - The current form model.
283
+ * @returns A shallow copy without the empty fields.
284
+ */
285
+ static toPayload<TModel extends object>(model: TModel): Dto<TModel>;
291
286
  }
292
-
293
- declare const UtilsMessages: {
294
- /**
295
- * Messages
296
- */
297
- UTILS_DIALOGS_SELECT_OPTIONS_CHANGED: string;
287
+ export declare const UtilsMessages: {
288
+ /**
289
+ * Messages
290
+ */
291
+ UTILS_DIALOGS_SELECT_OPTIONS_CHANGED: string;
298
292
  };
299
-
300
- declare enum DateFormat {
301
- Short = 1,// dd/mm/yyyy
302
- Long = 2,// d mmmm yyyy
303
- LongWithShortMonth = 3,// d mmm yyyy
304
- LongWithWeekDay = 4,// wwww, d mmmm yyyy
305
- LongWithShortWeekDay = 5,// www, d mmmm yyyy
306
- MonthAndYear = 6,// mmm yyyy
307
- LongMonthAndYear = 7,// mmmm yyyy
308
- WeekDay = 8,// www d
309
- LongWeekDay = 9,// wwww d
310
- DayAndMonth = 10,// d mmmm
311
- ShortUS = 11,// mm/dd/yyyy
312
- ShortISO8601 = 12
293
+ export declare enum DateFormat {
294
+ Short = 1 // dd/mm/yyyy
295
+ ,
296
+ Long = 2 // d mmmm yyyy
297
+ ,
298
+ LongWithShortMonth = 3 // d mmm yyyy
299
+ ,
300
+ LongWithWeekDay = 4 // wwww, d mmmm yyyy
301
+ ,
302
+ LongWithShortWeekDay = 5 // www, d mmmm yyyy
303
+ ,
304
+ MonthAndYear = 6 // mmm yyyy
305
+ ,
306
+ LongMonthAndYear = 7 // mmmm yyyy
307
+ ,
308
+ WeekDay = 8 // www d
309
+ ,
310
+ LongWeekDay = 9 // wwww d
311
+ ,
312
+ DayAndMonth = 10 // d mmmm
313
+ ,
314
+ ShortUS = 11 // mm/dd/yyyy
315
+ ,
316
+ ShortISO8601 = 12
313
317
  }
314
318
  /**
315
319
  * Key selector with IDE autocomplete and compile-time checking.
@@ -319,396 +323,395 @@ declare enum DateFormat {
319
323
  * branch), so existing callers that pass dynamic or untyped keys keep
320
324
  * compiling unchanged.
321
325
  */
322
- type KeyOf<T> = Extract<keyof T, string> | (string & {});
323
- interface PasswordStrength {
324
- score: number;
325
- label?: string;
326
- color?: string;
327
- suggestions?: string[];
328
- isValid: boolean;
326
+ export type KeyOf<T> = Extract<keyof T, string> | (string & {});
327
+ export interface PasswordStrength {
328
+ score: number;
329
+ label?: string;
330
+ color?: string;
331
+ suggestions?: string[];
332
+ isValid: boolean;
329
333
  }
330
- declare class SystemUtils {
331
- /** Shared collator for locale-aware, case-insensitive string comparison. */
332
- private static readonly collator;
333
- /**
334
- * Array find by key
335
- * @param array : the array to scan
336
- * @param key : key name
337
- * @param value : the value to search for
338
- * @returns : the property value or null
339
- */
340
- static arrayFindByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): T | undefined;
341
- /**
342
- * Array find index by key
343
- * @param array : the array to scan
344
- * @param key : the key name
345
- * @param value : the value to search for
346
- * @returns : the array index or -1 if not found
347
- */
348
- static arrayFindIndexByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): number;
349
- /**
350
- * Get a value from and array made of name|value items
351
- * @param array : the array to scan
352
- * @param value : the value to search for
353
- * @returns : the property value or null if not found
354
- */
355
- static arrayGetValue<T>(array: T[] | undefined, value: unknown): unknown;
356
- /**
357
- * Convert items to nodes into a tree structure
358
- * @param items : list of nodes
359
- * @param parent : parent node
360
- * @returns : an array of INode objects
361
- */
362
- static arrayToNodes(items: INode[], parent?: INode): INode[];
363
- /**
364
- * Comparator factory for sorting arrays of objects by a given property key.
365
- * Pass the element type for compile-time key checking:
366
- * `items.sort(SystemUtils.arraySortCompare<Employee>('lastName'))`.
367
- * @param key - Name of the property to sort by (autocompleted from `T` when provided).
368
- * @param order - Sort direction: `'asc'` (default) or `'desc'`.
369
- * @returns A comparator function that returns a negative, zero, or positive number.
370
- */
371
- static arraySortCompare<T extends object = Record<string, unknown>>(key: KeyOf<T>, order?: 'asc' | 'desc' | (string & {})): (a: T, b: T) => number;
372
- /**
373
- * Format weight
374
- * @param gr : grams
375
- * @returns : the formatted string
376
- */
377
- static formatWeight(gr: number): string;
378
- /**
379
- * Format file size
380
- * @param bytes : number of bytes
381
- * @returns : the formatted string
382
- */
383
- static formatFileSize(bytes: number): string;
384
- /**
385
- * Compare two strings (case-insensitive, locale-aware, accent-insensitive).
386
- * @param a : string a
387
- * @param b : string b
388
- * @returns : 0 if equals, 1 if bigger, -1 if lower
389
- */
390
- static compareString(a?: string, b?: string): number;
391
- /**
392
- * Capitalize a string
393
- * @param s : the string to capitalize
394
- * @returns : the capitalized string
395
- */
396
- static capitalize(s?: string): string | undefined;
397
- /**
398
- * Truncate a string at the last word boundary before `max`.
399
- * @param s : the string to truncate
400
- * @param max : the max number of chars
401
- * @returns : the truncated string
402
- */
403
- static truncate(s?: string, max?: number): string | undefined;
404
- /**
405
- * Join a list of strings
406
- * @param items : the list of strings
407
- * @param sep : the separator string
408
- * @param max : the maximum resulting string
409
- * @returns : the joined string
410
- */
411
- static join(items?: string[], sep?: string, max?: number): string | undefined;
412
- /**
413
- * Normalize a string by converting it to lowercase and removing extra spaces, with special handling for acronyms and camelCase.
414
- * @param s : the string to normalize
415
- * @returns : The normalized string, or `undefined` if the input is falsy.
416
- */
417
- static normalizeDisplay(s?: string): string | undefined;
418
- /**
419
- * Wraps bare URLs in the given string with `<a>` anchor tags.
420
- * @param s - The plain-text or HTML string to process.
421
- * @returns The string with URLs replaced by clickable links, or `''` when `s` is falsy.
422
- */
423
- static replaceAsHtml(s?: string): string;
424
- /**
425
- * Compare two names
426
- * @param a : name a
427
- * @param b : name b
428
- * @returns : true if a equals b
429
- */
430
- static compareNames(a?: string, b?: string): boolean;
431
- /**
432
- * Obfuscate a text with a key-driven code point rotation.
433
- *
434
- * @deprecated This is OBFUSCATION, not cryptography: it hides values from
435
- * casual inspection but offers no real security. Use {@link encrypt} /
436
- * {@link decrypt} (AES-GCM via Web Crypto) for anything sensitive.
437
- *
438
- * The rotation operates on Unicode code points and skips the surrogate
439
- * range, so the output is always a well-formed string: emoji and other
440
- * astral characters round-trip correctly (the previous code-unit based
441
- * version could emit lone surrogates and corrupt them).
442
- *
443
- * BREAKING CHANGE: values encoded with the previous code-unit algorithm
444
- * cannot be decoded by this implementation.
445
- *
446
- * @param text : the text to encode or decode
447
- * @param key : the key
448
- * @param reverse : true to decode, false to encode
449
- * @returns : the obfuscated (or restored) text, or undefined when text/key are empty
450
- */
451
- static cipher(text: string, key: string, reverse?: boolean): string | undefined;
452
- /** Payload format version, first byte of the binary envelope. */
453
- private static readonly CIPHER_VERSION;
454
- /** PBKDF2 salt length in bytes. */
455
- private static readonly CIPHER_SALT_LENGTH;
456
- /** AES-GCM IV length in bytes (96 bit, the recommended size for GCM). */
457
- private static readonly CIPHER_IV_LENGTH;
458
- /** PBKDF2-HMAC-SHA-256 iterations (OWASP recommendation). */
459
- private static readonly CIPHER_ITERATIONS;
460
- /**
461
- * Derives an AES-GCM 256-bit key from a password using PBKDF2-HMAC-SHA-256.
462
- * @param password : the user password / passphrase
463
- * @param salt : the random salt bound to this payload
464
- * @returns : a non-extractable AES-GCM CryptoKey
465
- */
466
- private static deriveKey;
467
- /**
468
- * Encodes bytes as URL-safe Base64 (no '+', '/' or trailing '=').
469
- * @param bytes : the bytes to encode
470
- * @returns : the base64url string
471
- */
472
- private static toBase64Url;
473
- /**
474
- * Decodes a URL-safe Base64 string back to bytes.
475
- * @param value : the base64url string
476
- * @returns : the decoded bytes
477
- */
478
- private static fromBase64Url;
479
- /**
480
- * Encrypts a text with a password using AES-GCM (256 bit) and a key derived
481
- * via PBKDF2-HMAC-SHA-256 with a random per-message salt.
482
- *
483
- * The result is a self-contained, URL-safe Base64 payload:
484
- * `version (1 byte) | salt (16 bytes) | iv (12 bytes) | ciphertext+tag`.
485
- * GCM is authenticated: any tampering makes {@link decrypt} fail.
486
- *
487
- * Requires a secure context (HTTPS or localhost) for `crypto.subtle`.
488
- *
489
- * @param text : the plain text to encrypt
490
- * @param password : the password / passphrase
491
- * @returns : the base64url payload, or undefined when text/password are
492
- * empty or the Web Crypto API is unavailable
493
- */
494
- static encrypt(text: string, password: string): Promise<string | undefined>;
495
- /**
496
- * Decrypts a payload produced by {@link encrypt}.
497
- * Returns undefined when the password is wrong, the payload was tampered
498
- * with, the format is unknown, or the Web Crypto API is unavailable.
499
- *
500
- * @param payload : the base64url payload returned by {@link encrypt}
501
- * @param password : the password / passphrase used to encrypt
502
- * @returns : the original plain text, or undefined on any failure
503
- */
504
- static decrypt(payload: string, password: string): Promise<string | undefined>;
505
- /**
506
- * Clone an object (deep copy).
507
- * Uses native structuredClone: handles Date, Map, Set, typed arrays and circular references.
508
- * @param obj : the object to clone
509
- * @returns : a new object
510
- */
511
- static clone<T>(obj: T): T;
512
- /**
513
- * Creates a deep clone of an object.
514
- * @param obj - The source object to clone.
515
- * @param dest - Optional pre-allocated destination object to merge the clone into.
516
- * @returns A deep copy of `obj`.
517
- */
518
- static deepClone<T extends object>(obj: T, dest?: T): T;
519
- /**
520
- * Returns `true` when `value` is a syntactically valid UUID string.
521
- * @param value - The string to validate.
522
- */
523
- static parseUUID(value?: string): boolean;
524
- /**
525
- * Returns `true` when `value` is a valid, non-empty (non-zero) UUID.
526
- * @param value - The string to validate.
527
- */
528
- static parseUUIDNotEmpty(value?: string): boolean;
529
- /**
530
- * Return an empty UUID
531
- * @returns : the empty UUID
532
- */
533
- static emptyUUID(): string;
534
- /**
535
- * Create a new UUID
536
- * @returns : the string UUID
537
- */
538
- static generateUUID(): string;
539
- /**
540
- * Reconstruct a standard UUID (with dashes) from a 32-char hex string without dashes.
541
- * @param value : 32-character hex string
542
- * @returns : the formatted UUID or the original string if it doesn't match the expected format
543
- */
544
- static inflateUUID(value: string): string;
545
- /** Precompiled validation patterns. */
546
- private static readonly emailRegex;
547
- private static readonly urlRegex;
548
- /**
549
- * Parse a text and return true if it is a valid email (or empty)
550
- * @param value : email
551
- * @returns : true if the email is valid or empty
552
- */
553
- static parseEmail(value?: string): boolean;
554
- /**
555
- * Parse a text containing one or more email addresses separated by `;` or `,`
556
- * and return true if all of them are valid (or the text is empty).
557
- * Empty items caused by double or trailing separators are ignored.
558
- * @param value : the email list to parse (e.g. "a@b.it; c@d.it")
559
- * @returns : true if all emails are valid or the value is empty
560
- */
561
- static parseEmails(value?: string): boolean;
562
- /**
563
- * Parse a text and return true if it is a valid url (or empty)
564
- * @param value : the url to parse
565
- * @returns : true if the url is valid or empty
566
- */
567
- static parseUrl(value?: string): boolean;
568
- /**
569
- * Get date parts from a string value
570
- * @param value : the string to parse
571
- * @returns : an array of numbers with year, month, day
572
- */
573
- static getDateParts(value?: string): number[] | undefined;
574
- /**
575
- * Checks whether a value is a valid Date instance.
576
- * Note: do not use `date.getTime()` as a truthiness test, it is 0 (falsy)
577
- * for the Unix epoch (1970-01-01T00:00:00Z) even though the date is valid.
578
- * @param d : the value to check
579
- * @returns : true when `d` is a Date representing a valid point in time
580
- */
581
- static isValidDate(d: unknown): d is Date;
582
- /**
583
- * Parse a date
584
- * @param value : the value to check
585
- * @param locale : the locale to use
586
- * @returns : a valid Date object or undefined
587
- */
588
- static parseDate(value?: string | Date, locale?: Locale): Date | undefined;
589
- /**
590
- * Converts a Date, timestamp or ISO string into a Europe/Rome Date whose JSON serialisation
591
- * emits a naive local datetime string ("yyyy-MM-dd'T'HH:mm:ss"), with no timezone designator,
592
- * so the wall-clock value round-trips to the server unchanged. Use this instead of `new Date(...)`
593
- * when reviving dates received from the API, to stay consistent with the DateFnsAdapter (values
594
- * entered through the datepicker already behave this way).
595
- * @param value : the source Date, Unix timestamp (ms) or ISO string
596
- * @returns : a Europe/Rome Date serialising as naive local time, or undefined for empty/invalid input
597
- */
598
- static toLocalDate(value?: Date | number | string): Date | undefined;
599
- /**
600
- * Format a date
601
- * @param value : the date or string to format
602
- * @param fmt : the DateFormat to use or the string pattern
603
- * @param locale : the locale to use (default is IT)
604
- * @returns : the formatted string
605
- */
606
- static formatDate(value?: Date | string, fmt?: DateFormat | string, locale?: Locale): string;
607
- /**
608
- * Update a DateInterval object according to a string
609
- * @param value : string value
610
- * @param interval : DateInterval value to update
611
- * @param end : true if must be updated the first or the end value
612
- * @param copy : copy the same value (works only if not end element)
613
- */
614
- static changeDateInterval(value: string, interval: DateInterval, end?: boolean, copy?: boolean): void;
615
- /** Cache of `Intl.NumberFormat` instances (their construction is expensive). */
616
- private static readonly numberFormatCache;
617
- /**
618
- * Returns a cached `Intl.NumberFormat` for the given options, creating it on first use.
619
- * @param locale - BCP 47 locale tag.
620
- * @param options - The `Intl.NumberFormat` options.
621
- * @returns A shared formatter instance.
622
- */
623
- private static getNumberFormat;
624
- /**
625
- * Formats a number using a cached `Intl.NumberFormat`.
626
- * @param value - The number to format.
627
- * @param decimals - Maximum decimal places (default: `2`).
628
- * @param locale - BCP 47 locale tag (default: `'it-IT'`).
629
- * @returns The formatted number string.
630
- */
631
- static formatNumber(value: number, decimals?: number, locale?: string): string;
632
- /**
633
- * Formats a number as a currency string using a cached `Intl.NumberFormat`.
634
- * @param value - The number to format.
635
- * @param currency - ISO 4217 currency code (default: `'EUR'`).
636
- * @param decimals - Maximum decimal places (default: `2`).
637
- * @param locale - BCP 47 locale tag (default: `'it-IT'`).
638
- * @returns The formatted currency string.
639
- */
640
- static formatCurrency(value: number, currency?: string, decimals?: number, locale?: string): string;
641
- /**
642
- * Percent-encodes a string for safe inclusion in a URL.
643
- * @param value - The string to encode.
644
- * @returns The encoded string, or `undefined` when `value` is empty.
645
- */
646
- static urlEncode(value: string): string | undefined;
647
- /**
648
- * Decodes a percent-encoded URL string, treating `+` as a space.
649
- * @param value - The encoded string to decode.
650
- * @returns The decoded string, or `undefined` when `value` is empty or absent.
651
- */
652
- static urlDecode(value?: string): string | undefined;
653
- /**
654
- * Reads a query string parameter value from the current page URL.
655
- * @param name - The parameter name to look up.
656
- * @returns The decoded parameter value, or `undefined` when absent or running server-side.
657
- */
658
- static getQueryStringValueByName(name: string): string | undefined;
659
- /**
660
- * Generate a password
661
- * @returns : the password string
662
- */
663
- static generatePassword(length?: number): string;
664
- /**
665
- * Calculate password strength
666
- * @param password: the password to evaluate
667
- * @returns the password strength info
668
- */
669
- static calculatePasswordStrength(password?: string): PasswordStrength;
670
- /**
671
- * Check if current browser supports touch
672
- * @returns : true if the display is touchable
673
- */
674
- static isTouchable(): boolean;
675
- /**
676
- * This check will prevent 'window' logic to be executed
677
- * while executing the server rendering
678
- * @returns : true if using the browser
679
- */
680
- static isBrowser(): boolean;
681
- /**
682
- * Convert folders in a tree of Node object.
683
- * @param folders : the subfolders group or null to root
684
- * @returns : a node list
685
- */
686
- static toNodes(folders: INode[]): INode[];
687
- /**
688
- * Convert folders in a tree of Node object.
689
- * @param folders : the children group or null to root
690
- * @param parent : the parent node
691
- * @returns : a node list
692
- */
693
- private static _toNodes;
694
- /**
695
- * Returns an array of individual power-of-2 flag values that are set in `value`.
696
- * @param value - The bitmask to decompose.
697
- * @param max - Upper-bound exponent: checks flags from `1` up to `1 << max` (default: `30`).
698
- * @returns Array of set flag values, or an empty array when `value` is `0`.
699
- */
700
- static getFlags(value: number, max?: number): number[];
701
- /** Cache for resolved color luminance results. */
702
- private static readonly colorLightCache;
703
- /**
704
- * Check if a color is light or dark
705
- * @param color : the color
706
- * @param minimumLuminance : the lumimance to consider
707
- * @returns true if the color is light
708
- */
709
- static isColorLight(color: string, minimumLuminance?: number): boolean;
334
+ export declare class SystemUtils {
335
+ /** Shared collator for locale-aware, case-insensitive string comparison. */
336
+ private static readonly collator;
337
+ /**
338
+ * Array find by key
339
+ * @param array : the array to scan
340
+ * @param key : key name
341
+ * @param value : the value to search for
342
+ * @returns : the property value or null
343
+ */
344
+ static arrayFindByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): T | undefined;
345
+ /**
346
+ * Array find index by key
347
+ * @param array : the array to scan
348
+ * @param key : the key name
349
+ * @param value : the value to search for
350
+ * @returns : the array index or -1 if not found
351
+ */
352
+ static arrayFindIndexByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): number;
353
+ /**
354
+ * Get a value from and array made of name|value items
355
+ * @param array : the array to scan
356
+ * @param value : the value to search for
357
+ * @returns : the property value or null if not found
358
+ */
359
+ static arrayGetValue<T>(array: T[] | undefined, value: unknown): unknown;
360
+ /**
361
+ * Convert items to nodes into a tree structure
362
+ * @param items : list of nodes
363
+ * @param parent : parent node
364
+ * @returns : an array of INode objects
365
+ */
366
+ static arrayToNodes(items: INode[], parent?: INode): INode[];
367
+ /**
368
+ * Comparator factory for sorting arrays of objects by a given property key.
369
+ * Pass the element type for compile-time key checking:
370
+ * `items.sort(SystemUtils.arraySortCompare<Employee>('lastName'))`.
371
+ * @param key - Name of the property to sort by (autocompleted from `T` when provided).
372
+ * @param order - Sort direction: `'asc'` (default) or `'desc'`.
373
+ * @returns A comparator function that returns a negative, zero, or positive number.
374
+ */
375
+ static arraySortCompare<T extends object = Record<string, unknown>>(key: KeyOf<T>, order?: 'asc' | 'desc' | (string & {})): (a: T, b: T) => number;
376
+ /**
377
+ * Format weight
378
+ * @param gr : grams
379
+ * @returns : the formatted string
380
+ */
381
+ static formatWeight(gr: number): string;
382
+ /**
383
+ * Format file size
384
+ * @param bytes : number of bytes
385
+ * @returns : the formatted string
386
+ */
387
+ static formatFileSize(bytes: number): string;
388
+ /**
389
+ * Compare two strings (case-insensitive, locale-aware, accent-insensitive).
390
+ * @param a : string a
391
+ * @param b : string b
392
+ * @returns : 0 if equals, 1 if bigger, -1 if lower
393
+ */
394
+ static compareString(a?: string, b?: string): number;
395
+ /**
396
+ * Capitalize a string
397
+ * @param s : the string to capitalize
398
+ * @returns : the capitalized string
399
+ */
400
+ static capitalize(s?: string): string | undefined;
401
+ /**
402
+ * Truncate a string at the last word boundary before `max`.
403
+ * @param s : the string to truncate
404
+ * @param max : the max number of chars
405
+ * @returns : the truncated string
406
+ */
407
+ static truncate(s?: string, max?: number): string | undefined;
408
+ /**
409
+ * Join a list of strings
410
+ * @param items : the list of strings
411
+ * @param sep : the separator string
412
+ * @param max : the maximum resulting string
413
+ * @returns : the joined string
414
+ */
415
+ static join(items?: string[], sep?: string, max?: number): string | undefined;
416
+ /**
417
+ * Normalize a string by converting it to lowercase and removing extra spaces, with special handling for acronyms and camelCase.
418
+ * @param s : the string to normalize
419
+ * @returns : The normalized string, or `undefined` if the input is falsy.
420
+ */
421
+ static normalizeDisplay(s?: string): string | undefined;
422
+ /**
423
+ * Wraps bare URLs in the given string with `<a>` anchor tags.
424
+ * @param s - The plain-text or HTML string to process.
425
+ * @returns The string with URLs replaced by clickable links, or `''` when `s` is falsy.
426
+ */
427
+ static replaceAsHtml(s?: string): string;
428
+ /**
429
+ * Compare two names
430
+ * @param a : name a
431
+ * @param b : name b
432
+ * @returns : true if a equals b
433
+ */
434
+ static compareNames(a?: string, b?: string): boolean;
435
+ /**
436
+ * Obfuscate a text with a key-driven code point rotation.
437
+ *
438
+ * @deprecated This is OBFUSCATION, not cryptography: it hides values from
439
+ * casual inspection but offers no real security. Use {@link encrypt} /
440
+ * {@link decrypt} (AES-GCM via Web Crypto) for anything sensitive.
441
+ *
442
+ * The rotation operates on Unicode code points and skips the surrogate
443
+ * range, so the output is always a well-formed string: emoji and other
444
+ * astral characters round-trip correctly (the previous code-unit based
445
+ * version could emit lone surrogates and corrupt them).
446
+ *
447
+ * BREAKING CHANGE: values encoded with the previous code-unit algorithm
448
+ * cannot be decoded by this implementation.
449
+ *
450
+ * @param text : the text to encode or decode
451
+ * @param key : the key
452
+ * @param reverse : true to decode, false to encode
453
+ * @returns : the obfuscated (or restored) text, or undefined when text/key are empty
454
+ */
455
+ static cipher(text: string, key: string, reverse?: boolean): string | undefined;
456
+ /** Payload format version, first byte of the binary envelope. */
457
+ private static readonly CIPHER_VERSION;
458
+ /** PBKDF2 salt length in bytes. */
459
+ private static readonly CIPHER_SALT_LENGTH;
460
+ /** AES-GCM IV length in bytes (96 bit, the recommended size for GCM). */
461
+ private static readonly CIPHER_IV_LENGTH;
462
+ /** PBKDF2-HMAC-SHA-256 iterations (OWASP recommendation). */
463
+ private static readonly CIPHER_ITERATIONS;
464
+ /**
465
+ * Derives an AES-GCM 256-bit key from a password using PBKDF2-HMAC-SHA-256.
466
+ * @param password : the user password / passphrase
467
+ * @param salt : the random salt bound to this payload
468
+ * @returns : a non-extractable AES-GCM CryptoKey
469
+ */
470
+ private static deriveKey;
471
+ /**
472
+ * Encodes bytes as URL-safe Base64 (no '+', '/' or trailing '=').
473
+ * @param bytes : the bytes to encode
474
+ * @returns : the base64url string
475
+ */
476
+ private static toBase64Url;
477
+ /**
478
+ * Decodes a URL-safe Base64 string back to bytes.
479
+ * @param value : the base64url string
480
+ * @returns : the decoded bytes
481
+ */
482
+ private static fromBase64Url;
483
+ /**
484
+ * Encrypts a text with a password using AES-GCM (256 bit) and a key derived
485
+ * via PBKDF2-HMAC-SHA-256 with a random per-message salt.
486
+ *
487
+ * The result is a self-contained, URL-safe Base64 payload:
488
+ * `version (1 byte) | salt (16 bytes) | iv (12 bytes) | ciphertext+tag`.
489
+ * GCM is authenticated: any tampering makes {@link decrypt} fail.
490
+ *
491
+ * Requires a secure context (HTTPS or localhost) for `crypto.subtle`.
492
+ *
493
+ * @param text : the plain text to encrypt
494
+ * @param password : the password / passphrase
495
+ * @returns : the base64url payload, or undefined when text/password are
496
+ * empty or the Web Crypto API is unavailable
497
+ */
498
+ static encrypt(text: string, password: string): Promise<string | undefined>;
499
+ /**
500
+ * Decrypts a payload produced by {@link encrypt}.
501
+ * Returns undefined when the password is wrong, the payload was tampered
502
+ * with, the format is unknown, or the Web Crypto API is unavailable.
503
+ *
504
+ * @param payload : the base64url payload returned by {@link encrypt}
505
+ * @param password : the password / passphrase used to encrypt
506
+ * @returns : the original plain text, or undefined on any failure
507
+ */
508
+ static decrypt(payload: string, password: string): Promise<string | undefined>;
509
+ /**
510
+ * Clone an object (deep copy).
511
+ * Uses native structuredClone: handles Date, Map, Set, typed arrays and circular references.
512
+ * @param obj : the object to clone
513
+ * @returns : a new object
514
+ */
515
+ static clone<T>(obj: T): T;
516
+ /**
517
+ * Creates a deep clone of an object.
518
+ * @param obj - The source object to clone.
519
+ * @param dest - Optional pre-allocated destination object to merge the clone into.
520
+ * @returns A deep copy of `obj`.
521
+ */
522
+ static deepClone<T extends object>(obj: T, dest?: T): T;
523
+ /**
524
+ * Returns `true` when `value` is a syntactically valid UUID string.
525
+ * @param value - The string to validate.
526
+ */
527
+ static parseUUID(value?: string): boolean;
528
+ /**
529
+ * Returns `true` when `value` is a valid, non-empty (non-zero) UUID.
530
+ * @param value - The string to validate.
531
+ */
532
+ static parseUUIDNotEmpty(value?: string): boolean;
533
+ /**
534
+ * Return an empty UUID
535
+ * @returns : the empty UUID
536
+ */
537
+ static emptyUUID(): string;
538
+ /**
539
+ * Create a new UUID
540
+ * @returns : the string UUID
541
+ */
542
+ static generateUUID(): string;
543
+ /**
544
+ * Reconstruct a standard UUID (with dashes) from a 32-char hex string without dashes.
545
+ * @param value : 32-character hex string
546
+ * @returns : the formatted UUID or the original string if it doesn't match the expected format
547
+ */
548
+ static inflateUUID(value: string): string;
549
+ /** Precompiled validation patterns. */
550
+ private static readonly emailRegex;
551
+ private static readonly urlRegex;
552
+ /**
553
+ * Parse a text and return true if it is a valid email (or empty)
554
+ * @param value : email
555
+ * @returns : true if the email is valid or empty
556
+ */
557
+ static parseEmail(value?: string): boolean;
558
+ /**
559
+ * Parse a text containing one or more email addresses separated by `;` or `,`
560
+ * and return true if all of them are valid (or the text is empty).
561
+ * Empty items caused by double or trailing separators are ignored.
562
+ * @param value : the email list to parse (e.g. "a@b.it; c@d.it")
563
+ * @returns : true if all emails are valid or the value is empty
564
+ */
565
+ static parseEmails(value?: string): boolean;
566
+ /**
567
+ * Parse a text and return true if it is a valid url (or empty)
568
+ * @param value : the url to parse
569
+ * @returns : true if the url is valid or empty
570
+ */
571
+ static parseUrl(value?: string): boolean;
572
+ /**
573
+ * Get date parts from a string value
574
+ * @param value : the string to parse
575
+ * @returns : an array of numbers with year, month, day
576
+ */
577
+ static getDateParts(value?: string): number[] | undefined;
578
+ /**
579
+ * Checks whether a value is a valid Date instance.
580
+ * Note: do not use `date.getTime()` as a truthiness test, it is 0 (falsy)
581
+ * for the Unix epoch (1970-01-01T00:00:00Z) even though the date is valid.
582
+ * @param d : the value to check
583
+ * @returns : true when `d` is a Date representing a valid point in time
584
+ */
585
+ static isValidDate(d: unknown): d is Date;
586
+ /**
587
+ * Parse a date
588
+ * @param value : the value to check
589
+ * @param locale : the locale to use
590
+ * @returns : a valid Date object or undefined
591
+ */
592
+ static parseDate(value?: string | Date, locale?: Locale): Date | undefined;
593
+ /**
594
+ * Converts a Date, timestamp or ISO string into a Europe/Rome Date whose JSON serialisation
595
+ * emits a naive local datetime string ("yyyy-MM-dd'T'HH:mm:ss"), with no timezone designator,
596
+ * so the wall-clock value round-trips to the server unchanged. Use this instead of `new Date(...)`
597
+ * when reviving dates received from the API, to stay consistent with the DateFnsAdapter (values
598
+ * entered through the datepicker already behave this way).
599
+ * @param value : the source Date, Unix timestamp (ms) or ISO string
600
+ * @returns : a Europe/Rome Date serialising as naive local time, or undefined for empty/invalid input
601
+ */
602
+ static toLocalDate(value?: Date | number | string): Date | undefined;
603
+ /**
604
+ * Format a date
605
+ * @param value : the date or string to format
606
+ * @param fmt : the DateFormat to use or the string pattern
607
+ * @param locale : the locale to use (default is IT)
608
+ * @returns : the formatted string
609
+ */
610
+ static formatDate(value?: Date | string, fmt?: DateFormat | string, locale?: Locale): string;
611
+ /**
612
+ * Update a DateInterval object according to a string
613
+ * @param value : string value
614
+ * @param interval : DateInterval value to update
615
+ * @param end : true if must be updated the first or the end value
616
+ * @param copy : copy the same value (works only if not end element)
617
+ */
618
+ static changeDateInterval(value: string, interval: DateInterval, end?: boolean, copy?: boolean): void;
619
+ /** Cache of `Intl.NumberFormat` instances (their construction is expensive). */
620
+ private static readonly numberFormatCache;
621
+ /**
622
+ * Returns a cached `Intl.NumberFormat` for the given options, creating it on first use.
623
+ * @param locale - BCP 47 locale tag.
624
+ * @param options - The `Intl.NumberFormat` options.
625
+ * @returns A shared formatter instance.
626
+ */
627
+ private static getNumberFormat;
628
+ /**
629
+ * Formats a number using a cached `Intl.NumberFormat`.
630
+ * @param value - The number to format.
631
+ * @param decimals - Maximum decimal places (default: `2`).
632
+ * @param locale - BCP 47 locale tag (default: `'it-IT'`).
633
+ * @returns The formatted number string.
634
+ */
635
+ static formatNumber(value: number, decimals?: number, locale?: string): string;
636
+ /**
637
+ * Formats a number as a currency string using a cached `Intl.NumberFormat`.
638
+ * @param value - The number to format.
639
+ * @param currency - ISO 4217 currency code (default: `'EUR'`).
640
+ * @param decimals - Maximum decimal places (default: `2`).
641
+ * @param locale - BCP 47 locale tag (default: `'it-IT'`).
642
+ * @returns The formatted currency string.
643
+ */
644
+ static formatCurrency(value: number, currency?: string, decimals?: number, locale?: string): string;
645
+ /**
646
+ * Percent-encodes a string for safe inclusion in a URL.
647
+ * @param value - The string to encode.
648
+ * @returns The encoded string, or `undefined` when `value` is empty.
649
+ */
650
+ static urlEncode(value: string): string | undefined;
651
+ /**
652
+ * Decodes a percent-encoded URL string, treating `+` as a space.
653
+ * @param value - The encoded string to decode.
654
+ * @returns The decoded string, or `undefined` when `value` is empty or absent.
655
+ */
656
+ static urlDecode(value?: string): string | undefined;
657
+ /**
658
+ * Reads a query string parameter value from the current page URL.
659
+ * @param name - The parameter name to look up.
660
+ * @returns The decoded parameter value, or `undefined` when absent or running server-side.
661
+ */
662
+ static getQueryStringValueByName(name: string): string | undefined;
663
+ /**
664
+ * Generate a password
665
+ * @returns : the password string
666
+ */
667
+ static generatePassword(length?: number): string;
668
+ /**
669
+ * Calculate password strength
670
+ * @param password: the password to evaluate
671
+ * @returns the password strength info
672
+ */
673
+ static calculatePasswordStrength(password?: string): PasswordStrength;
674
+ /**
675
+ * Check if current browser supports touch
676
+ * @returns : true if the display is touchable
677
+ */
678
+ static isTouchable(): boolean;
679
+ /**
680
+ * This check will prevent 'window' logic to be executed
681
+ * while executing the server rendering
682
+ * @returns : true if using the browser
683
+ */
684
+ static isBrowser(): boolean;
685
+ /**
686
+ * Convert folders in a tree of Node object.
687
+ * @param folders : the subfolders group or null to root
688
+ * @returns : a node list
689
+ */
690
+ static toNodes(folders: INode[]): INode[];
691
+ /**
692
+ * Convert folders in a tree of Node object.
693
+ * @param folders : the children group or null to root
694
+ * @param parent : the parent node
695
+ * @returns : a node list
696
+ */
697
+ private static _toNodes;
698
+ /**
699
+ * Returns an array of individual power-of-2 flag values that are set in `value`.
700
+ * @param value - The bitmask to decompose.
701
+ * @param max - Upper-bound exponent: checks flags from `1` up to `1 << max` (default: `30`).
702
+ * @returns Array of set flag values, or an empty array when `value` is `0`.
703
+ */
704
+ static getFlags(value: number, max?: number): number[];
705
+ /** Cache for resolved color luminance results. */
706
+ private static readonly colorLightCache;
707
+ /**
708
+ * Check if a color is light or dark
709
+ * @param color : the color
710
+ * @param minimumLuminance : the lumimance to consider
711
+ * @returns true if the color is light
712
+ */
713
+ static isColorLight(color: string, minimumLuminance?: number): boolean;
710
714
  }
711
-
712
715
  /**
713
716
  * Generic selection model that tracks a set of selected items identified by a lookup field.
714
717
  * Wraps Angular CDK's `SelectionModel` and adds lookup-based add/remove logic.
@@ -716,191 +719,204 @@ declare class SystemUtils {
716
719
  * @typeParam T - The item type held in the selection.
717
720
  * @typeParam V - The type of the lookup key used to identify items.
718
721
  */
719
- declare class SelectableModel<T, V> {
720
- /**
721
- * Emits whenever the selection changes.
722
- * Carries the affected item, or `undefined` when the whole selection is cleared.
723
- *
724
- * Note: kept as `EventEmitter` (instead of a plain RxJS `Subject`) for
725
- * backward compatibility with existing consumers; `EventEmitter` extends
726
- * `Subject`, so `.subscribe()`, `pipe(...)` and `takeUntilDestroyed` all
727
- * work as expected.
728
- */
729
- readonly changed: EventEmitter<T>;
730
- private readonly _all;
731
- /**
732
- * Snapshot of all items currently tracked by this model (selected or previously toggled).
733
- * Backed by a signal — reads are always up to date.
734
- */
735
- get all(): T[];
736
- private readonly _current;
737
- /** The underlying CDK `SelectionModel` (provides `.selected`, `.isSelected`, etc.). */
738
- get current(): SelectionModel<T>;
739
- private readonly _lookupFieldName;
740
- /** Signal that is `true` when at least one item is tracked in the internal list. */
741
- readonly hasValue: i0.Signal<boolean>;
742
- /** Signal with the number of items currently tracked in the internal list. */
743
- readonly count: i0.Signal<number>;
744
- /** Signal that is `true` when exactly one item is currently selected. */
745
- readonly selectedOne: i0.Signal<boolean>;
746
- /** Signal that is `true` when two or more items are currently selected. */
747
- readonly selectedMany: i0.Signal<boolean>;
748
- /** Signal that is `true` when at least one element is selected. */
749
- readonly selectedAny: i0.Signal<boolean>;
750
- /** Signal that is `true` when no item is currently selected. */
751
- readonly selectedNone: i0.Signal<boolean>;
752
- /** Signal with the first currently selected item, or `undefined` when none is selected. */
753
- readonly first: i0.Signal<T>;
754
- /**
755
- * @param allowMultiSelect - When `true` (default), multiple items can be selected simultaneously.
756
- * @param lookupFieldName - Name of the field used as the unique key when searching the internal list
757
- * (default: `'id'`). Keys of `T` are autocompleted; plain strings remain accepted.
758
- */
759
- constructor(allowMultiSelect?: boolean, lookupFieldName?: KeyOf<T>);
760
- /**
761
- * Toggles the CDK selection state of an item that already exists in the tracked list.
762
- * Has no effect when `lookupValue` does not match any tracked item.
763
- * @param item - The item whose selection state should be toggled.
764
- * @param lookupValue - The key value used to locate the item in the internal list.
765
- */
766
- updateCurrent(item: T, lookupValue: V): void;
767
- /**
768
- * Toggles an item in both the internal list and the CDK selection.
769
- * Adds the item when it is not yet tracked; removes it when it is.
770
- * @param item - The item to toggle.
771
- * @param lookupValue - The key value used to locate or register the item.
772
- */
773
- toggle(item: T, lookupValue?: V): void;
774
- /**
775
- * Adds an item to the internal list (when not already present) and marks it as selected.
776
- * @param item - The item to select.
777
- * @param lookupValue - The key value used to locate or register the item.
778
- */
779
- select(item: T, lookupValue?: V): void;
780
- /**
781
- * Removes an item from the internal list and deselects it in the CDK model.
782
- * Has no effect when the item is not currently tracked.
783
- * @param item - The item to deselect.
784
- * @param lookupValue - The key value used to locate the item in the internal list.
785
- */
786
- deselect(item: T, lookupValue?: V): void;
787
- /**
788
- * Deselects all items whose lookup key is contained in `lookupValues`.
789
- * @param lookupValues - Array of key values identifying the items to deselect.
790
- */
791
- deselectByValues(lookupValues: V[]): void;
792
- /**
793
- * Runs `clearFunc` against every currently selected item, then clears the CDK selection.
794
- * The internal tracked list is **not** affected; only the CDK selection is cleared.
795
- * @param clearFunc - Callback invoked for each currently selected item before clearing.
796
- */
797
- clearCurrent(clearFunc: (item: T) => void): void;
798
- /**
799
- * Clears both the internal tracked list and the CDK selection.
800
- */
801
- clear(): void;
802
- /**
803
- * Returns `true` when the item identified by `lookupValue` is present in the tracked list.
804
- * @param lookupValue - The key value to look up.
805
- */
806
- isSelected(lookupValue?: V): boolean;
722
+ export declare class SelectableModel<T, V> {
723
+ /**
724
+ * Emits whenever the selection changes.
725
+ * Carries the affected item, or `undefined` when the whole selection is cleared.
726
+ *
727
+ * Note: kept as `EventEmitter` (instead of a plain RxJS `Subject`) for
728
+ * backward compatibility with existing consumers; `EventEmitter` extends
729
+ * `Subject`, so `.subscribe()`, `pipe(...)` and `takeUntilDestroyed` all
730
+ * work as expected.
731
+ */
732
+ readonly changed: EventEmitter<T>;
733
+ private readonly _all;
734
+ /**
735
+ * Snapshot of all items currently tracked by this model (selected or previously toggled).
736
+ * Backed by a signal — reads are always up to date.
737
+ */
738
+ get all(): T[];
739
+ private readonly _current;
740
+ /** The underlying CDK `SelectionModel` (provides `.selected`, `.isSelected`, etc.). */
741
+ get current(): SelectionModel<T>;
742
+ private readonly _lookupFieldName;
743
+ /** Signal that is `true` when at least one item is tracked in the internal list. */
744
+ readonly hasValue: import("@angular/core").Signal<boolean>;
745
+ /** Signal with the number of items currently tracked in the internal list. */
746
+ readonly count: import("@angular/core").Signal<number>;
747
+ /** Signal that is `true` when exactly one item is currently selected. */
748
+ readonly selectedOne: import("@angular/core").Signal<boolean>;
749
+ /** Signal that is `true` when two or more items are currently selected. */
750
+ readonly selectedMany: import("@angular/core").Signal<boolean>;
751
+ /** Signal that is `true` when at least one element is selected. */
752
+ readonly selectedAny: import("@angular/core").Signal<boolean>;
753
+ /** Signal that is `true` when no item is currently selected. */
754
+ readonly selectedNone: import("@angular/core").Signal<boolean>;
755
+ /** Signal with the first currently selected item, or `undefined` when none is selected. */
756
+ readonly first: import("@angular/core").Signal<T>;
757
+ /**
758
+ * @param allowMultiSelect - When `true` (default), multiple items can be selected simultaneously.
759
+ * @param lookupFieldName - Name of the field used as the unique key when searching the internal list
760
+ * (default: `'id'`). Keys of `T` are autocompleted; plain strings remain accepted.
761
+ */
762
+ constructor(allowMultiSelect?: boolean, lookupFieldName?: KeyOf<T>);
763
+ /**
764
+ * Toggles the CDK selection state of an item that already exists in the tracked list.
765
+ * Has no effect when `lookupValue` does not match any tracked item.
766
+ * @param item - The item whose selection state should be toggled.
767
+ * @param lookupValue - The key value used to locate the item in the internal list.
768
+ */
769
+ updateCurrent(item: T, lookupValue: V): void;
770
+ /**
771
+ * Toggles an item in both the internal list and the CDK selection.
772
+ * Adds the item when it is not yet tracked; removes it when it is.
773
+ * @param item - The item to toggle.
774
+ * @param lookupValue - The key value used to locate or register the item.
775
+ */
776
+ toggle(item: T, lookupValue?: V): void;
777
+ /**
778
+ * Adds an item to the internal list (when not already present) and marks it as selected.
779
+ * @param item - The item to select.
780
+ * @param lookupValue - The key value used to locate or register the item.
781
+ */
782
+ select(item: T, lookupValue?: V): void;
783
+ /**
784
+ * Removes an item from the internal list and deselects it in the CDK model.
785
+ * Has no effect when the item is not currently tracked.
786
+ * @param item - The item to deselect.
787
+ * @param lookupValue - The key value used to locate the item in the internal list.
788
+ */
789
+ deselect(item: T, lookupValue?: V): void;
790
+ /**
791
+ * Deselects all items whose lookup key is contained in `lookupValues`.
792
+ * @param lookupValues - Array of key values identifying the items to deselect.
793
+ */
794
+ deselectByValues(lookupValues: V[]): void;
795
+ /**
796
+ * Runs `clearFunc` against every currently selected item, then clears the CDK selection.
797
+ * The internal tracked list is **not** affected; only the CDK selection is cleared.
798
+ * @param clearFunc - Callback invoked for each currently selected item before clearing.
799
+ */
800
+ clearCurrent(clearFunc: (item: T) => void): void;
801
+ /**
802
+ * Clears both the internal tracked list and the CDK selection.
803
+ */
804
+ clear(): void;
805
+ /**
806
+ * Returns `true` when the item identified by `lookupValue` is present in the tracked list.
807
+ * @param lookupValue - The key value to look up.
808
+ */
809
+ isSelected(lookupValue?: V): boolean;
807
810
  }
808
-
809
811
  /**
810
812
  * Directive that moves browser focus to the host element after the first render cycle.
811
813
  * Apply `autoFocus` to any focusable element to set focus automatically on initialisation.
812
814
  */
813
- declare class AutoFocusDirective {
814
- private readonly elementRef;
815
- constructor();
816
- static ɵfac: i0.ɵɵFactoryDeclaration<AutoFocusDirective, never>;
817
- static ɵdir: i0.ɵɵDirectiveDeclaration<AutoFocusDirective, "[autoFocus]", never, {}, {}, never, never, true, never>;
815
+ export declare class AutoFocusDirective {
816
+ private readonly elementRef;
817
+ constructor();
818
+ static ɵfac: i0.ɵɵFactoryDeclaration<AutoFocusDirective, never>;
819
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AutoFocusDirective, "[autoFocus]", never, {}, {}, never, never, true, never>;
818
820
  }
819
-
820
821
  /**
821
822
  * Directive that listens to `keyup` events on a date input and debounces changes
822
823
  * into a {@link DateInterval} model, converting shorthand strings (e.g. "d/m") to dates.
823
824
  * Apply `[dateIntervalChange]="interval"` to the host `<input>` element.
824
825
  */
825
- declare class DateIntervalChangeDirective {
826
- /** The date interval model to update when the input value changes. */
827
- readonly dateIntervalChange: i0.InputSignal<DateInterval>;
828
- /** When `true`, the directive updates the interval's end date; otherwise the start date. */
829
- readonly end: i0.InputSignal<boolean>;
830
- private readonly subject;
831
- private readonly destroyRef;
832
- constructor();
833
- /**
834
- * Handles `keydown` events on the host element.
835
- * The space key must be blocked HERE: by the time `keyup` fires the character
836
- * has already been inserted into the input, so `preventDefault` on `keyup`
837
- * cannot stop it.
838
- * @param e - The keyboard event emitted by the host input.
839
- */
840
- onKeydown(e: KeyboardEvent): void;
841
- /**
842
- * Handles `keyup` events on the host element and forwards them to the debounce pipeline.
843
- * @param e - The keyboard event emitted by the host input.
844
- */
845
- onKeyup(e: KeyboardEvent): void;
846
- static ɵfac: i0.ɵɵFactoryDeclaration<DateIntervalChangeDirective, never>;
847
- static ɵdir: i0.ɵɵDirectiveDeclaration<DateIntervalChangeDirective, "[dateIntervalChange]", never, { "dateIntervalChange": { "alias": "dateIntervalChange"; "required": false; "isSignal": true; }; "end": { "alias": "end"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
826
+ export declare class DateIntervalChangeDirective {
827
+ /** The date interval model to update when the input value changes. */
828
+ readonly dateIntervalChange: import("@angular/core").InputSignal<DateInterval>;
829
+ /** When `true`, the directive updates the interval's end date; otherwise the start date. */
830
+ readonly end: import("@angular/core").InputSignal<boolean>;
831
+ private readonly subject;
832
+ private readonly destroyRef;
833
+ constructor();
834
+ /**
835
+ * Handles `keydown` events on the host element.
836
+ * The space key must be blocked HERE: by the time `keyup` fires the character
837
+ * has already been inserted into the input, so `preventDefault` on `keyup`
838
+ * cannot stop it.
839
+ * @param e - The keyboard event emitted by the host input.
840
+ */
841
+ onKeydown(e: KeyboardEvent): void;
842
+ /**
843
+ * Handles `keyup` events on the host element and forwards them to the debounce pipeline.
844
+ * @param e - The keyboard event emitted by the host input.
845
+ */
846
+ onKeyup(e: KeyboardEvent): void;
847
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateIntervalChangeDirective, never>;
848
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DateIntervalChangeDirective, "[dateIntervalChange]", never, {
849
+ "dateIntervalChange": {
850
+ "alias": "dateIntervalChange";
851
+ "required": false;
852
+ "isSignal": true;
853
+ };
854
+ "end": {
855
+ "alias": "end";
856
+ "required": false;
857
+ "isSignal": true;
858
+ };
859
+ }, {}, never, never, true, never>;
848
860
  }
849
-
850
861
  /**
851
862
  * Directive that copies a string payload to the clipboard when the host element is clicked.
852
863
  * Bind `[copyClipboard]="text"` to provide the content to copy and listen to `(copied)` for confirmation.
853
864
  */
854
- declare class CopyClipboardDirective {
855
- /** The text to copy to the clipboard. Bound via the `copyClipboard` attribute. */
856
- readonly payload: i0.InputSignal<string>;
857
- /** Emits the copied text after a successful copy operation. */
858
- readonly copied: i0.OutputEmitterRef<string>;
859
- /**
860
- * Handles click events on the host element and copies the payload to the clipboard.
861
- * Emits `copied` with the copied text on success.
862
- * @param e - The mouse click event.
863
- */
864
- onClick(e: MouseEvent): void;
865
- static ɵfac: i0.ɵɵFactoryDeclaration<CopyClipboardDirective, never>;
866
- static ɵdir: i0.ɵɵDirectiveDeclaration<CopyClipboardDirective, "[copyClipboard]", never, { "payload": { "alias": "copyClipboard"; "required": false; "isSignal": true; }; }, { "copied": "copied"; }, never, never, true, never>;
865
+ export declare class CopyClipboardDirective {
866
+ /** The text to copy to the clipboard. Bound via the `copyClipboard` attribute. */
867
+ readonly payload: import("@angular/core").InputSignal<string>;
868
+ /** Emits the copied text after a successful copy operation. */
869
+ readonly copied: import("@angular/core").OutputEmitterRef<string>;
870
+ /**
871
+ * Handles click events on the host element and copies the payload to the clipboard.
872
+ * Emits `copied` with the copied text on success.
873
+ * @param e - The mouse click event.
874
+ */
875
+ onClick(e: MouseEvent): void;
876
+ static ɵfac: i0.ɵɵFactoryDeclaration<CopyClipboardDirective, never>;
877
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CopyClipboardDirective, "[copyClipboard]", never, {
878
+ "payload": {
879
+ "alias": "copyClipboard";
880
+ "required": false;
881
+ "isSignal": true;
882
+ };
883
+ }, {
884
+ "copied": "copied";
885
+ }, never, never, true, never>;
867
886
  }
868
-
869
887
  /**
870
888
  * Directive that removes focus from the host element after it is clicked,
871
889
  * preventing the browser from keeping a visible focus ring post-interaction.
872
890
  * Apply `removeFocus` to any focusable element (e.g. a button).
873
891
  */
874
- declare class RemoveFocusDirective {
875
- private readonly elementRef;
876
- /**
877
- * Handles click events on the host element and blurs it on the next event-loop tick
878
- * so that the click action completes before focus is removed.
879
- */
880
- onClick(): void;
881
- static ɵfac: i0.ɵɵFactoryDeclaration<RemoveFocusDirective, never>;
882
- static ɵdir: i0.ɵɵDirectiveDeclaration<RemoveFocusDirective, "[removeFocus]", never, {}, {}, never, never, true, never>;
892
+ export declare class RemoveFocusDirective {
893
+ private readonly elementRef;
894
+ /**
895
+ * Handles click events on the host element and blurs it on the next event-loop tick
896
+ * so that the click action completes before focus is removed.
897
+ */
898
+ onClick(): void;
899
+ static ɵfac: i0.ɵɵFactoryDeclaration<RemoveFocusDirective, never>;
900
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RemoveFocusDirective, "[removeFocus]", never, {}, {}, never, never, true, never>;
883
901
  }
884
-
885
902
  /**
886
903
  * Pipe that converts plain-text newlines (`\r\n`, `\r`, `\n`) to HTML `<br>` tags
887
904
  * and marks the result as trusted HTML so Angular does not escape it.
888
905
  *
889
906
  * Usage: `{{ text | formatHtml }}`
890
907
  */
891
- declare class FormatHtmlPipe implements PipeTransform {
892
- private readonly sanitizer;
893
- /**
894
- * Transforms a plain-text string into sanitized HTML by replacing newline characters
895
- * with `<br>` tags.
896
- * @param value - The input string to transform. Treated as an empty string when `undefined`.
897
- * @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.
898
- */
899
- transform(value?: string): SafeHtml;
900
- static ɵfac: i0.ɵɵFactoryDeclaration<FormatHtmlPipe, never>;
901
- static ɵpipe: i0.ɵɵPipeDeclaration<FormatHtmlPipe, "formatHtml", true>;
908
+ export declare class FormatHtmlPipe implements PipeTransform {
909
+ private readonly sanitizer;
910
+ /**
911
+ * Transforms a plain-text string into sanitized HTML by replacing newline characters
912
+ * with `<br>` tags.
913
+ * @param value - The input string to transform. Treated as an empty string when `undefined`.
914
+ * @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.
915
+ */
916
+ transform(value?: string): SafeHtml;
917
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormatHtmlPipe, never>;
918
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormatHtmlPipe, "formatHtml", true>;
902
919
  }
903
-
904
920
  /**
905
921
  * General-purpose formatting pipe that converts a raw value to a locale-aware string
906
922
  * based on the specified format type.
@@ -910,25 +926,24 @@ declare class FormatHtmlPipe implements PipeTransform {
910
926
  *
911
927
  * Usage: `{{ value | format:'currency' }}`
912
928
  */
913
- declare class FormatPipe implements PipeTransform {
914
- /** Shared formatters: building an `Intl.NumberFormat` per call is expensive. */
915
- private static readonly currencyFormat;
916
- private static readonly numberFormat;
917
- private static readonly number0Format;
918
- private static readonly percentFormat;
919
- /**
920
- * Formats a value according to the specified type and optional pattern.
921
- * Returns `undefined` when the value is `null` or `undefined`, or when the type is unrecognised.
922
- * @param value - The raw value to format.
923
- * @param type - The format type identifier (default: `'date'`).
924
- * @param pattern - The date pattern used when `type` is `'date'` (default: `'dd/MM/yyyy'`).
925
- * @returns A formatted string, or `undefined` when the value cannot be formatted.
926
- */
927
- transform(value?: unknown, type?: string, pattern?: string): string | undefined;
928
- static ɵfac: i0.ɵɵFactoryDeclaration<FormatPipe, never>;
929
- static ɵpipe: i0.ɵɵPipeDeclaration<FormatPipe, "format", true>;
929
+ export declare class FormatPipe implements PipeTransform {
930
+ /** Shared formatters: building an `Intl.NumberFormat` per call is expensive. */
931
+ private static readonly currencyFormat;
932
+ private static readonly numberFormat;
933
+ private static readonly number0Format;
934
+ private static readonly percentFormat;
935
+ /**
936
+ * Formats a value according to the specified type and optional pattern.
937
+ * Returns `undefined` when the value is `null` or `undefined`, or when the type is unrecognised.
938
+ * @param value - The raw value to format.
939
+ * @param type - The format type identifier (default: `'date'`).
940
+ * @param pattern - The date pattern used when `type` is `'date'` (default: `'dd/MM/yyyy'`).
941
+ * @returns A formatted string, or `undefined` when the value cannot be formatted.
942
+ */
943
+ transform(value?: unknown, type?: string, pattern?: string): string | undefined;
944
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormatPipe, never>;
945
+ static ɵpipe: i0.ɵɵPipeDeclaration<FormatPipe, "format", true>;
930
946
  }
931
-
932
947
  /**
933
948
  * Pipe that applies a global regex replacement on a string and returns the result
934
949
  * as sanitized HTML. When `regexValue` is `'\n'` and no `replaceValue` is given,
@@ -936,57 +951,54 @@ declare class FormatPipe implements PipeTransform {
936
951
  *
937
952
  * Usage: `{{ text | replace:'\n':'' }}`
938
953
  */
939
- declare class ReplacePipe implements PipeTransform {
940
- private readonly sanitizer;
941
- /**
942
- * Replaces all occurrences of `regexValue` in `value` with `replaceValue`.
943
- * Returns `undefined` when `value` is empty or `undefined`.
944
- * @param value - The source string to process.
945
- * @param regexValue - The regex pattern string to match (applied with the global flag).
946
- * @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\n'` and this is falsy.
947
- * @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.
948
- */
949
- transform(value: string | undefined, regexValue: string, replaceValue?: string): SafeHtml | undefined;
950
- static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
951
- static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
954
+ export declare class ReplacePipe implements PipeTransform {
955
+ private readonly sanitizer;
956
+ /**
957
+ * Replaces all occurrences of `regexValue` in `value` with `replaceValue`.
958
+ * Returns `undefined` when `value` is empty or `undefined`.
959
+ * @param value - The source string to process.
960
+ * @param regexValue - The regex pattern string to match (applied with the global flag).
961
+ * @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\n'` and this is falsy.
962
+ * @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.
963
+ */
964
+ transform(value: string | undefined, regexValue: string, replaceValue?: string): SafeHtml | undefined;
965
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
966
+ static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
952
967
  }
953
-
954
968
  /**
955
969
  * Pipe that marks an HTML string as trusted so Angular does not escape it when
956
970
  * bound via `[innerHTML]`.
957
971
  *
958
972
  * Usage: `<div [innerHTML]="html | safeHtml"></div>`
959
973
  */
960
- declare class SafeHtmlPipe implements PipeTransform {
961
- private readonly sanitizer;
962
- /**
963
- * Bypasses Angular's HTML sanitization and returns a `SafeHtml` instance.
964
- * @param value - The raw HTML string to trust. Treated as an empty string when `undefined`.
965
- * @returns A `SafeHtml` value that can be bound to `[innerHTML]` without escaping.
966
- */
967
- transform(value?: string): SafeHtml;
968
- static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
969
- static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
974
+ export declare class SafeHtmlPipe implements PipeTransform {
975
+ private readonly sanitizer;
976
+ /**
977
+ * Bypasses Angular's HTML sanitization and returns a `SafeHtml` instance.
978
+ * @param value - The raw HTML string to trust. Treated as an empty string when `undefined`.
979
+ * @returns A `SafeHtml` value that can be bound to `[innerHTML]` without escaping.
980
+ */
981
+ transform(value?: string): SafeHtml;
982
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
983
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
970
984
  }
971
-
972
985
  /**
973
986
  * Pipe that marks a URL string as a trusted resource URL so Angular does not block it
974
987
  * when bound to attributes such as `[src]` or `[href]` on iframes, objects, or embeds.
975
988
  *
976
989
  * Usage: `<iframe [src]="url | safeUrl"></iframe>`
977
990
  */
978
- declare class SafeUrlPipe implements PipeTransform {
979
- private readonly sanitizer;
980
- /**
981
- * Bypasses Angular's resource-URL sanitization and returns a `SafeResourceUrl` instance.
982
- * @param value - The URL string to trust. Treated as an empty string when `undefined`.
983
- * @returns A `SafeResourceUrl` that can be bound to resource URL attributes without blocking.
984
- */
985
- transform(value?: string): SafeResourceUrl;
986
- static ɵfac: i0.ɵɵFactoryDeclaration<SafeUrlPipe, never>;
987
- static ɵpipe: i0.ɵɵPipeDeclaration<SafeUrlPipe, "safeUrl", true>;
991
+ export declare class SafeUrlPipe implements PipeTransform {
992
+ private readonly sanitizer;
993
+ /**
994
+ * Bypasses Angular's resource-URL sanitization and returns a `SafeResourceUrl` instance.
995
+ * @param value - The URL string to trust. Treated as an empty string when `undefined`.
996
+ * @returns A `SafeResourceUrl` that can be bound to resource URL attributes without blocking.
997
+ */
998
+ transform(value?: string): SafeResourceUrl;
999
+ static ɵfac: i0.ɵɵFactoryDeclaration<SafeUrlPipe, never>;
1000
+ static ɵpipe: i0.ɵɵPipeDeclaration<SafeUrlPipe, "safeUrl", true>;
988
1001
  }
989
-
990
1002
  /**
991
1003
  * Impure pipe that filters an array using a caller-provided predicate function.
992
1004
  * Because the pipe is impure it re-evaluates on every change-detection cycle,
@@ -994,20 +1006,19 @@ declare class SafeUrlPipe implements PipeTransform {
994
1006
  *
995
1007
  * Usage: `*ngFor="let item of items | callback:myFilter"`
996
1008
  */
997
- declare class SearchCallbackPipe implements PipeTransform {
998
- /**
999
- * Filters `items` by applying `callback` to each element.
1000
- * Returns the original array unchanged when either argument is falsy.
1001
- * @param items - The source array to filter. May be `undefined`.
1002
- * @param callback - A predicate function that returns `true` for items to keep.
1003
- * @returns A new filtered array, the original array when no callback is provided,
1004
- * or `undefined` when `items` is `undefined`.
1005
- */
1006
- transform<T>(items: T[] | undefined, callback: ((item: T) => boolean) | undefined): T[] | undefined;
1007
- static ɵfac: i0.ɵɵFactoryDeclaration<SearchCallbackPipe, never>;
1008
- static ɵpipe: i0.ɵɵPipeDeclaration<SearchCallbackPipe, "callback", true>;
1009
+ export declare class SearchCallbackPipe implements PipeTransform {
1010
+ /**
1011
+ * Filters `items` by applying `callback` to each element.
1012
+ * Returns the original array unchanged when either argument is falsy.
1013
+ * @param items - The source array to filter. May be `undefined`.
1014
+ * @param callback - A predicate function that returns `true` for items to keep.
1015
+ * @returns A new filtered array, the original array when no callback is provided,
1016
+ * or `undefined` when `items` is `undefined`.
1017
+ */
1018
+ transform<T>(items: T[] | undefined, callback: ((item: T) => boolean) | undefined): T[] | undefined;
1019
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchCallbackPipe, never>;
1020
+ static ɵpipe: i0.ɵɵPipeDeclaration<SearchCallbackPipe, "callback", true>;
1009
1021
  }
1010
-
1011
1022
  /**
1012
1023
  * Pure pipe that filters an array of searchable items against a text query.
1013
1024
  * Note: being pure, it re-runs only when the array REFERENCE or the query
@@ -1024,41 +1035,35 @@ declare class SearchCallbackPipe implements PipeTransform {
1024
1035
  * <div>Showing {{ meta.count }} of {{ meta.total }}</div>
1025
1036
  * ```
1026
1037
  */
1027
- declare class SearchFilterPipe implements PipeTransform {
1028
- /**
1029
- * Filters `items` by performing a case-insensitive substring match against `value`.
1030
- * When `items` or `value` is falsy the original array is returned unfiltered.
1031
- * @param items - The source array to filter. May be `undefined`.
1032
- * @param value - The search text to match against each item. May be `undefined`.
1033
- * @param metadata - Optional object that is updated with `total` and `count` after filtering.
1034
- * @returns The filtered array, the original array when no filter text is given,
1035
- * or `undefined` when `items` is `undefined`.
1036
- */
1037
- transform(items?: any[], value?: string, metadata?: SearchFilterMetadata): any[] | undefined;
1038
- static ɵfac: i0.ɵɵFactoryDeclaration<SearchFilterPipe, never>;
1039
- static ɵpipe: i0.ɵɵPipeDeclaration<SearchFilterPipe, "search", true>;
1038
+ export declare class SearchFilterPipe implements PipeTransform {
1039
+ /**
1040
+ * Filters `items` by performing a case-insensitive substring match against `value`.
1041
+ * When `items` or `value` is falsy the original array is returned unfiltered.
1042
+ * @param items - The source array to filter. May be `undefined`.
1043
+ * @param value - The search text to match against each item. May be `undefined`.
1044
+ * @param metadata - Optional object that is updated with `total` and `count` after filtering.
1045
+ * @returns The filtered array, the original array when no filter text is given,
1046
+ * or `undefined` when `items` is `undefined`.
1047
+ */
1048
+ transform(items?: any[], value?: string, metadata?: SearchFilterMetadata): any[] | undefined;
1049
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchFilterPipe, never>;
1050
+ static ɵpipe: i0.ɵɵPipeDeclaration<SearchFilterPipe, "search", true>;
1040
1051
  }
1041
-
1042
- /**
1043
- * Standard Broadcast Messages Manager
1044
- * https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
1045
- */
1046
-
1047
1052
  /** The typed message payload exchanged over the broadcast channel. */
1048
- interface BroadcastChannelMessageBag<T> {
1049
- /** Unique identifier for the message type. */
1050
- messageId: string;
1051
- /** Identifier of the sender. */
1052
- sender?: string;
1053
- /** Optional typed data attached to the message. */
1054
- data?: T;
1053
+ export interface BroadcastChannelMessageBag<T> {
1054
+ /** Unique identifier for the message type. */
1055
+ messageId: string;
1056
+ /** Identifier of the sender. */
1057
+ sender?: string;
1058
+ /** Optional typed data attached to the message. */
1059
+ data?: T;
1055
1060
  }
1056
1061
  /** Subscription descriptor that pairs a message type identifier with its handler. */
1057
- interface BroadcastChannelSubscriberInfo<T> {
1058
- /** The message type identifier to listen for. */
1059
- messageId: string;
1060
- /** Callback invoked with the full message bag when a matching message is received. */
1061
- action: (bag: BroadcastChannelMessageBag<T>) => void;
1062
+ export interface BroadcastChannelSubscriberInfo<T> {
1063
+ /** The message type identifier to listen for. */
1064
+ messageId: string;
1065
+ /** Callback invoked with the full message bag when a matching message is received. */
1066
+ action: (bag: BroadcastChannelMessageBag<T>) => void;
1062
1067
  }
1063
1068
  /**
1064
1069
  * Wrapper around the native Web `BroadcastChannel` API that adds typed messaging,
@@ -1066,279 +1071,274 @@ interface BroadcastChannelSubscriberInfo<T> {
1066
1071
  *
1067
1072
  * @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
1068
1073
  */
1069
- declare class BroadcastChannelManager {
1070
- private channel?;
1071
- private readonly subject;
1072
- private subscriptions;
1073
- /**
1074
- * The name of the underlying `BroadcastChannel`, or `undefined` when the API
1075
- * is not supported by the current browser.
1076
- */
1077
- get currentBus(): string | undefined;
1078
- /**
1079
- * Observable that emits EVERY message bag received on the channel,
1080
- * regardless of `messageId`. Completed by {@link dispose}.
1081
- * Prefer {@link observe} to listen for a single message type.
1082
- */
1083
- get messages(): Observable<BroadcastChannelMessageBag<unknown>>;
1084
- /**
1085
- * Returns a typed Observable that emits only the messages with the given `messageId`.
1086
- *
1087
- * Unlike {@link subscribe} (one callback per id, replaced on re-registration),
1088
- * this supports any number of concurrent subscribers and integrates with the
1089
- * RxJS lifecycle (`takeUntilDestroyed`, `async` pipe, ...). Completed by {@link dispose}.
1090
- *
1091
- * @param messageId - The message type identifier to listen for.
1092
- * @returns An Observable of the matching typed message bags.
1093
- */
1094
- observe<T>(messageId: string): Observable<BroadcastChannelMessageBag<T>>;
1095
- /**
1096
- * Opens a `BroadcastChannel` with the given name (when the API is available).
1097
- * @param bus - The channel name to open (default: `'ARS-CHANNEL'`).
1098
- */
1099
- constructor(bus?: string);
1100
- /**
1101
- * Closes the underlying channel and completes the internal subject after a short delay
1102
- * to allow any in-flight messages to be delivered.
1103
- */
1104
- dispose(): void;
1105
- /**
1106
- * Sends a typed message bag immediately.
1107
- * @param bag - The message bag to send.
1108
- * @example
1109
- * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value });
1110
- */
1111
- sendMessage<T>(bag: BroadcastChannelMessageBag<T>): void;
1112
- /**
1113
- * Sends a typed message bag after an optional delay.
1114
- * @param bag - The message bag to send.
1115
- * @param delay - Milliseconds to wait before posting the message.
1116
- * @example
1117
- * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value }, 250);
1118
- */
1119
- sendMessage<T>(bag: BroadcastChannelMessageBag<T>, delay?: number): void;
1120
- /**
1121
- * Sends a message identified by a string ID with optional data.
1122
- * @param messageId - The message type identifier.
1123
- * @param data - Optional typed payload.
1124
- * @example
1125
- * channel.sendMessage('my-message', value);
1126
- */
1127
- sendMessage<T>(messageId: string, data?: T): void;
1128
- /**
1129
- * Sends a message identified by a string ID with optional data after an optional delay.
1130
- * @param messageId - The message type identifier.
1131
- * @param data - Optional typed payload.
1132
- * @param delay - Milliseconds to wait before posting the message.
1133
- * @example
1134
- * channel.sendMessage('my-message', value, 250);
1135
- */
1136
- sendMessage<T>(messageId: string, data?: T, delay?: number): void;
1137
- /**
1138
- * Registers a handler for messages with the given `messageId`.
1139
- * If a handler for the same `messageId` is already registered it is replaced.
1140
- * @param args - The subscription descriptor containing the message ID and handler.
1141
- */
1142
- subscribe<T>(args: BroadcastChannelSubscriberInfo<T>): void;
1143
- /**
1144
- * Removes the subscription for the given message ID, if one exists.
1145
- * @param messageId - The message type identifier whose subscription should be removed.
1146
- */
1147
- unsubscribe(messageId: string): void;
1148
- /**
1149
- * Removes all registered subscriptions.
1150
- */
1151
- unsubscribeAll(): void;
1074
+ export declare class BroadcastChannelManager {
1075
+ private channel?;
1076
+ private readonly subject;
1077
+ private subscriptions;
1078
+ /**
1079
+ * The name of the underlying `BroadcastChannel`, or `undefined` when the API
1080
+ * is not supported by the current browser.
1081
+ */
1082
+ get currentBus(): string | undefined;
1083
+ /**
1084
+ * Observable that emits EVERY message bag received on the channel,
1085
+ * regardless of `messageId`. Completed by {@link dispose}.
1086
+ * Prefer {@link observe} to listen for a single message type.
1087
+ */
1088
+ get messages(): Observable<BroadcastChannelMessageBag<unknown>>;
1089
+ /**
1090
+ * Returns a typed Observable that emits only the messages with the given `messageId`.
1091
+ *
1092
+ * Unlike {@link subscribe} (one callback per id, replaced on re-registration),
1093
+ * this supports any number of concurrent subscribers and integrates with the
1094
+ * RxJS lifecycle (`takeUntilDestroyed`, `async` pipe, ...). Completed by {@link dispose}.
1095
+ *
1096
+ * @param messageId - The message type identifier to listen for.
1097
+ * @returns An Observable of the matching typed message bags.
1098
+ */
1099
+ observe<T>(messageId: string): Observable<BroadcastChannelMessageBag<T>>;
1100
+ /**
1101
+ * Opens a `BroadcastChannel` with the given name (when the API is available).
1102
+ * @param bus - The channel name to open (default: `'ARS-CHANNEL'`).
1103
+ */
1104
+ constructor(bus?: string);
1105
+ /**
1106
+ * Closes the underlying channel and completes the internal subject after a short delay
1107
+ * to allow any in-flight messages to be delivered.
1108
+ */
1109
+ dispose(): void;
1110
+ /**
1111
+ * Sends a typed message bag immediately.
1112
+ * @param bag - The message bag to send.
1113
+ * @example
1114
+ * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value });
1115
+ */
1116
+ sendMessage<T>(bag: BroadcastChannelMessageBag<T>): void;
1117
+ /**
1118
+ * Sends a typed message bag after an optional delay.
1119
+ * @param bag - The message bag to send.
1120
+ * @param delay - Milliseconds to wait before posting the message.
1121
+ * @example
1122
+ * channel.sendMessage({ messageId: 'my-message', sender: 'me', data: value }, 250);
1123
+ */
1124
+ sendMessage<T>(bag: BroadcastChannelMessageBag<T>, delay?: number): void;
1125
+ /**
1126
+ * Sends a message identified by a string ID with optional data.
1127
+ * @param messageId - The message type identifier.
1128
+ * @param data - Optional typed payload.
1129
+ * @example
1130
+ * channel.sendMessage('my-message', value);
1131
+ */
1132
+ sendMessage<T>(messageId: string, data?: T): void;
1133
+ /**
1134
+ * Sends a message identified by a string ID with optional data after an optional delay.
1135
+ * @param messageId - The message type identifier.
1136
+ * @param data - Optional typed payload.
1137
+ * @param delay - Milliseconds to wait before posting the message.
1138
+ * @example
1139
+ * channel.sendMessage('my-message', value, 250);
1140
+ */
1141
+ sendMessage<T>(messageId: string, data?: T, delay?: number): void;
1142
+ /**
1143
+ * Registers a handler for messages with the given `messageId`.
1144
+ * If a handler for the same `messageId` is already registered it is replaced.
1145
+ * @param args - The subscription descriptor containing the message ID and handler.
1146
+ */
1147
+ subscribe<T>(args: BroadcastChannelSubscriberInfo<T>): void;
1148
+ /**
1149
+ * Removes the subscription for the given message ID, if one exists.
1150
+ * @param messageId - The message type identifier whose subscription should be removed.
1151
+ */
1152
+ unsubscribe(messageId: string): void;
1153
+ /**
1154
+ * Removes all registered subscriptions.
1155
+ */
1156
+ unsubscribeAll(): void;
1152
1157
  }
1153
-
1154
- declare const CHANNEL_NAME = "D2693418-B18F-41BB-BAE9-41BB5407957A-CHANNEL";
1158
+ export declare const CHANNEL_NAME = "D2693418-B18F-41BB-BAE9-41BB5407957A-CHANNEL";
1155
1159
  /** Payload carried by every in-process broadcast message. */
1156
- interface BroadcastMessageInfo {
1157
- /** Unique identifier for the message type. */
1158
- id: string;
1159
- /** Optional data attached to the message. */
1160
- data?: any;
1160
+ export interface BroadcastMessageInfo {
1161
+ /** Unique identifier for the message type. */
1162
+ id: string;
1163
+ /** Optional data attached to the message. */
1164
+ data?: any;
1161
1165
  }
1162
- interface BroadcastMessageToastData {
1163
- message: string;
1164
- icon?: string;
1165
- duration?: number;
1166
+ export interface BroadcastMessageToastData {
1167
+ message: string;
1168
+ icon?: string;
1169
+ duration?: number;
1166
1170
  }
1167
1171
  /**
1168
1172
  * Application-level messaging service that combines two transports:
1169
1173
  * - An in-process RxJS `Subject` for same-tab communication (`sendMessage` / `getMessage`).
1170
1174
  * - A native `BroadcastChannel` for cross-tab communication (`sendChannelMessage` / `subscribeChannelMessage`).
1171
1175
  */
1172
- declare class BroadcastService implements OnDestroy {
1173
- private readonly subject;
1174
- private readonly channel;
1175
- /**
1176
- * Creates a new standalone `BroadcastChannelManager` instance bound to the shared ARS channel.
1177
- * Useful when a caller needs direct channel access outside the service.
1178
- * @returns A new `BroadcastChannelManager` connected to the shared channel.
1179
- */
1180
- static createChannel(): BroadcastChannelManager;
1181
- ngOnDestroy(): void;
1182
- /**
1183
- * Publishes a message to the in-process subject, optionally after a delay.
1184
- * @param id - The message type identifier.
1185
- * @param data - Optional payload to attach to the message.
1186
- * @param delay - Milliseconds to wait before publishing (default: `0`).
1187
- */
1188
- sendMessage(id: string, data?: any, delay?: number): void;
1189
- /**
1190
- * Publishes a typed message over the native `BroadcastChannel` (cross-tab), optionally after a delay.
1191
- * @param id - The message type identifier.
1192
- * @param data - Optional typed payload to send.
1193
- * @param delay - Milliseconds to wait before sending (forwarded to the channel manager).
1194
- */
1195
- sendChannelMessage<T>(id: string, data?: T, delay?: number): void;
1196
- /**
1197
- * Registers a handler that is invoked whenever a channel message with the given `id` is received.
1198
- * @param id - The message type identifier to listen for.
1199
- * @param action - Callback invoked with the full `BroadcastChannelMessageBag` when a matching message arrives.
1200
- */
1201
- subscribeChannelMessage<T>(id: string, action: (bag: BroadcastChannelMessageBag<T>) => void): void;
1202
- /**
1203
- * Removes the channel subscription previously registered for the given `id`, if any.
1204
- * @param id - The message type identifier whose subscription should be removed.
1205
- */
1206
- unsubscribeChannelMessage(id: string): void;
1207
- /**
1208
- * Returns a typed Observable of the cross-tab channel messages with the given `id`.
1209
- * Supports multiple concurrent subscribers and the RxJS lifecycle operators,
1210
- * unlike `subscribeChannelMessage` (single callback per id).
1211
- * @param id - The message type identifier to listen for.
1212
- * @returns An Observable of the matching typed message bags.
1213
- */
1214
- observeChannelMessage<T>(id: string): Observable<BroadcastChannelMessageBag<T>>;
1215
- /**
1216
- * Returns an `Observable` that emits every in-process message published via `sendMessage`.
1217
- * @returns An observable stream of `BroadcastMessageInfo` objects.
1218
- */
1219
- getMessage(): Observable<BroadcastMessageInfo>;
1220
- /**
1221
- * Returns a typed `Observable` of the in-process messages with the given `id`.
1222
- * @param id - The message type identifier to listen for.
1223
- * @returns An Observable emitting the typed `data` payload of each matching message.
1224
- */
1225
- observeMessage<T>(id: string): Observable<T | undefined>;
1226
- static ɵfac: i0.ɵɵFactoryDeclaration<BroadcastService, never>;
1227
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1176
+ export declare class BroadcastService implements OnDestroy {
1177
+ private readonly subject;
1178
+ private readonly channel;
1179
+ /**
1180
+ * Creates a new standalone `BroadcastChannelManager` instance bound to the shared ARS channel.
1181
+ * Useful when a caller needs direct channel access outside the service.
1182
+ * @returns A new `BroadcastChannelManager` connected to the shared channel.
1183
+ */
1184
+ static createChannel(): BroadcastChannelManager;
1185
+ ngOnDestroy(): void;
1186
+ /**
1187
+ * Publishes a message to the in-process subject, optionally after a delay.
1188
+ * @param id - The message type identifier.
1189
+ * @param data - Optional payload to attach to the message.
1190
+ * @param delay - Milliseconds to wait before publishing (default: `0`).
1191
+ */
1192
+ sendMessage(id: string, data?: any, delay?: number): void;
1193
+ /**
1194
+ * Publishes a typed message over the native `BroadcastChannel` (cross-tab), optionally after a delay.
1195
+ * @param id - The message type identifier.
1196
+ * @param data - Optional typed payload to send.
1197
+ * @param delay - Milliseconds to wait before sending (forwarded to the channel manager).
1198
+ */
1199
+ sendChannelMessage<T>(id: string, data?: T, delay?: number): void;
1200
+ /**
1201
+ * Registers a handler that is invoked whenever a channel message with the given `id` is received.
1202
+ * @param id - The message type identifier to listen for.
1203
+ * @param action - Callback invoked with the full `BroadcastChannelMessageBag` when a matching message arrives.
1204
+ */
1205
+ subscribeChannelMessage<T>(id: string, action: (bag: BroadcastChannelMessageBag<T>) => void): void;
1206
+ /**
1207
+ * Removes the channel subscription previously registered for the given `id`, if any.
1208
+ * @param id - The message type identifier whose subscription should be removed.
1209
+ */
1210
+ unsubscribeChannelMessage(id: string): void;
1211
+ /**
1212
+ * Returns a typed Observable of the cross-tab channel messages with the given `id`.
1213
+ * Supports multiple concurrent subscribers and the RxJS lifecycle operators,
1214
+ * unlike `subscribeChannelMessage` (single callback per id).
1215
+ * @param id - The message type identifier to listen for.
1216
+ * @returns An Observable of the matching typed message bags.
1217
+ */
1218
+ observeChannelMessage<T>(id: string): Observable<BroadcastChannelMessageBag<T>>;
1219
+ /**
1220
+ * Returns an `Observable` that emits every in-process message published via `sendMessage`.
1221
+ * @returns An observable stream of `BroadcastMessageInfo` objects.
1222
+ */
1223
+ getMessage(): Observable<BroadcastMessageInfo>;
1224
+ /**
1225
+ * Returns a typed `Observable` of the in-process messages with the given `id`.
1226
+ * @param id - The message type identifier to listen for.
1227
+ * @returns An Observable emitting the typed `data` payload of each matching message.
1228
+ */
1229
+ observeMessage<T>(id: string): Observable<T | undefined>;
1230
+ static ɵfac: i0.ɵɵFactoryDeclaration<BroadcastService, never>;
1231
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1228
1232
  }
1229
-
1230
1233
  /**
1231
1234
  * Application-wide environment configuration service.
1232
1235
  * Exposes writable signals for the base URIs used throughout the application.
1233
1236
  * Values should be set once during application bootstrap (e.g. in `APP_INITIALIZER`).
1234
1237
  */
1235
- declare class EnvironmentService {
1236
- /** Writable signal holding the base URI of the frontend application (e.g. `https://app.example.com`). */
1237
- readonly appUriSignal: i0.WritableSignal<string>;
1238
- /** Writable signal holding the base URI of the backend API service (e.g. `https://api.example.com`). */
1239
- readonly appServiceUriSignal: i0.WritableSignal<string>;
1240
- /**
1241
- * Writable signal holding the redirect URI used after login.
1242
- * When empty, `appLoginRedirectUri` falls back to `appUri`.
1243
- */
1244
- readonly appLoginRedirectUriSignal: i0.WritableSignal<string>;
1245
- /**
1246
- * Writable signal holding the login endpoint URI of the backend service.
1247
- * When empty, `appServiceLoginUri` falls back to `appServiceUri`.
1248
- */
1249
- readonly appServiceLoginUriSignal: i0.WritableSignal<string>;
1250
- private readonly _effectiveLoginRedirectUri;
1251
- private readonly _effectiveServiceLoginUri;
1252
- /** Base URI of the frontend application. */
1253
- get appUri(): string;
1254
- /** @param value - The base URI of the frontend application. */
1255
- set appUri(value: string);
1256
- /** Base URI of the backend API service. */
1257
- get appServiceUri(): string;
1258
- /** @param value - The base URI of the backend API service. */
1259
- set appServiceUri(value: string);
1260
- /**
1261
- * Effective login redirect URI.
1262
- * Returns the explicitly set value, or falls back to `appUri` when empty.
1263
- */
1264
- get appLoginRedirectUri(): string;
1265
- /** @param value - The redirect URI to use after login. */
1266
- set appLoginRedirectUri(value: string);
1267
- /**
1268
- * Effective service login URI.
1269
- * Returns the explicitly set value, or falls back to `appServiceUri` when empty.
1270
- */
1271
- get appServiceLoginUri(): string;
1272
- /** @param value - The login endpoint URI of the backend service. */
1273
- set appServiceLoginUri(value: string);
1274
- static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentService, never>;
1275
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1238
+ export declare class EnvironmentService {
1239
+ /** Writable signal holding the base URI of the frontend application (e.g. `https://app.example.com`). */
1240
+ readonly appUriSignal: import("@angular/core").WritableSignal<string>;
1241
+ /** Writable signal holding the base URI of the backend API service (e.g. `https://api.example.com`). */
1242
+ readonly appServiceUriSignal: import("@angular/core").WritableSignal<string>;
1243
+ /**
1244
+ * Writable signal holding the redirect URI used after login.
1245
+ * When empty, `appLoginRedirectUri` falls back to `appUri`.
1246
+ */
1247
+ readonly appLoginRedirectUriSignal: import("@angular/core").WritableSignal<string>;
1248
+ /**
1249
+ * Writable signal holding the login endpoint URI of the backend service.
1250
+ * When empty, `appServiceLoginUri` falls back to `appServiceUri`.
1251
+ */
1252
+ readonly appServiceLoginUriSignal: import("@angular/core").WritableSignal<string>;
1253
+ private readonly _effectiveLoginRedirectUri;
1254
+ private readonly _effectiveServiceLoginUri;
1255
+ /** Base URI of the frontend application. */
1256
+ get appUri(): string;
1257
+ /** @param value - The base URI of the frontend application. */
1258
+ set appUri(value: string);
1259
+ /** Base URI of the backend API service. */
1260
+ get appServiceUri(): string;
1261
+ /** @param value - The base URI of the backend API service. */
1262
+ set appServiceUri(value: string);
1263
+ /**
1264
+ * Effective login redirect URI.
1265
+ * Returns the explicitly set value, or falls back to `appUri` when empty.
1266
+ */
1267
+ get appLoginRedirectUri(): string;
1268
+ /** @param value - The redirect URI to use after login. */
1269
+ set appLoginRedirectUri(value: string);
1270
+ /**
1271
+ * Effective service login URI.
1272
+ * Returns the explicitly set value, or falls back to `appServiceUri` when empty.
1273
+ */
1274
+ get appServiceLoginUri(): string;
1275
+ /** @param value - The login endpoint URI of the backend service. */
1276
+ set appServiceLoginUri(value: string);
1277
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentService, never>;
1278
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1276
1279
  }
1277
-
1278
1280
  /**
1279
1281
  * Service that exposes reactive screen and device-capability information.
1280
1282
  */
1281
- declare class ScreenService {
1282
- /**
1283
- * Writable signal that holds the current Material breakpoint alias
1284
- * (e.g. `'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`).
1285
- * Updated externally by the breakpoint observer in the consuming component or module.
1286
- */
1287
- readonly mq: i0.WritableSignal<string>;
1288
- /**
1289
- * Returns `true` when the primary input mechanism can hover over elements
1290
- * with coarse pointer precision (i.e. a touch screen).
1291
- */
1292
- get isTouchable(): boolean;
1293
- /**
1294
- * Returns `true` when the current browser is Internet Explorer or the legacy Edge (EdgeHTML).
1295
- * Modern Chromium-based Edge reports a different user-agent and will return `false`.
1296
- */
1297
- get isIEOrEdge(): boolean;
1298
- static ɵfac: i0.ɵɵFactoryDeclaration<ScreenService, never>;
1299
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1283
+ export declare class ScreenService {
1284
+ /**
1285
+ * Writable signal that holds the current Material breakpoint alias
1286
+ * (e.g. `'xs'`, `'sm'`, `'md'`, `'lg'`, `'xl'`).
1287
+ * Updated externally by the breakpoint observer in the consuming component or module.
1288
+ */
1289
+ readonly mq: import("@angular/core").WritableSignal<string>;
1290
+ /**
1291
+ * Returns `true` when the primary input mechanism can hover over elements
1292
+ * with coarse pointer precision (i.e. a touch screen).
1293
+ */
1294
+ get isTouchable(): boolean;
1295
+ /**
1296
+ * Returns `true` when the current browser is Internet Explorer or the legacy Edge (EdgeHTML).
1297
+ * Modern Chromium-based Edge reports a different user-agent and will return `false`.
1298
+ */
1299
+ get isIEOrEdge(): boolean;
1300
+ static ɵfac: i0.ɵɵFactoryDeclaration<ScreenService, never>;
1301
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1300
1302
  }
1301
-
1302
- declare class SplashService {
1303
- private readonly isBrowser;
1304
- /**
1305
- * Resolve the global splash API exposed by index.html.
1306
- * @returns The API object, or `undefined` when the splash has already
1307
- * been removed or when running in SSR.
1308
- */
1309
- private get api();
1310
- /**
1311
- * Update the splash message (e.g. "Accesso in corso...").
1312
- * No-op when the splash is gone or in SSR.
1313
- * @param text - The new message to display.
1314
- */
1315
- setMessage(text: string): void;
1316
- /**
1317
- * Defuse the watchdog: Angular bootstrap succeeded,
1318
- * no automatic reload will ever fire.
1319
- */
1320
- bootstrapped(): void;
1321
- /** Fade out and remove the splash overlay from the DOM. */
1322
- hide(): void;
1323
- /**
1324
- * Give up on loading, without taking the splash away.
1325
- *
1326
- * The splash stays where it is but stops pretending something is still happening: the progress
1327
- * bar goes and a reload button appears, so a user who would otherwise sit in front of an endless
1328
- * animation has something to do. Uncovering the page instead would be worse — whatever is
1329
- * underneath is, by definition, not ready.
1330
- *
1331
- * Falls back to {@link setMessage} where `index.html` does not publish `fail`: the user still
1332
- * reads what happened, only without the button.
1333
- * @param text - What to tell the user.
1334
- */
1335
- fail(text: string): void;
1336
- static ɵfac: i0.ɵɵFactoryDeclaration<SplashService, never>;
1337
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1303
+ export declare class SplashService {
1304
+ private readonly isBrowser;
1305
+ /**
1306
+ * Resolve the global splash API exposed by index.html.
1307
+ * @returns The API object, or `undefined` when the splash has already
1308
+ * been removed or when running in SSR.
1309
+ */
1310
+ private get api();
1311
+ /**
1312
+ * Update the splash message (e.g. "Accesso in corso...").
1313
+ * No-op when the splash is gone or in SSR.
1314
+ * @param text - The new message to display.
1315
+ */
1316
+ setMessage(text: string): void;
1317
+ /**
1318
+ * Defuse the watchdog: Angular bootstrap succeeded,
1319
+ * no automatic reload will ever fire.
1320
+ */
1321
+ bootstrapped(): void;
1322
+ /** Fade out and remove the splash overlay from the DOM. */
1323
+ hide(): void;
1324
+ /**
1325
+ * Give up on loading, without taking the splash away.
1326
+ *
1327
+ * The splash stays where it is but stops pretending something is still happening: the progress
1328
+ * bar goes and a reload button appears, so a user who would otherwise sit in front of an endless
1329
+ * animation has something to do. Uncovering the page instead would be worse — whatever is
1330
+ * underneath is, by definition, not ready.
1331
+ *
1332
+ * Falls back to {@link setMessage} where `index.html` does not publish `fail`: the user still
1333
+ * reads what happened, only without the button.
1334
+ * @param text - What to tell the user.
1335
+ */
1336
+ fail(text: string): void;
1337
+ static ɵfac: i0.ɵɵFactoryDeclaration<SplashService, never>;
1338
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1338
1339
  }
1339
-
1340
1340
  /** The three available theme modes: follow system preference, force light, or force dark. */
1341
- type ThemeType = 'auto' | 'light' | 'dark';
1341
+ export type ThemeType = 'auto' | 'light' | 'dark';
1342
1342
  /**
1343
1343
  * Application-level theme management service.
1344
1344
  *
@@ -1349,73 +1349,70 @@ type ThemeType = 'auto' | 'light' | 'dark';
1349
1349
  * - Synchronises theme changes across browser tabs via `BroadcastChannel`.
1350
1350
  * - Exposes reactive signals (`themeIcon`, `themeName`, `toggleTooltip`) for the UI.
1351
1351
  */
1352
- declare class ThemeService implements OnDestroy {
1353
- private readonly broadcastChannel;
1354
- private readonly broadcastMessage;
1355
- private readonly prefersColorSchemeMediaQueryList;
1356
- /**
1357
- * Observable that emits the resolved (`'light'` or `'dark'`) theme whenever it changes.
1358
- * Useful for components that cannot consume signals directly (e.g. class-based guards).
1359
- * @example
1360
- * this.themeService.changed
1361
- * .pipe(takeUntilDestroyed(this.destroyRef))
1362
- * .subscribe(theme => { ... });
1363
- */
1364
- readonly changed: Observable<ThemeType>;
1365
- private readonly themeChanged;
1366
- private readonly renderFactory2;
1367
- private readonly renderer;
1368
- /** The currently selected `ThemeType` (may be `'auto'`). */
1369
- private readonly theme;
1370
- /** `true` when the theme is set to follow the system preference. */
1371
- private readonly auto;
1372
- private readonly themeInfo;
1373
- /** Reactive Material icon code for the current theme (use with `<mat-icon>`). */
1374
- readonly themeIcon: Signal<string>;
1375
- /** Reactive human-readable name of the current theme. */
1376
- readonly themeName: Signal<string>;
1377
- /** Reactive tooltip text for the theme toggle button. */
1378
- readonly toggleTooltip: Signal<string>;
1379
- constructor();
1380
- /**
1381
- * Initialises the service: loads the preferred theme, registers OS-change listener,
1382
- * and subscribes to cross-tab broadcast messages.
1383
- * Call this once during application bootstrap (e.g. in `APP_INITIALIZER`).
1384
- * @param theme - The initial theme to apply (defaults to the value stored in `localStorage`).
1385
- */
1386
- initialize(theme?: ThemeType): void;
1387
- ngOnDestroy(): void;
1388
- /**
1389
- * Advances the theme through the cycle: `auto` → `light` → `dark` → `auto`.
1390
- */
1391
- toggleTheme(): void;
1392
- /**
1393
- * Returns the resolved effective theme (`'light'` or `'dark'`), taking the OS preference
1394
- * into account when the current mode is `'auto'`.
1395
- * @returns `'light'` or `'dark'` — never `'auto'`.
1396
- */
1397
- getTheme(): ThemeType;
1398
- /**
1399
- * Reads the theme stored in `localStorage` and validates it.
1400
- * Falls back to `'auto'` when the stored value is missing or invalid.
1401
- * @returns The persisted `ThemeType`, or `'auto'` as default.
1402
- */
1403
- private getPreferredTheme;
1404
- /**
1405
- * Returns `true` when `value` is a valid `ThemeType` string.
1406
- * Acts as a TypeScript type guard.
1407
- * @param value - The string to check.
1408
- */
1409
- private isTheme;
1410
- /**
1411
- * Applies the given theme to `<body>` (CSS class), persists it to `localStorage`,
1412
- * notifies the `changed` observable, and broadcasts the change to other tabs.
1413
- * @param theme - The `ThemeType` to apply (defaults to `'auto'`).
1414
- */
1415
- private setTheme;
1416
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
1417
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1418
- }
1419
-
1420
- export { AutoFocusDirective, BroadcastChannelManager, BroadcastService, CHANNEL_NAME, CopyClipboardDirective, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, DtoUtils, EnvironmentService, FileInfo, FormatHtmlPipe, FormatPipe, GroupModel, IDModel, ImportModel, LoginOAuthType, QueryModel, RelationModel, RemoveFocusDirective, ReplacePipe, SafeHtmlPipe, SafeUrlPipe, ScreenService, SearchCallbackPipe, SearchFilterPipe, SelectableModel, SplashService, SystemUtils, ThemeService, UpdateRelationsModel, UtilsMessages, ValueModel };
1421
- export type { AddModel, AddResultModel, ApiResponse, ApiResult, BroadcastChannelMessageBag, BroadcastChannelSubscriberInfo, BroadcastMessageInfo, BroadcastMessageToastData, Checkable, DeleteResultModel, DoneResult, Dto, EnableDisableModel, ErrorInfo, File, Folder, FolderTree, INode, KeyOf, LoginOAuthResult, LoginResult, NameValueItem, PasswordStrength, QueryResultModel, SearchBag, SearchFilterMetadata, Searchable, SendToModel, ThemeType, UpdateModel, UpdateResultModel, Validated };
1352
+ export declare class ThemeService implements OnDestroy {
1353
+ private readonly broadcastChannel;
1354
+ private readonly broadcastMessage;
1355
+ private readonly prefersColorSchemeMediaQueryList;
1356
+ /**
1357
+ * Observable that emits the resolved (`'light'` or `'dark'`) theme whenever it changes.
1358
+ * Useful for components that cannot consume signals directly (e.g. class-based guards).
1359
+ * @example
1360
+ * this.themeService.changed
1361
+ * .pipe(takeUntilDestroyed(this.destroyRef))
1362
+ * .subscribe(theme => { ... });
1363
+ */
1364
+ readonly changed: Observable<ThemeType>;
1365
+ private readonly themeChanged;
1366
+ private readonly renderFactory2;
1367
+ private readonly renderer;
1368
+ /** The currently selected `ThemeType` (may be `'auto'`). */
1369
+ private readonly theme;
1370
+ /** `true` when the theme is set to follow the system preference. */
1371
+ private readonly auto;
1372
+ private readonly themeInfo;
1373
+ /** Reactive Material icon code for the current theme (use with `<mat-icon>`). */
1374
+ readonly themeIcon: Signal<string>;
1375
+ /** Reactive human-readable name of the current theme. */
1376
+ readonly themeName: Signal<string>;
1377
+ /** Reactive tooltip text for the theme toggle button. */
1378
+ readonly toggleTooltip: Signal<string>;
1379
+ constructor();
1380
+ /**
1381
+ * Initialises the service: loads the preferred theme, registers OS-change listener,
1382
+ * and subscribes to cross-tab broadcast messages.
1383
+ * Call this once during application bootstrap (e.g. in `APP_INITIALIZER`).
1384
+ * @param theme - The initial theme to apply (defaults to the value stored in `localStorage`).
1385
+ */
1386
+ initialize(theme?: ThemeType): void;
1387
+ ngOnDestroy(): void;
1388
+ /**
1389
+ * Advances the theme through the cycle: `auto` → `light` → `dark` → `auto`.
1390
+ */
1391
+ toggleTheme(): void;
1392
+ /**
1393
+ * Returns the resolved effective theme (`'light'` or `'dark'`), taking the OS preference
1394
+ * into account when the current mode is `'auto'`.
1395
+ * @returns `'light'` or `'dark'` — never `'auto'`.
1396
+ */
1397
+ getTheme(): ThemeType;
1398
+ /**
1399
+ * Reads the theme stored in `localStorage` and validates it.
1400
+ * Falls back to `'auto'` when the stored value is missing or invalid.
1401
+ * @returns The persisted `ThemeType`, or `'auto'` as default.
1402
+ */
1403
+ private getPreferredTheme;
1404
+ /**
1405
+ * Returns `true` when `value` is a valid `ThemeType` string.
1406
+ * Acts as a TypeScript type guard.
1407
+ * @param value - The string to check.
1408
+ */
1409
+ private isTheme;
1410
+ /**
1411
+ * Applies the given theme to `<body>` (CSS class), persists it to `localStorage`,
1412
+ * notifies the `changed` observable, and broadcasts the change to other tabs.
1413
+ * @param theme - The `ThemeType` to apply (defaults to `'auto'`).
1414
+ */
1415
+ private setTheme;
1416
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
1417
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1418
+ }