special-forms 16.2.1 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/esm2022/lib/components/index.mjs +13 -13
  2. package/esm2022/lib/components/special-autocomplete/special-autocomplete.component.mjs +75 -75
  3. package/esm2022/lib/components/special-autocomplete/special-autocomplete.interface.mjs +2 -2
  4. package/esm2022/lib/components/special-checkbox/special-checkbox.component.mjs +39 -36
  5. package/esm2022/lib/components/special-checkbox/special-checkbox.interface.mjs +3 -2
  6. package/esm2022/lib/components/special-datepicker/special-datepicker.component.mjs +43 -40
  7. package/esm2022/lib/components/special-datepicker/special-datepicker.interface.mjs +3 -2
  8. package/esm2022/lib/components/special-dropdown/special-dropdown.component.mjs +48 -47
  9. package/esm2022/lib/components/special-dropdown/special-dropdown.interface.mjs +3 -2
  10. package/esm2022/lib/components/special-form/special-form.component.mjs +99 -99
  11. package/esm2022/lib/components/special-form/special-form.module.mjs +78 -78
  12. package/esm2022/lib/components/special-input/special-input.component.mjs +56 -56
  13. package/esm2022/lib/components/special-input/special-input.interface.mjs +2 -2
  14. package/esm2022/lib/components/special-label/special-label.component.mjs +27 -27
  15. package/esm2022/lib/components/special-label/special-label.interface.mjs +2 -2
  16. package/esm2022/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.mjs +97 -97
  17. package/esm2022/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.mjs +2 -2
  18. package/esm2022/lib/components/special-richtext/special-richtext.component.mjs +54 -45
  19. package/esm2022/lib/components/special-richtext/special-richtext.interface.mjs +3 -2
  20. package/esm2022/lib/components/special-text-area/special-text-area.component.mjs +44 -44
  21. package/esm2022/lib/components/special-text-area/special-text-area.interface.mjs +2 -2
  22. package/esm2022/lib/components/special-upload/special-upload.component.mjs +84 -84
  23. package/esm2022/lib/components/special-upload/special-upload.interface.mjs +2 -2
  24. package/esm2022/lib/core/aux-data/control-types.enum.mjs +17 -17
  25. package/esm2022/lib/core/aux-data/input-types.mjs +15 -15
  26. package/esm2022/lib/core/forms/special-forms.mjs +240 -260
  27. package/esm2022/lib/core/interfaces/field-basics.interfaces.mjs +1 -1
  28. package/esm2022/lib/core/interfaces/form.interfaces.mjs +2 -2
  29. package/esm2022/lib/core/interfaces/special-control.interface.mjs +2 -2
  30. package/esm2022/lib/core/masks/currency.mask.mjs +10 -10
  31. package/esm2022/lib/core/masks/index.mjs +2 -2
  32. package/esm2022/lib/core/masks/number.mask.mjs +2 -2
  33. package/esm2022/lib/core/pipes/controls-list-pipe/controls-list.pipe.mjs +17 -17
  34. package/esm2022/lib/core/pipes/error-message-pipe/error.pipe.mjs +22 -22
  35. package/esm2022/lib/core/pipes/index.mjs +3 -3
  36. package/esm2022/lib/core/pipes/text-by-function/text-by-function.pipe.mjs +21 -21
  37. package/esm2022/lib/core/services/error-state-matcher/error-matcher.mjs +12 -12
  38. package/esm2022/lib/core/services/index.mjs +3 -3
  39. package/esm2022/lib/core/services/special-form-builder/special-form-builder.service.mjs +156 -156
  40. package/esm2022/public-api.mjs +12 -12
  41. package/esm2022/special-forms.mjs +4 -4
  42. package/fesm2022/special-forms.mjs +1018 -1024
  43. package/fesm2022/special-forms.mjs.map +1 -1
  44. package/index.d.ts +5 -5
  45. package/lib/components/index.d.ts +23 -23
  46. package/lib/components/special-autocomplete/special-autocomplete.component.d.ts +19 -19
  47. package/lib/components/special-autocomplete/special-autocomplete.interface.d.ts +19 -18
  48. package/lib/components/special-checkbox/special-checkbox.component.d.ts +12 -11
  49. package/lib/components/special-checkbox/special-checkbox.interface.d.ts +13 -12
  50. package/lib/components/special-datepicker/special-datepicker.component.d.ts +13 -12
  51. package/lib/components/special-datepicker/special-datepicker.interface.d.ts +12 -11
  52. package/lib/components/special-dropdown/special-dropdown.component.d.ts +11 -11
  53. package/lib/components/special-dropdown/special-dropdown.interface.d.ts +17 -16
  54. package/lib/components/special-form/special-form.component.d.ts +31 -31
  55. package/lib/components/special-form/special-form.module.d.ts +20 -20
  56. package/lib/components/special-input/special-input.component.d.ts +15 -15
  57. package/lib/components/special-input/special-input.interface.d.ts +17 -16
  58. package/lib/components/special-label/special-label.component.d.ts +13 -13
  59. package/lib/components/special-label/special-label.interface.d.ts +13 -12
  60. package/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.component.d.ts +22 -22
  61. package/lib/components/special-multiple-autocomplete/special-multiple-autocomplete.interface.d.ts +19 -18
  62. package/lib/components/special-richtext/special-richtext.component.d.ts +17 -17
  63. package/lib/components/special-richtext/special-richtext.interface.d.ts +10 -9
  64. package/lib/components/special-text-area/special-text-area.component.d.ts +13 -13
  65. package/lib/components/special-text-area/special-text-area.interface.d.ts +8 -7
  66. package/lib/components/special-upload/special-upload.component.d.ts +21 -21
  67. package/lib/components/special-upload/special-upload.interface.d.ts +12 -11
  68. package/lib/core/aux-data/control-types.enum.d.ts +16 -16
  69. package/lib/core/aux-data/input-types.d.ts +2 -2
  70. package/lib/core/forms/special-forms.d.ts +108 -123
  71. package/lib/core/interfaces/field-basics.interfaces.d.ts +22 -22
  72. package/lib/core/interfaces/form.interfaces.d.ts +58 -55
  73. package/lib/core/interfaces/special-control.interface.d.ts +4 -4
  74. package/lib/core/masks/currency.mask.d.ts +1 -1
  75. package/lib/core/masks/index.d.ts +2 -2
  76. package/lib/core/masks/number.mask.d.ts +1 -1
  77. package/lib/core/pipes/controls-list-pipe/controls-list.pipe.d.ts +11 -11
  78. package/lib/core/pipes/error-message-pipe/error.pipe.d.ts +12 -12
  79. package/lib/core/pipes/index.d.ts +3 -3
  80. package/lib/core/pipes/text-by-function/text-by-function.pipe.d.ts +7 -7
  81. package/lib/core/services/error-state-matcher/error-matcher.d.ts +8 -8
  82. package/lib/core/services/index.d.ts +3 -3
  83. package/lib/core/services/special-form-builder/special-form-builder.service.d.ts +25 -25
  84. package/lib/styles/tailwind-final.scss +31 -0
  85. package/package.json +9 -9
  86. package/public-api.d.ts +9 -9
@@ -34,1075 +34,1069 @@ import * as i1$3 from '@angular/platform-browser';
34
34
  import * as i3$2 from 'ngx-editor';
35
35
  import { Editor, NgxEditorModule } from 'ngx-editor';
36
36
 
37
- class ErrorMessagePipe {
38
- transform(errorsObj, errorMessages, control) {
39
- const errors = errorsObj ? Object.keys(errorsObj) : [];
40
- const error = errors[0];
41
- const message = errorMessages[error] || error;
42
- if (control) {
43
- control.setErrors(errorsObj);
44
- }
45
- return message;
46
- }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ErrorMessagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
48
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: ErrorMessagePipe, isStandalone: true, name: "errorMessage" }); }
49
- }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ErrorMessagePipe, decorators: [{
51
- type: Pipe,
52
- args: [{
53
- name: "errorMessage",
54
- standalone: true
55
- }]
37
+ class ErrorMessagePipe {
38
+ transform(errorsObj, errorMessages, control) {
39
+ const errors = errorsObj ? Object.keys(errorsObj) : [];
40
+ const error = errors[0];
41
+ const message = errorMessages[error] || error;
42
+ if (control) {
43
+ control.setErrors(errorsObj);
44
+ }
45
+ return message;
46
+ }
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ErrorMessagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
48
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: ErrorMessagePipe, isStandalone: true, name: "errorMessage" }); }
49
+ }
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ErrorMessagePipe, decorators: [{
51
+ type: Pipe,
52
+ args: [{
53
+ name: "errorMessage",
54
+ standalone: true
55
+ }]
56
56
  }] });
57
57
 
58
- class TextByFunctionPipe {
59
- transform(value, field) {
60
- if (field instanceof Function) {
61
- return field(value);
62
- }
63
- else if (value instanceof Object) {
64
- return value[field];
65
- }
66
- else {
67
- return value;
68
- }
69
- }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: TextByFunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
71
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: TextByFunctionPipe, isStandalone: true, name: "textByFunction" }); }
72
- }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: TextByFunctionPipe, decorators: [{
74
- type: Pipe,
75
- args: [{ name: 'textByFunction', standalone: true }]
58
+ class TextByFunctionPipe {
59
+ transform(value, field) {
60
+ if (field instanceof Function) {
61
+ return field(value);
62
+ }
63
+ else if (value instanceof Object) {
64
+ return value[field];
65
+ }
66
+ else {
67
+ return value;
68
+ }
69
+ }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TextByFunctionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
71
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: TextByFunctionPipe, isStandalone: true, name: "textByFunction" }); }
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: TextByFunctionPipe, decorators: [{
74
+ type: Pipe,
75
+ args: [{ name: 'textByFunction', standalone: true }]
76
76
  }] });
77
77
 
78
- class FormControlsListPipe {
79
- transform(controls) {
80
- if (!controls)
81
- return [];
82
- return Object.values(controls)
83
- .filter((control) => !control.hidden)
84
- .map((control) => control);
85
- }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: FormControlsListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
87
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: FormControlsListPipe, isStandalone: true, name: "controlsList" }); }
88
- }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: FormControlsListPipe, decorators: [{
90
- type: Pipe,
91
- args: [{ name: 'controlsList', standalone: true }]
78
+ class FormControlsListPipe {
79
+ transform(controls) {
80
+ if (!controls)
81
+ return [];
82
+ return Object.values(controls)
83
+ .filter((control) => !control.hidden)
84
+ .map((control) => control);
85
+ }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormControlsListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
87
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: FormControlsListPipe, isStandalone: true, name: "controlsList" }); }
88
+ }
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormControlsListPipe, decorators: [{
90
+ type: Pipe,
91
+ args: [{ name: 'controlsList', standalone: true }]
92
92
  }] });
93
93
 
