@3kles/kles-material-dynamicforms 21.6.0 → 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,
@@ -2410,34 +2041,29 @@ class KlesFormColorComponent extends KlesFieldAbstract {
2410
2041
  [style.color]="foregroundColor()"
2411
2042
  />
2412
2043
 
2413
- <kles-material-color-picker-trigger
2414
- matSuffix
2415
- [color]="currentColor()"
2416
- [outputFormat]="colorOption().format ?? 'hex8'"
2417
- [commitMode]="colorOption().commitMode ?? 'live'"
2418
- [alpha]="colorOption().alpha ?? true"
2419
- [eyeDropper]="colorOption().eyeDropper ?? true"
2420
- [saveOnOutside]="colorOption().saveOnOutside ?? true"
2421
- [fallbackColor]="colorOption().fallbackColor ?? '#000000ff'"
2422
- [presets]="colorOption().presets ?? []"
2423
-
2424
- [disabled]="pickerDisabled()"
2425
- (colorChange)="setColor($event)"
2426
- />
2427
-
2428
- <!-- TODO [position]="colorOption().position ?? 'auto'"
2429
- [positionOffset]="colorOption().positionOffset ?? 8" -->
2430
-
2431
-
2432
- @if (field.subComponents || field.clearable) {
2433
- <div matSuffix>
2044
+ <div matSuffix class="suffix">
2045
+ <kles-material-color-picker-trigger
2046
+ [color]="currentColor()"
2047
+ [outputFormat]="colorOption().format ?? 'hex8'"
2048
+ [commitMode]="colorOption().commitMode ?? 'live'"
2049
+ [alpha]="colorOption().alpha ?? true"
2050
+ [eyeDropper]="colorOption().eyeDropper ?? true"
2051
+ [saveOnOutside]="colorOption().saveOnOutside ?? true"
2052
+ [fallbackColor]="colorOption().fallbackColor ?? '#000000ff'"
2053
+ [presets]="colorOption().presets ?? []"
2054
+ [position]="colorOption().position ?? 'auto'"
2055
+ [positionOffset]="colorOption().positionOffset ?? 8"
2056
+ [disabled]="pickerDisabled()"
2057
+ (colorChange)="setColor($event)"
2058
+ />
2059
+ @if (field.subComponents || field.clearable) {
2434
2060
  <ng-content />
2435
- </div>
2436
- }
2061
+ }
2062
+ </div>
2437
2063
 
2438
2064
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
2439
2065
  </mat-form-field>
2440
- `, isInline: true, styles: [":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 }); }
2441
2067
  }
2442
2068
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormColorComponent, decorators: [{
2443
2069
  type: Component,
@@ -2455,34 +2081,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
2455
2081
  [style.color]="foregroundColor()"
2456
2082
  />
2457
2083
 
2458
- <kles-material-color-picker-trigger
2459
- matSuffix
2460
- [color]="currentColor()"
2461
- [outputFormat]="colorOption().format ?? 'hex8'"
2462
- [commitMode]="colorOption().commitMode ?? 'live'"
2463
- [alpha]="colorOption().alpha ?? true"
2464
- [eyeDropper]="colorOption().eyeDropper ?? true"
2465
- [saveOnOutside]="colorOption().saveOnOutside ?? true"
2466
- [fallbackColor]="colorOption().fallbackColor ?? '#000000ff'"
2467
- [presets]="colorOption().presets ?? []"
2468
-
2469
- [disabled]="pickerDisabled()"
2470
- (colorChange)="setColor($event)"
2471
- />
2472
-
2473
- <!-- TODO [position]="colorOption().position ?? 'auto'"
2474
- [positionOffset]="colorOption().positionOffset ?? 8" -->
2475
-
2476
-
2477
- @if (field.subComponents || field.clearable) {
2478
- <div matSuffix>
2084
+ <div matSuffix class="suffix">
2085
+ <kles-material-color-picker-trigger
2086
+ [color]="currentColor()"
2087
+ [outputFormat]="colorOption().format ?? 'hex8'"
2088
+ [commitMode]="colorOption().commitMode ?? 'live'"
2089
+ [alpha]="colorOption().alpha ?? true"
2090
+ [eyeDropper]="colorOption().eyeDropper ?? true"
2091
+ [saveOnOutside]="colorOption().saveOnOutside ?? true"
2092
+ [fallbackColor]="colorOption().fallbackColor ?? '#000000ff'"
2093
+ [presets]="colorOption().presets ?? []"
2094
+ [position]="colorOption().position ?? 'auto'"
2095
+ [positionOffset]="colorOption().positionOffset ?? 8"
2096
+ [disabled]="pickerDisabled()"
2097
+ (colorChange)="setColor($event)"
2098
+ />
2099
+ @if (field.subComponents || field.clearable) {
2479
2100
  <ng-content />
2480
- </div>
2481
- }
2101
+ }
2102
+ </div>
2482
2103
 
2483
2104
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
2484
2105
  </mat-form-field>
2485
- `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}mat-form-field{width:100%}\n"] }]
2106
+ `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".suffix{display:flex;align-items:center}\n", ":host{display:block;width:100%}mat-form-field{width:100%}\n"] }]
2486
2107
  }] });
2487
2108
 
2488
2109
  class KlesButtonBase {
@@ -3039,15 +2660,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3039
2660
  `, standalone: true, imports: [CommonModule, MatErrorMessageDirective, ScrollingModule, ReactiveFormsModule, MatTooltip, MatLabel, MatFormField, TextFieldModule, MatInput], styles: ["mat-form-field{width:100%}\n"] }]
3040
2661
  }] });
3041
2662
 
3042
- let KlesFormTextComponent = class KlesFormTextComponent extends KlesFieldAbstract {
3043
- ngOnInit() {
3044
- super.ngOnInit();
3045
- }
3046
- ngOnDestroy() {
3047
- super.ngOnDestroy();
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;
3048
2680
  }
3049
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3050
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFormTextComponent, isStandalone: true, selector: "kles-form-text", usesInheritance: true, ngImport: i0, template: `
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
+
2692
+ let KlesFormTextComponent = class KlesFormTextComponent extends KlesFieldAbstract {
2693
+ ngOnInit() {
2694
+ super.ngOnInit();
2695
+ }
2696
+ ngOnDestroy() {
2697
+ super.ngOnDestroy();
2698
+ }
2699
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2700
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFormTextComponent, isStandalone: true, selector: "kles-form-text", usesInheritance: true, ngImport: i0, template: `
3051
2701
  <span [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()" [ngStyle]="ngStyle()">
3052
2702
  {{ (field.property && group.controls[field.name].value ? group.controls[field.name].value[field.property] : group.controls[field.name].value) | klesTransform: field.pipeTransform }}
3053
2703
  </span>
@@ -3331,7 +2981,7 @@ class KlesFormInputClearableComponent extends KlesFormInputComponent {
3331
2981
 
3332
2982
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3333
2983
  </mat-form-field>
3334
- `, 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" }] }); }
3335
2985
  }
3336
2986
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormInputClearableComponent, decorators: [{
3337
2987
  type: Component,
@@ -3408,7 +3058,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3408
3058
 
3409
3059
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3410
3060
  </mat-form-field>
3411
- `, 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"] }]
3412
3062
  }] });
3413
3063
 
