@zeedhi/common 1.42.0 → 1.45.0

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 (62) hide show
  1. package/dist/zd-common.esm.js +696 -83
  2. package/dist/zd-common.umd.js +695 -82
  3. package/package.json +2 -2
  4. package/types/components/zd-apex-chart/apex-chart.d.ts +152 -1
  5. package/types/components/zd-apex-chart/interfaces.d.ts +35 -3
  6. package/types/components/zd-button-group/button-group.d.ts +1 -1
  7. package/types/components/zd-carousel/carousel.d.ts +12 -2
  8. package/types/components/zd-carousel/interfaces.d.ts +3 -1
  9. package/types/components/zd-code-editor/code-editor.d.ts +5 -1
  10. package/types/components/zd-code-editor/interfaces.d.ts +2 -1
  11. package/types/components/zd-collapse-card/collapse-card.d.ts +1 -1
  12. package/types/components/zd-component/component.d.ts +5 -4
  13. package/types/components/zd-container/container.d.ts +12 -0
  14. package/types/components/zd-container/interfaces.d.ts +3 -0
  15. package/types/components/zd-dashboard/dashboard.d.ts +1 -1
  16. package/types/components/zd-date/date-range.d.ts +4 -4
  17. package/types/components/zd-date/date.d.ts +5 -5
  18. package/types/components/zd-dialog/dialog.d.ts +11 -0
  19. package/types/components/zd-dialog/interfaces.d.ts +2 -0
  20. package/types/components/zd-dropdown/dropdown.d.ts +4 -0
  21. package/types/components/zd-dropdown/interfaces.d.ts +1 -0
  22. package/types/components/zd-file-input/file-input.d.ts +3 -3
  23. package/types/components/zd-form/form.d.ts +6 -2
  24. package/types/components/zd-form/interfaces.d.ts +1 -0
  25. package/types/components/zd-frame/frame.d.ts +4 -1
  26. package/types/components/zd-frame/interfaces.d.ts +3 -0
  27. package/types/components/zd-grid/grid-editable.d.ts +16 -6
  28. package/types/components/zd-grid/grid.d.ts +5 -5
  29. package/types/components/zd-increment/increment.d.ts +2 -2
  30. package/types/components/zd-input/input.d.ts +6 -6
  31. package/types/components/zd-iterable/column.d.ts +2 -0
  32. package/types/components/zd-iterable/interfaces.d.ts +1 -0
  33. package/types/components/zd-iterable/iterable-page-component.d.ts +1 -1
  34. package/types/components/zd-iterable/iterable-page-size.d.ts +2 -2
  35. package/types/components/zd-iterable/iterable.d.ts +1 -1
  36. package/types/components/zd-list/interfaces.d.ts +3 -0
  37. package/types/components/zd-list/list.d.ts +12 -0
  38. package/types/components/zd-login/login-button.d.ts +1 -1
  39. package/types/components/zd-master-detail/master-detail.d.ts +1 -1
  40. package/types/components/zd-menu/menu-group.d.ts +8 -0
  41. package/types/components/zd-menu/menu-link.d.ts +5 -1
  42. package/types/components/zd-menu/menu.d.ts +3 -1
  43. package/types/components/zd-modal/interfaces.d.ts +2 -0
  44. package/types/components/zd-modal/modal.d.ts +8 -0
  45. package/types/components/zd-select/select.d.ts +5 -5
  46. package/types/components/zd-select-multiple/select-multiple.d.ts +2 -2
  47. package/types/components/zd-select-tree/select-tree.d.ts +6 -6
  48. package/types/components/zd-select-tree-multiple/interfaces.d.ts +1 -0
  49. package/types/components/zd-select-tree-multiple/select-tree-multiple.d.ts +6 -2
  50. package/types/components/zd-selectable-list/selectable-list.d.ts +1 -1
  51. package/types/components/zd-svg-map/svg-map.d.ts +1 -1
  52. package/types/components/zd-tabs/interfaces.d.ts +1 -0
  53. package/types/components/zd-tabs/tabs.d.ts +6 -2
  54. package/types/components/zd-text-input/text-input.d.ts +4 -4
  55. package/types/components/zd-time/time.d.ts +1 -1
  56. package/types/components/zd-tree/interfaces.d.ts +4 -0
  57. package/types/components/zd-tree/tree.d.ts +39 -11
  58. package/types/components/zd-tree-grid/tree-grid-editable.d.ts +8 -5
  59. package/types/components/zd-tree-grid/tree-grid.d.ts +2 -2
  60. package/types/services/zd-loading/loading-service.d.ts +7 -1
  61. package/types/utils/report/report-type/interfaces.d.ts +1 -0
  62. package/types/utils/themes/themes.d.ts +12 -2
@@ -1,4 +1,4 @@
1
- import { IDictionary, Datasource } from '@zeedhi/core';
1
+ import { IDictionary, Datasource, Event, IEvents } from '@zeedhi/core';
2
2
  import { ComponentRender } from '../zd-component/component-render';
3
3
  import { IComponentRender } from '../zd-component/interfaces';
