@zeedhi/teknisa-components-common 1.115.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 (105) 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/coverage/clover.xml +0 -2005
  34. package/coverage/coverage-final.json +0 -48
  35. package/coverage/lcov-report/base.css +0 -224
  36. package/coverage/lcov-report/block-navigation.js +0 -87
  37. package/coverage/lcov-report/favicon.png +0 -0
  38. package/coverage/lcov-report/index.html +0 -431
  39. package/coverage/lcov-report/prettify.css +0 -1
  40. package/coverage/lcov-report/prettify.js +0 -2
  41. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  42. package/coverage/lcov-report/sorter.js +0 -210
  43. package/coverage/lcov-report/tests/__helpers__/component-event-helper.ts.html +0 -100
  44. package/coverage/lcov-report/tests/__helpers__/flush-promises-helper.ts.html +0 -94
  45. package/coverage/lcov-report/tests/__helpers__/get-child-helper.ts.html +0 -166
  46. package/coverage/lcov-report/tests/__helpers__/index.html +0 -176
  47. package/coverage/lcov-report/tests/__helpers__/index.ts.html +0 -94
  48. package/coverage/lcov-report/tests/__helpers__/mock-created-helper.ts.html +0 -121
  49. package/coverage/lcov.info +0 -3883
  50. package/dist/tek-components-common.esm.js +0 -4830
  51. package/dist/tek-components-common.umd.js +0 -4867
  52. package/tests/unit/utils/grid-base/delete-rows-error.spec.ts +0 -24
  53. package/types/components/crud/crud-add-button.d.ts +0 -38
  54. package/types/components/crud/crud-button.d.ts +0 -27
  55. package/types/components/crud/crud-cancel-button.d.ts +0 -28
  56. package/types/components/crud/crud-delete-button.d.ts +0 -42
  57. package/types/components/crud/crud-form.d.ts +0 -46
  58. package/types/components/crud/crud-save-button.d.ts +0 -24
  59. package/types/components/crud/interfaces.d.ts +0 -15
  60. package/types/components/index.d.ts +0 -41
  61. package/types/components/tek-card-title/card-title.d.ts +0 -14
  62. package/types/components/tek-card-title/interfaces.d.ts +0 -9
  63. package/types/components/tek-datasource/interfaces.d.ts +0 -16
  64. package/types/components/tek-datasource/memory-datasource.d.ts +0 -100
  65. package/types/components/tek-datasource/rest-datasource.d.ts +0 -103
  66. package/types/components/tek-drag-grid/interfaces.d.ts +0 -7
  67. package/types/components/tek-drag-grid/tek-drag-grid.d.ts +0 -36
  68. package/types/components/tek-grid/filter-helper.d.ts +0 -7
  69. package/types/components/tek-grid/grid-column.d.ts +0 -45
  70. package/types/components/tek-grid/grid-columns-button-controller.d.ts +0 -8
  71. package/types/components/tek-grid/grid-columns-button.d.ts +0 -12
  72. package/types/components/tek-grid/grid-filter-button.d.ts +0 -31
  73. package/types/components/tek-grid/grid.d.ts +0 -267
  74. package/types/components/tek-grid/interfaces.d.ts +0 -203
  75. package/types/components/tek-grid/layout-options.d.ts +0 -31
  76. package/types/components/tek-image/image.d.ts +0 -55
  77. package/types/components/tek-image/interfaces.d.ts +0 -12
  78. package/types/components/tek-iterable-carousel/interfaces.d.ts +0 -5
  79. package/types/components/tek-iterable-carousel/iterable-carousel.d.ts +0 -13
  80. package/types/components/tek-iterable-component-render/interfaces.d.ts +0 -3
  81. package/types/components/tek-iterable-component-render/iterable-component-render.d.ts +0 -10
  82. package/types/components/tek-loading/interfaces.d.ts +0 -6
  83. package/types/components/tek-loading/loading.d.ts +0 -24
  84. package/types/components/tek-notifications/interfaces.d.ts +0 -22
  85. package/types/components/tek-notifications/notifications.d.ts +0 -35
  86. package/types/components/tek-product-card/interfaces.d.ts +0 -19
  87. package/types/components/tek-product-card/product-card.d.ts +0 -66
  88. package/types/components/tek-tree-grid/interfaces.d.ts +0 -30
  89. package/types/components/tek-tree-grid/tree-grid.d.ts +0 -102
  90. package/types/components/tek-user-info/TekUserInfoController.d.ts +0 -21
  91. package/types/components/tek-user-info/interfaces.d.ts +0 -27
  92. package/types/components/tek-user-info/tek-user-info-list.d.ts +0 -31
  93. package/types/components/tek-user-info/tek-user-info.d.ts +0 -37
  94. package/types/error/incomplete-groups-error.d.ts +0 -8
  95. package/types/index.d.ts +0 -2
  96. package/types/utils/config/config.d.ts +0 -7
  97. package/types/utils/extract-properties.d.ts +0 -7
  98. package/types/utils/grid-base/export-options/button-option.d.ts +0 -16
  99. package/types/utils/grid-base/export-options/index.d.ts +0 -3
  100. package/types/utils/grid-base/export-options/interfaces.d.ts +0 -5
  101. package/types/utils/grid-base/export-options/multi-option.d.ts +0 -12
  102. package/types/utils/grid-base/grid-base.d.ts +0 -59
  103. package/types/utils/grid-base/grid-controller.d.ts +0 -27
  104. package/types/utils/index.d.ts +0 -6
  105. package/types/utils/report-filter/report-filter.d.ts +0 -12
