@zeedhi/teknisa-components-common 1.110.0 → 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.
Files changed (35) hide show
  1. package/coverage/clover.xml +790 -783
  2. package/coverage/coverage-final.json +47 -47
  3. package/coverage/lcov-report/index.html +13 -13
  4. package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +1 -1
  5. package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +1 -1
  6. package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +7 -7
  7. package/coverage/lcov-report/tests/__helpers__/index.html +1 -1
  8. package/coverage/lcov-report/tests/__helpers__/index.ts.html +1 -1
  9. package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +1 -1
  10. package/coverage/lcov.info +1314 -1317
  11. package/dist/tek-components-common.esm.js +89 -54
  12. package/dist/tek-components-common.umd.js +89 -54
  13. package/package.json +2 -2
  14. package/tests/unit/components/tek-grid/grid.spec.ts +39 -31
  15. package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +12 -8
  16. package/tests/unit/utils/grid-base/grid-controller.spec.ts +51 -9
  17. package/types/components/tek-grid/grid.d.ts +1 -0
  18. package/types/components/tek-grid/interfaces.d.ts +1 -0
  19. package/types/components/tek-tree-grid/interfaces.d.ts +1 -0
  20. package/types/components/tek-tree-grid/tree-grid.d.ts +1 -0
  21. package/types/utils/grid-base/grid-controller.d.ts +2 -4
  22. package/types/components/tek-ag-grid/default-icons.d.ts +0 -53
  23. package/types/components/tek-ag-grid/interfaces.d.ts +0 -9
  24. package/types/components/tek-ag-grid/tek-ag-grid.d.ts +0 -35
  25. package/types/components/tek-datasource/datasource.d.ts +0 -94
  26. package/types/components/tek-grid/default-icons.d.ts +0 -53
  27. package/types/components/tek-grid/filter-dynamic-values.d.ts +0 -9
  28. package/types/components/tek-grid/grid-controller.d.ts +0 -19
  29. package/types/components/tek-grid/grid_column.d.ts +0 -14
  30. package/types/components/tek-grid/grid_controller.d.ts +0 -15
  31. package/types/components/tek-grid/tek-grid.d.ts +0 -35
  32. package/types/components/tek-login/interfaces.d.ts +0 -3
  33. package/types/components/tek-login/login-children.d.ts +0 -3
  34. package/types/components/tek-login/login.d.ts +0 -58
  35. package/types/components/tek-login/login_children.d.ts +0 -3
@@ -701,57 +701,65 @@ describe('TekGrid', () => {
701
701
  });
702
702
  });
703
703
 
704
- describe('hideButtonClick()', () => {
705
- it('should hide toolbar', () => {
704
+ describe('hideButtonClick', () => {
705
+ it('deve alternar as classes para o estado "escondido" quando a toolbar está visível', () => {
706
706
  const instance = new TekGrid({
707
- name: 'grid_deleteClick2',
707
+ name: 'grid_hide_test',
708
708
  component: 'TekGrid',
709
709
  });
710
-
711
710
  instance.onCreated();
712
711
 
713
- const toolbarMock = { isVisible: true };
714
- jest.spyOn(Metadata, 'getInstance').mockImplementation(() => toolbarMock);
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
+ });
715
722
 
716
723
  const hideTooltip = instance.toolbarSlot[1];
717
- expect(toolbarMock.isVisible).toBeTruthy();
724
+ const hideButtonDef = hideTooltip.children![0];
725
+ const button = new Button(hideButtonDef);
726
+ const event = new Event('click');
718
727
 
719
- if (hideTooltip.children) {
720
- const hideButton = hideTooltip.children[0];
721
- const button = new Button(hideButton);
722
- const event = new Event('click');
723
- button.click(event, {} as HTMLElement);
728
+ button.click(event, {} as HTMLElement);
724
729
 
725
- expect(toolbarMock.isVisible).toBeFalsy();
726
- }
730
+ expect(mockToolbarDiv.cssClass).toBe('');
731
+ expect(mockIcon.cssClass).toBe('is-rotated');
732
+ expect(mockTooltip.label).toBe('TEKGRID_SHOW');
727
733
  });
728
734
 
729
- it('should show toolbar', () => {
735
+ it('deve alternar as classes de volta para o estado "visível" quando a toolbar está escondida', () => {
730
736
  const instance = new TekGrid({
731
- name: 'grid_deleteClick2',
737
+ name: 'grid_show_test',
732
738
  component: 'TekGrid',
733
- toolbarOpened: false,
734
739
  });
735
-
736
740
  instance.onCreated();
737
741
 
738
- const toolbarMock = { isVisible: true };
739
- jest.spyOn(Metadata, 'getInstance').mockImplementation(() => toolbarMock);
742
+ const mockToolbarDiv = { cssClass: '' };
743
+ const mockIcon = { cssClass: 'is-rotated' };
744
+ const mockTooltip = { label: 'TEKGRID_SHOW' };
740
745
 
741
- const hideTooltip = instance.toolbarSlot[1];
742
-
743
- if (hideTooltip.children) {
744
- const hideButton = hideTooltip.children[0];
745
- const button = new Button(hideButton);
746
- const event = new Event('click');
747
- button.click(event, {} as HTMLElement);
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
+ });
748
752
 
749
- expect(toolbarMock.isVisible).toBeFalsy();
753
+ const hideTooltip = instance.toolbarSlot[1];
754
+ const hideButtonDef = hideTooltip.children![0];
755
+ const button = new Button(hideButtonDef);
756
+ const event = new Event('click');
750
757
 
751
- button.click(event, {} as HTMLElement);
758
+ button.click(event, {} as HTMLElement);
752
759
 
753
- expect(toolbarMock.isVisible).toBeTruthy();
754
- }
760
+ expect(mockToolbarDiv.cssClass).toBe('toolbar-visible');
761
+ expect(mockIcon.cssClass).toBe('');
762
+ expect(mockTooltip.label).toBe('TEKGRID_HIDE');
755
763
  });
756
764
  });
757
765
 
@@ -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(false);
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
  });
