@arsedizioni/ars-utils 22.0.21 → 22.0.23

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.
@@ -7,21 +7,6 @@ import { SafeHtml, SafeResourceUrl } from '@angular/platform-browser';
7
7
  import { SelectionModel } from '@angular/cdk/collections';
8
8
  import { Observable } from 'rxjs';
9
9
 
10
- /**
11
- * Standalone providers for the ars-utils "core" layer.
12
- *
13
- * Registers the core pipes as injectable services so they can be used
14
- * via `inject()` in services, guards, and resolvers — not only in templates.
15
- * Components that use these pipes only in templates should import them
16
- * directly via `imports: [FormatPipe, SafeHtmlPipe, ...]` instead.
17
- *
18
- * @example
19
- * bootstrapApplication(AppComponent, {
20
- * providers: [provideArsCore()]
21
- * });
22
- */
23
- declare function provideArsCore(): EnvironmentProviders;
24
-
25
10
  declare const MAT_DATE_FNS_FORMATS: MatDateFormats;
26
11
  /**
27
12
  * date-fns adapter that integrates Angular Material's date picker with the date-fns library,
@@ -207,6 +192,15 @@ declare enum DateFormat {
207
192
  ShortUS = 11,// mm/dd/yyyy
208
193
  ShortISO8601 = 12
209
194
  }
195
+ /**
196
+ * Key selector with IDE autocomplete and compile-time checking.
197
+ *
198
+ * Suggests the string keys of `T` in the editor and flags obvious typos when
199
+ * `T` is known, while STILL accepting any plain string (the `string & {}`
200
+ * branch), so existing callers that pass dynamic or untyped keys keep
201
+ * compiling unchanged.
202
+ */
203
+ type KeyOf<T> = Extract<keyof T, string> | (string & {});
210
204
  interface PasswordStrength {
211
205
  score: number;
212
206
  label?: string;
@@ -224,7 +218,7 @@ declare class SystemUtils {
224
218
  * @param value : the value to search for
225
219
  * @returns : the property value or null
226
220
  */
227
- static arrayFindByKey<T>(array: T[] | undefined, key: string, value: unknown): T | undefined;
221
+ static arrayFindByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): T | undefined;
228
222
  /**
229
223
  * Array find index by key
230
224
  * @param array : the array to scan
@@ -232,7 +226,7 @@ declare class SystemUtils {
232
226
  * @param value : the value to search for
233
227
  * @returns : the array index or -1 if not found
234
228
  */
235
- static arrayFindIndexByKey<T>(array: T[] | undefined, key: string, value: unknown): number;
229
+ static arrayFindIndexByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): number;
236
230
  /**
237
231
  * Get a value from and array made of name|value items
238
232
  * @param array : the array to scan
@@ -249,11 +243,13 @@ declare class SystemUtils {
249
243
  static arrayToNodes(items: INode[], parent?: INode): INode[];
250
244
  /**
251
245
  * Comparator factory for sorting arrays of objects by a given property key.
252
- * @param key - Name of the property to sort by.
246
+ * Pass the element type for compile-time key checking:
247
+ * `items.sort(SystemUtils.arraySortCompare<Employee>('lastName'))`.
248
+ * @param key - Name of the property to sort by (autocompleted from `T` when provided).
253
249
  * @param order - Sort direction: `'asc'` (default) or `'desc'`.
254
250
  * @returns A comparator function that returns a negative, zero, or positive number.
255
251
  */
256
- static arraySortCompare(key: string, order?: string): (a: Record<string, unknown>, b: Record<string, unknown>) => number;
252
+ static arraySortCompare<T extends object = Record<string, unknown>>(key: KeyOf<T>, order?: 'asc' | 'desc' | (string & {})): (a: T, b: T) => number;
257
253
  /**
258
254
  * Format weight
259
255
  * @param gr : grams
@@ -321,13 +317,79 @@ declare class SystemUtils {
321
317
  */
322
318
  static compareNames(a?: string, b?: string): boolean;
