@sotoa-ui/dynamic-form 0.0.12 → 0.0.14

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.
@@ -1,13 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, DestroyRef, Component, forwardRef, ChangeDetectorRef, ViewContainerRef, EnvironmentInjector, input, EventEmitter, Output, Optional, Host, SkipSelf, Directive, computed, output, ViewChild, model, signal, effect } from '@angular/core';
3
- import { distinctUntilChanged, isObservable, take } from 'rxjs';
2
+ import { Component, inject, DestroyRef, Injectable, input, forwardRef, ChangeDetectorRef, ViewContainerRef, EnvironmentInjector, EventEmitter, Output, Optional, Host, SkipSelf, Directive, computed, output, ViewChild, model, signal, effect } from '@angular/core';
3
+ import { distinctUntilChanged, isObservable, take, BehaviorSubject, map } from 'rxjs';
4
4
  import * as i1 from '@angular/forms';
5
- import { FormBuilder, Validators, ReactiveFormsModule, NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
6
- import * as _ from 'lodash-es';
7
- import { isArray } from 'lodash-es';
5
+ import { Validators, FormBuilder, ReactiveFormsModule, NgControl, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
8
6
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
7
  import { debounceTime } from 'rxjs/operators';
10
- import { NgClass, NgTemplateOutlet } from '@angular/common';
8
+ import { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';
11
9
  import * as i2 from '@angular/material/checkbox';
12
10
  import { MatCheckboxModule } from '@angular/material/checkbox';
13
11
  import * as i2$1 from '@angular/material/form-field';
@@ -28,10 +26,13 @@ import * as i3$2 from '@angular/material/select';
28
26
  import { MatSelectModule } from '@angular/material/select';
29
27
  import * as i2$3 from '@angular/material/slide-toggle';
30
28
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
29
+ import * as _ from 'lodash-es';
30
+ import { isArray } from 'lodash-es';
31
31
  import * as i1$2 from '@angular/material/dialog';
32
32
  import { MAT_DIALOG_DATA, MatDialogModule, MatDialog, MatDialogRef } from '@angular/material/dialog';
33
33
  import { MatBadge } from '@angular/material/badge';
34
- import { MatMenuItem } from '@angular/material/menu';
34
+ import * as i1$3 from '@angular/material/menu';
35
+ import { MatMenuModule } from '@angular/material/menu';
35
36
  import * as i5 from '@angular/material/chips';
36
37
  import { MatChipsModule } from '@angular/material/chips';
37
38
  import * as i6 from '@angular/material/autocomplete';
@@ -42,73 +43,377 @@ import * as i3$3 from '@angular/material/datepicker';
42
43
  import { MatDatepickerIntl, MatDatepickerModule } from '@angular/material/datepicker';
43
44
  import { DateAdapter } from '@angular/material/core';
44
45
  import { provideLuxonDateAdapter } from '@angular/material-luxon-adapter';
46
+ import { MatSidenavModule } from '@angular/material/sidenav';
47
+ import { MatListModule } from '@angular/material/list';
48
+ import * as i4$1 from '@angular/material/stepper';
49
+ import { MatStepperModule, MatStepperPrevious, MatStepperNext } from '@angular/material/stepper';
50
+ import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';
51
+ import { BreakpointObserver } from '@angular/cdk/layout';
52
+
53
+ class AbstractFieldComponent {
54
+ field;
55
+ group;
56
+ path;
57
+ instancePath;
58
+ data;
59
+ get control() {
60
+ return this.group() && this.field()?.name ? this.group().get(this.field().name) : null;
61
+ }
62
+ get required() {
63
+ return this.group().get(this.field().name)?.hasValidator(Validators.required);
64
+ }
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AbstractFieldComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
67
+ }
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractFieldComponent, decorators: [{
69
+ type: Component,
70
+ args: [{ standalone: true, template: '' }]
71
+ }] });
72
+
73
+ class AbstractControlFieldComponent extends AbstractFieldComponent {
74
+ destroyRef = inject(DestroyRef);
75
+ uuid;
76
+ ngOnInit() {
77
+ this.uuid = 'sot-field-' + this.field().name + '-' + (Math.random() + 1).toString(36).substring(7);
78
+ if (this.field().onValueChanges) {
79
+ const control = this.group().get(this.field().name);
80
+ if (control) {
81
+ this.field().onValueChanges(control.value, this.group(), this.data, this.instancePath);
82
+ control.valueChanges.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
83
+ this.field().onValueChanges(value, this.group(), this.data, this.instancePath);
84
+ });
85
+ }
86
+ }
87
+ }
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractControlFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
89
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AbstractControlFieldComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
90
+ }
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractControlFieldComponent, decorators: [{
92
+ type: Component,
93
+ args: [{ standalone: true, template: '' }]
94
+ }] });
95
+
96
+ class AcCustomComponentField {
97
+ field;
98
+ group;
99
+ registerOnChange(fn) {
100
+ }
101
+ registerOnTouched(fn) {
102
+ }
103
+ writeValue(obj) {
104
+ }
105
+ }
106
+
107
+ /**
108
+ * Liste des valeurs possible pour l'attribut autocomplete
109
+ * (https://accessibilite.numerique.gouv.fr/methode/glossaire/#liste-des-valeurs-possibles-pour-l-attribut-autocomplete)
110
+ */
111
+ var AutocompleteAttribute;
112
+ (function (AutocompleteAttribute) {
113
+ AutocompleteAttribute["Off"] = "off";
114
+ /** Nom complet */
115
+ AutocompleteAttribute["Name"] = "name";
116
+ /** Abréviation, civilité ou titre */
117
+ AutocompleteAttribute["HonorificPrefix"] = "honorific-prefix";
118
+ /** Prénom */
119
+ AutocompleteAttribute["GivenName"] = "given-name";
120
+ /** Prénoms additionnels */
121
+ AutocompleteAttribute["AdditionalName"] = "additional-name";
122
+ /** Nom de famille */
123
+ AutocompleteAttribute["FamilyName"] = "family-name";
124
+ /** Suffixe honorifique */
125
+ AutocompleteAttribute["HonorificSuffix"] = "honorific-suffix";
126
+ /** Surnom, diminutif */
127
+ AutocompleteAttribute["Nickname"] = "nickname";
128
+ /** Fonction, intitulé de poste */
129
+ AutocompleteAttribute["OrganizationTitle"] = "organization-title";
130
+ /** Nom d’utilisateur */
131
+ AutocompleteAttribute["Username"] = "username";
132
+ /**
133
+ * Nouveau mot de passe (par exemple, lors de la création d’un compte
134
+ * ou d’un changement de mot de passe)
135
+ */
136
+ AutocompleteAttribute["NewPassword"] = "new-password";
137
+ /**
138
+ * Mot de passe actuel pour le compte identifié par le champ username
139
+ * (par exemple, lors d’une connexion)
140
+ */
141
+ AutocompleteAttribute["CurrentPassword"] = "current-password";
142
+ /**
143
+ * Nom de l’organisation correspondant à la personne, à l’adresse
144
+ * ou à l’information de contact dans les autres champs associés avec ce champ
145
+ */
146
+ AutocompleteAttribute["Organization"] = "organization";
147
+ /** Adresse postale (multiligne, nouvelles lignes conservées) */
148
+ AutocompleteAttribute["StreetAddress"] = "street-address";
149
+ /** Adresse postale (une ligne par champ, ligne 1) */
150
+ AutocompleteAttribute["AddressLine1"] = "address-line1";
151
+ /** Adresse postale (une ligne par champ, ligne 2) */
152
+ AutocompleteAttribute["AddressLine2"] = "address-line2";
153
+ /** Adresse postale (une ligne par champ, ligne 3) */
154
+ AutocompleteAttribute["AddressLine3"] = "address-line3";
155
+ /** Le niveau administratif le plus détaillé, pour les adresses pourvues de quatre niveaux administratifs */
156
+ AutocompleteAttribute["AddressLevel4"] = "address-level4";
157
+ /** Le troisième niveau administratif, pour les adresses pourvues d’au moins trois niveaux administratifs */
158
+ AutocompleteAttribute["AddressLevel3"] = "address-level3";
159
+ /** Le deuxième niveau administratif, pour les adresses pourvues d’au moins deux niveaux administratifs */
160
+ AutocompleteAttribute["AddressLevel2"] = "address-level2";
161
+ /** Le plus large niveau administratif d’une adresse, c’est-à-dire la province dans laquelle se trouve la localité */
162
+ AutocompleteAttribute["AddressLevel1"] = "address-level1";
163
+ /** Code pays */
164
+ AutocompleteAttribute["Country"] = "country";
165
+ /** Nom de pays */
166
+ AutocompleteAttribute["CountryName"] = "country-name";
167
+ /**
168
+ * Code postal, code CEDEX (si le CEDEX est présent, ajouter “CEDEX”,
169
+ * et ce qui le suit doit être ajouté dans le champ address-level2)
170
+ */
171
+ AutocompleteAttribute["PostalCode"] = "postal-code";
172
+ /** Nom complet figurant sur le moyen de paiement */
173
+ AutocompleteAttribute["CcName"] = "cc-name";
174
+ /** Prénom figurant sur le moyen de paiement */
175
+ AutocompleteAttribute["CcGivenName"] = "cc-given-name";
176
+ /** Prénoms additionnels figurant sur le moyen de paiement */
177
+ AutocompleteAttribute["CcAdditionalName"] = "cc-additional-name";
178
+ /** Nom de famille figurant sur le moyen de paiement */
179
+ AutocompleteAttribute["CcFamilyName"] = "cc-family-name";
180
+ /** Code identifiant le moyen de paiement (e.g., un numéro de carte bancaire) */
181
+ AutocompleteAttribute["CcNumber"] = "cc-number";
182
+ /** Date d’expiration du moyen de paiement */
183
+ AutocompleteAttribute["CcExp"] = "cc-exp";
184
+ /** Le mois de la date d’expiration du moyen de paiement */
185
+ AutocompleteAttribute["CcExpMonth"] = "cc-exp-month";
186
+ /** L’année de la date d’expiration du moyen de paiement */
187
+ AutocompleteAttribute["CcExpYear"] = "cc-exp-year";
188
+ /**
189
+ * Code de sécurité du moyen de paiement (also known as the card security code (CSC),
190
+ * card validation code (CVC), card verification value (CVV), signature panel code (SPC),
191
+ * credit card ID (CCID), etc.)
192
+ */
193
+ AutocompleteAttribute["CcCsc"] = "cc-csc";
194
+ /** Type de moyen de paiement (e.g. Visa) */
195
+ AutocompleteAttribute["CcType"] = "cc-type";
196
+ /** La devise qui a la préférence de l’utilisateur lors d’une transaction */
197
+ AutocompleteAttribute["TransactionCurrency"] = "transaction-currency";
198
+ /** Le montant qui a la préférence de l’utilisateur lors d’une transaction (e.g., en réponse à une enchère ou à un prix soldé) */
199
+ AutocompleteAttribute["TransactionAmount"] = "transaction-amount";
200
+ /** Langue préférée */
201
+ AutocompleteAttribute["Language"] = "language";
202
+ /** Date d’anniversaire */
203
+ AutocompleteAttribute["Bday"] = "bday";
204
+ /** Le jour de la date d’anniversaire */
205
+ AutocompleteAttribute["BdayDay"] = "bday-day";
206
+ /** Le mois de la date d’anniversaire */
207
+ AutocompleteAttribute["BdayMonth"] = "bday-month";
208
+ /** L’année de la date d’anniversaire */
209
+ AutocompleteAttribute["BdayYear"] = "bday-year";
210
+ /** Identité de genre */
211
+ AutocompleteAttribute["Sex"] = "sex";
212
+ /**
213
+ * Page d’accueil ou une autre page Web correspondant à l’organisation, la personne,
214
+ * l’adresse ou à l’information de contact dans les autres champs associés avec ce champ
215
+ */
216
+ AutocompleteAttribute["Url"] = "url";
217
+ /**
218
+ * Photographie, icône ou une autre image correspondant à l’organisation, la personne,
219
+ * l’adresse ou à l’information de contact dans les autres champs associés avec ce champ
220
+ */
221
+ AutocompleteAttribute["Photo"] = "photo";
222
+ /** Numéro de téléphone complet, y compris le code pays */
223
+ AutocompleteAttribute["Tel"] = "tel";
224
+ /** Code pays du numéro de téléphone */
225
+ AutocompleteAttribute["TelCountryCode"] = "tel-country-code";
226
+ /** Numéro de téléphone sans la partie code pays, avec un préfixe interne au pays, s’il y a lieu */
227
+ AutocompleteAttribute["TelNational"] = "tel-national";
228
+ /** Indicatif régional du numéro de téléphone, avec un préfixe interne au pays, s’il y a lieu */
229
+ AutocompleteAttribute["TelAreaCode"] = "tel-area-code";
230
+ /** Numéro de téléphone sans la partie code pays ni l’indicatif régional */
231
+ AutocompleteAttribute["TelLocal"] = "tel-local";
232
+ /**
233
+ * La première partie du composant du numéro de téléphone qui suit l’indicatif régional,
234
+ * lorsque ce composant est scindé en deux parties
235
+ */
236
+ AutocompleteAttribute["TelLocalPrefix"] = "tel-local-prefix";
237
+ /**
238
+ * La seconde partie du composant du numéro de téléphone qui suit l’indicatif régional,
239
+ * lorsque ce composant est scindé en deux parties
240
+ */
241
+ AutocompleteAttribute["TelLocalSuffix"] = "tel-local-suffix";
242
+ /** Numéro de téléphone d’un poste interne */
243
+ AutocompleteAttribute["TelExtension"] = "tel-extension";
244
+ /** Adresse électronique */
245
+ AutocompleteAttribute["Email"] = "email";
246
+ /**
247
+ * URL correspondant d’un protocole de messagerie instantanée
248
+ * (par exemple, "aim:goim?screenname=example" ou "xmpp:fred@example.net")
249
+ */
250
+ AutocompleteAttribute["Impp"] = "impp";
251
+ })(AutocompleteAttribute || (AutocompleteAttribute = {}));
252
+
253
+ var AcLogicOperatorEnum;
254
+ (function (AcLogicOperatorEnum) {
255
+ AcLogicOperatorEnum["OR"] = "OR";
256
+ AcLogicOperatorEnum["AND"] = "AND";
257
+ })(AcLogicOperatorEnum || (AcLogicOperatorEnum = {}));
258
+ var AcExpressionOperatorEnum;
259
+ (function (AcExpressionOperatorEnum) {
260
+ AcExpressionOperatorEnum["EQUALS"] = "EQUALS";
261
+ AcExpressionOperatorEnum["NOT_EQUALS"] = "NOT_EQUALS";
262
+ AcExpressionOperatorEnum["CHECKED"] = "CHECKED";
263
+ AcExpressionOperatorEnum["NOT_CHECKED"] = "NOT_CHECKED";
264
+ AcExpressionOperatorEnum["NOT_EMPTY"] = "NOT_EMPTY";
265
+ AcExpressionOperatorEnum["EMPTY"] = "EMPTY";
266
+ AcExpressionOperatorEnum["CONTAINS"] = "CONTAINS";
267
+ AcExpressionOperatorEnum["START_WITH"] = "START_WITH";
268
+ AcExpressionOperatorEnum["NOT_START_WITH"] = "NOT_START_WITH";
269
+ AcExpressionOperatorEnum["NOT_CONTAINS"] = "NOT_CONTAINS";
270
+ AcExpressionOperatorEnum["GREATER_THAN"] = "GREATER_THAN";
271
+ AcExpressionOperatorEnum["GREATER_EQUAL_THAN"] = "GREATER_EQUAL_THAN";
272
+ AcExpressionOperatorEnum["LESS_THAN"] = "LESS_THAN";
273
+ AcExpressionOperatorEnum["LESS_EQUAL_THAN"] = "LESS_EQUAL_THAN";
274
+ })(AcExpressionOperatorEnum || (AcExpressionOperatorEnum = {}));
45
275
 
46
276
  class ConditionsService {
47
277
  constructor() {
48
278
  }
49
279
  checkValidationConditions(validationConditions, dynamicFormDatas) {
50
280
  for (const cond of validationConditions) {
51
- const fieldPath = dynamicFormDatas.idPathMap.get(cond.fieldId);
52
- console.log(fieldPath);
53
- if (fieldPath) {
54
- for (let instance of fieldPath) {
55
- const field = dynamicFormDatas.pathFieldConfigMap.get(instance);
56
- console.log(field);
57
- /*
58
- if (field) {
59
- const isConditionOk = this.checkCondition(cond.validation.condition!, pathFieldMap, idPathMap, instance.arrayCode, instance.arrayInstance);
60
- this.setValidation(field, cond.validation, isConditionOk);
281
+ const fieldPaths = dynamicFormDatas.idPathMap.get(cond.fieldId);
282
+ if (fieldPaths) {
283
+ for (let path of fieldPaths) {
284
+ const formField = dynamicFormDatas.pathFieldMap.get(path.path);
285
+ if (formField) {
286
+ const isConditionKo = !this.checkCondition(cond.validation.condition, dynamicFormDatas, path.instance);
287
+ this.setValidation(formField, cond.validation, isConditionKo);
61
288
  }
62
-
63
- */
64
289
  }
65
290
  }
66
- /*
67
- else if (fieldPath) {
68
- const field = pathFieldMap.get(fieldPath);
69
- if (field && field.control) {
70
- const isConditionOk = this.checkCondition(cond.validation.condition!, pathFieldMap, idPathMap, null, null);
71
- this.setValidation(field, cond.validation, isConditionOk);
72
- }
73
- }
74
-
75
- */
76
291
  }
77
292
  }
78
- /*
79
- setValidation(field: FormField, validation: AcValidator, isConditionOk: boolean) {
80
- if (isConditionOk) {
81
- field.control!.addValidators(validation.validator!);
82
- } else {
83
- field.control!.removeValidators(validation.validator!);
84
- }
85
- field.control!.updateValueAndValidity({emitEvent: false});
86
- }
87
- */
293
+ setValidation(field, validation, isConditionOk) {
294
+ if (isConditionOk) {
295
+ field.control.addValidators(validation.validator);
296
+ }
297
+ else {
298
+ field.control.removeValidators(validation.validator);
299
+ }
300
+ field.control.updateValueAndValidity({ emitEvent: false });
301
+ }
88
302
  checkDisplayConditions(displayConditions, dynamicFormDatas) {
89
303
  for (const cond of displayConditions) {
90
- const fieldPath = dynamicFormDatas.idPathMap.get(cond.fieldId);
91
- console.log(fieldPath);
92
- /*
93
- if (isArray(fieldPath)) {
94
- for (let instance of fieldPath) {
95
- const field = pathFieldMap.get(instance.path);
96
- if (field) {
97
- const isConditionKo = !this.checkCondition(cond.condition, pathFieldMap, idPathMap, instance.arrayCode, instance.arrayInstance);
98
- this.setHidden(field, isConditionKo);
304
+ const fieldPaths = dynamicFormDatas.idPathMap.get(cond.fieldId);
305
+ if (fieldPaths) {
306
+ for (let path of fieldPaths) {
307
+ const formField = dynamicFormDatas.pathFieldMap.get(path.path);
308
+ if (formField) {
309
+ const isConditionKo = !this.checkCondition(cond.condition, dynamicFormDatas, path.instance);
310
+ this.setHidden(formField, isConditionKo);
311
+ }
99
312
  }
100
- }
101
- } else if (fieldPath) {
102
- const field = pathFieldMap.get(fieldPath);
103
- if (field) {
104
- const isConditionKo = !this.checkCondition(cond.condition, pathFieldMap, idPathMap, null, null);
105
- this.setHidden(field, isConditionKo);
106
- }
107
313
  }
108
-
109
- */
110
314
  }
111
315
  }
316
+ setHidden(field, isConditionKo) {
317
+ if (isConditionKo != field.config.hidden) {
318
+ field.config.hidden = isConditionKo;
319
+ if (isConditionKo) {
320
+ field.control?.reset();
321
+ }
322
+ }
323
+ }
324
+ checkCondition(item, dynamicFormDatas, instance) {
325
+ let isOk = false;
326
+ if (item.type === 'expression') {
327
+ isOk = this.checkExpression(item, dynamicFormDatas, instance);
328
+ }
329
+ else {
330
+ for (const i of item.items) {
331
+ isOk = this.checkCondition(i, dynamicFormDatas, instance);
332
+ if ((item.logicOperator === AcLogicOperatorEnum.OR && isOk)
333
+ || (item.logicOperator === AcLogicOperatorEnum.AND && !isOk)) {
334
+ break;
335
+ }
336
+ }
337
+ }
338
+ return isOk;
339
+ }
340
+ checkExpression(item, dynamicFormDatas, instance) {
341
+ let isOk = false;
342
+ const fieldPath = dynamicFormDatas.idPathMap.get(item.fieldId)?.filter(x => x.instance === instance)[0];
343
+ if (fieldPath) {
344
+ isOk = this.evalExpression(dynamicFormDatas.pathFieldMap.get(fieldPath.path), item.operator, item.value);
345
+ }
346
+ return isOk;
347
+ }
348
+ evalExpression(field, operator, refValue) {
349
+ let isOk = false;
350
+ const fieldValue = field.control?.value;
351
+ switch (operator) {
352
+ case AcExpressionOperatorEnum.EQUALS:
353
+ isOk = refValue === fieldValue;
354
+ break;
355
+ case AcExpressionOperatorEnum.NOT_EQUALS:
356
+ isOk = refValue !== fieldValue;
357
+ break;
358
+ case AcExpressionOperatorEnum.CHECKED:
359
+ isOk = fieldValue === true;
360
+ break;
361
+ case AcExpressionOperatorEnum.NOT_CHECKED:
362
+ isOk = fieldValue !== true;
363
+ break;
364
+ case AcExpressionOperatorEnum.NOT_EMPTY:
365
+ isOk = fieldValue?.length > 0;
366
+ break;
367
+ case AcExpressionOperatorEnum.EMPTY:
368
+ isOk = !fieldValue || fieldValue.length == 0;
369
+ break;
370
+ case AcExpressionOperatorEnum.START_WITH:
371
+ isOk = !!fieldValue && !!refValue && !fieldValue.startsWith(refValue);
372
+ break;
373
+ case AcExpressionOperatorEnum.NOT_START_WITH:
374
+ isOk = !!fieldValue && !!refValue && !fieldValue.startsWith(refValue);
375
+ break;
376
+ case AcExpressionOperatorEnum.CONTAINS:
377
+ isOk = !!fieldValue && !!refValue && fieldValue.includes(refValue);
378
+ break;
379
+ case AcExpressionOperatorEnum.NOT_CONTAINS:
380
+ isOk = !!fieldValue && !!refValue && !fieldValue.includes(refValue);
381
+ break;
382
+ case AcExpressionOperatorEnum.GREATER_THAN:
383
+ if (field.config.type === 'input' && field.config.inputType === 'number') {
384
+ isOk = !!fieldValue && !!refValue && Number(fieldValue) > Number(refValue);
385
+ }
386
+ else {
387
+ isOk = !!fieldValue && !!refValue && fieldValue > refValue;
388
+ }
389
+ break;
390
+ case AcExpressionOperatorEnum.GREATER_EQUAL_THAN:
391
+ if (field.config.type === 'input' && field.config.inputType === 'number') {
392
+ isOk = !!fieldValue && !!refValue && Number(fieldValue) >= Number(refValue);
393
+ }
394
+ else {
395
+ isOk = !!fieldValue && !!refValue && fieldValue >= refValue;
396
+ }
397
+ break;
398
+ case AcExpressionOperatorEnum.LESS_THAN:
399
+ if (field.config.type === 'input' && field.config.inputType === 'number') {
400
+ isOk = !!fieldValue && !!refValue && Number(fieldValue) < Number(refValue);
401
+ }
402
+ else {
403
+ isOk = !!fieldValue && !!refValue && fieldValue < refValue;
404
+ }
405
+ break;
406
+ case AcExpressionOperatorEnum.LESS_EQUAL_THAN:
407
+ if (field.config.type === 'input' && field.config.inputType === 'number') {
408
+ isOk = !!fieldValue && !!refValue && Number(fieldValue) <= Number(refValue);
409
+ }
410
+ else {
411
+ isOk = !!fieldValue && !!refValue && fieldValue <= refValue;
412
+ }
413
+ break;
414
+ }
415
+ return isOk;
416
+ }
112
417
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConditionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
113
418
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConditionsService, providedIn: 'root' });
114
419
  }
@@ -133,10 +438,9 @@ class DynamicFormService {
133
438
  fields,
134
439
  updateOn,
135
440
  idPathMap: new Map(),
136
- pathFieldConfigMap: new Map(),
137
- pathControlMap: new Map(),
441
+ pathFieldMap: new Map(),
138
442
  };
