@zeedhi/teknisa-components-common 1.107.1 → 1.108.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 +21 -21
- package/README.md +7 -7
- package/coverage/clover.xml +772 -692
- package/coverage/coverage-final.json +47 -47
- package/coverage/lcov-report/index.html +15 -15
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +2 -2
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +2 -2
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +7 -7
- package/coverage/lcov-report/tests/__helpers__/index.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +1 -1
- package/coverage/lcov.info +1459 -1275
- package/dist/tek-components-common.esm.js +375 -252
- package/dist/tek-components-common.umd.js +375 -252
- package/jest.config.js +1 -1
- package/package.json +2 -2
- package/tests/__helpers__/component-event-helper.ts +5 -5
- package/tests/__helpers__/flush-promises-helper.ts +3 -3
- package/tests/__helpers__/get-child-helper.ts +27 -27
- package/tests/__helpers__/index.ts +3 -3
- package/tests/__helpers__/mock-created-helper.ts +12 -12
- package/tests/__mocks__/@zeedhi/core/i18n.js +74 -74
- package/tests/__mocks__/@zeedhi/core.js +4 -4
- package/tests/unit/components/crud/crud-add-button.spec.ts +56 -56
- package/tests/unit/components/crud/crud-button.spec.ts +94 -94
- package/tests/unit/components/crud/crud-cancel-button.spec.ts +91 -91
- package/tests/unit/components/crud/crud-delete-button.spec.ts +122 -122
- package/tests/unit/components/crud/crud-form.spec.ts +165 -165
- package/tests/unit/components/crud/crud-save-button.spec.ts +118 -118
- package/tests/unit/components/tek-breadcrumb-header/tek-breadcrumb-header.spec.ts +42 -42
- package/tests/unit/components/tek-card-title/CardTitle.spec.ts +34 -34
- package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +470 -470
- package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +364 -364
- package/tests/unit/components/tek-drag-grid/tek-drag-grid.spec.ts +112 -112
- package/tests/unit/components/tek-grid/filter-helper.spec.ts +148 -148
- package/tests/unit/components/tek-grid/grid-column.spec.ts +270 -270
- package/tests/unit/components/tek-grid/grid-columns-button.spec.ts +195 -195
- package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +967 -967
- package/tests/unit/components/tek-grid/grid.spec.ts +3340 -3116
- package/tests/unit/components/tek-grid/layout_options.spec.ts +980 -980
- package/tests/unit/components/tek-image/Image.spec.ts +67 -67
- package/tests/unit/components/tek-iterable-carousel/iterable-carousel.spec.ts +37 -37
- package/tests/unit/components/tek-iterable-component-render/iterable-component-render.spec.ts +200 -200
- package/tests/unit/components/tek-loading/Loading.spec.ts +30 -30
- package/tests/unit/components/tek-notifications/notifications.spec.ts +201 -201
- package/tests/unit/components/tek-product-card/product-card.spec.ts +61 -61
- package/tests/unit/components/tek-user-info/TekUserInfoContoller.spec.ts +220 -220
- package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +86 -86
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +430 -430
- package/tests/unit/components/tree-grid/tree-grid.spec.ts +776 -776
- package/tests/unit/utils/grid-base/delete-rows-error.spec.ts +24 -0
- package/tests/unit/utils/grid-base/export-options/button-option.spec.ts +44 -44
- package/tests/unit/utils/grid-base/export-options/multi-option.spec.ts +135 -135
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +267 -174
- package/tests/unit/utils/report-filter/report-filter.spec.ts +66 -66
- package/tsconfig.eslint.json +8 -8
- package/types/components/tek-datasource/memory-datasource.d.ts +2 -4
- package/types/components/tek-datasource/rest-datasource.d.ts +6 -3
- package/types/components/tek-grid/grid.d.ts +50 -6
- package/types/components/tek-grid/interfaces.d.ts +5 -3
- package/types/components/tek-tree-grid/tree-grid.d.ts +5 -1
- package/types/utils/grid-base/grid-base.d.ts +12 -229
- package/types/utils/grid-base/grid-controller.d.ts +1 -3
- package/types/components/tek-ag-grid/default-icons.d.ts +0 -53
- package/types/components/tek-ag-grid/interfaces.d.ts +0 -9
- package/types/components/tek-ag-grid/tek-ag-grid.d.ts +0 -35
- package/types/components/tek-datasource/datasource.d.ts +0 -94
- package/types/components/tek-grid/default-icons.d.ts +0 -53
- package/types/components/tek-grid/filter-dynamic-values.d.ts +0 -9
- package/types/components/tek-grid/grid-controller.d.ts +0 -19
- package/types/components/tek-grid/grid_column.d.ts +0 -14
- package/types/components/tek-grid/grid_controller.d.ts +0 -15
- package/types/components/tek-grid/tek-grid.d.ts +0 -35
- package/types/components/tek-login/interfaces.d.ts +0 -3
- package/types/components/tek-login/login-children.d.ts +0 -3
- package/types/components/tek-login/login.d.ts +0 -58
- package/types/components/tek-login/login_children.d.ts +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { GridEditable, IComponentRender } from '@zeedhi/common';
|
|
1
|
+
import { GridEditable, IComponentRender, IGridColumnEditable, Input } from '@zeedhi/common';
|
|
2
2
|
import { Datasource, IDictionary, IEventParam } from '@zeedhi/core';
|
|
3
3
|
import { ITekGridAtoms } from '../../utils';
|
|
4
4
|
import { TekGridColumn } from './grid-column';
|
|
5
|
-
import { IGroupedData, IModalFilterProps, ITekGrid, ITekGridColumn, ITekGridEvents, ITekGridExportConfig } from './interfaces';
|
|
5
|
+
import { IGroupedData, IModalFilterProps, ITekGrid, ITekGridColumn, ITekGridEvents, ITekGridExportConfig, ITekGridGroup, ITekGridGroupFooter } from './interfaces';
|
|
6
6
|
import { TekGridLayoutOptions } from './layout-options';
|
|
7
7
|
export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
8
8
|
title: string;
|
|
@@ -22,6 +22,10 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
24
|
dragColumns: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Components that will be rendered on toolbar slot
|
|
27
|
+
*/
|
|
28
|
+
toolbarConfig: (IComponentRender | string)[];
|
|
25
29
|
/**
|
|
26
30
|
* Enables column resizing
|
|
27
31
|
* @public
|
|
@@ -65,8 +69,8 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
65
69
|
groupColumnNames: string[];
|
|
66
70
|
summaryColumns: TekGridColumn[];
|
|
67
71
|
groupColumns: TekGridColumn[];
|
|
68
|
-
groupedData: IGroupedData[];
|
|
69
72
|
private toolbarSlotProps;
|
|
73
|
+
groupedData: IGroupedData[];
|
|
70
74
|
viewUpdateScrollData?: () => void;
|
|
71
75
|
private gridBase;
|
|
72
76
|
filterRelationsDatasource: Datasource;
|
|
@@ -129,12 +133,39 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
129
133
|
private initSummaryColumns;
|
|
130
134
|
private addGroupHeader;
|
|
131
135
|
private addGroupFooters;
|
|
136
|
+
/**
|
|
137
|
+
* Creates a group footer, calculating its summary data
|
|
138
|
+
* @param group Group to which this footer is related
|
|
139
|
+
* @param groupIndex Index of the group
|
|
140
|
+
* @returns new group footer
|
|
141
|
+
*/
|
|
142
|
+
getGroupFooter(group: ITekGridGroup, groupIndex: number): ITekGridGroupFooter;
|
|
143
|
+
/**
|
|
144
|
+
* Gets all of the group headers that belong to the group at the specified index
|
|
145
|
+
* This method should be called only during the groups creation process because it depends on the
|
|
146
|
+
* group creation order (because it accesses lastGroupHeaderRow that changes during the creation process)
|
|
147
|
+
* @param groupIndex
|
|
148
|
+
* @returns
|
|
149
|
+
*/
|
|
150
|
+
private getGroupHeaders;
|
|
151
|
+
/**
|
|
152
|
+
* Updates all footers summary data and the summary total
|
|
153
|
+
*/
|
|
154
|
+
updateSummary(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Takes a group footer and updates its summary data
|
|
157
|
+
*/
|
|
158
|
+
private updateGroupFooterSummary;
|
|
159
|
+
/**
|
|
160
|
+
* Updates the total summary data
|
|
161
|
+
*/
|
|
162
|
+
private updateSummaryTotal;
|
|
132
163
|
private resetFooterVariables;
|
|
133
164
|
private isUndefined;
|
|
134
165
|
private calcSummaryValues;
|
|
135
166
|
private calcSummary;
|
|
136
|
-
private
|
|
137
|
-
private
|
|
167
|
+
private getSummary;
|
|
168
|
+
private getSummaryData;
|
|
138
169
|
openGroup(group: IDictionary<any>): void;
|
|
139
170
|
isItemVisible(row: IDictionary<any>): any;
|
|
140
171
|
private getGroupValue;
|
|
@@ -172,7 +203,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
172
203
|
*/
|
|
173
204
|
selectGroupClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: HTMLElement): void;
|
|
174
205
|
getAtomInstance<T>(key: keyof ITekGridAtoms): T;
|
|
175
|
-
getFilterInputs(columnName?: string):
|
|
206
|
+
getFilterInputs(columnName?: string): Input[];
|
|
176
207
|
isColumnSearchable(column: TekGridColumn): boolean;
|
|
177
208
|
getColumn(name: string): TekGridColumn;
|
|
178
209
|
/**
|
|
@@ -214,8 +245,21 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
214
245
|
* Checks if a row is a group header, adding typescript type-checking
|
|
215
246
|
*/
|
|
216
247
|
private isGroupHeader;
|
|
248
|
+
/**
|
|
249
|
+
* Checks if a row is a group footer, adding typescript type-checking
|
|
250
|
+
*/
|
|
251
|
+
private isGroupFooter;
|
|
252
|
+
/**
|
|
253
|
+
* Checks if a row is a summary, adding typescript type-checking
|
|
254
|
+
*/
|
|
255
|
+
private isGroupSummary;
|
|
217
256
|
/**
|
|
218
257
|
* Checks if a row is the last grouping of the grid (the most internal grouping)
|
|
219
258
|
*/
|
|
220
259
|
private isLastGrouping;
|
|
260
|
+
/**
|
|
261
|
+
* change event of editable components
|
|
262
|
+
* - override to call updateSummary on change
|
|
263
|
+
*/
|
|
264
|
+
protected changeEditableComponent(column: IGridColumnEditable, row: IDictionary<any>, value: any, component?: Input): void;
|
|
221
265
|
}
|
|
@@ -184,16 +184,18 @@ export interface ITekGridGroupFooter {
|
|
|
184
184
|
groupHeaders: ITekGridGroupHeader[];
|
|
185
185
|
groupLabel: string;
|
|
186
186
|
groupValue: any;
|
|
187
|
+
[key: string]: any;
|
|
187
188
|
}
|
|
189
|
+
export declare type ITekGridSummaryTotal = ITekGridGroupFooter & {
|
|
190
|
+
[key: string]: any;
|
|
191
|
+
};
|
|
188
192
|
export declare type IGroupedData = (ITekGridGroupHeader & {
|
|
189
193
|
[key: string]: any;
|
|
190
194
|
}) | {
|
|
191
195
|
[key: string]: any;
|
|
192
196
|
groupFooter: boolean;
|
|
193
197
|
groupSummary: boolean;
|
|
194
|
-
} |
|
|
195
|
-
[key: string]: any;
|
|
196
|
-
}) | {
|
|
198
|
+
} | ITekGridSummaryTotal | {
|
|
197
199
|
[key: string]: any;
|
|
198
200
|
groupHeaders: ITekGridGroupHeader[];
|
|
199
201
|
};
|
|
@@ -8,6 +8,10 @@ import { TekGridLayoutOptions } from '..';
|
|
|
8
8
|
export declare class TekTreeGrid extends TreeGridEditable implements ITekTreeGrid {
|
|
9
9
|
title: string;
|
|
10
10
|
addButton: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Components that will be rendered on toolbar slot
|
|
13
|
+
*/
|
|
14
|
+
toolbarConfig: (IComponentRender | string)[];
|
|
11
15
|
showEditButtons: boolean;
|
|
12
16
|
deleteButton: 'none' | 'currentRow' | 'selection';
|
|
13
17
|
actions: IComponentRender[];
|
|
@@ -55,11 +59,11 @@ export declare class TekTreeGrid extends TreeGridEditable implements ITekTreeGri
|
|
|
55
59
|
* Export config
|
|
56
60
|
*/
|
|
57
61
|
exportConfig: ITekGridExportConfig[];
|
|
62
|
+
private toolbarSlotProps;
|
|
58
63
|
/**
|
|
59
64
|
* Actions to overwrite the default export config
|
|
60
65
|
*/
|
|
61
66
|
exportActions?: IComponentRender[];
|
|
62
|
-
private toolbarSlotProps;
|
|
63
67
|
private gridBase;
|
|
64
68
|
filterRelationsDatasource: Datasource;
|
|
65
69
|
filterOperationsDatasource: Datasource;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IComponentRender } from '@zeedhi/common';
|
|
2
|
-
import { IEventParam } from '@zeedhi/core';
|
|
3
2
|
import { TekGrid, TekGridFilterButton, TekTreeGrid } from '../../components';
|
|
4
3
|
export interface ITekGridAtoms {
|
|
5
4
|
TITLE: string;
|
|
@@ -23,237 +22,21 @@ export interface ITekGridAtoms {
|
|
|
23
22
|
export declare class GridBase {
|
|
24
23
|
private grid;
|
|
25
24
|
private exportConfigButtons;
|
|
25
|
+
private defaultToolbar;
|
|
26
26
|
constructor(grid: TekGrid | TekTreeGrid);
|
|
27
27
|
private getOption;
|
|
28
28
|
private getExportConfigButtons;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
isVisible?: undefined;
|
|
41
|
-
} | {
|
|
42
|
-
name: string;
|
|
43
|
-
component: string;
|
|
44
|
-
label: string;
|
|
45
|
-
bottom: boolean;
|
|
46
|
-
children: {
|
|
47
|
-
name: string;
|
|
48
|
-
component: string;
|
|
49
|
-
iconName: string;
|
|
50
|
-
isVisible: string;
|
|
51
|
-
cssClass: string;
|
|
52
|
-
events: {
|
|
53
|
-
click: ({ event }: IEventParam<any>) => void;
|
|
54
|
-
};
|
|
55
|
-
}[];
|
|
56
|
-
cssClass?: undefined;
|
|
57
|
-
tag?: undefined;
|
|
58
|
-
text?: undefined;
|
|
59
|
-
title?: undefined;
|
|
60
|
-
cssStyle?: undefined;
|
|
61
|
-
isVisible?: undefined;
|
|
62
|
-
} | {
|
|
63
|
-
name: string;
|
|
64
|
-
component: string;
|
|
65
|
-
tag: string;
|
|
66
|
-
cssStyle: string;
|
|
67
|
-
isVisible: string;
|
|
68
|
-
children: ({
|
|
69
|
-
name: string;
|
|
70
|
-
component: string;
|
|
71
|
-
tag: string;
|
|
72
|
-
cssStyle: string;
|
|
73
|
-
isVisible: string;
|
|
74
|
-
children: ({
|
|
75
|
-
name: string;
|
|
76
|
-
component: string;
|
|
77
|
-
label: string;
|
|
78
|
-
bottom: boolean;
|
|
79
|
-
children: {
|
|
80
|
-
name: string;
|
|
81
|
-
component: string;
|
|
82
|
-
icon: boolean;
|
|
83
|
-
iconName: string;
|
|
84
|
-
isVisible: string;
|
|
85
|
-
events: {
|
|
86
|
-
click: ({ event }: IEventParam<any>) => void;
|
|
87
|
-
};
|
|
88
|
-
}[];
|
|
89
|
-
cssClass?: undefined;
|
|
90
|
-
vertical?: undefined;
|
|
91
|
-
isVisible?: undefined;
|
|
92
|
-
offsetY?: undefined;
|
|
93
|
-
activator?: undefined;
|
|
94
|
-
} | {
|
|
95
|
-
name: string;
|
|
96
|
-
component: string;
|
|
97
|
-
label: string;
|
|
98
|
-
bottom: boolean;
|
|
99
|
-
children: {
|
|
100
|
-
name: string;
|
|
101
|
-
component: string;
|
|
102
|
-
icon: boolean;
|
|
103
|
-
iconName: string;
|
|
104
|
-
isVisible: string;
|
|
105
|
-
disabled: string;
|
|
106
|
-
events: {
|
|
107
|
-
click: ({ event }: IEventParam<any>) => void;
|
|
108
|
-
};
|
|
109
|
-
}[];
|
|
110
|
-
cssClass?: undefined;
|
|
111
|
-
vertical?: undefined;
|
|
112
|
-
isVisible?: undefined;
|
|
113
|
-
offsetY?: undefined;
|
|
114
|
-
activator?: undefined;
|
|
115
|
-
} | {
|
|
116
|
-
name: string;
|
|
117
|
-
component: string;
|
|
118
|
-
cssClass: string;
|
|
119
|
-
vertical: boolean;
|
|
120
|
-
isVisible: string;
|
|
121
|
-
label?: undefined;
|
|
122
|
-
bottom?: undefined;
|
|
123
|
-
children?: undefined;
|
|
124
|
-
offsetY?: undefined;
|
|
125
|
-
activator?: undefined;
|
|
126
|
-
} | {
|
|
127
|
-
name: string;
|
|
128
|
-
component: string;
|
|
129
|
-
label: string;
|
|
130
|
-
bottom: boolean;
|
|
131
|
-
children: {
|
|
132
|
-
name: string;
|
|
133
|
-
component: string;
|
|
134
|
-
isVisible: string;
|
|
135
|
-
iterableComponentName: string;
|
|
136
|
-
hideGroups: boolean;
|
|
137
|
-
ignoreColumns: string;
|
|
138
|
-
}[];
|
|
139
|
-
cssClass?: undefined;
|
|
140
|
-
vertical?: undefined;
|
|
141
|
-
isVisible?: undefined;
|
|
142
|
-
offsetY?: undefined;
|
|
143
|
-
activator?: undefined;
|
|
144
|
-
} | {
|
|
145
|
-
name: string;
|
|
146
|
-
component: string;
|
|
147
|
-
isVisible: string;
|
|
148
|
-
label?: undefined;
|
|
149
|
-
bottom?: undefined;
|
|
150
|
-
children?: undefined;
|
|
151
|
-
cssClass?: undefined;
|
|
152
|
-
vertical?: undefined;
|
|
153
|
-
offsetY?: undefined;
|
|
154
|
-
activator?: undefined;
|
|
155
|
-
} | {
|
|
156
|
-
name: string;
|
|
157
|
-
component: string;
|
|
158
|
-
cssClass: string;
|
|
159
|
-
offsetY: boolean;
|
|
160
|
-
activator: {
|
|
161
|
-
name: string;
|
|
162
|
-
component: string;
|
|
163
|
-
icon: boolean;
|
|
164
|
-
iconName: string;
|
|
165
|
-
isVisible: string;
|
|
166
|
-
};
|
|
167
|
-
children: IComponentRender[];
|
|
168
|
-
label?: undefined;
|
|
169
|
-
bottom?: undefined;
|
|
170
|
-
vertical?: undefined;
|
|
171
|
-
isVisible?: undefined;
|
|
172
|
-
})[];
|
|
173
|
-
label?: undefined;
|
|
174
|
-
small?: undefined;
|
|
175
|
-
events?: undefined;
|
|
176
|
-
outline?: undefined;
|
|
177
|
-
cssClass?: undefined;
|
|
178
|
-
iterableComponentName?: undefined;
|
|
179
|
-
bottom?: undefined;
|
|
180
|
-
} | {
|
|
181
|
-
name: string;
|
|
182
|
-
component: string;
|
|
183
|
-
label: string;
|
|
184
|
-
isVisible: string;
|
|
185
|
-
small: boolean;
|
|
186
|
-
events: {
|
|
187
|
-
click: ({ event }: IEventParam<any>) => void;
|
|
188
|
-
};
|
|
189
|
-
tag?: undefined;
|
|
190
|
-
cssStyle?: undefined;
|
|
191
|
-
children?: undefined;
|
|
192
|
-
outline?: undefined;
|
|
193
|
-
cssClass?: undefined;
|
|
194
|
-
iterableComponentName?: undefined;
|
|
195
|
-
bottom?: undefined;
|
|
196
|
-
} | {
|
|
197
|
-
name: string;
|
|
198
|
-
component: string;
|
|
199
|
-
label: string;
|
|
200
|
-
outline: boolean;
|
|
201
|
-
cssClass: string;
|
|
202
|
-
isVisible: string;
|
|
203
|
-
small: boolean;
|
|
204
|
-
events: {
|
|
205
|
-
click: ({ event }: IEventParam<any>) => void;
|
|
206
|
-
};
|
|
207
|
-
tag?: undefined;
|
|
208
|
-
cssStyle?: undefined;
|
|
209
|
-
children?: undefined;
|
|
210
|
-
iterableComponentName?: undefined;
|
|
211
|
-
bottom?: undefined;
|
|
212
|
-
} | {
|
|
213
|
-
name: string;
|
|
214
|
-
component: string;
|
|
215
|
-
cssClass: string;
|
|
216
|
-
iterableComponentName: string;
|
|
217
|
-
isVisible: string;
|
|
218
|
-
tag?: undefined;
|
|
219
|
-
cssStyle?: undefined;
|
|
220
|
-
children?: undefined;
|
|
221
|
-
label?: undefined;
|
|
222
|
-
small?: undefined;
|
|
223
|
-
events?: undefined;
|
|
224
|
-
outline?: undefined;
|
|
225
|
-
bottom?: undefined;
|
|
226
|
-
} | {
|
|
227
|
-
name: string;
|
|
228
|
-
component: string;
|
|
229
|
-
label: string;
|
|
230
|
-
bottom: boolean;
|
|
231
|
-
children: {
|
|
232
|
-
name: string;
|
|
233
|
-
component: string;
|
|
234
|
-
grid: TekGrid | TekTreeGrid;
|
|
235
|
-
gridName: string;
|
|
236
|
-
showCheckboxAll: boolean;
|
|
237
|
-
isVisible: string;
|
|
238
|
-
events: {
|
|
239
|
-
onCreated: ({ component }: IEventParam<TekGridFilterButton>) => void;
|
|
240
|
-
};
|
|
241
|
-
}[];
|
|
242
|
-
tag?: undefined;
|
|
243
|
-
cssStyle?: undefined;
|
|
244
|
-
isVisible?: undefined;
|
|
245
|
-
small?: undefined;
|
|
246
|
-
events?: undefined;
|
|
247
|
-
outline?: undefined;
|
|
248
|
-
cssClass?: undefined;
|
|
249
|
-
iterableComponentName?: undefined;
|
|
250
|
-
})[];
|
|
251
|
-
cssClass?: undefined;
|
|
252
|
-
text?: undefined;
|
|
253
|
-
title?: undefined;
|
|
254
|
-
label?: undefined;
|
|
255
|
-
bottom?: undefined;
|
|
256
|
-
})[];
|
|
29
|
+
private initializeDefaultToolbarItems;
|
|
30
|
+
private processUserToolbarItems;
|
|
31
|
+
/**
|
|
32
|
+
* Adiciona os itens padrão da toolbar quando nenhuma configuração é fornecida.
|
|
33
|
+
* @param toolbarDivChildren Array para adicionar os componentes da toolbar.
|
|
34
|
+
*/
|
|
35
|
+
private addDefaultToolbarItems;
|
|
36
|
+
/**
|
|
37
|
+
* Cria os componentes que serão renderizados na toolbar do grid.
|
|
38
|
+
*/
|
|
39
|
+
createToolbarProps(): IComponentRender[];
|
|
257
40
|
filterButton?: TekGridFilterButton;
|
|
258
41
|
private loadFilterButton;
|
|
259
42
|
private hideButtonClick;
|
|
@@ -15,15 +15,13 @@ export declare class GridController {
|
|
|
15
15
|
get toolbarStyle(): string;
|
|
16
16
|
get tooltipName(): "TEKGRID_SHOW" | "TEKGRID_HIDE";
|
|
17
17
|
get showReloadButton(): boolean;
|
|
18
|
-
get showDivider2(): boolean | undefined;
|
|
19
18
|
get showColumnsButton(): boolean;
|
|
20
19
|
get columnsButtonIgnore(): string[];
|
|
21
20
|
get showLayoutOptionsButton(): boolean;
|
|
22
|
-
get
|
|
21
|
+
get showDivider(): boolean;
|
|
23
22
|
get showActionsButton(): boolean;
|
|
24
23
|
get showExportButton(): boolean;
|
|
25
24
|
get showActionAndExportButton(): boolean | undefined;
|
|
26
|
-
get showDivider3(): boolean | undefined;
|
|
27
25
|
get isEditing(): boolean;
|
|
28
26
|
get showEditButtons(): boolean;
|
|
29
27
|
get isNotEditing(): boolean;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
declare const defaultIcons: {
|
|
2
|
-
columnGroupOpened: string;
|
|
3
|
-
columnGroupClosed: string;
|
|
4
|
-
columnSelectClosed: string;
|
|
5
|
-
columnSelectOpen: string;
|
|
6
|
-
columnSelectIndeterminate: string;
|
|
7
|
-
columnMovePin: string;
|
|
8
|
-
columnMoveHide: string;
|
|
9
|
-
columnMoveMove: string;
|
|
10
|
-
columnMoveLeft: string;
|
|
11
|
-
columnMoveRight: string;
|
|
12
|
-
columnMoveGroup: string;
|
|
13
|
-
columnMoveValue: string;
|
|
14
|
-
dropNotAllowed: string;
|
|
15
|
-
groupContracted: string;
|
|
16
|
-
groupExpanded: string;
|
|
17
|
-
chart: string;
|
|
18
|
-
close: string;
|
|
19
|
-
cancel: string;
|
|
20
|
-
check: string;
|
|
21
|
-
first: string;
|
|
22
|
-
previous: string;
|
|
23
|
-
next: string;
|
|
24
|
-
last: string;
|
|
25
|
-
linked: string;
|
|
26
|
-
unlinked: string;
|
|
27
|
-
colorPicker: string;
|
|
28
|
-
groupLoading: string;
|
|
29
|
-
menu: string;
|
|
30
|
-
filter: string;
|
|
31
|
-
columns: string;
|
|
32
|
-
maximize: string;
|
|
33
|
-
minimize: string;
|
|
34
|
-
menuPin: string;
|
|
35
|
-
menuValue: string;
|
|
36
|
-
menuAddRowGroup: string;
|
|
37
|
-
menuRemoveRowGroup: string;
|
|
38
|
-
clipboardCopy: string;
|
|
39
|
-
clipboardPaste: string;
|
|
40
|
-
rowGroupPanel: string;
|
|
41
|
-
valuePanel: string;
|
|
42
|
-
columnDrag: string;
|
|
43
|
-
rowDrag: string;
|
|
44
|
-
save: string;
|
|
45
|
-
smallDown: string;
|
|
46
|
-
smallLeft: string;
|
|
47
|
-
smallRight: string;
|
|
48
|
-
smallUp: string;
|
|
49
|
-
sortAscending: string;
|
|
50
|
-
sortDescending: string;
|
|
51
|
-
sortUnSort: string;
|
|
52
|
-
};
|
|
53
|
-
export default defaultIcons;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IIterable } from '@zeedhi/common';
|
|
2
|
-
import { IDictionary } from '@zeedhi/core';
|
|
3
|
-
export interface ITekAgGrid extends IIterable {
|
|
4
|
-
dense?: boolean;
|
|
5
|
-
frameworkComponents?: IDictionary;
|
|
6
|
-
gridOptions?: IDictionary;
|
|
7
|
-
height?: string | number;
|
|
8
|
-
icons?: IDictionary<string>;
|
|
9
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Iterable } from '@zeedhi/common';
|
|
2
|
-
import { IDictionary } from '@zeedhi/core';
|
|
3
|
-
import { ITekAgGrid } from './interfaces';
|
|
4
|
-
/** Grid Component */
|
|
5
|
-
export declare class TekAgGrid extends Iterable implements ITekAgGrid {
|
|
6
|
-
cssClass: string;
|
|
7
|
-
dense: boolean;
|
|
8
|
-
frameworkComponents: IDictionary;
|
|
9
|
-
gridOptions: IDictionary;
|
|
10
|
-
height: string | number;
|
|
11
|
-
icons: IDictionary<string>;
|
|
12
|
-
gridComponent: any;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a new AgGrid.
|
|
15
|
-
* @param props AgGrid properties
|
|
16
|
-
*/
|
|
17
|
-
constructor(props: ITekAgGrid);
|
|
18
|
-
private createOptionsAccessors;
|
|
19
|
-
private setAccessor;
|
|
20
|
-
/**
|
|
21
|
-
* Reload dataset
|
|
22
|
-
*/
|
|
23
|
-
reload(): Promise<any>;
|
|
24
|
-
/**
|
|
25
|
-
* Compares two dates
|
|
26
|
-
* @param date1
|
|
27
|
-
* @param date2
|
|
28
|
-
* @param format
|
|
29
|
-
* @returns -1 if date1 after date2
|
|
30
|
-
* @returns 0 if date1 equal date2
|
|
31
|
-
* @returns 1 if date1 before date2
|
|
32
|
-
*/
|
|
33
|
-
dateComparator(date1: string | Date, date2: string | Date, format?: string): 1 | -1 | 0;
|
|
34
|
-
private getDateAsString;
|
|
35
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { IDatasource, IDictionary, RestDatasource } from '@zeedhi/core';
|
|
2
|
-
import { IDynamicFilterItem, ITekRestDatasource } from './interfaces';
|
|
3
|
-
export declare class TekRestDatasource extends RestDatasource implements ITekRestDatasource {
|
|
4
|
-
/** Dynamic filter data */
|
|
5
|
-
dynamicFilter: IDictionary<IDynamicFilterItem[]>;
|
|
6
|
-
/** Search Join data */
|
|
7
|
-
searchJoin: IDictionary<Array<string | number>>;
|
|
8
|
-
/**
|
|
9
|
-
* URL reserved keys
|
|
10
|
-
*/
|
|
11
|
-
protected reservedKeys: IDictionary<boolean>;
|
|
12
|
-
/**
|
|
13
|
-
* Dynamic Filter Operations
|
|
14
|
-
*/
|
|
15
|
-
dynamicFilterOperations: IDictionary<boolean>;
|
|
16
|
-
/**
|
|
17
|
-
* Dynamic Filter Relations
|
|
18
|
-
*/
|
|
19
|
-
dynamicFilterRelations: IDictionary<boolean>;
|
|
20
|
-
/**
|
|
21
|
-
* Dynamic Filter applied flag
|
|
22
|
-
*/
|
|
23
|
-
protected dynamicFilterApplied: string;
|
|
24
|
-
/**
|
|
25
|
-
* Create new datasource
|
|
26
|
-
* @param props Datasource properties
|
|
27
|
-
*/
|
|
28
|
-
constructor(props: ITekRestDatasource);
|
|
29
|
-
protected updateInternalProperties(datasource?: IDatasource): void;
|
|
30
|
-
protected getEncodedParam(urlParam: string, datasourceParam?: IDictionary<any>): IDictionary<any>;
|
|
31
|
-
protected getQueryStringValues(): IDictionary<any>;
|
|
32
|
-
protected getUrlQueryString(): string;
|
|
33
|
-
/**
|
|
34
|
-
* Adds a new dynamic filter position or replace if exists
|
|
35
|
-
* @param column Dynamic Filter column name
|
|
36
|
-
* @param value Dynamic Filter value
|
|
37
|
-
* @returns Promise with data collection
|
|
38
|
-
*/
|
|
39
|
-
addDynamicFilter(column: string, value: any): Promise<any>;
|
|
40
|
-
/**
|
|
41
|
-
* Removes a dynamic filter position
|
|
42
|
-
* @param column Dynamic Filter column name
|
|
43
|
-
* @returns Promise with data collection
|
|
44
|
-
*/
|
|
45
|
-
removeDynamicFilter(column: string): Promise<any>;
|
|
46
|
-
/**
|
|
47
|
-
* Sets new dynamic filter value
|
|
48
|
-
* @param filter Dynamic Filter value
|
|
49
|
-
* @returns Promise with data collection
|
|
50
|
-
*/
|
|
51
|
-
setDynamicFilter(filter: IDictionary<any>): Promise<any>;
|
|
52
|
-
/**
|
|
53
|
-
* Clears Dynamic filter value
|
|
54
|
-
* @returns Promise with data collection
|
|
55
|
-
*/
|
|
56
|
-
clearDynamicFilter(): Promise<any>;
|
|
57
|
-
/**
|
|
58
|
-
* Resets page and selected rows and tries to update the url
|
|
59
|
-
* @returns Promise with data collection
|
|
60
|
-
*/
|
|
61
|
-
protected updateDynamicFilter(): Promise<any>;
|
|
62
|
-
/**
|
|
63
|
-
* Checks if a filter value is valid
|
|
64
|
-
* @param value Filter value
|
|
65
|
-
* @returns Is valid filter value
|
|
66
|
-
*/
|
|
67
|
-
protected isValidDynamicFilterValue(column: string, value?: IDictionary<any>[]): boolean | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Retrieves request params
|
|
70
|
-
*/
|
|
71
|
-
protected getRequestParams(): any;
|
|
72
|
-
clone(): {
|
|
73
|
-
dynamicFilter: IDictionary<IDynamicFilterItem[]>;
|
|
74
|
-
searchJoin: IDictionary<(string | number)[]>;
|
|
75
|
-
type: string;
|
|
76
|
-
route?: string | undefined;
|
|
77
|
-
lazyLoad?: boolean | undefined;
|
|
78
|
-
arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined;
|
|
79
|
-
find?: IDictionary<any> | undefined;
|
|
80
|
-
currentRow?: IDictionary<any> | undefined;
|
|
81
|
-
data?: IDictionary<any>[] | undefined;
|
|
82
|
-
filter?: IDictionary<any> | undefined;
|
|
83
|
-
limit?: string | number | undefined;
|
|
84
|
-
loadAll?: boolean | undefined;
|
|
85
|
-
loading?: boolean | undefined;
|
|
86
|
-
order?: string[] | undefined;
|
|
87
|
-
page?: string | number | undefined;
|
|
88
|
-
search?: string | undefined;
|
|
89
|
-
searchIn?: string[] | undefined;
|
|
90
|
-
uniqueKey?: string | undefined;
|
|
91
|
-
watchUrl?: boolean | undefined;
|
|
92
|
-
events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
93
|
-
};
|
|
94
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
declare const defaultIcons: {
|
|
2
|
-
columnGroupOpened: string;
|
|
3
|
-
columnGroupClosed: string;
|
|
4
|
-
columnSelectClosed: string;
|
|
5
|
-
columnSelectOpen: string;
|
|
6
|
-
columnSelectIndeterminate: string;
|
|
7
|
-
columnMovePin: string;
|
|
8
|
-
columnMoveHide: string;
|
|
9
|
-
columnMoveMove: string;
|
|
10
|
-
columnMoveLeft: string;
|
|
11
|
-
columnMoveRight: string;
|
|
12
|
-
columnMoveGroup: string;
|
|
13
|
-
columnMoveValue: string;
|
|
14
|
-
dropNotAllowed: string;
|
|
15
|
-
groupContracted: string;
|
|
16
|
-
groupExpanded: string;
|
|
17
|
-
chart: string;
|
|
18
|
-
close: string;
|
|
19
|
-
cancel: string;
|
|
20
|
-
check: string;
|
|
21
|
-
first: string;
|
|
22
|
-
previous: string;
|
|
23
|
-
next: string;
|
|
24
|
-
last: string;
|
|
25
|
-
linked: string;
|
|
26
|
-
unlinked: string;
|
|
27
|
-
colorPicker: string;
|
|
28
|
-
groupLoading: string;
|
|
29
|
-
menu: string;
|
|
30
|
-
filter: string;
|
|
31
|
-
columns: string;
|
|
32
|
-
maximize: string;
|
|
33
|
-
minimize: string;
|
|
34
|
-
menuPin: string;
|
|
35
|
-
menuValue: string;
|
|
36
|
-
menuAddRowGroup: string;
|
|
37
|
-
menuRemoveRowGroup: string;
|
|
38
|
-
clipboardCopy: string;
|
|
39
|
-
clipboardPaste: string;
|
|
40
|
-
rowGroupPanel: string;
|
|
41
|
-
valuePanel: string;
|
|
42
|
-
columnDrag: string;
|
|
43
|
-
rowDrag: string;
|
|
44
|
-
save: string;
|
|
45
|
-
smallDown: string;
|
|
46
|
-
smallLeft: string;
|
|
47
|
-
smallRight: string;
|
|
48
|
-
smallUp: string;
|
|
49
|
-
sortAscending: string;
|
|
50
|
-
sortDescending: string;
|
|
51
|
-
sortUnSort: string;
|
|
52
|
-
};
|
|
53
|
-
export default defaultIcons;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TekGridColumn } from '..';
|
|
2
|
-
export declare class TekFilterDynamicValues {
|
|
3
|
-
private static values;
|
|
4
|
-
private static formatDate;
|
|
5
|
-
static getLabel(name: string): string;
|
|
6
|
-
static getValue(name: string, column: TekGridColumn): string | string[];
|
|
7
|
-
static register(name: string, label: string, fn: () => Date | [Date, Date]): void;
|
|
8
|
-
static unregister(name: string): void;
|
|
9
|
-
}
|