@zeedhi/teknisa-components-common 1.117.1 → 3.0.1
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/.package.json +43 -0
- package/dist/teknisa-components-common.js +3802 -0
- package/dist/teknisa-components-common.min.js +3802 -0
- package/dist/types/components/index.d.ts +7 -0
- package/{types → dist/types}/components/tek-breadcrumb-header/breadcrumb-header.d.ts +12 -12
- package/{types → dist/types}/components/tek-breadcrumb-header/interfaces.d.ts +6 -6
- package/dist/types/components/tek-datasource/index.d.ts +3 -0
- package/{types → dist/types}/components/tek-datasource/interfaces.d.ts +16 -16
- package/{types/components/tek-datasource/memory-datasource.d.ts → dist/types/components/tek-datasource/tek-memory-datasource.d.ts} +93 -100
- package/{types/components/tek-datasource/rest-datasource.d.ts → dist/types/components/tek-datasource/tek-rest-datasource.d.ts} +95 -103
- package/dist/types/components/tek-grid/columns-searcher.d.ts +5 -0
- package/dist/types/components/tek-grid/dynamic-filter-datasource-factory.d.ts +6 -0
- package/{types → dist/types}/components/tek-grid/filter-helper.d.ts +7 -7
- package/{types → dist/types}/components/tek-grid/grid-filter-button.d.ts +29 -31
- package/dist/types/components/tek-grid/grouped-data-manager.d.ts +82 -0
- package/dist/types/components/tek-grid/grouped-data-selector.d.ts +7 -0
- package/dist/types/components/tek-grid/grouped-view-navigator.d.ts +14 -0
- package/dist/types/components/tek-grid/index.d.ts +18 -0
- package/dist/types/components/tek-grid/interfaces.d.ts +259 -0
- package/dist/types/components/tek-grid/keymap-grouped.d.ts +6 -0
- package/{types → dist/types}/components/tek-grid/layout-options.d.ts +39 -31
- package/{types/components/tek-grid/grid-column.d.ts → dist/types/components/tek-grid/tek-grid-column.d.ts} +42 -45
- package/{types/components/tek-grid/grid-columns-button-controller.d.ts → dist/types/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.d.ts} +8 -8
- package/{types/components/tek-grid/grid-columns-button.d.ts → dist/types/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.d.ts} +13 -12
- package/dist/types/components/tek-grid/tek-grid-controller.d.ts +31 -0
- package/dist/types/components/tek-grid/tek-grid-events.d.ts +31 -0
- package/{types/utils/grid-base → dist/types/components/tek-grid/tek-grid-toolbar-provider}/export-options/button-option.d.ts +17 -16
- package/{types/utils/grid-base → dist/types/components/tek-grid/tek-grid-toolbar-provider}/export-options/index.d.ts +3 -3
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.d.ts +5 -0
- package/{types/utils/grid-base → dist/types/components/tek-grid/tek-grid-toolbar-provider}/export-options/multi-option.d.ts +12 -12
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/index.d.ts +2 -0
- package/dist/types/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.d.ts +22 -0
- package/dist/types/components/tek-grid/tek-grid.d.ts +216 -0
- package/{types → dist/types}/components/tek-user-info/TekUserInfoController.d.ts +22 -21
- package/{types → dist/types}/components/tek-user-info/interfaces.d.ts +27 -28
- package/{types → dist/types}/components/tek-user-info/tek-user-info-list.d.ts +32 -31
- package/{types → dist/types}/components/tek-user-info/tek-user-info.d.ts +37 -38
- package/{types → dist/types}/error/delete-rows-error.d.ts +6 -6
- package/dist/types/error/tek-grid-delete-rows-error.d.ts +7 -0
- package/dist/types/error/teknisa-common-error.d.ts +6 -0
- package/dist/types/index.d.ts +2 -0
- package/{types → dist/types}/utils/config/config.d.ts +7 -7
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/is-filled-object/is-filled-object.d.ts +2 -0
- package/dist/types/utils/is-nil.d.ts +1 -0
- package/environments.json +14 -0
- package/package.json +26 -18
- package/src/components/index.ts +101 -0
- package/src/components/tek-breadcrumb-header/breadcrumb-header.ts +29 -0
- package/src/components/tek-breadcrumb-header/interfaces.ts +7 -0
- package/src/components/tek-datasource/index.ts +3 -0
- package/src/components/tek-datasource/interfaces.ts +36 -0
- package/src/components/tek-datasource/tek-memory-datasource.ts +314 -0
- package/src/components/tek-datasource/tek-rest-datasource.ts +224 -0
- package/src/components/tek-grid/columns-searcher.ts +22 -0
- package/src/components/tek-grid/dynamic-filter-datasource-factory.ts +20 -0
- package/src/components/tek-grid/filter-helper.ts +20 -0
- package/src/components/tek-grid/grid-filter-button.ts +419 -0
- package/src/components/tek-grid/grouped-data-manager.ts +448 -0
- package/src/components/tek-grid/grouped-data-selector.ts +40 -0
- package/src/components/tek-grid/grouped-view-navigator.ts +84 -0
- package/src/components/tek-grid/index.ts +18 -0
- package/src/components/tek-grid/interfaces.ts +329 -0
- package/src/components/tek-grid/keymap-grouped.ts +20 -0
- package/src/components/tek-grid/layout-options.ts +248 -0
- package/src/components/tek-grid/tek-grid-column.ts +193 -0
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts +28 -0
- package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts +38 -0
- package/src/components/tek-grid/tek-grid-controller.ts +140 -0
- package/src/components/tek-grid/tek-grid-events.ts +105 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts +26 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts +3 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.ts +6 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts +85 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/index.ts +2 -0
- package/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts +365 -0
- package/src/components/tek-grid/tek-grid.ts +1118 -0
- package/src/components/tek-user-info/TekUserInfoController.ts +87 -0
- package/src/components/tek-user-info/interfaces.ts +21 -0
- package/src/components/tek-user-info/tek-user-info-list.ts +64 -0
- package/src/components/tek-user-info/tek-user-info.ts +337 -0
- package/src/error/tek-grid-delete-rows-error.ts +15 -0
- package/src/error/teknisa-common-error.ts +8 -0
- package/src/index.ts +2 -0
- package/src/utils/config/config.ts +8 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/is-filled-object/is-filled-object.ts +5 -0
- package/src/utils/is-nil.ts +3 -0
- package/tests/__helpers__/component-event-helper.ts +1 -1
- package/tests/__helpers__/get-child-helper.ts +1 -1
- package/tests/__helpers__/mock-created-helper.ts +1 -1
- package/tests/unit/components/crud/crud-button.spec.ts +1 -1
- package/tests/unit/components/tek-datasource/memory-datasource.spec.ts +1 -11
- package/tests/unit/components/tek-datasource/rest-datasource.spec.ts +5 -7
- package/tests/unit/components/tek-drag-grid/tek-drag-grid.spec.ts +1 -1
- package/tests/unit/components/tek-grid/button-option.spec.ts +49 -0
- package/tests/unit/components/tek-grid/columns-searcher.spec.ts +112 -0
- package/tests/unit/components/tek-grid/dynamic-filter-datasource-factory.spec.ts +90 -0
- package/tests/unit/components/tek-grid/filter-helper.spec.ts +34 -130
- package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +114 -239
- package/tests/unit/components/tek-grid/grouped-data-manager.spec.ts +593 -0
- package/tests/unit/components/tek-grid/grouped-data-selector.spec.ts +136 -0
- package/tests/unit/components/tek-grid/grouped-view-navigator.spec.ts +244 -0
- package/tests/unit/components/tek-grid/keymap-grouped.spec.ts +20 -0
- package/tests/unit/components/tek-grid/{layout_options.spec.ts → layout-options.spec.ts} +70 -30
- package/tests/unit/components/tek-grid/multi-option.spec.ts +139 -0
- package/tests/unit/components/tek-grid/{grid-column.spec.ts → tek-grid-column.spec.ts} +44 -2
- package/tests/unit/components/tek-grid/{grid-columns-button.spec.ts → tek-grid-columns-button.spec.ts} +42 -9
- package/tests/unit/components/tek-grid/tek-grid-controller.spec.ts +253 -0
- package/tests/unit/components/tek-grid/tek-grid-events.spec.ts +186 -0
- package/tests/unit/components/tek-grid/tek-grid-toolbar-provider.spec.ts +34 -0
- package/tests/unit/components/tek-grid/tek-grid.spec.ts +895 -0
- package/tests/unit/components/tek-grid/tek-memory-datasource.spec.ts +482 -0
- package/tests/unit/components/tek-grid/tek-rest-datasource.spec.ts +422 -0
- package/tests/unit/components/tek-user-info/tek-user-info-list.spec.ts +1 -1
- package/tests/unit/components/tek-user-info/tek-user-info.spec.ts +10 -14
- package/tests/unit/components/tree-grid/tree-grid.spec.ts +4 -28
- package/tests/unit/utils/grid-base/export-options/multi-option.spec.ts +2 -2
- package/tests/unit/utils/grid-base/grid-controller.spec.ts +17 -152
- package/tsconfig.build.json +7 -0
- package/coverage/clover.xml +0 -2007
- package/coverage/coverage-final.json +0 -48
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -431
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -210
- package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +0 -100
- package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +0 -94
- package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +0 -166
- package/coverage/lcov-report/tests/__helpers__/index.html +0 -176
- package/coverage/lcov-report/tests/__helpers__/index.ts.html +0 -94
- package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +0 -121
- package/coverage/lcov.info +0 -3885
- package/dist/tek-components-common.esm.js +0 -4833
- package/dist/tek-components-common.umd.js +0 -4870
- package/tests/unit/components/tek-grid/grid.spec.ts +0 -3377
- package/tests/unit/utils/grid-base/delete-rows-error.spec.ts +0 -24
- package/types/components/crud/crud-add-button.d.ts +0 -38
- package/types/components/crud/crud-button.d.ts +0 -27
- package/types/components/crud/crud-cancel-button.d.ts +0 -28
- package/types/components/crud/crud-delete-button.d.ts +0 -42
- package/types/components/crud/crud-form.d.ts +0 -46
- package/types/components/crud/crud-save-button.d.ts +0 -24
- package/types/components/crud/interfaces.d.ts +0 -15
- package/types/components/index.d.ts +0 -41
- package/types/components/tek-card-title/card-title.d.ts +0 -14
- package/types/components/tek-card-title/interfaces.d.ts +0 -9
- package/types/components/tek-drag-grid/interfaces.d.ts +0 -7
- package/types/components/tek-drag-grid/tek-drag-grid.d.ts +0 -36
- package/types/components/tek-grid/grid.d.ts +0 -267
- package/types/components/tek-grid/interfaces.d.ts +0 -203
- package/types/components/tek-image/image.d.ts +0 -55
- package/types/components/tek-image/interfaces.d.ts +0 -12
- package/types/components/tek-iterable-carousel/interfaces.d.ts +0 -5
- package/types/components/tek-iterable-carousel/iterable-carousel.d.ts +0 -13
- package/types/components/tek-iterable-component-render/interfaces.d.ts +0 -3
- package/types/components/tek-iterable-component-render/iterable-component-render.d.ts +0 -10
- package/types/components/tek-loading/interfaces.d.ts +0 -6
- package/types/components/tek-loading/loading.d.ts +0 -24
- package/types/components/tek-notifications/interfaces.d.ts +0 -22
- package/types/components/tek-notifications/notifications.d.ts +0 -35
- package/types/components/tek-product-card/interfaces.d.ts +0 -19
- package/types/components/tek-product-card/product-card.d.ts +0 -66
- package/types/components/tek-tree-grid/interfaces.d.ts +0 -30
- package/types/components/tek-tree-grid/tree-grid.d.ts +0 -102
- package/types/error/incomplete-groups-error.d.ts +0 -8
- package/types/index.d.ts +0 -2
- package/types/utils/extract-properties.d.ts +0 -7
- package/types/utils/grid-base/export-options/interfaces.d.ts +0 -5
- package/types/utils/grid-base/grid-base.d.ts +0 -59
- package/types/utils/grid-base/grid-controller.d.ts +0 -27
- package/types/utils/index.d.ts +0 -6
- package/types/utils/report-filter/report-filter.d.ts +0 -12
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './tek-breadcrumb-header/breadcrumb-header';
|
|
2
|
+
export * from './tek-breadcrumb-header/interfaces';
|
|
3
|
+
export * from './tek-grid';
|
|
4
|
+
export * from './tek-datasource';
|
|
5
|
+
export * from './tek-user-info/interfaces';
|
|
6
|
+
export * from './tek-user-info/tek-user-info';
|
|
7
|
+
export * from './tek-user-info/tek-user-info-list';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IBreadcrumbHeader } from './interfaces';
|
|
3
|
-
/**
|
|
4
|
-
* BreadcrumbHeader join breadcrumb and title
|
|
5
|
-
*/
|
|
6
|
-
export declare class BreadcrumbHeader extends ComponentRender implements IBreadcrumbHeader {
|
|
7
|
-
breadcrumb: IBreadcrumbs;
|
|
8
|
-
title: string;
|
|
9
|
-
rightSlot: IComponentRender[];
|
|
10
|
-
constructor(props: IBreadcrumbHeader);
|
|
11
|
-
private getBreadcrumbProperties;
|
|
12
|
-
}
|
|
1
|
+
import { type IBreadcrumbs, ComponentRender, type IComponentRender } from '@zeedhi/common';
|
|
2
|
+
import type { IBreadcrumbHeader } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* BreadcrumbHeader join breadcrumb and title
|
|
5
|
+
*/
|
|
6
|
+
export declare class BreadcrumbHeader extends ComponentRender implements IBreadcrumbHeader {
|
|
7
|
+
breadcrumb: IBreadcrumbs;
|
|
8
|
+
title: string;
|
|
9
|
+
rightSlot: IComponentRender[];
|
|
10
|
+
constructor(props: IBreadcrumbHeader);
|
|
11
|
+
private getBreadcrumbProperties;
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface IBreadcrumbHeader extends IComponentRender {
|
|
3
|
-
breadcrumb: IBreadcrumbs;
|
|
4
|
-
title: string;
|
|
5
|
-
rightSlot?: IComponentRender[];
|
|
6
|
-
}
|
|
1
|
+
import type { IBreadcrumbs, IComponentRender } from '@zeedhi/common';
|
|
2
|
+
export interface IBreadcrumbHeader extends IComponentRender {
|
|
3
|
+
breadcrumb: IBreadcrumbs;
|
|
4
|
+
title: string;
|
|
5
|
+
rightSlot?: IComponentRender[];
|
|
6
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
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
|
+
import { IDictionary, IMemoryDatasource, IRestDatasource } 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 +1,93 @@
|
|
|
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
|
-
*
|
|
32
|
-
* @param
|
|
33
|
-
* @
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* @param
|
|
40
|
-
* @returns Promise with data collection
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param
|
|
46
|
-
* @returns Promise with data collection
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
* @returns
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
+
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
|
+
* Adds a new dynamic filter position or replace if exists
|
|
32
|
+
* @param column Dynamic Filter column name
|
|
33
|
+
* @param value Dynamic Filter value
|
|
34
|
+
* @returns Promise with data collection
|
|
35
|
+
*/
|
|
36
|
+
addDynamicFilter(column: string, value: any): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Removes a dynamic filter position
|
|
39
|
+
* @param column Dynamic Filter column name
|
|
40
|
+
* @returns Promise with data collection
|
|
41
|
+
*/
|
|
42
|
+
removeDynamicFilter(column: string): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Sets new dynamic filter value
|
|
45
|
+
* @param filter Dynamic Filter value
|
|
46
|
+
* @returns Promise with data collection
|
|
47
|
+
*/
|
|
48
|
+
setDynamicFilter(filter: IDictionary<any>): Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* Clears Dynamic filter value
|
|
51
|
+
* @returns Promise with data collection
|
|
52
|
+
*/
|
|
53
|
+
clearDynamicFilter(): Promise<any>;
|
|
54
|
+
/**
|
|
55
|
+
* Resets page and selected rows and tries to update the url
|
|
56
|
+
* @returns Promise with data collection
|
|
57
|
+
*/
|
|
58
|
+
updateDynamicFilter(): Promise<any>;
|
|
59
|
+
/**
|
|
60
|
+
* Checks if a filter value is valid
|
|
61
|
+
* @param value Filter value
|
|
62
|
+
* @returns Is valid filter value
|
|
63
|
+
*/
|
|
64
|
+
protected isValidDynamicFilterValue(column: string, value?: IDictionary<any>[]): boolean | undefined;
|
|
65
|
+
clone(): {
|
|
66
|
+
dynamicFilter: IDictionary<IDynamicFilterItem[]>;
|
|
67
|
+
searchJoin: IDictionary<(string | number)[]>;
|
|
68
|
+
type: string;
|
|
69
|
+
translate?: boolean | string[] | undefined;
|
|
70
|
+
sortFunction?: ((value1: any, value2: any, columnName: string) => boolean) | undefined;
|
|
71
|
+
sortParams?: IDictionary<any> | undefined;
|
|
72
|
+
currentRow?: IDictionary<any> | undefined;
|
|
73
|
+
data?: IDictionary<any>[] | undefined;
|
|
74
|
+
filter?: IDictionary<any> | undefined;
|
|
75
|
+
limit?: string | number | undefined;
|
|
76
|
+
loadAll?: boolean | undefined;
|
|
77
|
+
loading?: boolean | undefined;
|
|
78
|
+
order?: string[] | undefined;
|
|
79
|
+
page?: string | number | undefined;
|
|
80
|
+
search?: string | undefined;
|
|
81
|
+
searchIn?: string[] | undefined;
|
|
82
|
+
uniqueKey?: string | undefined;
|
|
83
|
+
watchUrl?: boolean | undefined;
|
|
84
|
+
events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Updates filtered data
|
|
88
|
+
*/
|
|
89
|
+
protected updateFilteredData(): void;
|
|
90
|
+
protected getRowByDynamicFilter(row: IDictionary<any>): any;
|
|
91
|
+
protected getRowBySearchJoin(row: IDictionary<any>): boolean;
|
|
92
|
+
hasFilter(columnName: string): boolean;
|
|
93
|
+
}
|
|
@@ -1,103 +1,95 @@
|
|
|
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
|
-
*
|
|
32
|
-
* @param
|
|
33
|
-
* @
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* @param
|
|
40
|
-
* @returns Promise with data collection
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
45
|
-
* @param
|
|
46
|
-
* @returns Promise with data collection
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
*
|
|
62
|
-
* @returns
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
+
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
|
+
* Adds a new dynamic filter position or replace if exists
|
|
32
|
+
* @param column Dynamic Filter column name
|
|
33
|
+
* @param value Dynamic Filter value
|
|
34
|
+
* @returns Promise with data collection
|
|
35
|
+
*/
|
|
36
|
+
addDynamicFilter(column: string, value: any): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Removes a dynamic filter position
|
|
39
|
+
* @param column Dynamic Filter column name
|
|
40
|
+
* @returns Promise with data collection
|
|
41
|
+
*/
|
|
42
|
+
removeDynamicFilter(column: string): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Sets new dynamic filter value
|
|
45
|
+
* @param filter Dynamic Filter value
|
|
46
|
+
* @returns Promise with data collection
|
|
47
|
+
*/
|
|
48
|
+
setDynamicFilter(filter: IDictionary<any>): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Clears Dynamic filter value
|
|
51
|
+
* @returns Promise with data collection
|
|
52
|
+
*/
|
|
53
|
+
clearDynamicFilter(): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Resets page and selected rows and tries to update the url
|
|
56
|
+
* @returns Promise with data collection
|
|
57
|
+
*/
|
|
58
|
+
updateDynamicFilter(): Promise<IDictionary<any> | IDictionary<any>[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Checks if a filter value is valid
|
|
61
|
+
* @param value Filter value
|
|
62
|
+
* @returns Is valid filter value
|
|
63
|
+
*/
|
|
64
|
+
protected isValidDynamicFilterValue(column: string, value?: IDictionary<any>[]): boolean | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves request params
|
|
67
|
+
*/
|
|
68
|
+
protected getRequestParams(): any;
|
|
69
|
+
hasFilter(columnName: string): boolean;
|
|
70
|
+
clone(): {
|
|
71
|
+
dynamicFilter: IDictionary<IDynamicFilterItem[]>;
|
|
72
|
+
searchJoin: IDictionary<(string | number)[]>;
|
|
73
|
+
type: string;
|
|
74
|
+
route?: string | undefined;
|
|
75
|
+
lazyLoad?: boolean | undefined;
|
|
76
|
+
arrayFormat?: import("@zeedhi/core").ArrayFormatType | undefined;
|
|
77
|
+
find?: IDictionary<any> | undefined;
|
|
78
|
+
localSearch?: boolean | undefined;
|
|
79
|
+
currentRow?: IDictionary<any> | undefined; /** Search Join data */
|
|
80
|
+
data?: IDictionary<any>[] | undefined;
|
|
81
|
+
filter?: IDictionary<any> | undefined;
|
|
82
|
+
limit?: string | number | undefined;
|
|
83
|
+
loadAll?: boolean | undefined;
|
|
84
|
+
loading?: boolean | undefined;
|
|
85
|
+
order?: string[] | undefined;
|
|
86
|
+
page?: string | number | undefined;
|
|
87
|
+
search?: string | undefined;
|
|
88
|
+
searchIn?: string[] | undefined;
|
|
89
|
+
uniqueKey?: string | undefined;
|
|
90
|
+
watchUrl?: boolean | undefined; /**
|
|
91
|
+
* Dynamic Filter applied flag
|
|
92
|
+
*/
|
|
93
|
+
events?: import("@zeedhi/core").IDatasourceEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { IColumnsSearcher, ITekGridColumn } from './interfaces';
|
|
3
|
+
export declare class ColumnsSearcher implements IColumnsSearcher {
|
|
4
|
+
searchColumn(columns: ITekGridColumn[], search: string): Promise<IDictionary<(string | number)[]>>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Datasource, IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { IDynamicFilterDatasourceFactory } from './interfaces';
|
|
3
|
+
export declare class DynamicFilterDatasourceFactory implements IDynamicFilterDatasourceFactory {
|
|
4
|
+
factory(options: IDictionary<boolean>): Datasource;
|
|
5
|
+
private getFilterOptionsData;
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
+
import { TekGridColumn } from './tek-grid-column';
|
|
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,31 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ITekGridFilterButton } from './interfaces';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
private
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
private changeHelperEvent;
|
|
31
|
-
}
|
|
1
|
+
import { IDictionary } from '@zeedhi/core';
|
|
2
|
+
import { Button, Iterable } from '@zeedhi/common';
|
|
3
|
+
import { ISupportsToolbar, ITekGridFilterButton } from './interfaces';
|
|
4
|
+
import { TekGridColumn } from './tek-grid-column';
|
|
5
|
+
/**
|
|
6
|
+
* Base class for TekGrid Filter Button component
|
|
7
|
+
*/
|
|
8
|
+
export declare class TekGridFilterButton extends Button implements ITekGridFilterButton {
|
|
9
|
+
gridName?: string;
|
|
10
|
+
grid: Iterable<TekGridColumn> & ISupportsToolbar;
|
|
11
|
+
showCheckboxAll: boolean;
|
|
12
|
+
private filterModal?;
|
|
13
|
+
protected filterFormInputs: IDictionary<string[]>;
|
|
14
|
+
constructor(props: ITekGridFilterButton);
|
|
15
|
+
loadGrid(gridName?: string): void;
|
|
16
|
+
click(event?: Event): void;
|
|
17
|
+
private loadFilterValues;
|
|
18
|
+
hideFilterModal(): void;
|
|
19
|
+
destroyFilterModal(): void;
|
|
20
|
+
private createFilterFromColumns;
|
|
21
|
+
onBeforeDestroy(): void;
|
|
22
|
+
private formatFormValue;
|
|
23
|
+
private applyFilter;
|
|
24
|
+
private setFilter;
|
|
25
|
+
private clearFilter;
|
|
26
|
+
private sortFilterIndex;
|
|
27
|
+
private getFilterModalComponents;
|
|
28
|
+
private changeHelperEvent;
|
|
29
|
+
}
|