@zeedhi/common 1.56.0 → 1.58.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.
- package/LICENSE +23 -23
- package/README.md +9 -9
- package/dist/zd-common.esm.js +4137 -4023
- package/dist/zd-common.umd.js +4136 -4022
- package/package.json +2 -2
- package/rollup.scss.config.js +14 -14
- package/tsconfig.eslint.json +8 -8
- package/types/components/zd-form/form.d.ts +0 -7
- package/types/components/zd-grid/grid-column.d.ts +2 -6
- package/types/components/zd-grid/grid-editable.d.ts +10 -4
- package/types/components/zd-grid/grid.d.ts +1 -1
- package/types/components/zd-iterable/column.d.ts +3 -2
- package/types/components/zd-iterable/interfaces.d.ts +2 -0
- package/types/components/zd-iterable/iterable-controller.d.ts +1 -1
- package/types/components/zd-iterable/iterable.d.ts +5 -0
- package/types/components/zd-select-multiple/interfaces.d.ts +1 -0
- package/types/components/zd-select-multiple/select-multiple.d.ts +5 -1
- package/types/components/zd-tree-grid/interfaces.d.ts +1 -0
- package/types/components/zd-tree-grid/tree-grid.d.ts +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.0",
|
|
4
4
|
"description": "Zeedhi Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"lodash.times": "^4.3.2",
|
|
38
38
|
"mockdate": "^3.0.2"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "8d8d49f8a582b003f4c86d0c7849e839f88f1c13"
|
|
41
41
|
}
|
package/rollup.scss.config.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import scss from 'rollup-plugin-scss';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
input: './src/styles/index.scss',
|
|
5
|
-
output: {
|
|
6
|
-
format: 'esm',
|
|
7
|
-
},
|
|
8
|
-
plugins: [
|
|
9
|
-
scss({
|
|
10
|
-
output: 'dist/style.css',
|
|
11
|
-
outputStyle: 'compressed',
|
|
12
|
-
}),
|
|
13
|
-
],
|
|
14
|
-
};
|
|
1
|
+
import scss from 'rollup-plugin-scss';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
input: './src/styles/index.scss',
|
|
5
|
+
output: {
|
|
6
|
+
format: 'esm',
|
|
7
|
+
},
|
|
8
|
+
plugins: [
|
|
9
|
+
scss({
|
|
10
|
+
output: 'dist/style.css',
|
|
11
|
+
outputStyle: 'compressed',
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
14
|
+
};
|
package/tsconfig.eslint.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
// extend your base config so you don't have to redefine your compilerOptions
|
|
3
|
-
"extends": "./tsconfig.json",
|
|
4
|
-
"include": [
|
|
5
|
-
"./src/**/*.ts",
|
|
6
|
-
"./tests/**/*.ts",
|
|
7
|
-
],
|
|
8
|
-
"exclude": ["node_modules"]
|
|
1
|
+
{
|
|
2
|
+
// extend your base config so you don't have to redefine your compilerOptions
|
|
3
|
+
"extends": "./tsconfig.json",
|
|
4
|
+
"include": [
|
|
5
|
+
"./src/**/*.ts",
|
|
6
|
+
"./tests/**/*.ts",
|
|
7
|
+
],
|
|
8
|
+
"exclude": ["node_modules"]
|
|
9
9
|
}
|
|
@@ -70,17 +70,10 @@ export declare class Form extends ComponentRender implements IForm {
|
|
|
70
70
|
componentId?: number | undefined;
|
|
71
71
|
cssClass?: string | undefined;
|
|
72
72
|
cssStyle?: string | object | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Children component structure if the component has children.
|
|
75
|
-
*/
|
|
76
73
|
events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
77
74
|
directives?: import("..").IComponentDirectives | undefined;
|
|
78
75
|
isVisible?: string | boolean | undefined;
|
|
79
76
|
dark?: boolean | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* Applies the align-items css property.
|
|
82
|
-
* Available options are start, center, end, space-between, space-around and stretch.
|
|
83
|
-
*/
|
|
84
77
|
light?: boolean | undefined;
|
|
85
78
|
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
86
79
|
name: string;
|
|
@@ -18,9 +18,6 @@ export declare class GridColumn extends Column implements IGridColumn {
|
|
|
18
18
|
[key: string]: any;
|
|
19
19
|
children?: import("..").IComponentRender[] | undefined;
|
|
20
20
|
component: string;
|
|
21
|
-
/**
|
|
22
|
-
* Base class for Grid column
|
|
23
|
-
*/
|
|
24
21
|
componentId?: number | undefined;
|
|
25
22
|
cssClass?: string | undefined;
|
|
26
23
|
cssStyle?: string | object | undefined;
|
|
@@ -29,12 +26,11 @@ export declare class GridColumn extends Column implements IGridColumn {
|
|
|
29
26
|
isVisible?: string | boolean | undefined;
|
|
30
27
|
dark?: boolean | undefined;
|
|
31
28
|
light?: boolean | undefined;
|
|
32
|
-
|
|
29
|
+
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
30
|
+
name: string; /**
|
|
33
31
|
* Creates a new Grid Column.
|
|
34
32
|
* @param props Grid column properties
|
|
35
33
|
*/
|
|
36
|
-
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
37
|
-
name: string;
|
|
38
34
|
parent?: import("..").Component | undefined;
|
|
39
35
|
}[];
|
|
40
36
|
/**
|
|
@@ -122,7 +122,7 @@ export declare class GridEditable extends Grid implements IGridEditable {
|
|
|
122
122
|
* @param column Column
|
|
123
123
|
* @param row Row
|
|
124
124
|
*/
|
|
125
|
-
isValid(column: IGridColumnEditable, row: IDictionary): boolean;
|
|
125
|
+
isValid(column: IGridColumnEditable, row: IDictionary, revalidate?: boolean): boolean;
|
|
126
126
|
private newRowIdentifier;
|
|
127
127
|
/**
|
|
128
128
|
* Cancels all edited rows and enable grid components
|
|
@@ -132,15 +132,21 @@ export declare class GridEditable extends Grid implements IGridEditable {
|
|
|
132
132
|
private addDataRow;
|
|
133
133
|
/**
|
|
134
134
|
* Saves all edited rows if they are valid
|
|
135
|
+
* @param revalidate Defines if the fields should be revalidated
|
|
135
136
|
* @throws Will throw when it finds an invalid row
|
|
136
137
|
*/
|
|
137
|
-
saveEditedRows(): Promise<void[]>;
|
|
138
|
+
saveEditedRows(revalidate?: boolean): Promise<void[]>;
|
|
138
139
|
/**
|
|
139
140
|
* Retrieves all edited rows if they are valid
|
|
141
|
+
* @param revalidate Defines if the fields should be revalidated
|
|
140
142
|
* @throws Will throw when it finds an invalid row
|
|
141
143
|
*/
|
|
142
|
-
getEditedRows(): IDictionary<any>[];
|
|
143
|
-
|
|
144
|
+
getEditedRows(revalidate?: boolean): IDictionary<any>[];
|
|
145
|
+
/**
|
|
146
|
+
* Checks whether the grid is valid or not
|
|
147
|
+
* @param revalidate Defines if the fields should be revalidated
|
|
148
|
+
*/
|
|
149
|
+
isGridValid(revalidate?: boolean): boolean;
|
|
144
150
|
/**
|
|
145
151
|
* Adds new row to the datasource data and pushes it to the editedRows
|
|
146
152
|
* @param row Row
|
|
@@ -175,6 +175,6 @@ export declare class Grid extends Iterable implements IGrid {
|
|
|
175
175
|
protected navigatePageDown(): void;
|
|
176
176
|
deleteRows(): Promise<any[]>;
|
|
177
177
|
getActionComponent(actionComponent: IComponent, column: GridColumn, row: IDictionary, parentPath?: string): IComponent;
|
|
178
|
-
protected changeDefaultSlotNames(slot: IComponentRender[]):
|
|
178
|
+
protected changeDefaultSlotNames(slot: IComponentRender[]): any;
|
|
179
179
|
callDisableSelection(row: IDictionary<any>): boolean;
|
|
180
180
|
}
|
|
@@ -7,8 +7,9 @@ import { Component } from '../zd-component/component';
|
|
|
7
7
|
export declare class Column extends Component implements IColumn {
|
|
8
8
|
align: ColumnAlign;
|
|
9
9
|
label: string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
width?: string;
|
|
11
|
+
maxWidth?: string;
|
|
12
|
+
minWidth?: string;
|
|
12
13
|
mask: string;
|
|
13
14
|
type?: ColumnType;
|
|
14
15
|
sortable: boolean;
|
|
@@ -11,6 +11,7 @@ export declare type ColumnType = 'action';
|
|
|
11
11
|
export interface IColumn extends IComponent {
|
|
12
12
|
align?: ColumnAlign;
|
|
13
13
|
label?: string;
|
|
14
|
+
width?: string;
|
|
14
15
|
maxWidth?: string;
|
|
15
16
|
minWidth?: string;
|
|
16
17
|
overflow?: string | number;
|
|
@@ -29,6 +30,7 @@ export interface IIterable extends IComponentRender {
|
|
|
29
30
|
datasource?: IDatasource;
|
|
30
31
|
pageSizes?: string[];
|
|
31
32
|
virtualScroll?: boolean;
|
|
33
|
+
searchVisibleOnly?: boolean;
|
|
32
34
|
}
|
|
33
35
|
export interface IIterablePageComponent extends IComponentRender {
|
|
34
36
|
iterableComponentName?: string;
|
|
@@ -36,6 +36,11 @@ export declare class Iterable extends ComponentRender implements IIterable {
|
|
|
36
36
|
* Dictionary of prop pointing to the condition (applied) return value
|
|
37
37
|
*/
|
|
38
38
|
actionsApplied: IDictionary<IDictionary<IDictionary<any>>>;
|
|
39
|
+
/**
|
|
40
|
+
* Defines if searchIn should consider only visible columns or not
|
|
41
|
+
*/
|
|
42
|
+
searchVisibleOnly: boolean;
|
|
43
|
+
defaultSearchVisibleOnly: boolean;
|
|
39
44
|
/**
|
|
40
45
|
* Creates a new Iterable.
|
|
41
46
|
* @param props Iterable properties
|
|
@@ -6,7 +6,7 @@ export declare class SelectMultiple extends Select implements ISelectMultiple {
|
|
|
6
6
|
/**
|
|
7
7
|
* Selected items that were added to datasource
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
insertedValues: IDictionary<any>[];
|
|
10
10
|
/**
|
|
11
11
|
* Inserted values that were unselected
|
|
12
12
|
*/
|
|
@@ -19,6 +19,10 @@ export declare class SelectMultiple extends Select implements ISelectMultiple {
|
|
|
19
19
|
* Max number of rows the component can have
|
|
20
20
|
*/
|
|
21
21
|
maxRows?: string | number;
|
|
22
|
+
/**
|
|
23
|
+
* Limit the display of selected options. The rest will be hidden within the 'limitText' string
|
|
24
|
+
*/
|
|
25
|
+
limit: number | null;
|
|
22
26
|
protected afterFocus(): Promise<void>;
|
|
23
27
|
private setCache;
|
|
24
28
|
showSelectAll: boolean;
|
|
@@ -31,6 +31,10 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
|
|
|
31
31
|
* Tree data structure
|
|
32
32
|
*/
|
|
33
33
|
treeDataStructure: TreeDataStructure;
|
|
34
|
+
/**
|
|
35
|
+
* Even though all children are selected, the parent node is not
|
|
36
|
+
*/
|
|
37
|
+
flat: boolean;
|
|
34
38
|
viewUpdateScrollData?: () => void;
|
|
35
39
|
/**
|
|
36
40
|
* Creates a new Tree Grid.
|
|
@@ -43,6 +47,17 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
|
|
|
43
47
|
* Build tree data
|
|
44
48
|
*/
|
|
45
49
|
buildTree(doGet?: boolean): void;
|
|
50
|
+
/**
|
|
51
|
+
* This function takes an array of objects and updates the data in the tree.
|
|
52
|
+
* @param {IDictionary<any>[]} data - The data to be displayed in the tree.
|
|
53
|
+
*/
|
|
54
|
+
updateData(data: IDictionary<any>[]): void;
|
|
55
|
+
/**
|
|
56
|
+
* The function deletes the selected rows from the database and then rebuilds the
|
|
57
|
+
* tree.
|
|
58
|
+
* @returns The response is an array of promises.
|
|
59
|
+
*/
|
|
60
|
+
deleteRows(): Promise<any[]>;
|
|
46
61
|
/**
|
|
47
62
|
* Expands or collapses a row
|
|
48
63
|
* @param row Row object
|
|
@@ -69,12 +84,23 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
|
|
|
69
84
|
* Navigate downwards
|
|
70
85
|
*/
|
|
71
86
|
protected navigateDown(): void;
|
|
87
|
+
private removeDuplicates;
|
|
72
88
|
/**
|
|
73
89
|
* Select/deselect rows
|
|
74
90
|
* @param row selected row
|
|
75
91
|
* @param isSelected row is selected
|
|
76
92
|
*/
|
|
77
93
|
selectRow(row: IDictionary<any>, isSelected: boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
* Select children rows
|
|
96
|
+
* @param row Row to unselect children
|
|
97
|
+
*/
|
|
98
|
+
selectChildren(row: IDictionary<any>): void;
|
|
99
|
+
/**
|
|
100
|
+
* Unselect children rows
|
|
101
|
+
* @param row Row to select children
|
|
102
|
+
*/
|
|
103
|
+
unselectChildren(row: IDictionary<any>): void;
|
|
78
104
|
private selectParents;
|
|
79
105
|
private unselectParents;
|
|
80
106
|
}
|