@3kles/kles-material-dynamicforms 21.6.1 → 21.7.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.
@@ -1,19 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, InjectionToken, inject, Component, Injector, Input, Directive, Injectable, EventEmitter, Output, NgModule, computed, ViewContainerRef, HostBinding, Pipe, ChangeDetectorRef, ViewChildren, ViewChild, ChangeDetectionStrategy, forwardRef, ElementRef, Renderer2, HostListener, LOCALE_ID, DEFAULT_CURRENCY_CODE, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core';
2
+ import { signal, InjectionToken, inject, Component, Injector, Input, Directive, Injectable, EventEmitter, Output, NgModule, computed, ViewContainerRef, HostBinding, ChangeDetectionStrategy, forwardRef, ViewChild, Pipe, ElementRef, Renderer2, HostListener, LOCALE_ID, DEFAULT_CURRENCY_CODE, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, input, viewChild, DestroyRef, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule, AsyncPipe } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
6
- import { Validators, FormControl, ReactiveFormsModule, FormsModule, FormControlDirective, FormControlName, FormArray, FormGroup, UntypedFormBuilder, NG_VALUE_ACCESSOR, UntypedFormGroup, UntypedFormControl } from '@angular/forms';
7
- import { concat, of, Subject, combineLatest, startWith, map as map$1, takeUntil, Observable, BehaviorSubject, ReplaySubject, defer, distinctUntilChanged as distinctUntilChanged$1, filter as filter$1, switchMap as switchMap$1 } from 'rxjs';
8
- import { tap, take, catchError, map, takeUntil as takeUntil$1, distinctUntilChanged, filter, switchMap, startWith as startWith$1, debounceTime, shareReplay } from 'rxjs/operators';
9
- import * as i2$1 from '@angular/material/form-field';
6
+ import { Validators, FormControl, ReactiveFormsModule, FormsModule, FormControlDirective, FormControlName, FormArray, FormGroup, UntypedFormBuilder, NG_VALUE_ACCESSOR, UntypedFormGroup } from '@angular/forms';
7
+ import { concat, of, Subject, combineLatest, startWith, map as map$1, takeUntil, Observable, defer, distinctUntilChanged as distinctUntilChanged$1, filter as filter$1, switchMap as switchMap$1, timer, shareReplay as shareReplay$1, isObservable } from 'rxjs';
8
+ import { tap, take, catchError, map, takeUntil as takeUntil$1, distinctUntilChanged, filter, switchMap, startWith as startWith$1, shareReplay, debounceTime, debounce } from 'rxjs/operators';
9
+ import * as i3 from '@angular/material/form-field';
10
10
  import { MatError, MatFormFieldModule, MatFormField, MatHint, MatLabel, MatSuffix } from '@angular/material/form-field';
11
- import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, ErrorStateMatcher, MatNativeDateModule, MatOptionModule, MatOption } from '@angular/material/core';
12
- import * as i2$2 from '@angular/material/icon';
11
+ import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, ErrorStateMatcher, MatNativeDateModule, MatOptionModule, MatOption as MatOption$1 } from '@angular/material/core';
12
+ import * as i2$1 from '@angular/material/icon';
13
13
  import { MatIcon, MatIconModule } from '@angular/material/icon';
14
- import * as i4$4 from '@angular/material/button';
14
+ import * as i4$3 from '@angular/material/button';
15
15
  import { MatIconButton, MatButtonModule, MatButton } from '@angular/material/button';
16
- import { toSignal } from '@angular/core/rxjs-interop';
16
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
17
17
  import { MatSliderModule } from '@angular/material/slider';
18
18
  import { MatToolbarModule } from '@angular/material/toolbar';
19
19
  import { MatSidenavModule } from '@angular/material/sidenav';
@@ -26,12 +26,12 @@ import * as i3$1 from '@angular/material/datepicker';
26
26
  import { MatDatepickerModule } from '@angular/material/datepicker';
27
27
  import * as i4 from '@angular/material/input';
28
28
  import { MatInputModule, MatInput, MatLabel as MatLabel$1, MatFormField as MatFormField$1 } from '@angular/material/input';
29
- import * as i4$1 from '@angular/material/select';
30
- import { MatSelectModule, MatSelectTrigger, MatSelect } from '@angular/material/select';
29
+ import * as i6 from '@angular/material/select';
30
+ import { MatSelectModule, MatSelect, MatSelectTrigger } from '@angular/material/select';
31
31
  import { MatRadioModule, MatRadioButton, MatRadioGroup } from '@angular/material/radio';
32
- import * as i2$3 from '@angular/material/chips';
32
+ import * as i2$2 from '@angular/material/chips';
33
33
  import { MatChipsModule, MatChipOption, MatChipListbox } from '@angular/material/chips';
34
- import * as i4$2 from '@angular/material/tooltip';
34
+ import * as i4$1 from '@angular/material/tooltip';
35
35
  import { MatTooltipModule, MatTooltip } from '@angular/material/tooltip';
36
36
  import { MatTableModule } from '@angular/material/table';
37
37
  import { MatPaginatorModule } from '@angular/material/paginator';
@@ -46,14 +46,14 @@ import * as i1$1 from '@angular/material/checkbox';
46
46
  import { MatCheckboxModule, MatCheckbox } from '@angular/material/checkbox';
47
47
  import { MatDialogModule } from '@angular/material/dialog';
48
48
  import * as i5 from '@angular/material/autocomplete';
49
- import { MatAutocompleteModule, MatOption as MatOption$1 } from '@angular/material/autocomplete';
49
+ import { MatAutocompleteModule, MatOption } from '@angular/material/autocomplete';
50
50
  import { MatProgressBarModule } from '@angular/material/progress-bar';
51
51
  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
55
  import { MatSlideToggleModule, MatSlideToggle } from '@angular/material/slide-toggle';
56
- import * as i3 from '@angular/cdk/scrolling';
56
+ import * as i4$2 from '@angular/cdk/scrolling';
57
57
  import { ScrollingModule, CdkScrollable, CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
58
58
  import * as i3$5 from '@angular/material/button-toggle';
59
59
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
@@ -64,10 +64,8 @@ import { cloneDeep } from 'lodash';
64
64
  import { parseColor, toCssRgba, readableTextColor, MaterialColorPickerTriggerComponent } from '@3kles/kles-material-color-picker';
65
65
  import * as i3$2 from '@angular/cdk/text-field';
66
66
  import { TextFieldModule } from '@angular/cdk/text-field';
67
- import * as i4$3 from 'ngx-mat-select-search';
68
- import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
69
67
  import { getMultipleValuesInSingleSelectionError } from '@angular/cdk/collections';
70
- import * as i4$5 from '@3kles/kles-material-datepicker';
68
+ import * as i4$4 from '@3kles/kles-material-datepicker';
71
69
  import { KlesMaterialDatepickerModule } from '@3kles/kles-material-datepicker';
72
70
  import * as i1$2 from '@angular/cdk/clipboard';
73
71
  import { ClipboardModule } from '@angular/cdk/clipboard';
@@ -1385,6 +1383,8 @@ class KlesDynamicFormIntl {
1385
1383
  constructor() {
1386
1384
  this.loading = 'Loading';
1387
1385
  this.selectAll = 'Select all';
1386
+ this.clearSearch = 'clear';
1387
+ this.search = 'search';
1388
1388
  }
1389
1389
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesDynamicFormIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1390
1390
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesDynamicFormIntl, providedIn: 'root' }); }
@@ -1574,7 +1574,7 @@ let KlesFormInputComponent = class KlesFormInputComponent extends KlesFieldAbstr
1574
1574
 
1575
1575
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
1576
1576
  </mat-form-field>
1577
- `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", ".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1577
+ `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", ".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1578
1578
  };
