@arsedizioni/ars-utils 22.5.15 → 22.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +82 -23
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +47 -0
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +115 -1
  6. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +77 -22
  8. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +116 -49
  10. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +34 -13
  12. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +149 -48
  14. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +58 -44
  16. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/types/arsedizioni-ars-utils-clipper.common.d.ts +42 -10
  19. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +32 -0
  20. package/types/arsedizioni-ars-utils-core.validators.d.ts +52 -1
  21. package/types/arsedizioni-ars-utils-evolution.common.d.ts +39 -11
  22. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +37 -9
  23. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +29 -21
  24. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +56 -7
  25. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +13 -4
@@ -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
- export { EmailsValidatorDirective, EqualsValidatorDirective, FileSizeValidatorDirective, GuidValidatorDirective, MaxTermsValidatorDirective, NotEmptyValidatorDirective, NotEqualValidatorDirective, NotFutureValidatorDirective, PasswordValidatorDirective, SqlDateValidatorDirective, TimeValidatorDirective, UrlValidatorDirective, ValidIfDirective, ValidatorDirective };
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 };
@@ -46,6 +46,20 @@ interface EvolutionLoginResult {
46
46
  */
47
47
  requiresPasswordChange?: boolean;
48
48
  }
49
+ /**
50
+ * Answer of `GET /session/status`: whether this browser holds a live session towards the Evolution
51
+ * API.
52
+ *
53
+ * This is the probe behind the link state. The auth cookie is HttpOnly and belongs to the API's
54
+ * host, so nothing here can read it, and its presence would prove nothing anyway — the session also
55
+ * lives server-side and may have been revoked or evicted. The endpoint never answers 401, which is
56
+ * what makes it safe to call with no session at all: a probe that failed with a status code would be
57
+ * reported by the interceptor as an expired session.
58
+ */
59
+ interface EvolutionSessionStatus {
60
+ /** True when the cookie this browser presented resolves to a live, validated session. */
61
+ connected: boolean;
62
+ }
49
63
  /**
50
64
  * The session as this library holds it, persisted so a page refresh has something to validate.
51
65
  *
@@ -957,8 +971,8 @@ declare class LoginService {
957
971
  */
958
972
  clear(): void;
959
973
  /**
960
- * Initialises the service with the back-end URI and optional feature flags, and revalidates a
961
- * session that survived a page refresh instead of assuming it is still there.
974
+ * Initialises the service with the back-end URI and optional feature flags, and asks the API — the
975
+ * only party that can read the HttpOnly cookie — whether this browser still holds a session.
962
976
  *
963
977
  * Must be called once during application bootstrap, before any other method. What it used to do
964
978
  * on a refresh was announce `LOGIN_COMPLETED` on the strength of a value in local storage; the
@@ -1009,6 +1023,15 @@ declare class LoginService {
1009
1023
  * @returns An observable that emits the `ApiResult<EvolutionLoginResult>`.
1010
1024
  */
1011
1025
  confirmIdentity(code: string, email?: string): Observable<ApiResult<EvolutionLoginResult>>;
1026
+ /**
1027
+ * Asks the API whether this browser holds a live session, without ever failing with a 401: the
1028
+ * route is anonymous and answers `connected: false` to a caller with no session. This is the one
1029
+ * honest way to know the link state -- the auth cookie is HttpOnly and belongs to the API's host,
1030
+ * so it cannot be read from here, and its presence would prove nothing anyway, since the session
1031
+ * also lives server-side and may have been revoked or evicted.
1032
+ * @returns An observable that emits the `ApiResult<EvolutionSessionStatus>`.
1033
+ */
1034
+ status(): Observable<ApiResult<EvolutionSessionStatus>>;
1012
1035
  /**
1013
1036
  * Reads the current session from the server, which resolves it from the auth cookie's claims.
1014
1037
  * Used to restore the state after a page refresh instead of trusting what local storage holds.
@@ -1020,13 +1043,17 @@ declare class LoginService {
1020
1043
  */