3414
3064
  class KlesFormIconComponent extends KlesFieldAbstract {
@@ -3434,772 +3084,290 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
3434
3084
  `, standalone: true, imports: [CommonModule, MatIcon, MatTooltip, ReactiveFormsModule] }]
3435
3085
  }] });
3436
3086
 
3437
- class KlesFormSelectSearchComponent extends KlesFieldAbstract {
3438
- constructor() {
3439
- super(...arguments);
3440
- this.searchControl = new UntypedFormControl();
3441
- this.selectAllControl = new UntypedFormControl(false);
3442
- this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
3443
- this.options$ = new BehaviorSubject([]);
3444
- this.optionsFiltered$ = new ReplaySubject(1);
3445
- this.openChange$ = new BehaviorSubject(false);
3446
- this.openClosed$ = new Subject();
3447
- this.intl = inject(KlesDynamicFormIntl);
3448
- this.ref = inject(ChangeDetectorRef);
3449
- this.compareFn = (o1, o2) => {
3450
- if (this.field.property && o1 && o2) {
3451
- return o1[this.field.property] === o2[this.field.property];
3452
- }
3453
- return o1 === o2;
3454
- };
3087
+ let KlesFormLineBreakComponent = class KlesFormLineBreakComponent extends KlesFieldAbstract {
3088
+ ngOnInit() { super.ngOnInit(); }
3089
+ ngOnDestroy() {
3090
+ super.ngOnDestroy();
3455
3091
  }
3456
- ngOnInit() {
3457
- super.ngOnInit();
3458
- if (this.field.lazy) {
3459
- this.isLoading.set(true);
3460
- if (this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null) {
3461
- 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]);
3462
- this.isLoading.set(false);
3463
- }
3464
- else {
3465
- this.options$ = new BehaviorSubject([]);
3466
- }
3467
- this.openChangeEvent();
3468
- }
3469
- else {
3470
- if (this.field.options instanceof Observable) {
3471
- this.options$ = this.field.options;
3472
- }
3473
- else if (this.field.options instanceof Function) {
3474
- this.options$ = this.field.options(undefined, this.group.getRawValue());
3092
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLineBreakComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
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"] }); }
3094
+ };
3095
+ KlesFormLineBreakComponent = __decorate([
3096
+ FieldMapper({
3097
+ type: EnumType.lineBreak,
3098
+ factory: () => null
3099
+ })
3100
+ ], KlesFormLineBreakComponent);
3101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLineBreakComponent, decorators: [{
3102
+ type: Component,
3103
+ args: [{ selector: 'kles-form-line-break', template: ``, standalone: true, styles: [":host{flex-basis:100%;display:flex;height:0}\n"] }]
3104
+ }] });
3105
+
3106
+ class ArrayFormatPipe {
3107
+ transform(values, property) {
3108
+ if (values && Array.isArray(values)) {
3109
+ if (property) {
3110
+ return values.map(value => value[property]).filter(Boolean).join(', ');
3475
3111
  }
3476
3112
  else {
3477
- this.options$ = of(this.field.options ?? []);
3113
+ return values.join(', ');
3478
3114
  }
3479
3115
  }
3480
- this.options$.pipe(takeUntil$1(this._onDestroy)).subscribe((options) => {
3481
- this.optionsFiltered$.next(options);
3482
- });
3483
- this.searchControl.valueChanges
3484
- .pipe(takeUntil$1(this._onDestroy), debounceTime(this.field.debounceTime || 0), startWith$1(this.searchControl.value), switchMap((value) => {
3485
- return concat(of({ loading: true, options: [] }), this.onSearchChange(value).pipe(take(1), map((options) => ({ loading: false, options }))));
3486
- }))
3487
- .subscribe(({ loading, options }) => {
3488
- this.isLoading.set(loading);
3489
- this.optionsFiltered$.next(options);
3490
- this.updateSelectAllControl(this.group.controls[this.field.name].value);
3491
- this.ref.markForCheck();
3492
- });
3493
- if (this.field.multiple) {
3494
- // this.updateSelectAllControl(this.group.controls[this.field.name].value);
3495
- this.group.controls[this.field.name].registerOnChange((values, emitViewToModelChange) => {
3496
- if (emitViewToModelChange) {
3497
- this.updateSelectAllControl(values);
3498
- }
3499
- });
3500
- }
3116
+ return '';
3117
+ }
3118
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ArrayFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3119
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: ArrayFormatPipe, isStandalone: true, name: "arrayFormat" }); }
3120
+ }
3121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ArrayFormatPipe, decorators: [{
3122
+ type: Pipe,
3123
+ args: [{
3124
+ name: 'arrayFormat',
3125
+ standalone: true,
3126
+ }]
3127
+ }] });
3128
+
3129
+ class KlesFormLinkComponent extends KlesFieldAbstract {
3130
+ ngOnInit() {
3131
+ super.ngOnInit();
3501
3132
  }
3502
3133
  ngOnDestroy() {
3503
- // this._onDestroy.next();
3504
- this.openClosed$.next();
3505
- this.openClosed$.complete();
3506
3134
  super.ngOnDestroy();
3507
3135
  }
3508
- toggleAllSelection(state) {
3509
- if (state.checked) {
3510
- this.optionsFiltered$
3511
- .pipe(take(1), map((options) => options.filter((option) => !option?.disabled)))
3512
- .subscribe((options) => {
3513
- if (options.length > 0) {
3514
- this.group.controls[this.field.name].patchValue(options);
3515
- }
3516
- });
3517
- }
3518
- else {
3519
- this.group.controls[this.field.name].patchValue([]);
3520
- }
3521
- this.ref.markForCheck();
3136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3137
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.20", type: KlesFormLinkComponent, isStandalone: true, selector: "kles-form-link", usesInheritance: true, ngImport: i0, template: `
3138
+ <a [href]="group.controls[field.name].value" [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()">
3139
+ {{ label() }}
3140
+ </a>
3141
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
3142
+ }
3143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLinkComponent, decorators: [{
3144
+ type: Component,
3145
+ args: [{
3146
+ selector: 'kles-form-link',
3147
+ template: `
3148
+ <a [href]="group.controls[field.name].value" [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()">
3149
+ {{ label() }}
3150
+ </a>
3151
+ `,
3152
+ standalone: true,
3153
+ imports: [CommonModule, MatTooltip, ReactiveFormsModule],
3154
+ }]
3155
+ }] });
3156
+
3157
+ class KlesFormSlideToggleComponent extends KlesFieldAbstract {
3158
+ ngOnInit() {
3159
+ super.ngOnInit();
3522
3160
  }
3523
- openChangeEvent() {
3524
- this.openChange$
3525
- .pipe(takeUntil$1(this._onDestroy), switchMap((isOpen) => {
3526
- return this.onOpenChange(isOpen);
3527
- }))
3528
- .subscribe((options) => {
3529
- this.isLoading.set(false);
3530
- this.options$.next(options);
3531
- this.optionsFiltered$.next(options);
3532
- this.updateSelectAllControl(this.group.controls[this.field.name].value);
3533
- this.ref.markForCheck();
3534
- });
3161
+ ngOnDestroy() {
3162
+ super.ngOnDestroy();
3535
3163
  }
3536
- onOpenChange(isOpen) {
3537
- if (isOpen) {
3538
- if (this.field.options instanceof Observable) {
3539
- this.isLoading.set(true);
3540
- return this.field.options.pipe(takeUntil$1(this.openClosed$));
3541
- }
3542
- else if (this.field.options instanceof Function) {
3543
- this.isLoading.set(true);
3544
- return this.field.options(undefined, this.group.getRawValue()).pipe(takeUntil$1(this.openClosed$));
3164
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSlideToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3165
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.20", type: KlesFormSlideToggleComponent, isStandalone: true, selector: "kles-form-slide-toggle", usesInheritance: true, ngImport: i0, template: `
3166
+ <div [formGroup]="group">
3167
+ <mat-slide-toggle [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()" [color]="color()" [formControlName]="field.name">{{ label() }}</mat-slide-toggle>
3168
+ </div>
3169
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { 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.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"] }] }); }
3170
+ }
3171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSlideToggleComponent, decorators: [{
3172
+ type: Component,
3173
+ args: [{ selector: 'kles-form-slide-toggle', template: `
3174
+ <div [formGroup]="group">
3175
+ <mat-slide-toggle [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()" [color]="color()" [formControlName]="field.name">{{ label() }}</mat-slide-toggle>
3176
+ </div>
3177
+ `, standalone: true, imports: [CommonModule, MatSlideToggle, MatTooltip, ReactiveFormsModule] }]
3178
+ }] });
3179
+
3180
+ /**
3181
+ * Copy and past from https://github.com/angular/components/blob/17.0.x/src/cdk/collections/selection-model.ts
3182
+ * (They put everything in private, thanks to angular team)
3183
+ */
3184
+ class KlesSelectionModel {
3185
+ /** Selected values. */
3186
+ get selected() {
3187
+ if (!this._selected) {
3188
+ this._selected = Array.from(this._selection.values());
3189
+ }
3190
+ return this._selected;
3191
+ }
3192
+ constructor(_multiple = false, initiallySelectedValues, _emitChanges = true, compareWith) {
3193
+ this._multiple = _multiple;
3194
+ this._emitChanges = _emitChanges;
3195
+ this.compareWith = compareWith;
3196
+ /** Currently-selected values. */
3197
+ this._selection = new Set();
3198
+ /** Keeps track of the deselected options that haven't been emitted by the change event. */
3199
+ this._deselectedToEmit = [];
3200
+ /** Keeps track of the selected options that haven't been emitted by the change event. */
3201
+ this._selectedToEmit = [];
3202
+ /** Event emitted when the value has changed. */
3203
+ this.changed = new Subject();
3204
+ if (initiallySelectedValues && initiallySelectedValues.length) {
3205
+ if (_multiple) {
3206
+ initiallySelectedValues.forEach(value => this._markSelected(value));
3545
3207
  }
3546
3208
  else {
3547
- return of(this.field.options ?? []);
3209
+ this._markSelected(initiallySelectedValues[0]);
3548
3210
  }
3211
+ // Clear the array in order to avoid firing the change event for preselected values.
3212
+ this._selectedToEmit.length = 0;
3213
+ }
3214
+ }
3215
+ /**
3216
+ * Selects a value or an array of values.
3217
+ * @param values The values to select
3218
+ * @return Whether the selection changed as a result of this call
3219
+ * @breaking-change 16.0.0 make return type boolean
3220
+ */
3221
+ select(values, option) {
3222
+ this._verifyValueAssignment(values);
3223
+ values.forEach(value => this._markSelected(value));
3224
+ const changed = this._hasQueuedChanges();
3225
+ if (!option || option?.emitEvent) {
3226
+ this._emitChangeEvent();
3549
3227
  }
3550
3228
  else {
3551
- return of(this.group.controls[this.field.name].value !== undefined && this.group.controls[this.field.name].value !== null
3552
- ? Array.isArray(this.group.controls[this.field.name].value)
3553
- ? this.group.controls[this.field.name].value
3554
- : [this.group.controls[this.field.name].value]
3555
- : []);
3229
+ this._selected = null;
3556
3230
  }
3231
+ return changed;
3557
3232
  }
3558
- onSearchChange(value) {
3559
- if (value) {
3560
- const search = value.toLowerCase();
3561
- return this.options$.pipe(map((options) => {
3562
- return options.filter((option) => {
3563
- if (this.field.searchKeys && this.field.searchKeys.length) {
3564
- return (this.field.searchKeys.some((searchKey) => {
3565
- if (option[searchKey]) {
3566
- return option[searchKey]?.toString().toLowerCase().indexOf(search) > -1;
3567
- }
3568
- return false;
3569
- }) || (this.field.property ? option[this.field.property]?.toString().toLowerCase().indexOf(search) > -1 : false));
3570
- }
3571
- else {
3572
- if (this.field.property) {
3573
- return option[this.field.property]?.toString().toLowerCase().indexOf(search) > -1;
3574
- }
3575
- }
3576
- return option?.toString().toLowerCase().indexOf(search) > -1;
3577
- });
3578
- }));
3233
+ /**
3234
+ * Deselects a value or an array of values.
3235
+ * @param values The values to deselect
3236
+ * @return Whether the selection changed as a result of this call
3237
+ * @breaking-change 16.0.0 make return type boolean
3238
+ */
3239
+ deselect(values, option) {
3240
+ this._verifyValueAssignment(values);
3241
+ values.forEach(value => this._unmarkSelected(value));
3242
+ const changed = this._hasQueuedChanges();
3243
+ if (!option || option?.emitEvent) {
3244
+ this._emitChangeEvent();
3579
3245
  }
3580
3246
  else {
3581
- return this.options$;
3247
+ this._selected = null;
3582
3248
  }
3249
+ return changed;
3583
3250
  }
3584
- openChange($event) {
3585
- if (this.field.lazy) {
3586
- if (!$event) {
3587
- this.openClosed$.next();
3588
- }
3589
- this.openChange$.next($event);
3251
+ /**
3252
+ * Sets the selected values
3253
+ * @param values The new selected values
3254
+ * @return Whether the selection changed as a result of this call
3255
+ * @breaking-change 16.0.0 make return type boolean
3256
+ */
3257
+ setSelection(values, option) {
3258
+ this._verifyValueAssignment(values);
3259
+ const oldValues = this.selected;
3260
+ const newSelectedSet = new Set(values.map((value) => this._getConcreteValue(value)));
3261
+ values.forEach(value => this._markSelected(value));
3262
+ oldValues
3263
+ .filter(value => !newSelectedSet.has(value))
3264
+ .forEach(value => this._unmarkSelected(value));
3265
+ const changed = this._hasQueuedChanges();
3266
+ if (!option || option?.emitEvent) {
3267
+ this._emitChangeEvent();
3590
3268
  }
3591
- if (this.field.virtualScroll) {
3592
- if ($event) {
3593
- this.cdkVirtualScrollViewport.scrollToIndex(0);
3594
- this.cdkVirtualScrollViewport.checkViewportSize();
3595
- }
3269
+ else {
3270
+ this._selected = null;
3596
3271
  }
3272
+ return changed;
3597
3273
  }
3598
- selectionChange(selection) {
3599
- this.updateSelectAllControl(selection.value);
3600
- }
3601
- updateSelectAllControl(values) {
3602
- if (this.field.multiple) {
3603
- if (values) {
3604
- const selected = this.field.property && values ? values.map((s) => s[this.field.property]) : values;
3605
- this.optionsFiltered$
3606
- .pipe(take(1), map((options) => options?.filter((option) => !option?.disabled).map((option) => (this.field.property ? option[this.field.property] : option))), map((options) => {
3607
- if (!selected) {
3608
- return false;
3609
- }
3610
- if (options.length < selected.length) {
3611
- return options.length > 0 && options.every((o) => selected.includes(o));
3612
- }
3613
- else {
3614
- return options.length > 0 && options.length === selected.length && selected.every((s) => options.includes(s));
3615
- }
3616
- }))
3617
- .subscribe((isChecked) => {
3618
- this.selectAllControl.setValue(isChecked, { emitEvent: false });
3619
- });
3620
- }
3274
+ /**
3275
+ * Toggles a value between selected and deselected.
3276
+ * @param value The value to toggle
3277
+ * @return Whether the selection changed as a result of this call
3278
+ * @breaking-change 16.0.0 make return type boolean
3279
+ */
3280
+ toggle(value) {
3281
+ if (Array.isArray(value)) {
3282
+ return this.isSelected(value) ? this.deselect(value) : this.select(value);
3283
+ }
3284
+ else {
3285
+ return this.isSelected(value) ? this.deselect([value]) : this.select([value]);
3621
3286
  }
3622
3287
  }
3623
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectSearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3624
- 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: `
3625
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
3626
- @if (label()) {
3627
- <mat-label>{{ label() }}</mat-label>
3628
- }
3629
-
3630
- <mat-select
3631
- [matTooltip]="tooltip()"
3632
- [attr.id]="field.id"
3633
- [ngClass]="ngClass()"
3634
- (openedChange)="openChange($event)"
3635
- [compareWith]="compareFn"
3636
- [panelWidth]="field.panelWidth || 'auto'"
3637
- [placeholder]="placeholder()"
3638
- [formControlName]="field.name"
3639
- [multiple]="field.multiple"
3640
- (selectionChange)="selectionChange($event)"
3641
- (focus)="onFocus()"
3642
- (blur)="onBlur()"
3643
- >
3644
- @if (field.triggerComponent) {
3645
- <mat-select-trigger>
3646
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
3647
- </mat-select-trigger>
3648
- }
3649
- @if (field.virtualScroll) {
3650
- <mat-option>
3651
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3652
- </mat-option>
3653
-
3654
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
3655
- @if (!isLoading()) {
3656
- @if (field.multiple) {
3657
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3658
- {{ intl.selectAll }}
3659
- </mat-checkbox>
3660
- }
3661
- @if (!field.autocompleteComponent) {
3662
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3663
-
3664
- @if (field.multiple) {
3665
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3666
- <mat-option [value]="item" style="display:none">
3667
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3668
- </mat-option>
3669
- }
3670
- }
3671
- @if (!field.multiple && group.controls[field.name].value) {
3672
- @for (item of [group?.controls[field.name]?.value]; track item) {
3673
- <mat-option [value]="item" style="display:none">
3674
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3675
- </mat-option>
3676
- }
3677
- }
3678
- } @else {
3679
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3680
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3681
- </mat-option>
3682
-
3683
- @if (field.multiple) {
3684
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3685
- <mat-option [value]="item" style="display:none">
3686
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3687
- </mat-option>
3688
- }
3689
- }
3690
- @if (!field.multiple && group.controls[field.name].value) {
3691
- @for (item of [group?.controls[field.name]?.value]; track item) {
3692
- <mat-option [value]="item" style="display:none">
3693
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3694
- </mat-option>
3695
- }
3696
- }
3697
- }
3698
- } @else {
3699
- <mat-option class="hide-checkbox" disabled
3700
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3701
- ></mat-option>
3702
- }
3703
- </cdk-virtual-scroll-viewport>
3704
- } @else {
3705
- <mat-option>
3706
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3707
- </mat-option>
3708
-
3709
- @if (!isLoading()) {
3710
- @if (field.multiple) {
3711
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3712
- {{ intl.selectAll }}
3713
- </mat-checkbox>
3714
- }
3715
- @if (!field.autocompleteComponent) {
3716
- @for (item of optionsFiltered$ | async; track item) {
3717
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3718
- }
3719
- } @else {
3720
- @for (item of optionsFiltered$ | async; track item) {
3721
- <mat-option [value]="item" [disabled]="item?.disabled">
3722
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3723
- </mat-option>
3724
- }
3725
- }
3726
- } @else {
3727
- <mat-option class="hide-checkbox" disabled
3728
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3729
- ></mat-option>
3730
- }
3731
-
3732
- <ng-template #emptyOption>
3733
- <mat-option class="hide-checkbox" disabled
3734
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3735
- ></mat-option>
3736
- </ng-template>
3737
- }
3738
- </mat-select>
3739
-
3740
- @if (hint()) {
3741
- <mat-hint>{{ hint() }}</mat-hint>
3742
- }
3743
- @if (field.subComponents || field.clearable || isPending()) {
3744
- <div matSuffix class="suffix">
3745
- @if (isPending()) {
3746
- <mat-spinner mode="indeterminate" diameter="21"></mat-spinner>
3747
- }
3748
- @if (field.subComponents || field.clearable) {
3749
- <ng-content></ng-content>
3750
- }
3751
- </div>
3752
- }
3753
-
3754
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3755
- </mat-form-field>
3756
- `, 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" }] }); }
3757
- }
3758
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectSearchComponent, decorators: [{
3759
- type: Component,
3760
- args: [{ selector: 'kles-form-select-search', template: `
3761
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
3762
- @if (label()) {
3763
- <mat-label>{{ label() }}</mat-label>
3288
+ /**
3289
+ * Clears all of the selected values.
3290
+ * @param flushEvent Whether to flush the changes in an event.
3291
+ * If false, the changes to the selection will be flushed along with the next event.
3292
+ * @return Whether the selection changed as a result of this call
3293
+ * @breaking-change 16.0.0 make return type boolean
3294
+ */
3295
+ clear(flushEvent = true) {
3296
+ this._unmarkAll();
3297
+ const changed = this._hasQueuedChanges();
3298
+ if (flushEvent) {
3299
+ this._emitChangeEvent();
3300
+ }
3301
+ return changed;
3302
+ }
3303
+ /**
3304
+ * Determines whether a value is selected.
3305
+ */
3306
+ isSelected(value) {
3307
+ return this._selection.has(this._getConcreteValue(value));
3308
+ }
3309
+ /**
3310
+ * Determines whether the model does not have a value.
3311
+ */
3312
+ isEmpty() {
3313
+ return this._selection.size === 0;
3314
+ }
3315
+ /**
3316
+ * Determines whether the model has a value.
3317
+ */
3318
+ hasValue() {
3319
+ return !this.isEmpty();
3320
+ }
3321
+ /**
3322
+ * Sorts the selected values based on a predicate function.
3323
+ */
3324
+ sort(predicate) {
3325
+ if (this._multiple && this.selected) {
3326
+ this._selected.sort(predicate);
3327
+ }
3328
+ }
3329
+ /**
3330
+ * Gets whether multiple values can be selected.
3331
+ */
3332
+ isMultipleSelection() {
3333
+ return this._multiple;
3334
+ }
3335
+ /** Emits a change event and clears the records of selected and deselected values. */
3336
+ _emitChangeEvent() {
3337
+ // Clear the selected values so they can be re-cached.
3338
+ this._selected = null;
3339
+ if (this._selectedToEmit.length || this._deselectedToEmit.length) {
3340
+ this.changed.next({
3341
+ source: this,
3342
+ added: this._selectedToEmit,
3343
+ removed: this._deselectedToEmit,
3344
+ });
3345
+ this._deselectedToEmit = [];
3346
+ this._selectedToEmit = [];
3347
+ }
3348
+ }
3349
+ /** Selects a value. */
3350
+ _markSelected(value) {
3351
+ value = this._getConcreteValue(value);
3352
+ if (!this.isSelected(value)) {
3353
+ if (!this._multiple) {
3354
+ this._unmarkAll();
3764
3355
  }
3765
-
3766
- <mat-select
3767
- [matTooltip]="tooltip()"
3768
- [attr.id]="field.id"
3769
- [ngClass]="ngClass()"
3770
- (openedChange)="openChange($event)"
3771
- [compareWith]="compareFn"
3772
- [panelWidth]="field.panelWidth || 'auto'"
3773
- [placeholder]="placeholder()"
3774
- [formControlName]="field.name"
3775
- [multiple]="field.multiple"
3776
- (selectionChange)="selectionChange($event)"
3777
- (focus)="onFocus()"
3778
- (blur)="onBlur()"
3779
- >
3780
- @if (field.triggerComponent) {
3781
- <mat-select-trigger>
3782
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
3783
- </mat-select-trigger>
3784
- }
3785
- @if (field.virtualScroll) {
3786
- <mat-option>
3787
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3788
- </mat-option>
3789
-
3790
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
3791
- @if (!isLoading()) {
3792
- @if (field.multiple) {
3793
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3794
- {{ intl.selectAll }}
3795
- </mat-checkbox>
3796
- }
3797
- @if (!field.autocompleteComponent) {
3798
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3799
-
3800
- @if (field.multiple) {
3801
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3802
- <mat-option [value]="item" style="display:none">
3803
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3804
- </mat-option>
3805
- }
3806
- }
3807
- @if (!field.multiple && group.controls[field.name].value) {
3808
- @for (item of [group?.controls[field.name]?.value]; track item) {
3809
- <mat-option [value]="item" style="display:none">
3810
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
3811
- </mat-option>
3812
- }
3813
- }
3814
- } @else {
3815
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
3816
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3817
- </mat-option>
3818
-
3819
- @if (field.multiple) {
3820
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
3821
- <mat-option [value]="item" style="display:none">
3822
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3823
- </mat-option>
3824
- }
3825
- }
3826
- @if (!field.multiple && group.controls[field.name].value) {
3827
- @for (item of [group?.controls[field.name]?.value]; track item) {
3828
- <mat-option [value]="item" style="display:none">
3829
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3830
- </mat-option>
3831
- }
3832
- }
3833
- }
3834
- } @else {
3835
- <mat-option class="hide-checkbox" disabled
3836
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3837
- ></mat-option>
3838
- }
3839
- </cdk-virtual-scroll-viewport>
3840
- } @else {
3841
- <mat-option>
3842
- <ngx-mat-select-search [formControl]="searchControl" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
3843
- </mat-option>
3844
-
3845
- @if (!isLoading()) {
3846
- @if (field.multiple) {
3847
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
3848
- {{ intl.selectAll }}
3849
- </mat-checkbox>
3850
- }
3851
- @if (!field.autocompleteComponent) {
3852
- @for (item of optionsFiltered$ | async; track item) {
3853
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
3854
- }
3855
- } @else {
3856
- @for (item of optionsFiltered$ | async; track item) {
3857
- <mat-option [value]="item" [disabled]="item?.disabled">
3858
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
3859
- </mat-option>
3860
- }
3861
- }
3862
- } @else {
3863
- <mat-option class="hide-checkbox" disabled
3864
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3865
- ></mat-option>
3866
- }
3867
-
3868
- <ng-template #emptyOption>
3869
- <mat-option class="hide-checkbox" disabled
3870
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
3871
- ></mat-option>
3872
- </ng-template>
3873
- }
3874
- </mat-select>
3875
-
3876
- @if (hint()) {
3877
- <mat-hint>{{ hint() }}</mat-hint>
3356
+ if (!this.isSelected(value)) {
3357
+ this._selection.add(value);
3878
3358
  }
3879
- @if (field.subComponents || field.clearable || isPending()) {
3880
- <div matSuffix class="suffix">
3881
- @if (isPending()) {
3882
- <mat-spinner mode="indeterminate" diameter="21"></mat-spinner>
3883
- }
3884
- @if (field.subComponents || field.clearable) {
3885
- <ng-content></ng-content>
3886
- }
3887
- </div>
3359
+ if (this._emitChanges) {
3360
+ this._selectedToEmit.push(value);
3888
3361
  }
3889
-
3890
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
3891
- </mat-form-field>
3892
- `, standalone: true, imports: [
3893
- CommonModule,
3894
- ReactiveFormsModule,
3895
- KlesTransformPipe,
3896
- MatErrorMessageDirective,
3897
- MatProgressSpinner,
3898
- MatHint,
3899
- MatOption,
3900
- KlesComponentDirective,
3901
- ScrollingModule,
3902
- MatSelectTrigger,
3903
- MatSelect,
3904
- MatTooltip,
3905
- MatLabel,
3906
- MatFormField,
3907
- NgxMatSelectSearchModule,
3908
- MatCheckbox,
3909
- MatFormFieldModule,
3910
- ], 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"] }]
3911
- }], propDecorators: { cdkVirtualScrollViewport: [{
3912
- type: ViewChild,
3913
- args: [CdkVirtualScrollViewport]
3914
- }], options: [{
3915
- type: ViewChildren,
3916
- args: [MatOption]
3917
- }] } });
3918
-
3919
- let KlesFormLineBreakComponent = class KlesFormLineBreakComponent extends KlesFieldAbstract {
3920
- ngOnInit() { super.ngOnInit(); }
3921
- ngOnDestroy() {
3922
- super.ngOnDestroy();
3362
+ }
3923
3363
  }
3924
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLineBreakComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3925
- 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"] }); }
3926
- };
3927
- KlesFormLineBreakComponent = __decorate([
3928
- FieldMapper({
3929
- type: EnumType.lineBreak,
3930
- factory: () => null
3931
- })
3932
- ], KlesFormLineBreakComponent);
3933
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLineBreakComponent, decorators: [{
3934
- type: Component,
3935
- args: [{ selector: 'kles-form-line-break', template: ``, standalone: true, styles: [":host{flex-basis:100%;display:flex;height:0}\n"] }]
3936
- }] });
3937
-
3938
- class ArrayFormatPipe {
3939
- transform(values, property) {
3940
- if (values && Array.isArray(values)) {
3941
- if (property) {
3942
- return values.map(value => value[property]).filter(Boolean).join(', ');
3943
- }
3944
- else {
3945
- return values.join(', ');
3946
- }
3947
- }
3948
- return '';
3949
- }
3950
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ArrayFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
3951
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.20", ngImport: i0, type: ArrayFormatPipe, isStandalone: true, name: "arrayFormat" }); }
3952
- }
3953
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: ArrayFormatPipe, decorators: [{
3954
- type: Pipe,
3955
- args: [{
3956
- name: 'arrayFormat',
3957
- standalone: true,
3958
- }]
3959
- }] });
3960
-
3961
- class KlesFormLinkComponent extends KlesFieldAbstract {
3962
- ngOnInit() {
3963
- super.ngOnInit();
3964
- }
3965
- ngOnDestroy() {
3966
- super.ngOnDestroy();
3967
- }
3968
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLinkComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3969
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.20", type: KlesFormLinkComponent, isStandalone: true, selector: "kles-form-link", usesInheritance: true, ngImport: i0, template: `
3970
- <a [href]="group.controls[field.name].value" [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()">
3971
- {{ label() }}
3972
- </a>
3973
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
3974
- }
3975
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormLinkComponent, decorators: [{
3976
- type: Component,
3977
- args: [{
3978
- selector: 'kles-form-link',
3979
- template: `
3980
- <a [href]="group.controls[field.name].value" [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()">
3981
- {{ label() }}
3982
- </a>
3983
- `,
3984
- standalone: true,
3985
- imports: [CommonModule, MatTooltip, ReactiveFormsModule],
3986
- }]
3987
- }] });
3988
-
3989
- class KlesFormSlideToggleComponent extends KlesFieldAbstract {
3990
- ngOnInit() {
3991
- super.ngOnInit();
3992
- }
3993
- ngOnDestroy() {
3994
- super.ngOnDestroy();
3995
- }
3996
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSlideToggleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
3997
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.20", type: KlesFormSlideToggleComponent, isStandalone: true, selector: "kles-form-slide-toggle", usesInheritance: true, ngImport: i0, template: `
3998
- <div [formGroup]="group">
3999
- <mat-slide-toggle [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()" [color]="color()" [formControlName]="field.name">{{ label() }}</mat-slide-toggle>
4000
- </div>
4001
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { 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.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"] }] }); }
4002
- }
4003
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSlideToggleComponent, decorators: [{
4004
- type: Component,
4005
- args: [{ selector: 'kles-form-slide-toggle', template: `
4006
- <div [formGroup]="group">
4007
- <mat-slide-toggle [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()" [color]="color()" [formControlName]="field.name">{{ label() }}</mat-slide-toggle>
4008
- </div>
4009
- `, standalone: true, imports: [CommonModule, MatSlideToggle, MatTooltip, ReactiveFormsModule] }]
4010
- }] });
4011
-
4012
- /**
4013
- * Copy and past from https://github.com/angular/components/blob/17.0.x/src/cdk/collections/selection-model.ts
4014
- * (They put everything in private, thanks to angular team)
4015
- */
4016
- class KlesSelectionModel {
4017
- /** Selected values. */
4018
- get selected() {
4019
- if (!this._selected) {
4020
- this._selected = Array.from(this._selection.values());
4021
- }
4022
- return this._selected;
4023
- }
4024
- constructor(_multiple = false, initiallySelectedValues, _emitChanges = true, compareWith) {
4025
- this._multiple = _multiple;
4026
- this._emitChanges = _emitChanges;
4027
- this.compareWith = compareWith;
4028
- /** Currently-selected values. */
4029
- this._selection = new Set();
4030
- /** Keeps track of the deselected options that haven't been emitted by the change event. */
4031
- this._deselectedToEmit = [];
4032
- /** Keeps track of the selected options that haven't been emitted by the change event. */
4033
- this._selectedToEmit = [];
4034
- /** Event emitted when the value has changed. */
4035
- this.changed = new Subject();
4036
- if (initiallySelectedValues && initiallySelectedValues.length) {
4037
- if (_multiple) {
4038
- initiallySelectedValues.forEach(value => this._markSelected(value));
4039
- }
4040
- else {
4041
- this._markSelected(initiallySelectedValues[0]);
4042
- }
4043
- // Clear the array in order to avoid firing the change event for preselected values.
4044
- this._selectedToEmit.length = 0;
4045
- }
4046
- }
4047
- /**
4048
- * Selects a value or an array of values.
4049
- * @param values The values to select
4050
- * @return Whether the selection changed as a result of this call
4051
- * @breaking-change 16.0.0 make return type boolean
4052
- */
4053
- select(values, option) {
4054
- this._verifyValueAssignment(values);
4055
- values.forEach(value => this._markSelected(value));
4056
- const changed = this._hasQueuedChanges();
4057
- if (!option || option?.emitEvent) {
4058
- this._emitChangeEvent();
4059
- }
4060
- else {
4061
- this._selected = null;
4062
- }
4063
- return changed;
4064
- }
4065
- /**
4066
- * Deselects a value or an array of values.
4067
- * @param values The values to deselect
4068
- * @return Whether the selection changed as a result of this call
4069
- * @breaking-change 16.0.0 make return type boolean
4070
- */
4071
- deselect(values, option) {
4072
- this._verifyValueAssignment(values);
4073
- values.forEach(value => this._unmarkSelected(value));
4074
- const changed = this._hasQueuedChanges();
4075
- if (!option || option?.emitEvent) {
4076
- this._emitChangeEvent();
4077
- }
4078
- else {
4079
- this._selected = null;
4080
- }
4081
- return changed;
4082
- }
4083
- /**
4084
- * Sets the selected values
4085
- * @param values The new selected values
4086
- * @return Whether the selection changed as a result of this call
4087
- * @breaking-change 16.0.0 make return type boolean
4088
- */
4089
- setSelection(values, option) {
4090
- this._verifyValueAssignment(values);
4091
- const oldValues = this.selected;
4092
- const newSelectedSet = new Set(values.map((value) => this._getConcreteValue(value)));
4093
- values.forEach(value => this._markSelected(value));
4094
- oldValues
4095
- .filter(value => !newSelectedSet.has(value))
4096
- .forEach(value => this._unmarkSelected(value));
4097
- const changed = this._hasQueuedChanges();
4098
- if (!option || option?.emitEvent) {
4099
- this._emitChangeEvent();
4100
- }
4101
- else {
4102
- this._selected = null;
4103
- }
4104
- return changed;
4105
- }
4106
- /**
4107
- * Toggles a value between selected and deselected.
4108
- * @param value The value to toggle
4109
- * @return Whether the selection changed as a result of this call
4110
- * @breaking-change 16.0.0 make return type boolean
4111
- */
4112
- toggle(value) {
4113
- if (Array.isArray(value)) {
4114
- return this.isSelected(value) ? this.deselect(value) : this.select(value);
4115
- }
4116
- else {
4117
- return this.isSelected(value) ? this.deselect([value]) : this.select([value]);
4118
- }
4119
- }
4120
- /**
4121
- * Clears all of the selected values.
4122
- * @param flushEvent Whether to flush the changes in an event.
4123
- * If false, the changes to the selection will be flushed along with the next event.
4124
- * @return Whether the selection changed as a result of this call
4125
- * @breaking-change 16.0.0 make return type boolean
4126
- */
4127
- clear(flushEvent = true) {
4128
- this._unmarkAll();
4129
- const changed = this._hasQueuedChanges();
4130
- if (flushEvent) {
4131
- this._emitChangeEvent();
4132
- }
4133
- return changed;
4134
- }
4135
- /**
4136
- * Determines whether a value is selected.
4137
- */
4138
- isSelected(value) {
4139
- return this._selection.has(this._getConcreteValue(value));
4140
- }
4141
- /**
4142
- * Determines whether the model does not have a value.
4143
- */
4144
- isEmpty() {
4145
- return this._selection.size === 0;
4146
- }
4147
- /**
4148
- * Determines whether the model has a value.
4149
- */
4150
- hasValue() {
4151
- return !this.isEmpty();
4152
- }
4153
- /**
4154
- * Sorts the selected values based on a predicate function.
4155
- */
4156
- sort(predicate) {
4157
- if (this._multiple && this.selected) {
4158
- this._selected.sort(predicate);
4159
- }
4160
- }
4161
- /**
4162
- * Gets whether multiple values can be selected.
4163
- */
4164
- isMultipleSelection() {
4165
- return this._multiple;
4166
- }
4167
- /** Emits a change event and clears the records of selected and deselected values. */
4168
- _emitChangeEvent() {
4169
- // Clear the selected values so they can be re-cached.
4170
- this._selected = null;
4171
- if (this._selectedToEmit.length || this._deselectedToEmit.length) {
4172
- this.changed.next({
4173
- source: this,
4174
- added: this._selectedToEmit,
4175
- removed: this._deselectedToEmit,
4176
- });
4177
- this._deselectedToEmit = [];
4178
- this._selectedToEmit = [];
4179
- }
4180
- }
4181
- /** Selects a value. */
4182
- _markSelected(value) {
4183
- value = this._getConcreteValue(value);
4184
- if (!this.isSelected(value)) {
4185
- if (!this._multiple) {
4186
- this._unmarkAll();
4187
- }
4188
- if (!this.isSelected(value)) {
4189
- this._selection.add(value);
4190
- }
4191
- if (this._emitChanges) {
4192
- this._selectedToEmit.push(value);
4193
- }
4194
- }
4195
- }
4196
- /** Deselects a value. */
4197
- _unmarkSelected(value) {
4198
- value = this._getConcreteValue(value);
4199
- if (this.isSelected(value)) {
4200
- this._selection.delete(value);
4201
- if (this._emitChanges) {
4202
- this._deselectedToEmit.push(value);
3364
+ /** Deselects a value. */
3365
+ _unmarkSelected(value) {
3366
+ value = this._getConcreteValue(value);
3367
+ if (this.isSelected(value)) {
3368
+ this._selection.delete(value);
3369
+ if (this._emitChanges) {
3370
+ this._deselectedToEmit.push(value);
4203
3371
  }
4204
3372
  }
4205
3373
  }
@@ -4307,7 +3475,7 @@ class KlesFormSelectionListComponent extends KlesFieldAbstract {
4307
3475
  }
4308
3476
  </mat-selection-list>
4309
3477
  </div>
4310
- `, 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" }] }); }
4311
3479
  }
4312
3480
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectionListComponent, decorators: [{
4313
3481
  type: Component,
@@ -4354,7 +3522,7 @@ let KlesFormBadgeComponent = class KlesFormBadgeComponent extends KlesFieldAbstr
4354
3522
  <span [matTooltip]="tooltip()" [attr.id]="field.id" [ngClass]="ngClass()"
4355
3523
  matBadge="{{group.controls[field.name].value}}" matBadgeOverlap="false" [matBadgeColor]="color()">
4356
3524
  </span>
4357
- `, 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"] }] }); }
4358
3526
  };
4359
3527
  KlesFormBadgeComponent = __decorate([
4360
3528
  FieldMapper({ type: EnumType.badge })
@@ -4664,7 +3832,7 @@ let KlesFormRangeComponent = class KlesFormRangeComponent extends KlesFieldAbstr
4664
3832
 
4665
3833
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4666
3834
  </mat-form-field>
4667
- `, 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"] }] }); }
4668
3836
  };
4669
3837
  KlesFormRangeComponent = __decorate([
4670
3838
  FieldMapper({ type: EnumType.range, factory: (field) => new KlesFormRange(field).create() })
@@ -4695,283 +3863,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
4695
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"] }]
4696
3864
  }] });
4697
3865
 
4698
- class KlesFormSelectLazySearchComponent extends KlesFormSelectSearchComponent {
4699
- ngOnInit() {
4700
- this.field.lazy = true;
4701
- this.field.debounceTime = this.field.debounceTime ? this.field.debounceTime : 500;
4702
- super.ngOnInit();
4703
- }
4704
- ngOnDestroy() {
4705
- super.ngOnDestroy();
4706
- }
4707
- onSearchChange(value) {
4708
- if (this.field.options instanceof Function) {
4709
- if (this.openChange$.getValue() && this.field.options instanceof Function) {
4710
- if (value) {
4711
- return this.field.options(value, this.group.getRawValue()).pipe(take(1));
4712
- }
4713
- else {
4714
- return this.field.options(undefined, this.group.getRawValue()).pipe(take(1));
4715
- }
4716
- }
4717
- return of(this.group.controls[this.field.name].value ? [this.group.controls[this.field.name].value] : []);
4718
- }
4719
- else {
4720
- return super.onSearchChange(value);
4721
- }
4722
- }
4723
- openChangeEvent() {
4724
- this.openChange$
4725
- .pipe(takeUntil$1(this._onDestroy), switchMap((isOpen) => {
4726
- return this.onOpenChange(isOpen).pipe(map((options) => ({ options, isOpen })));
4727
- }))
4728
- .subscribe(({ options, isOpen }) => {
4729
- if (!isOpen) {
4730
- this.searchControl.reset(null, { emitEvent: false });
4731
- }
4732
- this.optionsFiltered$.next(options);
4733
- this.isLoading.set(false);
4734
- this.ref.markForCheck();
4735
- });
4736
- }
4737
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectLazySearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4738
- 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: `
4739
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
4740
- @if (label()) {
4741
- <mat-label>{{ label() }}</mat-label>
4742
- }
4743
-
4744
- <mat-select
4745
- [matTooltip]="tooltip()"
4746
- [attr.id]="field.id"
4747
- [ngClass]="ngClass()"
4748
- (openedChange)="openChange($event)"
4749
- [compareWith]="compareFn"
4750
- [panelWidth]="field.panelWidth || 'auto'"
4751
- [placeholder]="placeholder()"
4752
- [formControlName]="field.name"
4753
- [multiple]="field.multiple"
4754
- >
4755
- @if (field.triggerComponent) {
4756
- <mat-select-trigger>
4757
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
4758
- </mat-select-trigger>
4759
- }
4760
- @if (field.virtualScroll) {
4761
- <mat-option>
4762
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4763
- </mat-option>
4764
-
4765
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
4766
- @if (!isLoading()) {
4767
- @if (field.multiple) {
4768
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4769
- {{ intl.selectAll }}
4770
- </mat-checkbox>
4771
- }
4772
- @if (!field.autocompleteComponent) {
4773
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4774
-
4775
- @if (field.multiple) {
4776
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4777
- <mat-option [value]="item" style="display:none">
4778
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4779
- </mat-option>
4780
- }
4781
- }
4782
- @if (!field.multiple && group.controls[field.name].value) {
4783
- @for (item of [group?.controls[field.name]?.value]; track item) {
4784
- <mat-option [value]="item" style="display:none">
4785
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4786
- </mat-option>
4787
- }
4788
- }
4789
- } @else {
4790
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
4791
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4792
- </mat-option>
4793
-
4794
- @if (field.multiple) {
4795
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4796
- <mat-option [value]="item" style="display:none">
4797
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4798
- </mat-option>
4799
- }
4800
- }
4801
- @if (!field.multiple && group.controls[field.name].value) {
4802
- @for (item of [group?.controls[field.name]?.value]; track item) {
4803
- <mat-option [value]="item" style="display:none">
4804
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4805
- </mat-option>
4806
- }
4807
- }
4808
- }
4809
- } @else {
4810
- <mat-option class="hide-checkbox" disabled
4811
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4812
- ></mat-option>
4813
- }
4814
- </cdk-virtual-scroll-viewport>
4815
- } @else {
4816
- <mat-option>
4817
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4818
- </mat-option>
4819
-
4820
- @if (!isLoading()) {
4821
- @if (field.multiple) {
4822
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4823
- {{ intl.selectAll }}
4824
- </mat-checkbox>
4825
- }
4826
- @if (!field.autocompleteComponent) {
4827
- @for (item of optionsFiltered$ | async; track item) {
4828
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4829
- }
4830
- } @else {
4831
- @for (item of optionsFiltered$ | async; track item) {
4832
- <mat-option [value]="item" [disabled]="item?.disabled">
4833
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4834
- </mat-option>
4835
- }
4836
- }
4837
- } @else {
4838
- <mat-option class="hide-checkbox" disabled
4839
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4840
- ></mat-option>
4841
- }
4842
- }
4843
- </mat-select>
4844
-
4845
- @if (field.subComponents || field.clearable) {
4846
- <div matSuffix>
4847
- <ng-content></ng-content>
4848
- </div>
4849
- }
4850
-
4851
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4852
- </mat-form-field>
4853
- `, 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" }] }); }
4854
- }
4855
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectLazySearchComponent, decorators: [{
4856
- type: Component,
4857
- args: [{ selector: 'kles-form-select-lazy-search', template: `
4858
- <mat-form-field [subscriptSizing]="field.subscriptSizing" class="margin-top" [color]="color()" [formGroup]="group" [appearance]="appearance()" class="field-bottom">
4859
- @if (label()) {
4860
- <mat-label>{{ label() }}</mat-label>
4861
- }
4862
-
4863
- <mat-select
4864
- [matTooltip]="tooltip()"
4865
- [attr.id]="field.id"
4866
- [ngClass]="ngClass()"
4867
- (openedChange)="openChange($event)"
4868
- [compareWith]="compareFn"
4869
- [panelWidth]="field.panelWidth || 'auto'"
4870
- [placeholder]="placeholder()"
4871
- [formControlName]="field.name"
4872
- [multiple]="field.multiple"
4873
- >
4874
- @if (field.triggerComponent) {
4875
- <mat-select-trigger>
4876
- <ng-container klesComponent [component]="field.triggerComponent" [value]="group.controls[field.name].value" [field]="field"></ng-container>
4877
- </mat-select-trigger>
4878
- }
4879
- @if (field.virtualScroll) {
4880
- <mat-option>
4881
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4882
- </mat-option>
4883
-
4884
- <cdk-virtual-scroll-viewport [itemSize]="field.itemSize || 50" [style.height.px]="4 * 48">
4885
- @if (!isLoading()) {
4886
- @if (field.multiple) {
4887
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4888
- {{ intl.selectAll }}
4889
- </mat-checkbox>
4890
- }
4891
- @if (!field.autocompleteComponent) {
4892
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4893
-
4894
- @if (field.multiple) {
4895
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4896
- <mat-option [value]="item" style="display:none">
4897
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4898
- </mat-option>
4899
- }
4900
- }
4901
- @if (!field.multiple && group.controls[field.name].value) {
4902
- @for (item of [group?.controls[field.name]?.value]; track item) {
4903
- <mat-option [value]="item" style="display:none">
4904
- {{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}
4905
- </mat-option>
4906
- }
4907
- }
4908
- } @else {
4909
- <mat-option *cdkVirtualFor="let item of optionsFiltered$ | async" [value]="item" [disabled]="item?.disabled">
4910
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4911
- </mat-option>
4912
-
4913
- @if (field.multiple) {
4914
- @for (item of group.controls[field.name].value | slice: 0 : 30; track item) {
4915
- <mat-option [value]="item" style="display:none">
4916
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4917
- </mat-option>
4918
- }
4919
- }
4920
- @if (!field.multiple && group.controls[field.name].value) {
4921
- @for (item of [group?.controls[field.name]?.value]; track item) {
4922
- <mat-option [value]="item" style="display:none">
4923
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4924
- </mat-option>
4925
- }
4926
- }
4927
- }
4928
- } @else {
4929
- <mat-option class="hide-checkbox" disabled
4930
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4931
- ></mat-option>
4932
- }
4933
- </cdk-virtual-scroll-viewport>
4934
- } @else {
4935
- <mat-option>
4936
- <ngx-mat-select-search [formControl]="searchControl" [clearSearchInput]="false" placeholderLabel="" noEntriesFoundLabel=""></ngx-mat-select-search>
4937
- </mat-option>
4938
-
4939
- @if (!isLoading()) {
4940
- @if (field.multiple) {
4941
- <mat-checkbox class="selectAll mat-mdc-option mdc-list-item" [formControl]="selectAllControl" (change)="toggleAllSelection($event)">
4942
- {{ intl.selectAll }}
4943
- </mat-checkbox>
4944
- }
4945
- @if (!field.autocompleteComponent) {
4946
- @for (item of optionsFiltered$ | async; track item) {
4947
- <mat-option [value]="item" [disabled]="item?.disabled">{{ (field.property ? item[field.property] : item) | klesTransform: field.pipeTransform }}</mat-option>
4948
- }
4949
- } @else {
4950
- @for (item of optionsFiltered$ | async; track item) {
4951
- <mat-option [value]="item" [disabled]="item?.disabled">
4952
- <ng-container klesComponent [component]="field.autocompleteComponent" [value]="item" [field]="field"></ng-container>
4953
- </mat-option>
4954
- }
4955
- }
4956
- } @else {
4957
- <mat-option class="hide-checkbox" disabled
4958
- ><div class="loadingSelect">{{ intl.loading }}... <mat-spinner class="spinner" diameter="20"></mat-spinner></div
4959
- ></mat-option>
4960
- }
4961
- }
4962
- </mat-select>
4963
-
4964
- @if (field.subComponents || field.clearable) {
4965
- <div matSuffix>
4966
- <ng-content></ng-content>
4967
- </div>
4968
- }
4969
-
4970
- <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4971
- </mat-form-field>
4972
- `, 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"] }]
4973
- }] });
4974
-
4975
3866
  class KlesFabComponent extends KlesButtonBase {
4976
3867
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4977
3868
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: KlesFabComponent, isStandalone: true, selector: "kles-fab", providers: [
@@ -4993,7 +3884,7 @@ class KlesFabComponent extends KlesButtonBase {
4993
3884
  <mat-icon svgIcon="{{iconSvg}}"></mat-icon>
4994
3885
  }
4995
3886
  </button>
4996
- `, 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"] }] }); }
4997
3888
  }
4998
3889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFabComponent, decorators: [{
4999
3890
  type: Component,
@@ -5097,7 +3988,7 @@ class KlesMiniFabComponent extends KlesButtonBase {
5097
3988
  <mat-icon svgIcon="{{iconSvg}}"></mat-icon>
5098
3989
  }
5099
3990
  </button>
5100
- `, 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"] }] }); }
5101
3992
  }
5102
3993
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesMiniFabComponent, decorators: [{
5103
3994
  type: Component,
@@ -5190,7 +4081,7 @@ class KlesIconButtonComponent extends KlesButtonBase {
5190
4081
  <mat-icon svgIcon="{{ iconSvg }}"></mat-icon>
5191
4082
  }
5192
4083
  </button>
5193
- `, 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"] }] }); }
5194
4085
  }
5195
4086
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesIconButtonComponent, decorators: [{
5196
4087
  type: Component,
@@ -5363,7 +4254,7 @@ class KlesFormSelectionListSearchComponent extends KlesFieldAbstract {
5363
4254
  }
5364
4255
  </mat-selection-list>
5365
4256
  </div>
5366
- `, 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" }] }); }
5367
4258
  }
5368
4259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormSelectionListSearchComponent, decorators: [{
5369
4260
  type: Component,
@@ -5515,7 +4406,7 @@ let KlesFormCheckboxIndeterminateComponent = class KlesFormCheckboxIndeterminate
5515
4406
  label()
5516
4407
  }}</kles-checkbox-indeterminate>
5517
4408
  </div>
5518
- `, 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"] }] }); }
5519
4410
  };
5520
4411
  KlesFormCheckboxIndeterminateComponent = __decorate([
5521
4412
  FieldMapper({ type: EnumType.checkbox })
@@ -5640,7 +4531,7 @@ class KlesFormDateTimeComponent extends KlesFieldAbstract {
5640
4531
 
5641
4532
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
5642
4533
  </mat-form-field>
5643
- `, 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"] }] }); }
5644
4535
  }
5645
4536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormDateTimeComponent, decorators: [{
5646
4537
  type: Component,
@@ -5704,7 +4595,7 @@ class KlesFormCopyComponent {
5704
4595
  <button #tooltip="matTooltip" matIconButton color="primary" type="button" (click)="copy($event)" [matTooltipDisabled]="true" [matTooltip]="tooltipText" matTooltipPosition="above">
5705
4596
  <mat-icon>content_copy</mat-icon>
5706
4597
  </button>
5707
- `, 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 }] }); }
5708
4599
  }
5709
4600
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormCopyComponent, decorators: [{
5710
4601
  type: Component,
@@ -5821,7 +4712,7 @@ let KlesFormActionMenuComponent = class KlesFormActionMenuComponent extends Kles
5821
4712
  </button>
5822
4713
  }
5823
4714
  </mat-menu>
5824
- `, 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 }); }
5825
4716
  };
5826
4717
  KlesFormActionMenuComponent = __decorate([
5827
4718
  FieldMapper({
@@ -5919,7 +4810,7 @@ class KlesFormTileComponent extends KlesFieldAbstract {
5919
4810
  }
5920
4811
  </div>
5921
4812
  </div>
5922
- `, 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 }); }
5923
4814
  }
5924
4815
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormTileComponent, decorators: [{
5925
4816
  type: Component,
@@ -6228,7 +5119,7 @@ let KlesFormCurrencyComponent = class KlesFormCurrencyComponent extends KlesFiel
6228
5119
 
6229
5120
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
6230
5121
  </mat-form-field>
6231
- `, 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"] }] }); }
6232
5123
  };
6233
5124
  KlesFormCurrencyComponent = __decorate([
6234
5125
  FieldMapper({
@@ -6396,7 +5287,7 @@ let KlesFormStatusComponent = class KlesFormStatusComponent extends KlesFieldAbs
6396
5287
  </span>
6397
5288
  }
6398
5289
  </span>
6399
- `, 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 }); }
6400
5291
  };
6401
5292
  KlesFormStatusComponent = __decorate([
6402
5293
  FieldMapper({
@@ -6598,7 +5489,7 @@ class KlesFormChipGridComponent extends KlesFieldAbstract {
6598
5489
  }
6599
5490
  </mat-autocomplete>
6600
5491
  </mat-form-field>
6601
- `, 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" }] }); }
6602
5493
  }
6603
5494
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: KlesFormChipGridComponent, decorators: [{
6604
5495
  type: Component,
@@ -6661,7 +5552,6 @@ const components = [
6661
5552
  KlesFormButtonCheckerComponent,
6662
5553
  KlesButtonFileComponent,
6663
5554
  KlesFormButtonFileComponent,
6664
- KlesFormSelectComponent,
6665
5555
  KlesFormDateComponent,
6666
5556
  KlesFormDateTimeComponent,
6667
5557
  KlesFormRadioComponent,
@@ -6675,7 +5565,6 @@ const components = [
6675
5565
  KlesFormChipComponent,
6676
5566
  KlesFormGroupComponent,
6677
5567
  KlesFormIconComponent,
6678
- KlesFormSelectSearchComponent,
6679
5568
  KlesFormLineBreakComponent,
6680
5569
  KlesFormLinkComponent,
6681
5570
  KlesFormSlideToggleComponent,
@@ -6684,7 +5573,6 @@ const components = [
6684
5573
  KlesFormArrayComponent,
6685
5574
  KlesFormRangeComponent,
6686
5575
  KlesFormClearComponent,
6687
- KlesFormSelectLazySearchComponent,
6688
5576
  KlesFormFabComponent,
6689
5577
  KlesFabComponent,
6690
5578
  KlesMiniFabComponent,
@@ -6717,7 +5605,6 @@ class KlesMaterialDynamicformsModule {
6717
5605
  KlesFormButtonCheckerComponent,
6718
5606
  KlesButtonFileComponent,
6719
5607
  KlesFormButtonFileComponent,
6720
- KlesFormSelectComponent,
6721
5608
  KlesFormDateComponent,
6722
5609
  KlesFormDateTimeComponent,
6723
5610
  KlesFormRadioComponent,
@@ -6731,7 +5618,6 @@ class KlesMaterialDynamicformsModule {
6731
5618
  KlesFormChipComponent,
6732
5619
  KlesFormGroupComponent,
6733
5620
  KlesFormIconComponent,
6734
- KlesFormSelectSearchComponent,
6735
5621
  KlesFormLineBreakComponent,
6736
5622
  KlesFormLinkComponent,
6737
5623
  KlesFormSlideToggleComponent,
@@ -6740,7 +5626,6 @@ class KlesMaterialDynamicformsModule {
6740
5626
  KlesFormArrayComponent,
6741
5627
  KlesFormRangeComponent,
6742
5628
  KlesFormClearComponent,
6743
- KlesFormSelectLazySearchComponent,
6744
5629
  KlesFormFabComponent,
6745
5630
  KlesFabComponent,
6746
5631
  KlesMiniFabComponent,
@@ -6766,7 +5651,6 @@ class KlesMaterialDynamicformsModule {
6766
5651
  KlesFormButtonCheckerComponent,
6767
5652
  KlesButtonFileComponent,
6768
5653
  KlesFormButtonFileComponent,
6769
- KlesFormSelectComponent,
6770
5654
  KlesFormDateComponent,
6771
5655
  KlesFormDateTimeComponent,
6772
5656
  KlesFormRadioComponent,
@@ -6780,7 +5664,6 @@ class KlesMaterialDynamicformsModule {
6780
5664
  KlesFormChipComponent,
6781
5665
  KlesFormGroupComponent,
6782
5666
  KlesFormIconComponent,
6783
- KlesFormSelectSearchComponent,
6784
5667
  KlesFormLineBreakComponent,
6785
5668
  KlesFormLinkComponent,
6786
5669
  KlesFormSlideToggleComponent,
@@ -6789,7 +5672,6 @@ class KlesMaterialDynamicformsModule {
6789
5672
  KlesFormArrayComponent,
6790
5673
  KlesFormRangeComponent,
6791
5674
  KlesFormClearComponent,
6792
- KlesFormSelectLazySearchComponent,
6793
5675
  KlesFormFabComponent,
6794
5676
  KlesFabComponent,
6795
5677
  KlesMiniFabComponent,
@@ -6816,7 +5698,6 @@ class KlesMaterialDynamicformsModule {
6816
5698
  KlesFormButtonCheckerComponent,
6817
5699
  KlesButtonFileComponent,
6818
5700
  KlesFormButtonFileComponent,
6819
- KlesFormSelectComponent,
6820
5701
  KlesFormDateComponent,
6821
5702
  KlesFormDateTimeComponent,
6822
5703
  KlesFormRadioComponent,
@@ -6830,7 +5711,6 @@ class KlesMaterialDynamicformsModule {
6830
5711
  KlesFormChipComponent,
6831
5712
  KlesFormGroupComponent,
6832
5713
  KlesFormIconComponent,
6833
- KlesFormSelectSearchComponent,
6834
5714
  KlesFormLinkComponent,
6835
5715
  KlesFormSlideToggleComponent,
6836
5716
  KlesFormSelectionListComponent,
@@ -6838,7 +5718,6 @@ class KlesMaterialDynamicformsModule {
6838
5718
  KlesFormArrayComponent,
6839
5719
  KlesFormRangeComponent,
6840
5720
  KlesFormClearComponent,
6841
- KlesFormSelectLazySearchComponent,
6842
5721
  KlesFormFabComponent,
6843
5722
  KlesFabComponent,
6844
5723
  KlesMiniFabComponent,
@@ -6898,6 +5777,695 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
6898
5777
  }]
6899
5778
  }] });
6900
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
+
6901
6469
  function autocompleteObjectValidator(optional) {
6902
6470
  return (control) => {
6903
6471
  if ((control.value === null || control.value === undefined) && !optional)
@@ -6929,5 +6497,5 @@ function autocompleteStringValidator(validOptions, optional) {
6929
6497
  * Generated bundle index. Do not edit.
6930
6498
  */
6931
6499
 
6932
- 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 };
6933
6501
  //# sourceMappingURL=3kles-kles-material-dynamicforms.mjs.map