@zeedhi/teknisa-components-common 1.96.3 → 1.97.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 (90) hide show
  1. package/coverage/clover.xml +714 -671
  2. package/coverage/coverage-final.json +45 -45
  3. package/coverage/lcov-report/index.html +16 -16
  4. package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +2 -2
  5. package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +2 -2
  6. package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +9 -9
  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 +1214 -1144
  11. package/dist/tek-components-common.esm.js +13 -7
  12. package/dist/tek-components-common.umd.js +13 -7
  13. package/package.json +3 -3
  14. package/types/components/tek-ag-grid/default-icons.d.ts +53 -0
  15. package/types/components/tek-ag-grid/interfaces.d.ts +9 -0
  16. package/types/components/tek-ag-grid/tek-ag-grid.d.ts +35 -0
  17. package/types/components/tek-datasource/datasource.d.ts +94 -0
  18. package/types/components/tek-grid/default-icons.d.ts +53 -0
  19. package/types/components/tek-grid/filter-dynamic-values.d.ts +9 -0
  20. package/types/components/tek-grid/grid-controller.d.ts +19 -0
  21. package/types/components/tek-grid/grid.d.ts +2 -1
  22. package/types/components/tek-grid/grid_column.d.ts +14 -0
  23. package/types/components/tek-grid/grid_controller.d.ts +15 -0
  24. package/types/components/tek-grid/interfaces.d.ts +1 -0
  25. package/types/components/tek-grid/tek-grid.d.ts +35 -0
  26. package/types/components/tek-login/interfaces.d.ts +3 -0
  27. package/types/components/tek-login/login-children.d.ts +3 -0
  28. package/types/components/tek-login/login.d.ts +58 -0
  29. package/types/components/tek-login/login_children.d.ts +3 -0
  30. package/types/components/tek-tree-grid/interfaces.d.ts +2 -0
  31. package/types/components/tek-tree-grid/tree-grid.d.ts +1 -0
  32. package/coverage/lcov-report/components/crud/crud-add-button.ts.html +0 -250
  33. package/coverage/lcov-report/components/crud/crud-button.ts.html +0 -292
  34. package/coverage/lcov-report/components/crud/crud-cancel-button.ts.html +0 -259
  35. package/coverage/lcov-report/components/crud/crud-delete-button.ts.html +0 -322
  36. package/coverage/lcov-report/components/crud/crud-form.ts.html +0 -382
  37. package/coverage/lcov-report/components/crud/crud-save-button.ts.html +0 -253
  38. package/coverage/lcov-report/components/crud/index.html +0 -191
  39. package/coverage/lcov-report/components/index.html +0 -116
  40. package/coverage/lcov-report/components/index.ts.html +0 -394
  41. package/coverage/lcov-report/components/tek-breadcrumb-header/breadcrumb-header.ts.html +0 -172
  42. package/coverage/lcov-report/components/tek-breadcrumb-header/index.html +0 -116
  43. package/coverage/lcov-report/components/tek-card-title/card-title.ts.html +0 -175
  44. package/coverage/lcov-report/components/tek-card-title/index.html +0 -116
  45. package/coverage/lcov-report/components/tek-datasource/index.html +0 -146
  46. package/coverage/lcov-report/components/tek-datasource/interfaces.ts.html +0 -193
  47. package/coverage/lcov-report/components/tek-datasource/memory-datasource.ts.html +0 -1015
  48. package/coverage/lcov-report/components/tek-datasource/rest-datasource.ts.html +0 -751
  49. package/coverage/lcov-report/components/tek-drag-grid/index.html +0 -116
  50. package/coverage/lcov-report/components/tek-drag-grid/tek-drag-grid.ts.html +0 -409
  51. package/coverage/lcov-report/components/tek-grid/filter-helper.ts.html +0 -145
  52. package/coverage/lcov-report/components/tek-grid/grid-column.ts.html +0 -775
  53. package/coverage/lcov-report/components/tek-grid/grid-columns-button-controller.ts.html +0 -169
  54. package/coverage/lcov-report/components/tek-grid/grid-columns-button.ts.html +0 -190
  55. package/coverage/lcov-report/components/tek-grid/grid-filter-button.ts.html +0 -1282
  56. package/coverage/lcov-report/components/tek-grid/grid.ts.html +0 -3157
  57. package/coverage/lcov-report/components/tek-grid/index.html +0 -221
  58. package/coverage/lcov-report/components/tek-grid/interfaces.ts.html +0 -733
  59. package/coverage/lcov-report/components/tek-grid/layout-options.ts.html +0 -826
  60. package/coverage/lcov-report/components/tek-image/image.ts.html +0 -313
  61. package/coverage/lcov-report/components/tek-image/index.html +0 -116
  62. package/coverage/lcov-report/components/tek-iterable-carousel/index.html +0 -116
  63. package/coverage/lcov-report/components/tek-iterable-carousel/iterable-carousel.ts.html +0 -175
  64. package/coverage/lcov-report/components/tek-iterable-component-render/index.html +0 -116
  65. package/coverage/lcov-report/components/tek-iterable-component-render/iterable-component-render.ts.html +0 -118
  66. package/coverage/lcov-report/components/tek-loading/index.html +0 -116
  67. package/coverage/lcov-report/components/tek-loading/loading.ts.html +0 -196
  68. package/coverage/lcov-report/components/tek-notifications/index.html +0 -116
  69. package/coverage/lcov-report/components/tek-notifications/notifications.ts.html +0 -271
  70. package/coverage/lcov-report/components/tek-product-card/index.html +0 -116
  71. package/coverage/lcov-report/components/tek-product-card/product-card.ts.html +0 -391
  72. package/coverage/lcov-report/components/tek-tree-grid/index.html +0 -116
  73. package/coverage/lcov-report/components/tek-tree-grid/tree-grid.ts.html +0 -1255
  74. package/coverage/lcov-report/components/tek-user-info/TekUserInfoController.ts.html +0 -367
  75. package/coverage/lcov-report/components/tek-user-info/index.html +0 -146
  76. package/coverage/lcov-report/components/tek-user-info/tek-user-info-list.ts.html +0 -268
  77. package/coverage/lcov-report/components/tek-user-info/tek-user-info.ts.html +0 -1096
  78. package/coverage/lcov-report/error/delete-rows-error.ts.html +0 -118
  79. package/coverage/lcov-report/error/index.html +0 -116
  80. package/coverage/lcov-report/utils/grid-base/export-options/button-option.ts.html +0 -166
  81. package/coverage/lcov-report/utils/grid-base/export-options/index.html +0 -146
  82. package/coverage/lcov-report/utils/grid-base/export-options/index.ts.html +0 -94
  83. package/coverage/lcov-report/utils/grid-base/export-options/multi-option.ts.html +0 -355
  84. package/coverage/lcov-report/utils/grid-base/grid-base.ts.html +0 -1960
  85. package/coverage/lcov-report/utils/grid-base/grid-controller.ts.html +0 -457
  86. package/coverage/lcov-report/utils/grid-base/index.html +0 -131
  87. package/coverage/lcov-report/utils/index.html +0 -116
  88. package/coverage/lcov-report/utils/index.ts.html +0 -100
  89. package/coverage/lcov-report/utils/report-filter/index.html +0 -116
  90. package/coverage/lcov-report/utils/report-filter/report-filter.ts.html +0 -256