@@ -1,31 +0,0 @@
1
- import { Button, Input } from '@zeedhi/common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { ITekGridFilterButton } from './interfaces';
4
- import { TekGrid } from './grid';
5
- import { TekTreeGrid } from '../tek-tree-grid/tree-grid';
6
- /**
7
- * Base class for TekGrid Filter Button component
8
- */
9
- export declare class TekGridFilterButton extends Button implements ITekGridFilterButton {
10
- gridName?: string;
11
- grid: TekGrid | TekTreeGrid;
12
- showCheckboxAll: boolean;
13
- private filterModal?;
14
- protected filterFormInputs: IDictionary<string[]>;
15
- constructor(props: ITekGridFilterButton);
16
- loadGrid(gridName?: string): void;
17
- click(event?: Event): void;
18
- private loadFilterValues;
19
- hideFilterModal(): void;
20
- destroyFilterModal(): void;
21
- private createFilterFromColumns;
22
- onBeforeDestroy(): void;
23
- private formatFormValue;
24
- private applyFilter;
25
- private setFilter;
26
- private clearFilter;
27
- private sortFilterIndex;
28
- getFilterInputs(columnName?: string): Input[];
29
- private getFilterModalComponents;
30
- private changeHelperEvent;
31
- }
@@ -1,267 +0,0 @@
1
- import { GridEditable, IComponentRender, Input, LabelFormatter, GridColumnEditable } from '@zeedhi/common';
2
- import { Datasource, IDictionary, IEventParam } from '@zeedhi/core';
3
- import { ITekGridAtoms } from '../../utils';
4
- import { TekGridColumn } from './grid-column';
5
- import { IGroupedData, IModalFilterProps, ITekGrid, ITekGridColumn, ITekGridEvents, ITekGridExportConfig, ITekGridGroup, ITekGridGroupFooter } from './interfaces';
6
- import { TekGridLayoutOptions } from './layout-options';
7
- export declare class TekGrid extends GridEditable implements ITekGrid {
8
- title: string;
9
- addButton: boolean;
10
- deleteButton: 'none' | 'currentRow' | 'selection';
11
- actions: IComponentRender[];
12
- showEditButtons: boolean;
13
- filterButton: boolean;
14
- showSearch: boolean;
15
- columnFilterButton: boolean;
16
- columnsButton: boolean;
17
- mainGrid: boolean;
18
- columnsButtonIgnore: string[];
19
- showHideButton: boolean;
20
- events: ITekGridEvents;
21
- /**
22
- * Enables column dragging
23
- * @public
24
- */
25
- dragColumns: boolean;
26
- /**
27
- * Components that will be rendered on toolbar slot
28
- */
29
- toolbarConfig: (IComponentRender | string)[];
30
- /**
31
- * Enables column resizing
32
- * @public
33
- */
34
- resizeColumns: boolean;
35
- /**
36
- * Enables layout saving
37
- * @public
38
- */
39
- showLayoutOptions: boolean;
40
- xlsDefaultType?: string;
41
- /**
42
- * Editable columns
43
- */
44
- columns: TekGridColumn[];
45
- modalFilterProps: IModalFilterProps;
46
- /**
47
- * Show export button
48
- */
49
- showExport: boolean;
50
- /**
51
- * Show refresh button
52
- */
53
- showReload: boolean;
54
- /**
55
- * Export config
56
- */
57
- exportConfig: ITekGridExportConfig[];
58
- /**
59
- * Actions to overwrite the default export config
60
- */
61
- exportActions?: IComponentRender[];
62
- /**
63
- * Groups should be opened by default after building
64
- */
65
- groupsOpened: boolean;
66
- /**
67
- * Show Total summary
68
- */
69
- showSummaryTotal: boolean;
70
- groupColumnNames: string[];
71
- summaryColumns: TekGridColumn[];
72
- groupColumns: TekGridColumn[];
73
- private toolbarSlotProps;
74
- groupedData: IGroupedData[];
75
- viewUpdateScrollData?: () => void;
76
- private gridBase;
77
- filterRelationsDatasource: Datasource;
78
- filterOperationsDatasource: Datasource;
79
- editNewRowsOnly: boolean;
80
- protected keyShortcutKeyMapping: any;
81
- showCheckboxAllFilter: boolean;
82
- defaultFilter: IDictionary;
83
- toolbarOpened: boolean;
84
- reportTitle: string;
85
- reportLabelFormatter?: LabelFormatter;
86
- /**
87
- * TekGrid class constructor
88
- * @param props TekGrid properties
89
- */
90
- constructor(props: ITekGrid);
91
- protected getDatasourceDefaults(): {
92
- lazyLoad: boolean;
93
- };
94
- private defaultLazy;
95
- private getDefaultLazy;
96
- onCreated(): void;
97
- onMounted(element: HTMLElement): void;
98
- onBeforeDestroy(): void;
99
- protected focusSearchInput(): void;
100
- get layoutOptions(): TekGridLayoutOptions | undefined;
101
- protected instantiateCancelColumn(): TekGridColumn;
102
- /**
103
- * Get Grid columns objects
104
- * @param columns Grid columns parameter
105
- */
106
- protected getColumns(columns: ITekGridColumn[]): TekGridColumn[];
107
- columnHasFilterData(column: TekGridColumn): boolean;
108
- private buildReportGroups;
109
- private buildReportAggregations;
110
- getReport(type: string, portrait?: boolean, rowObj?: any): Promise<void>;
111
- private groups;
112
- private summary;
113
- private originalDatasourceLoadAll?;
114
- private originalDatasourceLimit?;
115
- /**
116
- * Tasks that should be finished before loading the grid data
117
- */
118
- private tasksBeforeLoad;
119
- registerTask(task: Promise<any>): void;
120
- private request;
121
- /**
122
- * Loads grid data after resolving all tasks
123
- */
124
- loadAfterTasks(): Promise<void | undefined>;
125
- private initGrouping;
126
- private buildGetFunction;
127
- updateGrouping: (lazyLoad?: boolean) => void;
128
- updateGroupedData(lazyLoad: boolean): Promise<void>;
129
- /**
130
- * It takes a flat array of data and groups it by the group columns specified in
131
- * the grid.
132
- */
133
- buildGroupedData(): void;
134
- private initGroups;
135
- private initSummaryColumns;
136
- private addGroupHeader;
137
- private addGroupFooters;
138
- /**
139
- * Creates a group footer, calculating its summary data
140
- * @param group Group to which this footer is related
141
- * @param groupIndex Index of the group
142
- * @returns new group footer
143
- */
144
- getGroupFooter(group: ITekGridGroup, groupIndex: number): ITekGridGroupFooter;
145
- /**
146
- * Gets all of the group headers that belong to the group at the specified index
147
- * This method should be called only during the groups creation process because it depends on the
148
- * group creation order (because it accesses lastGroupHeaderRow that changes during the creation process)
149
- * @param groupIndex
150
- * @returns
151
- */
152
- private getGroupHeaders;
153
- /**
154
- * Updates all footers summary data and the summary total
155
- */
156
- updateSummary(): void;
157
- /**
158
- * Takes a group footer and updates its summary data
159
- */
160
- private updateGroupFooterSummary;
161
- /**
162
- * Updates the total summary data
163
- */
164
- private updateSummaryTotal;
165
- private resetFooterVariables;
166
- private isUndefined;
167
- private calcSummaryValues;
168
- private calcSummary;
169
- private getSummary;
170
- private getSummaryData;
171
- openGroup(group: IDictionary<any>): void;
172
- isItemVisible(row: IDictionary<any>): any;
173
- private getGroupValue;
174
- getEditedRows(revalidate?: boolean, silent?: boolean): {
175
- [x: string]: any;
176
- }[];
177
- setSearch(search: string): Promise<any>;
178
- isGrouped(): number | false;
179
- navigateDown(params?: any): void;
180
- navigateUp(params?: any): void;
181
- directionalLeft(params: IEventParam<any>): void;
182
- directionalRight(params: IEventParam<any>): void;
183
- /**
184
- * Dispatches row click event
185
- * @param row Grid row
186
- * @param event DOM event
187
- * @param element DOM Element
188
- */
189
- rowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
190
- rowDoubleClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
191
- /**
192
- * Dispatches group row click event
193
- * @param row Grid row
194
- * @param event DOM event
195
- * @param element DOM Element
196
- */
197
- groupRowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
198
- groupRowDoubleClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
199
- /**
200
- * Dispatches group select/unselect event
201
- * @param row Group row
202
- * @param isSelected Row is selected
203
- * @param event DOM event
204
- * @param element DOM Element
205
- */
206
- selectGroupClick(row: IDictionary<any>, isSelected: boolean, event: Event, element: HTMLElement): void;
207
- getAtomInstance<T>(key: keyof ITekGridAtoms): T;
208
- getFilterInputs(columnName?: string): Input[];
209
- isColumnSearchable(column: TekGridColumn): boolean;
210
- getColumn(name: string): TekGridColumn;
211
- /**
212
- * Adds new row to the datasource data and pushes it to the editedRows
213
- * @param row Row
214
- * @param position whether the new Row will be inserted at the beginning or end of the data array
215
- */
216
- addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
217
- /**
218
- * Takes a row and adds it to the selected group (datasource.currentRow)
219
- * @param row the new row to be added
220
- * @param position the position, at the beginning of the group or at the end
221
- */
222
- addToSelection(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
223
- /**
224
- * Adds a new row to the groupedData array
225
- * @param row the new row to be added
226
- * @param position the position, at the beginning of the group or at the end
227
- */
228
- private addGroupedRow;
229
- private findMissingGroups;
230
- /**
231
- * Finds the last group (most internal group) where a row should be inserted
232
- * @param row to be inserted
233
- * @returns the index and the group where the row should be inserted
234
- */
235
- private findLastGroupingIndex;
236
- /**
237
- * Creates a group hierarchy for a new row, creating intermediate groups if needed
238
- * @param row to be inserted
239
- * @returns the index and the group where the row should be inserted
240
- */
241
- private createGroupHierarchyForRow;
242
- /**
243
- * Adds a row to the children of a group
244
- */
245
- private addRowToGroupChildren;
246
- /**
247
- * Checks if a row is a group header, adding typescript type-checking
248
- */
249
- private isGroupHeader;
250
- /**
251
- * Checks if a row is a group footer, adding typescript type-checking
252
- */
253
- private isGroupFooter;
254
- /**
255
- * Checks if a row is a summary, adding typescript type-checking
256
- */
257
- private isGroupSummary;
258
- /**
259
- * Checks if a row is the last grouping of the grid (the most internal grouping)
260
- */
261
- private isLastGrouping;
262
- /**
263
- * change event of editable components
264
- * - override to call updateSummary on change
265
- */
266
- protected changeEditableComponent(column: GridColumnEditable, row: IDictionary<any>, value: any, component?: Input): void;
267
- }
@@ -1,203 +0,0 @@
1
- import { IBeforeReportEvent, IComponent, IComponentEvents, IComponentRender, IGridColumnEditable, IGridEditable, IIterableColumnsButton, EventDef, IModal, IButton, LabelFormatter } from '@zeedhi/common';
2
- import { IDictionary, IEvent, IEventParam, IDateHelperValue, IDateHelperValues } from '@zeedhi/core';
3
- import { IDynamicFilterItem, TekGrid, TekGridLayoutOptions, TekTreeGrid } from '..';
4
- export interface ITekGridLayoutEventParams extends IEventParam<ITekGrid> {
5
- layouts: ITekGridLayoutInfo;
6
- }
7
- export interface ITekGridCalcSummaryEventParams extends IEventParam<ITekGrid> {
8
- summary: ITekGridSummary;
9
- columnName: string;
10
- rowValue: IDictionary<any>;
11
- }
12
- export declare type ITekGridEvent<T> = (event: T) => Promise<any>;
13
- export interface ITekGridEvents<T = IEventParam<any> | ITekGridLayoutEventParams | ITekGridCalcSummaryEventParams> extends IComponentEvents<T> {
14
- addClick?: EventDef<T>;
15
- afterCancel?: EventDef<T>;
16
- afterDelete?: EventDef<T>;
17
- afterSave?: EventDef<T>;
18
- beforeApplyFilter?: EventDef<T>;
19
- beforeCancel?: EventDef<T>;
20
- beforeDelete?: EventDef<T>;
21
- beforeSave?: EventDef<T>;
22
- calcSummary?: EventDef<T>;
23
- filterClick?: EventDef<T>;
24
- loadLayouts?: EventDef<T, ITekGridEvent<T>>;
25
- saveLayouts?: EventDef<T>;
26
- groupRowClick?: EventDef<T>;
27
- groupSelect?: EventDef<T>;
28
- groupUnselect?: EventDef<T>;
29
- beforeOpenReport?: EventDef<T, IBeforeReportEvent>;
30
- beforeReload?: EventDef<T>;
31
- [key: string]: any;
32
- }
33
- export declare type ITekGridLayoutOptionsEvent<T> = (event: T) => Promise<any>;
34
- export interface ITekGridLayoutOptionsEvents<T = IEventParam<any> | ITekGridLayoutEventParams> extends IComponentEvents<T> {
35
- loadLayouts?: ITekGridEvent<T>;
36
- saveLayouts?: IEvent<T>;
37
- [key: string]: any;
38
- }
39
- export interface ITekGrid extends IGridEditable {
40
- actions?: IComponentRender[];
41
- addButton?: boolean;
42
- columnFilterButton?: boolean;
43
- columns?: ITekGridColumn[];
44
- columnsButton?: boolean;
45
- columnsButtonIgnore?: string[];
46
- deleteButton?: 'none' | 'currentRow' | 'selection';
47
- events?: ITekGridEvents;
48
- showEditButtons?: boolean;
49
- filterButton?: boolean;
50
- modalFilterProps?: IModalFilterProps;
51
- showSearch?: boolean;
52
- showHideButton?: boolean;
53
- showLayoutOptions?: boolean;
54
- title?: string;
55
- showExport?: boolean;
56
- showReload?: boolean;
57
- exportConfig?: ITekGridExportConfig[];
58
- exportActions?: IComponentRender[];
59
- groupsOpened?: boolean;
60
- showSummaryTotal?: boolean;
61
- layoutOptions?: TekGridLayoutOptions;
62
- mainGrid?: boolean;
63
- showCheckboxAllFilter?: boolean;
64
- defaultFilter?: IDictionary;
65
- xlsDefaultType?: string;
66
- toolbarOpened?: boolean;
67
- reportTitle?: string;
68
- reportLabelFormatter?: LabelFormatter;
69
- }
70
- export declare type MultiOptionParams = {
71
- iconName: string;
72
- label: string;
73
- cssClass?: string;
74
- reportParams?: {
75
- portrait?: boolean;
76
- rowObj?: any;
77
- };
78
- };
79
- export interface ITekGridExportConfig {
80
- type: string;
81
- portrait?: boolean;
82
- label?: string;
83
- iconName?: string;
84
- multiOption?: MultiOptionParams[];
85
- }
86
- export interface ITekGridLayoutInfo {
87
- currentLayoutName?: string;
88
- layouts?: IDictionary<ITekGridLayout>;
89
- }
90
- export interface ITekGridLayout {
91
- name: string;
92
- gridWidth?: string;
93
- columns?: ITekGridLayoutColumn[];
94
- order?: string[];
95
- dynamicFilter?: IDictionary<IDynamicFilterItem[]>;
96
- filter?: IDictionary<any>;
97
- }
98
- export declare const columnAggregationValues: ["SUM", "MIN", "MAX", "AVG", "COUNT", undefined];
99
- export declare type ITekGridColumnAggregation = (typeof columnAggregationValues)[number];
100
- export interface ITekGridLayoutColumn {
101
- name: string;
102
- width?: string;
103
- minWidth?: string;
104
- maxWidth?: string;
105
- isVisible?: boolean;
106
- fixed?: boolean;
107
- grouped?: boolean;
108
- aggregation?: ITekGridColumnAggregation;
109
- label?: string;
110
- align?: 'left' | 'right' | 'center';
111
- groupOpened?: boolean;
112
- filterHelperValue?: string | IDictionary<any>;
113
- }
114
- export interface ITekGridLayoutOptions extends IComponentRender {
115
- events?: ITekGridLayoutOptionsEvents;
116
- }
117
- export declare type IFilterRelation = 'AND' | 'OR';
118
- export declare type IFilterOperation = 'CONTAINS' | 'NOT_CONTAINS' | 'EQUALS' | 'NOT_EQUALS' | 'GREATER_THAN' | 'LESS_THAN' | 'GREATER_THAN_EQUALS' | 'LESS_THAN_EQUALS' | 'IN' | 'NOT_IN' | 'BETWEEN';
119
- export interface IFilterPropsComponent extends IComponent {
120
- relation?: IFilterRelation;
121
- operation?: IFilterOperation;
122
- helperOptions?: string[];
123
- helperValue?: string;
124
- }
125
- export interface ITekGridColumn extends IGridColumnEditable {
126
- filterProps?: IFilterPropsComponent | IFilterPropsComponent[];
127
- filterable?: boolean;
128
- filterIndex?: number;
129
- skipLookupSearch?: boolean;
130
- grouped?: boolean;
131
- aggregation?: ITekGridColumnAggregation;
132
- groupOpened?: boolean;
133
- groupLabelForEmptyValue?: string;
134
- storeData?: boolean;
135
- }
136
- export interface ITekGridColumnsButton extends IIterableColumnsButton {
137
- hideGroups?: boolean;
138
- }
139
- export interface ITekGridFilterButton extends IButton {
140
- gridName?: string;
141
- grid?: TekGrid | TekTreeGrid;
142
- showCheckboxAll?: boolean;
143
- }
144
- export interface ITekGridGroup {
145
- column: ITekGridColumn;
146
- name: string;
147
- label: string;
148
- lastValue: any;
149
- footer: ITekGridFooter;
150
- initialized: boolean;
151
- lastGroupHeaderRow?: ITekGridGroupHeader;
152
- }
153
- export interface ITekGridGroupHeader {
154
- group: boolean;
155
- groupRow: IDictionary;
156
- groupColumnName: string;
157
- groupHeader: boolean;
158
- groupIndex: number;
159
- groupLabel: string;
160
- groupValue: any;
161
- groupOpened: boolean;
162
- groupHeaders: ITekGridGroupHeader[];
163
- children: IDictionary<any>[];
164
- }
165
- export interface ITekGridFooter {
166
- [key: string]: ITekGridSummary;
167
- }
168
- export interface ITekGridSummary {
169
- sum: any;
170
- avg: any;
171
- count: number;
172
- min: any;
173
- max: any;
174
- }
175
- export interface ITekFilterHelperValue extends IDateHelperValue {
176
- }
177
- export interface ITekFilterHelperValues extends IDateHelperValues {
178
- }
179
- export interface IModalFilterProps extends IModal {
180
- height?: string;
181
- maxHeight?: string;
182
- }
183
- export interface ITekGridGroupFooter {
184
- groupFooter: boolean;
185
- groupIndex: number;
186
- groupHeaders: ITekGridGroupHeader[];
187
- groupLabel: string;
188
- groupValue: any;
189
- [key: string]: any;
190
- }
191
- export declare type ITekGridSummaryTotal = ITekGridGroupFooter & {
192
- [key: string]: any;
193
- };
194
- export declare type IGroupedData = (ITekGridGroupHeader & {
195
- [key: string]: any;
196
- }) | {
197
- [key: string]: any;
198
- groupFooter: boolean;
199
- groupSummary: boolean;
200
- } | ITekGridSummaryTotal | {
201
- [key: string]: any;
202
- groupHeaders: ITekGridGroupHeader[];
203
- };
@@ -1,31 +0,0 @@
1
- import { ComponentRender, Grid } from '@zeedhi/common';
2
- import { IDictionary } from '@zeedhi/core';
3
- import { IDynamicFilterItem, ITekGridLayoutColumn } from '..';
4
- import { ITekGridLayoutOptions, ITekGridLayout, ITekGridLayoutOptionsEvents } from './interfaces';
5
- export declare class TekGridLayoutOptions extends ComponentRender implements ITekGridLayoutOptions {
6
- currentLayoutName: string;
7
- layoutEdited: boolean;
8
- layouts: IDictionary<ITekGridLayout>;
9
- layoutNames: string[];
10
- viewApplyLayout?: Function;
11
- viewGetCurrentLayout?: Function;
12
- originalColumnProps: ITekGridLayoutColumn[];
13
- originalDatasourceOrder: string[];
14
- originalDatasourceDynamicFilter: IDictionary<IDynamicFilterItem[]>;
15
- originalDatasourceFilter: IDictionary<any>;
16
- events: ITekGridLayoutOptionsEvents;
17
- grid: Grid;
18
- private getParentGrid;
19
- onMounted(element: HTMLElement): Promise<void>;
20
- protected loadLayoutsInfo(): Promise<any>;
21
- getHelperValue(column: any): string | (string | undefined)[] | undefined;
22
- newLayout(layout: ITekGridLayout): void;
23
- addLayout(layout: ITekGridLayout): void;
24
- discardChanges(): void;
25
- applyLayout(name: string, save?: boolean): void;
26
- private saveLayouts;
27
- deleteLayout(name: string): void;
28
- updateLayout(name: string, layout: ITekGridLayout): void;
29
- updateDefaultLayout(layout: ITekGridLayout): void;
30
- private fixColumns;
31
- }
@@ -1,55 +0,0 @@
1
- import { ComponentRender } from '@zeedhi/common';
2
- import { IImage } from './interfaces';
3
- /**
4
- * Teknisa component
5
- */
6
- export declare class Image extends ComponentRender implements IImage {
7
- /**
8
- * Route path
9
- */
10
- to: string;
11
- /**
12
- * Image source.
13
- */
14
- src: string;
15
- /**
16
- * Defines the component height. Possible values for this property can be
17
- * <samp>'auto', '100%', '400px' or 400</samp>
18
- */
19
- height: string | number;
20
- /**
21
- * Defines the component min height. Possible values for this property can be
22
- * <samp>'auto', '100%', '400px' or 400</samp>
23
- */
24
- minHeight: string | number;
25
- /**
26
- * Defines the component max height. Possible values for this property can be
27
- * <samp>'auto', '100%', '400px' or 400</samp>
28
- */
29
- maxHeight: string | number;
30
- /**
31
- * Set component height to fill all space available
32
- */
33
- fillHeight: boolean;
34
- /**
35
- * Defines the component width. Possible values for this property can be
36
- * <samp>'auto', '100%', '400px' or 400</samp>
37
- */
38
- width: string | number;
39
- /**
40
- * Defines the component min width. Possible values for this property can be
41
- * <samp>'auto', '100%', '400px' or 400</samp>
42
- */
43
- minWidth: string | number;
44
- /**
45
- * Defines the component max height. Possible values for this property can be
46
- * <samp>'auto', '100%', '400px' or 400</samp>
47
- */
48
- maxWidth: string | number;
49
- /**
50
- * Creates a new instance of ImgLink
51
- * @param props Image Link props
52
- */
53
- constructor(props: IImage);
54
- load(event?: Event, element?: HTMLElement): void;
55
- }
@@ -1,12 +0,0 @@
1
- import { IComponentRender } from '@zeedhi/common';
2
- export interface IImage extends IComponentRender {
3
- to?: string;
4
- src?: string;
5
- height?: number | string;
6
- maxHeight?: number | string;
7
- minHeight?: number | string;
8
- fillHeight?: boolean;
9
- width?: number | string;
10
- maxWidth?: number | string;
11
- minWidth?: number | string;
12
- }
@@ -1,5 +0,0 @@
1
- import { ICarousel, IIterableComponentRender } from '@zeedhi/common';
2
- export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
3
- export interface IIterableCarousel extends ICarousel {
4
- iterable?: Omit<IIterableComponentRender, 'name' | 'component'>;
5
- }
@@ -1,13 +0,0 @@
1
- import { Carousel, IComponentRender, IterableComponentRender } from '@zeedhi/common';
2
- import { IIterableCarousel } from './interfaces';
3
- /**
4
- * Base class for IterableCarousel component.
5
- * This component uses every row returned by IterableComponentRender.datasource to render
6
- * slides defined by componentMetadata property, inside a carousel component.
7
- */
8
- export declare class IterableCarousel extends Carousel implements IIterableCarousel {
9
- iterable: IterableComponentRender;
10
- constructor(props: IIterableCarousel);
11
- get children(): IComponentRender[];
12
- set children(value: IComponentRender[]);
13
- }
@@ -1,3 +0,0 @@
1
- import { IIterableComponentRender as ZdIIterableComponentRender } from '@zeedhi/common';
2
- export interface IIterableComponentRender extends ZdIIterableComponentRender {
3
- }
@@ -1,10 +0,0 @@
1
- import { Iterable, IIterableComponentRender } from '@zeedhi/common';
2
- /**
3
- * Base class for IterableComponentRender component.
4
- * This component uses every row returned by Iterable.datasource to render
5
- * components defined by componentMetadata property.
6
- * If the data inside the datasource is changed you should perform
7
- * a datasource.get() to force updating the rendered components.
8
- */
9
- export declare class IterableComponentRender extends Iterable implements IIterableComponentRender {
10
- }
@@ -1,6 +0,0 @@
1
- import { ILoading as IZdLoading } from '@zeedhi/common';
2
- export interface ILoading extends IZdLoading {
3
- text?: string;
4
- zIndex?: number | string;
5
- image?: string;
6
- }
@@ -1,24 +0,0 @@
1
- import { Loading as ZdLoading } from '@zeedhi/common';
2
- import { ILoading } from './interfaces';
3
- /**
4
- * Teknisa component
5
- */
6
- export declare class Loading extends ZdLoading implements ILoading {
7
- /**
8
- * text to show in Loader Overlay
9
- */
10
- text: string;
11
- /**
12
- * zIndex value.
13
- */
14
- zIndex: number | string;
15
- /**
16
- * loading path.
17
- */
18
- image: string;
19
- /**
20
- * Creates a new instance of TekLoading
21
- * @param props Image Link props
22
- */
23
- constructor(props: ILoading);
24
- }