@arsedizioni/ars-utils 22.6.86 → 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.
Files changed (79) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
  6. package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
  8. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
  10. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
  12. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
  14. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
  16. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
  18. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
  21. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
  22. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
  26. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
  27. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
  28. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
  29. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
  30. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
  31. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
  32. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
  33. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
  34. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
  35. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
  36. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
  37. package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
  38. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  39. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
  40. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
  41. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
  42. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
  43. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
  44. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  45. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
  46. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
  47. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
  48. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
  49. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
  50. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
  51. package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
  52. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  53. package/package.json +1 -1
  54. package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
  55. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
  56. package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
  57. package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
  58. package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
  59. package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
  60. package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
  61. package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
  62. package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
  63. package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
  64. package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
  65. package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
  66. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
  67. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
  68. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
  69. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
  70. package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
  71. package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
  72. package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
  73. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
  74. package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
  75. package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
  76. package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
  77. package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
  78. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
  79. package/types/arsedizioni-ars-utils.d.ts +1 -3
@@ -1,654 +1,1637 @@
1
- import * as i0 from '@angular/core';
2
- import { viewChildren, computed, signal, forwardRef, ChangeDetectionStrategy, Component, input, output, inject } from '@angular/core';
3
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
4
- import * as i1 from '@angular/material/tooltip';
5
- import { MatTooltipModule } from '@angular/material/tooltip';
6
- import { SystemUtils, DtoUtils, SafeHtmlPipe } from '@arsedizioni/ars-utils/core';
7
- import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatDialogRef } from '@angular/material/dialog';
8
- import * as i1$2 from '@arsedizioni/ars-utils/ui';
9
- import { FlexLayoutModule, PromptDialogType } from '@arsedizioni/ars-utils/ui';
10
- import * as i6 from '@angular/material/button';
11
- import { MatButtonModule } from '@angular/material/button';
12
- import * as i4 from '@angular/material/checkbox';
13
- import { MatCheckboxModule } from '@angular/material/checkbox';
14
- import * as i2 from '@angular/material/input';
15
- import { MatInputModule } from '@angular/material/input';
16
- import * as i1$1 from '@angular/material/form-field';
17
- import { MatFormFieldModule } from '@angular/material/form-field';
18
- import { form, required, email, maxLength, FormField, FormRoot, minLength } from '@angular/forms/signals';
19
- import { SignalsUtils, notEmpty, otp, password, equals } from '@arsedizioni/ars-utils/core.validators';
20
- import * as i3 from '@angular/material/icon';
21
- import { MatIconModule } from '@angular/material/icon';
22
- import { ShellService } from '@arsedizioni/ars-utils/ui.shell';
23
-
24
- class OtpInputComponent {
25
- constructor() {
26
- /** Signal-based query for all individual OTP digit input elements. */
27
- this.otpFields = viewChildren('otpField', /* @ts-ignore */
28
- ...(ngDevMode ? [{ debugName: "otpFields" }] : /* istanbul ignore next */ []));
29
- /** `true` when every digit slot contains a valid single decimal digit. */
30
- this.isValid = computed(() => this.otpArray().every(d => /^\d$/.test(d)), /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []));
32
- /** Array of per-digit values backing the OTP display. */
33
- this.otpArray = signal(Array(6).fill(''), /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "otpArray" }] : /* istanbul ignore next */ []));
35
- /** Whether the control is currently disabled. */
36
- this.disabled = signal(false, /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
38
- this.onChange = () => { };
39
- this.onTouched = () => { };
40
- }
41
- // ── ControlValueAccessor ───────────────────────────────────────────────────
42
- /**
43
- * Writes a new value into the control from the model.
44
- * @param value - A string of up to 6 digits to pre-fill the OTP fields.
45
- */
46
- writeValue(value) {
47
- const arr = Array(6).fill('');
48
- if (value) {
49
- value.split('').forEach((c, i) => {
50
- if (i < 6)
51
- arr[i] = c;
52
- });
53
- }
54
- this.otpArray.set(arr);
55
- }
56
- /**
57
- * Registers the callback invoked when the control value changes.
58
- * @param fn - The callback function.
59
- */
60
- registerOnChange(fn) {
61
- this.onChange = fn;
62
- }
63
- /**
64
- * Registers the callback invoked when the control is touched.
65
- * @param fn - The callback function.
66
- */
67
- registerOnTouched(fn) {
68
- this.onTouched = fn;
69
- }
70
- /**
71
- * Enables or disables the control.
72
- * @param isDisabled - `true` to disable all OTP inputs.
73
- */
74
- setDisabledState(isDisabled) {
75
- this.disabled.set(isDisabled);
76
- }
77
- // ── Validator ──────────────────────────────────────────────────────────────
78
- /**
79
- * Validates the OTP value: an empty code is left to `required`, while a
80
- * PARTIAL code (e.g. "12") is reported as invalid. Without this, the joined
81
- * value "12" was a non-empty string and `required` let the form submit
82
- * with an incomplete OTP.
83
- * @param control - The form control bound to this component.
84
- * @returns `null` when empty or complete (6 digits), `{ otp: true }` otherwise.
85
- */
86
- validate(control) {
87
- const value = control.value ?? '';
88
- if (value.length === 0)
89
- return null; // let `required` handle emptiness
90
- return /^\d{6}$/.test(value) ? null : { otp: true };
91
- }
92
- /**
93
- * Marks the control as touched when an OTP field loses focus.
94
- */
95
- onBlur() {
96
- this.onTouched();
97
- }
98
- // ── Event handlers ─────────────────────────────────────────────────────────
99
- /**
100
- * Blocks non-digit characters before they are inserted.
101
- * @param event - The `beforeinput` event from the input element.
102
- */
103
- onBeforeInput(event) {
104
- if (event.data && !/^\d$/.test(event.data)) {
105
- event.preventDefault();
106
- }
107
- }
108
- /**
109
- * Handles digit input, sanitizes it, syncs the DOM, updates the OTP array, and advances focus.
110
- * @param event - The `input` event from the digit field.
111
- * @param index - Zero-based index of the field that received input.
112
- */
113
- onInput(event, index) {
114
- const input = event.target;
115
- const val = input.value.replace(/\D/g, '').slice(-1);
116
- // Force-sync the DOM: [value] won't rewrite it when the model value is unchanged.
117
- input.value = val;
118
- const arr = [...this.otpArray()];
119
- arr[index] = val;
120
- this.otpArray.set(arr);
121
- this.updateModel();
122
- if (val && index < 5) {
123
- this.focusField(index + 1);
124
- }
125
- }
126
- /**
127
- * Handles the Backspace key by moving focus to the previous field when the current one is empty.
128
- * @param event - The `keydown` event.
129
- * @param index - Zero-based index of the field that received the keydown.
130
- */
131
- onKeyDown(event, index) {
132
- if (event.key === 'Backspace' && !this.otpArray()[index] && index > 0) {
133
- this.focusField(index - 1);
134
- }
135
- }
136
- /**
137
- * Handles paste events by extracting up to 6 digits and distributing them across the OTP fields.
138
- * @param event - The `ClipboardEvent` from the paste action.
139
- */
140
- onPaste(event) {
141
- event.preventDefault();
142
- const pasted = event.clipboardData?.getData('text') ?? '';
143
- const digits = pasted.replace(/\D/g, '').slice(0, 6).split('');
144
- if (digits.length > 0) {
145
- const arr = Array(6).fill('');
146
- digits.forEach((d, i) => (arr[i] = d));
147
- this.otpArray.set(arr);
148
- this.updateModel();
149
- this.focusField(Math.min(digits.length, 5));
150
- }
151
- }
152
- // ── Public API ─────────────────────────────────────────────────────────────
153
- /**
154
- * Clears every digit field, propagates the empty value to the form model and
155
- * moves focus back to the first field. Does not mark the control as touched,
156
- * so no validation error is shown right after the reset.
157
- */
158
- clear() {
159
- this.otpArray.set(Array(6).fill(''));
160
- // Force-sync the DOM: [value] won't rewrite fields whose bound value is unchanged.
161
- this.otpFields().forEach(f => (f.nativeElement.value = ''));
162
- this.onChange('');
163
- this.focusField(0);
164
- }
165
- /**
166
- * Moves focus to the OTP field at the given index.
167
- * @param index - Zero-based index of the target field.
168
- */
169
- focusField(index) {
170
- const field = this.otpFields()[index];
171
- field?.nativeElement.focus();
172
- field?.nativeElement.select();
173
- }
174
- /**
175
- * Notifies the form model of the current OTP value and marks the control as touched.
176
- */
177
- updateModel() {
178
- const code = this.otpArray().join('');
179
- this.onChange(code);
180
- this.onTouched();
181
- }
182
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: OtpInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: OtpInputComponent, isStandalone: true, selector: "otp-input", providers: [
184
- {
185
- provide: NG_VALUE_ACCESSOR,
186
- useExisting: forwardRef(() => OtpInputComponent),
187
- multi: true,
188
- },
189
- {
190
- provide: NG_VALIDATORS,
191
- useExisting: forwardRef(() => OtpInputComponent),
192
- multi: true,
193
- },
194
- ], viewQueries: [{ propertyName: "otpFields", predicate: ["otpField"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"otp-container\">\n @for (digit of otpArray(); track $index) {\n <input\n #otpField\n type=\"text\"\n maxlength=\"1\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n autocomplete=\"one-time-code\"\n class=\"otp-box\"\n [value]=\"digit\"\n (beforeinput)=\"onBeforeInput($event)\"\n (input)=\"onInput($event, $index)\"\n (keydown)=\"onKeyDown($event, $index)\"\n (blur)=\"onBlur()\"\n (paste)=\"onPaste($event)\"\n [disabled]=\"disabled()\"\n required\n />\n }\n</div>\n\n", styles: [".otp-container{display:flex;align-self:center;gap:.5rem;align-content:center;justify-content:center;padding:30px 0}.otp-box{width:2.3rem;height:2.8rem;font-size:1.5rem;text-align:center;border:2px solid var(--ars-color-ok, #388E3C);background-color:var(--app-color-background, #f7faf8);border-radius:8px;color:var(--ars-color-ok, #388E3C)}.otp-box:focus{border-color:#007bff!important;outline:none;box-shadow:0 0 3px #007bff!important}.otp-box:-webkit-autofill,.otp-box:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.otp-box:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset,0 0 3px #007bff!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.error{margin-top:.5rem;color:red;font-size:.9rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
195
- }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: OtpInputComponent, decorators: [{
197
- type: Component,
198
- args: [{ selector: 'otp-input', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
199
- {
200
- provide: NG_VALUE_ACCESSOR,
201
- useExisting: forwardRef(() => OtpInputComponent),
202
- multi: true,
203
- },
204
- {
205
- provide: NG_VALIDATORS,
206
- useExisting: forwardRef(() => OtpInputComponent),
207
- multi: true,
208
- },
209
- ], template: "<div class=\"otp-container\">\n @for (digit of otpArray(); track $index) {\n <input\n #otpField\n type=\"text\"\n maxlength=\"1\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n autocomplete=\"one-time-code\"\n class=\"otp-box\"\n [value]=\"digit\"\n (beforeinput)=\"onBeforeInput($event)\"\n (input)=\"onInput($event, $index)\"\n (keydown)=\"onKeyDown($event, $index)\"\n (blur)=\"onBlur()\"\n (paste)=\"onPaste($event)\"\n [disabled]=\"disabled()\"\n required\n />\n }\n</div>\n\n", styles: [".otp-container{display:flex;align-self:center;gap:.5rem;align-content:center;justify-content:center;padding:30px 0}.otp-box{width:2.3rem;height:2.8rem;font-size:1.5rem;text-align:center;border:2px solid var(--ars-color-ok, #388E3C);background-color:var(--app-color-background, #f7faf8);border-radius:8px;color:var(--ars-color-ok, #388E3C)}.otp-box:focus{border-color:#007bff!important;outline:none;box-shadow:0 0 3px #007bff!important}.otp-box:-webkit-autofill,.otp-box:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.otp-box:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset,0 0 3px #007bff!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.error{margin-top:.5rem;color:red;font-size:.9rem}\n"] }]
210
- }], propDecorators: { otpFields: [{ type: i0.ViewChildren, args: ['otpField', { isSignal: true }] }] } });
211
-
212
- const DEFAULT_STRENGTH = { score: 0, label: '', color: '', suggestions: [], isValid: false };
213
- /**
214
- * Displays a password-strength indicator for the provided password string.
215
- * Uses `SystemUtils.calculatePasswordStrength` to derive the score and label.
216
- */
217
- class PasswordStrengthComponent {
218
- constructor() {
219
- /** The password to evaluate. An empty string renders the default (score 0) state. */
220
- this.password = input('', /* @ts-ignore */
221
- ...(ngDevMode ? [{ debugName: "password" }] : /* istanbul ignore next */ []));
222
- /**
223
- * Computed strength result for the current password.
224
- * Falls back to `DEFAULT_STRENGTH` when the password is empty.
225
- */
226
- this.strength = computed(() => {
227
- const pwd = this.password();
228
- return pwd ? SystemUtils.calculatePasswordStrength(pwd) : DEFAULT_STRENGTH;
229
- }, /* @ts-ignore */
230
- ...(ngDevMode ? [{ debugName: "strength" }] : /* istanbul ignore next */ []));
231
- /**
232
- * CSS class applied to the label element based on the numeric score (1–6 bands).
233
- * Scores ≤ 2 → `'score-2'`, ≤ 3 → `'score-3'`, etc.
234
- */
235
- this.scoreClass = computed(() => {
236
- const score = this.strength().score;
237
- if (score <= 2)
238
- return 'score-2';
239
- if (score <= 3)
240
- return 'score-3';
241
- if (score <= 4)
242
- return 'score-4';
243
- if (score <= 5)
244
- return 'score-5';
245
- return 'score-6';
246
- }, /* @ts-ignore */
247
- ...(ngDevMode ? [{ debugName: "scoreClass" }] : /* istanbul ignore next */ []));
248
- }
249
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PasswordStrengthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
250
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: PasswordStrengthComponent, isStandalone: true, selector: "password-strength", inputs: { password: { classPropertyName: "password", publicName: "password", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"wide x-small bold\" style=\"white-space: nowrap; padding-top:4px\" [matTooltip]=\"strength().suggestions?.join('\\n ')\">\r\n <span [class]=\"scoreClass()\">{{strength().label}}</span>\r\n</div>", styles: [".score-2{color:#f44336!important;font-weight:700}.score-3{color:#ff9800!important;font-weight:700}.score-4{color:#ffc107!important;font-weight:700}.score-5{color:#8bc34a!important;font-weight:700}.score-6{color:#4caf50!important;font-weight:700}.x-small{font-size:x-small}\n"], dependencies: [{ kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
251
- }
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PasswordStrengthComponent, decorators: [{
253
- type: Component,
254
- args: [{ selector: 'password-strength', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltipModule], template: "<div class=\"wide x-small bold\" style=\"white-space: nowrap; padding-top:4px\" [matTooltip]=\"strength().suggestions?.join('\\n ')\">\r\n <span [class]=\"scoreClass()\">{{strength().label}}</span>\r\n</div>", styles: [".score-2{color:#f44336!important;font-weight:700}.score-3{color:#ff9800!important;font-weight:700}.score-4{color:#ffc107!important;font-weight:700}.score-5{color:#8bc34a!important;font-weight:700}.score-6{color:#4caf50!important;font-weight:700}.x-small{font-size:x-small}\n"] }]
255
- }], propDecorators: { password: [{ type: i0.Input, args: [{ isSignal: true, alias: "password", required: false }] }] } });
256
-
257
- /** Neutral form model: it declares every field the form owns and its empty value. */
258
- const _EMPTY_ITEM$3 = { user: '', password: '', rememberMe: false, code: '' };
259
- class CredentialsDialogComponent {
260
- constructor() {
261
- /** Error text of a field: the message declared in the schema, or the shared fallback. */
262
- this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
263
- /** Emitted when the user submits the form. Carries the entered credentials. */
264
- this.done = output();
265
- /** Emitted when the user requests a password-recovery flow. */
266
- this.recoveringPassword = output();
267
- /** Dialog configuration with defaults applied at construction time. */
268
- this.dialogData = signal((() => {
269
- const raw = inject(MAT_DIALOG_DATA) ?? {};
270
- const data = {
271
- appearance: 'fill',
272
- maxLength: 30,
273
- title: 'Informazioni',
274
- okCaption: 'Salva',
275
- mode: 'email',
276
- ...raw,
277
- };
278
- data.appearance ??= 'fill';
279
- data.title ??= 'Informazioni';
280
- data.okCaption ??= 'Salva';
281
- data.mode ??= 'email';
282
- data.maxLength ??= 30;
283
- if (data.mode === 'otp' && !data.message) {
284
- data.message = '<div class="small">Inserisci il codice di verifica di 6 cifre che ti abbiamo inviato ora per email<br><span class="x-small">(controlla anche la posta indesiderata)</span>.</div>';
285
- }
286
- return data;
287
- })(), /* @ts-ignore */
288
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
289
- /** Model backing the signal form, pre-filled with the user name from dialog data when provided. */
290
- this.model = signal(this.toForm(), /* @ts-ignore */
291
- ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
292
- /**
293
- * Signal form for the credentials. Validators follow the active mode: the user
294
- * field is a required email in `email` mode and plain required in `user` mode,
295
- * the password is required outside `otp` mode, and the OTP code is a required
296
- * complete 6-digit code in `otp` mode.
297
- */
298
- this.form = form(this.model, p => {
299
- required(p.user, { when: () => this.dialogData().mode !== 'otp' });
300
- notEmpty(p.user, { when: () => this.dialogData().mode !== 'otp' });
301
- email(p.user, { when: () => this.dialogData().mode === 'email' });
302
- required(p.password, { when: () => this.dialogData().mode !== 'otp' });
303
- notEmpty(p.password, { when: () => this.dialogData().mode !== 'otp' });
304
- maxLength(p.password, this.dialogData().maxLength ?? 30);
305
- required(p.code, { when: () => this.dialogData().mode === 'otp' });
306
- notEmpty(p.code, { when: () => this.dialogData().mode === 'otp' });
307
- otp(p.code);
308
- });
309
- /** Whether the password field is currently shown as plain text. */
310
- this.showPassword = signal(false, /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "showPassword" }] : /* istanbul ignore next */ []));
312
- }
313
- /**
314
- * Builds the form model from the dialog data, which may carry the account name to
315
- * pre-fill.
316
- * @returns A fresh form model.
317
- */
318
- toForm() {
319
- return DtoUtils.toForm(_EMPTY_ITEM$3, { user: this.dialogData().user });
320
- }
321
- /**
322
- * Builds the dialog result from the current form model. The fields the active mode
323
- * does not use are left empty by the template and dropped here, so they travel as
324
- * absent instead of as empty strings.
325
- * @returns The credentials to emit through `done` or `recoveringPassword`.
326
- */
327
- toPayload() {
328
- return DtoUtils.toPayload(this.model());
329
- }
330
- /**
331
- * Switches the input mode of the dialog at runtime (e.g. from login to OTP).
332
- * Intended to be called from outside via the dialog component reference.
333
- * @param mode - The new input mode (`'email'`, `'user'`, or `'otp'`).
334
- * @param message - Optional new message to display above the form.
335
- */
336
- changeMode(mode, message) {
337
- this.dialogData.update(d => ({
338
- ...d,
339
- mode,
340
- message: message ?? d.message,
341
- }));
342
- }
343
- /**
344
- * Emits the current form result and closes the dialog.
345
- */
346
- ok() {
347
- this.done.emit(this.toPayload());
348
- }
349
- /**
350
- * Emits the current form result for the password-recovery flow and optionally
351
- * opens the recovery URL in a new tab.
352
- */
353
- recoverPassword() {
354
- this.recoveringPassword.emit(this.toPayload());
355
- const url = this.dialogData().recoverPasswordUrl;
356
- if (url) {
357
- window.open(url, '_blank');
358
- }
359
- }
360
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CredentialsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
361
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: CredentialsDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done", recoveringPassword: "recoveringPassword" }, ngImport: i0, template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n<mat-dialog-content class=\"dialog-content\">\n @if (dialogData().message) {\n <div [innerHtml]=\"dialogData().message | safeHtml\" style=\"padding-bottom: 20px;\"></div>\n }\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n @if(dialogData().mode !== 'otp') {\n @if (dialogData().mode === 'email') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email</mat-label>\n <input type=\"email\" matInput [formField]=\"form.user\" [attr.aria-label]=\"'Email'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n } @else if (dialogData().mode === 'user') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Utente</mat-label>\n <input matInput [formField]=\"form.user\" [attr.aria-label]=\"'user'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n }\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>La tua password abilitata</mat-label>\n <input matInput [type]=\"!showPassword() ? 'password' : 'text'\"\n [formField]=\"form.password\" [attr.aria-label]=\"'La tua password abilitata'\" autocomplete=\"on\">\n @if(form.password().value()) {\n <password-strength [password]=\"form.password().value()\"></password-strength>\n }\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix (click)=\"showPassword.set(!showPassword())\">\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\n </button>\n <mat-hint>Attento a maiuscole e minuscole</mat-hint>\n @if (form.password().invalid()) {\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\n }\n </mat-form-field>\n @if (dialogData().remember || dialogData().recoverPassword) {\n <div fxLayout=\"row\" fxLayoutGap=\"20px\" fxFill style=\"margin-top: 20px;\">\n <div>\n @if (dialogData().remember) {\n <mat-checkbox fxFlexAlign=\"center\" [formField]=\"form.rememberMe\"> Ricordami</mat-checkbox>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (dialogData().recoverPassword) {\n <button fxFlexAlign=\"center\" mat-button (click)=\"recoverPassword()\" title=\"Recupero password\"\n >Non riesco ad accedere</button>\n }\n </div>\n </div>\n }\n } @else {\n <otp-input [formField]=\"form.code\"></otp-input>\n }\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n</mat-dialog-actions>\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$2.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: PasswordStrengthComponent, selector: "password-strength", inputs: ["password"] }, { kind: "component", type: OtpInputComponent, selector: "otp-input" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
362
- }
363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CredentialsDialogComponent, decorators: [{
364
- type: Component,
365
- args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
366
- MatDialogTitle,
367
- MatDialogContent,
368
- FormField, FormRoot,
369
- MatFormFieldModule,
370
- MatInputModule,
371
- MatIconModule,
372
- MatCheckboxModule,
373
- MatDialogActions,
374
- FlexLayoutModule,
375
- MatButtonModule,
376
- MatDialogClose,
377
- PasswordStrengthComponent,
378
- OtpInputComponent,
379
- SafeHtmlPipe,
380
- ], template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n<mat-dialog-content class=\"dialog-content\">\n @if (dialogData().message) {\n <div [innerHtml]=\"dialogData().message | safeHtml\" style=\"padding-bottom: 20px;\"></div>\n }\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n @if(dialogData().mode !== 'otp') {\n @if (dialogData().mode === 'email') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email</mat-label>\n <input type=\"email\" matInput [formField]=\"form.user\" [attr.aria-label]=\"'Email'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n } @else if (dialogData().mode === 'user') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Utente</mat-label>\n <input matInput [formField]=\"form.user\" [attr.aria-label]=\"'user'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n }\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>La tua password abilitata</mat-label>\n <input matInput [type]=\"!showPassword() ? 'password' : 'text'\"\n [formField]=\"form.password\" [attr.aria-label]=\"'La tua password abilitata'\" autocomplete=\"on\">\n @if(form.password().value()) {\n <password-strength [password]=\"form.password().value()\"></password-strength>\n }\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix (click)=\"showPassword.set(!showPassword())\">\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\n </button>\n <mat-hint>Attento a maiuscole e minuscole</mat-hint>\n @if (form.password().invalid()) {\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\n }\n </mat-form-field>\n @if (dialogData().remember || dialogData().recoverPassword) {\n <div fxLayout=\"row\" fxLayoutGap=\"20px\" fxFill style=\"margin-top: 20px;\">\n <div>\n @if (dialogData().remember) {\n <mat-checkbox fxFlexAlign=\"center\" [formField]=\"form.rememberMe\"> Ricordami</mat-checkbox>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (dialogData().recoverPassword) {\n <button fxFlexAlign=\"center\" mat-button (click)=\"recoverPassword()\" title=\"Recupero password\"\n >Non riesco ad accedere</button>\n }\n </div>\n </div>\n }\n } @else {\n <otp-input [formField]=\"form.code\"></otp-input>\n }\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n</mat-dialog-actions>\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"] }]
381
- }], propDecorators: { done: [{ type: i0.Output, args: ["done"] }], recoveringPassword: [{ type: i0.Output, args: ["recoveringPassword"] }] } });
382
-
383
- /** Neutral form model: it declares every field the form owns and its empty value. */
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, forwardRef, inject, input, output, signal, viewChildren } from "@angular/core";
3
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR } from "@angular/forms";
4
+ import * as i1$1 from "@angular/material/tooltip";
5
+ import { MatTooltipModule } from "@angular/material/tooltip";
6
+ import { DtoUtils, SafeHtmlPipe, SystemUtils } from "@arsedizioni/ars-utils/core";
7
+ import { MAT_DIALOG_DATA, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
8
+ import * as i5 from "@arsedizioni/ars-utils/ui";
9
+ import { FlexLayoutModule, PromptDialogType } from "@arsedizioni/ars-utils/ui";
10
+ import * as i6 from "@angular/material/button";
11
+ import { MatButtonModule } from "@angular/material/button";
12
+ import * as i4 from "@angular/material/checkbox";
13
+ import { MatCheckboxModule } from "@angular/material/checkbox";
14
+ import * as i2 from "@angular/material/input";
15
+ import { MatInputModule } from "@angular/material/input";
16
+ import * as i1 from "@angular/material/form-field";
17
+ import { MatFormFieldModule } from "@angular/material/form-field";
18
+ import { FormField, FormRoot, email, form, maxLength, minLength, required } from "@angular/forms/signals";
19
+ import { SignalsUtils, equals, notEmpty, otp, password } from "@arsedizioni/ars-utils/core.validators";
20
+ import * as i3 from "@angular/material/icon";
21
+ import { MatIconModule } from "@angular/material/icon";
22
+ import { ShellService } from "@arsedizioni/ars-utils/ui.shell";
23
+ var OtpInputComponent = class OtpInputComponent {
24
+ constructor() {
25
+ this.otpFields = viewChildren("otpField", ...ngDevMode ? [{ debugName: "otpFields" }] : /* istanbul ignore next */ []);
26
+ this.isValid = computed(() => this.otpArray().every((d) => /^\d$/.test(d)), ...ngDevMode ? [{ debugName: "isValid" }] : /* istanbul ignore next */ []);
27
+ this.otpArray = signal(Array(6).fill(""), ...ngDevMode ? [{ debugName: "otpArray" }] : /* istanbul ignore next */ []);
28
+ this.disabled = signal(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
29
+ this.onChange = () => {};
30
+ this.onTouched = () => {};
31
+ }
32
+ writeValue(value) {
33
+ const arr = Array(6).fill("");
34
+ if (value) value.split("").forEach((c, i) => {
35
+ if (i < 6) arr[i] = c;
36
+ });
37
+ this.otpArray.set(arr);
38
+ }
39
+ registerOnChange(fn) {
40
+ this.onChange = fn;
41
+ }
42
+ registerOnTouched(fn) {
43
+ this.onTouched = fn;
44
+ }
45
+ setDisabledState(isDisabled) {
46
+ this.disabled.set(isDisabled);
47
+ }
48
+ validate(control) {
49
+ const value = control.value ?? "";
50
+ if (value.length === 0) return null;
51
+ return /^\d{6}$/.test(value) ? null : { otp: true };
52
+ }
53
+ onBlur() {
54
+ this.onTouched();
55
+ }
56
+ onBeforeInput(event) {
57
+ if (event.data && !/^\d$/.test(event.data)) event.preventDefault();
58
+ }
59
+ onInput(event, index) {
60
+ const input = event.target;
61
+ const val = input.value.replace(/\D/g, "").slice(-1);
62
+ input.value = val;
63
+ const arr = [...this.otpArray()];
64
+ arr[index] = val;
65
+ this.otpArray.set(arr);
66
+ this.updateModel();
67
+ if (val && index < 5) this.focusField(index + 1);
68
+ }
69
+ onKeyDown(event, index) {
70
+ if (event.key === "Backspace" && !this.otpArray()[index] && index > 0) this.focusField(index - 1);
71
+ }
72
+ onPaste(event) {
73
+ event.preventDefault();
74
+ const digits = (event.clipboardData?.getData("text") ?? "").replace(/\D/g, "").slice(0, 6).split("");
75
+ if (digits.length > 0) {
76
+ const arr = Array(6).fill("");
77
+ digits.forEach((d, i) => arr[i] = d);
78
+ this.otpArray.set(arr);
79
+ this.updateModel();
80
+ this.focusField(Math.min(digits.length, 5));
81
+ }
82
+ }
83
+ clear() {
84
+ this.otpArray.set(Array(6).fill(""));
85
+ this.otpFields().forEach((f) => f.nativeElement.value = "");
86
+ this.onChange("");
87
+ this.focusField(0);
88
+ }
89
+ focusField(index) {
90
+ const field = this.otpFields()[index];
91
+ field?.nativeElement.focus();
92
+ field?.nativeElement.select();
93
+ }
94
+ updateModel() {
95
+ const code = this.otpArray().join("");
96
+ this.onChange(code);
97
+ this.onTouched();
98
+ }
99
+ static {
100
+ this.ɵfac = i0.ɵɵngDeclareFactory({
101
+ minVersion: "12.0.0",
102
+ version: "22.2.1",
103
+ ngImport: i0,
104
+ type: OtpInputComponent,
105
+ deps: [],
106
+ target: i0.ɵɵFactoryTarget.Component
107
+ });
108
+ }
109
+ static {
110
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
111
+ minVersion: "17.0.0",
112
+ version: "22.2.1",
113
+ type: OtpInputComponent,
114
+ isStandalone: true,
115
+ selector: "otp-input",
116
+ providers: [{
117
+ provide: NG_VALUE_ACCESSOR,
118
+ useExisting: forwardRef(() => OtpInputComponent),
119
+ multi: true
120
+ }, {
121
+ provide: NG_VALIDATORS,
122
+ useExisting: forwardRef(() => OtpInputComponent),
123
+ multi: true
124
+ }],
125
+ viewQueries: [{
126
+ propertyName: "otpFields",
127
+ predicate: ["otpField"],
128
+ descendants: true,
129
+ isSignal: true
130
+ }],
131
+ ngImport: i0,
132
+ template: "<div class=\"otp-container\">\n @for (digit of otpArray(); track $index) {\n <input\n #otpField\n type=\"text\"\n maxlength=\"1\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n autocomplete=\"one-time-code\"\n class=\"otp-box\"\n [value]=\"digit\"\n (beforeinput)=\"onBeforeInput($event)\"\n (input)=\"onInput($event, $index)\"\n (keydown)=\"onKeyDown($event, $index)\"\n (blur)=\"onBlur()\"\n (paste)=\"onPaste($event)\"\n [disabled]=\"disabled()\"\n required\n />\n }\n</div>\n\n",
133
+ styles: [".otp-container{display:flex;align-self:center;gap:.5rem;align-content:center;justify-content:center;padding:30px 0}.otp-box{width:2.3rem;height:2.8rem;font-size:1.5rem;text-align:center;border:2px solid var(--ars-color-ok, #388E3C);background-color:var(--app-color-background, #f7faf8);border-radius:8px;color:var(--ars-color-ok, #388E3C)}.otp-box:focus{border-color:#007bff!important;outline:none;box-shadow:0 0 3px #007bff!important}.otp-box:-webkit-autofill,.otp-box:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.otp-box:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset,0 0 3px #007bff!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.error{margin-top:.5rem;color:red;font-size:.9rem}\n"],
134
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
135
+ });
136
+ }
137
+ };
138
+ i0.ɵɵngDeclareClassMetadata({
139
+ minVersion: "12.0.0",
140
+ version: "22.2.1",
141
+ ngImport: i0,
142
+ type: OtpInputComponent,
143
+ decorators: [{
144
+ type: Component,
145
+ args: [{
146
+ selector: "otp-input",
147
+ standalone: true,
148
+ changeDetection: ChangeDetectionStrategy.OnPush,
149
+ providers: [{
150
+ provide: NG_VALUE_ACCESSOR,
151
+ useExisting: forwardRef(() => OtpInputComponent),
152
+ multi: true
153
+ }, {
154
+ provide: NG_VALIDATORS,
155
+ useExisting: forwardRef(() => OtpInputComponent),
156
+ multi: true
157
+ }],
158
+ template: "<div class=\"otp-container\">\n @for (digit of otpArray(); track $index) {\n <input\n #otpField\n type=\"text\"\n maxlength=\"1\"\n inputmode=\"numeric\"\n pattern=\"[0-9]*\"\n autocomplete=\"one-time-code\"\n class=\"otp-box\"\n [value]=\"digit\"\n (beforeinput)=\"onBeforeInput($event)\"\n (input)=\"onInput($event, $index)\"\n (keydown)=\"onKeyDown($event, $index)\"\n (blur)=\"onBlur()\"\n (paste)=\"onPaste($event)\"\n [disabled]=\"disabled()\"\n required\n />\n }\n</div>\n\n",
159
+ styles: [".otp-container{display:flex;align-self:center;gap:.5rem;align-content:center;justify-content:center;padding:30px 0}.otp-box{width:2.3rem;height:2.8rem;font-size:1.5rem;text-align:center;border:2px solid var(--ars-color-ok, #388E3C);background-color:var(--app-color-background, #f7faf8);border-radius:8px;color:var(--ars-color-ok, #388E3C)}.otp-box:focus{border-color:#007bff!important;outline:none;box-shadow:0 0 3px #007bff!important}.otp-box:-webkit-autofill,.otp-box:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.otp-box:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 1000px var(--app-color-background, #f7faf8) inset,0 0 3px #007bff!important;-webkit-text-fill-color:var(--ars-color-ok, #388E3C);caret-color:var(--ars-color-ok, #388E3C)}.error{margin-top:.5rem;color:red;font-size:.9rem}\n"]
160
+ }]
161
+ }],
162
+ propDecorators: { otpFields: [{
163
+ type: i0.ViewChildren,
164
+ args: ["otpField", { isSignal: true }]
165
+ }] }
166
+ });
167
+ const DEFAULT_STRENGTH = {
168
+ score: 0,
169
+ label: "",
170
+ color: "",
171
+ suggestions: [],
172
+ isValid: false
173
+ };
174
+ var PasswordStrengthComponent = class PasswordStrengthComponent {
175
+ constructor() {
176
+ this.password = input("", ...ngDevMode ? [{ debugName: "password" }] : /* istanbul ignore next */ []);
177
+ this.strength = computed(() => {
178
+ const pwd = this.password();
179
+ return pwd ? SystemUtils.calculatePasswordStrength(pwd) : DEFAULT_STRENGTH;
180
+ }, ...ngDevMode ? [{ debugName: "strength" }] : /* istanbul ignore next */ []);
181
+ this.scoreClass = computed(() => {
182
+ const score = this.strength().score;
183
+ if (score <= 2) return "score-2";
184
+ if (score <= 3) return "score-3";
185
+ if (score <= 4) return "score-4";
186
+ if (score <= 5) return "score-5";
187
+ return "score-6";
188
+ }, ...ngDevMode ? [{ debugName: "scoreClass" }] : /* istanbul ignore next */ []);
189
+ }
190
+ static {
191
+ this.ɵfac = i0.ɵɵngDeclareFactory({
192
+ minVersion: "12.0.0",
193
+ version: "22.2.1",
194
+ ngImport: i0,
195
+ type: PasswordStrengthComponent,
196
+ deps: [],
197
+ target: i0.ɵɵFactoryTarget.Component
198
+ });
199
+ }
200
+ static {
201
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
202
+ minVersion: "17.1.0",
203
+ version: "22.2.1",
204
+ type: PasswordStrengthComponent,
205
+ isStandalone: true,
206
+ selector: "password-strength",
207
+ inputs: { password: {
208
+ classPropertyName: "password",
209
+ publicName: "password",
210
+ isSignal: true,
211
+ isRequired: false,
212
+ transformFunction: null
213
+ } },
214
+ ngImport: i0,
215
+ template: "<div class=\"wide x-small bold\" style=\"white-space: nowrap; padding-top:4px\" [matTooltip]=\"strength().suggestions?.join('\\n ')\">\r\n <span [class]=\"scoreClass()\">{{strength().label}}</span>\r\n</div>",
216
+ styles: [".score-2{color:#f44336!important;font-weight:700}.score-3{color:#ff9800!important;font-weight:700}.score-4{color:#ffc107!important;font-weight:700}.score-5{color:#8bc34a!important;font-weight:700}.score-6{color:#4caf50!important;font-weight:700}.x-small{font-size:x-small}\n"],
217
+ dependencies: [{
218
+ kind: "ngmodule",
219
+ type: MatTooltipModule
220
+ }, {
221
+ kind: "directive",
222
+ type: i1$1.MatTooltip,
223
+ selector: "[matTooltip]",
224
+ inputs: [
225
+ "matTooltipPosition",
226
+ "matTooltipPositionAtOrigin",
227
+ "matTooltipDisabled",
228
+ "matTooltipShowDelay",
229
+ "matTooltipHideDelay",
230
+ "matTooltipTouchGestures",
231
+ "matTooltip",
232
+ "matTooltipClass"
233
+ ],
234
+ exportAs: ["matTooltip"]
235
+ }],
236
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
237
+ });
238
+ }
239
+ };
240
+ i0.ɵɵngDeclareClassMetadata({
241
+ minVersion: "12.0.0",
242
+ version: "22.2.1",
243
+ ngImport: i0,
244
+ type: PasswordStrengthComponent,
245
+ decorators: [{
246
+ type: Component,
247
+ args: [{
248
+ selector: "password-strength",
249
+ standalone: true,
250
+ changeDetection: ChangeDetectionStrategy.OnPush,
251
+ imports: [MatTooltipModule],
252
+ template: "<div class=\"wide x-small bold\" style=\"white-space: nowrap; padding-top:4px\" [matTooltip]=\"strength().suggestions?.join('\\n ')\">\r\n <span [class]=\"scoreClass()\">{{strength().label}}</span>\r\n</div>",
253
+ styles: [".score-2{color:#f44336!important;font-weight:700}.score-3{color:#ff9800!important;font-weight:700}.score-4{color:#ffc107!important;font-weight:700}.score-5{color:#8bc34a!important;font-weight:700}.score-6{color:#4caf50!important;font-weight:700}.x-small{font-size:x-small}\n"]
254
+ }]
255
+ }],
256
+ propDecorators: { password: [{
257
+ type: i0.Input,
258
+ args: [{
259
+ isSignal: true,
260
+ alias: "password",
261
+ required: false
262
+ }]
263
+ }] }
264
+ });
265
+ const _EMPTY_ITEM$3 = {
266
+ user: "",
267
+ password: "",
268
+ rememberMe: false,
269
+ code: ""
270
+ };
271
+ var CredentialsDialogComponent = class CredentialsDialogComponent {
272
+ constructor() {
273
+ this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
274
+ this.done = output();
275
+ this.recoveringPassword = output();
276
+ this.dialogData = signal((() => {
277
+ const data = {
278
+ appearance: "fill",
279
+ maxLength: 30,
280
+ title: "Informazioni",
281
+ okCaption: "Salva",
282
+ mode: "email",
283
+ ...inject(MAT_DIALOG_DATA) ?? {}
284
+ };
285
+ data.appearance ??= "fill";
286
+ data.title ??= "Informazioni";
287
+ data.okCaption ??= "Salva";
288
+ data.mode ??= "email";
289
+ data.maxLength ??= 30;
290
+ if (data.mode === "otp" && !data.message) data.message = "<div class=\"small\">Inserisci il codice di verifica di 6 cifre che ti abbiamo inviato ora per email<br><span class=\"x-small\">(controlla anche la posta indesiderata)</span>.</div>";
291
+ return data;
292
+ })(), ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
293
+ this.model = signal(this.toForm(), ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
294
+ this.form = form(this.model, (p) => {
295
+ required(p.user, { when: () => this.dialogData().mode !== "otp" });
296
+ notEmpty(p.user, { when: () => this.dialogData().mode !== "otp" });
297
+ email(p.user, { when: () => this.dialogData().mode === "email" });
298
+ required(p.password, { when: () => this.dialogData().mode !== "otp" });
299
+ notEmpty(p.password, { when: () => this.dialogData().mode !== "otp" });
300
+ maxLength(p.password, this.dialogData().maxLength ?? 30);
301
+ required(p.code, { when: () => this.dialogData().mode === "otp" });
302
+ notEmpty(p.code, { when: () => this.dialogData().mode === "otp" });
303
+ otp(p.code);
304
+ });
305
+ this.showPassword = signal(false, ...ngDevMode ? [{ debugName: "showPassword" }] : /* istanbul ignore next */ []);
306
+ }
307
+ toForm() {
308
+ return DtoUtils.toForm(_EMPTY_ITEM$3, { user: this.dialogData().user });
309
+ }
310
+ toPayload() {
311
+ return DtoUtils.toPayload(this.model());
312
+ }
313
+ changeMode(mode, message) {
314
+ this.dialogData.update((d) => ({
315
+ ...d,
316
+ mode,
317
+ message: message ?? d.message
318
+ }));
319
+ }
320
+ ok() {
321
+ this.done.emit(this.toPayload());
322
+ }
323
+ recoverPassword() {
324
+ this.recoveringPassword.emit(this.toPayload());
325
+ const url = this.dialogData().recoverPasswordUrl;
326
+ if (url) window.open(url, "_blank");
327
+ }
328
+ static {
329
+ this.ɵfac = i0.ɵɵngDeclareFactory({
330
+ minVersion: "12.0.0",
331
+ version: "22.2.1",
332
+ ngImport: i0,
333
+ type: CredentialsDialogComponent,
334
+ deps: [],
335
+ target: i0.ɵɵFactoryTarget.Component
336
+ });
337
+ }
338
+ static {
339
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
340
+ minVersion: "17.0.0",
341
+ version: "22.2.1",
342
+ type: CredentialsDialogComponent,
343
+ isStandalone: true,
344
+ selector: "ng-component",
345
+ outputs: {
346
+ done: "done",
347
+ recoveringPassword: "recoveringPassword"
348
+ },
349
+ ngImport: i0,
350
+ template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n<mat-dialog-content class=\"dialog-content\">\n @if (dialogData().message) {\n <div [innerHtml]=\"dialogData().message | safeHtml\" style=\"padding-bottom: 20px;\"></div>\n }\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n @if(dialogData().mode !== 'otp') {\n @if (dialogData().mode === 'email') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email</mat-label>\n <input type=\"email\" matInput [formField]=\"form.user\" [attr.aria-label]=\"'Email'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n } @else if (dialogData().mode === 'user') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Utente</mat-label>\n <input matInput [formField]=\"form.user\" [attr.aria-label]=\"'user'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n }\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>La tua password abilitata</mat-label>\n <input matInput [type]=\"!showPassword() ? 'password' : 'text'\"\n [formField]=\"form.password\" [attr.aria-label]=\"'La tua password abilitata'\" autocomplete=\"on\">\n @if(form.password().value()) {\n <password-strength [password]=\"form.password().value()\"></password-strength>\n }\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix (click)=\"showPassword.set(!showPassword())\">\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\n </button>\n <mat-hint>Attento a maiuscole e minuscole</mat-hint>\n @if (form.password().invalid()) {\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\n }\n </mat-form-field>\n @if (dialogData().remember || dialogData().recoverPassword) {\n <div fxLayout=\"row\" fxLayoutGap=\"20px\" fxFill style=\"margin-top: 20px;\">\n <div>\n @if (dialogData().remember) {\n <mat-checkbox fxFlexAlign=\"center\" [formField]=\"form.rememberMe\"> Ricordami</mat-checkbox>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (dialogData().recoverPassword) {\n <button fxFlexAlign=\"center\" mat-button (click)=\"recoverPassword()\" title=\"Recupero password\"\n >Non riesco ad accedere</button>\n }\n </div>\n </div>\n }\n } @else {\n <otp-input [formField]=\"form.code\"></otp-input>\n }\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n</mat-dialog-actions>\n",
351
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"],
352
+ dependencies: [
353
+ {
354
+ kind: "directive",
355
+ type: MatDialogTitle,
356
+ selector: "[mat-dialog-title], [matDialogTitle]",
357
+ inputs: ["id"],
358
+ exportAs: ["matDialogTitle"]
359
+ },
360
+ {
361
+ kind: "directive",
362
+ type: MatDialogContent,
363
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
364
+ },
365
+ {
366
+ kind: "directive",
367
+ type: FormField,
368
+ selector: "[formField]",
369
+ inputs: ["formField"],
370
+ exportAs: ["formField"]
371
+ },
372
+ {
373
+ kind: "directive",
374
+ type: FormRoot,
375
+ selector: "form[formRoot]",
376
+ inputs: ["formRoot"]
377
+ },
378
+ {
379
+ kind: "ngmodule",
380
+ type: MatFormFieldModule
381
+ },
382
+ {
383
+ kind: "component",
384
+ type: i1.MatFormField,
385
+ selector: "mat-form-field",
386
+ inputs: [
387
+ "hideRequiredMarker",
388
+ "color",
389
+ "floatLabel",
390
+ "appearance",
391
+ "subscriptSizing",
392
+ "hintLabel"
393
+ ],
394
+ exportAs: ["matFormField"]
395
+ },
396
+ {
397
+ kind: "directive",
398
+ type: i1.MatLabel,
399
+ selector: "mat-label"
400
+ },
401
+ {
402
+ kind: "directive",
403
+ type: i1.MatHint,
404
+ selector: "mat-hint",
405
+ inputs: ["align", "id"]
406
+ },
407
+ {
408
+ kind: "directive",
409
+ type: i1.MatError,
410
+ selector: "mat-error, [matError]",
411
+ inputs: ["id"]
412
+ },
413
+ {
414
+ kind: "directive",
415
+ type: i1.MatSuffix,
416
+ selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
417
+ inputs: ["matTextSuffix"]
418
+ },
419
+ {
420
+ kind: "ngmodule",
421
+ type: MatInputModule
422
+ },
423
+ {
424
+ kind: "directive",
425
+ type: i2.MatInput,
426
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
427
+ inputs: [
428
+ "disabled",
429
+ "id",
430
+ "placeholder",
431
+ "name",
432
+ "required",
433
+ "type",
434
+ "errorStateMatcher",
435
+ "aria-describedby",
436
+ "value",
437
+ "readonly",
438
+ "disabledInteractive"
439
+ ],
440
+ exportAs: ["matInput"]
441
+ },
442
+ {
443
+ kind: "ngmodule",
444
+ type: MatIconModule
445
+ },
446
+ {
447
+ kind: "component",
448
+ type: i3.MatIcon,
449
+ selector: "mat-icon",
450
+ inputs: [
451
+ "color",
452
+ "inline",
453
+ "svgIcon",
454
+ "fontSet",
455
+ "fontIcon"
456
+ ],
457
+ exportAs: ["matIcon"]
458
+ },
459
+ {
460
+ kind: "ngmodule",
461
+ type: MatCheckboxModule
462
+ },
463
+ {
464
+ kind: "component",
465
+ type: i4.MatCheckbox,
466
+ selector: "mat-checkbox",
467
+ inputs: [
468
+ "aria-label",
469
+ "aria-labelledby",
470
+ "aria-describedby",
471
+ "aria-expanded",
472
+ "aria-controls",
473
+ "aria-owns",
474
+ "id",
475
+ "required",
476
+ "labelPosition",
477
+ "name",
478
+ "value",
479
+ "disableRipple",
480
+ "tabIndex",
481
+ "color",
482
+ "disabledInteractive",
483
+ "checked",
484
+ "disabled",
485
+ "indeterminate"
486
+ ],
487
+ outputs: ["change", "indeterminateChange"],
488
+ exportAs: ["matCheckbox"]
489
+ },
490
+ {
491
+ kind: "directive",
492
+ type: MatDialogActions,
493
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
494
+ inputs: ["align"]
495
+ },
496
+ {
497
+ kind: "ngmodule",
498
+ type: FlexLayoutModule
499
+ },
500
+ {
501
+ kind: "directive",
502
+ type: i5.FxLayoutDirective,
503
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
504
+ inputs: [
505
+ "fxLayout",
506
+ "fxLayout.xs",
507
+ "fxLayout.sm",
508
+ "fxLayout.md",
509
+ "fxLayout.lg",
510
+ "fxLayout.xl",
511
+ "fxLayout.lt-sm",
512
+ "fxLayout.lt-md",
513
+ "fxLayout.lt-lg",
514
+ "fxLayout.lt-xl",
515
+ "fxLayout.gt-xs",
516
+ "fxLayout.gt-sm",
517
+ "fxLayout.gt-md",
518
+ "fxLayout.gt-lg"
519
+ ]
520
+ },
521
+ {
522
+ kind: "directive",
523
+ type: i5.FxLayoutAlignDirective,
524
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
525
+ inputs: [
526
+ "fxLayoutAlign",
527
+ "fxLayoutAlign.xs",
528
+ "fxLayoutAlign.sm",
529
+ "fxLayoutAlign.md",
530
+ "fxLayoutAlign.lg",
531
+ "fxLayoutAlign.xl",
532
+ "fxLayoutAlign.lt-sm",
533
+ "fxLayoutAlign.lt-md",
534
+ "fxLayoutAlign.lt-lg",
535
+ "fxLayoutAlign.lt-xl",
536
+ "fxLayoutAlign.gt-xs",
537
+ "fxLayoutAlign.gt-sm",
538
+ "fxLayoutAlign.gt-md",
539
+ "fxLayoutAlign.gt-lg"
540
+ ]
541
+ },
542
+ {
543
+ kind: "directive",
544
+ type: i5.FxLayoutGapDirective,
545
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
546
+ inputs: [
547
+ "fxLayoutGap",
548
+ "fxLayoutGap.xs",
549
+ "fxLayoutGap.sm",
550
+ "fxLayoutGap.md",
551
+ "fxLayoutGap.lg",
552
+ "fxLayoutGap.xl",
553
+ "fxLayoutGap.lt-sm",
554
+ "fxLayoutGap.lt-md",
555
+ "fxLayoutGap.lt-lg",
556
+ "fxLayoutGap.lt-xl",
557
+ "fxLayoutGap.gt-xs",
558
+ "fxLayoutGap.gt-sm",
559
+ "fxLayoutGap.gt-md",
560
+ "fxLayoutGap.gt-lg"
561
+ ]
562
+ },
563
+ {
564
+ kind: "directive",
565
+ type: i5.FxFlexAlignDirective,
566
+ selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ",
567
+ inputs: [
568
+ "fxFlexAlign",
569
+ "fxFlexAlign.xs",
570
+ "fxFlexAlign.sm",
571
+ "fxFlexAlign.md",
572
+ "fxFlexAlign.lg",
573
+ "fxFlexAlign.xl",
574
+ "fxFlexAlign.lt-sm",
575
+ "fxFlexAlign.lt-md",
576
+ "fxFlexAlign.lt-lg",
577
+ "fxFlexAlign.lt-xl",
578
+ "fxFlexAlign.gt-xs",
579
+ "fxFlexAlign.gt-sm",
580
+ "fxFlexAlign.gt-md",
581
+ "fxFlexAlign.gt-lg"
582
+ ]
583
+ },
584
+ {
585
+ kind: "directive",
586
+ type: i5.FxFlexFillDirective,
587
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
588
+ inputs: [
589
+ "fxFlexFill",
590
+ "fxFill",
591
+ "fxFlexFill.xs",
592
+ "fxFlexFill.sm",
593
+ "fxFlexFill.md",
594
+ "fxFlexFill.lg",
595
+ "fxFlexFill.xl",
596
+ "fxFlexFill.lt-sm",
597
+ "fxFlexFill.lt-md",
598
+ "fxFlexFill.lt-lg",
599
+ "fxFlexFill.lt-xl",
600
+ "fxFlexFill.gt-xs",
601
+ "fxFlexFill.gt-sm",
602
+ "fxFlexFill.gt-md",
603
+ "fxFlexFill.gt-lg"
604
+ ]
605
+ },
606
+ {
607
+ kind: "ngmodule",
608
+ type: MatButtonModule
609
+ },
610
+ {
611
+ kind: "component",
612
+ type: i6.MatButton,
613
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
614
+ inputs: ["matButton"],
615
+ exportAs: ["matButton", "matAnchor"]
616
+ },
617
+ {
618
+ kind: "component",
619
+ type: i6.MatIconButton,
620
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
621
+ exportAs: ["matButton", "matAnchor"]
622
+ },
623
+ {
624
+ kind: "directive",
625
+ type: MatDialogClose,
626
+ selector: "[mat-dialog-close], [matDialogClose]",
627
+ inputs: [
628
+ "aria-label",
629
+ "type",
630
+ "mat-dialog-close",
631
+ "matDialogClose"
632
+ ],
633
+ exportAs: ["matDialogClose"]
634
+ },
635
+ {
636
+ kind: "component",
637
+ type: PasswordStrengthComponent,
638
+ selector: "password-strength",
639
+ inputs: ["password"]
640
+ },
641
+ {
642
+ kind: "component",
643
+ type: OtpInputComponent,
644
+ selector: "otp-input"
645
+ },
646
+ {
647
+ kind: "pipe",
648
+ type: SafeHtmlPipe,
649
+ name: "safeHtml"
650
+ }
651
+ ],
652
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
653
+ });
654
+ }
655
+ };
656
+ i0.ɵɵngDeclareClassMetadata({
657
+ minVersion: "12.0.0",
658
+ version: "22.2.1",
659
+ ngImport: i0,
660
+ type: CredentialsDialogComponent,
661
+ decorators: [{
662
+ type: Component,
663
+ args: [{
664
+ standalone: true,
665
+ changeDetection: ChangeDetectionStrategy.OnPush,
666
+ imports: [
667
+ MatDialogTitle,
668
+ MatDialogContent,
669
+ FormField,
670
+ FormRoot,
671
+ MatFormFieldModule,
672
+ MatInputModule,
673
+ MatIconModule,
674
+ MatCheckboxModule,
675
+ MatDialogActions,
676
+ FlexLayoutModule,
677
+ MatButtonModule,
678
+ MatDialogClose,
679
+ PasswordStrengthComponent,
680
+ OtpInputComponent,
681
+ SafeHtmlPipe
682
+ ],
683
+ template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\n<mat-dialog-content class=\"dialog-content\">\n @if (dialogData().message) {\n <div [innerHtml]=\"dialogData().message | safeHtml\" style=\"padding-bottom: 20px;\"></div>\n }\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n @if(dialogData().mode !== 'otp') {\n @if (dialogData().mode === 'email') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email</mat-label>\n <input type=\"email\" matInput [formField]=\"form.user\" [attr.aria-label]=\"'Email'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n } @else if (dialogData().mode === 'user') {\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>Utente</mat-label>\n <input matInput [formField]=\"form.user\" [attr.aria-label]=\"'user'\">\n @if (form.user().invalid()) {\n <mat-error>{{ getErrorMessage(form.user().errors()) }}</mat-error>\n }\n </mat-form-field>\n }\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\n <mat-label>La tua password abilitata</mat-label>\n <input matInput [type]=\"!showPassword() ? 'password' : 'text'\"\n [formField]=\"form.password\" [attr.aria-label]=\"'La tua password abilitata'\" autocomplete=\"on\">\n @if(form.password().value()) {\n <password-strength [password]=\"form.password().value()\"></password-strength>\n }\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix (click)=\"showPassword.set(!showPassword())\">\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\n </button>\n <mat-hint>Attento a maiuscole e minuscole</mat-hint>\n @if (form.password().invalid()) {\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\n }\n </mat-form-field>\n @if (dialogData().remember || dialogData().recoverPassword) {\n <div fxLayout=\"row\" fxLayoutGap=\"20px\" fxFill style=\"margin-top: 20px;\">\n <div>\n @if (dialogData().remember) {\n <mat-checkbox fxFlexAlign=\"center\" [formField]=\"form.rememberMe\"> Ricordami</mat-checkbox>\n }\n </div>\n <div fxLayoutAlign=\"end\">\n @if (dialogData().recoverPassword) {\n <button fxFlexAlign=\"center\" mat-button (click)=\"recoverPassword()\" title=\"Recupero password\"\n >Non riesco ad accedere</button>\n }\n </div>\n </div>\n }\n } @else {\n <otp-input [formField]=\"form.code\"></otp-input>\n }\n </form>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\n </div>\n</mat-dialog-actions>\n",
684
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"]
685
+ }]
686
+ }],
687
+ propDecorators: {
688
+ done: [{
689
+ type: i0.Output,
690
+ args: ["done"]
691
+ }],
692
+ recoveringPassword: [{
693
+ type: i0.Output,
694
+ args: ["recoveringPassword"]
695
+ }]
696
+ }
697
+ });
384
698
  const _EMPTY_ITEM$2 = {
385
- userId: null,
386
- userEmail: '',
387
- oldPassword: '',
388
- password: '',
389
- password2: '',
390
- code: '',
699
+ userId: null,
700
+ userEmail: "",
701
+ oldPassword: "",
702
+ password: "",
703
+ password2: "",
704
+ code: ""
391
705
  };
