@3kles/kles-material-dynamicforms 22.0.3 → 22.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3kles/kles-material-dynamicforms",
3
- "version": "22.0.3",
3
+ "version": "22.1.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/3kles-lab/klesmaterialdynamicforms"
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnInit, OnDestroy, Type, PipeTransform, ViewContainerRef, Provider, StaticProvider, Signal, OnChanges, EventEmitter, ChangeDetectorRef, SimpleChanges, ComponentRef, Injector, ApplicationRef, AfterViewInit, InjectionToken } from '@angular/core';
3
3
  import * as _angular_forms from '@angular/forms';
4
- import { UntypedFormGroup, ValidatorFn, AsyncValidatorFn, UntypedFormBuilder, FormGroup, ControlValueAccessor, UntypedFormArray, AbstractControl, FormControl, UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms';
4
+ import { UntypedFormGroup, ValidatorFn, AsyncValidatorFn, UntypedFormBuilder, FormGroup, ControlValueAccessor, AbstractControl, FormArray, UntypedFormArray, FormControl, UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms';
5
5
  import { Subject, Observable } from 'rxjs';
6
6
  import * as i30 from '@angular/material/core';
7
7
  import { ThemePalette, DateAdapter, MatDateFormats, ErrorStateMatcher } from '@angular/material/core';
@@ -658,9 +658,9 @@ declare class MatErrorMessageDirective implements AfterViewInit {
658
658
  }
659
659
 
660
660
  declare class MatErrorFormDirective {
661
- readonly form: i0.InputSignal<UntypedFormGroup>;
662
- readonly validations: i0.InputSignal<IKlesValidator<ValidatorFn>[]>;
663
- readonly asyncValidations: i0.InputSignal<IKlesValidator<AsyncValidatorFn>[]>;
661
+ readonly form: i0.InputSignal<AbstractControl<any, any, any>>;
662
+ readonly validations: i0.InputSignal<IKlesValidator<ValidatorFn>[] | undefined>;
663
+ readonly asyncValidations: i0.InputSignal<IKlesValidator<AsyncValidatorFn>[] | undefined>;
664
664
  readonly validationsKeys: i0.Signal<_3kles_kles_material_dynamicforms.KlesValidationKey[]>;
665
665
  readonly asyncValidationsKeys: i0.Signal<_3kles_kles_material_dynamicforms.KlesValidationKey[]>;
666
666
  readonly formErrors: i0.Signal<_angular_forms.ValidationErrors | null>;
@@ -700,7 +700,10 @@ declare class KlesDynamicFormIntl {
700
700
  selectAll: string;
701
701
  clearSearch: string;
702
702
  search: string;
703
+ add: string;
704
+ delete: string;
703
705
  copy: string;
706
+ empty: string;
704
707
  imageUploadChange: string;
705
708
  imageUploadDelete: string;
706
709
  imageUploadInvalidType: string;
@@ -821,17 +824,35 @@ declare class KlesFormCheckboxComponent extends KlesFieldAbstract implements OnI
821
824
  static ɵcmp: i0.ɵɵComponentDeclaration<KlesFormCheckboxComponent, "kles-form-checkbox", never, {}, {}, never, never, true, never>;
822
825
  }
823
826
 
827
+ declare class ArrayUiState<TItem extends AbstractUiState<any, any> = AbstractUiState<any, any>, TValue extends any[] = any[], TRawValue extends TValue = TValue> extends AbstractUiState<TValue, TRawValue> {
828
+ states: TItem[];
829
+ constructor(states?: TItem[]);
830
+ setValue(value: TRawValue): void;
831
+ patchValue(value: Partial<TRawValue>): void;
832
+ childValueChanged(key: string | number, value: any): void;
833
+ at(index: number): AbstractUiState;
834
+ _find(name: string | number): AbstractUiState | null;
835
+ push(control: TItem | TItem[]): void;
836
+ insert(index: number, state: TItem | TItem[]): void;
837
+ removeAt(index: number): void;
838
+ clear(): void;
839
+ }
840
+
824
841
  declare class KlesFormListFieldComponent extends KlesFieldAbstract implements OnInit, OnDestroy {
825
- formArray: UntypedFormArray;
842
+ readonly intl: KlesDynamicFormIntl;
843
+ formArray: FormArray<FormGroup<Record<string, AbstractControl>>>;
844
+ subUi: ArrayUiState;
826
845
  readonly collections: i0.WritableSignal<IKlesFieldConfig[][]>;
827
- private fb;
846
+ constructor();
828
847
  ngOnInit(): void;
829
- private createFormGroup;
848
+ getRowUi(index: number): GroupUiState;
849
+ get hasLayout(): boolean;
850
+ get fieldsDirection(): 'column' | 'row' | 'grid' | 'inline-grid';
830
851
  deleteField(index: number): void;
831
852
  addField(): void;
832
- private bindValidations;
833
- private bindAsyncValidations;
834
853
  ngOnDestroy(): void;
854
+ getGridColumn(field: IKlesFieldConfig): string;
855
+ getGridRow(field: IKlesFieldConfig): string | undefined;
835
856
  static ɵfac: i0.ɵɵFactoryDeclaration<KlesFormListFieldComponent, never>;
836
857
  static ɵcmp: i0.ɵɵComponentDeclaration<KlesFormListFieldComponent, "kles-form-listfield", never, {}, {}, never, never, true, never>;
837
858
  }
@@ -1039,20 +1060,6 @@ declare class KlesFormButtonToogleGroupComponent extends KlesFieldAbstract imple
1039
1060
  static ɵcmp: i0.ɵɵComponentDeclaration<KlesFormButtonToogleGroupComponent, "kles-form-button-toogle-group", never, {}, {}, never, never, true, never>;
1040
1061
  }
1041
1062
 
1042
- declare class ArrayUiState<TItem extends AbstractUiState<any, any> = AbstractUiState<any, any>, TValue extends any[] = any[], TRawValue extends TValue = TValue> extends AbstractUiState<TValue, TRawValue> {
1043
- states: TItem[];
1044
- constructor(states?: TItem[]);
1045
- setValue(value: TRawValue): void;
1046
- patchValue(value: Partial<TRawValue>): void;
1047
- childValueChanged(key: string | number, value: any): void;
1048
- at(index: number): AbstractUiState;
1049
- _find(name: string | number): AbstractUiState | null;
1050
- push(control: TItem | TItem[]): void;
1051
- insert(index: number, state: TItem | TItem[]): void;
1052
- removeAt(index: number): void;
1053
- clear(): void;
1054
- }
1055
-
1056
1063
  declare class KlesFormArrayComponent extends KlesFieldAbstract implements OnInit, OnDestroy {
1057
1064
  formArray: UntypedFormArray;
1058
1065
  subUi: ArrayUiState;