@zeedhi/common 1.55.1 → 1.57.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/LICENSE +23 -23
- package/README.md +9 -9
- package/dist/zd-common.esm.js +8595 -8462
- package/dist/zd-common.umd.js +8594 -8461
- 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 +7 -0
- package/types/components/zd-grid/grid-column.d.ts +6 -2
- 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 +4 -0
- 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.57.1",
|
|
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": "c77cf358d4514a7230f8c85515eba42ef015cf55"
|
|
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,10 +70,17 @@ 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
|
+
*/
|
|
73
76
|
events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
74
77
|
directives?: import("..").IComponentDirectives | undefined;
|
|
75
78
|
isVisible?: string | boolean | undefined;
|
|
76
79
|
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
|
+
*/
|
|
77
84
|
light?: boolean | undefined;
|
|
78
85
|
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
79
86
|
name: string;
|
|
@@ -18,6 +18,9 @@ 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
|
+
*/
|
|
21
24
|
componentId?: number | undefined;
|
|
22
25
|
cssClass?: string | undefined;
|
|
23
26
|
cssStyle?: string | object | undefined;
|
|
@@ -26,11 +29,12 @@ export declare class GridColumn extends Column implements IGridColumn {
|
|
|
26
29
|
isVisible?: string | boolean | undefined;
|
|
27
30
|
dark?: boolean | undefined;
|
|
28
31
|
light?: boolean | undefined;
|
|
29
|
-
|
|
30
|
-
name: string; /**
|
|
32
|
+
/**
|
|
31
33
|
* Creates a new Grid Column.
|
|
32
34
|
* @param props Grid column properties
|
|
33
35
|
*/
|
|
36
|
+
keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
37
|
+
name: string;
|
|
34
38
|
parent?: import("..").Component | undefined;
|
|
35
39
|
}[];
|
|
36
40
|
/**
|
|
@@ -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
|
|
@@ -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
|
}
|