@sotoa-ui/dynamic-form 0.0.2 → 0.0.4
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,8 +1,8 @@
|
|
|
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, effect } from '@angular/core';
|
|
3
|
-
import { distinctUntilChanged, isObservable } from 'rxjs';
|
|
2
|
+
import { Injectable, inject, DestroyRef, Component, forwardRef, ChangeDetectorRef, ViewContainerRef, EnvironmentInjector, input, EventEmitter, Output, Optional, Host, SkipSelf, Directive, ViewChild, computed, output, effect } from '@angular/core';
|
|
3
|
+
import { distinctUntilChanged, isObservable, take } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
|
-
import { FormBuilder, Validators, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
5
|
+
import { FormBuilder, Validators, ReactiveFormsModule, NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
6
|
import * as _ from 'lodash-es';
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { debounceTime } from 'rxjs/operators';
|
|
@@ -15,9 +15,9 @@ import * as i3$1 from '@angular/material/icon';
|
|
|
15
15
|
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
16
16
|
import * as i3 from '@angular/material/input';
|
|
17
17
|
import { MatInputModule } from '@angular/material/input';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i1$1 from '@angular/material/button';
|
|
19
19
|
import { MatButtonModule, MatButton, MatIconButton, MatFabButton, MatMiniFabButton } from '@angular/material/button';
|
|
20
|
-
import * as i1$
|
|
20
|
+
import * as i1$2 from '@angular/material/expansion';
|
|
21
21
|
import { MatAccordion, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionModule } from '@angular/material/expansion';
|
|
22
22
|
import { MatCardModule } from '@angular/material/card';
|
|
23
23
|
import * as i2$2 from '@angular/material/radio';
|
|
@@ -29,6 +29,8 @@ import * as i2$3 from '@angular/material/slide-toggle';
|
|
|
29
29
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
30
30
|
import { MatBadge } from '@angular/material/badge';
|
|
31
31
|
import { MatMenuItem } from '@angular/material/menu';
|
|
32
|
+
import * as i2$4 from '@angular/material/dialog';
|
|
33
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
32
34
|
|
|
33
35
|
class ConditionsService {
|
|
34
36
|
constructor() {
|
|
@@ -524,25 +526,25 @@ var AutocompleteAttribute;
|
|
|
524
526
|
AutocompleteAttribute["Impp"] = "impp";
|
|
525
527
|
})(AutocompleteAttribute || (AutocompleteAttribute = {}));
|
|
526
528
|
|
|
527
|
-
|
|
528
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
529
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
530
|
-
}
|
|
531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
529
|
+
class MatDivTextComponent extends AbstractFieldComponent {
|
|
530
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatDivTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
531
|
+
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"] }] });
|
|
532
|
+
}
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatDivTextComponent, decorators: [{
|
|
532
534
|
type: Component,
|
|
533
|
-
args: [{ selector: 'sot-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" }]
|
|
535
|
+
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" }]
|
|
534
536
|
}] });
|
|
535
537
|
|
|
536
|
-
|
|
538
|
+
class AcFieldCheckboxComponent extends AbstractControlFieldComponent {
|
|
537
539
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
538
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcFieldCheckboxComponent, isStandalone: true, selector: "sot-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"] }] });
|
|
539
|
-
}
|
|
540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCheckboxComponent
|
|
540
|
+
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"] }] });
|
|
541
|
+
}
|
|
542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCheckboxComponent, decorators: [{
|
|
541
543
|
type: Component,
|
|
542
|
-
args: [{ selector: 'sot-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"] }]
|
|
544
|
+
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"] }]
|
|
543
545
|
}] });
|
|
544
546
|
|
|
545
|
-
|
|
547
|
+
class MatFieldInputComponent extends AbstractControlFieldComponent {
|
|
546
548
|
inputType = 'text';
|
|
547
549
|
buttonAction(b) {
|
|
548
550
|
if (b.action && this.field && this.group) {
|
|
@@ -561,35 +563,35 @@ let AcFieldInputComponent$2 = class AcFieldInputComponent extends AbstractContro
|
|
|
561
563
|
});
|
|
562
564
|
}
|
|
563
565
|
}
|
|
564
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
565
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
566
|
-
}
|
|
567
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
567
|
+
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: i1$1.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"] }] });
|
|
568
|
+
}
|
|
569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldInputComponent, decorators: [{
|
|
568
570
|
type: Component,
|
|
569
|
-
args: [{ selector: 'sot-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\"\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"] }]
|
|
571
|
+
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"] }]
|
|
570
572
|
}] });
|
|
571
573
|
|
|
572
|
-
|
|
574
|
+
class MatGroupComponent extends AbstractControlFieldComponent {
|
|
573
575
|
get subGroup() {
|
|
574
576
|
return this.group.controls[this.field.name];
|
|
575
577
|
}
|
|
576
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
577
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
578
|
-
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
578
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
579
|
+
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"] }] });
|
|
580
|
+
}
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatGroupComponent, decorators: [{
|
|
580
582
|
type: Component,
|
|
581
|
-
args: [{ selector: 'sot-group', standalone: true, imports: [
|
|
582
|
-
forwardRef(() => AcDynamicFieldDirective
|
|
583
|
+
args: [{ selector: 'sot-mat-group', standalone: true, imports: [
|
|
584
|
+
forwardRef(() => AcDynamicFieldDirective),
|
|
583
585
|
NgClass,
|
|
584
586
|
MatAccordion,
|
|
585
587
|
MatExpansionPanel,
|
|
586
588
|
MatExpansionPanelHeader,
|
|
587
589
|
MatExpansionPanelTitle,
|
|
588
590
|
NgTemplateOutlet
|
|
589
|
-
], 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
|
|
591
|
+
], 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"] }]
|
|
590
592
|
}] });
|
|
591
593
|
|
|
592
|
-
|
|
594
|
+
class MatArrayComponent extends AbstractControlFieldComponent {
|
|
593
595
|
dynamicService = inject(DynamicFormService);
|
|
594
596
|
ref = inject(ChangeDetectorRef);
|
|
595
597
|
get array() {
|
|
@@ -624,13 +626,13 @@ let AcArrayComponent$2 = class AcArrayComponent extends AbstractControlFieldComp
|
|
|
624
626
|
this.array.removeAt(index);
|
|
625
627
|
this.ref.detectChanges();
|
|
626
628
|
}
|
|
627
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
628
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
629
|
-
}
|
|
630
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
629
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
630
|
+
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$2.MatAccordion), selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i0.forwardRef(() => i1$2.MatExpansionPanel), selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i0.forwardRef(() => i1$2.MatExpansionPanelHeader), selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i0.forwardRef(() => i1$2.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"] }] });
|
|
631
|
+
}
|
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatArrayComponent, decorators: [{
|
|
631
633
|
type: Component,
|
|
632
|
-
args: [{ selector: "sot-array", standalone: true, imports: [
|
|
633
|
-
forwardRef(() => AcDynamicFieldDirective
|
|
634
|
+
args: [{ selector: "sot-mat-array", standalone: true, imports: [
|
|
635
|
+
forwardRef(() => AcDynamicFieldDirective),
|
|
634
636
|
MatExpansionModule,
|
|
635
637
|
NgClass,
|
|
636
638
|
MatIcon,
|
|
@@ -639,21 +641,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
639
641
|
ReactiveFormsModule,
|
|
640
642
|
MatError,
|
|
641
643
|
NgTemplateOutlet
|
|
642
|
-
], 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
|
|
644
|
+
], 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"] }]
|
|
643
645
|
}], ctorParameters: () => [] });
|
|
644
646
|
|
|
645
|
-
|
|
646
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
647
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
648
|
-
}
|
|
649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
647
|
+
class MatRowComponent extends AbstractFieldComponent {
|
|
648
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
649
|
+
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"] }] });
|
|
650
|
+
}
|
|
651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatRowComponent, decorators: [{
|
|
650
652
|
type: Component,
|
|
651
|
-
args: [{ selector: 'sot-row', standalone: true, imports: [
|
|
653
|
+
args: [{ selector: 'sot-mat-row', standalone: true, imports: [
|
|
652
654
|
ReactiveFormsModule,
|
|
653
655
|
NgClass,
|
|
654
|
-
forwardRef(() => AcDynamicFieldDirective
|
|
655
|
-
AcDynamicFieldDirective
|
|
656
|
-
], 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
|
|
656
|
+
forwardRef(() => AcDynamicFieldDirective),
|
|
657
|
+
AcDynamicFieldDirective
|
|
658
|
+
], 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" }]
|
|
657
659
|
}] });
|
|
658
660
|
|
|
659
661
|
let PasswordValidators$2 = class PasswordValidators {
|
|
@@ -668,7 +670,7 @@ let PasswordValidators$2 = class PasswordValidators {
|
|
|
668
670
|
}
|
|
669
671
|
};
|
|
670
672
|
|
|
671
|
-
|
|
673
|
+
class MatFieldPasswordComponent extends AbstractControlFieldComponent {
|
|
672
674
|
inputType = 'password';
|
|
673
675
|
showPasswordLabel;
|
|
674
676
|
hidePasswordLabel;
|
|
@@ -745,24 +747,24 @@ let AcFieldPasswordComponent$2 = class AcFieldPasswordComponent extends Abstract
|
|
|
745
747
|
}));
|
|
746
748
|
}
|
|
747
749
|
}
|
|
748
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
749
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
750
|
-
}
|
|
751
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
750
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
751
|
+
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: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
|
|
752
|
+
}
|
|
753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldPasswordComponent, decorators: [{
|
|
752
754
|
type: Component,
|
|
753
|
-
args: [{ selector: 'sot-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-
|
|
755
|
+
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"] }]
|
|
754
756
|
}] });
|
|
755
757
|
|
|
756
|
-
|
|
757
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
758
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
759
|
-
}
|
|
760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
758
|
+
class MatFieldRadioButtonComponent extends AbstractControlFieldComponent {
|
|
759
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldRadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
760
|
+
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 }] });
|
|
761
|
+
}
|
|
762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldRadioButtonComponent, decorators: [{
|
|
761
763
|
type: Component,
|
|
762
|
-
args: [{ selector: 'sot-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"] }]
|
|
764
|
+
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"] }]
|
|
763
765
|
}] });
|
|
764
766
|
|
|
765
|
-
|
|
767
|
+
class MatFieldSelectComponent extends AbstractControlFieldComponent {
|
|
766
768
|
options = [];
|
|
767
769
|
ngOnInit() {
|
|
768
770
|
super.ngOnInit();
|
|
@@ -780,35 +782,35 @@ let AcFieldSelectComponent$2 = class AcFieldSelectComponent extends AbstractCont
|
|
|
780
782
|
b.action(this.field, this.group, this.dynamicFormService.data);
|
|
781
783
|
}
|
|
782
784
|
}
|
|
783
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
784
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
785
|
-
}
|
|
786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
785
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
786
|
+
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 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"] }] });
|
|
787
|
+
}
|
|
788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldSelectComponent, decorators: [{
|
|
787
789
|
type: Component,
|
|
788
|
-
args: [{ selector: 'sot-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 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"] }]
|
|
790
|
+
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 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"] }]
|
|
789
791
|
}] });
|
|
790
792
|
|
|
791
|
-
|
|
793
|
+
class MatFieldTextareaComponent extends AbstractControlFieldComponent {
|
|
792
794
|
buttonAction(b) {
|
|
793
795
|
if (b.action && this.field && this.group) {
|
|
794
796
|
b.action(this.field, this.group, this.dynamicFormService.data);
|
|
795
797
|
}
|
|
796
798
|
}
|
|
797
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
798
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
799
|
-
}
|
|
800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
799
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
800
|
+
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 }] });
|
|
801
|
+
}
|
|
802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldTextareaComponent, decorators: [{
|
|
801
803
|
type: Component,
|
|
802
|
-
args: [{ selector: 'sot-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"] }]
|
|
804
|
+
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"] }]
|
|
803
805
|
}] });
|
|
804
806
|
|
|
805
|
-
|
|
806
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
807
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
808
|
-
}
|
|
809
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
807
|
+
class MatFieldToggleComponent extends AbstractControlFieldComponent {
|
|
808
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
809
|
+
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"] }] });
|
|
810
|
+
}
|
|
811
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldToggleComponent, decorators: [{
|
|
810
812
|
type: Component,
|
|
811
|
-
args: [{ selector: 'sot-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule,
|
|
813
|
+
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" }]
|
|
812
814
|
}] });
|
|
813
815
|
|
|
814
816
|
class AcFieldCustomDirective extends NgControl {
|
|
@@ -894,36 +896,145 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
894
896
|
args: ['ngModelChange']
|
|
895
897
|
}] } });
|
|
896
898
|
|
|
897
|
-
class
|
|
898
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
899
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type:
|
|
899
|
+
class MatFieldCustomComponent extends AbstractControlFieldComponent {
|
|
900
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
901
|
+
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"] }] });
|
|
900
902
|
}
|
|
901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldCustomComponent, decorators: [{
|
|
902
904
|
type: Component,
|
|
903
|
-
args: [{ selector: "ac-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" }]
|
|
905
|
+
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" }]
|
|
906
|
+
}] });
|
|
907
|
+
|
|
908
|
+
class MatInputFileComponent {
|
|
909
|
+
destroyRef = inject(DestroyRef);
|
|
910
|
+
field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
|
|
911
|
+
group = input.required(...(ngDevMode ? [{ debugName: "group" }] : []));
|
|
912
|
+
fileInput;
|
|
913
|
+
fileList = [];
|
|
914
|
+
fichier = null;
|
|
915
|
+
disabled = false;
|
|
916
|
+
value = null;
|
|
917
|
+
onChange = (value) => {
|
|
918
|
+
};
|
|
919
|
+
onTouched = () => {
|
|
920
|
+
};
|
|
921
|
+
constructor() {
|
|
922
|
+
}
|
|
923
|
+
ngOnInit() {
|
|
924
|
+
if (this.group().get(this.field().name)?.value) {
|
|
925
|
+
this.fileList = this.group().get(this.field().name)?.value;
|
|
926
|
+
}
|
|
927
|
+
// @ts-ignore
|
|
928
|
+
this.group()
|
|
929
|
+
.get(this.field().name)
|
|
930
|
+
.valueChanges.pipe(takeUntilDestroyed(this.destroyRef))
|
|
931
|
+
.subscribe((value1) => {
|
|
932
|
+
if (JSON.stringify(value1) !== JSON.stringify(this.fileList)) {
|
|
933
|
+
this.fileList = value1;
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
writeValue(value) {
|
|
938
|
+
this.value = value && (!this.field().multiple || value.length > 0) ? value : null;
|
|
939
|
+
this.onChange(this.value);
|
|
940
|
+
}
|
|
941
|
+
registerOnChange(fn) {
|
|
942
|
+
this.onChange = fn;
|
|
943
|
+
}
|
|
944
|
+
registerOnTouched(fn) {
|
|
945
|
+
this.onTouched = fn;
|
|
946
|
+
}
|
|
947
|
+
setDisabledState(isDisabled) {
|
|
948
|
+
this.disabled = isDisabled;
|
|
949
|
+
}
|
|
950
|
+
onSelectFile(event) {
|
|
951
|
+
if (event && event.target && event.target.files && event.target.files.length > 0) {
|
|
952
|
+
this.fichier = event.target.files[0];
|
|
953
|
+
}
|
|
954
|
+
else if (this.fileInput && this.fileInput.nativeElement) {
|
|
955
|
+
this.fichier = null;
|
|
956
|
+
this.fileInput.nativeElement.value = null;
|
|
957
|
+
}
|
|
958
|
+
if (!this.field().multiple) {
|
|
959
|
+
this.writeValue(this.fichier);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
addFile() {
|
|
963
|
+
if (this.fichier) {
|
|
964
|
+
if (!this.fileList) {
|
|
965
|
+
this.fileList = [];
|
|
966
|
+
}
|
|
967
|
+
this.fileList.push(this.fichier);
|
|
968
|
+
if (this.field().onAddFile) {
|
|
969
|
+
this.field().onAddFile(this.fichier);
|
|
970
|
+
}
|
|
971
|
+
this.fichier = null;
|
|
972
|
+
if (this.fileInput && this.fileInput.nativeElement) {
|
|
973
|
+
this.fileInput.nativeElement.value = null;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
this.writeValue(this.fileList);
|
|
977
|
+
}
|
|
978
|
+
deleteFile(pj) {
|
|
979
|
+
this.fileList.splice(this.fileList.indexOf(pj), 1);
|
|
980
|
+
this.writeValue(this.fileList);
|
|
981
|
+
if (this.field().onDeleteFile) {
|
|
982
|
+
this.field().onDeleteFile(pj);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatInputFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
986
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MatInputFileComponent, isStandalone: true, selector: "sot-mat-input-file", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
|
|
987
|
+
{
|
|
988
|
+
provide: NG_VALUE_ACCESSOR,
|
|
989
|
+
multi: true,
|
|
990
|
+
useExisting: forwardRef(() => MatInputFileComponent),
|
|
991
|
+
},
|
|
992
|
+
], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], ngImport: i0, template: "<div>\n @if (field().multiple) {\n <div class=\"file-title\">{{ field().label }} ({{ fileList ? fileList.length : 0 }})</div>\n\n <ul>\n @for (pj of fileList; track pj) {\n <li class=\"file-list-item\">\n <div>{{ pj.name }}</div>\n <div>\n @if (!field().disabled) {\n <button mat-icon-button\n (click)=\"deleteFile(pj)\"\n title=\"Supprimer\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </li>\n }\n </ul>\n <div>\n <input\n #fileInput\n class=\"fr-upload\"\n type=\"file\"\n id=\"file-upload\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n />\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"addFile()\">Joindre</button>\n </div>\n } @else {\n <div class=\"file-title\">{{ field().label }}</div>\n <input\n class=\"fr-upload\"\n type=\"file\"\n [attr.id]=\"'file-upload' + field().name\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n />\n }\n</div>\n", styles: ["table{width:100%;border-collapse:collapse}table th{text-align:left}table td{border-bottom:1px solid grey;padding:2rem 0}table .ligne-ajout td{border:none}.file-title{font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.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: i1$1.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"] }] });
|
|
993
|
+
}
|
|
994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatInputFileComponent, decorators: [{
|
|
995
|
+
type: Component,
|
|
996
|
+
args: [{ selector: 'sot-mat-input-file', standalone: true, imports: [ReactiveFormsModule, MatButtonModule, MatIconModule], providers: [
|
|
997
|
+
{
|
|
998
|
+
provide: NG_VALUE_ACCESSOR,
|
|
999
|
+
multi: true,
|
|
1000
|
+
useExisting: forwardRef(() => MatInputFileComponent),
|
|
1001
|
+
},
|
|
1002
|
+
], template: "<div>\n @if (field().multiple) {\n <div class=\"file-title\">{{ field().label }} ({{ fileList ? fileList.length : 0 }})</div>\n\n <ul>\n @for (pj of fileList; track pj) {\n <li class=\"file-list-item\">\n <div>{{ pj.name }}</div>\n <div>\n @if (!field().disabled) {\n <button mat-icon-button\n (click)=\"deleteFile(pj)\"\n title=\"Supprimer\">\n <mat-icon>delete</mat-icon>\n </button>\n }\n </div>\n </li>\n }\n </ul>\n <div>\n <input\n #fileInput\n class=\"fr-upload\"\n type=\"file\"\n id=\"file-upload\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n />\n <button mat-raised-button color=\"primary\" type=\"button\" (click)=\"addFile()\">Joindre</button>\n </div>\n } @else {\n <div class=\"file-title\">{{ field().label }}</div>\n <input\n class=\"fr-upload\"\n type=\"file\"\n [attr.id]=\"'file-upload' + field().name\"\n name=\"file-upload\"\n (change)=\"onSelectFile($event)\"\n [accept]=\"field().accept ? field().accept : '*/*'\"\n />\n }\n</div>\n", styles: ["table{width:100%;border-collapse:collapse}table th{text-align:left}table td{border-bottom:1px solid grey;padding:2rem 0}table .ligne-ajout td{border:none}.file-title{font-weight:700}\n"] }]
|
|
1003
|
+
}], 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: [{
|
|
1004
|
+
type: ViewChild,
|
|
1005
|
+
args: ['fileInput']
|
|
1006
|
+
}] } });
|
|
1007
|
+
|
|
1008
|
+
class MatFieldFileComponent extends AbstractControlFieldComponent {
|
|
1009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldFileComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1010
|
+
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"] }] });
|
|
1011
|
+
}
|
|
1012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MatFieldFileComponent, decorators: [{
|
|
1013
|
+
type: Component,
|
|
1014
|
+
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" }]
|
|
904
1015
|
}] });
|
|
905
1016
|
|
|
906
1017
|
const components$2 = {
|
|
907
|
-
text:
|
|
908
|
-
group:
|
|
909
|
-
array:
|
|
910
|
-
row:
|
|
911
|
-
checkbox: AcFieldCheckboxComponent
|
|
912
|
-
input:
|
|
913
|
-
password:
|
|
914
|
-
radio:
|
|
915
|
-
select:
|
|
916
|
-
textarea:
|
|
917
|
-
toggle:
|
|
918
|
-
customField:
|
|
1018
|
+
text: MatDivTextComponent,
|
|
1019
|
+
group: MatGroupComponent,
|
|
1020
|
+
array: MatArrayComponent,
|
|
1021
|
+
row: MatRowComponent,
|
|
1022
|
+
checkbox: AcFieldCheckboxComponent,
|
|
1023
|
+
input: MatFieldInputComponent,
|
|
1024
|
+
password: MatFieldPasswordComponent,
|
|
1025
|
+
radio: MatFieldRadioButtonComponent,
|
|
1026
|
+
select: MatFieldSelectComponent,
|
|
1027
|
+
textarea: MatFieldTextareaComponent,
|
|
1028
|
+
toggle: MatFieldToggleComponent,
|
|
1029
|
+
customField: MatFieldCustomComponent,
|
|
1030
|
+
file: MatFieldFileComponent,
|
|
919
1031
|
/*
|
|
920
1032
|
date: AcFieldDateComponent,
|
|
921
1033
|
autocomplete: AcFieldAutocompleteComponent,
|
|
922
1034
|
tabs: AcTabsComponent,
|
|
923
|
-
file: AcFieldFileComponent,
|
|
924
1035
|
*/
|
|
925
1036
|
};
|
|
926
|
-
|
|
1037
|
+
class AcDynamicFieldDirective {
|
|
927
1038
|
container = inject(ViewContainerRef);
|
|
928
1039
|
injector = inject(EnvironmentInjector);
|
|
929
1040
|
type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
@@ -952,12 +1063,12 @@ let AcDynamicFieldDirective$2 = class AcDynamicFieldDirective {
|
|
|
952
1063
|
}
|
|
953
1064
|
}
|
|
954
1065
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcDynamicFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
955
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: AcDynamicFieldDirective, isStandalone: true, selector: "[
|
|
956
|
-
}
|
|
957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcDynamicFieldDirective
|
|
1066
|
+
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 });
|
|
1067
|
+
}
|
|
1068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcDynamicFieldDirective, decorators: [{
|
|
958
1069
|
type: Directive,
|
|
959
1070
|
args: [{
|
|
960
|
-
selector: "[
|
|
1071
|
+
selector: "[matDynamicField]",
|
|
961
1072
|
standalone: true
|
|
962
1073
|
}]
|
|
963
1074
|
}], 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 }] }] } });
|
|
@@ -981,11 +1092,11 @@ class MaterialButton {
|
|
|
981
1092
|
this.buttonClick.emit();
|
|
982
1093
|
}
|
|
983
1094
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
984
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: MaterialButton, isStandalone: true, selector: "sot-material-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"] }] });
|
|
1095
|
+
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"] }] });
|
|
985
1096
|
}
|
|
986
1097
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialButton, decorators: [{
|
|
987
1098
|
type: Component,
|
|
988
|
-
args: [{ selector: 'sot-
|
|
1099
|
+
args: [{ selector: 'sot-mat-button', imports: [
|
|
989
1100
|
NgClass,
|
|
990
1101
|
MatBadge,
|
|
991
1102
|
MatButton,
|
|
@@ -993,11 +1104,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
993
1104
|
MatFabButton,
|
|
994
1105
|
MatMiniFabButton,
|
|
995
1106
|
MatMenuItem,
|
|
996
|
-
MatIcon
|
|
1107
|
+
MatIcon,
|
|
1108
|
+
NgTemplateOutlet
|
|
997
1109
|
], 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" }]
|
|
998
1110
|
}], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], matType: [{ type: i0.Input, args: [{ isSignal: true, alias: "matType", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], matIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "matIcon", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], badgeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeOptions", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }] } });
|
|
999
1111
|
|
|
1000
|
-
class
|
|
1112
|
+
class MaterialDynamicFormComponent {
|
|
1001
1113
|
dynamicFormService = inject(DynamicFormService);
|
|
1002
1114
|
destroyRef = inject(DestroyRef);
|
|
1003
1115
|
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -1073,33 +1185,71 @@ class AcMaterialDynamicFormComponent {
|
|
|
1073
1185
|
focusFirstInvalidControl() {
|
|
1074
1186
|
// TODO
|
|
1075
1187
|
}
|
|
1076
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1077
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1188
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1189
|
+
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" }, 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"] }] });
|
|
1078
1190
|
}
|
|
1079
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormComponent, decorators: [{
|
|
1080
1192
|
type: Component,
|
|
1081
|
-
args: [{ exportAs: 'dynamicForm', selector: 'sot-material-dynamic-form', standalone: true, imports: [AcDynamicFieldDirective
|
|
1193
|
+
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"] }]
|
|
1082
1194
|
}], 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"] }] } });
|
|
1083
1195
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1196
|
+
class MaterialDynamicFormModalComponent {
|
|
1197
|
+
dialogRef = inject((MatDialogRef));
|
|
1198
|
+
dynamicFormService = inject(DynamicFormService);
|
|
1199
|
+
data = inject(MAT_DIALOG_DATA);
|
|
1200
|
+
status;
|
|
1201
|
+
message;
|
|
1202
|
+
get form() {
|
|
1203
|
+
return this.dynamicFormService.form;
|
|
1204
|
+
}
|
|
1205
|
+
constructor() {
|
|
1206
|
+
this.dynamicFormService.createForm(this.data.fields, this.data.validations, this.data.updateOn ?? "change", this.data.initialObject);
|
|
1207
|
+
}
|
|
1208
|
+
ngOnInit() {
|
|
1209
|
+
}
|
|
1210
|
+
onClickButton(button) {
|
|
1211
|
+
if (button.type === 'reset') {
|
|
1212
|
+
this.dialogRef.close();
|
|
1213
|
+
}
|
|
1214
|
+
if (button.action) {
|
|
1215
|
+
button.action(this.form, this.data.initialObject).pipe(take(1)).subscribe((resp) => {
|
|
1216
|
+
if (resp === true) {
|
|
1217
|
+
this.dialogRef.close();
|
|
1218
|
+
}
|
|
1219
|
+
else if (resp) {
|
|
1220
|
+
this.message = resp.message;
|
|
1221
|
+
this.status = resp.status;
|
|
1222
|
+
}
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1227
|
+
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: i2$4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$4.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"] }] });
|
|
1228
|
+
}
|
|
1229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialDynamicFormModalComponent, decorators: [{
|
|
1089
1230
|
type: Component,
|
|
1090
|
-
args: [{ selector:
|
|
1231
|
+
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" }]
|
|
1232
|
+
}], ctorParameters: () => [] });
|
|
1233
|
+
|
|
1234
|
+
class DsfrDivTextComponent extends AbstractFieldComponent {
|
|
1235
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDivTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1236
|
+
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"] }] });
|
|
1237
|
+
}
|
|
1238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDivTextComponent, decorators: [{
|
|
1239
|
+
type: Component,
|
|
1240
|
+
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" }]
|
|
1091
1241
|
}] });
|
|
1092
1242
|
|
|
1093
|
-
|
|
1094
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1095
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1096
|
-
}
|
|
1097
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1243
|
+
class DsfrFieldCheckboxComponent extends AbstractControlFieldComponent {
|
|
1244
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1245
|
+
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 }] });
|
|
1246
|
+
}
|
|
1247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldCheckboxComponent, decorators: [{
|
|
1098
1248
|
type: Component,
|
|
1099
|
-
args: [{ selector: 'sot-field-checkbox', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule
|
|
1249
|
+
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"] }]
|
|
1100
1250
|
}] });
|
|
1101
1251
|
|
|
1102
|
-
|
|
1252
|
+
class DsfrFieldInputComponent extends AbstractControlFieldComponent {
|
|
1103
1253
|
inputType = 'text';
|
|
1104
1254
|
buttonAction(b) {
|
|
1105
1255
|
if (b.action && this.field && this.group) {
|
|
@@ -1118,35 +1268,35 @@ let AcFieldInputComponent$1 = class AcFieldInputComponent extends AbstractContro
|
|
|
1118
1268
|
});
|
|
1119
1269
|
}
|
|
1120
1270
|
}
|
|
1121
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1122
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1123
|
-
}
|
|
1124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1272
|
+
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 }] });
|
|
1273
|
+
}
|
|
1274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldInputComponent, decorators: [{
|
|
1125
1275
|
type: Component,
|
|
1126
|
-
args: [{ selector: 'sot-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"] }]
|
|
1276
|
+
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"] }]
|
|
1127
1277
|
}] });
|
|
1128
1278
|
|
|
1129
|
-
|
|
1279
|
+
class DsfrGroupComponent extends AbstractControlFieldComponent {
|
|
1130
1280
|
get subGroup() {
|
|
1131
1281
|
return this.group.controls[this.field.name];
|
|
1132
1282
|
}
|
|
1133
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1134
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1135
|
-
}
|
|
1136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1283
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1284
|
+
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"] }] });
|
|
1285
|
+
}
|
|
1286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrGroupComponent, decorators: [{
|
|
1137
1287
|
type: Component,
|
|
1138
|
-
args: [{ selector: 'sot-group', standalone: true, imports: [
|
|
1139
|
-
forwardRef(() =>
|
|
1288
|
+
args: [{ selector: 'sot-dsfr-group', standalone: true, imports: [
|
|
1289
|
+
forwardRef(() => DsfrDynamicFieldDirective),
|
|
1140
1290
|
NgClass,
|
|
1141
1291
|
MatAccordion,
|
|
1142
1292
|
MatExpansionPanel,
|
|
1143
1293
|
MatExpansionPanelHeader,
|
|
1144
1294
|
MatExpansionPanelTitle,
|
|
1145
1295
|
NgTemplateOutlet
|
|
1146
|
-
], 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
|
|
1296
|
+
], 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"] }]
|
|
1147
1297
|
}] });
|
|
1148
1298
|
|
|
1149
|
-
|
|
1299
|
+
class DsfrArrayComponent extends AbstractControlFieldComponent {
|
|
1150
1300
|
dynamicService = inject(DynamicFormService);
|
|
1151
1301
|
ref = inject(ChangeDetectorRef);
|
|
1152
1302
|
get array() {
|
|
@@ -1181,36 +1331,33 @@ let AcArrayComponent$1 = class AcArrayComponent extends AbstractControlFieldComp
|
|
|
1181
1331
|
this.array.removeAt(index);
|
|
1182
1332
|
this.ref.detectChanges();
|
|
1183
1333
|
}
|
|
1184
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1185
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1186
|
-
}
|
|
1187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1335
|
+
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"] }] });
|
|
1336
|
+
}
|
|
1337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrArrayComponent, decorators: [{
|
|
1188
1338
|
type: Component,
|
|
1189
|
-
args: [{ selector: "sot-array", standalone: true, imports: [
|
|
1190
|
-
forwardRef(() =>
|
|
1339
|
+
args: [{ selector: "sot-dsfr-array", standalone: true, imports: [
|
|
1340
|
+
forwardRef(() => DsfrDynamicFieldDirective),
|
|
1191
1341
|
MatExpansionModule,
|
|
1192
1342
|
NgClass,
|
|
1193
|
-
MatIcon,
|
|
1194
|
-
MatButton,
|
|
1195
1343
|
MatCardModule,
|
|
1196
1344
|
ReactiveFormsModule,
|
|
1197
|
-
MatError,
|
|
1198
1345
|
NgTemplateOutlet
|
|
1199
|
-
], 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
|
|
1346
|
+
], 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"] }]
|
|
1200
1347
|
}], ctorParameters: () => [] });
|
|
1201
1348
|
|
|
1202
|
-
|
|
1203
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1204
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1205
|
-
}
|
|
1206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1349
|
+
class DsfrRowComponent extends AbstractFieldComponent {
|
|
1350
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1351
|
+
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"] }] });
|
|
1352
|
+
}
|
|
1353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrRowComponent, decorators: [{
|
|
1207
1354
|
type: Component,
|
|
1208
|
-
args: [{ selector: 'sot-row', standalone: true, imports: [
|
|
1355
|
+
args: [{ selector: 'sot-dsfr-row', standalone: true, imports: [
|
|
1209
1356
|
ReactiveFormsModule,
|
|
1210
1357
|
NgClass,
|
|
1211
|
-
forwardRef(() =>
|
|
1212
|
-
|
|
1213
|
-
], 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
|
|
1358
|
+
forwardRef(() => DsfrDynamicFieldDirective),
|
|
1359
|
+
DsfrDynamicFieldDirective
|
|
1360
|
+
], 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" }]
|
|
1214
1361
|
}] });
|
|
1215
1362
|
|
|
1216
1363
|
let PasswordValidators$1 = class PasswordValidators {
|
|
@@ -1225,7 +1372,7 @@ let PasswordValidators$1 = class PasswordValidators {
|
|
|
1225
1372
|
}
|
|
1226
1373
|
};
|
|
1227
1374
|
|
|
1228
|
-
|
|
1375
|
+
class DsfrFieldPasswordComponent extends AbstractControlFieldComponent {
|
|
1229
1376
|
inputType = 'password';
|
|
1230
1377
|
showPasswordLabel;
|
|
1231
1378
|
hidePasswordLabel;
|
|
@@ -1302,24 +1449,24 @@ let AcFieldPasswordComponent$1 = class AcFieldPasswordComponent extends Abstract
|
|
|
1302
1449
|
}));
|
|
1303
1450
|
}
|
|
1304
1451
|
}
|
|
1305
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1306
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1307
|
-
}
|
|
1308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1452
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1453
|
+
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 }] });
|
|
1454
|
+
}
|
|
1455
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldPasswordComponent, decorators: [{
|
|
1309
1456
|
type: Component,
|
|
1310
|
-
args: [{ selector: 'sot-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"] }]
|
|
1457
|
+
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"] }]
|
|
1311
1458
|
}] });
|
|
1312
1459
|
|
|
1313
|
-
|
|
1314
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1315
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1316
|
-
}
|
|
1317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1460
|
+
class DsfrFieldRadioButtonComponent extends AbstractControlFieldComponent {
|
|
1461
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldRadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1462
|
+
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 }] });
|
|
1463
|
+
}
|
|
1464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldRadioButtonComponent, decorators: [{
|
|
1318
1465
|
type: Component,
|
|
1319
|
-
args: [{ selector: 'sot-field-radio-button', standalone: true, imports: [ReactiveFormsModule, NgClass, MatRadioModule,
|
|
1466
|
+
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"] }]
|
|
1320
1467
|
}] });
|
|
1321
1468
|
|
|
1322
|
-
|
|
1469
|
+
class AcFieldSelectComponent extends AbstractControlFieldComponent {
|
|
1323
1470
|
options = [];
|
|
1324
1471
|
ngOnInit() {
|
|
1325
1472
|
super.ngOnInit();
|
|
@@ -1338,48 +1485,48 @@ let AcFieldSelectComponent$1 = class AcFieldSelectComponent extends AbstractCont
|
|
|
1338
1485
|
}
|
|
1339
1486
|
}
|
|
1340
1487
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1341
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcFieldSelectComponent, isStandalone: true, selector: "sot-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 [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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([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 }] });
|
|
1342
|
-
}
|
|
1343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldSelectComponent
|
|
1488
|
+
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 [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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([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 }] });
|
|
1489
|
+
}
|
|
1490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldSelectComponent, decorators: [{
|
|
1344
1491
|
type: Component,
|
|
1345
|
-
args: [{ selector: 'sot-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 [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"] }]
|
|
1492
|
+
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 [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"] }]
|
|
1346
1493
|
}] });
|
|
1347
1494
|
|
|
1348
|
-
|
|
1495
|
+
class DsfrFieldTextareaComponent extends AbstractControlFieldComponent {
|
|
1349
1496
|
buttonAction(b) {
|
|
1350
1497
|
if (b.action && this.field && this.group) {
|
|
1351
1498
|
b.action(this.field, this.group, this.dynamicFormService.data);
|
|
1352
1499
|
}
|
|
1353
1500
|
}
|
|
1354
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1355
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1356
|
-
}
|
|
1357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1501
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1502
|
+
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 }] });
|
|
1503
|
+
}
|
|
1504
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldTextareaComponent, decorators: [{
|
|
1358
1505
|
type: Component,
|
|
1359
|
-
args: [{ selector: 'sot-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"] }]
|
|
1506
|
+
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"] }]
|
|
1360
1507
|
}] });
|
|
1361
1508
|
|
|
1362
|
-
|
|
1363
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1364
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1365
|
-
}
|
|
1366
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1509
|
+
class DsfrFieldToggleComponent extends AbstractControlFieldComponent {
|
|
1510
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1511
|
+
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 }] });
|
|
1512
|
+
}
|
|
1513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrFieldToggleComponent, decorators: [{
|
|
1367
1514
|
type: Component,
|
|
1368
|
-
args: [{ selector: 'sot-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule,
|
|
1515
|
+
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" }]
|
|
1369
1516
|
}] });
|
|
1370
1517
|
|
|
1371
1518
|
const components$1 = {
|
|
1372
|
-
group:
|
|
1373
|
-
array:
|
|
1374
|
-
row:
|
|
1375
|
-
text:
|
|
1376
|
-
checkbox:
|
|
1377
|
-
input:
|
|
1378
|
-
password:
|
|
1379
|
-
radio:
|
|
1380
|
-
select: AcFieldSelectComponent
|
|
1381
|
-
textarea:
|
|
1382
|
-
toggle:
|
|
1519
|
+
group: DsfrGroupComponent,
|
|
1520
|
+
array: DsfrArrayComponent,
|
|
1521
|
+
row: DsfrRowComponent,
|
|
1522
|
+
text: DsfrDivTextComponent,
|
|
1523
|
+
checkbox: DsfrFieldCheckboxComponent,
|
|
1524
|
+
input: DsfrFieldInputComponent,
|
|
1525
|
+
password: DsfrFieldPasswordComponent,
|
|
1526
|
+
radio: DsfrFieldRadioButtonComponent,
|
|
1527
|
+
select: AcFieldSelectComponent,
|
|
1528
|
+
textarea: DsfrFieldTextareaComponent,
|
|
1529
|
+
toggle: DsfrFieldToggleComponent,
|
|
1383
1530
|
/*
|
|
1384
1531
|
date: AcFieldDateComponent,
|
|
1385
1532
|
autocomplete: AcFieldAutocompleteComponent,
|
|
@@ -1388,7 +1535,7 @@ const components$1 = {
|
|
|
1388
1535
|
file: AcFieldFileComponent,
|
|
1389
1536
|
*/
|
|
1390
1537
|
};
|
|
1391
|
-
|
|
1538
|
+
class DsfrDynamicFieldDirective {
|
|
1392
1539
|
container = inject(ViewContainerRef);
|
|
1393
1540
|
injector = inject(EnvironmentInjector);
|
|
1394
1541
|
type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
@@ -1416,18 +1563,18 @@ let AcDynamicFieldDirective$1 = class AcDynamicFieldDirective {
|
|
|
1416
1563
|
this.component.instance.path = this.path();
|
|
1417
1564
|
}
|
|
1418
1565
|
}
|
|
1419
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1420
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type:
|
|
1421
|
-
}
|
|
1422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1566
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDynamicFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1567
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: DsfrDynamicFieldDirective, isStandalone: true, selector: "[dsfrDynamicField]", 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 });
|
|
1568
|
+
}
|
|
1569
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDynamicFieldDirective, decorators: [{
|
|
1423
1570
|
type: Directive,
|
|
1424
1571
|
args: [{
|
|
1425
|
-
selector: "[
|
|
1572
|
+
selector: "[dsfrDynamicField]",
|
|
1426
1573
|
standalone: true
|
|
1427
1574
|
}]
|
|
1428
1575
|
}], 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 }] }] } });
|
|
1429
1576
|
|
|
1430
|
-
class
|
|
1577
|
+
class DsfrDynamicFormComponent {
|
|
1431
1578
|
dynamicFormService = inject(DynamicFormService);
|
|
1432
1579
|
destroyRef = inject(DestroyRef);
|
|
1433
1580
|
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -1503,33 +1650,33 @@ class AcDsfrDynamicFormComponent {
|
|
|
1503
1650
|
focusFirstInvalidControl() {
|
|
1504
1651
|
// TODO
|
|
1505
1652
|
}
|
|
1506
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1507
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1653
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1654
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DsfrDynamicFormComponent, isStandalone: true, selector: "sot-dsfr-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" }, 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 dsfrDynamicField\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 <!-- TODO\r\n <sot-button [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType ?? 'raised'\"\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-button>\r\n -->\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: DsfrDynamicFieldDirective, selector: "[dsfrDynamicField]", 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 }] });
|
|
1508
1655
|
}
|
|
1509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1656
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DsfrDynamicFormComponent, decorators: [{
|
|
1510
1657
|
type: Component,
|
|
1511
|
-
args: [{ exportAs: 'dynamicForm', selector: 'sot-dsfr-dynamic-form', standalone: true, imports: [
|
|
1658
|
+
args: [{ exportAs: 'dynamicForm', selector: 'sot-dsfr-dynamic-form', standalone: true, imports: [DsfrDynamicFieldDirective, NgClass, ReactiveFormsModule, MatError, MatIconModule, MatButtonModule], 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 dsfrDynamicField\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 <!-- TODO\r\n <sot-button [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType ?? 'raised'\"\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-button>\r\n -->\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"] }]
|
|
1512
1659
|
}], 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"] }] } });
|
|
1513
1660
|
|
|
1514
|
-
class
|
|
1515
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1516
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1661
|
+
class ClassicDivTextComponent extends AbstractFieldComponent {
|
|
1662
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicDivTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1663
|
+
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"] }] });
|
|
1517
1664
|
}
|
|
1518
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1665
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicDivTextComponent, decorators: [{
|
|
1519
1666
|
type: Component,
|
|
1520
|
-
args: [{ selector: 'sot-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-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" }]
|
|
1521
1668
|
}] });
|
|
1522
1669
|
|
|
1523
|
-
class
|
|
1524
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1525
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1670
|
+
class ClassicFieldCheckboxComponent extends AbstractControlFieldComponent {
|
|
1671
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldCheckboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1672
|
+
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"] }] });
|
|
1526
1673
|
}
|
|
1527
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldCheckboxComponent, decorators: [{
|
|
1528
1675
|
type: Component,
|
|
1529
|
-
args: [{ selector: 'sot-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" }]
|
|
1676
|
+
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" }]
|
|
1530
1677
|
}] });
|
|
1531
1678
|
|
|
1532
|
-
class
|
|
1679
|
+
class ClassicFieldInputComponent extends AbstractControlFieldComponent {
|
|
1533
1680
|
inputType = 'text';
|
|
1534
1681
|
buttonAction(b) {
|
|
1535
1682
|
if (b.action && this.field && this.group) {
|
|
@@ -1548,31 +1695,31 @@ class AcFieldInputComponent extends AbstractControlFieldComponent {
|
|
|
1548
1695
|
});
|
|
1549
1696
|
}
|
|
1550
1697
|
}
|
|
1551
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1552
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1698
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1699
|
+
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"] }] });
|
|
1553
1700
|
}
|
|
1554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldInputComponent, decorators: [{
|
|
1555
1702
|
type: Component,
|
|
1556
|
-
args: [{ selector: 'sot-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"] }]
|
|
1703
|
+
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"] }]
|
|
1557
1704
|
}] });
|
|
1558
1705
|
|
|
1559
|
-
class
|
|
1706
|
+
class ClassicGroupComponent extends AbstractControlFieldComponent {
|
|
1560
1707
|
get subGroup() {
|
|
1561
1708
|
return this.group.controls[this.field.name];
|
|
1562
1709
|
}
|
|
1563
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1564
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1710
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1711
|
+
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"] }] });
|
|
1565
1712
|
}
|
|
1566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1713
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicGroupComponent, decorators: [{
|
|
1567
1714
|
type: Component,
|
|
1568
|
-
args: [{ selector: 'sot-group', standalone: true, imports: [
|
|
1569
|
-
forwardRef(() =>
|
|
1715
|
+
args: [{ selector: 'sot-classic-group', standalone: true, imports: [
|
|
1716
|
+
forwardRef(() => ClassiDynamicFieldDirective),
|
|
1570
1717
|
NgClass,
|
|
1571
1718
|
NgTemplateOutlet
|
|
1572
|
-
], 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
|
|
1719
|
+
], 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"] }]
|
|
1573
1720
|
}] });
|
|
1574
1721
|
|
|
1575
|
-
class
|
|
1722
|
+
class ClassicArrayComponent extends AbstractControlFieldComponent {
|
|
1576
1723
|
dynamicService = inject(DynamicFormService);
|
|
1577
1724
|
ref = inject(ChangeDetectorRef);
|
|
1578
1725
|
get array() {
|
|
@@ -1607,30 +1754,30 @@ class AcArrayComponent extends AbstractControlFieldComponent {
|
|
|
1607
1754
|
this.array.removeAt(index);
|
|
1608
1755
|
this.ref.detectChanges();
|
|
1609
1756
|
}
|
|
1610
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1611
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1757
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1758
|
+
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"] }] });
|
|
1612
1759
|
}
|
|
1613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicArrayComponent, decorators: [{
|
|
1614
1761
|
type: Component,
|
|
1615
|
-
args: [{ selector: "sot-array", standalone: true, imports: [
|
|
1616
|
-
forwardRef(() =>
|
|
1762
|
+
args: [{ selector: "sot-classic-array", standalone: true, imports: [
|
|
1763
|
+
forwardRef(() => ClassiDynamicFieldDirective),
|
|
1617
1764
|
NgClass,
|
|
1618
1765
|
ReactiveFormsModule,
|
|
1619
1766
|
NgTemplateOutlet
|
|
1620
|
-
], 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
|
|
1767
|
+
], 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"] }]
|
|
1621
1768
|
}], ctorParameters: () => [] });
|
|
1622
1769
|
|
|
1623
|
-
class
|
|
1624
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1625
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1770
|
+
class ClassicRowComponent extends AbstractFieldComponent {
|
|
1771
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1772
|
+
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"] }] });
|
|
1626
1773
|
}
|
|
1627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1774
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicRowComponent, decorators: [{
|
|
1628
1775
|
type: Component,
|
|
1629
|
-
args: [{ selector: 'sot-row', standalone: true, imports: [
|
|
1776
|
+
args: [{ selector: 'sot-classic-row', standalone: true, imports: [
|
|
1630
1777
|
ReactiveFormsModule,
|
|
1631
1778
|
NgClass,
|
|
1632
|
-
forwardRef(() =>
|
|
1633
|
-
], 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
|
|
1779
|
+
forwardRef(() => ClassiDynamicFieldDirective)
|
|
1780
|
+
], 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" }]
|
|
1634
1781
|
}] });
|
|
1635
1782
|
|
|
1636
1783
|
class PasswordValidators {
|
|
@@ -1645,7 +1792,7 @@ class PasswordValidators {
|
|
|
1645
1792
|
}
|
|
1646
1793
|
}
|
|
1647
1794
|
|
|
1648
|
-
class
|
|
1795
|
+
class ClassicFieldPasswordComponent extends AbstractControlFieldComponent {
|
|
1649
1796
|
inputType = 'password';
|
|
1650
1797
|
showPasswordLabel;
|
|
1651
1798
|
hidePasswordLabel;
|
|
@@ -1722,24 +1869,24 @@ class AcFieldPasswordComponent extends AbstractControlFieldComponent {
|
|
|
1722
1869
|
}));
|
|
1723
1870
|
}
|
|
1724
1871
|
}
|
|
1725
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1726
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1872
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldPasswordComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1873
|
+
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"] }] });
|
|
1727
1874
|
}
|
|
1728
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldPasswordComponent, decorators: [{
|
|
1729
1876
|
type: Component,
|
|
1730
|
-
args: [{ selector: 'sot-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"] }]
|
|
1877
|
+
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"] }]
|
|
1731
1878
|
}] });
|
|
1732
1879
|
|
|
1733
|
-
class
|
|
1734
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1735
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1880
|
+
class ClassicFieldRadioButtonComponent extends AbstractControlFieldComponent {
|
|
1881
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldRadioButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1882
|
+
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"] }] });
|
|
1736
1883
|
}
|
|
1737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldRadioButtonComponent, decorators: [{
|
|
1738
1885
|
type: Component,
|
|
1739
|
-
args: [{ selector: 'sot-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"] }]
|
|
1886
|
+
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"] }]
|
|
1740
1887
|
}] });
|
|
1741
1888
|
|
|
1742
|
-
class
|
|
1889
|
+
class ClassicFieldSelectComponent extends AbstractControlFieldComponent {
|
|
1743
1890
|
options = [];
|
|
1744
1891
|
ngOnInit() {
|
|
1745
1892
|
super.ngOnInit();
|
|
@@ -1757,49 +1904,49 @@ class AcFieldSelectComponent extends AbstractControlFieldComponent {
|
|
|
1757
1904
|
b.action(this.field, this.group, this.dynamicFormService.data);
|
|
1758
1905
|
}
|
|
1759
1906
|
}
|
|
1760
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1761
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1907
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1908
|
+
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 [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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([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"] }] });
|
|
1762
1909
|
}
|
|
1763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldSelectComponent, decorators: [{
|
|
1764
1911
|
type: Component,
|
|
1765
|
-
args: [{ selector: 'sot-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 [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"] }]
|
|
1912
|
+
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 [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"] }]
|
|
1766
1913
|
}] });
|
|
1767
1914
|
|
|
1768
|
-
class
|
|
1769
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1770
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1915
|
+
class ClassicFieldToggleComponent extends AbstractControlFieldComponent {
|
|
1916
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1917
|
+
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"] }] });
|
|
1771
1918
|
}
|
|
1772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1919
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldToggleComponent, decorators: [{
|
|
1773
1920
|
type: Component,
|
|
1774
|
-
args: [{ selector: 'sot-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" }]
|
|
1921
|
+
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" }]
|
|
1775
1922
|
}] });
|
|
1776
1923
|
|
|
1777
|
-
class
|
|
1924
|
+
class ClassicFieldTextareaComponent extends AbstractControlFieldComponent {
|
|
1778
1925
|
buttonAction(b) {
|
|
1779
1926
|
if (b.action && this.field && this.group) {
|
|
1780
1927
|
b.action(this.field, this.group, this.dynamicFormService.data);
|
|
1781
1928
|
}
|
|
1782
1929
|
}
|
|
1783
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1784
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
1930
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1931
|
+
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"] }] });
|
|
1785
1932
|
}
|
|
1786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicFieldTextareaComponent, decorators: [{
|
|
1787
1934
|
type: Component,
|
|
1788
|
-
args: [{ selector: 'sot-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"] }]
|
|
1935
|
+
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"] }]
|
|
1789
1936
|
}] });
|
|
1790
1937
|
|
|
1791
1938
|
const components = {
|
|
1792
|
-
group:
|
|
1793
|
-
array:
|
|
1794
|
-
row:
|
|
1795
|
-
text:
|
|
1796
|
-
checkbox:
|
|
1797
|
-
input:
|
|
1798
|
-
password:
|
|
1799
|
-
radio:
|
|
1800
|
-
select:
|
|
1801
|
-
textarea:
|
|
1802
|
-
toggle:
|
|
1939
|
+
group: ClassicGroupComponent,
|
|
1940
|
+
array: ClassicArrayComponent,
|
|
1941
|
+
row: ClassicRowComponent,
|
|
1942
|
+
text: ClassicDivTextComponent,
|
|
1943
|
+
checkbox: ClassicFieldCheckboxComponent,
|
|
1944
|
+
input: ClassicFieldInputComponent,
|
|
1945
|
+
password: ClassicFieldPasswordComponent,
|
|
1946
|
+
radio: ClassicFieldRadioButtonComponent,
|
|
1947
|
+
select: ClassicFieldSelectComponent,
|
|
1948
|
+
textarea: ClassicFieldTextareaComponent,
|
|
1949
|
+
toggle: ClassicFieldToggleComponent,
|
|
1803
1950
|
/*
|
|
1804
1951
|
date: AcFieldDateComponent,
|
|
1805
1952
|
autocomplete: AcFieldAutocompleteComponent,
|
|
@@ -1809,7 +1956,7 @@ const components = {
|
|
|
1809
1956
|
|
|
1810
1957
|
*/
|
|
1811
1958
|
};
|
|
1812
|
-
class
|
|
1959
|
+
class ClassiDynamicFieldDirective {
|
|
1813
1960
|
container = inject(ViewContainerRef);
|
|
1814
1961
|
injector = inject(EnvironmentInjector);
|
|
1815
1962
|
type = input.required(...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
@@ -1837,18 +1984,18 @@ class AcDynamicFieldDirective {
|
|
|
1837
1984
|
this.component.instance.path = this.path();
|
|
1838
1985
|
}
|
|
1839
1986
|
}
|
|
1840
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1841
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type:
|
|
1987
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassiDynamicFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1988
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: ClassiDynamicFieldDirective, isStandalone: true, selector: "[classicDynamicField]", 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 });
|
|
1842
1989
|
}
|
|
1843
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassiDynamicFieldDirective, decorators: [{
|
|
1844
1991
|
type: Directive,
|
|
1845
1992
|
args: [{
|
|
1846
|
-
selector: "[
|
|
1993
|
+
selector: "[classicDynamicField]",
|
|
1847
1994
|
standalone: true
|
|
1848
1995
|
}]
|
|
1849
1996
|
}], 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 }] }] } });
|
|
1850
1997
|
|
|
1851
|
-
class
|
|
1998
|
+
class ClassicDynamicFormComponent {
|
|
1852
1999
|
dynamicFormService = inject(DynamicFormService);
|
|
1853
2000
|
destroyRef = inject(DestroyRef);
|
|
1854
2001
|
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -1924,17 +2071,17 @@ class AcClassicDynamicFormComponent {
|
|
|
1924
2071
|
focusFirstInvalidControl() {
|
|
1925
2072
|
// TODO
|
|
1926
2073
|
}
|
|
1927
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
1928
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type:
|
|
2074
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicDynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2075
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ClassicDynamicFormComponent, isStandalone: true, selector: "sot-classic-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" }, 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 classicDynamicField\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 <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-form-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of config()!.validations; track validation) {\r\n @if (form && !form.untouched && form.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 @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 <!-- TODO\r\n <sot-button [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType ?? 'raised'\"\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-button>\r\n -->\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: ClassiDynamicFieldDirective, selector: "[classicDynamicField]", 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: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatButtonModule }] });
|
|
1929
2076
|
}
|
|
1930
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type:
|
|
2077
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ClassicDynamicFormComponent, decorators: [{
|
|
1931
2078
|
type: Component,
|
|
1932
|
-
args: [{ exportAs: 'dynamicForm', selector: 'sot-classic-dynamic-form', standalone: true, imports: [
|
|
2079
|
+
args: [{ exportAs: 'dynamicForm', selector: 'sot-classic-dynamic-form', standalone: true, imports: [ClassiDynamicFieldDirective, NgClass, ReactiveFormsModule, MatIconModule, MatButtonModule], 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 classicDynamicField\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 <div\r\n class=\"sot-messages-group\"\r\n [attr.id]=\"'sot-form-error'\"\r\n aria-live=\"assertive\">\r\n @for (validation of config()!.validations; track validation) {\r\n @if (form && !form.untouched && form.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 @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 <!-- TODO\r\n <sot-button [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType ?? 'raised'\"\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-button>\r\n -->\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"] }]
|
|
1933
2080
|
}], 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"] }] } });
|
|
1934
2081
|
|
|
1935
2082
|
/**
|
|
1936
2083
|
* Generated bundle index. Do not edit.
|
|
1937
2084
|
*/
|
|
1938
2085
|
|
|
1939
|
-
export { AbstractControlFieldComponent, AbstractFieldComponent,
|
|
2086
|
+
export { AbstractControlFieldComponent, AbstractFieldComponent, AutocompleteAttribute, ClassicDynamicFormComponent, ConditionsService, DsfrDynamicFormComponent, DynamicFormService, MaterialDynamicFormComponent, MaterialDynamicFormModalComponent };
|
|
1940
2087
|
//# sourceMappingURL=sotoa-ui-dynamic-form.mjs.map
|