94
- class SpecialAutocompleteComponent {
95
- constructor() {
96
- this.subs = new Subscription();
97
- this.configValue = (item) => {
98
- if (!item)
99
- return '';
100
- const fieldName = this.settings.fieldName;
101
- return fieldName instanceof Function ? fieldName(item) : item[fieldName];
102
- };
103
- }
104
- ngOnInit() {
105
- this.init();
106
- }
107
- get settings() {
108
- return this.control.settings;
109
- }
110
- init() {
111
- this.subs.add(this.control.valueChanges.pipe(debounceTime(500)).subscribe((value) => {
112
- if (typeof value === 'string') {
113
- this.settings.getData(value, this.control);
114
- }
115
- }));
116
- }
117
- optionSelected(data) {
118
- this.control.setValue(data.option.value);
119
- if (this.settings.onSelect)
120
- this.settings.onSelect(data.option.value);
121
- }
122
- iconClick(event) {
123
- if (this.settings.iconAction) {
124
- this.settings.iconAction(this.control.value);
125
- event.stopPropagation();
126
- }
127
- }
128
- ngOnDestroy() {
129
- this.subs.unsubscribe();
130
- }
131
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
132
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialAutocompleteComponent, isStandalone: true, selector: "sp-autocomplete", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n class=\"special-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label\r\n *ngIf=\"control.label\"\r\n >\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"control\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
133
- }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialAutocompleteComponent, decorators: [{
135
- type: Component,
136
- args: [{ standalone: true, selector: 'sp-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
137
- MatInputModule,
138
- CommonModule,
139
- MatAutocompleteModule,
140
- MatIconModule,
141
- ReactiveFormsModule,
142
- MatButtonModule,
143
- ErrorMessagePipe,
144
- TextByFunctionPipe,
145
- ], template: "<mat-form-field\r\n class=\"special-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label\r\n *ngIf=\"control.label\"\r\n >\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"control\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
146
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
147
- type: Input
94
+ class SpecialAutocompleteComponent {
95
+ constructor() {
96
+ this.subs = new Subscription();
97
+ this.configValue = (item) => {
98
+ if (!item)
99
+ return '';
100
+ const fieldName = this.settings.fieldName;
101
+ return fieldName instanceof Function ? fieldName(item) : item[fieldName];
102
+ };
103
+ }
104
+ ngOnInit() {
105
+ this.init();
106
+ }
107
+ get settings() {
108
+ return this.control.settings;
109
+ }
110
+ init() {
111
+ this.subs.add(this.control.valueChanges.pipe(debounceTime(500)).subscribe((value) => {
112
+ if (typeof value === 'string') {
113
+ this.settings.getData(value, this.control);
114
+ }
115
+ }));
116
+ }
117
+ optionSelected(data) {
118
+ this.control.setValue(data.option.value);
119
+ if (this.settings.onSelect)
120
+ this.settings.onSelect(data.option.value);
121
+ }
122
+ iconClick(event) {
123
+ if (this.settings.iconAction) {
124
+ this.settings.iconAction(this.control.value);
125
+ event.stopPropagation();
126
+ }
127
+ }
128
+ ngOnDestroy() {
129
+ this.subs.unsubscribe();
130
+ }
131
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialAutocompleteComponent, isStandalone: true, selector: "sp-autocomplete", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n class=\"special-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label\r\n *ngIf=\"control.label\"\r\n >\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"control\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialAutocompleteComponent, decorators: [{
135
+ type: Component,
136
+ args: [{ standalone: true, selector: 'sp-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
137
+ MatInputModule,
138
+ CommonModule,
139
+ MatAutocompleteModule,
140
+ MatIconModule,
141
+ ReactiveFormsModule,
142
+ MatButtonModule,
143
+ ErrorMessagePipe,
144
+ TextByFunctionPipe,
145
+ ], template: "<mat-form-field\r\n class=\"special-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label\r\n *ngIf=\"control.label\"\r\n >\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"control\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
146
+ }], ctorParameters: () => [], propDecorators: { control: [{
147
+ type: Input
148
148
  }] } });
149
149
 
150
- class SpecialInputComponent {
151
- constructor() { }
152
- ngOnInit() { }
153
- onEnterClick() {
154
- if (this.settings.onEnter) {
155
- this.settings.onEnter(this.control.value);
156
- }
157
- }
158
- onBlurAction() {
159
- if (this.settings.onBlur) {
160
- this.settings.onBlur(this.control.value);
161
- }
162
- }
163
- get settings() {
164
- return this.control.settings;
165
- }
166
- iconClick(event) {
167
- if (this.settings.iconAction) {
168
- this.settings.iconAction(this.control.value);
169
- event.stopPropagation();
170
- }
171
- }
172
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
173
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialInputComponent, isStandalone: true, selector: "sp-input", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-input w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n (blur)=\"onBlurAction()\"\r\n (keydown.enter)=\"onEnterClick()\"\r\n [inputMask]=\"settings?.mask\"\r\n autocomplete=\"off\"\r\n [type]=\"settings?.type || 'text'\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <button\r\n *ngIf=\"settings?.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: InputMaskModule }, { kind: "directive", type: i1$2.InputMaskDirective, selector: "[inputMask]", inputs: ["inputMask"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
174
- }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialInputComponent, decorators: [{
176
- type: Component,
177
- args: [{ standalone: true, selector: 'sp-input', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
178
- InputMaskModule,
179
- CommonModule,
180
- MatInputModule,
181
- MatIconModule,
182
- ReactiveFormsModule,
183
- MatButtonModule,
184
- ErrorMessagePipe,
185
- ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-input w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n (blur)=\"onBlurAction()\"\r\n (keydown.enter)=\"onEnterClick()\"\r\n [inputMask]=\"settings?.mask\"\r\n autocomplete=\"off\"\r\n [type]=\"settings?.type || 'text'\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <button\r\n *ngIf=\"settings?.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
186
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
187
- type: Input
150
+ class SpecialInputComponent {
151
+ constructor() { }
152
+ ngOnInit() { }
153
+ onEnterClick() {
154
+ if (this.settings.onEnter) {
155
+ this.settings.onEnter(this.control.value);
156
+ }
157
+ }
158
+ onBlurAction() {
159
+ if (this.settings.onBlur) {
160
+ this.settings.onBlur(this.control.value);
161
+ }
162
+ }
163
+ get settings() {
164
+ return this.control.settings;
165
+ }
166
+ iconClick(event) {
167
+ if (this.settings.iconAction) {
168
+ this.settings.iconAction(this.control.value);
169
+ event.stopPropagation();
170
+ }
171
+ }
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
173
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialInputComponent, isStandalone: true, selector: "sp-input", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-input w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n (blur)=\"onBlurAction()\"\r\n (keydown.enter)=\"onEnterClick()\"\r\n [inputMask]=\"settings?.mask\"\r\n autocomplete=\"off\"\r\n [type]=\"settings?.type || 'text'\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <button\r\n *ngIf=\"settings?.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: InputMaskModule }, { kind: "directive", type: i1$2.InputMaskDirective, selector: "[inputMask]", inputs: ["inputMask"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
174
+ }
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialInputComponent, decorators: [{
176
+ type: Component,
177
+ args: [{ standalone: true, selector: 'sp-input', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
178
+ InputMaskModule,
179
+ CommonModule,
180
+ MatInputModule,
181
+ MatIconModule,
182
+ ReactiveFormsModule,
183
+ MatButtonModule,
184
+ ErrorMessagePipe,
185
+ ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-input w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n (blur)=\"onBlurAction()\"\r\n (keydown.enter)=\"onEnterClick()\"\r\n [inputMask]=\"settings?.mask\"\r\n autocomplete=\"off\"\r\n [type]=\"settings?.type || 'text'\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <button\r\n *ngIf=\"settings?.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
186
+ }], ctorParameters: () => [], propDecorators: { control: [{
187
+ type: Input
188
188
  }] } });
189
189
 
190
- class SpecialDropdownComponent {
191
- get settings() {
192
- return this.control.settings;
193
- }
194
- iconClick(event) {
195
- if (this.settings.iconAction) {
196
- this.settings.iconAction(this.control.value);
197
- event.stopPropagation();
198
- }
199
- }
200
- optionSelected(value) {
201
- if (this.settings.onSelect)
202
- this.settings.onSelect(value);
203
- }
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
205
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialDropdownComponent, isStandalone: true, selector: "sp-dropdown", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-dropdown w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <mat-select\r\n [formControl]=\"control\"\r\n [required]=\"control.required\"\r\n (selectionChange)=\"optionSelected($event.value)\"\r\n [placeholder]=\"control.placeholder\"\r\n >\r\n <mat-option *ngIf=\"!control.required\" [value]=\"null\">\r\n {{ control.placeholder || control.settings.notSelectedText }}\r\n </mat-option>\r\n <mat-option\r\n *ngFor=\"let item of control.settings.source | async\"\r\n [value]=\"item[control.settings.fieldId]\"\r\n >\r\n {{ item | textByFunction: control.settings.fieldName }}\r\n </mat-option>\r\n </mat-select>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-hint *ngIf=\"control.tooltip\">{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
206
- }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialDropdownComponent, decorators: [{
208
- type: Component,
209
- args: [{ standalone: true, selector: 'sp-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
210
- CommonModule,
211
- MatSelectModule,
212
- ReactiveFormsModule,
213
- ErrorMessagePipe,
214
- MatIconModule,
215
- MatButtonModule,
216
- TextByFunctionPipe,
217
- ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-dropdown w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <mat-select\r\n [formControl]=\"control\"\r\n [required]=\"control.required\"\r\n (selectionChange)=\"optionSelected($event.value)\"\r\n [placeholder]=\"control.placeholder\"\r\n >\r\n <mat-option *ngIf=\"!control.required\" [value]=\"null\">\r\n {{ control.placeholder || control.settings.notSelectedText }}\r\n </mat-option>\r\n <mat-option\r\n *ngFor=\"let item of control.settings.source | async\"\r\n [value]=\"item[control.settings.fieldId]\"\r\n >\r\n {{ item | textByFunction: control.settings.fieldName }}\r\n </mat-option>\r\n </mat-select>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-hint *ngIf=\"control.tooltip\">{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
218
- }], propDecorators: { control: [{
219
- type: Input
190
+ class SpecialDropdownComponent {
191
+ get settings() {
192
+ return this.control.settings;
193
+ }
194
+ iconClick(event) {
195
+ if (this.settings.iconAction) {
196
+ this.settings.iconAction(this.control.value);
197
+ event.stopPropagation();
198
+ }
199
+ }
200
+ optionSelected(value) {
201
+ console.log(value);
202
+ if (this.settings.onSelect)
203
+ this.settings.onSelect(value);
204
+ }
205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
206
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialDropdownComponent, isStandalone: true, selector: "sp-dropdown", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-dropdown w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <mat-select\r\n [formControl]=\"control\"\r\n [required]=\"control.required\"\r\n (selectionChange)=\"optionSelected($event.value)\"\r\n [placeholder]=\"control.placeholder\"\r\n >\r\n <mat-option *ngIf=\"!control.required\" [value]=\"null\">\r\n {{ control.placeholder || control.settings.notSelectedText }}\r\n </mat-option>\r\n <mat-option\r\n *ngFor=\"let item of control.settings.source | async\"\r\n [value]=\"item[control.settings.fieldId]\"\r\n >\r\n {{ item | textByFunction: control.settings.fieldName }}\r\n </mat-option>\r\n </mat-select>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-hint *ngIf=\"control.tooltip\">{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3.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"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
207
+ }
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialDropdownComponent, decorators: [{
209
+ type: Component,
210
+ args: [{ standalone: true, selector: 'sp-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
211
+ CommonModule,
212
+ MatSelectModule,
213
+ ReactiveFormsModule,
214
+ ErrorMessagePipe,
215
+ MatIconModule,
216
+ MatButtonModule,
217
+ TextByFunctionPipe,
218
+ ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-dropdown w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <mat-select\r\n [formControl]=\"control\"\r\n [required]=\"control.required\"\r\n (selectionChange)=\"optionSelected($event.value)\"\r\n [placeholder]=\"control.placeholder\"\r\n >\r\n <mat-option *ngIf=\"!control.required\" [value]=\"null\">\r\n {{ control.placeholder || control.settings.notSelectedText }}\r\n </mat-option>\r\n <mat-option\r\n *ngFor=\"let item of control.settings.source | async\"\r\n [value]=\"item[control.settings.fieldId]\"\r\n >\r\n {{ item | textByFunction: control.settings.fieldName }}\r\n </mat-option>\r\n </mat-select>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <mat-hint *ngIf=\"control.tooltip\">{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
219
+ }], propDecorators: { control: [{
220
+ type: Input
220
221
  }] } });
221
222
 
222
- class SpecialDatepickerComponent {
223
- constructor() { }
224
- get startAt() {
225
- return this.control.settings?.startAt || new Date();
226
- }
227
- ngOnInit() { }
228
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
229
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialDatepickerComponent, isStandalone: true, selector: "sp-datepicker", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-datepicker w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n autocomplete=\"off\"\r\n [readonly]=\"control.readOnly\"\r\n [matDatepicker]=\"picker\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker startView=\"year\" [startAt]=\"startAt\">\r\n </mat-datepicker>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "ngmodule", type: MatNativeDateModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
230
- }
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialDatepickerComponent, decorators: [{
232
- type: Component,
233
- args: [{ standalone: true, selector: 'sp-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
234
- MatInputModule,
235
- MatDatepickerModule,
236
- CommonModule,
237
- MatIconModule,
238
- ReactiveFormsModule,
239
- MatButtonModule,
240
- ErrorMessagePipe,
241
- MatNativeDateModule,
242
- ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-datepicker w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n autocomplete=\"off\"\r\n [readonly]=\"control.readOnly\"\r\n [matDatepicker]=\"picker\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker startView=\"year\" [startAt]=\"startAt\">\r\n </mat-datepicker>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
243
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
244
- type: Input
223
+ class SpecialDatepickerComponent {
224
+ constructor() { }
225
+ get settings() {
226
+ return this.control.settings;
227
+ }
228
+ get startAt() {
229
+ return this.settings?.startAt || new Date();
230
+ }
231
+ ngOnInit() { }
232
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
233
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialDatepickerComponent, isStandalone: true, selector: "sp-datepicker", inputs: { control: "control" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-datepicker w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n autocomplete=\"off\"\r\n [readonly]=\"control.readOnly\"\r\n [matDatepicker]=\"picker\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker startView=\"year\" [startAt]=\"startAt\">\r\n </mat-datepicker>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i3$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "ngmodule", type: MatNativeDateModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
234
+ }
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialDatepickerComponent, decorators: [{
236
+ type: Component,
237
+ args: [{ standalone: true, selector: 'sp-datepicker', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
238
+ MatInputModule,
239
+ MatDatepickerModule,
240
+ CommonModule,
241
+ MatIconModule,
242
+ ReactiveFormsModule,
243
+ MatButtonModule,
244
+ ErrorMessagePipe,
245
+ MatNativeDateModule,
246
+ ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-datepicker w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <input\r\n matInput\r\n autocomplete=\"off\"\r\n [readonly]=\"control.readOnly\"\r\n [matDatepicker]=\"picker\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n />\r\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\r\n <mat-datepicker #picker startView=\"year\" [startAt]=\"startAt\">\r\n </mat-datepicker>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
247
+ }], ctorParameters: () => [], propDecorators: { control: [{
248
+ type: Input
245
249
  }] } });
246
250
 
247
- class SpecialMultipleAutocompleteComponent {
248
- constructor() {
249
- this.subs = new Subscription();
250
- this.internalControl = new FormControl();
251
- this.configValue = (item) => {
252
- if (!item)
253
- return '';
254
- const fieldName = this.control.settings.fieldName;
255
- return fieldName instanceof Function ? fieldName(item) : item[fieldName];
256
- };
257
- }
258
- ngOnInit() {
259
- this.init();
260
- }
261
- get settings() {
262
- return this.control.settings;
263
- }
264
- init() {
265
- this.subs.add(this.internalControl.valueChanges
266
- .pipe(debounceTime(500))
267
- .subscribe((value) => {
268
- if (typeof value === 'string') {
269
- this.control.settings.getData(value, this.control);
270
- }
271
- }));
272
- }
273
- optionSelected(data) {
274
- const newItem = data.option.value;
275
- this.internalControl.reset();
276
- this.control.setValue([
277
- ...(this.control.value || []).filter((item) => item[this.control.settings.fieldId] !==
278
- newItem[this.control.settings.fieldId]),
279
- newItem,
280
- ]);
281
- if (this.settings.onSelect)
282
- this.settings.onSelect(newItem);
283
- }
284
- iconClick(event) {
285
- if (this.settings.iconAction) {
286
- this.settings.iconAction(this.control.value);
287
- event.stopPropagation();
288
- }
289
- }
290
- remove(value) {
291
- let currentValues = Array.from(this.control.value);
292
- const index = currentValues.indexOf(value);
293
- if (index > -1) {
294
- currentValues.splice(index, 1);
295
- const value = currentValues;
296
- this.control.markAsDirty();
297
- this.control.setValue(value);
298
- }
299
- }
300
- ngOnDestroy() {
301
- this.subs.unsubscribe();
302
- }
303
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialMultipleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
304
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialMultipleAutocompleteComponent, isStandalone: true, selector: "sp-multiple-autocomplete", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n class=\"special-multiple-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n>\r\n <mat-form-field\r\n class=\"w-full\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n >\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required && !control.value?.length\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"internalControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-chip-listbox>\r\n <mat-chip\r\n *ngFor=\"let chip of control.value\"\r\n [removable]=\"true\"\r\n (removed)=\"remove(chip)\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"chip | textByFunction: settings.fieldImage\"\r\n />\r\n {{ chip | textByFunction: settings.fieldName }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </div>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "aria-description", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i9.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i9.MatChipRemove, selector: "[matChipRemove]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
305
- }
306
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialMultipleAutocompleteComponent, decorators: [{
307
- type: Component,
308
- args: [{ standalone: true, selector: 'sp-multiple-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
309
- MatInputModule,
310
- CommonModule,
311
- MatAutocompleteModule,
312
- MatIconModule,
313
- ReactiveFormsModule,
314
- MatButtonModule,
315
- ErrorMessagePipe,
316
- TextByFunctionPipe,
317
- MatChipsModule,
318
- ], template: "<div\r\n class=\"special-multiple-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n>\r\n <mat-form-field\r\n class=\"w-full\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n >\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required && !control.value?.length\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"internalControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-chip-listbox>\r\n <mat-chip\r\n *ngFor=\"let chip of control.value\"\r\n [removable]=\"true\"\r\n (removed)=\"remove(chip)\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"chip | textByFunction: settings.fieldImage\"\r\n />\r\n {{ chip | textByFunction: settings.fieldName }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </div>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
319
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
320
- type: Input
251
+ class SpecialMultipleAutocompleteComponent {
252
+ constructor() {
253
+ this.subs = new Subscription();
254
+ this.internalControl = new FormControl();
255
+ this.configValue = (item) => {
256
+ if (!item)
257
+ return '';
258
+ const fieldName = this.control.settings.fieldName;
259
+ return fieldName instanceof Function ? fieldName(item) : item[fieldName];
260
+ };
261
+ }
262
+ ngOnInit() {
263
+ this.init();
264
+ }
265
+ get settings() {
266
+ return this.control.settings;
267
+ }
268
+ init() {
269
+ this.subs.add(this.internalControl.valueChanges
270
+ .pipe(debounceTime(500))
271
+ .subscribe((value) => {
272
+ if (typeof value === 'string') {
273
+ this.control.settings.getData(value, this.control);
274
+ }
275
+ }));
276
+ }
277
+ optionSelected(data) {
278
+ const newItem = data.option.value;
279
+ this.internalControl.reset();
280
+ this.control.setValue([
281
+ ...(this.control.value || []).filter((item) => item[this.control.settings.fieldId] !==
282
+ newItem[this.control.settings.fieldId]),
283
+ newItem,
284
+ ]);
285
+ if (this.settings.onSelect)
286
+ this.settings.onSelect(newItem);
287
+ }
288
+ iconClick(event) {
289
+ if (this.settings.iconAction) {
290
+ this.settings.iconAction(this.control.value);
291
+ event.stopPropagation();
292
+ }
293
+ }
294
+ remove(value) {
295
+ let currentValues = Array.from(this.control.value);
296
+ const index = currentValues.indexOf(value);
297
+ if (index > -1) {
298
+ currentValues.splice(index, 1);
299
+ const value = currentValues;
300
+ this.control.markAsDirty();
301
+ this.control.setValue(value);
302
+ }
303
+ }
304
+ ngOnDestroy() {
305
+ this.subs.unsubscribe();
306
+ }
307
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialMultipleAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
308
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialMultipleAutocompleteComponent, isStandalone: true, selector: "sp-multiple-autocomplete", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n class=\"special-multiple-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n>\r\n <mat-form-field\r\n class=\"w-full\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n >\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required && !control.value?.length\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"internalControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-chip-listbox>\r\n <mat-chip\r\n *ngFor=\"let chip of control.value\"\r\n [removable]=\"true\"\r\n (removed)=\"remove(chip)\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"chip | textByFunction: settings.fieldImage\"\r\n />\r\n {{ chip | textByFunction: settings.fieldName }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </div>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i9.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled", "tabIndex"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i9.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "directive", type: i9.MatChipRemove, selector: "[matChipRemove]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
309
+ }
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialMultipleAutocompleteComponent, decorators: [{
311
+ type: Component,
312
+ args: [{ standalone: true, selector: 'sp-multiple-autocomplete', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
313
+ MatInputModule,
314
+ CommonModule,
315
+ MatAutocompleteModule,
316
+ MatIconModule,
317
+ ReactiveFormsModule,
318
+ MatButtonModule,
319
+ ErrorMessagePipe,
320
+ TextByFunctionPipe,
321
+ MatChipsModule,
322
+ ], template: "<div\r\n class=\"special-multiple-autocomplete w-full mb-3 {{ control.styleClasses }}\"\r\n [id]=\"control.elementId\"\r\n *ngIf=\"control && !control.hidden\"\r\n>\r\n <mat-form-field\r\n class=\"w-full\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n >\r\n <mat-label *ngIf=\"control.label\">\r\n {{ control.label }}\r\n </mat-label>\r\n <input\r\n type=\"text\"\r\n autocomplete=\"off\"\r\n [required]=\"control.required && !control.value?.length\"\r\n [readonly]=\"control.readOnly\"\r\n [placeholder]=\"control.placeholder\"\r\n matInput\r\n [formControl]=\"internalControl\"\r\n [matAutocomplete]=\"auto\"\r\n />\r\n <mat-autocomplete\r\n #auto=\"matAutocomplete\"\r\n [displayWith]=\"configValue\"\r\n (optionSelected)=\"optionSelected($event)\"\r\n >\r\n <mat-option\r\n *ngFor=\"let option of settings?.source | async\"\r\n [value]=\"option\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"option | textByFunction: settings.fieldImage\"\r\n />\r\n <span>\r\n {{ option | textByFunction: settings.fieldName }}\r\n </span>\r\n </div>\r\n </mat-option>\r\n </mat-autocomplete>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }}</mat-icon>\r\n <button\r\n *ngIf=\"settings.icon\"\r\n mat-icon-button\r\n matSuffix\r\n (click)=\"iconClick($event)\"\r\n >\r\n <mat-icon>\r\n {{ settings.icon }}\r\n </mat-icon>\r\n </button>\r\n <mat-hint>{{ control.tooltip }}</mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n </mat-form-field>\r\n\r\n <mat-chip-listbox>\r\n <mat-chip\r\n *ngFor=\"let chip of control.value\"\r\n [removable]=\"true\"\r\n (removed)=\"remove(chip)\"\r\n >\r\n <div class=\"flex items-center\">\r\n <img\r\n *ngIf=\"settings.fieldImage\"\r\n class=\"w-8 pr-2\"\r\n alt=\"\"\r\n [src]=\"chip | textByFunction: settings.fieldImage\"\r\n />\r\n {{ chip | textByFunction: settings.fieldName }}\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n </div>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
323
+ }], ctorParameters: () => [], propDecorators: { control: [{
324
+ type: Input
321
325
  }] } });
322
326
 
323
- class SpecialCheckboxComponent {
324
- constructor() { }
325
- ngOnInit() { }
326
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
327
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialCheckboxComponent, isStandalone: true, selector: "sp-checkbox", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-checkbox w-full mb-3 flex flex-col {{ control.styleClasses }}\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <mat-checkbox\r\n [required]=\"control.required\"\r\n [ngModel]=\"control.value\"\r\n (ngModelChange)=\"control.setValue($event); control.markAsDirty()\"\r\n [indeterminate]=\"control.settings.indeterminate\"\r\n [labelPosition]=\"control.settings.labelPosition\"\r\n [color]=\"control.settings.color\"\r\n [disabled]=\"control.disabled\"\r\n >\r\n <mat-icon *ngIf=\"control.icon\" matSuffix>{{ control.icon }} </mat-icon>\r\n {{ control.placeholder }}\r\n </mat-checkbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i2$1.MatCheckboxRequiredValidator, selector: "mat-checkbox[required][formControlName], mat-checkbox[required][formControl], mat-checkbox[required][ngModel]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
328
- }
329
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialCheckboxComponent, decorators: [{
330
- type: Component,
331
- args: [{ standalone: true, selector: 'sp-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
332
- FormsModule,
333
- MatCheckboxModule,
334
- CommonModule,
335
- MatInputModule,
336
- MatIconModule,
337
- ReactiveFormsModule,
338
- MatButtonModule,
339
- ErrorMessagePipe,
340
- ], template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-checkbox w-full mb-3 flex flex-col {{ control.styleClasses }}\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <mat-checkbox\r\n [required]=\"control.required\"\r\n [ngModel]=\"control.value\"\r\n (ngModelChange)=\"control.setValue($event); control.markAsDirty()\"\r\n [indeterminate]=\"control.settings.indeterminate\"\r\n [labelPosition]=\"control.settings.labelPosition\"\r\n [color]=\"control.settings.color\"\r\n [disabled]=\"control.disabled\"\r\n >\r\n <mat-icon *ngIf=\"control.icon\" matSuffix>{{ control.icon }} </mat-icon>\r\n {{ control.placeholder }}\r\n </mat-checkbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
341
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
342
- type: Input
327
+ class SpecialCheckboxComponent {
328
+ get settings() {
329
+ return this.control.settings;
330
+ }
331
+ constructor() { }
332
+ ngOnInit() { }
333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
334
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialCheckboxComponent, isStandalone: true, selector: "sp-checkbox", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-checkbox w-full mb-3 flex flex-col {{ control.styleClasses }}\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <mat-checkbox\r\n [required]=\"control.required\"\r\n [ngModel]=\"control.value\"\r\n (ngModelChange)=\"control.setValue($event); control.markAsDirty()\"\r\n [indeterminate]=\"settings.indeterminate\"\r\n [labelPosition]=\"settings.labelPosition\"\r\n [color]=\"settings.color\"\r\n [disabled]=\"control.disabled\"\r\n >\r\n <mat-icon *ngIf=\"control.icon\" matSuffix>{{ control.icon }} </mat-icon>\r\n {{ control.placeholder }}\r\n </mat-checkbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
335
+ }
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialCheckboxComponent, decorators: [{
337
+ type: Component,
338
+ args: [{ standalone: true, selector: 'sp-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
339
+ FormsModule,
340
+ MatCheckboxModule,
341
+ CommonModule,
342
+ MatInputModule,
343
+ MatIconModule,
344
+ ReactiveFormsModule,
345
+ MatButtonModule,
346
+ ErrorMessagePipe,
347
+ ], template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-checkbox w-full mb-3 flex flex-col {{ control.styleClasses }}\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <mat-checkbox\r\n [required]=\"control.required\"\r\n [ngModel]=\"control.value\"\r\n (ngModelChange)=\"control.setValue($event); control.markAsDirty()\"\r\n [indeterminate]=\"settings.indeterminate\"\r\n [labelPosition]=\"settings.labelPosition\"\r\n [color]=\"settings.color\"\r\n [disabled]=\"control.disabled\"\r\n >\r\n <mat-icon *ngIf=\"control.icon\" matSuffix>{{ control.icon }} </mat-icon>\r\n {{ control.placeholder }}\r\n </mat-checkbox>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
348
+ }], ctorParameters: () => [], propDecorators: { control: [{
349
+ type: Input
343
350
  }] } });
344
351
 
345
- class SpecialTextAreaComponent {
346
- constructor() {
347
- this.onBlur = new EventEmitter();
348
- this.onEnter = new EventEmitter();
349
- }
350
- ngOnInit() { }
351
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialTextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
352
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialTextAreaComponent, isStandalone: true, selector: "sp-text-area", inputs: { control: "control" }, outputs: { onBlur: "onBlur", onEnter: "onEnter" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-textarea w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <textarea\r\n cdkTextareaAutosize\r\n #autosize=\"cdkTextareaAutosize\"\r\n cdkAutosizeMinRows=\"1\"\r\n cdkAutosizeMaxRows=\"5\"\r\n matInput\r\n (blur)=\"onBlur.emit(control.value)\"\r\n (keydown.enter)=\"onEnter.emit(control.value)\"\r\n [type]=\"control.settings?.type || 'text'\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n ></textarea>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }} </mat-icon>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: InputMaskModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
353
- }
354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialTextAreaComponent, decorators: [{
355
- type: Component,
356
- args: [{ standalone: true, selector: 'sp-text-area', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
357
- InputMaskModule,
358
- CommonModule,
359
- MatInputModule,
360
- MatIconModule,
361
- ReactiveFormsModule,
362
- MatButtonModule,
363
- ErrorMessagePipe,
364
- ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-textarea w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <textarea\r\n cdkTextareaAutosize\r\n #autosize=\"cdkTextareaAutosize\"\r\n cdkAutosizeMinRows=\"1\"\r\n cdkAutosizeMaxRows=\"5\"\r\n matInput\r\n (blur)=\"onBlur.emit(control.value)\"\r\n (keydown.enter)=\"onEnter.emit(control.value)\"\r\n [type]=\"control.settings?.type || 'text'\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n ></textarea>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }} </mat-icon>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
365
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
366
- type: Input
367
- }], onBlur: [{
368
- type: Output
369
- }], onEnter: [{
370
- type: Output
352
+ class SpecialTextAreaComponent {
353
+ constructor() {
354
+ this.onBlur = new EventEmitter();
355
+ this.onEnter = new EventEmitter();
356
+ }
357
+ ngOnInit() { }
358
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialTextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
359
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialTextAreaComponent, isStandalone: true, selector: "sp-text-area", inputs: { control: "control" }, outputs: { onBlur: "onBlur", onEnter: "onEnter" }, ngImport: i0, template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-textarea w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <textarea\r\n cdkTextareaAutosize\r\n #autosize=\"cdkTextareaAutosize\"\r\n cdkAutosizeMinRows=\"1\"\r\n cdkAutosizeMaxRows=\"5\"\r\n matInput\r\n (blur)=\"onBlur.emit(control.value)\"\r\n (keydown.enter)=\"onEnter.emit(control.value)\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n ></textarea>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }} </mat-icon>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: InputMaskModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.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: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
360
+ }
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialTextAreaComponent, decorators: [{
362
+ type: Component,
363
+ args: [{ standalone: true, selector: 'sp-text-area', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
364
+ InputMaskModule,
365
+ CommonModule,
366
+ MatInputModule,
367
+ MatIconModule,
368
+ ReactiveFormsModule,
369
+ MatButtonModule,
370
+ ErrorMessagePipe,
371
+ ], template: "<mat-form-field\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-textarea w-full mb-3 {{ control.styleClasses }}\"\r\n [appearance]=\"control.label ? 'outline' : 'fill'\"\r\n>\r\n <mat-label *ngIf=\"control.label\">{{ control.label }}</mat-label>\r\n <textarea\r\n cdkTextareaAutosize\r\n #autosize=\"cdkTextareaAutosize\"\r\n cdkAutosizeMinRows=\"1\"\r\n cdkAutosizeMaxRows=\"5\"\r\n matInput\r\n (blur)=\"onBlur.emit(control.value)\"\r\n (keydown.enter)=\"onEnter.emit(control.value)\"\r\n [readonly]=\"control.readOnly\"\r\n [required]=\"control.required\"\r\n [placeholder]=\"control.placeholder\"\r\n [formControl]=\"control\"\r\n ></textarea>\r\n <mat-icon *ngIf=\"control.icon\" matPrefix>{{ control.icon }} </mat-icon>\r\n <mat-hint>\r\n {{ control.tooltip }}\r\n </mat-hint>\r\n <mat-error>\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </mat-error>\r\n</mat-form-field>\r\n", styles: [":host{display:contents}\n"] }]
372
+ }], ctorParameters: () => [], propDecorators: { control: [{
373
+ type: Input
374
+ }], onBlur: [{
375
+ type: Output
376
+ }], onEnter: [{
377
+ type: Output
371
378
  }] } });
372
379
 
373
- class SpecialUploadComponent {
374
- set controlSetter(control) {
375
- this.control = control;
376
- this.previewImages = control.value;
377
- }
378
- constructor(sanitizer) {
379
- this.sanitizer = sanitizer;
380
- this.previewImages = [];
381
- }
382
- ngOnInit() { }
383
- onSelectMultiple(event) {
384
- this.previewImages = [
385
- ...this.previewImages,
386
- ...event.addedFiles.map((file) => ({
387
- lastModified: file.lastModified,
388
- url: this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file)),
389
- })),
390
- ];
391
- this.control.setValue([
392
- ...(this.control.value || []),
393
- ...event.addedFiles.map(this.fixFileName),
394
- ]);
395
- this.onselectFile(this.control.value);
396
- this.control.markAsDirty();
397
- }
398
- onSelectOne(event) {
399
- this.previewImages = event.addedFiles.map((file) => ({
400
- lastModified: file.lastModified,
401
- url: this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file)),
402
- }));
403
- this.control.setValue(event.addedFiles.map(this.fixFileName));
404
- this.onselectFile(this.control.value);
405
- this.control.markAsDirty();
406
- }
407
- onselectFile(value) {
408
- if (this.control.settings?.onSelectFile) {
409
- this.control.settings.onSelectFile(value);
410
- }
411
- }
412
- fixFileName(file) {
413
- return Object.defineProperty(file, 'name', {
414
- writable: true,
415
- value: file.name.normalize('NFD').replace(/[\u0300-\u036f]/g, ''),
416
- });
417
- }
418
- clean() {
419
- this.previewImages = [];
420
- }
421
- onRemove(file) {
422
- this.control.setValue(this.control.value.filter((fl) => fl.lastModified !== file.lastModified));
423
- this.previewImages = this.previewImages.filter((fl) => fl.lastModified !== file.lastModified);
424
- }
425
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialUploadComponent, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
426
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialUploadComponent, isStandalone: true, selector: "sp-upload", inputs: { controlSetter: ["control", "controlSetter"] }, ngImport: i0, template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-upload w-full mb-3 {{ control.styleClasses }}\"\r\n>\r\n <ngx-dropzone\r\n class=\"special-upload__dropzone\"\r\n [ngClass]=\"{\r\n 'special-upload--error-dashed':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n [multiple]=\"control.settings?.multiple\"\r\n [accept]=\"\r\n control.settings?.accept\r\n ? control.settings?.accept\r\n : 'image/png, .jpeg, .jpg, image/gif'\r\n \"\r\n (change)=\"\r\n control.settings?.multiple\r\n ? onSelectMultiple($event)\r\n : onSelectOne($event)\r\n \"\r\n >\r\n <ngx-dropzone-label\r\n [ngClass]=\"{\r\n 'special-upload--error':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n >\r\n <mat-icon class=\"special-upload__icon\" *ngIf=\"control.icon\"\r\n >{{ control.icon }}\r\n </mat-icon>\r\n <h2 class=\"text-base font-bold\">\r\n {{ control.label }}\r\n </h2>\r\n <h3 class=\"text-base\">\r\n {{ control.placeholder }}\r\n </h3>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-preview\r\n *ngFor=\"let file of previewImages\"\r\n [removable]=\"true\"\r\n (removed)=\"onRemove(file)\"\r\n >\r\n <ngx-dropzone-label class=\"special-upload__card\">\r\n <img class=\"special-upload__card--image\" [src]=\"file?.url\" alt=\"\" />\r\n </ngx-dropzone-label>\r\n </ngx-dropzone-preview>\r\n </ngx-dropzone>\r\n <div\r\n class=\"special-upload--error mt-2\"\r\n *ngIf=\"!!control.errors && (control.dirty || control.touched)\"\r\n >\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}:host .special-upload{margin-bottom:1rem}:host .special-upload__dropzone{min-height:180px;height:unset!important}:host .special-upload__icon{height:64px;width:64px;font-size:64px}:host .special-upload__card{width:100%;height:100%;margin:0;box-sizing:border-box;display:flex;align-items:center;flex-direction:column}:host .special-upload__card--image{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: NgxDropzoneModule }, { kind: "component", type: i2$2.NgxDropzoneComponent, selector: "ngx-dropzone, [ngx-dropzone]", inputs: ["accept", "disabled", "multiple", "maxFileSize", "expandable", "disableClick", "processDirectoryDrop", "id", "aria-label", "aria-labelledby", "aria-describedby"], outputs: ["change"] }, { kind: "directive", type: i2$2.NgxDropzoneLabelDirective, selector: "ngx-dropzone-label" }, { kind: "component", type: i2$2.NgxDropzonePreviewComponent, selector: "ngx-dropzone-preview", inputs: ["file", "removable"], outputs: ["removed"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
427
- }
428
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialUploadComponent, decorators: [{
429
- type: Component,
430
- args: [{ standalone: true, selector: 'sp-upload', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
431
- FormsModule,
432
- NgxDropzoneModule,
433
- CommonModule,
434
- MatIconModule,
435
- ReactiveFormsModule,
436
- MatButtonModule,
437
- ErrorMessagePipe,
438
- ], template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-upload w-full mb-3 {{ control.styleClasses }}\"\r\n>\r\n <ngx-dropzone\r\n class=\"special-upload__dropzone\"\r\n [ngClass]=\"{\r\n 'special-upload--error-dashed':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n [multiple]=\"control.settings?.multiple\"\r\n [accept]=\"\r\n control.settings?.accept\r\n ? control.settings?.accept\r\n : 'image/png, .jpeg, .jpg, image/gif'\r\n \"\r\n (change)=\"\r\n control.settings?.multiple\r\n ? onSelectMultiple($event)\r\n : onSelectOne($event)\r\n \"\r\n >\r\n <ngx-dropzone-label\r\n [ngClass]=\"{\r\n 'special-upload--error':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n >\r\n <mat-icon class=\"special-upload__icon\" *ngIf=\"control.icon\"\r\n >{{ control.icon }}\r\n </mat-icon>\r\n <h2 class=\"text-base font-bold\">\r\n {{ control.label }}\r\n </h2>\r\n <h3 class=\"text-base\">\r\n {{ control.placeholder }}\r\n </h3>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-preview\r\n *ngFor=\"let file of previewImages\"\r\n [removable]=\"true\"\r\n (removed)=\"onRemove(file)\"\r\n >\r\n <ngx-dropzone-label class=\"special-upload__card\">\r\n <img class=\"special-upload__card--image\" [src]=\"file?.url\" alt=\"\" />\r\n </ngx-dropzone-label>\r\n </ngx-dropzone-preview>\r\n </ngx-dropzone>\r\n <div\r\n class=\"special-upload--error mt-2\"\r\n *ngIf=\"!!control.errors && (control.dirty || control.touched)\"\r\n >\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}:host .special-upload{margin-bottom:1rem}:host .special-upload__dropzone{min-height:180px;height:unset!important}:host .special-upload__icon{height:64px;width:64px;font-size:64px}:host .special-upload__card{width:100%;height:100%;margin:0;box-sizing:border-box;display:flex;align-items:center;flex-direction:column}:host .special-upload__card--image{width:100%;height:100%;object-fit:cover}\n"] }]
439
- }], ctorParameters: function () { return [{ type: i1$3.DomSanitizer }]; }, propDecorators: { controlSetter: [{
440
- type: Input,
441
- args: ['control']
380
+ class SpecialUploadComponent {
381
+ set controlSetter(control) {
382
+ this.control = control;
383
+ this.previewImages = control.value;
384
+ }
385
+ constructor(sanitizer) {
386
+ this.sanitizer = sanitizer;
387
+ this.previewImages = [];
388
+ }
389
+ ngOnInit() { }
390
+ onSelectMultiple(event) {
391
+ this.previewImages = [
392
+ ...this.previewImages,
393
+ ...event.addedFiles.map((file) => ({
394
+ lastModified: file.lastModified,
395
+ url: this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file)),
396
+ })),
397
+ ];
398
+ this.control.setValue([
399
+ ...(this.control.value || []),
400
+ ...event.addedFiles.map(this.fixFileName),
401
+ ]);
402
+ this.onselectFile(this.control.value);
403
+ this.control.markAsDirty();
404
+ }
405
+ onSelectOne(event) {
406
+ this.previewImages = event.addedFiles.map((file) => ({
407
+ lastModified: file.lastModified,
408
+ url: this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(file)),
409
+ }));
410
+ this.control.setValue(event.addedFiles.map(this.fixFileName));
411
+ this.onselectFile(this.control.value);
412
+ this.control.markAsDirty();
413
+ }
414
+ onselectFile(value) {
415
+ if (this.control.settings?.onSelectFile) {
416
+ this.control.settings.onSelectFile(value);
417
+ }
418
+ }
419
+ fixFileName(file) {
420
+ return Object.defineProperty(file, 'name', {
421
+ writable: true,
422
+ value: file.name.normalize('NFD').replace(/[\u0300-\u036f]/g, ''),
423
+ });
424
+ }
425
+ clean() {
426
+ this.previewImages = [];
427
+ }
428
+ onRemove(file) {
429
+ this.control.setValue(this.control.value.filter((fl) => fl.lastModified !== file.lastModified));
430
+ this.previewImages = this.previewImages.filter((fl) => fl.lastModified !== file.lastModified);
431
+ }
432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialUploadComponent, deps: [{ token: i1$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
433
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialUploadComponent, isStandalone: true, selector: "sp-upload", inputs: { controlSetter: ["control", "controlSetter"] }, ngImport: i0, template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-upload w-full mb-3 {{ control.styleClasses }}\"\r\n>\r\n <ngx-dropzone\r\n class=\"special-upload__dropzone\"\r\n [ngClass]=\"{\r\n 'special-upload--error-dashed':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n [multiple]=\"control.settings?.multiple\"\r\n [accept]=\"\r\n control.settings?.accept\r\n ? control.settings?.accept\r\n : 'image/png, .jpeg, .jpg, image/gif'\r\n \"\r\n (change)=\"\r\n control.settings?.multiple\r\n ? onSelectMultiple($event)\r\n : onSelectOne($event)\r\n \"\r\n >\r\n <ngx-dropzone-label\r\n [ngClass]=\"{\r\n 'special-upload--error':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n >\r\n <mat-icon class=\"special-upload__icon\" *ngIf=\"control.icon\"\r\n >{{ control.icon }}\r\n </mat-icon>\r\n <h2 class=\"text-base font-bold\">\r\n {{ control.label }}\r\n </h2>\r\n <h3 class=\"text-base\">\r\n {{ control.placeholder }}\r\n </h3>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-preview\r\n *ngFor=\"let file of previewImages\"\r\n [removable]=\"true\"\r\n (removed)=\"onRemove(file)\"\r\n >\r\n <ngx-dropzone-label class=\"special-upload__card\">\r\n <img class=\"special-upload__card--image\" [src]=\"file?.url\" alt=\"\" />\r\n </ngx-dropzone-label>\r\n </ngx-dropzone-preview>\r\n </ngx-dropzone>\r\n <div\r\n class=\"special-upload--error mt-2\"\r\n *ngIf=\"!!control.errors && (control.dirty || control.touched)\"\r\n >\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}:host .special-upload{margin-bottom:1rem}:host .special-upload__dropzone{min-height:180px;height:unset!important}:host .special-upload__icon{height:64px;width:64px;font-size:64px}:host .special-upload__card{width:100%;height:100%;margin:0;box-sizing:border-box;display:flex;align-items:center;flex-direction:column}:host .special-upload__card--image{width:100%;height:100%;object-fit:cover}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: NgxDropzoneModule }, { kind: "component", type: i2$2.NgxDropzoneComponent, selector: "ngx-dropzone, [ngx-dropzone]", inputs: ["accept", "disabled", "multiple", "maxFileSize", "expandable", "disableClick", "processDirectoryDrop", "id", "aria-label", "aria-labelledby", "aria-describedby"], outputs: ["change"] }, { kind: "directive", type: i2$2.NgxDropzoneLabelDirective, selector: "ngx-dropzone-label" }, { kind: "component", type: i2$2.NgxDropzonePreviewComponent, selector: "ngx-dropzone-preview", inputs: ["file", "removable"], outputs: ["removed"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
434
+ }
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialUploadComponent, decorators: [{
436
+ type: Component,
437
+ args: [{ standalone: true, selector: 'sp-upload', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
438
+ FormsModule,
439
+ NgxDropzoneModule,
440
+ CommonModule,
441
+ MatIconModule,
442
+ ReactiveFormsModule,
443
+ MatButtonModule,
444
+ ErrorMessagePipe,
445
+ ], template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n [id]=\"control.elementId\"\r\n class=\"special-upload w-full mb-3 {{ control.styleClasses }}\"\r\n>\r\n <ngx-dropzone\r\n class=\"special-upload__dropzone\"\r\n [ngClass]=\"{\r\n 'special-upload--error-dashed':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n [multiple]=\"control.settings?.multiple\"\r\n [accept]=\"\r\n control.settings?.accept\r\n ? control.settings?.accept\r\n : 'image/png, .jpeg, .jpg, image/gif'\r\n \"\r\n (change)=\"\r\n control.settings?.multiple\r\n ? onSelectMultiple($event)\r\n : onSelectOne($event)\r\n \"\r\n >\r\n <ngx-dropzone-label\r\n [ngClass]=\"{\r\n 'special-upload--error':\r\n !!control.errors && (control.dirty || control.touched)\r\n }\"\r\n >\r\n <mat-icon class=\"special-upload__icon\" *ngIf=\"control.icon\"\r\n >{{ control.icon }}\r\n </mat-icon>\r\n <h2 class=\"text-base font-bold\">\r\n {{ control.label }}\r\n </h2>\r\n <h3 class=\"text-base\">\r\n {{ control.placeholder }}\r\n </h3>\r\n </ngx-dropzone-label>\r\n <ngx-dropzone-preview\r\n *ngFor=\"let file of previewImages\"\r\n [removable]=\"true\"\r\n (removed)=\"onRemove(file)\"\r\n >\r\n <ngx-dropzone-label class=\"special-upload__card\">\r\n <img class=\"special-upload__card--image\" [src]=\"file?.url\" alt=\"\" />\r\n </ngx-dropzone-label>\r\n </ngx-dropzone-preview>\r\n </ngx-dropzone>\r\n <div\r\n class=\"special-upload--error mt-2\"\r\n *ngIf=\"!!control.errors && (control.dirty || control.touched)\"\r\n >\r\n {{ control.errors | errorMessage: control.errorMessages }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}:host .special-upload{margin-bottom:1rem}:host .special-upload__dropzone{min-height:180px;height:unset!important}:host .special-upload__icon{height:64px;width:64px;font-size:64px}:host .special-upload__card{width:100%;height:100%;margin:0;box-sizing:border-box;display:flex;align-items:center;flex-direction:column}:host .special-upload__card--image{width:100%;height:100%;object-fit:cover}\n"] }]
446
+ }], ctorParameters: () => [{ type: i1$3.DomSanitizer }], propDecorators: { controlSetter: [{
447
+ type: Input,
448
+ args: ['control']
442
449
  }] } });
443
450
 
444
- class SpecialLabelComponent {
445
- constructor() { }
446
- ngOnInit() { }
447
- get settings() {
448
- return this.control.settings || { isLink: false };
449
- }
450
- onLink() {
451
- if (this.settings.isLink && this.settings.onClickLink) {
452
- this.settings.onClickLink(this.control.value);
453
- }
454
- }
455
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
456
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialLabelComponent, isStandalone: true, selector: "sp-label", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n class=\"special-label px-2 mb-3 {{ control.styleClasses }} {{\r\n control.value | textByFunction: settings.stylesPipe\r\n }}\"\r\n [id]=\"control.elementId\"\r\n>\r\n <div *ngIf=\"!!control.label\" class=\"special-label__title font-bold\">\r\n {{ control.label }}\r\n </div>\r\n <div\r\n class=\"special-label__text\"\r\n [ngClass]=\"{\r\n 'cursor-pointer text-blue-600 hover:text-blue-700': settings.isLink\r\n }\"\r\n (click)=\"onLink()\"\r\n >\r\n {{ control.value | textByFunction: control.settings.pipe }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
457
- }
458
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialLabelComponent, decorators: [{
459
- type: Component,
460
- args: [{ standalone: true, selector: 'sp-label', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatIconModule, TextByFunctionPipe], template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n class=\"special-label px-2 mb-3 {{ control.styleClasses }} {{\r\n control.value | textByFunction: settings.stylesPipe\r\n }}\"\r\n [id]=\"control.elementId\"\r\n>\r\n <div *ngIf=\"!!control.label\" class=\"special-label__title font-bold\">\r\n {{ control.label }}\r\n </div>\r\n <div\r\n class=\"special-label__text\"\r\n [ngClass]=\"{\r\n 'cursor-pointer text-blue-600 hover:text-blue-700': settings.isLink\r\n }\"\r\n (click)=\"onLink()\"\r\n >\r\n {{ control.value | textByFunction: control.settings.pipe }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
461
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
462
- type: Input
451
+ class SpecialLabelComponent {
452
+ constructor() { }
453
+ ngOnInit() { }
454
+ get settings() {
455
+ return this.control.settings || { isLink: false };
456
+ }
457
+ onLink() {
458
+ if (this.settings.isLink && this.settings.onClickLink) {
459
+ this.settings.onClickLink(this.control.value);
460
+ }
461
+ }
462
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
463
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialLabelComponent, isStandalone: true, selector: "sp-label", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n class=\"special-label px-2 mb-3 {{ control.styleClasses }} {{\r\n control.value | textByFunction: settings.stylesPipe\r\n }}\"\r\n [id]=\"control.elementId\"\r\n>\r\n <div *ngIf=\"!!control.label\" class=\"special-label__title font-bold\">\r\n {{ control.label }}\r\n </div>\r\n <div\r\n class=\"special-label__text\"\r\n [ngClass]=\"{\r\n 'cursor-pointer text-blue-600 hover:text-blue-700': settings.isLink\r\n }\"\r\n (click)=\"onLink()\"\r\n >\r\n {{ control.value | textByFunction: control.settings.pipe }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "pipe", type: TextByFunctionPipe, name: "textByFunction" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
464
+ }
465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialLabelComponent, decorators: [{
466
+ type: Component,
467
+ args: [{ standalone: true, selector: 'sp-label', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatIconModule, TextByFunctionPipe], template: "<div\r\n *ngIf=\"control && !control.hidden\"\r\n class=\"special-label px-2 mb-3 {{ control.styleClasses }} {{\r\n control.value | textByFunction: settings.stylesPipe\r\n }}\"\r\n [id]=\"control.elementId\"\r\n>\r\n <div *ngIf=\"!!control.label\" class=\"special-label__title font-bold\">\r\n {{ control.label }}\r\n </div>\r\n <div\r\n class=\"special-label__text\"\r\n [ngClass]=\"{\r\n 'cursor-pointer text-blue-600 hover:text-blue-700': settings.isLink\r\n }\"\r\n (click)=\"onLink()\"\r\n >\r\n {{ control.value | textByFunction: control.settings.pipe }}\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
468
+ }], ctorParameters: () => [], propDecorators: { control: [{
469
+ type: Input
463
470
  }] } });
464
471
 
465
- var EControlTypes;
466
- (function (EControlTypes) {
467
- EControlTypes["pkey"] = "PRIMARY-KEY";
468
- EControlTypes["input"] = "INPUT";
469
- EControlTypes["richText"] = "RICH-TEXT";
470
- EControlTypes["textArea"] = "TEXT-AREA";
471
- EControlTypes["dropdown"] = "DROPDOWN";
472
- EControlTypes["date"] = "DATE";
473
- EControlTypes["checkbox"] = "CHECKBOX";
474
- EControlTypes["upload"] = "UPLOAD";
475
- EControlTypes["autocomplete"] = "AUTOCOMPLETE";
476
- EControlTypes["multiple"] = "MULTIPLE-AUTOCOMPLETE";
477
- EControlTypes["array"] = "ARRAY";
478
- EControlTypes["form"] = "FORM";
479
- EControlTypes["label"] = "LABEL";
480
- EControlTypes["default"] = "DEFAULT";
472
+ var EControlTypes;
473
+ (function (EControlTypes) {
474
+ EControlTypes["pkey"] = "PRIMARY-KEY";
475
+ EControlTypes["input"] = "INPUT";
476
+ EControlTypes["richText"] = "RICH-TEXT";
477
+ EControlTypes["textArea"] = "TEXT-AREA";
478
+ EControlTypes["dropdown"] = "DROPDOWN";
479
+ EControlTypes["date"] = "DATE";
480
+ EControlTypes["checkbox"] = "CHECKBOX";
481
+ EControlTypes["upload"] = "UPLOAD";
482
+ EControlTypes["autocomplete"] = "AUTOCOMPLETE";
483
+ EControlTypes["multiple"] = "MULTIPLE-AUTOCOMPLETE";
484
+ EControlTypes["array"] = "ARRAY";
485
+ EControlTypes["form"] = "FORM";
486
+ EControlTypes["label"] = "LABEL";
487
+ EControlTypes["default"] = "DEFAULT";
481
488
  })(EControlTypes || (EControlTypes = {}));
482
489
 
483
- class SpecialRichtextComponent {
484
- set control(control) {
485
- this.formControl = control;
486
- if (control.settings.colorPresets)
487
- this.colorPresets = control.settings.colorPresets;
488
- this.editor = new Editor();
489
- }
490
- constructor() {
491
- this.colorPresets = ['red', 'yellow', 'green', 'blue', 'black'];
492
- this.toolbar = [
493
- // default value
494
- ['bold', 'italic'],
495
- ['underline', 'strike'],
496
- ['code', 'blockquote'],
497
- ['ordered_list', 'bullet_list'],
498
- [{ heading: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] }],
499
- ['link', 'image'],
500
- ['text_color', 'background_color'],
501
- ['align_left', 'align_center', 'align_right', 'align_justify'],
502
- ['horizontal_rule', 'format_clear'],
503
- ];
504
- }
505
- ngOnInit() { }
506
- ngOnDestroy() {
507
- this.editor.destroy();
508
- }
509
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialRichtextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
510
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialRichtextComponent, isStandalone: true, selector: "sp-input", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n class=\"special-richtext w-full mb-3 {{ formControl.styleClasses }}\"\r\n [id]=\"formControl.elementId\"\r\n *ngIf=\"formControl && !formControl.hidden\"\r\n>\r\n <ngx-editor-menu\r\n [colorPresets]=\"colorPresets\"\r\n [toolbar]=\"toolbar\"\r\n [editor]=\"editor\"\r\n >\r\n </ngx-editor-menu>\r\n <ngx-editor\r\n [editor]=\"editor\"\r\n [formControl]=\"formControl\"\r\n [disabled]=\"false\"\r\n [placeholder]=\"formControl.placeholder\"\r\n ></ngx-editor>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxEditorModule }, { kind: "component", type: i3$2.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i3$2.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
511
- }
512
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialRichtextComponent, decorators: [{
513
- type: Component,
514
- args: [{ standalone: true, selector: 'sp-input', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatIconModule, ReactiveFormsModule, NgxEditorModule], template: "<div\r\n class=\"special-richtext w-full mb-3 {{ formControl.styleClasses }}\"\r\n [id]=\"formControl.elementId\"\r\n *ngIf=\"formControl && !formControl.hidden\"\r\n>\r\n <ngx-editor-menu\r\n [colorPresets]=\"colorPresets\"\r\n [toolbar]=\"toolbar\"\r\n [editor]=\"editor\"\r\n >\r\n </ngx-editor-menu>\r\n <ngx-editor\r\n [editor]=\"editor\"\r\n [formControl]=\"formControl\"\r\n [disabled]=\"false\"\r\n [placeholder]=\"formControl.placeholder\"\r\n ></ngx-editor>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
515
- }], ctorParameters: function () { return []; }, propDecorators: { control: [{
516
- type: Input
490
+ class SpecialRichtextComponent {
491
+ set control(control) {
492
+ this.formControl = control;
493
+ if (control.settings.colorPresets)
494
+ this.colorPresets = control.settings.colorPresets;
495
+ this.editor = new Editor();
496
+ }
497
+ constructor() {
498
+ this.colorPresets = ['red', 'yellow', 'green', 'blue', 'black'];
499
+ this.toolbar = [
500
+ // default value
501
+ ['bold', 'italic'],
502
+ ['underline', 'strike'],
503
+ ['code', 'blockquote'],
504
+ ['ordered_list', 'bullet_list'],
505
+ [{ heading: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] }],
506
+ ['link', 'image'],
507
+ ['text_color', 'background_color'],
508
+ ['align_left', 'align_center', 'align_right', 'align_justify'],
509
+ ['horizontal_rule', 'format_clear'],
510
+ ];
511
+ }
512
+ ngOnInit() { }
513
+ ngOnDestroy() {
514
+ this.editor.destroy();
515
+ }
516
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialRichtextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
517
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialRichtextComponent, isStandalone: true, selector: "sp-input", inputs: { control: "control" }, ngImport: i0, template: "<div\r\n class=\"special-richtext w-full mb-3 {{ formControl.styleClasses }}\"\r\n [id]=\"formControl.elementId\"\r\n *ngIf=\"formControl && !formControl.hidden\"\r\n>\r\n <div class=\"text-md font-medium pl-2 mb-2\" *ngIf=\"formControl.label\">\r\n {{ formControl.label }}\r\n </div>\r\n <ngx-editor-menu\r\n [colorPresets]=\"colorPresets\"\r\n [toolbar]=\"toolbar\"\r\n [editor]=\"editor\"\r\n >\r\n </ngx-editor-menu>\r\n <ngx-editor\r\n [editor]=\"editor\"\r\n [formControl]=\"formControl\"\r\n [required]=\"formControl.required\"\r\n [disabled]=\"false\"\r\n [placeholder]=\"formControl.placeholder\"\r\n ></ngx-editor>\r\n <div class=\"px-5 mt-2\">\r\n <ng-container *ngIf=\"formControl.dirty; else tooltipRef\">\r\n <div\r\n class=\"text-sm text-rose-500\"\r\n *ngIf=\"\r\n formControl.errors\r\n | errorMessage : formControl.errorMessages as error;\r\n else tooltipRef\r\n \"\r\n >\r\n {{ error }}\r\n </div>\r\n </ng-container>\r\n <ng-template #tooltipRef>\r\n <div class=\"text-sm font-medium\">{{ formControl.tooltip }}</div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i7.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgxEditorModule }, { kind: "component", type: i3$2.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i3$2.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "pipe", type: ErrorMessagePipe, name: "errorMessage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
518
+ }
519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialRichtextComponent, decorators: [{
520
+ type: Component,
521
+ args: [{ standalone: true, selector: 'sp-input', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
522
+ CommonModule,
523
+ MatInputModule,
524
+ MatIconModule,
525
+ ReactiveFormsModule,
526
+ NgxEditorModule,
527
+ ErrorMessagePipe,
528
+ ], template: "<div\r\n class=\"special-richtext w-full mb-3 {{ formControl.styleClasses }}\"\r\n [id]=\"formControl.elementId\"\r\n *ngIf=\"formControl && !formControl.hidden\"\r\n>\r\n <div class=\"text-md font-medium pl-2 mb-2\" *ngIf=\"formControl.label\">\r\n {{ formControl.label }}\r\n </div>\r\n <ngx-editor-menu\r\n [colorPresets]=\"colorPresets\"\r\n [toolbar]=\"toolbar\"\r\n [editor]=\"editor\"\r\n >\r\n </ngx-editor-menu>\r\n <ngx-editor\r\n [editor]=\"editor\"\r\n [formControl]=\"formControl\"\r\n [required]=\"formControl.required\"\r\n [disabled]=\"false\"\r\n [placeholder]=\"formControl.placeholder\"\r\n ></ngx-editor>\r\n <div class=\"px-5 mt-2\">\r\n <ng-container *ngIf=\"formControl.dirty; else tooltipRef\">\r\n <div\r\n class=\"text-sm text-rose-500\"\r\n *ngIf=\"\r\n formControl.errors\r\n | errorMessage : formControl.errorMessages as error;\r\n else tooltipRef\r\n \"\r\n >\r\n {{ error }}\r\n </div>\r\n </ng-container>\r\n <ng-template #tooltipRef>\r\n <div class=\"text-sm font-medium\">{{ formControl.tooltip }}</div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
529
+ }], ctorParameters: () => [], propDecorators: { control: [{
530
+ type: Input
517
531
  }] } });
518
532
 
519
- class SpecialFormComponent {
520
- set control(form) {
521
- this.form = form;
522
- }
523
- ngOnInit() { }
524
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
525
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialFormComponent, selector: "sp-form", inputs: { form: ["control", "form"] }, ngImport: i0, template: "<div\r\n *ngIf=\"form && !form.hidden\"\r\n [id]=\"form.elementId\"\r\n class=\"special-form w-full box-border p-2 {{ form.styleClasses }}\"\r\n>\r\n <div\r\n *ngIf=\"form\"\r\n [class]=\"\r\n form.label\r\n ? 'w-full mt-2 p-3 border-slate-200 border border-solid box-border'\r\n : 'container'\r\n \"\r\n >\r\n <h1 *ngIf=\"!!form.label\" class=\"font-bold py-3\">{{ form.label }}</h1>\r\n <div class=\"w-full flex flex-wrap\">\r\n <ng-template\r\n *ngFor=\"let control of form.controls | controlsList\"\r\n controlRender\r\n [control]=\"control\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return FormControlsRenderDirective; }), selector: "[controlRender]", inputs: ["control"] }, { kind: "pipe", type: i0.forwardRef(function () { return FormControlsListPipe; }), name: "controlsList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
526
- }
527
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormComponent, decorators: [{
528
- type: Component,
529
- args: [{ selector: 'sp-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngIf=\"form && !form.hidden\"\r\n [id]=\"form.elementId\"\r\n class=\"special-form w-full box-border p-2 {{ form.styleClasses }}\"\r\n>\r\n <div\r\n *ngIf=\"form\"\r\n [class]=\"\r\n form.label\r\n ? 'w-full mt-2 p-3 border-slate-200 border border-solid box-border'\r\n : 'container'\r\n \"\r\n >\r\n <h1 *ngIf=\"!!form.label\" class=\"font-bold py-3\">{{ form.label }}</h1>\r\n <div class=\"w-full flex flex-wrap\">\r\n <ng-template\r\n *ngFor=\"let control of form.controls | controlsList\"\r\n controlRender\r\n [control]=\"control\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
530
- }], propDecorators: { form: [{
531
- type: Input,
532
- args: ['control']
533
- }] } });
534
- class SpecialArrayComponent {
535
- set control(formArray) {
536
- this.formArray = formArray;
537
- }
538
- get withFormHeader() {
539
- return this.formArray.settings.withFormHeader;
540
- }
541
- get settings() {
542
- return this.formArray.settings;
543
- }
544
- constructor() { }
545
- ngOnInit() { }
546
- removeItem(index) {
547
- this.formArray.removeAt(index);
548
- }
549
- addItem() {
550
- this.formArray.addItem();
551
- }
552
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
553
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.1", type: SpecialArrayComponent, selector: "sp-array", inputs: { formArray: ["control", "formArray"] }, ngImport: i0, template: "<div\r\n *ngIf=\"formArray && !formArray.hidden\"\r\n [id]=\"formArray.elementId\"\r\n class=\"special-form-array w-full box-border p-2 {{ formArray.styleClasses }}\"\r\n>\r\n <div class=\"w-full mt-2 p-3 border-slate-200 border border-solid box-border\">\r\n <h1 *ngIf=\"!!formArray.label\" class=\"font-bold py-3\">\r\n {{ formArray.label }}\r\n </h1>\r\n <div class=\"divide-y divide-x-0 divide-solid divide-slate-200\">\r\n <div\r\n *ngIf=\"formArray.form\"\r\n [ngClass]=\"{ 'md:grid-cols-15': settings.withActionButtons }\"\r\n class=\"grid gap-4 grid-cols-12\"\r\n >\r\n <ng-container *ngIf=\"!withFormHeader; else FORMHEADERREF\">\r\n <h2\r\n [class]=\"item.styleClasses\"\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n >\r\n {{ item.label }}\r\n </h2>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n ></div>\r\n </ng-container>\r\n <ng-template #FORMHEADERREF>\r\n <ng-template\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button\r\n mat-flat-button\r\n color=\"primary\"\r\n [disabled]=\"formArray.form.invalid\"\r\n (click)=\"addItem()\"\r\n >\r\n {{settings.addActionLabel || 'Add'}}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"w-full pt-5 grid gap-4 grid-cols-12 md:grid-cols-15\"\r\n *ngFor=\"let formGroup of formArray.controls; let i = index\"\r\n >\r\n <ng-template\r\n *ngFor=\"let item of formGroup.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button mat-flat-button color=\"warn\" (click)=\"removeItem(i)\">\r\n {{ settings.removeActionLabel || \"Remove\" }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1$1.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i0.forwardRef(function () { return i7$1.MatButton; }), selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i0.forwardRef(function () { return FormControlsRenderDirective; }), selector: "[controlRender]", inputs: ["control"] }, { kind: "pipe", type: i0.forwardRef(function () { return FormControlsListPipe; }), name: "controlsList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
554
- }
555
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialArrayComponent, decorators: [{
556
- type: Component,
557
- args: [{ selector: 'sp-array', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngIf=\"formArray && !formArray.hidden\"\r\n [id]=\"formArray.elementId\"\r\n class=\"special-form-array w-full box-border p-2 {{ formArray.styleClasses }}\"\r\n>\r\n <div class=\"w-full mt-2 p-3 border-slate-200 border border-solid box-border\">\r\n <h1 *ngIf=\"!!formArray.label\" class=\"font-bold py-3\">\r\n {{ formArray.label }}\r\n </h1>\r\n <div class=\"divide-y divide-x-0 divide-solid divide-slate-200\">\r\n <div\r\n *ngIf=\"formArray.form\"\r\n [ngClass]=\"{ 'md:grid-cols-15': settings.withActionButtons }\"\r\n class=\"grid gap-4 grid-cols-12\"\r\n >\r\n <ng-container *ngIf=\"!withFormHeader; else FORMHEADERREF\">\r\n <h2\r\n [class]=\"item.styleClasses\"\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n >\r\n {{ item.label }}\r\n </h2>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n ></div>\r\n </ng-container>\r\n <ng-template #FORMHEADERREF>\r\n <ng-template\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button\r\n mat-flat-button\r\n color=\"primary\"\r\n [disabled]=\"formArray.form.invalid\"\r\n (click)=\"addItem()\"\r\n >\r\n {{settings.addActionLabel || 'Add'}}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"w-full pt-5 grid gap-4 grid-cols-12 md:grid-cols-15\"\r\n *ngFor=\"let formGroup of formArray.controls; let i = index\"\r\n >\r\n <ng-template\r\n *ngFor=\"let item of formGroup.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button mat-flat-button color=\"warn\" (click)=\"removeItem(i)\">\r\n {{ settings.removeActionLabel || \"Remove\" }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
558
- }], ctorParameters: function () { return []; }, propDecorators: { formArray: [{
559
- type: Input,
560
- args: ['control']
561
- }] } });
562
- class FormControlsRenderDirective {
563
- set controlSetter(control) {
564
- this.viewContainer.clear();
565
- const component = this.componentsBuffer[control.type];
566
- if (component) {
567
- const componentRef = this.viewContainer.createComponent(component);
568
- componentRef.instance.control = control;
569
- }
570
- }
571
- constructor(viewContainer) {
572
- this.viewContainer = viewContainer;
573
- this.componentsBuffer = {
574
- [EControlTypes.autocomplete]: SpecialAutocompleteComponent,
575
- [EControlTypes.checkbox]: SpecialCheckboxComponent,
576
- [EControlTypes.date]: SpecialDatepickerComponent,
577
- [EControlTypes.dropdown]: SpecialDropdownComponent,
578
- [EControlTypes.array]: SpecialArrayComponent,
579
- [EControlTypes.input]: SpecialInputComponent,
580
- [EControlTypes.multiple]: SpecialMultipleAutocompleteComponent,
581
- [EControlTypes.textArea]: SpecialTextAreaComponent,
582
- [EControlTypes.label]: SpecialLabelComponent,
583
- [EControlTypes.upload]: SpecialUploadComponent,
584
- [EControlTypes.form]: SpecialFormComponent,
585
- [EControlTypes.richText]: SpecialRichtextComponent,
586
- };
587
- }
588
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: FormControlsRenderDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
589
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.1", type: FormControlsRenderDirective, selector: "[controlRender]", inputs: { controlSetter: ["control", "controlSetter"] }, ngImport: i0 }); }
590
- }
591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: FormControlsRenderDirective, decorators: [{
592
- type: Directive,
593
- args: [{
594
- selector: `[controlRender]`,
595
- }]
596
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { controlSetter: [{
597
- type: Input,
598
- args: ['control']
533
+ class SpecialFormComponent {
534
+ set control(form) {
535
+ this.form = form;
536
+ }
537
+ ngOnInit() { }
538
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
539
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialFormComponent, selector: "sp-form", inputs: { form: ["control", "form"] }, ngImport: i0, template: "<div\r\n *ngIf=\"form && !form.hidden\"\r\n [id]=\"form.elementId\"\r\n class=\"special-form w-full box-border p-2 {{ form.styleClasses }}\"\r\n>\r\n <div\r\n *ngIf=\"form\"\r\n [class]=\"\r\n form.label\r\n ? 'w-full mt-2 p-3 border-slate-200 border border-solid box-border'\r\n : 'container'\r\n \"\r\n >\r\n <h1 *ngIf=\"!!form.label\" class=\"font-bold py-3\">{{ form.label }}</h1>\r\n <div class=\"w-full flex flex-wrap\">\r\n <ng-template\r\n *ngFor=\"let control of form.controls | controlsList\"\r\n controlRender\r\n [control]=\"control\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1$1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1$1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => FormControlsRenderDirective), selector: "[controlRender]", inputs: ["control"] }, { kind: "pipe", type: i0.forwardRef(() => FormControlsListPipe), name: "controlsList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
540
+ }
541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormComponent, decorators: [{
542
+ type: Component,
543
+ args: [{ selector: 'sp-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngIf=\"form && !form.hidden\"\r\n [id]=\"form.elementId\"\r\n class=\"special-form w-full box-border p-2 {{ form.styleClasses }}\"\r\n>\r\n <div\r\n *ngIf=\"form\"\r\n [class]=\"\r\n form.label\r\n ? 'w-full mt-2 p-3 border-slate-200 border border-solid box-border'\r\n : 'container'\r\n \"\r\n >\r\n <h1 *ngIf=\"!!form.label\" class=\"font-bold py-3\">{{ form.label }}</h1>\r\n <div class=\"w-full flex flex-wrap\">\r\n <ng-template\r\n *ngFor=\"let control of form.controls | controlsList\"\r\n controlRender\r\n [control]=\"control\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
544
+ }], propDecorators: { form: [{
545
+ type: Input,
546
+ args: ['control']
547
+ }] } });
548
+ class SpecialArrayComponent {
549
+ set control(formArray) {
550
+ this.formArray = formArray;
551
+ }
552
+ get withFormHeader() {
553
+ return this.formArray.settings.withFormHeader;
554
+ }
555
+ get settings() {
556
+ return this.formArray.settings;
557
+ }
558
+ constructor() { }
559
+ ngOnInit() { }
560
+ removeItem(index) {
561
+ this.formArray.removeAt(index);
562
+ }
563
+ addItem() {
564
+ this.formArray.addItem();
565
+ }
566
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialArrayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
567
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: SpecialArrayComponent, selector: "sp-array", inputs: { formArray: ["control", "formArray"] }, ngImport: i0, template: "<div\r\n *ngIf=\"formArray && !formArray.hidden\"\r\n [id]=\"formArray.elementId\"\r\n class=\"special-form-array w-full box-border p-2 {{ formArray.styleClasses }}\"\r\n>\r\n <div class=\"w-full mt-2 p-3 border-slate-200 border border-solid box-border\">\r\n <h1 *ngIf=\"!!formArray.label\" class=\"font-bold py-3\">\r\n {{ formArray.label }}\r\n </h1>\r\n <div class=\"divide-y divide-x-0 divide-solid divide-slate-200\">\r\n <div\r\n *ngIf=\"formArray.form\"\r\n [ngClass]=\"{ 'md:grid-cols-15': settings.withActionButtons }\"\r\n class=\"grid gap-4 grid-cols-12\"\r\n >\r\n <ng-container *ngIf=\"!withFormHeader; else FORMHEADERREF\">\r\n <h2\r\n [class]=\"item.styleClasses\"\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n >\r\n {{ item.label }}\r\n </h2>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n ></div>\r\n </ng-container>\r\n <ng-template #FORMHEADERREF>\r\n <ng-template\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button\r\n mat-flat-button\r\n color=\"primary\"\r\n [disabled]=\"formArray.form.invalid\"\r\n (click)=\"addItem()\"\r\n >\r\n {{settings.addActionLabel || 'Add'}}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"w-full pt-5 grid gap-4 grid-cols-12 md:grid-cols-15\"\r\n *ngFor=\"let formGroup of formArray.controls; let i = index\"\r\n >\r\n <ng-template\r\n *ngFor=\"let item of formGroup.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button mat-flat-button color=\"warn\" (click)=\"removeItem(i)\">\r\n {{ settings.removeActionLabel || \"Remove\" }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1$1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1$1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1$1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i0.forwardRef(() => i7$1.MatButton), selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i0.forwardRef(() => FormControlsRenderDirective), selector: "[controlRender]", inputs: ["control"] }, { kind: "pipe", type: i0.forwardRef(() => FormControlsListPipe), name: "controlsList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
568
+ }
569
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialArrayComponent, decorators: [{
570
+ type: Component,
571
+ args: [{ selector: 'sp-array', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n *ngIf=\"formArray && !formArray.hidden\"\r\n [id]=\"formArray.elementId\"\r\n class=\"special-form-array w-full box-border p-2 {{ formArray.styleClasses }}\"\r\n>\r\n <div class=\"w-full mt-2 p-3 border-slate-200 border border-solid box-border\">\r\n <h1 *ngIf=\"!!formArray.label\" class=\"font-bold py-3\">\r\n {{ formArray.label }}\r\n </h1>\r\n <div class=\"divide-y divide-x-0 divide-solid divide-slate-200\">\r\n <div\r\n *ngIf=\"formArray.form\"\r\n [ngClass]=\"{ 'md:grid-cols-15': settings.withActionButtons }\"\r\n class=\"grid gap-4 grid-cols-12\"\r\n >\r\n <ng-container *ngIf=\"!withFormHeader; else FORMHEADERREF\">\r\n <h2\r\n [class]=\"item.styleClasses\"\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n >\r\n {{ item.label }}\r\n </h2>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n ></div>\r\n </ng-container>\r\n <ng-template #FORMHEADERREF>\r\n <ng-template\r\n *ngFor=\"let item of formArray.form.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n *ngIf=\"settings.withActionButtons\"\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button\r\n mat-flat-button\r\n color=\"primary\"\r\n [disabled]=\"formArray.form.invalid\"\r\n (click)=\"addItem()\"\r\n >\r\n {{settings.addActionLabel || 'Add'}}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div\r\n class=\"w-full pt-5 grid gap-4 grid-cols-12 md:grid-cols-15\"\r\n *ngFor=\"let formGroup of formArray.controls; let i = index\"\r\n >\r\n <ng-template\r\n *ngFor=\"let item of formGroup.controls | controlsList\"\r\n controlRender\r\n [control]=\"item\"\r\n ></ng-template>\r\n <div\r\n class=\"\r\n col-start-7 col-end-13\r\n md:col-start-13 md:col-end-16\r\n pb-5\r\n my-auto\r\n ml-auto\r\n md:m-auto\r\n \"\r\n >\r\n <button mat-flat-button color=\"warn\" (click)=\"removeItem(i)\">\r\n {{ settings.removeActionLabel || \"Remove\" }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:contents}\n"] }]
572
+ }], ctorParameters: () => [], propDecorators: { formArray: [{
573
+ type: Input,
574
+ args: ['control']
575
+ }] } });
576
+ class FormControlsRenderDirective {
577
+ set controlSetter(control) {
578
+ this.viewContainer.clear();
579
+ const component = this.componentsBuffer[control.type];
580
+ if (component) {
581
+ const componentRef = this.viewContainer.createComponent(component);
582
+ componentRef.instance.control = control;
583
+ }
584
+ }
585
+ constructor(viewContainer) {
586
+ this.viewContainer = viewContainer;
587
+ this.componentsBuffer = {
588
+ [EControlTypes.autocomplete]: SpecialAutocompleteComponent,
589
+ [EControlTypes.checkbox]: SpecialCheckboxComponent,
590
+ [EControlTypes.date]: SpecialDatepickerComponent,
591
+ [EControlTypes.dropdown]: SpecialDropdownComponent,
592
+ [EControlTypes.array]: SpecialArrayComponent,
593
+ [EControlTypes.input]: SpecialInputComponent,
594
+ [EControlTypes.multiple]: SpecialMultipleAutocompleteComponent,
595
+ [EControlTypes.textArea]: SpecialTextAreaComponent,
596
+ [EControlTypes.label]: SpecialLabelComponent,
597
+ [EControlTypes.upload]: SpecialUploadComponent,
598
+ [EControlTypes.form]: SpecialFormComponent,
599
+ [EControlTypes.richText]: SpecialRichtextComponent,
600
+ };
601
+ }
602
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormControlsRenderDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
603
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.0", type: FormControlsRenderDirective, selector: "[controlRender]", inputs: { controlSetter: ["control", "controlSetter"] }, ngImport: i0 }); }
604
+ }
605
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormControlsRenderDirective, decorators: [{
606
+ type: Directive,
607
+ args: [{
608
+ selector: `[controlRender]`,
609
+ }]
610
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { controlSetter: [{
611
+ type: Input,
612
+ args: ['control']
599
613
  }] } });
600
614
 
601
- class SpecialFormModule {
602
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
603
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormModule, declarations: [SpecialArrayComponent,
604
- FormControlsRenderDirective,
605
- SpecialFormComponent], imports: [CommonModule,
606
- FormControlsListPipe,
607
- MatButtonModule,
608
- SpecialRichtextComponent,
609
- SpecialDropdownComponent,
610
- SpecialInputComponent,
611
- SpecialAutocompleteComponent,
612
- SpecialDatepickerComponent,
613
- SpecialLabelComponent,
614
- SpecialMultipleAutocompleteComponent,
615
- SpecialCheckboxComponent,
616
- SpecialTextAreaComponent,
617
- SpecialUploadComponent], exports: [SpecialArrayComponent,
618
- FormControlsRenderDirective,
619
- SpecialFormComponent] }); }
620
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormModule, imports: [CommonModule,
621
- MatButtonModule,
622
- SpecialRichtextComponent,
623
- SpecialDropdownComponent,
624
- SpecialInputComponent,
625
- SpecialAutocompleteComponent,
626
- SpecialDatepickerComponent,
627
- SpecialLabelComponent,
628
- SpecialMultipleAutocompleteComponent,
629
- SpecialCheckboxComponent,
630
- SpecialTextAreaComponent,
631
- SpecialUploadComponent] }); }
632
- }
633
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormModule, decorators: [{
634
- type: NgModule,
635
- args: [{
636
- declarations: [
637
- SpecialArrayComponent,
638
- FormControlsRenderDirective,
639
- SpecialFormComponent,
640
- ],
641
- imports: [
642
- CommonModule,
643
- FormControlsListPipe,
644
- MatButtonModule,
645
- SpecialRichtextComponent,
646
- SpecialDropdownComponent,
647
- SpecialInputComponent,
648
- SpecialAutocompleteComponent,
649
- SpecialDatepickerComponent,
650
- SpecialLabelComponent,
651
- SpecialMultipleAutocompleteComponent,
652
- SpecialCheckboxComponent,
653
- SpecialTextAreaComponent,
654
- SpecialUploadComponent,
655
- ],
656
- exports: [
657
- SpecialArrayComponent,
658
- FormControlsRenderDirective,
659
- SpecialFormComponent,
660
- ],
661
- }]
615
+ class SpecialFormModule {
616
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
617
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormModule, declarations: [SpecialArrayComponent,
618
+ FormControlsRenderDirective,
619
+ SpecialFormComponent], imports: [CommonModule,
620
+ FormControlsListPipe,
621
+ MatButtonModule,
622
+ SpecialRichtextComponent,
623
+ SpecialDropdownComponent,
624
+ SpecialInputComponent,
625
+ SpecialAutocompleteComponent,
626
+ SpecialDatepickerComponent,
627
+ SpecialLabelComponent,
628
+ SpecialMultipleAutocompleteComponent,
629
+ SpecialCheckboxComponent,
630
+ SpecialTextAreaComponent,
631
+ SpecialUploadComponent], exports: [SpecialArrayComponent,
632
+ FormControlsRenderDirective,
633
+ SpecialFormComponent] }); }
634
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormModule, imports: [CommonModule,
635
+ MatButtonModule,
636
+ SpecialRichtextComponent,
637
+ SpecialDropdownComponent,
638
+ SpecialInputComponent,
639
+ SpecialAutocompleteComponent,
640
+ SpecialDatepickerComponent,
641
+ SpecialLabelComponent,
642
+ SpecialMultipleAutocompleteComponent,
643
+ SpecialCheckboxComponent,
644
+ SpecialTextAreaComponent,
645
+ SpecialUploadComponent] }); }
646
+ }
647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormModule, decorators: [{
648
+ type: NgModule,
649
+ args: [{
650
+ declarations: [
651
+ SpecialArrayComponent,
652
+ FormControlsRenderDirective,
653
+ SpecialFormComponent,
654
+ ],
655
+ imports: [
656
+ CommonModule,
657
+ FormControlsListPipe,
658
+ MatButtonModule,
659
+ SpecialRichtextComponent,
660
+ SpecialDropdownComponent,
661
+ SpecialInputComponent,
662
+ SpecialAutocompleteComponent,
663
+ SpecialDatepickerComponent,
664
+ SpecialLabelComponent,
665
+ SpecialMultipleAutocompleteComponent,
666
+ SpecialCheckboxComponent,
667
+ SpecialTextAreaComponent,
668
+ SpecialUploadComponent,
669
+ ],
670
+ exports: [
671
+ SpecialArrayComponent,
672
+ FormControlsRenderDirective,
673
+ SpecialFormComponent,
674
+ ],
675
+ }]
662
676
  }] });
663
677
 
664
- class SpecialFormControl extends FormControl {
665
- constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, errorMessages, disabled, }) {
666
- super(defaultValue, validators, asyncValidators);
667
- this.name = name;
668
- this.placeholder = placeholder;
669
- this.label = label;
670
- this.tooltip = tooltip;
671
- this.icon = icon;
672
- this.elementId = elementId;
673
- this.settings = settings;
674
- this.type = type;
675
- this.styleClasses = styleClasses;
676
- this.hidden = hidden;
677
- this.length = length;
678
- this.readOnly = readOnly;
679
- this.required = required;
680
- this.errorMessages = errorMessages;
681
- disabled ? this.disable() : this.enable();
682
- }
683
- markAsDirty(opts) {
684
- super.markAsDirty(opts);
685
- this.updateValueAndValidity();
686
- }
687
- markAsPristine(opts) {
688
- super.markAsPristine(opts);
689
- this.updateValueAndValidity();
690
- }
691
- markAsTouched(opts) {
692
- super.markAsTouched(opts);
693
- this.updateValueAndValidity();
694
- }
695
- markAsUntouched(opts) {
696
- super.markAsUntouched(opts);
697
- this.updateValueAndValidity();
698
- }
699
- markAllAsTouched() {
700
- super.markAllAsTouched();
701
- this.updateValueAndValidity();
702
- }
703
- setReadOnly(status = true) {
704
- this.readOnly = status;
705
- }
706
- setDisabled(status = true) {
707
- status ? this.disable() : this.enable();
708
- }
709
- setHidden(status = true) {
710
- this.hidden = status;
711
- }
712
- }
713
- class SpecialFormGroup extends FormGroup {
714
- constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, disabled, }, controls) {
715
- super(controls, validators, asyncValidators);
716
- this.name = name;
717
- this.placeholder = placeholder;
718
- this.label = label;
719
- this.tooltip = tooltip;
720
- this.icon = icon;
721
- this.elementId = elementId;
722
- this.settings = settings;
723
- this.type = type;
724
- this.styleClasses = styleClasses;
725
- this.hidden = hidden;
726
- this.length = length;
727
- this.readOnly = readOnly;
728
- this.required = required;
729
- this.defaultValue = defaultValue;
730
- disabled ? this.disable() : this.enable();
731
- }
732
- getDirty() {
733
- this.markAsDirty();
734
- Object.values(this.controls).forEach((control) => {
735
- if (control instanceof SpecialFormControl) {
736
- control.markAsDirty();
737
- }
738
- else if (control instanceof SpecialFormGroup) {
739
- control.getDirty();
740
- }
741
- else if (control instanceof SpecialFormArray) {
742
- control.getDirty();
743
- }
744
- });
745
- }
746
- specialReset(value = {}) {
747
- const aux = {};
748
- Object.entries(this.controls).map(([key, control]) => {
749
- if (control instanceof SpecialFormControl) {
750
- aux[key] = control.defaultValue;
751
- }
752
- else if (control instanceof SpecialFormArray) {
753
- control.clear();
754
- }
755
- });
756
- this.reset({ ...aux, ...value });
757
- }
758
- setReadOnly(status = true) {
759
- Object.values(this.controls).map((value) => {
760
- if (value instanceof SpecialFormControl ||
761
- value instanceof SpecialFormArray ||
762
- value instanceof SpecialFormGroup) {
763
- value.setReadOnly(status);
764
- }
765
- });
766
- }
767
- setReadOnlyByFields(fieldsObject) {
768
- Object.entries(fieldsObject).map(([key, value]) => {
769
- const control = this.controls[key];
770
- if (control instanceof SpecialFormControl) {
771
- control.readOnly = value;
772
- }
773
- });
774
- }
775
- setHiddenByFields(fields) {
776
- Object.entries(fields).map(([key, value]) => {
777
- const control = this.controls[key];
778
- if (control instanceof SpecialFormControl) {
779
- control.hidden = value;
780
- }
781
- });
782
- }
783
- setDisabled(status) {
784
- Object.values(this.controls).map((value) => {
785
- if (value instanceof SpecialFormControl ||
786
- value instanceof SpecialFormArray ||
787
- value instanceof SpecialFormGroup) {
788
- value.setDisabled(status);
789
- }
790
- });
791
- }
792
- setDisabledByFields(fieldsObject) {
793
- Object.entries(fieldsObject).map((entries) => {
794
- if (this.controls[entries[0]] instanceof SpecialFormControl) {
795
- entries[1]
796
- ? this.controls[entries[0]].enable()
797
- : this.controls[entries[0]].disable();
798
- }
799
- });
800
- }
801
- /**
802
- * donde value es el objeto semilla y detailForm es un arreglo de form key para dar un marco al formarray
803
- */
804
- setFormValue(value) {
805
- this.specialReset(value);
806
- Object.entries(this.controls)
807
- .filter(([_key, control]) => control instanceof SpecialFormArray)
808
- .map(([key, control]) => {
809
- control.fillFormArray(value[key]);
810
- });
811
- }
812
- /**
813
- * Método que retorna
814
- */
815
- getIdPkey() {
816
- return Object.values(this.controls).find((control) => control instanceof SpecialFormControl && control.type === 'PRIMARY-KEY');
817
- }
818
- }
819
- class SpecialFormArray extends FormArray {
820
- constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, placeholder, readOnly, required, tooltip, errorMessages, disabled, }, formCreation, controls) {
821
- super(controls, validators, asyncValidators);
822
- this.formCreation = formCreation;
823
- this.form = this.formCreation();
824
- this.name = name;
825
- this.placeholder = placeholder;
826
- this.label = label;
827
- this.tooltip = tooltip;
828
- this.icon = icon;
829
- this.elementId = elementId;
830
- this.settings = settings;
831
- this.type = type;
832
- this.styleClasses = styleClasses;
833
- this.hidden = hidden;
834
- this.readOnly = readOnly;
835
- this.required = required;
836
- this.defaultValue = defaultValue;
837
- this.errorMessages = errorMessages;
838
- disabled ? this.disable() : this.enable();
839
- }
840
- fillFormArray(data) {
841
- this.form.reset();
842
- this.clear();
843
- data.forEach((item) => {
844
- const form = this.formCreation(item);
845
- this.push(form);
846
- });
847
- }
848
- addItem() {
849
- const form = this.formCreation(this.form.value);
850
- this.form.specialReset();
851
- this.push(form);
852
- this.markAsDirty();
853
- }
854
- specialPush(index) {
855
- const form = this.formCreation(this.form.value);
856
- if (!index)
857
- this.push(form);
858
- else
859
- this.controls[index].reset(this.form.value);
860
- }
861
- specialInsert(index = 0) {
862
- const form = this.formCreation(this.form.value);
863
- this.insert(index, form);
864
- }
865
- specialEdit(index, newValue) {
866
- this.controls[index].reset({ ...this.controls[index].value, ...newValue });
867
- this.markAsDirty();
868
- }
869
- /**
870
- * Vuelve todos los controles del formArray de lectura o de sololectura
871
- * @param status
872
- */
873
- setReadOnly(status) {
874
- this.readOnly = status;
875
- this.controls.forEach((control) => {
876
- if (control instanceof SpecialFormGroup) {
877
- control.setReadOnly(status);
878
- }
879
- });
880
- }
881
- /**
882
- * Vuelve todos los controles del formArray habilitados o deshabilitados
883
- * @param status
884
- */
885
- setDisabled(status) {
886
- status ? this.disable() : this.enable();
887
- this.controls.forEach((control) => {
888
- if (control instanceof SpecialFormGroup) {
889
- control.setDisabled(status);
890
- }
891
- });
892
- }
893
- /**
894
- * Permite editar un control especifico.
895
- * @param index
896
- */
897
- editControl(index) {
898
- this.form.reset(this.controls[index].value);
899
- }
900
- getDirty() {
901
- this.markAsDirty();
902
- this.form.getDirty();
903
- this.controls.forEach((item) => {
904
- item.getDirty();
905
- });
906
- }
907
- recursiveFillForm(form, data) {
908
- Object.entries(form.controls).map(([key, control]) => {
909
- if (control instanceof FormControl) {
910
- control.setValue(data[key]);
911
- }
912
- else if (control instanceof FormArray) {
913
- data[key].forEach(() => { });
914
- }
915
- else if (control instanceof FormGroup) {
916
- control.reset(data[key]);
917
- }
918
- });
919
- return form;
920
- }
678
+ class SpecialFormControl extends FormControl {
679
+ constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, errorMessages, disabled, }) {
680
+ super(defaultValue, validators, asyncValidators);
681
+ this.name = name;
682
+ this.placeholder = placeholder;
683
+ this.label = label;
684
+ this.tooltip = tooltip;
685
+ this.icon = icon;
686
+ this.elementId = elementId;
687
+ this.settings = settings;
688
+ this.type = type;
689
+ this.styleClasses = styleClasses;
690
+ this.hidden = hidden;
691
+ this.length = length;
692
+ this.readOnly = readOnly;
693
+ this.required = required;
694
+ this.errorMessages = errorMessages;
695
+ disabled ? this.disable() : this.enable();
696
+ }
697
+ setReadOnly(status = true) {
698
+ this.readOnly = status;
699
+ }
700
+ setDisabled(status = true) {
701
+ status ? this.disable() : this.enable();
702
+ }
703
+ setHidden(status = true) {
704
+ this.hidden = status;
705
+ }
706
+ }
707
+ class SpecialFormGroup extends FormGroup {
708
+ constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, length, placeholder, readOnly, required, tooltip, disabled, }, controls) {
709
+ super(controls, validators, asyncValidators);
710
+ this.name = name;
711
+ this.placeholder = placeholder;
712
+ this.label = label;
713
+ this.tooltip = tooltip;
714
+ this.icon = icon;
715
+ this.elementId = elementId;
716
+ this.settings = settings;
717
+ this.type = type;
718
+ this.styleClasses = styleClasses;
719
+ this.hidden = hidden;
720
+ this.length = length;
721
+ this.readOnly = readOnly;
722
+ this.required = required;
723
+ this.defaultValue = defaultValue;
724
+ disabled ? this.disable() : this.enable();
725
+ }
726
+ getDirty() {
727
+ this.markAsDirty();
728
+ Object.values(this.controls).forEach((control) => {
729
+ if (control instanceof SpecialFormControl) {
730
+ control.markAsDirty();
731
+ }
732
+ else if (control instanceof SpecialFormGroup) {
733
+ control.getDirty();
734
+ }
735
+ else if (control instanceof SpecialFormArray) {
736
+ control.getDirty();
737
+ }
738
+ });
739
+ }
740
+ specialReset(value = {}) {
741
+ const aux = {};
742
+ Object.entries(this.controls).map(([key, control]) => {
743
+ if (control instanceof SpecialFormControl) {
744
+ aux[key] = control.defaultValue;
745
+ }
746
+ else if (control instanceof SpecialFormArray) {
747
+ control.clear();
748
+ }
749
+ });
750
+ this.reset({ ...aux, ...value });
751
+ }
752
+ setReadOnly(status = true) {
753
+ Object.values(this.controls).map((value) => {
754
+ if (value instanceof SpecialFormControl ||
755
+ value instanceof SpecialFormArray ||
756
+ value instanceof SpecialFormGroup) {
757
+ value.setReadOnly(status);
758
+ }
759
+ });
760
+ }
761
+ setReadOnlyByFields(fieldsObject) {
762
+ Object.entries(fieldsObject).map(([key, value]) => {
763
+ const control = this.controls[key];
764
+ if (control instanceof SpecialFormControl) {
765
+ control.readOnly = value;
766
+ }
767
+ });
768
+ }
769
+ setHiddenByFields(fields) {
770
+ Object.entries(fields).map(([key, value]) => {
771
+ const control = this.controls[key];
772
+ if (control instanceof SpecialFormControl) {
773
+ control.hidden = value;
774
+ }
775
+ });
776
+ }
777
+ setDisabled(status) {
778
+ Object.values(this.controls).map((value) => {
779
+ if (value instanceof SpecialFormControl ||
780
+ value instanceof SpecialFormArray ||
781
+ value instanceof SpecialFormGroup) {
782
+ value.setDisabled(status);
783
+ }
784
+ });
785
+ }
786
+ setDisabledByFields(fieldsObject) {
787
+ Object.entries(fieldsObject).map((entries) => {
788
+ if (this.controls[entries[0]] instanceof SpecialFormControl) {
789
+ entries[1]
790
+ ? this.controls[entries[0]].enable()
791
+ : this.controls[entries[0]].disable();
792
+ }
793
+ });
794
+ }
795
+ /**
796
+ * donde value es el objeto semilla y detailForm es un arreglo de form key para dar un marco al formarray
797
+ */
798
+ setFormValue(value) {
799
+ this.specialReset(value);
800
+ Object.entries(this.controls)
801
+ .filter(([_key, control]) => control instanceof SpecialFormArray)
802
+ .map(([key, control]) => {
803
+ control.fillFormArray(value[key]);
804
+ });
805
+ }
806
+ /**
807
+ * Método que retorna
808
+ */
809
+ getIdPkey() {
810
+ return Object.values(this.controls).find((control) => control instanceof SpecialFormControl && control.type === 'PRIMARY-KEY');
811
+ }
812
+ }
813
+ class SpecialFormArray extends FormArray {
814
+ constructor({ name, settings, type, validators, asyncValidators, elementId, styleClasses, defaultValue, hidden, icon, label, placeholder, readOnly, required, tooltip, errorMessages, disabled, }, formCreation, controls) {
815
+ super(controls, validators, asyncValidators);
816
+ this.formCreation = formCreation;
817
+ this.form = this.formCreation();
818
+ this.name = name;
819
+ this.placeholder = placeholder;
820
+ this.label = label;
821
+ this.tooltip = tooltip;
822
+ this.icon = icon;
823
+ this.elementId = elementId;
824
+ this.settings = settings;
825
+ this.type = type;
826
+ this.styleClasses = styleClasses;
827
+ this.hidden = hidden;
828
+ this.readOnly = readOnly;
829
+ this.required = required;
830
+ this.defaultValue = defaultValue;
831
+ this.errorMessages = errorMessages;
832
+ disabled ? this.disable() : this.enable();
833
+ }
834
+ fillFormArray(data) {
835
+ this.form.reset();
836
+ this.clear();
837
+ data.forEach((item) => {
838
+ const form = this.formCreation(item);
839
+ this.push(form);
840
+ });
841
+ }
842
+ addItem() {
843
+ const form = this.formCreation(this.form.value);
844
+ this.form.specialReset();
845
+ this.push(form);
846
+ this.markAsDirty();
847
+ }
848
+ specialPush(index) {
849
+ const form = this.formCreation(this.form.value);
850
+ if (!index)
851
+ this.push(form);
852
+ else
853
+ this.controls[index].reset(this.form.value);
854
+ }
855
+ specialInsert(index = 0) {
856
+ const form = this.formCreation(this.form.value);
857
+ this.insert(index, form);
858
+ }
859
+ specialEdit(index, newValue) {
860
+ this.controls[index].reset({ ...this.controls[index].value, ...newValue });
861
+ this.markAsDirty();
862
+ }
863
+ /**
864
+ * Vuelve todos los controles del formArray de lectura o de sololectura
865
+ * @param status
866
+ */
867
+ setReadOnly(status) {
868
+ this.readOnly = status;
869
+ this.controls.forEach((control) => {
870
+ if (control instanceof SpecialFormGroup) {
871
+ control.setReadOnly(status);
872
+ }
873
+ });
874
+ }
875
+ /**
876
+ * Vuelve todos los controles del formArray habilitados o deshabilitados
877
+ * @param status
878
+ */
879
+ setDisabled(status) {
880
+ status ? this.disable() : this.enable();
881
+ this.controls.forEach((control) => {
882
+ if (control instanceof SpecialFormGroup) {
883
+ control.setDisabled(status);
884
+ }
885
+ });
886
+ }
887
+ /**
888
+ * Permite editar un control especifico.
889
+ * @param index
890
+ */
891
+ editControl(index) {
892
+ this.form.reset(this.controls[index].value);
893
+ }
894
+ getDirty() {
895
+ this.markAsDirty();
896
+ this.form.getDirty();
897
+ this.controls.forEach((item) => {
898
+ item.getDirty();
899
+ });
900
+ }
901
+ recursiveFillForm(form, data) {
902
+ Object.entries(form.controls).map(([key, control]) => {
903
+ if (control instanceof FormControl) {
904
+ control.setValue(data[key]);
905
+ }
906
+ else if (control instanceof FormArray) {
907
+ data[key].forEach(() => { });
908
+ }
909
+ else if (control instanceof FormGroup) {
910
+ control.reset(data[key]);
911
+ }
912
+ });
913
+ return form;
914
+ }
921
915
  }
922
916
 
923
- class SpecialFormBuilderService {
924
- constructor() {
925
- this.defectField = {
926
- asyncValidators: null,
927
- validators: null,
928
- defaultValue: null,
929
- elementId: '',
930
- hidden: false,
931
- icon: '',
932
- label: '',
933
- disabled: false,
934
- length: 0,
935
- placeholder: '',
936
- readOnly: false,
937
- required: false,
938
- styleClasses: '',
939
- errorMessages: {},
940
- tooltip: '',
941
- };
942
- this.inputDefectField = {
943
- ...this.defectField,
944
- settings: {},
945
- type: EControlTypes.input,
946
- name: '',
947
- };
948
- this.formDefectField = {
949
- ...this.defectField,
950
- settings: {
951
- formFields: {},
952
- },
953
- type: EControlTypes.form,
954
- name: '',
955
- };
956
- this.arrayDefectField = {
957
- ...this.defectField,
958
- settings: {
959
- formFields: {},
960
- },
961
- type: EControlTypes.array,
962
- name: '',
963
- };
964
- }
965
- control(field) {
966
- const formField = {
967
- ...this.inputDefectField,
968
- ...field,
969
- };
970
- const { control } = this.setFormControl(formField);
971
- return control;
972
- }
973
- group(fields, parentField = {}) {
974
- return this.formGenerator(this.fieldDataToArray(fields), parentField);
975
- }
976
- array() { }
977
- fieldDataToArray(fields) {
978
- return Object.entries(fields).map(([name, field]) => this.setDefectFieldOptions(name, field));
979
- }
980
- setDefectFieldOptions(name, field) {
981
- return {
982
- ...this.inputDefectField,
983
- ...field,
984
- name,
985
- };
986
- }
987
- formGenerator(fields, parentField = {}) {
988
- const formField = {
989
- ...this.formDefectField,
990
- ...parentField,
991
- };
992
- const structure = fields
993
- .map((field) => this.getControlAndNameByType(field))
994
- .reduce((prev, { name, control }) => ({
995
- ...prev,
996
- [name]: control,
997
- }), {});
998
- return new SpecialFormGroup(formField, structure);
999
- }
1000
- getControlAndNameByType(field) {
1001
- switch (field.type) {
1002
- case EControlTypes.array:
1003
- return this.setFormArray(field);
1004
- case EControlTypes.form:
1005
- return this.setFormGroup(field);
1006
- default:
1007
- return this.setFormControl(field);
1008
- }
1009
- }
1010
- setFormGroup(field) {
1011
- const control = this.formGenerator(this.fieldDataToArray(field.settings.formFields), field);
1012
- return { control, name: field.name };
1013
- }
1014
- setFormArray(field) {
1015
- const auxForm = (value = {}) => {
1016
- const auxForm = this.formGenerator(this.fieldDataToArray(field.settings.formFields), {});
1017
- auxForm.reset(value);
1018
- return auxForm;
1019
- };
1020
- if (field.required) {
1021
- field.validators = this.setValidatorsArray(field.validators, [
1022
- this.arrayLengthRequired,
1023
- ]);
1024
- }
1025
- return {
1026
- name: field.name,
1027
- control: new SpecialFormArray(field, auxForm, []),
1028
- };
1029
- }
1030
- setFormControl(field) {
1031
- const validators = [];
1032
- if (field.required)
1033
- validators.push(this.setRequiredValidator(field));
1034
- if (field.length)
1035
- validators.push(Validators.maxLength(field.length));
1036
- field.validators = this.setValidatorsArray(field.validators, validators);
1037
- return {
1038
- name: field.name,
1039
- control: new SpecialFormControl(field),
1040
- };
1041
- }
1042
- setRequiredValidator(field) {
1043
- if (field.type !== EControlTypes.autocomplete) {
1044
- return Validators.required;
1045
- }
1046
- return (control) => !!control.value && control.value instanceof Object
1047
- ? null
1048
- : { required: true };
1049
- }
1050
- setValidatorsArray(validators, newValidators) {
1051
- if (!validators) {
1052
- return newValidators;
1053
- }
1054
- return validators instanceof Array
1055
- ? [...validators, ...newValidators]
1056
- : [validators, ...newValidators];
1057
- }
1058
- arrayLengthRequired(control) {
1059
- if (control.value.length) {
1060
- return {};
1061
- }
1062
- return { noItems: 'NO_SELECTED_ITEM' };
1063
- }
1064
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1065
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormBuilderService, providedIn: 'root' }); }
1066
- }
1067
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: SpecialFormBuilderService, decorators: [{
1068
- type: Injectable,
1069
- args: [{
1070
- providedIn: 'root',
1071
- }]
1072
- }], ctorParameters: function () { return []; } });
917
+ class SpecialFormBuilderService {
918
+ constructor() {
919
+ this.defectField = {
920
+ asyncValidators: null,
921
+ validators: null,
922
+ defaultValue: null,
923
+ elementId: '',
924
+ hidden: false,
925
+ icon: '',
926
+ label: '',
927
+ disabled: false,
928
+ length: 0,
929
+ placeholder: '',
930
+ readOnly: false,
931
+ required: false,
932
+ styleClasses: '',
933
+ errorMessages: {},
934
+ tooltip: '',
935
+ };
936
+ this.inputDefectField = {
937
+ ...this.defectField,
938
+ settings: {},
939
+ type: EControlTypes.input,
940
+ name: '',
941
+ };
942
+ this.formDefectField = {
943
+ ...this.defectField,
944
+ settings: {
945
+ formFields: {},
946
+ },
947
+ type: EControlTypes.form,
948
+ name: '',
949
+ };
950
+ this.arrayDefectField = {
951
+ ...this.defectField,
952
+ settings: {
953
+ formFields: {},
954
+ },
955
+ type: EControlTypes.array,
956
+ name: '',
957
+ };
958
+ }
959
+ control(field) {
960
+ const formField = {
961
+ ...this.inputDefectField,
962
+ ...field,
963
+ };
964
+ const { control } = this.setFormControl(formField);
965
+ return control;
966
+ }
967
+ group(fields, parentField = {}) {
968
+ return this.formGenerator(this.fieldDataToArray(fields), parentField);
969
+ }
970
+ array() { }
971
+ fieldDataToArray(fields) {
972
+ return Object.entries(fields).map(([name, field]) => this.setDefectFieldOptions(name, field));
973
+ }
974
+ setDefectFieldOptions(name, field) {
975
+ return {
976
+ ...this.inputDefectField,
977
+ ...field,
978
+ name,
979
+ };
980
+ }
981
+ formGenerator(fields, parentField = {}) {
982
+ const formField = {
983
+ ...this.formDefectField,
984
+ ...parentField,
985
+ };
986
+ const structure = fields
987
+ .map((field) => this.getControlAndNameByType(field))
988
+ .reduce((prev, { name, control }) => ({
989
+ ...prev,
990
+ [name]: control,
991
+ }), {});
992
+ return new SpecialFormGroup(formField, structure);
993
+ }
994
+ getControlAndNameByType(field) {
995
+ switch (field.type) {
996
+ case EControlTypes.array:
997
+ return this.setFormArray(field);
998
+ case EControlTypes.form:
999
+ return this.setFormGroup(field);
1000
+ default:
1001
+ return this.setFormControl(field);
1002
+ }
1003
+ }
1004
+ setFormGroup(field) {
1005
+ const control = this.formGenerator(this.fieldDataToArray(field.settings.formFields), field);
1006
+ return { control, name: field.name };
1007
+ }
1008
+ setFormArray(field) {
1009
+ const auxForm = (value = {}) => {
1010
+ const auxForm = this.formGenerator(this.fieldDataToArray(field.settings.formFields), {});
1011
+ auxForm.reset(value);
1012
+ return auxForm;
1013
+ };
1014
+ if (field.required) {
1015
+ field.validators = this.setValidatorsArray(field.validators, [
1016
+ this.arrayLengthRequired,
1017
+ ]);
1018
+ }
1019
+ return {
1020
+ name: field.name,
1021
+ control: new SpecialFormArray(field, auxForm, []),
1022
+ };
1023
+ }
1024
+ setFormControl(field) {
1025
+ const validators = [];
1026
+ if (field.required)
1027
+ validators.push(this.setRequiredValidator(field));
1028
+ if (field.length)
1029
+ validators.push(Validators.maxLength(field.length));
1030
+ field.validators = this.setValidatorsArray(field.validators, validators);
1031
+ return {
1032
+ name: field.name,
1033
+ control: new SpecialFormControl(field),
1034
+ };
1035
+ }
1036
+ setRequiredValidator(field) {
1037
+ if (field.type !== EControlTypes.autocomplete) {
1038
+ return Validators.required;
1039
+ }
1040
+ return (control) => !!control.value && control.value instanceof Object
1041
+ ? null
1042
+ : { required: true };
1043
+ }
1044
+ setValidatorsArray(validators, newValidators) {
1045
+ if (!validators) {
1046
+ return newValidators;
1047
+ }
1048
+ return validators instanceof Array
1049
+ ? [...validators, ...newValidators]
1050
+ : [validators, ...newValidators];
1051
+ }
1052
+ arrayLengthRequired(control) {
1053
+ if (control.value.length) {
1054
+ return {};
1055
+ }
1056
+ return { noItems: 'NO_SELECTED_ITEM' };
1057
+ }
1058
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1059
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormBuilderService, providedIn: 'root' }); }
1060
+ }
1061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: SpecialFormBuilderService, decorators: [{
1062
+ type: Injectable,
1063
+ args: [{
1064
+ providedIn: 'root',
1065
+ }]
1066
+ }], ctorParameters: () => [] });
1073
1067
 
