@3kles/kles-material-dynamicforms 14.8.2 → 14.9.1

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.
@@ -5,7 +5,7 @@ import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
6
6
  import { FormControl, Validators, FormControlDirective, FormControlName, NG_VALUE_ACCESSOR, UntypedFormGroup, UntypedFormControl, FormArray, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
7
7
  import { concat, of, Subject, Observable, BehaviorSubject, ReplaySubject } from 'rxjs';
8
- import { take, catchError, map, takeUntil, startWith, switchMap } from 'rxjs/operators';
8
+ import { take, catchError, map, takeUntil, startWith, switchMap, distinctUntilChanged } from 'rxjs/operators';
9
9
  import * as i7$1 from '@angular/material/core';
10
10
  import { MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule, MatOption, ErrorStateMatcher } from '@angular/material/core';
11
11
  import * as i4 from '@angular/material/button';
@@ -42,7 +42,7 @@ import { CdkTableModule } from '@angular/cdk/table';
42
42
  import { MatTabsModule } from '@angular/material/tabs';
43
43
  import * as i9 from '@angular/material/progress-spinner';
44
44
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
45
- import * as i6$1 from '@angular/material/checkbox';
45
+ import * as i10 from '@angular/material/checkbox';
46
46
  import { MatCheckboxModule } from '@angular/material/checkbox';
47
47
  import { MatDialogModule } from '@angular/material/dialog';
48
48
  import * as i9$1 from '@angular/material/autocomplete';
@@ -52,11 +52,11 @@ import { MatSortModule } from '@angular/material/sort';
52
52
  import { MatExpansionModule } from '@angular/material/expansion';
53
53
  import { MatSnackBarModule } from '@angular/material/snack-bar';
54
54
  import { MatTreeModule } from '@angular/material/tree';
55
- import * as i6$2 from '@angular/material/slide-toggle';
55
+ import * as i6$1 from '@angular/material/slide-toggle';
56
56
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
57
57
  import * as i7$2 from 'ngx-color-picker';
58
58
  import { ColorPickerModule } from 'ngx-color-picker';
59
- import * as i10 from '@angular/cdk/scrolling';
59
+ import * as i11 from '@angular/cdk/scrolling';
60
60
  import { ScrollingModule, CdkScrollable, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
61
61
  import * as i4$5 from '@angular/material/button-toggle';
62
62
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
@@ -840,6 +840,9 @@ let KlesFormInputComponent = class KlesFormInputComponent extends KlesFieldAbstr
840
840
  if (this.field.options instanceof Observable) {
841
841
  this.options$ = this.field.options;
842
842
  }
843
+ else if (this.field.options instanceof Function) {
844
+ this.options$ = this.field.options();
845
+ }
843
846
  else {
844
847
  this.options$ = of(this.field.options);
845
848
  }
@@ -1061,13 +1064,17 @@ let KlesFormSelectComponent = class KlesFormSelectComponent extends KlesFieldAbs
1061
1064
  this.openChange$
1062
1065
  .pipe(takeUntil(this._onDestroy), switchMap((isOpen) => {
1063
1066
  if (isOpen) {
1064
- if (!(this.field.options instanceof Observable)) {
1065
- return of(this.field.options);
1066
- }
1067
- else {
1067
+ if (this.field.options instanceof Observable) {
1068
1068
  this.isLoading = true;
1069
1069
  return this.field.options.pipe(take(1));
1070
1070
  }
1071
+ else if (this.field.options instanceof Function) {
1072
+ this.isLoading = true;
1073
+ return this.field.options();
1074
+ }
1075
+ else {
1076
+ return of(this.field.options);
1077
+ }
1071
1078
  }
1072
1079
  else {
1073
1080
  return of(this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null
@@ -1082,11 +1089,14 @@ let KlesFormSelectComponent = class KlesFormSelectComponent extends KlesFieldAbs
1082
1089
  });
1083
1090
  }
1084
1091
  else {
1085
- if (!(this.field.options instanceof Observable)) {
1086
- this.options$ = of(this.field.options);
1092
+ if (this.field.options instanceof Observable) {
1093
+ this.options$ = this.field.options;
1094
+ }
1095
+ else if (this.field.options instanceof Function) {
1096
+ this.options$ = this.field.options();
1087
1097
  }
1088
1098
  else {
1089
- this.options$ = this.field.options;
1099
+ this.options$ = of(this.field.options);
1090
1100
  }
1091
1101
  }
1092
1102
  }
@@ -1212,7 +1222,7 @@ KlesFormSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
1212
1222
  <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
1213
1223
  </ng-container>
1214
1224
  </mat-form-field>
1215
- `, isInline: true, styles: ["mat-form-field{width:100%}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { 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: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i10.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i10.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i10.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] });
1225
+ `, isInline: true, styles: ["mat-form-field{width:100%}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { 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: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: i11.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i11.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i11.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] });
1216
1226
  KlesFormSelectComponent = __decorate([
1217
1227
  FieldMapper({ type: EnumType.select })
1218
1228
  ], KlesFormSelectComponent);
@@ -1421,7 +1431,7 @@ KlesFormCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
1421
1431
  <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message}}</mat-error>
1422
1432
  </ng-container>
1423
1433
  </div>
1424
- `, isInline: true, 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
1434
+ `, isInline: true, 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
1425
1435
  KlesFormCheckboxComponent = __decorate([
1426
1436
  FieldMapper({ type: EnumType.checkbox })
1427
1437
  ], KlesFormCheckboxComponent);
@@ -2364,20 +2374,7 @@ class KlesFormSelectSearchComponent extends KlesFieldAbstract {
2364
2374
  }
2365
2375
  this.openChange$
2366
2376
  .pipe(takeUntil(this._onDestroy), switchMap((isOpen) => {
2367
- if (isOpen) {
2368
- if (!(this.field.options instanceof Observable)) {
2369
- return of(this.field.options);
2370
- }
2371
- else {
2372
- this.isLoading = true;
2373
- return this.field.options.pipe(take(1));
2374
- }
2375
- }
2376
- else {
2377
- return of(this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null
2378
- ? (Array.isArray(this.group.controls[this.field.name].value) ?
2379
- this.group.controls[this.field.name].value : [this.group.controls[this.field.name].value]) : []);
2380
- }
2377
+ return this.onOpenChange(isOpen);
2381
2378
  }))
2382
2379
  .subscribe((options) => {
2383
2380
  this.options$.next(options);
@@ -2386,41 +2383,22 @@ class KlesFormSelectSearchComponent extends KlesFieldAbstract {
2386
2383
  });
2387
2384
  }
2388
2385
  else {
2389
- if (!(this.field.options instanceof Observable)) {
2390
- this.options$ = of(this.field.options);
2391
- }
2392
- else {
2386
+ if (this.field.options instanceof Observable) {
2393
2387
  this.options$ = this.field.options;
2394
2388
  }
2395
- }
2396
- this.searchControl.valueChanges.pipe(startWith(this.searchControl.value), takeUntil(this._onDestroy), switchMap(value => {
2397
- if (value) {
2398
- const search = value.toLowerCase();
2399
- return this.options$.pipe(map(options => {
2400
- return options
2401
- .filter(option => {
2402
- if (this.field.searchKeys && this.field.searchKeys.length) {
2403
- return this.field.searchKeys.some(searchKey => {
2404
- if (option[searchKey]) {
2405
- return option[searchKey].toString().toLowerCase().indexOf(search) > -1;
2406
- }
2407
- return false;
2408
- }) || (this.field.property ?
2409
- option[this.field.property].toString().toLowerCase().indexOf(search) > -1 : false);
2410
- }
2411
- else {
2412
- if (this.field.property) {
2413
- return option[this.field.property].toString().toLowerCase().indexOf(search) > -1;
2414
- }
2415
- }
2416
- return option.toString().toLowerCase().indexOf(search) > -1;
2417
- });
2418
- }));
2389
+ else if (this.field.options instanceof Function) {
2390
+ this.options$ = this.field.options();
2419
2391
  }
2420
2392
  else {
2421
- return this.options$;
2393
+ this.options$ = of(this.field.options);
2422
2394
  }
2423
- })).subscribe(this.optionsFiltered$);
2395
+ }
2396
+ this.searchControl.valueChanges.pipe(takeUntil(this._onDestroy), startWith(this.searchControl.value), distinctUntilChanged(), switchMap(value => {
2397
+ return concat(of({ loading: true, options: [] }), this.onSearchChange(value).pipe(map((options) => ({ loading: false, options }))));
2398
+ })).subscribe(({ loading, options }) => {
2399
+ this.isLoading = loading;
2400
+ this.optionsFiltered$.next(options);
2401
+ });
2424
2402
  if (this.field.multiple) {
2425
2403
  this.group.controls[this.field.name]
2426
2404
  .valueChanges.pipe(takeUntil(this._onDestroy), startWith(this.group.controls[this.field.name].value), map((selected) => (this.field.property ? selected?.map(s => s[this.field.property]) : selected)), switchMap(selected => {
@@ -2456,6 +2434,54 @@ class KlesFormSelectSearchComponent extends KlesFieldAbstract {
2456
2434
  this.group.controls[this.field.name].patchValue([]);
2457
2435
  }
2458
2436
  }
2437
+ onOpenChange(isOpen) {
2438
+ if (isOpen) {
2439
+ if (this.field.options instanceof Observable) {
2440
+ this.isLoading = true;
2441
+ return this.field.options.pipe(take(1));
2442
+ }
2443
+ else if (this.field.options instanceof Function) {
2444
+ this.isLoading = true;
2445
+ return this.field.options();
2446
+ }
2447
+ else {
2448
+ return of(this.field.options);
2449
+ }
2450
+ }
2451
+ else {
2452
+ return of(this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null
2453
+ ? (Array.isArray(this.group.controls[this.field.name].value) ?
2454
+ this.group.controls[this.field.name].value : [this.group.controls[this.field.name].value]) : []);
2455
+ }
2456
+ }
2457
+ onSearchChange(value) {
2458
+ if (value) {
2459
+ const search = value.toLowerCase();
2460
+ return this.options$.pipe(map(options => {
2461
+ return options
2462
+ .filter(option => {
2463
+ if (this.field.searchKeys && this.field.searchKeys.length) {
2464
+ return this.field.searchKeys.some(searchKey => {
2465
+ if (option[searchKey]) {
2466
+ return option[searchKey].toString().toLowerCase().indexOf(search) > -1;
2467
+ }
2468
+ return false;
2469
+ }) || (this.field.property ?
2470
+ option[this.field.property].toString().toLowerCase().indexOf(search) > -1 : false);
2471
+ }
2472
+ else {
2473
+ if (this.field.property) {
2474
+ return option[this.field.property].toString().toLowerCase().indexOf(search) > -1;
2475
+ }
2476
+ }
2477
+ return option.toString().toLowerCase().indexOf(search) > -1;
2478
+ });
2479
+ }));
2480
+ }
2481
+ else {
2482
+ return this.options$;
2483
+ }
2484
+ }
2459
2485
  openChange($event) {
2460
2486
  if (this.field.lazy) {
2461
2487
  this.openChange$.next($event);
@@ -2572,7 +2598,7 @@ KlesFormSelectSearchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "1
2572
2598
  <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
2573
2599
  </ng-container>
2574
2600
  </mat-form-field>
2575
- `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".selectAll{padding:10px 16px}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { 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: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i6$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i10.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i10.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i10.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: i12.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] });
2601
+ `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".selectAll{padding:10px 16px}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { 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: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i11.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i11.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i11.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: i12.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] });
2576
2602
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KlesFormSelectSearchComponent, decorators: [{
2577
2603
  type: Component,
2578
2604
  args: [{ selector: 'kles-form-select-search', template: `
@@ -2766,7 +2792,7 @@ KlesFormSlideToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
2766
2792
  <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message}}</mat-error>
2767
2793
  </ng-container>
2768
2794
  </div>
2769
- `, isInline: true, 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2795
+ `, isInline: true, 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { 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.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i6$1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }] });
2770
2796
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KlesFormSlideToggleComponent, decorators: [{
2771
2797
  type: Component,
2772
2798
  args: [{ selector: 'kles-form-slide-toggle', template: `
@@ -2785,11 +2811,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2785
2811
  class KlesFormSelectionListComponent extends KlesFieldAbstract {
2786
2812
  ngOnInit() {
2787
2813
  super.ngOnInit();
2788
- if (!(this.field.options instanceof Observable)) {
2789
- this.options$ = of(this.field.options);
2814
+ if (this.field.options instanceof Observable) {
2815
+ this.options$ = this.field.options;
2816
+ }
2817
+ else if (this.field.options instanceof Function) {
2818
+ this.options$ = this.field.options();
2790
2819
  }
2791
2820
  else {
2792
- this.options$ = this.field.options;
2821
+ this.options$ = of(this.field.options);
2793
2822
  }
2794
2823
  }
2795
2824
  ngOnDestroy() {
@@ -2867,11 +2896,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
2867
2896
  class KlesFormButtonToogleGroupComponent extends KlesFieldAbstract {
2868
2897
  ngOnInit() {
2869
2898
  super.ngOnInit();
2870
- if (!(this.field.options instanceof Observable)) {
2871
- this.options$ = of(this.field.options);
2899
+ if (this.field.options instanceof Observable) {
2900
+ this.options$ = this.field.options;
2901
+ }
2902
+ else if (this.field.options instanceof Function) {
2903
+ this.options$ = this.field.options();
2872
2904
  }
2873
2905
  else {
2874
- this.options$ = this.field.options;
2906
+ this.options$ = of(this.field.options);
2875
2907
  }
2876
2908
  }
2877
2909
  ngOnDestroy() {
@@ -3076,6 +3108,255 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
3076
3108
  `, styles: ["mat-form-field{width:100%}\n"] }]
3077
3109
  }] });
3078
3110
 
3111
+ class KlesFormSelectLazySearchComponent extends KlesFormSelectSearchComponent {
3112
+ constructor(viewRef, ref) {
3113
+ super(viewRef, ref);
3114
+ this.viewRef = viewRef;
3115
+ this.ref = ref;
3116
+ }
3117
+ ngOnInit() {
3118
+ this.field.lazy = true;
3119
+ super.ngOnInit();
3120
+ this.openChange$.pipe(takeUntil(this._onDestroy))
3121
+ .subscribe((open) => {
3122
+ if (open) {
3123
+ this.searchControl.reset(null);
3124
+ }
3125
+ else {
3126
+ this.searchControl.reset(null, { emitEvent: false });
3127
+ }
3128
+ });
3129
+ }
3130
+ ngOnDestroy() {
3131
+ super.ngOnDestroy();
3132
+ }
3133
+ onSearchChange(value) {
3134
+ if (this.field.options instanceof Function) {
3135
+ if (value) {
3136
+ return this.field.options(value).pipe(take(1));
3137
+ }
3138
+ else {
3139
+ return this.field.options().pipe(take(1));
3140
+ }
3141
+ }
3142
+ else {
3143
+ return super.onSearchChange(value);
3144
+ }
3145
+ }
3146
+ }
3147
+ KlesFormSelectLazySearchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KlesFormSelectLazySearchComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3148
+ 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: `
3149
+ <mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
3150
+ <mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
3151
+ (openedChange)="openChange($event)" [compareWith]="compareFn"
3152
+ [placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
3153
+ <mat-select-trigger *ngIf="field.triggerComponent">
3154
+ <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
3155
+ </mat-select-trigger>
3156
+
3157
+ <ng-container *ngIf="field.virtualScroll">
3158
+ <mat-option>
3159
+ <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false"
3160
+ placeholderLabel="" noEntriesFoundLabel =""></ngx-mat-select-search>
3161
+ </mat-option>
3162
+
3163
+ <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]=4*48>
3164
+ <ng-container *ngIf="!isLoading; else emptyOption">
3165
+ <mat-checkbox *ngIf="field.multiple" class="selectAll" [formControl]="selectAllControl"
3166
+ (change)="toggleAllSelection($event)">
3167
+ {{'selectAll' | translate}}
3168
+ </mat-checkbox>
3169
+ <ng-container *ngIf="!field.autocompleteComponent">
3170
+ <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>
3171
+
3172
+ <ng-container *ngIf="field.multiple">
3173
+ <mat-option *ngFor="let item of group.controls[field.name].value | slice:0:30" [value]="item"
3174
+ style="display:none">
3175
+ {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}
3176
+ </mat-option>
3177
+ </ng-container>
3178
+
3179
+ <ng-container *ngIf="!field.multiple && group.controls[field.name].value">
3180
+ <mat-option *ngFor="let item of [group?.controls[field.name]?.value]" [value]="item" style="display:none">
3181
+ {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}
3182
+ </mat-option>
3183
+ </ng-container>
3184
+ </ng-container>
3185
+
3186
+ <ng-container *ngIf="field.autocompleteComponent">
3187
+ <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3188
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3189
+ </mat-option>
3190
+
3191
+ <ng-container *ngIf="field.multiple">
3192
+ <mat-option *ngFor="let item of group.controls[field.name].value | slice:0:30" [value]="item"
3193
+ style="display:none">
3194
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3195
+ </mat-option>
3196
+ </ng-container>
3197
+
3198
+ <ng-container *ngIf="!field.multiple && group.controls[field.name].value">
3199
+ <mat-option *ngFor="let item of [group?.controls[field.name]?.value]" [value]="item" style="display:none">
3200
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3201
+ </mat-option>
3202
+ </ng-container>
3203
+ </ng-container>
3204
+ </ng-container>
3205
+ <ng-template #emptyOption>
3206
+ <mat-option class="hide-checkbox" disabled><div fxLayout="row" fxLayoutAlign="space-between center">{{'loading' | translate}}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div></mat-option>
3207
+ </ng-template>
3208
+ </cdk-virtual-scroll-viewport>
3209
+
3210
+ </ng-container>
3211
+
3212
+ <ng-container *ngIf="!field.virtualScroll">
3213
+ <mat-option>
3214
+ <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false"
3215
+ placeholderLabel="" noEntriesFoundLabel =""></ngx-mat-select-search>
3216
+ </mat-option>
3217
+
3218
+ <ng-container *ngIf="!isLoading; else emptyOption">
3219
+ <mat-checkbox *ngIf="field.multiple" class="selectAll" [formControl]="selectAllControl"
3220
+ (change)="toggleAllSelection($event)">
3221
+ {{'selectAll' | translate}}
3222
+ </mat-checkbox>
3223
+ <ng-container *ngIf="!field.autocompleteComponent">
3224
+ <mat-option *ngFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>
3225
+ </ng-container>
3226
+
3227
+ <ng-container *ngIf="field.autocompleteComponent">
3228
+ <mat-option *ngFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3229
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3230
+ </mat-option>
3231
+ </ng-container>
3232
+ </ng-container>
3233
+
3234
+ <ng-template #emptyOption>
3235
+ <mat-option class="hide-checkbox" disabled><div fxLayout="row" fxLayoutAlign="space-between center">{{'loading' | translate}}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div></mat-option>
3236
+ </ng-template>
3237
+ </ng-container>
3238
+ </mat-select>
3239
+
3240
+ <div matSuffix>
3241
+ <ng-content></ng-content>
3242
+ </div>
3243
+
3244
+ <ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
3245
+ <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
3246
+ </ng-container>
3247
+ <ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
3248
+ <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
3249
+ </ng-container>
3250
+ </mat-form-field>
3251
+ `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".selectAll{padding:10px 16px}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { 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: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i6.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i7$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i9.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i10.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i11.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i11.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i11.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: i12.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "noEntriesFoundLabel", "indexAndLengthScreenReaderText", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toogleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] });
3252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KlesFormSelectLazySearchComponent, decorators: [{
3253
+ type: Component,
3254
+ args: [{ selector: 'kles-form-select-lazy-search', template: `
3255
+ <mat-form-field class="margin-top" [color]="field.color" [formGroup]="group">
3256
+ <mat-select matTooltip="{{field.tooltip}}" [attr.id]="field.id" [ngClass]="field.ngClass"
3257
+ (openedChange)="openChange($event)" [compareWith]="compareFn"
3258
+ [placeholder]="field.placeholder | translate" [formControlName]="field.name" [multiple]="field.multiple">
3259
+ <mat-select-trigger *ngIf="field.triggerComponent">
3260
+ <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
3261
+ </mat-select-trigger>
3262
+
3263
+ <ng-container *ngIf="field.virtualScroll">
3264
+ <mat-option>
3265
+ <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false"
3266
+ placeholderLabel="" noEntriesFoundLabel =""></ngx-mat-select-search>
3267
+ </mat-option>
3268
+
3269
+ <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]=4*48>
3270
+ <ng-container *ngIf="!isLoading; else emptyOption">
3271
+ <mat-checkbox *ngIf="field.multiple" class="selectAll" [formControl]="selectAllControl"
3272
+ (change)="toggleAllSelection($event)">
3273
+ {{'selectAll' | translate}}
3274
+ </mat-checkbox>
3275
+ <ng-container *ngIf="!field.autocompleteComponent">
3276
+ <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>
3277
+
3278
+ <ng-container *ngIf="field.multiple">
3279
+ <mat-option *ngFor="let item of group.controls[field.name].value | slice:0:30" [value]="item"
3280
+ style="display:none">
3281
+ {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}
3282
+ </mat-option>
3283
+ </ng-container>
3284
+
3285
+ <ng-container *ngIf="!field.multiple && group.controls[field.name].value">
3286
+ <mat-option *ngFor="let item of [group?.controls[field.name]?.value]" [value]="item" style="display:none">
3287
+ {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}
3288
+ </mat-option>
3289
+ </ng-container>
3290
+ </ng-container>
3291
+
3292
+ <ng-container *ngIf="field.autocompleteComponent">
3293
+ <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3294
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3295
+ </mat-option>
3296
+
3297
+ <ng-container *ngIf="field.multiple">
3298
+ <mat-option *ngFor="let item of group.controls[field.name].value | slice:0:30" [value]="item"
3299
+ style="display:none">
3300
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3301
+ </mat-option>
3302
+ </ng-container>
3303
+
3304
+ <ng-container *ngIf="!field.multiple && group.controls[field.name].value">
3305
+ <mat-option *ngFor="let item of [group?.controls[field.name]?.value]" [value]="item" style="display:none">
3306
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3307
+ </mat-option>
3308
+ </ng-container>
3309
+ </ng-container>
3310
+ </ng-container>
3311
+ <ng-template #emptyOption>
3312
+ <mat-option class="hide-checkbox" disabled><div fxLayout="row" fxLayoutAlign="space-between center">{{'loading' | translate}}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div></mat-option>
3313
+ </ng-template>
3314
+ </cdk-virtual-scroll-viewport>
3315
+
3316
+ </ng-container>
3317
+
3318
+ <ng-container *ngIf="!field.virtualScroll">
3319
+ <mat-option>
3320
+ <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false"
3321
+ placeholderLabel="" noEntriesFoundLabel =""></ngx-mat-select-search>
3322
+ </mat-option>
3323
+
3324
+ <ng-container *ngIf="!isLoading; else emptyOption">
3325
+ <mat-checkbox *ngIf="field.multiple" class="selectAll" [formControl]="selectAllControl"
3326
+ (change)="toggleAllSelection($event)">
3327
+ {{'selectAll' | translate}}
3328
+ </mat-checkbox>
3329
+ <ng-container *ngIf="!field.autocompleteComponent">
3330
+ <mat-option *ngFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>
3331
+ </ng-container>
3332
+
3333
+ <ng-container *ngIf="field.autocompleteComponent">
3334
+ <mat-option *ngFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3335
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3336
+ </mat-option>
3337
+ </ng-container>
3338
+ </ng-container>
3339
+
3340
+ <ng-template #emptyOption>
3341
+ <mat-option class="hide-checkbox" disabled><div fxLayout="row" fxLayoutAlign="space-between center">{{'loading' | translate}}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div></mat-option>
3342
+ </ng-template>
3343
+ </ng-container>
3344
+ </mat-select>
3345
+
3346
+ <div matSuffix>
3347
+ <ng-content></ng-content>
3348
+ </div>
3349
+
3350
+ <ng-container *ngFor="let validation of field.validations;" ngProjectAs="mat-error">
3351
+ <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
3352
+ </ng-container>
3353
+ <ng-container *ngFor="let validation of field.asyncValidations;" ngProjectAs="mat-error">
3354
+ <mat-error *ngIf="group.get(field.name).hasError(validation.name)">{{validation.message | translate}}</mat-error>
3355
+ </ng-container>
3356
+ </mat-form-field>
3357
+ `, styles: ["mat-form-field{width:100%}\n", ".selectAll{padding:10px 16px}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"] }]
3358
+ }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }]; } });
3359
+
3079
3360
  const components = [
3080
3361
  KlesDynamicFormComponent,
3081
3362
  KlesFormLabelComponent,
@@ -3108,7 +3389,8 @@ const components = [
3108
3389
  KlesFormButtonToogleGroupComponent,
3109
3390
  KlesFormArrayComponent,
3110
3391
  KlesFormRangeComponent,
3111
- KlesFormClearComponent
3392
+ KlesFormClearComponent,
3393
+ KlesFormSelectLazySearchComponent
3112
3394
  ];
3113
3395
  const directives = [KlesDynamicFieldDirective, KlesComponentDirective];
3114
3396
  const pipes = [KlesTransformPipe, ArrayFormatPipe];
@@ -3151,7 +3433,8 @@ KlesMaterialDynamicformsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "1
3151
3433
  KlesFormButtonToogleGroupComponent,
3152
3434
  KlesFormArrayComponent,
3153
3435
  KlesFormRangeComponent,
3154
- KlesFormClearComponent, KlesDynamicFieldDirective, KlesComponentDirective, KlesTransformPipe, ArrayFormatPipe], imports: [CommonModule,
3436
+ KlesFormClearComponent,
3437
+ KlesFormSelectLazySearchComponent, KlesDynamicFieldDirective, KlesComponentDirective, KlesTransformPipe, ArrayFormatPipe], imports: [CommonModule,
3155
3438
  ReactiveFormsModule,
3156
3439
  TranslateModule,
3157
3440
  FlexLayoutModule,
@@ -3189,7 +3472,8 @@ KlesMaterialDynamicformsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "1
3189
3472
  KlesFormButtonToogleGroupComponent,
3190
3473
  KlesFormArrayComponent,
3191
3474
  KlesFormRangeComponent,
3192
- KlesFormClearComponent, KlesTransformPipe, ArrayFormatPipe, KlesDynamicFieldDirective, KlesComponentDirective, ColorPickerModule] });
3475
+ KlesFormClearComponent,
3476
+ KlesFormSelectLazySearchComponent, KlesTransformPipe, ArrayFormatPipe, KlesDynamicFieldDirective, KlesComponentDirective, ColorPickerModule] });
3193
3477
  KlesMaterialDynamicformsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: KlesMaterialDynamicformsModule, providers: [
3194
3478
  { provide: ErrorStateMatcher, useClass: KlesFormErrorStateMatcher },
3195
3479
  pipes
@@ -3264,5 +3548,5 @@ function autocompleteStringValidator(validOptions, optional) {
3264
3548
  * Generated bundle index. Do not edit.
3265
3549
  */
3266
3550
 
3267
- export { ArrayFormatPipe, EnumType, FieldMapper, KlesButtonCheckerComponent, KlesButtonComponent, KlesButtonFileComponent, KlesComponentDirective, KlesDynamicFieldDirective, KlesDynamicFormComponent, KlesFieldAbstract, KlesFormArray, KlesFormArrayComponent, KlesFormBadgeComponent, KlesFormButtonCheckerComponent, KlesFormButtonComponent, KlesFormButtonFileComponent, KlesFormButtonToogleGroupComponent, KlesFormCheckboxComponent, KlesFormChipComponent, KlesFormClearComponent, KlesFormColorComponent, KlesFormControl, KlesFormDateComponent, KlesFormErrorStateMatcher, KlesFormGroup, KlesFormGroupComponent, KlesFormIconComponent, KlesFormInputClearableComponent, KlesFormInputComponent, KlesFormLabelComponent, KlesFormLineBreakComponent, KlesFormLinkComponent, KlesFormListFieldComponent, KlesFormRadioComponent, KlesFormRange, KlesFormRangeComponent, KlesFormSelectComponent, KlesFormSelectSearchComponent, KlesFormSelectionListComponent, KlesFormSlideToggleComponent, KlesFormSubmitButtonComponent, KlesFormTextComponent, KlesFormTextareaComponent, KlesMaterialDynamicformsModule, KlesTransformPipe, autocompleteObjectValidator, autocompleteStringValidator, componentMapper, klesFieldControlFactory };
3551
+ export { ArrayFormatPipe, EnumType, FieldMapper, KlesButtonCheckerComponent, KlesButtonComponent, KlesButtonFileComponent, KlesComponentDirective, KlesDynamicFieldDirective, KlesDynamicFormComponent, KlesFieldAbstract, KlesFormArray, KlesFormArrayComponent, KlesFormBadgeComponent, KlesFormButtonCheckerComponent, KlesFormButtonComponent, KlesFormButtonFileComponent, KlesFormButtonToogleGroupComponent, KlesFormCheckboxComponent, KlesFormChipComponent, KlesFormClearComponent, KlesFormColorComponent, KlesFormControl, KlesFormDateComponent, KlesFormErrorStateMatcher, KlesFormGroup, KlesFormGroupComponent, KlesFormIconComponent, KlesFormInputClearableComponent, KlesFormInputComponent, KlesFormLabelComponent, KlesFormLineBreakComponent, KlesFormLinkComponent, KlesFormListFieldComponent, KlesFormRadioComponent, KlesFormRange, KlesFormRangeComponent, KlesFormSelectComponent, KlesFormSelectLazySearchComponent, KlesFormSelectSearchComponent, KlesFormSelectionListComponent, KlesFormSlideToggleComponent, KlesFormSubmitButtonComponent, KlesFormTextComponent, KlesFormTextareaComponent, KlesMaterialDynamicformsModule, KlesTransformPipe, autocompleteObjectValidator, autocompleteStringValidator, componentMapper, klesFieldControlFactory };
3268
3552
  //# sourceMappingURL=3kles-kles-material-dynamicforms.mjs.map