392
- class ResetPasswordDialogComponent {
393
- /**
394
- * Builds the form model from the dialog data, which identifies the account either by
395
- * id or by email depending on the mode.
396
- * @returns A fresh form model.
397
- */
398
- toForm() {
399
- const data = this.dialogData();
400
- return DtoUtils.toForm(_EMPTY_ITEM$2, { userId: data.userId, userEmail: data.userEmail });
401
- }
402
- /**
403
- * Builds the dialog result from the current form model. The fields the active mode
404
- * does not use are left empty by the template and dropped here, so they travel as
405
- * absent instead of as empty strings.
406
- * @returns The reset data to emit through `done`.
407
- */
408
- toPayload() {
409
- return DtoUtils.toPayload(this.model());
410
- }
411
- constructor() {
412
- /** Error text of a field: the message declared in the schema, or the shared fallback. */
413
- this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
414
- /** Emitted when the user submits the new password. Carries the entered password data. */
415
- this.done = output();
416
- this.dialogService = inject(ShellService);
417
- this.dialogRef = inject((MatDialogRef));
418
- /** Dialog configuration with defaults applied at construction time. */
419
- this.dialogData = signal((() => {
420
- const raw = inject(MAT_DIALOG_DATA);
421
- return { mode: 'admin', appearance: 'fill', ...raw };
422
- })(), /* @ts-ignore */
423
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
424
- /** Model backing the signal form. */
425
- this.model = signal(this.toForm(), /* @ts-ignore */
426
- ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
427
- /**
428
- * Signal form for the password reset. Validators follow the active mode:
429
- * the email is required in `forgot` mode, the old password in `old` mode,
430
- * a complete 6-digit OTP code in `otp` mode; the new password is always
431
- * required, at least 10 characters and strong enough, and its confirmation
432
- * (required outside `admin` mode) must match it.
433
- */
434
- this.form = form(this.model, p => {
435
- required(p.userEmail, { when: () => this.dialogData().mode === 'forgot' });
436
- notEmpty(p.userEmail, { when: () => this.dialogData().mode === 'forgot' });
437
- email(p.userEmail, { when: () => this.dialogData().mode === 'forgot' });
438
- required(p.oldPassword, { when: () => this.dialogData().mode === 'old' });
439
- notEmpty(p.oldPassword, { when: () => this.dialogData().mode === 'old' });
440
- maxLength(p.oldPassword, 30);
441
- required(p.code, { when: () => this.dialogData().mode === 'otp' });
442
- notEmpty(p.code, { when: () => this.dialogData().mode === 'otp' });
443
- otp(p.code);
444
- required(p.password);
445
- notEmpty(p.password);
446
- minLength(p.password, 10);
447
- maxLength(p.password, this.dialogData().maxLength ?? 30);
448
- password(p.password);
449
- required(p.password2, { when: () => this.dialogData().mode !== 'admin' });
450
- notEmpty(p.password2, { when: () => this.dialogData().mode !== 'admin' });
451
- minLength(p.password2, 10);
452
- maxLength(p.password2, this.dialogData().maxLength ?? 30);
453
- password(p.password2);
454
- equals(p.password2, p.password);
455
- });
456
- /** Whether the old-password field is currently shown as plain text. */
457
- this.showOldPassword = signal(false, /* @ts-ignore */
458
- ...(ngDevMode ? [{ debugName: "showOldPassword" }] : /* istanbul ignore next */ []));
459
- /** Whether the new-password field is currently shown as plain text. */
460
- this.showPassword = signal(false, /* @ts-ignore */
461
- ...(ngDevMode ? [{ debugName: "showPassword" }] : /* istanbul ignore next */ []));
462
- /** Whether the confirm-password field is currently shown as plain text. */
463
- this.showPassword2 = signal(false, /* @ts-ignore */
464
- ...(ngDevMode ? [{ debugName: "showPassword2" }] : /* istanbul ignore next */ []));
465
- const data = this.dialogData();
466
- const requireUserId = data.mode !== 'forgot' && data.mode !== 'otp' && data.mode !== 'old';
467
- if (requireUserId && !data.userId) {
468
- this.dialogRef.close();
469
- this.dialogService.error('Utente non specificato.');
470
- return;
471
- }
472
- else if ((data.mode === 'forgot' || data.mode === 'otp' || data.mode === 'old') && !data.userEmail) {
473
- this.dialogRef.close();
474
- this.dialogService.error('Email utente non specificata.');
475
- return;
476
- }
477
- }
478
- /**
479
- * Emits the current form result to trigger the password-reset flow.
480
- */
481
- ok() {
482
- this.done.emit(this.toPayload());
483
- }
484
- /**
485
- * Generates a random password and populates both password fields with it.
486
- */
487
- generatePassword() {
488
- const password = SystemUtils.generatePassword();
489
- this.model.update(m => ({ ...m, password, password2: password }));
490
- }
491
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ResetPasswordDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
492
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ResetPasswordDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, ngImport: i0, template: "<div class=\"dialog-info\">\r\n @if (form().invalid()) {\r\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\r\n } @else {\r\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\r\n }\r\n</div>\r\n<div mat-dialog-title>Reimposta password</div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate >\r\n @if (dialogData().mode === 'forgot') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Email che hai scelto quando ti sei registrato</mat-label>\r\n <input type=\"email\" matInput [formField]=\"form.userEmail\"\r\n [attr.aria-label]=\"'Email con cui ti sei registrato'\">\r\n @if (form.userEmail().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.userEmail().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'old') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Vecchia password</mat-label>\r\n <input [type]=\"!showOldPassword() ? 'password' : 'text'\" matInput autocomplete=\"on\"\r\n [formField]=\"form.oldPassword\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showOldPassword.set(!showOldPassword())\">\r\n <mat-icon>{{showOldPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.oldPassword().value()) {\r\n <password-strength [password]=\"form.oldPassword().value()\"></password-strength>\r\n }\r\n @if (form.oldPassword().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.oldPassword().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'otp') {\r\n <div style=\"font-size: small;\">Inserisci il codice di verifica di 6 cifre che ti abbiamo inviato ora per\r\n email<br><span style=\"font-size:x-small\">(controlla anche la posta indesiderata)</span>.</div>\r\n <otp-input [formField]=\"form.code\"></otp-input>\r\n }\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Nuova password</mat-label>\r\n <input [type]=\"!showPassword() ? 'password' : 'text'\" matInput [formField]=\"form.password\">\r\n @if(form.password().value()) {\r\n <password-strength [password]=\"form.password().value()\"></password-strength>\r\n }\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword.set(!showPassword())\">\r\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n <mat-hint align=\"end\">{{form.password().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma nuova password</mat-label>\r\n <input [type]=\"!showPassword2() ? 'password' : 'text'\" matInput [formField]=\"form.password2\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword2.set(!showPassword2())\">\r\n <mat-icon>{{showPassword2() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.password2().value()) {\r\n <password-strength [password]=\"form.password2().value()\"></password-strength>\r\n }\r\n <mat-hint align=\"end\">{{form.password2().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password2().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password2().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().mode === 'admin') {\r\n <button mat-stroked-button (click)=\"generatePassword()\">Genera</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">Salva</button>\r\n @if (dialogData().mode !== 'forgot') {\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\r\n }\r\n </div>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$2.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: PasswordStrengthComponent, selector: "password-strength", inputs: ["password"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: OtpInputComponent, selector: "otp-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
493
- }
494
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ResetPasswordDialogComponent, decorators: [{
495
- type: Component,
496
- args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
497
- MatDialogTitle,
498
- MatDialogContent,
499
- FormField, FormRoot,
500
- FlexLayoutModule,
501
- MatFormFieldModule,
502
- MatInputModule,
503
- PasswordStrengthComponent,
504
- MatIconModule,
505
- MatDialogActions,
506
- MatButtonModule,
507
- MatDialogClose,
508
- OtpInputComponent
509
- ], template: "<div class=\"dialog-info\">\r\n @if (form().invalid()) {\r\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\r\n } @else {\r\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\r\n }\r\n</div>\r\n<div mat-dialog-title>Reimposta password</div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate >\r\n @if (dialogData().mode === 'forgot') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Email che hai scelto quando ti sei registrato</mat-label>\r\n <input type=\"email\" matInput [formField]=\"form.userEmail\"\r\n [attr.aria-label]=\"'Email con cui ti sei registrato'\">\r\n @if (form.userEmail().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.userEmail().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'old') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Vecchia password</mat-label>\r\n <input [type]=\"!showOldPassword() ? 'password' : 'text'\" matInput autocomplete=\"on\"\r\n [formField]=\"form.oldPassword\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showOldPassword.set(!showOldPassword())\">\r\n <mat-icon>{{showOldPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.oldPassword().value()) {\r\n <password-strength [password]=\"form.oldPassword().value()\"></password-strength>\r\n }\r\n @if (form.oldPassword().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.oldPassword().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'otp') {\r\n <div style=\"font-size: small;\">Inserisci il codice di verifica di 6 cifre che ti abbiamo inviato ora per\r\n email<br><span style=\"font-size:x-small\">(controlla anche la posta indesiderata)</span>.</div>\r\n <otp-input [formField]=\"form.code\"></otp-input>\r\n }\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Nuova password</mat-label>\r\n <input [type]=\"!showPassword() ? 'password' : 'text'\" matInput [formField]=\"form.password\">\r\n @if(form.password().value()) {\r\n <password-strength [password]=\"form.password().value()\"></password-strength>\r\n }\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword.set(!showPassword())\">\r\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n <mat-hint align=\"end\">{{form.password().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma nuova password</mat-label>\r\n <input [type]=\"!showPassword2() ? 'password' : 'text'\" matInput [formField]=\"form.password2\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword2.set(!showPassword2())\">\r\n <mat-icon>{{showPassword2() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.password2().value()) {\r\n <password-strength [password]=\"form.password2().value()\"></password-strength>\r\n }\r\n <mat-hint align=\"end\">{{form.password2().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password2().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password2().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().mode === 'admin') {\r\n <button mat-stroked-button (click)=\"generatePassword()\">Genera</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">Salva</button>\r\n @if (dialogData().mode !== 'forgot') {\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\r\n }\r\n </div>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"] }]
510
- }], ctorParameters: () => [], propDecorators: { done: [{ type: i0.Output, args: ["done"] }] } });
511
-
512
- /** Neutral form model: it declares every field the form owns and its empty value. */
513
- const _EMPTY_ITEM$1 = { email: '', recaptcha: false };
514
- class RecoverPasswordDialogComponent {
515
- constructor() {
516
- /** Error text of a field: the message declared in the schema, or the shared fallback. */
517
- this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
518
- /** Emitted when the user submits the recovery request. Carries the entered email and recaptcha state. */
519
- this.done = output();
520
- /** Dialog configuration with defaults applied at construction time. */
521
- this.dialogData = signal({
522
- appearance: 'fill',
523
- ...(inject(MAT_DIALOG_DATA) ?? {}),
524
- }, /* @ts-ignore */
525
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
526
- /** Model backing the signal form. */
527
- this.model = signal(this.toForm(), /* @ts-ignore */
528
- ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
529
- /**
530
- * Signal form for the recovery request: the email is required and must be valid.
531
- */
532
- this.form = form(this.model, p => {
533
- required(p.email);
534
- notEmpty(p.email);
535
- email(p.email);
536
- maxLength(p.email, 200);
537
- });
538
- }
539
- /**
540
- * Builds the form model. The dialog is always opened empty, so the model is the
541
- * neutral one.
542
- * @returns A fresh form model.
543
- */
544
- toForm() {
545
- return DtoUtils.toForm(_EMPTY_ITEM$1);
546
- }
547
- /**
548
- * Builds the dialog result from the current form model, dropping the email when it
549
- * was left empty.
550
- * @returns The result to emit through `done`.
551
- */
552
- toPayload() {
553
- return DtoUtils.toPayload(this.model());
554
- }
555
- /**
556
- * Emits the current form result to trigger the password-recovery flow.
557
- */
558
- ok() {
559
- this.done.emit(this.toPayload());
560
- }
561
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RecoverPasswordDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
562
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: RecoverPasswordDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, ngImport: i0, template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title>Per quale ragione non sei in grado di effettuare l'accesso?</div>\n<mat-dialog-content class=\"dialog-content\">\n\n <b>1. Ho dimenticato la password</b>\n <p>\n Puoi recuperarla facilmente inserendo l'email a cui la password \u00E8 collegata. Non \u00E8 possibile recuperare password\n aziendali (non collegate ad un email).</p>\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n\n <mat-form-field style=\"width:100%\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email con cui ti sei registrato</mat-label>\n <input type=\"email\" matInput [formField]=\"form.email\" />\n @if (form.email().invalid()) {\n <mat-error>{{ getErrorMessage(form.email().errors()) }}</mat-error>\n }\n </mat-form-field>\n\n <div style=\"margin-top:20px; margin-bottom:20px;\">\n <button type=\"button\" mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\n aria-label=\"Recupera password\">Recupera password</button>\n </div>\n </form>\n <p></p>\n <b>2. Il sistema mi dice che la password non \u00E8 corretta.</b>\n <p>\n E' molto probabile che ci sia stato un difetto di digitazione. Per favore controlla bene che non vi siano spazi non\n richiesti e che la password rispetti perfettamente le maiuscole e minuscole. Nel caso in cui la digitazione fosse\n corretta, verifica che la data del tuo abbonamento non sia scaduta.\n </p>\n <p></p>\n <b>3. Il sistema mi dice che non pu\u00F2 accettare connessioni dal mio indirizzo IP</b>\n <p>\n Il tuo abbonamento \u00E8 stato vincolato ad un indirizzo IP (indirizzo dal quale ti colleghi). Capita sovente che\n questi indirizzi siano cambiati da parte del reparto IT per questioni di sicurezza informatica.\n Per risolvere il problema, contattate il reparto IT e fatevi dire qual'\u00E8 il nuovo indirizzo IP e comunicatelo ad\n ARS Edizioni Informatiche.\n </p>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\n </div>\n</mat-dialog-actions>", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$2.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
563
- }
564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: RecoverPasswordDialogComponent, decorators: [{
565
- type: Component,
566
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
567
- MatDialogTitle,
568
- MatDialogContent,
569
- FormField, FormRoot,
570
- MatFormFieldModule,
571
- MatInputModule,
572
- MatButtonModule,
573
- MatDialogActions,
574
- FlexLayoutModule,
575
- MatDialogClose,
576
- ], template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title>Per quale ragione non sei in grado di effettuare l'accesso?</div>\n<mat-dialog-content class=\"dialog-content\">\n\n <b>1. Ho dimenticato la password</b>\n <p>\n Puoi recuperarla facilmente inserendo l'email a cui la password \u00E8 collegata. Non \u00E8 possibile recuperare password\n aziendali (non collegate ad un email).</p>\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n\n <mat-form-field style=\"width:100%\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email con cui ti sei registrato</mat-label>\n <input type=\"email\" matInput [formField]=\"form.email\" />\n @if (form.email().invalid()) {\n <mat-error>{{ getErrorMessage(form.email().errors()) }}</mat-error>\n }\n </mat-form-field>\n\n <div style=\"margin-top:20px; margin-bottom:20px;\">\n <button type=\"button\" mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\n aria-label=\"Recupera password\">Recupera password</button>\n </div>\n </form>\n <p></p>\n <b>2. Il sistema mi dice che la password non \u00E8 corretta.</b>\n <p>\n E' molto probabile che ci sia stato un difetto di digitazione. Per favore controlla bene che non vi siano spazi non\n richiesti e che la password rispetti perfettamente le maiuscole e minuscole. Nel caso in cui la digitazione fosse\n corretta, verifica che la data del tuo abbonamento non sia scaduta.\n </p>\n <p></p>\n <b>3. Il sistema mi dice che non pu\u00F2 accettare connessioni dal mio indirizzo IP</b>\n <p>\n Il tuo abbonamento \u00E8 stato vincolato ad un indirizzo IP (indirizzo dal quale ti colleghi). Capita sovente che\n questi indirizzi siano cambiati da parte del reparto IT per questioni di sicurezza informatica.\n Per risolvere il problema, contattate il reparto IT e fatevi dire qual'\u00E8 il nuovo indirizzo IP e comunicatelo ad\n ARS Edizioni Informatiche.\n </p>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\n </div>\n</mat-dialog-actions>", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"] }]
577
- }], propDecorators: { done: [{ type: i0.Output, args: ["done"] }] } });
578
-
579
- /** Neutral form model: it declares every field the form owns and its empty value. */
580
- const _EMPTY_ITEM = { value: '' };
581
- class PromptOtpDialogComponent {
582
- constructor() {
583
- this.done = output();
584
- this.dialogService = inject(ShellService);
585
- this.dialogData = signal((() => {
586
- const data = inject(MAT_DIALOG_DATA) ?? {};
587
- return {
588
- ...data,
589
- appearance: data.appearance ?? 'fill',
590
- title: data.title ?? 'Conferma la tua identità',
591
- type: data.type ?? PromptDialogType.Default,
592
- okCaption: data.okCaption ?? 'Ok',
593
- cancelCaption: data.cancelCaption ?? 'Annulla',
594
- };
595
- })(), /* @ts-ignore */
596
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
597
- /** Model backing the signal form. `value` holds the 6-digit OTP code. */
598
- this.model = signal(this.toForm(), /* @ts-ignore */
599
- ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
600
- /**
601
- * Signal form for the OTP code. The code is always required here; the
602
- * "complete 6 digits" rule comes from the OtpInputComponent validator,
603
- * honoured through the ControlValueAccessor interop.
604
- */
605
- this.form = form(this.model, p => {
606
- required(p.value);
607
- notEmpty(p.value);
608
- });
609
- }
610
- /**
611
- * Builds the form model. The dialog has no incoming value, so the model is the
612
- * neutral one.
613
- * @returns A fresh form model.
614
- */
615
- toForm() {
616
- return DtoUtils.toForm(_EMPTY_ITEM);
617
- }
618
- /**
619
- * Builds the dialog result from the current form model, dropping the empty code.
620
- * @returns The result carrying the entered OTP code.
621
- */
622
- toPayload() {
623
- return DtoUtils.toPayload(this.model());
624
- }
625
- /**
626
- * Validates the form and emits the OTP result, or shows an error if validation fails.
627
- */
628
- ok() {
629
- if (this.form().invalid()) {
630
- this.form().markAsTouched();
631
- this.dialogService.error('Ci sono degli errori da correggere.');
632
- return;
633
- }
634
- this.done.emit(this.toPayload());
635
- }
636
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PromptOtpDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
637
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: PromptOtpDialogComponent, isStandalone: true, selector: "ng-component", outputs: { done: "done" }, ngImport: i0, template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n @if (dialogData().description) {\r\n <div [innerHtml]=\"dialogData().description | safeHtml\" style=\"padding-bottom: 20px;\"></div>\r\n }\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"column\" fxFill>\r\n <otp-input [formField]=\"form.value\"></otp-input>\r\n </div>\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1$2.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$2.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1$2.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: OtpInputComponent, selector: "otp-input" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
638
- }
639
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: PromptOtpDialogComponent, decorators: [{
640
- type: Component,
641
- args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogTitle, MatDialogContent, FormField, FormRoot, FlexLayoutModule, MatButtonModule, MatIconModule,
642
- MatDialogActions, MatDialogClose, SafeHtmlPipe, OtpInputComponent], template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n @if (dialogData().description) {\r\n <div [innerHtml]=\"dialogData().description | safeHtml\" style=\"padding-bottom: 20px;\"></div>\r\n }\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"column\" fxFill>\r\n <otp-input [formField]=\"form.value\"></otp-input>\r\n </div>\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"] }]
643
- }], propDecorators: { done: [{ type: i0.Output, args: ["done"] }] } });
644
-
645
- /*
646
- * Public API Surface of @arsedizioni/ars-utils/ui.dialogs.auth
647
- */
648
-
649
- /**
650
- * Generated bundle index. Do not edit.
651
- */
652
-
706
+ var ResetPasswordDialogComponent = class ResetPasswordDialogComponent {
707
+ toForm() {
708
+ const data = this.dialogData();
709
+ return DtoUtils.toForm(_EMPTY_ITEM$2, {
710
+ userId: data.userId,
711
+ userEmail: data.userEmail
712
+ });
713
+ }
714
+ toPayload() {
715
+ return DtoUtils.toPayload(this.model());
716
+ }
717
+ constructor() {
718
+ this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
719
+ this.done = output();
720
+ this.dialogService = inject(ShellService);
721
+ this.dialogRef = inject(MatDialogRef);
722
+ this.dialogData = signal((() => {
723
+ return {
724
+ mode: "admin",
725
+ appearance: "fill",
726
+ ...inject(MAT_DIALOG_DATA)
727
+ };
728
+ })(), ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
729
+ this.model = signal(this.toForm(), ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
730
+ this.form = form(this.model, (p) => {
731
+ required(p.userEmail, { when: () => this.dialogData().mode === "forgot" });
732
+ notEmpty(p.userEmail, { when: () => this.dialogData().mode === "forgot" });
733
+ email(p.userEmail, { when: () => this.dialogData().mode === "forgot" });
734
+ required(p.oldPassword, { when: () => this.dialogData().mode === "old" });
735
+ notEmpty(p.oldPassword, { when: () => this.dialogData().mode === "old" });
736
+ maxLength(p.oldPassword, 30);
737
+ required(p.code, { when: () => this.dialogData().mode === "otp" });
738
+ notEmpty(p.code, { when: () => this.dialogData().mode === "otp" });
739
+ otp(p.code);
740
+ required(p.password);
741
+ notEmpty(p.password);
742
+ minLength(p.password, 10);
743
+ maxLength(p.password, this.dialogData().maxLength ?? 30);
744
+ password(p.password);
745
+ required(p.password2, { when: () => this.dialogData().mode !== "admin" });
746
+ notEmpty(p.password2, { when: () => this.dialogData().mode !== "admin" });
747
+ minLength(p.password2, 10);
748
+ maxLength(p.password2, this.dialogData().maxLength ?? 30);
749
+ password(p.password2);
750
+ equals(p.password2, p.password);
751
+ });
752
+ this.showOldPassword = signal(false, ...ngDevMode ? [{ debugName: "showOldPassword" }] : /* istanbul ignore next */ []);
753
+ this.showPassword = signal(false, ...ngDevMode ? [{ debugName: "showPassword" }] : /* istanbul ignore next */ []);
754
+ this.showPassword2 = signal(false, ...ngDevMode ? [{ debugName: "showPassword2" }] : /* istanbul ignore next */ []);
755
+ const data = this.dialogData();
756
+ if (data.mode !== "forgot" && data.mode !== "otp" && data.mode !== "old" && !data.userId) {
757
+ this.dialogRef.close();
758
+ this.dialogService.error("Utente non specificato.");
759
+ return;
760
+ } else if ((data.mode === "forgot" || data.mode === "otp" || data.mode === "old") && !data.userEmail) {
761
+ this.dialogRef.close();
762
+ this.dialogService.error("Email utente non specificata.");
763
+ return;
764
+ }
765
+ }
766
+ ok() {
767
+ this.done.emit(this.toPayload());
768
+ }
769
+ generatePassword() {
770
+ const password = SystemUtils.generatePassword();
771
+ this.model.update((m) => ({
772
+ ...m,
773
+ password,
774
+ password2: password
775
+ }));
776
+ }
777
+ static {
778
+ this.ɵfac = i0.ɵɵngDeclareFactory({
779
+ minVersion: "12.0.0",
780
+ version: "22.2.1",
781
+ ngImport: i0,
782
+ type: ResetPasswordDialogComponent,
783
+ deps: [],
784
+ target: i0.ɵɵFactoryTarget.Component
785
+ });
786
+ }
787
+ static {
788
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
789
+ minVersion: "17.0.0",
790
+ version: "22.2.1",
791
+ type: ResetPasswordDialogComponent,
792
+ isStandalone: true,
793
+ selector: "ng-component",
794
+ outputs: { done: "done" },
795
+ ngImport: i0,
796
+ template: "<div class=\"dialog-info\">\r\n @if (form().invalid()) {\r\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\r\n } @else {\r\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\r\n }\r\n</div>\r\n<div mat-dialog-title>Reimposta password</div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate >\r\n @if (dialogData().mode === 'forgot') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Email che hai scelto quando ti sei registrato</mat-label>\r\n <input type=\"email\" matInput [formField]=\"form.userEmail\"\r\n [attr.aria-label]=\"'Email con cui ti sei registrato'\">\r\n @if (form.userEmail().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.userEmail().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'old') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Vecchia password</mat-label>\r\n <input [type]=\"!showOldPassword() ? 'password' : 'text'\" matInput autocomplete=\"on\"\r\n [formField]=\"form.oldPassword\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showOldPassword.set(!showOldPassword())\">\r\n <mat-icon>{{showOldPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.oldPassword().value()) {\r\n <password-strength [password]=\"form.oldPassword().value()\"></password-strength>\r\n }\r\n @if (form.oldPassword().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.oldPassword().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'otp') {\r\n <div style=\"font-size: small;\">Inserisci il codice di verifica di 6 cifre che ti abbiamo inviato ora per\r\n email<br><span style=\"font-size:x-small\">(controlla anche la posta indesiderata)</span>.</div>\r\n <otp-input [formField]=\"form.code\"></otp-input>\r\n }\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Nuova password</mat-label>\r\n <input [type]=\"!showPassword() ? 'password' : 'text'\" matInput [formField]=\"form.password\">\r\n @if(form.password().value()) {\r\n <password-strength [password]=\"form.password().value()\"></password-strength>\r\n }\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword.set(!showPassword())\">\r\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n <mat-hint align=\"end\">{{form.password().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma nuova password</mat-label>\r\n <input [type]=\"!showPassword2() ? 'password' : 'text'\" matInput [formField]=\"form.password2\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword2.set(!showPassword2())\">\r\n <mat-icon>{{showPassword2() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.password2().value()) {\r\n <password-strength [password]=\"form.password2().value()\"></password-strength>\r\n }\r\n <mat-hint align=\"end\">{{form.password2().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password2().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password2().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().mode === 'admin') {\r\n <button mat-stroked-button (click)=\"generatePassword()\">Genera</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">Salva</button>\r\n @if (dialogData().mode !== 'forgot') {\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\r\n }\r\n </div>\r\n </div>\r\n</mat-dialog-actions>\r\n",
797
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"],
798
+ dependencies: [
799
+ {
800
+ kind: "directive",
801
+ type: MatDialogTitle,
802
+ selector: "[mat-dialog-title], [matDialogTitle]",
803
+ inputs: ["id"],
804
+ exportAs: ["matDialogTitle"]
805
+ },
806
+ {
807
+ kind: "directive",
808
+ type: MatDialogContent,
809
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
810
+ },
811
+ {
812
+ kind: "directive",
813
+ type: FormField,
814
+ selector: "[formField]",
815
+ inputs: ["formField"],
816
+ exportAs: ["formField"]
817
+ },
818
+ {
819
+ kind: "directive",
820
+ type: FormRoot,
821
+ selector: "form[formRoot]",
822
+ inputs: ["formRoot"]
823
+ },
824
+ {
825
+ kind: "ngmodule",
826
+ type: FlexLayoutModule
827
+ },
828
+ {
829
+ kind: "directive",
830
+ type: i5.FxLayoutDirective,
831
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
832
+ inputs: [
833
+ "fxLayout",
834
+ "fxLayout.xs",
835
+ "fxLayout.sm",
836
+ "fxLayout.md",
837
+ "fxLayout.lg",
838
+ "fxLayout.xl",
839
+ "fxLayout.lt-sm",
840
+ "fxLayout.lt-md",
841
+ "fxLayout.lt-lg",
842
+ "fxLayout.lt-xl",
843
+ "fxLayout.gt-xs",
844
+ "fxLayout.gt-sm",
845
+ "fxLayout.gt-md",
846
+ "fxLayout.gt-lg"
847
+ ]
848
+ },
849
+ {
850
+ kind: "directive",
851
+ type: i5.FxFlexDirective,
852
+ selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
853
+ inputs: [
854
+ "fxFlex",
855
+ "fxFlex.xs",
856
+ "fxFlex.sm",
857
+ "fxFlex.md",
858
+ "fxFlex.lg",
859
+ "fxFlex.xl",
860
+ "fxFlex.lt-sm",
861
+ "fxFlex.lt-md",
862
+ "fxFlex.lt-lg",
863
+ "fxFlex.lt-xl",
864
+ "fxFlex.gt-xs",
865
+ "fxFlex.gt-sm",
866
+ "fxFlex.gt-md",
867
+ "fxFlex.gt-lg"
868
+ ]
869
+ },
870
+ {
871
+ kind: "directive",
872
+ type: i5.FxLayoutAlignDirective,
873
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
874
+ inputs: [
875
+ "fxLayoutAlign",
876
+ "fxLayoutAlign.xs",
877
+ "fxLayoutAlign.sm",
878
+ "fxLayoutAlign.md",
879
+ "fxLayoutAlign.lg",
880
+ "fxLayoutAlign.xl",
881
+ "fxLayoutAlign.lt-sm",
882
+ "fxLayoutAlign.lt-md",
883
+ "fxLayoutAlign.lt-lg",
884
+ "fxLayoutAlign.lt-xl",
885
+ "fxLayoutAlign.gt-xs",
886
+ "fxLayoutAlign.gt-sm",
887
+ "fxLayoutAlign.gt-md",
888
+ "fxLayoutAlign.gt-lg"
889
+ ]
890
+ },
891
+ {
892
+ kind: "directive",
893
+ type: i5.FxLayoutGapDirective,
894
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
895
+ inputs: [
896
+ "fxLayoutGap",
897
+ "fxLayoutGap.xs",
898
+ "fxLayoutGap.sm",
899
+ "fxLayoutGap.md",
900
+ "fxLayoutGap.lg",
901
+ "fxLayoutGap.xl",
902
+ "fxLayoutGap.lt-sm",
903
+ "fxLayoutGap.lt-md",
904
+ "fxLayoutGap.lt-lg",
905
+ "fxLayoutGap.lt-xl",
906
+ "fxLayoutGap.gt-xs",
907
+ "fxLayoutGap.gt-sm",
908
+ "fxLayoutGap.gt-md",
909
+ "fxLayoutGap.gt-lg"
910
+ ]
911
+ },
912
+ {
913
+ kind: "directive",
914
+ type: i5.FxFlexFillDirective,
915
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
916
+ inputs: [
917
+ "fxFlexFill",
918
+ "fxFill",
919
+ "fxFlexFill.xs",
920
+ "fxFlexFill.sm",
921
+ "fxFlexFill.md",
922
+ "fxFlexFill.lg",
923
+ "fxFlexFill.xl",
924
+ "fxFlexFill.lt-sm",
925
+ "fxFlexFill.lt-md",
926
+ "fxFlexFill.lt-lg",
927
+ "fxFlexFill.lt-xl",
928
+ "fxFlexFill.gt-xs",
929
+ "fxFlexFill.gt-sm",
930
+ "fxFlexFill.gt-md",
931
+ "fxFlexFill.gt-lg"
932
+ ]
933
+ },
934
+ {
935
+ kind: "ngmodule",
936
+ type: MatFormFieldModule
937
+ },
938
+ {
939
+ kind: "component",
940
+ type: i1.MatFormField,
941
+ selector: "mat-form-field",
942
+ inputs: [
943
+ "hideRequiredMarker",
944
+ "color",
945
+ "floatLabel",
946
+ "appearance",
947
+ "subscriptSizing",
948
+ "hintLabel"
949
+ ],
950
+ exportAs: ["matFormField"]
951
+ },
952
+ {
953
+ kind: "directive",
954
+ type: i1.MatLabel,
955
+ selector: "mat-label"
956
+ },
957
+ {
958
+ kind: "directive",
959
+ type: i1.MatHint,
960
+ selector: "mat-hint",
961
+ inputs: ["align", "id"]
962
+ },
963
+ {
964
+ kind: "directive",
965
+ type: i1.MatError,
966
+ selector: "mat-error, [matError]",
967
+ inputs: ["id"]
968
+ },
969
+ {
970
+ kind: "directive",
971
+ type: i1.MatSuffix,
972
+ selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
973
+ inputs: ["matTextSuffix"]
974
+ },
975
+ {
976
+ kind: "ngmodule",
977
+ type: MatInputModule
978
+ },
979
+ {
980
+ kind: "directive",
981
+ type: i2.MatInput,
982
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
983
+ inputs: [
984
+ "disabled",
985
+ "id",
986
+ "placeholder",
987
+ "name",
988
+ "required",
989
+ "type",
990
+ "errorStateMatcher",
991
+ "aria-describedby",
992
+ "value",
993
+ "readonly",
994
+ "disabledInteractive"
995
+ ],
996
+ exportAs: ["matInput"]
997
+ },
998
+ {
999
+ kind: "component",
1000
+ type: PasswordStrengthComponent,
1001
+ selector: "password-strength",
1002
+ inputs: ["password"]
1003
+ },
1004
+ {
1005
+ kind: "ngmodule",
1006
+ type: MatIconModule
1007
+ },
1008
+ {
1009
+ kind: "component",
1010
+ type: i3.MatIcon,
1011
+ selector: "mat-icon",
1012
+ inputs: [
1013
+ "color",
1014
+ "inline",
1015
+ "svgIcon",
1016
+ "fontSet",
1017
+ "fontIcon"
1018
+ ],
1019
+ exportAs: ["matIcon"]
1020
+ },
1021
+ {
1022
+ kind: "directive",
1023
+ type: MatDialogActions,
1024
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
1025
+ inputs: ["align"]
1026
+ },
1027
+ {
1028
+ kind: "ngmodule",
1029
+ type: MatButtonModule
1030
+ },
1031
+ {
1032
+ kind: "component",
1033
+ type: i6.MatButton,
1034
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
1035
+ inputs: ["matButton"],
1036
+ exportAs: ["matButton", "matAnchor"]
1037
+ },
1038
+ {
1039
+ kind: "component",
1040
+ type: i6.MatIconButton,
1041
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
1042
+ exportAs: ["matButton", "matAnchor"]
1043
+ },
1044
+ {
1045
+ kind: "directive",
1046
+ type: MatDialogClose,
1047
+ selector: "[mat-dialog-close], [matDialogClose]",
1048
+ inputs: [
1049
+ "aria-label",
1050
+ "type",
1051
+ "mat-dialog-close",
1052
+ "matDialogClose"
1053
+ ],
1054
+ exportAs: ["matDialogClose"]
1055
+ },
1056
+ {
1057
+ kind: "component",
1058
+ type: OtpInputComponent,
1059
+ selector: "otp-input"
1060
+ }
1061
+ ],
1062
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1063
+ });
1064
+ }
1065
+ };
1066
+ i0.ɵɵngDeclareClassMetadata({
1067
+ minVersion: "12.0.0",
1068
+ version: "22.2.1",
1069
+ ngImport: i0,
1070
+ type: ResetPasswordDialogComponent,
1071
+ decorators: [{
1072
+ type: Component,
1073
+ args: [{
1074
+ standalone: true,
1075
+ changeDetection: ChangeDetectionStrategy.OnPush,
1076
+ imports: [
1077
+ MatDialogTitle,
1078
+ MatDialogContent,
1079
+ FormField,
1080
+ FormRoot,
1081
+ FlexLayoutModule,
1082
+ MatFormFieldModule,
1083
+ MatInputModule,
1084
+ PasswordStrengthComponent,
1085
+ MatIconModule,
1086
+ MatDialogActions,
1087
+ MatButtonModule,
1088
+ MatDialogClose,
1089
+ OtpInputComponent
1090
+ ],
1091
+ template: "<div class=\"dialog-info\">\r\n @if (form().invalid()) {\r\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\r\n } @else {\r\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\r\n }\r\n</div>\r\n<div mat-dialog-title>Reimposta password</div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate >\r\n @if (dialogData().mode === 'forgot') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Email che hai scelto quando ti sei registrato</mat-label>\r\n <input type=\"email\" matInput [formField]=\"form.userEmail\"\r\n [attr.aria-label]=\"'Email con cui ti sei registrato'\">\r\n @if (form.userEmail().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.userEmail().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'old') {\r\n <mat-form-field style=\"width: 100%;\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Vecchia password</mat-label>\r\n <input [type]=\"!showOldPassword() ? 'password' : 'text'\" matInput autocomplete=\"on\"\r\n [formField]=\"form.oldPassword\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showOldPassword.set(!showOldPassword())\">\r\n <mat-icon>{{showOldPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.oldPassword().value()) {\r\n <password-strength [password]=\"form.oldPassword().value()\"></password-strength>\r\n }\r\n @if (form.oldPassword().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.oldPassword().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n } @else if (dialogData().mode === 'otp') {\r\n <div style=\"font-size: small;\">Inserisci il codice di verifica di 6 cifre che ti abbiamo inviato ora per\r\n email<br><span style=\"font-size:x-small\">(controlla anche la posta indesiderata)</span>.</div>\r\n <otp-input [formField]=\"form.code\"></otp-input>\r\n }\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Nuova password</mat-label>\r\n <input [type]=\"!showPassword() ? 'password' : 'text'\" matInput [formField]=\"form.password\">\r\n @if(form.password().value()) {\r\n <password-strength [password]=\"form.password().value()\"></password-strength>\r\n }\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword.set(!showPassword())\">\r\n <mat-icon>{{showPassword() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n <mat-hint align=\"end\">{{form.password().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n <mat-form-field style=\"width: 100%;\" hintLabel=\"Minimo 10 car. con 1 simbolo e 1 maiuscola\"\r\n [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma nuova password</mat-label>\r\n <input [type]=\"!showPassword2() ? 'password' : 'text'\" matInput [formField]=\"form.password2\">\r\n <button type=\"button\" mat-icon-button class=\"toolbar-suffix\" matSuffix\r\n (click)=\"showPassword2.set(!showPassword2())\">\r\n <mat-icon>{{showPassword2() ? 'visibility' : 'visibility_off'}}</mat-icon>\r\n </button>\r\n @if(form.password2().value()) {\r\n <password-strength [password]=\"form.password2().value()\"></password-strength>\r\n }\r\n <mat-hint align=\"end\">{{form.password2().value()?.length || 0}}/30</mat-hint>\r\n @if (form.password2().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.password2().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().mode === 'admin') {\r\n <button mat-stroked-button (click)=\"generatePassword()\">Genera</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">Salva</button>\r\n @if (dialogData().mode !== 'forgot') {\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">Annulla</button>\r\n }\r\n </div>\r\n </div>\r\n</mat-dialog-actions>\r\n",
1092
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}input[type=password]::-ms-reveal{display:none}input[type=password]::-webkit-credentials-auto-fill-button{visibility:hidden;display:none!important}.dialog-content{padding:0 24px 24px!important}\n"]
1093
+ }]
1094
+ }],
1095
+ ctorParameters: () => [],
1096
+ propDecorators: { done: [{
1097
+ type: i0.Output,
1098
+ args: ["done"]
1099
+ }] }
1100
+ });
1101
+ const _EMPTY_ITEM$1 = {
1102
+ email: "",
1103
+ recaptcha: false
1104
+ };
1105
+ var RecoverPasswordDialogComponent = class RecoverPasswordDialogComponent {
1106
+ constructor() {
1107
+ this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
1108
+ this.done = output();
1109
+ this.dialogData = signal({
1110
+ appearance: "fill",
1111
+ ...inject(MAT_DIALOG_DATA) ?? {}
1112
+ }, ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
1113
+ this.model = signal(this.toForm(), ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
1114
+ this.form = form(this.model, (p) => {
1115
+ required(p.email);
1116
+ notEmpty(p.email);
1117
+ email(p.email);
1118
+ maxLength(p.email, 200);
1119
+ });
1120
+ }
1121
+ toForm() {
1122
+ return DtoUtils.toForm(_EMPTY_ITEM$1);
1123
+ }
1124
+ toPayload() {
1125
+ return DtoUtils.toPayload(this.model());
1126
+ }
1127
+ ok() {
1128
+ this.done.emit(this.toPayload());
1129
+ }
1130
+ static {
1131
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1132
+ minVersion: "12.0.0",
1133
+ version: "22.2.1",
1134
+ ngImport: i0,
1135
+ type: RecoverPasswordDialogComponent,
1136
+ deps: [],
1137
+ target: i0.ɵɵFactoryTarget.Component
1138
+ });
1139
+ }
1140
+ static {
1141
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1142
+ minVersion: "17.0.0",
1143
+ version: "22.2.1",
1144
+ type: RecoverPasswordDialogComponent,
1145
+ isStandalone: true,
1146
+ selector: "ng-component",
1147
+ outputs: { done: "done" },
1148
+ ngImport: i0,
1149
+ template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title>Per quale ragione non sei in grado di effettuare l'accesso?</div>\n<mat-dialog-content class=\"dialog-content\">\n\n <b>1. Ho dimenticato la password</b>\n <p>\n Puoi recuperarla facilmente inserendo l'email a cui la password è collegata. Non è possibile recuperare password\n aziendali (non collegate ad un email).</p>\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n\n <mat-form-field style=\"width:100%\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email con cui ti sei registrato</mat-label>\n <input type=\"email\" matInput [formField]=\"form.email\" />\n @if (form.email().invalid()) {\n <mat-error>{{ getErrorMessage(form.email().errors()) }}</mat-error>\n }\n </mat-form-field>\n\n <div style=\"margin-top:20px; margin-bottom:20px;\">\n <button type=\"button\" mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\n aria-label=\"Recupera password\">Recupera password</button>\n </div>\n </form>\n <p></p>\n <b>2. Il sistema mi dice che la password non è corretta.</b>\n <p>\n E' molto probabile che ci sia stato un difetto di digitazione. Per favore controlla bene che non vi siano spazi non\n richiesti e che la password rispetti perfettamente le maiuscole e minuscole. Nel caso in cui la digitazione fosse\n corretta, verifica che la data del tuo abbonamento non sia scaduta.\n </p>\n <p></p>\n <b>3. Il sistema mi dice che non può accettare connessioni dal mio indirizzo IP</b>\n <p>\n Il tuo abbonamento è stato vincolato ad un indirizzo IP (indirizzo dal quale ti colleghi). Capita sovente che\n questi indirizzi siano cambiati da parte del reparto IT per questioni di sicurezza informatica.\n Per risolvere il problema, contattate il reparto IT e fatevi dire qual'è il nuovo indirizzo IP e comunicatelo ad\n ARS Edizioni Informatiche.\n </p>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\n </div>\n</mat-dialog-actions>",
1150
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"],
1151
+ dependencies: [
1152
+ {
1153
+ kind: "directive",
1154
+ type: MatDialogTitle,
1155
+ selector: "[mat-dialog-title], [matDialogTitle]",
1156
+ inputs: ["id"],
1157
+ exportAs: ["matDialogTitle"]
1158
+ },
1159
+ {
1160
+ kind: "directive",
1161
+ type: MatDialogContent,
1162
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
1163
+ },
1164
+ {
1165
+ kind: "directive",
1166
+ type: FormField,
1167
+ selector: "[formField]",
1168
+ inputs: ["formField"],
1169
+ exportAs: ["formField"]
1170
+ },
1171
+ {
1172
+ kind: "directive",
1173
+ type: FormRoot,
1174
+ selector: "form[formRoot]",
1175
+ inputs: ["formRoot"]
1176
+ },
1177
+ {
1178
+ kind: "ngmodule",
1179
+ type: MatFormFieldModule
1180
+ },
1181
+ {
1182
+ kind: "component",
1183
+ type: i1.MatFormField,
1184
+ selector: "mat-form-field",
1185
+ inputs: [
1186
+ "hideRequiredMarker",
1187
+ "color",
1188
+ "floatLabel",
1189
+ "appearance",
1190
+ "subscriptSizing",
1191
+ "hintLabel"
1192
+ ],
1193
+ exportAs: ["matFormField"]
1194
+ },
1195
+ {
1196
+ kind: "directive",
1197
+ type: i1.MatLabel,
1198
+ selector: "mat-label"
1199
+ },
1200
+ {
1201
+ kind: "directive",
1202
+ type: i1.MatError,
1203
+ selector: "mat-error, [matError]",
1204
+ inputs: ["id"]
1205
+ },
1206
+ {
1207
+ kind: "ngmodule",
1208
+ type: MatInputModule
1209
+ },
1210
+ {
1211
+ kind: "directive",
1212
+ type: i2.MatInput,
1213
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
1214
+ inputs: [
1215
+ "disabled",
1216
+ "id",
1217
+ "placeholder",
1218
+ "name",
1219
+ "required",
1220
+ "type",
1221
+ "errorStateMatcher",
1222
+ "aria-describedby",
1223
+ "value",
1224
+ "readonly",
1225
+ "disabledInteractive"
1226
+ ],
1227
+ exportAs: ["matInput"]
1228
+ },
1229
+ {
1230
+ kind: "ngmodule",
1231
+ type: MatButtonModule
1232
+ },
1233
+ {
1234
+ kind: "component",
1235
+ type: i6.MatButton,
1236
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
1237
+ inputs: ["matButton"],
1238
+ exportAs: ["matButton", "matAnchor"]
1239
+ },
1240
+ {
1241
+ kind: "directive",
1242
+ type: MatDialogActions,
1243
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
1244
+ inputs: ["align"]
1245
+ },
1246
+ {
1247
+ kind: "ngmodule",
1248
+ type: FlexLayoutModule
1249
+ },
1250
+ {
1251
+ kind: "directive",
1252
+ type: i5.FxLayoutDirective,
1253
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
1254
+ inputs: [
1255
+ "fxLayout",
1256
+ "fxLayout.xs",
1257
+ "fxLayout.sm",
1258
+ "fxLayout.md",
1259
+ "fxLayout.lg",
1260
+ "fxLayout.xl",
1261
+ "fxLayout.lt-sm",
1262
+ "fxLayout.lt-md",
1263
+ "fxLayout.lt-lg",
1264
+ "fxLayout.lt-xl",
1265
+ "fxLayout.gt-xs",
1266
+ "fxLayout.gt-sm",
1267
+ "fxLayout.gt-md",
1268
+ "fxLayout.gt-lg"
1269
+ ]
1270
+ },
1271
+ {
1272
+ kind: "directive",
1273
+ type: i5.FxLayoutAlignDirective,
1274
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
1275
+ inputs: [
1276
+ "fxLayoutAlign",
1277
+ "fxLayoutAlign.xs",
1278
+ "fxLayoutAlign.sm",
1279
+ "fxLayoutAlign.md",
1280
+ "fxLayoutAlign.lg",
1281
+ "fxLayoutAlign.xl",
1282
+ "fxLayoutAlign.lt-sm",
1283
+ "fxLayoutAlign.lt-md",
1284
+ "fxLayoutAlign.lt-lg",
1285
+ "fxLayoutAlign.lt-xl",
1286
+ "fxLayoutAlign.gt-xs",
1287
+ "fxLayoutAlign.gt-sm",
1288
+ "fxLayoutAlign.gt-md",
1289
+ "fxLayoutAlign.gt-lg"
1290
+ ]
1291
+ },
1292
+ {
1293
+ kind: "directive",
1294
+ type: i5.FxFlexFillDirective,
1295
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
1296
+ inputs: [
1297
+ "fxFlexFill",
1298
+ "fxFill",
1299
+ "fxFlexFill.xs",
1300
+ "fxFlexFill.sm",
1301
+ "fxFlexFill.md",
1302
+ "fxFlexFill.lg",
1303
+ "fxFlexFill.xl",
1304
+ "fxFlexFill.lt-sm",
1305
+ "fxFlexFill.lt-md",
1306
+ "fxFlexFill.lt-lg",
1307
+ "fxFlexFill.lt-xl",
1308
+ "fxFlexFill.gt-xs",
1309
+ "fxFlexFill.gt-sm",
1310
+ "fxFlexFill.gt-md",
1311
+ "fxFlexFill.gt-lg"
1312
+ ]
1313
+ },
1314
+ {
1315
+ kind: "directive",
1316
+ type: MatDialogClose,
1317
+ selector: "[mat-dialog-close], [matDialogClose]",
1318
+ inputs: [
1319
+ "aria-label",
1320
+ "type",
1321
+ "mat-dialog-close",
1322
+ "matDialogClose"
1323
+ ],
1324
+ exportAs: ["matDialogClose"]
1325
+ }
1326
+ ],
1327
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1328
+ });
1329
+ }
1330
+ };
1331
+ i0.ɵɵngDeclareClassMetadata({
1332
+ minVersion: "12.0.0",
1333
+ version: "22.2.1",
1334
+ ngImport: i0,
1335
+ type: RecoverPasswordDialogComponent,
1336
+ decorators: [{
1337
+ type: Component,
1338
+ args: [{
1339
+ changeDetection: ChangeDetectionStrategy.OnPush,
1340
+ standalone: true,
1341
+ imports: [
1342
+ MatDialogTitle,
1343
+ MatDialogContent,
1344
+ FormField,
1345
+ FormRoot,
1346
+ MatFormFieldModule,
1347
+ MatInputModule,
1348
+ MatButtonModule,
1349
+ MatDialogActions,
1350
+ FlexLayoutModule,
1351
+ MatDialogClose
1352
+ ],
1353
+ template: "<div class=\"dialog-info\">\n @if (form().invalid()) {\n <span class=\"dialog-info-error\">Ci sono ancora dei campi obbligatori (*) non compilati.</span>\n } @else {\n <span class=\"dialog-info-ok\">Tutti i campi obbligatori (*) sono compilati.</span>\n }\n</div>\n<div mat-dialog-title>Per quale ragione non sei in grado di effettuare l'accesso?</div>\n<mat-dialog-content class=\"dialog-content\">\n\n <b>1. Ho dimenticato la password</b>\n <p>\n Puoi recuperarla facilmente inserendo l'email a cui la password è collegata. Non è possibile recuperare password\n aziendali (non collegate ad un email).</p>\n <form [formRoot]=\"form\" (keyup.enter)=\"!form().invalid() ? ok() : undefined\" novalidate>\n\n <mat-form-field style=\"width:100%\" [appearance]=\"dialogData().appearance\">\n <mat-label>Email con cui ti sei registrato</mat-label>\n <input type=\"email\" matInput [formField]=\"form.email\" />\n @if (form.email().invalid()) {\n <mat-error>{{ getErrorMessage(form.email().errors()) }}</mat-error>\n }\n </mat-form-field>\n\n <div style=\"margin-top:20px; margin-bottom:20px;\">\n <button type=\"button\" mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\n aria-label=\"Recupera password\">Recupera password</button>\n </div>\n </form>\n <p></p>\n <b>2. Il sistema mi dice che la password non è corretta.</b>\n <p>\n E' molto probabile che ci sia stato un difetto di digitazione. Per favore controlla bene che non vi siano spazi non\n richiesti e che la password rispetti perfettamente le maiuscole e minuscole. Nel caso in cui la digitazione fosse\n corretta, verifica che la data del tuo abbonamento non sia scaduta.\n </p>\n <p></p>\n <b>3. Il sistema mi dice che non può accettare connessioni dal mio indirizzo IP</b>\n <p>\n Il tuo abbonamento è stato vincolato ad un indirizzo IP (indirizzo dal quale ti colleghi). Capita sovente che\n questi indirizzi siano cambiati da parte del reparto IT per questioni di sicurezza informatica.\n Per risolvere il problema, contattate il reparto IT e fatevi dire qual'è il nuovo indirizzo IP e comunicatelo ad\n ARS Edizioni Informatiche.\n </p>\n</mat-dialog-content>\n<mat-dialog-actions>\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\n <button mat-stroked-button [mat-dialog-close]=\"true\" >Chiudi</button>\n </div>\n</mat-dialog-actions>",
1354
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"]
1355
+ }]
1356
+ }],
1357
+ propDecorators: { done: [{
1358
+ type: i0.Output,
1359
+ args: ["done"]
1360
+ }] }
1361
+ });
1362
+ const _EMPTY_ITEM = { value: "" };
1363
+ var PromptOtpDialogComponent = class PromptOtpDialogComponent {
1364
+ constructor() {
1365
+ this.done = output();
1366
+ this.dialogService = inject(ShellService);
1367
+ this.dialogData = signal((() => {
1368
+ const data = inject(MAT_DIALOG_DATA) ?? {};
1369
+ return {
1370
+ ...data,
1371
+ appearance: data.appearance ?? "fill",
1372
+ title: data.title ?? "Conferma la tua identità",
1373
+ type: data.type ?? PromptDialogType.Default,
1374
+ okCaption: data.okCaption ?? "Ok",
1375
+ cancelCaption: data.cancelCaption ?? "Annulla"
1376
+ };
1377
+ })(), ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
1378
+ this.model = signal(this.toForm(), ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
1379
+ this.form = form(this.model, (p) => {
1380
+ required(p.value);
1381
+ notEmpty(p.value);
1382
+ });
1383
+ }
1384
+ toForm() {
1385
+ return DtoUtils.toForm(_EMPTY_ITEM);
1386
+ }
1387
+ toPayload() {
1388
+ return DtoUtils.toPayload(this.model());
1389
+ }
1390
+ ok() {
1391
+ if (this.form().invalid()) {
1392
+ this.form().markAsTouched();
1393
+ this.dialogService.error("Ci sono degli errori da correggere.");
1394
+ return;
1395
+ }
1396
+ this.done.emit(this.toPayload());
1397
+ }
1398
+ static {
1399
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1400
+ minVersion: "12.0.0",
1401
+ version: "22.2.1",
1402
+ ngImport: i0,
1403
+ type: PromptOtpDialogComponent,
1404
+ deps: [],
1405
+ target: i0.ɵɵFactoryTarget.Component
1406
+ });
1407
+ }
1408
+ static {
1409
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1410
+ minVersion: "17.0.0",
1411
+ version: "22.2.1",
1412
+ type: PromptOtpDialogComponent,
1413
+ isStandalone: true,
1414
+ selector: "ng-component",
1415
+ outputs: { done: "done" },
1416
+ ngImport: i0,
1417
+ template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n @if (dialogData().description) {\r\n <div [innerHtml]=\"dialogData().description | safeHtml\" style=\"padding-bottom: 20px;\"></div>\r\n }\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"column\" fxFill>\r\n <otp-input [formField]=\"form.value\"></otp-input>\r\n </div>\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n",
1418
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"],
1419
+ dependencies: [
1420
+ {
1421
+ kind: "directive",
1422
+ type: MatDialogTitle,
1423
+ selector: "[mat-dialog-title], [matDialogTitle]",
1424
+ inputs: ["id"],
1425
+ exportAs: ["matDialogTitle"]
1426
+ },
1427
+ {
1428
+ kind: "directive",
1429
+ type: MatDialogContent,
1430
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
1431
+ },
1432
+ {
1433
+ kind: "directive",
1434
+ type: FormField,
1435
+ selector: "[formField]",
1436
+ inputs: ["formField"],
1437
+ exportAs: ["formField"]
1438
+ },
1439
+ {
1440
+ kind: "directive",
1441
+ type: FormRoot,
1442
+ selector: "form[formRoot]",
1443
+ inputs: ["formRoot"]
1444
+ },
1445
+ {
1446
+ kind: "ngmodule",
1447
+ type: FlexLayoutModule
1448
+ },
1449
+ {
1450
+ kind: "directive",
1451
+ type: i5.FxLayoutDirective,
1452
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
1453
+ inputs: [
1454
+ "fxLayout",
1455
+ "fxLayout.xs",
1456
+ "fxLayout.sm",
1457
+ "fxLayout.md",
1458
+ "fxLayout.lg",
1459
+ "fxLayout.xl",
1460
+ "fxLayout.lt-sm",
1461
+ "fxLayout.lt-md",
1462
+ "fxLayout.lt-lg",
1463
+ "fxLayout.lt-xl",
1464
+ "fxLayout.gt-xs",
1465
+ "fxLayout.gt-sm",
1466
+ "fxLayout.gt-md",
1467
+ "fxLayout.gt-lg"
1468
+ ]
1469
+ },
1470
+ {
1471
+ kind: "directive",
1472
+ type: i5.FxFlexDirective,
1473
+ selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
1474
+ inputs: [
1475
+ "fxFlex",
1476
+ "fxFlex.xs",
1477
+ "fxFlex.sm",
1478
+ "fxFlex.md",
1479
+ "fxFlex.lg",
1480
+ "fxFlex.xl",
1481
+ "fxFlex.lt-sm",
1482
+ "fxFlex.lt-md",
1483
+ "fxFlex.lt-lg",
1484
+ "fxFlex.lt-xl",
1485
+ "fxFlex.gt-xs",
1486
+ "fxFlex.gt-sm",
1487
+ "fxFlex.gt-md",
1488
+ "fxFlex.gt-lg"
1489
+ ]
1490
+ },
1491
+ {
1492
+ kind: "directive",
1493
+ type: i5.FxLayoutAlignDirective,
1494
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
1495
+ inputs: [
1496
+ "fxLayoutAlign",
1497
+ "fxLayoutAlign.xs",
1498
+ "fxLayoutAlign.sm",
1499
+ "fxLayoutAlign.md",
1500
+ "fxLayoutAlign.lg",
1501
+ "fxLayoutAlign.xl",
1502
+ "fxLayoutAlign.lt-sm",
1503
+ "fxLayoutAlign.lt-md",
1504
+ "fxLayoutAlign.lt-lg",
1505
+ "fxLayoutAlign.lt-xl",
1506
+ "fxLayoutAlign.gt-xs",
1507
+ "fxLayoutAlign.gt-sm",
1508
+ "fxLayoutAlign.gt-md",
1509
+ "fxLayoutAlign.gt-lg"
1510
+ ]
1511
+ },
1512
+ {
1513
+ kind: "directive",
1514
+ type: i5.FxLayoutGapDirective,
1515
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
1516
+ inputs: [
1517
+ "fxLayoutGap",
1518
+ "fxLayoutGap.xs",
1519
+ "fxLayoutGap.sm",
1520
+ "fxLayoutGap.md",
1521
+ "fxLayoutGap.lg",
1522
+ "fxLayoutGap.xl",
1523
+ "fxLayoutGap.lt-sm",
1524
+ "fxLayoutGap.lt-md",
1525
+ "fxLayoutGap.lt-lg",
1526
+ "fxLayoutGap.lt-xl",
1527
+ "fxLayoutGap.gt-xs",
1528
+ "fxLayoutGap.gt-sm",
1529
+ "fxLayoutGap.gt-md",
1530
+ "fxLayoutGap.gt-lg"
1531
+ ]
1532
+ },
1533
+ {
1534
+ kind: "directive",
1535
+ type: i5.FxFlexFillDirective,
1536
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
1537
+ inputs: [
1538
+ "fxFlexFill",
1539
+ "fxFill",
1540
+ "fxFlexFill.xs",
1541
+ "fxFlexFill.sm",
1542
+ "fxFlexFill.md",
1543
+ "fxFlexFill.lg",
1544
+ "fxFlexFill.xl",
1545
+ "fxFlexFill.lt-sm",
1546
+ "fxFlexFill.lt-md",
1547
+ "fxFlexFill.lt-lg",
1548
+ "fxFlexFill.lt-xl",
1549
+ "fxFlexFill.gt-xs",
1550
+ "fxFlexFill.gt-sm",
1551
+ "fxFlexFill.gt-md",
1552
+ "fxFlexFill.gt-lg"
1553
+ ]
1554
+ },
1555
+ {
1556
+ kind: "ngmodule",
1557
+ type: MatButtonModule
1558
+ },
1559
+ {
1560
+ kind: "component",
1561
+ type: i6.MatButton,
1562
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
1563
+ inputs: ["matButton"],
1564
+ exportAs: ["matButton", "matAnchor"]
1565
+ },
1566
+ {
1567
+ kind: "ngmodule",
1568
+ type: MatIconModule
1569
+ },
1570
+ {
1571
+ kind: "directive",
1572
+ type: MatDialogActions,
1573
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
1574
+ inputs: ["align"]
1575
+ },
1576
+ {
1577
+ kind: "directive",
1578
+ type: MatDialogClose,
1579
+ selector: "[mat-dialog-close], [matDialogClose]",
1580
+ inputs: [
1581
+ "aria-label",
1582
+ "type",
1583
+ "mat-dialog-close",
1584
+ "matDialogClose"
1585
+ ],
1586
+ exportAs: ["matDialogClose"]
1587
+ },
1588
+ {
1589
+ kind: "component",
1590
+ type: OtpInputComponent,
1591
+ selector: "otp-input"
1592
+ },
1593
+ {
1594
+ kind: "pipe",
1595
+ type: SafeHtmlPipe,
1596
+ name: "safeHtml"
1597
+ }
1598
+ ],
1599
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1600
+ });
1601
+ }
1602
+ };
1603
+ i0.ɵɵngDeclareClassMetadata({
1604
+ minVersion: "12.0.0",
1605
+ version: "22.2.1",
1606
+ ngImport: i0,
1607
+ type: PromptOtpDialogComponent,
1608
+ decorators: [{
1609
+ type: Component,
1610
+ args: [{
1611
+ standalone: true,
1612
+ changeDetection: ChangeDetectionStrategy.OnPush,
1613
+ imports: [
1614
+ MatDialogTitle,
1615
+ MatDialogContent,
1616
+ FormField,
1617
+ FormRoot,
1618
+ FlexLayoutModule,
1619
+ MatButtonModule,
1620
+ MatIconModule,
1621
+ MatDialogActions,
1622
+ MatDialogClose,
1623
+ SafeHtmlPipe,
1624
+ OtpInputComponent
1625
+ ],
1626
+ template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n @if (dialogData().description) {\r\n <div [innerHtml]=\"dialogData().description | safeHtml\" style=\"padding-bottom: 20px;\"></div>\r\n }\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"32px\" fxFill>\r\n <div fxFlex=\"*\" fxLayout=\"column\" fxFill>\r\n <otp-input [formField]=\"form.value\"></otp-input>\r\n </div>\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end\" fxFill>\r\n <button mat-flat-button [disabled]=\"form().invalid()\" (click)=\"ok()\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n",
1627
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}\n"]
1628
+ }]
1629
+ }],
1630
+ propDecorators: { done: [{
1631
+ type: i0.Output,
1632
+ args: ["done"]
1633
+ }] }
1634
+ });
653
1635
  export { CredentialsDialogComponent, OtpInputComponent, PasswordStrengthComponent, PromptOtpDialogComponent, RecoverPasswordDialogComponent, ResetPasswordDialogComponent };
654
- //# sourceMappingURL=arsedizioni-ars-utils-ui.dialogs.auth.mjs.map
1636
+
1637
+ //# sourceMappingURL=arsedizioni-ars-utils-ui.dialogs.auth.mjs.map