1579
1579
  KlesFormInputComponent = __decorate([
1580
1580
  FieldMapper({ type: EnumType.input })
@@ -1670,376 +1670,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
1670
1670
  `, standalone: true, imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatAutocompleteModule, MatTooltipModule, MatProgressSpinnerModule, MatOptionModule, MatError, MatErrorMessageDirective, KlesComponentDirective, MatIconModule], styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", ".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"] }]
1671
1671
  }], ctorParameters: () => [] });
1672
1672
 
1673
- class KlesTransformPipe {
1674
- transform(value, pipes) {
1675
- if (pipes && pipes.length > 0) {
1676
- return pipes.reduce((acc, p) => {
1677
- acc = p.pipe.transform(acc, ...(p.options || []));
1678
- return acc;
1679
- // if (p.options) {
1680
- // p.options.forEach(opt => {
1681
- // acc = p.pipe.transform(acc, opt);
1682
- // });
1683
- // } else {
1684
- // acc = p.pipe.transform(acc);
1685
- // }
1686
- // return acc;
1687
- }, value);
1688
- }
1689
- return value;
1690
- }
1691
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
1692
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, isStandalone: true, name: "klesTransform" }); }
1693
- }
1694
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, decorators: [{
1695
- type: Pipe,
1696
- args: [{
1697
- name: 'klesTransform',
1698
- standalone: true
1699
- }]
1700
- }] });
1701
-
1702
- let KlesFormSelectComponent = class KlesFormSelectComponent extends KlesFieldAbstract {
1703
- constructor() {
1704
- super(...arguments);
1705
- this.options$ = new BehaviorSubject([]);
1706
- this.isLoading = false;
1707
- this.openChange$ = new Subject();
1708
- this.intl = inject(KlesDynamicFormIntl);
1709
- this.ref = inject(ChangeDetectorRef);
1710
- this.compareFn = (o1, o2) => {
1711
- if (this.field.property && o1 && o2) {
1712
- return o1[this.field.property] === o2[this.field.property];
1713
- }
1714
- return o1 === o2;
1715
- };
1716
- }
1717
- ngOnInit() {
1718
- super.ngOnInit();
1719
- if (this.field.lazy) {
1720
- this.isLoading = true;
1721
- if (this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null) {
1722
- this.options$ = new BehaviorSubject(Array.isArray(this.group.controls[this.field.name].value) ? this.group.controls[this.field.name].value : [this.group.controls[this.field.name].value]);
1723
- this.isLoading = false;
1724
- }
1725
- else {
1726
- this.options$ = new BehaviorSubject([]);
1727
- }
1728
- this.openChange$
1729
- .pipe(takeUntil$1(this._onDestroy), switchMap((isOpen) => {
1730
- if (isOpen) {
1731
- if (this.field.options instanceof Observable) {
1732
- this.isLoading = true;
1733
- return this.field.options.pipe(take(1));
1734
- }
1735
- else if (this.field.options instanceof Function) {
1736
- this.isLoading = true;
1737
- return this.field.options(undefined, this.group.getRawValue());
1738
- }
1739
- else {
1740
- return of(this.field.options);
1741
- }
1742
- }
1743
- else {
1744
- return of(this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null
1745
- ? Array.isArray(this.group.controls[this.field.name].value)
1746
- ? this.group.controls[this.field.name].value
1747
- : [this.group.controls[this.field.name].value]
1748
- : []);
1749
- }
1750
- }))
1751
- .subscribe((options) => {
1752
- this.options$.next(options);
1753
- this.isLoading = false;
1754
- this.ref.markForCheck();
1755
- });
1756
- }
1757
- else {
1758
- if (this.field.options instanceof Observable) {
1759
- this.options$ = this.field.options;
1760
- }
1761
- else if (this.field.options instanceof Function) {
1762
- this.options$ = this.field.options(undefined, this.group.getRawValue());
1763
- }
1764
- else {
1765
- this.options$ = of(this.field.options ?? []);
1766
- }
1767
- }
1768
- }
1769
- ngOnDestroy() {
1770
- super.ngOnDestroy();
1771
- }
1772
- openChange($event) {
1773
- if (this.field.lazy) {
1774
- this.openChange$.next($event);
1775
- // if ($event) {
1776
- // if (!(this.field.options instanceof Observable)) {
1777
- // (this.options$ as BehaviorSubject<any[]>).next(this.field.options);
1778
- // } else {
1779
- // this.isLoading = true;
1780
- // this.field.options.pipe(take(1)).subscribe(options => {
1781
- // (this.options$ as BehaviorSubject<any[]>).next(options);
1782
- // this.isLoading = false;
1783
- // this.ref.markForCheck();
1784
- // });
1785
- // }
1786
- // } else {
1787
- // (this.options$ as BehaviorSubject<any[]>)
1788
- // .next(this.group.controls[this.field.name].value !== undefined ? [this.group.controls[this.field.name].value] : []);
1789
- // this.ref.markForCheck();
1790
- // // this.isLoading = true;
1791
- // }
1792
- }
1793
- if (this.field.virtualScroll) {
1794
- if ($event) {
1795
- this.cdkVirtualScrollViewport.scrollToIndex(0);
1796
- this.cdkVirtualScrollViewport.checkViewportSize();
1797
- }
1798
- }
1799
- }
1800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1801
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFormSelectComponent, isStandalone: true, selector: "kles-form-select", viewQueries: [{ propertyName: "cdkVirtualScrollViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true }, { propertyName: "options", predicate: MatOption, descendants: true }], usesInheritance: true, ngImport: i0, template: `
1802
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
1803
- @if (label()) {
1804
- <mat-label>{{ label() }}</mat-label>
1805
- }
1806
- <mat-select
1807
- [matTooltip]="tooltip()"
1808
- [attr.id]="field.id"
1809
- (openedChange)="openChange($event)"
1810
- [compareWith]="compareFn"
1811
- [panelWidth]="field.panelWidth || 'auto'"
1812
- [ngClass]="ngClass()"
1813
- [placeholder]="placeholder()"
1814
- [formControlName]="field.name"
1815
- [multiple]="field.multiple"
1816
- (focus)="onFocus()"
1817
- (blur)="onBlur()"
1818
- >
1819
- @if (field.triggerComponent) {
1820
- <mat-select-trigger>
1821
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
1822
- </mat-select-trigger>
1823
- }
1824
- @if (!field.virtualScroll) {
1825
- @if (!field.autocompleteComponent) {
1826
- @if (!isLoading) {
1827
- @for (item of options$ | async; track item) {
1828
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
1829
- }
1830
- } @else {
1831
- <mat-option class="hide-checkbox" disabled
1832
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1833
- ></mat-option>
1834
- }
1835
- } @else {
1836
- @if (!isLoading) {
1837
- @for (item of options$ | async; track item) {
1838
- <mat-option [value]="item" [disabled]="item?.disabled">
1839
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
1840
- </mat-option>
1841
- }
1842
- } @else {
1843
- <mat-option class="hide-checkbox" disabled
1844
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1845
- ></mat-option>
1846
- }
1847
- }
1848
- } @else {
1849
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="5 * 48">
1850
- @if (!field.autocompleteComponent) {
1851
- @if (!isLoading) {
1852
- <mat-option *cdkVirtualFor="let item of options$ | async" [value]="item" [disabled]="item?.disabled">
1853
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
1854
- </mat-option>
1855
- } @else {
1856
- <mat-option class="hide-checkbox" disabled
1857
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1858
- ></mat-option>
1859
- }
1860
- @if (field.multiple) {
1861
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
1862
- <mat-option [value]="item" style="display:none">
1863
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
1864
- </mat-option>
1865
- }
1866
- }
1867
- @if (!field.multiple && group.controls[field.name].value) {
1868
- @for (item of [group?.controls[field.name]?.value]; track item) {
1869
- <mat-option [value]="item" style="display:none">
1870
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
1871
- </mat-option>
1872
- }
1873
- }
1874
- } @else {
1875
- @if (!isLoading) {
1876
- <mat-option *cdkVirtualFor="let item of options$ | async" [value]="item" [disabled]="item?.disabled">
1877
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
1878
- </mat-option>
1879
- } @else {
1880
- <mat-option class="hide-checkbox" disabled
1881
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1882
- ></mat-option>
1883
- }
1884
- @if (field.multiple) {
1885
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
1886
- <mat-option [value]="item" style="display:none">
1887
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
1888
- </mat-option>
1889
- }
1890
- }
1891
- @if (!field.multiple && group.controls[field.name].value) {
1892
- @for (item of [group?.controls[field.name]?.value]; track item) {
1893
- <mat-option [value]="item" style="display:none">
1894
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
1895
- </mat-option>
1896
- }
1897
- }
1898
- }
1899
- </cdk-virtual-scroll-viewport>
1900
- }
1901
- </mat-select>
1902
-
1903
- @if (hint()) {
1904
- <mat-hint>{{ hint() }}</mat-hint>
1905
- }
1906
- @if (field.subComponents || field.clearable) {
1907
- <div matSuffix>
1908
- <ng-content></ng-content>
1909
- </div>
1910
- }
1911
-
1912
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
1913
- </mat-form-field>
1914
- `, isInline: true, styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
1915
- };
1916
- KlesFormSelectComponent = __decorate([
1917
- FieldMapper({ type: EnumType.select })
1918
- ], KlesFormSelectComponent);
1919
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectComponent, decorators: [{
1920
- type: Component,
1921
- args: [{ selector: 'kles-form-select', template: `
1922
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
1923
- @if (label()) {
1924
- <mat-label>{{ label() }}</mat-label>
1925
- }
1926
- <mat-select
1927
- [matTooltip]="tooltip()"
1928
- [attr.id]="field.id"
1929
- (openedChange)="openChange($event)"
1930
- [compareWith]="compareFn"
1931
- [panelWidth]="field.panelWidth || 'auto'"
1932
- [ngClass]="ngClass()"
1933
- [placeholder]="placeholder()"
1934
- [formControlName]="field.name"
1935
- [multiple]="field.multiple"
1936
- (focus)="onFocus()"
1937
- (blur)="onBlur()"
1938
- >
1939
- @if (field.triggerComponent) {
1940
- <mat-select-trigger>
1941
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
1942
- </mat-select-trigger>
1943
- }
1944
- @if (!field.virtualScroll) {
1945
- @if (!field.autocompleteComponent) {
1946
- @if (!isLoading) {
1947
- @for (item of options$ | async; track item) {
1948
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
1949
- }
1950
- } @else {
1951
- <mat-option class="hide-checkbox" disabled
1952
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1953
- ></mat-option>
1954
- }
1955
- } @else {
1956
- @if (!isLoading) {
1957
- @for (item of options$ | async; track item) {
1958
- <mat-option [value]="item" [disabled]="item?.disabled">
1959
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
1960
- </mat-option>
1961
- }
1962
- } @else {
1963
- <mat-option class="hide-checkbox" disabled
1964
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1965
- ></mat-option>
1966
- }
1967
- }
1968
- } @else {
1969
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="5 * 48">
1970
- @if (!field.autocompleteComponent) {
1971
- @if (!isLoading) {
1972
- <mat-option *cdkVirtualFor="let item of options$ | async" [value]="item" [disabled]="item?.disabled">
1973
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
1974
- </mat-option>
1975
- } @else {
1976
- <mat-option class="hide-checkbox" disabled
1977
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
1978
- ></mat-option>
1979
- }
1980
- @if (field.multiple) {
1981
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
1982
- <mat-option [value]="item" style="display:none">
1983
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
1984
- </mat-option>
1985
- }
1986
- }
1987
- @if (!field.multiple && group.controls[field.name].value) {
1988
- @for (item of [group?.controls[field.name]?.value]; track item) {
1989
- <mat-option [value]="item" style="display:none">
1990
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
1991
- </mat-option>
1992
- }
1993
- }
1994
- } @else {
1995
- @if (!isLoading) {
1996
- <mat-option *cdkVirtualFor="let item of options$ | async" [value]="item" [disabled]="item?.disabled">
1997
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
1998
- </mat-option>
1999
- } @else {
2000
- <mat-option class="hide-checkbox" disabled
2001
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
2002
- ></mat-option>
2003
- }
2004
- @if (field.multiple) {
2005
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
2006
- <mat-option [value]="item" style="display:none">
2007
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
2008
- </mat-option>
2009
- }
2010
- }
2011
- @if (!field.multiple && group.controls[field.name].value) {
2012
- @for (item of [group?.controls[field.name]?.value]; track item) {
2013
- <mat-option [value]="item" style="display:none">
2014
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
2015
- </mat-option>
2016
- }
2017
- }
2018
- }
2019
- </cdk-virtual-scroll-viewport>
2020
- }
2021
- </mat-select>
2022
-
2023
- @if (hint()) {
2024
- <mat-hint>{{ hint() }}</mat-hint>
2025
- }
2026
- @if (field.subComponents || field.clearable) {
2027
- <div matSuffix>
2028
- <ng-content></ng-content>
2029
- </div>
2030
- }
2031
-
2032
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
2033
- </mat-form-field>
2034
- `, standalone: true, imports: [CommonModule, KlesTransformPipe, MatErrorMessageDirective, MatFormFieldModule, MatHint, KlesComponentDirective, MatOption, MatProgressSpinner, ScrollingModule, MatSelectModule, ReactiveFormsModule, MatTooltip], styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"] }]
2035
- }], propDecorators: { cdkVirtualScrollViewport: [{
2036
- type: ViewChild,
2037
- args: [CdkVirtualScrollViewport]
2038
- }], options: [{
2039
- type: ViewChildren,
2040
- args: [MatOption]
2041
- }] } });
2042
-
2043
1673
  class KlesFormDateComponent extends KlesFieldAbstract {
2044
1674
  ngOnInit() {
2045
1675
  super.ngOnInit();
@@ -2065,7 +1695,7 @@ class KlesFormDateComponent extends KlesFieldAbstract {
2065
1695
 
2066
1696
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
2067
1697
  </mat-form-field>
2068
- `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".suffix{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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"] }] }); }
1698
+ `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".suffix{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { 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: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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"] }] }); }
2069
1699
  }
2070
1700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormDateComponent, decorators: [{
2071
1701
  type: Component,
@@ -2432,7 +2062,7 @@ class KlesFormColorComponent extends KlesFieldAbstract {
2432
2062
 
2433
2063
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
2434
2064
  </mat-form-field>
2435
- `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ":host{display:block;width:100%}mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "component", type: MaterialColorPickerTriggerComponent, selector: "kles-material-color-picker-trigger", inputs: ["color", "outputFormat", "commitMode", "alpha", "eyeDropper", "disabled", "saveOnOutside", "fallbackColor", "presets", "position", "positionOffset"], outputs: ["colorChange", "pickerOpened", "pickerClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2065
+ `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ":host{display:block;width:100%}mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "component", type: MaterialColorPickerTriggerComponent, selector: "kles-material-color-picker-trigger", inputs: ["color", "outputFormat", "commitMode", "alpha", "eyeDropper", "disabled", "saveOnOutside", "fallbackColor", "presets", "position", "positionOffset"], outputs: ["colorChange", "pickerOpened", "pickerClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2436
2066
  }
2437
2067
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormColorComponent, decorators: [{
2438
2068
  type: Component,
@@ -3029,6 +2659,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3029
2659
  `, standalone: true, imports: [CommonModule, MatErrorMessageDirective, ScrollingModule, ReactiveFormsModule, MatTooltip, MatLabel, MatFormField, TextFieldModule, MatInput], styles: ["mat-form-field{width:100%}\n"] }]
3030
2660
  }] });
3031
2661
 
2662
+ class KlesTransformPipe {
2663
+ transform(value, pipes) {
2664
+ if (pipes && pipes.length > 0) {
2665
+ return pipes.reduce((acc, p) => {
2666
+ acc = p.pipe.transform(acc, ...(p.options || []));
2667
+ return acc;
2668
+ // if (p.options) {
2669
+ // p.options.forEach(opt => {
2670
+ // acc = p.pipe.transform(acc, opt);
2671
+ // });
2672
+ // } else {
2673
+ // acc = p.pipe.transform(acc);
2674
+ // }
2675
+ // return acc;
2676
+ }, value);
2677
+ }
2678
+ return value;
2679
+ }
2680
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2681
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, isStandalone: true, name: "klesTransform" }); }
2682
+ }
2683
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, decorators: [{
2684
+ type: Pipe,
2685
+ args: [{
2686
+ name: 'klesTransform',
2687
+ standalone: true
2688
+ }]
2689
+ }] });
2690
+
3032
2691
  let KlesFormTextComponent = class KlesFormTextComponent extends KlesFieldAbstract {
3033
2692
  ngOnInit() {
3034
2693
  super.ngOnInit();
@@ -3321,7 +2980,7 @@ class KlesFormInputClearableComponent extends KlesFormInputComponent {
3321
2980
 
3322
2981
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3323
2982
  </mat-form-field>
3324
- `, isInline: true, styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel$1, selector: "mat-label" }, { kind: "component", type: MatFormField$1, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
2983
+ `, isInline: true, styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatLabel$1, selector: "mat-label" }, { kind: "component", type: MatFormField$1, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
3325
2984
  }
3326
2985
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormInputClearableComponent, decorators: [{
3327
2986
  type: Component,
@@ -3398,7 +3057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3398
3057
 
3399
3058
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3400
3059
  </mat-form-field>
3401
- `, standalone: true, imports: [CommonModule, ReactiveFormsModule, MatAutocompleteModule, MatErrorMessageDirective, MatProgressSpinner, MatIcon, MatTooltip, KlesComponentDirective, MatOption$1, MatInput, MatLabel$1, MatFormField$1], styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"] }]
3060
+ `, standalone: true, imports: [CommonModule, ReactiveFormsModule, MatAutocompleteModule, MatErrorMessageDirective, MatProgressSpinner, MatIcon, MatTooltip, KlesComponentDirective, MatOption, MatInput, MatLabel$1, MatFormField$1], styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"] }]
3402
3061
  }] });
3403
3062
 
