@messaia/cdk 13.3.6-rc13 → 13.3.6-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.
@@ -197,7 +197,7 @@ export declare abstract class GenericListComponent<TEntity extends IEntity | any
197
197
  * @param value The (optional) value to change
198
198
  * @param includes Includes some navigations
199
199
  */
200
- patch(id: number, fields: Array<string>, value: any, includes: any): void;
200
+ patch(id: number, fields: Array<string>, value: any, includes?: any): void;
201
201
  /**
202
202
  * Patches the entity
203
203
  * @param id The ID of the entity
@@ -206,7 +206,7 @@ export declare abstract class GenericListComponent<TEntity extends IEntity | any
206
206
  * @param includes Includes some navigations
207
207
  * @param successCallback A callback function to e called on success
208
208
  */
209
- protected _patch(id: number, fields: Array<string>, value: any, includes: any, successCallback?: Function): void;
209
+ protected _patch(id: number, fields: Array<string>, value: any, includes?: any, successCallback?: Function): void;
210
210
  /**
211
211
  * Deletes an item from the database.
212
212
  */
@@ -44,6 +44,14 @@ export interface IGenericListComponent<TEntity extends IEntity | any> extends IB
44
44
  * @param item The id of the item
45
45
  */
46
46
  edit(item: TEntity, context?: any): void;
47
+ /**
48
+ * Patches the entity
49
+ * @param id The ID of the entity
50
+ * @param fields The fields to patch
51
+ * @param value The (optional) value to change
52
+ * @param includes Includes some navigations
53
+ */
54
+ patch(id: number, fields: Array<string>, value: any, includes?: any): void;
47
55
  /**
48
56
  * Deletes an item from the database.
49
57
  */
