@3kles/kles-material-dynamicforms 14.10.0 → 14.11.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.
- package/esm2020/lib/controls/group.control.mjs +3 -1
- package/esm2020/lib/directive/dynamic-field.directive.mjs +7 -2
- package/esm2020/lib/fields/date-time.component.mjs +3 -3
- package/esm2020/lib/fields/date.component.mjs +3 -3
- package/esm2020/lib/fields/group.component.mjs +17 -3
- package/esm2020/lib/fields/input.clearable.component.mjs +7 -5
- package/esm2020/lib/fields/input.component.mjs +5 -5
- package/esm2020/lib/fields/select.component.mjs +3 -3
- package/esm2020/lib/fields/select.lazy-search.component.mjs +3 -3
- package/esm2020/lib/fields/select.search.component.mjs +3 -3
- package/esm2020/lib/fields/textarea.component.mjs +3 -3
- package/esm2020/lib/interfaces/field.config.interface.mjs +1 -1
- package/fesm2015/3kles-kles-material-dynamicforms.mjs +43 -22
- package/fesm2015/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/fesm2020/3kles-kles-material-dynamicforms.mjs +43 -22
- package/fesm2020/3kles-kles-material-dynamicforms.mjs.map +1 -1
- package/lib/interfaces/field.config.interface.d.ts +6 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { FormControl, Validators, FormControlDirective, FormControlName, NG_VALU
|
|
|
7
7
|
import { concat, of, Subject, Observable, BehaviorSubject, ReplaySubject } from 'rxjs';
|
|
8
8
|
import { take, catchError, map, takeUntil, startWith, switchMap, debounceTime } from 'rxjs/operators';
|
|
9
9
|
import * as i7$1 from '@angular/material/core';
|
|
10
|
-
import { MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule, MatOption, ErrorStateMatcher } from '@angular/material/core';
|
|
10
|
+
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule, MatOption, ErrorStateMatcher } from '@angular/material/core';
|
|
11
11
|
import * as i4 from '@angular/material/button';
|
|
12
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
13
13
|
import * as i4$1 from '@angular/material/icon';
|
|
@@ -222,6 +222,11 @@ class KlesDynamicFieldDirective {
|
|
|
222
222
|
}
|
|
223
223
|
const options = {
|
|
224
224
|
providers: this.field.dateOptions ? [
|
|
225
|
+
...(this.field.dateOptions.adapter ? [{
|
|
226
|
+
provide: DateAdapter,
|
|
227
|
+
useClass: this.field.dateOptions.adapter.class,
|
|
228
|
+
deps: this.field.dateOptions.adapter.deps || [],
|
|
229
|
+
}] : []),
|
|
225
230
|
{ provide: MAT_DATE_LOCALE, useValue: this.field.dateOptions.language },
|
|
226
231
|
{ provide: MAT_DATE_FORMATS, useValue: this.field.dateOptions.dateFormat },
|
|
227
232
|
] : [],
|
|
@@ -906,7 +911,7 @@ KlesFormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
906
911
|
<ng-container *ngIf="field.autocomplete; else notAutoComplete">
|
|
907
912
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
908
913
|
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
909
|
-
[matAutocomplete]="auto">
|
|
914
|
+
[matAutocomplete]="auto" [errorStateMatcher]="field.errorStateMatcher">
|
|
910
915
|
|
|
911
916
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn.bind(this)" [panelWidth]="this.field.panelWidth">
|
|
912
917
|
<ng-container *ngIf="!field.autocompleteComponent">
|
|
@@ -926,7 +931,7 @@ KlesFormInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
926
931
|
|
|
927
932
|
<ng-template #notAutoComplete>
|
|
928
933
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
929
|
-
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step">
|
|
934
|
+
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step" [errorStateMatcher]="field.errorStateMatcher">
|
|
930
935
|
</ng-template>
|
|
931
936
|
|
|
932
937
|
<mat-spinner matSuffix mode="indeterminate" *ngIf="isPending()" diameter="17"></mat-spinner>
|
|
@@ -954,7 +959,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
954
959
|
<ng-container *ngIf="field.autocomplete; else notAutoComplete">
|
|
955
960
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
956
961
|
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
957
|
-
[matAutocomplete]="auto">
|
|
962
|
+
[matAutocomplete]="auto" [errorStateMatcher]="field.errorStateMatcher">
|
|
958
963
|
|
|
959
964
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn.bind(this)" [panelWidth]="this.field.panelWidth">
|
|
960
965
|
<ng-container *ngIf="!field.autocompleteComponent">
|
|
@@ -974,7 +979,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
974
979
|
|
|
975
980
|
<ng-template #notAutoComplete>
|
|
976
981
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
977
|
-
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step">
|
|
982
|
+
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step" [errorStateMatcher]="field.errorStateMatcher">
|
|
978
983
|
</ng-template>
|
|
979
984
|
|
|
980
985
|
<mat-spinner matSuffix mode="indeterminate" *ngIf="isPending()" diameter="17"></mat-spinner>
|
|
@@ -1145,7 +1150,7 @@ KlesFormSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0",
|
|
|
1145
1150
|
KlesFormSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KlesFormSelectComponent, selector: "kles-form-select", viewQueries: [{ propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "options", predicate: MatOption, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
1146
1151
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
1147
1152
|
<mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id"
|
|
1148
|
-
(openedChange)="openChange($event)" [compareWith]="compareFn"
|
|
1153
|
+
(openedChange)="openChange($event)" [compareWith]="compareFn" [errorStateMatcher]="field.errorStateMatcher"
|
|
1149
1154
|
[ngClass]="field.ngClass" [placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
|
|
1150
1155
|
<mat-select-trigger *ngIf="field.triggerComponent">
|
|
1151
1156
|
<ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
|
|
@@ -1240,7 +1245,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1240
1245
|
args: [{ selector: 'kles-form-select', template: `
|
|
1241
1246
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
1242
1247
|
<mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id"
|
|
1243
|
-
(openedChange)="openChange($event)" [compareWith]="compareFn"
|
|
1248
|
+
(openedChange)="openChange($event)" [compareWith]="compareFn" [errorStateMatcher]="field.errorStateMatcher"
|
|
1244
1249
|
[ngClass]="field.ngClass" [placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
|
|
1245
1250
|
<mat-select-trigger *ngIf="field.triggerComponent">
|
|
1246
1251
|
<ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
|
|
@@ -1345,7 +1350,7 @@ KlesFormDateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ve
|
|
|
1345
1350
|
KlesFormDateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KlesFormDateComponent, selector: "kles-form-datepicker", usesInheritance: true, ngImport: i0, template: `
|
|
1346
1351
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
1347
1352
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate"
|
|
1348
|
-
[min]="field.min" [max]="field.max">
|
|
1353
|
+
[min]="field.min" [max]="field.max" [errorStateMatcher]="field.errorStateMatcher">
|
|
1349
1354
|
<div matSuffix>
|
|
1350
1355
|
<mat-datepicker-toggle [for]="picker"></mat-datepicker-toggle>
|
|
1351
1356
|
<ng-content></ng-content>
|
|
@@ -1366,7 +1371,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1366
1371
|
args: [{ selector: "kles-form-datepicker", template: `
|
|
1367
1372
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
1368
1373
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate"
|
|
1369
|
-
[min]="field.min" [max]="field.max">
|
|
1374
|
+
[min]="field.min" [max]="field.max" [errorStateMatcher]="field.errorStateMatcher">
|
|
1370
1375
|
<div matSuffix>
|
|
1371
1376
|
<mat-datepicker-toggle [for]="picker"></mat-datepicker-toggle>
|
|
1372
1377
|
<ng-content></ng-content>
|
|
@@ -2095,7 +2100,7 @@ KlesFormTextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
2095
2100
|
KlesFormTextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KlesFormTextareaComponent, selector: "kles-form-textarea", usesInheritance: true, ngImport: i0, template: `
|
|
2096
2101
|
<mat-form-field [formGroup]="group" [color]="field.color" class="form-element">
|
|
2097
2102
|
<textarea matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
|
|
2098
|
-
[formControlName]="field.name" cdkTextareaAutosize [placeholder]="field.placeholder | translate"
|
|
2103
|
+
[formControlName]="field.name" cdkTextareaAutosize [placeholder]="field.placeholder | translate" [errorStateMatcher]="field.errorStateMatcher"
|
|
2099
2104
|
[cdkAutosizeMinRows]="field.textareaAutoSize?.minRows" [cdkAutosizeMaxRows]="field.textareaAutoSize?.maxRows" [maxlength]="field.maxLength">
|
|
2100
2105
|
</textarea>
|
|
2101
2106
|
|
|
@@ -2116,7 +2121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2116
2121
|
args: [{ selector: 'kles-form-textarea', template: `
|
|
2117
2122
|
<mat-form-field [formGroup]="group" [color]="field.color" class="form-element">
|
|
2118
2123
|
<textarea matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
|
|
2119
|
-
[formControlName]="field.name" cdkTextareaAutosize [placeholder]="field.placeholder | translate"
|
|
2124
|
+
[formControlName]="field.name" cdkTextareaAutosize [placeholder]="field.placeholder | translate" [errorStateMatcher]="field.errorStateMatcher"
|
|
2120
2125
|
[cdkAutosizeMinRows]="field.textareaAutoSize?.minRows" [cdkAutosizeMaxRows]="field.textareaAutoSize?.maxRows" [maxlength]="field.maxLength">
|
|
2121
2126
|
</textarea>
|
|
2122
2127
|
|
|
@@ -2211,6 +2216,8 @@ class KlesFormGroup extends KlesFormControl {
|
|
|
2211
2216
|
subGroup.addControl(subfield.name, control);
|
|
2212
2217
|
});
|
|
2213
2218
|
}
|
|
2219
|
+
subGroup.addValidators(this.bindValidations(this.field.validations || []));
|
|
2220
|
+
subGroup.addAsyncValidators(this.bindAsyncValidations(this.field.asyncValidations || []));
|
|
2214
2221
|
if (this.field.disabled) {
|
|
2215
2222
|
subGroup.disable();
|
|
2216
2223
|
}
|
|
@@ -2236,8 +2243,14 @@ KlesFormGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
2236
2243
|
</ng-container>
|
|
2237
2244
|
</ng-container>
|
|
2238
2245
|
</div>
|
|
2246
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
2247
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
2248
|
+
</ng-container>
|
|
2249
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
2250
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
2251
|
+
</ng-container>
|
|
2239
2252
|
</div>
|
|
2240
|
-
`, isInline: true, styles: ["mat-form-field{width:100%}\n", ":host{display:flex;flex-direction:inherit}\n", ".group-container{display:flex;flex-direction:inherit;width:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: KlesDynamicFieldDirective, selector: "[klesDynamicField]", inputs: ["field", "group", "siblingFields"] }] });
|
|
2253
|
+
`, isInline: true, styles: ["mat-form-field{width:100%}\n", ":host{display:flex;flex-direction:inherit}\n", ".group-container{display:flex;flex-direction:inherit;width:inherit}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i4$2.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "directive", type: KlesDynamicFieldDirective, selector: "[klesDynamicField]", inputs: ["field", "group", "siblingFields"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
|
|
2241
2254
|
KlesFormGroupComponent = __decorate([
|
|
2242
2255
|
FieldMapper({ type: EnumType.group, factory: (field) => (new KlesFormGroup(field).create()) })
|
|
2243
2256
|
], KlesFormGroupComponent);
|
|
@@ -2251,6 +2264,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2251
2264
|
</ng-container>
|
|
2252
2265
|
</ng-container>
|
|
2253
2266
|
</div>
|
|
2267
|
+
<ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
|
|
2268
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
2269
|
+
</ng-container>
|
|
2270
|
+
<ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
|
|
2271
|
+
<mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
|
|
2272
|
+
</ng-container>
|
|
2254
2273
|
</div>
|
|
2255
2274
|
`, styles: ["mat-form-field{width:100%}\n", ":host{display:flex;flex-direction:inherit}\n", ".group-container{display:flex;flex-direction:inherit;width:inherit}\n"] }]
|
|
2256
2275
|
}] });
|
|
@@ -2267,7 +2286,7 @@ KlesFormInputClearableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
2267
2286
|
<ng-container *ngIf="field.autocomplete; else notAutoComplete">
|
|
2268
2287
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
2269
2288
|
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
2270
|
-
[matAutocomplete]="auto">
|
|
2289
|
+
[matAutocomplete]="auto" [errorStateMatcher]="field.errorStateMatcher">
|
|
2271
2290
|
|
|
2272
2291
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn.bind(this)" [panelWidth]="this.field.panelWidth">
|
|
2273
2292
|
<ng-container *ngIf="!field.autocompleteComponent">
|
|
@@ -2287,7 +2306,8 @@ KlesFormInputClearableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion:
|
|
|
2287
2306
|
|
|
2288
2307
|
<ng-template #notAutoComplete>
|
|
2289
2308
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
2290
|
-
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
2309
|
+
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
2310
|
+
[errorStateMatcher]="field.errorStateMatcher">
|
|
2291
2311
|
</ng-template>
|
|
2292
2312
|
<button *ngIf="!group.get(field.name).disabled" mat-button matSuffix mat-icon-button aria-label="Clear" type="button"
|
|
2293
2313
|
(click)="group.controls[field.name].reset();">
|
|
@@ -2312,7 +2332,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2312
2332
|
<ng-container *ngIf="field.autocomplete; else notAutoComplete">
|
|
2313
2333
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
2314
2334
|
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
2315
|
-
[matAutocomplete]="auto">
|
|
2335
|
+
[matAutocomplete]="auto" [errorStateMatcher]="field.errorStateMatcher">
|
|
2316
2336
|
|
|
2317
2337
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn.bind(this)" [panelWidth]="this.field.panelWidth">
|
|
2318
2338
|
<ng-container *ngIf="!field.autocompleteComponent">
|
|
@@ -2332,7 +2352,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2332
2352
|
|
|
2333
2353
|
<ng-template #notAutoComplete>
|
|
2334
2354
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [formControlName]="field.name" [placeholder]="field.placeholder | translate" [type]="field.inputType"
|
|
2335
|
-
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
2355
|
+
[maxLength]="field.maxLength" [min]="field.min" [max]="field.max" [step]="field.step"
|
|
2356
|
+
[errorStateMatcher]="field.errorStateMatcher">
|
|
2336
2357
|
</ng-template>
|
|
2337
2358
|
<button *ngIf="!group.get(field.name).disabled" mat-button matSuffix mat-icon-button aria-label="Clear" type="button"
|
|
2338
2359
|
(click)="group.controls[field.name].reset();">
|
|
@@ -2530,7 +2551,7 @@ KlesFormSelectSearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.
|
|
|
2530
2551
|
KlesFormSelectSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KlesFormSelectSearchComponent, selector: "kles-form-select-search", viewQueries: [{ propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "options", predicate: MatOption, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
2531
2552
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
2532
2553
|
<mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
|
|
2533
|
-
(openedChange)="openChange($event)" [compareWith]="compareFn"
|
|
2554
|
+
(openedChange)="openChange($event)" [compareWith]="compareFn" [errorStateMatcher]="field.errorStateMatcher"
|
|
2534
2555
|
[placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
|
|
2535
2556
|
<mat-select-trigger *ngIf="field.triggerComponent">
|
|
2536
2557
|
<ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
|
|
@@ -2636,7 +2657,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2636
2657
|
args: [{ selector: 'kles-form-select-search', template: `
|
|
2637
2658
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
2638
2659
|
<mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
|
|
2639
|
-
(openedChange)="openChange($event)" [compareWith]="compareFn"
|
|
2660
|
+
(openedChange)="openChange($event)" [compareWith]="compareFn" [errorStateMatcher]="field.errorStateMatcher"
|
|
2640
2661
|
[placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
|
|
2641
2662
|
<mat-select-trigger *ngIf="field.triggerComponent">
|
|
2642
2663
|
<ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
|
|
@@ -3207,7 +3228,7 @@ KlesFormSelectLazySearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion:
|
|
|
3207
3228
|
KlesFormSelectLazySearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KlesFormSelectLazySearchComponent, selector: "kles-form-select-lazy-search", usesInheritance: true, ngImport: i0, template: `
|
|
3208
3229
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
3209
3230
|
<mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
|
|
3210
|
-
(openedChange)="openChange($event)" [compareWith]="compareFn"
|
|
3231
|
+
(openedChange)="openChange($event)" [compareWith]="compareFn" [errorStateMatcher]="field.errorStateMatcher"
|
|
3211
3232
|
[placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
|
|
3212
3233
|
<mat-select-trigger *ngIf="field.triggerComponent">
|
|
3213
3234
|
<ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
|
|
@@ -3313,7 +3334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3313
3334
|
args: [{ selector: 'kles-form-select-lazy-search', template: `
|
|
3314
3335
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
3315
3336
|
<mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
|
|
3316
|
-
(openedChange)="openChange($event)" [compareWith]="compareFn"
|
|
3337
|
+
(openedChange)="openChange($event)" [compareWith]="compareFn" [errorStateMatcher]="field.errorStateMatcher"
|
|
3317
3338
|
[placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
|
|
3318
3339
|
<mat-select-trigger *ngIf="field.triggerComponent">
|
|
3319
3340
|
<ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
|
|
@@ -3426,7 +3447,7 @@ KlesFormDateTimeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
3426
3447
|
KlesFormDateTimeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: KlesFormDateTimeComponent, selector: "kles-form-datetimepicker", usesInheritance: true, ngImport: i0, template: `
|
|
3427
3448
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
3428
3449
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate"
|
|
3429
|
-
[min]="field.min" [max]="field.max">
|
|
3450
|
+
[min]="field.min" [max]="field.max" [errorStateMatcher]="field.errorStateMatcher">
|
|
3430
3451
|
<div matSuffix>
|
|
3431
3452
|
<mat-datepicker-toggle [for]="picker"></mat-datepicker-toggle>
|
|
3432
3453
|
<ng-content></ng-content>
|
|
@@ -3447,7 +3468,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
3447
3468
|
args: [{ selector: "kles-form-datetimepicker", template: `
|
|
3448
3469
|
<mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
|
|
3449
3470
|
<input matInput matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass" [matDatepicker]="picker" [formControlName]="field.name" [placeholder]="field.placeholder | translate"
|
|
3450
|
-
[min]="field.min" [max]="field.max">
|
|
3471
|
+
[min]="field.min" [max]="field.max" [errorStateMatcher]="field.errorStateMatcher">
|
|
3451
3472
|
<div matSuffix>
|
|
3452
3473
|
<mat-datepicker-toggle [for]="picker"></mat-datepicker-toggle>
|
|
3453
3474
|
<ng-content></ng-content>
|