323
319
  /**
324
- * Cipher a text
325
- * @param text : the text
320
+ * Obfuscate a text with a key-driven code point rotation.
321
+ *
322
+ * @deprecated This is OBFUSCATION, not cryptography: it hides values from
323
+ * casual inspection but offers no real security. Use {@link encrypt} /
324
+ * {@link decrypt} (AES-GCM via Web Crypto) for anything sensitive.
325
+ *
326
+ * The rotation operates on Unicode code points and skips the surrogate
327
+ * range, so the output is always a well-formed string: emoji and other
328
+ * astral characters round-trip correctly (the previous code-unit based
329
+ * version could emit lone surrogates and corrupt them).
330
+ *
331
+ * BREAKING CHANGE: values encoded with the previous code-unit algorithm
332
+ * cannot be decoded by this implementation.
333
+ *
334
+ * @param text : the text to encode or decode
326
335
  * @param key : the key
327
336
  * @param reverse : true to decode, false to encode
328
- * @returns :the ciphered text
337
+ * @returns : the obfuscated (or restored) text, or undefined when text/key are empty
329
338
  */
330
339
  static cipher(text: string, key: string, reverse?: boolean): string | undefined;
340
+ /** Payload format version, first byte of the binary envelope. */
341
+ private static readonly CIPHER_VERSION;
342
+ /** PBKDF2 salt length in bytes. */
343
+ private static readonly CIPHER_SALT_LENGTH;
344
+ /** AES-GCM IV length in bytes (96 bit, the recommended size for GCM). */
345
+ private static readonly CIPHER_IV_LENGTH;
346
+ /** PBKDF2-HMAC-SHA-256 iterations (OWASP recommendation). */
347
+ private static readonly CIPHER_ITERATIONS;
348
+ /**
349
+ * Derives an AES-GCM 256-bit key from a password using PBKDF2-HMAC-SHA-256.
350
+ * @param password : the user password / passphrase
351
+ * @param salt : the random salt bound to this payload
352
+ * @returns : a non-extractable AES-GCM CryptoKey
353
+ */
354
+ private static deriveKey;
355
+ /**
356
+ * Encodes bytes as URL-safe Base64 (no '+', '/' or trailing '=').
357
+ * @param bytes : the bytes to encode
358
+ * @returns : the base64url string
359
+ */
360
+ private static toBase64Url;
361
+ /**
362
+ * Decodes a URL-safe Base64 string back to bytes.
363
+ * @param value : the base64url string
364
+ * @returns : the decoded bytes
365
+ */
366
+ private static fromBase64Url;
367
+ /**
368
+ * Encrypts a text with a password using AES-GCM (256 bit) and a key derived
369
+ * via PBKDF2-HMAC-SHA-256 with a random per-message salt.
370
+ *
371
+ * The result is a self-contained, URL-safe Base64 payload:
372
+ * `version (1 byte) | salt (16 bytes) | iv (12 bytes) | ciphertext+tag`.
373
+ * GCM is authenticated: any tampering makes {@link decrypt} fail.
374
+ *
375
+ * Requires a secure context (HTTPS or localhost) for `crypto.subtle`.
376
+ *
377
+ * @param text : the plain text to encrypt
378
+ * @param password : the password / passphrase
379
+ * @returns : the base64url payload, or undefined when text/password are
380
+ * empty or the Web Crypto API is unavailable
381
+ */
382
+ static encrypt(text: string, password: string): Promise<string | undefined>;
383
+ /**
384
+ * Decrypts a payload produced by {@link encrypt}.
385
+ * Returns undefined when the password is wrong, the payload was tampered
386
+ * with, the format is unknown, or the Web Crypto API is unavailable.
387
+ *
388
+ * @param payload : the base64url payload returned by {@link encrypt}
389
+ * @param password : the password / passphrase used to encrypt
390
+ * @returns : the original plain text, or undefined on any failure
391
+ */
392
+ static decrypt(payload: string, password: string): Promise<string | undefined>;
331
393
  /**
332
394
  * Clone an object (deep copy).
333
395
  * Uses native structuredClone: handles Date, Map, Set, typed arrays and circular references.
@@ -397,11 +459,19 @@ declare class SystemUtils {
397
459
  * @returns : an array of numbers with year, month, day
398
460
  */
399
461
  static getDateParts(value?: string): number[] | undefined;
462
+ /**
463
+ * Checks whether a value is a valid Date instance.
464
+ * Note: do not use `date.getTime()` as a truthiness test, it is 0 (falsy)
465
+ * for the Unix epoch (1970-01-01T00:00:00Z) even though the date is valid.
466
+ * @param d : the value to check
467
+ * @returns : true when `d` is a Date representing a valid point in time
468
+ */
469
+ static isValidDate(d: unknown): d is Date;
400
470
  /**
401
471
  * Parse a date
402
472
  * @param value : the value to check
403
473
  * @param locale : the locale to use
404
- * @returns : a valid Date object or null
474
+ * @returns : a valid Date object or undefined
405
475
  */
