@zeedhi/common 1.43.1 → 1.45.1
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.
- package/dist/zd-common.esm.js +302 -69
- package/dist/zd-common.umd.js +302 -69
- package/package.json +2 -2
- package/types/components/zd-button-group/button-group.d.ts +1 -1
- package/types/components/zd-carousel/carousel.d.ts +2 -2
- package/types/components/zd-carousel/interfaces.d.ts +1 -1
- package/types/components/zd-collapse-card/collapse-card.d.ts +1 -1
- package/types/components/zd-component/component.d.ts +5 -4
- package/types/components/zd-dashboard/dashboard.d.ts +1 -1
- package/types/components/zd-date/date-range.d.ts +4 -4
- package/types/components/zd-date/date.d.ts +5 -5
- package/types/components/zd-file-input/file-input.d.ts +3 -3
- package/types/components/zd-form/form.d.ts +2 -2
- package/types/components/zd-frame/frame.d.ts +1 -1
- package/types/components/zd-grid/grid-editable.d.ts +6 -6
- package/types/components/zd-grid/grid.d.ts +5 -5
- package/types/components/zd-increment/increment.d.ts +2 -2
- package/types/components/zd-input/input.d.ts +6 -6
- package/types/components/zd-iterable/column.d.ts +2 -0
- package/types/components/zd-iterable/interfaces.d.ts +1 -0
- package/types/components/zd-iterable/iterable-page-component.d.ts +1 -1
- package/types/components/zd-iterable/iterable-page-size.d.ts +2 -2
- package/types/components/zd-iterable/iterable.d.ts +1 -1
- package/types/components/zd-login/login-button.d.ts +1 -1
- package/types/components/zd-master-detail/master-detail.d.ts +1 -1
- package/types/components/zd-menu/menu-group.d.ts +8 -0
- package/types/components/zd-menu/menu-link.d.ts +5 -1
- package/types/components/zd-menu/menu.d.ts +3 -1
- package/types/components/zd-modal/interfaces.d.ts +2 -0
- package/types/components/zd-modal/modal.d.ts +8 -0
- package/types/components/zd-select/select.d.ts +6 -6
- package/types/components/zd-select-multiple/interfaces.d.ts +1 -0
- package/types/components/zd-select-multiple/select-multiple.d.ts +7 -2
- package/types/components/zd-select-tree/select-tree.d.ts +6 -6
- package/types/components/zd-select-tree-multiple/interfaces.d.ts +1 -0
- package/types/components/zd-select-tree-multiple/select-tree-multiple.d.ts +6 -2
- package/types/components/zd-selectable-list/selectable-list.d.ts +1 -1
- package/types/components/zd-svg-map/svg-map.d.ts +1 -1
- package/types/components/zd-tabs/tabs.d.ts +2 -2
- package/types/components/zd-text-input/text-input.d.ts +4 -4
- package/types/components/zd-time/time.d.ts +1 -1
- package/types/components/zd-tree/interfaces.d.ts +4 -0
- package/types/components/zd-tree/tree.d.ts +39 -11
- package/types/components/zd-tree-grid/tree-grid-editable.d.ts +6 -6
- package/types/components/zd-tree-grid/tree-grid.d.ts +2 -2
- package/types/services/zd-loading/loading-service.d.ts +7 -1
- package/types/utils/report/report-type/interfaces.d.ts +1 -0
- package/types/utils/themes/themes.d.ts +8 -2
|
@@ -68,23 +68,23 @@ export declare class TextInput extends Input implements ITextInput {
|
|
|
68
68
|
* @param event DOM event
|
|
69
69
|
* @param element Text input
|
|
70
70
|
*/
|
|
71
|
-
appendIconClick(event: Event, element:
|
|
71
|
+
appendIconClick(event: Event, element: any): void;
|
|
72
72
|
/**
|
|
73
73
|
* Triggered when the appended outer icon is clicked.
|
|
74
74
|
* @param event DOM event
|
|
75
75
|
* @param element Text input
|
|
76
76
|
*/
|
|
77
|
-
appendOuterIconClick(event: Event, element:
|
|
77
|
+
appendOuterIconClick(event: Event, element: any): void;
|
|
78
78
|
/**
|
|
79
79
|
* Triggered when the prepended icon is clicked.
|
|
80
80
|
* @param event DOM event
|
|
81
81
|
* @param element Text input
|
|
82
82
|
*/
|
|
83
|
-
prependIconClick(event: Event, element:
|
|
83
|
+
prependIconClick(event: Event, element: any): void;
|
|
84
84
|
/**
|
|
85
85
|
* Triggered when the prepended outer icon is clicked.
|
|
86
86
|
* @param event DOM event
|
|
87
87
|
* @param element Text input
|
|
88
88
|
*/
|
|
89
|
-
prependOuterIconClick(event: Event, element:
|
|
89
|
+
prependOuterIconClick(event: Event, element: any): void;
|
|
90
90
|
}
|
|
@@ -107,6 +107,6 @@ export declare class Time extends TextInput implements ITime {
|
|
|
107
107
|
isSecondAllowed(value: string): boolean;
|
|
108
108
|
timeValidation(): boolean | string;
|
|
109
109
|
timeAllowedValidation(): boolean | string;
|
|
110
|
-
click(event
|
|
110
|
+
click(event?: Event): void;
|
|
111
111
|
clear(): void;
|
|
112
112
|
}
|
|
@@ -9,6 +9,7 @@ export interface ITreeNodeModel<T> {
|
|
|
9
9
|
isSelected?: boolean;
|
|
10
10
|
isDraggable?: boolean;
|
|
11
11
|
isSelectable?: boolean;
|
|
12
|
+
isChecked?: boolean;
|
|
12
13
|
data?: T;
|
|
13
14
|
}
|
|
14
15
|
export interface ITreeNode<T> extends ITreeNodeModel<T> {
|
|
@@ -43,6 +44,7 @@ export interface ITreeEvents extends IComponentEvents<any> {
|
|
|
43
44
|
onNodeSelect?: IEvent<ITreeSelectEvent> | string;
|
|
44
45
|
onNodeClick?: IEvent<ITreeClickEvent> | string;
|
|
45
46
|
onNodeDblClick?: IEvent<ITreeClickEvent> | string;
|
|
47
|
+
onNodeCheck?: IEvent<ITreeSelectEvent> | string;
|
|
46
48
|
}
|
|
47
49
|
export interface ITree extends IComponentRender {
|
|
48
50
|
nodes?: ITreeNodeModel<IDictionary>[];
|
|
@@ -54,10 +56,12 @@ export interface ITree extends IComponentRender {
|
|
|
54
56
|
allowDragDrop?: boolean;
|
|
55
57
|
afterTitleSlot?: ITreeConditionComponent;
|
|
56
58
|
toolbarSlot?: IComponentRender[];
|
|
59
|
+
titleSlot?: ITreeConditionComponent[];
|
|
57
60
|
events?: ITreeEvents;
|
|
58
61
|
datasource?: IDatasource;
|
|
59
62
|
parentField?: string;
|
|
60
63
|
titleField?: string;
|
|
61
64
|
dataField?: string;
|
|
62
65
|
openLevelOnLoad?: number | boolean;
|
|
66
|
+
checkbox?: boolean;
|
|
63
67
|
}
|
|
@@ -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
|
-
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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
|
}
|
|
@@ -28,7 +28,7 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
|
|
|
28
28
|
doubleClickEdit: boolean;
|
|
29
29
|
protected cancelEditedRowsKeyMapping: any;
|
|
30
30
|
constructor(props: ITreeGridEditable);
|
|
31
|
-
onMounted(element:
|
|
31
|
+
onMounted(element: any): void;
|
|
32
32
|
onBeforeDestroy(): void;
|
|
33
33
|
/**
|
|
34
34
|
* Get Grid columns objects
|
|
@@ -47,7 +47,7 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
|
|
|
47
47
|
* @param event DOM event
|
|
48
48
|
* @param element DOM Element
|
|
49
49
|
*/
|
|
50
|
-
rowClick(row: IDictionary<any>, event: Event, element:
|
|
50
|
+
rowClick(row: IDictionary<any>, event: Event, element: any): void;
|
|
51
51
|
/**
|
|
52
52
|
* Enables editing mode if column is editable
|
|
53
53
|
* @param row Grid row
|
|
@@ -55,8 +55,8 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
|
|
|
55
55
|
* @param event DOM event
|
|
56
56
|
* @param element DOM Element
|
|
57
57
|
*/
|
|
58
|
-
cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element:
|
|
59
|
-
cellClickEvent(row: IDictionary<any>, column: GridColumnEditable, event: Event, element:
|
|
58
|
+
cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element: any): void;
|
|
59
|
+
cellClickEvent(row: IDictionary<any>, column: GridColumnEditable, event: Event, element: any): void;
|
|
60
60
|
/**
|
|
61
61
|
* Dispatches select/unselect event
|
|
62
62
|
* @param row Grid row
|
|
@@ -64,14 +64,14 @@ export declare class TreeGridEditable extends TreeGrid implements ITreeGridEdita
|
|
|
64
64
|
* @param event DOM event
|
|
65
65
|
* @param element DOM Element
|
|
66
66
|
*/
|
|
67
|
-
selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element:
|
|
67
|
+
selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: any): void;
|
|
68
68
|
/**
|
|
69
69
|
* Dispatches select/unselect all rows event
|
|
70
70
|
* @param isSelected Row is selected
|
|
71
71
|
* @param event DOM event
|
|
72
72
|
* @param element DOM Element
|
|
73
73
|
*/
|
|
74
|
-
selectAllClick(isSelected: boolean, event
|
|
74
|
+
selectAllClick(isSelected: boolean, event?: Event, element?: any): void;
|
|
75
75
|
/**
|
|
76
76
|
* Returns editable component properties based on the column definition
|
|
77
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:
|
|
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:
|
|
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
|
|
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.
|
|
@@ -32,14 +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;
|
|
35
37
|
'scrollbar-track': string;
|
|
36
38
|
'scrollbar-thumb': string;
|
|
39
|
+
'badge-background-color': string;
|
|
40
|
+
'badge-text-color': string;
|
|
37
41
|
};
|
|
38
42
|
dark: {
|
|
39
43
|
'font-color': string;
|
|
40
44
|
'background-base': string;
|
|
45
|
+
'background-base-2': string;
|
|
46
|
+
'background-base-3': string;
|
|
41
47
|
'scrollbar-track': string;
|
|
42
48
|
'scrollbar-thumb': string;
|
|
49
|
+
'badge-background-color': string;
|
|
50
|
+
'badge-text-color': string;
|
|
43
51
|
};
|
|
44
52
|
variables: {
|
|
45
53
|
'default-padding': string;
|
|
@@ -57,8 +65,6 @@ declare const initTheme: (theme?: any) => {
|
|
|
57
65
|
'font-body4-weight': string;
|
|
58
66
|
'font-caption-size': string;
|
|
59
67
|
'font-caption-weight': string;
|
|
60
|
-
'badge-background-color': string;
|
|
61
|
-
'badge-text-color': string;
|
|
62
68
|
};
|
|
63
69
|
};
|
|
64
70
|
};
|