@zeedhi/common 1.129.0 → 1.129.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.
Files changed (219) hide show
  1. package/dist/zd-common.esm.js +98 -96
  2. package/dist/zd-common.umd.js +95 -93
  3. package/package.json +2 -2
  4. package/types/index.d.ts +1 -1
  5. package/types/services/zd-json-cache/json-cache-service.d.ts +12 -0
  6. package/types/utils/combine-urls/combine-urls.d.ts +2 -0
  7. package/types/utils/combine-urls/index.d.ts +1 -0
  8. package/types/utils/index.d.ts +2 -2
  9. package/dist/types/components/index.d.ts +0 -151
  10. package/dist/types/components/zd-alert/alert.d.ts +0 -94
  11. package/dist/types/components/zd-alert/interfaces.d.ts +0 -18
  12. package/dist/types/components/zd-badge/badge.d.ts +0 -28
  13. package/dist/types/components/zd-badge/interfaces.d.ts +0 -10
  14. package/dist/types/components/zd-breadcrumbs/breadcrumbs.d.ts +0 -32
  15. package/dist/types/components/zd-breadcrumbs/interfaces.d.ts +0 -24
  16. package/dist/types/components/zd-button/button.d.ts +0 -89
  17. package/dist/types/components/zd-button/interfaces.d.ts +0 -48
  18. package/dist/types/components/zd-button-group/button-group.d.ts +0 -67
  19. package/dist/types/components/zd-button-group/interfaces.d.ts +0 -25
  20. package/dist/types/components/zd-card/card.d.ts +0 -152
  21. package/dist/types/components/zd-card/interfaces.d.ts +0 -40
  22. package/dist/types/components/zd-carousel/carousel.d.ts +0 -163
  23. package/dist/types/components/zd-carousel/interfaces.d.ts +0 -49
  24. package/dist/types/components/zd-checkbox/checkbox.d.ts +0 -12
  25. package/dist/types/components/zd-checkbox/interfaces.d.ts +0 -5
  26. package/dist/types/components/zd-checkbox-multiple/checkbox-multiple.d.ts +0 -39
  27. package/dist/types/components/zd-checkbox-multiple/interfaces.d.ts +0 -13
  28. package/dist/types/components/zd-chip/chip.d.ts +0 -60
  29. package/dist/types/components/zd-chip/interfaces.d.ts +0 -18
  30. package/dist/types/components/zd-code-viewer/code-viewer.d.ts +0 -86
  31. package/dist/types/components/zd-code-viewer/interfaces.d.ts +0 -13
  32. package/dist/types/components/zd-col/col.d.ts +0 -33
  33. package/dist/types/components/zd-col/interfaces.d.ts +0 -15
  34. package/dist/types/components/zd-collapse-card/collapse-card.d.ts +0 -56
  35. package/dist/types/components/zd-collapse-card/interfaces.d.ts +0 -14
  36. package/dist/types/components/zd-component/child-not-found.d.ts +0 -6
  37. package/dist/types/components/zd-component/component-render.d.ts +0 -16
  38. package/dist/types/components/zd-component/component.d.ts +0 -120
  39. package/dist/types/components/zd-component/interfaces.d.ts +0 -74
  40. package/dist/types/components/zd-container/container.d.ts +0 -45
  41. package/dist/types/components/zd-container/interfaces.d.ts +0 -12
  42. package/dist/types/components/zd-currency/currency.d.ts +0 -12
  43. package/dist/types/components/zd-currency/interfaces.d.ts +0 -6
  44. package/dist/types/components/zd-date-input/date-input.d.ts +0 -152
  45. package/dist/types/components/zd-date-input/interfaces.d.ts +0 -27
  46. package/dist/types/components/zd-date-range/date-range.d.ts +0 -158
  47. package/dist/types/components/zd-date-range/interfaces.d.ts +0 -18
  48. package/dist/types/components/zd-dialog/dialog.d.ts +0 -76
  49. package/dist/types/components/zd-dialog/interfaces.d.ts +0 -13
  50. package/dist/types/components/zd-divider/divider.d.ts +0 -20
  51. package/dist/types/components/zd-divider/interfaces.d.ts +0 -8
  52. package/dist/types/components/zd-dropdown/dropdown.d.ts +0 -81
  53. package/dist/types/components/zd-dropdown/interfaces.d.ts +0 -23
  54. package/dist/types/components/zd-footer/footer.d.ts +0 -80
  55. package/dist/types/components/zd-footer/interfaces.d.ts +0 -26
  56. package/dist/types/components/zd-form/form.d.ts +0 -174
  57. package/dist/types/components/zd-form/interfaces.d.ts +0 -36
  58. package/dist/types/components/zd-frame/frame.d.ts +0 -81
  59. package/dist/types/components/zd-frame/interfaces.d.ts +0 -23
  60. package/dist/types/components/zd-frame-page/frame-page.d.ts +0 -14
  61. package/dist/types/components/zd-frame-page/interfaces.d.ts +0 -4
  62. package/dist/types/components/zd-grid/data-navigator.d.ts +0 -12
  63. package/dist/types/components/zd-grid/data-selector.d.ts +0 -25
  64. package/dist/types/components/zd-grid/grid-column.d.ts +0 -47
  65. package/dist/types/components/zd-grid/grid-events.d.ts +0 -26
  66. package/dist/types/components/zd-grid/grid.d.ts +0 -85
  67. package/dist/types/components/zd-grid/index.d.ts +0 -11
  68. package/dist/types/components/zd-grid/interfaces.d.ts +0 -148
  69. package/dist/types/components/zd-grid/iterable-table.d.ts +0 -28
  70. package/dist/types/components/zd-grid/keymap-merger.d.ts +0 -26
  71. package/dist/types/components/zd-grid/keymap-navigation.d.ts +0 -6
  72. package/dist/types/components/zd-grid/table-action-builder.d.ts +0 -19
  73. package/dist/types/components/zd-grid/view-navigator.d.ts +0 -10
  74. package/dist/types/components/zd-grid-editable/data-editor-with-add.d.ts +0 -35
  75. package/dist/types/components/zd-grid-editable/data-editor.d.ts +0 -64
  76. package/dist/types/components/zd-grid-editable/errors/index.d.ts +0 -2
  77. package/dist/types/components/zd-grid-editable/errors/not-editing.d.ts +0 -6
  78. package/dist/types/components/zd-grid-editable/errors/row-not-found.d.ts +0 -6
  79. package/dist/types/components/zd-grid-editable/grid-column-editable.d.ts +0 -9
  80. package/dist/types/components/zd-grid-editable/grid-editable-controller.d.ts +0 -8
  81. package/dist/types/components/zd-grid-editable/grid-editable-events.d.ts +0 -32
  82. package/dist/types/components/zd-grid-editable/grid-editable.d.ts +0 -124
  83. package/dist/types/components/zd-grid-editable/index.d.ts +0 -8
  84. package/dist/types/components/zd-grid-editable/interfaces.d.ts +0 -66
  85. package/dist/types/components/zd-grid-editable/keymap-editing.d.ts +0 -7
  86. package/dist/types/components/zd-header/header.d.ts +0 -94
  87. package/dist/types/components/zd-header/interfaces.d.ts +0 -29
  88. package/dist/types/components/zd-icon/icon.d.ts +0 -55
  89. package/dist/types/components/zd-icon/interfaces.d.ts +0 -13
  90. package/dist/types/components/zd-image/image.d.ts +0 -73
  91. package/dist/types/components/zd-image/interfaces.d.ts +0 -17
  92. package/dist/types/components/zd-increment/increment.d.ts +0 -56
  93. package/dist/types/components/zd-increment/interfaces.d.ts +0 -9
  94. package/dist/types/components/zd-input/input-factory.d.ts +0 -6
  95. package/dist/types/components/zd-input/input.d.ts +0 -223
  96. package/dist/types/components/zd-input/interfaces.d.ts +0 -38
  97. package/dist/types/components/zd-iterable/column-not-found.d.ts +0 -6
  98. package/dist/types/components/zd-iterable/column.d.ts +0 -78
  99. package/dist/types/components/zd-iterable/conditions-manager.d.ts +0 -49
  100. package/dist/types/components/zd-iterable/interfaces.d.ts +0 -103
  101. package/dist/types/components/zd-iterable/iterable-columns-button-controller.d.ts +0 -9
  102. package/dist/types/components/zd-iterable/iterable-columns-button.d.ts +0 -35
  103. package/dist/types/components/zd-iterable/iterable-controller.d.ts +0 -8
  104. package/dist/types/components/zd-iterable/iterable-page-component.d.ts +0 -27
  105. package/dist/types/components/zd-iterable/iterable-page-info.d.ts +0 -7
  106. package/dist/types/components/zd-iterable/iterable-page-size.d.ts +0 -62
  107. package/dist/types/components/zd-iterable/iterable-pagination.d.ts +0 -28
  108. package/dist/types/components/zd-iterable/iterable.d.ts +0 -77
  109. package/dist/types/components/zd-iterable/search.d.ts +0 -31
  110. package/dist/types/components/zd-iterable-component-render/interfaces.d.ts +0 -34
  111. package/dist/types/components/zd-iterable-component-render/iterable-component-render.d.ts +0 -84
  112. package/dist/types/components/zd-layout/interfaces.d.ts +0 -7
  113. package/dist/types/components/zd-layout/layout.d.ts +0 -9
  114. package/dist/types/components/zd-list/interfaces.d.ts +0 -44
  115. package/dist/types/components/zd-list/item-not-found.d.ts +0 -6
  116. package/dist/types/components/zd-list/list-group.d.ts +0 -30
  117. package/dist/types/components/zd-list/list-item.d.ts +0 -46
  118. package/dist/types/components/zd-list/list.d.ts +0 -81
  119. package/dist/types/components/zd-loading/interfaces.d.ts +0 -7
  120. package/dist/types/components/zd-loading/loading.d.ts +0 -21
  121. package/dist/types/components/zd-login/interfaces.d.ts +0 -25
  122. package/dist/types/components/zd-login/login-button.d.ts +0 -50
  123. package/dist/types/components/zd-login/login.d.ts +0 -54
  124. package/dist/types/components/zd-main/interfaces.d.ts +0 -5
  125. package/dist/types/components/zd-main/main.d.ts +0 -7
  126. package/dist/types/components/zd-master-detail/detail-not-found.d.ts +0 -7
  127. package/dist/types/components/zd-master-detail/interfaces.d.ts +0 -10
  128. package/dist/types/components/zd-master-detail/master-detail.d.ts +0 -18
  129. package/dist/types/components/zd-master-detail/master-not-found.d.ts +0 -7
  130. package/dist/types/components/zd-menu/interfaces.d.ts +0 -68
  131. package/dist/types/components/zd-menu/menu-button.d.ts +0 -29
  132. package/dist/types/components/zd-menu/menu-group.d.ts +0 -61
  133. package/dist/types/components/zd-menu/menu-link.d.ts +0 -50
  134. package/dist/types/components/zd-menu/menu-separator.d.ts +0 -7
  135. package/dist/types/components/zd-menu/menu.d.ts +0 -199
  136. package/dist/types/components/zd-modal/interfaces.d.ts +0 -35
  137. package/dist/types/components/zd-modal/modal-close-button.d.ts +0 -28
  138. package/dist/types/components/zd-modal/modal.d.ts +0 -53
  139. package/dist/types/components/zd-month/interfaces.d.ts +0 -6
  140. package/dist/types/components/zd-month/month.d.ts +0 -33
  141. package/dist/types/components/zd-number-input/interfaces.d.ts +0 -8
  142. package/dist/types/components/zd-number-input/number-input.d.ts +0 -43
  143. package/dist/types/components/zd-password/interfaces.d.ts +0 -6
  144. package/dist/types/components/zd-password/password.d.ts +0 -17
  145. package/dist/types/components/zd-progress/interfaces.d.ts +0 -10
  146. package/dist/types/components/zd-progress/progress.d.ts +0 -41
  147. package/dist/types/components/zd-radio/interfaces.d.ts +0 -11
  148. package/dist/types/components/zd-radio/radio.d.ts +0 -35
  149. package/dist/types/components/zd-row/interfaces.d.ts +0 -13
  150. package/dist/types/components/zd-row/row.d.ts +0 -39
  151. package/dist/types/components/zd-select/interfaces.d.ts +0 -24
  152. package/dist/types/components/zd-select/select.d.ts +0 -238
  153. package/dist/types/components/zd-select-multiple/interfaces.d.ts +0 -18
  154. package/dist/types/components/zd-select-multiple/select-multiple.d.ts +0 -113
  155. package/dist/types/components/zd-svg-map/interfaces.d.ts +0 -26
  156. package/dist/types/components/zd-svg-map/svg-map.d.ts +0 -35
  157. package/dist/types/components/zd-switch/interfaces.d.ts +0 -7
  158. package/dist/types/components/zd-switch/switch.d.ts +0 -16
  159. package/dist/types/components/zd-table/interfaces.d.ts +0 -25
  160. package/dist/types/components/zd-table/table.d.ts +0 -42
  161. package/dist/types/components/zd-tabs/interfaces.d.ts +0 -40
  162. package/dist/types/components/zd-tabs/tab-not-found.d.ts +0 -11
  163. package/dist/types/components/zd-tabs/tab.d.ts +0 -57
  164. package/dist/types/components/zd-tabs/tabs.d.ts +0 -86
  165. package/dist/types/components/zd-tag/interfaces.d.ts +0 -7
  166. package/dist/types/components/zd-tag/tag.d.ts +0 -13
  167. package/dist/types/components/zd-text/interfaces.d.ts +0 -9
  168. package/dist/types/components/zd-text/text.d.ts +0 -8
  169. package/dist/types/components/zd-text-input/interfaces.d.ts +0 -23
  170. package/dist/types/components/zd-text-input/text-input.d.ts +0 -91
  171. package/dist/types/components/zd-textarea/interfaces.d.ts +0 -21
  172. package/dist/types/components/zd-textarea/textarea.d.ts +0 -71
  173. package/dist/types/components/zd-time/interfaces.d.ts +0 -22
  174. package/dist/types/components/zd-time/time-format-selector.d.ts +0 -8
  175. package/dist/types/components/zd-time/time.d.ts +0 -149
  176. package/dist/types/components/zd-toggleable/interfaces.d.ts +0 -6
  177. package/dist/types/components/zd-toggleable/toggleable.d.ts +0 -21
  178. package/dist/types/components/zd-tooltip/interfaces.d.ts +0 -18
  179. package/dist/types/components/zd-tooltip/tooltip.d.ts +0 -57
  180. package/dist/types/components/zd-tree/interfaces.d.ts +0 -107
  181. package/dist/types/components/zd-tree/tree.d.ts +0 -161
  182. package/dist/types/components/zd-tree-grid/index.d.ts +0 -6
  183. package/dist/types/components/zd-tree-grid/interfaces.d.ts +0 -35
  184. package/dist/types/components/zd-tree-grid/iterable-tree.d.ts +0 -10
  185. package/dist/types/components/zd-tree-grid/keymap-tree.d.ts +0 -7
  186. package/dist/types/components/zd-tree-grid/tree-data-navigator.d.ts +0 -10
  187. package/dist/types/components/zd-tree-grid/tree-data-selector.d.ts +0 -18
  188. package/dist/types/components/zd-tree-grid/tree-grid.d.ts +0 -119
  189. package/dist/types/error/delete-rows.d.ts +0 -7
  190. package/dist/types/error/index.d.ts +0 -3
  191. package/dist/types/error/non-initialized.d.ts +0 -7
  192. package/dist/types/error/zeedhi-error.d.ts +0 -6
  193. package/dist/types/index.d.ts +0 -6
  194. package/dist/types/services/index.d.ts +0 -4
  195. package/dist/types/services/zd-alert/alert-queue.d.ts +0 -13
  196. package/dist/types/services/zd-alert/alert-replace.d.ts +0 -18
  197. package/dist/types/services/zd-alert/alert-service.d.ts +0 -45
  198. package/dist/types/services/zd-alert/alert-stack.d.ts +0 -9
  199. package/dist/types/services/zd-alert/index.d.ts +0 -5
  200. package/dist/types/services/zd-alert/interfaces.d.ts +0 -6
  201. package/dist/types/services/zd-dialog/dialog-service.d.ts +0 -24
  202. package/dist/types/services/zd-loading/loading-service.d.ts +0 -17
  203. package/dist/types/services/zd-modal/modal-service.d.ts +0 -39
  204. package/dist/types/utils/data-value-out/data-value-out.d.ts +0 -5
  205. package/dist/types/utils/data-value-out/index.d.ts +0 -2
  206. package/dist/types/utils/data-value-out/interfaces.d.ts +0 -8
  207. package/dist/types/utils/datasource-searcher/datasource-searcher.d.ts +0 -6
  208. package/dist/types/utils/datasource-searcher/index.d.ts +0 -2
  209. package/dist/types/utils/datasource-searcher/interfaces.d.ts +0 -5
  210. package/dist/types/utils/icons/icons.d.ts +0 -24
  211. package/dist/types/utils/index.d.ts +0 -7
  212. package/dist/types/utils/omit/omit.d.ts +0 -11
  213. package/dist/types/utils/theme/theme.d.ts +0 -34
  214. package/dist/types/utils/tree-data-structure/index.d.ts +0 -2
  215. package/dist/types/utils/tree-data-structure/interfaces.d.ts +0 -30
  216. package/dist/types/utils/tree-data-structure/tree-data-structure.d.ts +0 -155
  217. package/dist/types/utils/unique-by/unique-by.d.ts +0 -3
  218. package/dist/zd-common.js +0 -13133
  219. package/dist/zd-common.min.js +0 -13133