406
476
  static parseDate(value?: string | Date, locale?: Locale): Date | undefined;
407
477
  /**
@@ -426,8 +496,17 @@ declare class SystemUtils {
426
496
  * @param copy : copy the same value (works only if not end element)
427
497
  */
428
498
  static changeDateInterval(value: string, interval: DateInterval, end?: boolean, copy?: boolean): void;
499
+ /** Cache of `Intl.NumberFormat` instances (their construction is expensive). */
500
+ private static readonly numberFormatCache;
501
+ /**
502
+ * Returns a cached `Intl.NumberFormat` for the given options, creating it on first use.
503
+ * @param locale - BCP 47 locale tag.
504
+ * @param options - The `Intl.NumberFormat` options.
505
+ * @returns A shared formatter instance.
506
+ */
507
+ private static getNumberFormat;
429
508
  /**
430
- * Formats a number using `Intl.NumberFormat`.
509
+ * Formats a number using a cached `Intl.NumberFormat`.
431
510
  * @param value - The number to format.
432
511
  * @param decimals - Maximum decimal places (default: `2`).
433
512
  * @param locale - BCP 47 locale tag (default: `'it-IT'`).
@@ -435,7 +514,7 @@ declare class SystemUtils {
435
514
  */
436
515
  static formatNumber(value: number, decimals?: number, locale?: string): string;
437
516
  /**
438
- * Formats a number as a currency string using `Intl.NumberFormat`.
517
+ * Formats a number as a currency string using a cached `Intl.NumberFormat`.
439
518
  * @param value - The number to format.
440
519
  * @param currency - ISO 4217 currency code (default: `'EUR'`).
441
520
  * @param decimals - Maximum decimal places (default: `2`).
@@ -465,7 +544,7 @@ declare class SystemUtils {
465
544
  * Generate a password
466
545
  * @returns : the password string
467
546
  */
468
- static generatePassword(): string;
547
+ static generatePassword(length?: number): string;
469
548
  /**
470
549
  * Calculate password strength
471
550
  * @param password: the password to evaluate
@@ -660,7 +739,7 @@ declare class DateInterval {
660
739
  from?: Date;
661
740
  to?: Date;
662
741
  get fromAsDate(): Date | undefined;
663
- get toAsDate(): Date;
742
+ get toAsDate(): Date | undefined;
664
743
  constructor(from?: Date, to?: Date);
665
744
  clear(): void;
666
745
  }
@@ -684,8 +763,15 @@ declare class DateIntervalChangeDirective {
684
763
  private readonly destroyRef;
685
764
  constructor();
686
765
  /**
687
- * Handles `keyup` events on the host element.
688
- * Prevents default browser behaviour for the space key and forwards the event to the debounce pipeline.
766
+ * Handles `keydown` events on the host element.
767
+ * The space key must be blocked HERE: by the time `keyup` fires the character
768
+ * has already been inserted into the input, so `preventDefault` on `keyup`
769
+ * cannot stop it.
770
+ * @param e - The keyboard event emitted by the host input.
771
+ */
772
+ onKeydown(e: KeyboardEvent): void;
773
+ /**
774
+ * Handles `keyup` events on the host element and forwards them to the debounce pipeline.
689
775
  * @param e - The keyboard event emitted by the host input.
690
776
  */
691
777
  onKeyup(e: KeyboardEvent): void;
