@sotoa-ui/dynamic-form 0.0.1 → 0.0.2

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, Directive, output, effect } 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
3
  import { distinctUntilChanged, isObservable } from 'rxjs';
4
4
  import * as i1 from '@angular/forms';
5
- import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
5
+ import { FormBuilder, Validators, ReactiveFormsModule, NgControl } 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';
@@ -16,7 +16,7 @@ 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
18
  import * as i5 from '@angular/material/button';
19
- import { MatButtonModule, MatButton } from '@angular/material/button';
19
+ import { MatButtonModule, MatButton, MatIconButton, MatFabButton, MatMiniFabButton } from '@angular/material/button';
20
20
  import * as i1$1 from '@angular/material/expansion';
21
21
  import { MatAccordion, MatExpansionPanel, MatExpansionPanelHeader, MatExpansionPanelTitle, MatExpansionModule } from '@angular/material/expansion';
22
22
  import { MatCardModule } from '@angular/material/card';
@@ -27,6 +27,8 @@ import * as i3$2 from '@angular/material/select';
27
27
  import { MatSelectModule } from '@angular/material/select';
28
28
  import * as i2$3 from '@angular/material/slide-toggle';
29
29
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
30
+ import { MatBadge } from '@angular/material/badge';
31
+ import { MatMenuItem } from '@angular/material/menu';
30
32
 
31
33
  class ConditionsService {
32
34
  constructor() {
@@ -809,6 +811,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
809
811
  args: [{ selector: 'sot-field-toggle', standalone: true, imports: [ReactiveFormsModule, NgClass, MatCheckboxModule, MatError, 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" }]
810
812
  }] });
811
813
 
814
+ class AcFieldCustomDirective extends NgControl {
815
+ parent;
816
+ container = inject(ViewContainerRef);
817
+ injector = inject(EnvironmentInjector);
818
+ field = input.required(...(ngDevMode ? [{ debugName: "field" }] : []));
819
+ group = input.required(...(ngDevMode ? [{ debugName: "group" }] : []));
820
+ component;
821
+ // tslint:disable-next-line:no-output-rename
822
+ update = new EventEmitter();
823
+ pcontrol;
824
+ constructor(parent) {
825
+ super();
826
+ this.parent = parent;
827
+ }
828
+ ngOnChanges() {
829
+ if (this.component) {
830
+ this.component.instance.field = this.field();
831
+ this.component.instance.group = this.group();
832
+ }
833
+ }
834
+ ngOnInit() {
835
+ if (!this.field().component) {
836
+ throw new Error(`Trying to use an empty component`);
837
+ }
838
+ this.name = this.field().name;
839
+ this.container.clear();
840
+ this.component = this.container.createComponent(this.field().component, {
841
+ environmentInjector: this.injector
842
+ });
843
+ this.valueAccessor = this.component.instance;
844
+ this.component.instance.field = this.field();
845
+ this.component.instance.group = this.group();
846
+ if (this.formDirective) {
847
+ this.pcontrol = this.formDirective.addControl(this);
848
+ }
849
+ }
850
+ get path() {
851
+ // @ts-ignore
852
+ return [...this.parent.path, this.name];
853
+ }
854
+ get formDirective() {
855
+ return this.parent ? this.parent.formDirective : null;
856
+ }
857
+ get control() {
858
+ return this.pcontrol;
859
+ }
860
+ get validator() {
861
+ return null;
862
+ }
863
+ get asyncValidator() {
864
+ return null;
865
+ }
866
+ viewToModelUpdate(newValue) {
867
+ this.update.emit(newValue);
868
+ }
869
+ ngOnDestroy() {
870
+ if (this.formDirective) {
871
+ this.formDirective.removeControl(this);
872
+ }
873
+ if (this.component) {
874
+ this.component.destroy();
875
+ }
876
+ }
877
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCustomDirective, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
878
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: AcFieldCustomDirective, isStandalone: true, selector: "[fieldCustom]", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { update: "ngModelChange" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
879
+ }
880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCustomDirective, decorators: [{
881
+ type: Directive,
882
+ args: [{
883
+ selector: '[fieldCustom]',
884
+ standalone: true,
885
+ }]
886
+ }], ctorParameters: () => [{ type: i1.ControlContainer, decorators: [{
887
+ type: Optional
888
+ }, {
889
+ type: Host
890
+ }, {
891
+ type: SkipSelf
892
+ }] }], propDecorators: { field: [{ type: i0.Input, args: [{ isSignal: true, alias: "field", required: true }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: true }] }], update: [{
893
+ type: Output,
894
+ args: ['ngModelChange']
895
+ }] } });
896
+
897
+ class AcFieldCustomComponent extends AbstractControlFieldComponent {
898
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCustomComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
899
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AcFieldCustomComponent, isStandalone: true, selector: "ac-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
+ }
901
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcFieldCustomComponent, decorators: [{
902
+ 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" }]
904
+ }] });
905
+
812
906
  const components$2 = {
813
907
  text: AcDivTextComponent$2,
814
908
  group: AcGroupComponent$2,
@@ -821,13 +915,12 @@ const components$2 = {
821
915
  select: AcFieldSelectComponent$2,
822
916
  textarea: AcFieldTextareaComponent$2,
823
917
  toggle: AcFieldToggleComponent$2,
918
+ customField: AcFieldCustomComponent,
824
919
  /*
825
920
  date: AcFieldDateComponent,
826
921
  autocomplete: AcFieldAutocompleteComponent,
827
- customField: AcFieldCustomComponent,
828
922
  tabs: AcTabsComponent,
829
923
  file: AcFieldFileComponent,
830
-
831
924
  */
832
925
  };
833
926
  let AcDynamicFieldDirective$2 = class AcDynamicFieldDirective {
@@ -869,6 +962,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
869
962
  }]
