@zeedhi/common 1.109.0 → 1.109.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 +281 -174
- package/dist/zd-common.umd.js +281 -174
- package/package.json +2 -2
- package/types/components/zd-grid/grid-editable.d.ts +1 -0
- package/types/components/zd-iterable/column.d.ts +5 -0
- package/types/components/zd-select-multiple/select-multiple.d.ts +1 -4
- package/types/components/zd-select-tree/interfaces.d.ts +1 -0
- package/types/components/zd-select-tree/select-tree.d.ts +10 -1
- package/types/components/zd-select-tree-multiple/select-tree-multiple.d.ts +35 -4
- package/types/formatters/column-zdselect.d.ts +1 -0
- package/types/formatters/column-zdselectmultiple.d.ts +1 -0
- package/types/formatters/index.d.ts +2 -0
- package/types/index.d.ts +1 -0
|
@@ -26,6 +26,7 @@ export declare class SelectMultiple extends Select implements ISelectMultiple {
|
|
|
26
26
|
limit: number | null;
|
|
27
27
|
showSelectAll: boolean;
|
|
28
28
|
showCheckboxAll: boolean;
|
|
29
|
+
protected formatterFn: Function;
|
|
29
30
|
/**
|
|
30
31
|
* Create a new Select.
|
|
31
32
|
* @param props Select properties
|
|
@@ -78,10 +79,6 @@ export declare class SelectMultiple extends Select implements ISelectMultiple {
|
|
|
78
79
|
* Removes unselected inserts from datasource
|
|
79
80
|
*/
|
|
80
81
|
private removeInserts;
|
|
81
|
-
/**
|
|
82
|
-
* Return formatted dataText and values
|
|
83
|
-
*/
|
|
84
|
-
formatter(value: IDictionary<any>[]): any;
|
|
85
82
|
/**
|
|
86
83
|
* Returns the text shown when there's one or more selected items that doesn't fit in the input
|
|
87
84
|
*/
|
|
@@ -11,6 +11,7 @@ export interface ISelectTreeNode<T> {
|
|
|
11
11
|
isDefaultExpanded?: boolean;
|
|
12
12
|
children?: ISelectTreeNode<T>[] | null;
|
|
13
13
|
row?: IDictionary<any>;
|
|
14
|
+
isMatched?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export interface ISelectTree extends ITextInput, ISelectDataValueOut {
|
|
16
17
|
nodes?: ISelectTreeNode<IDictionary>[];
|
|
@@ -116,11 +116,20 @@ export declare class SelectTree extends TextInput implements ISelectTree {
|
|
|
116
116
|
* Defines the name of the form target to set using dataValueOut
|
|
117
117
|
*/
|
|
118
118
|
dataValueOutFormName: string;
|
|
119
|
+
private discreteProps?;
|
|
120
|
+
protected formatterFn: Function;
|
|
119
121
|
/**
|
|
120
122
|
* Creates a new instance of SelectTree
|
|
121
123
|
* @param props
|
|
122
124
|
*/
|
|
123
125
|
constructor(props: ISelectTree);
|
|
126
|
+
/**
|
|
127
|
+
* Returns the currentRow in the dataText key
|
|
128
|
+
*/
|
|
129
|
+
formatter(value?: string | IDictionary<any>, props?: {
|
|
130
|
+
dataText: string | any[];
|
|
131
|
+
dataTextSeparator: string;
|
|
132
|
+
}): any;
|
|
124
133
|
focus(event: Event, element: any): Promise<void>;
|
|
125
134
|
protected afterFocus(): Promise<void>;
|
|
126
135
|
private createDataStructure;
|
|
@@ -128,7 +137,6 @@ export declare class SelectTree extends TextInput implements ISelectTree {
|
|
|
128
137
|
createNodesFromDatasource(buildTree?: boolean): void;
|
|
129
138
|
private createNodeFromRow;
|
|
130
139
|
private createChildrenNodes;
|
|
131
|
-
private formatRow;
|
|
132
140
|
/**
|
|
133
141
|
* Triggered when the menu opens
|
|
134
142
|
*/
|
|
@@ -142,6 +150,7 @@ export declare class SelectTree extends TextInput implements ISelectTree {
|
|
|
142
150
|
*/
|
|
143
151
|
select(node: ISelectTreeNode<IDictionary>, element?: any): void;
|
|
144
152
|
private savedNodes?;
|
|
153
|
+
search: string;
|
|
145
154
|
/**
|
|
146
155
|
* Triggered after the search query changes
|
|
147
156
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IDictionary } from '@zeedhi/core';
|
|
2
2
|
import { SelectTree } from '../zd-select-tree/select-tree';
|
|
3
3
|
import { ISelectTreeMultiple, ISelectTreeMultipleNode, ISelectTreeMultipleEvents } from './interfaces';
|
|
4
|
+
import { ISelectTreeNode } from '../zd-select-tree/interfaces';
|
|
4
5
|
/**
|
|
5
6
|
* Base class for Select Tree Multiple component.
|
|
6
7
|
*/
|
|
@@ -46,11 +47,41 @@ export declare class SelectTreeMultiple extends SelectTree implements ISelectTre
|
|
|
46
47
|
get value(): any;
|
|
47
48
|
set value(value: any);
|
|
48
49
|
setValue(value: any): void;
|
|
49
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves all nodes in the tree as a flat array. Nodes that are not matched are excluded
|
|
52
|
+
* Nodes that are not matched but whose parent is matched are included
|
|
53
|
+
* @param nodes
|
|
54
|
+
* @param matched defines whether the parent of the current node branch is matched
|
|
55
|
+
* @returns all nodes in the tree as a flat array, filtering unmatched nodes
|
|
56
|
+
*/
|
|
57
|
+
getAllNodes(nodes?: ISelectTreeNode<IDictionary<any>>[], matched?: boolean): ISelectTreeNode<IDictionary<any>>[];
|
|
50
58
|
/**
|
|
51
59
|
* Dispatches select/unselect event
|
|
52
60
|
*/
|
|
53
|
-
onSelectAll(isSelected: boolean, event: Event, element: any): void;
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
onSelectAll(isSelected: boolean, event: Event, element: any, nodes?: ISelectTreeNode<IDictionary<any>>[]): void;
|
|
62
|
+
/**
|
|
63
|
+
* Selects all items in the tree \
|
|
64
|
+
* If the component is fetchOnDemand, it will select all values from datasource.data \
|
|
65
|
+
* If not, it will select all nodes from the tree, unless the nodes to be selected are specified
|
|
66
|
+
* @param nodes nodes to be selected. These are the nodes that are currently visible in the tree
|
|
67
|
+
* (if the user is searching, selects only the searched nodes)
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
selectAllItems(nodes?: ISelectTreeNode<IDictionary<any>>[]): void;
|
|
71
|
+
/**
|
|
72
|
+
* Unelects all items in the tree \
|
|
73
|
+
* If the component is fetchOnDemand, it will select all values from datasource.data \
|
|
74
|
+
* If not, it will select all nodes from the tree, unless the nodes to be selected are specified
|
|
75
|
+
* @param nodes nodes to be selected. These are the nodes that are currently visible in the tree
|
|
76
|
+
* (if the user is searching, selects only the searched nodes)
|
|
77
|
+
* @returns
|
|
78
|
+
*/
|
|
79
|
+
unSelectAllItems(nodes?: ISelectTreeNode<IDictionary<any>>[]): void;
|
|
80
|
+
/**
|
|
81
|
+
* Takes two arrays and creates a map of the unique values
|
|
82
|
+
* @returns map of a merge between the two arrays, removing duplicates
|
|
83
|
+
*/
|
|
84
|
+
private createMergeMap;
|
|
85
|
+
getValueIds(): any;
|
|
86
|
+
getValueAsObject(): any;
|
|
56
87
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|