@zeedhi/teknisa-components-common 3.1.0 → 3.3.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.
Files changed (128) hide show
  1. package/dist/teknisa-components-common.es.js +3537 -0
  2. package/dist/teknisa-components-common.es.js.map +1 -0
  3. package/dist/types/components/tek-breadcrumb-header/breadcrumb-header.d.ts +2 -2
  4. package/dist/types/components/tek-breadcrumb-header/interfaces.d.ts +1 -1
  5. package/dist/types/components/tek-datasource/tek-memory-datasource.d.ts +1 -21
  6. package/dist/types/components/tek-datasource/tek-rest-datasource.d.ts +6 -28
  7. package/dist/types/components/tek-grid/filter-helper.d.ts +2 -2
  8. package/dist/types/components/tek-grid/grid-filter-button.d.ts +1 -0
  9. package/dist/types/components/tek-grid/grouped-data-manager.d.ts +8 -1
  10. package/dist/types/components/tek-grid/interfaces.d.ts +8 -1
  11. package/dist/types/components/tek-grid/tek-grid-controller.d.ts +19 -17
  12. package/dist/types/components/tek-grid/tek-grid-data-editor.d.ts +11 -0
  13. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.d.ts +1 -1
  14. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.d.ts +8 -1
  15. package/dist/types/components/tek-grid/tek-grid.d.ts +22 -5
  16. package/dist/types/components/tek-loading/interfaces.d.ts +1 -1
  17. package/dist/types/components/tek-loading/loading.d.ts +1 -1
  18. package/dist/types/components/tek-user-info/TekUserInfoController.d.ts +4 -4
  19. package/dist/types/utils/extract-properties/extract-properties.d.ts +1 -0
  20. package/dist/types/utils/index.d.ts +2 -0
  21. package/dist/types/utils/report-filter/report-filter.d.ts +12 -0
  22. package/package.json +30 -12
  23. package/coverage/clover.xml +0 -6
  24. package/coverage/coverage-final.json +0 -1
  25. package/coverage/lcov-report/base.css +0 -224
  26. package/coverage/lcov-report/block-navigation.js +0 -87
  27. package/coverage/lcov-report/favicon.png +0 -0
  28. package/coverage/lcov-report/index.html +0 -101
  29. package/coverage/lcov-report/prettify.css +0 -1
  30. package/coverage/lcov-report/prettify.js +0 -2
  31. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  32. package/coverage/lcov-report/sorter.js +0 -210
  33. package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +0 -100
  34. package/coverage/lcov-report/tests/__helpers__/create-component.ts.html +0 -109
  35. package/coverage/lcov-report/tests/__helpers__/find-component.ts.html +0 -139
  36. package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +0 -94
  37. package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +0 -166
  38. package/coverage/lcov-report/tests/__helpers__/index.html +0 -221
  39. package/coverage/lcov-report/tests/__helpers__/index.ts.html +0 -106
  40. package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +0 -121
  41. package/coverage/lcov-report/tests/__helpers__/spy-on-all-methods.ts.html +0 -223
  42. package/coverage/lcov.info +0 -0
  43. package/dist/teknisa-components-common.js +0 -3808
  44. package/dist/teknisa-components-common.min.js +0 -3808
  45. package/dist/types/components/tek-grid/grouped-view-navigator.d.ts +0 -14
  46. package/environments.json +0 -26
  47. package/jest.config.cjs +0 -23
  48. package/src/components/index.ts +0 -101
  49. package/src/components/tek-breadcrumb-header/breadcrumb-header.ts +0 -29
  50. package/src/components/tek-breadcrumb-header/interfaces.ts +0 -7
  51. package/src/components/tek-datasource/index.ts +0 -3
  52. package/src/components/tek-datasource/interfaces.ts +0 -36
  53. package/src/components/tek-datasource/tek-memory-datasource.ts +0 -314
  54. package/src/components/tek-datasource/tek-rest-datasource.ts +0 -224
  55. package/src/components/tek-grid/columns-searcher.ts +0 -22
  56. package/src/components/tek-grid/dynamic-filter-datasource-factory.ts +0 -20
  57. package/src/components/tek-grid/filter-helper.ts +0 -20
  58. package/src/components/tek-grid/grid-filter-button.ts +0 -421
  59. package/src/components/tek-grid/grouped-data-manager.ts +0 -448
  60. package/src/components/tek-grid/grouped-data-navigator.ts +0 -66
  61. package/src/components/tek-grid/grouped-data-selector.ts +0 -40
  62. package/src/components/tek-grid/index.ts +0 -18
  63. package/src/components/tek-grid/interfaces.ts +0 -329
  64. package/src/components/tek-grid/keymap-grouped.ts +0 -20
  65. package/src/components/tek-grid/layout-options.ts +0 -248
  66. package/src/components/tek-grid/tek-grid-column.ts +0 -193
  67. package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts +0 -28
  68. package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts +0 -38
  69. package/src/components/tek-grid/tek-grid-controller.ts +0 -140
  70. package/src/components/tek-grid/tek-grid-events.ts +0 -105
  71. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts +0 -26
  72. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts +0 -3
  73. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.ts +0 -6
  74. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts +0 -85
  75. package/src/components/tek-grid/tek-grid-toolbar-provider/index.ts +0 -2
  76. package/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts +0 -365
  77. package/src/components/tek-grid/tek-grid.ts +0 -1122
  78. package/src/components/tek-loading/interfaces.ts +0 -7
  79. package/src/components/tek-loading/loading.ts +0 -27
  80. package/src/components/tek-user-info/TekUserInfoController.ts +0 -87
  81. package/src/components/tek-user-info/interfaces.ts +0 -21
  82. package/src/components/tek-user-info/tek-user-info-list.ts +0 -64
  83. package/src/components/tek-user-info/tek-user-info.ts +0 -337
  84. package/src/error/tek-grid-delete-rows-error.ts +0 -15
  85. package/src/error/teknisa-common-error.ts +0 -8
  86. package/src/utils/config/config.ts +0 -8
  87. package/src/utils/index.ts +0 -3
  88. package/src/utils/is-filled-object/is-filled-object.ts +0 -5
  89. package/src/utils/is-nil.ts +0 -3
  90. package/tests/__helpers__/component-event-helper.ts +0 -5
  91. package/tests/__helpers__/create-component.ts +0 -8
  92. package/tests/__helpers__/find-component.ts +0 -18
  93. package/tests/__helpers__/flush-promises-helper.ts +0 -3
  94. package/tests/__helpers__/get-child-helper.ts +0 -27
  95. package/tests/__helpers__/index.ts +0 -7
  96. package/tests/__helpers__/mock-created-helper.ts +0 -12
  97. package/tests/__helpers__/spy-on-all-methods.ts +0 -46
  98. package/tests/__mocks__/@zeedhi/core/i18n.js +0 -75
  99. package/tests/__mocks__/@zeedhi/core.js +0 -5
  100. package/tests/unit/components/tek-breadcrumb-header/tek-breadcrumb-header.spec.ts +0 -43
  101. package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +0 -463
  102. package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +0 -362
  103. package/tests/unit/components/tek-grid/button-option.spec.ts +0 -49
  104. package/tests/unit/components/tek-grid/columns-searcher.spec.ts +0 -112
  105. package/tests/unit/components/tek-grid/dynamic-filter-datasource-factory.spec.ts +0 -90
  106. package/tests/unit/components/tek-grid/filter-helper.spec.ts +0 -56
  107. package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +0 -842
  108. package/tests/unit/components/tek-grid/grouped-data-manager.spec.ts +0 -593
  109. package/tests/unit/components/tek-grid/grouped-data-navigator.spec.ts +0 -143
  110. package/tests/unit/components/tek-grid/grouped-data-selector.spec.ts +0 -136
  111. package/tests/unit/components/tek-grid/keymap-grouped.spec.ts +0 -20
  112. package/tests/unit/components/tek-grid/layout-options.spec.ts +0 -1020
  113. package/tests/unit/components/tek-grid/tek-grid-column.spec.ts +0 -318
  114. package/tests/unit/components/tek-grid/tek-grid-columns-button.spec.ts +0 -229
  115. package/tests/unit/components/tek-grid/tek-grid-controller.spec.ts +0 -253
  116. package/tests/unit/components/tek-grid/tek-grid-events.spec.ts +0 -186
  117. package/tests/unit/components/tek-grid/tek-grid-toolbar-provider.spec.ts +0 -34
  118. package/tests/unit/components/tek-grid/tek-grid.spec.ts +0 -897
  119. package/tests/unit/components/tek-grid/tek-memory-datasource.spec.ts +0 -482
  120. package/tests/unit/components/tek-grid/tek-rest-datasource.spec.ts +0 -422
  121. package/tests/unit/components/tek-loading/loading.spec.ts +0 -29
  122. package/tests/unit/components/tek-user-info/TekUserInfoContoller.spec.ts +0 -220
  123. package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +0 -96
  124. package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +0 -442
  125. package/tests/unit/utils/mock-console.ts +0 -18
  126. package/tests/unit/utils/setup.ts +0 -5
  127. package/tsconfig.build.json +0 -7
  128. package/tsconfig.eslint.json +0 -9
