@zeedhi/vuetify 3.0.6 → 3.0.8

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 (350) hide show
  1. package/.package.json +11 -9
  2. package/dist/components/index.js +275 -0
  3. package/dist/components/tek-grid/TekGrid.js +287 -0
  4. package/dist/components/tek-grid/column-filter/TekGridColumnFilter.js +201 -0
  5. package/dist/components/tek-grid/column-header/TekGridHeaderRow.js +134 -0
  6. package/dist/components/tek-grid/columns-button/TekGridColumnsButton.js +79 -0
  7. package/dist/components/tek-grid/columns-button/TekGridColumnsOptionsController.js +416 -0
  8. package/dist/components/tek-grid/columns-button/TekGridColumnsOptionsModal.js +501 -0
  9. package/dist/components/tek-grid/filter-button/TekGridFilterButton.js +36 -0
  10. package/dist/components/tek-grid/indentation/TekGridIndentation.js +20 -0
  11. package/dist/components/tek-grid/layout-options/TekGridLayoutOptions.js +101 -0
  12. package/dist/components/tek-grid/row/TekGridFooterRow.js +57 -0
  13. package/dist/components/tek-grid/row/TekGridGroupRow.js +58 -0
  14. package/dist/components/tooltip-overflow/ZdTooltipOverflow.js +56 -0
  15. package/dist/components/zd-activator-wrapper/ZdActivatorWrapper.js +33 -0
  16. package/dist/components/zd-alert/ZdAlert.js +112 -0
  17. package/dist/components/zd-badge/ZdBadge.js +28 -0
  18. package/dist/components/zd-breadcrumbs/ZdBreadcrumbs.js +55 -0
  19. package/dist/components/zd-button/ZdButton.js +230 -0
  20. package/dist/components/zd-button-group/ZdButtonGroup.js +110 -0
  21. package/dist/components/zd-card/ZdCard.js +132 -0
  22. package/dist/components/zd-carousel/ZdCarousel.js +242 -0
  23. package/dist/components/zd-checkbox/ZdCheckbox.js +35 -0
  24. package/dist/components/zd-checkbox-multiple/ZdCheckboxMultiple.js +62 -0
  25. package/dist/components/zd-chip/ZdChip.js +94 -0
  26. package/dist/components/zd-code-viewer/ZdCodeViewer.js +55 -0
  27. package/dist/components/zd-code-viewer/prism.js +14 -0
  28. package/dist/components/zd-col/ZdCol.js +45 -0
  29. package/dist/components/zd-collapse-card/ZdCollapseCard.js +85 -0
  30. package/dist/components/zd-component/ZdComponent.js +259 -0
  31. package/dist/components/zd-component/ZdComponentRender.js +14 -0
  32. package/dist/components/zd-container/ZdContainer.js +42 -0
  33. package/dist/components/zd-currency/ZdCurrency.js +24 -0
  34. package/dist/components/zd-date-input/ZdDateInput.js +247 -0
  35. package/dist/components/zd-date-range/ZdDateRange.js +251 -0
  36. package/dist/components/zd-dialog/ZdDialog.js +34 -0
  37. package/dist/components/zd-divider/ZdDivider.js +28 -0
  38. package/dist/components/zd-dropdown/ZdDropdown.js +93 -0
  39. package/dist/components/zd-footer/ZdFooter.js +77 -0
  40. package/dist/components/zd-form/ZdForm.js +85 -0
  41. package/dist/components/zd-frame/ZdFrame.js +76 -0
  42. package/dist/components/zd-frame-page/ZdFramePage.js +21 -0
  43. package/dist/components/zd-grid/ZdGrid.js +284 -0
  44. package/dist/components/zd-grid/cell/ZdGridAction.js +12 -0
  45. package/dist/components/zd-grid/cell/ZdGridCell.js +59 -0
  46. package/dist/components/zd-grid/cell/ZdGridCellContent.js +59 -0
  47. package/dist/components/zd-grid/cell/ZdGridCheckbox.js +38 -0
  48. package/dist/components/zd-grid/column-header/ZdGridColumnHeader.js +70 -0
  49. package/dist/components/zd-grid/column-header/ZdGridHeaderIcon.js +31 -0
  50. package/dist/components/zd-grid/column-header/ZdGridHeaderRow.js +102 -0
  51. package/dist/components/zd-grid/column-header/ZdGridSort.js +32 -0
  52. package/dist/components/zd-grid/composables/grid-instance.js +12 -0
  53. package/dist/components/zd-grid/footer/ZdGridFooter.js +16 -0
  54. package/dist/components/zd-grid/helper/ZdGridHelper.js +12 -0
  55. package/dist/components/zd-grid/row/TableRow.js +25 -0
  56. package/dist/components/zd-grid/row/ZdGridRow.js +70 -0
  57. package/dist/components/zd-grid/toolbar/ZdGridToolbar.js +15 -0
  58. package/dist/components/zd-grid-editable/ZdGridEditable.js +174 -0
  59. package/dist/components/zd-grid-editable/cell/ZdGridEditableCell.js +135 -0
  60. package/dist/components/zd-grid-editable/row/ZdGridEditableRow.js +99 -0
  61. package/dist/components/zd-header/ZdHeader.js +111 -0
  62. package/dist/components/zd-icon/ZdIcon.js +63 -0
  63. package/dist/components/zd-image/ZdImage.js +48 -0
  64. package/dist/components/zd-increment/ZdIncrement.js +38 -0
  65. package/dist/components/zd-input/ZdInput.js +164 -0
  66. package/dist/components/zd-iterable/ZdIterable.js +38 -0
  67. package/dist/components/zd-iterable/ZdIterableNoData.js +20 -0
  68. package/dist/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.js +50 -0
  69. package/dist/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.js +21 -0
  70. package/dist/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.js +55 -0
  71. package/dist/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.js +36 -0
  72. package/dist/components/zd-iterable/zd-search/ZdSearch.js +42 -0
  73. package/dist/components/zd-iterable-component-render/ZdIterableComponentRender.js +108 -0
  74. package/dist/components/zd-layout/ZdLayout.js +41 -0
  75. package/dist/components/zd-list/ZdList.js +84 -0
  76. package/dist/components/zd-list/ZdListGroup.js +38 -0
  77. package/dist/components/zd-list/ZdListItem.js +66 -0
  78. package/dist/components/zd-loading/ZdLoading.js +61 -0
  79. package/dist/components/zd-login/ZdLogin.js +68 -0
  80. package/dist/components/zd-login/ZdLoginButton.js +28 -0
  81. package/dist/components/zd-main/ZdMain.js +33 -0
  82. package/dist/components/zd-master-detail/ZdMasterDetail.js +48 -0
  83. package/dist/components/zd-menu/ZdMenu.js +302 -0
  84. package/dist/components/zd-menu/ZdMenuButton.js +42 -0
  85. package/dist/components/zd-menu/ZdMenuGroup.js +66 -0
  86. package/dist/components/zd-menu/ZdMenuLink.js +63 -0
  87. package/dist/components/zd-menu/ZdMenuSeparator.js +26 -0
  88. package/dist/components/zd-modal/ZdModal.js +123 -0
  89. package/dist/components/zd-modal/ZdModalCloseButton.js +36 -0
  90. package/dist/components/zd-month/ZdMonth.js +31 -0
  91. package/dist/components/zd-number-input/ZdNumberInput.js +84 -0
  92. package/dist/components/zd-password/ZdPassword.js +23 -0
  93. package/dist/components/zd-progress/ZdProgress.js +52 -0
  94. package/dist/components/zd-radio/ZdRadio.js +56 -0
  95. package/dist/components/zd-row/ZdRow.js +43 -0
  96. package/dist/components/zd-select/ZdSelect.js +191 -0
  97. package/dist/components/zd-select-multiple/ZdSelectMultiple.js +326 -0
  98. package/dist/components/zd-svg-map/ZdSvgMap.js +211 -0
  99. package/dist/components/zd-switch/ZdSwitch.js +39 -0
  100. package/dist/components/zd-table/ZdTable.js +42 -0
  101. package/dist/components/zd-tabs/ZdTab.js +92 -0
  102. package/dist/components/zd-tabs/ZdTabItem.js +17 -0
  103. package/dist/components/zd-tabs/ZdTabs.js +84 -0
  104. package/dist/components/zd-tag/ZdTag.js +34 -0
  105. package/dist/components/zd-text/ZdText.js +35 -0
  106. package/dist/components/zd-text-input/ZdTextInput.js +174 -0
  107. package/dist/components/zd-textarea/ZdTextarea.js +76 -0
  108. package/dist/components/zd-time/ZdTime.js +159 -0
  109. package/dist/components/zd-toggleable/ZdToggleable.js +13 -0
  110. package/dist/components/zd-tooltip/ZdTooltip.js +92 -0
  111. package/dist/components/zd-tree/ZdTree.js +315 -0
  112. package/dist/components/zd-tree/ZdTreeAfterTitle.js +17 -0
  113. package/dist/components/zd-tree/ZdTreeCheckbox.js +97 -0
  114. package/dist/components/zd-tree-grid/ZdTreeGrid.js +101 -0
  115. package/dist/components/zd-tree-grid/cell/ZdTreeGridCell.js +81 -0
  116. package/dist/components/zd-tree-grid/row/ZdTreeGridRow.js +85 -0
  117. package/dist/composables/cellSelection.js +37 -0
  118. package/dist/composables/columnDrag.js +82 -0
  119. package/dist/composables/columnResize.js +115 -0
  120. package/dist/composables/density.js +13 -0
  121. package/dist/composables/doubleClick.js +32 -0
  122. package/dist/composables/fixedColumns.js +106 -0
  123. package/dist/composables/gridColorVars.js +30 -0
  124. package/dist/composables/gridColumns.js +87 -0
  125. package/dist/composables/gridSelection.js +91 -0
  126. package/dist/composables/gridSorting.js +19 -0
  127. package/dist/composables/hasSlot.js +25 -0
  128. package/dist/composables/index.js +16 -0
  129. package/dist/composables/maska.js +36 -0
  130. package/dist/composables/tableNavigation.js +126 -0
  131. package/dist/composables/useIsMobile.js +8 -0
  132. package/dist/composables/useTableLayout.js +212 -0
  133. package/dist/composables/virtualScroll.js +92 -0
  134. package/dist/composables/watchUrl.js +14 -0
  135. package/dist/errors/index.js +3 -0
  136. package/dist/errors/not-provided.js +11 -0
  137. package/dist/errors/row-not-found.js +9 -0
  138. package/dist/errors/zeedhi-error.js +8 -0
  139. package/dist/index.js +49 -0
  140. package/dist/propsMixins/heightProps.js +17 -0
  141. package/dist/propsMixins/index.js +3 -0
  142. package/dist/propsMixins/interfaces.js +1 -0
  143. package/dist/propsMixins/widthProps.js +13 -0
  144. package/dist/utils/buildProps.js +3 -0
  145. package/dist/utils/fillHeight.js +18 -0
  146. package/dist/utils/icons/icons.js +28 -0
  147. package/dist/utils/index.js +6 -0
  148. package/dist/utils/isArrayOperation.js +4 -0
  149. package/dist/utils/logger/logger.js +7 -0
  150. package/dist/utils/mergeDictionaries.js +22 -0
  151. package/dist/utils/plugins/formatSizePlugin.js +6 -0
  152. package/dist/utils/plugins/getIconPlugin.js +11 -0
  153. package/dist/utils/plugins/index.js +4 -0
  154. package/dist/utils/plugins/styleObjectPlugin.js +13 -0
  155. package/dist/zd-vuetify.css +22062 -22295
  156. package/dist/zd-vuetify.js +9696 -13977
  157. package/package.json +8 -6
  158. package/src/components/index.ts +0 -27
  159. package/src/components/zd-date-input/ZdDateInput.ts +11 -9
  160. package/src/components/zd-date-input/ZdDateInput.vue +42 -46
  161. package/src/components/zd-date-range/ZdDateRange.ts +24 -23
  162. package/src/components/zd-date-range/ZdDateRange.vue +42 -54
  163. package/src/components/zd-month/ZdMonth.ts +0 -17
  164. package/src/components/zd-month/ZdMonth.vue +0 -1
  165. package/src/components/zd-text-input/ZdTextInput.ts +4 -0
  166. package/src/components/zd-text-input/ZdTextInput.vue +1 -0
  167. package/src/components/zd-time/ZdTime.ts +11 -50
  168. package/src/components/zd-time/ZdTime.vue +41 -29
  169. package/src/composables/index.ts +1 -1
  170. package/src/composables/useIsMobile.ts +9 -0
  171. package/src/errors/index.ts +1 -0
  172. package/src/index.ts +1 -0
  173. package/src/utils/index.ts +0 -1
  174. package/types/components/index.d.ts +80 -88
  175. package/types/components/tek-grid/TekGrid.d.ts +7258 -7258
  176. package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +129 -129
  177. package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +225 -225
  178. package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +2432 -2432
  179. package/types/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +65 -65
  180. package/types/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +9 -9
  181. package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +2920 -2920
  182. package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +32 -32
  183. package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +1892 -1892
  184. package/types/components/tek-grid/row/TekGridFooterRow.d.ts +90 -90
  185. package/types/components/tek-grid/row/TekGridGroupRow.d.ts +87 -87
  186. package/types/components/tooltip-overflow/ZdTooltipOverflow.d.ts +50 -50
  187. package/types/components/zd-activator-wrapper/ZdActivatorWrapper.d.ts +25 -25
  188. package/types/components/zd-alert/ZdAlert.d.ts +884 -884
  189. package/types/components/zd-badge/ZdBadge.d.ts +624 -624
  190. package/types/components/zd-breadcrumbs/ZdBreadcrumbs.d.ts +697 -697
  191. package/types/components/zd-button/ZdButton.d.ts +1158 -1158
  192. package/types/components/zd-button-group/ZdButtonGroup.d.ts +785 -785
  193. package/types/components/zd-card/ZdCard.d.ts +1028 -1028
  194. package/types/components/zd-carousel/ZdCarousel.d.ts +2007 -2007
  195. package/types/components/zd-checkbox/ZdCheckbox.d.ts +655 -642
  196. package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.d.ts +2040 -2010
  197. package/types/components/zd-chip/ZdChip.d.ts +1256 -1256
  198. package/types/components/zd-code-viewer/ZdCodeViewer.d.ts +791 -791
  199. package/types/components/zd-code-viewer/prism.d.ts +14 -14
  200. package/types/components/zd-col/ZdCol.d.ts +741 -741
  201. package/types/components/zd-collapse-card/ZdCollapseCard.d.ts +1583 -1583
  202. package/types/components/zd-component/ZdComponent.d.ts +104 -104
  203. package/types/components/zd-component/ZdComponentRender.d.ts +80 -80
  204. package/types/components/zd-container/ZdContainer.d.ts +722 -722
  205. package/types/components/zd-currency/ZdCurrency.d.ts +2068 -2024
  206. package/types/components/zd-date-input/ZdDateInput.d.ts +986 -960
  207. package/types/components/zd-date-range/ZdDateRange.d.ts +2305 -0
  208. package/types/components/zd-dialog/ZdDialog.d.ts +262 -262
  209. package/types/components/zd-divider/ZdDivider.d.ts +623 -623
  210. package/types/components/zd-dropdown/ZdDropdown.d.ts +836 -836
  211. package/types/components/zd-footer/ZdFooter.d.ts +1262 -1262
  212. package/types/components/zd-form/ZdForm.d.ts +118 -118
  213. package/types/components/zd-frame/ZdFrame.d.ts +138 -138
  214. package/types/components/zd-frame-page/ZdFramePage.d.ts +805 -805
  215. package/types/components/zd-grid/ZdGrid.d.ts +7304 -7304
  216. package/types/components/zd-grid/cell/ZdGridAction.d.ts +14 -14
  217. package/types/components/zd-grid/cell/ZdGridCell.d.ts +68 -68
  218. package/types/components/zd-grid/cell/ZdGridCellContent.d.ts +58 -58
  219. package/types/components/zd-grid/cell/ZdGridCheckbox.d.ts +53 -53
  220. package/types/components/zd-grid/column-header/ZdGridColumnHeader.d.ts +112 -112
  221. package/types/components/zd-grid/column-header/ZdGridHeaderIcon.d.ts +46 -46
  222. package/types/components/zd-grid/column-header/ZdGridHeaderRow.d.ts +165 -165
  223. package/types/components/zd-grid/column-header/ZdGridSort.d.ts +47 -47
  224. package/types/components/zd-grid/composables/grid-instance.d.ts +2085 -2085
  225. package/types/components/zd-grid/footer/ZdGridFooter.d.ts +2087 -2087
  226. package/types/components/zd-grid/helper/ZdGridHelper.d.ts +16 -16
  227. package/types/components/zd-grid/row/TableRow.d.ts +34 -34
  228. package/types/components/zd-grid/row/ZdGridRow.d.ts +105 -105
  229. package/types/components/zd-grid/toolbar/ZdGridToolbar.d.ts +2086 -2086
  230. package/types/components/zd-grid-editable/ZdGridEditable.d.ts +8663 -8663
  231. package/types/components/zd-grid-editable/cell/ZdGridEditableCell.d.ts +637 -637
  232. package/types/components/zd-grid-editable/row/ZdGridEditableRow.d.ts +126 -126
  233. package/types/components/zd-header/ZdHeader.d.ts +1320 -1320
  234. package/types/components/zd-icon/ZdIcon.d.ts +383 -383
  235. package/types/components/zd-image/ZdImage.d.ts +753 -753
  236. package/types/components/zd-increment/ZdIncrement.d.ts +2113 -2069
  237. package/types/components/zd-input/ZdInput.d.ts +204 -200
  238. package/types/components/zd-iterable/ZdIterable.d.ts +130 -130
  239. package/types/components/zd-iterable/ZdIterableNoData.d.ts +2089 -2089
  240. package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.d.ts +1645 -1645
  241. package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.d.ts +1081 -1081
  242. package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.d.ts +2807 -2763
  243. package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.d.ts +1653 -1627
  244. package/types/components/zd-iterable/zd-search/ZdSearch.d.ts +792 -766
  245. package/types/components/zd-iterable-component-render/ZdIterableComponentRender.d.ts +2484 -2484
  246. package/types/components/zd-layout/ZdLayout.d.ts +647 -647
  247. package/types/components/zd-list/ZdList.d.ts +1140 -1140
  248. package/types/components/zd-list/ZdListGroup.d.ts +1332 -1332
  249. package/types/components/zd-list/ZdListItem.d.ts +848 -848
  250. package/types/components/zd-loading/ZdLoading.d.ts +350 -350
  251. package/types/components/zd-login/ZdLogin.d.ts +1072 -1072
  252. package/types/components/zd-login/ZdLoginButton.d.ts +1913 -1910
  253. package/types/components/zd-main/ZdMain.d.ts +619 -619
  254. package/types/components/zd-master-detail/ZdMasterDetail.d.ts +684 -684
  255. package/types/components/zd-menu/ZdMenu.d.ts +4484 -4484
  256. package/types/components/zd-menu/ZdMenuButton.d.ts +1142 -1142
  257. package/types/components/zd-menu/ZdMenuGroup.d.ts +6286 -6286
  258. package/types/components/zd-menu/ZdMenuLink.d.ts +10437 -10437
  259. package/types/components/zd-menu/ZdMenuSeparator.d.ts +600 -600
  260. package/types/components/zd-modal/ZdModal.d.ts +10 -10
  261. package/types/components/zd-modal/ZdModalCloseButton.d.ts +1137 -1137
  262. package/types/components/zd-month/ZdMonth.d.ts +2260 -2217
  263. package/types/components/zd-number-input/ZdNumberInput.d.ts +2065 -2021
  264. package/types/components/zd-password/ZdPassword.d.ts +2058 -2014
  265. package/types/components/zd-progress/ZdProgress.d.ts +859 -859
  266. package/types/components/zd-radio/ZdRadio.d.ts +695 -682
  267. package/types/components/zd-row/ZdRow.d.ts +734 -734
  268. package/types/components/zd-select/ZdSelect.d.ts +321 -313
  269. package/types/components/zd-select-multiple/ZdSelectMultiple.d.ts +341 -333
  270. package/types/components/zd-svg-map/ZdSvgMap.d.ts +414 -414
  271. package/types/components/zd-switch/ZdSwitch.d.ts +1948 -1918
  272. package/types/components/zd-table/ZdTable.d.ts +1092 -1092
  273. package/types/components/zd-tabs/ZdTab.d.ts +674 -674
  274. package/types/components/zd-tabs/ZdTabItem.d.ts +268 -268
  275. package/types/components/zd-tabs/ZdTabs.d.ts +929 -929
  276. package/types/components/zd-tag/ZdTag.d.ts +613 -613
  277. package/types/components/zd-text/ZdText.d.ts +670 -670
  278. package/types/components/zd-text-input/ZdTextInput.d.ts +772 -746
  279. package/types/components/zd-textarea/ZdTextarea.d.ts +903 -877
  280. package/types/components/zd-time/ZdTime.d.ts +2271 -2224
  281. package/types/components/zd-toggleable/ZdToggleable.d.ts +203 -199
  282. package/types/components/zd-tooltip/ZdTooltip.d.ts +781 -781
  283. package/types/components/zd-tree/ZdTree.d.ts +1879 -1878
  284. package/types/components/zd-tree/ZdTreeAfterTitle.d.ts +28 -26
  285. package/types/components/zd-tree/ZdTreeCheckbox.d.ts +74 -74
  286. package/types/components/zd-tree-grid/ZdTreeGrid.d.ts +4178 -4178
  287. package/types/components/zd-tree-grid/cell/ZdTreeGridCell.d.ts +92 -92
  288. package/types/components/zd-tree-grid/row/ZdTreeGridRow.d.ts +124 -124
  289. package/types/composables/cellSelection.d.ts +281 -281
  290. package/types/composables/columnDrag.d.ts +9 -9
  291. package/types/composables/columnResize.d.ts +18 -18
  292. package/types/composables/density.d.ts +12 -12
  293. package/types/composables/doubleClick.d.ts +6 -6
  294. package/types/composables/fixedColumns.d.ts +14 -14
  295. package/types/composables/gridColorVars.d.ts +13 -13
  296. package/types/composables/gridColumns.d.ts +285 -285
  297. package/types/composables/gridSelection.d.ts +15 -15
  298. package/types/composables/gridSorting.d.ts +17 -17
  299. package/types/composables/hasSlot.d.ts +8 -8
  300. package/types/composables/index.d.ts +16 -16
  301. package/types/composables/maska.d.ts +16 -16
  302. package/types/composables/tableNavigation.d.ts +11 -11
  303. package/types/composables/useIsMobile.d.ts +3 -0
  304. package/types/composables/useTableLayout.d.ts +25 -25
  305. package/types/composables/virtualScroll.d.ts +26 -26
  306. package/types/composables/watchUrl.d.ts +8 -8
  307. package/types/errors/index.d.ts +3 -2
  308. package/types/errors/not-provided.d.ts +7 -7
  309. package/types/errors/row-not-found.d.ts +7 -7
  310. package/types/errors/zeedhi-error.d.ts +6 -6
  311. package/types/index.d.ts +22 -21
  312. package/types/propsMixins/heightProps.d.ts +17 -17
  313. package/types/propsMixins/index.d.ts +5 -5
  314. package/types/propsMixins/interfaces.d.ts +2 -2
  315. package/types/propsMixins/widthProps.d.ts +13 -13
  316. package/types/utils/buildProps.d.ts +2 -2
  317. package/types/utils/fillHeight.d.ts +1 -1
  318. package/types/utils/icons/icons.d.ts +5 -5
  319. package/types/utils/index.d.ts +6 -7
  320. package/types/utils/isArrayOperation.d.ts +2 -2
  321. package/types/utils/logger/logger.d.ts +3 -3
  322. package/types/utils/mergeDictionaries.d.ts +3 -3
  323. package/types/utils/plugins/formatSizePlugin.d.ts +1 -1
  324. package/types/utils/plugins/getIconPlugin.d.ts +1 -1
  325. package/types/utils/plugins/index.d.ts +4 -4
  326. package/types/utils/plugins/styleObjectPlugin.d.ts +1 -1
  327. package/rollup.config.prod.js +0 -26
  328. package/rollup.scss.config.js +0 -13
  329. package/src/components/tek-grid/TekGrid.ts +0 -320
  330. package/src/components/tek-grid/TekGrid.vue +0 -235
  331. package/src/components/tek-grid/column-filter/TekGridColumnFilter.ts +0 -243
  332. package/src/components/tek-grid/column-filter/TekGridColumnFilter.vue +0 -93
  333. package/src/components/tek-grid/column-header/TekGridHeaderRow.ts +0 -147
  334. package/src/components/tek-grid/column-header/TekGridHeaderRow.vue +0 -78
  335. package/src/components/tek-grid/columns-button/TekGridColumnsButton.ts +0 -97
  336. package/src/components/tek-grid/columns-button/TekGridColumnsButton.vue +0 -273
  337. package/src/components/tek-grid/columns-button/TekGridColumnsOptionsController.ts +0 -469
  338. package/src/components/tek-grid/columns-button/TekGridColumnsOptionsModal.ts +0 -512
  339. package/src/components/tek-grid/filter-button/TekGridFilterButton.ts +0 -46
  340. package/src/components/tek-grid/filter-button/TekGridFilterButton.vue +0 -28
  341. package/src/components/tek-grid/indentation/TekGridIndentation.ts +0 -21
  342. package/src/components/tek-grid/indentation/TekGridIndentation.vue +0 -33
  343. package/src/components/tek-grid/layout-options/TekGridLayoutOptions.ts +0 -117
  344. package/src/components/tek-grid/layout-options/TekGridLayoutOptions.vue +0 -172
  345. package/src/components/tek-grid/row/TekGridFooterRow.ts +0 -62
  346. package/src/components/tek-grid/row/TekGridFooterRow.vue +0 -64
  347. package/src/components/tek-grid/row/TekGridGroupRow.ts +0 -65
  348. package/src/components/tek-grid/row/TekGridGroupRow.vue +0 -65
  349. package/src/composables/useTableLayout.ts +0 -293
  350. package/src/utils/isArrayOperation.ts +0 -5
