@zeedhi/teknisa-components-common 1.114.0 → 3.0.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 (88) hide show
  1. package/.package.json +40 -0
  2. package/dist/teknisa-components-common.js +112 -0
  3. package/dist/teknisa-components-common.min.js +112 -0
  4. package/dist/types/components/index.d.ts +2 -0
  5. package/{types → dist/types}/components/tek-breadcrumb-header/breadcrumb-header.d.ts +12 -12
  6. package/{types → dist/types}/components/tek-breadcrumb-header/interfaces.d.ts +6 -6
  7. package/{types → dist/types}/error/delete-rows-error.d.ts +6 -6
  8. package/dist/types/index.d.ts +1 -0
  9. package/environments.json +14 -0
  10. package/package.json +26 -18
  11. package/src/components/index.ts +108 -0
  12. package/src/components/tek-breadcrumb-header/breadcrumb-header.ts +29 -0
  13. package/src/components/tek-breadcrumb-header/interfaces.ts +7 -0
  14. package/src/error/delete-rows-error.ts +11 -0
  15. package/src/index.ts +1 -0
  16. package/tests/__helpers__/component-event-helper.ts +1 -1
  17. package/tests/__helpers__/get-child-helper.ts +1 -1
  18. package/tests/__helpers__/mock-created-helper.ts +1 -1
  19. package/tests/unit/components/crud/crud-button.spec.ts +1 -1
  20. package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +1 -11
  21. package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +5 -7
  22. package/tests/unit/components/tek-drag-grid/tek-drag-grid.spec.ts +1 -1
  23. package/tests/unit/components/tek-grid/grid-column.spec.ts +4 -4
  24. package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +17 -11
  25. package/tests/unit/components/tek-grid/grid.spec.ts +45 -721
  26. package/tests/unit/components/tek-grid/layout_options.spec.ts +5 -7
  27. package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +1 -1
  28. package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +10 -14
  29. package/tests/unit/components/tree-grid/tree-grid.spec.ts +4 -28
  30. package/tests/unit/utils/grid-base/export-options/multi-option.spec.ts +2 -2
  31. package/tests/unit/utils/grid-base/grid-controller.spec.ts +17 -152
  32. package/tsconfig.build.json +7 -0
  33. package/dist/tek-components-common.esm.js +0 -4830
  34. package/dist/tek-components-common.umd.js +0 -4867
  35. package/tests/unit/utils/grid-base/delete-rows-error.spec.ts +0 -24
  36. package/types/components/crud/crud-add-button.d.ts +0 -38
  37. package/types/components/crud/crud-button.d.ts +0 -27
  38. package/types/components/crud/crud-cancel-button.d.ts +0 -28
  39. package/types/components/crud/crud-delete-button.d.ts +0 -42
  40. package/types/components/crud/crud-form.d.ts +0 -46
  41. package/types/components/crud/crud-save-button.d.ts +0 -24
  42. package/types/components/crud/interfaces.d.ts +0 -15
  43. package/types/components/index.d.ts +0 -41
  44. package/types/components/tek-card-title/card-title.d.ts +0 -14
  45. package/types/components/tek-card-title/interfaces.d.ts +0 -9
  46. package/types/components/tek-datasource/interfaces.d.ts +0 -16
  47. package/types/components/tek-datasource/memory-datasource.d.ts +0 -100
  48. package/types/components/tek-datasource/rest-datasource.d.ts +0 -103
  49. package/types/components/tek-drag-grid/interfaces.d.ts +0 -7
  50. package/types/components/tek-drag-grid/tek-drag-grid.d.ts +0 -36
  51. package/types/components/tek-grid/filter-helper.d.ts +0 -7
  52. package/types/components/tek-grid/grid-column.d.ts +0 -45
  53. package/types/components/tek-grid/grid-columns-button-controller.d.ts +0 -8
  54. package/types/components/tek-grid/grid-columns-button.d.ts +0 -12
  55. package/types/components/tek-grid/grid-filter-button.d.ts +0 -31
  56. package/types/components/tek-grid/grid.d.ts +0 -267
  57. package/types/components/tek-grid/interfaces.d.ts +0 -203
  58. package/types/components/tek-grid/layout-options.d.ts +0 -31
  59. package/types/components/tek-image/image.d.ts +0 -55
  60. package/types/components/tek-image/interfaces.d.ts +0 -12
  61. package/types/components/tek-iterable-carousel/interfaces.d.ts +0 -5
  62. package/types/components/tek-iterable-carousel/iterable-carousel.d.ts +0 -13
  63. package/types/components/tek-iterable-component-render/interfaces.d.ts +0 -3
  64. package/types/components/tek-iterable-component-render/iterable-component-render.d.ts +0 -10
  65. package/types/components/tek-loading/interfaces.d.ts +0 -6
  66. package/types/components/tek-loading/loading.d.ts +0 -24
  67. package/types/components/tek-notifications/interfaces.d.ts +0 -22
  68. package/types/components/tek-notifications/notifications.d.ts +0 -35
  69. package/types/components/tek-product-card/interfaces.d.ts +0 -19
  70. package/types/components/tek-product-card/product-card.d.ts +0 -66
  71. package/types/components/tek-tree-grid/interfaces.d.ts +0 -30
  72. package/types/components/tek-tree-grid/tree-grid.d.ts +0 -102
  73. package/types/components/tek-user-info/TekUserInfoController.d.ts +0 -21
  74. package/types/components/tek-user-info/interfaces.d.ts +0 -27
  75. package/types/components/tek-user-info/tek-user-info-list.d.ts +0 -31
  76. package/types/components/tek-user-info/tek-user-info.d.ts +0 -37
  77. package/types/error/incomplete-groups-error.d.ts +0 -8
  78. package/types/index.d.ts +0 -2
  79. package/types/utils/config/config.d.ts +0 -7
  80. package/types/utils/extract-properties.d.ts +0 -7
  81. package/types/utils/grid-base/export-options/button-option.d.ts +0 -16
  82. package/types/utils/grid-base/export-options/index.d.ts +0 -3
  83. package/types/utils/grid-base/export-options/interfaces.d.ts +0 -5
  84. package/types/utils/grid-base/export-options/multi-option.d.ts +0 -12
  85. package/types/utils/grid-base/grid-base.d.ts +0 -59
  86. package/types/utils/grid-base/grid-controller.d.ts +0 -27
  87. package/types/utils/index.d.ts +0 -6
  88. package/types/utils/report-filter/report-filter.d.ts +0 -12
