@arsedizioni/ars-utils 22.5.16 → 22.5.18
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.ui.mjs +399 -175
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +115 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +30 -17
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +116 -49
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +34 -13
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +149 -48
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +58 -44
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +54 -19
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +33 -26
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +19 -11
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +19 -11
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +119 -9
- package/types/arsedizioni-ars-utils-core.validators.d.ts +52 -1
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +16 -4
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +37 -9
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +29 -21
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +56 -7
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +13 -4
- package/types/arsedizioni-ars-utils-ui.files.d.ts +15 -2
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +10 -1
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +5 -0
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +8 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { DestroyRef, ChangeDetectorRef } from '@angular/core';
|
|
3
4
|
import { ScrollDispatcher } from '@angular/cdk/scrolling';
|
|
@@ -471,11 +472,57 @@ declare class ClipperSearchResultManager extends ClipperDocumentManager {
|
|
|
471
472
|
* @param id - The storage key to read from.
|
|
472
473
|
* @param storage - The Web Storage instance to use. Defaults to `sessionStorage`.
|
|
473
474
|
*/
|
|
475
|
+
/**
|
|
476
|
+
* Hook invoked just before the component state is serialised by save().
|
|
477
|
+
* Subclasses that keep a separate form model can commit it to filterParams here.
|
|
478
|
+
*/
|
|
479
|
+
protected onStateSaving(): void;
|
|
480
|
+
/**
|
|
481
|
+
* Hook invoked after restore() has fully re-hydrated filterParams.
|
|
482
|
+
* Subclasses that keep a separate form model can rebuild it from filterParams here.
|
|
483
|
+
*/
|
|
484
|
+
protected onStateRestored(): void;
|
|
474
485
|
restore(id: string, storage?: Storage): void;
|
|
475
486
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperSearchResultManager, never>;
|
|
476
487
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClipperSearchResultManager, "ng-component", never, {}, {}, never, never, true, never>;
|
|
477
488
|
}
|
|
478
489
|
|
|
490
|
+
/**
|
|
491
|
+
* Shape of the browser filter-pane form model. Text fields use '' when empty,
|
|
492
|
+
* numeric/select/date fields use null, list fields use null — never undefined,
|
|
493
|
+
* because signal forms only create child fields for defined values.
|
|
494
|
+
*/
|
|
495
|
+
interface BrowserFilterModel {
|
|
496
|
+
modules: NameValueItem<ClipperModule>[] | null;
|
|
497
|
+
tags: NameValueItem<string>[] | null;
|
|
498
|
+
topics: NameValueItem<string>[] | null;
|
|
499
|
+
sectors: NameValueItem<string>[] | null;
|
|
500
|
+
authors: NameValueItem<string>[] | null;
|
|
501
|
+
channels: NameValueItem<any>[] | null;
|
|
502
|
+
number: string;
|
|
503
|
+
year: number | null;
|
|
504
|
+
from: Date | null;
|
|
505
|
+
to: Date | null;
|
|
506
|
+
text: string;
|
|
507
|
+
titleOnly: boolean;
|
|
508
|
+
showNotAbrogatedDocumentsOnly: boolean;
|
|
509
|
+
showCommentedDocumentsOnly: boolean;
|
|
510
|
+
showUnreadDocumentsOnly: boolean;
|
|
511
|
+
sourceNumber: string;
|
|
512
|
+
sourceYear: number | null;
|
|
513
|
+
sourceFrom: Date | null;
|
|
514
|
+
sourceTo: Date | null;
|
|
515
|
+
source: string | null;
|
|
516
|
+
author: string | null;
|
|
517
|
+
type: string | null;
|
|
518
|
+
changedNumber: string;
|
|
519
|
+
changedYear: number | null;
|
|
520
|
+
changedTitle: string;
|
|
521
|
+
modifierNumber: string;
|
|
522
|
+
modifierYear: number | null;
|
|
523
|
+
modifierTitle: string;
|
|
524
|
+
changeReason: number | null;
|
|
525
|
+
}
|
|
479
526
|
declare class ClipperBrowserComponent extends ClipperSearchResultManager {
|
|
480
527
|
readonly filterByNumber: _angular_core.Signal<MatInput>;
|
|
481
528
|
readonly filterByText: _angular_core.Signal<MatInput>;
|
|
@@ -567,9 +614,46 @@ declare class ClipperBrowserComponent extends ClipperSearchResultManager {
|
|
|
567
614
|
* Falls back to all modules when `selectableModules` is empty or null.
|
|
568
615
|
*/
|
|
569
616
|
protected readonly filteredModules: _angular_core.Signal<NameValueItem<ClipperModule>[]>;
|
|
570
|
-
protected interval: DateInterval;
|
|
571
|
-
protected sourceInterval: DateInterval;
|
|
572
617
|
protected user: ClipperUserInfo | undefined;
|
|
618
|
+
/**
|
|
619
|
+
* Model backing the filter-pane signal form. This is the single source of truth
|
|
620
|
+
* for every filter value bound in the template; `filterParams` only carries the
|
|
621
|
+
* assembled query DTO (see syncParams/loadFilter). Empty values are '' / null /
|
|
622
|
+
* false / null-array — never undefined, so every child field exists.
|
|
623
|
+
*/
|
|
624
|
+
protected readonly filterModel: _angular_core.WritableSignal<BrowserFilterModel>;
|
|
625
|
+
/**
|
|
626
|
+
* Signal form for the filter pane. The four year fields accept values from 1750
|
|
627
|
+
* (previously the native min attribute on the inputs).
|
|
628
|
+
*/
|
|
629
|
+
protected readonly filterForm: _angular_forms_signals.FieldTree<BrowserFilterModel, string | number, "writable">;
|
|
630
|
+
/** Root signal form for the sort-mode button selector. */
|
|
631
|
+
protected readonly sortForm: _angular_forms_signals.FieldTree<NameValueItem<ClipperSort>, string | number, "writable">;
|
|
632
|
+
/** Debounced stream of keyup events on the interval inputs (shorthand typing support). */
|
|
633
|
+
private readonly intervalKeyup;
|
|
634
|
+
/**
|
|
635
|
+
* Applies a partial update to the filter model.
|
|
636
|
+
* @param patch - The fields to change.
|
|
637
|
+
*/
|
|
638
|
+
private patchFilter;
|
|
639
|
+
/**
|
|
640
|
+
* Blocks the space key on the interval inputs; it is reserved as the
|
|
641
|
+
* "copy the other bound" shortcut handled by onIntervalKeyup.
|
|
642
|
+
* @param event - The keydown event from a start or end date input.
|
|
643
|
+
*/
|
|
644
|
+
protected onIntervalKeydown(event: KeyboardEvent): void;
|
|
645
|
+
/**
|
|
646
|
+
* Forwards keyup events of the interval inputs to the debounced shorthand parser.
|
|
647
|
+
* @param event - The keyup event from a start or end date input.
|
|
648
|
+
* @param source - `true` when the event comes from the source-publication range.
|
|
649
|
+
* @param end - `true` when the event comes from an end-date input.
|
|
650
|
+
*/
|
|
651
|
+
protected onIntervalKeyup(event: KeyboardEvent, source: boolean, end: boolean): void;
|
|
652
|
+
/**
|
|
653
|
+
* Clears one of the two publication ranges.
|
|
654
|
+
* @param source - `true` to clear the source-publication range.
|
|
655
|
+
*/
|
|
656
|
+
protected clearInterval(source?: boolean): void;
|
|
573
657
|
private _viewReady;
|
|
574
658
|
constructor();
|
|
575
659
|
/**
|
|
@@ -638,8 +722,29 @@ declare class ClipperBrowserComponent extends ClipperSearchResultManager {
|
|
|
638
722
|
*/
|
|
639
723
|
protected clearFilter(): void;
|
|
640
724
|
/**
|
|
641
|
-
|
|
642
|
-
|
|
725
|
+
* Copies the filter model into `filterParams`, normalizing empty values back
|
|
726
|
+
* to the undefined-based convention of ClipperSearchParams.
|
|
727
|
+
*/
|
|
728
|
+
private syncParams;
|
|
729
|
+
/**
|
|
730
|
+
* Commits the form model to filterParams before the component state is serialised.
|
|
731
|
+
*/
|
|
732
|
+
protected onStateSaving(): void;
|
|
733
|
+
/**
|
|
734
|
+
* Rebuilds the form model from filterParams after a state restore.
|
|
735
|
+
* The publication intervals are intentionally not rebuilt from fromDate/toDate,
|
|
736
|
+
* matching the historical behavior where the range inputs were not restored.
|
|
737
|
+
*/
|
|
738
|
+
protected onStateRestored(): void;
|
|
739
|
+
/**
|
|
740
|
+
* Builds a DateInterval for the publication range of the current model.
|
|
741
|
+
* @param source - When true, uses the source-publication range instead.
|
|
742
|
+
* @returns The interval, with raw (non-normalized) bounds.
|
|
743
|
+
*/
|
|
744
|
+
private modelInterval;
|
|
745
|
+
/**
|
|
746
|
+
* Load selected filter
|
|
747
|
+
*/
|
|
643
748
|
private loadFilter;
|
|
644
749
|
/**
|
|
645
750
|
* Apply current filter params
|
|
@@ -1226,11 +1331,16 @@ interface SearchFreeTextQueryParams {
|
|
|
1226
1331
|
declare class ClipperSearchFreeTextQueryBuilderComponent {
|
|
1227
1332
|
readonly done: _angular_core.OutputEmitterRef<SearchFreeTextQueryParams>;
|
|
1228
1333
|
private readonly dialogService;
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
protected
|
|
1233
|
-
|
|
1334
|
+
/** Model backing the signal form: one entry per query operator field. */
|
|
1335
|
+
private readonly model;
|
|
1336
|
+
/** Signal form for the query fields; every field is capped at 200 characters. */
|
|
1337
|
+
protected readonly form: _angular_forms_signals.FieldTree<{
|
|
1338
|
+
queryPhrase: string;
|
|
1339
|
+
queryAnd: string;
|
|
1340
|
+
queryOr: string;
|
|
1341
|
+
queryStart: string;
|
|
1342
|
+
queryNot: string;
|
|
1343
|
+
}, string | number, "writable">;
|
|
1234
1344
|
/**
|
|
1235
1345
|
* Resets all query fields to empty strings.
|
|
1236
1346
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
3
|
+
import { PathKind, SchemaPath, SchemaPathRules } from '@angular/forms/signals';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Directive that delegates validation to an externally provided validator function.
|
|
@@ -265,4 +266,54 @@ declare class NotEmptyValidatorDirective implements Validator {
|
|
|
265
266
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NotEmptyValidatorDirective, "[notEmpty]", never, {}, {}, never, never, true, never>;
|
|
266
267
|
}
|
|
267
268
|
|
|
268
|
-
|
|
269
|
+
/**
|
|
270
|
+
* Signal-forms counterparts of the classic validator directives in this entry point.
|
|
271
|
+
*
|
|
272
|
+
* The `[formField]` directive only honours `NG_VALIDATORS` providers on ControlValueAccessor
|
|
273
|
+
* hosts (custom controls); on native inputs the attribute directives (`password`, `emails`,
|
|
274
|
+
* `time`, `equals`) are ignored. Schemas built with `form()` must therefore use these
|
|
275
|
+
* functions instead. Error kinds and messages match the directive versions one to one.
|
|
276
|
+
*/
|
|
277
|
+
/**
|
|
278
|
+
* Binds a validator requiring the value to be a semicolon-separated list of valid
|
|
279
|
+
* email addresses. An empty value is considered valid (pair with `required` if needed).
|
|
280
|
+
* Signal-forms counterpart of `EmailsValidatorDirective`.
|
|
281
|
+
* @param path - Path of the string field to validate.
|
|
282
|
+
*/
|
|
283
|
+
declare function emailsValidator<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>): void;
|
|
284
|
+
/**
|
|
285
|
+
* Binds a validator requiring the value to meet the minimum password-strength
|
|
286
|
+
* requirements (see `SystemUtils.calculatePasswordStrength`). An empty value is
|
|
287
|
+
* INVALID, exactly like the classic directive.
|
|
288
|
+
* Signal-forms counterpart of `PasswordValidatorDirective`.
|
|
289
|
+
* @param path - Path of the string field to validate.
|
|
290
|
+
*/
|
|
291
|
+
declare function passwordValidator<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>): void;
|
|
292
|
+
/**
|
|
293
|
+
* Binds a validator requiring the value to be a valid `"HH:MM"` time string and,
|
|
294
|
+
* when slots are provided, to fall within at least one of the allowed ranges.
|
|
295
|
+
* An empty value is considered valid (pair with `required` if needed).
|
|
296
|
+
* Signal-forms counterpart of `TimeValidatorDirective`.
|
|
297
|
+
* @param path - Path of the string field to validate.
|
|
298
|
+
* @param slots - Optional reactive function returning the pipe-separated allowed
|
|
299
|
+
* ranges (e.g. `"08:00-12:00|14:00-18:00"`), or `undefined` for none.
|
|
300
|
+
*/
|
|
301
|
+
declare function timeValidator<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>, slots?: () => string | undefined): void;
|
|
302
|
+
/**
|
|
303
|
+
* Binds a validator requiring the value to strictly equal the value of another field
|
|
304
|
+
* of the same form. Reactive on both fields, so the host field re-validates when the
|
|
305
|
+
* other field changes (this replaces the `valueChanges` subscription of the directive).
|
|
306
|
+
* Signal-forms counterpart of `EqualsValidatorDirective`.
|
|
307
|
+
* @param path - Path of the field to validate.
|
|
308
|
+
* @param other - Path of the field whose value must match.
|
|
309
|
+
*/
|
|
310
|
+
declare function equalsValidator<TValue, TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>, other: SchemaPath<TValue, SchemaPathRules.Supported>): void;
|
|
311
|
+
/**
|
|
312
|
+
* Binds a validator requiring the value to be either empty or a complete 6-digit
|
|
313
|
+
* OTP code. A partial code (e.g. `"12"`) is invalid; emptiness is left to `required`.
|
|
314
|
+
* Schema-level counterpart of the `OtpInputComponent` internal validator.
|
|
315
|
+
* @param path - Path of the string field to validate.
|
|
316
|
+
*/
|
|
317
|
+
declare function otpValidator<TPathKind extends PathKind = PathKind.Root>(path: SchemaPath<string, SchemaPathRules.Supported, TPathKind>): void;
|
|
318
|
+
|
|
319
|
+
export { EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SqlDateValidatorDirective, TimeValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective, emailsValidator, equalsValidator, otpValidator, passwordValidator, timeValidator };
|
|
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { OnDestroy } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
4
|
import { NameValueItem, INode } from '@arsedizioni/ars-utils/core';
|
|
5
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
5
6
|
|
|
6
7
|
declare class ButtonSelectorComponent implements OnDestroy, ControlValueAccessor {
|
|
7
8
|
ngControl: NgControl;
|
|
@@ -196,10 +197,18 @@ declare class ChipsSelectorComponent implements OnDestroy, ControlValueAccessor
|
|
|
196
197
|
private propagateTouched;
|
|
197
198
|
private readonly renderer;
|
|
198
199
|
private readonly cdr;
|
|
199
|
-
/**
|
|
200
|
-
|
|
200
|
+
/**
|
|
201
|
+
* Currently selected items. Kept loosely typed on purpose: in multi-select mode the
|
|
202
|
+
* bound controls write an array, while in single-select mode mat-select / the chip
|
|
203
|
+
* listbox write a single item; `getSelection()` normalizes both shapes.
|
|
204
|
+
*/
|
|
205
|
+
protected readonly selection: _angular_core.WritableSignal<any>;
|
|
201
206
|
/** The single selected item — used in `button` collapsed-display mode. */
|
|
202
|
-
protected singleSelection
|
|
207
|
+
protected readonly singleSelection: _angular_core.WritableSignal<NameValueItem<any>>;
|
|
208
|
+
/** Root signal form bound to the internal mat-select / chip listbox. */
|
|
209
|
+
protected readonly selectionForm: _angular_forms_signals.FieldTree<any, string | number, "writable">;
|
|
210
|
+
/** Root signal form bound to the internal button-selector in `button` collapsed mode. */
|
|
211
|
+
protected readonly singleForm: _angular_forms_signals.FieldTree<NameValueItem<any>, string | number, "writable">;
|
|
203
212
|
constructor(ngControl: NgControl);
|
|
204
213
|
ngOnDestroy(): void;
|
|
205
214
|
/**
|
|
@@ -214,7 +223,8 @@ declare class ChipsSelectorComponent implements OnDestroy, ControlValueAccessor
|
|
|
214
223
|
*/
|
|
215
224
|
private getSelection;
|
|
216
225
|
/**
|
|
217
|
-
* Schedules a value update after a short delay,
|
|
226
|
+
* Schedules a value update after a short delay, coalescing rapid selection changes
|
|
227
|
+
* before the value is propagated to the outer form.
|
|
218
228
|
*/
|
|
219
229
|
updateValue(): void;
|
|
220
230
|
/**
|
|
@@ -319,6 +329,8 @@ declare class TreePickerComponent {
|
|
|
319
329
|
private _isSelectableNode;
|
|
320
330
|
/** Current filter text. */
|
|
321
331
|
protected readonly filterText: _angular_core.WritableSignal<string>;
|
|
332
|
+
/** Root signal form bound to the filter text input. */
|
|
333
|
+
protected readonly filterForm: _angular_forms_signals.FieldTree<string, string | number, "writable">;
|
|
322
334
|
/** Nodes matching the current filter text, in nodeMap iteration order. */
|
|
323
335
|
protected readonly filteredItems: _angular_core.WritableSignal<INode[]>;
|
|
324
336
|
/** Index of the currently highlighted filtered node (-1 = none). */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ElementRef } from '@angular/core';
|
|
3
|
-
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors
|
|
3
|
+
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
4
4
|
import { PasswordStrength } from '@arsedizioni/ars-utils/core';
|
|
5
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
5
6
|
import { CredentialsDialogResult, ResetPasswordDialogResult, RecoverPasswordDialogResult, PromptOtpDialogResult, PromptDialogData } from '@arsedizioni/ars-utils/ui';
|
|
6
7
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
7
8
|
|
|
@@ -129,8 +130,15 @@ declare class CredentialsDialogComponent {
|
|
|
129
130
|
readonly recoveringPassword: _angular_core.OutputEmitterRef<CredentialsDialogResult>;
|
|
130
131
|
/** Dialog configuration with defaults applied at construction time. */
|
|
131
132
|
protected readonly dialogData: _angular_core.WritableSignal<CredentialsDialogData>;
|
|
132
|
-
/**
|
|
133
|
-
|
|
133
|
+
/** Model backing the signal form, pre-filled with the user name from dialog data when provided. */
|
|
134
|
+
private readonly model;
|
|
135
|
+
/**
|
|
136
|
+
* Signal form for the credentials. Validators follow the active mode: the user
|
|
137
|
+
* field is a required email in `email` mode and plain required in `user` mode,
|
|
138
|
+
* the password is required outside `otp` mode, and the OTP code is a required
|
|
139
|
+
* complete 6-digit code in `otp` mode.
|
|
140
|
+
*/
|
|
141
|
+
protected readonly form: _angular_forms_signals.FieldTree<CredentialsDialogResult, string | number, "writable">;
|
|
134
142
|
/** Whether the password field is currently shown as plain text. */
|
|
135
143
|
protected readonly showPassword: _angular_core.WritableSignal<boolean>;
|
|
136
144
|
/**
|
|
@@ -167,8 +175,16 @@ declare class ResetPasswordDialogComponent {
|
|
|
167
175
|
private readonly dialogRef;
|
|
168
176
|
/** Dialog configuration with defaults applied at construction time. */
|
|
169
177
|
protected readonly dialogData: _angular_core.WritableSignal<ResetPasswordDialogData>;
|
|
170
|
-
/**
|
|
171
|
-
|
|
178
|
+
/** Model backing the signal form. */
|
|
179
|
+
private readonly model;
|
|
180
|
+
/**
|
|
181
|
+
* Signal form for the password reset. Validators follow the active mode:
|
|
182
|
+
* the email is required in `forgot` mode, the old password in `old` mode,
|
|
183
|
+
* a complete 6-digit OTP code in `otp` mode; the new password is always
|
|
184
|
+
* required, at least 10 characters and strong enough, and its confirmation
|
|
185
|
+
* (required outside `admin` mode) must match it.
|
|
186
|
+
*/
|
|
187
|
+
protected readonly form: _angular_forms_signals.FieldTree<ResetPasswordDialogResult, string | number, "writable">;
|
|
172
188
|
/** Whether the old-password field is currently shown as plain text. */
|
|
173
189
|
protected readonly showOldPassword: _angular_core.WritableSignal<boolean>;
|
|
174
190
|
/** Whether the new-password field is currently shown as plain text. */
|
|
@@ -196,8 +212,12 @@ declare class RecoverPasswordDialogComponent {
|
|
|
196
212
|
readonly done: _angular_core.OutputEmitterRef<RecoverPasswordDialogResult>;
|
|
197
213
|
/** Dialog configuration with defaults applied at construction time. */
|
|
198
214
|
protected readonly dialogData: _angular_core.WritableSignal<RecoverPasswordDialogData>;
|
|
199
|
-
/**
|
|
200
|
-
|
|
215
|
+
/** Model backing the signal form. */
|
|
216
|
+
private readonly model;
|
|
217
|
+
/**
|
|
218
|
+
* Signal form for the recovery request: the email is required and must be valid.
|
|
219
|
+
*/
|
|
220
|
+
protected readonly form: _angular_forms_signals.FieldTree<RecoverPasswordDialogResult, string | number, "writable">;
|
|
201
221
|
/**
|
|
202
222
|
* Emits the current form result to trigger the password-recovery flow.
|
|
203
223
|
*/
|
|
@@ -207,11 +227,19 @@ declare class RecoverPasswordDialogComponent {
|
|
|
207
227
|
}
|
|
208
228
|
|
|
209
229
|
declare class PromptOtpDialogComponent {
|
|
210
|
-
readonly f: _angular_core.Signal<NgForm>;
|
|
211
230
|
readonly done: _angular_core.OutputEmitterRef<PromptOtpDialogResult>;
|
|
212
231
|
private readonly dialogService;
|
|
213
232
|
protected readonly dialogData: _angular_core.WritableSignal<PromptDialogData>;
|
|
214
|
-
|
|
233
|
+
/** Model backing the signal form. `value` holds the 6-digit OTP code. */
|
|
234
|
+
private readonly model;
|
|
235
|
+
/**
|
|
236
|
+
* Signal form for the OTP code. The code is always required here; the
|
|
237
|
+
* "complete 6 digits" rule comes from the OtpInputComponent validator,
|
|
238
|
+
* honoured through the ControlValueAccessor interop.
|
|
239
|
+
*/
|
|
240
|
+
protected readonly form: _angular_forms_signals.FieldTree<{
|
|
241
|
+
value: string;
|
|
242
|
+
}, string | number, "writable">;
|
|
215
243
|
/**
|
|
216
244
|
* Validates the form and emits the OTP result, or shows an error if validation fails.
|
|
217
245
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
2
|
import { ComponentType } from '@angular/cdk/portal';
|
|
3
3
|
import { MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
|
|
4
4
|
import { MatSnackBarRef } from '@angular/material/snack-bar';
|
|
5
5
|
import { ShellService } from '@arsedizioni/ars-utils/ui.shell';
|
|
6
6
|
import { DialogResult, DialogOption } from '@arsedizioni/ars-utils/ui';
|
|
7
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
7
8
|
import { MatFormFieldAppearance } from '@angular/material/form-field';
|
|
8
9
|
|
|
9
10
|
interface ConfirmDialogOption extends DialogOption {
|
|
@@ -19,10 +20,10 @@ interface ConfirmDialogData {
|
|
|
19
20
|
}
|
|
20
21
|
declare class ConfirmDialogComponent {
|
|
21
22
|
/** Emitted when the user makes a choice. Carries the selected result and any option state. */
|
|
22
|
-
readonly choosen:
|
|
23
|
+
readonly choosen: i0.OutputEmitterRef<DialogResult>;
|
|
23
24
|
private readonly dialogRef;
|
|
24
25
|
/** Dialog configuration, with sensible defaults applied at construction time. */
|
|
25
|
-
protected readonly dialogData:
|
|
26
|
+
protected readonly dialogData: i0.WritableSignal<ConfirmDialogData>;
|
|
26
27
|
constructor();
|
|
27
28
|
/**
|
|
28
29
|
* Confirms the dialog, emitting `'ok'` together with the current option selections.
|
|
@@ -36,8 +37,8 @@ declare class ConfirmDialogComponent {
|
|
|
36
37
|
* Triggers the tertiary action, emitting `'other'`.
|
|
37
38
|
*/
|
|
38
39
|
other(): void;
|
|
39
|
-
static ɵfac:
|
|
40
|
-
static ɵcmp:
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmDialogComponent, "ng-component", never, {}, { "choosen": "choosen"; }, never, never, true, never>;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
declare enum DeleteDialogConfirmMode {
|
|
@@ -56,17 +57,24 @@ interface DeleteDialogData {
|
|
|
56
57
|
}
|
|
57
58
|
declare class DeleteDialogComponent {
|
|
58
59
|
/** Emitted when the user makes a choice. Carries the selected result. */
|
|
59
|
-
readonly choosen:
|
|
60
|
+
readonly choosen: i0.OutputEmitterRef<DialogResult>;
|
|
60
61
|
private readonly dialogRef;
|
|
61
62
|
/** Dialog configuration with defaults applied at construction time. */
|
|
62
|
-
protected readonly dialogData:
|
|
63
|
+
protected readonly dialogData: i0.WritableSignal<DeleteDialogData>;
|
|
63
64
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
65
|
+
* Model backing the signal form: `confirmed` starts as `true` for all modes
|
|
66
|
+
* except `Simple`, which requires explicit checkbox confirmation, and
|
|
67
|
+
* `confirmValue` is the strong-confirmation text.
|
|
66
68
|
*/
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
|
|
69
|
+
private readonly model;
|
|
70
|
+
/**
|
|
71
|
+
* Signal form for the confirmation. In `Simple` mode the checkbox must be
|
|
72
|
+
* checked; in `Strong` mode the text must be exactly the word "elimina".
|
|
73
|
+
*/
|
|
74
|
+
protected readonly form: _angular_forms_signals.FieldTree<{
|
|
75
|
+
confirmed: boolean;
|
|
76
|
+
confirmValue: string;
|
|
77
|
+
}, string | number, "writable">;
|
|
70
78
|
/**
|
|
71
79
|
* Confirms the deletion, emitting `'ok'` and closing the dialog.
|
|
72
80
|
*/
|
|
@@ -75,8 +83,8 @@ declare class DeleteDialogComponent {
|
|
|
75
83
|
* Cancels the operation, emitting `'cancel'` and closing the dialog.
|
|
76
84
|
*/
|
|
77
85
|
cancel(): void;
|
|
78
|
-
static ɵfac:
|
|
79
|
-
static ɵcmp:
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DeleteDialogComponent, never>;
|
|
87
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DeleteDialogComponent, "ng-component", never, {}, { "choosen": "choosen"; }, never, never, true, never>;
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
interface ToastData {
|
|
@@ -86,15 +94,15 @@ interface ToastData {
|
|
|
86
94
|
}
|
|
87
95
|
declare class ToastComponent {
|
|
88
96
|
/** Emitted when the user clicks the optional action button. */
|
|
89
|
-
readonly action:
|
|
97
|
+
readonly action: i0.OutputEmitterRef<void>;
|
|
90
98
|
/** Snack-bar payload with a safe fallback to an empty message when no data is injected. */
|
|
91
|
-
protected readonly dialogData:
|
|
99
|
+
protected readonly dialogData: i0.WritableSignal<ToastData>;
|
|
92
100
|
/**
|
|
93
101
|
* Emits the `action` event to notify the caller that the action button was clicked.
|
|
94
102
|
*/
|
|
95
103
|
protected do(): void;
|
|
96
|
-
static ɵfac:
|
|
97
|
-
static ɵcmp:
|
|
104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToastComponent, never>;
|
|
105
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToastComponent, "ng-component", never, {}, { "action": "action"; }, never, never, true, never>;
|
|
98
106
|
}
|
|
99
107
|
|
|
100
108
|
interface IDialogService {
|
|
@@ -110,7 +118,7 @@ declare class DialogService extends ShellService {
|
|
|
110
118
|
* which knows nothing about Material and must not, so the two members every caller uses of
|
|
111
119
|
* `UIService` are re-exposed here.
|
|
112
120
|
*/
|
|
113
|
-
readonly appearance:
|
|
121
|
+
readonly appearance: i0.WritableSignal<"fill" | "outline">;
|
|
114
122
|
/**
|
|
115
123
|
* Updates the global form-field appearance.
|
|
116
124
|
* @param value - The new appearance value. Falls back to `'fill'` when `undefined` is passed.
|
|
@@ -220,8 +228,8 @@ declare class DialogService extends ShellService {
|
|
|
220
228
|
* @returns The dialog reference, or `null` outside the browser.
|
|
221
229
|
*/
|
|
222
230
|
delete(message: string, title?: string, confirmMode?: DeleteDialogConfirmMode, okCaption?: string, cancelCaption?: string, width?: number, details?: string): MatDialogRef<DeleteDialogComponent> | null;
|
|
223
|
-
static ɵfac:
|
|
224
|
-
static ɵprov:
|
|
231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
232
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
export { ConfirmDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, ToastComponent };
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { PromptDialogResult, PromptDialogData, PromptDateDialogResult, PromptTimeDialogData } from '@arsedizioni/ars-utils/ui';
|
|
3
|
-
import { NgForm } from '@angular/forms';
|
|
4
4
|
|
|
5
5
|
declare class PromptDialogComponent {
|
|
6
|
-
readonly f: _angular_core.Signal<NgForm>;
|
|
7
6
|
readonly done: _angular_core.OutputEmitterRef<PromptDialogResult>;
|
|
8
7
|
private readonly dialogService;
|
|
9
8
|
protected readonly dialogData: _angular_core.WritableSignal<PromptDialogData>;
|
|
10
|
-
|
|
9
|
+
/** Model backing the signal form. `value` type depends on the prompt type. */
|
|
10
|
+
private readonly model;
|
|
11
|
+
/**
|
|
12
|
+
* Signal form for the prompt value. Validators mirror the previous template-driven
|
|
13
|
+
* form: `required` follows the dialog data, `min`/`max` apply to the Number type.
|
|
14
|
+
*/
|
|
15
|
+
protected readonly form: _angular_forms_signals.FieldTree<{
|
|
16
|
+
value: any;
|
|
17
|
+
}, string | number, "writable">;
|
|
11
18
|
/**
|
|
12
19
|
* Validates the form and emits the result, or shows an error if validation fails.
|
|
13
20
|
*/
|
|
@@ -17,11 +24,46 @@ declare class PromptDialogComponent {
|
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
declare class PromptDateDialogComponent {
|
|
20
|
-
readonly f: _angular_core.Signal<NgForm>;
|
|
21
27
|
readonly done: _angular_core.OutputEmitterRef<PromptDateDialogResult>;
|
|
22
28
|
private readonly dialogService;
|
|
23
29
|
protected readonly dialogData: _angular_core.WritableSignal<PromptDialogData>;
|
|
24
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Model backing the signal form: `date` serves the single-date type, while
|
|
32
|
+
* `from`/`to` serve the date-interval type. Empty values are `null` (not
|
|
33
|
+
* `undefined`) because signal forms only build child fields for keys whose
|
|
34
|
+
* value is defined, and Material's datepicker accessors report an empty
|
|
35
|
+
* input as `null` anyway; values are normalized to `undefined` on emit.
|
|
36
|
+
*/
|
|
37
|
+
private readonly model;
|
|
38
|
+
/**
|
|
39
|
+
* Signal form for the date value(s). `required` follows the dialog data and only
|
|
40
|
+
* applies to the fields of the active prompt type; the datepicker's own parse
|
|
41
|
+
* validators are picked up through the ControlValueAccessor interop.
|
|
42
|
+
*/
|
|
43
|
+
protected readonly form: _angular_forms_signals.FieldTree<{
|
|
44
|
+
date: Date | null;
|
|
45
|
+
from: Date | null;
|
|
46
|
+
to: Date | null;
|
|
47
|
+
}, string | number, "writable">;
|
|
48
|
+
/** Debounced stream of keyup events on the interval inputs (shorthand typing support). */
|
|
49
|
+
private readonly intervalKeyup;
|
|
50
|
+
constructor();
|
|
51
|
+
/**
|
|
52
|
+
* Blocks the space key on the interval inputs; it is reserved as the
|
|
53
|
+
* "copy the other bound" shortcut handled by onIntervalKeyup.
|
|
54
|
+
* @param event - The keydown event from the start or end date input.
|
|
55
|
+
*/
|
|
56
|
+
protected onIntervalKeydown(event: KeyboardEvent): void;
|
|
57
|
+
/**
|
|
58
|
+
* Forwards keyup events of the interval inputs to the debounced shorthand parser.
|
|
59
|
+
* @param event - The keyup event from the start or end date input.
|
|
60
|
+
* @param end - `true` when the event comes from the end-date input.
|
|
61
|
+
*/
|
|
62
|
+
protected onIntervalKeyup(event: KeyboardEvent, end: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* Clears both bounds of the date interval.
|
|
65
|
+
*/
|
|
66
|
+
protected clearInterval(): void;
|
|
25
67
|
/**
|
|
26
68
|
* Validates the form and emits the result, or shows an error if validation fails.
|
|
27
69
|
*/
|
|
@@ -31,11 +73,18 @@ declare class PromptDateDialogComponent {
|
|
|
31
73
|
}
|
|
32
74
|
|
|
33
75
|
declare class PromptTimeDialogComponent {
|
|
34
|
-
readonly f: _angular_core.Signal<NgForm>;
|
|
35
76
|
readonly done: _angular_core.OutputEmitterRef<PromptDialogResult>;
|
|
36
77
|
private readonly dialogService;
|
|
37
78
|
protected readonly dialogData: _angular_core.WritableSignal<PromptTimeDialogData>;
|
|
38
|
-
|
|
79
|
+
/** Model backing the signal form. The value is a `"HH:MM"` time string. */
|
|
80
|
+
private readonly model;
|
|
81
|
+
/**
|
|
82
|
+
* Signal form for the time value: `required` follows the dialog data and the
|
|
83
|
+
* time validator enforces format and the optional allowed slots.
|
|
84
|
+
*/
|
|
85
|
+
protected readonly form: _angular_forms_signals.FieldTree<{
|
|
86
|
+
value: string;
|
|
87
|
+
}, string | number, "writable">;
|
|
39
88
|
/**
|
|
40
89
|
* Validates the form and emits the result, or shows an error if validation fails.
|
|
41
90
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { OnDestroy } from '@angular/core';
|
|
3
4
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
@@ -31,7 +32,9 @@ declare class SelectDialogComponent {
|
|
|
31
32
|
protected canPaginate: _angular_core.WritableSignal<boolean>;
|
|
32
33
|
protected okDisabled: _angular_core.WritableSignal<boolean>;
|
|
33
34
|
protected filterMetadata: SearchFilterMetadata;
|
|
34
|
-
protected filterText: string
|
|
35
|
+
protected readonly filterText: _angular_core.WritableSignal<string>;
|
|
36
|
+
/** Root signal form bound to the filter text input. */
|
|
37
|
+
protected readonly filterForm: _angular_forms_signals.FieldTree<string, string | number, "writable">;
|
|
35
38
|
protected readonly filterOptions: _angular_core.WritableSignal<SelectableFilter[]>;
|
|
36
39
|
protected filterOptionsInfo: _angular_core.WritableSignal<string>;
|
|
37
40
|
protected lookupField: string;
|
|
@@ -190,6 +193,8 @@ declare class SelectTreeDialogComponent {
|
|
|
190
193
|
protected readonly currentNode: _angular_core.WritableSignal<ItemNode>;
|
|
191
194
|
/** Current filter text. */
|
|
192
195
|
protected readonly filterText: _angular_core.WritableSignal<string>;
|
|
196
|
+
/** Root signal form bound to the filter text input. */
|
|
197
|
+
protected readonly filterForm: _angular_forms_signals.FieldTree<string, string | number, "writable">;
|
|
193
198
|
/** Nodes matching the current filter text. */
|
|
194
199
|
protected readonly filteredItems: _angular_core.WritableSignal<ItemNode[]>;
|
|
195
200
|
/** Index of the currently highlighted filtered node (-1 = none). */
|
|
@@ -282,11 +287,15 @@ declare class SendToDialogComponent implements ISendToDialog {
|
|
|
282
287
|
readonly done: _angular_core.OutputEmitterRef<SendToDialogResult>;
|
|
283
288
|
/** Emitted when the user requests to populate the recipient list. */
|
|
284
289
|
readonly populate: _angular_core.OutputEmitterRef<SendToPopulateData>;
|
|
285
|
-
private readonly cdr;
|
|
286
290
|
/** Dialog configuration, injected and exposed as a signal. */
|
|
287
291
|
protected readonly dialogData: _angular_core.WritableSignal<SendToDialogData>;
|
|
288
|
-
/**
|
|
289
|
-
|
|
292
|
+
/** Model backing the signal form. */
|
|
293
|
+
private readonly model;
|
|
294
|
+
/**
|
|
295
|
+
* Signal form for the send-to fields: recipients (a required, valid,
|
|
296
|
+
* semicolon-separated email list), subject and text are all required.
|
|
297
|
+
*/
|
|
298
|
+
protected readonly form: _angular_forms_signals.FieldTree<SendToDialogResult, string | number, "writable">;
|
|
290
299
|
/**
|
|
291
300
|
* Confirm the form and emit the result.
|
|
292
301
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _angular_forms_signals from '@angular/forms/signals';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { OnDestroy, DoCheck, ElementRef } from '@angular/core';
|
|
3
4
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
@@ -34,10 +35,12 @@ declare class FileInputComponent implements OnDestroy, DoCheck, MatFormFieldCont
|
|
|
34
35
|
private setValue;
|
|
35
36
|
get value(): FileInfo;
|
|
36
37
|
get size(): any;
|
|
37
|
-
|
|
38
|
+
/** Backing signal so the internal form schema reacts to `required` changes. */
|
|
39
|
+
private readonly _required;
|
|
38
40
|
get required(): boolean;
|
|
39
41
|
set required(value: boolean);
|
|
40
|
-
|
|
42
|
+
/** Backing signal so the internal form schema reacts to `disabled` changes. */
|
|
43
|
+
private readonly _disabled;
|
|
41
44
|
get disabled(): boolean;
|
|
42
45
|
set disabled(value: boolean);
|
|
43
46
|
get placeholder(): string;
|
|
@@ -60,6 +63,16 @@ declare class FileInputComponent implements OnDestroy, DoCheck, MatFormFieldCont
|
|
|
60
63
|
readonly changed: _angular_core.OutputEmitterRef<FileInfo>;
|
|
61
64
|
readonly download: _angular_core.OutputEmitterRef<void>;
|
|
62
65
|
readonly preview: _angular_core.OutputEmitterRef<void>;
|
|
66
|
+
/** Model backing the internal display form: the (readonly) file-name text. */
|
|
67
|
+
private readonly nameModel;
|
|
68
|
+
/**
|
|
69
|
+
* Internal signal form for the file-name input. It reproduces the previous
|
|
70
|
+
* template-driven validators: `required` follows the `required` input and the
|
|
71
|
+
* size rule mirrors FileSizeValidatorDirective (empty name is left to `required`).
|
|
72
|
+
*/
|
|
73
|
+
protected readonly nameForm: _angular_forms_signals.FieldTree<{
|
|
74
|
+
name: string;
|
|
75
|
+
}, string | number, "writable">;
|
|
63
76
|
private propagateChange;
|
|
64
77
|
private propagateTouched;
|
|
65
78
|
constructor(ngControl: NgControl);
|