139
- this.form = this.createGroup(fields, null, initialValues);
443
+ this.form = this.createGroup(fields, null, null, initialValues);
140
444
  if (validations) {
141
445
  for (const valid of validations) {
142
446
  if (valid.validator) {
@@ -151,13 +455,12 @@ class DynamicFormService {
151
455
  fields: steps,
152
456
  updateOn,
153
457
  idPathMap: new Map(),
154
- pathFieldConfigMap: new Map(),
155
- pathControlMap: new Map(),
458
+ pathFieldMap: new Map(),
156
459
  };
157
460
  const config = updateOn ? { updateOn } : { updateOn: "change" };
158
461
  this.form = this.fb.group({}, config);
159
462
  steps.forEach((step) => {
160
- this.form.addControl(step.name, this.createGroup(step.fields, null, initialValues));
463
+ this.form.addControl(step.name, this.createGroup(step.fields, null, null, initialValues));
161
464
  });
162
465
  if (validations) {
163
466
  for (const valid of validations) {
@@ -182,15 +485,15 @@ class DynamicFormService {
182
485
  });
183
486
  }
184
487
  }
185
- createGroup(fields, parentPath, initialValues) {
488
+ createGroup(fields, parentPath, instance, initialValues) {
186
489
  const config = { updateOn: this.data?.updateOn ?? "change" };
187
490
  const group = this.fb.group({}, config);
188
491
  fields.forEach((config) => {
189
- this.treatField(config, group, parentPath, initialValues);
492
+ this.treatField(config, group, parentPath, instance, initialValues);
190
493
  });
191
494
  return group;
192
495
  }
193
- treatField(config, group, parentPath, initialValues) {
496
+ treatField(config, group, parentPath, instance, initialValues) {
194
497
  const path = (parentPath ? parentPath + this.separator : "") + config.name;
195
498
  if (!config.id) {
196
499
  config.id = config.name;
@@ -201,7 +504,7 @@ class DynamicFormService {
201
504
  condition: config.displayCondition
202
505
  });
203
506
  }
204
- if (config.type !== "text" && config.type !== "row" && config.type !== "tabs" && config.validations) {
507
+ if (config.type !== "text" && config.type !== "row" && config.validations) {
205
508
  config.validations.forEach(val => {
206
509
  if (val.condition) {
207
510
  this.validationConditions.push({
@@ -212,34 +515,29 @@ class DynamicFormService {
212
515
  });
213
516
  }
214
517
  if (config.type === "text") {
215
- this.setFormFieldMapItem(path, config, null);
518
+ this.setFormFieldMapItem(instance, path, config, null);
216
519
  }
217
520
  else if (config.type === "group") {
218
- group.addControl(config.name, this.createGroupField(config, parentPath, initialValues));
521
+ group.addControl(config.name, this.createGroupField(config, parentPath, instance, initialValues));
219
522
  }
220
523
  else if (config.type === "array") {
221
- group.addControl(config.name, this.createArray(config, parentPath, initialValues));
524
+ group.addControl(config.name, this.createArray(config, parentPath, instance, initialValues));
222
525
  }
223
526
  else if (config.type === "row") {
224
- this.setFormFieldMapItem(path, config, null);
527
+ this.setFormFieldMapItem(instance, path, config, null);
225
528
  config.fields.forEach((child) => {
226
- this.treatField(child, group, parentPath, initialValues);
529
+ this.treatField(child, group, parentPath, instance, initialValues);
227
530
  });
228
531
  }
229
- else if (config.type === "tabs") {
230
- const control = this.createGroup(config.tabs.map((x) => x.field), parentPath, initialValues ? initialValues[config.name] : null);
231
- group.addControl(config.name, control);
232
- this.setFormFieldMapItem(path, config, control);
233
- }
234
532
  else {
235
533
  const control = this.createControl(config, initialValues);
236
- this.setFormFieldMapItem(path, config, control);
534
+ this.setFormFieldMapItem(instance, path, config, control);
237
535
  group.addControl(config.name, control);
238
536
  }
239
537
  }
240
- createGroupField(groupConfig, parentPath, initialValues) {
538
+ createGroupField(groupConfig, parentPath, instance, initialValues) {
241
539
  const path = (parentPath ? parentPath + this.separator : "") + groupConfig.name;
242
- const g = this.createGroup(groupConfig.fields, path, initialValues ? initialValues[groupConfig.name] : null);
540
+ const g = this.createGroup(groupConfig.fields, path, instance, initialValues ? initialValues[groupConfig.name] : null);
243
541
  if (groupConfig.validations) {
244
542
  const val = groupConfig.validations.filter((x) => x.validator).map((x) => x.validator);
245
543
  if (val) {
@@ -252,15 +550,13 @@ class DynamicFormService {
252
550
  g.addAsyncValidators(asyncVal);
253
551
  }
254
552
  }
255
- this.setFormFieldMapItem(path, groupConfig, g);
553
+ this.setFormFieldMapItem(instance, path, groupConfig, g);
256
554
  return g;
257
555
  }
258
556
  createArrayInstance(arrayConfig, arrayPath, instanceNumber, initialValues) {
259
- const fields = _.cloneDeep(arrayConfig.field.fields);
260
- const grp = this.createGroup(fields, `${arrayPath}[${instanceNumber}]`, initialValues);
261
- if (!arrayConfig.instances) {
262
- arrayConfig.instances = [];
263
- }
557
+ const fields = structuredClone(arrayConfig.field.fields);
558
+ const grp = this.createGroup(fields, `${arrayPath}[${instanceNumber}]`, `${arrayPath}[${instanceNumber}]`, initialValues);
559
+ arrayConfig.instances ??= [];
264
560
  arrayConfig.instances.push({
265
561
  number: instanceNumber,
266
562
  group: grp,
@@ -268,12 +564,12 @@ class DynamicFormService {
268
564
  });
269
565
  return grp;
270
566
  }
271
- createArray(arrayConfig, parentPath, initialValues) {
567
+ createArray(arrayConfig, parentPath, instance, initialValues) {
272
568
  const path = (parentPath ? parentPath + this.separator : "") + arrayConfig.name;
273
569
  arrayConfig.instances = [];
274
570
  const list = [];
275
571
  let value = arrayConfig.value;
276
- if (initialValues && Object.keys(initialValues).indexOf(arrayConfig.name) !== -1) {
572
+ if (initialValues && Object.keys(initialValues).includes(arrayConfig.name)) {
277
573
  value = initialValues[arrayConfig.name];
278
574
  }
279
575
  let i = 0;
@@ -302,22 +598,19 @@ class DynamicFormService {
302
598
  formArray.addAsyncValidators(asyncVal);
303
599
  }
304
600
  }
305
- this.setFormFieldMapItem(path, arrayConfig, formArray);
601
+ this.setFormFieldMapItem(instance, path, arrayConfig, formArray);
306
602
  return formArray;
307
603
  }
308
- setFormFieldMapItem(path, config, control) {
309
- if (control) {
310
- this.data.pathControlMap.set(path, control);
311
- }
312
- this.data.pathFieldConfigMap.set(path, config);
604
+ setFormFieldMapItem(instance, path, config, control) {
313
605
  if (!this.data.idPathMap.get(config.id)) {
314
606
  this.data.idPathMap.set(config.id, []);
315
607
  }
316
- this.data.idPathMap.get(config.id)?.push(path);
608
+ this.data.idPathMap.get(config.id)?.push({ instance, path });
609
+ this.data.pathFieldMap.set(path, { config, control });
317
610
  }
318
611
  createControl(config, initialValues) {
319
612
  let { disabled, validations, value } = config;
320
- if (initialValues && Object.keys(initialValues).indexOf(config.name) !== -1) {
613
+ if (initialValues && Object.keys(initialValues).includes(config.name)) {
321
614
  value = initialValues[config.name];
322
615
  }
323
616
  if (value === undefined) {
@@ -348,235 +641,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
348
641
  }]
349
642
  }] });
350
643
 
351
- class AbstractFieldComponent {
352
- path;
353
- field;
354
- group;
355
- instancePath;
356
- dynamicFormService = inject(DynamicFormService);
357
- get control() {
358
- return this.group && this.field && this.field.name ? this.group.get(this.field.name) : null;
359
- }
360
- get required() {
361
- return this.group.get(this.field.name)?.hasValidator(Validators.required);
362
- }
363
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
364
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AbstractFieldComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true });
365
- }
366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractFieldComponent, decorators: [{
367
- type: Component,
368
- args: [{ standalone: true, template: '' }]
369
- }] });
370
-
371
- class AbstractControlFieldComponent extends AbstractFieldComponent {
372
- destroyRef = inject(DestroyRef);
373
- uuid;
374
- ngOnInit() {
375
- this.uuid = 'sot-field-' + this.field.name + '-' + (Math.random() + 1).toString(36).substring(7);
376
- if (this.field.onValueChanges) {
377
- const control = this.group.get(this.field.name);
378
- if (control) {
379
- this.field.onValueChanges(control.value, this.dynamicFormService.data, this.group, this.instancePath);
380
- control.valueChanges.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
381
- this.field.onValueChanges(value, this.dynamicFormService.data, this.group, this.instancePath);
382
- });
383
- }
384
- }
385
- }
386
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractControlFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
387
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AbstractControlFieldComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true });
388
- }
389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AbstractControlFieldComponent, decorators: [{
390
- type: Component,
391
- args: [{ standalone: true, template: '' }]
392
- }] });
393
-
394
- class AcCustomComponentField {
395
- field;
396
- group;
397
- registerOnChange(fn) {
398
- }
399
- registerOnTouched(fn) {
400
- }
401
- writeValue(obj) {
402
- }
403
- }
404
-
405
- /**
406
- * Liste des valeurs possible pour l'attribut autocomplete
407
- * (https://accessibilite.numerique.gouv.fr/methode/glossaire/#liste-des-valeurs-possibles-pour-l-attribut-autocomplete)
408
- */
409
- var AutocompleteAttribute;
410
- (function (AutocompleteAttribute) {
411
- AutocompleteAttribute["Off"] = "off";
412
- /** Nom complet */
413
- AutocompleteAttribute["Name"] = "name";
414
- /** Abréviation, civilité ou titre */
415
- AutocompleteAttribute["HonorificPrefix"] = "honorific-prefix";
416
- /** Prénom */
417
- AutocompleteAttribute["GivenName"] = "given-name";
418
- /** Prénoms additionnels */
419
- AutocompleteAttribute["AdditionalName"] = "additional-name";
420
- /** Nom de famille */
421
- AutocompleteAttribute["FamilyName"] = "family-name";
422
- /** Suffixe honorifique */
423
- AutocompleteAttribute["HonorificSuffix"] = "honorific-suffix";
424
- /** Surnom, diminutif */
425
- AutocompleteAttribute["Nickname"] = "nickname";
426
- /** Fonction, intitulé de poste */
427
- AutocompleteAttribute["OrganizationTitle"] = "organization-title";
428
- /** Nom d’utilisateur */
429
- AutocompleteAttribute["Username"] = "username";
430
- /**
431
- * Nouveau mot de passe (par exemple, lors de la création d’un compte
432
- * ou d’un changement de mot de passe)
433
- */
434
- AutocompleteAttribute["NewPassword"] = "new-password";
435
- /**
436
- * Mot de passe actuel pour le compte identifié par le champ username
437
- * (par exemple, lors d’une connexion)
438
- */
439
- AutocompleteAttribute["CurrentPassword"] = "current-password";
440
- /**
441
- * Nom de l’organisation correspondant à la personne, à l’adresse
442
- * ou à l’information de contact dans les autres champs associés avec ce champ
443
- */
444
- AutocompleteAttribute["Organization"] = "organization";
445
- /** Adresse postale (multiligne, nouvelles lignes conservées) */
446
- AutocompleteAttribute["StreetAddress"] = "street-address";
447
- /** Adresse postale (une ligne par champ, ligne 1) */
448
- AutocompleteAttribute["AddressLine1"] = "address-line1";
449
- /** Adresse postale (une ligne par champ, ligne 2) */
450
- AutocompleteAttribute["AddressLine2"] = "address-line2";
451
- /** Adresse postale (une ligne par champ, ligne 3) */
452
- AutocompleteAttribute["AddressLine3"] = "address-line3";
453
- /** Le niveau administratif le plus détaillé, pour les adresses pourvues de quatre niveaux administratifs */
454
- AutocompleteAttribute["AddressLevel4"] = "address-level4";
455
- /** Le troisième niveau administratif, pour les adresses pourvues d’au moins trois niveaux administratifs */
456
- AutocompleteAttribute["AddressLevel3"] = "address-level3";
457
- /** Le deuxième niveau administratif, pour les adresses pourvues d’au moins deux niveaux administratifs */
458
- AutocompleteAttribute["AddressLevel2"] = "address-level2";
459
- /** Le plus large niveau administratif d’une adresse, c’est-à-dire la province dans laquelle se trouve la localité */
460
- AutocompleteAttribute["AddressLevel1"] = "address-level1";
461
- /** Code pays */
462
- AutocompleteAttribute["Country"] = "country";
463
- /** Nom de pays */
464
- AutocompleteAttribute["CountryName"] = "country-name";
465
- /**
466
- * Code postal, code CEDEX (si le CEDEX est présent, ajouter “CEDEX”,
467
- * et ce qui le suit doit être ajouté dans le champ address-level2)
468
- */
469
- AutocompleteAttribute["PostalCode"] = "postal-code";
470
- /** Nom complet figurant sur le moyen de paiement */
471
- AutocompleteAttribute["CcName"] = "cc-name";
472
- /** Prénom figurant sur le moyen de paiement */
473
- AutocompleteAttribute["CcGivenName"] = "cc-given-name";
474
- /** Prénoms additionnels figurant sur le moyen de paiement */
475
- AutocompleteAttribute["CcAdditionalName"] = "cc-additional-name";
476
- /** Nom de famille figurant sur le moyen de paiement */
477
- AutocompleteAttribute["CcFamilyName"] = "cc-family-name";
478
- /** Code identifiant le moyen de paiement (e.g., un numéro de carte bancaire) */
479
- AutocompleteAttribute["CcNumber"] = "cc-number";
480
- /** Date d’expiration du moyen de paiement */
481
- AutocompleteAttribute["CcExp"] = "cc-exp";
482
- /** Le mois de la date d’expiration du moyen de paiement */
483
- AutocompleteAttribute["CcExpMonth"] = "cc-exp-month";
484
- /** L’année de la date d’expiration du moyen de paiement */
485
- AutocompleteAttribute["CcExpYear"] = "cc-exp-year";
486
- /**
487
- * Code de sécurité du moyen de paiement (also known as the card security code (CSC),
488
- * card validation code (CVC), card verification value (CVV), signature panel code (SPC),
489
- * credit card ID (CCID), etc.)
490
- */
491
- AutocompleteAttribute["CcCsc"] = "cc-csc";
492
- /** Type de moyen de paiement (e.g. Visa) */
493
- AutocompleteAttribute["CcType"] = "cc-type";
494
- /** La devise qui a la préférence de l’utilisateur lors d’une transaction */
495
- AutocompleteAttribute["TransactionCurrency"] = "transaction-currency";
496
- /** Le montant qui a la préférence de l’utilisateur lors d’une transaction (e.g., en réponse à une enchère ou à un prix soldé) */
497
- AutocompleteAttribute["TransactionAmount"] = "transaction-amount";
498
- /** Langue préférée */
499
- AutocompleteAttribute["Language"] = "language";
500
- /** Date d’anniversaire */
501
- AutocompleteAttribute["Bday"] = "bday";
502
- /** Le jour de la date d’anniversaire */
503
- AutocompleteAttribute["BdayDay"] = "bday-day";
504
- /** Le mois de la date d’anniversaire */
505
- AutocompleteAttribute["BdayMonth"] = "bday-month";
506
- /** L’année de la date d’anniversaire */
507
- AutocompleteAttribute["BdayYear"] = "bday-year";
508
- /** Identité de genre */
509
- AutocompleteAttribute["Sex"] = "sex";
510
- /**
511
- * Page d’accueil ou une autre page Web correspondant à l’organisation, la personne,
512
- * l’adresse ou à l’information de contact dans les autres champs associés avec ce champ
513
- */
514
- AutocompleteAttribute["Url"] = "url";
515
- /**
516
- * Photographie, icône ou une autre image correspondant à l’organisation, la personne,
517
- * l’adresse ou à l’information de contact dans les autres champs associés avec ce champ
518
- */
519
- AutocompleteAttribute["Photo"] = "photo";
520
- /** Numéro de téléphone complet, y compris le code pays */
521
- AutocompleteAttribute["Tel"] = "tel";
522
- /** Code pays du numéro de téléphone */
523
- AutocompleteAttribute["TelCountryCode"] = "tel-country-code";
524
- /** Numéro de téléphone sans la partie code pays, avec un préfixe interne au pays, s’il y a lieu */
525
- AutocompleteAttribute["TelNational"] = "tel-national";
526
- /** Indicatif régional du numéro de téléphone, avec un préfixe interne au pays, s’il y a lieu */
527
- AutocompleteAttribute["TelAreaCode"] = "tel-area-code";
528
- /** Numéro de téléphone sans la partie code pays ni l’indicatif régional */
529
- AutocompleteAttribute["TelLocal"] = "tel-local";
530
- /**
531
- * La première partie du composant du numéro de téléphone qui suit l’indicatif régional,
532
- * lorsque ce composant est scindé en deux parties
533
- */
534
- AutocompleteAttribute["TelLocalPrefix"] = "tel-local-prefix";
535
- /**
536
- * La seconde partie du composant du numéro de téléphone qui suit l’indicatif régional,
537
- * lorsque ce composant est scindé en deux parties
538
- */
539
- AutocompleteAttribute["TelLocalSuffix"] = "tel-local-suffix";
540
- /** Numéro de téléphone d’un poste interne */
541
- AutocompleteAttribute["TelExtension"] = "tel-extension";
542
- /** Adresse électronique */
543
- AutocompleteAttribute["Email"] = "email";
544
- /**
545
- * URL correspondant d’un protocole de messagerie instantanée
546
- * (par exemple, "aim:goim?screenname=example" ou "xmpp:fred@example.net")
547
- */
548
- AutocompleteAttribute["Impp"] = "impp";
549
- })(AutocompleteAttribute || (AutocompleteAttribute = {}));
550
-
551
644
  class MatDivTextComponent extends AbstractFieldComponent {
552
645
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatDivTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
553
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatDivTextComponent, isStandalone: true, selector: "sot-mat-div-text", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field.className\">\n <div [innerHTML]=\"field.label\"></div>\n @if(field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
646
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatDivTextComponent, isStandalone: true, selector: "sot-mat-div-text", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field().className\">\n <div [innerHTML]=\"field().label\"></div>\n @if(field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
554
647
  }
555
648
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatDivTextComponent, decorators: [{
556
649
  type: Component,
557
- args: [{ selector: 'sot-mat-div-text', standalone: true, imports: [NgClass], template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field.className\">\n <div [innerHTML]=\"field.label\"></div>\n @if(field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n</div>\n" }]
650
+ args: [{ selector: 'sot-mat-div-text', standalone: true, imports: [NgClass], template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field().className\">\n <div [innerHTML]=\"field().label\"></div>\n @if(field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n</div>\n" }]
558
651
  }] });
559
652
 
560
653
  class AcFieldCheckboxComponent extends AbstractControlFieldComponent {
561
654
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
562
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcFieldCheckboxComponent, isStandalone: true, selector: "sot-mat-field-checkbox", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field.className\">\r\n <div [formGroup]=\"group\">\r\n <mat-checkbox [formControlName]=\"field.name\"\r\n [id]=\"uuid\"\r\n [aria-describedby]=\"'error-' + uuid\"\r\n >\r\n <div [ngClass]=\"field.labelClassName\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </div>\r\n </mat-checkbox>\r\n\r\n <div [attr.id]=\"'error-' + uuid\" class=\"error-wrapper\" matError>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.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: MatError, selector: "mat-error, [matError]", inputs: ["id"] }] });
655
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcFieldCheckboxComponent, isStandalone: true, selector: "sot-mat-field-checkbox", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field().className\">\r\n <div [formGroup]=\"group()\">\r\n <mat-checkbox [formControlName]=\"field().name\"\r\n [id]=\"uuid\"\r\n [aria-describedby]=\"'error-' + uuid\"\r\n >\r\n <div [ngClass]=\"field().labelClassName\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </div>\r\n </mat-checkbox>\r\n\r\n <div [attr.id]=\"'error-' + uuid\" class=\"error-wrapper\" matError>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.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: MatError, selector: "mat-error, [matError]", inputs: ["id"] }] });
563
656
  }
564
657
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCheckboxComponent, decorators: [{
565
658
  type: Component,
566
- args: [{ selector: 'sot-mat-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatError], template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field.className\">\r\n <div [formGroup]=\"group\">\r\n <mat-checkbox [formControlName]=\"field.name\"\r\n [id]=\"uuid\"\r\n [aria-describedby]=\"'error-' + uuid\"\r\n >\r\n <div [ngClass]=\"field.labelClassName\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </div>\r\n </mat-checkbox>\r\n\r\n <div [attr.id]=\"'error-' + uuid\" class=\"error-wrapper\" matError>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"] }]
659
+ args: [{ selector: 'sot-mat-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatError], template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field().className\">\r\n <div [formGroup]=\"group()\">\r\n <mat-checkbox [formControlName]=\"field().name\"\r\n [id]=\"uuid\"\r\n [aria-describedby]=\"'error-' + uuid\"\r\n >\r\n <div [ngClass]=\"field().labelClassName\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </div>\r\n </mat-checkbox>\r\n\r\n <div [attr.id]=\"'error-' + uuid\" class=\"error-wrapper\" matError>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"] }]
567
660
  }] });
568
661
 
569
662
  class MatFieldInputComponent extends AbstractControlFieldComponent {
663
+ field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
664
+ group = input.required(...(ngDevMode ? [{ debugName: "group" }] : []));
570
665
  inputType = 'text';
571
666
  buttonAction(b) {
572
- if (b.action && this.field && this.group) {
573
- b.action(this.field, this.group, this.dynamicFormService.data);
667
+ if (b.action) {
668
+ b.action(this.field(), this.group(), this.data);
574
669
  }
575
670
  }
576
671
  ngOnInit() {
577
672
  super.ngOnInit();
578
- this.inputType = this.field.inputType ?? 'text';
579
- const control = this.group.get(this.field.name);
673
+ this.inputType = this.field().inputType ?? 'text';
674
+ const control = this.group().get(this.field().name);
580
675
  if (control) {
581
676
  control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
582
677
  if (value?.length == 0) {
@@ -586,19 +681,19 @@ class MatFieldInputComponent extends AbstractControlFieldComponent {
586
681
  }
587
682
  }
588
683
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
589
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldInputComponent, isStandalone: true, selector: "sot-mat-field-input", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field.readonly\"\r\n [maxlength]=\"field.maxlength ?? 100000000\"\r\n >\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.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"] }] });
684
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldInputComponent, isStandalone: true, selector: "sot-mat-field-input", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field().readonly\"\r\n [maxlength]=\"field().maxlength ?? 100000000\"\r\n >\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.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"] }] });
590
685
  }
591
686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldInputComponent, decorators: [{
592
687
  type: Component,
593
- args: [{ selector: 'sot-mat-field-input', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field.readonly\"\r\n [maxlength]=\"field.maxlength ?? 100000000\"\r\n >\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
594
- }] });
688
+ args: [{ selector: 'sot-mat-field-input', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field().readonly\"\r\n [maxlength]=\"field().maxlength ?? 100000000\"\r\n >\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
689
+ }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }] } });
595
690
 
596
691
  class MatGroupComponent extends AbstractControlFieldComponent {
597
692
  get subGroup() {
598
- return this.group.controls[this.field.name];
693
+ return this.group().controls[this.field().name];
599
694
  }
600
695
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
601
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatGroupComponent, isStandalone: true, selector: "sot-mat-group", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field.className\">\n <fieldset class=\"sot-formfield\">\n @if (field.accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field.opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-group-label\">{{ field.label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field.labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field.fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => AcDynamicFieldDirective), selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => MatAccordion), selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i0.forwardRef(() => MatExpansionPanel), selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i0.forwardRef(() => MatExpansionPanelHeader), selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i0.forwardRef(() => MatExpansionPanelTitle), selector: "mat-panel-title" }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
696
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatGroupComponent, isStandalone: true, selector: "sot-mat-group", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field().className\">\n <fieldset class=\"sot-formfield\">\n @if (field().accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field().opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-group-label\">{{ field().label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field().labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field().fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n [data]=\"data\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => AcDynamicFieldDirective), selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath", "data"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => MatAccordion), selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i0.forwardRef(() => MatExpansionPanel), selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i0.forwardRef(() => MatExpansionPanelHeader), selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i0.forwardRef(() => MatExpansionPanelTitle), selector: "mat-panel-title" }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
602
697
  }
603
698
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatGroupComponent, decorators: [{
604
699
  type: Component,
@@ -610,26 +705,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
610
705
  MatExpansionPanelHeader,
611
706
  MatExpansionPanelTitle,
612
707
  NgTemplateOutlet
613
- ], template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field.className\">\n <fieldset class=\"sot-formfield\">\n @if (field.accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field.opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-group-label\">{{ field.label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field.labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field.fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"] }]
708
+ ], template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field().className\">\n <fieldset class=\"sot-formfield\">\n @if (field().accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field().opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-group-label\">{{ field().label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field().labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field().fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n [data]=\"data\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"] }]
614
709
  }] });
615
710
 
616
711
  class MatArrayComponent extends AbstractControlFieldComponent {
617
712
  dynamicService = inject(DynamicFormService);
618
713
  ref = inject(ChangeDetectorRef);
619
714
  get array() {
620
- return this.group.controls[this.field.name];
715
+ return this.group().controls[this.field().name];
621
716
  }
622
717
  constructor() {
623
718
  super();
624
719
  }
625
720
  addItem() {
626
- if (!this.field.instances) {
627
- this.field.instances = [];
721
+ if (!this.field().instances) {
722
+ this.field().instances = [];
628
723
  }
629
- const i = this.field.instances.length > 0 ? this.field.instances[this.field.instances.length - 1].number + 1 : 0;
630
- const fields = _.cloneDeep(this.field.field.fields);
631
- const grp = this.dynamicService.createGroup(fields, `${this.path}[${i}]`, null);
632
- this.field.instances.push({
724
+ const i = this.field().instances.length > 0 ? this.field().instances[this.field().instances.length - 1].number + 1 : 0;
725
+ const fields = structuredClone(this.field().field.fields);
726
+ const grp = this.dynamicService.createGroup(fields, `${this.path}[${i}]`, null, null);
727
+ this.field().instances.push({
633
728
  number: i,
634
729
  group: grp,
635
730
  fields
@@ -638,10 +733,10 @@ class MatArrayComponent extends AbstractControlFieldComponent {
638
733
  this.ref.detectChanges();
639
734
  }
640
735
  deleteItem(index, inst) {
641
- this.field.instances.splice(index, 1);
642
- for (const key of this.dynamicService.data.pathFieldConfigMap.keys()) {
736
+ this.field().instances.splice(index, 1);
737
+ for (const key of this.dynamicService.data.pathFieldMap.keys()) {
643
738
  if (key.startsWith(`${this.path}[${inst.number}]`)) {
644
- this.dynamicFormService.data.pathFieldConfigMap.delete(key);
739
+ this.data?.pathFieldMap.delete(key);
645
740
  }
646
741
  }
647
742
  ;
@@ -649,7 +744,7 @@ class MatArrayComponent extends AbstractControlFieldComponent {
649
744
  this.ref.detectChanges();
650
745
  }
651
746
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
652
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatArrayComponent, isStandalone: true, selector: "sot-mat-array", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field.className\">\n <fieldset class=\"sot-formfield-wrapper sot-fieldset\">\n @if (field.accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field.opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-array-label\">{{ field.label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n } @else {\n <legend class=\"sot-formfield-array-label\">{{ field.label }}</legend>\n @if (field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n <div class=\"sot-formfield-array-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group\">\n <div [formArrayName]=\"field.name\">\n @for (inst of field.instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field.elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field.itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field.elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field.disabled && (!field.minNbRow || field.minNbRow < array.controls.length)) {\n <button type=\"button\" mat-raised-button (click)=\"deleteItem(i, inst)\">\n @if (field.deleteButton && field.deleteButton.matIcon) {\n <mat-icon [title]=\"field.deleteButton!.title ? field.deleteButton!.title : ''\">\n {{ field.deleteButton!.matIcon }}\n </mat-icon>\n }\n {{ field.deleteButton ? field.deleteButton!.label : 'Supprimer' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field.disabled && (!field.maxNbRow || field.maxNbRow > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button mat-raised-button\n color=\"primary\"\n type=\"button\"\n (click)=\"addItem()\"\n >\n @if (field.addButton && field.addButton.matIcon) {\n <mat-icon [title]=\"field.addButton!.title ? field.addButton!.title : ''\">\n {{ field.addButton!.matIcon }}\n </mat-icon>\n }\n {{ field.addButton ? field.addButton.label : 'Ajouter' }}\n </button>\n </div>\n }\n <mat-error>\n @for (validation of field.validations; track validation) {\n @if (array && !array.untouched && array.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => AcDynamicFieldDirective), selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatExpansionModule) }, { kind: "directive", type: i0.forwardRef(() => i1$1.MatAccordion), selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i0.forwardRef(() => i1$1.MatExpansionPanel), selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i0.forwardRef(() => i1$1.MatExpansionPanelHeader), selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i0.forwardRef(() => i1$1.MatExpansionPanelTitle), selector: "mat-panel-title" }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i0.forwardRef(() => MatIcon), selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i0.forwardRef(() => 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: i0.forwardRef(() => MatCardModule) }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatusGroup), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(() => i1.FormGroupDirective), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormArrayName), selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i0.forwardRef(() => MatError), selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
747
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatArrayComponent, isStandalone: true, selector: "sot-mat-array", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field().className\">\n <fieldset class=\"sot-formfield-wrapper sot-fieldset\">\n @if (field().accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field().opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-array-label\">{{ field().label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n } @else {\n <legend class=\"sot-formfield-array-label\">{{ field().label }}</legend>\n @if (field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n <div class=\"sot-formfield-array-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group()\">\n <div [formArrayName]=\"field().name\">\n @for (inst of field().instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field().elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field().itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field().elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n [data]=\"data\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field().disabled && (!field().minNbRow || field().minNbRow! < array.controls.length)) {\n <button type=\"button\" mat-raised-button (click)=\"deleteItem(i, inst)\">\n @if (field().deleteButton && field().deleteButton!.matIcon) {\n <mat-icon [title]=\"field().deleteButton!.title ? field().deleteButton!.title : ''\">\n {{ field().deleteButton!.matIcon }}\n </mat-icon>\n }\n {{ field().deleteButton ? field().deleteButton!.label : 'Supprimer' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field().disabled && (!field().maxNbRow || field().maxNbRow! > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button mat-raised-button\n type=\"button\"\n (click)=\"addItem()\"\n >\n @if (field().addButton && field().addButton!.matIcon) {\n <mat-icon [title]=\"field().addButton!.title ? field().addButton!.title : ''\">\n {{ field().addButton!.matIcon }}\n </mat-icon>\n }\n {{ field().addButton ? field().addButton!.label : 'Ajouter' }}\n </button>\n </div>\n }\n <mat-error>\n @for (validation of field().validations; track validation) {\n @if (array && !array.untouched && array.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => AcDynamicFieldDirective), selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath", "data"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatExpansionModule) }, { kind: "directive", type: i0.forwardRef(() => i1$1.MatAccordion), selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i0.forwardRef(() => i1$1.MatExpansionPanel), selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i0.forwardRef(() => i1$1.MatExpansionPanelHeader), selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i0.forwardRef(() => i1$1.MatExpansionPanelTitle), selector: "mat-panel-title" }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i0.forwardRef(() => MatIcon), selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i0.forwardRef(() => 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: i0.forwardRef(() => MatCardModule) }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatusGroup), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(() => i1.FormGroupDirective), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormArrayName), selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i0.forwardRef(() => MatError), selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
653
748
  }
654
749
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatArrayComponent, decorators: [{
655
750
  type: Component,
@@ -663,12 +758,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
663
758
  ReactiveFormsModule,
664
759
  MatError,
665
760
  NgTemplateOutlet
666
- ], template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field.className\">\n <fieldset class=\"sot-formfield-wrapper sot-fieldset\">\n @if (field.accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field.opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-array-label\">{{ field.label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n } @else {\n <legend class=\"sot-formfield-array-label\">{{ field.label }}</legend>\n @if (field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n <div class=\"sot-formfield-array-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group\">\n <div [formArrayName]=\"field.name\">\n @for (inst of field.instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field.elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field.itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field.elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field.disabled && (!field.minNbRow || field.minNbRow < array.controls.length)) {\n <button type=\"button\" mat-raised-button (click)=\"deleteItem(i, inst)\">\n @if (field.deleteButton && field.deleteButton.matIcon) {\n <mat-icon [title]=\"field.deleteButton!.title ? field.deleteButton!.title : ''\">\n {{ field.deleteButton!.matIcon }}\n </mat-icon>\n }\n {{ field.deleteButton ? field.deleteButton!.label : 'Supprimer' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field.disabled && (!field.maxNbRow || field.maxNbRow > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button mat-raised-button\n color=\"primary\"\n type=\"button\"\n (click)=\"addItem()\"\n >\n @if (field.addButton && field.addButton.matIcon) {\n <mat-icon [title]=\"field.addButton!.title ? field.addButton!.title : ''\">\n {{ field.addButton!.matIcon }}\n </mat-icon>\n }\n {{ field.addButton ? field.addButton.label : 'Ajouter' }}\n </button>\n </div>\n }\n <mat-error>\n @for (validation of field.validations; track validation) {\n @if (array && !array.untouched && array.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"] }]
761
+ ], template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field().className\">\n <fieldset class=\"sot-formfield-wrapper sot-fieldset\">\n @if (field().accordion) {\n <mat-accordion class=\"sot-formfield-array-accordion\" multi>\n <mat-expansion-panel [expanded]=\"field().opened\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <legend class=\"sot-formfield-array-label\">{{ field().label }}</legend>\n </mat-panel-title>\n </mat-expansion-panel-header>\n @if (field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </mat-expansion-panel>\n </mat-accordion>\n } @else {\n <legend class=\"sot-formfield-array-label\">{{ field().label }}</legend>\n @if (field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n <div class=\"sot-formfield-array-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group()\">\n <div [formArrayName]=\"field().name\">\n @for (inst of field().instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field().elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field().itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field().elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container matDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n [data]=\"data\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field().disabled && (!field().minNbRow || field().minNbRow! < array.controls.length)) {\n <button type=\"button\" mat-raised-button (click)=\"deleteItem(i, inst)\">\n @if (field().deleteButton && field().deleteButton!.matIcon) {\n <mat-icon [title]=\"field().deleteButton!.title ? field().deleteButton!.title : ''\">\n {{ field().deleteButton!.matIcon }}\n </mat-icon>\n }\n {{ field().deleteButton ? field().deleteButton!.label : 'Supprimer' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field().disabled && (!field().maxNbRow || field().maxNbRow! > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button mat-raised-button\n type=\"button\"\n (click)=\"addItem()\"\n >\n @if (field().addButton && field().addButton!.matIcon) {\n <mat-icon [title]=\"field().addButton!.title ? field().addButton!.title : ''\">\n {{ field().addButton!.matIcon }}\n </mat-icon>\n }\n {{ field().addButton ? field().addButton!.label : 'Ajouter' }}\n </button>\n </div>\n }\n <mat-error>\n @for (validation of field().validations; track validation) {\n @if (array && !array.untouched && array.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"] }]
667
762
  }], ctorParameters: () => [] });