@@ -1,124 +0,0 @@
1
- import { IDictionary, IEventParam } from '@zeedhi/core';
2
- import { IComponent, IComponentRender } from '../zd-component/interfaces';
3
- import { Direction, GridColumn, IGrid, VerticalDirection } from '../zd-grid';
4
- import { Iterable } from '../zd-iterable/iterable';
5
- import { GridColumnEditable } from './grid-column-editable';
6
- import { IGridColumnEditable, IGridEditable, IGridEditableProps } from './interfaces';
7
- export declare class GridEditable extends Iterable<GridColumnEditable> implements IGridEditable {
8
- private tableActionBuilder;
9
- private iterableTable;
10
- private dataSelector;
11
- private gridEditableEvents;
12
- private dataNavigator;
13
- private viewNavigator;
14
- private keyMapMerger;
15
- private dataEditor;
16
- editing: boolean;
17
- currentColumn: GridColumnEditable | null;
18
- selectedRows: IDictionary<any>[];
19
- selectionState: {
20
- allSelected: boolean;
21
- except: IDictionary<any>[];
22
- };
23
- rowStyleConditions?: (row: IDictionary) => IDictionary;
24
- selectAllPages: boolean;
25
- selectable: boolean;
26
- disableSelection?: (args: {
27
- row: IDictionary<any>;
28
- component: IGrid;
29
- }) => boolean;
30
- cellSelection: boolean;
31
- toolbarSlot: IComponentRender[];
32
- footerSlot: IComponentRender[];
33
- noResultsText: string;
34
- noResultSlot: IComponentRender[];
35
- errorSlot: IComponentRender[];
36
- dense: boolean;
37
- dragColumns: boolean;
38
- headerBackground: string;
39
- headerCellTextColor: string;
40
- height: string | number;
41
- loadingText: string;
42
- maxHeight: string | number;
43
- maxWidth: string | number;
44
- minHeight: string | number;
45
- minWidth: string | number;
46
- noDataText: string;
47
- noDataSlot: IComponentRender[];
48
- resizeColumns: boolean;
49
- showFooter: boolean;
50
- showHeader: boolean;
51
- showSelectAll: boolean;
52
- width: string | number;
53
- backgroundColor: string;
54
- canEditRow?: ((args: {
55
- row: IDictionary<any>;
56
- component: IGridEditable;
57
- }) => boolean) | undefined;
58
- showCancelColumn: boolean;
59
- doubleClickEdit: boolean;
60
- singleEdit: boolean;
61
- editingNewRows: boolean;
62
- constructor(props: IGridEditableProps);
63
- getConditionalProps({ row, column }: {
64
- row: IDictionary;
65
- column: GridColumn;
66
- }): Partial<IComponentRender>;
67
- addCancelColumn(): void;
68
- getCancelColumnProps(): IGridColumnEditable;
69
- isAdded(row: IDictionary): boolean;
70
- cancelAddedRow(key: string | number): Promise<any>;
71
- cancelAddedRows(): Promise<void>;
72
- getAddedRows(): IDictionary<any>[];
73
- addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
74
- setViewEnterEdit(fn: ((rowKey: string, columnName: string) => void) | null): void;
75
- getVisibleValue(row: IDictionary, column: IGridColumnEditable): any;
76
- getEditableComponent(column: IGridColumnEditable, row: IDictionary<any>): IComponentRender;
77
- isEdited(column: IGridColumnEditable, row: IDictionary): boolean;
78
- isValid(column: IGridColumnEditable, row: IDictionary, revalidate?: boolean): Promise<boolean>;
79
- checkValid(column: IGridColumnEditable, row: IDictionary): boolean;
80
- isGridValid(revalidate?: boolean): boolean;
81
- getComponent<T>(key: string, columnName: string): T;
82
- updateRow(newRow: IDictionary): void;
83
- updateCell(rowKey: string, columnName: string, value: any): void;
84
- changeData(data?: IDictionary<any>[]): void;
85
- enterEdit(rowKey: string, columnName: string): void;
86
- cancelEditedRows(): Promise<void>;
87
- saveEditedRows(revalidate?: boolean): Promise<void[]>;
88
- reapplyCanEditRow(row: IDictionary<any>): void;
89
- getCanEditRow(row: IDictionary<any>): boolean | undefined;
90
- getEditedRows(revalidate?: boolean, silent?: boolean): IDictionary<any>[];
91
- cellDoubleClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element?: HTMLElement): void;
92
- inlineEdit(row: IDictionary, column: GridColumnEditable, event?: Event, element?: HTMLElement): void;
93
- onMounted(element: HTMLElement): void;
94
- onBeforeDestroy(): void;
95
- navigatePageUp(): void;
96
- navigatePageDown(): void;
97
- setViewNavigate(viewNavigate: (direction: Direction, event?: Event) => void): void;
98
- navigateLeft(params: IEventParam<any>): void;
99
- navigateRight(params: IEventParam<any>): void;
100
- navigateUp(): void;
101
- navigateDown(): void;
102
- navigateDatasource(direction: VerticalDirection): void;
103
- createColumn(column: IGridColumnEditable): GridColumnEditable;
104
- rowClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void;
105
- rowDoubleClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void;
106
- cellClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element?: HTMLElement): void;
107
- cellClickEvent(row: IDictionary<any>, column: GridColumnEditable, event: Event, element?: HTMLElement): void;
108
- selectClick(row: IDictionary<any>, isSelected: boolean, event: Event, element?: HTMLElement): void;
109
- selectAllClick(isSelected: boolean, event: Event, element?: HTMLElement): void;
110
- selectAll(isSelected: boolean): void;
111
- toggleRow(row: IDictionary): void;
112
- selectRow(row: IDictionary, select: boolean): void;
113
- callDisableSelection(row: IDictionary): boolean;
114
- changeOrder(sortBy: {
115
- key: string;
116
- order: 'asc' | 'desc';
117
- }[]): Promise<void>;
118
- selectCell(row: IDictionary, column: GridColumnEditable): void;
119
- reapplyRowStyleConditions(row: IDictionary): IDictionary;
120
- getRowStyleConditions(row: IDictionary): IDictionary;
121
- deleteRows(): Promise<any[]>;
122
- getActionComponent(actionComponent: IComponent, column: GridColumnEditable, row: IDictionary, parentPath?: string): IComponent;
123
- getEditedRow(row: IDictionary): IDictionary | undefined;
124
- }
@@ -1,8 +0,0 @@
1
- export * from './data-editor-with-add';
2
- export * from './data-editor';
3
- export * from './grid-column-editable';
4
- export * from './grid-editable-controller';
5
- export * from './grid-editable-events';
6
- export * from './grid-editable';
7
- export * from './interfaces';
8
- export * from './keymap-editing';
@@ -1,66 +0,0 @@
1
- import { IDictionary } from '@zeedhi/core';
2
- import { IComponentRender } from '../zd-component/interfaces';
3
- import { GridColumn, IGrid, IGridColumn, IGridProps } from '../zd-grid';
4
- import { GridColumnEditable } from './grid-column-editable';
5
- import { GridEditable } from './grid-editable';
6
- export interface IGridEditableProps extends IGridProps {
7
- columns?: IGridColumnEditable[];
8
- canEditRow?: (args: {
9
- row: IDictionary<any>;
10
- component: GridEditable;
11
- }) => boolean;
12
- showCancelColumn?: boolean;
13
- doubleClickEdit?: boolean;
14
- singleEdit?: boolean;
15
- }
16
- export interface IGridEditable<T = GridColumnEditable> extends IGrid<T>, IDataEditorWithAdd, IGridEditableEvents {
17
- editing: boolean;
18
- canEditRow?: (args: {
19
- row: IDictionary<any>;
20
- component: IGridEditable;
21
- }) => boolean;
22
- showCancelColumn: boolean;
23
- doubleClickEdit: boolean;
24
- singleEdit: boolean;
25
- editingNewRows: boolean;
26
- }
27
- export interface IGridEditableEvents {
28
- rowClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void;
29
- rowDoubleClick(row: IDictionary<any>, event: Event, element?: HTMLElement): void;
30
- cellDoubleClick(row: IDictionary<any>, column: GridColumnEditable, event: Event, element?: HTMLElement): void;
31
- inlineEdit(row: IDictionary, column: GridColumnEditable, event?: Event, element?: HTMLElement): void;
32
- cellClick(row: IDictionary<any>, column: GridColumn, event: Event, element?: HTMLElement): void;
33
- cellClickEvent(row: IDictionary<any>, column: GridColumnEditable, event: Event, element?: HTMLElement): void;
34
- }
35
- export interface IGridColumnEditable extends IGridColumn {
36
- editable?: boolean;
37
- }
38
- export interface IDataEditor {
39
- getVisibleValue(row: IDictionary, column: IGridColumnEditable): any;
40
- getEditableComponent(column: IGridColumnEditable, row: IDictionary<any>): IComponentRender;
41
- isEdited(column: IGridColumnEditable, row: IDictionary): boolean;
42
- isValid(column: IGridColumnEditable, row: IDictionary, revalidate?: boolean): Promise<boolean>;
43
- checkValid(column: IGridColumnEditable, row: IDictionary): boolean;
44
- isGridValid(revalidate?: boolean): boolean;
45
- getComponent<T>(key: string, columnName: string): T;
46
- updateRow(newRow: IDictionary): void;
47
- updateCell(rowKey: string, columnName: string, value: any): void;
48
- changeData(data?: IDictionary<any>[]): void;
49
- setViewEnterEdit(fn: ((rowKey: string, columnName: string) => void) | null): void;
50
- enterEdit(rowKey: string, columnName: string): void;
51
- cancelEditedRows(): Promise<void>;
52
- saveEditedRows(revalidate?: boolean): Promise<void[]>;
53
- reapplyCanEditRow(row: IDictionary<any>): void;
54
- getCanEditRow(row: IDictionary<any>): boolean | undefined;
55
- getEditedRows(revalidate?: boolean, silent?: boolean): IDictionary<any>[];
56
- getEditedRow(row: IDictionary): IDictionary | undefined;
57
- }
58
- export interface IDataEditorWithAdd extends IDataEditor {
59
- addCancelColumn(): void;
60
- getCancelColumnProps(): IGridColumnEditable;
61
- isAdded(row: IDictionary): boolean;
62
- cancelAddedRow(key: string | number): Promise<any>;
63
- cancelAddedRows(): Promise<void>;
64
- getAddedRows(): IDictionary<any>[];
65
- addNewRow(row: IDictionary, position?: 'end' | 'start'): Promise<void>;
66
- }
@@ -1,7 +0,0 @@
1
- import { IKeyMap } from '@zeedhi/core';
2
- import { Component } from '../zd-component/component';
3
- import { IKeyMapConfig } from '../zd-grid/interfaces';
4
- import { IDataEditor } from './interfaces';
5
- export declare class KeyMapEditing implements IKeyMapConfig<IDataEditor> {
6
- getMap(instance: Component & IDataEditor): IKeyMap;
7
- }
@@ -1,94 +0,0 @@
1
- import { ComponentRender } from '../zd-component/component-render';
2
- import { IComponentRender } from '../zd-component/interfaces';
3
- import { IFrameEvents } from '../zd-frame/interfaces';
4
- import { IHeader } from './interfaces';
5
- /**
6
- * Base class for Header component.
7
- */
8
- export declare class Header extends ComponentRender implements IHeader {
9
- /**
10
- * Applies position absolute to header.
11
- */
12
- absolute: boolean;
13
- /**
14
- * Designates the header as part of the application layout.
15
- */
16
- app: boolean;
17
- /**
18
- * Render components on the middle of header.
19
- */
20
- centerSlot: IComponentRender[];
21
- /**
22
- * Applies specified color to the control. It can be the name of material or css color in hexa.
23
- */
24
- color: string;
25
- /**
26
- * Reduces the height of the toolbar content to 48px.
27
- */
28
- dense: boolean;
29
- /**
30
- * Designates an elevation applied to the component between 0 and 24.
31
- */
32
- elevation: number | string;
33
- /**
34
- * Events registered to the header.
35
- */
36
- events: IFrameEvents;
37
- /**
38
- * Applies position fixed to header.
39
- */
40
- fixed: boolean;
41
- /**
42
- * Sets the height for header.
43
- */
44
- height: number | string;
45
- /**
46
- * Render components on the left of header.
47
- */
48
- leftSlot: IComponentRender[];
49
- /**
50
- * Sets the maximum height for the header.
51
- */
52
- maxHeight?: number | string;
53
- /**
54
- * Sets the maximum width for the header.
55
- */
56
- maxWidth?: number | string;
57
- /**
58
- * Sets the minimum height for the header.
59
- */
60
- minHeight?: number | string;
61
- /**
62
- * Sets the minimum width for the header.
63
- */
64
- minWidth?: number | string;
65
- /**
66
- * Removes internal padding from header.
67
- */
68
- padless?: boolean;
69
- /**
70
- * Render components on the right of header.
71
- */
72
- rightSlot: IComponentRender[];
73
- /**
74
- * Sets the width for the component.
75
- */
76
- width?: number | string;
77
- /**
78
- * Specifies a v-img as the component’s background.
79
- */
80
- image?: string;
81
- /**
82
- * Adjust the order of the component in relation to its registration order.
83
- */
84
- order?: string | number;
85
- /**
86
- * Creates a new header.
87
- * @param props Header properties
88
- */
89
- constructor(props: IHeader);
90
- /**
91
- * Retrieves named slots visibility
92
- */
93
- get namedSlotsIsVisible(): number;
94
- }
@@ -1,29 +0,0 @@
1
- import { IEventParam } from '@zeedhi/core';
2
- import { IComponentEvents, IComponentRender } from '../zd-component/interfaces';
3
- import { Header } from './header';
4
- export type IHeaderEvent = IEventParam<Header>;
5
- export interface IHeaderEvents extends IComponentEvents<IHeaderEvent> {
6
- blur: undefined;
7
- click: undefined;
8
- focus: undefined;
9
- }
10
- export interface IHeader extends IComponentRender {
11
- absolute?: boolean;
12
- app?: boolean;
13
- centerSlot?: IComponentRender[];
14
- color?: string;
15
- dense?: boolean;
16
- elevation?: number | string;
17
- fixed?: boolean;
18
- height?: number | string;
19
- leftSlot?: IComponentRender[];
20
- maxHeight?: number | string;
21
- maxWidth?: number | string;
22
- minHeight?: number | string;
23
- minWidth?: number | string;
24
- padless?: boolean;
25
- rightSlot?: IComponentRender[];
26
- width?: number | string;
27
- image?: string;
28
- order?: string | number;
29
- }
@@ -1,55 +0,0 @@
1
- import { ComponentRender } from '../zd-component/component-render';
2
- import { IIcon } from './interfaces';
3
- /**
4
- * The Icon component <code>zd-icon</code> is used to show an icon.
5
- */
6
- export declare class Icon extends ComponentRender implements IIcon {
7
- /**
8
- * Applies specified color to the control - it can be the name of material color
9
- * (for example success or purple) or css color (#033 or rgba(255, 0, 0, 0.5)).
10
- */
11
- color: string;
12
- /**
13
- * Makes icon smaller (20px)
14
- */
15
- dense: boolean;
16
- /**
17
- * Disable the icon
18
- */
19
- disabled: boolean;
20
- /**
21
- * Defines the icon, that will be rendered
22
- */
23
- iconName: string;
24
- /**
25
- * Makes the component large.
26
- */
27
- large: boolean;
28
- /**
29
- * Applies appropriate margins to the icon inside
30
- * of a button when placed to the left of another element or text
31
- */
32
- left: boolean;
33
- /**
34
- * Applies appropriate margins to the icon inside of
35
- * a button when placed to the right of another element or text
36
- */
37
- right: boolean;
38
- /**
39
- * Specifies a custom font size for the icon
40
- */
41
- size: number | string;
42
- /**
43
- * Makes the component small.
44
- */
45
- small: boolean;
46
- /**
47
- * Specifies a custom tag to be used
48
- */
49
- tag: string;
50
- /**
51
- * Create a new Button
52
- * @param props Icon definition
53
- */
54
- constructor(props: IIcon);
55
- }
@@ -1,13 +0,0 @@
1
- import { IComponentRender } from '../zd-component/interfaces';
2
- export interface IIcon extends IComponentRender {
3
- color?: string;
4
- dense?: boolean;
5
- disabled?: boolean;
6
- large?: boolean;
7
- left?: boolean;
8
- right?: boolean;
9
- size?: number | string;
10
- small?: boolean;
11
- tag?: string;
12
- iconName: string;
13
- }
@@ -1,73 +0,0 @@
1
- import { ComponentRender } from '../zd-component/component-render';
2
- import { IImage } from './interfaces';
3
- export declare class Image extends ComponentRender implements IImage {
4
- /**
5
- * Alternative text for the image, if the image cannot be displayed.
6
- */
7
- alt: string;
8
- /**
9
- * Path of the image to be shown if an error occurs.
10
- */
11
- errorImagePath: string;
12
- /**
13
- * Text to be shown if an error occurs.
14
- */
15
- errorImageText: string;
16
- /**
17
- * Defines how the image should be resized to fit its container.
18
- * See <a href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit\"
19
- * alt=\"Object fit in MDN\" target=\"_blank\">MDN Web Docs</a>
20
- * for more details.
21
- */
22
- objectFit: string;
23
- /**
24
- * Defines the component height. Possible values for this property can be
25
- * <samp>'auto', '100%', '400px' or 400</samp>
26
- */
27
- height: string | number;
28
- /**
29
- * Defines the component min height. Possible values for this property can be
30
- * <samp>'auto', '100%', '400px' or 400</samp>
31
- */
32
- minHeight: string | number;
33
- /**
34
- * Defines the component max height. Possible values for this property can be
35
- * <samp>'auto', '100%', '400px' or 400</samp>
36
- */
37
- maxHeight: string | number;
38
- /**
39
- * Defines the component width. Possible values for this property can be
40
- * <samp>'auto', '100%', '400px' or 400</samp>
41
- */
42
- width: string | number;
43
- /**
44
- * Defines the component min width. Possible values for this property can be
45
- * <samp>'auto', '100%', '400px' or 400</samp>
46
- */
47
- minWidth: string | number;
48
- /**
49
- * Defines the component max height. Possible values for this property can be
50
- * <samp>'auto', '100%', '400px' or 400</samp>
51
- */
52
- maxWidth: string | number;
53
- /**
54
- * Source of the image file.
55
- */
56
- private srcValue;
57
- validImage?: boolean;
58
- /**
59
- * Creates a new Image.
60
- * @param props Image properties
61
- */
62
- constructor(props: IImage);
63
- /**
64
- * Event to be called after the error image is loaded
65
- */
66
- loadImage(): void;
67
- /**
68
- * Event to be called after the image is not loaded
69
- */
70
- errorImage(): void;
71
- get src(): string;
72
- set src(src: string);
73
- }
@@ -1,17 +0,0 @@
1
- import { IEventParam } from '@zeedhi/core';
2
- import { IComponentRender } from '../zd-component/interfaces';
3
- import { Image } from './image';
4
- export type IImageEvents = IEventParam<Image>;
5
- export interface IImage extends IComponentRender {
6
- alt?: string;
7
- errorImagePath?: string;
8
- errorImageText?: string;
9
- objectFit?: string;
10
- src?: string;
11
- height?: number | string;
12
- maxHeight?: number | string;
13
- minHeight?: number | string;
14
- width?: number | string;
15
- maxWidth?: number | string;
16
- minWidth?: number | string;
17
- }
@@ -1,56 +0,0 @@
1
- import { NumberInput as ZdNumber } from '../zd-number-input/number-input';
2
- import { IIncrement } from './interfaces';
3
- /**
4
- * Base class for Increment component.
5
- */
6
- export declare class Increment extends ZdNumber implements IIncrement {
7
- align: string;
8
- /**
9
- * Appends a plus icon inside of the component
10
- */
11
- appendIcon: string;
12
- /**
13
- * Maximum value of increment
14
- */
15
- maxValue?: number;
16
- /**
17
- * Minimum value of decrement
18
- */
19
- minValue?: number;
20
- /**
21
- * Prepends a minus icon inside of the component
22
- */
23
- prependIcon: string;
24
- /**
25
- * Defines the increment value
26
- */
27
- step: number;
28
- /**
29
- * Creates a new Increment.
30
- * @param props Increment properties
31
- */
32
- constructor(props: IIncrement & {
33
- component: string;
34
- name: string;
35
- });
36
- /**
37
- * Triggered when the prepended icon is clicked.
38
- * @param event DOM event
39
- * @param element Increment
40
- */
41
- minusClick(event: Event, element: any): void;
42
- /**
43
- * Triggered when the appended icon is clicked.
44
- * @param event DOM event
45
- * @param element Increment
46
- */
47
- plusClick(event: Event, element: any): void;
48
- /**
49
- * Method to increment the value
50
- */
51
- increment(): void;
52
- /**
53
- * Method to decrement the value
54
- */
55
- decrement(): void;
56
- }
@@ -1,9 +0,0 @@
1
- import { IEventParam } from '@zeedhi/core';
2
- import { INumberInput } from '../zd-number-input/interfaces';
3
- import { Increment } from './increment';
4
- export type IIncrementEvent = IEventParam<Increment>;
5
- export interface IIncrement extends INumberInput {
6
- step?: number;
7
- maxValue?: number;
8
- minValue?: number;
9
- }
@@ -1,6 +0,0 @@
1
- import { IDictionary, INewable } from '@zeedhi/core';
2
- export declare class InputFactory {
3
- private static inputClasses;
4
- static register(className: string, inputClass: INewable<any>): void;
5
- static factory(props: IDictionary<any>): any;
6
- }