@zeedhi/vuetify 3.0.6 → 3.0.7
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.
- package/dist/components/index.js +275 -0
- package/dist/components/tek-grid/TekGrid.js +287 -0
- package/dist/components/tek-grid/column-filter/TekGridColumnFilter.js +201 -0
- package/dist/components/tek-grid/column-header/TekGridHeaderRow.js +134 -0
- package/dist/components/tek-grid/columns-button/TekGridColumnsButton.js +79 -0
- package/dist/components/tek-grid/columns-button/TekGridColumnsOptionsController.js +416 -0
- package/dist/components/tek-grid/columns-button/TekGridColumnsOptionsModal.js +501 -0
- package/dist/components/tek-grid/filter-button/TekGridFilterButton.js +36 -0
- package/dist/components/tek-grid/indentation/TekGridIndentation.js +20 -0
- package/dist/components/tek-grid/layout-options/TekGridLayoutOptions.js +101 -0
- package/dist/components/tek-grid/row/TekGridFooterRow.js +57 -0
- package/dist/components/tek-grid/row/TekGridGroupRow.js +58 -0
- package/dist/components/tooltip-overflow/ZdTooltipOverflow.js +56 -0
- package/dist/components/zd-activator-wrapper/ZdActivatorWrapper.js +33 -0
- package/dist/components/zd-alert/ZdAlert.js +112 -0
- package/dist/components/zd-badge/ZdBadge.js +28 -0
- package/dist/components/zd-breadcrumbs/ZdBreadcrumbs.js +55 -0
- package/dist/components/zd-button/ZdButton.js +230 -0
- package/dist/components/zd-button-group/ZdButtonGroup.js +110 -0
- package/dist/components/zd-card/ZdCard.js +132 -0
- package/dist/components/zd-carousel/ZdCarousel.js +242 -0
- package/dist/components/zd-checkbox/ZdCheckbox.js +35 -0
- package/dist/components/zd-checkbox-multiple/ZdCheckboxMultiple.js +62 -0
- package/dist/components/zd-chip/ZdChip.js +94 -0
- package/dist/components/zd-code-viewer/ZdCodeViewer.js +55 -0
- package/dist/components/zd-code-viewer/prism.js +14 -0
- package/dist/components/zd-col/ZdCol.js +45 -0
- package/dist/components/zd-collapse-card/ZdCollapseCard.js +85 -0
- package/dist/components/zd-component/ZdComponent.js +259 -0
- package/dist/components/zd-component/ZdComponentRender.js +14 -0
- package/dist/components/zd-container/ZdContainer.js +42 -0
- package/dist/components/zd-currency/ZdCurrency.js +24 -0
- package/dist/components/zd-date-input/ZdDateInput.js +247 -0
- package/dist/components/zd-date-range/ZdDateRange.js +251 -0
- package/dist/components/zd-dialog/ZdDialog.js +34 -0
- package/dist/components/zd-divider/ZdDivider.js +28 -0
- package/dist/components/zd-dropdown/ZdDropdown.js +93 -0
- package/dist/components/zd-footer/ZdFooter.js +77 -0
- package/dist/components/zd-form/ZdForm.js +85 -0
- package/dist/components/zd-frame/ZdFrame.js +76 -0
- package/dist/components/zd-frame-page/ZdFramePage.js +21 -0
- package/dist/components/zd-grid/ZdGrid.js +284 -0
- package/dist/components/zd-grid/cell/ZdGridAction.js +12 -0
- package/dist/components/zd-grid/cell/ZdGridCell.js +59 -0
- package/dist/components/zd-grid/cell/ZdGridCellContent.js +59 -0
- package/dist/components/zd-grid/cell/ZdGridCheckbox.js +38 -0
- package/dist/components/zd-grid/column-header/ZdGridColumnHeader.js +70 -0
- package/dist/components/zd-grid/column-header/ZdGridHeaderIcon.js +31 -0
- package/dist/components/zd-grid/column-header/ZdGridHeaderRow.js +102 -0
- package/dist/components/zd-grid/column-header/ZdGridSort.js +32 -0
- package/dist/components/zd-grid/composables/grid-instance.js +12 -0
- package/dist/components/zd-grid/footer/ZdGridFooter.js +16 -0
- package/dist/components/zd-grid/helper/ZdGridHelper.js +12 -0
- package/dist/components/zd-grid/row/TableRow.js +25 -0
- package/dist/components/zd-grid/row/ZdGridRow.js +70 -0
- package/dist/components/zd-grid/toolbar/ZdGridToolbar.js +15 -0
- package/dist/components/zd-grid-editable/ZdGridEditable.js +174 -0
- package/dist/components/zd-grid-editable/cell/ZdGridEditableCell.js +135 -0
- package/dist/components/zd-grid-editable/row/ZdGridEditableRow.js +99 -0
- package/dist/components/zd-header/ZdHeader.js +111 -0
- package/dist/components/zd-icon/ZdIcon.js +63 -0
- package/dist/components/zd-image/ZdImage.js +48 -0
- package/dist/components/zd-increment/ZdIncrement.js +38 -0
- package/dist/components/zd-input/ZdInput.js +164 -0
- package/dist/components/zd-iterable/ZdIterable.js +38 -0
- package/dist/components/zd-iterable/ZdIterableNoData.js +20 -0
- package/dist/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.js +50 -0
- package/dist/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.js +21 -0
- package/dist/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.js +55 -0
- package/dist/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.js +36 -0
- package/dist/components/zd-iterable/zd-search/ZdSearch.js +42 -0
- package/dist/components/zd-iterable-component-render/ZdIterableComponentRender.js +108 -0
- package/dist/components/zd-layout/ZdLayout.js +41 -0
- package/dist/components/zd-list/ZdList.js +84 -0
- package/dist/components/zd-list/ZdListGroup.js +38 -0
- package/dist/components/zd-list/ZdListItem.js +66 -0
- package/dist/components/zd-loading/ZdLoading.js +61 -0
- package/dist/components/zd-login/ZdLogin.js +68 -0
- package/dist/components/zd-login/ZdLoginButton.js +28 -0
- package/dist/components/zd-main/ZdMain.js +33 -0
- package/dist/components/zd-master-detail/ZdMasterDetail.js +48 -0
- package/dist/components/zd-menu/ZdMenu.js +302 -0
- package/dist/components/zd-menu/ZdMenuButton.js +42 -0
- package/dist/components/zd-menu/ZdMenuGroup.js +66 -0
- package/dist/components/zd-menu/ZdMenuLink.js +63 -0
- package/dist/components/zd-menu/ZdMenuSeparator.js +26 -0
- package/dist/components/zd-modal/ZdModal.js +123 -0
- package/dist/components/zd-modal/ZdModalCloseButton.js +36 -0
- package/dist/components/zd-month/ZdMonth.js +31 -0
- package/dist/components/zd-number-input/ZdNumberInput.js +84 -0
- package/dist/components/zd-password/ZdPassword.js +23 -0
- package/dist/components/zd-progress/ZdProgress.js +52 -0
- package/dist/components/zd-radio/ZdRadio.js +56 -0
- package/dist/components/zd-row/ZdRow.js +43 -0
- package/dist/components/zd-select/ZdSelect.js +191 -0
- package/dist/components/zd-select-multiple/ZdSelectMultiple.js +326 -0
- package/dist/components/zd-svg-map/ZdSvgMap.js +211 -0
- package/dist/components/zd-switch/ZdSwitch.js +39 -0
- package/dist/components/zd-table/ZdTable.js +42 -0
- package/dist/components/zd-tabs/ZdTab.js +92 -0
- package/dist/components/zd-tabs/ZdTabItem.js +17 -0
- package/dist/components/zd-tabs/ZdTabs.js +84 -0
- package/dist/components/zd-tag/ZdTag.js +34 -0
- package/dist/components/zd-text/ZdText.js +35 -0
- package/dist/components/zd-text-input/ZdTextInput.js +174 -0
- package/dist/components/zd-textarea/ZdTextarea.js +76 -0
- package/dist/components/zd-time/ZdTime.js +159 -0
- package/dist/components/zd-toggleable/ZdToggleable.js +13 -0
- package/dist/components/zd-tooltip/ZdTooltip.js +92 -0
- package/dist/components/zd-tree/ZdTree.js +315 -0
- package/dist/components/zd-tree/ZdTreeAfterTitle.js +17 -0
- package/dist/components/zd-tree/ZdTreeCheckbox.js +97 -0
- package/dist/components/zd-tree-grid/ZdTreeGrid.js +101 -0
- package/dist/components/zd-tree-grid/cell/ZdTreeGridCell.js +81 -0
- package/dist/components/zd-tree-grid/row/ZdTreeGridRow.js +85 -0
- package/dist/composables/cellSelection.js +37 -0
- package/dist/composables/columnDrag.js +82 -0
- package/dist/composables/columnResize.js +115 -0
- package/dist/composables/density.js +13 -0
- package/dist/composables/doubleClick.js +32 -0
- package/dist/composables/fixedColumns.js +106 -0
- package/dist/composables/gridColorVars.js +30 -0
- package/dist/composables/gridColumns.js +87 -0
- package/dist/composables/gridSelection.js +91 -0
- package/dist/composables/gridSorting.js +19 -0
- package/dist/composables/hasSlot.js +25 -0
- package/dist/composables/index.js +16 -0
- package/dist/composables/maska.js +36 -0
- package/dist/composables/tableNavigation.js +126 -0
- package/dist/composables/useIsMobile.js +8 -0
- package/dist/composables/useTableLayout.js +212 -0
- package/dist/composables/virtualScroll.js +92 -0
- package/dist/composables/watchUrl.js +14 -0
- package/dist/errors/index.js +3 -0
- package/dist/errors/not-provided.js +11 -0
- package/dist/errors/row-not-found.js +9 -0
- package/dist/errors/zeedhi-error.js +8 -0
- package/dist/index.js +49 -0
- package/dist/propsMixins/heightProps.js +17 -0
- package/dist/propsMixins/index.js +3 -0
- package/dist/propsMixins/interfaces.js +1 -0
- package/dist/propsMixins/widthProps.js +13 -0
- package/dist/utils/buildProps.js +3 -0
- package/dist/utils/fillHeight.js +18 -0
- package/dist/utils/icons/icons.js +28 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/isArrayOperation.js +4 -0
- package/dist/utils/logger/logger.js +7 -0
- package/dist/utils/mergeDictionaries.js +22 -0
- package/dist/utils/plugins/formatSizePlugin.js +6 -0
- package/dist/utils/plugins/getIconPlugin.js +11 -0
- package/dist/utils/plugins/index.js +4 -0
- package/dist/utils/plugins/styleObjectPlugin.js +13 -0
- package/dist/zd-vuetify.css +22578 -22810
- package/dist/zd-vuetify.js +9696 -13977
- package/package.json +8 -6
- package/src/components/index.ts +0 -27
- package/src/components/zd-date-input/ZdDateInput.ts +11 -9
- package/src/components/zd-date-input/ZdDateInput.vue +42 -46
- package/src/components/zd-date-range/ZdDateRange.ts +24 -23
- package/src/components/zd-date-range/ZdDateRange.vue +42 -54
- package/src/components/zd-month/ZdMonth.ts +0 -17
- package/src/components/zd-month/ZdMonth.vue +0 -1
- package/src/components/zd-text-input/ZdTextInput.ts +4 -0
- package/src/components/zd-text-input/ZdTextInput.vue +1 -0
- package/src/components/zd-time/ZdTime.ts +11 -50
- package/src/components/zd-time/ZdTime.vue +41 -29
- package/src/composables/index.ts +1 -1
- package/src/composables/useIsMobile.ts +9 -0
- package/src/errors/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/utils/index.ts +0 -1
- package/types/components/index.d.ts +80 -88
- package/types/components/tek-grid/TekGrid.d.ts +7258 -7258
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +129 -129
- package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +225 -225
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +2432 -2432
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +65 -65
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +9 -9
- package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +2920 -2920
- package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +32 -32
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +1892 -1892
- package/types/components/tek-grid/row/TekGridFooterRow.d.ts +90 -90
- package/types/components/tek-grid/row/TekGridGroupRow.d.ts +87 -87
- package/types/components/tooltip-overflow/ZdTooltipOverflow.d.ts +50 -50
- package/types/components/zd-activator-wrapper/ZdActivatorWrapper.d.ts +25 -25
- package/types/components/zd-alert/ZdAlert.d.ts +884 -884
- package/types/components/zd-badge/ZdBadge.d.ts +624 -624
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.d.ts +697 -697
- package/types/components/zd-button/ZdButton.d.ts +1158 -1158
- package/types/components/zd-button-group/ZdButtonGroup.d.ts +785 -785
- package/types/components/zd-card/ZdCard.d.ts +1028 -1028
- package/types/components/zd-carousel/ZdCarousel.d.ts +2007 -2007
- package/types/components/zd-checkbox/ZdCheckbox.d.ts +655 -642
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.d.ts +2040 -2010
- package/types/components/zd-chip/ZdChip.d.ts +1256 -1256
- package/types/components/zd-code-viewer/ZdCodeViewer.d.ts +791 -791
- package/types/components/zd-code-viewer/prism.d.ts +14 -14
- package/types/components/zd-col/ZdCol.d.ts +741 -741
- package/types/components/zd-collapse-card/ZdCollapseCard.d.ts +1583 -1583
- package/types/components/zd-component/ZdComponent.d.ts +104 -104
- package/types/components/zd-component/ZdComponentRender.d.ts +80 -80
- package/types/components/zd-container/ZdContainer.d.ts +722 -722
- package/types/components/zd-currency/ZdCurrency.d.ts +2068 -2024
- package/types/components/zd-date-input/ZdDateInput.d.ts +986 -960
- package/types/components/zd-date-range/ZdDateRange.d.ts +2305 -0
- package/types/components/zd-dialog/ZdDialog.d.ts +262 -262
- package/types/components/zd-divider/ZdDivider.d.ts +623 -623
- package/types/components/zd-dropdown/ZdDropdown.d.ts +836 -836
- package/types/components/zd-footer/ZdFooter.d.ts +1262 -1262
- package/types/components/zd-form/ZdForm.d.ts +118 -118
- package/types/components/zd-frame/ZdFrame.d.ts +138 -138
- package/types/components/zd-frame-page/ZdFramePage.d.ts +805 -805
- package/types/components/zd-grid/ZdGrid.d.ts +7304 -7304
- package/types/components/zd-grid/cell/ZdGridAction.d.ts +14 -14
- package/types/components/zd-grid/cell/ZdGridCell.d.ts +68 -68
- package/types/components/zd-grid/cell/ZdGridCellContent.d.ts +58 -58
- package/types/components/zd-grid/cell/ZdGridCheckbox.d.ts +53 -53
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.d.ts +112 -112
- package/types/components/zd-grid/column-header/ZdGridHeaderIcon.d.ts +46 -46
- package/types/components/zd-grid/column-header/ZdGridHeaderRow.d.ts +165 -165
- package/types/components/zd-grid/column-header/ZdGridSort.d.ts +47 -47
- package/types/components/zd-grid/composables/grid-instance.d.ts +2085 -2085
- package/types/components/zd-grid/footer/ZdGridFooter.d.ts +2087 -2087
- package/types/components/zd-grid/helper/ZdGridHelper.d.ts +16 -16
- package/types/components/zd-grid/row/TableRow.d.ts +34 -34
- package/types/components/zd-grid/row/ZdGridRow.d.ts +105 -105
- package/types/components/zd-grid/toolbar/ZdGridToolbar.d.ts +2086 -2086
- package/types/components/zd-grid-editable/ZdGridEditable.d.ts +8663 -8663
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.d.ts +637 -637
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.d.ts +126 -126
- package/types/components/zd-header/ZdHeader.d.ts +1320 -1320
- package/types/components/zd-icon/ZdIcon.d.ts +383 -383
- package/types/components/zd-image/ZdImage.d.ts +753 -753
- package/types/components/zd-increment/ZdIncrement.d.ts +2113 -2069
- package/types/components/zd-input/ZdInput.d.ts +204 -200
- package/types/components/zd-iterable/ZdIterable.d.ts +130 -130
- package/types/components/zd-iterable/ZdIterableNoData.d.ts +2089 -2089
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.d.ts +1645 -1645
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.d.ts +1081 -1081
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.d.ts +2807 -2763
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.d.ts +1653 -1627
- package/types/components/zd-iterable/zd-search/ZdSearch.d.ts +792 -766
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.d.ts +2484 -2484
- package/types/components/zd-layout/ZdLayout.d.ts +647 -647
- package/types/components/zd-list/ZdList.d.ts +1140 -1140
- package/types/components/zd-list/ZdListGroup.d.ts +1332 -1332
- package/types/components/zd-list/ZdListItem.d.ts +848 -848
- package/types/components/zd-loading/ZdLoading.d.ts +350 -350
- package/types/components/zd-login/ZdLogin.d.ts +1072 -1072
- package/types/components/zd-login/ZdLoginButton.d.ts +1913 -1910
- package/types/components/zd-main/ZdMain.d.ts +619 -619
- package/types/components/zd-master-detail/ZdMasterDetail.d.ts +684 -684
- package/types/components/zd-menu/ZdMenu.d.ts +4484 -4484
- package/types/components/zd-menu/ZdMenuButton.d.ts +1142 -1142
- package/types/components/zd-menu/ZdMenuGroup.d.ts +6286 -6286
- package/types/components/zd-menu/ZdMenuLink.d.ts +10437 -10437
- package/types/components/zd-menu/ZdMenuSeparator.d.ts +600 -600
- package/types/components/zd-modal/ZdModal.d.ts +10 -10
- package/types/components/zd-modal/ZdModalCloseButton.d.ts +1137 -1137
- package/types/components/zd-month/ZdMonth.d.ts +2260 -2217
- package/types/components/zd-number-input/ZdNumberInput.d.ts +2065 -2021
- package/types/components/zd-password/ZdPassword.d.ts +2058 -2014
- package/types/components/zd-progress/ZdProgress.d.ts +859 -859
- package/types/components/zd-radio/ZdRadio.d.ts +695 -682
- package/types/components/zd-row/ZdRow.d.ts +734 -734
- package/types/components/zd-select/ZdSelect.d.ts +321 -313
- package/types/components/zd-select-multiple/ZdSelectMultiple.d.ts +341 -333
- package/types/components/zd-svg-map/ZdSvgMap.d.ts +414 -414
- package/types/components/zd-switch/ZdSwitch.d.ts +1948 -1918
- package/types/components/zd-table/ZdTable.d.ts +1092 -1092
- package/types/components/zd-tabs/ZdTab.d.ts +674 -674
- package/types/components/zd-tabs/ZdTabItem.d.ts +268 -268
- package/types/components/zd-tabs/ZdTabs.d.ts +929 -929
- package/types/components/zd-tag/ZdTag.d.ts +613 -613
- package/types/components/zd-text/ZdText.d.ts +670 -670
- package/types/components/zd-text-input/ZdTextInput.d.ts +772 -746
- package/types/components/zd-textarea/ZdTextarea.d.ts +903 -877
- package/types/components/zd-time/ZdTime.d.ts +2271 -2224
- package/types/components/zd-toggleable/ZdToggleable.d.ts +203 -199
- package/types/components/zd-tooltip/ZdTooltip.d.ts +781 -781
- package/types/components/zd-tree/ZdTree.d.ts +1879 -1878
- package/types/components/zd-tree/ZdTreeAfterTitle.d.ts +28 -26
- package/types/components/zd-tree/ZdTreeCheckbox.d.ts +74 -74
- package/types/components/zd-tree-grid/ZdTreeGrid.d.ts +4178 -4178
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.d.ts +92 -92
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.d.ts +124 -124
- package/types/composables/cellSelection.d.ts +281 -281
- package/types/composables/columnDrag.d.ts +9 -9
- package/types/composables/columnResize.d.ts +18 -18
- package/types/composables/density.d.ts +12 -12
- package/types/composables/doubleClick.d.ts +6 -6
- package/types/composables/fixedColumns.d.ts +14 -14
- package/types/composables/gridColorVars.d.ts +13 -13
- package/types/composables/gridColumns.d.ts +285 -285
- package/types/composables/gridSelection.d.ts +15 -15
- package/types/composables/gridSorting.d.ts +17 -17
- package/types/composables/hasSlot.d.ts +8 -8
- package/types/composables/index.d.ts +16 -16
- package/types/composables/maska.d.ts +16 -16
- package/types/composables/tableNavigation.d.ts +11 -11
- package/types/composables/useIsMobile.d.ts +3 -0
- package/types/composables/useTableLayout.d.ts +25 -25
- package/types/composables/virtualScroll.d.ts +26 -26
- package/types/composables/watchUrl.d.ts +8 -8
- package/types/errors/index.d.ts +3 -2
- package/types/errors/not-provided.d.ts +7 -7
- package/types/errors/row-not-found.d.ts +7 -7
- package/types/errors/zeedhi-error.d.ts +6 -6
- package/types/index.d.ts +22 -21
- package/types/propsMixins/heightProps.d.ts +17 -17
- package/types/propsMixins/index.d.ts +5 -5
- package/types/propsMixins/interfaces.d.ts +2 -2
- package/types/propsMixins/widthProps.d.ts +13 -13
- package/types/utils/buildProps.d.ts +2 -2
- package/types/utils/fillHeight.d.ts +1 -1
- package/types/utils/icons/icons.d.ts +5 -5
- package/types/utils/index.d.ts +6 -7
- package/types/utils/isArrayOperation.d.ts +2 -2
- package/types/utils/logger/logger.d.ts +3 -3
- package/types/utils/mergeDictionaries.d.ts +3 -3
- package/types/utils/plugins/formatSizePlugin.d.ts +1 -1
- package/types/utils/plugins/getIconPlugin.d.ts +1 -1
- package/types/utils/plugins/index.d.ts +4 -4
- package/types/utils/plugins/styleObjectPlugin.d.ts +1 -1
- package/.package.json +0 -52
- package/rollup.config.prod.js +0 -26
- package/rollup.scss.config.js +0 -13
- package/src/components/tek-grid/TekGrid.ts +0 -320
- package/src/components/tek-grid/TekGrid.vue +0 -235
- package/src/components/tek-grid/column-filter/TekGridColumnFilter.ts +0 -243
- package/src/components/tek-grid/column-filter/TekGridColumnFilter.vue +0 -93
- package/src/components/tek-grid/column-header/TekGridHeaderRow.ts +0 -147
- package/src/components/tek-grid/column-header/TekGridHeaderRow.vue +0 -78
- package/src/components/tek-grid/columns-button/TekGridColumnsButton.ts +0 -97
- package/src/components/tek-grid/columns-button/TekGridColumnsButton.vue +0 -273
- package/src/components/tek-grid/columns-button/TekGridColumnsOptionsController.ts +0 -469
- package/src/components/tek-grid/columns-button/TekGridColumnsOptionsModal.ts +0 -512
- package/src/components/tek-grid/filter-button/TekGridFilterButton.ts +0 -46
- package/src/components/tek-grid/filter-button/TekGridFilterButton.vue +0 -28
- package/src/components/tek-grid/indentation/TekGridIndentation.ts +0 -21
- package/src/components/tek-grid/indentation/TekGridIndentation.vue +0 -33
- package/src/components/tek-grid/layout-options/TekGridLayoutOptions.ts +0 -117
- package/src/components/tek-grid/layout-options/TekGridLayoutOptions.vue +0 -172
- package/src/components/tek-grid/row/TekGridFooterRow.ts +0 -62
- package/src/components/tek-grid/row/TekGridFooterRow.vue +0 -64
- package/src/components/tek-grid/row/TekGridGroupRow.ts +0 -65
- package/src/components/tek-grid/row/TekGridGroupRow.vue +0 -65
- package/src/composables/useTableLayout.ts +0 -293
- package/src/utils/isArrayOperation.ts +0 -5
|
@@ -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;
|