4
4
  import { ITree, ITreeEvents, ITreeNode, ITreeNodeModel, ICursorPosition, ITreeConditionComponent } from './interfaces';
@@ -25,6 +25,10 @@ export declare class Tree extends ComponentRender implements ITree {
25
25
  * Components that will be rendered on toolbar slot
26
26
  */
27
27
  toolbarSlot: IComponentRender[];
28
+ /**
29
+ * Components that will be rendered on title slot
30
+ */
31
+ titleSlot?: ITreeConditionComponent[];
28
32
  /** Datasource object */
29
33
  datasource?: Datasource;
30
34
  /** Datasource parent field */
@@ -37,6 +41,10 @@ export declare class Tree extends ComponentRender implements ITree {
37
41
  * Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
38
42
  */
39
43
  openLevelOnLoad: number | boolean;
44
+ /**
45
+ * Allow row check
46
+ */
47
+ checkbox?: boolean | undefined;
40
48
  /** SlVueTree component */
41
49
  private tree;
42
50
  /** SlVueTree component */
@@ -45,14 +53,24 @@ export declare class Tree extends ComponentRender implements ITree {
45
53
  * Defines if should wait and not execute GET method when Datasource is created
46
54
  */
47
55
  private lazyLoad;
56
+ /**
57
+ * Dictionary of nodePath ponting to Dictionary of path pointing to the condition (applied) return value
58
+ */
59
+ private appliedConditions;
60
+ private factoredConditions;
48
61
  /**
49
62
  * Creates a new instance of LabelsTree
50
63
  * @param props Image Link props
51
64
  */
52
65
  constructor(props: ITree);
66
+ /**
67
+ * Initialize all the properties of the declared nodes (reactivity)
68
+ */
69
+ protected initNodes(nodes: ITreeNodeModel<IDictionary>[]): ITreeNodeModel<IDictionary>[];
53
70
  /** Nodes */
54
71
  get nodes(): ITreeNodeModel<IDictionary>[];
55
72
  set nodes(value: ITreeNodeModel<IDictionary>[]);
73
+ getCheckedNodes(): ITreeNodeModel<IDictionary<any>>[];
56
74
  /** Returns the selected nodes */
57
75
  get selectedNodes(): ITreeNode<IDictionary>[];
58
76
  private createDataStructure;
@@ -69,19 +87,29 @@ export declare class Tree extends ComponentRender implements ITree {
69
87
  updateNodeData(node: ITreeNode<IDictionary>, value: IDictionary): void;
70
88
  private removeDraggable;
71
89
  setTree(tree: any): void;
72
- /** Get the conditions function to be applied to each column depending on the node */
73
- getConditions(conditions: IDictionary): (node: {
74
- [key: string]: any;
75
- }) => {
76
- [key: string]: boolean;
77
- };
90
+ /**
91
+ * Return plain conditions object
92
+ * @param conditions Conditions object
93
+ * @param parentPath Path to parent property
94
+ */
95
+ protected getPlainConditions(conditions: IDictionary<any>, parentPath?: string): IDictionary<string>;
96
+ protected createConditions(children: ITreeConditionComponent[], parentPath?: string): void;
97
+ protected applyCondition(node: ITreeNode<any>, factoredConditions: IEvents<ITreeNode<IDictionary>>): IDictionary<any>;
98
+ protected applyChildCondition(node: ITreeNode<any>, factoredConditions?: IDictionary<IEvents<ITreeNode<IDictionary<any>>>>): IDictionary<any>;
99
+ reapplyConditions(node: ITreeNode<any>): IDictionary;
100
+ getSlotComponent(slot: IComponentRender | IComponentRender[], node: ITreeNode<IDictionary>, parentPath?: string): IComponentRender[];
78
101
  /** Triggers when dragging nodes have been dropped */
79
- nodeDrop(nodes: ITreeNode<IDictionary>[], position: ICursorPosition<IDictionary>, event?: Event, element?: HTMLElement): void;
102
+ nodeDrop(nodes: ITreeNode<IDictionary>[], position: ICursorPosition<IDictionary>, event?: Event, element?: any): void;
80
103
  /** Triggers when a node has been selected/deselected */
81
- nodeSelect(nodes: ITreeNode<IDictionary>[], event?: Event, element?: HTMLElement): void;
104
+ nodeSelect(nodes: ITreeNode<IDictionary>[], event?: Event, element?: any): void;
82
105
  /** Handle click event on node */
83
- nodeClick(node: ITreeNode<IDictionary>, event?: Event, element?: HTMLElement): void;
106
+ nodeClick(node: ITreeNode<IDictionary>, event?: Event, element?: any): void;
84
107
  /** Handle dblclick event on node */
85
- nodeDblClick(node: ITreeNode<IDictionary>, event?: Event, element?: HTMLElement): void;
108
+ nodeDblClick(node: ITreeNode<IDictionary>, event?: Event, element?: any): void;
109
+ /** Triggers when a node has been checked/unchecked */
110
+ nodeCheck(node: ITreeNode<IDictionary>, event?: Event, element?: HTMLElement): void;
86
111
  clearSelection(nodes?: ITreeNodeModel<IDictionary<any>>[]): void;
112
+ getNode(path: number[]): ITreeNodeModel<IDictionary<any>> | undefined;
113
+ getParentNode(node: ITreeNode<IDictionary>): ITreeNodeModel<IDictionary<any>> | undefined;
114
+ private searchPath;
87
115
  }
@@ -26,7 +26,10 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
26
26
  * Enter edit mode on double click
27
27
  */
28
28
  doubleClickEdit: boolean;
29
+ protected cancelEditedRowsKeyMapping: any;
29
30
  constructor(props: ITreeGridEditable);
31
+ onMounted(element: any): void;
32
+ onBeforeDestroy(): void;
30
33
  /**
31
34
  * Get Grid columns objects
32
35
  * @param columns Grid columns parameter
@@ -44,7 +47,7 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
44
47
  * @param event DOM event
45
48
  * @param element DOM Element
46
49
  */
47
- rowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
50
+ rowClick(row: IDictionary<any>, event: Event, element: any): void;
48
51
  /**
49
52
  * Enables editing mode if column is editable
50
53
  * @param row Grid row
@@ -52,8 +55,8 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
52
55
  * @param event DOM event
53
56
  * @param element DOM Element
54
57
  */
55
- cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element: HTMLElement): void;
56
- cellClickEvent(row: IDictionary<any>, column: GridColumnEditable, event: Event, element: HTMLElement): void;
58
+ cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element: any): void;
59
+ cellClickEvent(row: IDictionary<any>, column: GridColumnEditable, event: Event, element: any): void;
57
60
  /**
58
61
  * Dispatches select/unselect event
59
62
  * @param row Grid row
@@ -61,14 +64,14 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
61
64
  * @param event DOM event
62
65
  * @param element DOM Element
63
66
  */
64
- selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: HTMLElement): void;
67
+ selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: any): void;
65
68
  /**
66
69
  * Dispatches select/unselect all rows event
67
70
  * @param isSelected Row is selected
68
71
  * @param event DOM event
69
72
  * @param element DOM Element
70
73
  */
