@3kles/kles-material-dynamicforms 1.1.16 → 1.1.19

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.
Files changed (33) hide show
  1. package/3kles-kles-material-dynamicforms.metadata.json +1 -1
  2. package/bundles/3kles-kles-material-dynamicforms.umd.js +30 -8
  3. package/bundles/3kles-kles-material-dynamicforms.umd.js.map +1 -1
  4. package/bundles/3kles-kles-material-dynamicforms.umd.min.js +2 -2
  5. package/bundles/3kles-kles-material-dynamicforms.umd.min.js.map +1 -1
  6. package/esm2015/lib/fields/field.abstract.js +23 -4
  7. package/esm2015/lib/fields/list-field.component.js +7 -5
  8. package/esm2015/lib/fields/select.component.js +8 -4
  9. package/esm2015/lib/fields/select.search.component.js +5 -5
  10. package/esm2015/lib/fields/text.component.js +5 -5
  11. package/esm2015/lib/interfaces/directive.interface.js +1 -0
  12. package/esm2015/lib/interfaces/field.config.interface.js +1 -1
  13. package/esm2015/public-api.js +1 -1
  14. package/esm5/lib/fields/field.abstract.js +20 -2
  15. package/esm5/lib/fields/list-field.component.js +7 -5
  16. package/esm5/lib/fields/select.component.js +8 -4
  17. package/esm5/lib/fields/select.search.component.js +2 -2
  18. package/esm5/lib/fields/text.component.js +4 -4
  19. package/esm5/lib/interfaces/directive.interface.js +1 -0
  20. package/esm5/lib/interfaces/field.config.interface.js +1 -1
  21. package/esm5/public-api.js +1 -1
  22. package/fesm2015/3kles-kles-material-dynamicforms.js +37 -15
  23. package/fesm2015/3kles-kles-material-dynamicforms.js.map +1 -1
  24. package/fesm5/3kles-kles-material-dynamicforms.js +31 -9
  25. package/fesm5/3kles-kles-material-dynamicforms.js.map +1 -1
  26. package/lib/fields/field.abstract.d.ts +4 -1
  27. package/lib/fields/list-field.component.d.ts +3 -2
  28. package/lib/fields/select.component.d.ts +3 -2
  29. package/lib/fields/text.component.d.ts +2 -2
  30. package/lib/interfaces/directive.interface.d.ts +3 -0
  31. package/lib/interfaces/field.config.interface.d.ts +4 -1
  32. package/package.json +1 -1
  33. package/public-api.d.ts +1 -0
@@ -1,13 +1,16 @@
1
1
  import { IKlesField } from '../interfaces/field.interface';
2
2
  import { IKlesFieldConfig } from '../interfaces/field.config.interface';
3
3
  import { FormGroup } from '@angular/forms';
4
- import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
4
+ import { AfterViewInit, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
5
5
  import { Subject } from 'rxjs';
6
6
  export declare abstract class KlesFieldAbstract implements IKlesField, OnInit, AfterViewInit, OnDestroy {
7
+ protected viewRef: ViewContainerRef;
7
8
  field: IKlesFieldConfig;
8
9
  group: FormGroup;
9
10
  siblingFields: IKlesFieldConfig[];
11
+ directive: any;
10
12
  protected _onDestroy: Subject<void>;
13
+ constructor(viewRef: ViewContainerRef);
11
14
  ngOnInit(): void;
12
15
  ngAfterViewInit(): void;
13
16
  ngOnDestroy(): void;
@@ -1,10 +1,11 @@
1
- import { OnDestroy, OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
2
2
  import { KlesFieldAbstract } from './field.abstract';
3
3
  import { FormArray, FormBuilder } from '@angular/forms';
4
4
  export declare class KlesFormListFieldComponent extends KlesFieldAbstract implements OnInit, OnDestroy {
5
5
  private fb;
6
+ protected viewRef: ViewContainerRef;
6
7
  formArray: FormArray;
7
- constructor(fb: FormBuilder);
8
+ constructor(fb: FormBuilder, viewRef: ViewContainerRef);
8
9
  ngOnInit(): void;
9
10
  private createFormGroup;
10
11
  deleteField(index: number): void;
@@ -1,13 +1,14 @@
1
1
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
2
- import { OnDestroy, OnInit, QueryList } from '@angular/core';
2
+ import { OnDestroy, OnInit, QueryList, ViewContainerRef } from '@angular/core';
3
3
  import { MatOption } from '@angular/material/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import { KlesFieldAbstract } from './field.abstract';
6
6
  export declare class KlesFormSelectComponent extends KlesFieldAbstract implements OnInit, OnDestroy {
7
+ protected viewRef: ViewContainerRef;
7
8
  cdkVirtualScrollViewport: CdkVirtualScrollViewport;
8
9
  options: QueryList<MatOption>;
9
10
  options$: Observable<any[]>;
10
- constructor();
11
+ constructor(viewRef: ViewContainerRef);
11
12
  ngOnInit(): void;
12
13
  ngOnDestroy(): void;
13
14
  openChange($event: boolean): void;
@@ -1,5 +1,5 @@
1
- import { OnDestroy, OnInit } from "@angular/core";
2
- import { KlesFieldAbstract } from "./field.abstract";
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { KlesFieldAbstract } from './field.abstract';
3
3
  export declare class KlesFormTextComponent extends KlesFieldAbstract implements OnInit, OnDestroy {
4
4
  ngOnInit(): void;
5
5
  ngOnDestroy(): void;
@@ -0,0 +1,3 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ export interface IKlesDirective extends OnInit, OnDestroy {
3
+ }
@@ -1,8 +1,10 @@
1
1
  import { IKlesValidator } from './validator.interface';
2
2
  import { ValidatorFn, AsyncValidatorFn, FormGroup } from '@angular/forms';
3
- import { PipeTransform, Type } from '@angular/core';
3
+ import { PipeTransform, Type, ViewContainerRef } from '@angular/core';
4
4
  import { Subject } from 'rxjs';
5
5
  import { EnumType } from '../enums/type.enum';
6
+ import { IKlesField } from './field.interface';
7
+ import { IKlesDirective } from './directive.interface';
6
8
  export interface IKlesFieldConfig {
7
9
  type?: EnumType;
8
10
  name: string;
@@ -51,4 +53,5 @@ export interface IKlesFieldConfig {
51
53
  searchKeys?: string[];
52
54
  updateOn?: 'change' | 'blur' | 'submit';
53
55
  debounceTime?: number;
56
+ directive?: (new (ref: ViewContainerRef, field: IKlesField) => IKlesDirective);
54
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3kles/kles-material-dynamicforms",
3
- "version": "1.1.16",
3
+ "version": "1.1.19",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "~9.1.9",
6
6
  "@angular/cdk": "^9.0.0",
package/public-api.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from './lib/interfaces/component.interface';
40
40
  export * from './lib/interfaces/field.interface';
41
41
  export * from './lib/interfaces/field.config.interface';
42
42
  export * from './lib/interfaces/validator.interface';
43
+ export * from './lib/interfaces/directive.interface';
43
44
  /**MATCHER */
44
45
  export * from './lib/matcher/form-error.matcher';
45
46
  /**VALIDATORS */