3404
3063
  class KlesFormIconComponent extends KlesFieldAbstract {
@@ -3424,492 +3083,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3424
3083
  `, standalone: true, imports: [CommonModule, MatIcon, MatTooltip, ReactiveFormsModule] }]
3425
3084
  }] });
3426
3085
 
3427
- class KlesFormSelectSearchComponent extends KlesFieldAbstract {
3428
- constructor() {
3429
- super(...arguments);
3430
- this.searchControl = new UntypedFormControl();
3431
- this.selectAllControl = new UntypedFormControl(false);
3432
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
3433
- this.options$ = new BehaviorSubject([]);
3434
- this.optionsFiltered$ = new ReplaySubject(1);
3435
- this.openChange$ = new BehaviorSubject(false);
3436
- this.openClosed$ = new Subject();
3437
- this.intl = inject(KlesDynamicFormIntl);
3438
- this.ref = inject(ChangeDetectorRef);
3439
- this.compareFn = (o1, o2) => {
3440
- if (this.field.property && o1 && o2) {
3441
- return o1[this.field.property] === o2[this.field.property];
3442
- }
3443
- return o1 === o2;
3444
- };
3445
- }
3446
- ngOnInit() {
3447
- super.ngOnInit();
3448
- if (this.field.lazy) {
3449
- this.isLoading.set(true);
3450
- if (this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null) {
3451
- this.options$ = new BehaviorSubject(Array.isArray(this.group.controls[this.field.name].value) ? this.group.controls[this.field.name].value : [this.group.controls[this.field.name].value]);
3452
- this.isLoading.set(false);
3453
- }
3454
- else {
3455
- this.options$ = new BehaviorSubject([]);
3456
- }
3457
- this.openChangeEvent();
3458
- }
3459
- else {
3460
- if (this.field.options instanceof Observable) {
3461
- this.options$ = this.field.options;
3462
- }
3463
- else if (this.field.options instanceof Function) {
3464
- this.options$ = this.field.options(undefined, this.group.getRawValue());
3465
- }
3466
- else {
3467
- this.options$ = of(this.field.options ?? []);
3468
- }
3469
- }
3470
- this.options$.pipe(takeUntil$1(this._onDestroy)).subscribe((options) => {
3471
- this.optionsFiltered$.next(options);
3472
- });
3473
- this.searchControl.valueChanges
3474
- .pipe(takeUntil$1(this._onDestroy), debounceTime(this.field.debounceTime || 0), startWith$1(this.searchControl.value), switchMap((value) => {
3475
- return concat(of({ loading: true, options: [] }), this.onSearchChange(value).pipe(take(1), map((options) => ({ loading: false, options }))));
3476
- }))
3477
- .subscribe(({ loading, options }) => {
3478
- this.isLoading.set(loading);
3479
- this.optionsFiltered$.next(options);
3480
- this.updateSelectAllControl(this.group.controls[this.field.name].value);
3481
- this.ref.markForCheck();
3482
- });
3483
- if (this.field.multiple) {
3484
- // this.updateSelectAllControl(this.group.controls[this.field.name].value);
3485
- this.group.controls[this.field.name].registerOnChange((values, emitViewToModelChange) => {
3486
- if (emitViewToModelChange) {
3487
- this.updateSelectAllControl(values);
3488
- }
3489
- });
3490
- }
3491
- }
3492
- ngOnDestroy() {
3493
- // this._onDestroy.next();
3494
- this.openClosed$.next();
3495
- this.openClosed$.complete();
3496
- super.ngOnDestroy();
3497
- }
3498
- toggleAllSelection(state) {
3499
- if (state.checked) {
3500
- this.optionsFiltered$
3501
- .pipe(take(1), map((options) => options.filter((option) => !option?.disabled)))
3502
- .subscribe((options) => {
3503
- if (options.length > 0) {
3504
- this.group.controls[this.field.name].patchValue(options);
3505
- }
3506
- });
3507
- }
3508
- else {
3509
- this.group.controls[this.field.name].patchValue([]);
3510
- }
3511
- this.ref.markForCheck();
3512
- }
3513
- openChangeEvent() {
3514
- this.openChange$
3515
- .pipe(takeUntil$1(this._onDestroy), switchMap((isOpen) => {
3516
- return this.onOpenChange(isOpen);
3517
- }))
3518
- .subscribe((options) => {
3519
- this.isLoading.set(false);
3520
- this.options$.next(options);
3521
- this.optionsFiltered$.next(options);
3522
- this.updateSelectAllControl(this.group.controls[this.field.name].value);
3523
- this.ref.markForCheck();
3524
- });
3525
- }
3526
- onOpenChange(isOpen) {
3527
- if (isOpen) {
3528
- if (this.field.options instanceof Observable) {
3529
- this.isLoading.set(true);
3530
- return this.field.options.pipe(takeUntil$1(this.openClosed$));
3531
- }
3532
- else if (this.field.options instanceof Function) {
3533
- this.isLoading.set(true);
3534
- return this.field.options(undefined, this.group.getRawValue()).pipe(takeUntil$1(this.openClosed$));
3535
- }
3536
- else {
3537
- return of(this.field.options ?? []);
3538
- }
3539
- }
3540
- else {
3541
- return of(this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null
3542
- ? Array.isArray(this.group.controls[this.field.name].value)
3543
- ? this.group.controls[this.field.name].value
3544
- : [this.group.controls[this.field.name].value]
3545
- : []);
3546
- }
3547
- }
3548
- onSearchChange(value) {
3549
- if (value) {
3550
- const search = value.toLowerCase();
3551
- return this.options$.pipe(map((options) => {
3552
- return options.filter((option) => {
3553
- if (this.field.searchKeys && this.field.searchKeys.length) {
3554
- return (this.field.searchKeys.some((searchKey) => {
3555
- if (option[searchKey]) {
3556
- return option[searchKey]?.toString().toLowerCase().indexOf(search) > -1;
3557
- }
3558
- return false;
3559
- }) || (this.field.property ? option[this.field.property]?.toString().toLowerCase().indexOf(search) > -1 : false));
3560
- }
3561
- else {
3562
- if (this.field.property) {
3563
- return option[this.field.property]?.toString().toLowerCase().indexOf(search) > -1;
3564
- }
3565
- }
3566
- return option?.toString().toLowerCase().indexOf(search) > -1;
3567
- });
3568
- }));
3569
- }
3570
- else {
3571
- return this.options$;
3572
- }
3573
- }
3574
- openChange($event) {
3575
- if (this.field.lazy) {
3576
- if (!$event) {
3577
- this.openClosed$.next();
3578
- }
3579
- this.openChange$.next($event);
3580
- }
3581
- if (this.field.virtualScroll) {
3582
- if ($event) {
3583
- this.cdkVirtualScrollViewport.scrollToIndex(0);
3584
- this.cdkVirtualScrollViewport.checkViewportSize();
3585
- }
3586
- }
3587
- }
3588
- selectionChange(selection) {
3589
- this.updateSelectAllControl(selection.value);
3590
- }
3591
- updateSelectAllControl(values) {
3592
- if (this.field.multiple) {
3593
- if (values) {
3594
- const selected = this.field.property && values ? values.map((s) => s[this.field.property]) : values;
3595
- this.optionsFiltered$
3596
- .pipe(take(1), map((options) => options?.filter((option) => !option?.disabled).map((option) => (this.field.property ? option[this.field.property] : option))), map((options) => {
3597
- if (!selected) {
3598
- return false;
3599
- }
3600
- if (options.length < selected.length) {
3601
- return options.length > 0 && options.every((o) => selected.includes(o));
3602
- }
3603
- else {
3604
- return options.length > 0 && options.length === selected.length && selected.every((s) => options.includes(s));
3605
- }
3606
- }))
3607
- .subscribe((isChecked) => {
3608
- this.selectAllControl.setValue(isChecked, { emitEvent: false });
3609
- });
3610
- }
3611
- }
3612
- }
3613
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectSearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3614
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFormSelectSearchComponent, isStandalone: true, 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: `
3615
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
3616
- @if (label()) {
3617
- <mat-label>{{ label() }}</mat-label>
3618
- }
3619
-
3620
- <mat-select
3621
- [matTooltip]="tooltip()"
3622
- [attr.id]="field.id"
3623
- [ngClass]="ngClass()"
3624
- (openedChange)="openChange($event)"
3625
- [compareWith]="compareFn"
3626
- [panelWidth]="field.panelWidth || 'auto'"
3627
- [placeholder]="placeholder()"
3628
- [formControlName]="field.name"
3629
- [multiple]="field.multiple"
3630
- (selectionChange)="selectionChange($event)"
3631
- (focus)="onFocus()"
3632
- (blur)="onBlur()"
3633
- >
3634
- @if (field.triggerComponent) {
3635
- <mat-select-trigger>
3636
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
3637
- </mat-select-trigger>
3638
- }
3639
- @if (field.virtualScroll) {
3640
- <mat-option>
3641
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3642
- </mat-option>
3643
-
3644
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
3645
- @if (!isLoading()) {
3646
- @if (field.multiple) {
3647
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3648
- {{ intl.selectAll }}
3649
- </mat-checkbox>
3650
- }
3651
- @if (!field.autocompleteComponent) {
3652
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3653
-
3654
- @if (field.multiple) {
3655
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3656
- <mat-option [value]="item" style="display:none">
3657
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3658
- </mat-option>
3659
- }
3660
- }
3661
- @if (!field.multiple && group.controls[field.name].value) {
3662
- @for (item of [group?.controls[field.name]?.value]; track item) {
3663
- <mat-option [value]="item" style="display:none">
3664
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3665
- </mat-option>
3666
- }
3667
- }
3668
- } @else {
3669
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3670
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3671
- </mat-option>
3672
-
3673
- @if (field.multiple) {
3674
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3675
- <mat-option [value]="item" style="display:none">
3676
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3677
- </mat-option>
3678
- }
3679
- }
3680
- @if (!field.multiple && group.controls[field.name].value) {
3681
- @for (item of [group?.controls[field.name]?.value]; track item) {
3682
- <mat-option [value]="item" style="display:none">
3683
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3684
- </mat-option>
3685
- }
3686
- }
3687
- }
3688
- } @else {
3689
- <mat-option class="hide-checkbox" disabled
3690
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3691
- ></mat-option>
3692
- }
3693
- </cdk-virtual-scroll-viewport>
3694
- } @else {
3695
- <mat-option>
3696
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3697
- </mat-option>
3698
-
3699
- @if (!isLoading()) {
3700
- @if (field.multiple) {
3701
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3702
- {{ intl.selectAll }}
3703
- </mat-checkbox>
3704
- }
3705
- @if (!field.autocompleteComponent) {
3706
- @for (item of optionsFiltered$ | async; track item) {
3707
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3708
- }
3709
- } @else {
3710
- @for (item of optionsFiltered$ | async; track item) {
3711
- <mat-option [value]="item" [disabled]="item?.disabled">
3712
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3713
- </mat-option>
3714
- }
3715
- }
3716
- } @else {
3717
- <mat-option class="hide-checkbox" disabled
3718
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3719
- ></mat-option>
3720
- }
3721
-
3722
- <ng-template #emptyOption>
3723
- <mat-option class="hide-checkbox" disabled
3724
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3725
- ></mat-option>
3726
- </ng-template>
3727
- }
3728
- </mat-select>
3729
-
3730
- @if (hint()) {
3731
- <mat-hint>{{ hint() }}</mat-hint>
3732
- }
3733
- @if (field.subComponents || field.clearable || isPending()) {
3734
- <div matSuffix class="suffix">
3735
- @if (isPending()) {
3736
- <mat-spinner mode="indeterminate" diameter="21"></mat-spinner>
3737
- }
3738
- @if (field.subComponents || field.clearable) {
3739
- <ng-content></ng-content>
3740
- }
3741
- </div>
3742
- }
3743
-
3744
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3745
- </mat-form-field>
3746
- `, isInline: true, styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n", "::ng-deep .selectAll{padding:0 16px 0 5px!important;display:flex!important}\n", "::ng-deep .selectAll .mdc-form-field{width:100%}\n", "::ng-deep .selectAll .mdc-form-field .mdc-label{width:100%;min-height:48px;align-items:center;display:flex}\n", "::ng-deep .selectAll .mdc-form-field .mdc-checkbox__ripple{display:none!important}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: NgxMatSelectSearchModule }, { kind: "component", type: i4$3.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
3747
- }
3748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectSearchComponent, decorators: [{
3749
- type: Component,
3750
- args: [{ selector: 'kles-form-select-search', template: `
3751
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
3752
- @if (label()) {
3753
- <mat-label>{{ label() }}</mat-label>
3754
- }
3755
-
3756
- <mat-select
3757
- [matTooltip]="tooltip()"
3758
- [attr.id]="field.id"
3759
- [ngClass]="ngClass()"
3760
- (openedChange)="openChange($event)"
3761
- [compareWith]="compareFn"
3762
- [panelWidth]="field.panelWidth || 'auto'"
3763
- [placeholder]="placeholder()"
3764
- [formControlName]="field.name"
3765
- [multiple]="field.multiple"
3766
- (selectionChange)="selectionChange($event)"
3767
- (focus)="onFocus()"
3768
- (blur)="onBlur()"
3769
- >
3770
- @if (field.triggerComponent) {
3771
- <mat-select-trigger>
3772
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
3773
- </mat-select-trigger>
3774
- }
3775
- @if (field.virtualScroll) {
3776
- <mat-option>
3777
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3778
- </mat-option>
3779
-
3780
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
3781
- @if (!isLoading()) {
3782
- @if (field.multiple) {
3783
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3784
- {{ intl.selectAll }}
3785
- </mat-checkbox>
3786
- }
3787
- @if (!field.autocompleteComponent) {
3788
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3789
-
3790
- @if (field.multiple) {
3791
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3792
- <mat-option [value]="item" style="display:none">
3793
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3794
- </mat-option>
3795
- }
3796
- }
3797
- @if (!field.multiple && group.controls[field.name].value) {
3798
- @for (item of [group?.controls[field.name]?.value]; track item) {
3799
- <mat-option [value]="item" style="display:none">
3800
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3801
- </mat-option>
3802
- }
3803
- }
3804
- } @else {
3805
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3806
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3807
- </mat-option>
3808
-
3809
- @if (field.multiple) {
3810
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3811
- <mat-option [value]="item" style="display:none">
3812
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3813
- </mat-option>
3814
- }
3815
- }
3816
- @if (!field.multiple && group.controls[field.name].value) {
3817
- @for (item of [group?.controls[field.name]?.value]; track item) {
3818
- <mat-option [value]="item" style="display:none">
3819
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3820
- </mat-option>
3821
- }
3822
- }
3823
- }
3824
- } @else {
3825
- <mat-option class="hide-checkbox" disabled
3826
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3827
- ></mat-option>
3828
- }
3829
- </cdk-virtual-scroll-viewport>
3830
- } @else {
3831
- <mat-option>
3832
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3833
- </mat-option>
3834
-
3835
- @if (!isLoading()) {
3836
- @if (field.multiple) {
3837
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3838
- {{ intl.selectAll }}
3839
- </mat-checkbox>
3840
- }
3841
- @if (!field.autocompleteComponent) {
3842
- @for (item of optionsFiltered$ | async; track item) {
3843
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3844
- }
3845
- } @else {
3846
- @for (item of optionsFiltered$ | async; track item) {
3847
- <mat-option [value]="item" [disabled]="item?.disabled">
3848
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3849
- </mat-option>
3850
- }
3851
- }
3852
- } @else {
3853
- <mat-option class="hide-checkbox" disabled
3854
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3855
- ></mat-option>
3856
- }
3857
-
3858
- <ng-template #emptyOption>
3859
- <mat-option class="hide-checkbox" disabled
3860
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3861
- ></mat-option>
3862
- </ng-template>
3863
- }
3864
- </mat-select>
3865
-
3866
- @if (hint()) {
3867
- <mat-hint>{{ hint() }}</mat-hint>
3868
- }
3869
- @if (field.subComponents || field.clearable || isPending()) {
3870
- <div matSuffix class="suffix">
3871
- @if (isPending()) {
3872
- <mat-spinner mode="indeterminate" diameter="21"></mat-spinner>
3873
- }
3874
- @if (field.subComponents || field.clearable) {
3875
- <ng-content></ng-content>
3876
- }
3877
- </div>
3878
- }
3879
-
3880
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3881
- </mat-form-field>
3882
- `, standalone: true, imports: [
3883
- CommonModule,
3884
- ReactiveFormsModule,
3885
- KlesTransformPipe,
3886
- MatErrorMessageDirective,
3887
- MatProgressSpinner,
3888
- MatHint,
3889
- MatOption,
3890
- KlesComponentDirective,
3891
- ScrollingModule,
3892
- MatSelectTrigger,
3893
- MatSelect,
3894
- MatTooltip,
3895
- MatLabel,
3896
- MatFormField,
3897
- NgxMatSelectSearchModule,
3898
- MatCheckbox,
3899
- MatFormFieldModule,
3900
- ], styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n", "::ng-deep .selectAll{padding:0 16px 0 5px!important;display:flex!important}\n", "::ng-deep .selectAll .mdc-form-field{width:100%}\n", "::ng-deep .selectAll .mdc-form-field .mdc-label{width:100%;min-height:48px;align-items:center;display:flex}\n", "::ng-deep .selectAll .mdc-form-field .mdc-checkbox__ripple{display:none!important}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"] }]
3901
- }], propDecorators: { cdkVirtualScrollViewport: [{
3902
- type: ViewChild,
3903
- args: [CdkVirtualScrollViewport]
3904
- }], options: [{
3905
- type: ViewChildren,
3906
- args: [MatOption]
3907
- }] } });
3908
-
3909
- let KlesFormLineBreakComponent = class KlesFormLineBreakComponent extends KlesFieldAbstract {
3910
- ngOnInit() { super.ngOnInit(); }
3911
- ngOnDestroy() {
3912
- super.ngOnDestroy();
3086
+ let KlesFormLineBreakComponent = class KlesFormLineBreakComponent extends KlesFieldAbstract {
3087
+ ngOnInit() { super.ngOnInit(); }
3088
+ ngOnDestroy() {
3089
+ super.ngOnDestroy();
3913
3090
  }
3914
3091
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLineBreakComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3915
3092
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.20", type: KlesFormLineBreakComponent, isStandalone: true, selector: "kles-form-line-break", usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [":host{flex-basis:100%;display:flex;height:0}\n"] }); }
@@ -4297,7 +3474,7 @@ class KlesFormSelectionListComponent extends KlesFieldAbstract {
4297
3474
  }
4298
3475
  </mat-selection-list>
4299
3476
  </div>
4300
- `, isInline: true, styles: ["mat-selection-list{width:100%;height:250px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$3.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i3$3.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
3477
+ `, isInline: true, styles: ["mat-selection-list{width:100%;height:250px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$3.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i3$3.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i4$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
4301
3478
  }
4302
3479
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectionListComponent, decorators: [{
4303
3480
  type: Component,
@@ -4344,7 +3521,7 @@ let KlesFormBadgeComponent = class KlesFormBadgeComponent extends KlesFieldAbstr
4344
3521
  <span [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()"
4345
3522
  matBadge="{{group.controls[field.name].value}}" matBadgeOverlap="false" [matBadgeColor]="color()">
4346
3523
  </span>
4347
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i3$4.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }] }); }
3524
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i3$4.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }] }); }
4348
3525
  };
4349
3526
  KlesFormBadgeComponent = __decorate([
4350
3527
  FieldMapper({ type: EnumType.badge })
@@ -4654,7 +3831,7 @@ let KlesFormRangeComponent = class KlesFormRangeComponent extends KlesFieldAbstr
4654
3831
 
4655
3832
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4656
3833
  </mat-form-field>
4657
- `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i3$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i3$1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i3$1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i3$1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }] }); }
3834
+ `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i3$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i3$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i3$1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i3$1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i3$1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }] }); }
4658
3835
  };
4659
3836
  KlesFormRangeComponent = __decorate([
4660
3837
  FieldMapper({ type: EnumType.range, factory: (field) => new KlesFormRange(field).create() })
@@ -4685,290 +3862,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
4685
3862
  `, standalone: true, imports: [CommonModule, MatErrorMessageDirective, MatFormFieldModule, MatInputModule, MatDatepickerModule, MatTooltipModule, ReactiveFormsModule], styles: [".suffix{display:flex;align-items:center}\n", "mat-form-field{width:100%}\n"] }]
