@3kles/kles-material-dynamicforms 22.0.3 → 22.1.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.
@@ -3,7 +3,7 @@ import { signal, InjectionToken, inject, Component, Injector, Input, Directive,
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, FormArray, UntypedFormGroup, UntypedFormBuilder, NG_VALUE_ACCESSOR, FormGroup } from '@angular/forms';
6
+ import { Validators, FormControl, ReactiveFormsModule, FormsModule, UntypedFormGroup, FormArray, NG_VALUE_ACCESSOR, FormGroup } from '@angular/forms';
7
7
  import { concat, of, combineLatest, startWith, map as map$1, switchMap, Subject, Observable, defer, ReplaySubject, isObservable, takeUntil as takeUntil$1, timer, distinctUntilChanged as distinctUntilChanged$1, shareReplay as shareReplay$1 } from 'rxjs';
8
8
  import { tap, take, catchError, map, takeUntil, distinctUntilChanged, filter, switchMap as switchMap$1, startWith as startWith$1, shareReplay, debounceTime, debounce } from 'rxjs/operators';
9
9
  import * as i3 from '@angular/material/form-field';
@@ -11,7 +11,7 @@ import { MatError, MatFormFieldModule, MatFormField, MatHint, MatLabel, MatSuffi
11
11
  import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, ErrorStateMatcher, MatNativeDateModule, MatOptionModule, MatOption as MatOption$1 } from '@angular/material/core';
12
12
  import * as i2$1 from '@angular/material/icon';
13
13
  import { MatIcon, MatIconModule } from '@angular/material/icon';
14
- import * as i4$2 from '@angular/material/button';
14
+ import * as i2$2 from '@angular/material/button';
15
15
  import { MatIconButton, MatButtonModule, MatButton } from '@angular/material/button';