1021
1044
  me(): Observable<ApiResult<EvolutionLoginResult>>;
1022
1045
  /**
1023
- * Asks `/session/me` whether the restored session is still alive, and announces the login when it
1024
- * is.
1046
+ * Asks `/session/status` whether this browser holds a live session, and hydrates the context
1047
+ * through {@link me} when it does.
1048
+ *
1049
+ * The probe is silent by construction: `/session/status` never answers 401, so a visitor who
1050
+ * never signed in -- or a cookie whose session has died -- comes back as `connected: false` with
1051
+ * no error broadcast and no dialog. Only then is the stale stored context cleared, so the
1052
+ * `loggedIn` signal tells the truth at every bootstrap.
1025
1053
  *
1026
- * Nothing is cleared on failure, and that is deliberate: a failure here is not proof of a dead
1027
- * session -- the API may be unreachable, the proxy may have answered 502, the device may be
1028
- * offline -- and clearing on any of those would sign the user out with a perfectly valid cookie.
1029
- * A genuine 401 is a different matter and the interceptor has already reported it.
1054
+ * Nothing is cleared on a transport failure, and that is deliberate: an unreachable API is not
1055
+ * proof of a dead session -- the proxy may have answered 502, the device may be offline -- and
1056
+ * clearing on any of those would sign the user out with a perfectly valid cookie.
1030
1057
  * @returns void
1031
1058
  */
1032
1059
  private restoreSession;
