@arsedizioni/ars-utils 22.0.20 → 22.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +2558 -2214
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +24 -22
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +129 -98
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +3228 -3055
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +63 -47
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1 -0
- package/types/arsedizioni-ars-utils-core.d.ts +227 -39
- package/types/arsedizioni-ars-utils-tinymce.d.ts +5 -1
- package/types/arsedizioni-ars-utils-ui.application.d.ts +21 -16
- package/types/arsedizioni-ars-utils-ui.d.ts +102 -146
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +7 -1
|
@@ -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,
|
|
@@ -160,17 +145,17 @@ declare class DateFnsAdapter extends DateAdapter<Date, Locale> {
|
|
|
160
145
|
static ɵprov: i0.ɵɵInjectableDeclaration<DateFnsAdapter>;
|
|
161
146
|
}
|
|
162
147
|
/**
|
|
163
|
-
* Standalone providers for the
|
|
148
|
+
* Standalone providers for the scm-utils date-fns adapter.
|
|
164
149
|
*
|
|
165
150
|
* Configures Angular Material to use {@link DateFnsAdapter} (Europe/Rome timezone)
|
|
166
151
|
* and the matching {@link MAT_DATE_FNS_FORMATS}.
|
|
167
152
|
*
|
|
168
153
|
* @example
|
|
169
154
|
* bootstrapApplication(AppComponent, {
|
|
170
|
-
* providers: [
|
|
155
|
+
* providers: [provideSCMDateFns()]
|
|
171
156
|
* });
|
|
172
157
|
*/
|
|
173
|
-
declare function
|
|
158
|
+
declare function provideSCMDateFns(): EnvironmentProviders;
|
|
174
159
|
|
|
175
160
|
/**
|
|
176
161
|
* Directive that moves browser focus to the host element after the first render cycle.
|
|
@@ -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:
|
|
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:
|
|
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
|
-
*
|
|
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:
|
|
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
|
-
*
|
|
325
|
-
*
|
|
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
|
|
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
|
|
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 `
|
|
688
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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`
|
|
@@ -1137,6 +1259,7 @@ declare const Breakpoints: {
|
|
|
1137
1259
|
Medium: string;
|
|
1138
1260
|
MediumLarge: string;
|
|
1139
1261
|
Large: string;
|
|
1262
|
+
XLarge: string;
|
|
1140
1263
|
};
|
|
1141
1264
|
|
|
1142
1265
|
declare const UtilsMessages: {
|
|
@@ -1157,6 +1280,11 @@ declare class SelectableModel<T, V> {
|
|
|
1157
1280
|
/**
|
|
1158
1281
|
* Emits whenever the selection changes.
|
|
1159
1282
|
* Carries the affected item, or `undefined` when the whole selection is cleared.
|
|
1283
|
+
*
|
|
1284
|
+
* Note: kept as `EventEmitter` (instead of a plain RxJS `Subject`) for
|
|
1285
|
+
* backward compatibility with existing consumers; `EventEmitter` extends
|
|
1286
|
+
* `Subject`, so `.subscribe()`, `pipe(...)` and `takeUntilDestroyed` all
|
|
1287
|
+
* work as expected.
|
|
1160
1288
|
*/
|
|
1161
1289
|
readonly changed: EventEmitter<T>;
|
|
1162
1290
|
private readonly _all;
|
|
@@ -1169,13 +1297,16 @@ declare class SelectableModel<T, V> {
|
|
|
1169
1297
|
/** The underlying CDK `SelectionModel` (provides `.selected`, `.isSelected`, etc.). */
|
|
1170
1298
|
get current(): SelectionModel<T>;
|
|
1171
1299
|
private readonly _lookupFieldName;
|
|
1172
|
-
/** Signal that is `true` when at least one item is
|
|
1300
|
+
/** Signal that is `true` when at least one item is tracked in the internal list. */
|
|
1173
1301
|
readonly hasValue: i0.Signal<boolean>;
|
|
1302
|
+
/** Signal with the number of items currently tracked in the internal list. */
|
|
1303
|
+
readonly count: i0.Signal<number>;
|
|
1174
1304
|
/**
|
|
1175
1305
|
* @param allowMultiSelect - When `true` (default), multiple items can be selected simultaneously.
|
|
1176
|
-
* @param lookupFieldName - Name of the
|
|
1306
|
+
* @param lookupFieldName - Name of the field used as the unique key when searching the internal list
|
|
1307
|
+
* (default: `'id'`). Keys of `T` are autocompleted; plain strings remain accepted.
|
|
1177
1308
|
*/
|
|
1178
|
-
constructor(allowMultiSelect?: boolean, lookupFieldName?:
|
|
1309
|
+
constructor(allowMultiSelect?: boolean, lookupFieldName?: KeyOf<T>);
|
|
1179
1310
|
/**
|
|
1180
1311
|
* Toggles the CDK selection state of an item that already exists in the tracked list.
|
|
1181
1312
|
* Has no effect when `lookupValue` does not match any tracked item.
|
|
@@ -1229,6 +1360,7 @@ declare class SelectableModel<T, V> {
|
|
|
1229
1360
|
* Standard Broadcast Messages Manager
|
|
1230
1361
|
* https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
|
|
1231
1362
|
*/
|
|
1363
|
+
|
|
1232
1364
|
/** The typed message payload exchanged over the broadcast channel. */
|
|
1233
1365
|
interface BroadcastChannelMessageBag<T> {
|
|
1234
1366
|
/** Unique identifier for the message type. */
|
|
@@ -1260,6 +1392,23 @@ declare class BroadcastChannelManager {
|
|
|
1260
1392
|
* is not supported by the current browser.
|
|
1261
1393
|
*/
|
|
1262
1394
|
get currentBus(): string | undefined;
|
|
1395
|
+
/**
|
|
1396
|
+
* Observable that emits EVERY message bag received on the channel,
|
|
1397
|
+
* regardless of `messageId`. Completed by {@link dispose}.
|
|
1398
|
+
* Prefer {@link observe} to listen for a single message type.
|
|
1399
|
+
*/
|
|
1400
|
+
get messages(): Observable<BroadcastChannelMessageBag<unknown>>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Returns a typed Observable that emits only the messages with the given `messageId`.
|
|
1403
|
+
*
|
|
1404
|
+
* Unlike {@link subscribe} (one callback per id, replaced on re-registration),
|
|
1405
|
+
* this supports any number of concurrent subscribers and integrates with the
|
|
1406
|
+
* RxJS lifecycle (`takeUntilDestroyed`, `async` pipe, ...). Completed by {@link dispose}.
|
|
1407
|
+
*
|
|
1408
|
+
* @param messageId - The message type identifier to listen for.
|
|
1409
|
+
* @returns An Observable of the matching typed message bags.
|
|
1410
|
+
*/
|
|
1411
|
+
observe<T>(messageId: string): Observable<BroadcastChannelMessageBag<T>>;
|
|
1263
1412
|
/**
|
|
1264
1413
|
* Opens a `BroadcastChannel` with the given name (when the API is available).
|
|
1265
1414
|
* @param bus - The channel name to open (default: `'ARS-CHANNEL'`).
|
|
@@ -1371,11 +1520,25 @@ declare class BroadcastService implements OnDestroy {
|
|
|
1371
1520
|
* @param id - The message type identifier whose subscription should be removed.
|
|
1372
1521
|
*/
|
|
1373
1522
|
unsubscribeChannelMessage(id: string): void;
|
|
1523
|
+
/**
|
|
1524
|
+
* Returns a typed Observable of the cross-tab channel messages with the given `id`.
|
|
1525
|
+
* Supports multiple concurrent subscribers and the RxJS lifecycle operators,
|
|
1526
|
+
* unlike `subscribeChannelMessage` (single callback per id).
|
|
1527
|
+
* @param id - The message type identifier to listen for.
|
|
1528
|
+
* @returns An Observable of the matching typed message bags.
|
|
1529
|
+
*/
|
|
1530
|
+
observeChannelMessage<T>(id: string): Observable<BroadcastChannelMessageBag<T>>;
|
|
1374
1531
|
/**
|
|
1375
1532
|
* Returns an `Observable` that emits every in-process message published via `sendMessage`.
|
|
1376
1533
|
* @returns An observable stream of `BroadcastMessageInfo` objects.
|
|
1377
1534
|
*/
|
|
1378
1535
|
getMessage(): Observable<BroadcastMessageInfo>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Returns a typed `Observable` of the in-process messages with the given `id`.
|
|
1538
|
+
* @param id - The message type identifier to listen for.
|
|
1539
|
+
* @returns An Observable emitting the typed `data` payload of each matching message.
|
|
1540
|
+
*/
|
|
1541
|
+
observeMessage<T>(id: string): Observable<T | undefined>;
|
|
1379
1542
|
static ɵfac: i0.ɵɵFactoryDeclaration<BroadcastService, never>;
|
|
1380
1543
|
static ɵprov: i0.ɵɵInjectableDeclaration<BroadcastService>;
|
|
1381
1544
|
}
|
|
@@ -1452,6 +1615,31 @@ declare class ScreenService {
|
|
|
1452
1615
|
static ɵprov: i0.ɵɵInjectableDeclaration<ScreenService>;
|
|
1453
1616
|
}
|
|
1454
1617
|
|
|
1618
|
+
declare class SplashService {
|
|
1619
|
+
private readonly isBrowser;
|
|
1620
|
+
/**
|
|
1621
|
+
* Resolve the global splash API exposed by index.html.
|
|
1622
|
+
* @returns The API object, or `undefined` when the splash has already
|
|
1623
|
+
* been removed or when running in SSR.
|
|
1624
|
+
*/
|
|
1625
|
+
private get api();
|
|
1626
|
+
/**
|
|
1627
|
+
* Update the splash message (e.g. "Accesso in corso...").
|
|
1628
|
+
* No-op when the splash is gone or in SSR.
|
|
1629
|
+
* @param text - The new message to display.
|
|
1630
|
+
*/
|
|
1631
|
+
setMessage(text: string): void;
|
|
1632
|
+
/**
|
|
1633
|
+
* Defuse the watchdog: Angular bootstrap succeeded,
|
|
1634
|
+
* no automatic reload will ever fire.
|
|
1635
|
+
*/
|
|
1636
|
+
bootstrapped(): void;
|
|
1637
|
+
/** Fade out and remove the splash overlay from the DOM. */
|
|
1638
|
+
hide(): void;
|
|
1639
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SplashService, never>;
|
|
1640
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SplashService>;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1455
1643
|
/** The three available theme modes: follow system preference, force light, or force dark. */
|
|
1456
1644
|
type ThemeType = 'auto' | 'light' | 'dark';
|
|
1457
1645
|
/**
|
|
@@ -1532,5 +1720,5 @@ declare class ThemeService implements OnDestroy {
|
|
|
1532
1720
|
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
|
|
1533
1721
|
}
|
|
1534
1722
|
|
|
1535
|
-
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, SqlDateValidatorDirective, SystemUtils, ThemeService, TimeValidatorDirective, UpdateRelationsModel, UrlValidatorDirective, UtilsMessages, ValidIfDirective, ValidatorDirective, ValueModel,
|
|
1536
|
-
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 };
|
|
1723
|
+
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, provideSCMDateFns };
|
|
1724
|
+
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
|
|
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 };
|