4686
3863
  }] });
4687
3864
 
4688
- class KlesFormSelectLazySearchComponent extends KlesFormSelectSearchComponent {
4689
- ngOnInit() {
4690
- this.field.lazy = true;
4691
- this.field.debounceTime = this.field.debounceTime ? this.field.debounceTime : 500;
4692
- super.ngOnInit();
4693
- }
4694
- ngOnDestroy() {
4695
- super.ngOnDestroy();
4696
- }
4697
- onSearchChange(value) {
4698
- if (this.field.options instanceof Function) {
4699
- if (this.openChange$.getValue() && this.field.options instanceof Function) {
4700
- if (value) {
4701
- return this.field.options(value, this.group.getRawValue()).pipe(take(1));
4702
- }
4703
- else {
4704
- return this.field.options(undefined, this.group.getRawValue()).pipe(take(1));
4705
- }
4706
- }
4707
- return of(this.group.controls[this.field.name].value ? [this.group.controls[this.field.name].value] : []);
4708
- }
4709
- else {
4710
- return super.onSearchChange(value);
4711
- }
4712
- }
4713
- openChangeEvent() {
4714
- this.openChange$
4715
- .pipe(takeUntil$1(this._onDestroy), switchMap((isOpen) => {
4716
- return this.onOpenChange(isOpen).pipe(map((options) => ({ options, isOpen })));
4717
- }))
4718
- .subscribe(({ options, isOpen }) => {
4719
- if (!isOpen) {
4720
- this.searchControl.reset(null, { emitEvent: false });
4721
- }
4722
- this.optionsFiltered$.next(options);
4723
- this.isLoading.set(false);
4724
- this.ref.markForCheck();
4725
- });
4726
- }
4727
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectLazySearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4728
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFormSelectLazySearchComponent, isStandalone: true, selector: "kles-form-select-lazy-search", usesInheritance: true, ngImport: i0, template: `
4729
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
4730
- @if (label()) {
4731
- <mat-label>{{ label() }}</mat-label>
4732
- }
4733
-
4734
- <mat-select
4735
- [matTooltip]="tooltip()"
4736
- [attr.id]="field.id"
4737
- [ngClass]="ngClass()"
4738
- (openedChange)="openChange($event)"
4739
- [compareWith]="compareFn"
4740
- [panelWidth]="field.panelWidth || 'auto'"
4741
- [placeholder]="placeholder()"
4742
- [formControlName]="field.name"
4743
- [multiple]="field.multiple"
4744
- >
4745
- @if (field.triggerComponent) {
4746
- <mat-select-trigger>
4747
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
4748
- </mat-select-trigger>
4749
- }
4750
- @if (field.virtualScroll) {
4751
- <mat-option>
4752
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4753
- </mat-option>
4754
-
4755
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
4756
- @if (!isLoading()) {
4757
- @if (field.multiple) {
4758
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4759
- {{ intl.selectAll }}
4760
- </mat-checkbox>
4761
- }
4762
- @if (!field.autocompleteComponent) {
4763
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4764
-
4765
- @if (field.multiple) {
4766
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4767
- <mat-option [value]="item" style="display:none">
4768
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4769
- </mat-option>
4770
- }
4771
- }
4772
- @if (!field.multiple && group.controls[field.name].value) {
4773
- @for (item of [group?.controls[field.name]?.value]; track item) {
4774
- <mat-option [value]="item" style="display:none">
4775
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4776
- </mat-option>
4777
- }
4778
- }
4779
- } @else {
4780
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
4781
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4782
- </mat-option>
4783
-
4784
- @if (field.multiple) {
4785
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4786
- <mat-option [value]="item" style="display:none">
4787
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4788
- </mat-option>
4789
- }
4790
- }
4791
- @if (!field.multiple && group.controls[field.name].value) {
4792
- @for (item of [group?.controls[field.name]?.value]; track item) {
4793
- <mat-option [value]="item" style="display:none">
4794
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4795
- </mat-option>
4796
- }
4797
- }
4798
- }
4799
- } @else {
4800
- <mat-option class="hide-checkbox" disabled
4801
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4802
- ></mat-option>
4803
- }
4804
- </cdk-virtual-scroll-viewport>
4805
- } @else {
4806
- <mat-option>
4807
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4808
- </mat-option>
4809
-
4810
- @if (!isLoading()) {
4811
- @if (field.multiple) {
4812
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4813
- {{ intl.selectAll }}
4814
- </mat-checkbox>
4815
- }
4816
- @if (!field.autocompleteComponent) {
4817
- @for (item of optionsFiltered$ | async; track item) {
4818
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4819
- }
4820
- } @else {
4821
- @for (item of optionsFiltered$ | async; track item) {
4822
- <mat-option [value]="item" [disabled]="item?.disabled">
4823
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4824
- </mat-option>
4825
- }
4826
- }
4827
- } @else {
4828
- <mat-option class="hide-checkbox" disabled
4829
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4830
- ></mat-option>
4831
- }
4832
- }
4833
- </mat-select>
4834
-
4835
- @if (field.subComponents || field.clearable) {
4836
- <div matSuffix>
4837
- <ng-content></ng-content>
4838
- </div>
4839
- }
4840
-
4841
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4842
- </mat-form-field>
4843
- `, isInline: true, styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n", ".selectAll{padding:0 16px 0 5px;display:flex!important}\n", ".selectAll .mdc-form-field{width:100%}\n", ".selectAll .mdc-form-field .mdc-label{width:100%;min-height:48px;align-items:center;display:flex}\n", ".selectAll .mdc-form-field .mdc-checkbox__ripple{display:none!important}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i4$1.MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: NgxMatSelectSearchModule }, { kind: "component", type: i4$3.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti", "recreateValuesArray"], outputs: ["toggleAll"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
4844
- }
4845
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectLazySearchComponent, decorators: [{
4846
- type: Component,
4847
- args: [{ selector: 'kles-form-select-lazy-search', template: `
4848
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
4849
- @if (label()) {
4850
- <mat-label>{{ label() }}</mat-label>
4851
- }
4852
-
4853
- <mat-select
4854
- [matTooltip]="tooltip()"
4855
- [attr.id]="field.id"
4856
- [ngClass]="ngClass()"
4857
- (openedChange)="openChange($event)"
4858
- [compareWith]="compareFn"
4859
- [panelWidth]="field.panelWidth || 'auto'"
4860
- [placeholder]="placeholder()"
4861
- [formControlName]="field.name"
4862
- [multiple]="field.multiple"
4863
- >
4864
- @if (field.triggerComponent) {
4865
- <mat-select-trigger>
4866
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
4867
- </mat-select-trigger>
4868
- }
4869
- @if (field.virtualScroll) {
4870
- <mat-option>
4871
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4872
- </mat-option>
4873
-
4874
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
4875
- @if (!isLoading()) {
4876
- @if (field.multiple) {
4877
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4878
- {{ intl.selectAll }}
4879
- </mat-checkbox>
4880
- }
4881
- @if (!field.autocompleteComponent) {
4882
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4883
-
4884
- @if (field.multiple) {
4885
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4886
- <mat-option [value]="item" style="display:none">
4887
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4888
- </mat-option>
4889
- }
4890
- }
4891
- @if (!field.multiple && group.controls[field.name].value) {
4892
- @for (item of [group?.controls[field.name]?.value]; track item) {
4893
- <mat-option [value]="item" style="display:none">
4894
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4895
- </mat-option>
4896
- }
4897
- }
4898
- } @else {
4899
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
4900
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4901
- </mat-option>
4902
-
4903
- @if (field.multiple) {
4904
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4905
- <mat-option [value]="item" style="display:none">
4906
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4907
- </mat-option>
4908
- }
4909
- }
4910
- @if (!field.multiple && group.controls[field.name].value) {
4911
- @for (item of [group?.controls[field.name]?.value]; track item) {
4912
- <mat-option [value]="item" style="display:none">
4913
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4914
- </mat-option>
4915
- }
4916
- }
4917
- }
4918
- } @else {
4919
- <mat-option class="hide-checkbox" disabled
4920
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4921
- ></mat-option>
4922
- }
4923
- </cdk-virtual-scroll-viewport>
4924
- } @else {
4925
- <mat-option>
4926
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4927
- </mat-option>
4928
-
4929
- @if (!isLoading()) {
4930
- @if (field.multiple) {
4931
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4932
- {{ intl.selectAll }}
4933
- </mat-checkbox>
4934
- }
4935
- @if (!field.autocompleteComponent) {
4936
- @for (item of optionsFiltered$ | async; track item) {
4937
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4938
- }
4939
- } @else {
4940
- @for (item of optionsFiltered$ | async; track item) {
4941
- <mat-option [value]="item" [disabled]="item?.disabled">
4942
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4943
- </mat-option>
4944
- }
4945
- }
4946
- } @else {
4947
- <mat-option class="hide-checkbox" disabled
4948
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4949
- ></mat-option>
4950
- }
4951
- }
4952
- </mat-select>
4953
-
4954
- @if (field.subComponents || field.clearable) {
4955
- <div matSuffix>
4956
- <ng-content></ng-content>
4957
- </div>
4958
- }
4959
-
4960
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4961
- </mat-form-field>
4962
- `, standalone: true, imports: [CommonModule, KlesTransformPipe, MatErrorMessageDirective, MatFormFieldModule, MatProgressSpinnerModule, MatSelectModule, KlesComponentDirective, ReactiveFormsModule, NgxMatSelectSearchModule, ScrollingModule, MatTooltipModule], styles: [".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n", ".selectAll{padding:0 16px 0 5px;display:flex!important}\n", ".selectAll .mdc-form-field{width:100%}\n", ".selectAll .mdc-form-field .mdc-label{width:100%;min-height:48px;align-items:center;display:flex}\n", ".selectAll .mdc-form-field .mdc-checkbox__ripple{display:none!important}\n", "::ng-deep .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n"] }]
4963
- }] });
4964
-
4965
- class KlesFabComponent extends KlesButtonBase {
4966
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4967
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFabComponent, isStandalone: true, selector: "kles-fab", providers: [
4968
- {
4969
- provide: NG_VALUE_ACCESSOR,
4970
- useExisting: forwardRef(() => KlesFabComponent),
4971
- multi: true
3865
+ class KlesFabComponent extends KlesButtonBase {
3866
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3867
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFabComponent, isStandalone: true, selector: "kles-fab", providers: [
3868
+ {
3869
+ provide: NG_VALUE_ACCESSOR,
3870
+ useExisting: forwardRef(() => KlesFabComponent),
3871
+ multi: true
4972
3872
  }
4973
3873
  ], usesInheritance: true, ngImport: i0, template: `
4974
3874
  <button matFab [extended]="!!label" [type]="type" [ngClass]="classButton" [color]="(color)?color:'primary'" [disabled]="disabled"
@@ -4983,7 +3883,7 @@ class KlesFabComponent extends KlesButtonBase {
4983
3883
  <mat-icon svgIcon="{{iconSvg}}"></mat-icon>
4984
3884
  }
4985
3885
  </button>
4986
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$4.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] }); }
3886
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] }); }
4987
3887
  }
4988
3888
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, decorators: [{
4989
3889
  type: Component,
@@ -5087,7 +3987,7 @@ class KlesMiniFabComponent extends KlesButtonBase {
5087
3987
  <mat-icon svgIcon="{{iconSvg}}"></mat-icon>
5088
3988
  }
5089
3989
  </button>
5090
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$4.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }] }); }
3990
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }] }); }
5091
3991
  }
5092
3992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMiniFabComponent, decorators: [{
5093
3993
  type: Component,
@@ -5180,7 +4080,7 @@ class KlesIconButtonComponent extends KlesButtonBase {
5180
4080
  <mat-icon svgIcon="{{ iconSvg }}"></mat-icon>
5181
4081
  }
5182
4082
  </button>
5183
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
4083
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
5184
4084
  }
5185
4085
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesIconButtonComponent, decorators: [{
5186
4086
  type: Component,
@@ -5353,7 +4253,7 @@ class KlesFormSelectionListSearchComponent extends KlesFieldAbstract {
5353
4253
  }
5354
4254
  </mat-selection-list>
5355
4255
  </div>
5356
- `, isInline: true, styles: [".selection-list{display:flex;flex-direction:column;gap:5px}\n", "mat-selection-list{width:100%;height:250px;overflow:auto;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i3.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i3.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i3.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$3.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i3$3.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
4256
+ `, isInline: true, styles: [".selection-list{display:flex;flex-direction:column;gap:5px}\n", "mat-selection-list{width:100%;height:250px;overflow:auto;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i4$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$3.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i3$3.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
5357
4257
  }
5358
4258
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectionListSearchComponent, decorators: [{
5359
4259
  type: Component,
@@ -5505,7 +4405,7 @@ let KlesFormCheckboxIndeterminateComponent = class KlesFormCheckboxIndeterminate
5505
4405
  label()
5506
4406
  }}</kles-checkbox-indeterminate>
5507
4407
  </div>
5508
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "component", type: KlesIndeterminateCheckboxComponent, selector: "kles-checkbox-indeterminate", inputs: ["label", "color"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
4408
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "component", type: KlesIndeterminateCheckboxComponent, selector: "kles-checkbox-indeterminate", inputs: ["label", "color"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
5509
4409
  };
5510
4410
  KlesFormCheckboxIndeterminateComponent = __decorate([
5511
4411
  FieldMapper({ type: EnumType.checkbox })
@@ -5630,7 +4530,7 @@ class KlesFormDateTimeComponent extends KlesFieldAbstract {
5630
4530
 
5631
4531
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
5632
4532
  </mat-form-field>
5633
- `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".suffix{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDatepickerModule }, { 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: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: KlesMaterialDatepickerModule }, { kind: "component", type: i4$5.KlesMatDatepicker, selector: "kles-mat-datepicker", outputs: ["timeSelected"], exportAs: ["klesMatDatepicker"] }] }); }
4533
+ `, isInline: true, styles: ["mat-form-field{width:100%}\n", ".suffix{display:flex;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDatepickerModule }, { 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: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "ngmodule", type: KlesMaterialDatepickerModule }, { kind: "component", type: i4$4.KlesMatDatepicker, selector: "kles-mat-datepicker", outputs: ["timeSelected"], exportAs: ["klesMatDatepicker"] }] }); }
5634
4534
  }
5635
4535
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormDateTimeComponent, decorators: [{
5636
4536
  type: Component,
@@ -5694,7 +4594,7 @@ class KlesFormCopyComponent {
5694
4594
  <button #tooltip="matTooltip" matIconButton color="primary" type="button" (click)="copy($event)" [matTooltipDisabled]="true" [matTooltip]="tooltipText" matTooltipPosition="above">
5695
4595
  <mat-icon>content_copy</mat-icon>
5696
4596
  </button>
5697
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ClipboardModule }] }); }
4597
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ClipboardModule }] }); }
5698
4598
  }
5699
4599
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormCopyComponent, decorators: [{
5700
4600
  type: Component,
@@ -5811,7 +4711,7 @@ let KlesFormActionMenuComponent = class KlesFormActionMenuComponent extends Kles
5811
4711
  </button>
5812
4712
  }
5813
4713
  </mat-menu>
5814
- `, isInline: true, styles: [".kles-action-menu__warn{color:var(--mat-sys-error)}.kles-action-menu__warn mat-icon{color:var(--mat-sys-error)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4714
+ `, isInline: true, styles: [".kles-action-menu__warn{color:var(--mat-sys-error)}.kles-action-menu__warn mat-icon{color:var(--mat-sys-error)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i3$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5815
4715
  };
5816
4716
  KlesFormActionMenuComponent = __decorate([
5817
4717
  FieldMapper({
@@ -5909,7 +4809,7 @@ class KlesFormTileComponent extends KlesFieldAbstract {
5909
4809
  }
5910
4810
  </div>
5911
4811
  </div>
5912
- `, isInline: true, styles: [":host{display:flex;justify-content:inherit}.kles-tile{display:flex;align-items:center;min-width:0;gap:12px;padding:8px}.kles-tile__image{width:36px;height:36px;flex:0 0 36px;object-fit:contain}.kles-tile__content{display:flex;flex-direction:column;min-width:0;gap:2px}.kles-tile__label{overflow:hidden;color:var(--mat-sys-on-surface);font-size:14px;font-weight:500;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.kles-tile__hint{overflow:hidden;color:var(--mat-sys-on-surface-variant);font-size:12px;font-weight:400;line-height:16px;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4812
+ `, isInline: true, styles: [":host{display:flex;justify-content:inherit}.kles-tile{display:flex;align-items:center;min-width:0;gap:12px;padding:8px}.kles-tile__image{width:36px;height:36px;flex:0 0 36px;object-fit:contain}.kles-tile__content{display:flex;flex-direction:column;min-width:0;gap:2px}.kles-tile__label{overflow:hidden;color:var(--mat-sys-on-surface);font-size:14px;font-weight:500;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.kles-tile__hint{overflow:hidden;color:var(--mat-sys-on-surface-variant);font-size:12px;font-weight:400;line-height:16px;text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5913
4813
  }
5914
4814
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormTileComponent, decorators: [{
5915
4815
  type: Component,
@@ -6218,7 +5118,7 @@ let KlesFormCurrencyComponent = class KlesFormCurrencyComponent extends KlesFiel
6218
5118
 
6219
5119
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6220
5120
  </mat-form-field>
6221
- `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "directive", type: KlesCurrencyValueAccessorDirective, selector: "input[klesCurrency]", inputs: ["currency", "locale", "currencyDisplay", "minimumFractionDigits", "maximumFractionDigits", "useGrouping", "allowNegative"] }] }); }
5121
+ `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "directive", type: KlesCurrencyValueAccessorDirective, selector: "input[klesCurrency]", inputs: ["currency", "locale", "currencyDisplay", "minimumFractionDigits", "maximumFractionDigits", "useGrouping", "allowNegative"] }] }); }
6222
5122
  };
6223
5123
  KlesFormCurrencyComponent = __decorate([
6224
5124
  FieldMapper({
@@ -6386,7 +5286,7 @@ let KlesFormStatusComponent = class KlesFormStatusComponent extends KlesFieldAbs
6386
5286
  </span>
6387
5287
  }
6388
5288
  </span>
6389
- `, isInline: true, styles: [":host{display:flex;justify-content:inherit}.kles-status{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;color:var(--kles-status-color, var(--mat-sys-on-surface-variant));background:var(--kles-status-container, var(--mat-sys-surface-container-high))}.kles-status--chip{min-height:28px;padding:3px 10px;border-radius:999px;font:var(--mat-sys-label-medium)}.kles-status--badge{min-height:22px;padding:2px 7px;border-radius:4px;font:var(--mat-sys-label-small)}.kles-status--text{padding:0;border-radius:0;background:transparent}.kles-status__icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex:0 0 20px;line-height:20px;overflow:visible;vertical-align:middle}.kles-status__icon svg{width:100%;height:100%;overflow:visible}.kles-status__dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:currentColor}.kles-status__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kles-status--disabled{opacity:.56}.kles-status--neutral{--kles-status-color: var(--mat-sys-on-surface-variant);--kles-status-container: var(--mat-sys-surface-container-high)}.kles-status--info{--kles-status-color: var(--mat-sys-on-primary-container);--kles-status-container: var(--mat-sys-primary-container)}.kles-status--success{--kles-status-color: var(--kles-status-success-color, #1b5e20);--kles-status-container: var(--kles-status-success-container, #d7f5df)}.kles-status--warning{--kles-status-color: var(--kles-status-warning-color, #7a4f00);--kles-status-container: var(--kles-status-warning-container, #ffecb3)}.kles-status--error{--kles-status-color: var(--mat-sys-on-error-container);--kles-status-container: var(--mat-sys-error-container)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5289
+ `, isInline: true, styles: [":host{display:flex;justify-content:inherit}.kles-status{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;color:var(--kles-status-color, var(--mat-sys-on-surface-variant));background:var(--kles-status-container, var(--mat-sys-surface-container-high))}.kles-status--chip{min-height:28px;padding:3px 10px;border-radius:999px;font:var(--mat-sys-label-medium)}.kles-status--badge{min-height:22px;padding:2px 7px;border-radius:4px;font:var(--mat-sys-label-small)}.kles-status--text{padding:0;border-radius:0;background:transparent}.kles-status__icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex:0 0 20px;line-height:20px;overflow:visible;vertical-align:middle}.kles-status__icon svg{width:100%;height:100%;overflow:visible}.kles-status__dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:currentColor}.kles-status__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kles-status--disabled{opacity:.56}.kles-status--neutral{--kles-status-color: var(--mat-sys-on-surface-variant);--kles-status-container: var(--mat-sys-surface-container-high)}.kles-status--info{--kles-status-color: var(--mat-sys-on-primary-container);--kles-status-container: var(--mat-sys-primary-container)}.kles-status--success{--kles-status-color: var(--kles-status-success-color, #1b5e20);--kles-status-container: var(--kles-status-success-container, #d7f5df)}.kles-status--warning{--kles-status-color: var(--kles-status-warning-color, #7a4f00);--kles-status-container: var(--kles-status-warning-container, #ffecb3)}.kles-status--error{--kles-status-color: var(--mat-sys-on-error-container);--kles-status-container: var(--mat-sys-error-container)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6390
5290
  };
6391
5291
  KlesFormStatusComponent = __decorate([
6392
5292
  FieldMapper({
@@ -6588,7 +5488,7 @@ class KlesFormChipGridComponent extends KlesFieldAbstract {
6588
5488
  }
6589
5489
  </mat-autocomplete>
6590
5490
  </mat-form-field>
6591
- `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", ".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i2$3.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$3.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i4$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
5491
+ `, isInline: true, styles: [".suffix{display:flex;align-items:center}\n", ".field-bottom .mat-mdc-form-field-bottom-align:before{content:none!important}\n", ".loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", "mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i2$2.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i2$2.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i2$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i2$2.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i5.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: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
6592
5492
  }
6593
5493
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormChipGridComponent, decorators: [{
6594
5494
  type: Component,
@@ -6651,7 +5551,6 @@ const components = [
6651
5551
  KlesFormButtonCheckerComponent,
6652
5552
  KlesButtonFileComponent,
6653
5553
  KlesFormButtonFileComponent,
6654
- KlesFormSelectComponent,
6655
5554
  KlesFormDateComponent,
6656
5555
  KlesFormDateTimeComponent,
6657
5556
  KlesFormRadioComponent,
@@ -6665,7 +5564,6 @@ const components = [
6665
5564
  KlesFormChipComponent,
6666
5565
  KlesFormGroupComponent,
6667
5566
  KlesFormIconComponent,
6668
- KlesFormSelectSearchComponent,
6669
5567
  KlesFormLineBreakComponent,
6670
5568
  KlesFormLinkComponent,
6671
5569
  KlesFormSlideToggleComponent,
@@ -6674,7 +5572,6 @@ const components = [
6674
5572
  KlesFormArrayComponent,
6675
5573
  KlesFormRangeComponent,
6676
5574
  KlesFormClearComponent,
6677
- KlesFormSelectLazySearchComponent,
6678
5575
  KlesFormFabComponent,
6679
5576
  KlesFabComponent,
6680
5577
  KlesMiniFabComponent,
@@ -6694,7 +5591,7 @@ const pipes = [KlesTransformPipe, ArrayFormatPipe];
6694
5591
  class KlesMaterialDynamicformsModule {
6695
5592
  static { this.declarations = [components, directives, pipes]; }
6696
5593
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMaterialDynamicformsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
6697
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: KlesMaterialDynamicformsModule, imports: [CommonModule, ReactiveFormsModule, FormsModule, MaterialModule, NgxMatSelectSearchModule, KlesDynamicFormComponent,
5594
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: KlesMaterialDynamicformsModule, imports: [CommonModule, ReactiveFormsModule, FormsModule, MaterialModule, KlesDynamicFormComponent,
6698
5595
  KlesFormLabelComponent,
6699
5596
  KlesFormInputComponent,
6700
5597
  KlesFormInputClearableComponent,
@@ -6707,7 +5604,6 @@ class KlesMaterialDynamicformsModule {
6707
5604
  KlesFormButtonCheckerComponent,
6708
5605
  KlesButtonFileComponent,
6709
5606
  KlesFormButtonFileComponent,
6710
- KlesFormSelectComponent,
6711
5607
  KlesFormDateComponent,
6712
5608
  KlesFormDateTimeComponent,
6713
5609
  KlesFormRadioComponent,
@@ -6721,7 +5617,6 @@ class KlesMaterialDynamicformsModule {
6721
5617
  KlesFormChipComponent,
6722
5618
  KlesFormGroupComponent,
6723
5619
  KlesFormIconComponent,
6724
- KlesFormSelectSearchComponent,
6725
5620
  KlesFormLineBreakComponent,
6726
5621
  KlesFormLinkComponent,
6727
5622
  KlesFormSlideToggleComponent,
@@ -6730,7 +5625,6 @@ class KlesMaterialDynamicformsModule {
6730
5625
  KlesFormArrayComponent,
6731
5626
  KlesFormRangeComponent,
6732
5627
  KlesFormClearComponent,
6733
- KlesFormSelectLazySearchComponent,
6734
5628
  KlesFormFabComponent,
6735
5629
  KlesFabComponent,
6736
5630
  KlesMiniFabComponent,
@@ -6756,7 +5650,6 @@ class KlesMaterialDynamicformsModule {
6756
5650
  KlesFormButtonCheckerComponent,
6757
5651
  KlesButtonFileComponent,
6758
5652
  KlesFormButtonFileComponent,
6759
- KlesFormSelectComponent,
6760
5653
  KlesFormDateComponent,
6761
5654
  KlesFormDateTimeComponent,
6762
5655
  KlesFormRadioComponent,
@@ -6770,7 +5663,6 @@ class KlesMaterialDynamicformsModule {
6770
5663
  KlesFormChipComponent,
6771
5664
  KlesFormGroupComponent,
6772
5665
  KlesFormIconComponent,
6773
- KlesFormSelectSearchComponent,
6774
5666
  KlesFormLineBreakComponent,
6775
5667
  KlesFormLinkComponent,
6776
5668
  KlesFormSlideToggleComponent,
@@ -6779,7 +5671,6 @@ class KlesMaterialDynamicformsModule {
6779
5671
  KlesFormArrayComponent,
6780
5672
  KlesFormRangeComponent,
6781
5673
  KlesFormClearComponent,
6782
- KlesFormSelectLazySearchComponent,
6783
5674
  KlesFormFabComponent,
6784
5675
  KlesFabComponent,
6785
5676
  KlesMiniFabComponent,
@@ -6793,7 +5684,7 @@ class KlesMaterialDynamicformsModule {
6793
5684
  KlesFormCurrencyComponent,
6794
5685
  KlesFormStatusComponent,
6795
5686
  KlesFormChipGridComponent, KlesTransformPipe, ArrayFormatPipe, KlesDynamicFieldDirective, KlesComponentDirective, MatErrorMessageDirective, MatErrorFormDirective] }); }
6796
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMaterialDynamicformsModule, providers: [{ provide: ErrorStateMatcher, useClass: KlesFormErrorStateMatcher }, pipes], imports: [CommonModule, ReactiveFormsModule, FormsModule, MaterialModule, NgxMatSelectSearchModule, KlesDynamicFormComponent,
5687
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMaterialDynamicformsModule, providers: [{ provide: ErrorStateMatcher, useClass: KlesFormErrorStateMatcher }, pipes], imports: [CommonModule, ReactiveFormsModule, FormsModule, MaterialModule, KlesDynamicFormComponent,
6797
5688
  KlesFormLabelComponent,
6798
5689
  KlesFormInputComponent,
6799
5690
  KlesFormInputClearableComponent,
@@ -6806,7 +5697,6 @@ class KlesMaterialDynamicformsModule {
6806
5697
  KlesFormButtonCheckerComponent,
6807
5698
  KlesButtonFileComponent,
6808
5699
  KlesFormButtonFileComponent,
6809
- KlesFormSelectComponent,
6810
5700
  KlesFormDateComponent,
6811
5701
  KlesFormDateTimeComponent,
6812
5702
  KlesFormRadioComponent,
@@ -6820,7 +5710,6 @@ class KlesMaterialDynamicformsModule {
6820
5710
  KlesFormChipComponent,
6821
5711
  KlesFormGroupComponent,
6822
5712
  KlesFormIconComponent,
6823
- KlesFormSelectSearchComponent,
6824
5713
  KlesFormLinkComponent,
6825
5714
  KlesFormSlideToggleComponent,
6826
5715
  KlesFormSelectionListComponent,
@@ -6828,7 +5717,6 @@ class KlesMaterialDynamicformsModule {
6828
5717
  KlesFormArrayComponent,
6829
5718
  KlesFormRangeComponent,
6830
5719
  KlesFormClearComponent,
6831
- KlesFormSelectLazySearchComponent,
6832
5720
  KlesFormFabComponent,
6833
5721
  KlesFabComponent,
6834
5722
  KlesMiniFabComponent,
@@ -6846,7 +5734,7 @@ class KlesMaterialDynamicformsModule {
6846
5734
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMaterialDynamicformsModule, decorators: [{
6847
5735
  type: NgModule,
6848
5736
  args: [{
6849
- imports: [CommonModule, ReactiveFormsModule, FormsModule, MaterialModule, NgxMatSelectSearchModule, components, directives, pipes],
5737
+ imports: [CommonModule, ReactiveFormsModule, FormsModule, MaterialModule, components, directives, pipes],
6850
5738
  providers: [{ provide: ErrorStateMatcher, useClass: KlesFormErrorStateMatcher }, pipes],
6851
5739
  exports: [components, pipes, directives],
6852
5740
  schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA],
@@ -6888,6 +5776,695 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
6888
5776
  }]
6889
5777
  }] });
6890
5778
 
5779
+ /** Internal search input used by the Kles select field. */
5780
+ class KlesSelectSearchInputComponent {
5781
+ constructor() {
5782
+ this.control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
5783
+ this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
5784
+ this.ariaLabel = input('Search options', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
5785
+ this.clearAriaLabel = input('Clear search', ...(ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []));
5786
+ this.searching = input(false, ...(ngDevMode ? [{ debugName: "searching" }] : /* istanbul ignore next */ []));
5787
+ this.inputElement = viewChild('searchInput', ...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
5788
+ this.destroyRef = inject(DestroyRef);
5789
+ this.matSelect = inject(MatSelect);
5790
+ this.matOption = inject(MatOption$1);
5791
+ }
5792
+ ngOnInit() {
5793
+ this.matOption.disabled = true;
5794
+ const optionElement = this.matOption._getHostElement();
5795
+ optionElement.classList.add('kles-select-search-option');
5796
+ optionElement.setAttribute('role', 'presentation');
5797
+ }
5798
+ ngAfterViewInit() {
5799
+ this.matSelect.openedChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((opened) => {
5800
+ if (opened) {
5801
+ setTimeout(() => {
5802
+ this.focusInput();
5803
+ this.installPanelKeyboardGuard();
5804
+ });
5805
+ }
5806
+ else {
5807
+ this.removePanelKeyboardGuard?.();
5808
+ this.removePanelKeyboardGuard = undefined;
5809
+ }
5810
+ });
5811
+ }
5812
+ ngOnDestroy() {
5813
+ this.removePanelKeyboardGuard?.();
5814
+ }
5815
+ onKeydown(event) {
5816
+ if (event.key.length === 1) {
5817
+ event.stopPropagation();
5818
+ }
5819
+ if (event.key === 'Home' || event.key === 'End') {
5820
+ event.preventDefault();
5821
+ }
5822
+ if (this.matSelect.multiple && event.key === 'Enter') {
5823
+ setTimeout(() => this.focusInput());
5824
+ }
5825
+ }
5826
+ preserveInputFocus(event) {
5827
+ event.preventDefault();
5828
+ event.stopPropagation();
5829
+ }
5830
+ clearSearch(event) {
5831
+ event.preventDefault();
5832
+ event.stopPropagation();
5833
+ this.control().setValue('');
5834
+ this.focusInput();
5835
+ }
5836
+ focusInput() {
5837
+ const panel = this.matSelect.panel?.nativeElement;
5838
+ const inputElement = this.inputElement();
5839
+ if (!panel || !inputElement) {
5840
+ return;
5841
+ }
5842
+ const scrollTop = panel.scrollTop;
5843
+ inputElement.nativeElement.focus();
5844
+ panel.scrollTop = scrollTop;
5845
+ }
5846
+ /**
5847
+ * Material 21 renders the panel inline. Without this listener the panel and
5848
+ * the mat-select host both process the same keydown and skip an option.
5849
+ */
5850
+ installPanelKeyboardGuard() {
5851
+ this.removePanelKeyboardGuard?.();
5852
+ const panel = this.matSelect.panel?.nativeElement;
5853
+ if (!panel) {
5854
+ return;
5855
+ }
5856
+ const handler = (event) => {
5857
+ if (event.key !== 'Escape') {
5858
+ event.stopPropagation();
5859
+ }
5860
+ };
5861
+ panel.addEventListener('keydown', handler);
5862
+ this.removePanelKeyboardGuard = () => panel.removeEventListener('keydown', handler);
5863
+ }
5864
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesSelectSearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5865
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesSelectSearchInputComponent, isStandalone: true, selector: "kles-select-search-input", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, clearAriaLabel: { classPropertyName: "clearAriaLabel", publicName: "clearAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, searching: { classPropertyName: "searching", publicName: "searching", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
5866
+ <div class="kles-select-search-row">
5867
+ <mat-icon class="kles-select-search-icon" aria-hidden="true">search</mat-icon>
5868
+ <input
5869
+ #searchInput
5870
+ class="kles-select-search-input"
5871
+ type="search"
5872
+ autocomplete="off"
5873
+ tabindex="-1"
5874
+ [formControl]="control()"
5875
+ [placeholder]="placeholder()"
5876
+ [attr.aria-label]="ariaLabel()"
5877
+ (keydown)="onKeydown($event)"
5878
+ />
5879
+ @if (searching()) {
5880
+ <mat-spinner class="kles-select-search-spinner" diameter="16" />
5881
+ } @else if (control().value) {
5882
+ <button
5883
+ mat-icon-button
5884
+ type="button"
5885
+ class="kles-select-search-clear"
5886
+ [attr.aria-label]="clearAriaLabel()"
5887
+ (mousedown)="preserveInputFocus($event)"
5888
+ (click)="clearSearch($event)"
5889
+ >
5890
+ <mat-icon>close</mat-icon>
5891
+ </button>
5892
+ }
5893
+ </div>
5894
+ `, isInline: true, styles: ["kles-select-search-input{display:block;width:100%}.kles-select-panel .kles-select-search-row{position:relative;display:flex;align-items:center;width:100%;min-height:48px;background:var(--mat-sys-surface-container, var(--mat-select-panel-background-color, white));box-shadow:inset 0 -1px 0 var(--mat-sys-outline-variant, currentColor)}.kles-select-panel .kles-select-search-icon{position:absolute;inset-inline-start:14px;width:20px;height:20px;color:var(--mat-sys-on-surface-variant, currentColor);font-size:20px;line-height:20px;pointer-events:none}.kles-select-panel .kles-select-search-input{box-sizing:border-box;width:100%;height:47px;padding:0 44px;border:0;outline:0;color:currentColor;background:transparent;font:inherit}.kles-select-panel .kles-select-search-input::placeholder{color:var(--mat-sys-on-surface-variant, currentColor);opacity:.8}.kles-select-panel .kles-select-search-input::-webkit-search-cancel-button{display:none}.kles-select-panel .kles-select-search-clear{position:absolute;inset-inline-end:4px;width:40px;height:40px;color:currentColor;cursor:pointer}.kles-select-panel .kles-select-search-spinner{position:absolute;inset-inline-end:16px}.kles-select-panel .mat-mdc-option.kles-select-search-option{position:sticky;top:-8px;z-index:2;min-height:48px;margin-top:-8px;padding:0;opacity:1;pointer-events:all;background:var(--mat-sys-surface-container, var(--mat-select-panel-background-color, white))}.kles-select-panel .mat-mdc-option.kles-select-search-option .mat-pseudo-checkbox{display:none}.kles-select-panel .mat-mdc-option.kles-select-search-option .mdc-list-item__primary-text{width:100%;opacity:1}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], encapsulation: i0.ViewEncapsulation.None }); }
5895
+ }
5896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesSelectSearchInputComponent, decorators: [{
5897
+ type: Component,
5898
+ args: [{ selector: 'kles-select-search-input', standalone: true, imports: [ReactiveFormsModule, MatIconButton, MatIcon, MatProgressSpinner], template: `
5899
+ <div class="kles-select-search-row">
5900
+ <mat-icon class="kles-select-search-icon" aria-hidden="true">search</mat-icon>
5901
+ <input
5902
+ #searchInput
5903
+ class="kles-select-search-input"
5904
+ type="search"
5905
+ autocomplete="off"
5906
+ tabindex="-1"
5907
+ [formControl]="control()"
5908
+ [placeholder]="placeholder()"
5909
+ [attr.aria-label]="ariaLabel()"
5910
+ (keydown)="onKeydown($event)"
5911
+ />
5912
+ @if (searching()) {
5913
+ <mat-spinner class="kles-select-search-spinner" diameter="16" />
5914
+ } @else if (control().value) {
5915
+ <button
5916
+ mat-icon-button
5917
+ type="button"
5918
+ class="kles-select-search-clear"
5919
+ [attr.aria-label]="clearAriaLabel()"
5920
+ (mousedown)="preserveInputFocus($event)"
5921
+ (click)="clearSearch($event)"
5922
+ >
5923
+ <mat-icon>close</mat-icon>
5924
+ </button>
5925
+ }
5926
+ </div>
5927
+ `, encapsulation: ViewEncapsulation.None, styles: ["kles-select-search-input{display:block;width:100%}.kles-select-panel .kles-select-search-row{position:relative;display:flex;align-items:center;width:100%;min-height:48px;background:var(--mat-sys-surface-container, var(--mat-select-panel-background-color, white));box-shadow:inset 0 -1px 0 var(--mat-sys-outline-variant, currentColor)}.kles-select-panel .kles-select-search-icon{position:absolute;inset-inline-start:14px;width:20px;height:20px;color:var(--mat-sys-on-surface-variant, currentColor);font-size:20px;line-height:20px;pointer-events:none}.kles-select-panel .kles-select-search-input{box-sizing:border-box;width:100%;height:47px;padding:0 44px;border:0;outline:0;color:currentColor;background:transparent;font:inherit}.kles-select-panel .kles-select-search-input::placeholder{color:var(--mat-sys-on-surface-variant, currentColor);opacity:.8}.kles-select-panel .kles-select-search-input::-webkit-search-cancel-button{display:none}.kles-select-panel .kles-select-search-clear{position:absolute;inset-inline-end:4px;width:40px;height:40px;color:currentColor;cursor:pointer}.kles-select-panel .kles-select-search-spinner{position:absolute;inset-inline-end:16px}.kles-select-panel .mat-mdc-option.kles-select-search-option{position:sticky;top:-8px;z-index:2;min-height:48px;margin-top:-8px;padding:0;opacity:1;pointer-events:all;background:var(--mat-sys-surface-container, var(--mat-select-panel-background-color, white))}.kles-select-panel .mat-mdc-option.kles-select-search-option .mat-pseudo-checkbox{display:none}.kles-select-panel .mat-mdc-option.kles-select-search-option .mdc-list-item__primary-text{width:100%;opacity:1}\n"] }]
5928
+ }], propDecorators: { control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], clearAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearAriaLabel", required: false }] }], searching: [{ type: i0.Input, args: [{ isSignal: true, alias: "searching", required: false }] }], inputElement: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
5929
+
5930
+ let KlesFormSelectComponent = class KlesFormSelectComponent extends KlesFieldAbstract {
5931
+ constructor() {
5932
+ super(...arguments);
5933
+ this.searchControl = new FormControl('');
5934
+ this.selectAllControl = new FormControl(false, { nonNullable: true });
5935
+ this.selectAllIndeterminate = signal(false, ...(ngDevMode ? [{ debugName: "selectAllIndeterminate" }] : /* istanbul ignore next */ []));
5936
+ this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
5937
+ this.filteredOptions = signal([], ...(ngDevMode ? [{ debugName: "filteredOptions" }] : /* istanbul ignore next */ []));
5938
+ this.intl = inject(KlesDynamicFormIntl);
5939
+ this.changeDetectorRef = inject(ChangeDetectorRef);
5940
+ this.matSelect = viewChild(MatSelect, ...(ngDevMode ? [{ debugName: "matSelect" }] : /* istanbul ignore next */ []));
5941
+ this.virtualViewport = viewChild(CdkVirtualScrollViewport, ...(ngDevMode ? [{ debugName: "virtualViewport" }] : /* istanbul ignore next */ []));
5942
+ this.searchOptions = {};
5943
+ this.deferredQuery$ = new Subject();
5944
+ this.sourceOptions = [];
5945
+ this.visibleOptions = [];
5946
+ this.isPanelOpen = false;
5947
+ this.isDeferredSourceLoaded = false;
5948
+ this.compareFn = (first, second) => {
5949
+ if (this.field.property && first && second) {
5950
+ return first[this.field.property] === second[this.field.property];
5951
+ }
5952
+ return first === second;
5953
+ };
5954
+ }
5955
+ ngOnInit() {
5956
+ super.ngOnInit();
5957
+ this.searchOptions = this.normalizeSearchOptions();
5958
+ this.group.controls[this.field.name].valueChanges.pipe(takeUntil(this._onDestroy)).subscribe((values) => {
5959
+ this.updateSelectAllState(values);
5960
+ this.changeDetectorRef.markForCheck();
5961
+ });
5962
+ if (this.usesDeferredSource()) {
5963
+ const selected = this.selectedValues();
5964
+ this.sourceOptions = selected;
5965
+ this.setVisibleOptions(selected);
5966
+ // MatSelect cannot open without at least one MatOption. When search is
5967
+ // disabled, keep the loading option rendered until the deferred source
5968
+ // is requested on the first opening.
5969
+ this.isLoading.set(!this.isSearchEnabled() && selected.length === 0);
5970
+ this.initializeDeferredQueries();
5971
+ }
5972
+ else {
5973
+ this.loadInitialOptions();
5974
+ }
5975
+ if (this.isSearchEnabled() && !this.usesDeferredSource()) {
5976
+ this.searchControl.valueChanges
5977
+ .pipe(startWith$1(this.searchControl.value), debounce((value) => timer(value ? (this.searchOptions.debounceTime ?? this.field.debounceTime ?? 0) : 0)), distinctUntilChanged$1(), takeUntil(this._onDestroy))
5978
+ .subscribe((value) => this.applyLocalFilter(value || ''));
5979
+ }
5980
+ else if (this.isSearchEnabled()) {
5981
+ this.searchControl.valueChanges
5982
+ .pipe(debounce((value) => timer(value ? (this.searchOptions.debounceTime ?? this.field.debounceTime ?? 0) : 0)), distinctUntilChanged$1(), takeUntil(this._onDestroy))
5983
+ .subscribe((value) => {
5984
+ if (this.isPanelOpen) {
5985
+ this.deferredQuery$.next({ kind: 'search', value: value || '' });
5986
+ }
5987
+ });
5988
+ }
5989
+ }
5990
+ ngOnDestroy() {
5991
+ this.restoreMatSelectScroll?.();
5992
+ this.deferredQuery$.complete();
5993
+ super.ngOnDestroy();
5994
+ }
5995
+ ngAfterViewInit() {
5996
+ super.ngAfterViewInit();
5997
+ this.installMatSelectScrollCorrection();
5998
+ }
5999
+ isSearchEnabled() {
6000
+ return this.field.search === true || (this.field.search != null && typeof this.field.search === 'object');
6001
+ }
6002
+ panelClasses() {
6003
+ const classes = ['kles-select-panel'];
6004
+ if (this.field.virtualScroll) {
6005
+ classes.push('kles-select-virtual-panel');
6006
+ }
6007
+ if (this.isSearchEnabled()) {
6008
+ classes.push('kles-select-has-search');
6009
+ }
6010
+ return classes;
6011
+ }
6012
+ onOpenedChange(opened) {
6013
+ this.isPanelOpen = opened;
6014
+ if (this.usesDeferredSource()) {
6015
+ if (opened) {
6016
+ this.isDeferredSourceLoaded = false;
6017
+ // Keep the initial request alive while search terms replace each
6018
+ // other, otherwise switchMap cancels the baseline option loading.
6019
+ this.deferredOptionsRequest$ = this.resolveOptions().pipe(shareReplay$1({ bufferSize: 1, refCount: false }));
6020
+ }
6021
+ this.deferredQuery$.next(opened ? { kind: 'open', value: this.searchControl.value || '' } : { kind: 'close' });
6022
+ }
6023
+ if (!opened && this.isSearchEnabled() && (this.searchOptions.clearOnClose ?? true)) {
6024
+ this.searchControl.setValue('');
6025
+ }
6026
+ if (opened && this.field.virtualScroll) {
6027
+ setTimeout(() => {
6028
+ this.virtualViewport()?.scrollToIndex(0);
6029
+ this.virtualViewport()?.checkViewportSize();
6030
+ });
6031
+ }
6032
+ }
6033
+ toggleVisibleOptions(state) {
6034
+ const selected = this.selectedValues();
6035
+ const enabledOptions = this.visibleOptions.filter((option) => !option?.disabled);
6036
+ if (!state.checked) {
6037
+ const remaining = selected.filter((value) => !enabledOptions.some((option) => this.compareFn(value, option)));
6038
+ this.group.controls[this.field.name].patchValue(remaining);
6039
+ return;
6040
+ }
6041
+ if (enabledOptions.length > 0) {
6042
+ const added = enabledOptions.filter((option) => !selected.some((value) => this.compareFn(value, option)));
6043
+ this.group.controls[this.field.name].patchValue([...selected, ...added]);
6044
+ }
6045
+ }
6046
+ getHiddenSelectedOptions() {
6047
+ const selected = this.selectedValues();
6048
+ if (this.field.virtualScroll) {
6049
+ return selected;
6050
+ }
6051
+ return selected.filter((selectedOption) => !this.visibleOptions.some((option) => this.compareFn(selectedOption, option)));
6052
+ }
6053
+ normalizeSearchOptions() {
6054
+ if (!this.isSearchEnabled()) {
6055
+ return {};
6056
+ }
6057
+ const configured = typeof this.field.search === 'object' ? this.field.search : {};
6058
+ return {
6059
+ mode: configured.mode ?? 'local',
6060
+ keys: configured.keys ?? this.field.searchKeys,
6061
+ debounceTime: configured.debounceTime ?? this.field.debounceTime,
6062
+ minLength: configured.minLength ?? 0,
6063
+ clearOnClose: configured.clearOnClose ?? true,
6064
+ placeholder: configured.placeholder,
6065
+ ariaLabel: configured.ariaLabel,
6066
+ };
6067
+ }
6068
+ usesDeferredSource() {
6069
+ return !!this.field.lazy || this.searchOptions.mode === 'remote';
6070
+ }
6071
+ loadInitialOptions() {
6072
+ if (isObservable(this.field.options) || typeof this.field.options === 'function') {
6073
+ this.isLoading.set(true);
6074
+ }
6075
+ this.resolveOptions()
6076
+ .pipe(takeUntil(this._onDestroy))
6077
+ .subscribe((options) => {
6078
+ const safeOptions = options ?? [];
6079
+ this.isLoading.set(false);
6080
+ this.sourceOptions = safeOptions;
6081
+ if (this.isSearchEnabled()) {
6082
+ this.applyLocalFilter(this.searchControl.value || '');
6083
+ }
6084
+ else {
6085
+ this.setVisibleOptions(safeOptions);
6086
+ }
6087
+ });
6088
+ }
6089
+ initializeDeferredQueries() {
6090
+ this.deferredQuery$
6091
+ .pipe(switchMap$1((query) => {
6092
+ if (query.kind === 'close') {
6093
+ const selected = this.selectedValues();
6094
+ // Preserve a disabled loading option when the closed select
6095
+ // would otherwise contain no option and could not reopen.
6096
+ return of({ loading: !this.isSearchEnabled() && selected.length === 0, options: selected, sourceOptions: undefined });
6097
+ }
6098
+ const search = query.value || '';
6099
+ const searchLength = search.trim().length;
6100
+ const isBelowMinimumLength = searchLength > 0 && searchLength < (this.searchOptions.minLength ?? 0);
6101
+ if (query.kind === 'search' && isBelowMinimumLength) {
6102
+ if (this.isDeferredSourceLoaded) {
6103
+ return of({ loading: false, options: this.sourceOptions, sourceOptions: undefined });
6104
+ }
6105
+ const options$ = this.deferredOptionsRequest$ ?? this.resolveOptions();
6106
+ return concat(of({ loading: true, options: [], sourceOptions: undefined }), options$.pipe(map$1((options) => options ?? []), map$1((sourceOptions) => ({ loading: false, options: sourceOptions, sourceOptions }))));
6107
+ }
6108
+ if (query.kind === 'search' && this.searchOptions.mode !== 'remote' && this.isDeferredSourceLoaded) {
6109
+ return of({ loading: false, options: this.filterOptions(this.sourceOptions, search), sourceOptions: undefined });
6110
+ }
6111
+ const options$ = this.searchOptions.mode === 'remote' && typeof this.field.options === 'function' && searchLength > 0
6112
+ ? this.resolveOptions(search)
6113
+ : (this.deferredOptionsRequest$ ?? this.resolveOptions());
6114
+ return concat(of({ loading: true, options: [], sourceOptions: undefined }), options$.pipe(map$1((options) => options ?? []), map$1((sourceOptions) => ({
6115
+ loading: false,
6116
+ sourceOptions: this.searchOptions.mode === 'remote' && searchLength > 0 ? undefined : sourceOptions,
6117
+ options: this.searchOptions.mode === 'remote' ? sourceOptions : this.filterOptions(sourceOptions, search),
6118
+ }))));
6119
+ }), takeUntil(this._onDestroy))
6120
+ .subscribe(({ loading, options, sourceOptions }) => {
6121
+ this.isLoading.set(loading);
6122
+ if (!loading) {
6123
+ if (sourceOptions !== undefined) {
6124
+ this.sourceOptions = sourceOptions;
6125
+ this.isDeferredSourceLoaded = true;
6126
+ }
6127
+ this.setVisibleOptions(options);
6128
+ }
6129
+ });
6130
+ }
6131
+ resolveOptions(search) {
6132
+ if (isObservable(this.field.options)) {
6133
+ return this.field.options;
6134
+ }
6135
+ if (typeof this.field.options === 'function') {
6136
+ return this.field.options(search, this.group.getRawValue());
6137
+ }
6138
+ return of(this.field.options ?? []);
6139
+ }
6140
+ applyLocalFilter(value) {
6141
+ const searchLength = value.trim().length;
6142
+ const options = searchLength > 0 && searchLength < (this.searchOptions.minLength ?? 0) ? this.sourceOptions : this.filterOptions(this.sourceOptions, value);
6143
+ this.setVisibleOptions(options);
6144
+ }
6145
+ setVisibleOptions(options) {
6146
+ this.visibleOptions = options;
6147
+ this.filteredOptions.set(options);
6148
+ this.updateSelectAllState(this.group.controls[this.field.name].value);
6149
+ this.changeDetectorRef.markForCheck();
6150
+ }
6151
+ filterOptions(options, value) {
6152
+ const search = value.trim().toLocaleLowerCase();
6153
+ if (!search) {
6154
+ return options;
6155
+ }
6156
+ const keys = this.searchOptions.keys ?? [];
6157
+ return options.filter((option) => {
6158
+ const keyMatch = keys.some((key) => this.normalizeSearchValue(option?.[key]).includes(search));
6159
+ const propertyMatch = this.field.property ? this.normalizeSearchValue(option?.[this.field.property]).includes(search) : false;
6160
+ return keyMatch || propertyMatch || (!keys.length && !this.field.property && this.normalizeSearchValue(option).includes(search));
6161
+ });
6162
+ }
6163
+ normalizeSearchValue(value) {
6164
+ return value == null ? '' : String(value).toLocaleLowerCase();
6165
+ }
6166
+ installMatSelectScrollCorrection() {
6167
+ if (this.restoreMatSelectScroll || (!this.isSearchEnabled() && !this.field.multiple)) {
6168
+ return;
6169
+ }
6170
+ const matSelect = this.matSelect();
6171
+ if (!matSelect) {
6172
+ return;
6173
+ }
6174
+ const originalScrollOptionIntoView = matSelect._scrollOptionIntoView;
6175
+ matSelect._scrollOptionIntoView = (index) => {
6176
+ const options = matSelect.options.toArray();
6177
+ const option = options[index];
6178
+ const optionElement = option?._getHostElement();
6179
+ if (optionElement?.classList.contains('kles-select-search-option')) {
6180
+ const firstOptionIndex = options.findIndex((candidate) => {
6181
+ const element = candidate._getHostElement();
6182
+ return !candidate.disabled && !element.classList.contains('kles-hidden-selected-option');
6183
+ });
6184
+ if (firstOptionIndex >= 0 && matSelect._keyManager.activeItemIndex !== firstOptionIndex) {
6185
+ matSelect._keyManager.setActiveItem(firstOptionIndex);
6186
+ }
6187
+ return;
6188
+ }
6189
+ originalScrollOptionIntoView.call(matSelect, index);
6190
+ requestAnimationFrame(() => this.keepOptionVisible(option?._getHostElement()));
6191
+ };
6192
+ this.restoreMatSelectScroll = () => {
6193
+ matSelect._scrollOptionIntoView = originalScrollOptionIntoView;
6194
+ this.restoreMatSelectScroll = undefined;
6195
+ };
6196
+ }
6197
+ keepOptionVisible(activeOption) {
6198
+ const panel = this.matSelect()?.panel?.nativeElement;
6199
+ if (!panel || !activeOption || !panel.contains(activeOption)) {
6200
+ return;
6201
+ }
6202
+ const options = panel.querySelectorAll('.mat-mdc-option:not(.kles-select-search-option):not(.kles-hidden-selected-option)');
6203
+ if (activeOption === options.item(0)) {
6204
+ panel.scrollTop = 0;
6205
+ return;
6206
+ }
6207
+ if (activeOption === options.item(options.length - 1)) {
6208
+ panel.scrollTop = panel.scrollHeight;
6209
+ return;
6210
+ }
6211
+ const panelRect = panel.getBoundingClientRect();
6212
+ const fixedHeader = panel.querySelector('.selectAll') ?? panel.querySelector('.kles-select-search-option');
6213
+ const visibleTop = fixedHeader?.getBoundingClientRect().bottom ?? panelRect.top;
6214
+ const optionRect = activeOption.getBoundingClientRect();
6215
+ if (optionRect.top < visibleTop) {
6216
+ panel.scrollTop += optionRect.top - visibleTop;
6217
+ }
6218
+ else if (optionRect.bottom > panelRect.bottom) {
6219
+ panel.scrollTop += optionRect.bottom - panelRect.bottom;
6220
+ }
6221
+ }
6222
+ selectedValues() {
6223
+ const value = this.group.controls[this.field.name].value;
6224
+ if (value === undefined || value === null) {
6225
+ return [];
6226
+ }
6227
+ return Array.isArray(value) ? value : [value];
6228
+ }
6229
+ updateSelectAllState(values) {
6230
+ if (!this.field.multiple) {
6231
+ return;
6232
+ }
6233
+ const selected = Array.isArray(values) ? values : [];
6234
+ const enabledOptions = this.visibleOptions.filter((option) => !option?.disabled);
6235
+ const selectedCount = enabledOptions.filter((option) => selected.some((value) => this.compareFn(value, option))).length;
6236
+ const allSelected = enabledOptions.length > 0 && selectedCount === enabledOptions.length;
6237
+ this.selectAllIndeterminate.set(selectedCount > 0 && !allSelected);
6238
+ this.selectAllControl.setValue(allSelected, { emitEvent: false });
6239
+ }
6240
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6241
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFormSelectComponent, isStandalone: true, selector: "kles-form-select", viewQueries: [{ propertyName: "matSelect", first: true, predicate: MatSelect, descendants: true, isSignal: true }, { propertyName: "virtualViewport", first: true, predicate: CdkVirtualScrollViewport, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
6242
+ <mat-form-field [subscriptSizing]="field.subscriptSizing" [color]="color()" [formGroup]="group" [appearance]="appearance()">
6243
+ @if (label()) {
6244
+ <mat-label>{{ label() }}</mat-label>
6245
+ }
6246
+
6247
+ <mat-select
6248
+ [matTooltip]="tooltip()"
6249
+ [attr.id]="field.id"
6250
+ [ngClass]="ngClass()"
6251
+ [compareWith]="compareFn"
6252
+ [panelClass]="panelClasses()"
6253
+ [panelWidth]="field.panelWidth || 'auto'"
6254
+ [placeholder]="placeholder()"
6255
+ [formControlName]="field.name"
6256
+ [multiple]="field.multiple"
6257
+ (openedChange)="onOpenedChange($event)"
6258
+ (focus)="onFocus()"
6259
+ (blur)="onBlur()"
6260
+ >
6261
+ @if (field.triggerComponent) {
6262
+ <mat-select-trigger>
6263
+ <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field" />
6264
+ </mat-select-trigger>
6265
+ }
6266
+
6267
+ @if (isSearchEnabled()) {
6268
+ <mat-option>
6269
+ <kles-select-search-input [control]="searchControl" [placeholder]="searchOptions.placeholder || intl.search" [ariaLabel]="searchOptions.ariaLabel || intl.search" [clearAriaLabel]="intl.clearSearch" [searching]="isLoading()" />
6270
+ </mat-option>
6271
+ }
6272
+
6273
+ @if (!isLoading()) {
6274
+ @if (field.multiple) {
6275
+ <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" [indeterminate]="selectAllIndeterminate()" (change)="toggleVisibleOptions($event)">
6276
+ {{ intl.selectAll }}
6277
+ </mat-checkbox>
6278
+ }
6279
+
6280
+ @if (field.virtualScroll) {
6281
+ <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 48" [style.height.px]="5 * (field.itemSize || 48)">
6282
+ @if (!field.autocompleteComponent) {
6283
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6284
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6285
+ </mat-option>
6286
+ } @else {
6287
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6288
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6289
+ </mat-option>
6290
+ }
6291
+ </cdk-virtual-scroll-viewport>
6292
+ } @else {
6293
+ @if (!field.autocompleteComponent) {
6294
+ @for (item of filteredOptions(); track item) {
6295
+ <mat-option [value]="item" [disabled]="item?.disabled">
6296
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6297
+ </mat-option>
6298
+ }
6299
+ } @else {
6300
+ @for (item of filteredOptions(); track item) {
6301
+ <mat-option [value]="item" [disabled]="item?.disabled">
6302
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6303
+ </mat-option>
6304
+ }
6305
+ }
6306
+ }
6307
+
6308
+ @for (item of getHiddenSelectedOptions(); track item) {
6309
+ <mat-option [value]="item" class="kles-hidden-selected-option">
6310
+ @if (!field.autocompleteComponent) {
6311
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6312
+ } @else {
6313
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6314
+ }
6315
+ </mat-option>
6316
+ }
6317
+ } @else {
6318
+ <mat-option class="hide-checkbox" disabled>
6319
+ <div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20" /></div>
6320
+ </mat-option>
6321
+ }
6322
+ </mat-select>
6323
+
6324
+ @if (hint()) {
6325
+ <mat-hint>{{ hint() }}</mat-hint>
6326
+ }
6327
+
6328
+ @if (field.subComponents || field.clearable || isPending()) {
6329
+ <div matSuffix class="suffix">
6330
+ @if (isPending()) {
6331
+ <mat-spinner mode="indeterminate" diameter="21" />
6332
+ }
6333
+ @if (field.subComponents || field.clearable) {
6334
+ <ng-content />
6335
+ }
6336
+ </div>
6337
+ }
6338
+
6339
+ <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6340
+ </mat-form-field>
6341
+ `, isInline: true, styles: ["kles-form-select mat-form-field{width:100%}\n", "kles-form-select .suffix{display:flex;align-items:center}\n", ".kles-select-panel .loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".kles-select-panel .selectAll{padding:0 16px 0 5px!important;display:flex!important}\n", ".kles-select-panel .selectAll .mdc-form-field{width:100%}\n", ".kles-select-panel .selectAll .mdc-form-field .mdc-label{width:100%;min-height:48px;align-items:center;display:flex}\n", ".kles-select-panel .selectAll .mdc-form-field .mdc-checkbox__ripple{display:none!important}\n", ".kles-select-panel .kles-hidden-selected-option{display:none!important}\n", ".kles-select-panel .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n", ".kles-select-panel:not(.kles-select-virtual-panel) .selectAll{position:sticky;top:-8px;z-index:1;background:var(--mat-select-panel-background-color, var(--mat-sys-surface-container, white))}\n", ".kles-select-panel.kles-select-has-search:not(.kles-select-virtual-panel) .selectAll{top:40px}\n", "div.kles-select-panel.kles-select-virtual-panel{display:flex;flex-direction:column;overflow:hidden}\n", ".kles-select-panel.kles-select-virtual-panel .kles-select-search-option,.kles-select-panel.kles-select-virtual-panel .selectAll{flex:0 0 48px}\n", ".kles-select-panel.kles-select-virtual-panel cdk-virtual-scroll-viewport{flex:1 1 auto;min-height:0;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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: "component", type: MatErrorMessageDirective, selector: "[matErrorMessage]", inputs: ["validations", "asyncValidations"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: MatOption$1, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: KlesComponentDirective, selector: "[klesComponent]", inputs: ["component", "value", "field"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i4$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4$2.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: MatSelectTrigger, selector: "mat-select-trigger" }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: KlesSelectSearchInputComponent, selector: "kles-select-search-input", inputs: ["control", "placeholder", "ariaLabel", "clearAriaLabel", "searching"] }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }], encapsulation: i0.ViewEncapsulation.None }); }
6342
+ };
6343
+ KlesFormSelectComponent = __decorate([
6344
+ FieldMapper({ type: EnumType.select })
6345
+ ], KlesFormSelectComponent);
6346
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectComponent, decorators: [{
6347
+ type: Component,
6348
+ args: [{ selector: 'kles-form-select', template: `
6349
+ <mat-form-field [subscriptSizing]="field.subscriptSizing" [color]="color()" [formGroup]="group" [appearance]="appearance()">
6350
+ @if (label()) {
6351
+ <mat-label>{{ label() }}</mat-label>
6352
+ }
6353
+
6354
+ <mat-select
6355
+ [matTooltip]="tooltip()"
6356
+ [attr.id]="field.id"
6357
+ [ngClass]="ngClass()"
6358
+ [compareWith]="compareFn"
6359
+ [panelClass]="panelClasses()"
6360
+ [panelWidth]="field.panelWidth || 'auto'"
6361
+ [placeholder]="placeholder()"
6362
+ [formControlName]="field.name"
6363
+ [multiple]="field.multiple"
6364
+ (openedChange)="onOpenedChange($event)"
6365
+ (focus)="onFocus()"
6366
+ (blur)="onBlur()"
6367
+ >
6368
+ @if (field.triggerComponent) {
6369
+ <mat-select-trigger>
6370
+ <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field" />
6371
+ </mat-select-trigger>
6372
+ }
6373
+
6374
+ @if (isSearchEnabled()) {
6375
+ <mat-option>
6376
+ <kles-select-search-input [control]="searchControl" [placeholder]="searchOptions.placeholder || intl.search" [ariaLabel]="searchOptions.ariaLabel || intl.search" [clearAriaLabel]="intl.clearSearch" [searching]="isLoading()" />
6377
+ </mat-option>
6378
+ }
6379
+
6380
+ @if (!isLoading()) {
6381
+ @if (field.multiple) {
6382
+ <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" [indeterminate]="selectAllIndeterminate()" (change)="toggleVisibleOptions($event)">
6383
+ {{ intl.selectAll }}
6384
+ </mat-checkbox>
6385
+ }
6386
+
6387
+ @if (field.virtualScroll) {
6388
+ <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 48" [style.height.px]="5 * (field.itemSize || 48)">
6389
+ @if (!field.autocompleteComponent) {
6390
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6391
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6392
+ </mat-option>
6393
+ } @else {
6394
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6395
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6396
+ </mat-option>
6397
+ }
6398
+ </cdk-virtual-scroll-viewport>
6399
+ } @else {
6400
+ @if (!field.autocompleteComponent) {
6401
+ @for (item of filteredOptions(); track item) {
6402
+ <mat-option [value]="item" [disabled]="item?.disabled">
6403
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6404
+ </mat-option>
6405
+ }
6406
+ } @else {
6407
+ @for (item of filteredOptions(); track item) {
6408
+ <mat-option [value]="item" [disabled]="item?.disabled">
6409
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6410
+ </mat-option>
6411
+ }
6412
+ }
6413
+ }
6414
+
6415
+ @for (item of getHiddenSelectedOptions(); track item) {
6416
+ <mat-option [value]="item" class="kles-hidden-selected-option">
6417
+ @if (!field.autocompleteComponent) {
6418
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6419
+ } @else {
6420
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6421
+ }
6422
+ </mat-option>
6423
+ }
6424
+ } @else {
6425
+ <mat-option class="hide-checkbox" disabled>
6426
+ <div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20" /></div>
6427
+ </mat-option>
6428
+ }
6429
+ </mat-select>
6430
+
6431
+ @if (hint()) {
6432
+ <mat-hint>{{ hint() }}</mat-hint>
6433
+ }
6434
+
6435
+ @if (field.subComponents || field.clearable || isPending()) {
6436
+ <div matSuffix class="suffix">
6437
+ @if (isPending()) {
6438
+ <mat-spinner mode="indeterminate" diameter="21" />
6439
+ }
6440
+ @if (field.subComponents || field.clearable) {
6441
+ <ng-content />
6442
+ }
6443
+ </div>
6444
+ }
6445
+
6446
+ <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6447
+ </mat-form-field>
6448
+ `, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
6449
+ CommonModule,
6450
+ ReactiveFormsModule,
6451
+ KlesTransformPipe,
6452
+ MatErrorMessageDirective,
6453
+ MatProgressSpinner,
6454
+ MatHint,
6455
+ MatOption$1,
6456
+ KlesComponentDirective,
6457
+ ScrollingModule,
6458
+ MatSelectTrigger,
6459
+ MatSelect,
6460
+ MatTooltip,
6461
+ MatLabel,
6462
+ MatFormField,
6463
+ MatCheckbox,
6464
+ KlesSelectSearchInputComponent,
6465
+ ], styles: ["kles-form-select mat-form-field{width:100%}\n", "kles-form-select .suffix{display:flex;align-items:center}\n", ".kles-select-panel .loadingSelect{display:flex;flex-direction:row;justify-content:space-between;align-items:center}\n", ".kles-select-panel .selectAll{padding:0 16px 0 5px!important;display:flex!important}\n", ".kles-select-panel .selectAll .mdc-form-field{width:100%}\n", ".kles-select-panel .selectAll .mdc-form-field .mdc-label{width:100%;min-height:48px;align-items:center;display:flex}\n", ".kles-select-panel .selectAll .mdc-form-field .mdc-checkbox__ripple{display:none!important}\n", ".kles-select-panel .kles-hidden-selected-option{display:none!important}\n", ".kles-select-panel .hide-checkbox .mat-pseudo-checkbox{display:none!important}\n", ".kles-select-panel:not(.kles-select-virtual-panel) .selectAll{position:sticky;top:-8px;z-index:1;background:var(--mat-select-panel-background-color, var(--mat-sys-surface-container, white))}\n", ".kles-select-panel.kles-select-has-search:not(.kles-select-virtual-panel) .selectAll{top:40px}\n", "div.kles-select-panel.kles-select-virtual-panel{display:flex;flex-direction:column;overflow:hidden}\n", ".kles-select-panel.kles-select-virtual-panel .kles-select-search-option,.kles-select-panel.kles-select-virtual-panel .selectAll{flex:0 0 48px}\n", ".kles-select-panel.kles-select-virtual-panel cdk-virtual-scroll-viewport{flex:1 1 auto;min-height:0;width:100%}\n"] }]
6466
+ }], propDecorators: { matSelect: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSelect), { isSignal: true }] }], virtualViewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
6467
+
6891
6468
  function autocompleteObjectValidator(optional) {
6892
6469
  return (control) => {
6893
6470
  if ((control.value === null || control.value === undefined) && !optional)
@@ -6919,5 +6496,5 @@ function autocompleteStringValidator(validOptions, optional) {
6919
6496
  * Generated bundle index. Do not edit.
6920
6497
  */
6921
6498
 
6922
- export { AbstractUiState, ArrayFormatPipe, ArrayUiState, ControlUiState, EnumType, FIELD, FIELD_CONTEXT, FIELD_NAME, FieldMapper, GROUP, GROUP_UI, GroupUiState, KlesAbstractFormControl, KlesAbstractFormUiControl, KlesButtonBase, KlesButtonCheckerComponent, KlesButtonComponent, KlesButtonFileComponent, KlesComponentDirective, KlesCurrencyValueAccessorDirective, KlesDynamicFieldDirective, KlesDynamicFormComponent, KlesDynamicFormIntl, KlesFabComponent, KlesFieldAbstract, KlesFileControlComponent, KlesFormActionMenuComponent, KlesFormArray, KlesFormArrayComponent, KlesFormBadgeComponent, KlesFormButtonCheckerComponent, KlesFormButtonComponent, KlesFormButtonFileComponent, KlesFormButtonToogleGroupComponent, KlesFormCheckboxComponent, KlesFormCheckboxIndeterminateComponent, KlesFormChipComponent, KlesFormChipGridComponent, KlesFormClearComponent, KlesFormColorComponent, KlesFormControl, KlesFormCopyComponent, KlesFormCurrencyComponent, KlesFormDateComponent, KlesFormDateTimeComponent, KlesFormErrorStateMatcher, KlesFormFabComponent, KlesFormFileComponent, KlesFormGroup, KlesFormGroupComponent, KlesFormIconButtonComponent, KlesFormIconComponent, KlesFormInputClearableComponent, KlesFormInputComponent, KlesFormLabelComponent, KlesFormLineBreakComponent, KlesFormLinkComponent, KlesFormListFieldComponent, KlesFormMiniFabComponent, KlesFormPasswordVisibilityComponent, KlesFormRadioComponent, KlesFormRange, KlesFormRangeComponent, KlesFormSelectComponent, KlesFormSelectLazySearchComponent, KlesFormSelectSearchComponent, KlesFormSelectionListComponent, KlesFormSelectionListSearchComponent, KlesFormSlideToggleComponent, KlesFormStatusComponent, KlesFormTextComponent, KlesFormTextareaComponent, KlesFormTileComponent, KlesFormUiArray, KlesFormUiControl, KlesFormUiGroup, KlesIconButtonComponent, KlesIndeterminateCheckboxComponent, KlesMaterialDynamicformsModule, KlesMiniFabComponent, KlesSelectionModel, KlesTransformPipe, MatErrorFormDirective, MatErrorMessageDirective, SIBLING_FIELDS, autocompleteObjectValidator, autocompleteStringValidator, componentMapper, isDestroyable, klesFieldControlFactory, klesFieldUiFactory };
6499
+ export { AbstractUiState, ArrayFormatPipe, ArrayUiState, ControlUiState, EnumType, FIELD, FIELD_CONTEXT, FIELD_NAME, FieldMapper, GROUP, GROUP_UI, GroupUiState, KlesAbstractFormControl, KlesAbstractFormUiControl, KlesButtonBase, KlesButtonCheckerComponent, KlesButtonComponent, KlesButtonFileComponent, KlesComponentDirective, KlesCurrencyValueAccessorDirective, KlesDynamicFieldDirective, KlesDynamicFormComponent, KlesDynamicFormIntl, KlesFabComponent, KlesFieldAbstract, KlesFileControlComponent, KlesFormActionMenuComponent, KlesFormArray, KlesFormArrayComponent, KlesFormBadgeComponent, KlesFormButtonCheckerComponent, KlesFormButtonComponent, KlesFormButtonFileComponent, KlesFormButtonToogleGroupComponent, KlesFormCheckboxComponent, KlesFormCheckboxIndeterminateComponent, KlesFormChipComponent, KlesFormChipGridComponent, KlesFormClearComponent, KlesFormColorComponent, KlesFormControl, KlesFormCopyComponent, KlesFormCurrencyComponent, KlesFormDateComponent, KlesFormDateTimeComponent, KlesFormErrorStateMatcher, KlesFormFabComponent, KlesFormFileComponent, KlesFormGroup, KlesFormGroupComponent, KlesFormIconButtonComponent, KlesFormIconComponent, KlesFormInputClearableComponent, KlesFormInputComponent, KlesFormLabelComponent, KlesFormLineBreakComponent, KlesFormLinkComponent, KlesFormListFieldComponent, KlesFormMiniFabComponent, KlesFormPasswordVisibilityComponent, KlesFormRadioComponent, KlesFormRange, KlesFormRangeComponent, KlesFormSelectComponent, KlesFormSelectionListComponent, KlesFormSelectionListSearchComponent, KlesFormSlideToggleComponent, KlesFormStatusComponent, KlesFormTextComponent, KlesFormTextareaComponent, KlesFormTileComponent, KlesFormUiArray, KlesFormUiControl, KlesFormUiGroup, KlesIconButtonComponent, KlesIndeterminateCheckboxComponent, KlesMaterialDynamicformsModule, KlesMiniFabComponent, KlesSelectionModel, KlesTransformPipe, MatErrorFormDirective, MatErrorMessageDirective, SIBLING_FIELDS, autocompleteObjectValidator, autocompleteStringValidator, componentMapper, isDestroyable, klesFieldControlFactory, klesFieldUiFactory };
6923
6500
  //# sourceMappingURL=3kles-kles-material-dynamicforms.mjs.map