1074
- class ErrorStateMatcherService {
1075
- isErrorState(control) {
1076
- return control && control.invalid && control.dirty;
1077
- }
1078
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ErrorStateMatcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1079
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ErrorStateMatcherService }); }
1080
- }
1081
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.1", ngImport: i0, type: ErrorStateMatcherService, decorators: [{
1082
- type: Injectable
1068
+ class ErrorStateMatcherService {
1069
+ isErrorState(control) {
1070
+ return control && control.invalid && control.dirty;
1071
+ }
1072
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ErrorStateMatcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1073
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ErrorStateMatcherService }); }
1074
+ }
1075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ErrorStateMatcherService, decorators: [{
1076
+ type: Injectable
1083
1077
  }] });
1084
1078
 
1085
- class ISpecialControl {
1079
+ class ISpecialControl {
1086
1080
  }
1087
1081
 
1088
- const currencyInputMask = createMask({
1089
- alias: 'numeric',
1090
- groupSeparator: ',',
1091
- autoUnmask: true,
1092
- digits: 2,
1093
- digitsOptional: false,
1094
- prefix: '$ ',
1095
- placeholder: '0',
1082
+ const currencyInputMask = createMask({
1083
+ alias: 'numeric',
1084
+ groupSeparator: ',',
1085
+ autoUnmask: true,
1086
+ digits: 2,
1087
+ digitsOptional: false,
1088
+ prefix: '$ ',
1089
+ placeholder: '0',
1096
1090
  });
1097
1091
 
1098
1092
  const numberMask = (max = 1000) => createMask({ alias: 'numeric', min: 0, max });
1099
1093
 
1100
- /*
1101
- * Public API Surface of special-forms
1094
+ /*
1095
+ * Public API Surface of special-forms
1102
1096
  */
1103
1097
 
1104
- /**
1105
- * Generated bundle index. Do not edit.
1098
+ /**
1099
+ * Generated bundle index. Do not edit.
1106
1100
  */
1107
1101
 
1108
1102
  export { EControlTypes, ErrorMessagePipe, ErrorStateMatcherService, FormControlsListPipe, FormControlsRenderDirective, ISpecialControl, SpecialArrayComponent, SpecialAutocompleteComponent, SpecialCheckboxComponent, SpecialDatepickerComponent, SpecialDropdownComponent, SpecialFormArray, SpecialFormBuilderService, SpecialFormComponent, SpecialFormControl, SpecialFormGroup, SpecialFormModule, SpecialInputComponent, SpecialLabelComponent, SpecialMultipleAutocompleteComponent, SpecialRichtextComponent, SpecialTextAreaComponent, SpecialUploadComponent, TextByFunctionPipe, currencyInputMask, numberMask };