@arsedizioni/ars-utils 22.0.23 → 22.0.30
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-core.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +23 -91
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-core.d.ts +917 -917
- package/types/arsedizioni-ars-utils-ui.application.d.ts +9 -34
|
@@ -178,1077 +178,1077 @@ interface INode {
|
|
|
178
178
|
level?: number;
|
|
179
179
|
bag?: unknown;
|
|
180
180
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
181
|
+
interface DoneResult<T> {
|
|
182
|
+
isNew?: boolean;
|
|
183
|
+
data?: T;
|
|
184
|
+
}
|
|
185
|
+
interface ApiResponse {
|
|
186
|
+
success: boolean;
|
|
187
|
+
message: string;
|
|
188
|
+
}
|
|
189
|
+
interface ApiResult<T> extends ApiResponse {
|
|
190
|
+
value: T;
|
|
191
|
+
}
|
|
192
|
+
interface Folder extends INode {
|
|
193
|
+
teamId?: string;
|
|
194
|
+
parentId?: string;
|
|
195
|
+
position?: number;
|
|
196
|
+
isPrivate?: boolean;
|
|
197
|
+
itemsCount?: number;
|
|
198
|
+
subItemsCount?: number;
|
|
199
|
+
}
|
|
200
|
+
interface FolderTree extends Folder {
|
|
201
|
+
children?: Folder[];
|
|
202
|
+
path?: string;
|
|
203
|
+
}
|
|
204
|
+
interface File<T> {
|
|
205
|
+
ownerId?: T;
|
|
206
|
+
id?: number;
|
|
207
|
+
fileName: string;
|
|
208
|
+
fileData: unknown;
|
|
209
|
+
}
|
|
210
|
+
interface Validated {
|
|
211
|
+
isValid(): boolean;
|
|
212
|
+
}
|
|
213
|
+
declare class FileInfo implements Validated {
|
|
214
|
+
file: any;
|
|
215
|
+
valid: boolean;
|
|
216
|
+
isValid(): boolean;
|
|
217
|
+
}
|
|
218
|
+
interface ErrorInfo {
|
|
219
|
+
invalidateSession?: boolean;
|
|
220
|
+
title?: string;
|
|
221
|
+
message?: string;
|
|
222
|
+
errorStatus?: number;
|
|
223
|
+
service?: string;
|
|
224
|
+
}
|
|
225
|
+
interface NameValueItem<T> {
|
|
226
|
+
name: string;
|
|
227
|
+
value: T;
|
|
228
|
+
shortName?: string;
|
|
229
|
+
parentName?: string;
|
|
230
|
+
parentValue?: T;
|
|
231
|
+
header?: string;
|
|
232
|
+
bag?: any;
|
|
233
|
+
bagInfo?: string;
|
|
234
|
+
disabled?: boolean;
|
|
235
|
+
selected?: boolean;
|
|
236
|
+
}
|
|
237
|
+
interface Checkable {
|
|
238
|
+
checked?: boolean;
|
|
239
|
+
bag: unknown;
|
|
240
|
+
getId(): unknown;
|
|
241
|
+
}
|
|
242
|
+
declare class ValueModel<T> {
|
|
243
|
+
value: T;
|
|
244
|
+
}
|
|
245
|
+
declare class IDModel<T = number> {
|
|
246
|
+
id: T;
|
|
247
|
+
}
|
|
248
|
+
declare class GroupModel<T = number> {
|
|
249
|
+
ids: T[];
|
|
250
|
+
}
|
|
251
|
+
declare class DeleteModel<T = number> extends GroupModel<T> {
|
|
252
|
+
mode?: number;
|
|
253
|
+
parentId?: T;
|
|
254
|
+
}
|
|
255
|
+
interface DeleteResultModel<T> {
|
|
256
|
+
items?: T[];
|
|
257
|
+
deleted: number;
|
|
258
|
+
total: number;
|
|
259
|
+
log?: string;
|
|
260
|
+
}
|
|
261
|
+
declare class RelationModel<T = number> {
|
|
262
|
+
id: T;
|
|
263
|
+
parentId: T;
|
|
264
|
+
}
|
|
265
|
+
declare class UpdateRelationsModel<T = number> {
|
|
266
|
+
id: T;
|
|
267
|
+
relatedIds: T[];
|
|
268
|
+
}
|
|
269
|
+
declare class QueryModel {
|
|
270
|
+
any?: string;
|
|
271
|
+
sortBy?: string;
|
|
272
|
+
sortDescending?: boolean;
|
|
273
|
+
first?: number;
|
|
274
|
+
count?: number;
|
|
275
|
+
}
|
|
276
|
+
interface QueryResultModel<T> {
|
|
277
|
+
interval?: string;
|
|
278
|
+
items: T[];
|
|
279
|
+
total: number;
|
|
280
|
+
}
|
|
281
|
+
interface UpdateModel<T = number> {
|
|
282
|
+
parentId?: T;
|
|
283
|
+
ids: T[];
|
|
284
|
+
}
|
|
285
|
+
interface UpdateResultModel<T> {
|
|
286
|
+
items?: T[];
|
|
287
|
+
updated: number;
|
|
288
|
+
total: number;
|
|
289
|
+
log?: string;
|
|
290
|
+
}
|
|
291
|
+
interface AddModel<T> extends UpdateModel<T> {
|
|
292
|
+
}
|
|
293
|
+
interface AddResultModel<T> {
|
|
294
|
+
items?: T[];
|
|
295
|
+
added: number;
|
|
296
|
+
total: number;
|
|
297
|
+
log?: string;
|
|
298
|
+
}
|
|
299
|
+
declare class ImportModel {
|
|
300
|
+
origin: string;
|
|
301
|
+
dataFile: FileInfo;
|
|
302
|
+
jumpFirstLine?: boolean;
|
|
303
|
+
map?: unknown;
|
|
304
|
+
}
|
|
305
|
+
interface EnableDisableModel {
|
|
306
|
+
value: boolean;
|
|
307
|
+
}
|
|
308
|
+
interface SendToModel {
|
|
309
|
+
sendToRecipients?: string;
|
|
310
|
+
sendToSubject?: string;
|
|
311
|
+
sendToText?: string;
|
|
312
|
+
}
|
|
313
|
+
interface SearchBag {
|
|
314
|
+
name: string;
|
|
315
|
+
}
|
|
316
|
+
interface Searchable {
|
|
317
|
+
searchBag: SearchBag;
|
|
318
|
+
}
|
|
319
|
+
interface SearchFilterMetadata {
|
|
320
|
+
total: number;
|
|
321
|
+
count: number;
|
|
322
|
+
}
|
|
323
|
+
declare class DateInterval {
|
|
324
|
+
from?: Date;
|
|
325
|
+
to?: Date;
|
|
326
|
+
get fromAsDate(): Date | undefined;
|
|
327
|
+
get toAsDate(): Date | undefined;
|
|
328
|
+
constructor(from?: Date, to?: Date);
|
|
329
|
+
clear(): void;
|
|
330
|
+
}
|
|
331
|
+
interface LoginResult<T> extends ApiResult<boolean> {
|
|
332
|
+
context: T;
|
|
333
|
+
oauth?: number;
|
|
334
|
+
requiresMfa?: boolean;
|
|
194
335
|
}
|
|
336
|
+
|
|
195
337
|
/**
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
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.
|
|
338
|
+
* Directive that listens to `keyup` events on a date input and debounces changes
|
|
339
|
+
* into a {@link DateInterval} model, converting shorthand strings (e.g. "d/m") to dates.
|
|
340
|
+
* Apply `[dateIntervalChange]="interval"` to the host `<input>` element.
|
|
202
341
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
declare class SystemUtils {
|
|
212
|
-
/** Shared collator for locale-aware, case-insensitive string comparison. */
|
|
213
|
-
private static readonly collator;
|
|
342
|
+
declare class DateIntervalChangeDirective {
|
|
343
|
+
/** The date interval model to update when the input value changes. */
|
|
344
|
+
readonly dateIntervalChange: i0.InputSignal<DateInterval>;
|
|
345
|
+
/** When `true`, the directive updates the interval's end date; otherwise the start date. */
|
|
346
|
+
readonly end: i0.InputSignal<boolean>;
|
|
347
|
+
private readonly subject;
|
|
348
|
+
private readonly destroyRef;
|
|
349
|
+
constructor();
|
|
214
350
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* @
|
|
351
|
+
* Handles `keydown` events on the host element.
|
|
352
|
+
* The space key must be blocked HERE: by the time `keyup` fires the character
|
|
353
|
+
* has already been inserted into the input, so `preventDefault` on `keyup`
|
|
354
|
+
* cannot stop it.
|
|
355
|
+
* @param e - The keyboard event emitted by the host input.
|
|
220
356
|
*/
|
|
221
|
-
|
|
357
|
+
onKeydown(e: KeyboardEvent): void;
|
|
222
358
|
/**
|
|
223
|
-
*
|
|
224
|
-
* @param
|
|
225
|
-
* @param key : the key name
|
|
226
|
-
* @param value : the value to search for
|
|
227
|
-
* @returns : the array index or -1 if not found
|
|
359
|
+
* Handles `keyup` events on the host element and forwards them to the debounce pipeline.
|
|
360
|
+
* @param e - The keyboard event emitted by the host input.
|
|
228
361
|
*/
|
|
229
|
-
|
|
362
|
+
onKeyup(e: KeyboardEvent): void;
|
|
363
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DateIntervalChangeDirective, never>;
|
|
364
|
+
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>;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Directive that copies a string payload to the clipboard when the host element is clicked.
|
|
369
|
+
* Bind `[copyClipboard]="text"` to provide the content to copy and listen to `(copied)` for confirmation.
|
|
370
|
+
*/
|
|
371
|
+
declare class CopyClipboardDirective {
|
|
372
|
+
/** The text to copy to the clipboard. Bound via the `copyClipboard` attribute. */
|
|
373
|
+
readonly payload: i0.InputSignal<string>;
|
|
374
|
+
/** Emits the copied text after a successful copy operation. */
|
|
375
|
+
readonly copied: i0.OutputEmitterRef<string>;
|
|
230
376
|
/**
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* @param
|
|
234
|
-
* @returns : the property value or null if not found
|
|
377
|
+
* Handles click events on the host element and copies the payload to the clipboard.
|
|
378
|
+
* Emits `copied` with the copied text on success.
|
|
379
|
+
* @param e - The mouse click event.
|
|
235
380
|
*/
|
|
236
|
-
|
|
381
|
+
onClick(e: MouseEvent): void;
|
|
382
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CopyClipboardDirective, never>;
|
|
383
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CopyClipboardDirective, "[copyClipboard]", never, { "payload": { "alias": "copyClipboard"; "required": false; "isSignal": true; }; }, { "copied": "copied"; }, never, never, true, never>;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Directive that validates a semicolon-separated list of email addresses.
|
|
388
|
+
* Apply `emails` to a text input containing one or more addresses separated by `;`.
|
|
389
|
+
*/
|
|
390
|
+
declare class EmailsValidatorDirective implements Validator {
|
|
237
391
|
/**
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
* @param
|
|
241
|
-
* @returns : an array of INode objects
|
|
392
|
+
* Validates each address in a semicolon-separated email list.
|
|
393
|
+
* Returns `null` when the control is empty.
|
|
394
|
+
* @param control - The form control to validate.
|
|
242
395
|
*/
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
396
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
397
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailsValidatorDirective, never>;
|
|
398
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailsValidatorDirective, "[emails]", never, {}, {}, never, never, true, never>;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Directive that validates that the host control's value equals the value of another control.
|
|
403
|
+
* Bind `[equals]="otherControl"`.
|
|
404
|
+
*
|
|
405
|
+
* The host control is re-validated whenever the OTHER control's value changes:
|
|
406
|
+
* without this, typing a new password AFTER the confirmation field was filled
|
|
407
|
+
* left the form incorrectly valid (the classic password/confirm bug).
|
|
408
|
+
*/
|
|
409
|
+
declare class EqualsValidatorDirective implements Validator {
|
|
410
|
+
/** The control whose value must match the host control's value. */
|
|
411
|
+
readonly equals: i0.InputSignal<AbstractControl<any, any, any>>;
|
|
412
|
+
/** Callback registered by Angular forms to re-run validation on the host control. */
|
|
413
|
+
private onValidatorChange?;
|
|
414
|
+
/** Subscription to the other control's valueChanges. */
|
|
415
|
+
private subscription?;
|
|
416
|
+
constructor();
|
|
253
417
|
/**
|
|
254
|
-
*
|
|
255
|
-
* @param
|
|
256
|
-
* @returns : the formatted string
|
|
418
|
+
* Registers the callback Angular invokes to re-run this validator.
|
|
419
|
+
* @param fn - The revalidation callback provided by the forms API.
|
|
257
420
|
*/
|
|
258
|
-
|
|
421
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
259
422
|
/**
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
* @
|
|
423
|
+
* Validates that the host control value equals the bound control's value.
|
|
424
|
+
* Returns `null` (valid) when no control is bound.
|
|
425
|
+
* @param control - The form control to validate.
|
|
426
|
+
* @returns `null` when valid, `{ equals: ... }` otherwise.
|
|
263
427
|
*/
|
|
264
|
-
|
|
428
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
429
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EqualsValidatorDirective, never>;
|
|
430
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EqualsValidatorDirective, "[equals]", never, { "equals": { "alias": "equals"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Directive that validates a file size against configurable minimum and maximum bounds.
|
|
435
|
+
* Bind `[fileSize]` together with `[size]="fileSizeInMb"`, `[maxSizeMb]`, and `[minSizeMb]`.
|
|
436
|
+
*/
|
|
437
|
+
declare class FileSizeValidatorDirective implements Validator {
|
|
438
|
+
/** Maximum allowed file size in megabytes. Defaults to 5. */
|
|
439
|
+
readonly maxSizeMb: i0.InputSignal<number>;
|
|
440
|
+
/** Minimum required file size in megabytes. Defaults to 0. */
|
|
441
|
+
readonly minSizeMb: i0.InputSignal<number>;
|
|
442
|
+
/** The actual file size in megabytes to validate against the bounds. */
|
|
443
|
+
readonly size: i0.InputSignal<number>;
|
|
265
444
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* @param
|
|
269
|
-
* @returns : 0 if equals, 1 if bigger, -1 if lower
|
|
445
|
+
* Validates that the bound file size falls within the configured min/max range.
|
|
446
|
+
* Returns `null` when no control value is present.
|
|
447
|
+
* @param control - The form control to validate.
|
|
270
448
|
*/
|
|
271
|
-
|
|
449
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
450
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileSizeValidatorDirective, never>;
|
|
451
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileSizeValidatorDirective, "[fileSize]", never, { "maxSizeMb": { "alias": "maxSizeMb"; "required": false; "isSignal": true; }; "minSizeMb": { "alias": "minSizeMb"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Directive that validates a control value as a GUID / UUID string.
|
|
456
|
+
* Apply `guid` to a text input that expects a valid UUID.
|
|
457
|
+
*/
|
|
458
|
+
declare class GuidValidatorDirective implements Validator {
|
|
272
459
|
/**
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* @
|
|
460
|
+
* Validates that the control value is a well-formed GUID / UUID.
|
|
461
|
+
* Returns `null` when the control is empty.
|
|
462
|
+
* @param control - The form control to validate.
|
|
276
463
|
*/
|
|
277
|
-
|
|
464
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
465
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GuidValidatorDirective, never>;
|
|
466
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<GuidValidatorDirective, "[guid]", never, {}, {}, never, never, true, never>;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Directive that validates that a control value does not exceed a maximum word count.
|
|
471
|
+
* Bind `[maxTerms]="10"` to allow at most 10 whitespace-separated terms.
|
|
472
|
+
*/
|
|
473
|
+
declare class MaxTermsValidatorDirective implements Validator {
|
|
474
|
+
/** The maximum number of whitespace-separated terms allowed. */
|
|
475
|
+
readonly maxTerms: i0.InputSignal<number>;
|
|
278
476
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* @param
|
|
282
|
-
* @returns : the truncated string
|
|
477
|
+
* Validates that the control value contains no more than the configured number of terms.
|
|
478
|
+
* Returns `null` when the control is empty.
|
|
479
|
+
* @param control - The form control to validate.
|
|
283
480
|
*/
|
|
284
|
-
|
|
481
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
482
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MaxTermsValidatorDirective, never>;
|
|
483
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxTermsValidatorDirective, "[maxTerms]", never, { "maxTerms": { "alias": "maxTerms"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Directive that validates that a string control value is not blank (whitespace-only).
|
|
488
|
+
* Apply `notEmpty` to a text input where non-blank content is required.
|
|
489
|
+
*/
|
|
490
|
+
declare class NotEmptyValidatorDirective implements Validator {
|
|
285
491
|
/**
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* @param
|
|
289
|
-
* @param max : the maximum resulting string
|
|
290
|
-
* @returns : the joined string
|
|
492
|
+
* Validates that the control value is a non-blank string.
|
|
493
|
+
* Returns `null` when the control is empty or not a string.
|
|
494
|
+
* @param control - The form control to validate.
|
|
291
495
|
*/
|
|
292
|
-
|
|
496
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
497
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotEmptyValidatorDirective, never>;
|
|
498
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NotEmptyValidatorDirective, "[notEmpty]", never, {}, {}, never, never, true, never>;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Directive that validates that the host control's value is different from another control's value.
|
|
503
|
+
* Bind `[notEqual]="otherControl"`.
|
|
504
|
+
*
|
|
505
|
+
* The host control is re-validated whenever the OTHER control's value changes,
|
|
506
|
+
* so editing either field keeps both error states consistent.
|
|
507
|
+
*/
|
|
508
|
+
declare class NotEqualValidatorDirective implements Validator {
|
|
509
|
+
/** The control whose value must differ from the host control's value. */
|
|
510
|
+
readonly notEqual: i0.InputSignal<AbstractControl<any, any, any>>;
|
|
511
|
+
/** Callback registered by Angular forms to re-run validation on the host control. */
|
|
512
|
+
private onValidatorChange?;
|
|
513
|
+
/** Subscription to the other control's valueChanges. */
|
|
514
|
+
private subscription?;
|
|
515
|
+
constructor();
|
|
293
516
|
/**
|
|
294
|
-
*
|
|
295
|
-
* @param
|
|
296
|
-
* @returns : The normalized string, or `undefined` if the input is falsy.
|
|
517
|
+
* Registers the callback Angular invokes to re-run this validator.
|
|
518
|
+
* @param fn - The revalidation callback provided by the forms API.
|
|
297
519
|
*/
|
|
298
|
-
|
|
520
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
299
521
|
/**
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
522
|
+
* Validates that the host control value is not equal to the bound control's value.
|
|
523
|
+
* Also clears the `notequal` error on the other control when the host becomes valid.
|
|
524
|
+
* Returns `null` (valid) when no control is bound.
|
|
525
|
+
* @param control - The form control to validate.
|
|
526
|
+
* @returns `null` when valid, `{ notequal: true }` otherwise.
|
|
303
527
|
*/
|
|
304
|
-
|
|
528
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
529
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotEqualValidatorDirective, never>;
|
|
530
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NotEqualValidatorDirective, "[notEqual]", never, { "notEqual": { "alias": "notEqual"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Directive that validates that a control value is not a future date.
|
|
535
|
+
* Apply `notFuture` to a text input that expects a date on or before today.
|
|
536
|
+
*/
|
|
537
|
+
declare class NotFutureValidatorDirective implements Validator {
|
|
305
538
|
/**
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* @param
|
|
309
|
-
* @returns the html
|
|
539
|
+
* Validates that the control value represents a date that is not in the future.
|
|
540
|
+
* Returns `null` when the control is empty.
|
|
541
|
+
* @param control - The form control to validate.
|
|
310
542
|
*/
|
|
311
|
-
|
|
543
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
544
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotFutureValidatorDirective, never>;
|
|
545
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NotFutureValidatorDirective, "[notFuture]", never, {}, {}, never, never, true, never>;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Directive that validates a control value as a sufficiently strong password.
|
|
550
|
+
* Apply `password` to a password input.
|
|
551
|
+
*/
|
|
552
|
+
declare class PasswordValidatorDirective implements Validator {
|
|
312
553
|
/**
|
|
313
|
-
*
|
|
314
|
-
* @param
|
|
315
|
-
* @param b : name b
|
|
316
|
-
* @returns : true if a equals b
|
|
554
|
+
* Validates that the control value meets the minimum password-strength requirements.
|
|
555
|
+
* @param control - The form control to validate.
|
|
317
556
|
*/
|
|
318
|
-
|
|
557
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
558
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordValidatorDirective, never>;
|
|
559
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PasswordValidatorDirective, "[password]", never, {}, {}, never, never, true, never>;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Directive that removes focus from the host element after it is clicked,
|
|
564
|
+
* preventing the browser from keeping a visible focus ring post-interaction.
|
|
565
|
+
* Apply `removeFocus` to any focusable element (e.g. a button).
|
|
566
|
+
*/
|
|
567
|
+
declare class RemoveFocusDirective {
|
|
568
|
+
private readonly elementRef;
|
|
319
569
|
/**
|
|
320
|
-
*
|
|
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
|
|
335
|
-
* @param key : the key
|
|
336
|
-
* @param reverse : true to decode, false to encode
|
|
337
|
-
* @returns : the obfuscated (or restored) text, or undefined when text/key are empty
|
|
570
|
+
* Handles click events on the host element and blurs it on the next event-loop tick
|
|
571
|
+
* so that the click action completes before focus is removed.
|
|
338
572
|
*/
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
573
|
+
onClick(): void;
|
|
574
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoveFocusDirective, never>;
|
|
575
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoveFocusDirective, "[removeFocus]", never, {}, {}, never, never, true, never>;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* Directive that validates a control value as a parseable SQL-compatible date string.
|
|
580
|
+
* Apply `sqlDate` to a text input that expects a date after year 1750.
|
|
581
|
+
*/
|
|
582
|
+
declare class SqlDateValidatorDirective implements Validator {
|
|
348
583
|
/**
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
* @param
|
|
352
|
-
* @returns : a non-extractable AES-GCM CryptoKey
|
|
584
|
+
* Validates that the control value can be parsed as a date after 1750.
|
|
585
|
+
* Returns `null` when the control is empty.
|
|
586
|
+
* @param control - The form control to validate.
|
|
353
587
|
*/
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
588
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
589
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SqlDateValidatorDirective, never>;
|
|
590
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SqlDateValidatorDirective, "[sqlDate]", never, {}, {}, never, never, true, never>;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Directive that validates a time string against optional allowed time slot ranges.
|
|
595
|
+
* Bind `[time]` and optionally `[slots]="'08:00-12:00|14:00-18:00'"` (pipe-separated ranges).
|
|
596
|
+
*/
|
|
597
|
+
declare class TimeValidatorDirective implements Validator {
|
|
598
|
+
/** Optional pipe-separated list of allowed time ranges, e.g. `"08:00-12:00|14:00-18:00"`. */
|
|
599
|
+
readonly slots: i0.InputSignal<string>;
|
|
361
600
|
/**
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
* @
|
|
601
|
+
* Parses a `"HH:MM"` time string into a comparable integer (e.g. `"09:30"` -> `930`).
|
|
602
|
+
* Returns `-1` when the string is not a valid time.
|
|
603
|
+
* @param value - The time string to parse.
|
|
365
604
|
*/
|
|
366
|
-
private
|
|
605
|
+
private getTime;
|
|
367
606
|
/**
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
*
|
|
371
|
-
*
|
|
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
|
|
607
|
+
* Validates that the control value is a valid time string and, when slots are configured,
|
|
608
|
+
* that it falls within at least one of the allowed ranges.
|
|
609
|
+
* Returns `null` when the control is empty.
|
|
610
|
+
* @param control - The form control to validate.
|
|
381
611
|
*/
|
|
382
|
-
|
|
612
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
613
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeValidatorDirective, never>;
|
|
614
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TimeValidatorDirective, "[time]", never, { "slots": { "alias": "slots"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Directive that validates a control value as a well-formed URL.
|
|
619
|
+
* Apply `url` to a text input that expects a URL.
|
|
620
|
+
*/
|
|
621
|
+
declare class UrlValidatorDirective implements Validator {
|
|
383
622
|
/**
|
|
384
|
-
*
|
|
385
|
-
* Returns
|
|
386
|
-
*
|
|
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
|
|
623
|
+
* Validates that the control value is a well-formed URL.
|
|
624
|
+
* Returns `null` (valid) when the control is empty.
|
|
625
|
+
* @param control - The form control to validate.
|
|
391
626
|
*/
|
|
392
|
-
|
|
627
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
628
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UrlValidatorDirective, never>;
|
|
629
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UrlValidatorDirective, "[url]", never, {}, {}, never, never, true, never>;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Directive that validates a control using the host object's `isValid()` method
|
|
634
|
+
* or a boolean expression passed via `[validIf]`.
|
|
635
|
+
*/
|
|
636
|
+
declare class ValidIfDirective implements Validator {
|
|
637
|
+
/** When `true`, the control is considered valid regardless of the bound value. */
|
|
638
|
+
readonly validIf: i0.InputSignal<boolean>;
|
|
393
639
|
/**
|
|
394
|
-
*
|
|
395
|
-
*
|
|
396
|
-
* @param obj : the object to clone
|
|
397
|
-
* @returns : a new object
|
|
640
|
+
* Validates the control value against a boolean flag or the value's own `isValid()` method.
|
|
641
|
+
* @param control - The form control to validate.
|
|
398
642
|
*/
|
|
399
|
-
|
|
643
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
644
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidIfDirective, never>;
|
|
645
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ValidIfDirective, "[validIf]", never, { "validIf": { "alias": "validIf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Directive that delegates validation to an externally provided validator function.
|
|
650
|
+
* Bind `[validator]="myFn"` where `myFn` is `(c: AbstractControl) => ValidationErrors | null`.
|
|
651
|
+
*/
|
|
652
|
+
declare class ValidatorDirective implements Validator {
|
|
653
|
+
/** The custom validator function to apply. */
|
|
654
|
+
readonly validator: i0.InputSignal<(control: AbstractControl) => ValidationErrors | null>;
|
|
400
655
|
/**
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
* @param
|
|
404
|
-
* @returns A deep copy of `obj`.
|
|
656
|
+
* Invokes the provided validator function against the given control.
|
|
657
|
+
* Returns `null` (valid) when no function is bound.
|
|
658
|
+
* @param control - The form control to validate.
|
|
405
659
|
*/
|
|
406
|
-
|
|
660
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
661
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidatorDirective, never>;
|
|
662
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ValidatorDirective, "[validator]", never, { "validator": { "alias": "validator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Pipe that converts plain-text newlines (`\r\n`, `\r`, `\n`) to HTML `<br>` tags
|
|
667
|
+
* and marks the result as trusted HTML so Angular does not escape it.
|
|
668
|
+
*
|
|
669
|
+
* Usage: `{{ text | formatHtml }}`
|
|
670
|
+
*/
|
|
671
|
+
declare class FormatHtmlPipe implements PipeTransform {
|
|
672
|
+
private readonly sanitizer;
|
|
407
673
|
/**
|
|
408
|
-
*
|
|
409
|
-
*
|
|
674
|
+
* Transforms a plain-text string into sanitized HTML by replacing newline characters
|
|
675
|
+
* with `<br>` tags.
|
|
676
|
+
* @param value - The input string to transform. Treated as an empty string when `undefined`.
|
|
677
|
+
* @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.
|
|
410
678
|
*/
|
|
411
|
-
|
|
679
|
+
transform(value?: string): SafeHtml;
|
|
680
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatHtmlPipe, never>;
|
|
681
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatHtmlPipe, "formatHtml", true>;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Pipe that converts a Markdown string to sanitized HTML using `SystemUtils.markdownToHtml`.
|
|
686
|
+
*
|
|
687
|
+
* Usage: `{{ text | formatMarkdown }}`
|
|
688
|
+
*/
|
|
689
|
+
declare class FormatMarkdownPipe implements PipeTransform {
|
|
690
|
+
private readonly sanitizer;
|
|
412
691
|
/**
|
|
413
|
-
*
|
|
414
|
-
* @param value - The
|
|
692
|
+
* Transforms a Markdown string into sanitized HTML.
|
|
693
|
+
* @param value - The Markdown input to convert. Treated as an empty string when `undefined`.
|
|
694
|
+
* @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.
|
|
415
695
|
*/
|
|
416
|
-
|
|
696
|
+
transform(value?: string): SafeHtml;
|
|
697
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatMarkdownPipe, never>;
|
|
698
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatMarkdownPipe, "formatMarkdown", true>;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* General-purpose formatting pipe that converts a raw value to a locale-aware string
|
|
703
|
+
* based on the specified format type.
|
|
704
|
+
*
|
|
705
|
+
* Supported types: `'date'` / `'D'`, `'currency'` / `'C'`, `'number'` / `'N'`,
|
|
706
|
+
* `'number0'` / `'N0'`, `'percentage'` / `'P'`.
|
|
707
|
+
*
|
|
708
|
+
* Usage: `{{ value | format:'currency' }}`
|
|
709
|
+
*/
|
|
710
|
+
declare class FormatPipe implements PipeTransform {
|
|
711
|
+
/** Shared formatters: building an `Intl.NumberFormat` per call is expensive. */
|
|
712
|
+
private static readonly currencyFormat;
|
|
713
|
+
private static readonly numberFormat;
|
|
714
|
+
private static readonly number0Format;
|
|
715
|
+
private static readonly percentFormat;
|
|
417
716
|
/**
|
|
418
|
-
*
|
|
419
|
-
*
|
|
717
|
+
* Formats a value according to the specified type and optional pattern.
|
|
718
|
+
* Returns `undefined` when the value is `null` or `undefined`, or when the type is unrecognised.
|
|
719
|
+
* @param value - The raw value to format.
|
|
720
|
+
* @param type - The format type identifier (default: `'date'`).
|
|
721
|
+
* @param pattern - The date pattern used when `type` is `'date'` (default: `'dd/MM/yyyy'`).
|
|
722
|
+
* @returns A formatted string, or `undefined` when the value cannot be formatted.
|
|
420
723
|
*/
|
|
421
|
-
|
|
724
|
+
transform(value?: unknown, type?: string, pattern?: string): string | undefined;
|
|
725
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatPipe, never>;
|
|
726
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<FormatPipe, "format", true>;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Pipe that applies a global regex replacement on a string and returns the result
|
|
731
|
+
* as sanitized HTML. When `regexValue` is `'\n'` and no `replaceValue` is given,
|
|
732
|
+
* newlines are replaced with `<br>` tags.
|
|
733
|
+
*
|
|
734
|
+
* Usage: `{{ text | replace:'\n':'' }}`
|
|
735
|
+
*/
|
|
736
|
+
declare class ReplacePipe implements PipeTransform {
|
|
737
|
+
private readonly sanitizer;
|
|
422
738
|
/**
|
|
423
|
-
*
|
|
424
|
-
*
|
|
739
|
+
* Replaces all occurrences of `regexValue` in `value` with `replaceValue`.
|
|
740
|
+
* Returns `undefined` when `value` is empty or `undefined`.
|
|
741
|
+
* @param value - The source string to process.
|
|
742
|
+
* @param regexValue - The regex pattern string to match (applied with the global flag).
|
|
743
|
+
* @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\n'` and this is falsy.
|
|
744
|
+
* @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.
|
|
425
745
|
*/
|
|
426
|
-
|
|
746
|
+
transform(value: string | undefined, regexValue: string, replaceValue?: string): SafeHtml | undefined;
|
|
747
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
|
|
748
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Pipe that marks an HTML string as trusted so Angular does not escape it when
|
|
753
|
+
* bound via `[innerHTML]`.
|
|
754
|
+
*
|
|
755
|
+
* Usage: `<div [innerHTML]="html | safeHtml"></div>`
|
|
756
|
+
*/
|
|
757
|
+
declare class SafeHtmlPipe implements PipeTransform {
|
|
758
|
+
private readonly sanitizer;
|
|
427
759
|
/**
|
|
428
|
-
*
|
|
429
|
-
* @param value
|
|
430
|
-
* @returns
|
|
760
|
+
* Bypasses Angular's HTML sanitization and returns a `SafeHtml` instance.
|
|
761
|
+
* @param value - The raw HTML string to trust. Treated as an empty string when `undefined`.
|
|
762
|
+
* @returns A `SafeHtml` value that can be bound to `[innerHTML]` without escaping.
|
|
431
763
|
*/
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
764
|
+
transform(value?: string): SafeHtml;
|
|
765
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
766
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Pipe that marks a URL string as a trusted resource URL so Angular does not block it
|
|
771
|
+
* when bound to attributes such as `[src]` or `[href]` on iframes, objects, or embeds.
|
|
772
|
+
*
|
|
773
|
+
* Usage: `<iframe [src]="url | safeUrl"></iframe>`
|
|
774
|
+
*/
|
|
775
|
+
declare class SafeUrlPipe implements PipeTransform {
|
|
776
|
+
private readonly sanitizer;
|
|
436
777
|
/**
|
|
437
|
-
*
|
|
438
|
-
* @param value
|
|
439
|
-
* @returns
|
|
778
|
+
* Bypasses Angular's resource-URL sanitization and returns a `SafeResourceUrl` instance.
|
|
779
|
+
* @param value - The URL string to trust. Treated as an empty string when `undefined`.
|
|
780
|
+
* @returns A `SafeResourceUrl` that can be bound to resource URL attributes without blocking.
|
|
440
781
|
*/
|
|
441
|
-
|
|
782
|
+
transform(value?: string): SafeResourceUrl;
|
|
783
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SafeUrlPipe, never>;
|
|
784
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SafeUrlPipe, "safeUrl", true>;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Impure pipe that filters an array using a caller-provided predicate function.
|
|
789
|
+
* Because the pipe is impure it re-evaluates on every change-detection cycle,
|
|
790
|
+
* which is necessary when the predicate's captured state changes.
|
|
791
|
+
*
|
|
792
|
+
* Usage: `*ngFor="let item of items | callback:myFilter"`
|
|
793
|
+
*/
|
|
794
|
+
declare class SearchCallbackPipe implements PipeTransform {
|
|
442
795
|
/**
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
* @param
|
|
447
|
-
* @returns
|
|
448
|
-
|
|
449
|
-
static parseEmails(value?: string): boolean;
|
|
450
|
-
/**
|
|
451
|
-
* Parse a text and return true if it is a valid url (or empty)
|
|
452
|
-
* @param value : the url to parse
|
|
453
|
-
* @returns : true if the url is valid or empty
|
|
796
|
+
* Filters `items` by applying `callback` to each element.
|
|
797
|
+
* Returns the original array unchanged when either argument is falsy.
|
|
798
|
+
* @param items - The source array to filter. May be `undefined`.
|
|
799
|
+
* @param callback - A predicate function that returns `true` for items to keep.
|
|
800
|
+
* @returns A new filtered array, the original array when no callback is provided,
|
|
801
|
+
* or `undefined` when `items` is `undefined`.
|
|
454
802
|
*/
|
|
455
|
-
|
|
803
|
+
transform<T>(items: T[] | undefined, callback: ((item: T) => boolean) | undefined): T[] | undefined;
|
|
804
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchCallbackPipe, never>;
|
|
805
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SearchCallbackPipe, "callback", true>;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* Pure pipe that filters an array of searchable items against a text query.
|
|
810
|
+
* Note: being pure, it re-runs only when the array REFERENCE or the query
|
|
811
|
+
* changes; mutate-in-place updates of the array are not detected.
|
|
812
|
+
*
|
|
813
|
+
* Each item is matched either via its `searchBag.name` property (when present)
|
|
814
|
+
* or by converting the item itself to a lowercase string. The optional `metadata`
|
|
815
|
+
* argument is updated in-place with the total item count and the filtered count,
|
|
816
|
+
* making it usable in the template alongside `*ngFor`.
|
|
817
|
+
*
|
|
818
|
+
* Usage:
|
|
819
|
+
* ```html
|
|
820
|
+
* <div *ngFor="let item of items | search:filterText:meta">...</div>
|
|
821
|
+
* <div>Showing {{ meta.count }} of {{ meta.total }}</div>
|
|
822
|
+
* ```
|
|
823
|
+
*/
|
|
824
|
+
declare class SearchFilterPipe implements PipeTransform {
|
|
456
825
|
/**
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
* @
|
|
826
|
+
* Filters `items` by performing a case-insensitive substring match against `value`.
|
|
827
|
+
* When `items` or `value` is falsy the original array is returned unfiltered.
|
|
828
|
+
* @param items - The source array to filter. May be `undefined`.
|
|
829
|
+
* @param value - The search text to match against each item. May be `undefined`.
|
|
830
|
+
* @param metadata - Optional object that is updated with `total` and `count` after filtering.
|
|
831
|
+
* @returns The filtered array, the original array when no filter text is given,
|
|
832
|
+
* or `undefined` when `items` is `undefined`.
|
|
460
833
|
*/
|
|
461
|
-
|
|
834
|
+
transform(items?: any[], value?: string, metadata?: SearchFilterMetadata): any[] | undefined;
|
|
835
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchFilterPipe, never>;
|
|
836
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SearchFilterPipe, "search", true>;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
declare enum DateFormat {
|
|
840
|
+
Short = 1,// dd/mm/yyyy
|
|
841
|
+
Long = 2,// d mmmm yyyy
|
|
842
|
+
LongWithShortMonth = 3,// d mmm yyyy
|
|
843
|
+
LongWithWeekDay = 4,// wwww, d mmmm yyyy
|
|
844
|
+
LongWithShortWeekDay = 5,// www, d mmmm yyyy
|
|
845
|
+
MonthAndYear = 6,// mmm yyyy
|
|
846
|
+
LongMonthAndYear = 7,// mmmm yyyy
|
|
847
|
+
WeekDay = 8,// www d
|
|
848
|
+
LongWeekDay = 9,// wwww d
|
|
849
|
+
DayAndMonth = 10,// d mmmm
|
|
850
|
+
ShortUS = 11,// mm/dd/yyyy
|
|
851
|
+
ShortISO8601 = 12
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* Key selector with IDE autocomplete and compile-time checking.
|
|
855
|
+
*
|
|
856
|
+
* Suggests the string keys of `T` in the editor and flags obvious typos when
|
|
857
|
+
* `T` is known, while STILL accepting any plain string (the `string & {}`
|
|
858
|
+
* branch), so existing callers that pass dynamic or untyped keys keep
|
|
859
|
+
* compiling unchanged.
|
|
860
|
+
*/
|
|
861
|
+
type KeyOf<T> = Extract<keyof T, string> | (string & {});
|
|
862
|
+
interface PasswordStrength {
|
|
863
|
+
score: number;
|
|
864
|
+
label?: string;
|
|
865
|
+
color?: string;
|
|
866
|
+
suggestions?: string[];
|
|
867
|
+
isValid: boolean;
|
|
868
|
+
}
|
|
869
|
+
declare class SystemUtils {
|
|
870
|
+
/** Shared collator for locale-aware, case-insensitive string comparison. */
|
|
871
|
+
private static readonly collator;
|
|
462
872
|
/**
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
* @param
|
|
467
|
-
* @returns
|
|
873
|
+
* Array find by key
|
|
874
|
+
* @param array : the array to scan
|
|
875
|
+
* @param key : key name
|
|
876
|
+
* @param value : the value to search for
|
|
877
|
+
* @returns : the property value or null
|
|
468
878
|
*/
|
|
469
|
-
static
|
|
879
|
+
static arrayFindByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): T | undefined;
|
|
470
880
|
/**
|
|
471
|
-
*
|
|
472
|
-
* @param
|
|
473
|
-
* @param
|
|
474
|
-
* @
|
|
881
|
+
* Array find index by key
|
|
882
|
+
* @param array : the array to scan
|
|
883
|
+
* @param key : the key name
|
|
884
|
+
* @param value : the value to search for
|
|
885
|
+
* @returns : the array index or -1 if not found
|
|
475
886
|
*/
|
|
476
|
-
static
|
|
887
|
+
static arrayFindIndexByKey<T>(array: T[] | undefined, key: KeyOf<T>, value: unknown): number;
|
|
477
888
|
/**
|
|
478
|
-
*
|
|
479
|
-
* @param
|
|
480
|
-
* @param
|
|
481
|
-
* @
|
|
482
|
-
* @returns : the formatted string
|
|
889
|
+
* Get a value from and array made of name|value items
|
|
890
|
+
* @param array : the array to scan
|
|
891
|
+
* @param value : the value to search for
|
|
892
|
+
* @returns : the property value or null if not found
|
|
483
893
|
*/
|
|
484
|
-
static
|
|
894
|
+
static arrayGetValue<T>(array: T[] | undefined, value: unknown): unknown;
|
|
485
895
|
/**
|
|
486
|
-
*
|
|
487
|
-
* @param
|
|
488
|
-
* @
|
|
896
|
+
* Convert items to nodes into a tree structure
|
|
897
|
+
* @param items : list of nodes
|
|
898
|
+
* @param parent : parent node
|
|
899
|
+
* @returns : an array of INode objects
|
|
489
900
|
*/
|
|
490
|
-
static
|
|
901
|
+
static arrayToNodes(items: INode[], parent?: INode): INode[];
|
|
491
902
|
/**
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
* @param
|
|
496
|
-
* @param
|
|
903
|
+
* Comparator factory for sorting arrays of objects by a given property key.
|
|
904
|
+
* Pass the element type for compile-time key checking:
|
|
905
|
+
* `items.sort(SystemUtils.arraySortCompare<Employee>('lastName'))`.
|
|
906
|
+
* @param key - Name of the property to sort by (autocompleted from `T` when provided).
|
|
907
|
+
* @param order - Sort direction: `'asc'` (default) or `'desc'`.
|
|
908
|
+
* @returns A comparator function that returns a negative, zero, or positive number.
|
|
497
909
|
*/
|
|
498
|
-
static
|
|
499
|
-
/** Cache of `Intl.NumberFormat` instances (their construction is expensive). */
|
|
500
|
-
private static readonly numberFormatCache;
|
|
910
|
+
static arraySortCompare<T extends object = Record<string, unknown>>(key: KeyOf<T>, order?: 'asc' | 'desc' | (string & {})): (a: T, b: T) => number;
|
|
501
911
|
/**
|
|
502
|
-
*
|
|
503
|
-
* @param
|
|
504
|
-
* @
|
|
505
|
-
* @returns A shared formatter instance.
|
|
912
|
+
* Format weight
|
|
913
|
+
* @param gr : grams
|
|
914
|
+
* @returns : the formatted string
|
|
506
915
|
*/
|
|
507
|
-
|
|
916
|
+
static formatWeight(gr: number): string;
|
|
508
917
|
/**
|
|
509
|
-
*
|
|
510
|
-
* @param
|
|
511
|
-
* @
|
|
512
|
-
* @param locale - BCP 47 locale tag (default: `'it-IT'`).
|
|
513
|
-
* @returns The formatted number string.
|
|
918
|
+
* Format file size
|
|
919
|
+
* @param bytes : number of bytes
|
|
920
|
+
* @returns : the formatted string
|
|
514
921
|
*/
|
|
515
|
-
static
|
|
922
|
+
static formatFileSize(bytes: number): string;
|
|
516
923
|
/**
|
|
517
|
-
*
|
|
518
|
-
* @param
|
|
519
|
-
* @param
|
|
520
|
-
* @
|
|
521
|
-
* @param locale - BCP 47 locale tag (default: `'it-IT'`).
|
|
522
|
-
* @returns The formatted currency string.
|
|
924
|
+
* Compare two strings (case-insensitive, locale-aware, accent-insensitive).
|
|
925
|
+
* @param a : string a
|
|
926
|
+
* @param b : string b
|
|
927
|
+
* @returns : 0 if equals, 1 if bigger, -1 if lower
|
|
523
928
|
*/
|
|
524
|
-
static
|
|
929
|
+
static compareString(a?: string, b?: string): number;
|
|
525
930
|
/**
|
|
526
|
-
*
|
|
527
|
-
* @param
|
|
528
|
-
* @returns
|
|
931
|
+
* Capitalize a string
|
|
932
|
+
* @param s : the string to capitalize
|
|
933
|
+
* @returns : the capitalized string
|
|
529
934
|
*/
|
|
530
|
-
static
|
|
935
|
+
static capitalize(s?: string): string | undefined;
|
|
531
936
|
/**
|
|
532
|
-
*
|
|
533
|
-
* @param
|
|
534
|
-
* @
|
|
937
|
+
* Truncate a string at the last word boundary before `max`.
|
|
938
|
+
* @param s : the string to truncate
|
|
939
|
+
* @param max : the max number of chars
|
|
940
|
+
* @returns : the truncated string
|
|
535
941
|
*/
|
|
536
|
-
static
|
|
942
|
+
static truncate(s?: string, max?: number): string | undefined;
|
|
537
943
|
/**
|
|
538
|
-
*
|
|
539
|
-
* @param
|
|
540
|
-
* @
|
|
944
|
+
* Join a list of strings
|
|
945
|
+
* @param items : the list of strings
|
|
946
|
+
* @param sep : the separator string
|
|
947
|
+
* @param max : the maximum resulting string
|
|
948
|
+
* @returns : the joined string
|
|
541
949
|
*/
|
|
542
|
-
static
|
|
950
|
+
static join(items?: string[], sep?: string, max?: number): string | undefined;
|
|
543
951
|
/**
|
|
544
|
-
*
|
|
545
|
-
* @
|
|
952
|
+
* Normalize a string by converting it to lowercase and removing extra spaces, with special handling for acronyms and camelCase.
|
|
953
|
+
* @param s : the string to normalize
|
|
954
|
+
* @returns : The normalized string, or `undefined` if the input is falsy.
|
|
546
955
|
*/
|
|
547
|
-
static
|
|
956
|
+
static normalizeDisplay(s?: string): string | undefined;
|
|
548
957
|
/**
|
|
549
|
-
*
|
|
550
|
-
* @param
|
|
551
|
-
* @returns
|
|
958
|
+
* Wraps bare URLs in the given string with `<a>` anchor tags.
|
|
959
|
+
* @param s - The plain-text or HTML string to process.
|
|
960
|
+
* @returns The string with URLs replaced by clickable links, or `''` when `s` is falsy.
|
|
552
961
|
*/
|
|
553
|
-
static
|
|
962
|
+
static replaceAsHtml(s?: string): string;
|
|
554
963
|
/**
|
|
555
|
-
*
|
|
556
|
-
* @
|
|
964
|
+
* Convert markdown to html
|
|
965
|
+
* @param markdown : the markdown data
|
|
966
|
+
* @param escapeHtml : true to escape HTML. Default is false
|
|
967
|
+
* @returns the html
|
|
557
968
|
*/
|
|
558
|
-
static
|
|
969
|
+
static markdownToHtml(markdown: string, escapeHtml?: boolean): string;
|
|
559
970
|
/**
|
|
560
|
-
*
|
|
561
|
-
*
|
|
562
|
-
* @
|
|
971
|
+
* Compare two names
|
|
972
|
+
* @param a : name a
|
|
973
|
+
* @param b : name b
|
|
974
|
+
* @returns : true if a equals b
|
|
563
975
|
*/
|
|
564
|
-
static
|
|
976
|
+
static compareNames(a?: string, b?: string): boolean;
|
|
565
977
|
/**
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
* @
|
|
978
|
+
* Obfuscate a text with a key-driven code point rotation.
|
|
979
|
+
*
|
|
980
|
+
* @deprecated This is OBFUSCATION, not cryptography: it hides values from
|
|
981
|
+
* casual inspection but offers no real security. Use {@link encrypt} /
|
|
982
|
+
* {@link decrypt} (AES-GCM via Web Crypto) for anything sensitive.
|
|
983
|
+
*
|
|
984
|
+
* The rotation operates on Unicode code points and skips the surrogate
|
|
985
|
+
* range, so the output is always a well-formed string: emoji and other
|
|
986
|
+
* astral characters round-trip correctly (the previous code-unit based
|
|
987
|
+
* version could emit lone surrogates and corrupt them).
|
|
988
|
+
*
|
|
989
|
+
* BREAKING CHANGE: values encoded with the previous code-unit algorithm
|
|
990
|
+
* cannot be decoded by this implementation.
|
|
991
|
+
*
|
|
992
|
+
* @param text : the text to encode or decode
|
|
993
|
+
* @param key : the key
|
|
994
|
+
* @param reverse : true to decode, false to encode
|
|
995
|
+
* @returns : the obfuscated (or restored) text, or undefined when text/key are empty
|
|
569
996
|
*/
|
|
570
|
-
static
|
|
571
|
-
/**
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
997
|
+
static cipher(text: string, key: string, reverse?: boolean): string | undefined;
|
|
998
|
+
/** Payload format version, first byte of the binary envelope. */
|
|
999
|
+
private static readonly CIPHER_VERSION;
|
|
1000
|
+
/** PBKDF2 salt length in bytes. */
|
|
1001
|
+
private static readonly CIPHER_SALT_LENGTH;
|
|
1002
|
+
/** AES-GCM IV length in bytes (96 bit, the recommended size for GCM). */
|
|
1003
|
+
private static readonly CIPHER_IV_LENGTH;
|
|
1004
|
+
/** PBKDF2-HMAC-SHA-256 iterations (OWASP recommendation). */
|
|
1005
|
+
private static readonly CIPHER_ITERATIONS;
|
|
578
1006
|
/**
|
|
579
|
-
*
|
|
580
|
-
* @param
|
|
581
|
-
* @param
|
|
582
|
-
* @returns
|
|
1007
|
+
* Derives an AES-GCM 256-bit key from a password using PBKDF2-HMAC-SHA-256.
|
|
1008
|
+
* @param password : the user password / passphrase
|
|
1009
|
+
* @param salt : the random salt bound to this payload
|
|
1010
|
+
* @returns : a non-extractable AES-GCM CryptoKey
|
|
583
1011
|
*/
|
|
584
|
-
static
|
|
585
|
-
/** Cache for resolved color luminance results. */
|
|
586
|
-
private static readonly colorLightCache;
|
|
1012
|
+
private static deriveKey;
|
|
587
1013
|
/**
|
|
588
|
-
*
|
|
589
|
-
* @param
|
|
590
|
-
* @
|
|
591
|
-
* @returns true if the color is light
|
|
1014
|
+
* Encodes bytes as URL-safe Base64 (no '+', '/' or trailing '=').
|
|
1015
|
+
* @param bytes : the bytes to encode
|
|
1016
|
+
* @returns : the base64url string
|
|
592
1017
|
*/
|
|
593
|
-
static
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
interface DoneResult<T> {
|
|
597
|
-
isNew?: boolean;
|
|
598
|
-
data?: T;
|
|
599
|
-
}
|
|
600
|
-
interface ApiResponse {
|
|
601
|
-
success: boolean;
|
|
602
|
-
message: string;
|
|
603
|
-
}
|
|
604
|
-
interface ApiResult<T> extends ApiResponse {
|
|
605
|
-
value: T;
|
|
606
|
-
}
|
|
607
|
-
interface Folder extends INode {
|
|
608
|
-
teamId?: string;
|
|
609
|
-
parentId?: string;
|
|
610
|
-
position?: number;
|
|
611
|
-
isPrivate?: boolean;
|
|
612
|
-
itemsCount?: number;
|
|
613
|
-
subItemsCount?: number;
|
|
614
|
-
}
|
|
615
|
-
interface FolderTree extends Folder {
|
|
616
|
-
children?: Folder[];
|
|
617
|
-
path?: string;
|
|
618
|
-
}
|
|
619
|
-
interface File<T> {
|
|
620
|
-
ownerId?: T;
|
|
621
|
-
id?: number;
|
|
622
|
-
fileName: string;
|
|
623
|
-
fileData: unknown;
|
|
624
|
-
}
|
|
625
|
-
interface Validated {
|
|
626
|
-
isValid(): boolean;
|
|
627
|
-
}
|
|
628
|
-
declare class FileInfo implements Validated {
|
|
629
|
-
file: any;
|
|
630
|
-
valid: boolean;
|
|
631
|
-
isValid(): boolean;
|
|
632
|
-
}
|
|
633
|
-
interface ErrorInfo {
|
|
634
|
-
invalidateSession?: boolean;
|
|
635
|
-
title?: string;
|
|
636
|
-
message?: string;
|
|
637
|
-
errorStatus?: number;
|
|
638
|
-
service?: string;
|
|
639
|
-
}
|
|
640
|
-
interface NameValueItem<T> {
|
|
641
|
-
name: string;
|
|
642
|
-
value: T;
|
|
643
|
-
shortName?: string;
|
|
644
|
-
parentName?: string;
|
|
645
|
-
parentValue?: T;
|
|
646
|
-
header?: string;
|
|
647
|
-
bag?: any;
|
|
648
|
-
bagInfo?: string;
|
|
649
|
-
disabled?: boolean;
|
|
650
|
-
selected?: boolean;
|
|
651
|
-
}
|
|
652
|
-
interface Checkable {
|
|
653
|
-
checked?: boolean;
|
|
654
|
-
bag: unknown;
|
|
655
|
-
getId(): unknown;
|
|
656
|
-
}
|
|
657
|
-
declare class ValueModel<T> {
|
|
658
|
-
value: T;
|
|
659
|
-
}
|
|
660
|
-
declare class IDModel<T = number> {
|
|
661
|
-
id: T;
|
|
662
|
-
}
|
|
663
|
-
declare class GroupModel<T = number> {
|
|
664
|
-
ids: T[];
|
|
665
|
-
}
|
|
666
|
-
declare class DeleteModel<T = number> extends GroupModel<T> {
|
|
667
|
-
mode?: number;
|
|
668
|
-
parentId?: T;
|
|
669
|
-
}
|
|
670
|
-
interface DeleteResultModel<T> {
|
|
671
|
-
items?: T[];
|
|
672
|
-
deleted: number;
|
|
673
|
-
total: number;
|
|
674
|
-
log?: string;
|
|
675
|
-
}
|
|
676
|
-
declare class RelationModel<T = number> {
|
|
677
|
-
id: T;
|
|
678
|
-
parentId: T;
|
|
679
|
-
}
|
|
680
|
-
declare class UpdateRelationsModel<T = number> {
|
|
681
|
-
id: T;
|
|
682
|
-
relatedIds: T[];
|
|
683
|
-
}
|
|
684
|
-
declare class QueryModel {
|
|
685
|
-
any?: string;
|
|
686
|
-
sortBy?: string;
|
|
687
|
-
sortDescending?: boolean;
|
|
688
|
-
first?: number;
|
|
689
|
-
count?: number;
|
|
690
|
-
}
|
|
691
|
-
interface QueryResultModel<T> {
|
|
692
|
-
interval?: string;
|
|
693
|
-
items: T[];
|
|
694
|
-
total: number;
|
|
695
|
-
}
|
|
696
|
-
interface UpdateModel<T = number> {
|
|
697
|
-
parentId?: T;
|
|
698
|
-
ids: T[];
|
|
699
|
-
}
|
|
700
|
-
interface UpdateResultModel<T> {
|
|
701
|
-
items?: T[];
|
|
702
|
-
updated: number;
|
|
703
|
-
total: number;
|
|
704
|
-
log?: string;
|
|
705
|
-
}
|
|
706
|
-
interface AddModel<T> extends UpdateModel<T> {
|
|
707
|
-
}
|
|
708
|
-
interface AddResultModel<T> {
|
|
709
|
-
items?: T[];
|
|
710
|
-
added: number;
|
|
711
|
-
total: number;
|
|
712
|
-
log?: string;
|
|
713
|
-
}
|
|
714
|
-
declare class ImportModel {
|
|
715
|
-
origin: string;
|
|
716
|
-
dataFile: FileInfo;
|
|
717
|
-
jumpFirstLine?: boolean;
|
|
718
|
-
map?: unknown;
|
|
719
|
-
}
|
|
720
|
-
interface EnableDisableModel {
|
|
721
|
-
value: boolean;
|
|
722
|
-
}
|
|
723
|
-
interface SendToModel {
|
|
724
|
-
sendToRecipients?: string;
|
|
725
|
-
sendToSubject?: string;
|
|
726
|
-
sendToText?: string;
|
|
727
|
-
}
|
|
728
|
-
interface SearchBag {
|
|
729
|
-
name: string;
|
|
730
|
-
}
|
|
731
|
-
interface Searchable {
|
|
732
|
-
searchBag: SearchBag;
|
|
733
|
-
}
|
|
734
|
-
interface SearchFilterMetadata {
|
|
735
|
-
total: number;
|
|
736
|
-
count: number;
|
|
737
|
-
}
|
|
738
|
-
declare class DateInterval {
|
|
739
|
-
from?: Date;
|
|
740
|
-
to?: Date;
|
|
741
|
-
get fromAsDate(): Date | undefined;
|
|
742
|
-
get toAsDate(): Date | undefined;
|
|
743
|
-
constructor(from?: Date, to?: Date);
|
|
744
|
-
clear(): void;
|
|
745
|
-
}
|
|
746
|
-
interface LoginResult<T> extends ApiResult<boolean> {
|
|
747
|
-
context: T;
|
|
748
|
-
oauth?: number;
|
|
749
|
-
requiresMfa?: boolean;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
* Directive that listens to `keyup` events on a date input and debounces changes
|
|
754
|
-
* into a {@link DateInterval} model, converting shorthand strings (e.g. "d/m") to dates.
|
|
755
|
-
* Apply `[dateIntervalChange]="interval"` to the host `<input>` element.
|
|
756
|
-
*/
|
|
757
|
-
declare class DateIntervalChangeDirective {
|
|
758
|
-
/** The date interval model to update when the input value changes. */
|
|
759
|
-
readonly dateIntervalChange: i0.InputSignal<DateInterval>;
|
|
760
|
-
/** When `true`, the directive updates the interval's end date; otherwise the start date. */
|
|
761
|
-
readonly end: i0.InputSignal<boolean>;
|
|
762
|
-
private readonly subject;
|
|
763
|
-
private readonly destroyRef;
|
|
764
|
-
constructor();
|
|
1018
|
+
private static toBase64Url;
|
|
765
1019
|
/**
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
*
|
|
769
|
-
* cannot stop it.
|
|
770
|
-
* @param e - The keyboard event emitted by the host input.
|
|
1020
|
+
* Decodes a URL-safe Base64 string back to bytes.
|
|
1021
|
+
* @param value : the base64url string
|
|
1022
|
+
* @returns : the decoded bytes
|
|
771
1023
|
*/
|
|
772
|
-
|
|
1024
|
+
private static fromBase64Url;
|
|
773
1025
|
/**
|
|
774
|
-
*
|
|
775
|
-
*
|
|
1026
|
+
* Encrypts a text with a password using AES-GCM (256 bit) and a key derived
|
|
1027
|
+
* via PBKDF2-HMAC-SHA-256 with a random per-message salt.
|
|
1028
|
+
*
|
|
1029
|
+
* The result is a self-contained, URL-safe Base64 payload:
|
|
1030
|
+
* `version (1 byte) | salt (16 bytes) | iv (12 bytes) | ciphertext+tag`.
|
|
1031
|
+
* GCM is authenticated: any tampering makes {@link decrypt} fail.
|
|
1032
|
+
*
|
|
1033
|
+
* Requires a secure context (HTTPS or localhost) for `crypto.subtle`.
|
|
1034
|
+
*
|
|
1035
|
+
* @param text : the plain text to encrypt
|
|
1036
|
+
* @param password : the password / passphrase
|
|
1037
|
+
* @returns : the base64url payload, or undefined when text/password are
|
|
1038
|
+
* empty or the Web Crypto API is unavailable
|
|
776
1039
|
*/
|
|
777
|
-
|
|
778
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DateIntervalChangeDirective, never>;
|
|
779
|
-
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>;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
/**
|
|
783
|
-
* Directive that copies a string payload to the clipboard when the host element is clicked.
|
|
784
|
-
* Bind `[copyClipboard]="text"` to provide the content to copy and listen to `(copied)` for confirmation.
|
|
785
|
-
*/
|
|
786
|
-
declare class CopyClipboardDirective {
|
|
787
|
-
/** The text to copy to the clipboard. Bound via the `copyClipboard` attribute. */
|
|
788
|
-
readonly payload: i0.InputSignal<string>;
|
|
789
|
-
/** Emits the copied text after a successful copy operation. */
|
|
790
|
-
readonly copied: i0.OutputEmitterRef<string>;
|
|
1040
|
+
static encrypt(text: string, password: string): Promise<string | undefined>;
|
|
791
1041
|
/**
|
|
792
|
-
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
1042
|
+
* Decrypts a payload produced by {@link encrypt}.
|
|
1043
|
+
* Returns undefined when the password is wrong, the payload was tampered
|
|
1044
|
+
* with, the format is unknown, or the Web Crypto API is unavailable.
|
|
1045
|
+
*
|
|
1046
|
+
* @param payload : the base64url payload returned by {@link encrypt}
|
|
1047
|
+
* @param password : the password / passphrase used to encrypt
|
|
1048
|
+
* @returns : the original plain text, or undefined on any failure
|
|
795
1049
|
*/
|
|
796
|
-
|
|
797
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CopyClipboardDirective, never>;
|
|
798
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CopyClipboardDirective, "[copyClipboard]", never, { "payload": { "alias": "copyClipboard"; "required": false; "isSignal": true; }; }, { "copied": "copied"; }, never, never, true, never>;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
/**
|
|
802
|
-
* Directive that validates a semicolon-separated list of email addresses.
|
|
803
|
-
* Apply `emails` to a text input containing one or more addresses separated by `;`.
|
|
804
|
-
*/
|
|
805
|
-
declare class EmailsValidatorDirective implements Validator {
|
|
1050
|
+
static decrypt(payload: string, password: string): Promise<string | undefined>;
|
|
806
1051
|
/**
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
* @param
|
|
1052
|
+
* Clone an object (deep copy).
|
|
1053
|
+
* Uses native structuredClone: handles Date, Map, Set, typed arrays and circular references.
|
|
1054
|
+
* @param obj : the object to clone
|
|
1055
|
+
* @returns : a new object
|
|
810
1056
|
*/
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
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).
|
|
823
|
-
*/
|
|
824
|
-
declare class EqualsValidatorDirective implements Validator {
|
|
825
|
-
/** The control whose value must match the host control's value. */
|
|
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();
|
|
1057
|
+
static clone<T>(obj: T): T;
|
|
1058
|
+
/**
|
|
1059
|
+
* Creates a deep clone of an object.
|
|
1060
|
+
* @param obj - The source object to clone.
|
|
1061
|
+
* @param dest - Optional pre-allocated destination object to merge the clone into.
|
|
1062
|
+
* @returns A deep copy of `obj`.
|
|
1063
|
+
*/
|
|
1064
|
+
static deepClone<T extends object>(obj: T, dest?: T): T;
|
|
832
1065
|
/**
|
|
833
|
-
*
|
|
834
|
-
* @param
|
|
1066
|
+
* Returns `true` when `value` is a syntactically valid UUID string.
|
|
1067
|
+
* @param value - The string to validate.
|
|
835
1068
|
*/
|
|
836
|
-
|
|
1069
|
+
static parseUUID(value?: string): boolean;
|
|
837
1070
|
/**
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
* @param control - The form control to validate.
|
|
841
|
-
* @returns `null` when valid, `{ equals: ... }` otherwise.
|
|
1071
|
+
* Returns `true` when `value` is a valid, non-empty (non-zero) UUID.
|
|
1072
|
+
* @param value - The string to validate.
|
|
842
1073
|
*/
|
|
843
|
-
|
|
844
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EqualsValidatorDirective, never>;
|
|
845
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<EqualsValidatorDirective, "[equals]", never, { "equals": { "alias": "equals"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
* Directive that validates a file size against configurable minimum and maximum bounds.
|
|
850
|
-
* Bind `[fileSize]` together with `[size]="fileSizeInMb"`, `[maxSizeMb]`, and `[minSizeMb]`.
|
|
851
|
-
*/
|
|
852
|
-
declare class FileSizeValidatorDirective implements Validator {
|
|
853
|
-
/** Maximum allowed file size in megabytes. Defaults to 5. */
|
|
854
|
-
readonly maxSizeMb: i0.InputSignal<number>;
|
|
855
|
-
/** Minimum required file size in megabytes. Defaults to 0. */
|
|
856
|
-
readonly minSizeMb: i0.InputSignal<number>;
|
|
857
|
-
/** The actual file size in megabytes to validate against the bounds. */
|
|
858
|
-
readonly size: i0.InputSignal<number>;
|
|
1074
|
+
static parseUUIDNotEmpty(value?: string): boolean;
|
|
859
1075
|
/**
|
|
860
|
-
*
|
|
861
|
-
*
|
|
862
|
-
* @param control - The form control to validate.
|
|
1076
|
+
* Return an empty UUID
|
|
1077
|
+
* @returns : the empty UUID
|
|
863
1078
|
*/
|
|
864
|
-
|
|
865
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FileSizeValidatorDirective, never>;
|
|
866
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<FileSizeValidatorDirective, "[fileSize]", never, { "maxSizeMb": { "alias": "maxSizeMb"; "required": false; "isSignal": true; }; "minSizeMb": { "alias": "minSizeMb"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
/**
|
|
870
|
-
* Directive that validates a control value as a GUID / UUID string.
|
|
871
|
-
* Apply `guid` to a text input that expects a valid UUID.
|
|
872
|
-
*/
|
|
873
|
-
declare class GuidValidatorDirective implements Validator {
|
|
1079
|
+
static emptyUUID(): string;
|
|
874
1080
|
/**
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
* @param control - The form control to validate.
|
|
1081
|
+
* Create a new UUID
|
|
1082
|
+
* @returns : the string UUID
|
|
878
1083
|
*/
|
|
879
|
-
|
|
880
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GuidValidatorDirective, never>;
|
|
881
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<GuidValidatorDirective, "[guid]", never, {}, {}, never, never, true, never>;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* Directive that validates that a control value does not exceed a maximum word count.
|
|
886
|
-
* Bind `[maxTerms]="10"` to allow at most 10 whitespace-separated terms.
|
|
887
|
-
*/
|
|
888
|
-
declare class MaxTermsValidatorDirective implements Validator {
|
|
889
|
-
/** The maximum number of whitespace-separated terms allowed. */
|
|
890
|
-
readonly maxTerms: i0.InputSignal<number>;
|
|
1084
|
+
static generateUUID(): string;
|
|
891
1085
|
/**
|
|
892
|
-
*
|
|
893
|
-
*
|
|
894
|
-
* @
|
|
1086
|
+
* Reconstruct a standard UUID (with dashes) from a 32-char hex string without dashes.
|
|
1087
|
+
* @param value : 32-character hex string
|
|
1088
|
+
* @returns : the formatted UUID or the original string if it doesn't match the expected format
|
|
895
1089
|
*/
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
static
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* Directive that validates that a string control value is not blank (whitespace-only).
|
|
903
|
-
* Apply `notEmpty` to a text input where non-blank content is required.
|
|
904
|
-
*/
|
|
905
|
-
declare class NotEmptyValidatorDirective implements Validator {
|
|
1090
|
+
static inflateUUID(value: string): string;
|
|
1091
|
+
/** Precompiled validation patterns. */
|
|
1092
|
+
private static readonly emailRegex;
|
|
1093
|
+
private static readonly urlRegex;
|
|
906
1094
|
/**
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
* @
|
|
1095
|
+
* Parse a text and return true if it is a valid email (or empty)
|
|
1096
|
+
* @param value : email
|
|
1097
|
+
* @returns : true if the email is valid or empty
|
|
910
1098
|
*/
|
|
911
|
-
|
|
912
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotEmptyValidatorDirective, never>;
|
|
913
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NotEmptyValidatorDirective, "[notEmpty]", never, {}, {}, never, never, true, never>;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* Directive that validates that the host control's value is different from another control's value.
|
|
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.
|
|
922
|
-
*/
|
|
923
|
-
declare class NotEqualValidatorDirective implements Validator {
|
|
924
|
-
/** The control whose value must differ from the host control's value. */
|
|
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();
|
|
1099
|
+
static parseEmail(value?: string): boolean;
|
|
931
1100
|
/**
|
|
932
|
-
*
|
|
933
|
-
*
|
|
1101
|
+
* Parse a text containing one or more email addresses separated by `;` or `,`
|
|
1102
|
+
* and return true if all of them are valid (or the text is empty).
|
|
1103
|
+
* Empty items caused by double or trailing separators are ignored.
|
|
1104
|
+
* @param value : the email list to parse (e.g. "a@b.it; c@d.it")
|
|
1105
|
+
* @returns : true if all emails are valid or the value is empty
|
|
934
1106
|
*/
|
|
935
|
-
|
|
1107
|
+
static parseEmails(value?: string): boolean;
|
|
936
1108
|
/**
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
*
|
|
940
|
-
* @param control - The form control to validate.
|
|
941
|
-
* @returns `null` when valid, `{ notequal: true }` otherwise.
|
|
1109
|
+
* Parse a text and return true if it is a valid url (or empty)
|
|
1110
|
+
* @param value : the url to parse
|
|
1111
|
+
* @returns : true if the url is valid or empty
|
|
942
1112
|
*/
|
|
943
|
-
|
|
944
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotEqualValidatorDirective, never>;
|
|
945
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NotEqualValidatorDirective, "[notEqual]", never, { "notEqual": { "alias": "notEqual"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* Directive that validates that a control value is not a future date.
|
|
950
|
-
* Apply `notFuture` to a text input that expects a date on or before today.
|
|
951
|
-
*/
|
|
952
|
-
declare class NotFutureValidatorDirective implements Validator {
|
|
1113
|
+
static parseUrl(value?: string): boolean;
|
|
953
1114
|
/**
|
|
954
|
-
*
|
|
955
|
-
*
|
|
956
|
-
* @
|
|
1115
|
+
* Get date parts from a string value
|
|
1116
|
+
* @param value : the string to parse
|
|
1117
|
+
* @returns : an array of numbers with year, month, day
|
|
957
1118
|
*/
|
|
958
|
-
|
|
959
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotFutureValidatorDirective, never>;
|
|
960
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NotFutureValidatorDirective, "[notFuture]", never, {}, {}, never, never, true, never>;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
/**
|
|
964
|
-
* Directive that validates a control value as a sufficiently strong password.
|
|
965
|
-
* Apply `password` to a password input.
|
|
966
|
-
*/
|
|
967
|
-
declare class PasswordValidatorDirective implements Validator {
|
|
1119
|
+
static getDateParts(value?: string): number[] | undefined;
|
|
968
1120
|
/**
|
|
969
|
-
*
|
|
970
|
-
*
|
|
1121
|
+
* Checks whether a value is a valid Date instance.
|
|
1122
|
+
* Note: do not use `date.getTime()` as a truthiness test, it is 0 (falsy)
|
|
1123
|
+
* for the Unix epoch (1970-01-01T00:00:00Z) even though the date is valid.
|
|
1124
|
+
* @param d : the value to check
|
|
1125
|
+
* @returns : true when `d` is a Date representing a valid point in time
|
|
971
1126
|
*/
|
|
972
|
-
|
|
973
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordValidatorDirective, never>;
|
|
974
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PasswordValidatorDirective, "[password]", never, {}, {}, never, never, true, never>;
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
/**
|
|
978
|
-
* Directive that removes focus from the host element after it is clicked,
|
|
979
|
-
* preventing the browser from keeping a visible focus ring post-interaction.
|
|
980
|
-
* Apply `removeFocus` to any focusable element (e.g. a button).
|
|
981
|
-
*/
|
|
982
|
-
declare class RemoveFocusDirective {
|
|
983
|
-
private readonly elementRef;
|
|
1127
|
+
static isValidDate(d: unknown): d is Date;
|
|
984
1128
|
/**
|
|
985
|
-
*
|
|
986
|
-
*
|
|
1129
|
+
* Parse a date
|
|
1130
|
+
* @param value : the value to check
|
|
1131
|
+
* @param locale : the locale to use
|
|
1132
|
+
* @returns : a valid Date object or undefined
|
|
987
1133
|
*/
|
|
988
|
-
|
|
989
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RemoveFocusDirective, never>;
|
|
990
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoveFocusDirective, "[removeFocus]", never, {}, {}, never, never, true, never>;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Directive that validates a control value as a parseable SQL-compatible date string.
|
|
995
|
-
* Apply `sqlDate` to a text input that expects a date after year 1750.
|
|
996
|
-
*/
|
|
997
|
-
declare class SqlDateValidatorDirective implements Validator {
|
|
1134
|
+
static parseDate(value?: string | Date, locale?: Locale): Date | undefined;
|
|
998
1135
|
/**
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
1001
|
-
* @param
|
|
1136
|
+
* Format a date
|
|
1137
|
+
* @param value : the date or string to format
|
|
1138
|
+
* @param fmt : the DateFormat to use or the string pattern
|
|
1139
|
+
* @param locale : the locale to use (default is IT)
|
|
1140
|
+
* @returns : the formatted string
|
|
1002
1141
|
*/
|
|
1003
|
-
|
|
1004
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SqlDateValidatorDirective, never>;
|
|
1005
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SqlDateValidatorDirective, "[sqlDate]", never, {}, {}, never, never, true, never>;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* Directive that validates a time string against optional allowed time slot ranges.
|
|
1010
|
-
* Bind `[time]` and optionally `[slots]="'08:00-12:00|14:00-18:00'"` (pipe-separated ranges).
|
|
1011
|
-
*/
|
|
1012
|
-
declare class TimeValidatorDirective implements Validator {
|
|
1013
|
-
/** Optional pipe-separated list of allowed time ranges, e.g. `"08:00-12:00|14:00-18:00"`. */
|
|
1014
|
-
readonly slots: i0.InputSignal<string>;
|
|
1142
|
+
static formatDate(value?: Date | string, fmt?: DateFormat | string, locale?: Locale): string;
|
|
1015
1143
|
/**
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
* @
|
|
1144
|
+
* Return an italian local date
|
|
1145
|
+
* @param value : the date
|
|
1146
|
+
* @returns : the new date
|
|
1019
1147
|
*/
|
|
1020
|
-
|
|
1148
|
+
static toLocalDate(value?: Date | string): Date | undefined;
|
|
1021
1149
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
* @param
|
|
1150
|
+
* Update a DateInterval object according to a string
|
|
1151
|
+
* @param value : string value
|
|
1152
|
+
* @param interval : DateInterval value to update
|
|
1153
|
+
* @param end : true if must be updated the first or the end value
|
|
1154
|
+
* @param copy : copy the same value (works only if not end element)
|
|
1155
|
+
*/
|
|
1156
|
+
static changeDateInterval(value: string, interval: DateInterval, end?: boolean, copy?: boolean): void;
|
|
1157
|
+
/** Cache of `Intl.NumberFormat` instances (their construction is expensive). */
|
|
1158
|
+
private static readonly numberFormatCache;
|
|
1159
|
+
/**
|
|
1160
|
+
* Returns a cached `Intl.NumberFormat` for the given options, creating it on first use.
|
|
1161
|
+
* @param locale - BCP 47 locale tag.
|
|
1162
|
+
* @param options - The `Intl.NumberFormat` options.
|
|
1163
|
+
* @returns A shared formatter instance.
|
|
1164
|
+
*/
|
|
1165
|
+
private static getNumberFormat;
|
|
1166
|
+
/**
|
|
1167
|
+
* Formats a number using a cached `Intl.NumberFormat`.
|
|
1168
|
+
* @param value - The number to format.
|
|
1169
|
+
* @param decimals - Maximum decimal places (default: `2`).
|
|
1170
|
+
* @param locale - BCP 47 locale tag (default: `'it-IT'`).
|
|
1171
|
+
* @returns The formatted number string.
|
|
1172
|
+
*/
|
|
1173
|
+
static formatNumber(value: number, decimals?: number, locale?: string): string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Formats a number as a currency string using a cached `Intl.NumberFormat`.
|
|
1176
|
+
* @param value - The number to format.
|
|
1177
|
+
* @param currency - ISO 4217 currency code (default: `'EUR'`).
|
|
1178
|
+
* @param decimals - Maximum decimal places (default: `2`).
|
|
1179
|
+
* @param locale - BCP 47 locale tag (default: `'it-IT'`).
|
|
1180
|
+
* @returns The formatted currency string.
|
|
1026
1181
|
*/
|
|
1027
|
-
|
|
1028
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TimeValidatorDirective, never>;
|
|
1029
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TimeValidatorDirective, "[time]", never, { "slots": { "alias": "slots"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
/**
|
|
1033
|
-
* Directive that validates a control value as a well-formed URL.
|
|
1034
|
-
* Apply `url` to a text input that expects a URL.
|
|
1035
|
-
*/
|
|
1036
|
-
declare class UrlValidatorDirective implements Validator {
|
|
1182
|
+
static formatCurrency(value: number, currency?: string, decimals?: number, locale?: string): string;
|
|
1037
1183
|
/**
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1040
|
-
* @
|
|
1184
|
+
* Percent-encodes a string for safe inclusion in a URL.
|
|
1185
|
+
* @param value - The string to encode.
|
|
1186
|
+
* @returns The encoded string, or `undefined` when `value` is empty.
|
|
1041
1187
|
*/
|
|
1042
|
-
|
|
1043
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<UrlValidatorDirective, never>;
|
|
1044
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<UrlValidatorDirective, "[url]", never, {}, {}, never, never, true, never>;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/**
|
|
1048
|
-
* Directive that validates a control using the host object's `isValid()` method
|
|
1049
|
-
* or a boolean expression passed via `[validIf]`.
|
|
1050
|
-
*/
|
|
1051
|
-
declare class ValidIfDirective implements Validator {
|
|
1052
|
-
/** When `true`, the control is considered valid regardless of the bound value. */
|
|
1053
|
-
readonly validIf: i0.InputSignal<boolean>;
|
|
1188
|
+
static urlEncode(value: string): string | undefined;
|
|
1054
1189
|
/**
|
|
1055
|
-
*
|
|
1056
|
-
* @param
|
|
1190
|
+
* Decodes a percent-encoded URL string, treating `+` as a space.
|
|
1191
|
+
* @param value - The encoded string to decode.
|
|
1192
|
+
* @returns The decoded string, or `undefined` when `value` is empty or absent.
|
|
1057
1193
|
*/
|
|
1058
|
-
|
|
1059
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValidIfDirective, never>;
|
|
1060
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ValidIfDirective, "[validIf]", never, { "validIf": { "alias": "validIf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
/**
|
|
1064
|
-
* Directive that delegates validation to an externally provided validator function.
|
|
1065
|
-
* Bind `[validator]="myFn"` where `myFn` is `(c: AbstractControl) => ValidationErrors | null`.
|
|
1066
|
-
*/
|
|
1067
|
-
declare class ValidatorDirective implements Validator {
|
|
1068
|
-
/** The custom validator function to apply. */
|
|
1069
|
-
readonly validator: i0.InputSignal<(control: AbstractControl) => ValidationErrors | null>;
|
|
1194
|
+
static urlDecode(value?: string): string | undefined;
|
|
1070
1195
|
/**
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1073
|
-
* @
|
|
1196
|
+
* Reads a query string parameter value from the current page URL.
|
|
1197
|
+
* @param name - The parameter name to look up.
|
|
1198
|
+
* @returns The decoded parameter value, or `undefined` when absent or running server-side.
|
|
1074
1199
|
*/
|
|
1075
|
-
|
|
1076
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ValidatorDirective, never>;
|
|
1077
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ValidatorDirective, "[validator]", never, { "validator": { "alias": "validator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* Pipe that converts plain-text newlines (`\r\n`, `\r`, `\n`) to HTML `<br>` tags
|
|
1082
|
-
* and marks the result as trusted HTML so Angular does not escape it.
|
|
1083
|
-
*
|
|
1084
|
-
* Usage: `{{ text | formatHtml }}`
|
|
1085
|
-
*/
|
|
1086
|
-
declare class FormatHtmlPipe implements PipeTransform {
|
|
1087
|
-
private readonly sanitizer;
|
|
1200
|
+
static getQueryStringValueByName(name: string): string | undefined;
|
|
1088
1201
|
/**
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1091
|
-
* @param value - The input string to transform. Treated as an empty string when `undefined`.
|
|
1092
|
-
* @returns A `SafeHtml` value that can be rendered with `[innerHTML]`.
|
|
1202
|
+
* Generate a password
|
|
1203
|
+
* @returns : the password string
|
|
1093
1204
|
*/
|
|
1094
|
-
|
|
1095
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormatHtmlPipe, never>;
|
|
1096
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FormatHtmlPipe, "formatHtml", true>;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
* Pipe that converts a Markdown string to sanitized HTML using `SystemUtils.markdownToHtml`.
|
|
1101
|
-
*
|
|
1102
|
-
* Usage: `{{ text | formatMarkdown }}`
|
|
1103
|
-
*/
|
|
1104
|
-
declare class FormatMarkdownPipe implements PipeTransform {
|
|
1105
|
-
private readonly sanitizer;
|
|
1205
|
+
static generatePassword(length?: number): string;
|
|
1106
1206
|
/**
|
|
1107
|
-
*
|
|
1108
|
-
* @param
|
|
1109
|
-
* @returns
|
|
1207
|
+
* Calculate password strength
|
|
1208
|
+
* @param password: the password to evaluate
|
|
1209
|
+
* @returns the password strength info
|
|
1110
1210
|
*/
|
|
1111
|
-
|
|
1112
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormatMarkdownPipe, never>;
|
|
1113
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FormatMarkdownPipe, "formatMarkdown", true>;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
* General-purpose formatting pipe that converts a raw value to a locale-aware string
|
|
1118
|
-
* based on the specified format type.
|
|
1119
|
-
*
|
|
1120
|
-
* Supported types: `'date'` / `'D'`, `'currency'` / `'C'`, `'number'` / `'N'`,
|
|
1121
|
-
* `'number0'` / `'N0'`, `'percentage'` / `'P'`.
|
|
1122
|
-
*
|
|
1123
|
-
* Usage: `{{ value | format:'currency' }}`
|
|
1124
|
-
*/
|
|
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;
|
|
1211
|
+
static calculatePasswordStrength(password?: string): PasswordStrength;
|
|
1131
1212
|
/**
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1134
|
-
* @param value - The raw value to format.
|
|
1135
|
-
* @param type - The format type identifier (default: `'date'`).
|
|
1136
|
-
* @param pattern - The date pattern used when `type` is `'date'` (default: `'dd/MM/yyyy'`).
|
|
1137
|
-
* @returns A formatted string, or `undefined` when the value cannot be formatted.
|
|
1213
|
+
* Check if current browser supports touch
|
|
1214
|
+
* @returns : true if the display is touchable
|
|
1138
1215
|
*/
|
|
1139
|
-
|
|
1140
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormatPipe, never>;
|
|
1141
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<FormatPipe, "format", true>;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
/**
|
|
1145
|
-
* Pipe that applies a global regex replacement on a string and returns the result
|
|
1146
|
-
* as sanitized HTML. When `regexValue` is `'\n'` and no `replaceValue` is given,
|
|
1147
|
-
* newlines are replaced with `<br>` tags.
|
|
1148
|
-
*
|
|
1149
|
-
* Usage: `{{ text | replace:'\n':'' }}`
|
|
1150
|
-
*/
|
|
1151
|
-
declare class ReplacePipe implements PipeTransform {
|
|
1152
|
-
private readonly sanitizer;
|
|
1216
|
+
static isTouchable(): boolean;
|
|
1153
1217
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
* @
|
|
1157
|
-
* @param regexValue - The regex pattern string to match (applied with the global flag).
|
|
1158
|
-
* @param replaceValue - The replacement string. Defaults to `'<br>'` when `regexValue` is `'\n'` and this is falsy.
|
|
1159
|
-
* @returns A `SafeHtml` value with all matches replaced, or `undefined` when the input is empty.
|
|
1218
|
+
* This check will prevent 'window' logic to be executed
|
|
1219
|
+
* while executing the server rendering
|
|
1220
|
+
* @returns : true if using the browser
|
|
1160
1221
|
*/
|
|
1161
|
-
|
|
1162
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
|
|
1163
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
/**
|
|
1167
|
-
* Pipe that marks an HTML string as trusted so Angular does not escape it when
|
|
1168
|
-
* bound via `[innerHTML]`.
|
|
1169
|
-
*
|
|
1170
|
-
* Usage: `<div [innerHTML]="html | safeHtml"></div>`
|
|
1171
|
-
*/
|
|
1172
|
-
declare class SafeHtmlPipe implements PipeTransform {
|
|
1173
|
-
private readonly sanitizer;
|
|
1222
|
+
static isBrowser(): boolean;
|
|
1174
1223
|
/**
|
|
1175
|
-
*
|
|
1176
|
-
* @param
|
|
1177
|
-
* @returns
|
|
1224
|
+
* Convert folders in a tree of Node object.
|
|
1225
|
+
* @param folders : the subfolders group or null to root
|
|
1226
|
+
* @returns : a node list
|
|
1178
1227
|
*/
|
|
1179
|
-
|
|
1180
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SafeHtmlPipe, never>;
|
|
1181
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SafeHtmlPipe, "safeHtml", true>;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
/**
|
|
1185
|
-
* Pipe that marks a URL string as a trusted resource URL so Angular does not block it
|
|
1186
|
-
* when bound to attributes such as `[src]` or `[href]` on iframes, objects, or embeds.
|
|
1187
|
-
*
|
|
1188
|
-
* Usage: `<iframe [src]="url | safeUrl"></iframe>`
|
|
1189
|
-
*/
|
|
1190
|
-
declare class SafeUrlPipe implements PipeTransform {
|
|
1191
|
-
private readonly sanitizer;
|
|
1228
|
+
static toNodes(folders: INode[]): INode[];
|
|
1192
1229
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
* @param
|
|
1195
|
-
* @
|
|
1230
|
+
* Convert folders in a tree of Node object.
|
|
1231
|
+
* @param folders : the children group or null to root
|
|
1232
|
+
* @param parent : the parent node
|
|
1233
|
+
* @returns : a node list
|
|
1196
1234
|
*/
|
|
1197
|
-
|
|
1198
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SafeUrlPipe, never>;
|
|
1199
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SafeUrlPipe, "safeUrl", true>;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
/**
|
|
1203
|
-
* Impure pipe that filters an array using a caller-provided predicate function.
|
|
1204
|
-
* Because the pipe is impure it re-evaluates on every change-detection cycle,
|
|
1205
|
-
* which is necessary when the predicate's captured state changes.
|
|
1206
|
-
*
|
|
1207
|
-
* Usage: `*ngFor="let item of items | callback:myFilter"`
|
|
1208
|
-
*/
|
|
1209
|
-
declare class SearchCallbackPipe implements PipeTransform {
|
|
1235
|
+
private static _toNodes;
|
|
1210
1236
|
/**
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1213
|
-
* @param
|
|
1214
|
-
* @
|
|
1215
|
-
* @returns A new filtered array, the original array when no callback is provided,
|
|
1216
|
-
* or `undefined` when `items` is `undefined`.
|
|
1237
|
+
* Returns an array of individual power-of-2 flag values that are set in `value`.
|
|
1238
|
+
* @param value - The bitmask to decompose.
|
|
1239
|
+
* @param max - Upper-bound exponent: checks flags from `1` up to `1 << max` (default: `30`).
|
|
1240
|
+
* @returns Array of set flag values, or an empty array when `value` is `0`.
|
|
1217
1241
|
*/
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
static
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
/**
|
|
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.
|
|
1227
|
-
*
|
|
1228
|
-
* Each item is matched either via its `searchBag.name` property (when present)
|
|
1229
|
-
* or by converting the item itself to a lowercase string. The optional `metadata`
|
|
1230
|
-
* argument is updated in-place with the total item count and the filtered count,
|
|
1231
|
-
* making it usable in the template alongside `*ngFor`.
|
|
1232
|
-
*
|
|
1233
|
-
* Usage:
|
|
1234
|
-
* ```html
|
|
1235
|
-
* <div *ngFor="let item of items | search:filterText:meta">...</div>
|
|
1236
|
-
* <div>Showing {{ meta.count }} of {{ meta.total }}</div>
|
|
1237
|
-
* ```
|
|
1238
|
-
*/
|
|
1239
|
-
declare class SearchFilterPipe implements PipeTransform {
|
|
1242
|
+
static getFlags(value: number, max?: number): number[];
|
|
1243
|
+
/** Cache for resolved color luminance results. */
|
|
1244
|
+
private static readonly colorLightCache;
|
|
1240
1245
|
/**
|
|
1241
|
-
*
|
|
1242
|
-
*
|
|
1243
|
-
* @param
|
|
1244
|
-
* @
|
|
1245
|
-
* @param metadata - Optional object that is updated with `total` and `count` after filtering.
|
|
1246
|
-
* @returns The filtered array, the original array when no filter text is given,
|
|
1247
|
-
* or `undefined` when `items` is `undefined`.
|
|
1246
|
+
* Check if a color is light or dark
|
|
1247
|
+
* @param color : the color
|
|
1248
|
+
* @param minimumLuminance : the lumimance to consider
|
|
1249
|
+
* @returns true if the color is light
|
|
1248
1250
|
*/
|
|
1249
|
-
|
|
1250
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SearchFilterPipe, never>;
|
|
1251
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<SearchFilterPipe, "search", true>;
|
|
1251
|
+
static isColorLight(color: string, minimumLuminance?: number): boolean;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
declare const UtilsMessages: {
|
|
@@ -1481,7 +1481,7 @@ declare class BroadcastService implements OnDestroy {
|
|
|
1481
1481
|
/**
|
|
1482
1482
|
* Creates a new standalone `BroadcastChannelManager` instance bound to the shared ARS channel.
|
|
1483
1483
|
* Useful when a caller needs direct channel access outside the service.
|
|
1484
|
-
* @returns A new `BroadcastChannelManager` connected to
|
|
1484
|
+
* @returns A new `BroadcastChannelManager` connected to the shared channel.
|
|
1485
1485
|
*/
|
|
1486
1486
|
static createChannel(): BroadcastChannelManager;
|
|
1487
1487
|
ngOnDestroy(): void;
|