@3kles/kles-material-dynamicforms 21.6.1 → 21.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,9 @@ 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
67
  import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
69
68
  import { getMultipleValuesInSingleSelectionError } from '@angular/cdk/collections';
70
- import * as i4$5 from '@3kles/kles-material-datepicker';
69
+ import * as i4$4 from '@3kles/kles-material-datepicker';
71
70
  import { KlesMaterialDatepickerModule } from '@3kles/kles-material-datepicker';
72
71
  import * as i1$2 from '@angular/cdk/clipboard';
73
72
  import { ClipboardModule } from '@angular/cdk/clipboard';
@@ -1385,6 +1384,8 @@ class KlesDynamicFormIntl {
1385
1384
  constructor() {
1386
1385
  this.loading = 'Loading';
1387
1386
  this.selectAll = 'Select all';
1387
+ this.clearSearch = 'clear';
1388
+ this.search = 'search';
1388
1389
  }
1389
1390
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesDynamicFormIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1390
1391
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesDynamicFormIntl, providedIn: 'root' }); }
@@ -1574,7 +1575,7 @@ let KlesFormInputComponent = class KlesFormInputComponent extends KlesFieldAbstr
1574
1575
 
1575
1576
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
1576
1577
  </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" }] }); }
1578
+ `, 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
1579
  };
1579
1580
  KlesFormInputComponent = __decorate([
1580
1581
  FieldMapper({ type: EnumType.input })
@@ -1670,376 +1671,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
1670
1671
  `, 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
1672
  }], ctorParameters: () => [] });
1672
1673
 
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
1674
  class KlesFormDateComponent extends KlesFieldAbstract {
2044
1675
  ngOnInit() {
2045
1676
  super.ngOnInit();
@@ -2065,7 +1696,7 @@ class KlesFormDateComponent extends KlesFieldAbstract {
2065
1696
 
2066
1697
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
2067
1698
  </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"] }] }); }
1699
+ `, 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
1700
  }
2070
1701
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormDateComponent, decorators: [{
2071
1702
  type: Component,
@@ -2432,7 +2063,7 @@ class KlesFormColorComponent extends KlesFieldAbstract {
2432
2063
 
2433
2064
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
2434
2065
  </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 }); }
2066
+ `, 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
2067
  }
2437
2068
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormColorComponent, decorators: [{
2438
2069
  type: Component,
@@ -3029,6 +2660,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3029
2660
  `, standalone: true, imports: [CommonModule, MatErrorMessageDirective, ScrollingModule, ReactiveFormsModule, MatTooltip, MatLabel, MatFormField, TextFieldModule, MatInput], styles: ["mat-form-field{width:100%}\n"] }]
3030
2661
  }] });
3031
2662
 
2663
+ class KlesTransformPipe {
2664
+ transform(value, pipes) {
2665
+ if (pipes && pipes.length > 0) {
2666
+ return pipes.reduce((acc, p) => {
2667
+ acc = p.pipe.transform(acc, ...(p.options || []));
2668
+ return acc;
2669
+ // if (p.options) {
2670
+ // p.options.forEach(opt => {
2671
+ // acc = p.pipe.transform(acc, opt);
2672
+ // });
2673
+ // } else {
2674
+ // acc = p.pipe.transform(acc);
2675
+ // }
2676
+ // return acc;
2677
+ }, value);
2678
+ }
2679
+ return value;
2680
+ }
2681
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2682
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, isStandalone: true, name: "klesTransform" }); }
2683
+ }
2684
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesTransformPipe, decorators: [{
2685
+ type: Pipe,
2686
+ args: [{
2687
+ name: 'klesTransform',
2688
+ standalone: true
2689
+ }]
2690
+ }] });
2691
+
3032
2692
  let KlesFormTextComponent = class KlesFormTextComponent extends KlesFieldAbstract {
3033
2693
  ngOnInit() {
3034
2694
  super.ngOnInit();
@@ -3321,7 +2981,7 @@ class KlesFormInputClearableComponent extends KlesFormInputComponent {
3321
2981
 
3322
2982
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3323
2983
  </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" }] }); }
2984
+ `, 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
2985
  }
3326
2986
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormInputClearableComponent, decorators: [{
3327
2987
  type: Component,
@@ -3398,7 +3058,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3398
3058
 
3399
3059
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3400
3060
  </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"] }]
3061
+ `, 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
3062
  }] });
3403
3063
 
3404
3064
  class KlesFormIconComponent extends KlesFieldAbstract {
@@ -3424,492 +3084,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3424
3084
  `, standalone: true, imports: [CommonModule, MatIcon, MatTooltip, ReactiveFormsModule] }]
3425
3085
  }] });
3426
3086
 
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();
3087
+ let KlesFormLineBreakComponent = class KlesFormLineBreakComponent extends KlesFieldAbstract {
3088
+ ngOnInit() { super.ngOnInit(); }
3089
+ ngOnDestroy() {
3090
+ super.ngOnDestroy();
3913
3091
  }
3914
3092
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLineBreakComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3915
3093
  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 +3475,7 @@ class KlesFormSelectionListComponent extends KlesFieldAbstract {
4297
3475
  }
4298
3476
  </mat-selection-list>
4299
3477
  </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" }] }); }
3478
+ `, 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
3479
  }
4302
3480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectionListComponent, decorators: [{
4303
3481
  type: Component,
@@ -4344,7 +3522,7 @@ let KlesFormBadgeComponent = class KlesFormBadgeComponent extends KlesFieldAbstr
4344
3522
  <span [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()"
4345
3523
  matBadge="{{group.controls[field.name].value}}" matBadgeOverlap="false" [matBadgeColor]="color()">
4346
3524
  </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"] }] }); }
3525
+ `, 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
3526
  };
4349
3527
  KlesFormBadgeComponent = __decorate([
4350
3528
  FieldMapper({ type: EnumType.badge })
@@ -4654,7 +3832,7 @@ let KlesFormRangeComponent = class KlesFormRangeComponent extends KlesFieldAbstr
4654
3832
 
4655
3833
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4656
3834
  </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"] }] }); }
3835
+ `, 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
3836
  };
4659
3837
  KlesFormRangeComponent = __decorate([
4660
3838
  FieldMapper({ type: EnumType.range, factory: (field) => new KlesFormRange(field).create() })
@@ -4685,290 +3863,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
4685
3863
  `, 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
3864
  }] });