870
963
  }], 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 }] }] } });
871
964
 
965
+ class MaterialButton {
966
+ type = input('button', ...(ngDevMode ? [{ debugName: "type" }] : []));
967
+ matType = input(...(ngDevMode ? [undefined, { debugName: "matType" }] : []));
968
+ disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : []));
969
+ disableRipple = input(...(ngDevMode ? [undefined, { debugName: "disableRipple" }] : []));
970
+ label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
971
+ className = input(...(ngDevMode ? [undefined, { debugName: "className" }] : []));
972
+ title = input(...(ngDevMode ? [undefined, { debugName: "title" }] : []));
973
+ matIcon = input(...(ngDevMode ? [undefined, { debugName: "matIcon" }] : []));
974
+ badge = input(...(ngDevMode ? [undefined, { debugName: "badge" }] : []));
975
+ badgeOptions = input(...(ngDevMode ? [undefined, { debugName: "badgeOptions" }] : []));
976
+ ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : []));
977
+ buttonMatType = computed(() => (this.type() === 'link' ? 'link-' : 'button-') + (this.matType() ?? 'basic'), ...(ngDevMode ? [{ debugName: "buttonMatType" }] : []));
978
+ buttonClick = output();
979
+ clickButton(event) {
980
+ event.stopPropagation();
981
+ this.buttonClick.emit();
982
+ }
983
+ 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"] }] });
985
+ }
986
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MaterialButton, decorators: [{
987
+ type: Component,
988
+ args: [{ selector: 'sot-material-button', imports: [
989
+ NgClass,
990
+ MatBadge,
991
+ MatButton,
992
+ MatIconButton,
993
+ MatFabButton,
994
+ MatMiniFabButton,
995
+ MatMenuItem,
996
+ MatIcon
997
+ ], 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
+ }], 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
+
872
1000
  class AcMaterialDynamicFormComponent {
873
1001
  dynamicFormService = inject(DynamicFormService);
874
1002
  destroyRef = inject(DestroyRef);
@@ -946,11 +1074,11 @@ class AcMaterialDynamicFormComponent {
946
1074
  // TODO
947
1075
  }
948
1076
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcMaterialDynamicFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
949
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcMaterialDynamicFormComponent, 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 sotDynamicField\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: AcDynamicFieldDirective$2, selector: "[sotDynamicField]", 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 }] });
1077
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AcMaterialDynamicFormComponent, 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 sotDynamicField\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-material-button\r\n [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType ?? 'basic'\"\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-material-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$2, selector: "[sotDynamicField]", 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-material-button", inputs: ["type", "matType", "disabled", "disableRipple", "label", "className", "title", "matIcon", "badge", "badgeOptions", "ariaLabel"], outputs: ["buttonClick"] }] });
950
1078
  }
951
1079
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AcMaterialDynamicFormComponent, decorators: [{
952
1080
  type: Component,
953
- args: [{ exportAs: 'dynamicForm', selector: 'sot-material-dynamic-form', standalone: true, imports: [AcDynamicFieldDirective$2, 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 sotDynamicField\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"] }]
1081
+ args: [{ exportAs: 'dynamicForm', selector: 'sot-material-dynamic-form', standalone: true, imports: [AcDynamicFieldDirective$2, 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 sotDynamicField\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-material-button\r\n [type]=\"button.type\"\r\n [className]=\"button.className\"\r\n [matType]=\"button.matButtonType ?? 'basic'\"\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-material-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"] }]
954
1082
  }], 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"] }] } });
955
1083
 
956
1084
  let AcDivTextComponent$1 = class AcDivTextComponent extends AbstractFieldComponent {