@zeedhi/common 1.36.0 → 1.39.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 (57) hide show
  1. package/dist/zd-common.esm.js +398 -65
  2. package/dist/zd-common.umd.js +401 -67
  3. package/package.json +3 -5
  4. package/types/components/zd-code-editor/code-editor.d.ts +2 -0
  5. package/types/components/zd-grid/grid-editable.d.ts +1 -1
  6. package/types/components/zd-select/select.d.ts +2 -0
  7. package/types/components/zd-select-multiple/select-multiple.d.ts +4 -0
  8. package/types/components/zd-select-tree/select-tree.d.ts +7 -1
  9. package/types/components/zd-select-tree-multiple/select-tree-multiple.d.ts +4 -0
  10. package/types/components/zd-tree-grid/interfaces.d.ts +3 -1
  11. package/types/components/zd-tree-grid/tree-grid-editable.d.ts +4 -3
  12. package/types/utils/report/report-type/interfaces.d.ts +7 -2
  13. package/types/utils/report/report-type/xls-report.d.ts +17 -1
  14. package/types/components/zd-apex-chart/apex_chart.d.ts +0 -55
  15. package/types/components/zd-button-group/button_group.d.ts +0 -83
  16. package/types/components/zd-checkbox-multiple/checkbox_multiple.d.ts +0 -42
  17. package/types/components/zd-code-editor/code_editor.d.ts +0 -58
  18. package/types/components/zd-code-editor/prism.d.ts +0 -14
  19. package/types/components/zd-collapse-card/collapse_card.d.ts +0 -56
  20. package/types/components/zd-component/child_not_found.d.ts +0 -6
  21. package/types/components/zd-component/component_render.d.ts +0 -16
  22. package/types/components/zd-component/invalid_accessor.d.ts +0 -6
  23. package/types/components/zd-date/date_range.d.ts +0 -124
  24. package/types/components/zd-grid/errors/not_editing.d.ts +0 -6
  25. package/types/components/zd-grid/errors/row_not_found.d.ts +0 -6
  26. package/types/components/zd-grid/grid_column.d.ts +0 -52
  27. package/types/components/zd-grid/grid_column_editable.d.ts +0 -13
  28. package/types/components/zd-grid/grid_editable.d.ts +0 -162
  29. package/types/components/zd-iterable/column_not_found.d.ts +0 -6
  30. package/types/components/zd-iterable/iterable_columns_button.d.ts +0 -29
  31. package/types/components/zd-iterable/iterable_columns_button_controller.d.ts +0 -6
  32. package/types/components/zd-iterable/iterable_page_component.d.ts +0 -27
  33. package/types/components/zd-iterable/iterable_page_info.d.ts +0 -7
  34. package/types/components/zd-iterable/iterable_page_size.d.ts +0 -62
  35. package/types/components/zd-iterable/iterable_pagination.d.ts +0 -28
  36. package/types/components/zd-list/item_not_found.d.ts +0 -6
  37. package/types/components/zd-list/list_group.d.ts +0 -30
  38. package/types/components/zd-list/list_item.d.ts +0 -49
  39. package/types/components/zd-master-detail/detail_not_found.d.ts +0 -6
  40. package/types/components/zd-master-detail/master_detail.d.ts +0 -20
  41. package/types/components/zd-master-detail/master_not_found.d.ts +0 -6
  42. package/types/components/zd-menu/menu_button.d.ts +0 -28
  43. package/types/components/zd-menu/menu_group.d.ts +0 -53
  44. package/types/components/zd-menu/menu_link.d.ts +0 -46
  45. package/types/components/zd-menu/menu_separator.d.ts +0 -7
  46. package/types/components/zd-modal/modal_close_button.d.ts +0 -28
  47. package/types/components/zd-svg-map/svg_map.d.ts +0 -78
  48. package/types/components/zd-tabs/tab_not_found.d.ts +0 -11
  49. package/types/components/zd-text-input/text_input.d.ts +0 -90
  50. package/types/components/zd-tree-grid/errors/not_editing.d.ts +0 -6
  51. package/types/components/zd-tree-grid/errors/row_not_found.d.ts +0 -6
  52. package/types/components/zd-tree-grid/tree-data-structure.d.ts +0 -144
  53. package/types/components/zd-tree-grid/tree_data_structure.d.ts +0 -144
  54. package/types/components/zd-tree-grid/tree_grid.d.ts +0 -77
  55. package/types/components/zd-tree-grid/tree_grid_column.d.ts +0 -52
  56. package/types/components/zd-tree-grid/tree_grid_column_editable.d.ts +0 -13
  57. package/types/components/zd-tree-grid/tree_grid_editable.d.ts +0 -157