668
763
 
669
764
  class MatRowComponent extends AbstractFieldComponent {
670
765
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
671
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatRowComponent, isStandalone: true, selector: "sot-mat-row", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field.className\">\n @for (f of field.fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n matDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => AcDynamicFieldDirective), selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }] });
766
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatRowComponent, isStandalone: true, selector: "sot-mat-row", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field().className\">\n @for (f of field().fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n matDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group()\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => AcDynamicFieldDirective), selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath", "data"] }] });
672
767
  }
673
768
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatRowComponent, decorators: [{
674
769
  type: Component,
@@ -677,7 +772,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
677
772
  NgClass,
678
773
  forwardRef(() => AcDynamicFieldDirective),
679
774
  AcDynamicFieldDirective
680
- ], template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field.className\">\n @for (f of field.fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n matDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n" }]
775
+ ], template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field().className\">\n @for (f of field().fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n matDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group()\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n" }]
681
776
  }] });
682
777
 
683
778
  let PasswordValidators$2 = class PasswordValidators {
@@ -699,16 +794,16 @@ class MatFieldPasswordComponent extends AbstractControlFieldComponent {
699
794
  iconErrorLabel;
700
795
  iconSuccessLabel;
701
796
  buttonAction(b) {
702
- if (b.action && this.field && this.group) {
703
- b.action(this.field, this.group, this.dynamicFormService.data);
797
+ if (b.action) {
798
+ b.action(this.field(), this.group(), this.data);
704
799
  }
705
800
  }
706
801
  ngOnInit() {
707
802
  super.ngOnInit();
708
- this.showPasswordLabel = this.field.labels?.showPassword ?? "Show password";
709
- this.hidePasswordLabel = this.field.labels?.hidePassword ?? "Hide password";
710
- this.iconSuccessLabel = this.field.labels?.iconSuccess ?? "Success";
711
- this.iconErrorLabel = this.field.labels?.iconError ?? "Error";
803
+ this.showPasswordLabel = this.field().labels?.showPassword ?? "Show password";
804
+ this.hidePasswordLabel = this.field().labels?.hidePassword ?? "Hide password";
805
+ this.iconSuccessLabel = this.field().labels?.iconSuccess ?? "Success";
806
+ this.iconErrorLabel = this.field().labels?.iconError ?? "Error";
712
807
  if (this.control) {
713
808
  this.control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
714
809
  if (value?.length == 0) {
@@ -740,29 +835,29 @@ class MatFieldPasswordComponent extends AbstractControlFieldComponent {
740
835
  return this.control.value && !this.control.hasError("requiresSpecialChars");
741
836
  }
742
837
  setPasswordValidators() {
743
- if (this.field.minlength) {
744
- this.control?.addValidators(Validators.minLength(this.field.minlength));
838
+ if (this.field().minlength) {
839
+ this.control?.addValidators(Validators.minLength(this.field().minlength));
745
840
  }
746
- if (this.field.maxlength) {
747
- this.control?.addValidators(Validators.maxLength(this.field.maxlength));
841
+ if (this.field().maxlength) {
842
+ this.control?.addValidators(Validators.maxLength(this.field().maxlength));
748
843
  }
749
- if (this.field.requiresDigit) {
844
+ if (this.field().requiresDigit) {
750
845
  this.control?.addValidators(PasswordValidators$2.patternValidator(/(?=.*[0-9])/, {
751
846
  requiresDigit: true
752
847
  }));
753
848
  }
754
- if (this.field.requiresUppercase) {
849
+ if (this.field().requiresUppercase) {
755
850
  this.control?.addValidators(PasswordValidators$2.patternValidator(/(?=.*[A-Z])/, {
756
851
  requiresUppercase: true
757
852
  }));
758
853
  }
759
- if (this.field.requiresLowercase) {
854
+ if (this.field().requiresLowercase) {
760
855
  this.control?.addValidators(PasswordValidators$2.patternValidator(/(?=.*[a-z])/, {
761
856
  requiresLowercase: true
762
857
  }));
763
858
  }
764
- if (this.field.requiresSpecialChars) {
765
- const chars = this.field.specialChars?.join("") ?? "$@^!%*?&";
859
+ if (this.field().requiresSpecialChars) {
860
+ const chars = this.field().specialChars?.join("") ?? "$@^!%*?&";
766
861
  const regex = "(?=.*[" + chars + "])";
767
862
  this.control?.addValidators(PasswordValidators$2.patternValidator(new RegExp(regex), {
768
863
  requiresSpecialChars: true
@@ -770,69 +865,70 @@ class MatFieldPasswordComponent extends AbstractControlFieldComponent {
770
865
  }
771
866
  }
772
867
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
773
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldPasswordComponent, isStandalone: true, selector: "sot-mat-field-password", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"sot-formfield sot-formfield-password\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [aria-describedby]=\"uuid + '-description'\"\r\n >\r\n <button type=\"button\" mat-icon-button matSuffix (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n <mat-icon>{{ inputType === 'password' ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field.minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field.requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-password mat-form-field{width:100%}.sot-formfield-password mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
868
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldPasswordComponent, isStandalone: true, selector: "sot-mat-field-password", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"sot-formfield sot-formfield-password\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [aria-describedby]=\"uuid + '-description'\"\r\n >\r\n <button type=\"button\" matIconButton matSuffix (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n <mat-icon>{{ inputType === 'password' ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field().minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field().requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-password mat-form-field{width:100%}.sot-formfield-password mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.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: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
774
869
  }
775
870
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldPasswordComponent, decorators: [{
776
871
  type: Component,
777
- args: [{ selector: 'sot-mat-field-password', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div\r\n class=\"sot-formfield sot-formfield-password\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [aria-describedby]=\"uuid + '-description'\"\r\n >\r\n <button type=\"button\" mat-icon-button matSuffix (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n <mat-icon>{{ inputType === 'password' ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field.minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field.requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-password mat-form-field{width:100%}.sot-formfield-password mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"] }]
872
+ args: [{ selector: 'sot-mat-field-password', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule, MatIconButton], template: "<div\r\n class=\"sot-formfield sot-formfield-password\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n <input matInput\r\n [id]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [aria-describedby]=\"uuid + '-description'\"\r\n >\r\n <button type=\"button\" matIconButton matSuffix (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n <mat-icon>{{ inputType === 'password' ? 'visibility_off' : 'visibility' }}</mat-icon>\r\n </button>\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{prefix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{suffix.label}}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field().minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field().requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-password mat-form-field{width:100%}.sot-formfield-password mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"] }]
778
873
  }] });
779
874
 
780
875
  class MatFieldRadioButtonComponent extends AbstractControlFieldComponent {
781
876
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldRadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
782
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldRadioButtonComponent, isStandalone: true, selector: "sot-mat-field-radio-button", usesInheritance: true, ngImport: i0, template: "<fieldset\r\n class=\"sot-formfield sot-formfield-radiobutton\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <legend [attr.id]=\"'radiobutton-'+uuid\" class=\"sot-formfield-radiobutton-label\">\r\n {{ field.label }} {{ !!required ? '*' : '' }}\r\n @if (field.description) {\r\n <span class=\"radiobutton-description\">{{ field.description }}</span>\r\n }\r\n </legend>\r\n <mat-radio-group class=\"sot-formfield-radiobutton-content\"\r\n [id]=\"uuid\"\r\n [attr.aria-labelledby]=\"'radiobutton-'+uuid\"\r\n [formControlName]=\"field.name\"\r\n [ngClass]=\"{'verticalAlign': field.verticalAlign, 'horizontalAlign': !field.verticalAlign}\"\r\n >\r\n @if (field.options) {\r\n @for (item of field.options; track item) {\r\n <mat-radio-button\r\n class=\"sot-formfield-radiobutton-item\"\r\n [ngClass]=\"field.radioButtonClassName\"\r\n [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n <span class=\"item-label\">{{ field.labelKey ? item[field.labelKey!] : item }}</span>\r\n @if (field.descriptionKey) {\r\n <span class=\"item-description\">{{ item[field.descriptionKey] }}</span>\r\n }\r\n </mat-radio-button>\r\n }\r\n }\r\n </mat-radio-group>\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n</fieldset>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatIconModule }] });
877
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldRadioButtonComponent, isStandalone: true, selector: "sot-mat-field-radio-button", usesInheritance: true, ngImport: i0, template: "<fieldset\r\n class=\"sot-formfield sot-formfield-radiobutton\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <legend [attr.id]=\"'radiobutton-'+uuid\" class=\"sot-formfield-radiobutton-label\">\r\n {{ field().label }} {{ !!required ? '*' : '' }}\r\n @if (field().description) {\r\n <span class=\"radiobutton-description\">{{ field().description }}</span>\r\n }\r\n </legend>\r\n <mat-radio-group class=\"sot-formfield-radiobutton-content\"\r\n [id]=\"uuid\"\r\n [attr.aria-labelledby]=\"'radiobutton-'+uuid\"\r\n [formControlName]=\"field().name\"\r\n [ngClass]=\"{'verticalAlign': field().verticalAlign, 'horizontalAlign': !field().verticalAlign}\"\r\n >\r\n @if (field().options) {\r\n @for (item of field().options; track item) {\r\n <mat-radio-button\r\n class=\"sot-formfield-radiobutton-item\"\r\n [ngClass]=\"field().radioButtonClassName\"\r\n [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n <span class=\"item-label\">{{ field().labelKey ? item[field().labelKey!] : item }}</span>\r\n @if (field().descriptionKey) {\r\n <span class=\"item-description\">{{ item[field().descriptionKey!] }}</span>\r\n }\r\n </mat-radio-button>\r\n }\r\n }\r\n </mat-radio-group>\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n</fieldset>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i2$2.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i2$2.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatIconModule }] });
783
878
  }
784
879
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldRadioButtonComponent, decorators: [{
785
880
  type: Component,
786
- args: [{ selector: 'sot-mat-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass, MatRadioModule, MatError, MatTooltipModule, MatIconModule], template: "<fieldset\r\n class=\"sot-formfield sot-formfield-radiobutton\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <legend [attr.id]=\"'radiobutton-'+uuid\" class=\"sot-formfield-radiobutton-label\">\r\n {{ field.label }} {{ !!required ? '*' : '' }}\r\n @if (field.description) {\r\n <span class=\"radiobutton-description\">{{ field.description }}</span>\r\n }\r\n </legend>\r\n <mat-radio-group class=\"sot-formfield-radiobutton-content\"\r\n [id]=\"uuid\"\r\n [attr.aria-labelledby]=\"'radiobutton-'+uuid\"\r\n [formControlName]=\"field.name\"\r\n [ngClass]=\"{'verticalAlign': field.verticalAlign, 'horizontalAlign': !field.verticalAlign}\"\r\n >\r\n @if (field.options) {\r\n @for (item of field.options; track item) {\r\n <mat-radio-button\r\n class=\"sot-formfield-radiobutton-item\"\r\n [ngClass]=\"field.radioButtonClassName\"\r\n [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n <span class=\"item-label\">{{ field.labelKey ? item[field.labelKey!] : item }}</span>\r\n @if (field.descriptionKey) {\r\n <span class=\"item-description\">{{ item[field.descriptionKey] }}</span>\r\n }\r\n </mat-radio-button>\r\n }\r\n }\r\n </mat-radio-group>\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n</fieldset>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"] }]
881
+ args: [{ selector: 'sot-mat-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass, MatRadioModule, MatError, MatTooltipModule, MatIconModule], template: "<fieldset\r\n class=\"sot-formfield sot-formfield-radiobutton\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <legend [attr.id]=\"'radiobutton-'+uuid\" class=\"sot-formfield-radiobutton-label\">\r\n {{ field().label }} {{ !!required ? '*' : '' }}\r\n @if (field().description) {\r\n <span class=\"radiobutton-description\">{{ field().description }}</span>\r\n }\r\n </legend>\r\n <mat-radio-group class=\"sot-formfield-radiobutton-content\"\r\n [id]=\"uuid\"\r\n [attr.aria-labelledby]=\"'radiobutton-'+uuid\"\r\n [formControlName]=\"field().name\"\r\n [ngClass]=\"{'verticalAlign': field().verticalAlign, 'horizontalAlign': !field().verticalAlign}\"\r\n >\r\n @if (field().options) {\r\n @for (item of field().options; track item) {\r\n <mat-radio-button\r\n class=\"sot-formfield-radiobutton-item\"\r\n [ngClass]=\"field().radioButtonClassName\"\r\n [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n <span class=\"item-label\">{{ field().labelKey ? item[field().labelKey!] : item }}</span>\r\n @if (field().descriptionKey) {\r\n <span class=\"item-description\">{{ item[field().descriptionKey!] }}</span>\r\n }\r\n </mat-radio-button>\r\n }\r\n }\r\n </mat-radio-group>\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n</fieldset>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"] }]
787
882
  }] });
788
883
 
789
884
  class MatFieldSelectComponent extends AbstractControlFieldComponent {
790
885
  options = [];
791
886
  ngOnInit() {
792
887
  super.ngOnInit();
793
- if (isObservable(this.field.options)) {
794
- this.field.options.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((options) => {
888
+ const options = this.field().options;
889
+ if (isObservable(options)) {
890
+ options.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((options) => {
795
891
  this.options = options;
796
892
  });
797
893
  }
798
894
  else {
799
- this.options = this.field.options;
895
+ this.options = options;
800
896
  }
801
897
  }
802
898
  buttonAction(b) {
803
- if (b.action && this.field && this.group) {
804
- b.action(this.field, this.group, this.dynamicFormService.data);
899
+ if (b.action) {
900
+ b.action(this.field(), this.group(), this.data);
805
901
  }
806
902
  }
807
903
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
808
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldSelectComponent, isStandalone: true, selector: "sot-mat-field-select", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-select\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\">\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n <mat-select\r\n [id]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [multiple]=\"field.multiple\"\r\n panelClass=\"sot-formfield-select-panel\">\r\n @if (field.resetOption) {\r\n <mat-option [value]=\"undefined\">\r\n {{ field.resetOptionLabel }}\r\n </mat-option>\r\n }\r\n @if (field.options) {\r\n @if (field.groupLabelKey) {\r\n @for (group of options; track group) {\r\n <mat-optgroup [label]=\"field.groupLabelKey ? group[field.groupLabelKey] : ''\">\r\n @if (field.groupOptionsKey && group[field.groupOptionsKey]) {\r\n @for (item of group[field.groupOptionsKey]; track item) {\r\n <mat-option [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n </mat-optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <mat-option [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n }\r\n </mat-select>\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n <mat-error>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </mat-error>\r\n </mat-form-field>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3$2.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }] });
904
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldSelectComponent, isStandalone: true, selector: "sot-mat-field-select", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-select\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\">\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n <mat-select\r\n [id]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [multiple]=\"field().multiple\"\r\n panelClass=\"sot-formfield-select-panel\">\r\n @if (field().resetOption) {\r\n <mat-option [value]=\"undefined\">\r\n {{ field().resetOptionLabel }}\r\n </mat-option>\r\n }\r\n @if (field().options) {\r\n @if (field().groupLabelKey) {\r\n @for (group of options; track group) {\r\n <mat-optgroup [label]=\"field().groupLabelKey ? group[field().groupLabelKey!] : ''\">\r\n @if (field().groupOptionsKey && group[field().groupOptionsKey!]) {\r\n @for (item of group[field().groupOptionsKey!]; track item) {\r\n <mat-option [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n </mat-optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <mat-option [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n }\r\n </mat-select>\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n <mat-error>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </mat-error>\r\n </mat-form-field>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3$2.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }] });
809
905
  }
810
906
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldSelectComponent, decorators: [{
811
907
  type: Component,
812
- args: [{ selector: 'sot-mat-field-select', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatSelectModule], template: "<div class=\"sot-formfield sot-formfield-select\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\">\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n <mat-select\r\n [id]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [multiple]=\"field.multiple\"\r\n panelClass=\"sot-formfield-select-panel\">\r\n @if (field.resetOption) {\r\n <mat-option [value]=\"undefined\">\r\n {{ field.resetOptionLabel }}\r\n </mat-option>\r\n }\r\n @if (field.options) {\r\n @if (field.groupLabelKey) {\r\n @for (group of options; track group) {\r\n <mat-optgroup [label]=\"field.groupLabelKey ? group[field.groupLabelKey] : ''\">\r\n @if (field.groupOptionsKey && group[field.groupOptionsKey]) {\r\n @for (item of group[field.groupOptionsKey]; track item) {\r\n <mat-option [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n </mat-optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <mat-option [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n }\r\n </mat-select>\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n <mat-error>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </mat-error>\r\n </mat-form-field>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"] }]
908
+ args: [{ selector: 'sot-mat-field-select', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatSelectModule], template: "<div class=\"sot-formfield sot-formfield-select\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\">\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n <mat-select\r\n [id]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [multiple]=\"field().multiple\"\r\n panelClass=\"sot-formfield-select-panel\">\r\n @if (field().resetOption) {\r\n <mat-option [value]=\"undefined\">\r\n {{ field().resetOptionLabel }}\r\n </mat-option>\r\n }\r\n @if (field().options) {\r\n @if (field().groupLabelKey) {\r\n @for (group of options; track group) {\r\n <mat-optgroup [label]=\"field().groupLabelKey ? group[field().groupLabelKey!] : ''\">\r\n @if (field().groupOptionsKey && group[field().groupOptionsKey!]) {\r\n @for (item of group[field().groupOptionsKey!]; track item) {\r\n <mat-option [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n </mat-optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <mat-option [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </mat-option>\r\n }\r\n }\r\n }\r\n </mat-select>\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n <mat-error>\r\n @if (control && !control.untouched && control.invalid) {\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n }\r\n </mat-error>\r\n </mat-form-field>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"] }]
813
909
  }] });
814
910
 
815
911
  class MatFieldTextareaComponent extends AbstractControlFieldComponent {
816
912
  buttonAction(b) {
817
- if (b.action && this.field && this.group) {
818
- b.action(this.field, this.group, this.dynamicFormService.data);
913
+ if (b.action) {
914
+ b.action(this.field(), this.group(), this.data);
819
915
  }
820
916
  }
821
917
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
822
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldTextareaComponent, isStandalone: true, selector: "sot-mat-field-textarea", usesInheritance: true, ngImport: i0, template: "<div\n class=\"sot-formfield sot-formfield-textarea\"\n [ngClass]=\"field.className\"\n [formGroup]=\"group\"\n>\n <mat-form-field>\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\n <textarea matInput\n [id]=\"uuid\"\n [formControlName]=\"field.name\"\n [readonly]=\"field.readonly\"\n [required]=\"!!required\"\n [rows]=\"field.rows\"\n ></textarea>\n\n @for (b of field.prefixes; track b) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (b.action) {\n <button type=\"button\"\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @for (b of field.suffixes; track b) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (b.action) {\n <button type=\"button\"\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @if (field.description) {\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\n }\n\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field.validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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 }] });
918
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldTextareaComponent, isStandalone: true, selector: "sot-mat-field-textarea", usesInheritance: true, ngImport: i0, template: "<div\n class=\"sot-formfield sot-formfield-textarea\"\n [ngClass]=\"field().className\"\n [formGroup]=\"group()\"\n>\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\n <textarea matInput\n [id]=\"uuid\"\n [formControlName]=\"field().name\"\n [readonly]=\"field().readonly\"\n [required]=\"!!required\"\n [rows]=\"field().rows\"\n ></textarea>\n\n @for (b of field().prefixes; track b) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (b.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @for (b of field().suffixes; track b) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (b.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @if (field().description) {\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\n }\n\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field().validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.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"] }] });
823
919
  }
824
920
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldTextareaComponent, decorators: [{
825
921
  type: Component,
826
- args: [{ selector: 'sot-mat-field-textarea', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatInputModule, MatButtonModule], template: "<div\n class=\"sot-formfield sot-formfield-textarea\"\n [ngClass]=\"field.className\"\n [formGroup]=\"group\"\n>\n <mat-form-field>\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\n <textarea matInput\n [id]=\"uuid\"\n [formControlName]=\"field.name\"\n [readonly]=\"field.readonly\"\n [required]=\"!!required\"\n [rows]=\"field.rows\"\n ></textarea>\n\n @for (b of field.prefixes; track b) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (b.action) {\n <button type=\"button\"\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @for (b of field.suffixes; track b) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (b.action) {\n <button type=\"button\"\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @if (field.description) {\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\n }\n\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field.validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"] }]
922
+ args: [{ selector: 'sot-mat-field-textarea', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatInputModule, MatButtonModule], template: "<div\n class=\"sot-formfield sot-formfield-textarea\"\n [ngClass]=\"field().className\"\n [formGroup]=\"group()\"\n>\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\n <textarea matInput\n [id]=\"uuid\"\n [formControlName]=\"field().name\"\n [readonly]=\"field().readonly\"\n [required]=\"!!required\"\n [rows]=\"field().rows\"\n ></textarea>\n\n @for (b of field().prefixes; track b) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (b.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @for (b of field().suffixes; track b) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (b.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"b.actionAriaLabel\"\n (click)=\"buttonAction(b)\"\n >{{b.label}}</button>\n } @else {\n <span [innerHTML]=\"b.label\"></span>\n }\n </span>\n }\n @if (field().description) {\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\n }\n\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field().validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"] }]
827
923
  }] });
828
924
 
829
925
  class MatFieldToggleComponent extends AbstractControlFieldComponent {
830
926
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
831
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldToggleComponent, isStandalone: true, selector: "sot-mat-field-toggle", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-toggle\" [ngClass]=\"field.className\">\r\n <div [formGroup]=\"group\">\r\n <mat-slide-toggle\r\n [formControlName]=\"field.name\"\r\n [attr.id]=\"'toggle-' + field.name\"\r\n [labelPosition]=\"field.labelPosition ?? 'after'\"\r\n >\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </mat-slide-toggle>\r\n\r\n <div class=\"messages-group\" [attr.id]=\"'toggle-' + field.name + '-error'\" aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p>{{ validation.message }}</p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i2$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] });
927
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldToggleComponent, isStandalone: true, selector: "sot-mat-field-toggle", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-toggle\" [ngClass]=\"field().className\">\r\n <div [formGroup]=\"group()\">\r\n <mat-slide-toggle\r\n [formControlName]=\"field().name\"\r\n [attr.id]=\"'toggle-' + field().name\"\r\n [labelPosition]=\"field().labelPosition ?? 'after'\"\r\n >\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </mat-slide-toggle>\r\n\r\n <div class=\"messages-group\" [attr.id]=\"'toggle-' + field().name + '-error'\" aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p>{{ validation.message }}</p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i2$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] });
832
928
  }