package/.package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeedhi/vuetify",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "Zeedhi Components based on Vuetify",
5
5
  "author": "Zeedhi <zeedhi@teknisa.com>",
6
6
  "license": "ISC",
@@ -13,17 +13,19 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "rollup -c rollup.config.js",
16
- "build:prod": "rollup -c rollup.config.prod.js",
16
+ "check-types": "tsc",
17
+ "types": "tsc --noEmit false",
18
+ "build:prod": "npm run build && npm run types",
17
19
  "clean": "rm -rf ./dist",
18
20
  "docs": "typedoc --out docs src/",
19
21
  "test": "vitest",
20
- "watch": "rollup -cw",
22
+ "watch": "npm run build -- --watch",
21
23
  "coverage": "vitest run --coverage"
22
24
  },
23
25
  "dependencies": {
24
- "@zeedhi/common": "^3.0.0",
25
- "@zeedhi/core": "^3.0.0",
26
- "@zeedhi/vue": "^3.0.5",
26
+ "@zeedhi/common": "file:../../../zeedhi-client-core/packages/common",
27
+ "@zeedhi/core": "file:../../../zeedhi-client-core/packages/core",
28
+ "@zeedhi/vue": "^3.0.7",
27
29
  "lodash.camelcase": "^4.3.0",
28
30
  "lodash.clonedeep": "^4.5.0",
29
31
  "lodash.debounce": "^4.0.*",
@@ -44,9 +46,9 @@
44
46
  "@types/prismjs": "1.26.*",
45
47
  "@types/sortablejs": "^1.15.8",
46
48
  "@vitest/coverage-v8": "^2.1.3",
47
- "sass": "*"
49
+ "sass": "^1.93.2"
48
50
  },
