@zeedhi/teknisa-components-common 1.109.1 → 1.111.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/coverage/clover.xml +810 -801
- package/coverage/coverage-final.json +47 -47
- package/coverage/lcov-report/index.html +11 -11
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +1 -1
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +1 -1
- 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 +1358 -1357
- package/dist/tek-components-common.esm.js +98 -55
- package/dist/tek-components-common.umd.js +98 -55
- package/package.json +2 -2
- package/tests/unit/components/tek-grid/grid.spec.ts +72 -35
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +12 -8
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +51 -9
- package/types/components/tek-datasource/rest-datasource.d.ts +6 -6
- package/types/components/tek-grid/grid.d.ts +3 -1
- package/types/components/tek-grid/interfaces.d.ts +3 -1
- package/types/components/tek-tree-grid/interfaces.d.ts +1 -0
- package/types/components/tek-tree-grid/tree-grid.d.ts +1 -0
- package/types/utils/grid-base/grid-controller.d.ts +2 -4
- 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
|
@@ -311,6 +311,34 @@ describe('TekGrid', () => {
|
|
|
311
311
|
spy.mockReset();
|
|
312
312
|
});
|
|
313
313
|
|
|
314
|
+
it('when reportLabelFormatter is defined, it should be passed to getReport', async () => {
|
|
315
|
+
(window as any).open = jest.fn();
|
|
316
|
+
const reportLabelFormatter = jest.fn();
|
|
317
|
+
const spy = jest.spyOn(Report.prototype, 'getReport').mockImplementationOnce(async () => '');
|
|
318
|
+
|
|
319
|
+
const instance = new TekGrid({
|
|
320
|
+
reportLabelFormatter,
|
|
321
|
+
name: 'grid',
|
|
322
|
+
component: 'TekGrid',
|
|
323
|
+
columns: [
|
|
324
|
+
{
|
|
325
|
+
name: 'id',
|
|
326
|
+
label: 'ID',
|
|
327
|
+
aggregation: 'COUNT',
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
name: 'department_id',
|
|
331
|
+
label: 'Department ID',
|
|
332
|
+
grouped: true,
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
await instance.getReport('pdf');
|
|
338
|
+
|
|
339
|
+
expect(spy).toHaveBeenLastCalledWith('pdf', undefined, expect.any(Object), undefined, reportLabelFormatter);
|
|
340
|
+
});
|
|
341
|
+
|
|
314
342
|
it('when called with a dynamicFilter, should format the filter values', async () => {
|
|
315
343
|
(window as any).open = jest.fn();
|
|
316
344
|
const spy = jest.spyOn(Report.prototype, 'getReport').mockImplementationOnce(async () => '');
|
|
@@ -399,7 +427,7 @@ describe('TekGrid', () => {
|
|
|
399
427
|
metaData: expect.objectContaining({
|
|
400
428
|
filter,
|
|
401
429
|
}),
|
|
402
|
-
}), undefined);
|
|
430
|
+
}), undefined, undefined);
|
|
403
431
|
(window as any).open.mockClear();
|
|
404
432
|
spy.mockReset();
|
|
405
433
|
});
|
|
@@ -465,7 +493,7 @@ describe('TekGrid', () => {
|
|
|
465
493
|
metaData: {
|
|
466
494
|
columns: {}, filter: undefined, groups: [], xlsDefaultType: undefined,
|
|
467
495
|
},
|
|
468
|
-
}, undefined);
|
|
496
|
+
}, undefined, undefined);
|
|
469
497
|
});
|
|
470
498
|
|
|
471
499
|
it('when data is empty, should show alert', async () => {
|
|
@@ -673,57 +701,65 @@ describe('TekGrid', () => {
|
|
|
673
701
|
});
|
|
674
702
|
});
|
|
675
703
|
|
|
676
|
-
describe('hideButtonClick
|
|
677
|
-
it('
|
|
704
|
+
describe('hideButtonClick', () => {
|
|
705
|
+
it('deve alternar as classes para o estado "escondido" quando a toolbar está visível', () => {
|
|
678
706
|
const instance = new TekGrid({
|
|
679
|
-
name: '
|
|
707
|
+
name: 'grid_hide_test',
|
|
680
708
|
component: 'TekGrid',
|
|
681
709
|
});
|
|
682
|
-
|
|
683
710
|
instance.onCreated();
|
|
684
711
|
|
|
685
|
-
const
|
|
686
|
-
|
|
712
|
+
const mockToolbarDiv = { cssClass: 'toolbar-visible' };
|
|
713
|
+
const mockIcon = { cssClass: '' };
|
|
714
|
+
const mockTooltip = { label: 'TEKGRID_HIDE' };
|
|
715
|
+
|
|
716
|
+
jest.spyOn(Metadata, 'getInstance').mockImplementation((name: string) => {
|
|
717
|
+
if (name.includes('_toolbarDiv')) return mockToolbarDiv;
|
|
718
|
+
if (name.includes('_hideButton')) return mockIcon;
|
|
719
|
+
if (name.includes('_hideTooltip')) return mockTooltip;
|
|
720
|
+
return null;
|
|
721
|
+
});
|
|
687
722
|
|
|
688
723
|
const hideTooltip = instance.toolbarSlot[1];
|
|
689
|
-
|
|
724
|
+
const hideButtonDef = hideTooltip.children![0];
|
|
725
|
+
const button = new Button(hideButtonDef);
|
|
726
|
+
const event = new Event('click');
|
|
690
727
|
|
|
691
|
-
|
|
692
|
-
const hideButton = hideTooltip.children[0];
|
|
693
|
-
const button = new Button(hideButton);
|
|
694
|
-
const event = new Event('click');
|
|
695
|
-
button.click(event, {} as HTMLElement);
|
|
728
|
+
button.click(event, {} as HTMLElement);
|
|
696
729
|
|
|
697
|
-
|
|
698
|
-
|
|
730
|
+
expect(mockToolbarDiv.cssClass).toBe('');
|
|
731
|
+
expect(mockIcon.cssClass).toBe('is-rotated');
|
|
732
|
+
expect(mockTooltip.label).toBe('TEKGRID_SHOW');
|
|
699
733
|
});
|
|
700
734
|
|
|
701
|
-
it('
|
|
735
|
+
it('deve alternar as classes de volta para o estado "visível" quando a toolbar está escondida', () => {
|
|
702
736
|
const instance = new TekGrid({
|
|
703
|
-
name: '
|
|
737
|
+
name: 'grid_show_test',
|
|
704
738
|
component: 'TekGrid',
|
|
705
|
-
toolbarOpened: false,
|
|
706
739
|
});
|
|
707
|
-
|
|
708
740
|
instance.onCreated();
|
|
709
741
|
|
|
710
|
-
const
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
const hideTooltip = instance.toolbarSlot[1];
|
|
742
|
+
const mockToolbarDiv = { cssClass: '' };
|
|
743
|
+
const mockIcon = { cssClass: 'is-rotated' };
|
|
744
|
+
const mockTooltip = { label: 'TEKGRID_SHOW' };
|
|
714
745
|
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
746
|
+
jest.spyOn(Metadata, 'getInstance').mockImplementation((name: string) => {
|
|
747
|
+
if (name.includes('_toolbarDiv')) return mockToolbarDiv;
|
|
748
|
+
if (name.includes('_hideButton')) return mockIcon;
|
|
749
|
+
if (name.includes('_hideTooltip')) return mockTooltip;
|
|
750
|
+
return null;
|
|
751
|
+
});
|
|
720
752
|
|
|
721
|
-
|
|
753
|
+
const hideTooltip = instance.toolbarSlot[1];
|
|
754
|
+
const hideButtonDef = hideTooltip.children![0];
|
|
755
|
+
const button = new Button(hideButtonDef);
|
|
756
|
+
const event = new Event('click');
|
|
722
757
|
|
|
723
|
-
|
|
758
|
+
button.click(event, {} as HTMLElement);
|
|
724
759
|
|
|
725
|
-
|
|
726
|
-
|
|
760
|
+
expect(mockToolbarDiv.cssClass).toBe('toolbar-visible');
|
|
761
|
+
expect(mockIcon.cssClass).toBe('');
|
|
762
|
+
expect(mockTooltip.label).toBe('TEKGRID_HIDE');
|
|
727
763
|
});
|
|
728
764
|
});
|
|
729
765
|
|
|
@@ -2846,10 +2882,11 @@ describe('TekGrid', () => {
|
|
|
2846
2882
|
],
|
|
2847
2883
|
},
|
|
2848
2884
|
});
|
|
2885
|
+
await instance.datasource.get();
|
|
2849
2886
|
const newRow1 = { id: 2 };
|
|
2850
2887
|
await instance.addNewRow(newRow1, 'start');
|
|
2851
|
-
expect(instance.datasource.data[0]).
|
|
2852
|
-
expect(instance.datasource.data[1]).
|
|
2888
|
+
expect(instance.datasource.data[0]).toMatchObject({ id: 2, __added_row: true });
|
|
2889
|
+
expect(instance.datasource.data[1]).toMatchObject({ id: 1 });
|
|
2853
2890
|
});
|
|
2854
2891
|
|
|
2855
2892
|
it('should add a new row to the groupedData array', async () => {
|
|
@@ -84,12 +84,14 @@ describe('TekUserInfo', () => {
|
|
|
84
84
|
children: [
|
|
85
85
|
{
|
|
86
86
|
component: 'ZdHeader',
|
|
87
|
+
leftSlot: [
|
|
88
|
+
{
|
|
89
|
+
component: 'ZdTag',
|
|
90
|
+
children: [{ component: 'ZdImage', src: 'path' }],
|
|
91
|
+
},
|
|
92
|
+
],
|
|
87
93
|
rightSlot: [{ component: 'ZdModalCloseButton' }],
|
|
88
94
|
},
|
|
89
|
-
{
|
|
90
|
-
component: 'ZdTag',
|
|
91
|
-
children: [{ component: 'ZdImage', src: 'path' }],
|
|
92
|
-
},
|
|
93
95
|
{
|
|
94
96
|
component: 'ZdTabs',
|
|
95
97
|
tabs: [
|
|
@@ -150,12 +152,14 @@ describe('TekUserInfo', () => {
|
|
|
150
152
|
children: [
|
|
151
153
|
{
|
|
152
154
|
component: 'ZdHeader',
|
|
155
|
+
leftSlot: [
|
|
156
|
+
{
|
|
157
|
+
component: 'ZdTag',
|
|
158
|
+
children: [{ component: 'ZdImage', src: '' }],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
153
161
|
rightSlot: [{ component: 'ZdModalCloseButton' }],
|
|
154
162
|
},
|
|
155
|
-
{
|
|
156
|
-
component: 'ZdTag',
|
|
157
|
-
children: [{ component: 'ZdImage', src: '' }],
|
|
158
|
-
},
|
|
159
163
|
{
|
|
160
164
|
component: 'ZdTabs',
|
|
161
165
|
tabs: [
|
|
@@ -36,9 +36,6 @@ describe('GridController', () => {
|
|
|
36
36
|
expect(instance.showExportButton).toBeTruthy();
|
|
37
37
|
expect(instance.showActionAndExportButton).toBeTruthy();
|
|
38
38
|
expect(instance.showSearchInput).toBeTruthy();
|
|
39
|
-
expect(instance.showToolbar).toBeTruthy();
|
|
40
|
-
expect(instance.toolbarStyle).toBe('');
|
|
41
|
-
expect(instance.tooltipName).toBe('TEKGRID_HIDE');
|
|
42
39
|
expect(instance.showColumnsButton).toBeTruthy();
|
|
43
40
|
expect(instance.columnsButtonIgnore).toEqual([]);
|
|
44
41
|
expect(instance.showLayoutOptionsButton).toBeTruthy();
|
|
@@ -68,11 +65,6 @@ describe('GridController', () => {
|
|
|
68
65
|
expect(instance.showExportButton).toBeFalsy();
|
|
69
66
|
expect(instance.showActionAndExportButton).toBeFalsy();
|
|
70
67
|
expect(instance.showLayoutOptionsButton).toBeFalsy();
|
|
71
|
-
|
|
72
|
-
instance.showToolbar = false;
|
|
73
|
-
expect(instance.toolbarStyle).toBe('is-rotated');
|
|
74
|
-
expect(instance.tooltipName).toBe('TEKGRID_SHOW');
|
|
75
|
-
expect(instance.showToolbar).toBeFalsy();
|
|
76
68
|
});
|
|
77
69
|
|
|
78
70
|
it('should verify if showDivider3 is visibility', () => {
|
|
@@ -190,7 +182,7 @@ describe('GridController', () => {
|
|
|
190
182
|
});
|
|
191
183
|
const instance = new GridController(grid);
|
|
192
184
|
instance.openToolbar = false;
|
|
193
|
-
expect(instance.showAddButton).toBe(
|
|
185
|
+
expect(instance.showAddButton).toBe(true);
|
|
194
186
|
});
|
|
195
187
|
});
|
|
196
188
|
|
|
@@ -264,4 +256,54 @@ describe('GridController', () => {
|
|
|
264
256
|
expect(instance.showEditButtons).toBe(false);
|
|
265
257
|
});
|
|
266
258
|
});
|
|
259
|
+
|
|
260
|
+
describe('showOptionsDivider', () => {
|
|
261
|
+
it('should return true when showExport is true, not editing, and toolbar is open', () => {
|
|
262
|
+
const grid = new TekGrid({
|
|
263
|
+
name: 'Grid',
|
|
264
|
+
component: 'TekGrid',
|
|
265
|
+
columnsButton: false,
|
|
266
|
+
showLayoutOptions: false,
|
|
267
|
+
showExport: true,
|
|
268
|
+
editing: false,
|
|
269
|
+
});
|
|
270
|
+
const instance = new GridController(grid);
|
|
271
|
+
instance.openToolbar = true;
|
|
272
|
+
expect(instance.showOptionsDivider).toBe(true);
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('should return false when the toolbar is closed', () => {
|
|
276
|
+
const grid = new TekGrid({
|
|
277
|
+
name: 'Grid',
|
|
278
|
+
component: 'TekGrid',
|
|
279
|
+
showExport: true,
|
|
280
|
+
editing: false,
|
|
281
|
+
});
|
|
282
|
+
const instance = new GridController(grid);
|
|
283
|
+
instance.openToolbar = false;
|
|
284
|
+
expect(instance.showOptionsDivider).toBe(true);
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
describe('showHideButton', () => {
|
|
289
|
+
it('should return true when grid.showHideButton is true', () => {
|
|
290
|
+
const grid = new TekGrid({
|
|
291
|
+
name: 'Grid',
|
|
292
|
+
component: 'TekGrid',
|
|
293
|
+
showHideButton: true,
|
|
294
|
+
});
|
|
295
|
+
const instance = new GridController(grid);
|
|
296
|
+
expect(instance.showHideButton).toBe(true);
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
it('should return false when grid.showHideButton is false', () => {
|
|
300
|
+
const grid = new TekGrid({
|
|
301
|
+
name: 'Grid',
|
|
302
|
+
component: 'TekGrid',
|
|
303
|
+
showHideButton: false,
|
|
304
|
+
});
|
|
305
|
+
const instance = new GridController(grid);
|
|
306
|
+
expect(instance.showHideButton).toBe(false);
|
|
307
|
+
});
|
|
308
|
+
});
|
|
267
309
|
});
|
|
@@ -32,36 +32,36 @@ export declare class TekRestDatasource extends RestDatasource implements ITekRes
|
|
|
32
32
|
* @param filtroDinamico
|
|
33
33
|
* @returns
|
|
34
34
|
*/
|
|
35
|
-
setBaseFilter(filtroDinamico: any): Promise<any>;
|
|
35
|
+
setBaseFilter(filtroDinamico: any): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
36
36
|
/**
|
|
37
37
|
* Adds a new dynamic filter position or replace if exists
|
|
38
38
|
* @param column Dynamic Filter column name
|
|
39
39
|
* @param value Dynamic Filter value
|
|
40
40
|
* @returns Promise with data collection
|
|
41
41
|
*/
|
|
42
|
-
addDynamicFilter(column: string, value: any): Promise<any>;
|
|
42
|
+
addDynamicFilter(column: string, value: any): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
43
43
|
/**
|
|
44
44
|
* Removes a dynamic filter position
|
|
45
45
|
* @param column Dynamic Filter column name
|
|
46
46
|
* @returns Promise with data collection
|
|
47
47
|
*/
|
|
48
|
-
removeDynamicFilter(column: string): Promise<any>;
|
|
48
|
+
removeDynamicFilter(column: string): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
49
49
|
/**
|
|
50
50
|
* Sets new dynamic filter value
|
|
51
51
|
* @param filter Dynamic Filter value
|
|
52
52
|
* @returns Promise with data collection
|
|
53
53
|
*/
|
|
54
|
-
setDynamicFilter(filter: IDictionary<any>): Promise<any>;
|
|
54
|
+
setDynamicFilter(filter: IDictionary<any>): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
55
55
|
/**
|
|
56
56
|
* Clears Dynamic filter value
|
|
57
57
|
* @returns Promise with data collection
|
|
58
58
|
*/
|
|
59
|
-
clearDynamicFilter(): Promise<any>;
|
|
59
|
+
clearDynamicFilter(): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
60
60
|
/**
|
|
61
61
|
* Resets page and selected rows and tries to update the url
|
|
62
62
|
* @returns Promise with data collection
|
|
63
63
|
*/
|
|
64
|
-
updateDynamicFilter(): Promise<any>;
|
|
64
|
+
updateDynamicFilter(): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
65
65
|
/**
|
|
66
66
|
* Checks if a filter value is valid
|
|
67
67
|
* @param value Filter value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridEditable, IComponentRender, IGridColumnEditable, Input } from '@zeedhi/common';
|
|
1
|
+
import { GridEditable, IComponentRender, IGridColumnEditable, Input, LabelFormatter } 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';
|
|
@@ -16,6 +16,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
16
16
|
columnsButton: boolean;
|
|
17
17
|
mainGrid: boolean;
|
|
18
18
|
columnsButtonIgnore: string[];
|
|
19
|
+
showHideButton: boolean;
|
|
19
20
|
events: ITekGridEvents;
|
|
20
21
|
/**
|
|
21
22
|
* Enables column dragging
|
|
@@ -81,6 +82,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
|
|
|
81
82
|
defaultFilter: IDictionary;
|
|
82
83
|
toolbarOpened: boolean;
|
|
83
84
|
reportTitle: string;
|
|
85
|
+
reportLabelFormatter?: LabelFormatter;
|
|
84
86
|
/**
|
|
85
87
|
* TekGrid class constructor
|
|
86
88
|
* @param props TekGrid properties
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBeforeReportEvent, IComponent, IComponentEvents, IComponentRender, IGridColumnEditable, IGridEditable, IIterableColumnsButton, EventDef, IModal, IButton } from '@zeedhi/common';
|
|
1
|
+
import { IBeforeReportEvent, IComponent, IComponentEvents, IComponentRender, IGridColumnEditable, IGridEditable, IIterableColumnsButton, EventDef, IModal, IButton, LabelFormatter } from '@zeedhi/common';
|
|
2
2
|
import { IDictionary, IEvent, IEventParam, IDateHelperValue, IDateHelperValues } from '@zeedhi/core';
|
|
3
3
|
import { IDynamicFilterItem, TekGrid, TekGridLayoutOptions, TekTreeGrid } from '..';
|
|
4
4
|
export interface ITekGridLayoutEventParams extends IEventParam<ITekGrid> {
|
|
@@ -49,6 +49,7 @@ export interface ITekGrid extends IGridEditable {
|
|
|
49
49
|
filterButton?: boolean;
|
|
50
50
|
modalFilterProps?: IModalFilterProps;
|
|
51
51
|
showSearch?: boolean;
|
|
52
|
+
showHideButton?: boolean;
|
|
52
53
|
showLayoutOptions?: boolean;
|
|
53
54
|
title?: string;
|
|
54
55
|
showExport?: boolean;
|
|
@@ -64,6 +65,7 @@ export interface ITekGrid extends IGridEditable {
|
|
|
64
65
|
xlsDefaultType?: string;
|
|
65
66
|
toolbarOpened?: boolean;
|
|
66
67
|
reportTitle?: string;
|
|
68
|
+
reportLabelFormatter?: LabelFormatter;
|
|
67
69
|
}
|
|
68
70
|
export declare type MultiOptionParams = {
|
|
69
71
|
iconName: string;
|
|
@@ -18,6 +18,7 @@ export declare class TekTreeGrid extends TreeGridEditable implements ITekTreeGri
|
|
|
18
18
|
filterButton: boolean;
|
|
19
19
|
modalFilterProps: IModalFilterProps;
|
|
20
20
|
showSearch?: boolean;
|
|
21
|
+
showHideButton: boolean;
|
|
21
22
|
columnFilterButton: boolean;
|
|
22
23
|
columnsButton: boolean;
|
|
23
24
|
columnsButtonIgnore: string[];
|
|
@@ -10,15 +10,13 @@ export declare class GridController {
|
|
|
10
10
|
get showFilterButton(): boolean;
|
|
11
11
|
get showModalFilterProps(): import("../..").IModalFilterProps;
|
|
12
12
|
get showSearchInput(): boolean | undefined;
|
|
13
|
-
get showToolbar(): boolean;
|
|
14
|
-
set showToolbar(value: boolean);
|
|
15
|
-
get toolbarStyle(): string;
|
|
16
|
-
get tooltipName(): "TEKGRID_SHOW" | "TEKGRID_HIDE";
|
|
17
13
|
get showReloadButton(): boolean;
|
|
18
14
|
get showColumnsButton(): boolean;
|
|
19
15
|
get columnsButtonIgnore(): string[];
|
|
20
16
|
get showLayoutOptionsButton(): boolean;
|
|
21
17
|
get showDivider(): boolean;
|
|
18
|
+
get showOptionsDivider(): boolean;
|
|
19
|
+
get showHideButton(): boolean;
|
|
22
20
|
get showActionsButton(): boolean;
|
|
23
21
|
get showExportButton(): boolean;
|
|
24
22
|
get showActionAndExportButton(): boolean | undefined;
|
|
@@ -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
|
-
}
|