@messaia/cdk 13.3.6-rc12 → 13.3.6-rc15

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.
@@ -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,10 +1,12 @@
1
- import { MatDrawerToggleResult } from '@angular/material/sidenav';
2
- import { MatSidenav } from '@angular/material/sidenav';
1
+ import { MatDrawerToggleResult, MatSidenav } from '@angular/material/sidenav';
3
2
  import { Router } from '@angular/router';
4
3
  import { ILayoutTogglable } from '../layout-toggle.class';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class VdLayoutNavListComponent implements ILayoutTogglable {
7
6
  private _router;
7
+ /**
8
+ * sidenav: MatSidenav
9
+ */
8
10
  sidenav: MatSidenav;
9
11
  /**
10
12
  * toolbarTitle?: string
@@ -37,8 +39,6 @@ export declare class VdLayoutNavListComponent implements ILayoutTogglable {
37
39
  * The mode or styling of the sidenav.
38
40
  * Defaults to "side".
39
41
  * See "MatSidenav" documentation for more info.
40
- *
41
- * https://github.com/angular/material2/tree/master/src/lib/sidenav
42
42
  */
43
43
  mode: 'side' | 'push' | 'over';
44
44
  /**
@@ -47,8 +47,6 @@ export declare class VdLayoutNavListComponent implements ILayoutTogglable {
47
47
  * Defaults to "true".
48
48
  *
49
49
  * See "MatSidenav" documentation for more info.
50
- *
51
- * https://github.com/angular/material2/tree/master/src/lib/sidenav
52
50
  */
53
51
  opened: boolean;
54
52
  /**
@@ -56,8 +54,6 @@ export declare class VdLayoutNavListComponent implements ILayoutTogglable {
56
54
  *
57
55
  * Sets the "width" of the sidenav in either "px" or "%"
58
56
  * Defaults to "350px".
59
- *
60
- * https://github.com/angular/material2/tree/master/src/lib/sidenav
61
57
  */
62
58
  sidenavWidth: string;
63
59
  /**
@@ -75,7 +71,14 @@ export declare class VdLayoutNavListComponent implements ILayoutTogglable {
75
71
  * Checks if router was injected.
76
72
  */
77
73
  get routerEnabled(): boolean;
74
+ /**
75
+ * constructor
76
+ * @param _router
77
+ */
78
78
  constructor(_router: Router);
79
+ /**
80
+ * Handles navigation click
81
+ */
79
82
  handleNavigationClick(): void;
80
83
  /**
81
84
  * Proxy toggle method to access sidenav from outside (from vd-layout template).
@@ -90,5 +93,5 @@ export declare class VdLayoutNavListComponent implements ILayoutTogglable {
90
93
  */
91
94
  close(): Promise<MatDrawerToggleResult>;
92
95
  static ɵfac: i0.ɵɵFactoryDeclaration<VdLayoutNavListComponent, [{ optional: true; }]>;
93
- static ɵcmp: i0.ɵɵComponentDeclaration<VdLayoutNavListComponent, "vd-layout-nav-list", never, { "toolbarTitle": "toolbarTitle"; "icon": "icon"; "logo": "logo"; "color": "color"; "mode": "mode"; "opened": "opened"; "sidenavWidth": "sidenavWidth"; "navigationRoute": "navigationRoute"; }, {}, never, ["[vd-menu-button]", "[vd-sidenav-toolbar-content]", "[vd-sidenav-content]", "[vd-toolbar-content]", "*", "vd-layout-footer-inner", "vd-layout-footer"]>;
96
+ static ɵcmp: i0.ɵɵComponentDeclaration<VdLayoutNavListComponent, "vd-layout-nav-list", never, { "toolbarTitle": "toolbarTitle"; "icon": "icon"; "logo": "logo"; "color": "color"; "mode": "mode"; "opened": "opened"; "sidenavWidth": "sidenavWidth"; "navigationRoute": "navigationRoute"; }, {}, never, ["[vd-menu-button]", "[vd-sidenav-toolbar-content]", "[vd-sidenav-content]", "mat-toolbar", "vd-toolbar-content", "*", "vd-layout-footer-inner", "vd-layout-footer"]>;
94
97
  }
@@ -3,22 +3,58 @@ import { LayoutToggle } from '../layout-toggle.class';
3
3
  import { VdLayoutNavListComponent } from './layout-nav-list.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class VdLayoutNavListToggleDirective extends LayoutToggle {
6
+ /**
7
+ * Disables the navbar
8
+ */
6
9
  set vdLayoutNavListToggle(vdLayoutNavListToggle: boolean);
10
+ /**
11
+ * Constructor
12
+ * @param layout
13
+ * @param renderer
14
+ * @param elementRef
15
+ */
7
16
  constructor(layout: VdLayoutNavListComponent, renderer: Renderer2, elementRef: ElementRef);
17
+ /**
18
+ * Opens the navbar
19
+ */
8
20
  onClick(): void;
9
21
  static ɵfac: i0.ɵɵFactoryDeclaration<VdLayoutNavListToggleDirective, never>;
10
22
  static ɵdir: i0.ɵɵDirectiveDeclaration<VdLayoutNavListToggleDirective, "[vdLayoutNavListToggle]", never, { "vdLayoutNavListToggle": "vdLayoutNavListToggle"; }, {}, never>;
11
23
  }
12
24
  export declare class VdLayoutNavListCloseDirective extends LayoutToggle {
25
+ /**
26
+ * Disables the navbar
27
+ */
13
28
  set vdLayoutNavListClose(vdLayoutNavListClose: boolean);
29
+ /**
30
+ * Constructor
31
+ * @param layout
32
+ * @param renderer
33
+ * @param elementRef
34
+ */
14
35
  constructor(layout: VdLayoutNavListComponent, renderer: Renderer2, elementRef: ElementRef);
36
+ /**
37
+ * Opens the navbar
38
+ */
15
39
  onClick(): void;
16
40
  static ɵfac: i0.ɵɵFactoryDeclaration<VdLayoutNavListCloseDirective, never>;
17
41
  static ɵdir: i0.ɵɵDirectiveDeclaration<VdLayoutNavListCloseDirective, "[vdLayoutNavListClose]", never, { "vdLayoutNavListClose": "vdLayoutNavListClose"; }, {}, never>;
18
42
  }
19
43
  export declare class VdLayoutNavListOpenDirective extends LayoutToggle {
44
+ /**
45
+ * Disables the navbar
46
+ */
20
47
  set vdLayoutNavListOpen(vdLayoutNavListOpen: boolean);
48
+ /**
49
+ * Constructor
50
+ * @param layout
51
+ * @param renderer
52
+ * @param elementRef
53
+ */
21
54
  constructor(layout: VdLayoutNavListComponent, renderer: Renderer2, elementRef: ElementRef);
55
+ /**
56
+ * Opens the navbar
57
+ */
22
58
  onClick(): void;
23
59
  static ɵfac: i0.ɵɵFactoryDeclaration<VdLayoutNavListOpenDirective, never>;
24
60
  static ɵdir: i0.ɵɵDirectiveDeclaration<VdLayoutNavListOpenDirective, "[vdLayoutNavListOpen]", never, { "vdLayoutNavListOpen": "vdLayoutNavListOpen"; }, {}, never>;
@@ -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-rc12",
3
+ "version": "13.3.6-rc15",
4
4
  "peerDependencies": {},
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"