@arsedizioni/ars-utils 22.6.85 → 22.6.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
- package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
- package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
- package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
- package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
- package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
- package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
- package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
- package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
- package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
- package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
- package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
- package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
- package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
- package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
- package/types/arsedizioni-ars-utils.d.ts +1 -3
|
@@ -1,129 +1,131 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ElementRef } from
|
|
3
|
-
import {
|
|
4
|
-
import { PasswordStrength } from
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OtpInputComponent, never>;
|
|
92
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<OtpInputComponent, "otp-input", never, {}, {}, never, never, true, never>;
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ElementRef } from "@angular/core";
|
|
3
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from "@angular/forms";
|
|
4
|
+
import { PasswordStrength } from "@arsedizioni/ars-utils/core";
|
|
5
|
+
import { CredentialsDialogResult, PromptDialogData, PromptOtpDialogResult, RecoverPasswordDialogResult, ResetPasswordDialogResult } from "@arsedizioni/ars-utils/ui";
|
|
6
|
+
import { MatFormFieldAppearance } from "@angular/material/form-field";
|
|
7
|
+
import { SignalsUtils } from "@arsedizioni/ars-utils/core.validators";
|
|
8
|
+
export declare class OtpInputComponent implements ControlValueAccessor, Validator {
|
|
9
|
+
/** Signal-based query for all individual OTP digit input elements. */
|
|
10
|
+
readonly otpFields: import("@angular/core").Signal<readonly ElementRef<HTMLInputElement>[]>;
|
|
11
|
+
/** `true` when every digit slot contains a valid single decimal digit. */
|
|
12
|
+
readonly isValid: import("@angular/core").Signal<boolean>;
|
|
13
|
+
/** Array of per-digit values backing the OTP display. */
|
|
14
|
+
readonly otpArray: import("@angular/core").WritableSignal<string[]>;
|
|
15
|
+
/** Whether the control is currently disabled. */
|
|
16
|
+
readonly disabled: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
private onChange;
|
|
18
|
+
private onTouched;
|
|
19
|
+
/**
|
|
20
|
+
* Writes a new value into the control from the model.
|
|
21
|
+
* @param value - A string of up to 6 digits to pre-fill the OTP fields.
|
|
22
|
+
*/
|
|
23
|
+
writeValue(value: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Registers the callback invoked when the control value changes.
|
|
26
|
+
* @param fn - The callback function.
|
|
27
|
+
*/
|
|
28
|
+
registerOnChange(fn: (val: string) => void): void;
|
|
29
|
+
/**
|
|
30
|
+
* Registers the callback invoked when the control is touched.
|
|
31
|
+
* @param fn - The callback function.
|
|
32
|
+
*/
|
|
33
|
+
registerOnTouched(fn: () => void): void;
|
|
34
|
+
/**
|
|
35
|
+
* Enables or disables the control.
|
|
36
|
+
* @param isDisabled - `true` to disable all OTP inputs.
|
|
37
|
+
*/
|
|
38
|
+
setDisabledState(isDisabled: boolean): void;
|
|
39
|
+
/**
|
|
40
|
+
* Validates the OTP value: an empty code is left to `required`, while a
|
|
41
|
+
* PARTIAL code (e.g. "12") is reported as invalid. Without this, the joined
|
|
42
|
+
* value "12" was a non-empty string and `required` let the form submit
|
|
43
|
+
* with an incomplete OTP.
|
|
44
|
+
* @param control - The form control bound to this component.
|
|
45
|
+
* @returns `null` when empty or complete (6 digits), `{ otp: true }` otherwise.
|
|
46
|
+
*/
|
|
47
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
48
|
+
/**
|
|
49
|
+
* Marks the control as touched when an OTP field loses focus.
|
|
50
|
+
*/
|
|
51
|
+
onBlur(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Blocks non-digit characters before they are inserted.
|
|
54
|
+
* @param event - The `beforeinput` event from the input element.
|
|
55
|
+
*/
|
|
56
|
+
onBeforeInput(event: InputEvent): void;
|
|
57
|
+
/**
|
|
58
|
+
* Handles digit input, sanitizes it, syncs the DOM, updates the OTP array, and advances focus.
|
|
59
|
+
* @param event - The `input` event from the digit field.
|
|
60
|
+
* @param index - Zero-based index of the field that received input.
|
|
61
|
+
*/
|
|
62
|
+
onInput(event: Event, index: number): void;
|
|
63
|
+
/**
|
|
64
|
+
* Handles the Backspace key by moving focus to the previous field when the current one is empty.
|
|
65
|
+
* @param event - The `keydown` event.
|
|
66
|
+
* @param index - Zero-based index of the field that received the keydown.
|
|
67
|
+
*/
|
|
68
|
+
onKeyDown(event: KeyboardEvent, index: number): void;
|
|
69
|
+
/**
|
|
70
|
+
* Handles paste events by extracting up to 6 digits and distributing them across the OTP fields.
|
|
71
|
+
* @param event - The `ClipboardEvent` from the paste action.
|
|
72
|
+
*/
|
|
73
|
+
onPaste(event: ClipboardEvent): void;
|
|
74
|
+
/**
|
|
75
|
+
* Clears every digit field, propagates the empty value to the form model and
|
|
76
|
+
* moves focus back to the first field. Does not mark the control as touched,
|
|
77
|
+
* so no validation error is shown right after the reset.
|
|
78
|
+
*/
|
|
79
|
+
clear(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Moves focus to the OTP field at the given index.
|
|
82
|
+
* @param index - Zero-based index of the target field.
|
|
83
|
+
*/
|
|
84
|
+
private focusField;
|
|
85
|
+
/**
|
|
86
|
+
* Notifies the form model of the current OTP value and marks the control as touched.
|
|
87
|
+
*/
|
|
88
|
+
private updateModel;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OtpInputComponent, never>;
|
|
90
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OtpInputComponent, "otp-input", never, {}, {}, never, never, true, never>;
|
|
93
91
|
}
|
|
94
|
-
|
|
95
92
|
/**
|
|
96
93
|
* Displays a password-strength indicator for the provided password string.
|
|
97
94
|
* Uses `SystemUtils.calculatePasswordStrength` to derive the score and label.
|
|
98
95
|
*/
|
|
99
|
-
declare class PasswordStrengthComponent {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
96
|
+
export declare class PasswordStrengthComponent {
|
|
97
|
+
/** The password to evaluate. An empty string renders the default (score 0) state. */
|
|
98
|
+
readonly password: import("@angular/core").InputSignal<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Computed strength result for the current password.
|
|
101
|
+
* Falls back to `DEFAULT_STRENGTH` when the password is empty.
|
|
102
|
+
*/
|
|
103
|
+
protected readonly strength: import("@angular/core").Signal<PasswordStrength>;
|
|
104
|
+
/**
|
|
105
|
+
* CSS class applied to the label element based on the numeric score (1–6 bands).
|
|
106
|
+
* Scores ≤ 2 → `'score-2'`, ≤ 3 → `'score-3'`, etc.
|
|
107
|
+
*/
|
|
108
|
+
protected readonly scoreClass: import("@angular/core").Signal<string>;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordStrengthComponent, never>;
|
|
110
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordStrengthComponent, "password-strength", never, {
|
|
111
|
+
"password": {
|
|
112
|
+
"alias": "password";
|
|
113
|
+
"required": false;
|
|
114
|
+
"isSignal": true;
|
|
115
|
+
};
|
|
116
|
+
}, {}, never, never, true, never>;
|
|
114
117
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
appearance?: MatFormFieldAppearance;
|
|
118
|
+
export interface CredentialsDialogData {
|
|
119
|
+
title?: string;
|
|
120
|
+
message?: string;
|
|
121
|
+
remember?: boolean;
|
|
122
|
+
recoverPassword?: boolean;
|
|
123
|
+
recoverPasswordUrl?: string;
|
|
124
|
+
user?: string;
|
|
125
|
+
okCaption?: string;
|
|
126
|
+
mode?: 'email' | 'user' | 'otp';
|
|
127
|
+
maxLength?: number;
|
|
128
|
+
appearance?: MatFormFieldAppearance;
|
|
127
129
|
}
|
|
128
130
|
/**
|
|
129
131
|
* Form model of the credentials dialog.
|
|
@@ -133,75 +135,77 @@ interface CredentialsDialogData {
|
|
|
133
135
|
* value, and {@link DtoUtils.toPayload} turns the model back into the DTO on the way out.
|
|
134
136
|
*/
|
|
135
137
|
interface CredentialsForm {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
/** The account name or email; `''` when the input is empty. */
|
|
139
|
+
user: string;
|
|
140
|
+
/** The password; `''` when the input is empty or the dialog is in `otp` mode. */
|
|
141
|
+
password: string;
|
|
142
|
+
/** Whether the session should be remembered. */
|
|
143
|
+
rememberMe: boolean;
|
|
144
|
+
/** The 6-digit OTP code; `''` outside `otp` mode. */
|
|
145
|
+
code: string;
|
|
144
146
|
}
|
|
145
|
-
declare class CredentialsDialogComponent {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
147
|
+
export declare class CredentialsDialogComponent {
|
|
148
|
+
/** Error text of a field: the message declared in the schema, or the shared fallback. */
|
|
149
|
+
protected readonly getErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
|
|
150
|
+
/** Emitted when the user submits the form. Carries the entered credentials. */
|
|
151
|
+
readonly done: import("@angular/core").OutputEmitterRef<CredentialsDialogResult>;
|
|
152
|
+
/** Emitted when the user requests a password-recovery flow. */
|
|
153
|
+
readonly recoveringPassword: import("@angular/core").OutputEmitterRef<CredentialsDialogResult>;
|
|
154
|
+
/** Dialog configuration with defaults applied at construction time. */
|
|
155
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<CredentialsDialogData>;
|
|
156
|
+
/** Model backing the signal form, pre-filled with the user name from dialog data when provided. */
|
|
157
|
+
private readonly model;
|
|
158
|
+
/**
|
|
159
|
+
* Builds the form model from the dialog data, which may carry the account name to
|
|
160
|
+
* pre-fill.
|
|
161
|
+
* @returns A fresh form model.
|
|
162
|
+
*/
|
|
163
|
+
private toForm;
|
|
164
|
+
/**
|
|
165
|
+
* Builds the dialog result from the current form model. The fields the active mode
|
|
166
|
+
* does not use are left empty by the template and dropped here, so they travel as
|
|
167
|
+
* absent instead of as empty strings.
|
|
168
|
+
* @returns The credentials to emit through `done` or `recoveringPassword`.
|
|
169
|
+
*/
|
|
170
|
+
private toPayload;
|
|
171
|
+
/**
|
|
172
|
+
* Signal form for the credentials. Validators follow the active mode: the user
|
|
173
|
+
* field is a required email in `email` mode and plain required in `user` mode,
|
|
174
|
+
* the password is required outside `otp` mode, and the OTP code is a required
|
|
175
|
+
* complete 6-digit code in `otp` mode.
|
|
176
|
+
*/
|
|
177
|
+
protected readonly form: import("@angular/forms/signals").FieldTree<CredentialsForm, string | number, "writable">;
|
|
178
|
+
/** Whether the password field is currently shown as plain text. */
|
|
179
|
+
protected readonly showPassword: import("@angular/core").WritableSignal<boolean>;
|
|
180
|
+
/**
|
|
181
|
+
* Switches the input mode of the dialog at runtime (e.g. from login to OTP).
|
|
182
|
+
* Intended to be called from outside via the dialog component reference.
|
|
183
|
+
* @param mode - The new input mode (`'email'`, `'user'`, or `'otp'`).
|
|
184
|
+
* @param message - Optional new message to display above the form.
|
|
185
|
+
*/
|
|
186
|
+
changeMode(mode: 'email' | 'user' | 'otp', message?: string): void;
|
|
187
|
+
/**
|
|
188
|
+
* Emits the current form result and closes the dialog.
|
|
189
|
+
*/
|
|
190
|
+
protected ok(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Emits the current form result for the password-recovery flow and optionally
|
|
193
|
+
* opens the recovery URL in a new tab.
|
|
194
|
+
*/
|
|
195
|
+
protected recoverPassword(): void;
|
|
196
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CredentialsDialogComponent, never>;
|
|
197
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CredentialsDialogComponent, "ng-component", never, {}, {
|
|
198
|
+
"done": "done";
|
|
199
|
+
"recoveringPassword": "recoveringPassword";
|
|
200
|
+
}, never, never, true, never>;
|
|
196
201
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
appearance?: MatFormFieldAppearance;
|
|
202
|
+
export type ResetPasswordDialogMode = 'admin' | 'old' | 'otp' | 'forgot';
|
|
203
|
+
export interface ResetPasswordDialogData {
|
|
204
|
+
mode: ResetPasswordDialogMode;
|
|
205
|
+
maxLength?: number;
|
|
206
|
+
userId?: number;
|
|
207
|
+
userEmail?: string;
|
|
208
|
+
appearance?: MatFormFieldAppearance;
|
|
205
209
|
}
|
|
206
210
|
/**
|
|
207
211
|
* Form model of the password-reset dialog.
|
|
@@ -213,72 +217,73 @@ interface ResetPasswordDialogData {
|
|
|
213
217
|
* validators work with.
|
|
214
218
|
*/
|
|
215
219
|
interface ResetPasswordForm {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
220
|
+
/** Id of the account whose password is being reset; `null` in the modes that identify it by email. */
|
|
221
|
+
userId: number | null;
|
|
222
|
+
/** Email of the account; `''` outside the modes that ask for it. */
|
|
223
|
+
userEmail: string;
|
|
224
|
+
/** The current password, asked for in `old` mode; `''` elsewhere. */
|
|
225
|
+
oldPassword: string;
|
|
226
|
+
/** The new password. */
|
|
227
|
+
password: string;
|
|
228
|
+
/** Confirmation of the new password; `''` in `admin` mode, where it is not asked for. */
|
|
229
|
+
password2: string;
|
|
230
|
+
/** The 6-digit OTP code, asked for in `otp` mode; `''` elsewhere. */
|
|
231
|
+
code: string;
|
|
228
232
|
}
|
|
229
|
-
declare class ResetPasswordDialogComponent {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
233
|
+
export declare class ResetPasswordDialogComponent {
|
|
234
|
+
/** Error text of a field: the message declared in the schema, or the shared fallback. */
|
|
235
|
+
protected readonly getErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
|
|
236
|
+
/** Emitted when the user submits the new password. Carries the entered password data. */
|
|
237
|
+
readonly done: import("@angular/core").OutputEmitterRef<ResetPasswordDialogResult>;
|
|
238
|
+
private readonly dialogService;
|
|
239
|
+
private readonly dialogRef;
|
|
240
|
+
/** Dialog configuration with defaults applied at construction time. */
|
|
241
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<ResetPasswordDialogData>;
|
|
242
|
+
/** Model backing the signal form. */
|
|
243
|
+
private readonly model;
|
|
244
|
+
/**
|
|
245
|
+
* Builds the form model from the dialog data, which identifies the account either by
|
|
246
|
+
* id or by email depending on the mode.
|
|
247
|
+
* @returns A fresh form model.
|
|
248
|
+
*/
|
|
249
|
+
private toForm;
|
|
250
|
+
/**
|
|
251
|
+
* Builds the dialog result from the current form model. The fields the active mode
|
|
252
|
+
* does not use are left empty by the template and dropped here, so they travel as
|
|
253
|
+
* absent instead of as empty strings.
|
|
254
|
+
* @returns The reset data to emit through `done`.
|
|
255
|
+
*/
|
|
256
|
+
private toPayload;
|
|
257
|
+
/**
|
|
258
|
+
* Signal form for the password reset. Validators follow the active mode:
|
|
259
|
+
* the email is required in `forgot` mode, the old password in `old` mode,
|
|
260
|
+
* a complete 6-digit OTP code in `otp` mode; the new password is always
|
|
261
|
+
* required, at least 10 characters and strong enough, and its confirmation
|
|
262
|
+
* (required outside `admin` mode) must match it.
|
|
263
|
+
*/
|
|
264
|
+
protected readonly form: import("@angular/forms/signals").FieldTree<ResetPasswordForm, string | number, "writable">;
|
|
265
|
+
/** Whether the old-password field is currently shown as plain text. */
|
|
266
|
+
protected readonly showOldPassword: import("@angular/core").WritableSignal<boolean>;
|
|
267
|
+
/** Whether the new-password field is currently shown as plain text. */
|
|
268
|
+
protected readonly showPassword: import("@angular/core").WritableSignal<boolean>;
|
|
269
|
+
/** Whether the confirm-password field is currently shown as plain text. */
|
|
270
|
+
protected readonly showPassword2: import("@angular/core").WritableSignal<boolean>;
|
|
271
|
+
constructor();
|
|
272
|
+
/**
|
|
273
|
+
* Emits the current form result to trigger the password-reset flow.
|
|
274
|
+
*/
|
|
275
|
+
protected ok(): void;
|
|
276
|
+
/**
|
|
277
|
+
* Generates a random password and populates both password fields with it.
|
|
278
|
+
*/
|
|
279
|
+
protected generatePassword(): void;
|
|
280
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResetPasswordDialogComponent, never>;
|
|
281
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ResetPasswordDialogComponent, "ng-component", never, {}, {
|
|
282
|
+
"done": "done";
|
|
283
|
+
}, never, never, true, never>;
|
|
278
284
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
appearance?: MatFormFieldAppearance;
|
|
285
|
+
export interface RecoverPasswordDialogData {
|
|
286
|
+
appearance?: MatFormFieldAppearance;
|
|
282
287
|
}
|
|
283
288
|
/**
|
|
284
289
|
* Form model of the password-recovery dialog.
|
|
@@ -288,44 +293,45 @@ interface RecoverPasswordDialogData {
|
|
|
288
293
|
* value, and {@link DtoUtils.toPayload} turns the model back into the DTO on the way out.
|
|
289
294
|
*/
|
|
290
295
|
interface RecoverPasswordForm {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
296
|
+
/** The email the recovery link is sent to; `''` when the input is empty. */
|
|
297
|
+
email: string;
|
|
298
|
+
/** Whether the recaptcha challenge has been solved. */
|
|
299
|
+
recaptcha: boolean;
|
|
295
300
|
}
|
|
296
|
-
declare class RecoverPasswordDialogComponent {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
301
|
+
export declare class RecoverPasswordDialogComponent {
|
|
302
|
+
/** Error text of a field: the message declared in the schema, or the shared fallback. */
|
|
303
|
+
protected readonly getErrorMessage: typeof SignalsUtils.getFieldErrorMessage;
|
|
304
|
+
/** Emitted when the user submits the recovery request. Carries the entered email and recaptcha state. */
|
|
305
|
+
readonly done: import("@angular/core").OutputEmitterRef<RecoverPasswordDialogResult>;
|
|
306
|
+
/** Dialog configuration with defaults applied at construction time. */
|
|
307
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<RecoverPasswordDialogData>;
|
|
308
|
+
/** Model backing the signal form. */
|
|
309
|
+
private readonly model;
|
|
310
|
+
/**
|
|
311
|
+
* Builds the form model. The dialog is always opened empty, so the model is the
|
|
312
|
+
* neutral one.
|
|
313
|
+
* @returns A fresh form model.
|
|
314
|
+
*/
|
|
315
|
+
private toForm;
|
|
316
|
+
/**
|
|
317
|
+
* Builds the dialog result from the current form model, dropping the email when it
|
|
318
|
+
* was left empty.
|
|
319
|
+
* @returns The result to emit through `done`.
|
|
320
|
+
*/
|
|
321
|
+
private toPayload;
|
|
322
|
+
/**
|
|
323
|
+
* Signal form for the recovery request: the email is required and must be valid.
|
|
324
|
+
*/
|
|
325
|
+
protected readonly form: import("@angular/forms/signals").FieldTree<RecoverPasswordForm, string | number, "writable">;
|
|
326
|
+
/**
|
|
327
|
+
* Emits the current form result to trigger the password-recovery flow.
|
|
328
|
+
*/
|
|
329
|
+
protected ok(): void;
|
|
330
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RecoverPasswordDialogComponent, never>;
|
|
331
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RecoverPasswordDialogComponent, "ng-component", never, {}, {
|
|
332
|
+
"done": "done";
|
|
333
|
+
}, never, never, true, never>;
|
|
327
334
|
}
|
|
328
|
-
|
|
329
335
|
/**
|
|
330
336
|
* Form model of the OTP dialog.
|
|
331
337
|
*
|
|
@@ -333,39 +339,38 @@ declare class RecoverPasswordDialogComponent {
|
|
|
333
339
|
* The form cannot, so the field is always present and holds `''` when empty.
|
|
334
340
|
*/
|
|
335
341
|
interface PromptOtpForm {
|
|
336
|
-
|
|
337
|
-
|
|
342
|
+
/** The 6-digit OTP code; `''` while the user has not completed it. */
|
|
343
|
+
value: string;
|
|
338
344
|
}
|
|
339
|
-
declare class PromptOtpDialogComponent {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
export type { CredentialsDialogData, RecoverPasswordDialogData, ResetPasswordDialogData, ResetPasswordDialogMode };
|
|
345
|
+
export declare class PromptOtpDialogComponent {
|
|
346
|
+
readonly done: import("@angular/core").OutputEmitterRef<PromptOtpDialogResult>;
|
|
347
|
+
private readonly dialogService;
|
|
348
|
+
protected readonly dialogData: import("@angular/core").WritableSignal<PromptDialogData>;
|
|
349
|
+
/** Model backing the signal form. `value` holds the 6-digit OTP code. */
|
|
350
|
+
private readonly model;
|
|
351
|
+
/**
|
|
352
|
+
* Builds the form model. The dialog has no incoming value, so the model is the
|
|
353
|
+
* neutral one.
|
|
354
|
+
* @returns A fresh form model.
|
|
355
|
+
*/
|
|
356
|
+
private toForm;
|
|
357
|
+
/**
|
|
358
|
+
* Builds the dialog result from the current form model, dropping the empty code.
|
|
359
|
+
* @returns The result carrying the entered OTP code.
|
|
360
|
+
*/
|
|
361
|
+
private toPayload;
|
|
362
|
+
/**
|
|
363
|
+
* Signal form for the OTP code. The code is always required here; the
|
|
364
|
+
* "complete 6 digits" rule comes from the OtpInputComponent validator,
|
|
365
|
+
* honoured through the ControlValueAccessor interop.
|
|
366
|
+
*/
|
|
367
|
+
protected readonly form: import("@angular/forms/signals").FieldTree<PromptOtpForm, string | number, "writable">;
|
|
368
|
+
/**
|
|
369
|
+
* Validates the form and emits the OTP result, or shows an error if validation fails.
|
|
370
|
+
*/
|
|
371
|
+
protected ok(): void;
|
|
372
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromptOtpDialogComponent, never>;
|
|
373
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PromptOtpDialogComponent, "ng-component", never, {}, {
|
|
374
|
+
"done": "done";
|
|
375
|
+
}, never, never, true, never>;
|
|
376
|
+
}
|