71
- selectAllClick(isSelected: boolean, event: Event, element: HTMLElement): void;
74
+ selectAllClick(isSelected: boolean, event?: Event, element?: any): void;
72
75
  /**
73
76
  * Returns editable component properties based on the column definition
74
77
  * @param column Column definition
@@ -38,7 +38,7 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
38
38
  */
39
39
  constructor(props: ITreeGrid);
40
40
  private navigationTreeKeyMapping;
41
- onMounted(element: HTMLElement): void;
41
+ onMounted(element: any): void;
42
42
  /**
43
43
  * Build tree data
44
44
  */
@@ -55,7 +55,7 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
55
55
  * @param event DOM event
56
56
  * @param element DOM Element
57
57
  */
58
- rowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
58
+ rowClick(row: IDictionary<any>, event: Event, element: any): void;
59
59
  /**
60
60
  * Toggle expand/collapse using navigation keys
61
61
  * @param collapse Should collapse
@@ -1,9 +1,15 @@
1
+ import { ILoading } from '../..';
1
2
  import { Loading } from '../../components/zd-loading/loading';
2
3
  /**
3
4
  * Loading Service Class
4
5
  */
5
6
  export declare class LoadingService {
6
- static instance: Loading;
7
+ static loading: Loading;
8
+ /**
9
+ * Creates a new loading instance
10
+ * @param loading loading structure
11
+ */
12
+ static create<T extends Loading>(CreateLoading: new (...args: any[]) => T, props: ILoading): T;
7
13
  /**
8
14
  * Displays a Loading.
9
15
  * If has an opened Loading it will be closed.
@@ -13,6 +13,7 @@ export declare type MetadataColumn = IDictionary<{
13
13
  sequence: number;
14
14
  size: string;
15
15
  expression?: string;
16
+ xlsType?: string;
16
17
  }>;
17
18
  export declare type MetadataFilter = {
18
19
  label: string;
@@ -32,10 +32,22 @@ declare const initTheme: (theme?: any) => {
32
32
  light: {
33
33
  'font-color': string;
34
34
  'background-base': string;
35
+ 'background-base-2': string;
36
+ 'background-base-3': string;
37
+ 'scrollbar-track': string;
38
+ 'scrollbar-thumb': string;
39
+ 'badge-background-color': string;
40
+ 'badge-text-color': string;
35
41
  };
36
42
  dark: {
37
43
  'font-color': string;
38
44
  'background-base': string;
45
+ 'background-base-2': string;
46
+ 'background-base-3': string;
47
+ 'scrollbar-track': string;
48
+ 'scrollbar-thumb': string;
49
+ 'badge-background-color': string;
50
+ 'badge-text-color': string;
39
51
  };
40
52
  variables: {
41
53
  'default-padding': string;
@@ -53,8 +65,6 @@ declare const initTheme: (theme?: any) => {
53
65
  'font-body4-weight': string;
54
66
  'font-caption-size': string;
55
67
  'font-caption-weight': string;
56
- 'badge-background-color': string;
57
- 'badge-text-color': string;
58
68
  };
59
69
  };
60
70
  };