833
929
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldToggleComponent, decorators: [{
834
930
  type: Component,
835
- args: [{ selector: 'sot-mat-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatSlideToggleModule], template: "<div class=\"sot-formfield sot-formfield-toggle\" [ngClass]=\"field.className\">\r\n <div [formGroup]=\"group\">\r\n <mat-slide-toggle\r\n [formControlName]=\"field.name\"\r\n [attr.id]=\"'toggle-' + field.name\"\r\n [labelPosition]=\"field.labelPosition ?? 'after'\"\r\n >\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </mat-slide-toggle>\r\n\r\n <div class=\"messages-group\" [attr.id]=\"'toggle-' + field.name + '-error'\" aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p>{{ validation.message }}</p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
931
+ args: [{ selector: 'sot-mat-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatSlideToggleModule], template: "<div class=\"sot-formfield sot-formfield-toggle\" [ngClass]=\"field().className\">\r\n <div [formGroup]=\"group()\">\r\n <mat-slide-toggle\r\n [formControlName]=\"field().name\"\r\n [attr.id]=\"'toggle-' + field().name\"\r\n [labelPosition]=\"field().labelPosition ?? 'after'\"\r\n >\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </mat-slide-toggle>\r\n\r\n <div class=\"messages-group\" [attr.id]=\"'toggle-' + field().name + '-error'\" aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p>{{ validation.message }}</p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
836
932
  }] });
837
933
 
838
934
  class AcFieldCustomDirective extends NgControl {
@@ -920,11 +1016,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
920
1016
 
921
1017
  class MatFieldCustomComponent extends AbstractControlFieldComponent {
922
1018
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
923
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: MatFieldCustomComponent, isStandalone: true, selector: "ac-mat-field-custom", usesInheritance: true, ngImport: i0, template: "<div class=\"ac-form-field ac-form-field-custom\"\n [ngClass]=\"field.className\"\n [formGroup]=\"group\" >\n <ng-container fieldCustom [field]=\"field\" [group]=\"group\" > </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: AcFieldCustomDirective, selector: "[fieldCustom]", inputs: ["field", "group"], outputs: ["ngModelChange"] }] });
1019
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: MatFieldCustomComponent, isStandalone: true, selector: "ac-mat-field-custom", usesInheritance: true, ngImport: i0, template: "<div class=\"ac-form-field ac-form-field-custom\"\n [ngClass]=\"field().className\"\n [formGroup]=\"group()\" >\n <ng-container fieldCustom [field]=\"field()\" [group]=\"group()\" > </ng-container>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: AcFieldCustomDirective, selector: "[fieldCustom]", inputs: ["field", "group"], outputs: ["ngModelChange"] }] });
924
1020
  }
925
1021
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldCustomComponent, decorators: [{
926
1022
  type: Component,
927
- args: [{ selector: "ac-mat-field-custom", standalone: true, imports: [ReactiveFormsModule, NgClass, AcFieldCustomDirective], template: "<div class=\"ac-form-field ac-form-field-custom\"\n [ngClass]=\"field.className\"\n [formGroup]=\"group\" >\n <ng-container fieldCustom [field]=\"field\" [group]=\"group\" > </ng-container>\n</div>\n" }]
1023
+ args: [{ selector: "ac-mat-field-custom", standalone: true, imports: [ReactiveFormsModule, NgClass, AcFieldCustomDirective], template: "<div class=\"ac-form-field ac-form-field-custom\"\n [ngClass]=\"field().className\"\n [formGroup]=\"group()\" >\n <ng-container fieldCustom [field]=\"field()\" [group]=\"group()\" > </ng-container>\n</div>\n" }]
928
1024
  }] });
929
1025
 
930
1026
  class ConfirmDialogComponent {
@@ -942,11 +1038,11 @@ class ConfirmDialogComponent {
942
1038
  this.cancelLabel = this.data.cancelLabel ? this.data.cancelLabel : "No";
943
1039
  }
944
1040
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
945
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: ConfirmDialogComponent, isStandalone: true, selector: "sot-confirm-dialog", ngImport: i0, template: "<div class=\"modal-close-button\">\n <button mat-button color=\"primary\" mat-dialog-close>\n <mat-icon title=\"Fermer\">close</mat-icon>\n Fermer\n </button>\n</div>\n\n<h2 class=\"modal-title\" matDialogTitle>{{ title }}</h2>\n\n<div matDialogContent>\n <div [innerHtml]=\"message\"></div>\n</div>\n\n<div matDialogActions>\n <div class=\"modal-action-buttons\">\n <button mat-stroked-button color=\"primary\" mat-dialog-close>\n {{ cancelLabel }}\n </button>\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"true\">\n {{ confirmLabel }}\n </button>\n </div>\n</div>\n", styles: [".modal-close-button{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: 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: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
1041
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: ConfirmDialogComponent, isStandalone: true, selector: "sot-confirm-dialog", ngImport: i0, template: "<div class=\"modal-close-button\">\n <button matButton=\"outlined\" mat-dialog-close>\n <mat-icon title=\"Fermer\">close</mat-icon>\n Fermer\n </button>\n</div>\n\n<h2 class=\"modal-title\" matDialogTitle>{{ title }}</h2>\n\n<div matDialogContent>\n <div [innerHtml]=\"message\"></div>\n</div>\n\n<div matDialogActions>\n <div class=\"modal-action-buttons\">\n <button matButton=\"outlined\" mat-dialog-close>\n {{ cancelLabel }}\n </button>\n <button matButton=\"filled\" [mat-dialog-close]=\"true\">\n {{ confirmLabel }}\n </button>\n </div>\n</div>\n", styles: [".modal-close-button{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: 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: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
946
1042
  }
947
1043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
948
1044
  type: Component,
949
- args: [{ selector: "sot-confirm-dialog", imports: [MatIcon, MatButton, MatDialogModule], template: "<div class=\"modal-close-button\">\n <button mat-button color=\"primary\" mat-dialog-close>\n <mat-icon title=\"Fermer\">close</mat-icon>\n Fermer\n </button>\n</div>\n\n<h2 class=\"modal-title\" matDialogTitle>{{ title }}</h2>\n\n<div matDialogContent>\n <div [innerHtml]=\"message\"></div>\n</div>\n\n<div matDialogActions>\n <div class=\"modal-action-buttons\">\n <button mat-stroked-button color=\"primary\" mat-dialog-close>\n {{ cancelLabel }}\n </button>\n <button mat-raised-button color=\"primary\" [mat-dialog-close]=\"true\">\n {{ confirmLabel }}\n </button>\n </div>\n</div>\n", styles: [".modal-close-button{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
1045
+ args: [{ selector: "sot-confirm-dialog", imports: [MatIcon, MatButton, MatDialogModule, MatButton], template: "<div class=\"modal-close-button\">\n <button matButton=\"outlined\" mat-dialog-close>\n <mat-icon title=\"Fermer\">close</mat-icon>\n Fermer\n </button>\n</div>\n\n<h2 class=\"modal-title\" matDialogTitle>{{ title }}</h2>\n\n<div matDialogContent>\n <div [innerHtml]=\"message\"></div>\n</div>\n\n<div matDialogActions>\n <div class=\"modal-action-buttons\">\n <button matButton=\"outlined\" mat-dialog-close>\n {{ cancelLabel }}\n </button>\n <button matButton=\"filled\" [mat-dialog-close]=\"true\">\n {{ confirmLabel }}\n </button>\n </div>\n</div>\n", styles: [".modal-close-button{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
950
1046
  }], ctorParameters: () => [] });
951
1047
 
952
1048
  class MaterialButton {
@@ -968,7 +1064,7 @@ class MaterialButton {
968
1064
  this.buttonClick.emit();
969
1065
  }
970
1066
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
971
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialButton, isStandalone: true, selector: "sot-mat-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, matType: { classPropertyName: "matType", publicName: "matType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, matIcon: { classPropertyName: "matIcon", publicName: "matIcon", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeOptions: { classPropertyName: "badgeOptions", publicName: "badgeOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "@switch (buttonMatType()) {\r\n @case ('button-basic') {\r\n <button matButton\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-basic') {\r\n <a type=\"link\" matButton\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-outlined') {\r\n <button matButton=\"outlined\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-outlined') {\r\n <a type=\"link\" matButton=\"outlined\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-elevated') {\r\n <button matButton=\"elevated\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-elevated') {\r\n <a type=\"link\" matButton=\"elevated\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-filled') {\r\n <button matButton=\"filled\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-filled') {\r\n <a type=\"link\" matButton=\"filled\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-tonal') {\r\n <button matButton=\"tonal\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-tonal') {\r\n <a type=\"link\" matButton=\"tonal\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-icon') {\r\n <button matIconButton\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-icon') {\r\n <a type=\"link\" matIconButton\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-fab') {\r\n <button matFab\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-fab') {\r\n <a type=\"link\" matFab\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-mini-fab') {\r\n <button matMiniFab\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-mini-fab') {\r\n <a type=\"link\" matMiniFab\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-menu') {\r\n <button mat-menu-item\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-menu') {\r\n <a type=\"link\" mat-menu-item\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n\r\n}\r\n\r\n<ng-template #buttonContent>\r\n @if (matIcon()) {\r\n <mat-icon\r\n aria-hidden=\"true\"\r\n [fontIcon]=\"matIcon()!\"\r\n ></mat-icon>\r\n }\r\n <span [innerHTML]=\"label()\"></span>\r\n</ng-template>\r\n\r\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: 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: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1067
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialButton, isStandalone: true, selector: "sot-mat-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, matType: { classPropertyName: "matType", publicName: "matType", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, matIcon: { classPropertyName: "matIcon", publicName: "matIcon", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeOptions: { classPropertyName: "badgeOptions", publicName: "badgeOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick" }, ngImport: i0, template: "@switch (buttonMatType()) {\r\n @case ('button-basic') {\r\n <button matButton\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-basic') {\r\n <a type=\"link\" matButton\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-outlined') {\r\n <button matButton=\"outlined\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-outlined') {\r\n <a type=\"link\" matButton=\"outlined\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-elevated') {\r\n <button matButton=\"elevated\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-elevated') {\r\n <a type=\"link\" matButton=\"elevated\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-filled') {\r\n <button matButton=\"filled\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-filled') {\r\n <a type=\"link\" matButton=\"filled\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-tonal') {\r\n <button matButton=\"tonal\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-tonal') {\r\n <a type=\"link\" matButton=\"tonal\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-icon') {\r\n <button matIconButton\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-icon') {\r\n <a type=\"link\" matIconButton\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-fab') {\r\n <button matFab\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-fab') {\r\n <a type=\"link\" matFab\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-mini-fab') {\r\n <button matMiniFab\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-mini-fab') {\r\n <a type=\"link\" matMiniFab\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-menu') {\r\n <button mat-menu-item\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-menu') {\r\n <a type=\"link\" mat-menu-item\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n\r\n}\r\n\r\n<ng-template #buttonContent>\r\n @if (matIcon()) {\r\n <mat-icon\r\n aria-hidden=\"true\"\r\n [fontIcon]=\"matIcon()!\"\r\n ></mat-icon>\r\n }\r\n <span [innerHTML]=\"label()\"></span>\r\n</ng-template>\r\n\r\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: 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: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i1$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
972
1068
  }
973
1069
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialButton, decorators: [{
974
1070
  type: Component,
@@ -979,7 +1075,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
979
1075
  MatIconButton,
980
1076
  MatFabButton,
981
1077
  MatMiniFabButton,
982
- MatMenuItem,
1078
+ MatMenuModule,
983
1079
  MatIcon,
984
1080
  NgTemplateOutlet
985
1081
  ], template: "@switch (buttonMatType()) {\r\n @case ('button-basic') {\r\n <button matButton\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-basic') {\r\n <a type=\"link\" matButton\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-outlined') {\r\n <button matButton=\"outlined\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-outlined') {\r\n <a type=\"link\" matButton=\"outlined\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-elevated') {\r\n <button matButton=\"elevated\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-elevated') {\r\n <a type=\"link\" matButton=\"elevated\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-filled') {\r\n <button matButton=\"filled\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-filled') {\r\n <a type=\"link\" matButton=\"filled\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-tonal') {\r\n <button matButton=\"tonal\"\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-tonal') {\r\n <a type=\"link\" matButton=\"tonal\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-icon') {\r\n <button matIconButton\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-icon') {\r\n <a type=\"link\" matIconButton\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-fab') {\r\n <button matFab\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-fab') {\r\n <a type=\"link\" matFab\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-mini-fab') {\r\n <button matMiniFab\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-mini-fab') {\r\n <a type=\"link\" matMiniFab\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n @case ('button-menu') {\r\n <button mat-menu-item\r\n [type]=\"type()\"\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </button>\r\n }\r\n @case ('link-menu') {\r\n <a type=\"link\" mat-menu-item\r\n [ngClass]=\"className()\"\r\n [title]=\"title() ?? ''\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [disabled]=\"disabled()\"\r\n [disableRipple]=\"disableRipple()\"\r\n [matBadge]=\"badge()\"\r\n [matBadgePosition]=\"badgeOptions()?.position || 'after'\"\r\n [matBadgeDescription]=\"badgeOptions()?.description ?? ''\"\r\n [matBadgeDisabled]=\"badgeOptions()?.disabled\"\r\n [matBadgeHidden]=\"badgeOptions()?.hidden\"\r\n [matBadgeOverlap]=\"!(badgeOptions()?.noOverlap)\"\r\n [matBadgeSize]=\"badgeOptions()?.size ?? 'medium'\"\r\n (click)=\"clickButton($event)\">\r\n <span *ngTemplateOutlet=\"buttonContent\"></span>\r\n </a>\r\n }\r\n\r\n}\r\n\r\n<ng-template #buttonContent>\r\n @if (matIcon()) {\r\n <mat-icon\r\n aria-hidden=\"true\"\r\n [fontIcon]=\"matIcon()!\"\r\n ></mat-icon>\r\n }\r\n <span [innerHTML]=\"label()\"></span>\r\n</ng-template>\r\n\r\n" }]
@@ -1116,7 +1212,7 @@ class MatInputFileComponent {
1116
1212
  multi: true,
1117
1213
  useExisting: forwardRef(() => MatInputFileComponent),
1118
1214
  },
1119
- ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"sot-file-wrapper\">\n <label [ngClass]=\"field()?.labelClassName\"\n [for]=\"'file-upload-' + field().id\">{{ field().label }}</label>\n <div class=\"sot-file-list\">\n @if (field().multiple) {\n <ul>\n @for (item of fileList; track item) {\n <li class=\"file-list-item\">\n <div>\n <div>\n @if (item.srcUrl) {\n <img [src]=\"item.srcUrl\" [alt]=\"item!.file.name\"/>\n } @else {\n {{ item.file.name }}\n }\n </div>\n </div>\n <div>\n @if (!field().disabled) {\n <button mat-icon-button\n type=\"button\"\n (click)=\"deleteFile(item)\"\n title=\"Supprimer\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </li>\n }\n </ul>\n } @else {\n @if (fichier) {\n <div class=\"file-list-item\">\n <div>\n @if (fichier.srcUrl) {\n <img [src]=\"fichier.srcUrl\" [alt]=\"fichier.file.name\"/>\n } @else {\n {{ fichier.file.name }}\n }\n </div>\n @if (!field().disabled) {\n <sot-mat-button\n type=\"button\"\n [className]=\"field().deleteButton?.className\"\n [matType]=\"field().deleteButton?.matButtonType\"\n [matIcon]=\"field().deleteButton?.matIcon\"\n [label]=\"field().deleteButton?.label ?? 'Delete'\"\n [title]=\"field().deleteButton?.title\"\n [ariaLabel]=\"field().deleteButton?.ariaLabel\"\n (buttonClick)=\"confirmDeleteFile(fichier!)\"\n ></sot-mat-button>\n }\n </div>\n }\n }\n </div>\n <div class=\"sot-file-button\">\n <sot-mat-button\n type=\"button\"\n [className]=\"field().addButton?.className\"\n [matType]=\"field().addButton?.matButtonType\"\n [matIcon]=\"field().addButton?.matIcon\"\n [label]=\"field().addButton?.label ?? 'Select a file'\"\n [title]=\"field().addButton?.title\"\n [ariaLabel]=\"field().addButton?.ariaLabel\"\n [disabled]=\"field().disabled\"\n (buttonClick)=\"fileInput.click()\"\n ></sot-mat-button>\n <input\n #fileInput\n hidden\n type=\"file\"\n [attr.id]=\"'file-upload-' + field().id\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n [multiple]=\"field().multiple\"\n />\n </div>\n</div>\n", styles: [".file-list-item{display:flex;flex-direction:row;gap:1rem;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MaterialButton, selector: "sot-mat-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
1215
+ ], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div class=\"sot-file-wrapper\">\n <label [ngClass]=\"field().labelClassName\"\n [for]=\"'file-upload-' + field().id\">{{ field().label }}</label>\n <div class=\"sot-file-list\">\n @if (field().multiple) {\n <ul>\n @for (item of fileList; track item) {\n <li class=\"file-list-item\">\n <div>\n <div>\n @if (item.srcUrl) {\n <img [src]=\"item.srcUrl\" [alt]=\"item!.file.name\"/>\n } @else {\n {{ item.file.name }}\n }\n </div>\n </div>\n <div>\n @if (!field().disabled) {\n <button matIconButton\n type=\"button\"\n (click)=\"deleteFile(item)\"\n title=\"Supprimer\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </li>\n }\n </ul>\n } @else {\n @if (fichier) {\n <div class=\"file-list-item\">\n <div>\n @if (fichier.srcUrl) {\n <img [src]=\"fichier.srcUrl\" [alt]=\"fichier.file.name\"/>\n } @else {\n {{ fichier.file.name }}\n }\n </div>\n @if (!field().disabled) {\n <sot-mat-button\n type=\"button\"\n [className]=\"field().deleteButton?.className\"\n [matType]=\"field().deleteButton?.matButtonType\"\n [matIcon]=\"field().deleteButton?.matIcon\"\n [label]=\"field().deleteButton?.label ?? 'Delete'\"\n [title]=\"field().deleteButton?.title\"\n [ariaLabel]=\"field().deleteButton?.ariaLabel\"\n (buttonClick)=\"confirmDeleteFile(fichier!)\"\n ></sot-mat-button>\n }\n </div>\n }\n }\n </div>\n <div class=\"sot-file-button\">\n <sot-mat-button\n type=\"button\"\n [className]=\"field().addButton?.className\"\n [matType]=\"field().addButton?.matButtonType\"\n [matIcon]=\"field().addButton?.matIcon\"\n [label]=\"field().addButton?.label ?? 'Select a file'\"\n [title]=\"field().addButton?.title\"\n [ariaLabel]=\"field().addButton?.ariaLabel\"\n [disabled]=\"field().disabled\"\n (buttonClick)=\"fileInput.click()\"\n ></sot-mat-button>\n <input\n #fileInput\n hidden\n type=\"file\"\n [attr.id]=\"'file-upload-' + field().id\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n [multiple]=\"field().multiple\"\n />\n </div>\n</div>\n", styles: [".file-list-item{display:flex;flex-direction:row;gap:1rem;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MaterialButton, selector: "sot-mat-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
1120
1216
  }
1121
1217
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatInputFileComponent, decorators: [{
1122
1218
  type: Component,
@@ -1126,7 +1222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1126
1222
  multi: true,
1127
1223
  useExisting: forwardRef(() => MatInputFileComponent),
1128
1224
  },
1129
- ], template: "<div class=\"sot-file-wrapper\">\n <label [ngClass]=\"field()?.labelClassName\"\n [for]=\"'file-upload-' + field().id\">{{ field().label }}</label>\n <div class=\"sot-file-list\">\n @if (field().multiple) {\n <ul>\n @for (item of fileList; track item) {\n <li class=\"file-list-item\">\n <div>\n <div>\n @if (item.srcUrl) {\n <img [src]=\"item.srcUrl\" [alt]=\"item!.file.name\"/>\n } @else {\n {{ item.file.name }}\n }\n </div>\n </div>\n <div>\n @if (!field().disabled) {\n <button mat-icon-button\n type=\"button\"\n (click)=\"deleteFile(item)\"\n title=\"Supprimer\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </li>\n }\n </ul>\n } @else {\n @if (fichier) {\n <div class=\"file-list-item\">\n <div>\n @if (fichier.srcUrl) {\n <img [src]=\"fichier.srcUrl\" [alt]=\"fichier.file.name\"/>\n } @else {\n {{ fichier.file.name }}\n }\n </div>\n @if (!field().disabled) {\n <sot-mat-button\n type=\"button\"\n [className]=\"field().deleteButton?.className\"\n [matType]=\"field().deleteButton?.matButtonType\"\n [matIcon]=\"field().deleteButton?.matIcon\"\n [label]=\"field().deleteButton?.label ?? 'Delete'\"\n [title]=\"field().deleteButton?.title\"\n [ariaLabel]=\"field().deleteButton?.ariaLabel\"\n (buttonClick)=\"confirmDeleteFile(fichier!)\"\n ></sot-mat-button>\n }\n </div>\n }\n }\n </div>\n <div class=\"sot-file-button\">\n <sot-mat-button\n type=\"button\"\n [className]=\"field().addButton?.className\"\n [matType]=\"field().addButton?.matButtonType\"\n [matIcon]=\"field().addButton?.matIcon\"\n [label]=\"field().addButton?.label ?? 'Select a file'\"\n [title]=\"field().addButton?.title\"\n [ariaLabel]=\"field().addButton?.ariaLabel\"\n [disabled]=\"field().disabled\"\n (buttonClick)=\"fileInput.click()\"\n ></sot-mat-button>\n <input\n #fileInput\n hidden\n type=\"file\"\n [attr.id]=\"'file-upload-' + field().id\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n [multiple]=\"field().multiple\"\n />\n </div>\n</div>\n", styles: [".file-list-item{display:flex;flex-direction:row;gap:1rem;align-items:center}\n"] }]
1225
+ ], template: "<div class=\"sot-file-wrapper\">\n <label [ngClass]=\"field().labelClassName\"\n [for]=\"'file-upload-' + field().id\">{{ field().label }}</label>\n <div class=\"sot-file-list\">\n @if (field().multiple) {\n <ul>\n @for (item of fileList; track item) {\n <li class=\"file-list-item\">\n <div>\n <div>\n @if (item.srcUrl) {\n <img [src]=\"item.srcUrl\" [alt]=\"item!.file.name\"/>\n } @else {\n {{ item.file.name }}\n }\n </div>\n </div>\n <div>\n @if (!field().disabled) {\n <button matIconButton\n type=\"button\"\n (click)=\"deleteFile(item)\"\n title=\"Supprimer\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </li>\n }\n </ul>\n } @else {\n @if (fichier) {\n <div class=\"file-list-item\">\n <div>\n @if (fichier.srcUrl) {\n <img [src]=\"fichier.srcUrl\" [alt]=\"fichier.file.name\"/>\n } @else {\n {{ fichier.file.name }}\n }\n </div>\n @if (!field().disabled) {\n <sot-mat-button\n type=\"button\"\n [className]=\"field().deleteButton?.className\"\n [matType]=\"field().deleteButton?.matButtonType\"\n [matIcon]=\"field().deleteButton?.matIcon\"\n [label]=\"field().deleteButton?.label ?? 'Delete'\"\n [title]=\"field().deleteButton?.title\"\n [ariaLabel]=\"field().deleteButton?.ariaLabel\"\n (buttonClick)=\"confirmDeleteFile(fichier!)\"\n ></sot-mat-button>\n }\n </div>\n }\n }\n </div>\n <div class=\"sot-file-button\">\n <sot-mat-button\n type=\"button\"\n [className]=\"field().addButton?.className\"\n [matType]=\"field().addButton?.matButtonType\"\n [matIcon]=\"field().addButton?.matIcon\"\n [label]=\"field().addButton?.label ?? 'Select a file'\"\n [title]=\"field().addButton?.title\"\n [ariaLabel]=\"field().addButton?.ariaLabel\"\n [disabled]=\"field().disabled\"\n (buttonClick)=\"fileInput.click()\"\n ></sot-mat-button>\n <input\n #fileInput\n hidden\n type=\"file\"\n [attr.id]=\"'file-upload-' + field().id\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n [multiple]=\"field().multiple\"\n />\n </div>\n</div>\n", styles: [".file-list-item{display:flex;flex-direction:row;gap:1rem;align-items:center}\n"] }]
1130
1226
  }], ctorParameters: () => [], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], fileInput: [{
1131
1227
  type: ViewChild,
1132
1228
  args: ['fileInput']
@@ -1134,11 +1230,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1134
1230
 
1135
1231
  class MatFieldFileComponent extends AbstractControlFieldComponent {
1136
1232
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldFileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1137
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldFileComponent, isStandalone: true, selector: "sot-mat-field-file", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-file\" [ngClass]=\"field.className\" [formGroup]=\"group\">\n <sot-mat-input-file [formControlName]=\"field.name\" [field]=\"field\"\n [group]=\"group\"></sot-mat-input-file>\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <mat-error>{{ validation.message }}</mat-error>\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatInputFileComponent, selector: "sot-mat-input-file", inputs: ["field", "group"] }] });
1233
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldFileComponent, isStandalone: true, selector: "sot-mat-field-file", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-file\" [ngClass]=\"field().className\" [formGroup]=\"group()\">\n <sot-mat-input-file [formControlName]=\"field().name\" [field]=\"field()\"\n [group]=\"group()\"></sot-mat-input-file>\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <mat-error>{{ validation.message }}</mat-error>\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatInputFileComponent, selector: "sot-mat-input-file", inputs: ["field", "group"] }] });
1138
1234
  }
1139
1235
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldFileComponent, decorators: [{
1140
1236
  type: Component,
1141
- args: [{ selector: 'sot-mat-field-file', standalone: true, imports: [ReactiveFormsModule, NgClass, MatError, MatInputFileComponent], template: "<div class=\"sot-formfield sot-formfield-file\" [ngClass]=\"field.className\" [formGroup]=\"group\">\n <sot-mat-input-file [formControlName]=\"field.name\" [field]=\"field\"\n [group]=\"group\"></sot-mat-input-file>\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <mat-error>{{ validation.message }}</mat-error>\n }\n }\n</div>\n" }]
1237
+ args: [{ selector: 'sot-mat-field-file', standalone: true, imports: [ReactiveFormsModule, NgClass, MatError, MatInputFileComponent], template: "<div class=\"sot-formfield sot-formfield-file\" [ngClass]=\"field().className\" [formGroup]=\"group()\">\n <sot-mat-input-file [formControlName]=\"field().name\" [field]=\"field()\"\n [group]=\"group()\"></sot-mat-input-file>\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <mat-error>{{ validation.message }}</mat-error>\n }\n }\n</div>\n" }]
1142
1238
  }] });
1143
1239
 
1144
1240
  class MatFieldChipsComponent extends AbstractControlFieldComponent {
@@ -1158,23 +1254,23 @@ class MatFieldChipsComponent extends AbstractControlFieldComponent {
1158
1254
  constructor() {
1159
1255
  super();
1160
1256
  effect(() => {
1161
- this.group.get(this.field.name)?.setValue(this.values());
1257
+ this.group().get(this.field().name)?.setValue(this.values());
1162
1258
  });
1163
1259
  }
1164
1260
  buttonAction(b) {
1165
- if (b.action && this.field && this.group) {
1166
- b.action(this.field, this.group, this.dynamicFormService.data);
1261
+ if (b.action) {
1262
+ b.action(this.field(), this.group(), this.data);
1167
1263
  }
1168
1264
  }
1169
1265
  ngOnInit() {
1170
1266
  super.ngOnInit();
1171
- if (this.field.options) {
1172
- this.options = this.field.options;
1267
+ if (this.field().options) {
1268
+ this.options = this.field().options;
1173
1269
  }
1174
- if (this.field.value) {
1175
- this.values.set(this.field.value);
1270
+ if (this.field().value) {
1271
+ this.values.set(this.field().value);
1176
1272
  }
1177
- const control = this.group.get(this.field.name);
1273
+ const control = this.group().get(this.field().name);
1178
1274
  if (control) {
1179
1275
  control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
1180
1276
  if (JSON.stringify(value) !== JSON.stringify(this.values())) {
@@ -1212,11 +1308,11 @@ class MatFieldChipsComponent extends AbstractControlFieldComponent {
1212
1308
  event.option.deselect();
1213
1309
  }
1214
1310
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldChipsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1215
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldChipsComponent, isStandalone: true, selector: "sot-mat-field-chips", inputs: { currentOption: { classPropertyName: "currentOption", publicName: "currentOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentOption: "currentOptionChange" }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n\r\n <mat-chip-grid #chipGrid aria-label=\"option selection\">\r\n @for (option of values(); track $index) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option }}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' + option\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n\r\n <input\r\n #chipsInput\r\n [id]=\"uuid\"\r\n name=\"option\"\r\n [(ngModel)]=\"currentOption\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field.readonly\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [matChipInputSeparatorKeyCodes]=\"field.separatorKeysCodes ?? separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event); chipsInput.value = ''\"\r\n >\r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event); chipsInput.value = ''\">\r\n @for (option of filteredOptions(); track option) {\r\n <mat-option [value]=\"option\">{{ option }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatChipsModule }, { kind: "component", type: i5.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1311
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldChipsComponent, isStandalone: true, selector: "sot-mat-field-chips", inputs: { currentOption: { classPropertyName: "currentOption", publicName: "currentOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentOption: "currentOptionChange" }, usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n\r\n <mat-chip-grid #chipGrid aria-label=\"option selection\">\r\n @for (option of values(); track $index) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option }}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' + option\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n\r\n <input\r\n #chipsInput\r\n [id]=\"uuid\"\r\n name=\"option\"\r\n [(ngModel)]=\"currentOption\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field().readonly\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [matChipInputSeparatorKeyCodes]=\"field().separatorKeysCodes ?? separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event); chipsInput.value = ''\"\r\n >\r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event); chipsInput.value = ''\">\r\n @for (option of filteredOptions(); track option) {\r\n <mat-option [value]=\"option\">{{ option }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatChipsModule }, { kind: "component", type: i5.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i3$2.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1216
1312
  }
1217
1313
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldChipsComponent, decorators: [{
1218
1314
  type: Component,
1219
- args: [{ selector: 'sot-mat-field-chips', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatButtonModule, MatChipsModule, MatAutocompleteModule, FormsModule], template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field.className\"\r\n [formGroup]=\"group\"\r\n>\r\n <mat-form-field>\r\n <mat-label><span [innerHTML]=\"field.label\"></span></mat-label>\r\n\r\n <mat-chip-grid #chipGrid aria-label=\"option selection\">\r\n @for (option of values(); track $index) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option }}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' + option\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n\r\n <input\r\n #chipsInput\r\n [id]=\"uuid\"\r\n name=\"option\"\r\n [(ngModel)]=\"currentOption\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field.readonly\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [matChipInputSeparatorKeyCodes]=\"field.separatorKeysCodes ?? separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event); chipsInput.value = ''\"\r\n >\r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event); chipsInput.value = ''\">\r\n @for (option of filteredOptions(); track option) {\r\n <mat-option [value]=\"option\">{{ option }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field.description) {\r\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
1315
+ args: [{ selector: 'sot-mat-field-chips', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatButtonModule, MatChipsModule, MatAutocompleteModule, FormsModule], template: "<div\r\n class=\"sot-formfield sot-formfield-input\"\r\n [ngClass]=\"field().className\"\r\n [formGroup]=\"group()\"\r\n>\r\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\r\n <mat-label><span [innerHTML]=\"field().label\"></span></mat-label>\r\n\r\n <mat-chip-grid #chipGrid aria-label=\"option selection\">\r\n @for (option of values(); track $index) {\r\n <mat-chip-row (removed)=\"remove(option)\">\r\n {{ option }}\r\n <button matChipRemove [attr.aria-label]=\"'remove ' + option\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n\r\n <input\r\n #chipsInput\r\n [id]=\"uuid\"\r\n name=\"option\"\r\n [(ngModel)]=\"currentOption\"\r\n [ngModelOptions]=\"{standalone: true}\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [type]=\"inputType\"\r\n [readonly]=\"field().readonly\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matAutocomplete]=\"auto\"\r\n [matChipInputSeparatorKeyCodes]=\"field().separatorKeysCodes ?? separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"add($event); chipsInput.value = ''\"\r\n >\r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event); chipsInput.value = ''\">\r\n @for (option of filteredOptions(); track option) {\r\n <mat-option [value]=\"option\">{{ option }}</mat-option>\r\n }\r\n </mat-autocomplete>\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\" matSuffix>\r\n @if (suffix.action) {\r\n <button type=\"button\" matButton\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n @if (field().description) {\r\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\r\n }\r\n\r\n @if (control && !control.untouched && control.invalid) {\r\n <mat-error>\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n </mat-form-field>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
1220
1316
  }], ctorParameters: () => [], propDecorators: { currentOption: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentOption", required: false }] }, { type: i0.Output, args: ["currentOptionChange"] }] } });
1221
1317
 
1222
1318
  class MatFieldDateComponent extends AbstractControlFieldComponent {
@@ -1226,41 +1322,41 @@ class MatFieldDateComponent extends AbstractControlFieldComponent {
1226
1322
  locale;
1227
1323
  ngOnInit() {
1228
1324
  super.ngOnInit();
1229
- this.locale = this.field.locale ?? 'en';
1325
+ this.locale = this.field().locale ?? 'en';
1230
1326
  this._adapter.setLocale(this.locale);
1231
- this.dateFormatString = this.field.format ?? 'YYYY/MM/DD';
1327
+ this.dateFormatString = this.field().format ?? 'YYYY/MM/DD';
1232
1328
  this.updateCloseButtonLabel();
1233
- const control = this.group.get(this.field.name);
1329
+ const control = this.group().get(this.field().name);
1234
1330
  if (control) {
1235
1331
  if (typeof control.value === 'string') {
1236
- //TODO control.setValue(moment(control.value, this.field.format));
1332
+ //TODO control.setValue(moment(control.value, this.field().format));
1237
1333
  }
1238
1334
  }
1239
1335
  }
1240
1336
  buttonAction(b) {
1241
- if (b.action && this.field && this.group) {
1242
- b.action(this.field, this.group, this.dynamicFormService.data);
1337
+ if (b.action) {
1338
+ b.action(this.field(), this.group(), this.data);
1243
1339
  }
1244
1340
  }
1245
1341
  filterDate = (d) => {
1246
- return this.field.filter ? this.field.filter(d, this.field, this.group) : true;
1342
+ return this.field().filter ? this.field().filter(d, this.field(), this.group()) : true;
1247
1343
  };
1248
1344
  updateCloseButtonLabel() {
1249
- if (this.field.closeCalendarLabel) {
1250
- this._intl.closeCalendarLabel = this.field.closeCalendarLabel;
1345
+ if (this.field().closeCalendarLabel) {
1346
+ this._intl.closeCalendarLabel = this.field().closeCalendarLabel;
1251
1347
  }
1252
1348
  this._intl.changes.next();
1253
1349
  }
1254
1350
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1255
1351
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatFieldDateComponent, isStandalone: true, selector: "sot-field-date", providers: [
1256
1352
  provideLuxonDateAdapter(),
1257
- ], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ac-form-field ac-form-field-date\"\n [ngClass]=\"field.className\"\n [formGroup]=\"group\"\n>\n <mat-form-field>\n <mat-label>\n {{ field.label }}\n </mat-label>\n <input matInput\n type=\"text\"\n [id]=\"uuid\"\n [matDatepicker]=\"picker\"\n [formControlName]=\"field.name\"\n [required]=\"!!required\"\n [readonly]=\"field.readonly\"\n [min]=\"field.minDate ? field.minDate : null\"\n [max]=\"field.maxDate ? field.maxDate : null\"\n [matDatepickerFilter]=\"filterDate\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker [touchUi]=\"!!field.touchUi\"></mat-datepicker>\n\n @for (prefix of field.prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{prefix.label}}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n @for (suffix of field.suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (suffix.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{suffix.label}}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n\n @if (field.description) {\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\n }\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field.validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".ac-form-field-date mat-form-field{width:100%}.ac-form-field-date mat-form-field[hidden]{display:none}.ac-form-field-date-prefix,.ac-form-field-date-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.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"] }] });
1353
+ ], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ac-form-field ac-form-field-date\"\n [ngClass]=\"field().className\"\n [formGroup]=\"group()\"\n>\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\n <mat-label>\n {{ field().label }}\n </mat-label>\n <input matInput\n type=\"text\"\n [id]=\"uuid\"\n [matDatepicker]=\"picker\"\n [formControlName]=\"field().name\"\n [required]=\"!!required\"\n [readonly]=\"field().readonly\"\n [min]=\"field().minDate ? field().minDate : null\"\n [max]=\"field().maxDate ? field().maxDate : null\"\n [matDatepickerFilter]=\"filterDate\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker [touchUi]=\"!!field().touchUi\"></mat-datepicker>\n\n @for (prefix of field().prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{prefix.label}}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n @for (suffix of field().suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (suffix.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{suffix.label}}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n\n @if (field().description) {\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\n }\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field().validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".ac-form-field-date mat-form-field{width:100%}.ac-form-field-date mat-form-field[hidden]{display:none}.ac-form-field-date-prefix,.ac-form-field-date-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$3.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$3.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.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: i4.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"] }] });
1258
1354
  }
1259
1355
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldDateComponent, decorators: [{
1260
1356
  type: Component,
1261
1357
  args: [{ selector: 'sot-field-date', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatDatepickerModule, MatInputModule, MatButtonModule], providers: [
1262
1358
  provideLuxonDateAdapter(),
1263
- ], template: "<div\n class=\"ac-form-field ac-form-field-date\"\n [ngClass]=\"field.className\"\n [formGroup]=\"group\"\n>\n <mat-form-field>\n <mat-label>\n {{ field.label }}\n </mat-label>\n <input matInput\n type=\"text\"\n [id]=\"uuid\"\n [matDatepicker]=\"picker\"\n [formControlName]=\"field.name\"\n [required]=\"!!required\"\n [readonly]=\"field.readonly\"\n [min]=\"field.minDate ? field.minDate : null\"\n [max]=\"field.maxDate ? field.maxDate : null\"\n [matDatepickerFilter]=\"filterDate\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker [touchUi]=\"!!field.touchUi\"></mat-datepicker>\n\n @for (prefix of field.prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{prefix.label}}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n @for (suffix of field.suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (suffix.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{suffix.label}}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n\n @if (field.description) {\n <mat-hint align=\"start\"> {{ field.description }}</mat-hint>\n }\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field.validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".ac-form-field-date mat-form-field{width:100%}.ac-form-field-date mat-form-field[hidden]{display:none}.ac-form-field-date-prefix,.ac-form-field-date-suffix{padding:0 .5rem}\n"] }]
1359
+ ], template: "<div\n class=\"ac-form-field ac-form-field-date\"\n [ngClass]=\"field().className\"\n [formGroup]=\"group()\"\n>\n <mat-form-field [appearance]=\"field().appearance ?? 'fill'\">\n <mat-label>\n {{ field().label }}\n </mat-label>\n <input matInput\n type=\"text\"\n [id]=\"uuid\"\n [matDatepicker]=\"picker\"\n [formControlName]=\"field().name\"\n [required]=\"!!required\"\n [readonly]=\"field().readonly\"\n [min]=\"field().minDate ? field().minDate : null\"\n [max]=\"field().maxDate ? field().maxDate : null\"\n [matDatepickerFilter]=\"filterDate\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker [touchUi]=\"!!field().touchUi\"></mat-datepicker>\n\n @for (prefix of field().prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{prefix.label}}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n @for (suffix of field().suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\" matSuffix>\n @if (suffix.action) {\n <button type=\"button\" matButton\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{suffix.label}}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n\n @if (field().description) {\n <mat-hint align=\"start\"> {{ field().description }}</mat-hint>\n }\n @if (control && !control.untouched && control.invalid) {\n <mat-error>\n @for (validation of field().validations; track validation) {\n @if (control.hasError(validation.name)) {\n {{ validation.message }}\n }\n }\n </mat-error>\n }\n </mat-form-field>\n</div>\n", styles: [".ac-form-field-date mat-form-field{width:100%}.ac-form-field-date mat-form-field[hidden]{display:none}.ac-form-field-date-prefix,.ac-form-field-date-suffix{padding:0 .5rem}\n"] }]
1264
1360
  }] });
1265
1361
 
1266
1362
  const components$2 = {
@@ -1293,6 +1389,7 @@ class AcDynamicFieldDirective {
1293
1389
  field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
1294
1390
  group = input.required(...(ngDevMode ? [{ debugName: "group" }] : []));
1295
1391
  instancePath = input(...(ngDevMode ? [undefined, { debugName: "instancePath" }] : []));
1392
+ data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
1296
1393
  component;
1297
1394
  ngOnChanges(changes) {
1298
1395
  if (!components$2[this.field().type]) {
@@ -1307,14 +1404,15 @@ class AcDynamicFieldDirective {
1307
1404
  environmentInjector: this.injector
1308
1405
  });
1309
1406
  }
1310
- this.component.instance.field = this.field();
1311
- this.component.instance.group = this.group();
1407
+ this.component.instance.field = this.field;
1408
+ this.component.instance.group = this.group;
1312
1409
  this.component.instance.instancePath = this.instancePath();
1313
1410
  this.component.instance.path = this.path();
1411
+ this.component.instance.data = this.data();
1314
1412
  }
1315
1413
  }
1316
1414
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcDynamicFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1317
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: AcDynamicFieldDirective, isStandalone: true, selector: "[matDynamicField]", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: true, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null }, instancePath: { classPropertyName: "instancePath", publicName: "instancePath", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 });
1415
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: AcDynamicFieldDirective, isStandalone: true, selector: "[matDynamicField]", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, path: { classPropertyName: "path", publicName: "path", isSignal: true, isRequired: true, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null }, instancePath: { classPropertyName: "instancePath", publicName: "instancePath", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 });
1318
1416
  }
1319
1417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcDynamicFieldDirective, decorators: [{
1320
1418
  type: Directive,
@@ -1322,7 +1420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1322
1420
  selector: "[matDynamicField]",
1323
1421
  standalone: true
1324
1422
  }]
1325
- }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "path", required: true }] }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], instancePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "instancePath", required: false }] }] } });
1423
+ }], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], path: [{ type: i0.Input, args: [{ isSignal: true, alias: "path", required: true }] }], field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], instancePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "instancePath", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
1326
1424
 