@@ -1,15 +1,15 @@
1
- export declare class ActionMenuItem<T = any> {
1
+ export declare class ActionMenuItem<TEntity = any, TContext = any> {
2
2
  title: string;
3
- icon?: ((x?: T, ctx?: any) => any) | string;
3
+ icon?: ((x?: TEntity, ctx?: TContext) => any) | string;
4
4
  iconFontSet?: string;
5
- iconClass?: ((x?: T, ctx?: any) => any) | string;
6
- event?: (x?: T, ctx?: any) => any;
7
- hide?: (x?: T, ctx?: any) => any;
8
- disable?: (x?: T, ctx?: any) => any;
9
- subItems?: ActionMenuItem<T>[];
5
+ iconClass?: ((x?: TEntity, ctx?: TContext) => any) | string;
6
+ event?: (x?: TEntity, ctx?: TContext) => any;
7
+ hide?: (x?: TEntity, ctx?: TContext) => any;
8
+ disable?: (x?: TEntity, ctx?: TContext) => any;
9
+ subItems?: ActionMenuItem<TEntity>[];
10
10
  /**
11
11
  * constructor
12
12
  * @param init
13
13
  */
14
- constructor(init?: Partial<ActionMenuItem<T>>);
14
+ constructor(init?: Partial<ActionMenuItem<TEntity, TContext>>);
15
15
  }
@@ -1,16 +1,16 @@
1
1
  import { ActionMenuItem } from "./action-menu-item";
2
- export declare class ActionMenu<T = any> {
3
- title: string;
4
- icon?: ((x?: T, ctx?: any) => any) | string;
2
+ export declare class ActionMenu<TEntity = any, TContext = any> {
3
+ title?: string;
4
+ icon?: ((x?: TEntity, ctx?: TContext) => any) | string;
5
5
  iconFontSet?: string;
6
- iconClass?: ((x?: T, ctx?: any) => any) | string;
7
- event?: (x?: T, ctx?: any) => any;
8
- hide?: (x?: T, ctx?: any) => any;
9
- disable?: (x?: T, ctx?: any) => any;
10
- items?: ActionMenuItem<T>[];
6
+ iconClass?: ((x?: TEntity, ctx?: TContext) => any) | string;
7
+ event?: (x?: TEntity, ctx?: TContext) => any;
8
+ hide?: (x?: TEntity, ctx?: TContext) => any;
9
+ disable?: (x?: TEntity, ctx?: TContext) => any;
10
+ items?: ActionMenuItem<TEntity, TContext>[];
11
11
  /**
12
12
  * constructor
13
13
  * @param init
14
14
  */
15
- constructor(init?: Partial<ActionMenu<T>>);
15
+ constructor(init?: Partial<ActionMenu<TEntity, TContext>>);
16
16
  }
@@ -1,20 +1,20 @@
1
1
  import { IGenericListComponent } from "../../base/interfaces/igeneric-list-component";
2
2
  import { TableColumnType } from "../enums/table-column-type";
3
3
  import { TableMenu } from "./table-menu";
4
- export declare class TableColumn<T = any> {
4
+ export declare class TableColumn<TContext = any> {
5
5
  name: string;
6
6
  arrowBefore?: boolean;
7
7
  cellNgClass?: Function;
8
- change?: (x?: T, ctx?: IGenericListComponent<T>) => any;
8
+ change?: (x?: TContext, ctx?: IGenericListComponent<TContext>) => any;
9
9
  configurable?: boolean;
10
- content?: (x?: T, ctx?: IGenericListComponent<T>) => any;
10
+ content?: (x?: TContext, ctx?: IGenericListComponent<TContext>) => any;
11
11
  contentLength?: number;
12
- disable?: (x?: T, ctx?: IGenericListComponent<T>) => any;
12
+ disable?: (x?: TContext, ctx?: IGenericListComponent<TContext>) => any;
13
13
  disabled?: boolean;
14
14
  endpoint?: string;
15
15
  enumPrefix?: string;
16
16
  enumType?: any;
17
- event?: ((x?: T, ctx?: IGenericListComponent<T>) => any) | string;
17
+ event?: ((x?: TContext, ctx?: IGenericListComponent<TContext>) => any) | string;
18
18
  eventArgs?: any;
19
19
  filter?: string;
20
20
  filterInputNumber?: boolean;
@@ -22,12 +22,12 @@ export declare class TableColumn<T = any> {
22
22
  filterOptionText?: string;
23
23
  header?: string;
24
24
  hidden?: boolean;
25
- hide?: (x?: T, ctx?: IGenericListComponent<T>) => any;
25
+ hide?: (x?: TContext, ctx?: IGenericListComponent<TContext>) => any;
26
26
  index?: number;
27
27
  inputType?: string;
28
28
  maxWidth?: number;
29
29
  maxWidthUnit?: string;
30
- menu?: TableMenu;
30
+ menu?: TableMenu<TContext, IGenericListComponent<TContext>>;
31
31
  minWidth?: number;
32
32
  minWidthUnit?: string;
33
33
  onlyNumber?: boolean;
@@ -51,7 +51,7 @@ export declare class TableColumn<T = any> {
51
51
  sortBy?: string;
52
52
  sticky?: boolean;
53
53
  stickyEnd?: boolean;
54
- tooltip?: (x?: T, ctx?: IGenericListComponent<T>) => any;
54
+ tooltip?: (x?: TContext, ctx?: IGenericListComponent<TContext>) => any;
55
55
  tooltipClass?: string;
56
56
  type?: TableColumnType;
57
57
  width?: number;
@@ -60,5 +60,5 @@ export declare class TableColumn<T = any> {
60
60
  * constructor
61
61
  * @param init
62
62
  */
63
- constructor(init?: Partial<TableColumn<T>>);
63
+ constructor(init?: Partial<TableColumn<TContext>>);
64
64
  }
@@ -12,13 +12,13 @@ export declare class TableDefinition<T = any> {
12
12
  deletable?: boolean;
13
13
  downloadable?: boolean;
14
14
  duplicable?: boolean;
15
- columns?: TableColumn[];
15
+ columns?: TableColumn<T>[];
16
16
  hideColumns?: string[];
17
17
  rowNgClass?: (x?: T, ctx?: IGenericListComponent<T>) => any;
18
18
  rowClick?: (x?: T, ctx?: IGenericListComponent<T>) => any;
19
19
  onEdit?: (x?: T, ctx?: IGenericListComponent<T>) => any;
20
20
  detailsTemplate?: string;
21
- actions?: TableMenuItem<T>[];
21
+ actions?: TableMenuItem<T, IGenericListComponent<T>>[];
22
22
  /**
23
23
  * constructor
24
24
  * @param init
@@ -1,8 +1,8 @@
1
1
  import { ActionMenuItem } from "../../common/models/action-menu-item";
2
- export declare class TableMenuItem<T = any> extends ActionMenuItem<T> {
2
+ export declare class TableMenuItem<T = any, TContext = any> extends ActionMenuItem<T, TContext> {
3
3
  /**
4
4
  * constructor
5
5
  * @param init
6
6
  */
7
- constructor(init?: Partial<TableMenuItem<T>>);
7
+ constructor(init?: Partial<TableMenuItem<T, TContext>>);
8
8
  }
@@ -1,8 +1,8 @@
1
1
  import { ActionMenu } from "../../common/models/action-menu";
2
- export declare class TableMenu extends ActionMenu {
2
+ export declare class TableMenu<TEntity = any, TContext = any> extends ActionMenu<TEntity, TContext> {
3
3
  /**
4
4
  * constructor
5
5
  * @param init
6
6
  */
7
- constructor(init?: Partial<TableMenu>);
7
+ constructor(init?: Partial<TableMenu<TEntity, TContext>>);
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messaia/cdk",
3
- "version": "13.3.6-rc13",
3
+ "version": "13.3.6-rc16",
4
4
  "peerDependencies": {},
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"