@@ -730,14 +816,29 @@ declare class EmailsValidatorDirective implements Validator {
730
816
  /**
731
817
  * Directive that validates that the host control's value equals the value of another control.
732
818
  * Bind `[equals]="otherControl"`.
819
+ *
820
+ * The host control is re-validated whenever the OTHER control's value changes:
821
+ * without this, typing a new password AFTER the confirmation field was filled
822
+ * left the form incorrectly valid (the classic password/confirm bug).
733
823
  */
734
824
  declare class EqualsValidatorDirective implements Validator {
735
825
  /** The control whose value must match the host control's value. */
736
826
  readonly equals: i0.InputSignal<AbstractControl<any, any, any>>;
827
+ /** Callback registered by Angular forms to re-run validation on the host control. */
828
+ private onValidatorChange?;
829
+ /** Subscription to the other control's valueChanges. */
830
+ private subscription?;
831
+ constructor();
832
+ /**
833
+ * Registers the callback Angular invokes to re-run this validator.
834
+ * @param fn - The revalidation callback provided by the forms API.
835
+ */
836
+ registerOnValidatorChange(fn: () => void): void;
737
837
  /**
738
838
  * Validates that the host control value equals the bound control's value.
739
839
  * Returns `null` (valid) when no control is bound.
740
840
  * @param control - The form control to validate.
841
+ * @returns `null` when valid, `{ equals: ... }` otherwise.
741
842
  */
742
843
  validate(control: AbstractControl): ValidationErrors | null;
743
844
  static ɵfac: i0.ɵɵFactoryDeclaration<EqualsValidatorDirective, never>;
@@ -815,15 +916,29 @@ declare class NotEmptyValidatorDirective implements Validator {
815
916
  /**
816
917
  * Directive that validates that the host control's value is different from another control's value.
817
918
  * Bind `[notEqual]="otherControl"`.
919
+ *
920
+ * The host control is re-validated whenever the OTHER control's value changes,
921
+ * so editing either field keeps both error states consistent.
818
922
  */
819
923
  declare class NotEqualValidatorDirective implements Validator {
820
924
  /** The control whose value must differ from the host control's value. */
821
925
  readonly notEqual: i0.InputSignal<AbstractControl<any, any, any>>;
926
+ /** Callback registered by Angular forms to re-run validation on the host control. */
927
+ private onValidatorChange?;
928
+ /** Subscription to the other control's valueChanges. */
929
+ private subscription?;
930
+ constructor();
931
+ /**
932
+ * Registers the callback Angular invokes to re-run this validator.
933
+ * @param fn - The revalidation callback provided by the forms API.
934
+ */
935
+ registerOnValidatorChange(fn: () => void): void;
822
936
  /**
823
937
  * Validates that the host control value is not equal to the bound control's value.
824
938
  * Also clears the `notequal` error on the other control when the host becomes valid.
825
939
  * Returns `null` (valid) when no control is bound.
826
940
  * @param control - The form control to validate.
941
+ * @returns `null` when valid, `{ notequal: true }` otherwise.
827
942
  */
828
943
  validate(control: AbstractControl): ValidationErrors | null;
829
944
  static ɵfac: i0.ɵɵFactoryDeclaration<NotEqualValidatorDirective, never>;
@@ -1008,6 +1123,11 @@ declare class FormatMarkdownPipe implements PipeTransform {
1008
1123
  * Usage: `{{ value | format:'currency' }}`
1009
1124
  */
1010
1125
  declare class FormatPipe implements PipeTransform {
1126
+ /** Shared formatters: building an `Intl.NumberFormat` per call is expensive. */
1127
+ private static readonly currencyFormat;
1128
+ private static readonly numberFormat;
1129
+ private static readonly number0Format;
1130
+ private static readonly percentFormat;
1011
1131
  /**
1012
1132
  * Formats a value according to the specified type and optional pattern.
1013
1133
  * Returns `undefined` when the value is `null` or `undefined`, or when the type is unrecognised.
@@ -1038,7 +1158,7 @@ declare class ReplacePipe implements PipeTransform {
1038
1158
  * @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\n'` and this is falsy.
1039
1159
  * @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.
1040
1160
  */
1041
- transform(value: string | undefined, regexValue: string, replaceValue: string): SafeHtml | undefined;
1161
+ transform(value: string | undefined, regexValue: string, replaceValue?: string): SafeHtml | undefined;
1042
1162
  static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
1043
1163
  static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
1044
1164
  }
@@ -1101,7 +1221,9 @@ declare class SearchCallbackPipe implements PipeTransform {
1101
1221
  }
1102
1222
 
1103
1223
  /**
1104
- * Impure pipe that filters an array of searchable items against a text query.
1224
+ * Pure pipe that filters an array of searchable items against a text query.
1225
+ * Note: being pure, it re-runs only when the array REFERENCE or the query
1226
+ * changes; mutate-in-place updates of the array are not detected.
1105
1227
  *
1106
1228
  * Each item is matched either via its `searchBag.name` property (when present)
1107
1229
  * or by converting the item itself to a lowercase string. The optional `metadata`
@@ -1129,16 +1251,6 @@ declare class SearchFilterPipe implements PipeTransform {
1129
1251
  static ɵpipe: i0.ɵɵPipeDeclaration<SearchFilterPipe, "search", true>;
1130
1252
  }
1131
1253
 
1132
- declare const Breakpoints: {
1133
- XXSmall: string;
1134
- XSmall: string;
1135
- Small: string;
1136
- SmallMedium: string;
1137
- Medium: string;
1138
- MediumLarge: string;
1139
- Large: string;
1140
- };
1141
-
1142
1254
  declare const UtilsMessages: {
1143
1255
  /**
1144
1256
  * Messages
@@ -1157,6 +1269,11 @@ declare class SelectableModel<T, V> {
1157
1269
  /**
1158
1270
  * Emits whenever the selection changes.
1159
1271
  * Carries the affected item, or `undefined` when the whole selection is cleared.
1272
+ *
1273
+ * Note: kept as `EventEmitter` (instead of a plain RxJS `Subject`) for
1274
+ * backward compatibility with existing consumers; `EventEmitter` extends
1275
+ * `Subject`, so `.subscribe()`, `pipe(...)` and `takeUntilDestroyed` all
1276
+ * work as expected.
1160
1277
  */
1161
1278
  readonly changed: EventEmitter<T>;
1162
1279
  private readonly _all;
@@ -1169,13 +1286,16 @@ declare class SelectableModel<T, V> {
1169
1286
  /** The underlying CDK `SelectionModel` (provides `.selected`, `.isSelected`, etc.). */
1170
1287
  get current(): SelectionModel<T>;
1171
1288
  private readonly _lookupFieldName;
1172
- /** Signal that is `true` when at least one item is selected. */
1289
+ /** Signal that is `true` when at least one item is tracked in the internal list. */
1173
1290
  readonly hasValue: i0.Signal<boolean>;
1291
+ /** Signal with the number of items currently tracked in the internal list. */
1292
+ readonly count: i0.Signal<number>;
1174
1293
  /**
1175
1294
  * @param allowMultiSelect - When `true` (default), multiple items can be selected simultaneously.
1176
- * @param lookupFieldName - Name of the note used as the unique key when searching the internal list (default: `'id'`).
1295
+ * @param lookupFieldName - Name of the field used as the unique key when searching the internal list
1296
+ * (default: `'id'`). Keys of `T` are autocompleted; plain strings remain accepted.
1177
1297
  */
1178
- constructor(allowMultiSelect?: boolean, lookupFieldName?: string);
1298
+ constructor(allowMultiSelect?: boolean, lookupFieldName?: KeyOf<T>);
1179
1299
  /**
1180
1300
  * Toggles the CDK selection state of an item that already exists in the tracked list.
1181
1301
  * Has no effect when `lookupValue` does not match any tracked item.
@@ -1229,6 +1349,7 @@ declare class SelectableModel<T, V> {
1229
1349
  * Standard Broadcast Messages Manager
1230
1350
  * https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
1231
1351
  */
1352
+
1232
1353
  /** The typed message payload exchanged over the broadcast channel. */
1233
1354
  interface BroadcastChannelMessageBag<T> {
1234
1355
  /** Unique identifier for the message type. */
@@ -1260,6 +1381,23 @@ declare class BroadcastChannelManager {
1260
1381
  * is not supported by the current browser.
1261
1382
  */
1262
1383
  get currentBus(): string | undefined;
1384
+ /**
1385
+ * Observable that emits EVERY message bag received on the channel,
1386
+ * regardless of `messageId`. Completed by {@link dispose}.
1387
+ * Prefer {@link observe} to listen for a single message type.
1388
+ */
1389
+ get messages(): Observable<BroadcastChannelMessageBag<unknown>>;
1390
+ /**
1391
+ * Returns a typed Observable that emits only the messages with the given `messageId`.
1392
+ *
1393
+ * Unlike {@link subscribe} (one callback per id, replaced on re-registration),
1394
+ * this supports any number of concurrent subscribers and integrates with the
1395
+ * RxJS lifecycle (`takeUntilDestroyed`, `async` pipe, ...). Completed by {@link dispose}.
1396
+ *
1397
+ * @param messageId - The message type identifier to listen for.
1398
+ * @returns An Observable of the matching typed message bags.
1399
+ */
1400
+ observe<T>(messageId: string): Observable<BroadcastChannelMessageBag<T>>;
1263
1401
  /**
1264
1402
  * Opens a `BroadcastChannel` with the given name (when the API is available).
1265
1403
  * @param bus - The channel name to open (default: `'ARS-CHANNEL'`).
@@ -1319,6 +1457,7 @@ declare class BroadcastChannelManager {
1319
1457
  unsubscribeAll(): void;
1320
1458
  }
1321
1459
 
1460
+ declare const CHANNEL_NAME = "D2693418-B18F-41BB-BAE9-41BB5407957A-CHANNEL";
1322
1461
  /** Payload carried by every in-process broadcast message. */
1323
1462
  interface BroadcastMessageInfo {
1324
1463
  /** Unique identifier for the message type. */
@@ -1342,7 +1481,7 @@ declare class BroadcastService implements OnDestroy {
1342
1481
  /**
1343
1482
  * Creates a new standalone `BroadcastChannelManager` instance bound to the shared ARS channel.
1344
1483
  * Useful when a caller needs direct channel access outside the service.
1345
- * @returns A new `BroadcastChannelManager` connected to `'ARS-CHANNEL'`.
1484
+ * @returns A new `BroadcastChannelManager` connected to `'D2693418-B18F-41BB-BAE9-41BB5407957A-CHANNEL'`.
1346
1485
  */
1347
1486
  static createChannel(): BroadcastChannelManager;
1348
1487
  ngOnDestroy(): void;
@@ -1371,11 +1510,25 @@ declare class BroadcastService implements OnDestroy {
1371
1510
  * @param id - The message type identifier whose subscription should be removed.
1372
1511
  */
1373
1512
  unsubscribeChannelMessage(id: string): void;
1513
+ /**
1514
+ * Returns a typed Observable of the cross-tab channel messages with the given `id`.
1515
+ * Supports multiple concurrent subscribers and the RxJS lifecycle operators,
1516
+ * unlike `subscribeChannelMessage` (single callback per id).
1517
+ * @param id - The message type identifier to listen for.
1518
+ * @returns An Observable of the matching typed message bags.
1519
+ */
1520
+ observeChannelMessage<T>(id: string): Observable<BroadcastChannelMessageBag<T>>;
1374
1521
  /**
1375
1522
  * Returns an `Observable` that emits every in-process message published via `sendMessage`.
1376
1523
  * @returns An observable stream of `BroadcastMessageInfo` objects.
1377
1524
  */
1378
1525
  getMessage(): Observable<BroadcastMessageInfo>;
1526
+ /**
1527
+ * Returns a typed `Observable` of the in-process messages with the given `id`.
1528
+ * @param id - The message type identifier to listen for.
1529
+ * @returns An Observable emitting the typed `data` payload of each matching message.
1530
+ */
1531
+ observeMessage<T>(id: string): Observable<T | undefined>;
1379
1532
  static ɵfac: i0.ɵɵFactoryDeclaration<BroadcastService, never>;
1380
1533
  static ɵprov: i0.ɵɵInjectableDeclaration<BroadcastService>;
1381
1534
  }
@@ -1557,5 +1710,5 @@ declare class ThemeService implements OnDestroy {
1557
1710
  static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
1558
1711
  }
1559
1712
 
1560
- export { AutoFocusDirective, Breakpoints, BroadcastChannelManager, BroadcastService, CopyClipboardDirective, DateFnsAdapter, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, EmailsValidatorDirective, EnvironmentService, EqualsValidatorDirective, FileInfo, FileSizeValidatorDirective, FormatHtmlPipe, FormatMarkdownPipe, FormatPipe, GroupModel, GuidValidatorDirective, IDModel, ImportModel, MAT_DATE_FNS_FORMATS, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, QueryModel, RelationModel, RemoveFocusDirective, ReplacePipe, SafeHtmlPipe, SafeUrlPipe, ScreenService, SearchCallbackPipe, SearchFilterPipe, SelectableModel, SplashService, SqlDateValidatorDirective, SystemUtils, ThemeService, TimeValidatorDirective, UpdateRelationsModel, UrlValidatorDirective, UtilsMessages, ValidIfDirective, ValidatorDirective, ValueModel, provideArsCore, provideArsDateFns };
1561
- export type { AddModel, AddResultModel, ApiResponse, ApiResult, BroadcastChannelMessageBag, BroadcastChannelSubscriberInfo, BroadcastMessageInfo, BroadcastMessageToastData, Checkable, DeleteResultModel, DoneResult, EnableDisableModel, ErrorInfo, File, Folder, FolderTree, INode, LoginResult, NameValueItem, PasswordStrength, QueryResultModel, SearchBag, SearchFilterMetadata, Searchable, SendToModel, ThemeType, UpdateModel, UpdateResultModel, Validated };
1713
+ export { AutoFocusDirective, BroadcastChannelManager, BroadcastService, CHANNEL_NAME, CopyClipboardDirective, DateFnsAdapter, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, EmailsValidatorDirective, EnvironmentService, EqualsValidatorDirective, FileInfo, FileSizeValidatorDirective, FormatHtmlPipe, FormatMarkdownPipe, FormatPipe, GroupModel, GuidValidatorDirective, IDModel, ImportModel, MAT_DATE_FNS_FORMATS, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, QueryModel, RelationModel, RemoveFocusDirective, ReplacePipe, SafeHtmlPipe, SafeUrlPipe, ScreenService, SearchCallbackPipe, SearchFilterPipe, SelectableModel, SplashService, SqlDateValidatorDirective, SystemUtils, ThemeService, TimeValidatorDirective, UpdateRelationsModel, UrlValidatorDirective, UtilsMessages, ValidIfDirective, ValidatorDirective, ValueModel, provideArsDateFns };
1714
+ export type { AddModel, AddResultModel, ApiResponse, ApiResult, BroadcastChannelMessageBag, BroadcastChannelSubscriberInfo, BroadcastMessageInfo, BroadcastMessageToastData, Checkable, DeleteResultModel, DoneResult, EnableDisableModel, ErrorInfo, File, Folder, FolderTree, INode, KeyOf, LoginResult, NameValueItem, PasswordStrength, QueryResultModel, SearchBag, SearchFilterMetadata, Searchable, SendToModel, ThemeType, UpdateModel, UpdateResultModel, Validated };
@@ -1,6 +1,11 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
 
3
3
  declare class TinymceUtils {
4
+ /**
5
+ * Returns `true` when the user agent currently prefers a dark color scheme.
6
+ * Evaluated on demand (not frozen at module load) and SSR-safe.
7
+ */
8
+ private static prefersDark;
4
9
  /** URL of the TinyMCE script hosted on the Tiny Cloud CDN. */
5
10
  static readonly CDN_URL = "https://cdn.tiny.cloud/1/5lnoc6ohmpjau6zyzgqyhyf52cueoennkcs8v1yfoak57ku9/tinymce/7/tinymce.min.js";
6
11
  /** URL of the locally bundled TinyMCE script. */
@@ -32,7 +37,6 @@ interface FullScreenEditorDialogData {
32
37
  infoButtonLabel?: string;
33
38
  onShowInfo?: Function;
34
39
  disabled?: boolean;
35
- useCDN?: boolean;
36
40
  }
37
41
  declare class FullScreenEditorComponent {
38
42
  /** Emitted with the edited text when the user saves. */
@@ -1,7 +1,7 @@
1
- import * as _angular_core from '@angular/core';
2
- import { EnvironmentProviders, OnDestroy, AfterViewInit, DoCheck, ElementRef } from '@angular/core';
3
1
  import { INode, Searchable, SearchBag, NameValueItem, DateInterval, SearchFilterMetadata, FileInfo } from '@arsedizioni/ars-utils/core';
4
2
  import { MatFormFieldAppearance, MatFormFieldControl } from '@angular/material/form-field';
3
+ import * as _angular_core from '@angular/core';
4
+ import { OnDestroy, AfterViewInit, DoCheck, ElementRef } from '@angular/core';
5
5
  import { MatDialogRef } from '@angular/material/dialog';
6
6
  import { DialogService } from '@arsedizioni/ars-utils/ui';
7
7
  import * as rxjs from 'rxjs';
@@ -12,19 +12,6 @@ import { MatCheckboxChange } from '@angular/material/checkbox';
12
12
  import { MatSelectionList, MatSelectionListChange } from '@angular/material/list';
13
13
  import { MatPaginator, PageEvent } from '@angular/material/paginator';
14
14
 
15
- /**
16
- * Standalone providers for the ars-utils "application" UI layer.
17
- *
18
- * Single source of truth for the environment-level configuration of this entry point.
19
- * Use it in a standalone bootstrap instead of importing ArsUIApplicationModule:
20
- *
21
- * @example
22
- * bootstrapApplication(AppComponent, {
23
- * providers: [provideArsUIApplication()]
24
- * });
25
- */
26
- declare function provideArsUIApplication(): EnvironmentProviders;
27
-
28
15
  interface SendToDialogData {
29
16
  count: number;
30
17
  canPopulate?: boolean;
@@ -860,6 +847,14 @@ declare class ButtonSelectorComponent implements OnDestroy, ControlValueAccessor
860
847
  private focused;
861
848
  private _value;
862
849
  set value(value: NameValueItem<any> | undefined);
850
+ /**
851
+ * Updates the internal state. Form propagation is skipped for model->view
852
+ * writes (writeValue) to avoid the CVA echo loop, and performed for
853
+ * user/programmatic changes via the `value` setter.
854
+ * @param value - The new value to store and display.
855
+ * @param propagate - When `true`, notifies the registered onChange callback.
856
+ */
857
+ private setValue;
863
858
  /** The current value as the selected item. */
864
859
  get value(): NameValueItem<any> | undefined;
865
860
  private _disabled;
@@ -990,6 +985,8 @@ declare class ChipsSelectorComponent implements OnDestroy, ControlValueAccessor
990
985
  private readonly stateChanges;
991
986
  private readonly destroyRef;
992
987
  private changesEnabled;
988
+ private destroyed;
989
+ private widthRetries;
993
990
  /** Observer that tracks size changes of the container element. */
994
991
  private resizeObserver?;
995
992
  /** Debounce bridge for `ResizeObserver` notifications. */
@@ -1030,6 +1027,12 @@ declare class ChipsSelectorComponent implements OnDestroy, ControlValueAccessor
1030
1027
  get shouldLabelFloat(): boolean;
1031
1028
  private _value?;
1032
1029
  set value(value: NameValueItem<any>[] | undefined);
1030
+ /**
1031
+ * Updates the internal state and selection mirrors.
1032
+ * @param value - The new selection array.
1033
+ * @param propagate - When `true`, notifies the registered onChange callback.
1034
+ */
1035
+ private setValue;
1033
1036
  /** The current value as an array of selected items. */
1034
1037
  get value(): NameValueItem<any>[] | undefined;
1035
1038
  /** True when no item is selected. */
@@ -1481,6 +1484,8 @@ declare class ResizeTableColumnDirective {
1481
1484
  private readonly column;
1482
1485
  private table;
1483
1486
  private pressed;
1487
+ /** Unlisten callbacks returned by renderer.listen, disposed on destroy. */
1488
+ private readonly unlisteners;
1484
1489
  constructor();
1485
1490
  /**
1486
1491
  * Record the drag start position and initial column width.
@@ -1500,5 +1505,5 @@ declare class ResizeTableColumnDirective {
1500
1505
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ResizeTableColumnDirective, "[resizeColumn]", never, { "resizable": { "alias": "resizeColumn"; "required": false; "isSignal": true; }; "index": { "alias": "index"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1501
1506
  }
1502
1507
 
1503
- export { ApplicationDialogService, ButtonSelectorComponent, ButtonToggleComponent, CalendarEmptyHeader, ChipsSelectorComponent, CurrentFilter, CurrentFilterChanged, CurrentFilterItem, FileInputComponent, FilePreviewComponent, FilterBarComponent, Filters, ItemNode, PromptDateDialogComponent, PromptDialogComponent, PromptDialogType, PromptOtpDialogComponent, PromptTimeDialogComponent, ResizeTableColumnDirective, SelectDialogComponent, SelectFileDialogComponent, SelectPictureDialogComponent, SelectTreeDialogComponent, SelectableItem, SelectableNode, SendToDialogComponent, TreeDataSource, TreePickerComponent, provideArsUIApplication };
1508
+ export { ApplicationDialogService, ButtonSelectorComponent, ButtonToggleComponent, CalendarEmptyHeader, ChipsSelectorComponent, CurrentFilter, CurrentFilterChanged, CurrentFilterItem, FileInputComponent, FilePreviewComponent, FilterBarComponent, Filters, ItemNode, PromptDateDialogComponent, PromptDialogComponent, PromptDialogType, PromptOtpDialogComponent, PromptTimeDialogComponent, ResizeTableColumnDirective, SelectDialogComponent, SelectFileDialogComponent, SelectPictureDialogComponent, SelectTreeDialogComponent, SelectableItem, SelectableNode, SendToDialogComponent, TreeDataSource, TreePickerComponent };
1504
1509
  export type { ButtonToggleInfo, FilePreviewDialogData, FilterGroup, FilterItem, ISelectableItem, PromptDateDialogResult, PromptDialogData, PromptDialogResult, PromptOtpDialogResult, PromptTimeDialogData, SelectDialogAppend, SelectDialogData, SelectDialogDelete, SelectDialogEdit, SelectDialogFilter, SelectDialogLookup, SelectDialogResult, SelectFile, SelectFileDialogData, SelectFileOption, SelectPictureFileDialogData, SelectTreeDialogAppend, SelectTreeDialogData, SelectTreeDialogResult, SelectableFilter, SendToDialogData, SendToDialogResult, SendToPopulateData };