@@ -2222,6 +2222,7 @@ class TekGrid extends GridEditable {
2222
2222
  this.toolbarSlotProps = false;
2223
2223
  this.editNewRowsOnly = false;
2224
2224
  this.showCheckboxAllFilter = Config.gridShowCheckboxAllFilter || false;
2225
+ this.defaultFilter = {};
2225
2226
  this.defaultLazy = false;
2226
2227
  this.groups = [];
2227
2228
  this.summary = {};
@@ -2253,6 +2254,7 @@ class TekGrid extends GridEditable {
2253
2254
  this.groupsOpened = this.getInitValue('groupsOpened', props.groupsOpened, this.groupsOpened);
2254
2255
  this.showSummaryTotal = this.getInitValue('showSummaryTotal', props.showSummaryTotal, this.showSummaryTotal);
2255
2256
  this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
2257
+ this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
2256
2258
  this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
2257
2259
  this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
2258
2260
  this.actions = props.actions || this.actions;
@@ -2342,7 +2344,7 @@ class TekGrid extends GridEditable {
2342
2344
  const dynamicFilter = this.datasource.dynamicFilter[column.name];
2343
2345
  return dynamicFilter && dynamicFilter.length > 0;
2344
2346
  }
2345
- return this.datasource.filter[column.name];
2347
+ return this.datasource.filter[column.name] && this.datasource.filter[column.name].length > 0;
2346
2348
  }
2347
2349
  buildReportGroups() {
2348
2350
  return this.columns
@@ -2956,9 +2958,10 @@ class TekGridFilterButton extends Button {
2956
2958
  const { datasource } = this.grid;
2957
2959
  if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
2958
2960
  const { dynamicFilter } = datasource;
2959
- Object.keys(dynamicFilter).forEach((column) => {
2960
- if (dynamicFilter[column] && dynamicFilter[column].length > 0) {
2961
- dynamicFilter[column].forEach((filterItem, index) => {
2961
+ const newDynamicFilter = Object.assign(Object.assign({}, this.grid.defaultFilter), dynamicFilter);
2962
+ Object.keys(newDynamicFilter).forEach((column) => {
2963
+ if (newDynamicFilter[column] && newDynamicFilter[column].length > 0) {
2964
+ newDynamicFilter[column].forEach((filterItem, index) => {
2962
2965
  const relation = filterItem.relation || 'AND';
2963
2966
  const operation = filterItem.operation || 'CONTAINS';
2964
2967
  const compName = `${this.grid.name}-filter-${relation}-${operation}-${column}-${index}`;
@@ -2989,11 +2992,12 @@ class TekGridFilterButton extends Button {
2989
2992
  }
2990
2993
  else {
2991
2994
  const { filter } = datasource;
2992
- Object.keys(filter).forEach((item) => {
2993
- if (filter[item]) {
2995
+ const newFilter = Object.assign(Object.assign({}, this.grid.defaultFilter), filter);
2996
+ Object.keys(newFilter).forEach((item) => {
2997
+ if (newFilter[item]) {
2994
2998
  const compName = `${this.grid.name}-filter-AND-CONTAINS-${item}-0`;
2995
2999
  changedCompNames.push(compName);
2996
- component.value[compName] = filter[item];
3000
+ component.value[compName] = newFilter[item];
2997
3001
  }
2998
3002
  });
2999
3003
  }
@@ -3585,6 +3589,7 @@ class TekTreeGrid extends TreeGridEditable {
3585
3589
  ];
3586
3590
  this.toolbarSlotProps = false;
3587
3591
  this.showCheckboxAllFilter = false;
3592
+ this.defaultFilter = {};
3588
3593
  this.title = this.getInitValue('title', props.title, this.title);
3589
3594
  this.addButton = this.getInitValue('addButton', props.addButton, this.addButton);
3590
3595
  this.deleteButton = this.getInitValue('deleteButton', props.deleteButton, this.deleteButton);
@@ -3601,6 +3606,7 @@ class TekTreeGrid extends TreeGridEditable {
3601
3606
  this.showReload = this.getInitValue('showReload', props.showReload, this.showReload);
3602
3607
  this.exportConfig = this.getInitValue('exportConfig', props.exportConfig, this.exportConfig);
3603
3608
  this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
3609
+ this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
3604
3610
  this.exportActions = props.exportActions || this.exportActions;
3605
3611
  this.actions = props.actions || this.actions;
3606
3612
  this.toolbarSlotProps = props.toolbarSlot !== undefined;
@@ -2226,6 +2226,7 @@
2226
2226
  this.toolbarSlotProps = false;
2227
2227
  this.editNewRowsOnly = false;
2228
2228
  this.showCheckboxAllFilter = core.Config.gridShowCheckboxAllFilter || false;
2229
+ this.defaultFilter = {};
2229
2230
  this.defaultLazy = false;
2230
2231
  this.groups = [];
2231
2232
  this.summary = {};
@@ -2257,6 +2258,7 @@
2257
2258
  this.groupsOpened = this.getInitValue('groupsOpened', props.groupsOpened, this.groupsOpened);
2258
2259
  this.showSummaryTotal = this.getInitValue('showSummaryTotal', props.showSummaryTotal, this.showSummaryTotal);
2259
2260
  this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
2261
+ this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
2260
2262
  this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
2261
2263
  this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
2262
2264
  this.actions = props.actions || this.actions;
@@ -2346,7 +2348,7 @@
2346
2348
  const dynamicFilter = this.datasource.dynamicFilter[column.name];
2347
2349
  return dynamicFilter && dynamicFilter.length > 0;
2348
2350
  }
2349
- return this.datasource.filter[column.name];
2351
+ return this.datasource.filter[column.name] && this.datasource.filter[column.name].length > 0;
2350
2352
  }
2351
2353
  buildReportGroups() {
2352
2354
  return this.columns
@@ -2960,9 +2962,10 @@
2960
2962
  const { datasource } = this.grid;
2961
2963
  if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
2962
2964
  const { dynamicFilter } = datasource;
2963
- Object.keys(dynamicFilter).forEach((column) => {
2964
- if (dynamicFilter[column] && dynamicFilter[column].length > 0) {
2965
- dynamicFilter[column].forEach((filterItem, index) => {
2965
+ const newDynamicFilter = Object.assign(Object.assign({}, this.grid.defaultFilter), dynamicFilter);
2966
+ Object.keys(newDynamicFilter).forEach((column) => {
2967
+ if (newDynamicFilter[column] && newDynamicFilter[column].length > 0) {
2968
+ newDynamicFilter[column].forEach((filterItem, index) => {
2966
2969
  const relation = filterItem.relation || 'AND';
2967
2970
  const operation = filterItem.operation || 'CONTAINS';
2968
2971
  const compName = `${this.grid.name}-filter-${relation}-${operation}-${column}-${index}`;
@@ -2993,11 +2996,12 @@
2993
2996
  }
2994
2997
  else {
2995
2998
  const { filter } = datasource;
2996
- Object.keys(filter).forEach((item) => {
2997
- if (filter[item]) {
2999
+ const newFilter = Object.assign(Object.assign({}, this.grid.defaultFilter), filter);
3000
+ Object.keys(newFilter).forEach((item) => {
3001
+ if (newFilter[item]) {
2998
3002
  const compName = `${this.grid.name}-filter-AND-CONTAINS-${item}-0`;
2999
3003
  changedCompNames.push(compName);
3000
- component.value[compName] = filter[item];
3004
+ component.value[compName] = newFilter[item];
3001
3005
  }
3002
3006
  });
3003
3007
  }
@@ -3589,6 +3593,7 @@
3589
3593
  ];
3590
3594
  this.toolbarSlotProps = false;
3591
3595
  this.showCheckboxAllFilter = false;
3596
+ this.defaultFilter = {};
3592
3597
  this.title = this.getInitValue('title', props.title, this.title);
3593
3598
  this.addButton = this.getInitValue('addButton', props.addButton, this.addButton);
3594
3599
  this.deleteButton = this.getInitValue('deleteButton', props.deleteButton, this.deleteButton);
@@ -3605,6 +3610,7 @@
3605
3610
  this.showReload = this.getInitValue('showReload', props.showReload, this.showReload);
3606
3611
  this.exportConfig = this.getInitValue('exportConfig', props.exportConfig, this.exportConfig);
3607
3612
  this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
3613
+ this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
3608
3614
  this.exportActions = props.exportActions || this.exportActions;
3609
3615
  this.actions = props.actions || this.actions;
3610
3616
  this.toolbarSlotProps = props.toolbarSlot !== undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/teknisa-components-common",
3
- "version": "1.96.3",
3
+ "version": "1.97.0",
4
4
  "description": "Teknisa Components Common",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -30,7 +30,7 @@
30
30
  "@types/lodash.merge": "4.6.*"
31
31
  },
32
32
  "peerDependencies": {
33
- "@zeedhi/core": "*"
33
+ "@zeedhi/core": "~1.97.0"
34
34
  },
35
- "gitHead": "4519a44d100e36f2c6cd4438e219376446afd668"
35
+ "gitHead": "97190b2ae31761e5474dae76eca0d3874144b4f5"
36
36
  }
@@ -0,0 +1,53 @@
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;
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,35 @@
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
+ }
@@ -0,0 +1,94 @@
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
+ }
@@ -0,0 +1,53 @@
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;
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,19 @@
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
+ }
@@ -73,6 +73,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
73
73
  editNewRowsOnly: boolean;
74
74
  protected keyShortcutKeyMapping: any;
75
75
  showCheckboxAllFilter: boolean;
76
+ defaultFilter: IDictionary;
76
77
  /**
77
78
  * TekGrid class constructor
78
79
  * @param props TekGrid properties
@@ -89,7 +90,7 @@ export declare class TekGrid extends GridEditable implements ITekGrid {
89
90
  * @param columns Grid columns parameter
90
91
  */
91
92
  protected getColumns(columns: ITekGridColumn[]): TekGridColumn[];
92
- columnHasFilterData(column: TekGridColumn): any;
93
+ columnHasFilterData(column: TekGridColumn): boolean;
93
94
  private buildReportGroups;
94
95
  private buildReportAggregations;
95
96
  getReport(type: string, portrait?: boolean, rowObj?: any): Promise<Window | null>;
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1,15 @@
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
+ }
@@ -60,6 +60,7 @@ export interface ITekGrid extends IGridEditable {
60
60
  layoutOptions?: TekGridLayoutOptions;
61
61
  mainGrid?: boolean;
62
62
  showCheckboxAllFilter?: boolean;
63
+ defaultFilter?: IDictionary;
63
64
  }
64
65
  export declare type MultiOptionParams = {
65
66
  iconName: string;
@@ -0,0 +1,35 @@
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
+ }
@@ -0,0 +1,3 @@
1
+ import { ILogin } from '@zeedhi/common';
2
+ export interface ITekLogin extends ILogin {
3
+ }
@@ -0,0 +1,3 @@
1
+ import { IComponentRender } from '@zeedhi/common';
2
+ import { TekLogin } from './login';
3
+ export declare function getChildren(login: TekLogin): IComponentRender[];
@@ -0,0 +1,58 @@
1
+ import { Button, Checkbox, IComponentRender, Login, Select, Text } from '@zeedhi/common';
2
+ import { IEventParam } from '@zeedhi/core';
3
+ import { ITekLogin } from './interfaces';
4
+ export declare class TekLogin extends Login implements ITekLogin {
5
+ cardWidth: string | number;
6
+ layout: string;
7
+ children: IComponentRender[];
8
+ constructor(props: ITekLogin);
9
+ private testLicenseKeyMap;
10
+ private attempts;
11
+ private confirmSessionChange;
12
+ private user;
13
+ private password;
14
+ private hash;
15
+ private userData;
16
+ private privacyModal?;
17
+ onMounted(element: HTMLElement): void;
18
+ onBeforeDestroy(): void;
19
+ privacyClick({ component }: IEventParam<Text>): void;
20
+ private findPrivacyPolicyByAuthentication;
21
+ private openModalPrivacyPolicy;
22
+ loginEmailPrivacyPolicyCancel(): void;
23
+ loginEmailPrivacyPolicyConfirm({ component }: IEventParam<Button>): void;
24
+ forgetClick(): void;
25
+ loginForgetPasswordConfirm({ component }: IEventParam<Button>): void;
26
+ loginForgetPasswordCancel(): void;
27
+ private requestNewPassword;
28
+ private setCurrentLanguage;
29
+ private getLanguageNewFormat;
30
+ private getLanguageOldFormat;
31
+ private updateLanguages;
32
+ private getDataSource;
33
+ private setDataSource;
34
+ private getProductLanguages;
35
+ changeLanguage({ component }: IEventParam<Select>): void;
36
+ changeKeepConnected({ component }: IEventParam<Checkbox>): void;
37
+ private generateKey;
38
+ loginClick({ component }: IEventParam<Button>): void;
39
+ private doLogin;
40
+ private checkLoginResponse;
41
+ private checkErrorResponse;
42
+ private expiredPasswordValidation;
43
+ private showDialogExpiredPassword;
44
+ private openExpiredPasswordWidget;
45
+ private showMessage;
46
+ loginExpiredPasswordConfirm({ component }: IEventParam<Button>): void;
47
+ loginExpiredPasswordCancel(): void;
48
+ private showForm;
49
+ private updatePassword;
50
+ private validateRcUrl;
51
+ private redirectAfterLogin;
52
+ private isJson;
53
+ private defaultError;
54
+ private showInvalidPasswordMaskMessage;
55
+ private setLogAccess;
56
+ private redirectToProduct;
57
+ private testLicenseConnection;
58
+ }
@@ -0,0 +1,3 @@
1
+ import { IComponentRender } from '@zeedhi/common';
2
+ import { TekLogin } from './login';
3
+ export declare function getChildren(login: TekLogin): IComponentRender[];
@@ -1,4 +1,5 @@
1
1
  import { IComponentRender, ITreeGridEditable } from '@zeedhi/common';
2
+ import { IDictionary } from '@zeedhi/core';
2
3
  import { ITekGridColumn, ITekGridEvents, ITekGridExportConfig, TekGridLayoutOptions, IModalFilterProps } from '..';
3
4
  export interface ITekTreeGrid extends ITreeGridEditable {
4
5
  actions?: IComponentRender[];
@@ -22,4 +23,5 @@ export interface ITekTreeGrid extends ITreeGridEditable {
22
23
  exportActions?: IComponentRender[];
23
24
  layoutOptions?: TekGridLayoutOptions;
24
25
  showCheckboxAllFilter?: boolean;
26
+ defaultFilter?: IDictionary;
25
27
  }
@@ -63,6 +63,7 @@ export declare class TekTreeGrid extends TreeGridEditable implements ITekTreeGri
63
63
  filterRelationsDatasource: Datasource;
64
64
  filterOperationsDatasource: Datasource;
65
65
  showCheckboxAllFilter: boolean;
66
+ defaultFilter: IDictionary;
66
67
  /**
67
68
  * TekTreeGrid class constructor
68
69
  * @param props TekTreeGrid properties