4687
3865
 
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
3866
+ class KlesFabComponent extends KlesButtonBase {
3867
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3868
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFabComponent, isStandalone: true, selector: "kles-fab", providers: [
3869
+ {
3870
+ provide: NG_VALUE_ACCESSOR,
3871
+ useExisting: forwardRef(() => KlesFabComponent),
3872
+ multi: true
4972
3873
  }
4973
3874
  ], usesInheritance: true, ngImport: i0, template: `
4974
3875
  <button matFab [extended]="!!label" [type]="type" [ngClass]="classButton" [color]="(color)?color:'primary'" [disabled]="disabled"
@@ -4983,7 +3884,7 @@ class KlesFabComponent extends KlesButtonBase {
4983
3884
  <mat-icon svgIcon="{{iconSvg}}"></mat-icon>
4984
3885
  }
4985
3886
  </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"] }] }); }
3887
+ `, 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
3888
  }
4988
3889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, decorators: [{
4989
3890
  type: Component,
@@ -5087,7 +3988,7 @@ class KlesMiniFabComponent extends KlesButtonBase {
5087
3988
  <mat-icon svgIcon="{{iconSvg}}"></mat-icon>
5088
3989
  }
5089
3990
  </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"] }] }); }
3991
+ `, 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
3992
  }
5092
3993
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMiniFabComponent, decorators: [{
5093
3994
  type: Component,
@@ -5180,7 +4081,7 @@ class KlesIconButtonComponent extends KlesButtonBase {
5180
4081
  <mat-icon svgIcon="{{ iconSvg }}"></mat-icon>
5181
4082
  }
5182
4083
  </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"] }] }); }
4084
+ `, 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
4085
  }
5185
4086
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesIconButtonComponent, decorators: [{
5186
4087
  type: Component,
@@ -5353,7 +4254,7 @@ class KlesFormSelectionListSearchComponent extends KlesFieldAbstract {
5353
4254
  }
5354
4255
  </mat-selection-list>
5355
4256
  </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" }] }); }
4257
+ `, 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
4258
  }
5358
4259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectionListSearchComponent, decorators: [{
5359
4260
  type: Component,
@@ -5505,7 +4406,7 @@ let KlesFormCheckboxIndeterminateComponent = class KlesFormCheckboxIndeterminate
5505
4406
  label()
5506
4407
  }}</kles-checkbox-indeterminate>
5507
4408
  </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"] }] }); }
4409
+ `, 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
4410
  };
5510
4411
  KlesFormCheckboxIndeterminateComponent = __decorate([
5511
4412
  FieldMapper({ type: EnumType.checkbox })
@@ -5630,7 +4531,7 @@ class KlesFormDateTimeComponent extends KlesFieldAbstract {
5630
4531
 
5631
4532
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
5632
4533
  </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"] }] }); }
4534
+ `, 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
4535
  }
5635
4536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormDateTimeComponent, decorators: [{
5636
4537
  type: Component,
@@ -5694,7 +4595,7 @@ class KlesFormCopyComponent {
5694
4595
  <button #tooltip="matTooltip" matIconButton color="primary" type="button" (click)="copy($event)" [matTooltipDisabled]="true" [matTooltip]="tooltipText" matTooltipPosition="above">
5695
4596
  <mat-icon>content_copy</mat-icon>
5696
4597
  </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 }] }); }
4598
+ `, 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
4599
  }
5699
4600
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormCopyComponent, decorators: [{
5700
4601
  type: Component,
@@ -5811,7 +4712,7 @@ let KlesFormActionMenuComponent = class KlesFormActionMenuComponent extends Kles
5811
4712
  </button>
5812
4713
  }
5813
4714
  </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 }); }
4715
+ `, 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
4716
  };
5816
4717
  KlesFormActionMenuComponent = __decorate([
5817
4718
  FieldMapper({
@@ -5909,7 +4810,7 @@ class KlesFormTileComponent extends KlesFieldAbstract {
5909
4810
  }
5910
4811
  </div>
5911
4812
  </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 }); }
4813
+ `, 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
4814
  }
5914
4815
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormTileComponent, decorators: [{
5915
4816
  type: Component,
@@ -6218,7 +5119,7 @@ let KlesFormCurrencyComponent = class KlesFormCurrencyComponent extends KlesFiel
6218
5119
 
6219
5120
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6220
5121
  </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"] }] }); }
5122
+ `, 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
5123
  };
6223
5124
  KlesFormCurrencyComponent = __decorate([
6224
5125
  FieldMapper({
@@ -6386,7 +5287,7 @@ let KlesFormStatusComponent = class KlesFormStatusComponent extends KlesFieldAbs
6386
5287
  </span>
6387
5288
  }
6388
5289
  </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 }); }
5290
+ `, 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
5291
  };
6391
5292
  KlesFormStatusComponent = __decorate([
6392
5293
  FieldMapper({
@@ -6588,7 +5489,7 @@ class KlesFormChipGridComponent extends KlesFieldAbstract {
6588
5489
  }
6589
5490
  </mat-autocomplete>
6590
5491
  </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" }] }); }
5492
+ `, 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
5493
  }
6593
5494
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormChipGridComponent, decorators: [{
6594
5495
  type: Component,
@@ -6651,7 +5552,6 @@ const components = [
6651
5552
  KlesFormButtonCheckerComponent,
6652
5553
  KlesButtonFileComponent,
6653
5554
  KlesFormButtonFileComponent,
6654
- KlesFormSelectComponent,
6655
5555
  KlesFormDateComponent,
6656
5556
  KlesFormDateTimeComponent,
6657
5557
  KlesFormRadioComponent,
@@ -6665,7 +5565,6 @@ const components = [
6665
5565
  KlesFormChipComponent,
6666
5566
  KlesFormGroupComponent,
6667
5567
  KlesFormIconComponent,
6668
- KlesFormSelectSearchComponent,
6669
5568
  KlesFormLineBreakComponent,
6670
5569
  KlesFormLinkComponent,
6671
5570
  KlesFormSlideToggleComponent,
@@ -6674,7 +5573,6 @@ const components = [
6674
5573
  KlesFormArrayComponent,
6675
5574
  KlesFormRangeComponent,
6676
5575
  KlesFormClearComponent,
6677
- KlesFormSelectLazySearchComponent,
6678
5576
  KlesFormFabComponent,
6679
5577
  KlesFabComponent,
6680
5578
  KlesMiniFabComponent,
@@ -6707,7 +5605,6 @@ class KlesMaterialDynamicformsModule {
6707
5605
  KlesFormButtonCheckerComponent,
6708
5606
  KlesButtonFileComponent,
6709
5607
  KlesFormButtonFileComponent,
6710
- KlesFormSelectComponent,
6711
5608
  KlesFormDateComponent,
6712
5609
  KlesFormDateTimeComponent,
6713
5610
  KlesFormRadioComponent,
@@ -6721,7 +5618,6 @@ class KlesMaterialDynamicformsModule {
6721
5618
  KlesFormChipComponent,
6722
5619
  KlesFormGroupComponent,
6723
5620
  KlesFormIconComponent,
6724
- KlesFormSelectSearchComponent,
6725
5621
  KlesFormLineBreakComponent,
6726
5622
  KlesFormLinkComponent,
6727
5623
  KlesFormSlideToggleComponent,
@@ -6730,7 +5626,6 @@ class KlesMaterialDynamicformsModule {
6730
5626
  KlesFormArrayComponent,
6731
5627
  KlesFormRangeComponent,
6732
5628
  KlesFormClearComponent,
6733
- KlesFormSelectLazySearchComponent,
6734
5629
  KlesFormFabComponent,
6735
5630
  KlesFabComponent,
6736
5631
  KlesMiniFabComponent,
@@ -6756,7 +5651,6 @@ class KlesMaterialDynamicformsModule {
6756
5651
  KlesFormButtonCheckerComponent,
6757
5652
  KlesButtonFileComponent,
6758
5653
  KlesFormButtonFileComponent,
6759
- KlesFormSelectComponent,
6760
5654
  KlesFormDateComponent,
6761
5655
  KlesFormDateTimeComponent,
6762
5656
  KlesFormRadioComponent,
@@ -6770,7 +5664,6 @@ class KlesMaterialDynamicformsModule {
6770
5664
  KlesFormChipComponent,
6771
5665
  KlesFormGroupComponent,
6772
5666
  KlesFormIconComponent,
6773
- KlesFormSelectSearchComponent,
6774
5667
  KlesFormLineBreakComponent,
6775
5668
  KlesFormLinkComponent,
6776
5669
  KlesFormSlideToggleComponent,
@@ -6779,7 +5672,6 @@ class KlesMaterialDynamicformsModule {
6779
5672
  KlesFormArrayComponent,
6780
5673
  KlesFormRangeComponent,
6781
5674
  KlesFormClearComponent,
6782
- KlesFormSelectLazySearchComponent,
6783
5675
  KlesFormFabComponent,
6784
5676
  KlesFabComponent,
6785
5677
  KlesMiniFabComponent,
@@ -6806,7 +5698,6 @@ class KlesMaterialDynamicformsModule {
6806
5698
  KlesFormButtonCheckerComponent,
6807
5699
  KlesButtonFileComponent,
6808
5700
  KlesFormButtonFileComponent,
6809
- KlesFormSelectComponent,
6810
5701
  KlesFormDateComponent,
6811
5702
  KlesFormDateTimeComponent,
6812
5703
  KlesFormRadioComponent,
@@ -6820,7 +5711,6 @@ class KlesMaterialDynamicformsModule {
6820
5711
  KlesFormChipComponent,
6821
5712
  KlesFormGroupComponent,
6822
5713
  KlesFormIconComponent,
6823
- KlesFormSelectSearchComponent,
6824
5714
  KlesFormLinkComponent,
6825
5715
  KlesFormSlideToggleComponent,
6826
5716
  KlesFormSelectionListComponent,
@@ -6828,7 +5718,6 @@ class KlesMaterialDynamicformsModule {
6828
5718
  KlesFormArrayComponent,
6829
5719
  KlesFormRangeComponent,
6830
5720
  KlesFormClearComponent,
6831
- KlesFormSelectLazySearchComponent,
6832
5721
  KlesFormFabComponent,
6833
5722
  KlesFabComponent,
6834
5723
  KlesMiniFabComponent,
@@ -6888,6 +5777,695 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
6888
5777
  }]
6889
5778
  }] });
6890
5779
 
5780
+ /** Internal search input used by the Kles select field. */
5781
+ class KlesSelectSearchInputComponent {
5782
+ constructor() {
5783
+ this.control = input.required(...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
5784
+ this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
5785
+ this.ariaLabel = input('Search options', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
5786
+ this.clearAriaLabel = input('Clear search', ...(ngDevMode ? [{ debugName: "clearAriaLabel" }] : /* istanbul ignore next */ []));
5787
+ this.searching = input(false, ...(ngDevMode ? [{ debugName: "searching" }] : /* istanbul ignore next */ []));
5788
+ this.inputElement = viewChild('searchInput', ...(ngDevMode ? [{ debugName: "inputElement" }] : /* istanbul ignore next */ []));
5789
+ this.destroyRef = inject(DestroyRef);
5790
+ this.matSelect = inject(MatSelect);
5791
+ this.matOption = inject(MatOption$1);
5792
+ }
5793
+ ngOnInit() {
5794
+ this.matOption.disabled = true;
5795
+ const optionElement = this.matOption._getHostElement();
5796
+ optionElement.classList.add('kles-select-search-option');
5797
+ optionElement.setAttribute('role', 'presentation');
5798
+ }
5799
+ ngAfterViewInit() {
5800
+ this.matSelect.openedChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((opened) => {
5801
+ if (opened) {
5802
+ setTimeout(() => {
5803
+ this.focusInput();
5804
+ this.installPanelKeyboardGuard();
5805
+ });
5806
+ }
5807
+ else {
5808
+ this.removePanelKeyboardGuard?.();
5809
+ this.removePanelKeyboardGuard = undefined;
5810
+ }
5811
+ });
5812
+ }
5813
+ ngOnDestroy() {
5814
+ this.removePanelKeyboardGuard?.();
5815
+ }
5816
+ onKeydown(event) {
5817
+ if (event.key.length === 1) {
5818
+ event.stopPropagation();
5819
+ }
5820
+ if (event.key === 'Home' || event.key === 'End') {
5821
+ event.preventDefault();
5822
+ }
5823
+ if (this.matSelect.multiple && event.key === 'Enter') {
5824
+ setTimeout(() => this.focusInput());
5825
+ }
5826
+ }
5827
+ preserveInputFocus(event) {
5828
+ event.preventDefault();
5829
+ event.stopPropagation();
5830
+ }
5831
+ clearSearch(event) {
5832
+ event.preventDefault();
5833
+ event.stopPropagation();
5834
+ this.control().setValue('');
5835
+ this.focusInput();
5836
+ }
5837
+ focusInput() {
5838
+ const panel = this.matSelect.panel?.nativeElement;
5839
+ const inputElement = this.inputElement();
5840
+ if (!panel || !inputElement) {
5841
+ return;
5842
+ }
5843
+ const scrollTop = panel.scrollTop;
5844
+ inputElement.nativeElement.focus();
5845
+ panel.scrollTop = scrollTop;
5846
+ }
5847
+ /**
5848
+ * Material 21 renders the panel inline. Without this listener the panel and
5849
+ * the mat-select host both process the same keydown and skip an option.
5850
+ */
5851
+ installPanelKeyboardGuard() {
5852
+ this.removePanelKeyboardGuard?.();
5853
+ const panel = this.matSelect.panel?.nativeElement;
5854
+ if (!panel) {
5855
+ return;
5856
+ }
5857
+ const handler = (event) => {
5858
+ if (event.key !== 'Escape') {
5859
+ event.stopPropagation();
5860
+ }
5861
+ };
5862
+ panel.addEventListener('keydown', handler);
5863
+ this.removePanelKeyboardGuard = () => panel.removeEventListener('keydown', handler);
5864
+ }
5865
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesSelectSearchInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5866
+ 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: `
5867
+ <div class="kles-select-search-row">
5868
+ <mat-icon class="kles-select-search-icon" aria-hidden="true">search</mat-icon>
5869
+ <input
5870
+ #searchInput
5871
+ class="kles-select-search-input"
5872
+ type="search"
5873
+ autocomplete="off"
5874
+ tabindex="-1"
5875
+ [formControl]="control()"
5876
+ [placeholder]="placeholder()"
5877
+ [attr.aria-label]="ariaLabel()"
5878
+ (keydown)="onKeydown($event)"
5879
+ />
5880
+ @if (searching()) {
5881
+ <mat-spinner class="kles-select-search-spinner" diameter="16" />
5882
+ } @else if (control().value) {
5883
+ <button
5884
+ mat-icon-button
5885
+ type="button"
5886
+ class="kles-select-search-clear"
5887
+ [attr.aria-label]="clearAriaLabel()"
5888
+ (mousedown)="preserveInputFocus($event)"
5889
+ (click)="clearSearch($event)"
5890
+ >
5891
+ <mat-icon>close</mat-icon>
5892
+ </button>
5893
+ }
5894
+ </div>
5895
+ `, 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 }); }
5896
+ }
5897
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesSelectSearchInputComponent, decorators: [{
5898
+ type: Component,
5899
+ args: [{ selector: 'kles-select-search-input', standalone: true, imports: [ReactiveFormsModule, MatIconButton, MatIcon, MatProgressSpinner], template: `
5900
+ <div class="kles-select-search-row">
5901
+ <mat-icon class="kles-select-search-icon" aria-hidden="true">search</mat-icon>
5902
+ <input
5903
+ #searchInput
5904
+ class="kles-select-search-input"
5905
+ type="search"
5906
+ autocomplete="off"
5907
+ tabindex="-1"
5908
+ [formControl]="control()"
5909
+ [placeholder]="placeholder()"
5910
+ [attr.aria-label]="ariaLabel()"
5911
+ (keydown)="onKeydown($event)"
5912
+ />
5913
+ @if (searching()) {
5914
+ <mat-spinner class="kles-select-search-spinner" diameter="16" />
5915
+ } @else if (control().value) {
5916
+ <button
5917
+ mat-icon-button
5918
+ type="button"
5919
+ class="kles-select-search-clear"
5920
+ [attr.aria-label]="clearAriaLabel()"
5921
+ (mousedown)="preserveInputFocus($event)"
5922
+ (click)="clearSearch($event)"
5923
+ >
5924
+ <mat-icon>close</mat-icon>
5925
+ </button>
5926
+ }
5927
+ </div>
5928
+ `, 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"] }]
5929
+ }], 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 }] }] } });
5930
+
5931
+ let KlesFormSelectComponent = class KlesFormSelectComponent extends KlesFieldAbstract {
5932
+ constructor() {
5933
+ super(...arguments);
5934
+ this.searchControl = new FormControl('');
5935
+ this.selectAllControl = new FormControl(false, { nonNullable: true });
5936
+ this.selectAllIndeterminate = signal(false, ...(ngDevMode ? [{ debugName: "selectAllIndeterminate" }] : /* istanbul ignore next */ []));
5937
+ this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
5938
+ this.filteredOptions = signal([], ...(ngDevMode ? [{ debugName: "filteredOptions" }] : /* istanbul ignore next */ []));
5939
+ this.intl = inject(KlesDynamicFormIntl);
5940
+ this.changeDetectorRef = inject(ChangeDetectorRef);
5941
+ this.matSelect = viewChild(MatSelect, ...(ngDevMode ? [{ debugName: "matSelect" }] : /* istanbul ignore next */ []));
5942
+ this.virtualViewport = viewChild(CdkVirtualScrollViewport, ...(ngDevMode ? [{ debugName: "virtualViewport" }] : /* istanbul ignore next */ []));
5943
+ this.searchOptions = {};
5944
+ this.deferredQuery$ = new Subject();
5945
+ this.sourceOptions = [];
5946
+ this.visibleOptions = [];
5947
+ this.isPanelOpen = false;
5948
+ this.isDeferredSourceLoaded = false;
5949
+ this.compareFn = (first, second) => {
5950
+ if (this.field.property && first && second) {
5951
+ return first[this.field.property] === second[this.field.property];
5952
+ }
5953
+ return first === second;
5954
+ };
5955
+ }
5956
+ ngOnInit() {
5957
+ super.ngOnInit();
5958
+ this.searchOptions = this.normalizeSearchOptions();
5959
+ this.group.controls[this.field.name].valueChanges.pipe(takeUntil(this._onDestroy)).subscribe((values) => {
5960
+ this.updateSelectAllState(values);
5961
+ this.changeDetectorRef.markForCheck();
5962
+ });
5963
+ if (this.usesDeferredSource()) {
5964
+ const selected = this.selectedValues();
5965
+ this.sourceOptions = selected;
5966
+ this.setVisibleOptions(selected);
5967
+ // MatSelect cannot open without at least one MatOption. When search is
5968
+ // disabled, keep the loading option rendered until the deferred source
5969
+ // is requested on the first opening.
5970
+ this.isLoading.set(!this.isSearchEnabled() && selected.length === 0);
5971
+ this.initializeDeferredQueries();
5972
+ }
5973
+ else {
5974
+ this.loadInitialOptions();
5975
+ }
5976
+ if (this.isSearchEnabled() && !this.usesDeferredSource()) {
5977
+ this.searchControl.valueChanges
5978
+ .pipe(startWith$1(this.searchControl.value), debounce((value) => timer(value ? (this.searchOptions.debounceTime ?? this.field.debounceTime ?? 0) : 0)), distinctUntilChanged$1(), takeUntil(this._onDestroy))
5979
+ .subscribe((value) => this.applyLocalFilter(value || ''));
5980
+ }
5981
+ else if (this.isSearchEnabled()) {
5982
+ this.searchControl.valueChanges
5983
+ .pipe(debounce((value) => timer(value ? (this.searchOptions.debounceTime ?? this.field.debounceTime ?? 0) : 0)), distinctUntilChanged$1(), takeUntil(this._onDestroy))
5984
+ .subscribe((value) => {
5985
+ if (this.isPanelOpen) {
5986
+ this.deferredQuery$.next({ kind: 'search', value: value || '' });
5987
+ }
5988
+ });
5989
+ }
5990
+ }
5991
+ ngOnDestroy() {
5992
+ this.restoreMatSelectScroll?.();
5993
+ this.deferredQuery$.complete();
5994
+ super.ngOnDestroy();
5995
+ }
5996
+ ngAfterViewInit() {
5997
+ super.ngAfterViewInit();
5998
+ this.installMatSelectScrollCorrection();
5999
+ }
6000
+ isSearchEnabled() {
6001
+ return this.field.search === true || (this.field.search != null && typeof this.field.search === 'object');
6002
+ }
6003
+ panelClasses() {
6004
+ const classes = ['kles-select-panel'];
6005
+ if (this.field.virtualScroll) {
6006
+ classes.push('kles-select-virtual-panel');
6007
+ }
6008
+ if (this.isSearchEnabled()) {
6009
+ classes.push('kles-select-has-search');
6010
+ }
6011
+ return classes;
6012
+ }
6013
+ onOpenedChange(opened) {
6014
+ this.isPanelOpen = opened;
6015
+ if (this.usesDeferredSource()) {
6016
+ if (opened) {
6017
+ this.isDeferredSourceLoaded = false;
6018
+ // Keep the initial request alive while search terms replace each
6019
+ // other, otherwise switchMap cancels the baseline option loading.
6020
+ this.deferredOptionsRequest$ = this.resolveOptions().pipe(shareReplay$1({ bufferSize: 1, refCount: false }));
6021
+ }
6022
+ this.deferredQuery$.next(opened ? { kind: 'open', value: this.searchControl.value || '' } : { kind: 'close' });
6023
+ }
6024
+ if (!opened && this.isSearchEnabled() && (this.searchOptions.clearOnClose ?? true)) {
6025
+ this.searchControl.setValue('');
6026
+ }
6027
+ if (opened && this.field.virtualScroll) {
6028
+ setTimeout(() => {
6029
+ this.virtualViewport()?.scrollToIndex(0);
6030
+ this.virtualViewport()?.checkViewportSize();
6031
+ });
6032
+ }
6033
+ }
6034
+ toggleVisibleOptions(state) {
6035
+ const selected = this.selectedValues();
6036
+ const enabledOptions = this.visibleOptions.filter((option) => !option?.disabled);
6037
+ if (!state.checked) {
6038
+ const remaining = selected.filter((value) => !enabledOptions.some((option) => this.compareFn(value, option)));
6039
+ this.group.controls[this.field.name].patchValue(remaining);
6040
+ return;
6041
+ }
6042
+ if (enabledOptions.length > 0) {
6043
+ const added = enabledOptions.filter((option) => !selected.some((value) => this.compareFn(value, option)));
6044
+ this.group.controls[this.field.name].patchValue([...selected, ...added]);
6045
+ }
6046
+ }
6047
+ getHiddenSelectedOptions() {
6048
+ const selected = this.selectedValues();
6049
+ if (this.field.virtualScroll) {
6050
+ return selected;
6051
+ }
6052
+ return selected.filter((selectedOption) => !this.visibleOptions.some((option) => this.compareFn(selectedOption, option)));
6053
+ }
6054
+ normalizeSearchOptions() {
6055
+ if (!this.isSearchEnabled()) {
6056
+ return {};
6057
+ }
6058
+ const configured = typeof this.field.search === 'object' ? this.field.search : {};
6059
+ return {
6060
+ mode: configured.mode ?? 'local',
6061
+ keys: configured.keys ?? this.field.searchKeys,
6062
+ debounceTime: configured.debounceTime ?? this.field.debounceTime,
6063
+ minLength: configured.minLength ?? 0,
6064
+ clearOnClose: configured.clearOnClose ?? true,
6065
+ placeholder: configured.placeholder,
6066
+ ariaLabel: configured.ariaLabel,
6067
+ };
6068
+ }
6069
+ usesDeferredSource() {
6070
+ return !!this.field.lazy || this.searchOptions.mode === 'remote';
6071
+ }
6072
+ loadInitialOptions() {
6073
+ if (isObservable(this.field.options) || typeof this.field.options === 'function') {
6074
+ this.isLoading.set(true);
6075
+ }
6076
+ this.resolveOptions()
6077
+ .pipe(takeUntil(this._onDestroy))
6078
+ .subscribe((options) => {
6079
+ const safeOptions = options ?? [];
6080
+ this.isLoading.set(false);
6081
+ this.sourceOptions = safeOptions;
6082
+ if (this.isSearchEnabled()) {
6083
+ this.applyLocalFilter(this.searchControl.value || '');
6084
+ }
6085
+ else {
6086
+ this.setVisibleOptions(safeOptions);
6087
+ }
6088
+ });
6089
+ }
6090
+ initializeDeferredQueries() {
6091
+ this.deferredQuery$
6092
+ .pipe(switchMap$1((query) => {
6093
+ if (query.kind === 'close') {
6094
+ const selected = this.selectedValues();
6095
+ // Preserve a disabled loading option when the closed select
6096
+ // would otherwise contain no option and could not reopen.
6097
+ return of({ loading: !this.isSearchEnabled() && selected.length === 0, options: selected, sourceOptions: undefined });
6098
+ }
6099
+ const search = query.value || '';
6100
+ const searchLength = search.trim().length;
6101
+ const isBelowMinimumLength = searchLength > 0 && searchLength < (this.searchOptions.minLength ?? 0);
6102
+ if (query.kind === 'search' && isBelowMinimumLength) {
6103
+ if (this.isDeferredSourceLoaded) {
6104
+ return of({ loading: false, options: this.sourceOptions, sourceOptions: undefined });
6105
+ }
6106
+ const options$ = this.deferredOptionsRequest$ ?? this.resolveOptions();
6107
+ return concat(of({ loading: true, options: [], sourceOptions: undefined }), options$.pipe(map$1((options) => options ?? []), map$1((sourceOptions) => ({ loading: false, options: sourceOptions, sourceOptions }))));
6108
+ }
6109
+ if (query.kind === 'search' && this.searchOptions.mode !== 'remote' && this.isDeferredSourceLoaded) {
6110
+ return of({ loading: false, options: this.filterOptions(this.sourceOptions, search), sourceOptions: undefined });
6111
+ }
6112
+ const options$ = this.searchOptions.mode === 'remote' && typeof this.field.options === 'function' && searchLength > 0
6113
+ ? this.resolveOptions(search)
6114
+ : (this.deferredOptionsRequest$ ?? this.resolveOptions());
6115
+ return concat(of({ loading: true, options: [], sourceOptions: undefined }), options$.pipe(map$1((options) => options ?? []), map$1((sourceOptions) => ({
6116
+ loading: false,
6117
+ sourceOptions: this.searchOptions.mode === 'remote' && searchLength > 0 ? undefined : sourceOptions,
6118
+ options: this.searchOptions.mode === 'remote' ? sourceOptions : this.filterOptions(sourceOptions, search),
6119
+ }))));
6120
+ }), takeUntil(this._onDestroy))
6121
+ .subscribe(({ loading, options, sourceOptions }) => {
6122
+ this.isLoading.set(loading);
6123
+ if (!loading) {
6124
+ if (sourceOptions !== undefined) {
6125
+ this.sourceOptions = sourceOptions;
6126
+ this.isDeferredSourceLoaded = true;
6127
+ }
6128
+ this.setVisibleOptions(options);
6129
+ }
6130
+ });
6131
+ }
6132
+ resolveOptions(search) {
6133
+ if (isObservable(this.field.options)) {
6134
+ return this.field.options;
6135
+ }
6136
+ if (typeof this.field.options === 'function') {
6137
+ return this.field.options(search, this.group.getRawValue());
6138
+ }
6139
+ return of(this.field.options ?? []);
6140
+ }
6141
+ applyLocalFilter(value) {
6142
+ const searchLength = value.trim().length;
6143
+ const options = searchLength > 0 && searchLength < (this.searchOptions.minLength ?? 0) ? this.sourceOptions : this.filterOptions(this.sourceOptions, value);
6144
+ this.setVisibleOptions(options);
6145
+ }
6146
+ setVisibleOptions(options) {
6147
+ this.visibleOptions = options;
6148
+ this.filteredOptions.set(options);
6149
+ this.updateSelectAllState(this.group.controls[this.field.name].value);
6150
+ this.changeDetectorRef.markForCheck();
6151
+ }
6152
+ filterOptions(options, value) {
6153
+ const search = value.trim().toLocaleLowerCase();
6154
+ if (!search) {
6155
+ return options;
6156
+ }
6157
+ const keys = this.searchOptions.keys ?? [];
6158
+ return options.filter((option) => {
6159
+ const keyMatch = keys.some((key) => this.normalizeSearchValue(option?.[key]).includes(search));
6160
+ const propertyMatch = this.field.property ? this.normalizeSearchValue(option?.[this.field.property]).includes(search) : false;
6161
+ return keyMatch || propertyMatch || (!keys.length && !this.field.property && this.normalizeSearchValue(option).includes(search));
6162
+ });
6163
+ }
6164
+ normalizeSearchValue(value) {
6165
+ return value == null ? '' : String(value).toLocaleLowerCase();
6166
+ }
6167
+ installMatSelectScrollCorrection() {
6168
+ if (this.restoreMatSelectScroll || (!this.isSearchEnabled() && !this.field.multiple)) {
6169
+ return;
6170
+ }
6171
+ const matSelect = this.matSelect();
6172
+ if (!matSelect) {
6173
+ return;
6174
+ }
6175
+ const originalScrollOptionIntoView = matSelect._scrollOptionIntoView;
6176
+ matSelect._scrollOptionIntoView = (index) => {
6177
+ const options = matSelect.options.toArray();
6178
+ const option = options[index];
6179
+ const optionElement = option?._getHostElement();
6180
+ if (optionElement?.classList.contains('kles-select-search-option')) {
6181
+ const firstOptionIndex = options.findIndex((candidate) => {
6182
+ const element = candidate._getHostElement();
6183
+ return !candidate.disabled && !element.classList.contains('kles-hidden-selected-option');
6184
+ });
6185
+ if (firstOptionIndex >= 0 && matSelect._keyManager.activeItemIndex !== firstOptionIndex) {
6186
+ matSelect._keyManager.setActiveItem(firstOptionIndex);
6187
+ }
6188
+ return;
6189
+ }
6190
+ originalScrollOptionIntoView.call(matSelect, index);
6191
+ requestAnimationFrame(() => this.keepOptionVisible(option?._getHostElement()));
6192
+ };
6193
+ this.restoreMatSelectScroll = () => {
6194
+ matSelect._scrollOptionIntoView = originalScrollOptionIntoView;
6195
+ this.restoreMatSelectScroll = undefined;
6196
+ };
6197
+ }
6198
+ keepOptionVisible(activeOption) {
6199
+ const panel = this.matSelect()?.panel?.nativeElement;
6200
+ if (!panel || !activeOption || !panel.contains(activeOption)) {
6201
+ return;
6202
+ }
6203
+ const options = panel.querySelectorAll('.mat-mdc-option:not(.kles-select-search-option):not(.kles-hidden-selected-option)');
6204
+ if (activeOption === options.item(0)) {
6205
+ panel.scrollTop = 0;
6206
+ return;
6207
+ }
6208
+ if (activeOption === options.item(options.length - 1)) {
6209
+ panel.scrollTop = panel.scrollHeight;
6210
+ return;
6211
+ }
6212
+ const panelRect = panel.getBoundingClientRect();
6213
+ const fixedHeader = panel.querySelector('.selectAll') ?? panel.querySelector('.kles-select-search-option');
6214
+ const visibleTop = fixedHeader?.getBoundingClientRect().bottom ?? panelRect.top;
6215
+ const optionRect = activeOption.getBoundingClientRect();
6216
+ if (optionRect.top < visibleTop) {
6217
+ panel.scrollTop += optionRect.top - visibleTop;
6218
+ }
6219
+ else if (optionRect.bottom > panelRect.bottom) {
6220
+ panel.scrollTop += optionRect.bottom - panelRect.bottom;
6221
+ }
6222
+ }
6223
+ selectedValues() {
6224
+ const value = this.group.controls[this.field.name].value;
6225
+ if (value === undefined || value === null) {
6226
+ return [];
6227
+ }
6228
+ return Array.isArray(value) ? value : [value];
6229
+ }
6230
+ updateSelectAllState(values) {
6231
+ if (!this.field.multiple) {
6232
+ return;
6233
+ }
6234
+ const selected = Array.isArray(values) ? values : [];
6235
+ const enabledOptions = this.visibleOptions.filter((option) => !option?.disabled);
6236
+ const selectedCount = enabledOptions.filter((option) => selected.some((value) => this.compareFn(value, option))).length;
6237
+ const allSelected = enabledOptions.length > 0 && selectedCount === enabledOptions.length;
6238
+ this.selectAllIndeterminate.set(selectedCount > 0 && !allSelected);
6239
+ this.selectAllControl.setValue(allSelected, { emitEvent: false });
6240
+ }
6241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6242
+ 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: `
6243
+ <mat-form-field [subscriptSizing]="field.subscriptSizing" [color]="color()" [formGroup]="group" [appearance]="appearance()">
6244
+ @if (label()) {
6245
+ <mat-label>{{ label() }}</mat-label>
6246
+ }
6247
+
6248
+ <mat-select
6249
+ [matTooltip]="tooltip()"
6250
+ [attr.id]="field.id"
6251
+ [ngClass]="ngClass()"
6252
+ [compareWith]="compareFn"
6253
+ [panelClass]="panelClasses()"
6254
+ [panelWidth]="field.panelWidth || 'auto'"
6255
+ [placeholder]="placeholder()"
6256
+ [formControlName]="field.name"
6257
+ [multiple]="field.multiple"
6258
+ (openedChange)="onOpenedChange($event)"
6259
+ (focus)="onFocus()"
6260
+ (blur)="onBlur()"
6261
+ >
6262
+ @if (field.triggerComponent) {
6263
+ <mat-select-trigger>
6264
+ <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field" />
6265
+ </mat-select-trigger>
6266
+ }
6267
+
6268
+ @if (isSearchEnabled()) {
6269
+ <mat-option>
6270
+ <kles-select-search-input [control]="searchControl" [placeholder]="searchOptions.placeholder || intl.search" [ariaLabel]="searchOptions.ariaLabel || intl.search" [clearAriaLabel]="intl.clearSearch" [searching]="isLoading()" />
6271
+ </mat-option>
6272
+ }
6273
+
6274
+ @if (!isLoading()) {
6275
+ @if (field.multiple) {
6276
+ <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" [indeterminate]="selectAllIndeterminate()" (change)="toggleVisibleOptions($event)">
6277
+ {{ intl.selectAll }}
6278
+ </mat-checkbox>
6279
+ }
6280
+
6281
+ @if (field.virtualScroll) {
6282
+ <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 48" [style.height.px]="5 * (field.itemSize || 48)">
6283
+ @if (!field.autocompleteComponent) {
6284
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6285
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6286
+ </mat-option>
6287
+ } @else {
6288
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6289
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6290
+ </mat-option>
6291
+ }
6292
+ </cdk-virtual-scroll-viewport>
6293
+ } @else {
6294
+ @if (!field.autocompleteComponent) {
6295
+ @for (item of filteredOptions(); track item) {
6296
+ <mat-option [value]="item" [disabled]="item?.disabled">
6297
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6298
+ </mat-option>
6299
+ }
6300
+ } @else {
6301
+ @for (item of filteredOptions(); track item) {
6302
+ <mat-option [value]="item" [disabled]="item?.disabled">
6303
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6304
+ </mat-option>
6305
+ }
6306
+ }
6307
+ }
6308
+
6309
+ @for (item of getHiddenSelectedOptions(); track item) {
6310
+ <mat-option [value]="item" class="kles-hidden-selected-option">
6311
+ @if (!field.autocompleteComponent) {
6312
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6313
+ } @else {
6314
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6315
+ }
6316
+ </mat-option>
6317
+ }
6318
+ } @else {
6319
+ <mat-option class="hide-checkbox" disabled>
6320
+ <div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20" /></div>
6321
+ </mat-option>
6322
+ }
6323
+ </mat-select>
6324
+
6325
+ @if (hint()) {
6326
+ <mat-hint>{{ hint() }}</mat-hint>
6327
+ }
6328
+
6329
+ @if (field.subComponents || field.clearable || isPending()) {
6330
+ <div matSuffix class="suffix">
6331
+ @if (isPending()) {
6332
+ <mat-spinner mode="indeterminate" diameter="21" />
6333
+ }
6334
+ @if (field.subComponents || field.clearable) {
6335
+ <ng-content />
6336
+ }
6337
+ </div>
6338
+ }
6339
+
6340
+ <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6341
+ </mat-form-field>
6342
+ `, 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 }); }
6343
+ };
6344
+ KlesFormSelectComponent = __decorate([
6345
+ FieldMapper({ type: EnumType.select })
6346
+ ], KlesFormSelectComponent);
6347
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectComponent, decorators: [{
6348
+ type: Component,
6349
+ args: [{ selector: 'kles-form-select', template: `
6350
+ <mat-form-field [subscriptSizing]="field.subscriptSizing" [color]="color()" [formGroup]="group" [appearance]="appearance()">
6351
+ @if (label()) {
6352
+ <mat-label>{{ label() }}</mat-label>
6353
+ }
6354
+
6355
+ <mat-select
6356
+ [matTooltip]="tooltip()"
6357
+ [attr.id]="field.id"
6358
+ [ngClass]="ngClass()"
6359
+ [compareWith]="compareFn"
6360
+ [panelClass]="panelClasses()"
6361
+ [panelWidth]="field.panelWidth || 'auto'"
6362
+ [placeholder]="placeholder()"
6363
+ [formControlName]="field.name"
6364
+ [multiple]="field.multiple"
6365
+ (openedChange)="onOpenedChange($event)"
6366
+ (focus)="onFocus()"
6367
+ (blur)="onBlur()"
6368
+ >
6369
+ @if (field.triggerComponent) {
6370
+ <mat-select-trigger>
6371
+ <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field" />
6372
+ </mat-select-trigger>
6373
+ }
6374
+
6375
+ @if (isSearchEnabled()) {
6376
+ <mat-option>
6377
+ <kles-select-search-input [control]="searchControl" [placeholder]="searchOptions.placeholder || intl.search" [ariaLabel]="searchOptions.ariaLabel || intl.search" [clearAriaLabel]="intl.clearSearch" [searching]="isLoading()" />
6378
+ </mat-option>
6379
+ }
6380
+
6381
+ @if (!isLoading()) {
6382
+ @if (field.multiple) {
6383
+ <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" [indeterminate]="selectAllIndeterminate()" (change)="toggleVisibleOptions($event)">
6384
+ {{ intl.selectAll }}
6385
+ </mat-checkbox>
6386
+ }
6387
+
6388
+ @if (field.virtualScroll) {
6389
+ <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 48" [style.height.px]="5 * (field.itemSize || 48)">
6390
+ @if (!field.autocompleteComponent) {
6391
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6392
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6393
+ </mat-option>
6394
+ } @else {
6395
+ <mat-option *cdkVirtualFor="let item of filteredOptions()" [value]="item" [disabled]="item?.disabled">
6396
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6397
+ </mat-option>
6398
+ }
6399
+ </cdk-virtual-scroll-viewport>
6400
+ } @else {
6401
+ @if (!field.autocompleteComponent) {
6402
+ @for (item of filteredOptions(); track item) {
6403
+ <mat-option [value]="item" [disabled]="item?.disabled">
6404
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6405
+ </mat-option>
6406
+ }
6407
+ } @else {
6408
+ @for (item of filteredOptions(); track item) {
6409
+ <mat-option [value]="item" [disabled]="item?.disabled">
6410
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6411
+ </mat-option>
6412
+ }
6413
+ }
6414
+ }
6415
+
6416
+ @for (item of getHiddenSelectedOptions(); track item) {
6417
+ <mat-option [value]="item" class="kles-hidden-selected-option">
6418
+ @if (!field.autocompleteComponent) {
6419
+ {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
6420
+ } @else {
6421
+ <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field" />
6422
+ }
6423
+ </mat-option>
6424
+ }
6425
+ } @else {
6426
+ <mat-option class="hide-checkbox" disabled>
6427
+ <div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20" /></div>
6428
+ </mat-option>
6429
+ }
6430
+ </mat-select>
6431
+
6432
+ @if (hint()) {
6433
+ <mat-hint>{{ hint() }}</mat-hint>
6434
+ }
6435
+
6436
+ @if (field.subComponents || field.clearable || isPending()) {
6437
+ <div matSuffix class="suffix">
6438
+ @if (isPending()) {
6439
+ <mat-spinner mode="indeterminate" diameter="21" />
6440
+ }
6441
+ @if (field.subComponents || field.clearable) {
6442
+ <ng-content />
6443
+ }
6444
+ </div>
6445
+ }
6446
+
6447
+ <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6448
+ </mat-form-field>
6449
+ `, encapsulation: ViewEncapsulation.None, standalone: true, imports: [
6450
+ CommonModule,
6451
+ ReactiveFormsModule,
6452
+ KlesTransformPipe,
6453
+ MatErrorMessageDirective,
6454
+ MatProgressSpinner,
6455
+ MatHint,
6456
+ MatOption$1,
6457
+ KlesComponentDirective,
6458
+ ScrollingModule,
6459
+ MatSelectTrigger,
6460
+ MatSelect,
6461
+ MatTooltip,
6462
+ MatLabel,
6463
+ MatFormField,
6464
+ MatCheckbox,
6465
+ KlesSelectSearchInputComponent,
6466
+ ], 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"] }]
6467
+ }], propDecorators: { matSelect: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatSelect), { isSignal: true }] }], virtualViewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }] } });
6468
+
6891
6469
  function autocompleteObjectValidator(optional) {
6892
6470
  return (control) => {
6893
6471
  if ((control.value === null || control.value === undefined) && !optional)
@@ -6919,5 +6497,5 @@ function autocompleteStringValidator(validOptions, optional) {
6919
6497
  * Generated bundle index. Do not edit.
6920
6498
  */
6921
6499
 
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 };
6500
+ 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
6501
  //# sourceMappingURL=3kles-kles-material-dynamicforms.mjs.map