1327
1425
  class MaterialDynamicFormComponent {
1328
1426
  dynamicFormService = inject(DynamicFormService);
@@ -1336,6 +1434,9 @@ class MaterialDynamicFormComponent {
1336
1434
  get form() {
1337
1435
  return this.dynamicFormService.form;
1338
1436
  }
1437
+ get data() {
1438
+ return this.dynamicFormService.data;
1439
+ }
1339
1440
  get controls() {
1340
1441
  return this.form ? this.form.controls : null;
1341
1442
  }
@@ -1402,11 +1503,11 @@ class MaterialDynamicFormComponent {
1402
1503
  // TODO
1403
1504
  }
1404
1505
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1405
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialDynamicFormComponent, isStandalone: true, selector: "sot-material-dynamic-form", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formCancel: "formCancel", formSubmit: "formSubmit", formChange: "formChange", formInit: "formInit" }, providers: [DynamicFormService], exportAs: ["dynamicForm"], ngImport: i0, template: "@if (form && config()) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n (submit)=\"handleSubmit($event)\"\r\n [ngClass]=\"config()!.className?.form\">\r\n @if (this.config()!.fields) {\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"config()!.className?.formContent\">\r\n @for (field of config()!.fields; track field.type + field.name) {\r\n <div [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- TODO Revoir l'affichage des erreurs -->\r\n @if (config()!.validations && form && !form.untouched && form.invalid) {\r\n <mat-error class=\"dynamic-form-error\">\r\n @for (validation of config()!.validations!; track validation) {\r\n @if (form.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n @if (config()!.buttons) {\r\n <div class=\"dynamic-form-buttons\" [ngClass]=\"config()!.className?.formButtons\">\r\n @for (button of config()!.buttons; track $index) {\r\n <sot-mat-button\r\n [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form?.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n }\r\n </form>\r\n}\r\n", styles: [".dynamic-form-horizontal{display:flex;flex-direction:row;flex-wrap:wrap}.dynamic-form-buttons{display:flex;flex-direction:row;gap:2rem;margin-bottom:2rem}.dynamic-form-error{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: AcDynamicFieldDirective, selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: MaterialButton, selector: "sot-mat-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
1506
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialDynamicFormComponent, isStandalone: true, selector: "sot-material-dynamic-form", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formCancel: "formCancel", formSubmit: "formSubmit", formChange: "formChange", formInit: "formInit" }, providers: [DynamicFormService], exportAs: ["dynamicForm"], ngImport: i0, template: "@if (form && config()) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n (submit)=\"handleSubmit($event)\"\r\n [ngClass]=\"config()!.className?.form\">\r\n @if (this.config()!.fields) {\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"config()!.className?.formContent\">\r\n @for (field of config()!.fields; track field.type + field.name) {\r\n <div [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n [data]=\"data\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- TODO Revoir l'affichage des erreurs -->\r\n @if (config()!.validations && form && !form.untouched && form.invalid) {\r\n <mat-error class=\"dynamic-form-error\">\r\n @for (validation of config()!.validations!; track validation) {\r\n @if (form.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n @if (config()!.buttons) {\r\n <div class=\"dynamic-form-buttons\" [ngClass]=\"config()!.className?.formButtons\">\r\n @for (button of config()!.buttons; track $index) {\r\n <sot-mat-button\r\n [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n }\r\n </form>\r\n}\r\n", styles: [".dynamic-form-horizontal{display:flex;flex-direction:row;flex-wrap:wrap}.dynamic-form-buttons{display:flex;flex-direction:row;gap:2rem;margin-bottom:2rem}.dynamic-form-error{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: AcDynamicFieldDirective, selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath", "data"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: MaterialButton, selector: "sot-mat-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
1406
1507
  }
1407
1508
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormComponent, decorators: [{
1408
1509
  type: Component,
1409
- args: [{ exportAs: 'dynamicForm', selector: 'sot-material-dynamic-form', standalone: true, imports: [AcDynamicFieldDirective, NgClass, ReactiveFormsModule, MatError, MatIconModule, MatButtonModule, MaterialButton], providers: [DynamicFormService], template: "@if (form && config()) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n (submit)=\"handleSubmit($event)\"\r\n [ngClass]=\"config()!.className?.form\">\r\n @if (this.config()!.fields) {\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"config()!.className?.formContent\">\r\n @for (field of config()!.fields; track field.type + field.name) {\r\n <div [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- TODO Revoir l'affichage des erreurs -->\r\n @if (config()!.validations && form && !form.untouched && form.invalid) {\r\n <mat-error class=\"dynamic-form-error\">\r\n @for (validation of config()!.validations!; track validation) {\r\n @if (form.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n @if (config()!.buttons) {\r\n <div class=\"dynamic-form-buttons\" [ngClass]=\"config()!.className?.formButtons\">\r\n @for (button of config()!.buttons; track $index) {\r\n <sot-mat-button\r\n [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form?.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n }\r\n </form>\r\n}\r\n", styles: [".dynamic-form-horizontal{display:flex;flex-direction:row;flex-wrap:wrap}.dynamic-form-buttons{display:flex;flex-direction:row;gap:2rem;margin-bottom:2rem}.dynamic-form-error{margin-bottom:2rem}\n"] }]
1510
+ args: [{ exportAs: 'dynamicForm', selector: 'sot-material-dynamic-form', standalone: true, imports: [AcDynamicFieldDirective, NgClass, ReactiveFormsModule, MatError, MatIconModule, MatButtonModule, MaterialButton], providers: [DynamicFormService], template: "@if (form && config()) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n (submit)=\"handleSubmit($event)\"\r\n [ngClass]=\"config()!.className?.form\">\r\n @if (this.config()!.fields) {\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"config()!.className?.formContent\">\r\n @for (field of config()!.fields; track field.type + field.name) {\r\n <div [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n [data]=\"data\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- TODO Revoir l'affichage des erreurs -->\r\n @if (config()!.validations && form && !form.untouched && form.invalid) {\r\n <mat-error class=\"dynamic-form-error\">\r\n @for (validation of config()!.validations!; track validation) {\r\n @if (form.hasError(validation.name)) {\r\n {{ validation.message }}\r\n }\r\n }\r\n </mat-error>\r\n }\r\n @if (config()!.buttons) {\r\n <div class=\"dynamic-form-buttons\" [ngClass]=\"config()!.className?.formButtons\">\r\n @for (button of config()!.buttons; track $index) {\r\n <sot-mat-button\r\n [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n }\r\n </form>\r\n}\r\n", styles: [".dynamic-form-horizontal{display:flex;flex-direction:row;flex-wrap:wrap}.dynamic-form-buttons{display:flex;flex-direction:row;gap:2rem;margin-bottom:2rem}.dynamic-form-error{margin-bottom:2rem}\n"] }]
1410
1511
  }], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], initialValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialValues", required: false }] }], formCancel: [{ type: i0.Output, args: ["formCancel"] }], formSubmit: [{ type: i0.Output, args: ["formSubmit"] }], formChange: [{ type: i0.Output, args: ["formChange"] }], formInit: [{ type: i0.Output, args: ["formInit"] }] } });
1411
1512
 
1412
1513
  class MaterialDynamicFormModalComponent {
@@ -1418,6 +1519,9 @@ class MaterialDynamicFormModalComponent {
1418
1519
  get form() {
1419
1520
  return this.dynamicFormService.form;
1420
1521
  }
1522
+ get formData() {
1523
+ return this.dynamicFormService.data;
1524
+ }
1421
1525
  constructor() {
1422
1526
  this.dynamicFormService.createForm(this.data.fields, this.data.validations, this.data.updateOn ?? "change", this.data.initialObject);
1423
1527
  }
@@ -1440,42 +1544,149 @@ class MaterialDynamicFormModalComponent {
1440
1544
  }
1441
1545
  }
1442
1546
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1443
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialDynamicFormModalComponent, isStandalone: true, selector: "ac-dynamic-form-modal", providers: [DynamicFormService], ngImport: i0, template: "<h2 class=\"modal-title\" matDialogTitle> {{ data.title }}</h2>\r\n\r\n<div matDialogContent>\r\n @if (data.description) {\r\n <p [innerHTML]=\"data.description\"></p>\r\n }\r\n @if (form) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n [ngClass]=\"data.className?.form\">\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"data.className?.formContent\">\r\n @for (field of data.fields; track field) {\r\n <div\r\n [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n }\r\n @if (message) {\r\n <div [innerHTML]=\"message\"\r\n [ngClass]=\"{'message-success': status === 'OK', 'message-error': status === 'ERROR'}\"\r\n ></div>\r\n }\r\n</div>\r\n\r\n<div matDialogActions>\r\n <div class=\"modal-action-buttons\" [ngClass]=\"data.className?.formButtons\">\r\n @for (button of data.buttons; track $index) {\r\n <sot-mat-button\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form?.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: AcDynamicFieldDirective, selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "component", type: MaterialButton, selector: "sot-mat-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
1547
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialDynamicFormModalComponent, isStandalone: true, selector: "ac-dynamic-form-modal", providers: [DynamicFormService], ngImport: i0, template: "<h2 class=\"modal-title\" matDialogTitle> {{ data.title }}</h2>\r\n\r\n<div matDialogContent>\r\n @if (data.description) {\r\n <p [innerHTML]=\"data.description\"></p>\r\n }\r\n @if (form) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n [ngClass]=\"data.className?.form\">\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"data.className?.formContent\">\r\n @for (field of data.fields; track field) {\r\n <div\r\n [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n [data]=\"formData\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n }\r\n @if (message) {\r\n <div [innerHTML]=\"message\"\r\n [ngClass]=\"{'message-success': status === 'OK', 'message-error': status === 'ERROR'}\"\r\n ></div>\r\n }\r\n</div>\r\n\r\n<div matDialogActions>\r\n <div class=\"modal-action-buttons\" [ngClass]=\"data.className?.formButtons\">\r\n @for (button of data.buttons; track $index) {\r\n <sot-mat-button\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form?.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: AcDynamicFieldDirective, selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath", "data"] }, { kind: "component", type: MaterialButton, selector: "sot-mat-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
1444
1548
  }
1445
1549
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormModalComponent, decorators: [{
1446
1550
  type: Component,
1447
- args: [{ selector: "ac-dynamic-form-modal", standalone: true, imports: [NgClass, ReactiveFormsModule, MatIconModule, MatButtonModule, MatDialogModule, AcDynamicFieldDirective, MaterialButton], providers: [DynamicFormService], template: "<h2 class=\"modal-title\" matDialogTitle> {{ data.title }}</h2>\r\n\r\n<div matDialogContent>\r\n @if (data.description) {\r\n <p [innerHTML]=\"data.description\"></p>\r\n }\r\n @if (form) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n [ngClass]=\"data.className?.form\">\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"data.className?.formContent\">\r\n @for (field of data.fields; track field) {\r\n <div\r\n [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n }\r\n @if (message) {\r\n <div [innerHTML]=\"message\"\r\n [ngClass]=\"{'message-success': status === 'OK', 'message-error': status === 'ERROR'}\"\r\n ></div>\r\n }\r\n</div>\r\n\r\n<div matDialogActions>\r\n <div class=\"modal-action-buttons\" [ngClass]=\"data.className?.formButtons\">\r\n @for (button of data.buttons; track $index) {\r\n <sot-mat-button\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form?.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n</div>\r\n" }]
1551
+ args: [{ selector: "ac-dynamic-form-modal", standalone: true, imports: [NgClass, ReactiveFormsModule, MatIconModule, MatButtonModule, MatDialogModule, AcDynamicFieldDirective, MaterialButton], providers: [DynamicFormService], template: "<h2 class=\"modal-title\" matDialogTitle> {{ data.title }}</h2>\r\n\r\n<div matDialogContent>\r\n @if (data.description) {\r\n <p [innerHTML]=\"data.description\"></p>\r\n }\r\n @if (form) {\r\n <form class=\"dynamic-form\"\r\n [formGroup]=\"form\"\r\n [ngClass]=\"data.className?.form\">\r\n <div class=\"dynamic-form-content\"\r\n [ngClass]=\"data.className?.formContent\">\r\n @for (field of data.fields; track field) {\r\n <div\r\n [hidden]=\"!!field.hidden\"\r\n [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"form\"\r\n [data]=\"formData\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n </form>\r\n }\r\n @if (message) {\r\n <div [innerHTML]=\"message\"\r\n [ngClass]=\"{'message-success': status === 'OK', 'message-error': status === 'ERROR'}\"\r\n ></div>\r\n }\r\n</div>\r\n\r\n<div matDialogActions>\r\n <div class=\"modal-action-buttons\" [ngClass]=\"data.className?.formButtons\">\r\n @for (button of data.buttons; track $index) {\r\n <sot-mat-button\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType\"\r\n [disabled]=\"button.disabledIfFormNoValid && form?.invalid\"\r\n [matIcon]=\"button.matIcon\"\r\n [label]=\"button.label\"\r\n [title]=\"button.title\"\r\n [ariaLabel]=\"button.ariaLabel\"\r\n (buttonClick)=\"onClickButton(button)\"\r\n ></sot-mat-button>\r\n }\r\n </div>\r\n</div>\r\n" }]
1448
1552
  }], ctorParameters: () => [] });
1449
1553
 
1554
+ class MaterialDynamicFormStepperComponent {
1555
+ dynamicFormService = inject(DynamicFormService);
1556
+ destroyRef = inject(DestroyRef);
1557
+ cdr = inject(ChangeDetectorRef);
1558
+ breakpointObserver = inject(BreakpointObserver);
1559
+ stepper;
1560
+ config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
1561
+ initialValues = input(...(ngDevMode ? [undefined, { debugName: "initialValues" }] : []));
1562
+ formCancel = output();
1563
+ formSubmit = output();
1564
+ formChange = output();
1565
+ stepperOrientation = new BehaviorSubject('horizontal');
1566
+ get form() {
1567
+ return this.dynamicFormService.form;
1568
+ }
1569
+ get data() {
1570
+ return this.dynamicFormService.data;
1571
+ }
1572
+ get controls() {
1573
+ return this.form ? this.form.controls : null;
1574
+ }
1575
+ get changes() {
1576
+ return this.form ? this.form.valueChanges : null;
1577
+ }
1578
+ get valid() {
1579
+ return this.form ? this.form.valid : null;
1580
+ }
1581
+ get value() {
1582
+ return this.form ? this.form.value : null;
1583
+ }
1584
+ ngOnInit() {
1585
+ this.dynamicFormService.createFormStepper(this.config().steps, this.config().validations, this.config().updateOn, this.initialValues);
1586
+ this.onValueChanges();
1587
+ this.form.valueChanges
1588
+ .pipe(distinctUntilChanged(), debounceTime(this.config().debounceTime ?? 0), takeUntilDestroyed(this.destroyRef))
1589
+ .subscribe(() => {
1590
+ this.onValueChanges();
1591
+ });
1592
+ if (this.config().orientation === 'responsive') {
1593
+ const breakpoint = this.config().responsiveBreakpoint ?? '800px';
1594
+ this.breakpointObserver
1595
+ .observe('(min-width: ' + breakpoint + ')')
1596
+ .pipe(map(({ matches }) => (matches ? 'horizontal' : 'vertical')))
1597
+ .subscribe(this.stepperOrientation);
1598
+ }
1599
+ else if (this.config().orientation) {
1600
+ this.stepperOrientation.next(this.config().orientation);
1601
+ }
1602
+ }
1603
+ getSubGroup(stepName) {
1604
+ return this.form.controls[stepName];
1605
+ }
1606
+ onValueChanges() {
1607
+ this.formChange.emit(this.form);
1608
+ if (this.config().onValueChanges) {
1609
+ this.config().onValueChanges(this.form, this.config().steps);
1610
+ this.cdr.detectChanges();
1611
+ }
1612
+ }
1613
+ ngOnChanges(changes) {
1614
+ if (changes["initialValues"] && this.form) {
1615
+ this.setValue(this.initialValues);
1616
+ }
1617
+ }
1618
+ setValue(values) {
1619
+ this.form.setValue(values);
1620
+ this.form.updateValueAndValidity();
1621
+ }
1622
+ onClickButton(button) {
1623
+ if (button.type === 'reset') {
1624
+ this.reset();
1625
+ }
1626
+ else if (button.type === 'submit') {
1627
+ this.formSubmit.emit(this.form);
1628
+ }
1629
+ if (button.action) {
1630
+ button.action(this.form);
1631
+ }
1632
+ }
1633
+ reset() {
1634
+ this.form.reset();
1635
+ this.stepper.reset();
1636
+ this.formCancel.emit();
1637
+ }
1638
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1639
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialDynamicFormStepperComponent, isStandalone: true, selector: "sot-material-dynamic-form-stepper", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formCancel: "formCancel", formSubmit: "formSubmit", formChange: "formChange" }, providers: [
1640
+ DynamicFormService, {
1641
+ provide: STEPPER_GLOBAL_OPTIONS,
1642
+ useValue: { showError: true, displayDefaultIndicatorType: false },
1643
+ }
1644
+ ], viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true }], exportAs: ["dynamicFormStepper"], usesOnChanges: true, ngImport: i0, template: "@if (form) {\r\n <form [formGroup]=\"form\"\r\n class=\"dynamic-form-stepper\"\r\n [ngClass]=\"config().className\"\r\n >\r\n <mat-stepper #stepper\r\n [linear]=\"config().linear\"\r\n [orientation]=\"(stepperOrientation | async)!\">\r\n @for (step of config().steps; track step.name; let stepFirst = $first; let stepLast = $last) {\r\n <mat-step [stepControl]=\"form.controls[step.name]\"\r\n [formGroup]=\"getSubGroup(step.name)\"\r\n [errorMessage]=\"step.errorMessage ?? ''\">\r\n <ng-template matStepLabel>{{ step.label }}</ng-template>\r\n <ng-template matStepContent>\r\n <div class=\"dynamic-form-stepper-content\"\r\n [ngClass]=\"config().className?.formContent\">\r\n @for (field of step.fields; track field.name) {\r\n <div [hidden]=\"!!field.hidden\" [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"getSubGroup(step.name)\"\r\n [data]=\"data\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (config()!.buttons) {\r\n <div class=\"dynamic-form-stepper-buttons\" [ngClass]=\"config().className?.formButtons\">\r\n @for (button of config().buttons; track $index) {\r\n\r\n @if (button.type === 'previous' && !stepFirst) {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n matStepperPrevious\r\n type=\"button\"\r\n [ngClass]=\"button.className\"\r\n [disabled]=\"button.disabledIfFormNoValid && getSubGroup(step.name).invalid\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n } @else if (button.type === 'next' && !stepLast) {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n matStepperNext\r\n type=\"button\"\r\n [ngClass]=\"button.className\"\r\n [disabled]=\"button.disabledIfFormNoValid && getSubGroup(step.name).invalid\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n [attr.aria-label]=\"button.ariaLabel\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n } @else if ((button.type === 'submit' || button.type === 'reset') && stepLast) {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n [type]=\"button.type\"\r\n [ngClass]=\"button.className\"\r\n [disabled]=\"button.disabledIfFormNoValid && getSubGroup(step.name).invalid\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n [attr.aria-label]=\"button.ariaLabel\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n } @else if (button.type === 'button') {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n [type]=\"button.type\"\r\n [ngClass]=\"button.className\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n [attr.aria-label]=\"button.ariaLabel\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </mat-step>\r\n }\r\n </mat-stepper>\r\n </form>\r\n}\r\n", styles: [":host{display:flex;flex-direction:column;flex:1}.dynamic-form-stepper-buttons{display:flex;flex-direction:row;gap:2rem;margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: AcDynamicFieldDirective, selector: "[matDynamicField]", inputs: ["type", "path", "field", "group", "instancePath", "data"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.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: MatSidenavModule }, { kind: "ngmodule", type: MatListModule }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i4$1.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i4$1.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "directive", type: i4$1.MatStepContent, selector: "ng-template[matStepContent]" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
1645
+ }
1646
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormStepperComponent, decorators: [{
1647
+ type: Component,
1648
+ args: [{ exportAs: "dynamicFormStepper", selector: "sot-material-dynamic-form-stepper", standalone: true, imports: [AcDynamicFieldDirective, NgClass, ReactiveFormsModule,
1649
+ MatIconModule, MatButtonModule, MatSidenavModule, MatListModule,
1650
+ MatStepperModule, AsyncPipe, MatStepperPrevious, MatStepperNext, MatIcon], providers: [
1651
+ DynamicFormService, {
1652
+ provide: STEPPER_GLOBAL_OPTIONS,
1653
+ useValue: { showError: true, displayDefaultIndicatorType: false },
1654
+ }
1655
+ ], template: "@if (form) {\r\n <form [formGroup]=\"form\"\r\n class=\"dynamic-form-stepper\"\r\n [ngClass]=\"config().className\"\r\n >\r\n <mat-stepper #stepper\r\n [linear]=\"config().linear\"\r\n [orientation]=\"(stepperOrientation | async)!\">\r\n @for (step of config().steps; track step.name; let stepFirst = $first; let stepLast = $last) {\r\n <mat-step [stepControl]=\"form.controls[step.name]\"\r\n [formGroup]=\"getSubGroup(step.name)\"\r\n [errorMessage]=\"step.errorMessage ?? ''\">\r\n <ng-template matStepLabel>{{ step.label }}</ng-template>\r\n <ng-template matStepContent>\r\n <div class=\"dynamic-form-stepper-content\"\r\n [ngClass]=\"config().className?.formContent\">\r\n @for (field of step.fields; track field.name) {\r\n <div [hidden]=\"!!field.hidden\" [ngClass]=\"field.hostClassName\">\r\n <ng-container\r\n matDynamicField\r\n [path]=\"field.name\"\r\n [type]=\"field.type\"\r\n [field]=\"field\"\r\n [group]=\"getSubGroup(step.name)\"\r\n [data]=\"data\"\r\n >\r\n </ng-container>\r\n </div>\r\n }\r\n </div>\r\n @if (config()!.buttons) {\r\n <div class=\"dynamic-form-stepper-buttons\" [ngClass]=\"config().className?.formButtons\">\r\n @for (button of config().buttons; track $index) {\r\n\r\n @if (button.type === 'previous' && !stepFirst) {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n matStepperPrevious\r\n type=\"button\"\r\n [ngClass]=\"button.className\"\r\n [disabled]=\"button.disabledIfFormNoValid && getSubGroup(step.name).invalid\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n } @else if (button.type === 'next' && !stepLast) {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n matStepperNext\r\n type=\"button\"\r\n [ngClass]=\"button.className\"\r\n [disabled]=\"button.disabledIfFormNoValid && getSubGroup(step.name).invalid\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n [attr.aria-label]=\"button.ariaLabel\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n } @else if ((button.type === 'submit' || button.type === 'reset') && stepLast) {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n [type]=\"button.type\"\r\n [ngClass]=\"button.className\"\r\n [disabled]=\"button.disabledIfFormNoValid && getSubGroup(step.name).invalid\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n [attr.aria-label]=\"button.ariaLabel\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n } @else if (button.type === 'button') {\r\n <button [matButton]=\"button.matButtonAppearance ?? 'text'\"\r\n [type]=\"button.type\"\r\n [ngClass]=\"button.className\"\r\n (click)=\"onClickButton(button)\"\r\n [title]=\"button.title ? button.title : ''\"\r\n [attr.aria-label]=\"button.ariaLabel\"\r\n >\r\n @if (button.matIcon) {\r\n <mat-icon>\r\n {{ button.matIcon }}\r\n </mat-icon>\r\n }\r\n {{ button.label }}\r\n </button>\r\n }\r\n }\r\n </div>\r\n }\r\n </ng-template>\r\n </mat-step>\r\n }\r\n </mat-stepper>\r\n </form>\r\n}\r\n", styles: [":host{display:flex;flex-direction:column;flex:1}.dynamic-form-stepper-buttons{display:flex;flex-direction:row;gap:2rem;margin-bottom:2rem}\n"] }]
1656
+ }], propDecorators: { stepper: [{
1657
+ type: ViewChild,
1658
+ args: ['stepper']
1659
+ }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], initialValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialValues", required: false }] }], formCancel: [{ type: i0.Output, args: ["formCancel"] }], formSubmit: [{ type: i0.Output, args: ["formSubmit"] }], formChange: [{ type: i0.Output, args: ["formChange"] }] } });
1660
+
1450
1661
  class DsfrDivTextComponent extends AbstractFieldComponent {
1451
1662
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDivTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1452
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrDivTextComponent, isStandalone: true, selector: "sot-dsfr-div-text", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field.className\">\n <div [innerHTML]=\"field.label\"></div>\n @if(field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1663
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrDivTextComponent, isStandalone: true, selector: "sot-dsfr-div-text", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field().className\">\n <div [innerHTML]=\"field().label\"></div>\n @if(field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1453
1664
  }
1454
1665
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDivTextComponent, decorators: [{
1455
1666
  type: Component,
1456
- args: [{ selector: 'sot-dsfr-div-text', standalone: true, imports: [NgClass], template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field.className\">\n <div [innerHTML]=\"field.label\"></div>\n @if(field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n</div>\n" }]
1667
+ args: [{ selector: 'sot-dsfr-div-text', standalone: true, imports: [NgClass], template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field().className\">\n <div [innerHTML]=\"field().label\"></div>\n @if(field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n</div>\n" }]
1457
1668
  }] });