@@ -1,24 +0,0 @@
1
- import { TekGridDeleteRowsError } from '../../../../src/error/delete-rows-error';
2
-
3
- describe('TekGridDeleteRowsError', () => {
4
- describe('constructor()', () => {
5
- it('should create an instance of the error with the correct name and message', () => {
6
- // Cria uma nova instância do erro
7
- const error = new TekGridDeleteRowsError();
8
-
9
- // Verifica se a instância foi criada corretamente
10
- expect(error).toBeInstanceOf(TekGridDeleteRowsError);
11
- expect(error).toBeInstanceOf(Error);
12
-
13
- // Verifica se o nome do erro está correto
14
- expect(error.name).toBe('TekGridDeleteRowsError');
15
-
16
- // Verifica se a mensagem de erro está correta
17
- expect(error.message).toBe(
18
- 'TekGrid can\'t automatically delete rows when selectAllPages property is true.'
19
- + ' You should delete them manually using the beforeDelete event and preventing'
20
- + ' the default execution',
21
- );
22
- });
23
- });
24
- });
@@ -1,38 +0,0 @@
1
- import { ICrudAddButton } from './interfaces';
2
- import { CrudButton } from './crud-button';
3
- /**
4
- * Button to be used on Crud Forms
5
- */
6
- export declare class CrudAddButton extends CrudButton implements ICrudAddButton {
7
- /**
8
- * Button tooltip
9
- */
10
- private defaultTooltip;
11
- /**
12
- * Button flat
13
- */
14
- private defaultFlat;
15
- /**
16
- * Button icon
17
- */
18
- private defaultIcon;
19
- /**
20
- * Button icon name
21
- */
22
- private defaultIconName;
23
- /**
24
- * Button icon color
25
- */
26
- private defaultColor;
27
- /**
28
- * Create new Crud Add Button
29
- * @param props component properties
30
- */
31
- constructor(props: ICrudAddButton);
32
- /**
33
- * Triggered when the component is clicked.
34
- * @param event DOM event
35
- * @param element Element clicked
36
- */
37
- click(event: Event, element: HTMLElement): void;
38
- }
@@ -1,27 +0,0 @@
1
- import { Button, Tooltip } from '@zeedhi/common';
2
- import { ICrudButton } from './interfaces';
3
- /**
4
- * Button to be used on Crud Forms
5
- */
6
- export declare class CrudButton extends Button implements ICrudButton {
7
- /**
8
- * Click shortcut key
9
- */
10
- clickShortcutKey?: string;
11
- /**
12
- * Button tooltip
13
- */
14
- tooltip: Tooltip;
15
- private tooltipDefault;
16
- /**
17
- * Create new Crud Button
18
- * @param props component properties
19
- */
20
- constructor(props: ICrudButton);
21
- private shortcutClick;
22
- initKeyMap(parentElement: HTMLElement): void;
23
- /**
24
- * Return if parent (form or grid) is editing
25
- */
26
- get parentIsEditing(): boolean;
27
- }
@@ -1,28 +0,0 @@
1
- import { ICrudCancelButton } from './interfaces';
2
- import { CrudButton } from './crud-button';
3
- /**
4
- * Button to be used on Crud Forms
5
- */
6
- export declare class CrudCancelButton extends CrudButton implements ICrudCancelButton {
7
- /**
8
- * Button label
9
- */
10
- private defaultLabel;
11
- /**
12
- * Button outline
13
- */
14
- private defaultOutline;
15
- /**
16
- * Create new Crud Cancel Button
17
- * @param props component properties
18
- */
19
- constructor(props: ICrudCancelButton);
20
- /**
21
- * Triggered when the component is clicked.
22
- * @param event DOM event
23
- * @param element Element clicked
24
- */
25
- click(event: Event, element: HTMLElement): void;
26
- get disabled(): boolean;
27
- set disabled(_value: boolean);
28
- }
@@ -1,42 +0,0 @@
1
- import { ICrudDeleteButton } from './interfaces';
2
- import { CrudButton } from './crud-button';
3
- /**
4
- * Button to be used on Crud Forms
5
- */
6
- export declare class CrudDeleteButton extends CrudButton implements ICrudDeleteButton {
7
- /**
8
- * Button tooltip
9
- */
10
- private defaultTooltip;
11
- /**
12
- * Button flat
13
- */
14
- private defaultFlat;
15
- /**
16
- * Button icon
17
- */
18
- private defaultIcon;
19
- /**
20
- * Button icon name
21
- */
22
- private defaultIconName;
23
- /**
24
- * Button icon color
25
- */
26
- private defaultColor;
27
- /**
28
- * Create new Crud Delete Button
29
- * @param props component properties
30
- */
31
- constructor(props: ICrudDeleteButton);
32
- /**
33
- * Triggered when the component is clicked.
34
- * @param event DOM event
35
- * @param element Element clicked
36
- */
37
- click(event: Event, element: HTMLElement): void;
38
- get parentHasCurrentRow(): any;
39
- get parentHasSelectedRows(): boolean;
40
- get disabled(): boolean;
41
- set disabled(_value: boolean);
42
- }
@@ -1,46 +0,0 @@
1
- import { Form, Component } from '@zeedhi/common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { ICrudForm } from './interfaces';
4
- /**
5
- * Form to be used on Crud operations
6
- */
7
- export declare class CrudForm extends Form implements ICrudForm {
8
- /**
9
- * Form edit state
10
- */
11
- editing: boolean;
12
- /**
13
- * Stores value before editing
14
- */
15
- private beforeEditValue?;
16
- /**
17
- * Stores unsaved Value
18
- */
19
- private unSavedValue?;
20
- /**
21
- * Create new Crud Form
22
- * @param props component properties
23
- */
24
- constructor(props: ICrudForm);
25
- setValue(value: IDictionary, autoSave?: boolean): void;
26
- /**
27
- * Cancel edit and return value to original
28
- */
29
- cancelEdit(): void;
30
- /**
31
- * SaveEdit
32
- */
33
- saveEdit(): void;
34
- /**
35
- * Update value using child input value
36
- * @param child child input
37
- * @param value input value
38
- */
39
- updateChild(child: Component, value: any): void;
40
- private nullCast;
41
- onMounted(element: HTMLElement): void;
42
- /**
43
- * Form is focused
44
- */
45
- focus(): void;
46
- }
@@ -1,24 +0,0 @@
1
- import { ICrudSaveButton } from './interfaces';
2
- import { CrudButton } from './crud-button';
3
- /**
4
- * Button to be used on Crud Forms
5
- */
6
- export declare class CrudSaveButton extends CrudButton implements ICrudSaveButton {
7
- /**
8
- * Button label
9
- */
10
- private defaultLabel;
11
- /**
12
- * Create new Crud Save Button
13
- * @param props component properties
14
- */
15
- constructor(props: ICrudSaveButton);
16
- /**
17
- * Triggered when the component is clicked.
18
- * @param event DOM event
19
- * @param element Element clicked
20
- */
21
- click(event: Event, element: HTMLElement): void;
22
- get disabled(): boolean;
23
- set disabled(_value: boolean);
24
- }
@@ -1,15 +0,0 @@
1
- import { IButton, IForm, ITooltip } from '@zeedhi/common';
2
- export interface ICrudForm extends IForm {
3
- }
4
- export interface ICrudButton extends IButton {
5
- clickShortcutKey?: string;
6
- tooltip?: ITooltip;
7
- }
8
- export interface ICrudSaveButton extends ICrudButton {
9
- }
10
- export interface ICrudCancelButton extends ICrudButton {
11
- }
12
- export interface ICrudAddButton extends ICrudButton {
13
- }
14
- export interface ICrudDeleteButton extends ICrudButton {
15
- }
@@ -1,41 +0,0 @@
1
- export * from './crud/crud-form';
2
- export * from './crud/crud-button';
3
- export * from './crud/crud-add-button';
4
- export * from './crud/crud-cancel-button';
5
- export * from './crud/crud-delete-button';
6
- export * from './crud/crud-save-button';
7
- export * from './crud/interfaces';
8
- export * from './tek-breadcrumb-header/breadcrumb-header';
9
- export * from './tek-breadcrumb-header/interfaces';
10
- export * from './tek-card-title/card-title';
11
- export * from './tek-card-title/interfaces';
12
- export * from './tek-image/image';
13
- export * from './tek-image/interfaces';
14
- export * from './tek-product-card/product-card';
15
- export * from './tek-product-card/interfaces';
16
- export * from './tek-iterable-component-render/iterable-component-render';
17
- export * from './tek-iterable-component-render/interfaces';
18
- export * from './tek-iterable-carousel/iterable-carousel';
19
- export * from './tek-iterable-carousel/interfaces';
20
- export * from './tek-loading/loading';
21
- export * from './tek-loading/interfaces';
22
- export * from './tek-notifications/notifications';
23
- export * from './tek-notifications/interfaces';
24
- export * from './tek-grid/interfaces';
25
- export * from './tek-grid/grid';
26
- export * from './tek-grid/grid-column';
27
- export * from './tek-grid/grid-columns-button';
28
- export * from './tek-grid/grid-columns-button-controller';
29
- export * from './tek-grid/grid-filter-button';
30
- export * from './tek-grid/layout-options';
31
- export * from './tek-grid/filter-helper';
32
- export * from './tek-datasource/interfaces';
33
- export * from './tek-datasource/rest-datasource';
34
- export * from './tek-datasource/memory-datasource';
35
- export * from './tek-tree-grid/interfaces';
36
- export * from './tek-tree-grid/tree-grid';
37
- export * from './tek-user-info/interfaces';
38
- export * from './tek-user-info/tek-user-info';
39
- export * from './tek-user-info/tek-user-info-list';
40
- export * from './tek-drag-grid/interfaces';
41
- export * from './tek-drag-grid/tek-drag-grid';
@@ -1,14 +0,0 @@
1
- import { ComponentRender, IComponentRender } from '@zeedhi/common';
2
- import { ICardTitle } from './interfaces';
3
- /**
4
- * CardTitle component join an icon, title, rightSlot and a divider
5
- */
6
- export declare class CardTitle extends ComponentRender implements ICardTitle {
7
- title: string;
8
- subtitle: string;
9
- iconName: string;
10
- rightSlot: IComponentRender[];
11
- showDivider: boolean;
12
- to: string;
13
- constructor(props: ICardTitle);
14
- }
@@ -1,9 +0,0 @@
1
- import { IComponentRender } from '@zeedhi/common';
2
- export interface ICardTitle extends IComponentRender {
3
- title: string;
4
- subtitle: string;
5
- iconName: string;
6
- rightSlot?: IComponentRender[];
7
- showDivider?: boolean;
8
- to?: string;
9
- }
@@ -1,16 +0,0 @@
1
- import { IRestDatasource, IDictionary, IMemoryDatasource } from '@zeedhi/core';
2
- export interface ITekMemoryDatasource extends IMemoryDatasource {
3
- dynamicFilter?: IDictionary<any>;
4
- searchJoin?: IDictionary<Array<string | number>>;
5
- }
6
- export interface ITekRestDatasource extends IRestDatasource {
7
- dynamicFilter?: IDictionary<any>;
8
- searchJoin?: IDictionary<Array<string | number>>;
9
- }
10
- export interface IDynamicFilterItem {
11
- relation: string;
12
- operation: string;
13
- value: any;
14
- }
15
- export declare const DynamicFilterOperations: IDictionary<boolean>;
16
- export declare const DynamicFilterRelations: IDictionary<boolean>;
@@ -1,100 +0,0 @@
1
- import { IDatasource, IDictionary, MemoryDatasource } from '@zeedhi/core';
2
- import { IDynamicFilterItem, ITekMemoryDatasource } from './interfaces';
3
- export declare class TekMemoryDatasource extends MemoryDatasource implements ITekMemoryDatasource {
4
- /** Dynamic filter data */
5
- dynamicFilter: IDictionary<IDynamicFilterItem[]>;
6
- /** Search Join data */
7
- searchJoin: IDictionary<Array<string | number>>;
8
- /**
9
- * Dynamic Filter Operations
10
- */
11
- dynamicFilterOperations: IDictionary<boolean>;
12
- /**
13
- * Dynamic Filter Relations
14
- */
15
- dynamicFilterRelations: IDictionary<boolean>;
16
- /**
17
- * Dynamic Filter applied flag
18
- */
19
- protected dynamicFilterApplied: string;
20
- /**
21
- * Create new datasource
22
- * @param props Datasource properties
23
- */
24
- constructor(props: ITekMemoryDatasource);
25
- protected updateReservedKeys(): void;
26
- protected updateInternalProperties(datasource?: IDatasource): void;
27
- protected getEncodedParam(urlParam: string, datasourceParam?: IDictionary<any>): IDictionary<any>;
28
- protected getQueryStringValues(): IDictionary<any>;
29
- protected getUrlQueryString(): string;
30
- /**
31
- * Allows the comunication between the base filter and the dynamic filter
32
- * @param filtroDinamico
33
- * @returns
34
- */
35
- setBaseFilter(filtroDinamico: any): Promise<any>;
36
- /**
37
- * Adds a new dynamic filter position or replace if exists
38
- * @param column Dynamic Filter column name
39
- * @param value Dynamic Filter value
40
- * @returns Promise with data collection
41
- */
42
- addDynamicFilter(column: string, value: any): Promise<any>;
43
- /**
44
- * Removes a dynamic filter position
45
- * @param column Dynamic Filter column name
46
- * @returns Promise with data collection
47
- */
48
- removeDynamicFilter(column: string): Promise<any>;
49
- /**
50
- * Sets new dynamic filter value
51
- * @param filter Dynamic Filter value
52
- * @returns Promise with data collection
53
- */
54
- setDynamicFilter(filter: IDictionary<any>): Promise<any>;
55
- /**
56
- * Clears Dynamic filter value
57
- * @returns Promise with data collection
58
- */
59
- clearDynamicFilter(): Promise<any>;
60
- /**
61
- * Resets page and selected rows and tries to update the url
62
- * @returns Promise with data collection
63
- */
64
- updateDynamicFilter(): Promise<any>;
65
- /**
66
- * Checks if a filter value is valid
67
- * @param value Filter value
68
- * @returns Is valid filter value
69
- */
70
- protected isValidDynamicFilterValue(column: string, value?: IDictionary<any>[]): boolean;
71
- clone(): {
72
- dynamicFilter: IDictionary<IDynamicFilterItem[]>;
73
- searchJoin: IDictionary<(string | number)[]>;
74
- type: string;
75
- translate?: boolean | string[] | undefined;
76
- sortFunction?: ((value1: any, value2: any, columnName: string) => boolean) | undefined;
77
- sortParams?: IDictionary<any> | undefined;
78
- currentRow?: IDictionary<any> | undefined;
79
- data?: IDictionary<any>[] | undefined;
80
- filter?: IDictionary<any> | undefined;
81
- limit?: string | number | undefined;
82
- loadAll?: boolean | undefined;
83
- loading?: boolean | undefined;
84
- order?: string[] | undefined;
85
- page?: string | number | undefined;
86
- search?: string | undefined;
87
- searchIn?: string[] | undefined;
88
- searchInParams?: IDictionary<any> | undefined;
89
- uniqueKey?: string | undefined;
90
- watchUrl?: boolean | undefined;
91
- events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
92
- customSearch?: (({ row, component }: import("@zeedhi/core").IEventParam<import("@zeedhi/core").Datasource>) => boolean) | undefined;
93
- };
94
- /**
95
- * Updates filtered data
96
- */
97
- protected updateFilteredData(): void;
98
- protected getRowByDynamicFilter(row: IDictionary<any>): any;
99
- protected getRowBySearchJoin(row: IDictionary<any>): boolean;
100
- }
@@ -1,103 +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
- * Dynamic Filter Operations
10
- */
11
- dynamicFilterOperations: IDictionary<boolean>;
12
- /**
13
- * Dynamic Filter Relations
14
- */
15
- dynamicFilterRelations: IDictionary<boolean>;
16
- /**
17
- * Dynamic Filter applied flag
18
- */
19
- protected dynamicFilterApplied: string;
20
- /**
21
- * Create new datasource
22
- * @param props Datasource properties
23
- */
24
- constructor(props: ITekRestDatasource);
25
- protected updateReservedKeys(): void;
26
- protected updateInternalProperties(datasource?: IDatasource): void;
27
- protected getEncodedParam(urlParam: string, datasourceParam?: IDictionary<any>): IDictionary<any>;
28
- protected getQueryStringValues(): IDictionary<any>;
29
- protected getUrlQueryString(): string;
30
- /**
31
- * Allows the comunication between the base filter and the dynamic filter
32
- * @param filtroDinamico
33
- * @returns
34
- */
35
- setBaseFilter(filtroDinamico: any): Promise<IDictionary<any> | IDictionary<any>[]>;
36
- /**
37
- * Adds a new dynamic filter position or replace if exists
38
- * @param column Dynamic Filter column name
39
- * @param value Dynamic Filter value
40
- * @returns Promise with data collection
41
- */
42
- addDynamicFilter(column: string, value: any): Promise<IDictionary<any> | IDictionary<any>[]>;
43
- /**
44
- * Removes a dynamic filter position
45
- * @param column Dynamic Filter column name
46
- * @returns Promise with data collection
47
- */
48
- removeDynamicFilter(column: string): Promise<IDictionary<any> | IDictionary<any>[]>;
49
- /**
50
- * Sets new dynamic filter value
51
- * @param filter Dynamic Filter value
52
- * @returns Promise with data collection
53
- */
54
- setDynamicFilter(filter: IDictionary<any>): Promise<IDictionary<any> | IDictionary<any>[]>;
55
- /**
56
- * Clears Dynamic filter value
57
- * @returns Promise with data collection
58
- */
59
- clearDynamicFilter(): Promise<IDictionary<any> | IDictionary<any>[]>;
60
- /**
61
- * Resets page and selected rows and tries to update the url
62
- * @returns Promise with data collection
63
- */
64
- updateDynamicFilter(): Promise<IDictionary<any> | IDictionary<any>[]>;
65
- /**
66
- * Checks if a filter value is valid
67
- * @param value Filter value
68
- * @returns Is valid filter value
69
- */
70
- protected isValidDynamicFilterValue(column: string, value?: IDictionary<any>[]): boolean;
71
- /**
72
- * Retrieves request params
73
- */
74
- protected getRequestParams(): any;
75
- clone(): {
76
- dynamicFilter: IDictionary<IDynamicFilterItem[]>;
77
- searchJoin: IDictionary<(string | number)[]>;
78
- type: string;
79
- route?: string | undefined;
80
- lazyLoad?: boolean | undefined;
81
- arrayFormat?: "indices" | "brackets" | "repeat" | "comma" | undefined;
82
- find?: IDictionary<any> | undefined;
83
- localSearch?: boolean | undefined;
84
- searchPost?: boolean | undefined;
85
- currentRow?: IDictionary<any> | undefined;
86
- data?: IDictionary<any>[] | undefined; /**
87
- * Dynamic Filter Operations
88
- */
89
- filter?: IDictionary<any> | undefined;
90
- limit?: string | number | undefined;
91
- loadAll?: boolean | undefined;
92
- loading?: boolean | undefined;
93
- order?: string[] | undefined;
94
- page?: string | number | undefined;
95
- search?: string | undefined;
96
- searchIn?: string[] | undefined;
97
- searchInParams?: IDictionary<any> | undefined;
98
- uniqueKey?: string | undefined;
99
- watchUrl?: boolean | undefined;
100
- events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
101
- customSearch?: (({ row, component }: import("@zeedhi/core").IEventParam<import("@zeedhi/core").Datasource>) => boolean) | undefined;
102
- };
103
- }
@@ -1,7 +0,0 @@
1
- import { IDragGridEvents } from '@zeedhi/zd-drag-grid-common';
2
- import { ITekGrid } from '../tek-grid/interfaces';
3
- export interface ITekDragGrid extends ITekGrid {
4
- orderColumnName: string;
5
- orderMode?: 'asc' | 'desc';
6
- events?: IDragGridEvents;
7
- }
@@ -1,36 +0,0 @@
1
- import { IDraggable } from '@zeedhi/zd-drag-grid-common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { TekGrid } from '../tek-grid/grid';
4
- import { ITekDragGrid } from './interfaces';
5
- export declare class TekDragGrid extends TekGrid implements ITekDragGrid {
6
- private internalOrderColumnName;
7
- private internalOrderMode;
8
- protected draggable: IDraggable;
9
- constructor(props: ITekDragGrid);
10
- set orderColumnName(value: string);
11
- get orderColumnName(): string;
12
- set orderMode(value: 'asc' | 'desc');
13
- get orderMode(): 'asc' | 'desc';
14
- /**
15
- * Event triggered when dragged element is moving
16
- * @param event DOM event
17
- * @param row row being dragged
18
- * @param element HTML element
19
- * @returns return false to cancel dragging
20
- */
21
- onDragMove(event: Event, row: IDictionary, element: HTMLElement): boolean;
22
- /**
23
- * Event triggered when drag starts
24
- * @param event DOM event
25
- * @param row row being dragged
26
- * @param element HTML element
27
- */
28
- onDragStart(event: Event, row: IDictionary, element: HTMLElement): boolean;
29
- /**
30
- * Event triggered when drag ends
31
- * @param event DOM event
32
- * @param row row being dragged
33
- * @param element HTML element
34
- */
35
- onDragEnd(event: Event, row: IDictionary, element: HTMLElement): void;
36
- }
@@ -1,7 +0,0 @@
1
- import { TekGridColumn } from '..';
2
- export declare class TekFilterHelper {
3
- static getLabel(name: string): string;
4
- static getValue(name: string, column: TekGridColumn): string | string[];
5
- static register(name: string, label: string, fn: () => Date | [Date, Date]): void;
6
- static unregister(name: string): void;
7
- }
@@ -1,45 +0,0 @@
1
- import { GridColumnEditable } from '@zeedhi/common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { TekGrid } from './grid';
4
- import { IFilterPropsComponent, ITekGridColumn, ITekGridColumnAggregation } from './interfaces';
5
- /**
6
- * Base class for TekGrid column
7
- */
8
- export declare class TekGridColumn extends GridColumnEditable implements ITekGridColumn {
9
- filterProps: IFilterPropsComponent | IFilterPropsComponent[];
10
- filterable: boolean;
11
- filterIndex?: number;
12
- skipLookupSearch: boolean;
13
- private groupedValue;
14
- private groupOpenedValue?;
15
- groupLabelForEmptyValue: string;
16
- private aggregationValue?;
17
- private isVisibleValue;
18
- /**
19
- * Defines if the column should store the componentProps datasource.data in memory
20
- */
21
- storeData: boolean;
22
- private grid;
23
- /**
24
- * Creates a new TekGrid Column.
25
- * @param props TekGrid column properties
26
- */
27
- constructor(props: ITekGridColumn, grid: TekGrid);
28
- getLookupData(lookupColumn: string, value: any): any;
29
- protected lookupFn(lookupColumn: string, dataToLookup?: any[]): Promise<void>;
30
- protected lookup: (lookupColumn: string) => void;
31
- getBatchLookupData(lookupColumn: string, values: any[]): Promise<IDictionary[]>;
32
- /**
33
- * Memory search, without changing lookupDatasource
34
- */
35
- memorySearch(search: string): Promise<any>;
36
- get grouped(): boolean;
37
- set grouped(value: boolean);
38
- get aggregation(): ITekGridColumnAggregation;
39
- set aggregation(value: ITekGridColumnAggregation);
40
- get groupOpened(): boolean | undefined;
41
- set groupOpened(value: boolean | undefined);
42
- get isVisible(): boolean;
43
- set isVisible(value: boolean);
44
- private changeGrouping;
45
- }
@@ -1,8 +0,0 @@
1
- import { IterableColumnsButtonController, Checkbox } from '@zeedhi/common';
2
- import { IEventParam } from '@zeedhi/core';
3
- import { TekGridColumn } from './grid-column';
4
- export declare class TekGridColumnsButtonController extends IterableColumnsButtonController {
5
- changeGroupedColumn(column: TekGridColumn, { component, event, element }: IEventParam<Checkbox>): void;
6
- changeAggregationColumn(column: TekGridColumn, { component, event, element }: IEventParam<Checkbox>): void;
7
- showHideTekColumn(column: TekGridColumn, { component, event, element }: IEventParam<Checkbox>): void;
8
- }
@@ -1,12 +0,0 @@
1
- import { IterableColumnsButton } from '@zeedhi/common';
2
- import { ITekGridColumnsButton } from './interfaces';
3
- /**
4
- * Base class for TekGrid Columns Button component
5
- */
6
- export declare class TekGridColumnsButton extends IterableColumnsButton implements ITekGridColumnsButton {
7
- hideGroups: boolean;
8
- constructor(props: ITekGridColumnsButton);
9
- onCreated(): void;
10
- private aggregationDataSet;
11
- getAggregationSelectData(): any[];
12
- }