@messaia/cdk 14.0.0-rc15 → 14.0.0-rc16

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,5 +1,5 @@
1
- export declare class SuffixButton {
1
+ export declare class SuffixButton<TEntity = any, TContext = any> {
2
2
  icon: string;
3
- event?: Function;
4
- hide?: Function;
3
+ event?: (x?: TEntity, ctx?: TContext) => any;
4
+ hide?: (x?: TEntity, ctx?: TContext) => any;
5
5
  }
@@ -13,7 +13,7 @@ export declare function Form<T = any>(formDefinition?: Partial<FormDefinition<T>
13
13
  * @param args
14
14
  * @returns
15
15
  */
16
- export declare function FormField<T = any>(args: Partial<FormFieldDefinition<T>>): Function;
16
+ export declare function FormField<TEntity = any, TProperty = any>(args: Partial<FormFieldDefinition<TEntity, TProperty>>): Function;
17
17
  /**
18
18
  * Property decorator to create form fields
19
19
  * @param args
@@ -3,18 +3,19 @@ import { FormGroup } from "@angular/forms";
3
3
  import { IGenericFormBaseComponent } from "../../base/interfaces/igeneric-form-base";
4
4
  import { SuffixButton } from "../../common/models/suffix-button";
5
5
  import { FormFieldType } from "../enums/form-field-type";
6
- export declare class FormFieldDefinition<T = any> {
6
+ export declare class FormFieldDefinition<TEntity = any, TProperty = any> {
7
7
  row: number;
8
8
  autocompleteCssClass?: string;
9
- autocompleteTemplate?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
9
+ autocompleteTemplate?: (x: TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
10
10
  autocompleteText?: string;
11
- change?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
12
- chipTemplate?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
11
+ change?: (x: TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
12
+ chipTemplate?: (x: TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
13
13
  chipText?: string;
14
- clear?: (x: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
14
+ classType?: Type<any>;
15
+ clear?: (x: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
15
16
  compareWith?: Function;
16
17
  cssClass?: string;
17
- endpoint?: ((x: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any) | string;
18
+ endpoint?: ((x: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any) | string;
18
19
  enumType?: any;
19
20
  fileExtensions?: string[];
20
21
  filePath?: string;
@@ -22,13 +23,13 @@ export declare class FormFieldDefinition<T = any> {
22
23
  groupHeader?: string;
23
24
  groupName?: string;
24
25
  header?: string;
25
- hide?: (x: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
26
+ hide?: (x: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
26
27
  hint?: string;
27
28
  index?: number;
28
29
  inputType?: string;
29
30
  isPublicFile?: boolean;
30
- itemChange?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
31
- itemSelect?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
31
+ itemChange?: (x: TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
32
+ itemSelect?: (x: TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
32
33
  mapper?: (x: any[]) => any;
33
34
  maxLength?: number;
34
35
  minLength?: number;
@@ -38,23 +39,22 @@ export declare class FormFieldDefinition<T = any> {
38
39
  id: any;
39
40
  name: string;
40
41
  }[];
41
- optionTemplate?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
42
+ optionTemplate?: (x: TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
42
43
  optionText?: string;
43
44
  optionValue?: string;
44
- params?: ((x: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any) | any;
45
+ params?: ((x: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any) | {};
45
46
  projection?: string | string[];
46
- readonly?: (x: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
47
+ readonly?: (x: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
47
48
  rows?: number;
48
49
  searchField?: string;
49
- select?: (x: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
50
- suffixButtons?: SuffixButton[];
51
- triggerTemplate?: (x: any, y?: T, f?: FormGroup, ctx?: IGenericFormBaseComponent<T>) => any;
50
+ select?: (x: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
51
+ suffixButtons?: SuffixButton<TProperty, IGenericFormBaseComponent<TEntity>>[];
52
+ triggerTemplate?: (x: TProperty[] | TProperty, y?: TEntity, f?: FormGroup, ctx?: IGenericFormBaseComponent<TEntity>) => any;
52
53
  type?: FormFieldType;
53
54
  wrapped?: boolean;
54
- classType?: Type<any>;
55
55
  /**
56
56
  * constructor
57
57
  * @param init
58
58
  */
59
- constructor(init?: Partial<FormFieldDefinition<T>>);
59
+ constructor(init?: Partial<FormFieldDefinition<TEntity>>);
60
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messaia/cdk",
3
- "version": "14.0.0-rc15",
3
+ "version": "14.0.0-rc16",
4
4
  "peerDependencies": {},
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"