16
16
  import { toSignal, toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
17
17
  import { MatSliderModule } from '@angular/material/slider';
@@ -64,7 +64,7 @@ import { parseColor, toCssRgba, readableTextColor, MaterialColorPickerTriggerCom
64
64
  import * as i3$3 from '@angular/cdk/text-field';
65
65
  import { TextFieldModule } from '@angular/cdk/text-field';
66
66
  import { getMultipleValuesInSingleSelectionError } from '@angular/cdk/collections';
67
- import * as i4$3 from '@3kles/kles-material-datepicker';
67
+ import * as i4$2 from '@3kles/kles-material-datepicker';
68
68
  import { KlesMaterialDatepickerModule } from '@3kles/kles-material-datepicker';
69
69
  import { Clipboard, ClipboardModule } from '@angular/cdk/clipboard';
70
70
  import { MatDividerModule } from '@angular/material/divider';
@@ -534,9 +534,9 @@ class MatErrorFormDirective {
534
534
  ...(ngDevMode ? [{ debugName: "validations" }] : /* istanbul ignore next */ []));
535
535
  this.asyncValidations = input([], /* @ts-ignore */
536
536
  ...(ngDevMode ? [{ debugName: "asyncValidations" }] : /* istanbul ignore next */ []));
537
- this.validationsKeys = computed(() => flattenValidators(this.validations()), /* @ts-ignore */
537
+ this.validationsKeys = computed(() => flattenValidators(this.validations() ?? []), /* @ts-ignore */
538
538
  ...(ngDevMode ? [{ debugName: "validationsKeys" }] : /* istanbul ignore next */ []));
539
- this.asyncValidationsKeys = computed(() => flattenValidators(this.asyncValidations()), /* @ts-ignore */
539
+ this.asyncValidationsKeys = computed(() => flattenValidators(this.asyncValidations() ?? []), /* @ts-ignore */
540
540
  ...(ngDevMode ? [{ debugName: "asyncValidationsKeys" }] : /* istanbul ignore next */ []));
541
541
  this.formErrors = toSignal(toObservable(this.form).pipe(switchMap((form) => form.statusChanges.pipe(startWith(form.status), map$1(() => form.errors)))), { initialValue: null });
542
542
  }
@@ -555,13 +555,11 @@ class MatErrorFormDirective {
555
555
  }
556
556
  }
557
557
  }
558
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }] }); }
558
+ `, isInline: true, styles: [":host{overflow-wrap:break-word}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }] }); }
559
559
  }
560
560
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MatErrorFormDirective, decorators: [{
561
561
  type: Component,
562
- args: [{
563
- selector: '[matErrorForm]',
564
- template: `
562
+ args: [{ selector: '[matErrorForm]', template: `
565
563
  @if (formErrors()) {
566
564
  @for (validation of validationsKeys(); track validation.name) {
567
565
  @if (form().hasError(validation.name) && validation.message) {
@@ -575,10 +573,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
575
573
  }
576
574
  }
577
575
  }
578
- `,
579
- standalone: true,
580
- imports: [ReactiveFormsModule, FormsModule],
581
- }]
576
+ `, standalone: true, imports: [ReactiveFormsModule, FormsModule], styles: [":host{overflow-wrap:break-word}\n"] }]
582
577
  }], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], validations: [{ type: i0.Input, args: [{ isSignal: true, alias: "validations", required: false }] }], asyncValidations: [{ type: i0.Input, args: [{ isSignal: true, alias: "asyncValidations", required: false }] }] } });
583
578
 
584
579
  class KlesFormErrorStateMatcher {
@@ -1622,13 +1617,11 @@ class MatErrorMessageDirective {
1622
1617
  }
1623
1618
  }
1624
1619
  }
1625
- `, isInline: true }); }
1620
+ `, isInline: true, styles: [":host{overflow-wrap:break-word}\n"] }); }
1626
1621
  }
1627
1622
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MatErrorMessageDirective, decorators: [{
1628
1623
  type: Component,
1629
- args: [{
1630
- selector: '[matErrorMessage]',
1631
- template: `
1624
+ args: [{ selector: '[matErrorMessage]', template: `
1632
1625
  @if (errors(); as errors) {
1633
1626
  @for (validation of validationsKeys(); track validation.name) {
1634
1627
  @if (errors[validation.name] && validation.message) {
@@ -1642,9 +1635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1642
1635
  }
1643
1636
  }
1644
1637
  }
1645
- `,
1646
- standalone: true,
1647
- }]
1638
+ `, standalone: true, styles: [":host{overflow-wrap:break-word}\n"] }]
1648
1639
  }], propDecorators: { validations: [{ type: i0.Input, args: [{ isSignal: true, alias: "validations", required: false }] }], asyncValidations: [{ type: i0.Input, args: [{ isSignal: true, alias: "asyncValidations", required: false }] }] } });
1649
1640
 
1650
1641
  class KlesDynamicFormIntl {
@@ -1653,7 +1644,10 @@ class KlesDynamicFormIntl {
1653
1644
  this.selectAll = 'Select all';
1654
1645
  this.clearSearch = 'Clear';
1655
1646
  this.search = 'Search';
1647
+ this.add = 'Add';
1648
+ this.delete = 'Delete';
1656
1649
  this.copy = 'Copied value';
1650
+ this.empty = 'No items';
1657
1651
  this.imageUploadChange = 'Change image';
1658
1652
  this.imageUploadDelete = 'Delete';
1659
1653
  this.imageUploadInvalidType = 'Unsupported image format.';
@@ -2089,50 +2083,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
2089
2083
  `, standalone: true, imports: [CommonModule, ReactiveFormsModule, MatCheckbox, MatTooltip, KlesFocusTargetDirective] }]
2090
2084
  }], propDecorators: { checkbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatCheckbox), { isSignal: true }] }] } });
2091
2085
 