@@ -1,28 +0,0 @@
1
- import { IModalCloseButton } from './interfaces';
2
- import { Button } from '../zd-button/button';
3
- /**
4
- * Base class for Modal Close Button component.
5
- */
6
- export declare class ModalCloseButton extends Button implements IModalCloseButton {
7
- /**
8
- * Name of Modal component to be closed
9
- */
10
- modalName: string;
11
- /**
12
- * Makes the background transparent (equal to text prop in Vuetify).
13
- */
14
- flat: boolean;
15
- /**
16
- * Designates the button as icon, round and flat.
17
- */
18
- icon: boolean;
19
- /**
20
- * Designates the button icon, that will be rendered before the label.
21
- */
22
- iconName: string;
23
- /**
24
- * Creates a new modal close button
25
- * @param props Modal close button structure
26
- */
27
- constructor(props: IModalCloseButton);
28
- }
@@ -1,78 +0,0 @@
1
- import { ISvgMap, ISvgMapEvents } from './interfaces';
2
- import { ComponentRender } from '../zd-component/component_render';
3
- /**
4
- * Base class for SvgMap component.
5
- */
6
- export declare class SvgMap extends ComponentRender implements ISvgMap {
7
- /**
8
- * Color to fill the map areas
9
- */
10
- areaColor?: string;
11
- /**
12
- * Color to fill the map areas on hover
13
- */
14
- areaHoverColor?: string;
15
- /**
16
- * Color to fill the map areas when selected
17
- */
18
- areaSelectColor?: string;
19
- /**
20
- * Defines grid events.
21
- */
22
- events: ISvgMapEvents;
23
- /**
24
- * Defines the map height. Possible values for width can be
25
- * <samp>'auto', '100%', '400px' or 400</samp>
26
- */
27
- height: string | number;
28
- /**
29
- * Multiple selection
30
- */
31
- multiple: boolean;
32
- /**
33
- * Defines the map width. Possible values for width can be
34
- * <samp>'auto', '100%', '400px' or 400</samp>
35
- */
36
- width: string | number;
37
- /**
38
- * SVG file content
39
- */
40
- svgContent: string;
41
- /**
42
- * SVG container
43
- */
44
- svgContainer: HTMLElement;
45
- /**
46
- * Map areas
47
- * @private
48
- */
49
- private mapAreas;
50
- private srcValue;
51
- private selectedAreaValue;
52
- /**
53
- * Create a new SVG.
54
- * @param props SVG properties
55
- */
56
- constructor(props: ISvgMap);
57
- /**
58
- * SVG file src
59
- */
60
- get src(): string;
61
- set src(value: string);
62
- /**
63
- * Selected Area
64
- */
65
- get selectedArea(): string | string[];
66
- set selectedArea(value: string | string[]);
67
- private updateSelectedArea;
68
- /**
69
- * Update SVG content
70
- * @private
71
- */
72
- private getSVG;
73
- /**
74
- * Update the SVG container
75
- */
76
- updateSVGContainer(): void;
77
- mapClick(element: SVGElement): void;
78
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Tab not found error
3
- */
4
- export declare class TabNotFoundError extends Error {
5
- /**
6
- * Create a new Error.
7
- * @param name Tab name
8
- * @param parentName Tab parent name
9
- */
10
- constructor(name: string, parentName: string);
11
- }
@@ -1,90 +0,0 @@
1
- import { ITextInput, ITextInputEvents } from './interfaces';
2
- import { Input } from '../zd-input/input';
3
- /**
4
- * Base class for Text component.
5
- */
6
- export declare class TextInput extends Input implements ITextInput {
7
- /**
8
- * Appends an icon inside text input component.
9
- */
10
- appendIcon: string;
11
- /**
12
- * Appends an icon outside text input component.
13
- */
14
- appendOuterIcon: string;
15
- /**
16
- * Defines text input events.
17
- */
18
- events: ITextInputEvents;
19
- /**
20
- * Displays a prefix text inside text input component. Overrides prependIcon prop.
21
- */
22
- prefix: string;
23
- /**
24
- * Prepends an icon inside text input component.
25
- */
26
- prependIcon: string;
27
- /**
28
- * Prepends an icon outside text input component.
29
- */
30
- prependOuterIcon: string;
31
- /**
32
- * Displays a suffix text inside text input component. Overrides appendIcon prop.
33
- */
34
- suffix: string;
35
- /**
36
- * Sets input type.
37
- */
38
- type: string;
39
- /**
40
- * Defines text input value should concat the prefix text.
41
- */
42
- valueWithPrefix: boolean;
43
- /**
44
- * Defines text input value should concat the suffix text.
45
- */
46
- valueWithSuffix: boolean;
47
- protected formatterFn: Function;
48
- protected parserFn: Function;
49
- /**
50
- * Create a new TextInput.
51
- * @param props TextInput properties
52
- */
53
- constructor(props: ITextInput);
54
- /**
55
- * Retrieves a formatted value without valueSuffix and with mask.
56
- * @param value Text value
57
- * @returns Text formatted value
58
- */
59
- formatter(value: string): any;
60
- /**
61
- * Retrieves a parsed value with prefix and suffix if it is needed and without mask.
62
- * @param value Text value
63
- * @returns Text parsed value
64
- */
65
- parser(value: string): any;
66
- /**
67
- * Triggered when the appended icon is clicked.
68
- * @param event DOM event
69
- * @param element Text input
70
- */
71
- appendIconClick(event: Event, element: HTMLElement): void;
72
- /**
73
- * Triggered when the appended outer icon is clicked.
74
- * @param event DOM event
75
- * @param element Text input
76
- */
77
- appendOuterIconClick(event: Event, element: HTMLElement): void;
78
- /**
79
- * Triggered when the prepended icon is clicked.
80
- * @param event DOM event
81
- * @param element Text input
82
- */
83
- prependIconClick(event: Event, element: HTMLElement): void;
84
- /**
85
- * Triggered when the prepended outer icon is clicked.
86
- * @param event DOM event
87
- * @param element Text input
88
- */
89
- prependOuterIconClick(event: Event, element: HTMLElement): void;
90
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Tree Grid not editing error
3
- */
4
- export declare class NotEditingError extends Error {
5
- constructor(method: string);
6
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Row not found error
3
- */
4
- export declare class RowNotFoundError extends Error {
5
- constructor(key: string, gridName: string);
6
- }
@@ -1,144 +0,0 @@
1
- import { IDictionary } from '@zeedhi/core';
2
- import { TreeGrid } from './tree-grid';
3
- export declare class TreeDataStructure {
4
- /**
5
- * Original datasource
6
- */
7
- private originalDatasource;
8
- /**
9
- * Parent field Name
10
- */
11
- private parentField;
12
- /**
13
- * Defines if the tree will be fetch data only when opening a level
14
- */
15
- fetchOnDemand: boolean;
16
- /**
17
- * Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
18
- */
19
- openLevelOnLoad: number | boolean;
20
- /**
21
- * Stores tree data
22
- */
23
- treeData: IDictionary<any>[];
24
- /**
25
- * Search returns no data
26
- */
27
- searchHasNoData: boolean;
28
- /**
29
- * Stores tree structure
30
- */
31
- private treeStructure;
32
- constructor(tree: TreeGrid);
33
- /**
34
- * Creates properties and methods
35
- */
36
- private init;
37
- private searchValue;
38
- /**
39
- * Redefine get method
40
- * @param originalGet originalDatasource get function
41
- */
42
- private treeGetData;
43
- /**
44
- * search data
45
- */
46
- buildTree(): void;
47
- /**
48
- * Build tree without fetchOnDemand
49
- * @param data datasource data
50
- */
51
- private buildAllData;
52
- /**
53
- * Build tree data using a parent row
54
- * @param parentRow Parent row (undefined = build entire tree)
55
- */
56
- private buildTreeData;
57
- findDataIndex(data: IDictionary<any>[], value: any): number;
58
- /**
59
- * Build tree with fetchOnDemand
60
- */
61
- private buildOnDemand;
62
- /**
63
- * Sort data
64
- */
65
- private sortData;
66
- /**
67
- * Sort tree data rows
68
- * @param dataToSort Data to sort
69
- * @param columns Columns used to oreder the collection
70
- * @param types Order orientation. All values must be asc or desc
71
- * @param index Columns and types position
72
- * @returns Sorted data
73
- */
74
- private sortTreeDataRows;
75
- /**
76
- * Custom sort for collections
77
- * @param row Collection row
78
- * @param nextRow Next row from collection
79
- * @param columns Columns used to oreder the collection
80
- * @param types Order orientation. All values must be asc or desc
81
- * @param index Columns and types position
82
- * @returns Row's position
83
- */
84
- private sort;
85
- /**
86
- * Return if tree element and its parents are opened
87
- * @param row datasource row
88
- * @returns Element and parents are opened
89
- */
90
- isOpened(row: IDictionary<any>): boolean;
91
- /**
92
- * Return previous opened row index
93
- * @param rowIdx row index
94
- * @returns previous row index
95
- */
96
- previousOpenedRow(rowIdx: number): number;
97
- /**
98
- * Return next opened row index
99
- * @param rowIdx row index
100
- * @returns next row index
101
- */
102
- nextOpenedRow(rowIdx: number): number;
103
- /**
104
- * Expands or collapses a row
105
- * @param row Row object
106
- * @param rowIndex Row index
107
- */
108
- toggleExpand(row: IDictionary<any>, rowIndex?: number): Promise<void>;
109
- /**
110
- * Return row with tree data
111
- * @param row datasource row
112
- */
113
- getRowData(row: IDictionary<any>): IDictionary<any>;
114
- /**
115
- * Toggle expand/collapse using navigation keys
116
- * @param collapse Should collapse
117
- */
118
- navigateToggle(collapse: boolean): void;
119
- /**
120
- * Updates selected rows, fetches and retrieves data collection
121
- * @returns Promise with data collection
122
- */
123
- private reloadAndUpdateSelectedRows;
124
- /**
125
- * Search tree with fetchOnDemand
126
- * @param data datasource data
127
- */
128
- private searchOnDemand;
129
- /**
130
- * Search value against a memory datasource
131
- */
132
- private searchAllData;
133
- /**
134
- * Clear row removing 'tree__' props
135
- */
136
- clearRow(row: IDictionary<any>): {
137
- [x: string]: any;
138
- };
139
- /**
140
- * Get all children
141
- * @param row datasource row
142
- */
143
- getChildren(row: IDictionary<any>): IDictionary<any>[];
144
- }
@@ -1,144 +0,0 @@
1
- import { IDictionary } from '@zeedhi/core';
2
- import { TreeGrid } from './tree_grid';
3
- export declare class TreeDataStructure {
4
- /**
5
- * Original datasource
6
- */
7
- private originalDatasource;
8
- /**
9
- * Parent field Name
10
- */
11
- private parentField;
12
- /**
13
- * Defines if the tree will be fetch data only when opening a level
14
- */
15
- fetchOnDemand: boolean;
16
- /**
17
- * Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
18
- */
19
- openLevelOnLoad: number | boolean;
20
- /**
21
- * Stores tree data
22
- */
23
- treeData: IDictionary<any>[];
24
- /**
25
- * Search returns no data
26
- */
27
- searchHasNoData: boolean;
28
- /**
29
- * Stores tree structure
30
- */
31
- private treeStructure;
32
- constructor(tree: TreeGrid);
33
- /**
34
- * Creates properties and methods
35
- */
36
- private init;
37
- private searchValue;
38
- /**
39
- * Redefine get method
40
- * @param originalGet originalDatasource get function
41
- */
42
- private treeGetData;
43
- /**
44
- * search data
45
- */
46
- private buildTree;
47
- /**
48
- * Build tree without fetchOnDemand
49
- * @param data datasource data
50
- */
51
- private buildAllData;
52
- /**
53
- * Build tree data using a parent row
54
- * @param parentRow Parent row (undefined = build entire tree)
55
- */
56
- private buildTreeData;
57
- findDataIndex(data: IDictionary<any>[], value: any): number;
58
- /**
59
- * Build tree with fetchOnDemand
60
- */
61
- private buildOnDemand;
62
- /**
63
- * Sort data
64
- */
65
- private sortData;
66
- /**
67
- * Sort tree data rows
68
- * @param dataToSort Data to sort
69
- * @param columns Columns used to oreder the collection
70
- * @param types Order orientation. All values must be asc or desc
71
- * @param index Columns and types position
72
- * @returns Sorted data
73
- */
74
- private sortTreeDataRows;
75
- /**
76
- * Custom sort for collections
77
- * @param row Collection row
78
- * @param nextRow Next row from collection
79
- * @param columns Columns used to oreder the collection
80
- * @param types Order orientation. All values must be asc or desc
81
- * @param index Columns and types position
82
- * @returns Row's position
83
- */
84
- private sort;
85
- /**
86
- * Return if tree element and its parents are opened
87
- * @param row datasource row
88
- * @returns Element and parents are opened
89
- */
90
- isOpened(row: IDictionary<any>): boolean;
91
- /**
92
- * Return previous opened row index
93
- * @param rowIdx row index
94
- * @returns previous row index
95
- */
96
- previousOpenedRow(rowIdx: number): number;
97
- /**
98
- * Return next opened row index
99
- * @param rowIdx row index
100
- * @returns next row index
101
- */
102
- nextOpenedRow(rowIdx: number): number;
103
- /**
104
- * Expands or collapses a row
105
- * @param row Row object
106
- * @param rowIndex Row index
107
- */
108
- toggleExpand(row: IDictionary<any>, rowIndex?: number): Promise<void>;
109
- /**
110
- * Return row with tree data
111
- * @param row datasource row
112
- */
113
- getRowData(row: IDictionary<any>): IDictionary<any>;
114
- /**
115
- * Toggle expand/collapse using navigation keys
116
- * @param collapse Should collapse
117
- */
118
- navigateToggle(collapse: boolean): void;
119
- /**
120
- * Updates selected rows, fetches and retrieves data collection
121
- * @returns Promise with data collection
122
- */
123
- private reloadAndUpdateSelectedRows;
124
- /**
125
- * Search tree with fetchOnDemand
126
- * @param data datasource data
127
- */
128
- private searchOnDemand;
129
- /**
130
- * Search value against a memory datasource
131
- */
132
- private searchAllData;
133
- /**
134
- * Clear row removing 'tree__' props
135
- */
136
- clearRow(row: IDictionary<any>): {
137
- [x: string]: any;
138
- };
139
- /**
140
- * Get all children
141
- * @param row datasource row
142
- */
143
- getChildren(row: IDictionary<any>): IDictionary<any>[];
144
- }
@@ -1,77 +0,0 @@
1
- import { IDictionary } from '@zeedhi/core';
2
- import { ITreeGrid } from './interfaces';
3
- import { Grid } from '../zd-grid/grid';
4
- import { IComponentRender } from '../zd-component/interfaces';
5
- import { TreeDataStructure } from './tree_data_structure';
6
- /**
7
- * Base class for Tree Grid component
8
- */
9
- export declare class TreeGrid extends Grid implements ITreeGrid {
10
- /**
11
- * Parent field name
12
- */
13
- parentField: string;
14
- /**
15
- * Defines if the tree will be opened or not (true/false) or if it should open only until a specific level
16
- */
17
- openLevelOnLoad: number | boolean;
18
- /**
19
- * Defines if the tree will be fetch data only when opening a level
20
- */
21
- fetchOnDemand: boolean;
22
- /**
23
- * Defines if should wait and not execute GET method when Datasource is created
24
- */
25
- private lazyLoad;
26
- /**
27
- * Components that will be rendered on footer slot
28
- */
29
- footerSlot: IComponentRender[];
30
- /**
31
- * Tree data structure
32
- */
33
- treeDataStructure: TreeDataStructure;
34
- /**
35
- * Creates a new Tree Grid.
36
- * @param props Tree Grid properties
37
- */
38
- constructor(props: ITreeGrid);
39
- private navigationTreeKeyMapping;
40
- onMounted(element: HTMLElement): void;
41
- /**
42
- * Build tree data
43
- */
44
- buildTree(): void;
45
- /**
46
- * Expands or collapses a row
47
- * @param row Row object
48
- * @param rowIndex Row index
49
- */
50
- toggleExpand(row: IDictionary<any>, rowIndex?: number): Promise<void>;
51
- /**
52
- * Dispatches row click event
53
- * @param row Grid row
54
- * @param event DOM event
55
- * @param element DOM Element
56
- */
57
- rowClick(row: IDictionary<any>, event: Event, element: HTMLElement): void;
58
- /**
59
- * Toggle expand/collapse using navigation keys
60
- * @param collapse Should collapse
61
- */
62
- private navigateToggle;
63
- /**
64
- * Navigate upwards
65
- */
66
- protected navigateUp(): void;
67
- /**
68
- * Navigate downwards
69
- */
70
- protected navigateDown(): void;
71
- /**
72
- * Select/deselect rows
73
- * @param row selected row
74
- * @param isSelected row is selected
75
- */
76
- selectRow(row: IDictionary<any>, isSelected: boolean): void;
77
- }
@@ -1,52 +0,0 @@
1
- import { IDictionary } from '@zeedhi/core';
2
- import { Column } from '../zd-iterable/column';
3
- import { IChildrenActionTreeColumn, ITreeGridColumn } from './interfaces';
4
- /**
5
- * Base class for Grid column
6
- */
7
- export declare class TreeGridColumn extends Column implements ITreeGridColumn {
8
- children: IChildrenActionTreeColumn[];
9
- /**
10
- * Creates a new Grid Column.
11
- * @param props Grid column properties
12
- */
13
- constructor(props: ITreeGridColumn);
14
- /**
15
- * Children props without grid system.
16
- */
17
- get childrenProps(): {
18
- [key: string]: any;
19
- children?: import("..").IComponentRender[] | undefined;
20
- component: string;
21
- componentId?: number | undefined;
22
- cssClass?: string | undefined;
23
- cssStyle?: string | object | undefined;
24
- events?: import("..").IComponentEvents<import("@zeedhi/core").IEventParam<any>> | undefined;
25
- isVisible?: string | boolean | undefined;
26
- keyMap?: import("@zeedhi/core").IKeyMap<import("@zeedhi/core").IEventParam<any>> | undefined;
27
- name: string;
28
- parent?: import("..").Component | undefined;
29
- }[];
30
- /**
31
- * Grid system for each child.
32
- */
33
- get childrenConditions(): IDictionary<any>;
34
- /**
35
- * Get the conditions function to be applied to each column depending on the row
36
- * @param conditions Conditions object
37
- */
38
- getConditions(conditions: IDictionary): (row: {
39
- [key: string]: any;
40
- }) => {
41
- [key: string]: boolean;
42
- };
43
- /**
44
- * Get the Column without the conditions object
45
- * @param component Column component
46
- */
47
- getColumnWithoutConditions(component: any): any;
48
- /**
49
- * checkOutValues
50
- */
51
- checkOutValues(component: any, row: IDictionary<any>, newRow: IDictionary<any>): void;
52
- }
@@ -1,13 +0,0 @@
1
- import { ITreeGridColumnEditable } from './interfaces';
2
- import { TreeGridColumn } from './tree_grid_column';
3
- /**
4
- * Base class for Grid column
5
- */
6
- export declare class TreeGridColumnEditable extends TreeGridColumn implements ITreeGridColumnEditable {
7
- editable: boolean;
8
- /**
9
- * Creates a new Grid Column.
10
- * @param props Grid column properties
11
- */
12
- constructor(props: ITreeGridColumnEditable);
13
- }