@3kles/kles-material-dynamicforms 21.7.4 → 21.7.6

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": "21.7.4",
3
+ "version": "21.7.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/3kles-lab/klesmaterialdynamicforms"
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnDestroy, Type, PipeTransform, ViewContainerRef, Provider, StaticProvider, Signal, OnChanges, EventEmitter, ChangeDetectorRef, SimpleChanges, ComponentRef, Injector, AfterViewInit, ElementRef, InjectionToken } from '@angular/core';
2
+ import { OnInit, OnDestroy, Type, PipeTransform, ViewContainerRef, Provider, StaticProvider, Signal, OnChanges, EventEmitter, ChangeDetectorRef, SimpleChanges, ComponentRef, Injector, ApplicationRef, AfterViewInit, ElementRef, InjectionToken } from '@angular/core';
3
3
  import * as i2$1 from '@angular/forms';
4
4
  import { UntypedFormGroup, ValidatorFn, AsyncValidatorFn, ɵGetProperty as _GetProperty, ɵTypedOrUntyped as _TypedOrUntyped, UntypedFormBuilder, FormGroup, ControlValueAccessor, Validators, AsyncValidator, UntypedFormArray, FormControl, UntypedFormControl, FormGroupDirective, NgForm, AbstractControl } from '@angular/forms';
5
5
  import { Subject, Observable } from 'rxjs';
@@ -30,7 +30,7 @@ import * as i12 from '@angular/material/select';
30
30
  import * as i13 from '@angular/material/radio';
31
31
  import * as i14 from '@angular/material/datepicker';
32
32
  import * as i15 from '@angular/material/chips';
33
- import { MatChipInputEvent } from '@angular/material/chips';
33
+ import { MatChipInputEvent, MatChipInput } from '@angular/material/chips';
34
34
  import * as i17 from '@angular/material/table';
35
35
  import * as i18 from '@angular/material/paginator';
36
36
  import * as i19 from '@angular/material/card';
@@ -351,6 +351,7 @@ declare class KlesComponentDirective implements OnInit, OnChanges {
351
351
  declare class KlesDynamicFieldDirective<T extends IKlesFieldConfig = IKlesFieldConfig> implements OnInit, OnChanges, OnDestroy {
352
352
  protected container: ViewContainerRef;
353
353
  protected injector: Injector;
354
+ private applicationRef;
354
355
  field: T;
355
356
  group: UntypedFormGroup;
356
357
  ui: GroupUiState;
@@ -358,7 +359,8 @@ declare class KlesDynamicFieldDirective<T extends IKlesFieldConfig = IKlesFieldC
358
359
  context: Signal<unknown | null> | null;
359
360
  componentRef: ComponentRef<any> | undefined;
360
361
  subComponents: ComponentRef<any>[];
361
- constructor(container: ViewContainerRef, injector: Injector);
362
+ private subComponentViews;
363
+ constructor(container: ViewContainerRef, injector: Injector, applicationRef: ApplicationRef);
362
364
  ngOnDestroy(): void;
363
365
  ngOnInit(): void;
364
366
  ngOnChanges(changes: SimpleChanges): void;
@@ -366,6 +368,7 @@ declare class KlesDynamicFieldDirective<T extends IKlesFieldConfig = IKlesFieldC
366
368
  protected createComponentRef(injector: Injector): ComponentRef<any> | undefined;
367
369
  protected findComponent(): Type<any> | undefined;
368
370
  private createSubComponent;
371
+ private destroyComponents;
369
372
  static ɵfac: i0.ɵɵFactoryDeclaration<KlesDynamicFieldDirective<any>, never>;
370
373
  static ɵdir: i0.ɵɵDirectiveDeclaration<KlesDynamicFieldDirective<any>, "[klesDynamicField]", never, { "field": { "alias": "field"; "required": false; }; "group": { "alias": "group"; "required": false; }; "ui": { "alias": "ui"; "required": false; }; "siblingFields": { "alias": "siblingFields"; "required": false; }; "context": { "alias": "context"; "required": false; }; }, {}, never, never, true, never>;
371
374
  }
@@ -1143,29 +1146,29 @@ declare class KlesFormStatusComponent<TContext = unknown> extends KlesFieldAbstr
1143
1146
  static ɵcmp: i0.ɵɵComponentDeclaration<KlesFormStatusComponent<any>, "kles-form-status", never, {}, {}, never, never, true, never>;
1144
1147
  }
1145
1148
 
1146
- declare class KlesFormChipGridComponent extends KlesFieldAbstract implements OnInit, OnDestroy {
1149
+ interface ChipOptionsState {
1150
+ loading: boolean;
1147
1151
  options: any[];
1148
- private readonly control;
1149
- intl: KlesDynamicFormIntl;
1150
- filteredOption$: Observable<{
1151
- loading: boolean;
1152
- options: any[];
1153
- }>;
1154
- options$: Observable<{
1155
- loading: boolean;
1156
- options: any[];
1157
- }>;
1152
+ }
1153
+ declare class KlesFormChipGridComponent extends KlesFieldAbstract implements OnInit {
1154
+ readonly control: i2$1.AbstractControl<any, any, any>;
1155
+ readonly intl: KlesDynamicFormIntl;
1158
1156
  readonly separatorKeysCodes: number[];
1159
- private isFocused;
1160
- searchControl: FormControl<string>;
1157
+ readonly searchControl: FormControl<any>;
1158
+ filteredOption$: Observable<ChipOptionsState>;
1159
+ private options$;
1160
+ private readonly loadOptions$;
1161
1161
  ngOnInit(): void;
1162
- ngOnDestroy(): void;
1163
1162
  onFocus(): void;
1164
1163
  onTokenEnd(event: MatChipInputEvent): void;
1165
- addChip(rawValue: string): void;
1166
- removeChip(value: string): void;
1167
- selected(event: MatAutocompleteSelectedEvent): void;
1164
+ addChip(value: unknown): void;
1165
+ removeChip(value: unknown): void;
1166
+ selected(event: MatAutocompleteSelectedEvent, chipInput: MatChipInput): void;
1167
+ displayValue(value: any): any;
1168
+ private createOptionsStream;
1169
+ private resolveOptions;
1168
1170
  private filterData;
1171
+ private isSameOption;
1169
1172
  static ɵfac: i0.ɵɵFactoryDeclaration<KlesFormChipGridComponent, never>;
1170
1173
  static ɵcmp: i0.ɵɵComponentDeclaration<KlesFormChipGridComponent, "kles-form-chip-grid", never, {}, {}, never, never, true, never>;
1171
1174
  }