2086
+ function createKlesFormArrayGroup(field, ref, value) {
2087
+ const line = {
2088
+ ...(value ?? {}),
2089
+ _id: value?._id ?? v4(),
2090
+ };
2091
+ const group = new UntypedFormGroup({
2092
+ _id: new FormControl(line._id),
2093
+ });
2094
+ for (const subfield of field.collections ?? []) {
2095
+ const data = line[subfield.name];
2096
+ const childField = {
2097
+ ...subfield,
2098
+ ...(data !== undefined ? { value: data } : {}),
2099
+ };
2100
+ let control;
2101
+ if (subfield.type) {
2102
+ control = componentMapper.find((c) => c.type === subfield.type)?.factory(childField, ref) ?? klesFieldControlFactory(childField, ref);
2103
+ }
2104
+ else {
2105
+ control = componentMapper.find((c) => c.component === subfield.component)?.factory(childField, ref) ?? klesFieldControlFactory(childField, ref);
2106
+ }
2107
+ group.addControl(subfield.name, control);
2108
+ }
2109
+ return group;
2110
+ }
2111
+
2092
2112
  class KlesFormArray extends KlesFormControl {
2093
2113
  create() {
2094
2114
  const array = new FormArray([], {
2095
2115
  validators: this.bindValidations(this.field.validations || []),
2096
2116
  asyncValidators: this.bindAsyncValidations(this.field.asyncValidations || []),
2097
- updateOn: this.field.updateOn || 'change'
2117
+ updateOn: this.field.updateOn || 'change',
2098
2118
  });
2099
- if (this.field.value && Array.isArray(this.field.value)) {
2100
- if (this.field.collections && Array.isArray(this.field.collections)) {
2101
- this.field.value.forEach(val => {
2102
- const line = { ...val, _id: val?._id || v4() };
2103
- const group = new UntypedFormGroup({ _id: new FormControl(line._id) });
2104
- this.field.collections?.forEach(subfield => {
2105
- const data = line[subfield.name] || null;
2106
- let control;
2107
- if (subfield.type) {
2108
- control = componentMapper.find(c => c.type === subfield.type)?.factory({ ...subfield, ...(data && { value: data }) }, this.ref)
2109
- || klesFieldControlFactory({ ...subfield, ...(data && { value: data }) }, this.ref);
2110
- }
2111
- else {
2112
- control = componentMapper.find(c => c.component === subfield.component)?.factory({ ...subfield, ...(data && { value: data }) }, this.ref)
2113
- || klesFieldControlFactory({ ...subfield, ...(data && { value: data }) }, this.ref);
2114
- }
2115
- group.addControl(subfield.name, control);
2116
- });
2117
- array.push(group);
2118
- });
2119
+ if (Array.isArray(this.field.value)) {
2120
+ for (const value of this.field.value) {
2121
+ array.push(createKlesFormArrayGroup(this.field, this.ref, value));
2119
2122
  }
2120
2123
  }
2121
2124
  else {
2122
- const group = new UntypedFormGroup({ _id: new FormControl(v4()) });
2123
- this.field.collections?.forEach(subfield => {
2124
- let control;
2125
- if (subfield.type) {
2126
- control = componentMapper.find(c => c.type === subfield.type)?.factory({ ...subfield }, this.ref)
2127
- || klesFieldControlFactory({ ...subfield }, this.ref);
2128
- }
2129
- else {
2130
- control = componentMapper.find(c => c.component === subfield.component)?.factory({ ...subfield }, this.ref)
2131
- || klesFieldControlFactory({ ...subfield }, this.ref);
2132
- }
2133
- group.addControl(subfield.name, control);
2134
- });
2135
- array.push(group);
2125
+ array.push(createKlesFormArrayGroup(this.field, this.ref));
2136
2126
  }
2137
2127
  if (this.field.disabled) {
2138
2128
  array.disable();
@@ -2143,98 +2133,112 @@ class KlesFormArray extends KlesFormControl {
2143
2133
 
2144
2134
  let KlesFormListFieldComponent = class KlesFormListFieldComponent extends KlesFieldAbstract {
2145
2135
  constructor() {
2146
- super(...arguments);
2136
+ super();
2137
+ this.intl = inject(KlesDynamicFormIntl);
2147
2138
  this.collections = signal([], /* @ts-ignore */
2148
2139
  ...(ngDevMode ? [{ debugName: "collections" }] : /* istanbul ignore next */ []));
2149
- this.fb = inject(UntypedFormBuilder);
2150
- }
2151
- ngOnInit() {
2152
2140
  this.formArray = this.group.controls[this.field.name];
2153
2141
  this.collections.set(this.formArray.controls.map(() => {
2154
- return this.field.collections ? cloneDeep(this.field.collections) : [];
2142
+ return cloneDeep(this.field.collections ?? []);
2155
2143
  }));
2144
+ }
2145
+ ngOnInit() {
2156
2146
  super.ngOnInit();
2157
2147
  }
2158
- createFormGroup() {
2159
- const group = this.fb.group({});
2160
- this.field.collections?.forEach((item) => {
2161
- const control = this.fb.control(null, this.bindValidations(item.validations || []), this.bindAsyncValidations(item.asyncValidations || []));
2162
- group.addControl(item.name, control);
2163
- });
2164
- return group;
2148
+ get hasLayout() {
2149
+ return (this.field.collections ?? []).some((subfield) => subfield.layout != null);
2150
+ }
2151
+ get fieldsDirection() {
2152
+ if (this.hasLayout) {
2153
+ return this.field.direction === 'inline-grid' ? 'inline-grid' : 'grid';
2154
+ }
2155
+ return this.field.direction ?? 'row';
2165
2156
  }
2166
2157
  deleteField(index) {
2167
- this.collections.update((collections) => collections.filter((_, currentIndex) => currentIndex !== index));
2168
2158
  this.formArray.removeAt(index);
2159
+ this.collections.update((collections) => collections.filter((_, currentIndex) => currentIndex !== index));
2169
2160
  }
2170
2161
  addField() {
2171
- const collection = this.field.collections ? cloneDeep(this.field.collections) : [];
2172
- this.collections.update((collections) => [...collections, collection]);
2173
- this.formArray.push(this.createFormGroup());
2162
+ this.formArray.push(createKlesFormArrayGroup(this.field));
2163
+ this.collections.update((collections) => [...collections, cloneDeep(this.field.collections ?? [])]);
2174
2164
  }
2175
- bindValidations(validations) {
2176
- if (validations.length > 0) {
2177
- const validList = [];
2178
- validations.forEach((valid) => {
2179
- validList.push(valid.validator);
2180
- });
2181
- return Validators.compose(validList);
2182
- }
2183
- return null;
2165
+ ngOnDestroy() {
2166
+ super.ngOnDestroy();
2184
2167
  }
2185
- bindAsyncValidations(validations) {
2186
- if (validations.length > 0) {
2187
- const validList = [];
2188
- validations.forEach((valid) => {
2189
- validList.push(valid.validator);
2190
- });
2191
- return Validators.composeAsync(validList);
2168
+ getGridColumn(field) {
2169
+ const colSpan = field.layout?.colSpan ?? 12;
2170
+ const colStart = field.layout?.colStart;
2171
+ if (colStart) {
2172
+ return `${colStart} / span ${colSpan}`;
2192
2173
  }
2193
- return null;
2174
+ return `span ${colSpan}`;
2194
2175
  }
2195
- ngOnDestroy() {
2196
- super.ngOnDestroy();
2176
+ getGridRow(field) {
2177
+ const rowSpan = field.layout?.rowSpan;
2178
+ const rowStart = field.layout?.rowStart;
2179
+ if (rowStart && rowSpan) {
2180
+ return `${rowStart} / span ${rowSpan}`;
2181
+ }
2182
+ if (rowStart) {
2183
+ return `${rowStart}`;
2184
+ }
2185
+ if (rowSpan) {
2186
+ return `span ${rowSpan}`;
2187
+ }
2188
+ return undefined;
2197
2189
  }
2198
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFormListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFormListFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2199
2191
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: KlesFormListFieldComponent, isStandalone: true, selector: "kles-form-listfield", usesInheritance: true, ngImport: i0, template: `
2200
- <div [formGroup]="group" class="form-element">
2201
- <div class="label">
2202
- {{ label() }}
2203
- <button matIconButton color="primary" (click)="addField()">
2192
+ <div [formGroup]="group" class="form-element list-field">
2193
+ <div class="list-field__header">
2194
+ @if (label()) {
2195
+ <span class="list-field__label">
2196
+ {{ label() }}
2197
+ </span>
2198
+ }
2199
+
2200
+ <button type="button" matButton class="list-field__add" (click)="addField()">
2204
2201
  <mat-icon>add</mat-icon>
2202
+ {{ intl.add }}
2205
2203
  </button>
2206
2204
  </div>
2207
2205
 
2208
- <div class="dynamic-form" [formGroupName]="field.name">
2209
- @for (subGroup of formArray.controls; track subGroup.value._id; let idx = $index) {
2210
- <div class="subfields">
2211
- @for (subfield of collections()[idx]; track subfield.name) {
2212
- <ng-container klesDynamicField [field]="subfield" [group]="$any(subGroup)" [siblingFields]="collections()[idx]" [context]="context"> </ng-container>
2213
- }
2214
- @if (collections()[idx]) {
2215
- <button matIconButton (click)="deleteField(idx)" color="primary">
2216
- <mat-icon>delete_outlined</mat-icon>
2217
- </button>
2218
- }
2206
+ <div class="list-field__content" [formArrayName]="field.name">
2207
+ @for (subGroup of formArray.controls; track subGroup; let idx = $index) {
2208
+ <div class="list-field__row">
2209
+ <div
2210
+ class="list-field__fields"
2211
+ [class.list-field__fields--column]="fieldsDirection === 'column'"
2212
+ [class.list-field__fields--row]="fieldsDirection === 'row'"
2213
+ [class.list-field__fields--grid]="fieldsDirection === 'grid'"
2214
+ [class.list-field__fields--inline-grid]="fieldsDirection === 'inline-grid'"
2215
+ [class.list-field__fields--nowrap]="fieldsDirection === 'row' && field.wrap === false"
2216
+ >
2217
+ @for (subfield of collections()[idx]; track subfield.name) {
2218
+ <div class="list-field__field" [style.grid-column]="getGridColumn(subfield)" [style.grid-row]="getGridRow(subfield)">
2219
+ <ng-container klesDynamicField [field]="subfield" [group]="subGroup" [siblingFields]="collections()[idx]" [context]="context" />
2220
+ </div>
2221
+ }
2222
+ </div>
2223
+
2224
+ <button type="button" matIconButton class="list-field__delete" [attr.aria-label]="intl.delete" (click)="deleteField(idx)">
2225
+ <mat-icon>delete_outline</mat-icon>
2226
+ </button>
2219
2227
  </div>
2220
2228
  }
2221
- @for (validation of field.validations; track validation.name) {
2222
- <ng-container ngProjectAs="mat-error">
2223
- @if (validation.name && group.controls[field.name].hasError(validation.name)) {
2224
- <mat-error>{{ validation.message }}</mat-error>
2225
- }
2226
- </ng-container>
2227
- }
2228
- @for (validation of field.asyncValidations; track validation.name) {
2229
- <ng-container ngProjectAs="mat-error">
2230
- @if (validation.name && group.controls[field.name].hasError(validation.name)) {
2231
- <mat-error>{{ validation.message }}</mat-error>
2232
- }
2233
- </ng-container>
2229
+
2230
+ @if (formArray.length === 0) {
2231
+ <div class="list-field__empty">
2232
+ {{ intl.empty }}
2233
+ </div>
2234
2234
  }
2235
2235
  </div>
2236
+
2237
+ <div class="list-field__errors">
2238
+ <mat-error matErrorForm [form]="formArray" [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
2239
+ </div>
2236
2240
  </div>
2237
- `, isInline: true, styles: [".subfields{display:flex;flex-direction:row;gap:5px}\n", ".label{display:flex;align-items:center;flex-direction:row;gap:5px}\n"], dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: KlesDynamicFieldDirective, selector: "[klesDynamicField]", inputs: ["field", "group", "ui", "siblingFields", "context"] }, { 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: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }] }); }
2241
+ `, isInline: true, styles: [":host{display:block;width:100%;min-width:0}.list-field{display:flex;flex-direction:column;gap:8px;width:100%;min-width:0}.list-field__header{display:flex;align-items:center;gap:8px;min-height:36px}.list-field__label{min-width:0;font-weight:500}.list-field__add{margin-left:auto;flex-shrink:0}.list-field__content{display:flex;flex-direction:column;gap:10px;width:100%;min-width:0}.list-field__row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px;width:100%;min-width:0}.list-field__fields{width:100%;min-width:0}.list-field__fields--column{display:flex;flex-direction:column;gap:10px}.list-field__fields--column>.list-field__field{width:100%}.list-field__fields--row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:10px}.list-field__fields--row>.list-field__field{flex:1 1 0;width:auto;min-width:0}.list-field__fields--row.list-field__fields--nowrap{flex-wrap:nowrap}.list-field__fields--grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}.list-field__fields--inline-grid{display:inline-grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}.list-field__field{width:100%;min-width:0}.list-field__delete{align-self:start;margin-top:4px;flex-shrink:0}.list-field__empty{padding:16px;text-align:center;opacity:.7}.list-field__errors{display:flex;flex-direction:column;gap:4px;min-width:0}\n"], dependencies: [{ kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: KlesDynamicFieldDirective, selector: "[klesDynamicField]", inputs: ["field", "group", "ui", "siblingFields", "context"] }, { 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: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatErrorFormDirective, selector: "[matErrorForm]", inputs: ["form", "validations", "asyncValidations"] }] }); }
2238
2242
  };
2239
2243
  KlesFormListFieldComponent = __decorate([
2240
2244
  FieldMapper({ type: 'listfield', factory: (field) => new KlesFormArray(field).create() })
@@ -2242,45 +2246,57 @@ KlesFormListFieldComponent = __decorate([
2242
2246
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFormListFieldComponent, decorators: [{
2243
2247
  type: Component,
2244
2248
  args: [{ selector: 'kles-form-listfield', template: `
2245
- <div [formGroup]="group" class="form-element">
2246
- <div class="label">
2247
- {{ label() }}
2248
- <button matIconButton color="primary" (click)="addField()">
2249
+ <div [formGroup]="group" class="form-element list-field">
2250
+ <div class="list-field__header">
2251
+ @if (label()) {
2252
+ <span class="list-field__label">
2253
+ {{ label() }}
2254
+ </span>
2255
+ }
2256
+
2257
+ <button type="button" matButton class="list-field__add" (click)="addField()">
2249
2258
  <mat-icon>add</mat-icon>
2259
+ {{ intl.add }}
2250
2260
  </button>
2251
2261
  </div>
2252
2262
 
2253
- <div class="dynamic-form" [formGroupName]="field.name">
2254
- @for (subGroup of formArray.controls; track subGroup.value._id; let idx = $index) {
2255
- <div class="subfields">
2256
- @for (subfield of collections()[idx]; track subfield.name) {
2257
- <ng-container klesDynamicField [field]="subfield" [group]="$any(subGroup)" [siblingFields]="collections()[idx]" [context]="context"> </ng-container>
2258
- }
2259
- @if (collections()[idx]) {
2260
- <button matIconButton (click)="deleteField(idx)" color="primary">
2261
- <mat-icon>delete_outlined</mat-icon>
2262
- </button>
2263
- }
2263
+ <div class="list-field__content" [formArrayName]="field.name">
2264
+ @for (subGroup of formArray.controls; track subGroup; let idx = $index) {
2265
+ <div class="list-field__row">
2266
+ <div
2267
+ class="list-field__fields"
2268
+ [class.list-field__fields--column]="fieldsDirection === 'column'"
2269
+ [class.list-field__fields--row]="fieldsDirection === 'row'"
2270
+ [class.list-field__fields--grid]="fieldsDirection === 'grid'"
2271
+ [class.list-field__fields--inline-grid]="fieldsDirection === 'inline-grid'"
2272
+ [class.list-field__fields--nowrap]="fieldsDirection === 'row' && field.wrap === false"
2273
+ >
2274
+ @for (subfield of collections()[idx]; track subfield.name) {
2275
+ <div class="list-field__field" [style.grid-column]="getGridColumn(subfield)" [style.grid-row]="getGridRow(subfield)">
2276
+ <ng-container klesDynamicField [field]="subfield" [group]="subGroup" [siblingFields]="collections()[idx]" [context]="context" />
2277
+ </div>
2278
+ }
2279
+ </div>
2280
+
2281
+ <button type="button" matIconButton class="list-field__delete" [attr.aria-label]="intl.delete" (click)="deleteField(idx)">
2282
+ <mat-icon>delete_outline</mat-icon>
2283
+ </button>
2264
2284
  </div>
2265
2285
  }
2266
- @for (validation of field.validations; track validation.name) {
2267
- <ng-container ngProjectAs="mat-error">
2268
- @if (validation.name && group.controls[field.name].hasError(validation.name)) {
2269
- <mat-error>{{ validation.message }}</mat-error>
2270
- }
2271
- </ng-container>
2272
- }
2273
- @for (validation of field.asyncValidations; track validation.name) {
2274
- <ng-container ngProjectAs="mat-error">
2275
- @if (validation.name && group.controls[field.name].hasError(validation.name)) {
2276
- <mat-error>{{ validation.message }}</mat-error>
2277
- }
2278
- </ng-container>
2286
+
2287
+ @if (formArray.length === 0) {
2288
+ <div class="list-field__empty">
2289
+ {{ intl.empty }}
2290
+ </div>
2279
2291
  }
2280
2292
  </div>
2293
+
2294
+ <div class="list-field__errors">
2295
+ <mat-error matErrorForm [form]="formArray" [validations]="field.validations" [asyncValidations]="field.asyncValidations" />
2296
+ </div>
2281
2297
  </div>
2282
- `, standalone: true, imports: [MatError, MatIcon, MatIconButton, KlesDynamicFieldDirective, ReactiveFormsModule], styles: [".subfields{display:flex;flex-direction:row;gap:5px}\n", ".label{display:flex;align-items:center;flex-direction:row;gap:5px}\n"] }]
2283
- }] });
2298
+ `, standalone: true, imports: [MatError, MatIcon, MatIconButton, KlesDynamicFieldDirective, ReactiveFormsModule, MatButtonModule, MatErrorFormDirective], styles: [":host{display:block;width:100%;min-width:0}.list-field{display:flex;flex-direction:column;gap:8px;width:100%;min-width:0}.list-field__header{display:flex;align-items:center;gap:8px;min-height:36px}.list-field__label{min-width:0;font-weight:500}.list-field__add{margin-left:auto;flex-shrink:0}.list-field__content{display:flex;flex-direction:column;gap:10px;width:100%;min-width:0}.list-field__row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px;width:100%;min-width:0}.list-field__fields{width:100%;min-width:0}.list-field__fields--column{display:flex;flex-direction:column;gap:10px}.list-field__fields--column>.list-field__field{width:100%}.list-field__fields--row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:10px}.list-field__fields--row>.list-field__field{flex:1 1 0;width:auto;min-width:0}.list-field__fields--row.list-field__fields--nowrap{flex-wrap:nowrap}.list-field__fields--grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}.list-field__fields--inline-grid{display:inline-grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}.list-field__field{width:100%;min-width:0}.list-field__delete{align-self:start;margin-top:4px;flex-shrink:0}.list-field__empty{padding:16px;text-align:center;opacity:.7}.list-field__errors{display:flex;flex-direction:column;gap:4px;min-width:0}\n"] }]
2299
+ }], ctorParameters: () => [] });
2284
2300
 
2285
2301
  class KlesFormColorComponent extends KlesFieldAbstract {
2286
2302
  constructor() {
@@ -4253,7 +4269,7 @@ class KlesFabComponent extends KlesButtonBase {
4253
4269
  <mat-icon [svgIcon]="iconSvg"></mat-icon>
4254
4270
  }
4255
4271
  </button>
4256
- `, 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: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] }); }
4272
+ `, 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: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }] }); }
4257
4273
  }