1458
1669
 
1459
1670
  class DsfrFieldCheckboxComponent extends AbstractControlFieldComponent {
1460
1671
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1461
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldCheckboxComponent, isStandalone: true, selector: "sot-dsfr-field-checkbox", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-checkbox-group\"\r\n [ngClass]=\"{\r\n 'fr-checkbox-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox-group--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox-group--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field.name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'fr-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }] });
1672
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldCheckboxComponent, isStandalone: true, selector: "sot-dsfr-field-checkbox", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-checkbox-group\"\r\n [ngClass]=\"{\r\n 'fr-checkbox-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox-group--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox-group--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field().name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'fr-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }] });
1462
1673
  }
1463
1674
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldCheckboxComponent, decorators: [{
1464
1675
  type: Component,
1465
- args: [{ selector: 'sot-dsfr-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule], template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-checkbox-group\"\r\n [ngClass]=\"{\r\n 'fr-checkbox-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox-group--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox-group--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field.name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'fr-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"] }]
1676
+ args: [{ selector: 'sot-dsfr-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule], template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-checkbox-group\"\r\n [ngClass]=\"{\r\n 'fr-checkbox-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox-group--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox-group--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field().name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'fr-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-checkbox--valid': control && !control.untouched && control.valid,\r\n 'fr-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".error-wrapper{padding:0 16px;font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));color:var(--mat-form-field-error-text-color, var(--mat-sys-error));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-app-body-small-line-height))}\n"] }]
1466
1677
  }] });
1467
1678
 
1468
1679
  class DsfrFieldInputComponent extends AbstractControlFieldComponent {
1469
1680
  inputType = 'text';
1470
1681
  buttonAction(b) {
1471
- if (b.action && this.field && this.group) {
1472
- b.action(this.field, this.group, this.dynamicFormService.data);
1682
+ if (b.action) {
1683
+ b.action(this.field(), this.group(), this.data);
1473
1684
  }
1474
1685
  }
1475
1686
  ngOnInit() {
1476
1687
  super.ngOnInit();
1477
- this.inputType = this.field.inputType ?? 'text';
1478
- const control = this.group.get(this.field.name);
1688
+ this.inputType = this.field().inputType ?? 'text';
1689
+ const control = this.group().get(this.field().name);
1479
1690
  if (control) {
1480
1691
  control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
1481
1692
  if (value?.length == 0) {
@@ -1485,47 +1696,43 @@ class DsfrFieldInputComponent extends AbstractControlFieldComponent {
1485
1696
  }
1486
1697
  }
1487
1698
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1488
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldInputComponent, isStandalone: true, selector: "sot-dsfr-field-input", usesInheritance: true, ngImport: i0, template: "<div class=\"form-field-input\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled) || field.readonly,\r\n }\"\r\n [type]=\"field.inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [readonly]=\"field.readonly\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatButtonModule }] });
1699
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldInputComponent, isStandalone: true, selector: "sot-dsfr-field-input", usesInheritance: true, ngImport: i0, template: "<div class=\"form-field-input\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled) || field().readonly,\r\n }\"\r\n [type]=\"field().inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [readonly]=\"field().readonly\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatButtonModule }] });
1489
1700
  }
1490
1701
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldInputComponent, decorators: [{
1491
1702
  type: Component,
1492
- args: [{ selector: 'sot-dsfr-field-input', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div class=\"form-field-input\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled) || field.readonly,\r\n }\"\r\n [type]=\"field.inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [readonly]=\"field.readonly\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
1703
+ args: [{ selector: 'sot-dsfr-field-input', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div class=\"form-field-input\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled) || field().readonly,\r\n }\"\r\n [type]=\"field().inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [readonly]=\"field().readonly\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
1493
1704
  }] });
1494
1705
 
1495
1706
  class DsfrGroupComponent extends AbstractControlFieldComponent {
1496
1707
  get subGroup() {
1497
- return this.group.controls[this.field.name];
1708
+ return this.group().controls[this.field().name];
1498
1709
  }
1499
1710
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1500
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrGroupComponent, isStandalone: true, selector: "sot-dsfr-group", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'fr-accordion': field.accordion,\n }\"\n >\n @if (field.accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'group-content-' + field.name\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'group-content-' + field.name\">\n @if (field.description) {\n <p class=\"fr-hint-text\">{{ field.description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n } @else {\n <legend [ngClass]=\"field.labelClassName\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n </legend>\n <div *ngTemplateOutlet=\"groupFields\"></div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"\">\n @for (f of field.fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => DsfrDynamicFieldDirective), selector: "[dsfrDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1711
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrGroupComponent, isStandalone: true, selector: "sot-dsfr-group", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'fr-accordion': field().accordion,\n }\"\n >\n @if (field().accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'group-content-' + field().name\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'group-content-' + field().name\">\n @if (field().description) {\n <p class=\"fr-hint-text\">{{ field().description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n } @else {\n <legend [ngClass]=\"field().labelClassName\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n </legend>\n <div *ngTemplateOutlet=\"groupFields\"></div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"\">\n @for (f of field().fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => DsfrDynamicFieldDirective), selector: "[dsfrDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1501
1712
  }
1502
1713
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrGroupComponent, decorators: [{
1503
1714
  type: Component,
1504
1715
  args: [{ selector: 'sot-dsfr-group', standalone: true, imports: [
1505
1716
  forwardRef(() => DsfrDynamicFieldDirective),
1506
1717
  NgClass,
1507
- MatAccordion,
1508
- MatExpansionPanel,
1509
- MatExpansionPanelHeader,
1510
- MatExpansionPanelTitle,
1511
1718
  NgTemplateOutlet
1512
- ], template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'fr-accordion': field.accordion,\n }\"\n >\n @if (field.accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'group-content-' + field.name\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'group-content-' + field.name\">\n @if (field.description) {\n <p class=\"fr-hint-text\">{{ field.description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n } @else {\n <legend [ngClass]=\"field.labelClassName\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n </legend>\n <div *ngTemplateOutlet=\"groupFields\"></div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"\">\n @for (f of field.fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"] }]
1719
+ ], template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'fr-accordion': field().accordion,\n }\"\n >\n @if (field().accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'group-content-' + field().name\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'group-content-' + field().name\">\n @if (field().description) {\n <p class=\"fr-hint-text\">{{ field().description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n } @else {\n <legend [ngClass]=\"field().labelClassName\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n </legend>\n <div *ngTemplateOutlet=\"groupFields\"></div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"\">\n @for (f of field().fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"] }]
1513
1720
  }] });
1514
1721
 
