@zeedhi/teknisa-components-common 3.0.4 → 3.2.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/dist/teknisa-components-common.es.js +3536 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/tek-breadcrumb-header/breadcrumb-header.d.ts +2 -2
- package/dist/types/components/tek-breadcrumb-header/interfaces.d.ts +1 -1
- package/dist/types/components/tek-datasource/tek-memory-datasource.d.ts +1 -21
- package/dist/types/components/tek-datasource/tek-rest-datasource.d.ts +6 -30
- package/dist/types/components/tek-grid/filter-helper.d.ts +2 -2
- package/dist/types/components/tek-grid/grid-filter-button.d.ts +1 -0
- package/dist/types/components/tek-grid/grouped-data-manager.d.ts +8 -1
- package/dist/types/components/tek-grid/grouped-data-navigator.d.ts +12 -0
- package/dist/types/components/tek-grid/index.d.ts +1 -1
- package/dist/types/components/tek-grid/interfaces.d.ts +8 -1
- package/dist/types/components/tek-grid/tek-grid-controller.d.ts +19 -17
- package/dist/types/components/tek-grid/tek-grid-data-editor.d.ts +11 -0
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.d.ts +1 -1
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.d.ts +8 -1
- package/dist/types/components/tek-grid/tek-grid.d.ts +24 -6
- package/dist/types/components/tek-loading/interfaces.d.ts +6 -0
- package/dist/types/components/tek-loading/loading.d.ts +16 -0
- package/dist/types/components/tek-user-info/TekUserInfoController.d.ts +4 -4
- package/dist/types/utils/extract-properties/extract-properties.d.ts +1 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/report-filter/report-filter.d.ts +12 -0
- package/package.json +32 -12
- package/coverage/clover.xml +0 -6
- package/coverage/coverage-final.json +0 -1
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -101
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov.info +0 -0
- package/dist/teknisa-components-common.js +0 -3802
- package/dist/teknisa-components-common.min.js +0 -3802
- package/dist/types/components/tek-grid/grouped-view-navigator.d.ts +0 -14
- package/dist/types/error/delete-rows-error.d.ts +0 -6
- package/environments.json +0 -14
- package/jest.config.js +0 -1
- package/src/components/index.ts +0 -101
- package/src/components/tek-breadcrumb-header/breadcrumb-header.ts +0 -29
- package/src/components/tek-breadcrumb-header/interfaces.ts +0 -7
- package/src/components/tek-datasource/index.ts +0 -3
- package/src/components/tek-datasource/interfaces.ts +0 -36
- package/src/components/tek-datasource/tek-memory-datasource.ts +0 -314
- package/src/components/tek-datasource/tek-rest-datasource.ts +0 -224
- package/src/components/tek-grid/columns-searcher.ts +0 -22
- package/src/components/tek-grid/dynamic-filter-datasource-factory.ts +0 -20
- package/src/components/tek-grid/filter-helper.ts +0 -20
- package/src/components/tek-grid/grid-filter-button.ts +0 -419
- package/src/components/tek-grid/grouped-data-manager.ts +0 -448
- package/src/components/tek-grid/grouped-data-selector.ts +0 -40
- package/src/components/tek-grid/grouped-view-navigator.ts +0 -84
- package/src/components/tek-grid/index.ts +0 -18
- package/src/components/tek-grid/interfaces.ts +0 -329
- package/src/components/tek-grid/keymap-grouped.ts +0 -20
- package/src/components/tek-grid/layout-options.ts +0 -248
- package/src/components/tek-grid/tek-grid-column.ts +0 -193
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts +0 -28
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts +0 -38
- package/src/components/tek-grid/tek-grid-controller.ts +0 -140
- package/src/components/tek-grid/tek-grid-events.ts +0 -105
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts +0 -26
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts +0 -3
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.ts +0 -6
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts +0 -85
- package/src/components/tek-grid/tek-grid-toolbar-provider/index.ts +0 -2
- package/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts +0 -365
- package/src/components/tek-grid/tek-grid.ts +0 -1118
- package/src/components/tek-user-info/TekUserInfoController.ts +0 -87
- package/src/components/tek-user-info/interfaces.ts +0 -21
- package/src/components/tek-user-info/tek-user-info-list.ts +0 -64
- package/src/components/tek-user-info/tek-user-info.ts +0 -337
- package/src/error/tek-grid-delete-rows-error.ts +0 -15
- package/src/error/teknisa-common-error.ts +0 -8
- package/src/utils/config/config.ts +0 -8
- package/src/utils/index.ts +0 -3
- package/src/utils/is-filled-object/is-filled-object.ts +0 -5
- package/src/utils/is-nil.ts +0 -3
- package/tests/__helpers__/component-event-helper.ts +0 -5
- package/tests/__helpers__/flush-promises-helper.ts +0 -3
- package/tests/__helpers__/get-child-helper.ts +0 -27
- package/tests/__helpers__/index.ts +0 -3
- package/tests/__helpers__/mock-created-helper.ts +0 -12
- package/tests/__mocks__/@zeedhi/core/i18n.js +0 -75
- package/tests/__mocks__/@zeedhi/core.js +0 -5
- package/tests/unit/components/crud/crud-add-button.spec.ts +0 -56
- package/tests/unit/components/crud/crud-button.spec.ts +0 -94
- package/tests/unit/components/crud/crud-cancel-button.spec.ts +0 -91
- package/tests/unit/components/crud/crud-delete-button.spec.ts +0 -122
- package/tests/unit/components/crud/crud-form.spec.ts +0 -165
- package/tests/unit/components/crud/crud-save-button.spec.ts +0 -118
- package/tests/unit/components/tek-breadcrumb-header/tek-breadcrumb-header.spec.ts +0 -42
- package/tests/unit/components/tek-card-title/CardTitle.spec.ts +0 -34
- package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +0 -460
- package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +0 -362
- package/tests/unit/components/tek-drag-grid/tek-drag-grid.spec.ts +0 -112
- package/tests/unit/components/tek-grid/button-option.spec.ts +0 -49
- package/tests/unit/components/tek-grid/columns-searcher.spec.ts +0 -112
- package/tests/unit/components/tek-grid/dynamic-filter-datasource-factory.spec.ts +0 -90
- package/tests/unit/components/tek-grid/filter-helper.spec.ts +0 -52
- package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +0 -842
- package/tests/unit/components/tek-grid/grouped-data-manager.spec.ts +0 -593
- package/tests/unit/components/tek-grid/grouped-data-selector.spec.ts +0 -136
- package/tests/unit/components/tek-grid/grouped-view-navigator.spec.ts +0 -244
- package/tests/unit/components/tek-grid/keymap-grouped.spec.ts +0 -20
- package/tests/unit/components/tek-grid/layout-options.spec.ts +0 -1020
- package/tests/unit/components/tek-grid/multi-option.spec.ts +0 -139
- package/tests/unit/components/tek-grid/tek-grid-column.spec.ts +0 -312
- package/tests/unit/components/tek-grid/tek-grid-columns-button.spec.ts +0 -228
- package/tests/unit/components/tek-grid/tek-grid-controller.spec.ts +0 -253
- package/tests/unit/components/tek-grid/tek-grid-events.spec.ts +0 -186
- package/tests/unit/components/tek-grid/tek-grid-toolbar-provider.spec.ts +0 -34
- package/tests/unit/components/tek-grid/tek-grid.spec.ts +0 -895
- package/tests/unit/components/tek-grid/tek-memory-datasource.spec.ts +0 -482
- package/tests/unit/components/tek-grid/tek-rest-datasource.spec.ts +0 -422
- package/tests/unit/components/tek-image/Image.spec.ts +0 -67
- package/tests/unit/components/tek-iterable-carousel/iterable-carousel.spec.ts +0 -37
- package/tests/unit/components/tek-iterable-component-render/iterable-component-render.spec.ts +0 -200
- package/tests/unit/components/tek-loading/Loading.spec.ts +0 -30
- package/tests/unit/components/tek-notifications/notifications.spec.ts +0 -201
- package/tests/unit/components/tek-product-card/product-card.spec.ts +0 -61
- package/tests/unit/components/tek-user-info/TekUserInfoContoller.spec.ts +0 -220
- package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +0 -86
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +0 -430
- package/tests/unit/components/tree-grid/tree-grid.spec.ts +0 -776
- package/tests/unit/utils/grid-base/export-options/button-option.spec.ts +0 -44
- package/tests/unit/utils/grid-base/export-options/multi-option.spec.ts +0 -135
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +0 -174
- package/tests/unit/utils/report-filter/report-filter.spec.ts +0 -66
- package/tsconfig.build.json +0 -7
- package/tsconfig.eslint.json +0 -9
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import { IEventParam, Metadata } from '@zeedhi/core';
|
|
2
|
-
import { TekGridDeleteRowsError } from '../../../error/tek-grid-delete-rows-error';
|
|
3
|
-
import { IComponentRender, IGridEditable, Tag } from '@zeedhi/common';
|
|
4
|
-
import {
|
|
5
|
-
IExportable,
|
|
6
|
-
ISupportsToolbar,
|
|
7
|
-
ITekGridAtoms,
|
|
8
|
-
ITekGridExportConfig,
|
|
9
|
-
ITekGridToolbarProvider,
|
|
10
|
-
} from '../interfaces';
|
|
11
|
-
import { ButtonOption, MultiOption } from './export-options';
|
|
12
|
-
|
|
13
|
-
type GridEditableWithToolbar = IGridEditable & ISupportsToolbar & IExportable;
|
|
14
|
-
|
|
15
|
-
export class TekGridToolbarProvider implements ITekGridToolbarProvider {
|
|
16
|
-
private grid: GridEditableWithToolbar;
|
|
17
|
-
|
|
18
|
-
private groupsVisibility: 'hide' | 'show';
|
|
19
|
-
|
|
20
|
-
constructor(grid: GridEditableWithToolbar, groupsVisibility: 'hide' | 'show') {
|
|
21
|
-
this.grid = grid;
|
|
22
|
-
this.groupsVisibility = groupsVisibility;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
protected atoms: ITekGridAtoms = {
|
|
26
|
-
TITLE: '_gridTitle',
|
|
27
|
-
HIDE_BUTTON: '_hideButton',
|
|
28
|
-
ADD_BUTTON: '_addButton',
|
|
29
|
-
DELETE_BUTTON: '_deleteButton',
|
|
30
|
-
REFRESH_BUTTON: '_refreshButton',
|
|
31
|
-
COLUMNS_BUTTON: '_columnsButton',
|
|
32
|
-
LAYOUT_BUTTON: '_layout_options',
|
|
33
|
-
EXPORT_BUTTON: '_exportButton',
|
|
34
|
-
ACTIONS_BUTTON: '_actionsButton',
|
|
35
|
-
SAVE_BUTTON: '_saveButton',
|
|
36
|
-
CANCEL_BUTTON: '_cancelButton',
|
|
37
|
-
SEARCH: '_gridSearch',
|
|
38
|
-
FILTER_BUTTON: '_filterButton',
|
|
39
|
-
FILTER_MODAL: '-filter-modal',
|
|
40
|
-
FILTER_FORM: '-filter-form',
|
|
41
|
-
EXPORT_DROPDOWN: '_export_dropdown',
|
|
42
|
-
ACTIONS_DROPDOWN: '_actions_dropdown',
|
|
43
|
-
HIDE_TOOLTIP: '_hideTooltip',
|
|
44
|
-
TOOLBAR_DIV: '_toolbarDiv',
|
|
45
|
-
NOT_EDITING_SPAN: '_notEditingSpan',
|
|
46
|
-
ADD_TOOLTIP: '_add_tooltip',
|
|
47
|
-
DELETE_TOOLTIP: '_delete_tooltip',
|
|
48
|
-
DIVIDER1: '_divider1',
|
|
49
|
-
REFRESH_TOOLTIP: '_refresh_tooltip',
|
|
50
|
-
DIVIDER2: '_divider2',
|
|
51
|
-
COLUMNS_TOOLTIP: '_columns_button_tooltip',
|
|
52
|
-
DIVIDER_ACTIONS: '_dividerActions',
|
|
53
|
-
DIVIDER3: '_divider3',
|
|
54
|
-
FILTER_TOOLTIP: '_filter_tooltip',
|
|
55
|
-
} as const;
|
|
56
|
-
|
|
57
|
-
getAtomName(key: keyof ITekGridAtoms): string {
|
|
58
|
-
return `${this.grid.name}${this.atoms[key]}`;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
getAtomInstance<T>(key: keyof ITekGridAtoms): T {
|
|
62
|
-
return Metadata.getInstance<T>(`${this.grid.name}${this.atoms[key]}`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
private getOption(config: ITekGridExportConfig) {
|
|
66
|
-
if (config.multiOption) return new MultiOption(config);
|
|
67
|
-
|
|
68
|
-
return new ButtonOption(config);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
private getExportConfigButtons(): IComponentRender[] {
|
|
72
|
-
return this.grid.exportConfig.map((config) => {
|
|
73
|
-
const option = this.getOption(config);
|
|
74
|
-
return option.buildComponent(this.grid);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
private hideButtonClick({ event }: IEventParam<any>) {
|
|
79
|
-
if (!event!.defaultPrevented) {
|
|
80
|
-
const instance = Metadata.getInstance<Tag>(`${this.grid.name}_toolbarDiv`);
|
|
81
|
-
if (instance) {
|
|
82
|
-
instance.isVisible = !instance.isVisible;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private cancelChanges({ event }: IEventParam<any>) {
|
|
88
|
-
this.grid.callEvent('beforeCancel', { component: this.grid, event });
|
|
89
|
-
if (!event!.defaultPrevented) {
|
|
90
|
-
const cancel = async () => {
|
|
91
|
-
await this.grid.cancelEditedRows();
|
|
92
|
-
this.grid.editingNewRows = false;
|
|
93
|
-
};
|
|
94
|
-
cancel();
|
|
95
|
-
|
|
96
|
-
this.grid.callEvent('afterCancel', { component: this.grid });
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
private saveChanges({ event }: IEventParam<any>) {
|
|
101
|
-
this.grid.callEvent('beforeSave', { component: this.grid, event });
|
|
102
|
-
if (!event!.defaultPrevented) {
|
|
103
|
-
const save = async () => {
|
|
104
|
-
await this.grid.saveEditedRows();
|
|
105
|
-
this.grid.editingNewRows = false;
|
|
106
|
-
};
|
|
107
|
-
save();
|
|
108
|
-
this.grid.callEvent('afterSave', { component: this.grid });
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
private addButtonClick({ event }: IEventParam<any>) {
|
|
113
|
-
if (this.grid.editNewRowsOnly) {
|
|
114
|
-
this.grid.editingNewRows = true;
|
|
115
|
-
}
|
|
116
|
-
this.grid.callEvent('addClick', { component: this.grid, event });
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
private deleteButtonClick({ event }: IEventParam<any>) {
|
|
120
|
-
this.grid.callEvent('beforeDelete', { component: this.grid, event });
|
|
121
|
-
if (!event!.defaultPrevented) {
|
|
122
|
-
if (this.grid.selectAllPages) {
|
|
123
|
-
throw new TekGridDeleteRowsError();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
this.grid.deleteRows();
|
|
127
|
-
|
|
128
|
-
this.grid.callEvent('afterDelete', { component: this.grid });
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
public reloadGrid({ event }: IEventParam<any>) {
|
|
133
|
-
this.grid.callEvent('beforeReload', { component: this.grid, event });
|
|
134
|
-
if (event?.defaultPrevented) return;
|
|
135
|
-
|
|
136
|
-
this.grid.reload();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
public getProperties(): IComponentRender[] {
|
|
140
|
-
const exportConfigButtons = this.getExportConfigButtons();
|
|
141
|
-
|
|
142
|
-
return [
|
|
143
|
-
{
|
|
144
|
-
name: this.getAtomName('TITLE'),
|
|
145
|
-
component: 'ZdText',
|
|
146
|
-
cssClass: 'toolbar-title',
|
|
147
|
-
tag: 'h2',
|
|
148
|
-
text: this.grid.title,
|
|
149
|
-
title: this.grid.title,
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
name: `${this.grid.name}_spacer`,
|
|
153
|
-
component: 'VSpacer',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: this.getAtomName('HIDE_TOOLTIP'),
|
|
157
|
-
component: 'ZdTooltip',
|
|
158
|
-
label: `{{GridController_${this.grid.name}.tooltipName}}`,
|
|
159
|
-
bottom: true,
|
|
160
|
-
children: [
|
|
161
|
-
{
|
|
162
|
-
name: this.getAtomName('HIDE_BUTTON'),
|
|
163
|
-
component: 'ZdButton',
|
|
164
|
-
flat: true,
|
|
165
|
-
icon: true,
|
|
166
|
-
iconName: 'mdi-chevron-right',
|
|
167
|
-
color: 'grey',
|
|
168
|
-
isVisible: `{{GridController_${this.grid.name}.isNotEditing}}`,
|
|
169
|
-
cssClass: `{{GridController_${this.grid.name}.toolbarClass}}`,
|
|
170
|
-
events: {
|
|
171
|
-
click: this.hideButtonClick.bind(this),
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
name: this.getAtomName('TOOLBAR_DIV'),
|
|
178
|
-
component: 'ZdTag',
|
|
179
|
-
tag: 'div',
|
|
180
|
-
cssStyle: 'display: flex; align-items: center',
|
|
181
|
-
isVisible: `{{GridController_${this.grid.name}.showToolbar}}`,
|
|
182
|
-
children: [
|
|
183
|
-
{
|
|
184
|
-
name: this.getAtomName('NOT_EDITING_SPAN'),
|
|
185
|
-
component: 'ZdTag',
|
|
186
|
-
tag: 'span',
|
|
187
|
-
cssStyle: 'display: flex',
|
|
188
|
-
isVisible: `{{GridController_${this.grid.name}.isNotEditing}}`,
|
|
189
|
-
children: [
|
|
190
|
-
{
|
|
191
|
-
name: this.getAtomName('ADD_TOOLTIP'),
|
|
192
|
-
component: 'ZdTooltip',
|
|
193
|
-
label: 'TEKGRID_ADD',
|
|
194
|
-
bottom: true,
|
|
195
|
-
children: [
|
|
196
|
-
{
|
|
197
|
-
name: this.getAtomName('ADD_BUTTON'),
|
|
198
|
-
component: 'ZdButton',
|
|
199
|
-
icon: true,
|
|
200
|
-
iconName: 'mdi-plus-box',
|
|
201
|
-
isVisible: `{{GridController_${this.grid.name}.showAddButton}}`,
|
|
202
|
-
events: {
|
|
203
|
-
click: this.addButtonClick.bind(this),
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: this.getAtomName('DELETE_TOOLTIP'),
|
|
210
|
-
component: 'ZdTooltip',
|
|
211
|
-
label: 'TEKGRID_DELETE',
|
|
212
|
-
bottom: true,
|
|
213
|
-
children: [
|
|
214
|
-
{
|
|
215
|
-
name: this.getAtomName('DELETE_BUTTON'),
|
|
216
|
-
component: 'ZdButton',
|
|
217
|
-
icon: true,
|
|
218
|
-
iconName: 'mdi-trash-can-outline',
|
|
219
|
-
isVisible: `{{GridController_${this.grid.name}.showDeleteButton}}`,
|
|
220
|
-
disabled: `{{GridController_${this.grid.name}.disableDeleteButton}}`,
|
|
221
|
-
events: {
|
|
222
|
-
click: this.deleteButtonClick.bind(this),
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
],
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: this.getAtomName('DIVIDER1'),
|
|
229
|
-
component: 'ZdDivider',
|
|
230
|
-
cssClass: 'toolbar-divider',
|
|
231
|
-
vertical: true,
|
|
232
|
-
isVisible: `{{GridController_${this.grid.name}.showDivider1}}`,
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
name: this.getAtomName('REFRESH_TOOLTIP'),
|
|
236
|
-
component: 'ZdTooltip',
|
|
237
|
-
label: 'TEKGRID_REFRESH',
|
|
238
|
-
bottom: true,
|
|
239
|
-
children: [
|
|
240
|
-
{
|
|
241
|
-
name: this.getAtomName('REFRESH_BUTTON'),
|
|
242
|
-
component: 'ZdButton',
|
|
243
|
-
icon: true,
|
|
244
|
-
iconName: 'refresh',
|
|
245
|
-
isVisible: `{{GridController_${this.grid.name}.showReloadButton}}`,
|
|
246
|
-
events: {
|
|
247
|
-
click: this.reloadGrid.bind(this),
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
name: this.getAtomName('DIVIDER2'),
|
|
254
|
-
component: 'ZdDivider',
|
|
255
|
-
cssClass: 'toolbar-divider',
|
|
256
|
-
vertical: true,
|
|
257
|
-
isVisible: `{{GridController_${this.grid.name}.showDivider2}}`,
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
name: this.getAtomName('COLUMNS_BUTTON'),
|
|
261
|
-
component: 'TekGridColumnsButton',
|
|
262
|
-
isVisible: `{{GridController_${this.grid.name}.showColumnsButton}}`,
|
|
263
|
-
iterableComponentName: this.grid.name,
|
|
264
|
-
hideGroups: this.groupsVisibility === 'hide',
|
|
265
|
-
ignoreColumns: `{{GridController_${this.grid.name}.columnsButtonIgnore}}`,
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
name: this.getAtomName('LAYOUT_BUTTON'),
|
|
269
|
-
component: 'TekGridLayoutOptions',
|
|
270
|
-
isVisible: `{{GridController_${this.grid.name}.showLayoutOptionsButton}}`,
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
name: this.getAtomName('DIVIDER_ACTIONS'),
|
|
274
|
-
component: 'ZdDivider',
|
|
275
|
-
cssClass: 'toolbar-divider',
|
|
276
|
-
vertical: true,
|
|
277
|
-
isVisible: `{{GridController_${this.grid.name}.showActionAndExportButton}}`,
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
name: this.getAtomName('EXPORT_DROPDOWN'),
|
|
281
|
-
component: 'ZdDropdown',
|
|
282
|
-
cssClass: 'tekgrid-actions-dropdown',
|
|
283
|
-
offsetY: true,
|
|
284
|
-
activator: {
|
|
285
|
-
name: this.getAtomName('EXPORT_BUTTON'),
|
|
286
|
-
component: 'ZdButton',
|
|
287
|
-
icon: true,
|
|
288
|
-
iconName: 'mdi-file-download-outline',
|
|
289
|
-
isVisible: `{{GridController_${this.grid.name}.showExportButton}}`,
|
|
290
|
-
},
|
|
291
|
-
children: this.grid.exportActions || exportConfigButtons,
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
name: this.getAtomName('ACTIONS_DROPDOWN'),
|
|
295
|
-
component: 'ZdDropdown',
|
|
296
|
-
cssClass: 'tekgrid-actions-dropdown',
|
|
297
|
-
offsetY: true,
|
|
298
|
-
activator: {
|
|
299
|
-
name: this.getAtomName('ACTIONS_BUTTON'),
|
|
300
|
-
component: 'ZdButton',
|
|
301
|
-
icon: true,
|
|
302
|
-
iconName: 'mdi-dots-vertical',
|
|
303
|
-
isVisible: `{{GridController_${this.grid.name}.showActionsButton}}`,
|
|
304
|
-
},
|
|
305
|
-
children: this.grid.actions,
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
name: this.getAtomName('DIVIDER3'),
|
|
309
|
-
component: 'ZdDivider',
|
|
310
|
-
cssClass: 'toolbar-divider',
|
|
311
|
-
vertical: true,
|
|
312
|
-
isVisible: `{{GridController_${this.grid.name}.showDivider3}}`,
|
|
313
|
-
},
|
|
314
|
-
],
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
name: this.getAtomName('SAVE_BUTTON'),
|
|
318
|
-
component: 'ZdButton',
|
|
319
|
-
label: 'TEKGRID_SAVE',
|
|
320
|
-
isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
|
|
321
|
-
small: true,
|
|
322
|
-
events: {
|
|
323
|
-
click: this.saveChanges.bind(this),
|
|
324
|
-
},
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
name: this.getAtomName('CANCEL_BUTTON'),
|
|
328
|
-
component: 'ZdButton',
|
|
329
|
-
label: 'TEKGRID_CANCEL',
|
|
330
|
-
outline: true,
|
|
331
|
-
cssClass: 'zd-mx-2',
|
|
332
|
-
isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
|
|
333
|
-
small: true,
|
|
334
|
-
events: {
|
|
335
|
-
click: this.cancelChanges.bind(this),
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
name: this.getAtomName('SEARCH'),
|
|
340
|
-
component: 'ZdSearch',
|
|
341
|
-
cssClass: 'zd-grid-search',
|
|
342
|
-
iterableComponentName: `${this.grid.name}`,
|
|
343
|
-
isVisible: `{{GridController_${this.grid.name}.showSearchInput}}`,
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
name: this.getAtomName('FILTER_TOOLTIP'),
|
|
347
|
-
component: 'ZdTooltip',
|
|
348
|
-
label: 'TEKGRID_FILTER',
|
|
349
|
-
bottom: true,
|
|
350
|
-
children: [
|
|
351
|
-
{
|
|
352
|
-
name: this.getAtomName('FILTER_BUTTON'),
|
|
353
|
-
component: 'TekGridFilterButton',
|
|
354
|
-
grid: this.grid,
|
|
355
|
-
gridName: this.grid.name,
|
|
356
|
-
showCheckboxAll: this.grid.showCheckboxAllFilter,
|
|
357
|
-
isVisible: `{{GridController_${this.grid.name}.showFilterButton}}`,
|
|
358
|
-
},
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
],
|
|
362
|
-
},
|
|
363
|
-
];
|
|
364
|
-
}
|
|
365
|
-
}
|