4258
4274
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFabComponent, decorators: [{
4259
4275
  type: Component,
@@ -4357,7 +4373,7 @@ class KlesMiniFabComponent extends KlesButtonBase {
4357
4373
  <mat-icon [svgIcon]="iconSvg"></mat-icon>
4358
4374
  }
4359
4375
  </button>
4360
- `, 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: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }] }); }
4376
+ `, 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: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }] }); }
4361
4377
  }
4362
4378
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesMiniFabComponent, decorators: [{
4363
4379
  type: Component,
@@ -4450,7 +4466,7 @@ class KlesIconButtonComponent extends KlesButtonBase {
4450
4466
  <mat-icon [svgIcon]="iconSvg"></mat-icon>
4451
4467
  }
4452
4468
  </button>
4453
- `, 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$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
4469
+ `, 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: i2$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
4454
4470
  }
4455
4471
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesIconButtonComponent, decorators: [{
4456
4472
  type: Component,
@@ -4647,7 +4663,7 @@ class KlesFormSelectionListSearchComponent extends KlesFieldAbstract {
4647
4663
  }
4648
4664
  </mat-selection-list>
4649
4665
  </div>
4650
- `, 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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$2.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$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4$1.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$4.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i3$4.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "directive", type: KlesFocusTargetDirective, selector: "[klesFocusTarget]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
4666
+ `, 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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: i2$2.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$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i4$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i4$1.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$4.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i3$4.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "directive", type: KlesFocusTargetDirective, selector: "[klesFocusTarget]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: KlesTransformPipe, name: "klesTransform" }] }); }
4651
4667
  }
4652
4668
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFormSelectionListSearchComponent, decorators: [{
4653
4669
  type: Component,
@@ -4831,7 +4847,7 @@ class KlesFormDateTimeComponent extends KlesFieldAbstract {
4831
4847
 
4832
4848
  <mat-error matErrorMessage [validations]="field.validations" [asyncValidations]="field.asyncValidations"></mat-error>
4833
4849
  </mat-form-field>
4834
- `, 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$2.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$3.KlesMatDatepicker, selector: "kles-mat-datepicker", outputs: ["timeSelected"], exportAs: ["klesMatDatepicker"] }, { kind: "directive", type: KlesFocusTargetDirective, selector: "[klesFocusTarget]" }] }); }
4850
+ `, 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]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[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$2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i3$2.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$2.KlesMatDatepicker, selector: "kles-mat-datepicker", outputs: ["timeSelected"], exportAs: ["klesMatDatepicker"] }, { kind: "directive", type: KlesFocusTargetDirective, selector: "[klesFocusTarget]" }] }); }
4835
4851
  }
4836
4852
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFormDateTimeComponent, decorators: [{
4837
4853
  type: Component,
@@ -4900,7 +4916,7 @@ class KlesFormCopyComponent {
4900
4916
  <button #tooltip="matTooltip" matIconButton color="primary" type="button" (click)="copy($event)" [matTooltipDisabled]="true" [matTooltip]="tooltipText" matTooltipPosition="above">
4901
4917
  <mat-icon>content_copy</mat-icon>
4902
4918
  </button>
4903
- `, 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$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ClipboardModule }] }); }
4919
+ `, 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: i2$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ClipboardModule }] }); }
4904
4920
  }
4905
4921
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: KlesFormCopyComponent, decorators: [{
4906
4922
  type: Component,
@@ -5017,7 +5033,7 @@ let KlesFormActionMenuComponent = class KlesFormActionMenuComponent extends Kles
5017
5033
  </button>
5018
5034
  }
5019
5035
  </mat-menu>
5020
- `, 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$2.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$4.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: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5036
+ `, 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: i2$2.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$4.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: i3$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5021
5037
  };
5022
5038
  KlesFormActionMenuComponent = __decorate([
5023
5039
  FieldMapper({