@@ -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
@@ -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;
@@ -14,6 +14,7 @@ export interface ITekTreeGrid extends ITreeGridEditable {
14
14
  mainGrid?: boolean;
15
15
  modalFilterProps?: IModalFilterProps;
16
16
  showSearch?: boolean;
17
+ showHideButton?: boolean;
17
18
  showLayoutOptions?: boolean;
18
19
  title?: string;
19
20
  showExport?: boolean;
@@ -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
- }
@@ -1,19 +0,0 @@
1
- import { TekGrid } from './grid';
2
- export declare class TekGridController {
3
- private grid;
4
- constructor(grid: TekGrid);
5
- get gridTitle(): string;
6
- get showAddButton(): boolean;
7
- get showDeleteButton(): boolean;
8
- get showFilterButton(): boolean;
9
- get showColumnsButton(): boolean;
10
- get columnsButtonIgnore(): string[];
11
- get showLayoutOptions(): boolean;
12
- get showFirstDivider(): boolean;
13
- get showActionsButton(): boolean;
14
- get showExportButton(): boolean;
15
- get showActionAndExportButton(): boolean;
16
- get isEditing(): boolean;
17
- get isNotEditing(): boolean;
18
- get disableDeleteButton(): boolean;
19
- }
@@ -1,14 +0,0 @@
1
- import { GridColumnEditable } from '@zeedhi/common';
2
- import { ITekGridColumn } from './interfaces';
3
- /**
4
- * Base class for Grid column
5
- */
6
- export declare class TekGridColumn extends GridColumnEditable implements ITekGridColumn {
7
- filterProps: any;
8
- filterable: boolean;
9
- /**
10
- * Creates a new TekGrid Column.
11
- * @param props TekGrid column properties
12
- */
13
- constructor(props: ITekGridColumn);
14
- }
@@ -1,15 +0,0 @@
1
- import { TekGrid } from './grid';
2
- export declare class TekGridController {
3
- private grid;
4
- constructor(grid: TekGrid);
5
- get gridTitle(): string;
6
- get showAddButton(): boolean;
7
- get showDeleteButton(): boolean;
8
- get showFilterButton(): boolean;
9
- get showColumnsButton(): boolean;
10
- get showFirstDivider(): boolean;
11
- get showActionsButton(): boolean;
12
- get isEditing(): boolean;
13
- get isNotEditing(): boolean;
14
- get disableDeleteButton(): boolean;
15
- }
@@ -1,35 +0,0 @@
1
- import { Iterable } from '@zeedhi/common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { ITekGrid } from './interfaces';
4
- /** Grid Component */
5
- export declare class TekGrid extends Iterable implements ITekGrid {
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 Grid.
15
- * @param props Grid properties
16
- */
17
- constructor(props: ITekGrid);
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,3 +0,0 @@
1
- import { ILogin } from '@zeedhi/common';
2
- export interface ITekLogin extends ILogin {
3
- }
@@ -1,3 +0,0 @@
1
- import { IComponentRender } from '@zeedhi/common';
2
- import { TekLogin } from './login';
3
- export declare function getChildren(login: TekLogin): IComponentRender[];