1515
1722
  class DsfrArrayComponent extends AbstractControlFieldComponent {
1516
1723
  dynamicService = inject(DynamicFormService);
1517
1724
  ref = inject(ChangeDetectorRef);
1518
1725
  get array() {
1519
- return this.group.controls[this.field.name];
1726
+ return this.group().controls[this.field().name];
1520
1727
  }
1521
1728
  constructor() {
1522
1729
  super();
1523
1730
  }
1524
1731
  addItem() {
1525
- const i = this.field.instances.length > 0 ? this.field.instances[this.field.instances.length - 1].number + 1 : 0;
1526
- const fields = _.cloneDeep(this.field.field.fields);
1527
- const grp = this.dynamicService.createGroup(fields, `${this.path}[${i}]`, null);
1528
- this.field.instances.push({
1732
+ const i = this.field().instances.length > 0 ? this.field().instances[this.field().instances.length - 1].number + 1 : 0;
1733
+ const fields = structuredClone(this.field().field.fields);
1734
+ const grp = this.dynamicService.createGroup(fields, `${this.path}[${i}]`, null, null);
1735
+ this.field().instances.push({
1529
1736
  number: i,
1530
1737
  group: grp,
1531
1738
  fields
@@ -1536,7 +1743,7 @@ class DsfrArrayComponent extends AbstractControlFieldComponent {
1536
1743
  deleteItem(index, inst) {
1537
1744
  /*
1538
1745
  TODO
1539
- this.field.instances!.splice(index, 1);
1746
+ this.field().instances!.splice(index, 1);
1540
1747
  for (const key of this.dynamicService.pathFieldMap.keys()) {
1541
1748
  if (key.startsWith(`${this.path}[${inst.number}]`)) {
1542
1749
  this.dynamicFormService.pathFieldMap.delete(key);
@@ -1548,7 +1755,7 @@ class DsfrArrayComponent extends AbstractControlFieldComponent {
1548
1755
  this.ref.detectChanges();
1549
1756
  }
1550
1757
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1551
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrArrayComponent, isStandalone: true, selector: "sot-dsfr-array", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{'fr-accordion': field.accordion}\"\n >\n @if (field.accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field.label }}\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend [ngClass]=\"field.labelClassName\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n </legend>\n <div [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group\">\n <div [formArrayName]=\"field.name\">\n @for (inst of field.instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field.elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field.itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field.elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field.disabled && (!field.minNbRow || field.minNbRow < array.controls.length)) {\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field.deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field.disabled && (!field.maxNbRow || field.maxNbRow > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"addItem()\"\n >\n {{ field.addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'fr-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-message fr-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => DsfrDynamicFieldDirective), selector: "[dsfrDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatExpansionModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatCardModule) }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatusGroup), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(() => i1.FormGroupDirective), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormArrayName), selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1758
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrArrayComponent, isStandalone: true, selector: "sot-dsfr-array", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{'fr-accordion': field().accordion}\"\n >\n @if (field().accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field().label }}\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend [ngClass]=\"field().labelClassName\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n </legend>\n <div [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group()\">\n <div [formArrayName]=\"field().name\">\n @for (inst of field().instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field().elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field().itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field().elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field().disabled && (!field().minNbRow || field().minNbRow! < array.controls.length)) {\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field().deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field().disabled && (!field().maxNbRow || field().maxNbRow! > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"addItem()\"\n >\n {{ field().addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'fr-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-message fr-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => DsfrDynamicFieldDirective), selector: "[dsfrDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatExpansionModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: i0.forwardRef(() => MatCardModule) }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatusGroup), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(() => i1.FormGroupDirective), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormArrayName), selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1552
1759
  }
1553
1760
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrArrayComponent, decorators: [{
1554
1761
  type: Component,
@@ -1559,12 +1766,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1559
1766
  MatCardModule,
1560
1767
  ReactiveFormsModule,
1561
1768
  NgTemplateOutlet
1562
- ], template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{'fr-accordion': field.accordion}\"\n >\n @if (field.accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field.label }}\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend [ngClass]=\"field.labelClassName\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n </legend>\n <div [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group\">\n <div [formArrayName]=\"field.name\">\n @for (inst of field.instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field.elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field.itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field.elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field.disabled && (!field.minNbRow || field.minNbRow < array.controls.length)) {\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field.deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field.disabled && (!field.maxNbRow || field.maxNbRow > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"addItem()\"\n >\n {{ field.addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'fr-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-message fr-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"] }]
1769
+ ], template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{'fr-accordion': field().accordion}\"\n >\n @if (field().accordion) {\n <legend\n class=\"fr-accordion__title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"fr-accordion__btn\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field().label }}\n </button>\n </legend>\n <div\n class=\"fr-collapse\"\n [ngClass]=\"{ 'fr-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend [ngClass]=\"field().labelClassName\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n </legend>\n <div [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group()\">\n <div [formArrayName]=\"field().name\">\n @for (inst of field().instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field().elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field().itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field().elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container dsfrDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field().disabled && (!field().minNbRow || field().minNbRow! < array.controls.length)) {\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field().deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field().disabled && (!field().maxNbRow || field().maxNbRow! > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"fr-btn\"\n (click)=\"addItem()\"\n >\n {{ field().addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'fr-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-message fr-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"] }]
1563
1770
  }], ctorParameters: () => [] });
1564
1771
 
1565
1772
  class DsfrRowComponent extends AbstractFieldComponent {
1566
1773
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1567
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrRowComponent, isStandalone: true, selector: "sot-dsfr-row", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field.className\">\n @for (f of field.fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n dsfrDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => DsfrDynamicFieldDirective), selector: "[dsfrDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }] });
1774
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrRowComponent, isStandalone: true, selector: "sot-dsfr-row", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field().className\">\n @for (f of field().fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n dsfrDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group()\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => DsfrDynamicFieldDirective), selector: "[dsfrDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }] });
1568
1775
  }
1569
1776
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrRowComponent, decorators: [{
1570
1777
  type: Component,
@@ -1573,7 +1780,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1573
1780
  NgClass,
1574
1781
  forwardRef(() => DsfrDynamicFieldDirective),
1575
1782
  DsfrDynamicFieldDirective
1576
- ], template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field.className\">\n @for (f of field.fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n dsfrDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n" }]
1783
+ ], template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field().className\">\n @for (f of field().fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n dsfrDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group()\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n" }]
1577
1784
  }] });
1578
1785
 
1579
1786
  let PasswordValidators$1 = class PasswordValidators {
@@ -1595,16 +1802,16 @@ class DsfrFieldPasswordComponent extends AbstractControlFieldComponent {
1595
1802
  iconErrorLabel;
1596
1803
  iconSuccessLabel;
1597
1804
  buttonAction(b) {
1598
- if (b.action && this.field && this.group) {
1599
- b.action(this.field, this.group, this.dynamicFormService.data);
1805
+ if (b.action) {
1806
+ b.action(this.field(), this.group(), this.data);
1600
1807
  }
1601
1808
  }
1602
1809
  ngOnInit() {
1603
1810
  super.ngOnInit();
1604
- this.showPasswordLabel = this.field.labels?.showPassword ?? "Show password";
1605
- this.hidePasswordLabel = this.field.labels?.hidePassword ?? "Hide password";
1606
- this.iconSuccessLabel = this.field.labels?.iconSuccess ?? "Success";
1607
- this.iconErrorLabel = this.field.labels?.iconError ?? "Error";
1811
+ this.showPasswordLabel = this.field().labels?.showPassword ?? "Show password";
1812
+ this.hidePasswordLabel = this.field().labels?.hidePassword ?? "Hide password";
1813
+ this.iconSuccessLabel = this.field().labels?.iconSuccess ?? "Success";
1814
+ this.iconErrorLabel = this.field().labels?.iconError ?? "Error";
1608
1815
  if (this.control) {
1609
1816
  this.control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
1610
1817
  if (value?.length == 0) {
@@ -1636,29 +1843,29 @@ class DsfrFieldPasswordComponent extends AbstractControlFieldComponent {
1636
1843
  return this.control.value && !this.control.hasError("requiresSpecialChars");
1637
1844
  }
1638
1845
  setPasswordValidators() {
1639
- if (this.field.minlength) {
1640
- this.control?.addValidators(Validators.minLength(this.field.minlength));
1846
+ if (this.field().minlength) {
1847
+ this.control?.addValidators(Validators.minLength(this.field().minlength));
1641
1848
  }
1642
- if (this.field.maxlength) {
1643
- this.control?.addValidators(Validators.maxLength(this.field.maxlength));
1849
+ if (this.field().maxlength) {
1850
+ this.control?.addValidators(Validators.maxLength(this.field().maxlength));
1644
1851
  }
1645
- if (this.field.requiresDigit) {
1852
+ if (this.field().requiresDigit) {
1646
1853
  this.control?.addValidators(PasswordValidators$1.patternValidator(/(?=.*[0-9])/, {
1647
1854
  requiresDigit: true
1648
1855
  }));
1649
1856
  }
1650
- if (this.field.requiresUppercase) {
1857
+ if (this.field().requiresUppercase) {
1651
1858
  this.control?.addValidators(PasswordValidators$1.patternValidator(/(?=.*[A-Z])/, {
1652
1859
  requiresUppercase: true
1653
1860
  }));
1654
1861
  }
1655
- if (this.field.requiresLowercase) {
1862
+ if (this.field().requiresLowercase) {
1656
1863
  this.control?.addValidators(PasswordValidators$1.patternValidator(/(?=.*[a-z])/, {
1657
1864
  requiresLowercase: true
1658
1865
  }));
1659
1866
  }
1660
- if (this.field.requiresSpecialChars) {
1661
- const chars = this.field.specialChars?.join("") ?? "$@^!%*?&";
1867
+ if (this.field().requiresSpecialChars) {
1868
+ const chars = this.field().specialChars?.join("") ?? "$@^!%*?&";
1662
1869
  const regex = "(?=.*[" + chars + "])";
1663
1870
  this.control?.addValidators(PasswordValidators$1.patternValidator(new RegExp(regex), {
1664
1871
  requiresSpecialChars: true
@@ -1666,69 +1873,70 @@ class DsfrFieldPasswordComponent extends AbstractControlFieldComponent {
1666
1873
  }
1667
1874
  }
1668
1875
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1669
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldPasswordComponent, isStandalone: true, selector: "sot-dsfr-field-password", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"fr-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field.minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field.requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatButtonModule }] });
1876
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldPasswordComponent, isStandalone: true, selector: "sot-dsfr-field-password", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"fr-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field().minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field().requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatButtonModule }] });
1670
1877
  }
1671
1878
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldPasswordComponent, decorators: [{
1672
1879
  type: Component,
1673
- args: [{ selector: 'sot-dsfr-field-password', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"fr-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field.minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field.requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field.labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"] }]
1880
+ args: [{ selector: 'sot-dsfr-field-password', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatIconModule, MatInputModule, MatButtonModule], template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid,\r\n 'fr-input-group--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"fr-input\"\r\n [ngClass]=\"{\r\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input--valid': control && !control.untouched && control.valid,\r\n 'fr-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"fr-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"fr-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field().minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"minLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"maxLengthValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresDigitValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field().requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresUppercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresLowercaseValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <mat-icon [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"\r\n [fontIcon]=\"requiresSpecialCharsValid ? 'check' : 'error'\"></mat-icon>\r\n {{ field().labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input mat-form-field{width:100%}.sot-formfield-input mat-form-field[hidden]{display:none}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}.password-description li mat-icon{margin-right:.5rem}.password-description li.text-error{color:var(--mat-form-field-error-text-color, var(--mat-app-error))}\n"] }]
1674
1881
  }] });
1675
1882
 
1676
1883
  class DsfrFieldRadioButtonComponent extends AbstractControlFieldComponent {
1677
1884
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldRadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1678
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldRadioButtonComponent, isStandalone: true, selector: "sot-dsfr-field-radio-button", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"form-field-radio\"\r\n [hidden]=\"field.hidden\"\r\n [ngClass]=\"field.className\">\r\n <fieldset\r\n class=\"fr-fieldset\"\r\n [ngClass]=\"{\r\n 'fr-fieldset--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-fieldset--valid': control && !control.untouched && control.valid,\r\n 'fr-fieldset--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group\">\r\n <legend\r\n class=\"fr-fieldset__legend--regular fr-fieldset__legend\"\r\n [ngClass]=\"field.labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </legend>\r\n @if(field.options) {\r\n @for (item of field.options; track item; let i = $index) {\r\n <div\r\n class=\"fr-fieldset__element\"\r\n [ngClass]=\"{ 'fr-fieldset__element--inline': !field.verticalAlign }\">\r\n <div class=\"fr-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [attr.disabled]=\"field.disabledKey && !!item[field.disabledKey] ? true : undefined\"/>\r\n <label\r\n class=\"fr-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n @if (field.descriptionKey) {\r\n <span class=\"fr-hint-text\">{{ item[field.descriptionKey] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n @if (control && !control.untouched && control.invalid) {\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'text-radio-' + uuid + '-error'\"\r\n aria-live=\"polite\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n <p class=\"fr-error-text\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n }\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatIconModule }] });
1885
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldRadioButtonComponent, isStandalone: true, selector: "sot-dsfr-field-radio-button", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"form-field-radio\"\r\n [hidden]=\"field().hidden\"\r\n [ngClass]=\"field().className\">\r\n <fieldset\r\n class=\"fr-fieldset\"\r\n [ngClass]=\"{\r\n 'fr-fieldset--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-fieldset--valid': control && !control.untouched && control.valid,\r\n 'fr-fieldset--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group()\">\r\n <legend\r\n class=\"fr-fieldset__legend--regular fr-fieldset__legend\"\r\n [ngClass]=\"field().labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </legend>\r\n @if(field().options) {\r\n @for (item of field().options; track item; let i = $index) {\r\n <div\r\n class=\"fr-fieldset__element\"\r\n [ngClass]=\"{ 'fr-fieldset__element--inline': !field().verticalAlign }\">\r\n <div class=\"fr-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [attr.disabled]=\"field().disabledKey && !!item[field().disabledKey!] ? true : undefined\"/>\r\n <label\r\n class=\"fr-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n @if (field().descriptionKey) {\r\n <span class=\"fr-hint-text\">{{ item[field().descriptionKey!] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n @if (control && !control.untouched && control.invalid) {\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'text-radio-' + uuid + '-error'\"\r\n aria-live=\"polite\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n <p class=\"fr-error-text\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n }\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatIconModule }] });
1679
1886
  }
1680
1887
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldRadioButtonComponent, decorators: [{
1681
1888
  type: Component,
1682
- args: [{ selector: 'sot-dsfr-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass, MatRadioModule, MatTooltipModule, MatIconModule], template: "<div\r\n class=\"form-field-radio\"\r\n [hidden]=\"field.hidden\"\r\n [ngClass]=\"field.className\">\r\n <fieldset\r\n class=\"fr-fieldset\"\r\n [ngClass]=\"{\r\n 'fr-fieldset--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-fieldset--valid': control && !control.untouched && control.valid,\r\n 'fr-fieldset--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group\">\r\n <legend\r\n class=\"fr-fieldset__legend--regular fr-fieldset__legend\"\r\n [ngClass]=\"field.labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </legend>\r\n @if(field.options) {\r\n @for (item of field.options; track item; let i = $index) {\r\n <div\r\n class=\"fr-fieldset__element\"\r\n [ngClass]=\"{ 'fr-fieldset__element--inline': !field.verticalAlign }\">\r\n <div class=\"fr-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [attr.disabled]=\"field.disabledKey && !!item[field.disabledKey] ? true : undefined\"/>\r\n <label\r\n class=\"fr-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n @if (field.descriptionKey) {\r\n <span class=\"fr-hint-text\">{{ item[field.descriptionKey] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n @if (control && !control.untouched && control.invalid) {\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'text-radio-' + uuid + '-error'\"\r\n aria-live=\"polite\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n <p class=\"fr-error-text\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n }\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"] }]
1889
+ args: [{ selector: 'sot-dsfr-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass, MatRadioModule, MatTooltipModule, MatIconModule], template: "<div\r\n class=\"form-field-radio\"\r\n [hidden]=\"field().hidden\"\r\n [ngClass]=\"field().className\">\r\n <fieldset\r\n class=\"fr-fieldset\"\r\n [ngClass]=\"{\r\n 'fr-fieldset--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-fieldset--valid': control && !control.untouched && control.valid,\r\n 'fr-fieldset--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group()\">\r\n <legend\r\n class=\"fr-fieldset__legend--regular fr-fieldset__legend\"\r\n [ngClass]=\"field().labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </legend>\r\n @if(field().options) {\r\n @for (item of field().options; track item; let i = $index) {\r\n <div\r\n class=\"fr-fieldset__element\"\r\n [ngClass]=\"{ 'fr-fieldset__element--inline': !field().verticalAlign }\">\r\n <div class=\"fr-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [attr.disabled]=\"field().disabledKey && !!item[field().disabledKey!] ? true : undefined\"/>\r\n <label\r\n class=\"fr-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n @if (field().descriptionKey) {\r\n <span class=\"fr-hint-text\">{{ item[field().descriptionKey!] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n @if (control && !control.untouched && control.invalid) {\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'text-radio-' + uuid + '-error'\"\r\n aria-live=\"polite\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control.hasError(validation.name)) {\r\n <p class=\"fr-error-text\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n }\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"] }]
1683
1890
  }] });
1684
1891
 
1685
1892
  class AcFieldSelectComponent extends AbstractControlFieldComponent {
1686
1893
  options = [];
1687
1894
  ngOnInit() {
1688
1895
  super.ngOnInit();
1689
- if (isObservable(this.field.options)) {
1690
- this.field.options.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((options) => {
1896
+ const options = this.field().options;
1897
+ if (isObservable(options)) {
1898
+ options.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((options) => {
1691
1899
  this.options = options;
1692
1900
  });
1693
1901
  }
1694
1902
  else {
1695
- this.options = this.field.options;
1903
+ this.options = options;
1696
1904
  }
1697
1905
  }
1698
1906
  buttonAction(b) {
1699
- if (b.action && this.field && this.group) {
1700
- b.action(this.field, this.group, this.dynamicFormService.data);
1907
+ if (b.action) {
1908
+ b.action(this.field(), this.group(), this.data);
1701
1909
  }
1702
1910
  }
1703
1911
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1704
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcFieldSelectComponent, isStandalone: true, selector: "sot-dsfr-field-select", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-select-group\"\r\n [ngClass]=\"{\r\n 'fr-select-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select-group--valid': control && !control.untouched && control.valid,\r\n 'fr-select-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"fr-select\"\r\n [multiple]=\"field.multiple\"\r\n [ngClass]=\"{\r\n 'fr-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select--valid': control && !control.untouched && control.valid,\r\n 'fr-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field.name\">\r\n @if (field.resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field.resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field.options) {\r\n @if (field.groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field.groupLabelKey ? group[field.groupLabelKey] : ''\">\r\n @if (field.groupOptionsKey && group[field.groupOptionsKey]) {\r\n @for (item of group[field.groupOptionsKey]; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatSelectModule }] });
1912
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcFieldSelectComponent, isStandalone: true, selector: "sot-dsfr-field-select", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-select-group\"\r\n [ngClass]=\"{\r\n 'fr-select-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select-group--valid': control && !control.untouched && control.valid,\r\n 'fr-select-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"fr-select\"\r\n [multiple]=\"field().multiple\"\r\n [ngClass]=\"{\r\n 'fr-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select--valid': control && !control.untouched && control.valid,\r\n 'fr-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field().name\">\r\n @if (field().resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field().resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field().options) {\r\n @if (field().groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field().groupLabelKey ? group[field().groupLabelKey!] : ''\">\r\n @if (field().groupOptionsKey && group[field().groupOptionsKey!]) {\r\n @for (item of group[field().groupOptionsKey!]; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatSelectModule }] });
1705
1913
  }
1706
1914
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldSelectComponent, decorators: [{
1707
1915
  type: Component,
1708
- args: [{ selector: 'sot-dsfr-field-select', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatSelectModule], template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-select-group\"\r\n [ngClass]=\"{\r\n 'fr-select-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select-group--valid': control && !control.untouched && control.valid,\r\n 'fr-select-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n {{ field.label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"fr-hint-text\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"fr-select\"\r\n [multiple]=\"field.multiple\"\r\n [ngClass]=\"{\r\n 'fr-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select--valid': control && !control.untouched && control.valid,\r\n 'fr-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field.name\">\r\n @if (field.resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field.resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field.options) {\r\n @if (field.groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field.groupLabelKey ? group[field.groupLabelKey] : ''\">\r\n @if (field.groupOptionsKey && group[field.groupOptionsKey]) {\r\n @for (item of group[field.groupOptionsKey]; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"] }]
1916
+ args: [{ selector: 'sot-dsfr-field-select', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatSelectModule], template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-select-group\"\r\n [ngClass]=\"{\r\n 'fr-select-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select-group--valid': control && !control.untouched && control.valid,\r\n 'fr-select-group--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"fr-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n {{ field().label }}\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"fr-hint-text\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"fr-select\"\r\n [multiple]=\"field().multiple\"\r\n [ngClass]=\"{\r\n 'fr-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-select--valid': control && !control.untouched && control.valid,\r\n 'fr-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field().name\">\r\n @if (field().resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field().resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field().options) {\r\n @if (field().groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field().groupLabelKey ? group[field().groupLabelKey!] : ''\">\r\n @if (field().groupOptionsKey && group[field().groupOptionsKey!]) {\r\n @for (item of group[field().groupOptionsKey!]; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-prefix\" matPrefix>\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"fr-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select mat-form-field{width:100%}.sot-formfield-select mat-form-field[hidden]{display:none}::ng-deep .sot-formfield-select-panel .mdc-list-item__primary-text{width:100%}.sot-formfield-select-prefix,.sot-formfield-select-suffix{padding:0 .5rem}\n"] }]
1709
1917
  }] });
1710
1918
 
1711
1919
  class DsfrFieldTextareaComponent extends AbstractControlFieldComponent {
1712
1920
  buttonAction(b) {
1713
- if (b.action && this.field && this.group) {
1714
- b.action(this.field, this.group, this.dynamicFormService.data);
1921
+ if (b.action) {
1922
+ b.action(this.field(), this.group(), this.data);
1715
1923
  }
1716
1924
  }
1717
1925
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1718
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldTextareaComponent, isStandalone: true, selector: "sot-dsfr-field-textarea", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field.className\">\n <div\n [formGroup]=\"group\"\n class=\"fr-input-group\"\n [ngClass]=\"{\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\n 'fr-input-group--disabled': control && control.disabled,\n }\">\n <label\n class=\"fr-label\"\n [ngClass]=\"field.labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n </label>\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\n @for (prefix of field.prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"fr-input\"\n [ngClass]=\"{\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input--valid': control && !control.untouched && control.valid ,\n 'fr-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field.name\"\n [required]=\"!!required\"\n [readonly]=\"field.readonly\"\n [rows]=\"field.rows\"\n [maxlength]=\"field.maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field.suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-error-text\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatButtonModule }] });
1926
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldTextareaComponent, isStandalone: true, selector: "sot-dsfr-field-textarea", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field().className\">\n <div\n [formGroup]=\"group()\"\n class=\"fr-input-group\"\n [ngClass]=\"{\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\n 'fr-input-group--disabled': control && control.disabled,\n }\">\n <label\n class=\"fr-label\"\n [ngClass]=\"field().labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n </label>\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\n @for (prefix of field().prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"fr-input\"\n [ngClass]=\"{\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input--valid': control && !control.untouched && control.valid ,\n 'fr-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field().name\"\n [required]=\"!!required\"\n [readonly]=\"field().readonly\"\n [rows]=\"field().rows\"\n [maxlength]=\"field().maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field().suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-error-text\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatButtonModule }] });
1719
1927
  }
1720
1928
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldTextareaComponent, decorators: [{
1721
1929
  type: Component,
1722
- args: [{ selector: 'sot-dsfr-field-textarea', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatInputModule, MatButtonModule], template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field.className\">\n <div\n [formGroup]=\"group\"\n class=\"fr-input-group\"\n [ngClass]=\"{\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\n 'fr-input-group--disabled': control && control.disabled,\n }\">\n <label\n class=\"fr-label\"\n [ngClass]=\"field.labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"fr-hint-text\">{{ field.description }}</span>\n }\n </label>\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\n @for (prefix of field.prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"fr-input\"\n [ngClass]=\"{\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input--valid': control && !control.untouched && control.valid ,\n 'fr-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field.name\"\n [required]=\"!!required\"\n [readonly]=\"field.readonly\"\n [rows]=\"field.rows\"\n [maxlength]=\"field.maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field.suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-error-text\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"] }]
1930
+ args: [{ selector: 'sot-dsfr-field-textarea', standalone: true, imports: [ReactiveFormsModule, NgClass, MatFormFieldModule, MatInputModule, MatButtonModule], template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field().className\">\n <div\n [formGroup]=\"group()\"\n class=\"fr-input-group\"\n [ngClass]=\"{\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\n 'fr-input-group--disabled': control && control.disabled,\n }\">\n <label\n class=\"fr-label\"\n [ngClass]=\"field().labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"fr-hint-text\">{{ field().description }}</span>\n }\n </label>\n <div class=\"fr-input-wrap fr-input-wrap--addon\">\n @for (prefix of field().prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\" matPrefix>\n @if (prefix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"fr-input\"\n [ngClass]=\"{\n 'fr-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'fr-input--valid': control && !control.untouched && control.valid ,\n 'fr-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field().name\"\n [required]=\"!!required\"\n [readonly]=\"field().readonly\"\n [rows]=\"field().rows\"\n [maxlength]=\"field().maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field().suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"fr-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"fr-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"fr-error-text\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea mat-form-field{width:100%}.sot-formfield-textarea mat-form-field[hidden]{display:none}.sot-formfield-textarea .sot-formfield-textarea-prefix,.sot-formfield-textarea .sot-formfield-textarea-suffix{padding:0 .5rem}\n"] }]
1723
1931
  }] });
1724
1932
 
1725
1933
  class DsfrFieldToggleComponent extends AbstractControlFieldComponent {
1726
1934
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1727
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldToggleComponent, isStandalone: true, selector: "sot-dsfr-field-toggle", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"fr-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"fr-toggle__input\"\r\n [attr.id]=\"'toggle-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field.disabled\"/>\r\n <label\r\n class=\"fr-toggle__label\"\r\n [attr.for]=\"'toggle-' + uuid\"\r\n [attr.data-fr-checked-label]=\"field.checkedLabel\"\r\n [attr.data-fr-unchecked-label]=\"field.uncheckedLabel\"\r\n >{{ field.label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <p\r\n class=\"fr-hint-text\">\r\n {{ field.description }}\r\n </p>\r\n </div>\r\n\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSlideToggleModule }] });
1935
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrFieldToggleComponent, isStandalone: true, selector: "sot-dsfr-field-toggle", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"fr-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"fr-toggle__input\"\r\n [attr.id]=\"'toggle-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field().disabled\"/>\r\n <label\r\n class=\"fr-toggle__label\"\r\n [attr.for]=\"'toggle-' + uuid\"\r\n [attr.data-fr-checked-label]=\"field().checkedLabel\"\r\n [attr.data-fr-unchecked-label]=\"field().uncheckedLabel\"\r\n >{{ field().label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <p\r\n class=\"fr-hint-text\">\r\n {{ field().description }}\r\n </p>\r\n </div>\r\n\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSlideToggleModule }] });
1728
1936
  }
1729
1937
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldToggleComponent, decorators: [{
1730
1938
  type: Component,
1731
- args: [{ selector: 'sot-dsfr-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatSlideToggleModule], template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"fr-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"fr-toggle__input\"\r\n [attr.id]=\"'toggle-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field.disabled\"/>\r\n <label\r\n class=\"fr-toggle__label\"\r\n [attr.for]=\"'toggle-' + uuid\"\r\n [attr.data-fr-checked-label]=\"field.checkedLabel\"\r\n [attr.data-fr-unchecked-label]=\"field.uncheckedLabel\"\r\n >{{ field.label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <p\r\n class=\"fr-hint-text\">\r\n {{ field.description }}\r\n </p>\r\n </div>\r\n\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
1939
+ args: [{ selector: 'sot-dsfr-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatSlideToggleModule], template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"fr-input-group\"\r\n [ngClass]=\"{\r\n 'fr-input-group--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'fr-input-group--valid': control && !control.untouched && control.valid ,\r\n 'fr-input-group--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"fr-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"fr-toggle__input\"\r\n [attr.id]=\"'toggle-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field().disabled\"/>\r\n <label\r\n class=\"fr-toggle__label\"\r\n [attr.for]=\"'toggle-' + uuid\"\r\n [attr.data-fr-checked-label]=\"field().checkedLabel\"\r\n [attr.data-fr-unchecked-label]=\"field().uncheckedLabel\"\r\n >{{ field().label }}\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <p\r\n class=\"fr-hint-text\">\r\n {{ field().description }}\r\n </p>\r\n </div>\r\n\r\n <div\r\n class=\"fr-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"fr-message fr-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
1732
1940
  }] });
1733
1941
 
1734
1942
  const components$1 = {
@@ -1773,8 +1981,8 @@ class DsfrDynamicFieldDirective {
1773
1981
  environmentInjector: this.injector
1774
1982
  });
1775
1983
  }
1776
- this.component.instance.field = this.field();
1777
- this.component.instance.group = this.group();
1984
+ this.component.instance.field = this.field;
1985
+ this.component.instance.group = this.group;
1778
1986
  this.component.instance.instancePath = this.instancePath();
1779
1987
  this.component.instance.path = this.path();
1780
1988
  }
@@ -1818,7 +2026,7 @@ class DsfrDynamicFormComponent {
1818
2026
  if (!this.form && this.config() != null) {
1819
2027
  this.createForm();
1820
2028
  }
1821
- if (this.initialValues() && this.form && this.form.pristine) {
2029
+ if (this.initialValues() && this.form?.pristine) {
1822
2030
  this.setValue(this.initialValues());
1823
2031
  }
1824
2032
  });
@@ -1876,33 +2084,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1876
2084
 
1877
2085
  class ClassicDivTextComponent extends AbstractFieldComponent {
1878
2086
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicDivTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1879
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicDivTextComponent, isStandalone: true, selector: "sot-classic-div-text", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field.className\">\n <div [innerHTML]=\"field.label\"></div>\n @if(field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2087
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicDivTextComponent, isStandalone: true, selector: "sot-classic-div-text", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field().className\">\n <div [innerHTML]=\"field().label\"></div>\n @if(field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1880
2088
  }
1881
2089
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicDivTextComponent, decorators: [{
1882
2090
  type: Component,
1883
- args: [{ selector: 'sot-classic-div-text', standalone: true, imports: [NgClass], template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field.className\">\n <div [innerHTML]=\"field.label\"></div>\n @if(field.description) {\n <p [innerHTML]=\"field.description\"></p>\n }\n</div>\n" }]
2091
+ args: [{ selector: 'sot-classic-div-text', standalone: true, imports: [NgClass], template: "<div class=\"sot-formfield sot-formfield-text\" [ngClass]=\"field().className\">\n <div [innerHTML]=\"field().label\"></div>\n @if(field().description) {\n <p [innerHTML]=\"field().description\"></p>\n }\n</div>\n" }]
1884
2092
  }] });
1885
2093
 
1886
2094
  class ClassicFieldCheckboxComponent extends AbstractControlFieldComponent {
1887
2095
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1888
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldCheckboxComponent, isStandalone: true, selector: "sot-classic-field-checkbox", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field.name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'sot-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-checkbox--valid': control && !control.untouched && control.valid,\r\n 'sot-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2096
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldCheckboxComponent, isStandalone: true, selector: "sot-classic-field-checkbox", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field().name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'sot-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-checkbox--valid': control && !control.untouched && control.valid,\r\n 'sot-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1889
2097
  }
1890
2098
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldCheckboxComponent, decorators: [{
1891
2099
  type: Component,
1892
- args: [{ selector: 'sot-classic-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field.name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'sot-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-checkbox--valid': control && !control.untouched && control.valid,\r\n 'sot-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
2100
+ args: [{ selector: 'sot-classic-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-checkbox\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <input\r\n type=\"checkbox\"\r\n [formControlName]=\"field().name\"\r\n [attr.id]=\"'sot-checkbox-' + uuid\"\r\n [ngClass]=\"{\r\n 'sot-checkbox--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-checkbox--valid': control && !control.untouched && control.valid,\r\n 'sot-checkbox--disabled': control && control.disabled,\r\n }\" />\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-checkbox-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-checkbox-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
1893
2101
  }] });
1894
2102
 
1895
2103
  class ClassicFieldInputComponent extends AbstractControlFieldComponent {
1896
2104
  inputType = 'text';
1897
2105
  buttonAction(b) {
1898
- if (b.action && this.field && this.group) {
1899
- b.action(this.field, this.group, this.dynamicFormService.data);
2106
+ if (b.action) {
2107
+ b.action(this.field(), this.group(), this.data);
1900
2108
  }
1901
2109
  }
1902
2110
  ngOnInit() {
1903
2111
  super.ngOnInit();
1904
- this.inputType = this.field.inputType ?? 'text';
1905
- const control = this.group.get(this.field.name);
2112
+ this.inputType = this.field().inputType ?? 'text';
2113
+ const control = this.group().get(this.field().name);
1906
2114
  if (control) {
1907
2115
  control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
1908
2116
  if (value?.length == 0) {
@@ -1912,19 +2120,19 @@ class ClassicFieldInputComponent extends AbstractControlFieldComponent {
1912
2120
  }
1913
2121
  }
1914
2122
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1915
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldInputComponent, isStandalone: true, selector: "sot-classic-field-input", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-input\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"field.inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [readonly]=\"field.readonly\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldInputComponent, isStandalone: true, selector: "sot-classic-field-input", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-input\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"field().inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [readonly]=\"field().readonly\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
1916
2124
  }
1917
2125
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldInputComponent, decorators: [{
1918
2126
  type: Component,
1919
- args: [{ selector: 'sot-classic-field-input', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-input\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"field.inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [readonly]=\"field.readonly\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
2127
+ args: [{ selector: 'sot-classic-field-input', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-input\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"field().inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [readonly]=\"field().readonly\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
1920
2128
  }] });
1921
2129
 
1922
2130
  class ClassicGroupComponent extends AbstractControlFieldComponent {
1923
2131
  get subGroup() {
1924
- return this.group.controls[this.field.name];
2132
+ return this.group().controls[this.field().name];
1925
2133
  }
1926
2134
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1927
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicGroupComponent, isStandalone: true, selector: "sot-classic-group", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'sot-accordion': field.accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field.accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'group-content-' + uuid\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'group-content-' + uuid\">\n @if (field.description) {\n <p class=\"sot-label-description\">{{ field.description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field.labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field.fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => ClassiDynamicFieldDirective), selector: "[classicDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
2135
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicGroupComponent, isStandalone: true, selector: "sot-classic-group", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'sot-accordion': field().accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field().accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'group-content-' + uuid\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'group-content-' + uuid\">\n @if (field().description) {\n <p class=\"sot-label-description\">{{ field().description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field().labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field().fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => ClassiDynamicFieldDirective), selector: "[classicDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1928
2136
  }
1929
2137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicGroupComponent, decorators: [{
1930
2138
  type: Component,
@@ -1932,23 +2140,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1932
2140
  forwardRef(() => ClassiDynamicFieldDirective),
1933
2141
  NgClass,
1934
2142
  NgTemplateOutlet
1935
- ], template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'sot-accordion': field.accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field.accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'group-content-' + uuid\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'group-content-' + uuid\">\n @if (field.description) {\n <p class=\"sot-label-description\">{{ field.description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field.labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field.fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"] }]
2143
+ ], template: "<div class=\"sot-formfield sot-formfield-group\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield\"\n [ngClass]=\"{\n 'sot-accordion': field().accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field().accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'group-content-' + uuid\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'group-content-' + uuid\">\n @if (field().description) {\n <p class=\"sot-label-description\">{{ field().description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n\n\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field().labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n @for (f of field().fields; track f.type + f.name) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"subGroup\"\n [instancePath]=\"instancePath\"\n ></ng-container>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-group-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n</ng-template>\n", styles: ["fieldset{border:none;padding:0;margin:0}\n"] }]
1936
2144
  }] });
1937
2145
 
1938
2146
  class ClassicArrayComponent extends AbstractControlFieldComponent {
1939
2147
  dynamicService = inject(DynamicFormService);
1940
2148
  ref = inject(ChangeDetectorRef);
1941
2149
  get array() {
1942
- return this.group.controls[this.field.name];
2150
+ return this.group().controls[this.field().name];
1943
2151
  }
1944
2152
  constructor() {
1945
2153
  super();
1946
2154
  }
1947
2155
  addItem() {
1948
- const i = this.field.instances.length > 0 ? this.field.instances[this.field.instances.length - 1].number + 1 : 0;
1949
- const fields = _.cloneDeep(this.field.field.fields);
1950
- const grp = this.dynamicService.createGroup(fields, `${this.path}[${i}]`, null);
1951
- this.field.instances.push({
2156
+ const i = this.field().instances.length > 0 ? this.field().instances[this.field().instances.length - 1].number + 1 : 0;
2157
+ const fields = structuredClone(this.field().field.fields);
2158
+ const grp = this.dynamicService.createGroup(fields, `${this.path}[${i}]`, null, null);
2159
+ this.field().instances.push({
1952
2160
  number: i,
1953
2161
  group: grp,
1954
2162
  fields
@@ -1959,7 +2167,7 @@ class ClassicArrayComponent extends AbstractControlFieldComponent {
1959
2167
  deleteItem(index, inst) {
1960
2168
  /*
1961
2169
  TODO
1962
- this.field.instances!.splice(index, 1);
2170
+ this.field().instances!.splice(index, 1);
1963
2171
  for (const key of this.dynamicService.pathFieldMap.keys()) {
1964
2172
  if (key.startsWith(`${this.path}[${inst.number}]`)) {
1965
2173
  this.dynamicFormService.pathFieldMap.delete(key);
@@ -1971,7 +2179,7 @@ class ClassicArrayComponent extends AbstractControlFieldComponent {
1971
2179
  this.ref.detectChanges();
1972
2180
  }
1973
2181
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1974
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicArrayComponent, isStandalone: true, selector: "sot-classic-array", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{\n 'sot-accordion': field.accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field.accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field.description) {\n <p class=\"sot-label-description\">{{ field.description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field.labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\"\n [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group\">\n <div [formArrayName]=\"field.name\">\n @for (inst of field.instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field.elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field.itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field.elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field.disabled && (!field.minNbRow || field.minNbRow < array.controls.length)) {\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field.deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field.disabled && (!field.maxNbRow || field.maxNbRow > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"addItem()\"\n >\n {{ field.addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => ClassiDynamicFieldDirective), selector: "[classicDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatusGroup), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(() => i1.FormGroupDirective), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormArrayName), selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
2182
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicArrayComponent, isStandalone: true, selector: "sot-classic-array", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{\n 'sot-accordion': field().accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field().accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field().description) {\n <p class=\"sot-label-description\">{{ field().description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field().labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\"\n [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group()\">\n <div [formArrayName]=\"field().name\">\n @for (inst of field().instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field().elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field().itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field().elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field().disabled && (!field().minNbRow || field().minNbRow! < array.controls.length)) {\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field().deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field().disabled && (!field().maxNbRow || field().maxNbRow! > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"addItem()\"\n >\n {{ field().addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => ClassiDynamicFieldDirective), selector: "[classicDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => i1.NgControlStatusGroup), selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i0.forwardRef(() => i1.FormGroupDirective), selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i0.forwardRef(() => i1.FormArrayName), selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i0.forwardRef(() => NgTemplateOutlet), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
1975
2183
  }
1976
2184
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicArrayComponent, decorators: [{
1977
2185
  type: Component,
@@ -1980,12 +2188,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1980
2188
  NgClass,
1981
2189
  ReactiveFormsModule,
1982
2190
  NgTemplateOutlet
1983
- ], template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field.className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{\n 'sot-accordion': field.accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field.accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field.labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field.opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field.label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field.opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field.description) {\n <p class=\"sot-label-description\">{{ field.description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field.labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\"\n [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group\">\n <div [formArrayName]=\"field.name\">\n @for (inst of field.instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field.elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field.itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field.elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field.disabled && (!field.minNbRow || field.minNbRow < array.controls.length)) {\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field.deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field.disabled && (!field.maxNbRow || field.maxNbRow > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"addItem()\"\n >\n {{ field.addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"] }]
2191
+ ], template: "<div class=\"sot-formfield sot-formfield-array\" [ngClass]=\"field().className\">\n <fieldset\n class=\"sot-formfield-wrapper sot-fieldset\"\n [ngClass]=\"{\n 'sot-accordion': field().accordion,\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid,\n 'sot-formfield--disabled': (control && control.disabled),\n }\"\n >\n @if (field().accordion) {\n <legend\n class=\"sot-accordion-title\"\n [ngClass]=\"field().labelClassName\">\n <button\n type=\"button\"\n class=\"sot-accordion-button\"\n [attr.aria-expanded]=\"!!field().opened\"\n [attr.aria-controls]=\"'array-content-' + uuid\">\n {{ field().label }}\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n </button>\n </legend>\n <div\n class=\"sot-collapse sot-accordion-content sot-fieldset-content\"\n [ngClass]=\"{ 'sot-collapse--expanded': !!field().opened }\"\n [attr.id]=\"'array-content-' + uuid\">\n @if (field().description) {\n <p class=\"sot-label-description\">{{ field().description }}</p>\n }\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n } @else {\n <legend\n class=\"sot-fieldset-legend\"\n [ngClass]=\"field().labelClassName\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </legend>\n <div class=\"sot-fieldset-content\"\n [attr.id]=\"'array-content-' + uuid\">\n <div *ngTemplateOutlet=\"groupFields\"></div>\n </div>\n }\n </fieldset>\n</div>\n\n<ng-template #groupFields>\n <div class=\"sot-formfield-array\" [formGroup]=\"group()\">\n <div [formArrayName]=\"field().name\">\n @for (inst of field().instances; track inst; let i = $index) {\n <fieldset class=\"sot-formfield-array-element\"\n [ngClass]=\"field().elementClassName\">\n <legend class=\"sot-formfield-array-element-label\">\n {{ field().itemLabel ?? 'Item' }} {{ inst.number + 1 }}\n </legend>\n <div class=\"sot-formfield-array-element-content\"\n [ngClass]=\"field().elementContentClassName\">\n @for (f of inst.fields; track f.name + f.type) {\n <div [hidden]=\"f.hidden\" [ngClass]=\"f.hostClassName\">\n <ng-container classicDynamicField\n [type]=\"f.type\"\n [path]=\"path + '.' + f.name\"\n [field]=\"f\"\n [group]=\"inst.group\"\n [instancePath]=\"path + '[' + inst.number + ']'\"\n ></ng-container>\n </div>\n }\n </div>\n <div class=\"sot-formfield-array-element-action\">\n @if (!field().disabled && (!field().minNbRow || field().minNbRow! < array.controls.length)) {\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"deleteItem(i, inst)\"\n >\n {{ field().deleteButton?.label ?? 'Delete' }}\n </button>\n }\n </div>\n </fieldset>\n }\n @if (!field().disabled && (!field().maxNbRow || field().maxNbRow! > array.controls.length)) {\n <div class=\"sot-formfield-array-add-button\">\n <button type=\"button\"\n class=\"sot-button\"\n (click)=\"addItem()\"\n >\n {{ field().addButton?.label ?? 'Add' }}\n </button>\n </div>\n }\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-array-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["fieldset.dynamic-field-array{border:none;padding:0;margin:0}.dynamic-field-array-add-button{padding:2rem 0}.dynamic-field-array{margin-bottom:2rem}\n"] }]
1984
2192
  }], ctorParameters: () => [] });
1985
2193
 
1986
2194
  class ClassicRowComponent extends AbstractFieldComponent {
1987
2195
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1988
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicRowComponent, isStandalone: true, selector: "sot-classic-row", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field.className\">\n @for (f of field.fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n classicDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => ClassiDynamicFieldDirective), selector: "[classicDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }] });
2196
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicRowComponent, isStandalone: true, selector: "sot-classic-row", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field().className\">\n @for (f of field().fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n classicDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group()\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: i0.forwardRef(() => ReactiveFormsModule) }, { kind: "directive", type: i0.forwardRef(() => NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => ClassiDynamicFieldDirective), selector: "[classicDynamicField]", inputs: ["type", "path", "field", "group", "instancePath"] }] });
1989
2197
  }
1990
2198
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicRowComponent, decorators: [{
1991
2199
  type: Component,
@@ -1993,7 +2201,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
1993
2201
  ReactiveFormsModule,
1994
2202
  NgClass,
1995
2203
  forwardRef(() => ClassiDynamicFieldDirective)
1996
- ], template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field.className\">\n @for (f of field.fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n classicDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n" }]
2204
+ ], template: "<div class=\"sot-formfield sot-formfield-row\" [ngClass]=\"field().className\">\n @for (f of field().fields; track f.type + f.name) {\n <div\n [hidden]=\"f.hidden\"\n [ngClass]=\"f.hostClassName\">\n <ng-container\n classicDynamicField\n [path]=\"path + '.' + f.name\"\n [type]=\"f.type\"\n [field]=\"f\"\n [group]=\"group()\"\n [instancePath]=\"instancePath\"\n >\n </ng-container>\n </div>\n }\n</div>\n" }]
1997
2205
  }] });
1998
2206
 
1999
2207
  class PasswordValidators {
@@ -2015,16 +2223,16 @@ class ClassicFieldPasswordComponent extends AbstractControlFieldComponent {
2015
2223
  iconErrorLabel;
2016
2224
  iconSuccessLabel;
2017
2225
  buttonAction(b) {
2018
- if (b.action && this.field && this.group) {
2019
- b.action(this.field, this.group, this.dynamicFormService.data);
2226
+ if (b.action) {
2227
+ b.action(this.field(), this.group(), this.data);
2020
2228
  }
2021
2229
  }
2022
2230
  ngOnInit() {
2023
2231
  super.ngOnInit();
2024
- this.showPasswordLabel = this.field.labels?.showPassword ?? "Show password";
2025
- this.hidePasswordLabel = this.field.labels?.hidePassword ?? "Hide password";
2026
- this.iconSuccessLabel = this.field.labels?.iconSuccess ?? "Success";
2027
- this.iconErrorLabel = this.field.labels?.iconError ?? "Error";
2232
+ this.showPasswordLabel = this.field().labels?.showPassword ?? "Show password";
2233
+ this.hidePasswordLabel = this.field().labels?.hidePassword ?? "Hide password";
2234
+ this.iconSuccessLabel = this.field().labels?.iconSuccess ?? "Success";
2235
+ this.iconErrorLabel = this.field().labels?.iconError ?? "Error";
2028
2236
  if (this.control) {
2029
2237
  this.control.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
2030
2238
  if (value?.length == 0) {
@@ -2056,29 +2264,29 @@ class ClassicFieldPasswordComponent extends AbstractControlFieldComponent {
2056
2264
  return this.control.value && !this.control.hasError("requiresSpecialChars");
2057
2265
  }
2058
2266
  setPasswordValidators() {
2059
- if (this.field.minlength) {
2060
- this.control?.addValidators(Validators.minLength(this.field.minlength));
2267
+ if (this.field().minlength) {
2268
+ this.control?.addValidators(Validators.minLength(this.field().minlength));
2061
2269
  }
2062
- if (this.field.maxlength) {
2063
- this.control?.addValidators(Validators.maxLength(this.field.maxlength));
2270
+ if (this.field().maxlength) {
2271
+ this.control?.addValidators(Validators.maxLength(this.field().maxlength));
2064
2272
  }
2065
- if (this.field.requiresDigit) {
2273
+ if (this.field().requiresDigit) {
2066
2274
  this.control?.addValidators(PasswordValidators.patternValidator(/(?=.*[0-9])/, {
2067
2275
  requiresDigit: true
2068
2276
  }));
2069
2277
  }
2070
- if (this.field.requiresUppercase) {
2278
+ if (this.field().requiresUppercase) {
2071
2279
  this.control?.addValidators(PasswordValidators.patternValidator(/(?=.*[A-Z])/, {
2072
2280
  requiresUppercase: true
2073
2281
  }));
2074
2282
  }
2075
- if (this.field.requiresLowercase) {
2283
+ if (this.field().requiresLowercase) {
2076
2284
  this.control?.addValidators(PasswordValidators.patternValidator(/(?=.*[a-z])/, {
2077
2285
  requiresLowercase: true
2078
2286
  }));
2079
2287
  }
2080
- if (this.field.requiresSpecialChars) {
2081
- const chars = this.field.specialChars?.join("") ?? "$@^!%*?&";
2288
+ if (this.field().requiresSpecialChars) {
2289
+ const chars = this.field().specialChars?.join("") ?? "$@^!%*?&";
2082
2290
  const regex = "(?=.*[" + chars + "])";
2083
2291
  this.control?.addValidators(PasswordValidators.patternValidator(new RegExp(regex), {
2084
2292
  requiresSpecialChars: true
@@ -2086,69 +2294,70 @@ class ClassicFieldPasswordComponent extends AbstractControlFieldComponent {
2086
2294
  }
2087
2295
  }
2088
2296
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2089
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldPasswordComponent, isStandalone: true, selector: "sot-classic-field-password", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"sot-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field.minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <span [ngClass]=\"minLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <span [ngClass]=\"maxLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"maxLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <span [ngClass]=\"requiresDigitValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresDigitValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field.requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <span [ngClass]=\"requiresUppercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresUppercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <span [ngClass]=\"requiresLowercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresLowercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <span [ngClass]=\"requiresSpecialCharsValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresSpecialCharsValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2297
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldPasswordComponent, isStandalone: true, selector: "sot-classic-field-password", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"sot-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field().minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <span [ngClass]=\"minLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <span [ngClass]=\"maxLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"maxLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <span [ngClass]=\"requiresDigitValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresDigitValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field().requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <span [ngClass]=\"requiresUppercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresUppercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <span [ngClass]=\"requiresLowercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresLowercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <span [ngClass]=\"requiresSpecialCharsValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresSpecialCharsValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2090
2298
  }
2091
2299
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldPasswordComponent, decorators: [{
2092
2300
  type: Component,
2093
- args: [{ selector: 'sot-classic-field-password', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field.autocomplete ?? 'off'\"\r\n [maxlength]=\"field.maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"sot-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field.minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <span [ngClass]=\"minLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <span [ngClass]=\"maxLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"maxLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field.requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <span [ngClass]=\"requiresDigitValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresDigitValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field.requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <span [ngClass]=\"requiresUppercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresUppercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <span [ngClass]=\"requiresLowercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresLowercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field.requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <span [ngClass]=\"requiresSpecialCharsValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresSpecialCharsValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field.labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}\n"] }]
2301
+ args: [{ selector: 'sot-classic-field-password', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-password\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': (control && control.disabled),\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-input-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n\r\n <input\r\n class=\"sot-input\"\r\n [ngClass]=\"{\r\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-input--valid': control && !control.untouched && control.valid,\r\n 'sot-input--disabled': (control && control.disabled),\r\n }\"\r\n [type]=\"inputType\"\r\n [attr.id]=\"'sot-input-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [autocomplete]=\"field().autocomplete ?? 'off'\"\r\n [maxlength]=\"field().maxlength ?? 10000000\"/>\r\n\r\n <button type=\"button\" class=\"sot-button\"\r\n (click)=\"tooglePassword()\"\r\n [attr.aria-label]=\"inputType === 'password' ? showPasswordLabel : hidePasswordLabel\"\r\n [attr.aria-pressed]=\"inputType === 'password'\">\r\n @if(inputType === 'password') {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-off-fill\"></span>\r\n } @else {\r\n <span aria-hidden=\"true\" class=\"sot-icon-eye-fill\"></span>\r\n }\r\n </button>\r\n\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <ul class=\"password-description\" [id]=\"uuid + '-description'\">\r\n @if (field().minlength) {\r\n <li [ngClass]=\"{ 'text-success': minLengthValid, 'text-error': !minLengthValid }\">\r\n <span [ngClass]=\"minLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"minLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.minlength ?? \"Must be at least 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().maxlength) {\r\n <li [ngClass]=\"{ 'text-success': maxLengthValid, 'text-error': !maxLengthValid }\">\r\n <span [ngClass]=\"maxLengthValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"maxLengthValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.maxlength ?? \"Must be at most 8 characters long\" }}\r\n </li>\r\n }\r\n @if (field().requiresDigit) {\r\n <li [ngClass]=\"{ 'text-success': requiresDigitValid, 'text-error': !requiresDigitValid }\">\r\n <span [ngClass]=\"requiresDigitValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresDigitValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresDigit ?? \"Must contain at least 1 digit\" }}\r\n </li>\r\n }\r\n @if (field().requiresUppercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresUppercaseValid, 'text-error': !requiresUppercaseValid }\">\r\n <span [ngClass]=\"requiresUppercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresUppercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresUppercase ?? \"Must contain at least 1 uppercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresLowercase) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresLowercaseValid, 'text-error': !requiresLowercaseValid }\">\r\n <span [ngClass]=\"requiresLowercaseValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresLowercaseValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresLowercase ?? \"Must contain at least 1 lowercase character\" }}\r\n </li>\r\n }\r\n @if (field().requiresSpecialChars) {\r\n <li\r\n [ngClass]=\"{ 'text-success': requiresSpecialCharsValid, 'text-error': !requiresSpecialCharsValid }\">\r\n <span [ngClass]=\"requiresSpecialCharsValid ? 'check' : 'error'\"\r\n [attr.aria-label]=\"requiresSpecialCharsValid ? iconSuccessLabel : iconErrorLabel\"></span>\r\n {{ field().labels?.requiresSpecialChars ?? \"Must contain at least 1 special character\" }}\r\n </li>\r\n }\r\n </ul>\r\n</div>\r\n\r\n", styles: [".sot-formfield-input{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}.password-description{list-style-type:none;margin-block-start:0}.password-description li{display:flex;flex-direction:row;align-items:center}\n"] }]
2094
2302
  }] });
2095
2303
 
2096
2304
  class ClassicFieldRadioButtonComponent extends AbstractControlFieldComponent {
2097
2305
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldRadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2098
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldRadioButtonComponent, isStandalone: true, selector: "sot-classic-field-radio-button", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-radio\" [ngClass]=\"field.className\">\r\n <fieldset\r\n class=\"sot-formfield-wrapper sot-fieldset\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group\">\r\n <legend\r\n class=\"sot-fieldset-legend\"\r\n [ngClass]=\"field.labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n <span class=\"sot-legend-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </legend>\r\n @if (field.options) {\r\n @for (item of field.options; track item; let i = $index) {\r\n <div\r\n class=\"sot-fieldset-element\"\r\n [ngClass]=\"{ 'sot-fieldset--inline': !field.verticalAlign }\">\r\n <div class=\"sot-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [attr.disabled]=\"field.disabledKey && !!item[field.disabledKey] ? true : undefined\"\r\n [ngClass]=\"{\r\n 'sot-radio--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-radio--valid': control && !control.untouched && control.valid,\r\n 'sot-radio--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n <span class=\"sot-label-text\"\r\n [innerHTML]=\"field.labelKey ? item[field.labelKey!] : item\"></span>\r\n @if (field.descriptionKey) {\r\n <span class=\"sot-label-description\">{{ item[field.descriptionKey] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-radio-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2306
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldRadioButtonComponent, isStandalone: true, selector: "sot-classic-field-radio-button", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-radio\" [ngClass]=\"field().className\">\r\n <fieldset\r\n class=\"sot-formfield-wrapper sot-fieldset\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group()\">\r\n <legend\r\n class=\"sot-fieldset-legend\"\r\n [ngClass]=\"field().labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n <span class=\"sot-legend-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </legend>\r\n @if (field().options) {\r\n @for (item of field().options; track item; let i = $index) {\r\n <div\r\n class=\"sot-fieldset-element\"\r\n [ngClass]=\"{ 'sot-fieldset--inline': !field().verticalAlign }\">\r\n <div class=\"sot-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [attr.disabled]=\"field().disabledKey && !!item[field().disabledKey!] ? true : undefined\"\r\n [ngClass]=\"{\r\n 'sot-radio--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-radio--valid': control && !control.untouched && control.valid,\r\n 'sot-radio--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n <span class=\"sot-label-text\"\r\n [innerHTML]=\"field().labelKey ? item[field().labelKey!] : item\"></span>\r\n @if (field().descriptionKey) {\r\n <span class=\"sot-label-description\">{{ item[field().descriptionKey!] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-radio-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2099
2307
  }
2100
2308
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldRadioButtonComponent, decorators: [{
2101
2309
  type: Component,
2102
- args: [{ selector: 'sot-classic-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-radio\" [ngClass]=\"field.className\">\r\n <fieldset\r\n class=\"sot-formfield-wrapper sot-fieldset\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group\">\r\n <legend\r\n class=\"sot-fieldset-legend\"\r\n [ngClass]=\"field.labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n <span class=\"sot-legend-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </legend>\r\n @if (field.options) {\r\n @for (item of field.options; track item; let i = $index) {\r\n <div\r\n class=\"sot-fieldset-element\"\r\n [ngClass]=\"{ 'sot-fieldset--inline': !field.verticalAlign }\">\r\n <div class=\"sot-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field.name\"\r\n [attr.disabled]=\"field.disabledKey && !!item[field.disabledKey] ? true : undefined\"\r\n [ngClass]=\"{\r\n 'sot-radio--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-radio--valid': control && !control.untouched && control.valid,\r\n 'sot-radio--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n <span class=\"sot-label-text\"\r\n [innerHTML]=\"field.labelKey ? item[field.labelKey!] : item\"></span>\r\n @if (field.descriptionKey) {\r\n <span class=\"sot-label-description\">{{ item[field.descriptionKey] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-radio-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"] }]
2310
+ args: [{ selector: 'sot-classic-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-radio\" [ngClass]=\"field().className\">\r\n <fieldset\r\n class=\"sot-formfield-wrapper sot-fieldset\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\"\r\n [id]=\"'radio-' + uuid\"\r\n [attr.aria-labelledby]=\"'radio-legend-' + uuid\"\r\n [formGroup]=\"group()\">\r\n <legend\r\n class=\"sot-fieldset-legend\"\r\n [ngClass]=\"field().labelClassName\"\r\n [id]=\"'radio-legend-' + uuid\">\r\n <span class=\"sot-legend-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </legend>\r\n @if (field().options) {\r\n @for (item of field().options; track item; let i = $index) {\r\n <div\r\n class=\"sot-fieldset-element\"\r\n [ngClass]=\"{ 'sot-fieldset--inline': !field().verticalAlign }\">\r\n <div class=\"sot-radio-group\">\r\n <input\r\n type=\"radio\"\r\n [id]=\"'radio-' + uuid + '-' + i\"\r\n [value]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [attr.name]=\"uuid\"\r\n [formControlName]=\"field().name\"\r\n [attr.disabled]=\"field().disabledKey && !!item[field().disabledKey!] ? true : undefined\"\r\n [ngClass]=\"{\r\n 'sot-radio--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-radio--valid': control && !control.untouched && control.valid,\r\n 'sot-radio--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-label\"\r\n [for]=\"'radio-' + uuid + '-' + i\">\r\n <span class=\"sot-label-text\"\r\n [innerHTML]=\"field().labelKey ? item[field().labelKey!] : item\"></span>\r\n @if (field().descriptionKey) {\r\n <span class=\"sot-label-description\">{{ item[field().descriptionKey!] }}</span>\r\n }\r\n </label>\r\n </div>\r\n </div>\r\n }\r\n }\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-radio-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </fieldset>\r\n</div>\r\n", styles: [".verticalAlign{display:flex;flex-direction:column}.horizontalAlign{display:flex;flex-direction:row;gap:2rem}.sot-formfield-radiobutton-label{display:flex;flex-direction:column}.sot-formfield-radiobutton-item ::ng-deep label{display:flex;flex-direction:column}\n"] }]
2103
2311
  }] });
2104
2312
 
2105
2313
  class ClassicFieldSelectComponent extends AbstractControlFieldComponent {
2106
2314
  options = [];
2107
2315
  ngOnInit() {
2108
2316
  super.ngOnInit();
2109
- if (isObservable(this.field.options)) {
2110
- this.field.options.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((options) => {
2317
+ const options = this.field().options;
2318
+ if (isObservable(options)) {
2319
+ options.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((options) => {
2111
2320
  this.options = options;
2112
2321
  });
2113
2322
  }
2114
2323
  else {
2115
- this.options = this.field.options;
2324
+ this.options = options;
2116
2325
  }
2117
2326
  }
2118
2327
  buttonAction(b) {
2119
- if (b.action && this.field && this.group) {
2120
- b.action(this.field, this.group, this.dynamicFormService.data);
2328
+ if (b.action) {
2329
+ b.action(this.field(), this.group(), this.data);
2121
2330
  }
2122
2331
  }
2123
2332
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2124
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldSelectComponent, isStandalone: true, selector: "sot-classic-field-select", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"sot-select\"\r\n [multiple]=\"field.multiple\"\r\n [ngClass]=\"{\r\n 'sot-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-select--valid': control && !control.untouched && control.valid,\r\n 'sot-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field.name\">\r\n @if (field.resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field.resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field.options) {\r\n @if (field.groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field.groupLabelKey ? group[field.groupLabelKey] : ''\">\r\n @if (field.groupOptionsKey && group[field.groupOptionsKey]) {\r\n @for (item of group[field.groupOptionsKey]; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2333
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldSelectComponent, isStandalone: true, selector: "sot-classic-field-select", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"sot-select\"\r\n [multiple]=\"field().multiple\"\r\n [ngClass]=\"{\r\n 'sot-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-select--valid': control && !control.untouched && control.valid,\r\n 'sot-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field().name\">\r\n @if (field().resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field().resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field().options) {\r\n @if (field().groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field().groupLabelKey ? group[field().groupLabelKey!] : ''\">\r\n @if (field().groupOptionsKey && group[field().groupOptionsKey!]) {\r\n @for (item of group[field().groupOptionsKey!]; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2125
2334
  }
2126
2335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldSelectComponent, decorators: [{
2127
2336
  type: Component,
2128
- args: [{ selector: 'sot-classic-field-select', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field.labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field.prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"sot-select\"\r\n [multiple]=\"field.multiple\"\r\n [ngClass]=\"{\r\n 'sot-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-select--valid': control && !control.untouched && control.valid,\r\n 'sot-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field.name\">\r\n @if (field.resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field.resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field.options) {\r\n @if (field.groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field.groupLabelKey ? group[field.groupLabelKey] : ''\">\r\n @if (field.groupOptionsKey && group[field.groupOptionsKey]) {\r\n @for (item of group[field.groupOptionsKey]; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field.valueKey ? item[field.valueKey] : item\"\r\n [disabled]=\"field.disabledKey ? item[field.disabledKey] : false\">\r\n {{ field.labelKey ? item[field.labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field.suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
2337
+ args: [{ selector: 'sot-classic-field-select', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-select\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <label\r\n class=\"sot-label\"\r\n [ngClass]=\"field().labelClassName\"\r\n [attr.for]=\"'sot-select-' + uuid\">\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n <div class=\"sot-input-wrapper\">\r\n @for (prefix of field().prefixes; track prefix) {\r\n <span class=\"sot-formfield-prefix\">\r\n @if (prefix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"prefix.actionAriaLabel\"\r\n (click)=\"buttonAction(prefix)\"\r\n >{{ prefix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"prefix.label\"></span>\r\n }\r\n </span>\r\n }\r\n <select\r\n class=\"sot-select\"\r\n [multiple]=\"field().multiple\"\r\n [ngClass]=\"{\r\n 'sot-select--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-select--valid': control && !control.untouched && control.valid,\r\n 'sot-select--disabled': control && control.disabled,\r\n }\"\r\n [attr.id]=\"'sot-select-' + uuid\"\r\n [formControlName]=\"field().name\">\r\n @if (field().resetOption) {\r\n <option [ngValue]=\"undefined\">\r\n {{ field().resetOptionLabel }}\r\n </option>\r\n }\r\n\r\n @if (field().options) {\r\n @if (field().groupLabelKey) {\r\n @for (group of options; track group) {\r\n <optgroup [label]=\"field().groupLabelKey ? group[field().groupLabelKey!] : ''\">\r\n @if (field().groupOptionsKey && group[field().groupOptionsKey!]) {\r\n @for (item of group[field().groupOptionsKey!]; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n </optgroup>\r\n }\r\n } @else {\r\n @for (item of options; track item) {\r\n <option\r\n [ngValue]=\"field().valueKey ? item[field().valueKey!] : item\"\r\n [disabled]=\"field().disabledKey ? item[field().disabledKey!] : false\">\r\n {{ field().labelKey ? item[field().labelKey!] : item }}\r\n </option>\r\n }\r\n }\r\n\r\n }\r\n </select>\r\n @for (suffix of field().suffixes; track suffix) {\r\n <span class=\"sot-formfield-suffix\">\r\n @if (suffix.action) {\r\n <button type=\"button\"\r\n class=\"sot-button\"\r\n [attr.aria-label]=\"suffix.actionAriaLabel\"\r\n (click)=\"buttonAction(suffix)\"\r\n >{{ suffix.label }}</button>\r\n } @else {\r\n <span [innerHTML]=\"suffix.label\"></span>\r\n }\r\n </span>\r\n }\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-select-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sot-formfield-select{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
2129
2338
  }] });
2130
2339
 
2131
2340
  class ClassicFieldToggleComponent extends AbstractControlFieldComponent {
2132
2341
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2133
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldToggleComponent, isStandalone: true, selector: "sot-classic-field-toggle", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"sot-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"sot-toggle-input\"\r\n [attr.id]=\"'sot-toggle-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field.disabled\"\r\n [ngClass]=\"{\r\n 'sot-toggle--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-toggle--valid': control && !control.untouched && control.valid,\r\n 'sot-toggle--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-toggle-label\"\r\n [attr.for]=\"'sot-toggle-' + uuid\"\r\n [attr.data-sot-checked-label]=\"field.checkedLabel\"\r\n [attr.data-sot-unchecked-label]=\"field.uncheckedLabel\"\r\n >\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2342
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldToggleComponent, isStandalone: true, selector: "sot-classic-field-toggle", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"sot-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"sot-toggle-input\"\r\n [attr.id]=\"'sot-toggle-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field().disabled\"\r\n [ngClass]=\"{\r\n 'sot-toggle--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-toggle--valid': control && !control.untouched && control.valid,\r\n 'sot-toggle--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-toggle-label\"\r\n [attr.for]=\"'sot-toggle-' + uuid\"\r\n [attr.data-sot-checked-label]=\"field().checkedLabel\"\r\n [attr.data-sot-unchecked-label]=\"field().uncheckedLabel\"\r\n >\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2134
2343
  }
2135
2344
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldToggleComponent, decorators: [{
2136
2345
  type: Component,
2137
- args: [{ selector: 'sot-classic-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field.className\">\r\n <div\r\n [formGroup]=\"group\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"sot-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"sot-toggle-input\"\r\n [attr.id]=\"'sot-toggle-' + uuid\"\r\n [formControlName]=\"field.name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field.disabled\"\r\n [ngClass]=\"{\r\n 'sot-toggle--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-toggle--valid': control && !control.untouched && control.valid,\r\n 'sot-toggle--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-toggle-label\"\r\n [attr.for]=\"'sot-toggle-' + uuid\"\r\n [attr.data-sot-checked-label]=\"field.checkedLabel\"\r\n [attr.data-sot-unchecked-label]=\"field.uncheckedLabel\"\r\n >\r\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field.description) {\r\n <span class=\"sot-label-description\">{{ field.description }}</span>\r\n }\r\n </label>\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field.validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
2346
+ args: [{ selector: 'sot-classic-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-toogle\" [ngClass]=\"field().className\">\r\n <div\r\n [formGroup]=\"group()\"\r\n class=\"sot-formfield-wrapper\"\r\n [ngClass]=\"{\r\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\r\n 'sot-formfield--disabled': control && control.disabled,\r\n }\">\r\n <div class=\"sot-toggle\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"sot-toggle-input\"\r\n [attr.id]=\"'sot-toggle-' + uuid\"\r\n [formControlName]=\"field().name\"\r\n [required]=\"!!required\"\r\n [attr.disabled]=\"field().disabled\"\r\n [ngClass]=\"{\r\n 'sot-toggle--error': control && !control.untouched && !control.valid && !control.disabled,\r\n 'sot-toggle--valid': control && !control.untouched && control.valid,\r\n 'sot-toggle--disabled': control && control.disabled,\r\n }\"/>\r\n <label\r\n class=\"sot-toggle-label\"\r\n [attr.for]=\"'sot-toggle-' + uuid\"\r\n [attr.data-sot-checked-label]=\"field().checkedLabel\"\r\n [attr.data-sot-unchecked-label]=\"field().uncheckedLabel\"\r\n >\r\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\r\n @if (required) {\r\n <span class=\"sot-label-required\">*</span>\r\n }\r\n @if (field().description) {\r\n <span class=\"sot-label-description\">{{ field().description }}</span>\r\n }\r\n </label>\r\n </div>\r\n <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of field().validations; track validation) {\r\n @if (control && !control.untouched && control.hasError(validation.name)) {\r\n <p class=\"sot-message sot-message--error\">\r\n {{ validation.message }}\r\n </p>\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
2138
2347
  }] });
2139
2348
 
2140
2349
  class ClassicFieldTextareaComponent extends AbstractControlFieldComponent {
2141
2350
  buttonAction(b) {
2142
- if (b.action && this.field && this.group) {
2143
- b.action(this.field, this.group, this.dynamicFormService.data);
2351
+ if (b.action && this.field() && this.group()) {
2352
+ b.action(this.field(), this.group(), this.data);
2144
2353
  }
2145
2354
  }
2146
2355
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2147
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldTextareaComponent, isStandalone: true, selector: "sot-classic-field-textarea", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field.className\">\n <div\n [formGroup]=\"group\"\n class=\"sot-formfield-wrapper\"\n [ngClass]=\"{\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\n 'sot-formfield--disabled': control && control.disabled,\n }\">\n <label\n class=\"sot-label\"\n [ngClass]=\"field.labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </label>\n <div class=\"sot-input-wrapper\">\n @for (prefix of field.prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\">\n @if (prefix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"sot-textarea\"\n [ngClass]=\"{\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-input--valid': control && !control.untouched && control.valid ,\n 'sot-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field.name\"\n [required]=\"!!required\"\n [readonly]=\"field.readonly\"\n [rows]=\"field.rows\"\n [maxlength]=\"field.maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field.suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2356
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicFieldTextareaComponent, isStandalone: true, selector: "sot-classic-field-textarea", usesInheritance: true, ngImport: i0, template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field().className\">\n <div\n [formGroup]=\"group()\"\n class=\"sot-formfield-wrapper\"\n [ngClass]=\"{\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\n 'sot-formfield--disabled': control && control.disabled,\n }\">\n <label\n class=\"sot-label\"\n [ngClass]=\"field().labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </label>\n <div class=\"sot-input-wrapper\">\n @for (prefix of field().prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\">\n @if (prefix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"sot-textarea\"\n [ngClass]=\"{\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-input--valid': control && !control.untouched && control.valid ,\n 'sot-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field().name\"\n [required]=\"!!required\"\n [readonly]=\"field().readonly\"\n [rows]=\"field().rows\"\n [maxlength]=\"field().maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field().suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
2148
2357
  }
2149
2358
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldTextareaComponent, decorators: [{
2150
2359
  type: Component,
2151
- args: [{ selector: 'sot-classic-field-textarea', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field.className\">\n <div\n [formGroup]=\"group\"\n class=\"sot-formfield-wrapper\"\n [ngClass]=\"{\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\n 'sot-formfield--disabled': control && control.disabled,\n }\">\n <label\n class=\"sot-label\"\n [ngClass]=\"field.labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n <span class=\"sot-label-text\" [innerHTML]=\"field.label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field.description) {\n <span class=\"sot-label-description\">{{ field.description }}</span>\n }\n </label>\n <div class=\"sot-input-wrapper\">\n @for (prefix of field.prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\">\n @if (prefix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"sot-textarea\"\n [ngClass]=\"{\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-input--valid': control && !control.untouched && control.valid ,\n 'sot-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field.name\"\n [required]=\"!!required\"\n [readonly]=\"field.readonly\"\n [rows]=\"field.rows\"\n [maxlength]=\"field.maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field.suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field.validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
2360
+ args: [{ selector: 'sot-classic-field-textarea', standalone: true, imports: [ReactiveFormsModule, NgClass], template: "<div class=\"sot-formfield sot-formfield-textarea\" [ngClass]=\" field().className\">\n <div\n [formGroup]=\"group()\"\n class=\"sot-formfield-wrapper\"\n [ngClass]=\"{\n 'sot-formfield--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-formfield--valid': control && !control.untouched && control.valid ,\n 'sot-formfield--disabled': control && control.disabled,\n }\">\n <label\n class=\"sot-label\"\n [ngClass]=\"field().labelClassName\"\n [attr.for]=\"'sot-textarea-' + uuid\">\n <span class=\"sot-label-text\" [innerHTML]=\"field().label\"></span>\n @if (required) {\n <span class=\"sot-label-required\">*</span>\n }\n @if (field().description) {\n <span class=\"sot-label-description\">{{ field().description }}</span>\n }\n </label>\n <div class=\"sot-input-wrapper\">\n @for (prefix of field().prefixes; track prefix) {\n <span class=\"sot-formfield-prefix\">\n @if (prefix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"prefix.actionAriaLabel\"\n (click)=\"buttonAction(prefix)\"\n >{{ prefix.label }}</button>\n } @else {\n <span [innerHTML]=\"prefix.label\"></span>\n }\n </span>\n }\n\n <textarea\n class=\"sot-textarea\"\n [ngClass]=\"{\n 'sot-input--error': control && !control.untouched && !control.valid && !control.disabled,\n 'sot-input--valid': control && !control.untouched && control.valid ,\n 'sot-input--disabled': control && control.disabled,\n }\"\n [attr.id]=\"'sot-textarea-' + uuid\"\n [formControlName]=\"field().name\"\n [required]=\"!!required\"\n [readonly]=\"field().readonly\"\n [rows]=\"field().rows\"\n [maxlength]=\"field().maxlength ?? 10000000\">\n </textarea>\n\n @for (suffix of field().suffixes; track suffix) {\n <span class=\"sot-formfield-suffix\">\n @if (suffix.action) {\n <button type=\"button\"\n class=\"sot-button\"\n [attr.aria-label]=\"suffix.actionAriaLabel\"\n (click)=\"buttonAction(suffix)\"\n >{{ suffix.label }}</button>\n } @else {\n <span [innerHTML]=\"suffix.label\"></span>\n }\n </span>\n }\n </div>\n <div\n class=\"sot-messages-group\"\n [attr.id]=\"'sot-input-' + uuid + '-error'\"\n aria-live=\"assertive\">\n @for (validation of field().validations; track validation) {\n @if (control && !control.untouched && control.hasError(validation.name)) {\n <p class=\"sot-message sot-message--error\">\n {{ validation.message }}\n </p>\n }\n }\n </div>\n </div>\n</div>\n", styles: [".sot-formfield-textarea{width:100%}.sot-formfield-prefix,.sot-formfield-suffix{padding:0 .5rem}\n"] }]
2152
2361
  }] });
2153
2362
 
2154
2363
  const components = {
@@ -2194,8 +2403,8 @@ class ClassiDynamicFieldDirective {
2194
2403
  environmentInjector: this.injector
2195
2404
  });
2196
2405
  }
2197
- this.component.instance.field = this.field();
2198
- this.component.instance.group = this.group();
2406
+ this.component.instance.field = this.field;
2407
+ this.component.instance.group = this.group;
2199
2408
  this.component.instance.instancePath = this.instancePath();
2200
2409
  this.component.instance.path = this.path();
2201
2410
  }
@@ -2299,5 +2508,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
2299
2508
  * Generated bundle index. Do not edit.
2300
2509
  */
2301
2510
 
2302
- export { AbstractControlFieldComponent, AbstractFieldComponent, AcCustomComponentField, AutocompleteAttribute, ClassicDynamicFormComponent, ConditionsService, DsfrDynamicFormComponent, DynamicFormService, MaterialDynamicFormComponent, MaterialDynamicFormModalComponent };
2511
+ export { AbstractControlFieldComponent, AbstractFieldComponent, AcCustomComponentField, AcFieldCheckboxComponent, AutocompleteAttribute, ClassicDynamicFormComponent, ConditionsService, DsfrDynamicFormComponent, DynamicFormService, MatFieldChipsComponent, MatFieldCustomComponent, MatFieldDateComponent, MatFieldFileComponent, MatFieldInputComponent, MatFieldPasswordComponent, MatFieldRadioButtonComponent, MatFieldSelectComponent, MatFieldTextareaComponent, MatFieldToggleComponent, MaterialDynamicFormComponent, MaterialDynamicFormModalComponent, MaterialDynamicFormStepperComponent };
2303
2512
  //# sourceMappingURL=sotoa-ui-dynamic-form.mjs.map