49
51
  "env": {
50
- "NODE_ENV": "production"
52
+ "NODE_ENV": "development"
51
53
  }
52
- }
54
+ }
@@ -0,0 +1,275 @@
1
+ import ZdTooltipOverflow from './tooltip-overflow/ZdTooltipOverflow.vue';
2
+ import ZdActivatorWrapper from './zd-activator-wrapper/ZdActivatorWrapper.vue';
3
+ import ZdAlert from './zd-alert/ZdAlert.vue';
4
+ import ZdBadge from './zd-badge/ZdBadge.vue';
5
+ import ZdBreadcrumbs from './zd-breadcrumbs/ZdBreadcrumbs.vue';
6
+ import ZdButtonGroup from './zd-button-group/ZdButtonGroup.vue';
7
+ import ZdButton from './zd-button/ZdButton.vue';
8
+ import ZdCard from './zd-card/ZdCard.vue';
9
+ import ZdCarousel from './zd-carousel/ZdCarousel.vue';
10
+ import ZdCheckboxMultiple from './zd-checkbox-multiple/ZdCheckboxMultiple.vue';
11
+ import ZdCheckbox from './zd-checkbox/ZdCheckbox.vue';
12
+ import ZdChip from './zd-chip/ZdChip.vue';
13
+ import ZdCodeViewer from './zd-code-viewer/ZdCodeViewer.vue';
14
+ import ZdCol from './zd-col/ZdCol.vue';
15
+ import ZdCollapseCard from './zd-collapse-card/ZdCollapseCard.vue';
16
+ import ZdContainer from './zd-container/ZdContainer.vue';
17
+ import ZdCurrency from './zd-currency/ZdCurrency.vue';
18
+ import ZdDateInput from './zd-date-input/ZdDateInput.vue';
19
+ import ZdDateRange from './zd-date-range/ZdDateRange.vue';
20
+ import ZdDialog from './zd-dialog/ZdDialog.vue';
21
+ import ZdDivider from './zd-divider/ZdDivider.vue';
22
+ import ZdDropdown from './zd-dropdown/ZdDropdown.vue';
23
+ import ZdFooter from './zd-footer/ZdFooter.vue';
24
+ import ZdForm from './zd-form/ZdForm.vue';
25
+ import ZdFramePage from './zd-frame-page/ZdFramePage.vue';
26
+ import ZdFrame from './zd-frame/ZdFrame.vue';
27
+ import ZdGridEditable from './zd-grid-editable/ZdGridEditable.vue';
28
+ import ZdGridEditableCell from './zd-grid-editable/cell/ZdGridEditableCell.vue';
29
+ import ZdGridEditableRow from './zd-grid-editable/row/ZdGridEditableRow.vue';
30
+ import ZdGrid from './zd-grid/ZdGrid.vue';
31
+ import ZdGridAction from './zd-grid/cell/ZdGridAction.vue';
32
+ import ZdGridCell from './zd-grid/cell/ZdGridCell.vue';
33
+ import ZdGridCellContent from './zd-grid/cell/ZdGridCellContent.vue';
34
+ import ZdGridCheckbox from './zd-grid/cell/ZdGridCheckbox.vue';
35
+ import ZdGridColumnHeader from './zd-grid/column-header/ZdGridColumnHeader.vue';
36
+ import ZdGridHeaderIcon from './zd-grid/column-header/ZdGridHeaderIcon.vue';
37
+ import ZdGridHeaderRow from './zd-grid/column-header/ZdGridHeaderRow.vue';
38
+ import ZdGridSort from './zd-grid/column-header/ZdGridSort.vue';
39
+ import ZdGridFooter from './zd-grid/footer/ZdGridFooter.vue';
40
+ import ZdGridHelper from './zd-grid/helper/ZdGridHelper.vue';
41
+ import TableRow from './zd-grid/row/TableRow.vue';
42
+ import ZdGridRow from './zd-grid/row/ZdGridRow.vue';
43
+ import ZdGridToolbar from './zd-grid/toolbar/ZdGridToolbar.vue';
44
+ import ZdHeader from './zd-header/ZdHeader.vue';
45
+ import ZdIcon from './zd-icon/ZdIcon.vue';
46
+ import ZdImage from './zd-image/ZdImage.vue';
47
+ import ZdIncrement from './zd-increment/ZdIncrement.vue';
48
+ import ZdIterableComponentRender from './zd-iterable-component-render/ZdIterableComponentRender.vue';
49
+ import ZdIterableNoData from './zd-iterable/ZdIterableNoData.vue';
50
+ import ZdIterableColumnsButton from './zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.vue';
51
+ import ZdIterablePageInfo from './zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.vue';
52
+ import ZdIterablePageSize from './zd-iterable/zd-iterable-page-size/ZdIterablePageSize.vue';
53
+ import ZdIterablePagination from './zd-iterable/zd-iterable-pagination/ZdIterablePagination.vue';
54
+ import ZdSearch from './zd-iterable/zd-search/ZdSearch.vue';
55
+ import ZdLayout from './zd-layout/ZdLayout.vue';
56
+ import ZdList from './zd-list/ZdList.vue';
57
+ import ZdListGroup from './zd-list/ZdListGroup.vue';
58
+ import ZdListItem from './zd-list/ZdListItem.vue';
59
+ import ZdLoading from './zd-loading/ZdLoading.vue';
60
+ import ZdLogin from './zd-login/ZdLogin.vue';
61
+ import ZdLoginButton from './zd-login/ZdLoginButton.vue';
62
+ import ZdMain from './zd-main/ZdMain.vue';
63
+ import ZdMasterDetail from './zd-master-detail/ZdMasterDetail.vue';
64
+ import ZdMenu from './zd-menu/ZdMenu.vue';
65
+ import ZdMenuButton from './zd-menu/ZdMenuButton.vue';
66
+ import ZdMenuGroup from './zd-menu/ZdMenuGroup.vue';
67
+ import ZdMenuLink from './zd-menu/ZdMenuLink.vue';
68
+ import ZdMenuSeparator from './zd-menu/ZdMenuSeparator.vue';
69
+ import ZdModal from './zd-modal/ZdModal.vue';
70
+ import ZdModalCloseButton from './zd-modal/ZdModalCloseButton.vue';
71
+ import ZdMonth from './zd-month/ZdMonth.vue';
72
+ import ZdNumberInput from './zd-number-input/ZdNumberInput.vue';
73
+ import ZdPassword from './zd-password/ZdPassword.vue';
74
+ import ZdProgress from './zd-progress/ZdProgress.vue';
75
+ import ZdRadio from './zd-radio/ZdRadio.vue';
76
+ import ZdRow from './zd-row/ZdRow.vue';
77
+ import ZdSelectMultiple from './zd-select-multiple/ZdSelectMultiple.vue';
78
+ import ZdSelect from './zd-select/ZdSelect.vue';
79
+ import ZdSvgMap from './zd-svg-map/ZdSvgMap.vue';
80
+ import ZdSwitch from './zd-switch/ZdSwitch.vue';
81
+ import ZdTable from './zd-table/ZdTable.vue';
82
+ import ZdTab from './zd-tabs/ZdTab.vue';
83
+ import ZdTabItem from './zd-tabs/ZdTabItem.vue';
84
+ import ZdTabs from './zd-tabs/ZdTabs.vue';
85
+ import ZdTag from './zd-tag/ZdTag.vue';
86
+ import ZdTextInput from './zd-text-input/ZdTextInput.vue';
87
+ import ZdText from './zd-text/ZdText.vue';
88
+ import ZdTextarea from './zd-textarea/ZdTextarea.vue';
89
+ import ZdTime from './zd-time/ZdTime.vue';
90
+ import ZdTooltip from './zd-tooltip/ZdTooltip.vue';
91
+ import ZdTreeGrid from './zd-tree-grid/ZdTreeGrid.vue';
92
+ import ZdTreeGridCell from './zd-tree-grid/cell/ZdTreeGridCell.vue';
93
+ import ZdTreeGridRow from './zd-tree-grid/row/ZdTreeGridRow.vue';
94
+ import ZdTree from './zd-tree/ZdTree.vue';
95
+ import ZdTreeAfterTitle from './zd-tree/ZdTreeAfterTitle.vue';
96
+ import ZdTreeCheckbox from './zd-tree/ZdTreeCheckbox.vue';
97
+ export * from './zd-component/ZdComponent';
98
+ export * from './zd-component/ZdComponentRender';
99
+ export * from './zd-chip/ZdChip';
100
+ export * from './zd-alert/ZdAlert';
101
+ export * from './zd-activator-wrapper/ZdActivatorWrapper';
102
+ export * from './zd-breadcrumbs/ZdBreadcrumbs';
103
+ export * from './zd-badge/ZdBadge';
104
+ export * from './zd-button/ZdButton';
105
+ export * from './zd-button-group/ZdButtonGroup';
106
+ export * from './zd-card/ZdCard';
107
+ export * from './zd-carousel/ZdCarousel';
108
+ export * from './zd-checkbox/ZdCheckbox';
109
+ export * from './zd-code-viewer/ZdCodeViewer';
110
+ export * from './zd-col/ZdCol';
111
+ export * from './zd-container/ZdContainer';
112
+ export * from './zd-date-input/ZdDateInput';
113
+ export * from './zd-divider/ZdDivider';
114
+ export * from './zd-form/ZdForm';
115
+ export * from './zd-footer/ZdFooter';
116
+ export * from './zd-frame-page/ZdFramePage';
117
+ export * from './zd-frame/ZdFrame';
118
+ export * from './zd-header/ZdHeader';
119
+ export * from './zd-icon/ZdIcon';
120
+ export * from './zd-image/ZdImage';
121
+ export * from './zd-iterable/ZdIterable';
122
+ export * from './zd-layout/ZdLayout';
123
+ export * from './zd-main/ZdMain';
124
+ export * from './zd-menu/ZdMenu';
125
+ export * from './zd-menu/ZdMenuButton';
126
+ export * from './zd-menu/ZdMenuGroup';
127
+ export * from './zd-menu/ZdMenuLink';
128
+ export * from './zd-menu/ZdMenuSeparator';
129
+ export * from './zd-radio/ZdRadio';
130
+ export * from './zd-row/ZdRow';
131
+ export * from './zd-table/ZdTable';
132
+ export * from './zd-tabs/ZdTab';
133
+ export * from './zd-tabs/ZdTabItem';
134
+ export * from './zd-tabs/ZdTabs';
135
+ export * from './zd-tag/ZdTag';
136
+ export * from './zd-text/ZdText';
137
+ export * from './zd-input/ZdInput';
138
+ export * from './zd-text-input/ZdTextInput';
139
+ export * from './zd-loading/ZdLoading';
140
+ export * from './zd-login/ZdLogin';
141
+ export * from './zd-login/ZdLoginButton';
142
+ export * from './zd-switch/ZdSwitch';
143
+ export * from './zd-textarea/ZdTextarea';
144
+ export * from './zd-tooltip/ZdTooltip';
145
+ export * from './zd-dropdown/ZdDropdown';
146
+ export * from './zd-select/ZdSelect';
147
+ export * from './zd-select-multiple/ZdSelectMultiple';
148
+ export * from './zd-dialog/ZdDialog';
149
+ export * from './zd-password/ZdPassword';
150
+ export * from './zd-modal/ZdModal';
151
+ export * from './zd-modal/ZdModalCloseButton';
152
+ export * from './zd-number-input/ZdNumberInput';
153
+ export * from './zd-list/ZdList';
154
+ export * from './zd-list/ZdListItem';
155
+ export * from './zd-grid/ZdGrid';
156
+ export * from './zd-collapse-card/ZdCollapseCard';
157
+ export * from './zd-grid-editable/ZdGridEditable';
158
+ export * from './zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton';
159
+ export * from './zd-progress/ZdProgress';
160
+ export * from './zd-svg-map/ZdSvgMap';
161
+ export * from './zd-checkbox-multiple/ZdCheckboxMultiple';
162
+ export * from './zd-master-detail/ZdMasterDetail';
163
+ export * from './zd-currency/ZdCurrency';
164
+ export * from './zd-time/ZdTime';
165
+ export * from './zd-month/ZdMonth';
166
+ export * from './zd-tree/ZdTree';
167
+ export * from './zd-tree/ZdTreeCheckbox';
168
+ export * from './zd-tree/ZdTreeAfterTitle';
169
+ export * from './zd-increment/ZdIncrement';
170
+ export * from './zd-currency/ZdCurrency';
171
+ export * from './zd-month/ZdMonth';
172
+ export * from './zd-date-range/ZdDateRange';
173
+ export const components = {
174
+ ZdAlert,
175
+ ZdActivatorWrapper,
176
+ ZdBreadcrumbs,
177
+ ZdBadge,
178
+ ZdButton,
179
+ ZdButtonGroup,
180
+ ZdCard,
181
+ ZdCarousel,
182
+ ZdCheckbox,
183
+ ZdContainer,
184
+ ZdDateInput,
185
+ ZdDialog,
186
+ ZdDivider,
187
+ ZdForm,
188
+ ZdChip,
189
+ ZdFooter,
190
+ ZdFrame,
191
+ ZdFramePage,
192
+ ZdCodeViewer,
193
+ ZdCol,
194
+ ZdHeader,
195
+ ZdIcon,
196
+ ZdImage,
197
+ ZdIterableComponentRender,
198
+ ZdLayout,
199
+ ZdMain,
200
+ ZdTable,
201
+ ZdTab,
202
+ ZdTabs,
203
+ ZdTabItem,
204
+ ZdMenu,
205
+ ZdMenuButton,
206
+ ZdMenuGroup,
207
+ ZdMenuLink,
208
+ ZdMenuSeparator,
209
+ ZdTag,
210
+ ZdText,
211
+ ZdRadio,
212
+ ZdRow,
213
+ ZdTextInput,
214
+ ZdTextarea,
215
+ ZdLoading,
216
+ ZdLogin,
217
+ ZdLoginButton,
218
+ ZdSwitch,
219
+ ZdTooltip,
220
+ ZdDropdown,
221
+ ZdSelect,
222
+ ZdSelectMultiple,
223
+ ZdPassword,
224
+ ZdModal,
225
+ ZdNumberInput,
226
+ ZdModalCloseButton,
227
+ ZdList,
228
+ ZdListItem,
229
+ ZdListGroup,
230
+ ZdGrid,
231
+ ZdGridColumnHeader,
232
+ ZdGridHelper,
233
+ ZdGridSort,
234
+ ZdGridHeaderRow,
235
+ ZdGridToolbar,
236
+ ZdIterableNoData,
237
+ ZdGridFooter,
238
+ ZdGridCell,
239
+ ZdGridCellContent,
240
+ ZdGridAction,
241
+ ZdTooltipOverflow,
242
+ ZdGridHeaderIcon,
243
+ ZdGridCheckbox,
244
+ ZdSearch,
245
+ ZdIterablePagination,
246
+ ZdIterablePageSize,
247
+ ZdIterablePageInfo,
248
+ ZdIterableColumnsButton,
249
+ ZdGridRow,
250
+ TableRow,
251
+ ZdGridEditable,
252
+ ZdGridEditableRow,
253
+ ZdGridEditableCell,
254
+ ZdTreeGrid,
255
+ ZdTreeGridCell,
256
+ ZdTreeGridRow,
257
+ ZdCollapseCard,
258
+ ZdProgress,
259
+ ZdSvgMap,
260
+ ZdCheckboxMultiple,
261
+ ZdMasterDetail,
262
+ ZdCurrency,
263
+ ZdMonth,
264
+ ZdTime,
265
+ ZdTree,
266
+ ZdTreeCheckbox,
267
+ ZdTreeAfterTitle,
268
+ ZdIncrement,
269
+ ZdDateRange,
270
+ };
271
+ export function RegisterComponents(app) {
272
+ for (const name in components) {
273
+ app.component(name, components[name]);
274
+ }
275
+ }
@@ -0,0 +1,287 @@
1
+ import { TekGrid, TekMemoryDatasource, TekRestDatasource, } from '@zeedhi/common';
2
+ import { Config, Utils } from '@zeedhi/core';
3
+ import cloneDeep from 'lodash.clonedeep';
4
+ import debounce from 'lodash.debounce';
5
+ import { computed, defineComponent, nextTick } from 'vue';
6
+ import { provideTableLayout, useGridColumns } from '../../composables';
7
+ import { buildProps } from '../../utils';
8
+ import { getRootElement, useCreateInstance } from '../zd-component/ZdComponent';
9
+ import { ZdGridEditableProps, useGridEditableInstance } from '../zd-grid-editable/ZdGridEditable';
10
+ export const TekGridProps = buildProps({
11
+ ...ZdGridEditableProps,
12
+ toolbarSlot: {
13
+ type: Array,
14
+ default: undefined,
15
+ },
16
+ title: {
17
+ type: String,
18
+ default: '',
19
+ },
20
+ addButton: {
21
+ type: [Boolean, String],
22
+ default: false,
23
+ },
24
+ deleteButton: {
25
+ type: [String, Boolean],
26
+ default: 'none',
27
+ },
28
+ columnsButton: {
29
+ type: [Boolean, String],
30
+ default: false,
31
+ },
32
+ columnsButtonIgnore: {
33
+ type: [Array, String],
34
+ default: () => [],
35
+ },
36
+ showEditButtons: {
37
+ type: [Boolean, String],
38
+ default: true,
39
+ },
40
+ filterButton: {
41
+ type: [Boolean, String],
42
+ default: false,
43
+ },
44
+ modalFilterProps: {
45
+ type: Object,
46
+ default: () => ({}),
47
+ },
48
+ showSearch: {
49
+ type: [Boolean, String],
50
+ default: true,
51
+ },
52
+ columnFilterButton: {
53
+ type: [Boolean, String],
54
+ default: false,
55
+ },
56
+ hideActions: {
57
+ type: [Boolean, String],
58
+ default: false,
59
+ },
60
+ actions: {
61
+ type: Array,
62
+ default: () => [],
63
+ },
64
+ dragColumns: {
65
+ type: [Boolean, String],
66
+ default: true,
67
+ },
68
+ resizeColumns: {
69
+ type: [Boolean, String],
70
+ default: true,
71
+ },
72
+ showLayoutOptions: {
73
+ type: [Boolean, String],
74
+ default: true,
75
+ },
76
+ showExport: {
77
+ type: [String, Boolean],
78
+ default: false,
79
+ },
80
+ showReload: {
81
+ type: [Boolean, String],
82
+ default: true,
83
+ },
84
+ exportConfig: {
85
+ type: Array,
86
+ },
87
+ exportActions: {
88
+ type: Array,
89
+ },
90
+ groupsOpened: {
91
+ type: [Boolean, String],
92
+ default: false,
93
+ },
94
+ showSummaryTotal: {
95
+ type: [Boolean, String],
96
+ default: true,
97
+ },
98
+ mainGrid: {
99
+ type: [Boolean, String],
100
+ default: true,
101
+ },
102
+ xlsDefaultType: {
103
+ type: String,
104
+ default: undefined,
105
+ },
106
+ showCheckboxAllFilter: {
107
+ type: [Boolean, String],
108
+ default: Config.gridShowCheckboxAllFilter,
109
+ },
110
+ toolbarOpened: {
111
+ type: [Boolean],
112
+ default: true,
113
+ },
114
+ defaultFilter: {
115
+ type: Object,
116
+ },
117
+ reportTitle: {
118
+ type: String,
119
+ },
120
+ editNewRowsOnly: {
121
+ type: [Boolean, String],
122
+ default: false,
123
+ },
124
+ });
125
+ const gridEditableComponent = defineComponent({
126
+ props: TekGridProps,
127
+ inheritAttrs: false,
128
+ setup(props, ctx) {
129
+ const { instance, root } = useCreateInstance(props, ctx, TekGrid);
130
+ const renderedData = computed(() => {
131
+ if (instance.isGrouped()) {
132
+ return instance.getGroupedData();
133
+ }
134
+ return instance.getData();
135
+ });
136
+ const visibleData = computed(() => {
137
+ return renderedData.value.filter((row) => instance.isItemVisible(row));
138
+ });
139
+ const gridEditableScope = useGridEditableInstance({ instance, root, renderedData: visibleData });
140
+ const rootEl = getRootElement(root);
141
+ const { visibleColumns } = useGridColumns({
142
+ instance,
143
+ rootEl,
144
+ visibilityCondition: (column) => column.isVisible && !column.grouped,
145
+ });
146
+ provideTableLayout({ instance, rootEl });
147
+ const debouncedDatasourceGet = debounce((instance) => {
148
+ const event = new Event('change', { cancelable: true });
149
+ instance.callEvent('beforeApplyFilter', { component: instance, event });
150
+ if (event.defaultPrevented)
151
+ return;
152
+ const { datasource } = instance;
153
+ if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
154
+ datasource.updateDynamicFilter();
155
+ }
156
+ else {
157
+ datasource.get();
158
+ }
159
+ }, 500);
160
+ const filter = computed(() => {
161
+ if (instance.datasource instanceof TekRestDatasource || instance.datasource instanceof TekMemoryDatasource) {
162
+ return instance.datasource.dynamicFilter;
163
+ }
164
+ const datasourceFilter = instance.datasource.filter;
165
+ const simpleFilter = {};
166
+ Object.keys(datasourceFilter).forEach((key) => {
167
+ simpleFilter[key] = [{ relation: 'AND', operation: 'CONTAINS', value: datasourceFilter[key] }];
168
+ });
169
+ return simpleFilter;
170
+ });
171
+ const setFilter = (newFilter) => {
172
+ if (Utils.isEqual(filter, newFilter))
173
+ return;
174
+ if (instance.datasource instanceof TekRestDatasource || instance.datasource instanceof TekMemoryDatasource) {
175
+ instance.datasource.dynamicFilter = cloneDeep(newFilter);
176
+ }
177
+ else {
178
+ const normalFilter = {};
179
+ Object.keys(newFilter).forEach((key) => {
180
+ if (!newFilter[key][0].value)
181
+ return;
182
+ normalFilter[key] = newFilter[key][0].value;
183
+ });
184
+ instance.datasource.filter = normalFilter;
185
+ }
186
+ debouncedDatasourceGet(instance);
187
+ instance.changeLayout();
188
+ };
189
+ const columnHasFilter = (columnName) => {
190
+ return instance.columnHasFilter(columnName);
191
+ };
192
+ const isRowVisible = (row, index) => {
193
+ return instance.isItemVisible(row) && gridEditableScope.shouldRender(index);
194
+ };
195
+ const isCurrentRowGroup = (row) => {
196
+ const { uniqueKey, currentRow } = instance.datasource;
197
+ return !!((row.group && row.groupValue === currentRow.groupValue) ||
198
+ (row[uniqueKey] && row[uniqueKey] === currentRow[uniqueKey]));
199
+ };
200
+ const isGroupSelectIndeterminate = (item) => {
201
+ let hasSelected = false;
202
+ let hasNotSelected = false;
203
+ const { uniqueKey } = instance.datasource;
204
+ item.children.forEach((child) => {
205
+ const idx = instance.selectedRows.findIndex((row) => child[uniqueKey] === row[uniqueKey]);
206
+ hasSelected = hasSelected || idx !== -1;
207
+ hasNotSelected = hasNotSelected || idx === -1;
208
+ });
209
+ return hasSelected && hasNotSelected;
210
+ };
211
+ const isGroupSelected = (item) => {
212
+ return item.children.every((child) => {
213
+ const { uniqueKey } = instance.datasource;
214
+ const idx = instance.selectedRows.findIndex((row) => child[uniqueKey] === row[uniqueKey]);
215
+ return idx !== -1;
216
+ });
217
+ };
218
+ const selectGroupRowClick = (row, isSelected, event) => {
219
+ nextTick(() => {
220
+ const rootElement = getRootElement(root);
221
+ instance.selectGroupClick(row, isSelected, event, rootElement.value);
222
+ });
223
+ };
224
+ const selectGroup = (item, event) => {
225
+ const { uniqueKey } = instance.datasource;
226
+ const isSelected = isGroupSelected(item);
227
+ if (!isSelected) {
228
+ // here we fetch the item from renderedData because vuetify isSelected checks for object reference
229
+ // so we need to find the item inside renderedData to call selectRow() with the correct reference
230
+ // https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VDataTable/composables/select.ts#L128
231
+ const items = item.children.map((child) => {
232
+ return renderedData.value.find((row) => child[uniqueKey] === row[uniqueKey]);
233
+ });
234
+ items.forEach((child) => {
235
+ if (!child)
236
+ return;
237
+ const idx = instance.selectedRows.findIndex((row) => child[uniqueKey] === row[uniqueKey]);
238
+ if (idx === -1) {
239
+ instance.selectRow(child, true);
240
+ }
241
+ });
242
+ }
243
+ else {
244
+ item.children.forEach((child) => {
245
+ const idx = instance.selectedRows.findIndex((row) => child[uniqueKey] === row[uniqueKey]);
246
+ if (idx !== -1) {
247
+ instance.selectRow(child, false);
248
+ }
249
+ });
250
+ }
251
+ selectGroupRowClick(item, !isSelected, event);
252
+ };
253
+ const openGroup = (item) => {
254
+ instance.openGroup(item);
255
+ };
256
+ const isGroup = (item) => {
257
+ return !!item.group;
258
+ };
259
+ const isFooter = (item) => {
260
+ return !!item.groupFooter;
261
+ };
262
+ const groupColumnNames = computed(() => {
263
+ return instance.columns.filter((column) => column.grouped).map((column) => column.name) || [];
264
+ });
265
+ return {
266
+ ...gridEditableScope,
267
+ instance,
268
+ root,
269
+ filter,
270
+ setFilter,
271
+ columnHasFilter,
272
+ visibleColumns,
273
+ isRowVisible,
274
+ isCurrentRowGroup,
275
+ isGroupSelectIndeterminate,
276
+ selectGroup,
277
+ isGroup,
278
+ openGroup,
279
+ renderedData,
280
+ isGroupSelected,
281
+ groupColumnNames,
282
+ isFooter,
283
+ visibleData,
284
+ };
285
+ },
286
+ });
287
+ export default gridEditableComponent;