@@ -1239,8 +1266,9 @@ declare class EvolutionService {
1239
1266
  get user(): EvolutionUserInfo | undefined;
1240
1267
  /**
1241
1268
  * `true` when this browser has a session the API has accepted. It starts from the stored context
1242
- * and is confirmed -- or left to the interceptor's 401 handling -- by the `/session/me` call
1243
- * {@link initialize} makes.
1269
+ * and is settled -- raised or cleared -- by the silent `/session/status` probe {@link initialize}
1270
+ * makes, which is the one honest way to read a state that lives in an HttpOnly cookie plus a
1271
+ * server-side lease. This signal IS the link state: bind it, do not poll it.
1244
1272
  */
1245
1273
  get loggedIn(): Signal<boolean>;
1246
1274
  /** `true` while an authentication is in flight. */
@@ -1262,4 +1290,4 @@ declare class EvolutionService {
1262
1290
  }
1263
1291
 
1264
1292
  export { AccountService, ComplianceService, ERPComplianceActivityState, ERPComplianceLawOrigin, ERPComplianceLawState, ERPComplianceLawsSelectionType, ERPComplianceNotificationLimit, ERPComplianceProfileFlags, ERPComplianceProfileRole, ERPComplianceRegisterNotificationType, ERPComplianceRegisterSiteImportOptions, ERPComplianceScope, ERPExportFormat, ERPExportPart, ERPExportSource, ERPExportType, ERPModule, ERPPlace, ERPPlacePermission, ERPRecurrenceFrequencyType, EVOLUTION_ACTIVE_ACCOUNT_KEY, EvolutionComplianceActivityStates, EvolutionComplianceContextInfo, EvolutionComplianceLawChangeStates, EvolutionComplianceLawOrigins, EvolutionComplianceLawStates, EvolutionComplianceNotificationLimits, EvolutionComplianceNotifications, EvolutionComplianceObligationAuthorities, EvolutionComplianceObligationTypes, EvolutionComplianceProfileFlags, EvolutionComplianceProfileRoles, EvolutionComplianceScopes, EvolutionMessages, EvolutionRecurrenceFrequencyTypes, EvolutionService, EvolutionServiceFlags, LoginService, evolutionAuthInterceptor };
1265
- export type { ComplianceRegisterUsersResultModel, EvolutionChangeContextModel, EvolutionChangeContextResultModel, EvolutionComplianceActivitiesAddParams, EvolutionComplianceActivity, EvolutionComplianceLaswExportParams, EvolutionComplianceLaw, EvolutionComplianceLawDocumentInfo, EvolutionComplianceLawReference, EvolutionComplianceLawsAddParams, EvolutionComplianceRegister, EvolutionComplianceRegisterProfile, EvolutionComplianceRegisterSite, EvolutionContextInfo, EvolutionExportModel, EvolutionLicenceModuleInfo, EvolutionLoginInfo, EvolutionLoginResult, EvolutionPermission, EvolutionPlacePermission, EvolutionPlaceable, EvolutionQueryRegisterProfilesModel, EvolutionRecoverPasswordModel, EvolutionRegisterProfileSiteInfo, EvolutionRegisterProfileUserInfo, EvolutionResetPasswordModel, EvolutionUpdateUserSettingsModel, EvolutionUserInfo, EvolutionUserLink, EvolutionUserModuleInfo };
1293
+ export type { ComplianceRegisterUsersResultModel, EvolutionChangeContextModel, EvolutionChangeContextResultModel, EvolutionComplianceActivitiesAddParams, EvolutionComplianceActivity, EvolutionComplianceLaswExportParams, EvolutionComplianceLaw, EvolutionComplianceLawDocumentInfo, EvolutionComplianceLawReference, EvolutionComplianceLawsAddParams, EvolutionComplianceRegister, EvolutionComplianceRegisterProfile, EvolutionComplianceRegisterSite, EvolutionContextInfo, EvolutionExportModel, EvolutionLicenceModuleInfo, EvolutionLoginInfo, EvolutionLoginResult, EvolutionPermission, EvolutionPlacePermission, EvolutionPlaceable, EvolutionQueryRegisterProfilesModel, EvolutionRecoverPasswordModel, EvolutionRegisterProfileSiteInfo, EvolutionRegisterProfileUserInfo, EvolutionResetPasswordModel, EvolutionSessionStatus, EvolutionUpdateUserSettingsModel, EvolutionUserInfo, EvolutionUserLink, EvolutionUserModuleInfo };
@@ -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, NgForm } from '@angular/forms';
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
- /** Current form model, pre-filled with the user name from dialog data when provided. */
133
- protected item: CredentialsDialogResult;
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
- /** Current form model bound to the template inputs. */
171
- protected item: ResetPasswordDialogResult;
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
- /** Current form model bound to the template inputs. */
200
- protected item: RecoverPasswordDialogResult;
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
- protected value: any;
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 _angular_core from '@angular/core';
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: _angular_core.OutputEmitterRef<DialogResult>;
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: _angular_core.WritableSignal<ConfirmDialogData>;
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: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
40
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialogComponent, "ng-component", never, {}, { "choosen": "choosen"; }, never, never, true, never>;
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: _angular_core.OutputEmitterRef<DialogResult>;
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: _angular_core.WritableSignal<DeleteDialogData>;
63
+ protected readonly dialogData: i0.WritableSignal<DeleteDialogData>;
63
64
  /**
64
- * Whether the user has confirmed the deletion.
65
- * Starts as `true` for all modes except `Simple`, which requires explicit checkbox confirmation.
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
- protected readonly confirmed: _angular_core.WritableSignal<boolean>;
68
- /** Current value typed into the strong-confirmation text field. */
69
- protected confirmValue?: string;
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: _angular_core.ɵɵFactoryDeclaration<DeleteDialogComponent, never>;
79
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DeleteDialogComponent, "ng-component", never, {}, { "choosen": "choosen"; }, never, never, true, never>;
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: _angular_core.OutputEmitterRef<void>;
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: _angular_core.WritableSignal<ToastData>;
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: _angular_core.ɵɵFactoryDeclaration<ToastComponent, never>;
97
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastComponent, "ng-component", never, {}, { "action": "action"; }, never, never, true, never>;
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: _angular_core.WritableSignal<"fill" | "outline">;
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: _angular_core.ɵɵFactoryDeclaration<DialogService, never>;
224
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogService>;
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
- protected value: any;
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
- protected value: any;
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
- protected value: any;
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
- /** Form model for the send-to form fields. */
289
- protected item: SendToDialogResult;
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
  */