@@ -1,1122 +0,0 @@
1
- import {
2
- Accessor,
3
- Config,
4
- Datasource,
5
- DatasourceFactory,
6
- I18n,
7
- IDictionary,
8
- IEventParam,
9
- Loader,
10
- Messages,
11
- } from '@zeedhi/core';
12
- import clonedeep from 'lodash.clonedeep';
13
- import {
14
- Direction,
15
- IDataNavigator,
16
- IDataSelector,
17
- IGrid,
18
- IIterableTable,
19
- IKeyMapMerger,
20
- ITableActionBuilder,
21
- IterableTable,
22
- KeyMapMerger,
23
- KeyMapNavigation,
24
- TableActionBuilder,
25
- VerticalDirection, IComponent, IComponentRender, DataEditorWithAdd, IDataEditorWithAdd, IGridColumnEditable, IGridEditable,
26
- KeyMapEditing, Iterable, IIterableProps, ViewNavigator,
27
- } from '@zeedhi/common';
28
- import {
29
- IColumnsSearcher,
30
- IGroupedDataManager,
31
- IModalFilterProps,
32
- ITekGrid,
33
- ITekGridAtoms,
34
- ITekGridColumn,
35
- ITekGridEvents,
36
- ITekGridExportConfig,
37
- ITekGridProps,
38
- ITekGridSummary,
39
- ITekGridToolbarProvider,
40
- } from './interfaces';
41
- import { KeyMapGrouped } from './keymap-grouped';
42
- import { TekMemoryDatasource } from '../tek-datasource/tek-memory-datasource';
43
- import { TekRestDatasource } from '../tek-datasource/tek-rest-datasource';
44
- import { TekGridColumn } from './tek-grid-column';
45
- import { TekGridController } from './tek-grid-controller';
46
- import { TekGridEvents } from './tek-grid-events';
47
- import { ColumnsSearcher } from './columns-searcher';
48
- import { DynamicFilterDatasourceFactory } from './dynamic-filter-datasource-factory';
49
- import { GroupedDataManager } from './grouped-data-manager';
50
- import { GroupedDataSelector } from './grouped-data-selector';
51
- import { GroupedDataNavigator } from './grouped-data-navigator';
52
- import { ITekConfig } from '../../utils';
53
- import { TekGridToolbarProvider } from './tek-grid-toolbar-provider/tek-grid-toolbar-provider';
54
-
55
- /* TekGrid Class */
56
- export class TekGrid extends Iterable<TekGridColumn> implements ITekGrid {
57
- private tableActionBuilder: ITableActionBuilder;
58
-
59
- private iterableTable: IIterableTable;
60
-
61
- private dataSelector: IDataSelector;
62
-
63
- private tekGridEvents: ITekGridEvents;
64
-
65
- private dataNavigator: IDataNavigator;
66
-
67
- private viewNavigator: ViewNavigator;
68
-
69
- private keyMapMerger!: IKeyMapMerger;
70
-
71
- private dataEditor: IDataEditorWithAdd;
72
-
73
- private columnsSearcher: IColumnsSearcher;
74
-
75
- private groupedDataManager: IGroupedDataManager;
76
-
77
- private tekGridToolbarProvider: ITekGridToolbarProvider;
78
-
79
- /* Grid Title */
80
- public title = '';
81
-
82
- /* Show Add button */
83
- public addButton = false;
84
-
85
- /* Show Delete button */
86
- public deleteButton: 'none' | 'currentRow' | 'selection' = 'none';
87
-
88
- /* Show Delete button */
89
- public actions: IComponentRender[] = [];
90
-
91
- /* Show edit button */
92
- public showEditButtons = true;
93
-
94
- /* Show Filter button */
95
- public filterButton = false;
96
-
97
- /* Show SearchInput */
98
- public showSearch = true;
99
-
100
- /* Show Column Filter button */
101
- public columnFilterButton = false;
102
-
103
- /* Show Columns button */
104
- public columnsButton = false;
105
-
106
- /* Defines if the grid is the unique grid on screen */
107
- public mainGrid = true;
108
-
109
- /* Columns to be ignored on columns button */
110
- public columnsButtonIgnore: string[] = [];
111
-
112
- /**
113
- * Enables column dragging
114
- * @public
115
- */
116
- public dragColumns = true;
117
-
118
- /**
119
- * Enables column resizing
120
- * @public
121
- */
122
- public resizeColumns = true;
123
-
124
- /**
125
- * Enables layout saving
126
- * @public
127
- */
128
- public showLayoutOptions = true;
129
-
130
- public xlsDefaultType?: string;
131
-
132
- public modalFilterProps: IModalFilterProps = {
133
- name: this.name,
134
- height: 'auto',
135
- persistent: true,
136
- cssClass: '',
137
- cssStyle: '',
138
- dark: false,
139
- draggable: false,
140
- fullscreen: false,
141
- dragHandle: '',
142
- title: 'FILTER',
143
- };
144
-
145
- /**
146
- * Show export button
147
- */
148
- public showExport = false;
149
-
150
- /**
151
- * Show refresh button
152
- */
153
- public showReload = true;
154
-
155
- /**
156
- * Export config
157
- */
158
- public exportConfig: ITekGridExportConfig[] = [
159
- {
160
- type: 'pdf',
161
- label: I18n.translate('TEKGRID_EXPORT_AS', { type: 'PDF' }),
162
- multiOption: [
163
- { label: I18n.translate('TEKGRID_PORTRAIT'), iconName: 'mdi-file-outline' },
164
- {
165
- label: I18n.translate('TEKGRID_LANDSCAPE'),
166
- iconName: 'mdi-file-outline',
167
- cssClass: 'tek-grid-export-landscape',
168
- reportParams: { portrait: false },
169
- },
170
- ],
171
- },
172
- {
173
- type: 'xls',
174
- label: I18n.translate('TEKGRID_EXPORT_AS', {
175
- type: 'XLS',
176
- }),
177
- },
178
- {
179
- type: 'xls2',
180
- label: I18n.translate('TEKGRID_EXPORT_AS', {
181
- type: `XLS ${I18n.translate('TEKGRID_WITH_GROUPS')}`,
182
- }),
183
- },
184
- {
185
- type: 'xls3',
186
- label: I18n.translate('TEKGRID_EXPORT_AS', {
187
- type: `XLS ${I18n.translate('TEKGRID_GRID_MIRROR')}`,
188
- }),
189
- },
190
- {
191
- type: 'csv',
192
- label: I18n.translate('TEKGRID_EXPORT_AS', { type: 'CSV' }),
193
- },
194
- ];
195
-
196
- /**
197
- * Actions to overwrite the default export config
198
- */
199
- public exportActions?: IComponentRender[];
200
-
201
- /**
202
- * Groups should be opened by default after building
203
- */
204
- public groupsOpened = false;
205
-
206
- /**
207
- * Show Total summary
208
- */
209
- public showSummaryTotal = true;
210
-
211
- public editNewRowsOnly = false;
212
-
213
- protected keyShortcutKeyMapping: any;
214
-
215
- public showCheckboxAllFilter: boolean = (Config as ITekConfig).gridShowCheckboxAllFilter || false;
216
-
217
- public defaultFilter: IDictionary = {};
218
-
219
- public toolbarOpened = true;
220
-
221
- public reportTitle = '';
222
-
223
- editing = false;
224
-
225
- currentColumn: TekGridColumn | null = null;
226
-
227
- selectedRows: IDictionary<any>[] = [];
228
-
229
- selectionState: { allSelected: boolean; except: IDictionary<any>[] } = {
230
- allSelected: false,
231
- except: [],
232
- };
233
-
234
- rowStyleConditions?: (row: IDictionary) => IDictionary;
235
-
236
- selectAllPages: boolean = Config.gridSelectAllPages;
237
-
238
- selectable = false;
239
-
240
- disableSelection?: (args: { row: IDictionary<any>; component: IGrid }) => boolean;
241
-
242
- cellSelection = false;
243
-
244
- toolbarSlot: IComponentRender[] = [{ name: '<<NAME>>_gridSearch', component: 'ZdSearch' }];
245
-
246
- footerSlot: IComponentRender[] = [
247
- { name: '<<NAME>>_iterablePagination', component: 'ZdIterablePagination' },
248
- {
249
- name: '<<NAME>>_iterableInfoDiv',
250
- component: 'ZdTag',
251
- cssClass: 'zd-grid-div-footer',
252
- tag: 'div',
253
- children: [
254
- {
255
- name: '<<NAME>>_iterablePageSize',
256
- component: 'ZdIterablePageSize',
257
- iterableComponentName: '<<NAME>>',
258
- },
259
- {
260
- name: '<<NAME>>_iterablePageInfo',
261
- component: 'ZdIterablePageInfo',
262
- iterableComponentName: '<<NAME>>',
263
- },
264
- ],
265
- },
266
- ];
267
-
268
- noResultsText = 'NO_RESULT';
269
-
270
- noResultSlot: IComponentRender[] = [
271
- {
272
- name: '<<NAME>>_no-result',
273
- component: 'ZdText',
274
- cssClass: 'no-result',
275
- text: this.noResultsText,
276
- },
277
- ];
278
-
279
- errorSlot: IComponentRender[] = [];
280
-
281
- dense = true;
282
-
283
- headerBackground = '';
284
-
285
- headerCellTextColor = '';
286
-
287
- height: string | number = 'auto';
288
-
289
- loadingText = 'LOADING';
290
-
291
- maxHeight: string | number = 'none';
292
-
293
- maxWidth: string | number = 'none';
294
-
295
- minHeight: string | number = 'auto';
296
-
297
- minWidth: string | number = 'auto';
298
-
299
- noDataText = 'NO_DATA';
300
-
301
- noDataSlot: IComponentRender[] = [
302
- {
303
- name: '<<NAME>>_no-data',
304
- component: 'ZdText',
305
- cssClass: 'no-data',
306
- text: this.noDataText,
307
- },
308
- ];
309
-
310
- showFooter = true;
311
-
312
- showHeader = true;
313
-
314
- showSelectAll = true;
315
-
316
- width: string | number = '100%';
317
-
318
- backgroundColor = 'transparent';
319
-
320
- canEditRow?: ((args: { row: IDictionary<any>; component: IGridEditable }) => boolean) | undefined;
321
-
322
- showCancelColumn = false;
323
-
324
- doubleClickEdit = false;
325
-
326
- singleEdit = false;
327
-
328
- editingNewRows = false;
329
-
330
- private defaultLazy = false;
331
-
332
- private toolbarSlotProps = false;
333
-
334
- public filterRelationsDatasource?: Datasource;
335
-
336
- public filterOperationsDatasource?: Datasource;
337
-
338
- /**
339
- * TekGrid class constructor
340
- * @param props TekGrid properties
341
- */
342
- constructor(props: ITekGridProps) {
343
- super(props);
344
- this.title = this.getInitValue('title', props.title, this.title);
345
- this.addButton = this.getInitValue('addButton', props.addButton, this.addButton);
346
- this.deleteButton = this.getInitValue('deleteButton', props.deleteButton, this.deleteButton);
347
- this.filterButton = this.getInitValue('filterButton', props.filterButton, this.filterButton);
348
- this.showSearch = this.getInitValue('showSearch', props.showSearch, this.showSearch);
349
- this.columnFilterButton = this.getInitValue(
350
- 'columnFilterButton',
351
- props.columnFilterButton,
352
- this.columnFilterButton,
353
- );
354
- this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
355
- this.columnsButtonIgnore = this.getInitValue(
356
- 'columnsButtonIgnore',
357
- props.columnsButtonIgnore,
358
- this.columnsButtonIgnore,
359
- );
360
- this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
361
- this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
362
- this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
363
- this.showLayoutOptions = this.getInitValue('showLayoutOptions', props.showLayoutOptions, this.showLayoutOptions);
364
- this.xlsDefaultType = this.getInitValue('xlsDefaultType', props.xlsDefaultType, this.xlsDefaultType);
365
- this.showExport = this.getInitValue('showExport', props.showExport, this.showExport);
366
- this.showReload = this.getInitValue('showReload', props.showReload, this.showReload);
367
- this.exportConfig = this.getInitValue('exportConfig', props.exportConfig, this.exportConfig);
368
- this.modalFilterProps = this.getInitValue('modalFilterProps', props.modalFilterProps, this.modalFilterProps);
369
- this.exportActions = props.exportActions || this.exportActions;
370
- this.groupsOpened = this.getInitValue('groupsOpened', props.groupsOpened, this.groupsOpened);
371
- this.showSummaryTotal = this.getInitValue('showSummaryTotal', props.showSummaryTotal, this.showSummaryTotal);
372
- this.showCheckboxAllFilter = this.getInitValue(
373
- 'showCheckboxAllFilter',
374
- props.showCheckboxAllFilter,
375
- this.showCheckboxAllFilter,
376
- );
377
- this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
378
- this.toolbarOpened = this.getInitValue('toolbarOpened', props.toolbarOpened, this.toolbarOpened);
379
- this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
380
- this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
381
- this.reportTitle = this.getInitValue('reportTitle', props.reportTitle, this.reportTitle);
382
- this.actions = props.actions || this.actions;
383
- this.toolbarSlotProps = props.toolbarSlot !== undefined;
384
-
385
- this.cellSelection = this.getInitValue('cellSelection', props.cellSelection, this.cellSelection);
386
- this.dense = this.getInitValue('dense', props.dense, this.dense);
387
- this.disableSelection = this.getInitValue('disableSelection', props.disableSelection, this.disableSelection);
388
- this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
389
- this.fillHeight = this.getInitValue('fillHeight', props.fillHeight, this.fillHeight);
390
- this.headerCellTextColor = this.getInitValue(
391
- 'headerCellTextColor',
392
- props.headerCellTextColor,
393
- this.headerCellTextColor,
394
- );
395
- this.height = this.getInitValue('height', props.height, this.height);
396
- this.loadingText = this.getInitValue('loadingText', props.loadingText, this.loadingText);
397
- this.maxHeight = this.getInitValue('maxHeight', props.maxHeight, this.maxHeight);
398
- this.maxWidth = this.getInitValue('maxWidth', props.maxWidth, this.maxWidth);
399
- this.minHeight = this.getInitValue('minHeight', props.minHeight, this.minHeight);
400
- this.minWidth = this.getInitValue('minWidth', props.minWidth, this.minWidth);
401
- this.noDataText = this.getInitValue('noDataText', props.noDataText, this.noDataText);
402
- this.noResultsText = this.getInitValue('noResultsText', props.noResultsText, this.noResultsText);
403
- this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
404
- this.rowStyleConditions = this.getInitValue(
405
- 'rowStyleConditions',
406
- props.rowStyleConditions,
407
- this.rowStyleConditions,
408
- );
409
- this.selectable = this.getInitValue('selectable', props.selectable, this.selectable);
410
- this.selectAllPages = this.getInitValue('selectAllPages', props.selectAllPages, this.selectAllPages);
411
- this.showFooter = this.getInitValue('showFooter', props.showFooter, this.showFooter);
412
- this.showHeader = this.getInitValue('showHeader', props.showHeader, this.showHeader);
413
- this.showSelectAll = this.getInitValue('showSelectAll', props.showSelectAll, this.showSelectAll);
414
- this.width = this.getInitValue('width', props.width, this.width);
415
- this.backgroundColor = this.getInitValue('backgroundColor', props.backgroundColor, this.backgroundColor);
416
- // headerBackground defaults to the backgroundColor, unless backgroundColor is transparent
417
- const defaultHeaderBackground = this.backgroundColor === 'transparent' ? '' : this.backgroundColor;
418
- this.headerBackground = this.getInitValue('headerBackground', props.headerBackground, defaultHeaderBackground);
419
- this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
420
- this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
421
- this.showCancelColumn = this.getInitValue('showCancelColumn', props.showCancelColumn, this.showCancelColumn);
422
- this.canEditRow = this.getInitValue('canEditRow', props.canEditRow, this.canEditRow);
423
- this.editingNewRows = this.getInitValue('editingNewRows', props.editingNewRows, this.editingNewRows);
424
-
425
- this.toolbarSlot = props.toolbarSlot || this.toolbarSlot;
426
- this.footerSlot = props.footerSlot || this.footerSlot;
427
- this.noDataSlot = props.noDataSlot || this.noDataSlot;
428
- this.noResultSlot = props.noResultSlot || this.noResultSlot;
429
- this.errorSlot = props.errorSlot || this.errorSlot;
430
- this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot);
431
- this.footerSlot = this.changeDefaultSlotNames(this.footerSlot);
432
- this.toolbarSlot = this.changeDefaultSlotNames(this.toolbarSlot);
433
- this.noResultSlot = this.changeDefaultSlotNames(this.noResultSlot);
434
- this.errorSlot = this.changeDefaultSlotNames(this.errorSlot);
435
-
436
- this.defaultLazy = this.getDefaultLazy(props);
437
-
438
- if (this.deleteButton === 'selection') {
439
- this.selectable = true;
440
- }
441
-
442
- this.tableActionBuilder = new TableActionBuilder(this);
443
- this.iterableTable = new IterableTable(this);
444
- this.dataSelector = new GroupedDataSelector(this);
445
- this.tekGridEvents = new TekGridEvents(this);
446
- this.dataNavigator = new GroupedDataNavigator(this);
447
- this.viewNavigator = new ViewNavigator();
448
- this.dataEditor = new DataEditorWithAdd(this);
449
- this.columnsSearcher = new ColumnsSearcher();
450
- this.groupedDataManager = new GroupedDataManager(this);
451
- this.tekGridToolbarProvider = new TekGridToolbarProvider(this, 'show');
452
- }
453
-
454
- protected initializeDatasource(props: IIterableProps) {
455
- let datasourceProps = clonedeep(props.datasource);
456
- // if using accessor, get props from the controller
457
- if (typeof props.datasource === 'string' && Accessor.isAccessorDefinition(props.datasource)) {
458
- const [controller, accessor] = Accessor.getAccessor(props.datasource);
459
- const instance = Loader.getInstance(controller);
460
- datasourceProps = instance[accessor];
461
- }
462
- this.datasource = DatasourceFactory.factory({
463
- ...datasourceProps,
464
- searchIn: props.datasource?.searchIn || (`{{IterableController_${this.name}.searchIn}}` as any),
465
- lazyLoad: true,
466
- });
467
- }
468
-
469
- public columnHasFilter(columnName: string): boolean {
470
- return this.datasource.hasFilter(columnName);
471
- }
472
-
473
- public registerTask(task: Promise<any>) {
474
- this.groupedDataManager.registerTask(task);
475
- }
476
-
477
- public async loadAfterTasks() {
478
- return this.groupedDataManager.loadAfterTasks();
479
- }
480
-
481
- calcSummary(column: TekGridColumn, columnNamesummary: ITekGridSummary, row: IDictionary): void {
482
- this.tekGridEvents.calcSummary(column, columnNamesummary, row);
483
- }
484
-
485
- private getDefaultLazy(props: ITekGridProps) {
486
- if (typeof props.datasource === 'object') {
487
- return props.datasource.lazyLoad;
488
- }
489
-
490
- if (typeof props.datasource === 'string' && Accessor.isAccessorDefinition(props.datasource)) {
491
- const [controller, accessor] = Accessor.getAccessor(props.datasource);
492
- const instance = Loader.getInstance(controller);
493
- return instance[accessor].lazyLoad || false;
494
- }
495
-
496
- return false;
497
- }
498
-
499
- initializeGrouping(lazyLoad: boolean): void {
500
- this.groupedDataManager.initializeGrouping(lazyLoad);
501
- }
502
-
503
- updateGrouping() {
504
- return this.groupedDataManager.updateGrouping();
505
- }
506
-
507
- updateGroupedData(lazyLoad: boolean): Promise<void> {
508
- return this.groupedDataManager.updateGroupedData(lazyLoad);
509
- }
510
-
511
- buildGroupedData(): void {
512
- this.groupedDataManager.buildGroupedData();
513
- }
514
-
515
- openGroup(group: IDictionary<any>): void {
516
- this.groupedDataManager.openGroup(group);
517
- }
518
-
519
- isItemVisible(row: IDictionary<any>) {
520
- return this.groupedDataManager.isItemVisible(row);
521
- }
522
-
523
- isGrouped(): boolean {
524
- return this.groupedDataManager.isGrouped();
525
- }
526
-
527
- isColumnSearchable(column: TekGridColumn): boolean {
528
- return this.groupedDataManager.isColumnSearchable(column);
529
- }
530
-
531
- getGroupedData(): IDictionary<any>[] {
532
- return this.groupedDataManager.getGroupedData();
533
- }
534
-
535
- directionalLeft(param: IEventParam<any>): void {
536
- this.groupedDataManager.directionalLeft(param);
537
- this.viewNavigator.navigateLeft(param);
538
- }
539
-
540
- directionalRight(param: IEventParam<any>): void {
541
- this.groupedDataManager.directionalRight(param);
542
- this.viewNavigator.navigateRight(param);
543
- }
544
-
545
- getReport(): Promise<Window | null> {
546
- throw new Error('Method not implemented.');
547
- }
548
-
549
- setViewUpdateFixedColumns(fn: () => void) {
550
- this.groupedDataManager.setViewUpdateFixedColumns(fn);
551
- }
552
-
553
- setViewUpdateScrollData(fn: () => void): void {
554
- this.groupedDataManager.setViewUpdateScrollData(fn);
555
- }
556
-
557
- public onCreated(): void {
558
- this.createGridController();
559
- this.addCancelColumn();
560
- super.onCreated();
561
-
562
- Loader.addController(`GridController_${this.name}`, TekGridController, [this]);
563
- if (!this.toolbarSlotProps) this.toolbarSlot = this.tekGridToolbarProvider.getProperties();
564
-
565
- this.createDynamicFilterDatasources();
566
- }
567
-
568
- private createDynamicFilterDatasources() {
569
- if (!(this.datasource instanceof TekRestDatasource || this.datasource instanceof TekMemoryDatasource)) return;
570
-
571
- const datasourceFactory = new DynamicFilterDatasourceFactory();
572
- this.filterRelationsDatasource = datasourceFactory.factory(this.datasource.dynamicFilterRelations);
573
- this.filterOperationsDatasource = datasourceFactory.factory(this.datasource.dynamicFilterOperations);
574
- }
575
-
576
- public onMounted(element: HTMLElement): void {
577
- super.onMounted(element);
578
- this.keyMapMerger = new KeyMapMerger(this, [KeyMapNavigation, KeyMapEditing, KeyMapGrouped]);
579
- this.keyMapMerger.bind(element);
580
-
581
- this.initializeGrouping(this.defaultLazy);
582
- }
583
-
584
- public onBeforeDestroy(): void {
585
- super.onBeforeDestroy();
586
- this.keyMapMerger.unbind();
587
- }
588
-
589
- public createColumn(column: ITekGridColumn): TekGridColumn {
590
- return new TekGridColumn(column, this);
591
- }
592
-
593
- getConditionalProps({ row, column }: { row: IDictionary; column: TekGridColumn }): Partial<IComponentRender> {
594
- const rowStyle = this.getRowStyleConditions(row);
595
- const cellsApplied = this.getAppliedConditions({ row, column });
596
-
597
- return { ...rowStyle, ...cellsApplied };
598
- }
599
-
600
- changeOrder(sortBy: { key: string; order: 'asc' | 'desc' }[]): Promise<void> {
601
- return this.iterableTable.changeOrder(sortBy);
602
- }
603
-
604
- selectCell(row: IDictionary, column: TekGridColumn): void {
605
- this.iterableTable.selectCell(row, column);
606
- }
607
-
608
- reapplyRowStyleConditions(row: IDictionary): IDictionary {
609
- return this.iterableTable.reapplyRowStyleConditions(row);
610
- }
611
-
612
- getRowStyleConditions(row: IDictionary): IDictionary {
613
- return this.iterableTable.getRowStyleConditions(row);
614
- }
615
-
616
- deleteRows(): Promise<any[]> {
617
- return this.iterableTable.deleteRows();
618
- }
619
-
620
- selectAll(isSelected: boolean): void {
621
- this.dataSelector.selectAll(isSelected);
622
- }
623
-
624
- toggleRow(row: IDictionary): void {
625
- this.dataSelector.toggleRow(row);
626
- }
627
-
628
- selectRow(row: IDictionary, select: boolean): void {
629
- this.dataSelector.selectRow(row, select);
630
- }
631
-
632
- callDisableSelection(row: IDictionary): boolean {
633
- return this.dataSelector.callDisableSelection(row);
634
- }
635
-
636
- selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element?: HTMLElement): void {
637
- this.dataSelector.selectClick(row, isSelected, event, element);
638
- }
639
-
640
- selectAllClick(isSelected: boolean, event: Event, element?: HTMLElement): void {
641
- this.dataSelector.selectAllClick(isSelected, event, element);
642
- }
643
-
644
- navigatePageUp(): void {
645
- this.dataNavigator.navigatePageUp();
646
- }
647
-
648
- navigatePageDown(): void {
649
- this.dataNavigator.navigatePageDown();
650
- }
651
-
652
- setViewNavigate(viewNavigate: (direction: Direction, event?: Event) => void): void {
653
- this.viewNavigator.setViewNavigate(viewNavigate);
654
- }
655
-
656
- navigateLeft(params: IEventParam<any>): void {
657
- if (!this.cellSelection) return;
658
- this.viewNavigator.navigateLeft(params);
659
- }
660
-
661
- navigateRight(params: IEventParam<any>): void {
662
- if (!this.cellSelection) return;
663
- this.viewNavigator.navigateRight(params);
664
- }
665
-
666
- navigateUp(): void {
667
- this.viewNavigator.navigateUp();
668
- }
669
-
670
- navigateDown(): void {
671
- this.viewNavigator.navigateDown();
672
- }
673
-
674
- navigateDatasource(direction: VerticalDirection): void {
675
- this.dataNavigator.navigateDatasource(direction);
676
- }
677
-
678
- getActionComponent(
679
- actionComponent: IComponent,
680
- column: TekGridColumn,
681
- row: IDictionary,
682
- parentPath?: string,
683
- ): IComponent {
684
- return this.tableActionBuilder.getActionComponent(actionComponent, column, row, parentPath);
685
- }
686
-
687
- createGridController(): void {
688
- this.dataEditor.createGridController();
689
- }
690
-
691
- addCancelColumn(): void {
692
- this.dataEditor.addCancelColumn();
693
- }
694
-
695
- getCancelColumnProps(): IGridColumnEditable {
696
- return this.dataEditor.getCancelColumnProps();
697
- }
698
-
699
- isAdded(row: IDictionary): boolean {
700
- return this.dataEditor.isAdded(row);
701
- }
702
-
703
- cancelAddedRow(key: string | number): Promise<any> {
704
- return this.dataEditor.cancelAddedRow(key);
705
- }
706
-
707
- cancelAddedRows(): Promise<void> {
708
- return this.dataEditor.cancelAddedRows();
709
- }
710
-
711
- getAddedRows(): IDictionary<any>[] {
712
- return this.dataEditor.getAddedRows();
713
- }
714
-
715
- addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void> {
716
- return this.dataEditor.addNewRow(row, position);
717
- }
718
-
719
- getVisibleValue(row: IDictionary, column: ITekGridColumn) {
720
- return this.dataEditor.getVisibleValue(row, column);
721
- }
722
-
723
- getEditableComponent(column: ITekGridColumn, row: IDictionary<any>): IComponentRender {
724
- return this.dataEditor.getEditableComponent(column, row);
725
- }
726
-
727
- isEdited(column: ITekGridColumn, row: IDictionary): boolean {
728
- return this.dataEditor.isEdited(column, row);
729
- }
730
-
731
- isValid(column: ITekGridColumn, row: IDictionary, revalidate?: boolean): Promise<boolean> {
732
- return this.dataEditor.isValid(column, row, revalidate);
733
- }
734
-
735
- checkValid(column: ITekGridColumn, row: IDictionary): boolean {
736
- return this.dataEditor.checkValid(column, row);
737
- }
738
-
739
- isGridValid(revalidate?: boolean): boolean {
740
- return this.dataEditor.isGridValid(revalidate);
741
- }
742
-
743
- getComponent<T>(key: string, columnName: string): T {
744
- return this.dataEditor.getComponent(key, columnName);
745
- }
746
-
747
- updateRow(newRow: IDictionary): void {
748
- this.dataEditor.updateRow(newRow);
749
- }
750
-
751
- updateCell(rowKey: string, columnName: string, value: any): void {
752
- this.dataEditor.updateCell(rowKey, columnName, value);
753
- }
754
-
755
- setViewEnterEdit(fn: ((rowKey: string, columnName: string) => void) | null): void {
756
- this.dataEditor.setViewEnterEdit(fn);
757
- }
758
-
759
- enterEdit(rowKey: string, columnName: string): void {
760
- this.dataEditor.enterEdit(rowKey, columnName);
761
- }
762
-
763
- cancelEditedRows(): Promise<void> {
764
- return this.dataEditor.cancelEditedRows();
765
- }
766
-
767
- saveEditedRows(revalidate?: boolean): Promise<void[]> {
768
- return this.dataEditor.saveEditedRows(revalidate);
769
- }
770
-
771
- reapplyCanEditRow(row: IDictionary<any>) {
772
- return this.dataEditor.reapplyCanEditRow(row);
773
- }
774
-
775
- getCanEditRow(row: IDictionary<any>): boolean | undefined {
776
- return this.dataEditor.getCanEditRow(row);
777
- }
778
-
779
- getEditedRows(revalidate?: boolean, silent?: boolean): IDictionary<any>[] {
780
- return this.dataEditor.getEditedRows(revalidate, silent);
781
- }
782
-
783
- getEditedRow(row: IDictionary): IDictionary | undefined {
784
- return this.dataEditor.getEditedRow(row);
785
- }
786
-
787
- rowClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void {
788
- this.tekGridEvents.rowClick(row, event, element);
789
- }
790
-
791
- rowDoubleClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void {
792
- this.tekGridEvents.rowDoubleClick(row, event, element);
793
- }
794
-
795
- cellDoubleClick(row: IDictionary<any>, column: TekGridColumn, event: Event, element?: HTMLElement): void {
796
- this.tekGridEvents.cellDoubleClick(row, column, event, element);
797
- }
798
-
799
- inlineEdit(row: IDictionary, column: TekGridColumn, event?: Event, element?: HTMLElement): void {
800
- this.tekGridEvents.inlineEdit(row, column, event, element);
801
- }
802
-
803
- cellClick(row: IDictionary<any>, column: TekGridColumn, event: Event, element?: HTMLElement): void {
804
- this.tekGridEvents.cellClick(row, column, event, element);
805
- }
806
-
807
- cellClickEvent(row: IDictionary<any>, column: TekGridColumn, event: Event, element?: HTMLElement): void {
808
- this.tekGridEvents.cellClickEvent(row, column, event, element);
809
- }
810
-
811
- groupRowClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void {
812
- this.tekGridEvents.groupRowClick(row, event, element);
813
- }
814
-
815
- groupRowDoubleClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void {
816
- this.tekGridEvents.groupRowDoubleClick(row, event, element);
817
- }
818
-
819
- selectGroupClick(row: IDictionary<any>, isSelected: boolean, event: Event, element?: HTMLElement): void {
820
- this.tekGridEvents.selectGroupClick(row, isSelected, event, element);
821
- }
822
-
823
- public async setSearch(search: string): Promise<any> {
824
- const { datasource } = this;
825
- if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
826
- datasource.searchJoin = await this.columnsSearcher.searchColumn(this.columns, search);
827
- }
828
-
829
- datasource.page = 1;
830
- return datasource.setSearch(search);
831
- }
832
-
833
- getAtomInstance<T>(key: keyof ITekGridAtoms) {
834
- return this.tekGridToolbarProvider.getAtomInstance<T>(key);
835
- }
836
-
837
- getAtomName(key: keyof ITekGridAtoms) {
838
- return this.tekGridToolbarProvider.getAtomName(key);
839
- }
840
- }
841
-
842
- Messages.add({
843
- 'pt-BR': {
844
- translation: {
845
- TEKGRID_CONTAINS: 'contém',
846
- TEKGRID_NOT_CONTAINS: 'não contém',
847
- TEKGRID_EQUALS: 'é igual a',
848
- TEKGRID_NOT_EQUALS: 'é diferente de',
849
- TEKGRID_GREATER_THAN: 'é maior que',
850
- TEKGRID_LESS_THAN: 'é menor que',
851
- TEKGRID_GREATER_THAN_EQUALS: 'é maior ou igual a',
852
- TEKGRID_LESS_THAN_EQUALS: 'é menor ou igual a',
853
- TEKGRID_IN: 'um dos valores',
854
- TEKGRID_NOT_IN: 'nenhum dos valores',
855
- TEKGRID_BETWEEN: 'está entre',
856
- TEKGRID_AND: 'e',
857
- TEKGRID_OR: 'ou',
858
- TEKGRID_HIDE: 'Esconder Ações',
859
- TEKGRID_SHOW: 'Mostrar Ações',
860
- TEKGRID_ADD: 'Adicionar',
861
- TEKGRID_DELETE: 'Excluir',
862
- TEKGRID_REFRESH: 'Atualizar',
863
- TEKGRID_COLUMNS: 'Colunas',
864
- TEKGRID_SAVE: 'Salvar',
865
- TEKGRID_CANCEL: 'Cancelar',
866
- TEKGRID_APPLY: 'Aplicar',
867
- TEKGRID_FILTER: 'Filtro',
868
- TEKGRID_MULTIPLE_VALUE_HINT: 'Separe valores usando ";"',
869
- TEKGRID_EXPORT: 'Exportar',
870
- TEKGRID_EXPORT_AS: 'Exportar como {{ type }}',
871
- TEKGRID_PORTRAIT: 'Retrato',
872
- TEKGRID_LANDSCAPE: 'Paisagem',
873
- TEKGRID_COLUMN_VISIBLE: 'Visível',
874
- TEKGRID_COLUMN_GROUPED: 'Grupo',
875
- TEKGRID_COLUMN_AGGREGATION: 'Totalização',
876
- TEKGRID_COLUMN_LABEL: 'Rótulo',
877
- TEKGRID_COLUMN_ALIGNMENT: 'Alinhamento',
878
- TEKGRID_COLUMN_GROUP_OPENED: 'Aberto (grupo)',
879
- TEKGRID_COLUMN_ORDER: 'Ordem',
880
- TEKGRID_COLUMN_ORDER_DIRECTION: 'Direção (ordem)',
881
- TEKGRID_AGGREGATION_SUM: 'Soma',
882
- TEKGRID_AGGREGATION_AVG: 'Média',
883
- TEKGRID_AGGREGATION_MAX: 'Máximo',
884
- TEKGRID_AGGREGATION_MIN: 'Mínimo',
885
- TEKGRID_AGGREGATION_COUNT: 'Contador',
886
- TEKGRID_MORE_OPTIONS: 'Mais opções',
887
- TEKGRID_COLUMNS_OPTIONS: 'Configuração de colunas',
888
- TEKGRID_CLOSE: 'Fechar',
889
- TEKGRID_FIXED_COLUMNS: 'Colunas fixadas',
890
- TEKGRID_VISIBLE_COLUMNS: 'Colunas visíveis',
891
- TEKGRID_GROUPED_COLUMNS: 'Colunas agrupadas',
892
- TEKGRID_ORDER: 'Ordem',
893
- TEKGRID_OTHER_COLUMNS: 'Outras colunas',
894
- TEKGRID_DROP_COLUMNS: 'Arraste colunas aqui',
895
- TEKGRID_DETAILS_FOR: 'Detalhes para:',
896
- TEKGRID_LEFT: 'Esquerda',
897
- TEKGRID_CENTER: 'Centro',
898
- TEKGRID_RIGHT: 'Direita',
899
- TEKGRID_ASC: 'Crescente',
900
- TEKGRID_DESC: 'Decrescente',
901
- TEKGRID_SELECT_COLUMN: '(selecione uma ou mais colunas)',
902
- TEKGRID_SELECT_ALL: 'Selecionar todas',
903
- TEKGRID_HELPERVALUE_TODAY: 'Hoje',
904
- TEKGRID_HELPERVALUE_TOMORROW: 'Amanhã',
905
- TEKGRID_HELPERVALUE_YESTERDAY: 'Ontem',
906
- TEKGRID_HELPERVALUE_LAST_7_DAYS: 'Últimos 7 Dias',
907
- TEKGRID_HELPERVALUE_NEXT_7_DAYS: 'Próximos 7 Dias',
908
- TEKGRID_HELPERVALUE_CURRENT_WEEK: 'Semana Atual',
909
- TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Mês Atual',
910
- TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Ano Atual',
911
- TEKGRID_WITH_GROUPS: '(Com grupos)',
912
- TEKGRID_GRID_MIRROR: '(Espelho do grid)',
913
- TEKGRID_NO_DATA: 'Não há dados para gerar o relatório',
914
- },
915
- },
916
- 'en-US': {
917
- translation: {
918
- TEKGRID_CONTAINS: 'contains',
919
- TEKGRID_NOT_CONTAINS: 'does not contain',
920
- TEKGRID_EQUALS: 'is equal to',
921
- TEKGRID_NOT_EQUALS: 'is different from',
922
- TEKGRID_GREATER_THAN: 'is greater than',
923
- TEKGRID_LESS_THAN: 'is less than',
924
- TEKGRID_GREATER_THAN_EQUALS: 'is greater or equals to',
925
- TEKGRID_LESS_THAN_EQUALS: 'is less or equals to',
926
- TEKGRID_IN: 'is in',
927
- TEKGRID_NOT_IN: 'is not in',
928
- TEKGRID_BETWEEN: 'is between',
929
- TEKGRID_AND: 'and',
930
- TEKGRID_OR: 'or',
931
- TEKGRID_HIDE: 'Hide Actions',
932
- TEKGRID_SHOW: 'Show Actions',
933
- TEKGRID_ADD: 'Add',
934
- TEKGRID_DELETE: 'Delete',
935
- TEKGRID_REFRESH: 'Refresh',
936
- TEKGRID_COLUMNS: 'Columns',
937
- TEKGRID_SAVE: 'Save',
938
- TEKGRID_CANCEL: 'Cancel',
939
- TEKGRID_APPLY: 'Apply',
940
- TEKGRID_FILTER: 'Filter',
941
- TEKGRID_MULTIPLE_VALUE_HINT: 'Separate values using ";"',
942
- TEKGRID_EXPORT: 'Export',
943
- TEKGRID_EXPORT_AS: 'Export as {{ type }}',
944
- TEKGRID_PORTRAIT: 'Portrait',
945
- TEKGRID_LANDSCAPE: 'Landscape',
946
- TEKGRID_COLUMN_VISIBLE: 'Visible',
947
- TEKGRID_COLUMN_GROUPED: 'Grouped',
948
- TEKGRID_COLUMN_AGGREGATION: 'Aggregation',
949
- TEKGRID_COLUMN_LABEL: 'Label',
950
- TEKGRID_COLUMN_ALIGNMENT: 'Alignment',
951
- TEKGRID_COLUMN_GROUP_OPENED: 'Opened (group)',
952
- TEKGRID_COLUMN_ORDER: 'Order',
953
- TEKGRID_COLUMN_ORDER_DIRECTION: 'Direction (order)',
954
- TEKGRID_AGGREGATION_SUM: 'Sum',
955
- TEKGRID_AGGREGATION_AVG: 'Average',
956
- TEKGRID_AGGREGATION_MAX: 'Maximum',
957
- TEKGRID_AGGREGATION_MIN: 'Minimum',
958
- TEKGRID_AGGREGATION_COUNT: 'Count',
959
- TEKGRID_MORE_OPTIONS: 'More options',
960
- TEKGRID_COLUMNS_OPTIONS: 'Columns configuration',
961
- TEKGRID_CLOSE: 'Close',
962
- TEKGRID_FIXED_COLUMNS: 'Fixed columns',
963
- TEKGRID_VISIBLE_COLUMNS: 'Visible columns',
964
- TEKGRID_GROUPED_COLUMNS: 'Grouped columns',
965
- TEKGRID_ORDER: 'Order',
966
- TEKGRID_OTHER_COLUMNS: 'Other columns',
967
- TEKGRID_DROP_COLUMNS: 'Drop columns here',
968
- TEKGRID_DETAILS_FOR: 'Details for:',
969
- TEKGRID_LEFT: 'Left',
970
- TEKGRID_CENTER: 'Center',
971
- TEKGRID_RIGHT: 'Right',
972
- TEKGRID_ASC: 'Ascending',
973
- TEKGRID_DESC: 'Descending',
974
- TEKGRID_SELECT_COLUMN: '(select one or more columns)',
975
- TEKGRID_SELECT_ALL: 'Select all',
976
- TEKGRID_HELPERVALUE_TODAY: 'Today',
977
- TEKGRID_HELPERVALUE_TOMORROW: 'Tomorrow',
978
- TEKGRID_HELPERVALUE_YESTERDAY: 'Yesterday',
979
- TEKGRID_HELPERVALUE_LAST_7_DAYS: 'Last 7 Days',
980
- TEKGRID_HELPERVALUE_NEXT_7_DAYS: 'Next 7 Days',
981
- TEKGRID_HELPERVALUE_CURRENT_WEEK: 'Current Week',
982
- TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Current Month',
983
- TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Current Year',
984
- TEKGRID_WITH_GROUPS: '(With groups)',
985
- TEKGRID_GRID_MIRROR: '(Grid mirror)',
986
- TEKGRID_NO_DATA: 'There is no data to generate the report',
987
- },
988
- },
989
- 'es-CL': {
990
- translation: {
991
- TEKGRID_CONTAINS: 'contiene',
992
- TEKGRID_NOT_CONTAINS: 'no contiene',
993
- TEKGRID_EQUALS: 'igual',
994
- TEKGRID_NOT_EQUALS: 'es diferente de',
995
- TEKGRID_GREATER_THAN: 'es mayor que',
996
- TEKGRID_LESS_THAN: 'es menor que',
997
- TEKGRID_GREATER_THAN_EQUALS: 'es mayor o igual que',
998
- TEKGRID_LESS_THAN_EQUALS: 'es menor o igual que',
999
- TEKGRID_IN: 'uno de los valores',
1000
- TEKGRID_NOT_IN: 'ninguno de los valores',
1001
- TEKGRID_BETWEEN: 'está entre',
1002
- TEKGRID_AND: 'e',
1003
- TEKGRID_OR: 'o',
1004
- TEKGRID_HIDE: 'Ocultar Acciones',
1005
- TEKGRID_SHOW: 'Mostrar Acciones',
1006
- TEKGRID_ADD: 'Añadir',
1007
- TEKGRID_DELETE: 'Eliminar',
1008
- TEKGRID_REFRESH: 'Actualizar',
1009
- TEKGRID_COLUMNS: 'Colunas',
1010
- TEKGRID_SAVE: 'Guardar',
1011
- TEKGRID_CANCEL: 'Cancelar',
1012
- TEKGRID_APPLY: 'Aplicar',
1013
- TEKGRID_FILTER: 'Filtro',
1014
- TEKGRID_MULTIPLE_VALUE_HINT: 'Separe los valores usando ";"',
1015
- TEKGRID_EXPORT: 'Exportar',
1016
- TEKGRID_EXPORT_AS: 'Exportar como {{ type }}',
1017
- TEKGRID_PORTRAIT: 'Vertical',
1018
- TEKGRID_LANDSCAPE: 'Horizontal',
1019
- TEKGRID_COLUMN_VISIBLE: 'Visible',
1020
- TEKGRID_COLUMN_GROUPED: 'Grupo',
1021
- TEKGRID_COLUMN_AGGREGATION: 'Totalización',
1022
- TEKGRID_COLUMN_LABEL: 'Etiqueta',
1023
- TEKGRID_COLUMN_ALIGNMENT: 'alineación',
1024
- TEKGRID_COLUMN_GROUP_OPENED: 'Abierto (grupo)',
1025
- TEKGRID_COLUMN_ORDER: 'Orden',
1026
- TEKGRID_COLUMN_ORDER_DIRECTION: 'Dirección (orden)',
1027
- TEKGRID_AGGREGATION_SUM: 'Suma',
1028
- TEKGRID_AGGREGATION_AVG: 'Media',
1029
- TEKGRID_AGGREGATION_MAX: 'Máximo',
1030
- TEKGRID_AGGREGATION_MIN: 'Mínimo',
1031
- TEKGRID_AGGREGATION_COUNT: 'Contar',
1032
- TEKGRID_MORE_OPTIONS: 'Mas opciones',
1033
- TEKGRID_COLUMNS_OPTIONS: 'Configuración de columna',
1034
- TEKGRID_CLOSE: 'Cerrar',
1035
- TEKGRID_FIXED_COLUMNS: 'Columnas fijas',
1036
- TEKGRID_VISIBLE_COLUMNS: 'Columnas visibles',
1037
- TEKGRID_GROUPED_COLUMNS: 'Columnas agrupadas',
1038
- TEKGRID_ORDER: 'Orden',
1039
- TEKGRID_OTHER_COLUMNS: 'Otras columnas',
1040
- TEKGRID_DROP_COLUMNS: 'Arrastra columnas aquí',
1041
- TEKGRID_DETAILS_FOR: 'Detalles para',
1042
- TEKGRID_LEFT: 'Izquierda',
1043
- TEKGRID_CENTER: 'Centro',
1044
- TEKGRID_RIGHT: 'Derecha',
1045
- TEKGRID_ASC: 'Creciente',
1046
- TEKGRID_DESC: 'Decreciente',
1047
- TEKGRID_SELECT_COLUMN: '(seleccione una o más columnas)',
1048
- TEKGRID_SELECT_ALL: 'Seleccionar todas',
1049
- TEKGRID_HELPERVALUE_TODAY: 'Hoy',
1050
- TEKGRID_HELPERVALUE_TOMORROW: 'Mañana',
1051
- TEKGRID_HELPERVALUE_YESTERDAY: 'Ayer',
1052
- TEKGRID_HELPERVALUE_LAST_7_DAYS: 'Últimos 7 días',
1053
- TEKGRID_HELPERVALUE_NEXT_7_DAYS: 'Próximos 7 días',
1054
- TEKGRID_HELPERVALUE_CURRENT_WEEK: 'Semana actual',
1055
- TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Mes actual',
1056
- TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Año actual',
1057
- TEKGRID_WITH_GROUPS: '(Con grupos)',
1058
- TEKGRID_GRID_MIRROR: '(Espejo de grid)',
1059
- TEKGRID_NO_DATA: 'No hay datos para generar el reporte',
1060
- },
1061
- },
1062
- });
1063
-
1064
- Messages.add({
1065
- 'pt-BR': {
1066
- translation: {
1067
- NO_NOTIFICATIONS: 'Nenhuma Notificação',
1068
- MARK_ALL_AS_READ: 'Marcar todas como lidas',
1069
- NOTIFICATIONS: 'Notificações',
1070
- SEE_ALL_NOTIFICATIONS: 'Ver todas notificações',
1071
- UNAVAILABLE_IMAGE: 'Imagem indisponível',
1072
- REFRESH: 'Atualizar',
1073
- ACTIONS: 'Ações',
1074
- FILTER: 'Filtro',
1075
- LAYOUT: 'Layout: ',
1076
- NEW_LAYOUT: 'Novo layout',
1077
- DEFAULT_LAYOUT: 'Padrão',
1078
- LAYOUT_MODIFIED:
1079
- 'O layout atual foi modificado. Crie um novo layout, sobrescreva um existente ou descarte as alterações', // eslint-disable-line
1080
- LAYOUT_NOT_MODIFIED: 'Crie um novo layout ou aplique um dos layouts já existentes',
1081
- LAYOUT_DISCART_CHANGES: 'Descartar alterações',
1082
- },
1083
- },
1084
- 'en-US': {
1085
- translation: {
1086
- NO_NOTIFICATIONS: 'No Notifications',
1087
- MARK_ALL_AS_READ: 'Mark all as read',
1088
- NOTIFICATIONS: 'Notifications',
1089
- SEE_ALL_NOTIFICATIONS: 'See all notifications',
1090
- UNAVAILABLE_IMAGE: 'Unavailable image',
1091
- REFRESH: 'Refresh',
1092
- ACTIONS: 'Actions',
1093
- FILTER: 'Filter',
1094
- LAYOUT: 'Layout: ',
1095
- NEW_LAYOUT: 'New layout',
1096
- DEFAULT_LAYOUT: 'Default',
1097
- LAYOUT_MODIFIED:
1098
- 'The current layout has been modified. Create a new layout, overwrite an existing one or discard changes', // eslint-disable-line
1099
- LAYOUT_NOT_MODIFIED: 'Create a new layout or apply one of the existing layouts',
1100
- LAYOUT_DISCART_CHANGES: 'Discard changes',
1101
- },
1102
- },
1103
- 'es-CL': {
1104
- translation: {
1105
- NO_NOTIFICATIONS: 'Sin Notificación',
1106
- MARK_ALL_AS_READ: 'Marcar todo como leído',
1107
- NOTIFICATIONS: 'Notificaciones',
1108
- SEE_ALL_NOTIFICATIONS: 'Ver todas las notificaciones',
1109
- UNAVAILABLE_IMAGE: 'Imagen no disponible',
1110
- REFRESH: 'Actualizar',
1111
- ACTIONS: 'Acciones',
1112
- FILTER: 'Filtro',
1113
- LAYOUT: 'Disposición: ',
1114
- NEW_LAYOUT: 'Nueva disposición',
1115
- DEFAULT_LAYOUT: 'Default',
1116
- LAYOUT_MODIFIED:
1117
- 'La disposición actual ha sido modificada. Cree una nueva disposición, sobrescriba una existente o descarte los cambios', // eslint-disable-line
1118
- LAYOUT_NOT_MODIFIED: 'Cree una nueva disposición o aplique una de las disposiciones existentes',
1119
- LAYOUT_DISCART_CHANGES: 'Descartar los cambios',
1120
- },
1121
- },
1122
- });