@zeedhi/vuetify 1.112.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zd-vuetify.css +1 -0
- package/dist/zd-vuetify.js +24569 -0
- package/package.json +29 -35
- package/rollup.config.prod.js +26 -0
- package/rollup.scss.config.js +9 -9
- package/src/components/index.ts +305 -0
- package/src/components/tek-grid/TekGrid.ts +320 -0
- package/src/components/tek-grid/TekGrid.vue +235 -0
- package/src/components/tek-grid/column-filter/TekGridColumnFilter.ts +243 -0
- package/src/components/tek-grid/column-filter/TekGridColumnFilter.vue +93 -0
- package/src/components/tek-grid/column-header/TekGridHeaderRow.ts +147 -0
- package/src/components/tek-grid/column-header/TekGridHeaderRow.vue +78 -0
- package/src/components/tek-grid/columns-button/TekGridColumnsButton.ts +97 -0
- package/src/components/tek-grid/columns-button/TekGridColumnsButton.vue +273 -0
- package/src/components/tek-grid/columns-button/TekGridColumnsOptionsController.ts +469 -0
- package/src/components/tek-grid/columns-button/TekGridColumnsOptionsModal.ts +512 -0
- package/src/components/tek-grid/filter-button/TekGridFilterButton.ts +46 -0
- package/src/components/tek-grid/filter-button/TekGridFilterButton.vue +28 -0
- package/src/components/tek-grid/indentation/TekGridIndentation.ts +21 -0
- package/src/components/tek-grid/indentation/TekGridIndentation.vue +33 -0
- package/src/components/tek-grid/layout-options/TekGridLayoutOptions.ts +117 -0
- package/src/components/tek-grid/layout-options/TekGridLayoutOptions.vue +172 -0
- package/src/components/tek-grid/row/TekGridFooterRow.ts +62 -0
- package/src/components/tek-grid/row/TekGridFooterRow.vue +64 -0
- package/src/components/tek-grid/row/TekGridGroupRow.ts +65 -0
- package/src/components/tek-grid/row/TekGridGroupRow.vue +65 -0
- package/src/components/tooltip-overflow/ZdTooltipOverflow.ts +63 -0
- package/src/components/tooltip-overflow/ZdTooltipOverflow.vue +63 -0
- package/src/components/zd-activator-wrapper/ZdActivatorWrapper.ts +37 -0
- package/src/components/zd-activator-wrapper/ZdActivatorWrapper.vue +16 -0
- package/src/components/zd-alert/ZdAlert.ts +132 -0
- package/src/components/zd-alert/ZdAlert.vue +84 -0
- package/src/components/zd-badge/ZdBadge.ts +32 -0
- package/src/components/zd-badge/ZdBadge.vue +73 -0
- package/src/components/zd-breadcrumbs/ZdBreadcrumbs.ts +61 -0
- package/src/components/zd-breadcrumbs/ZdBreadcrumbs.vue +53 -0
- package/src/components/zd-button/ZdButton.ts +249 -0
- package/src/components/zd-button/ZdButton.vue +135 -0
- package/src/components/zd-button-group/ZdButtonGroup.ts +113 -0
- package/src/components/zd-button-group/ZdButtonGroup.vue +66 -0
- package/src/components/zd-card/ZdCard.ts +139 -0
- package/src/components/zd-card/ZdCard.vue +113 -0
- package/src/components/zd-carousel/ZdCarousel.ts +268 -0
- package/src/components/zd-carousel/ZdCarousel.vue +243 -0
- package/src/components/zd-checkbox/ZdCheckbox.ts +47 -0
- package/src/components/zd-checkbox/ZdCheckbox.vue +50 -0
- package/src/components/zd-checkbox-multiple/ZdCheckboxMultiple.ts +69 -0
- package/src/components/zd-checkbox-multiple/ZdCheckboxMultiple.vue +146 -0
- package/src/components/zd-chip/ZdChip.ts +96 -0
- package/src/components/zd-chip/ZdChip.vue +131 -0
- package/src/components/zd-code-viewer/ZdCodeViewer.ts +65 -0
- package/src/components/zd-code-viewer/ZdCodeViewer.vue +187 -0
- package/src/components/zd-code-viewer/prism.ts +15 -0
- package/src/components/zd-col/ZdCol.ts +50 -0
- package/src/components/zd-col/ZdCol.vue +26 -0
- package/src/components/zd-collapse-card/ZdCollapseCard.ts +97 -0
- package/src/components/zd-collapse-card/ZdCollapseCard.vue +147 -0
- package/src/components/zd-component/ZdComponent.ts +324 -0
- package/src/components/zd-component/ZdComponentRender.ts +16 -0
- package/src/components/zd-container/ZdContainer.ts +47 -0
- package/src/components/zd-container/ZdContainer.vue +41 -0
- package/src/components/zd-currency/ZdCurrency.ts +28 -0
- package/src/components/zd-currency/ZdCurrency.vue +9 -0
- package/src/components/zd-date-input/ZdDateInput.ts +265 -0
- package/src/components/zd-date-input/ZdDateInput.vue +156 -0
- package/src/components/zd-dialog/ZdDialog.ts +39 -0
- package/src/components/zd-dialog/ZdDialog.vue +80 -0
- package/src/components/zd-divider/ZdDivider.ts +32 -0
- package/src/components/zd-divider/ZdDivider.vue +14 -0
- package/src/components/zd-dropdown/ZdDropdown.ts +98 -0
- package/src/components/zd-dropdown/ZdDropdown.vue +97 -0
- package/src/components/zd-footer/ZdFooter.ts +82 -0
- package/src/components/zd-footer/ZdFooter.vue +122 -0
- package/src/components/zd-form/ZdForm.ts +97 -0
- package/src/components/zd-form/ZdForm.vue +71 -0
- package/src/components/zd-frame/ZdFrame.ts +80 -0
- package/src/components/zd-frame/ZdFrame.vue +44 -0
- package/src/components/zd-frame-page/ZdFramePage.ts +25 -0
- package/src/components/zd-frame-page/ZdFramePage.vue +18 -0
- package/src/components/zd-grid/ZdGrid.ts +341 -0
- package/src/components/zd-grid/ZdGrid.vue +350 -0
- package/src/components/zd-grid/cell/ZdGridAction.ts +14 -0
- package/src/components/zd-grid/cell/ZdGridAction.vue +22 -0
- package/src/components/zd-grid/cell/ZdGridCell.ts +69 -0
- package/src/components/zd-grid/cell/ZdGridCell.vue +40 -0
- package/src/components/zd-grid/cell/ZdGridCellContent.ts +72 -0
- package/src/components/zd-grid/cell/ZdGridCellContent.vue +31 -0
- package/src/components/zd-grid/cell/ZdGridCheckbox.ts +41 -0
- package/src/components/zd-grid/cell/ZdGridCheckbox.vue +30 -0
- package/src/components/zd-grid/column-header/ZdGridColumnHeader.ts +78 -0
- package/src/components/zd-grid/column-header/ZdGridColumnHeader.vue +82 -0
- package/src/components/zd-grid/column-header/ZdGridHeaderIcon.ts +34 -0
- package/src/components/zd-grid/column-header/ZdGridHeaderIcon.vue +33 -0
- package/src/components/zd-grid/column-header/ZdGridHeaderRow.ts +114 -0
- package/src/components/zd-grid/column-header/ZdGridHeaderRow.vue +83 -0
- package/src/components/zd-grid/column-header/ZdGridSort.ts +34 -0
- package/src/components/zd-grid/column-header/ZdGridSort.vue +34 -0
- package/src/components/zd-grid/composables/grid-instance.ts +17 -0
- package/src/components/zd-grid/footer/ZdGridFooter.ts +19 -0
- package/src/components/zd-grid/footer/ZdGridFooter.vue +29 -0
- package/src/components/zd-grid/helper/ZdGridHelper.ts +14 -0
- package/src/components/zd-grid/helper/ZdGridHelper.vue +17 -0
- package/src/components/zd-grid/row/TableRow.ts +27 -0
- package/src/components/zd-grid/row/TableRow.vue +20 -0
- package/src/components/zd-grid/row/ZdGridRow.ts +78 -0
- package/src/components/zd-grid/row/ZdGridRow.vue +47 -0
- package/src/components/zd-grid/toolbar/ZdGridToolbar.ts +19 -0
- package/src/components/zd-grid/toolbar/ZdGridToolbar.vue +36 -0
- package/src/components/zd-grid-editable/ZdGridEditable.ts +235 -0
- package/src/components/zd-grid-editable/ZdGridEditable.vue +160 -0
- package/src/components/zd-grid-editable/cell/ZdGridEditableCell.ts +165 -0
- package/src/components/zd-grid-editable/cell/ZdGridEditableCell.vue +152 -0
- package/src/components/zd-grid-editable/row/ZdGridEditableRow.ts +114 -0
- package/src/components/zd-grid-editable/row/ZdGridEditableRow.vue +42 -0
- package/src/components/zd-header/ZdHeader.ts +119 -0
- package/src/components/zd-header/ZdHeader.vue +144 -0
- package/src/components/zd-icon/ZdIcon.ts +67 -0
- package/src/components/zd-icon/ZdIcon.vue +32 -0
- package/src/components/zd-image/ZdImage.ts +53 -0
- package/src/components/zd-image/ZdImage.vue +80 -0
- package/src/components/zd-increment/ZdIncrement.ts +42 -0
- package/src/components/zd-increment/ZdIncrement.vue +23 -0
- package/src/components/zd-input/ZdInput.ts +189 -0
- package/src/components/zd-iterable/ZdIterable.ts +40 -0
- package/src/components/zd-iterable/ZdIterableNoData.ts +23 -0
- package/src/components/zd-iterable/ZdIterableNoData.vue +53 -0
- package/src/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.ts +56 -0
- package/src/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.vue +50 -0
- package/src/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.ts +24 -0
- package/src/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.vue +21 -0
- package/src/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.ts +60 -0
- package/src/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.vue +17 -0
- package/src/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.ts +39 -0
- package/src/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.vue +42 -0
- package/src/components/zd-iterable/zd-search/ZdSearch.ts +46 -0
- package/src/components/zd-iterable/zd-search/ZdSearch.vue +18 -0
- package/src/components/zd-iterable-component-render/ZdIterableComponentRender.ts +115 -0
- package/src/components/zd-iterable-component-render/ZdIterableComponentRender.vue +152 -0
- package/src/components/zd-layout/ZdLayout.ts +46 -0
- package/src/components/zd-layout/ZdLayout.vue +22 -0
- package/src/components/zd-list/ZdList.scss +41 -0
- package/src/components/zd-list/ZdList.ts +89 -0
- package/src/components/zd-list/ZdList.vue +41 -0
- package/src/components/zd-list/ZdListGroup.ts +43 -0
- package/src/components/zd-list/ZdListGroup.vue +88 -0
- package/src/components/zd-list/ZdListItem.ts +71 -0
- package/src/components/zd-list/ZdListItem.vue +55 -0
- package/src/components/zd-loading/ZdLoading.ts +68 -0
- package/src/components/zd-loading/ZdLoading.vue +66 -0
- package/src/components/zd-login/ZdLogin.ts +73 -0
- package/src/components/zd-login/ZdLogin.vue +303 -0
- package/src/components/zd-login/ZdLoginButton.ts +32 -0
- package/src/components/zd-login/ZdLoginButton.vue +10 -0
- package/src/components/zd-main/ZdMain.ts +38 -0
- package/src/components/zd-main/ZdMain.vue +18 -0
- package/src/components/zd-master-detail/ZdMasterDetail.ts +53 -0
- package/src/components/zd-master-detail/ZdMasterDetail.vue +31 -0
- package/src/components/zd-menu/ZdMenu.ts +337 -0
- package/src/components/zd-menu/ZdMenu.vue +160 -0
- package/src/components/zd-menu/ZdMenuButton.ts +47 -0
- package/src/components/zd-menu/ZdMenuButton.vue +11 -0
- package/src/components/zd-menu/ZdMenuGroup.ts +73 -0
- package/src/components/zd-menu/ZdMenuGroup.vue +92 -0
- package/src/components/zd-menu/ZdMenuLink.ts +69 -0
- package/src/components/zd-menu/ZdMenuLink.vue +31 -0
- package/src/components/zd-menu/ZdMenuSeparator.ts +31 -0
- package/src/components/zd-menu/ZdMenuSeparator.vue +17 -0
- package/src/components/zd-modal/ZdModal.ts +146 -0
- package/src/components/zd-modal/ZdModal.vue +144 -0
- package/src/components/zd-modal/ZdModalCloseButton.ts +40 -0
- package/src/components/zd-modal/ZdModalCloseButton.vue +12 -0
- package/src/components/zd-month/ZdMonth.ts +55 -0
- package/src/components/zd-month/ZdMonth.vue +11 -0
- package/src/components/zd-number-input/ZdNumberInput.ts +96 -0
- package/src/components/zd-number-input/ZdNumberInput.vue +17 -0
- package/src/components/zd-password/ZdPassword.ts +27 -0
- package/src/components/zd-password/ZdPassword.vue +9 -0
- package/src/components/zd-progress/ZdProgress.ts +56 -0
- package/src/components/zd-progress/ZdProgress.vue +31 -0
- package/src/components/zd-radio/ZdRadio.ts +71 -0
- package/src/components/zd-radio/ZdRadio.vue +57 -0
- package/src/components/zd-row/ZdRow.ts +48 -0
- package/src/components/zd-row/ZdRow.vue +39 -0
- package/src/components/zd-select/ZdSelect.ts +222 -0
- package/src/components/zd-select/ZdSelect.vue +214 -0
- package/src/components/zd-select-multiple/ZdSelectMultiple.ts +389 -0
- package/src/components/zd-select-multiple/ZdSelectMultiple.vue +300 -0
- package/src/components/zd-svg-map/ZdSvgMap.ts +233 -0
- package/src/components/zd-svg-map/ZdSvgMap.vue +88 -0
- package/src/components/zd-switch/ZdSwitch.ts +45 -0
- package/src/components/zd-switch/ZdSwitch.vue +65 -0
- package/src/components/zd-table/ZdTable.ts +47 -0
- package/src/components/zd-table/ZdTable.vue +84 -0
- package/src/components/zd-tabs/ZdTab.ts +100 -0
- package/src/components/zd-tabs/ZdTab.vue +51 -0
- package/src/components/zd-tabs/ZdTabItem.ts +20 -0
- package/src/components/zd-tabs/ZdTabItem.vue +40 -0
- package/src/components/zd-tabs/ZdTabs.ts +92 -0
- package/src/components/zd-tabs/ZdTabs.vue +124 -0
- package/src/components/zd-tag/ZdTag.ts +39 -0
- package/src/components/zd-tag/ZdTag.vue +27 -0
- package/src/components/zd-text/ZdText.ts +40 -0
- package/src/components/zd-text/ZdText.vue +44 -0
- package/src/components/zd-text-input/ZdTextInput.ts +208 -0
- package/src/components/zd-text-input/ZdTextInput.vue +347 -0
- package/src/components/zd-textarea/ZdTextarea.ts +82 -0
- package/src/components/zd-textarea/ZdTextarea.vue +204 -0
- package/src/components/zd-time/ZdTime.ts +209 -0
- package/src/components/zd-time/ZdTime.vue +65 -0
- package/src/components/zd-toggleable/ZdToggleable.ts +16 -0
- package/src/components/zd-tooltip/ZdTooltip.ts +97 -0
- package/src/components/zd-tooltip/ZdTooltip.vue +34 -0
- package/src/components/zd-tree/ZdTree.ts +264 -0
- package/src/components/zd-tree/ZdTree.vue +335 -0
- package/src/components/zd-tree/ZdTreeAfterTitle.ts +21 -0
- package/src/components/zd-tree/ZdTreeAfterTitle.vue +25 -0
- package/src/components/zd-tree/ZdTreeCheckbox.ts +110 -0
- package/src/components/zd-tree/ZdTreeCheckbox.vue +43 -0
- package/src/components/zd-tree-grid/ZdTreeGrid.ts +127 -0
- package/src/components/zd-tree-grid/ZdTreeGrid.vue +199 -0
- package/src/components/zd-tree-grid/cell/ZdTreeGridCell.ts +93 -0
- package/src/components/zd-tree-grid/cell/ZdTreeGridCell.vue +133 -0
- package/src/components/zd-tree-grid/row/ZdTreeGridRow.ts +95 -0
- package/src/components/zd-tree-grid/row/ZdTreeGridRow.vue +48 -0
- package/src/composables/cellSelection.ts +49 -0
- package/src/composables/columnDrag.ts +105 -0
- package/src/composables/columnResize.ts +159 -0
- package/src/composables/density.ts +19 -0
- package/src/composables/doubleClick.ts +39 -0
- package/src/composables/fixedColumns.ts +131 -0
- package/src/composables/gridColorVars.ts +41 -0
- package/src/composables/gridColumns.ts +112 -0
- package/src/composables/gridSelection.ts +113 -0
- package/src/composables/gridSorting.ts +27 -0
- package/src/composables/hasSlot.ts +32 -0
- package/src/composables/index.ts +16 -0
- package/src/composables/maska.ts +47 -0
- package/src/composables/tableNavigation.ts +163 -0
- package/src/composables/useTableLayout.ts +293 -0
- package/src/composables/virtualScroll.ts +140 -0
- package/src/composables/watchUrl.ts +21 -0
- package/src/errors/index.ts +2 -0
- package/src/errors/not-provided.ts +12 -0
- package/src/errors/row-not-found.ts +10 -0
- package/src/errors/zeedhi-error.ts +8 -0
- package/src/index.ts +67 -0
- package/src/propsMixins/heightProps.ts +17 -0
- package/src/propsMixins/index.ts +6 -0
- package/src/propsMixins/interfaces.ts +3 -0
- package/src/propsMixins/widthProps.ts +13 -0
- package/src/shims-vue.d.ts +6 -0
- package/src/styles/_zd-input.scss +206 -0
- package/src/styles/index.scss +37 -0
- package/src/styles/moon-design-system.css +31 -0
- package/src/utils/buildProps.ts +5 -0
- package/src/utils/fillHeight.ts +17 -0
- package/src/utils/icons/icons.ts +36 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/isArrayOperation.ts +5 -0
- package/src/utils/logger/logger.ts +7 -0
- package/src/utils/mergeDictionaries.ts +27 -0
- package/src/utils/plugins/formatSizePlugin.ts +6 -0
- package/src/utils/plugins/getIconPlugin.ts +12 -0
- package/src/utils/plugins/index.ts +5 -0
- package/src/utils/plugins/plugins.d.ts +12 -0
- package/src/utils/plugins/styleObjectPlugin.ts +13 -0
- package/types/components/index.d.ts +87 -2
- package/types/components/tek-grid/TekGrid.d.ts +7258 -0
- package/types/components/tek-grid/TekGrid.ts.d.ts +7258 -0
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +129 -0
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.ts.d.ts +129 -0
- package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +225 -0
- package/types/components/tek-grid/column-header/TekGridHeaderRow.ts.d.ts +225 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +2432 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.ts.d.ts +2432 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +65 -0
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +9 -0
- package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +2920 -0
- package/types/components/tek-grid/filter-button/TekGridFilterButton.ts.d.ts +2920 -0
- package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +32 -0
- package/types/components/tek-grid/indentation/TekGridIndentation.ts.d.ts +32 -0
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +1892 -0
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.ts.d.ts +1892 -0
- package/types/components/tek-grid/row/TekGridFooterRow.d.ts +90 -0
- package/types/components/tek-grid/row/TekGridFooterRow.ts.d.ts +90 -0
- package/types/components/tek-grid/row/TekGridGroupRow.d.ts +87 -0
- package/types/components/tek-grid/row/TekGridGroupRow.ts.d.ts +87 -0
- package/types/components/tooltip-overflow/ZdTooltipOverflow.d.ts +50 -0
- package/types/components/tooltip-overflow/ZdTooltipOverflow.ts.d.ts +50 -0
- package/types/components/zd-activator-wrapper/ZdActivatorWrapper.d.ts +25 -0
- package/types/components/zd-activator-wrapper/ZdActivatorWrapper.ts.d.ts +25 -0
- package/types/components/zd-alert/ZdAlert.d.ts +882 -12
- package/types/components/zd-alert/ZdAlert.ts.d.ts +884 -0
- package/types/components/zd-badge/ZdBadge.d.ts +624 -11
- package/types/components/zd-badge/ZdBadge.ts.d.ts +624 -0
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.d.ts +692 -10
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.ts.d.ts +697 -0
- package/types/components/zd-button/ZdButton.d.ts +1151 -27
- package/types/components/zd-button/ZdButton.ts.d.ts +1158 -0
- package/types/components/zd-button-group/ZdButtonGroup.d.ts +782 -23
- package/types/components/zd-button-group/ZdButtonGroup.ts.d.ts +785 -0
- package/types/components/zd-card/ZdCard.d.ts +1024 -28
- package/types/components/zd-card/ZdCard.ts.d.ts +1028 -0
- package/types/components/zd-carousel/ZdCarousel.d.ts +2007 -70
- package/types/components/zd-carousel/ZdCarousel.ts.d.ts +2007 -0
- package/types/components/zd-checkbox/ZdCheckbox.d.ts +641 -9
- package/types/components/zd-checkbox/ZdCheckbox.ts.d.ts +642 -0
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.d.ts +2006 -14
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.ts.d.ts +2010 -0
- package/types/components/zd-chip/ZdChip.d.ts +1254 -21
- package/types/components/zd-chip/ZdChip.ts.d.ts +1256 -0
- package/types/components/zd-code-viewer/ZdCodeViewer.d.ts +791 -0
- package/types/components/zd-code-viewer/ZdCodeViewer.ts.d.ts +791 -0
- package/types/components/{zd-code-editor → zd-code-viewer}/prism.d.ts +7 -7
- package/types/components/zd-col/ZdCol.d.ts +740 -19
- package/types/components/zd-col/ZdCol.ts.d.ts +741 -0
- package/types/components/zd-collapse-card/ZdCollapseCard.d.ts +1580 -40
- package/types/components/zd-collapse-card/ZdCollapseCard.ts.d.ts +1583 -0
- package/types/components/zd-component/ZdComponent.d.ts +104 -43
- package/types/components/zd-component/ZdComponentRender.d.ts +80 -11
- package/types/components/zd-container/ZdContainer.d.ts +722 -19
- package/types/components/zd-container/ZdContainer.ts.d.ts +722 -0
- package/types/components/zd-currency/ZdCurrency.d.ts +2024 -10
- package/types/components/zd-currency/ZdCurrency.ts.d.ts +2024 -0
- package/types/components/zd-date-input/ZdDateInput.d.ts +960 -0
- package/types/components/zd-date-input/ZdDateInput.ts.d.ts +960 -0
- package/types/components/zd-dialog/ZdDialog.d.ts +251 -4
- package/types/components/zd-dialog/ZdDialog.ts.d.ts +262 -0
- package/types/components/zd-divider/ZdDivider.d.ts +623 -11
- package/types/components/zd-divider/ZdDivider.ts.d.ts +623 -0
- package/types/components/zd-dropdown/ZdDropdown.d.ts +835 -31
- package/types/components/zd-dropdown/ZdDropdown.ts.d.ts +836 -0
- package/types/components/zd-footer/ZdFooter.d.ts +1258 -29
- package/types/components/zd-footer/ZdFooter.ts.d.ts +1262 -0
- package/types/components/zd-form/ZdForm.d.ts +118 -24
- package/types/components/zd-form/ZdForm.ts.d.ts +118 -0
- package/types/components/zd-frame/ZdFrame.d.ts +138 -26
- package/types/components/zd-frame/ZdFrame.ts.d.ts +138 -0
- package/types/components/zd-frame-page/ZdFramePage.d.ts +804 -9
- package/types/components/zd-frame-page/ZdFramePage.ts.d.ts +805 -0
- package/types/components/zd-grid/ZdGrid.d.ts +7299 -120
- package/types/components/zd-grid/ZdGrid.ts.d.ts +7304 -0
- package/types/components/zd-grid/cell/ZdGridAction.d.ts +14 -0
- package/types/components/zd-grid/cell/ZdGridAction.ts.d.ts +14 -0
- package/types/components/zd-grid/cell/ZdGridCell.d.ts +68 -0
- package/types/components/zd-grid/cell/ZdGridCell.ts.d.ts +68 -0
- package/types/components/zd-grid/cell/ZdGridCellContent.d.ts +58 -0
- package/types/components/zd-grid/cell/ZdGridCellContent.ts.d.ts +58 -0
- package/types/components/zd-grid/cell/ZdGridCheckbox.d.ts +53 -0
- package/types/components/zd-grid/cell/ZdGridCheckbox.ts.d.ts +53 -0
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.d.ts +112 -0
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.ts.d.ts +112 -0
- package/types/components/zd-grid/column-header/ZdGridHeaderIcon.d.ts +46 -0
- package/types/components/zd-grid/column-header/ZdGridHeaderIcon.ts.d.ts +46 -0
- package/types/components/zd-grid/column-header/ZdGridHeaderRow.d.ts +165 -0
- package/types/components/zd-grid/column-header/ZdGridHeaderRow.ts.d.ts +165 -0
- package/types/components/zd-grid/column-header/ZdGridSort.d.ts +47 -0
- package/types/components/zd-grid/column-header/ZdGridSort.ts.d.ts +47 -0
- package/types/components/zd-grid/composables/grid-instance.d.ts +2085 -0
- package/types/components/zd-grid/footer/ZdGridFooter.d.ts +2087 -0
- package/types/components/zd-grid/footer/ZdGridFooter.ts.d.ts +2087 -0
- package/types/components/zd-grid/helper/ZdGridHelper.d.ts +16 -0
- package/types/components/zd-grid/helper/ZdGridHelper.ts.d.ts +16 -0
- package/types/components/zd-grid/row/TableRow.d.ts +34 -0
- package/types/components/zd-grid/row/TableRow.ts.d.ts +34 -0
- package/types/components/zd-grid/row/ZdGridRow.d.ts +105 -0
- package/types/components/zd-grid/row/ZdGridRow.ts.d.ts +105 -0
- package/types/components/zd-grid/toolbar/ZdGridToolbar.d.ts +2086 -0
- package/types/components/zd-grid/toolbar/ZdGridToolbar.ts.d.ts +2086 -0
- package/types/components/zd-grid-editable/ZdGridEditable.d.ts +8663 -0
- package/types/components/zd-grid-editable/ZdGridEditable.ts.d.ts +8663 -0
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.d.ts +637 -0
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.ts.d.ts +637 -0
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.d.ts +126 -0
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.ts.d.ts +126 -0
- package/types/components/zd-header/ZdHeader.d.ts +1316 -32
- package/types/components/zd-header/ZdHeader.ts.d.ts +1320 -0
- package/types/components/zd-icon/ZdIcon.d.ts +379 -15
- package/types/components/zd-icon/ZdIcon.ts.d.ts +383 -0
- package/types/components/zd-image/ZdImage.d.ts +748 -18
- package/types/components/zd-image/ZdImage.ts.d.ts +753 -0
- package/types/components/zd-increment/ZdIncrement.d.ts +2069 -12
- package/types/components/zd-increment/ZdIncrement.ts.d.ts +2069 -0
- package/types/components/zd-input/ZdInput.d.ts +200 -44
- package/types/components/zd-iterable/ZdIterable.d.ts +130 -43
- package/types/components/zd-iterable/ZdIterableNoData.d.ts +2089 -0
- package/types/components/zd-iterable/ZdIterableNoData.ts.d.ts +2089 -0
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.d.ts +1641 -20
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.ts.d.ts +1645 -0
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.d.ts +1081 -9
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.ts.d.ts +1081 -0
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.d.ts +2762 -19
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.ts.d.ts +2763 -0
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.d.ts +1625 -33
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.ts.d.ts +1627 -0
- package/types/components/zd-iterable/zd-search/ZdSearch.d.ts +763 -19
- package/types/components/zd-iterable/zd-search/ZdSearch.ts.d.ts +766 -0
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.d.ts +2480 -21
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.ts.d.ts +2484 -0
- package/types/components/zd-layout/ZdLayout.d.ts +647 -0
- package/types/components/zd-layout/ZdLayout.ts.d.ts +647 -0
- package/types/components/zd-list/ZdList.d.ts +1140 -27
- package/types/components/zd-list/ZdList.ts.d.ts +1140 -0
- package/types/components/zd-list/ZdListGroup.d.ts +1332 -12
- package/types/components/zd-list/ZdListGroup.ts.d.ts +1332 -0
- package/types/components/zd-list/ZdListItem.d.ts +848 -19
- package/types/components/zd-list/ZdListItem.ts.d.ts +848 -0
- package/types/components/zd-loading/ZdLoading.d.ts +350 -19
- package/types/components/zd-loading/ZdLoading.ts.d.ts +350 -0
- package/types/components/zd-login/ZdLogin.d.ts +1063 -32
- package/types/components/zd-login/ZdLogin.ts.d.ts +1072 -0
- package/types/components/zd-login/ZdLoginButton.d.ts +1908 -9
- package/types/components/zd-login/ZdLoginButton.ts.d.ts +1910 -0
- package/types/components/zd-main/ZdMain.d.ts +619 -0
- package/types/components/zd-main/ZdMain.ts.d.ts +619 -0
- package/types/components/zd-master-detail/ZdMasterDetail.d.ts +683 -16
- package/types/components/zd-master-detail/ZdMasterDetail.ts.d.ts +684 -0
- package/types/components/zd-menu/ZdMenu.d.ts +4480 -40
- package/types/components/zd-menu/ZdMenu.ts.d.ts +4484 -0
- package/types/components/zd-menu/ZdMenuButton.d.ts +1141 -12
- package/types/components/zd-menu/ZdMenuButton.ts.d.ts +1142 -0
- package/types/components/zd-menu/ZdMenuGroup.d.ts +6280 -13
- package/types/components/zd-menu/ZdMenuGroup.ts.d.ts +6286 -0
- package/types/components/zd-menu/ZdMenuLink.d.ts +10433 -14
- package/types/components/zd-menu/ZdMenuLink.ts.d.ts +10437 -0
- package/types/components/zd-menu/ZdMenuSeparator.d.ts +600 -9
- package/types/components/zd-menu/ZdMenuSeparator.ts.d.ts +600 -0
- package/types/components/zd-modal/ZdModal.d.ts +8 -34
- package/types/components/zd-modal/ZdModal.ts.d.ts +10 -0
- package/types/components/zd-modal/ZdModalCloseButton.d.ts +1136 -12
- package/types/components/zd-modal/ZdModalCloseButton.ts.d.ts +1137 -0
- package/types/components/zd-month/ZdMonth.d.ts +2217 -12
- package/types/components/zd-month/ZdMonth.ts.d.ts +2217 -0
- package/types/components/zd-number-input/ZdNumberInput.d.ts +2021 -0
- package/types/components/zd-number-input/ZdNumberInput.ts.d.ts +2021 -0
- package/types/components/zd-password/ZdPassword.d.ts +2011 -6
- package/types/components/zd-password/ZdPassword.ts.d.ts +2014 -0
- package/types/components/zd-progress/ZdProgress.d.ts +856 -13
- package/types/components/zd-progress/ZdProgress.ts.d.ts +859 -0
- package/types/components/zd-radio/ZdRadio.d.ts +677 -10
- package/types/components/zd-radio/ZdRadio.ts.d.ts +682 -0
- package/types/components/zd-row/ZdRow.d.ts +734 -18
- package/types/components/zd-row/ZdRow.ts.d.ts +734 -0
- package/types/components/zd-select/ZdSelect.d.ts +313 -88
- package/types/components/zd-select/ZdSelect.ts.d.ts +313 -0
- package/types/components/zd-select-multiple/ZdSelectMultiple.d.ts +330 -64
- package/types/components/zd-select-multiple/ZdSelectMultiple.ts.d.ts +333 -0
- package/types/components/zd-svg-map/ZdSvgMap.d.ts +410 -57
- package/types/components/zd-svg-map/ZdSvgMap.ts.d.ts +414 -0
- package/types/components/zd-switch/ZdSwitch.d.ts +1915 -8
- package/types/components/zd-switch/ZdSwitch.ts.d.ts +1918 -0
- package/types/components/zd-table/ZdTable.d.ts +1092 -17
- package/types/components/zd-table/ZdTable.ts.d.ts +1092 -0
- package/types/components/zd-tabs/ZdTab.d.ts +671 -9
- package/types/components/zd-tabs/ZdTab.ts.d.ts +674 -0
- package/types/components/zd-tabs/ZdTabItem.d.ts +268 -8
- package/types/components/zd-tabs/ZdTabItem.ts.d.ts +268 -0
- package/types/components/zd-tabs/ZdTabs.d.ts +926 -17
- package/types/components/zd-tabs/ZdTabs.ts.d.ts +929 -0
- package/types/components/zd-tag/ZdTag.d.ts +613 -11
- package/types/components/zd-tag/ZdTag.ts.d.ts +613 -0
- package/types/components/zd-text/ZdText.d.ts +668 -17
- package/types/components/zd-text/ZdText.ts.d.ts +670 -0
- package/types/components/zd-text-input/ZdTextInput.d.ts +739 -41
- package/types/components/zd-text-input/ZdTextInput.ts.d.ts +746 -0
- package/types/components/zd-textarea/ZdTextarea.d.ts +875 -22
- package/types/components/zd-textarea/ZdTextarea.ts.d.ts +877 -0
- package/types/components/zd-time/ZdTime.d.ts +2221 -36
- package/types/components/zd-time/ZdTime.ts.d.ts +2224 -0
- package/types/components/zd-toggleable/ZdToggleable.d.ts +199 -11
- package/types/components/zd-tooltip/ZdTooltip.d.ts +779 -21
- package/types/components/zd-tooltip/ZdTooltip.ts.d.ts +781 -0
- package/types/components/zd-tree/ZdTree.d.ts +1863 -40
- package/types/components/zd-tree/ZdTree.ts.d.ts +1878 -0
- package/types/components/zd-tree/ZdTreeAfterTitle.d.ts +26 -11
- package/types/components/zd-tree/ZdTreeAfterTitle.ts.d.ts +26 -0
- package/types/components/zd-tree/ZdTreeCheckbox.d.ts +72 -15
- package/types/components/zd-tree/ZdTreeCheckbox.ts.d.ts +74 -0
- package/types/components/zd-tree-grid/ZdTreeGrid.d.ts +4172 -26
- package/types/components/zd-tree-grid/ZdTreeGrid.ts.d.ts +4178 -0
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.d.ts +92 -0
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.ts.d.ts +92 -0
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.d.ts +124 -0
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.ts.d.ts +124 -0
- package/types/composables/cellSelection.d.ts +281 -0
- package/types/composables/columnDrag.d.ts +9 -0
- package/types/composables/columnResize.d.ts +18 -0
- package/types/composables/density.d.ts +12 -0
- package/types/composables/doubleClick.d.ts +6 -0
- package/types/composables/fixedColumns.d.ts +14 -0
- package/types/composables/gridColorVars.d.ts +13 -0
- package/types/composables/gridColumns.d.ts +285 -0
- package/types/composables/gridSelection.d.ts +15 -0
- package/types/composables/gridSorting.d.ts +17 -0
- package/types/composables/hasSlot.d.ts +8 -0
- package/types/composables/index.d.ts +16 -0
- package/types/composables/maska.d.ts +16 -0
- package/types/composables/tableNavigation.d.ts +11 -0
- package/types/composables/useTableLayout.d.ts +25 -0
- package/types/composables/virtualScroll.d.ts +26 -0
- package/types/composables/watchUrl.d.ts +8 -0
- package/types/errors/index.d.ts +2 -0
- package/types/errors/not-provided.d.ts +7 -0
- package/types/errors/row-not-found.d.ts +7 -0
- package/types/errors/zeedhi-error.d.ts +6 -0
- package/types/index.d.ts +19 -16
- package/types/propsMixins/heightProps.d.ts +17 -0
- package/types/propsMixins/index.d.ts +5 -0
- package/types/propsMixins/interfaces.d.ts +2 -0
- package/types/propsMixins/widthProps.d.ts +13 -0
- package/types/utils/buildProps.d.ts +2 -0
- package/types/utils/index.d.ts +7 -0
- package/types/utils/isArrayOperation.d.ts +2 -0
- package/types/utils/logger/logger.d.ts +3 -0
- package/types/utils/mergeDictionaries.d.ts +3 -0
- package/types/utils/plugins/formatSizePlugin.d.ts +1 -2
- package/types/utils/plugins/getIconPlugin.d.ts +1 -2
- package/types/utils/plugins/index.d.ts +2 -8
- package/types/utils/plugins/styleObjectPlugin.d.ts +1 -2
- package/vitest.config.ts +14 -0
- package/dist/zd-style.css +0 -147
- package/dist/zd-vuetify.esm.js +0 -64841
- package/dist/zd-vuetify.umd.js +0 -64951
- package/types/components/public.d.ts +0 -99
- package/types/components/zd-apex-chart/ZdApexChart.d.ts +0 -32
- package/types/components/zd-code-editor/ZdCodeEditor.d.ts +0 -23
- package/types/components/zd-dashboard/ZdDashboard.d.ts +0 -41
- package/types/components/zd-date/ZdDate.d.ts +0 -48
- package/types/components/zd-date/ZdDateRange.d.ts +0 -44
- package/types/components/zd-file-input/ZdFileInput.d.ts +0 -38
- package/types/components/zd-grid/ZdGridEditable.d.ts +0 -28
- package/types/components/zd-grid/subcomponents/ZdGridFooter.d.ts +0 -6
- package/types/components/zd-grid/subcomponents/ZdGridTop.d.ts +0 -6
- package/types/components/zd-grid/subcomponents/cell/ZdGridAction.d.ts +0 -15
- package/types/components/zd-grid/subcomponents/cell/ZdGridCell.d.ts +0 -24
- package/types/components/zd-grid/subcomponents/cell/ZdGridCellContent.d.ts +0 -28
- package/types/components/zd-grid/subcomponents/cell/ZdGridCellEdit.d.ts +0 -15
- package/types/components/zd-grid/subcomponents/cell/ZdGridCheckbox.d.ts +0 -15
- package/types/components/zd-grid/subcomponents/cell/ZdGridEditableCell.d.ts +0 -49
- package/types/components/zd-grid/subcomponents/cell/ZdGridEditableCellContent.d.ts +0 -52
- package/types/components/zd-grid/subcomponents/cell/ZdGridRow.d.ts +0 -12
- package/types/components/zd-grid/subcomponents/column-header/ZdGridColumnHeader.d.ts +0 -19
- package/types/components/zd-grid/subcomponents/column-header/ZdGridSortIcon.d.ts +0 -8
- package/types/components/zd-grid/subcomponents/helper/ZdGridHelper.d.ts +0 -4
- package/types/components/zd-iterable/ZdIterablePageComponent.d.ts +0 -10
- package/types/components/zd-iterable/zd-iterable-no-data/ZdIterableNoData.d.ts +0 -8
- package/types/components/zd-list/ZdListItemContent.d.ts +0 -8
- package/types/components/zd-number/ZdNumber.d.ts +0 -20
- package/types/components/zd-range-slider/ZdRangeSlider.d.ts +0 -39
- package/types/components/zd-select-tree/ZdSelectTree.d.ts +0 -48
- package/types/components/zd-select-tree-multiple/ZdSelectTreeMultiple.d.ts +0 -39
- package/types/components/zd-selectable-list/ZdSelectableList.d.ts +0 -23
- package/types/components/zd-speed-dial/ZdSpeedDial.d.ts +0 -18
- package/types/components/zd-steppers/ZdSteppers.d.ts +0 -16
- package/types/components/zd-tree-grid/ZdTreeGridEditable.d.ts +0 -21
- package/types/components/zd-tree-grid/cell/ZdTreeGridCellActionContent.d.ts +0 -13
- package/types/components/zd-tree-grid/cell/ZdTreeGridCellContent.d.ts +0 -13
- package/types/mixins/editable-mixin/EditableMixin.d.ts +0 -77
- package/types/mixins/index.d.ts +0 -4
- package/types/mixins/navigable-table-mixin/NavigableTableMixin.d.ts +0 -26
- package/types/mixins/themeable/Themeable.d.ts +0 -16
- package/types/utils/colors.d.ts +0 -2
- package/types/utils/decorators.d.ts +0 -3
- package/types/utils/get-activator.d.ts +0 -11
- package/types/utils/plugins/doubleClickPlugin.d.ts +0 -10
- package/types/utils/plugins/isDarkPlugin.d.ts +0 -3
- package/types/utils/plugins/isLightPlugin.d.ts +0 -3
- package/types/utils/plugins/isMobilePlugin.d.ts +0 -2
- package/types/utils/plugins/onVisiblePlugin.d.ts +0 -5
- package/types/utils/plugins/solidColorPlugin.d.ts +0 -2
- package/types/v-components/index.d.ts +0 -3
- package/types/v-components/v-menu/ZdVMenu.d.ts +0 -8
- package/types/v-components/v-tooltip/ZdVTooltip.d.ts +0 -8
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { GridColumn } from '@zeedhi/common';
|
|
2
|
+
import { IDictionary } from '@zeedhi/core';
|
|
3
|
+
import { PropType, defineComponent } from 'vue';
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
props: {
|
|
7
|
+
isSelected: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
isCurrentRow: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
selectable: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
selectionDisabled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
cellSelection: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
isCurrent: {
|
|
28
|
+
type: Function as PropType<(args: { row: IDictionary; column?: GridColumn }) => boolean>,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
columns: {
|
|
32
|
+
type: Array as PropType<GridColumn[]>,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
row: {
|
|
36
|
+
type: Object as PropType<IDictionary>,
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
fixedLeft: {
|
|
40
|
+
type: Object as PropType<IDictionary>,
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
fixedRight: {
|
|
44
|
+
type: Object as PropType<IDictionary>,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
emits: ['click', 'checkboxClick', 'focusin', 'cellFocus', 'cellClick'],
|
|
49
|
+
setup(props, { emit }) {
|
|
50
|
+
const click = (event: Event) => {
|
|
51
|
+
emit('click', event);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const checkboxClick = (event: Event) => {
|
|
55
|
+
emit('checkboxClick', event);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const focusin = (event: Event, column?: GridColumn) => {
|
|
59
|
+
emit('focusin', { event, row: props.row, column });
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const cellFocus = (event: Event, column: GridColumn) => {
|
|
63
|
+
emit('cellFocus', { event, row: props.row, column });
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const cellClick = (event: Event, column: GridColumn) => {
|
|
67
|
+
emit('cellClick', { event, row: props.row, column });
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
click,
|
|
72
|
+
focusin,
|
|
73
|
+
checkboxClick,
|
|
74
|
+
cellFocus,
|
|
75
|
+
cellClick,
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table-row
|
|
3
|
+
:isSelected="isSelected"
|
|
4
|
+
:isCurrentRow="isCurrentRow"
|
|
5
|
+
@click="click($event)"
|
|
6
|
+
>
|
|
7
|
+
<zd-grid-checkbox
|
|
8
|
+
v-if="selectable"
|
|
9
|
+
:disabled="selectionDisabled"
|
|
10
|
+
:isSelected="isSelected"
|
|
11
|
+
:cellSelection="cellSelection"
|
|
12
|
+
:isCurrent="isCurrent({ row })"
|
|
13
|
+
@focusin="focusin($event)"
|
|
14
|
+
@click.stop="checkboxClick($event)"
|
|
15
|
+
/>
|
|
16
|
+
<zd-grid-cell
|
|
17
|
+
v-for="(column, index) in columns" :key="column.name"
|
|
18
|
+
:row="row"
|
|
19
|
+
:column="column"
|
|
20
|
+
:cssClass="[
|
|
21
|
+
{
|
|
22
|
+
'zd-grid__cell--fixed': column.fixed,
|
|
23
|
+
'zd-grid__action-cell--fixed': column.actionFixed,
|
|
24
|
+
},
|
|
25
|
+
]"
|
|
26
|
+
:cssStyle="[{
|
|
27
|
+
left: column.fixed ? fixedLeft[column.name] : 'unset',
|
|
28
|
+
right: column.actionFixed ? fixedRight[column.name] : 'unset',
|
|
29
|
+
}]"
|
|
30
|
+
:cellSelection="cellSelection"
|
|
31
|
+
:isCurrent="isCurrent({ row, column })"
|
|
32
|
+
v-memo="[row, column, fixedLeft, fixedRight, cellSelection, isCurrent({ row, column })]"
|
|
33
|
+
@focus="cellFocus($event, column)"
|
|
34
|
+
@focusin="focusin($event, column)"
|
|
35
|
+
@click="cellClick($event, column)"
|
|
36
|
+
>
|
|
37
|
+
<template #prepend>
|
|
38
|
+
<slot name="cell-prepend" :index="index"></slot>
|
|
39
|
+
</template>
|
|
40
|
+
</zd-grid-cell>
|
|
41
|
+
</table-row>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script lang="ts" src="./ZdGridRow"></script>
|
|
45
|
+
|
|
46
|
+
<style lang="scss">
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useHasSlot } from 'packages/vuetify/src/composables/hasSlot';
|
|
2
|
+
import { defineComponent } from 'vue';
|
|
3
|
+
import { useGridInstance } from '../composables/grid-instance';
|
|
4
|
+
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
props: {},
|
|
7
|
+
setup() {
|
|
8
|
+
const slots = useHasSlot();
|
|
9
|
+
|
|
10
|
+
const hasDefaultSlot = !!slots.default?.hasContent;
|
|
11
|
+
|
|
12
|
+
const instance = useGridInstance();
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
hasDefaultSlot,
|
|
16
|
+
instance,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="instance.toolbarSlot.length || hasDefaultSlot"
|
|
4
|
+
:id="instance.name + '-top'"
|
|
5
|
+
ref="header"
|
|
6
|
+
class="zd-grid__toolbar"
|
|
7
|
+
>
|
|
8
|
+
<div class="zd-grid__toolbar-content">
|
|
9
|
+
<component v-for="(child, index) in instance.toolbarSlot"
|
|
10
|
+
:key="index"
|
|
11
|
+
:is="child.component"
|
|
12
|
+
:parent="instance"
|
|
13
|
+
v-bind="child"
|
|
14
|
+
></component>
|
|
15
|
+
<slot></slot>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" src="./ZdGridToolbar.ts"></script>
|
|
21
|
+
|
|
22
|
+
<style lang="scss">
|
|
23
|
+
.zd-grid__toolbar {
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
margin-bottom: var(--spacing-4);
|
|
27
|
+
align-items: center;
|
|
28
|
+
flex: 0 0 auto;
|
|
29
|
+
|
|
30
|
+
&-content {
|
|
31
|
+
width: 100%;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { GridColumnEditable, GridEditable, IGridEditable, Input, Toggleable } from '@zeedhi/common';
|
|
2
|
+
import { IDictionary, InstanceNotFoundError } from '@zeedhi/core';
|
|
3
|
+
import {
|
|
4
|
+
ComponentPublicInstance,
|
|
5
|
+
ComputedRef,
|
|
6
|
+
PropType,
|
|
7
|
+
ShallowRef,
|
|
8
|
+
UnwrapNestedRefs,
|
|
9
|
+
UnwrapRef,
|
|
10
|
+
defineComponent,
|
|
11
|
+
ref,
|
|
12
|
+
watch,
|
|
13
|
+
} from 'vue';
|
|
14
|
+
import { useDoubleClick } from '../../composables';
|
|
15
|
+
import { RowNotFoundError } from '../../errors';
|
|
16
|
+
import { buildProps } from '../../utils';
|
|
17
|
+
import { getRootElement, useCreateInstance } from '../zd-component/ZdComponent';
|
|
18
|
+
import { ZdGridProps, useGridInstance } from '../zd-grid/ZdGrid';
|
|
19
|
+
|
|
20
|
+
export const ZdGridEditableProps = buildProps({
|
|
21
|
+
...ZdGridProps,
|
|
22
|
+
doubleClickEdit: {
|
|
23
|
+
type: [String, Boolean] as PropType<boolean | string>,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
editingNewRows: {
|
|
27
|
+
type: [Boolean, String] as PropType<boolean | string>,
|
|
28
|
+
default: false,
|
|
29
|
+
},
|
|
30
|
+
singleEdit: {
|
|
31
|
+
type: [Boolean, String] as PropType<boolean | string>,
|
|
32
|
+
default: false,
|
|
33
|
+
},
|
|
34
|
+
showCancelColumn: {
|
|
35
|
+
type: [Boolean, String] as PropType<boolean | string>,
|
|
36
|
+
default: false,
|
|
37
|
+
},
|
|
38
|
+
canEditRow: {
|
|
39
|
+
type: [Function, String],
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export function useGridEditableInstance({
|
|
44
|
+
instance,
|
|
45
|
+
root,
|
|
46
|
+
renderedData,
|
|
47
|
+
}: {
|
|
48
|
+
instance: UnwrapNestedRefs<IGridEditable>;
|
|
49
|
+
root: Readonly<ShallowRef<ComponentPublicInstance | null>>;
|
|
50
|
+
renderedData?: ComputedRef<IDictionary<any>[]>;
|
|
51
|
+
}) {
|
|
52
|
+
const rootEl = getRootElement(root);
|
|
53
|
+
|
|
54
|
+
const gridScope = useGridInstance({ instance, root, renderedData });
|
|
55
|
+
|
|
56
|
+
const { doubleClick } = useDoubleClick();
|
|
57
|
+
|
|
58
|
+
const editingCell = ref<{ key: string | number; column?: string } | null>(null);
|
|
59
|
+
|
|
60
|
+
const isEditing = ({ row, column }: { row: IDictionary; column?: UnwrapRef<GridColumnEditable> }) => {
|
|
61
|
+
if (!instance.singleEdit) return instance.editing;
|
|
62
|
+
|
|
63
|
+
const rowCheck = editingCell.value?.key === instance.getRowKey(row);
|
|
64
|
+
if (!column) return rowCheck;
|
|
65
|
+
|
|
66
|
+
return rowCheck && editingCell.value?.column === column.name;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
watch(
|
|
70
|
+
() => instance.editing,
|
|
71
|
+
() => {
|
|
72
|
+
if (!instance.editing) {
|
|
73
|
+
editingCell.value = null;
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const isCellEditable = (row: IDictionary, column: GridColumnEditable) => {
|
|
79
|
+
const cellsApplied = instance.getAppliedConditions({ row, column });
|
|
80
|
+
const canEdit = instance.getCanEditRow(row);
|
|
81
|
+
return (cellsApplied.editable ?? column.editable) && (canEdit ?? true);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const enterEdit = ({ row, column }: { row: IDictionary; column: GridColumnEditable }) => {
|
|
85
|
+
if (isEditing({ row, column })) return;
|
|
86
|
+
|
|
87
|
+
const key = instance.getRowKey(row);
|
|
88
|
+
editingCell.value = { key, column: column.name };
|
|
89
|
+
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
const key = instance.getRowKey(row);
|
|
92
|
+
|
|
93
|
+
try {
|
|
94
|
+
const component = instance.getComponent<Input>(String(key), column.name);
|
|
95
|
+
component?.setFocus();
|
|
96
|
+
|
|
97
|
+
if (component instanceof Toggleable) {
|
|
98
|
+
component.toggleValue();
|
|
99
|
+
component.change();
|
|
100
|
+
}
|
|
101
|
+
} catch (e) {
|
|
102
|
+
if (!(e instanceof InstanceNotFoundError)) throw e;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const viewEnterEdit = (key: string, columnName: string) => {
|
|
108
|
+
editingCell.value = { key, column: columnName };
|
|
109
|
+
const row = instance.findRow(key);
|
|
110
|
+
|
|
111
|
+
if (!row) {
|
|
112
|
+
throw new RowNotFoundError(key);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const column = instance.getColumn(columnName);
|
|
116
|
+
instance.inlineEdit(row, column, undefined, rootEl.value);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
instance.setViewEnterEdit(viewEnterEdit);
|
|
120
|
+
|
|
121
|
+
let mousedownCalled = false;
|
|
122
|
+
|
|
123
|
+
const cellClick = ({ row, column, event }: { row: IDictionary<any>; column: GridColumnEditable; event: Event }) => {
|
|
124
|
+
mousedownCalled = false;
|
|
125
|
+
|
|
126
|
+
if (!instance.doubleClickEdit || !column.editable) {
|
|
127
|
+
callCellClick(row, column, event);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
doubleClick(
|
|
132
|
+
() => instance.cellClickEvent(row, column, event, rootEl.value),
|
|
133
|
+
() => callCellClick(row, column, event),
|
|
134
|
+
event,
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const callCellClick = (row: IDictionary<any>, column: GridColumnEditable, event: Event) => {
|
|
139
|
+
if (isCellEditable(row, column)) enterEdit({ row, column });
|
|
140
|
+
|
|
141
|
+
instance.cellClick(row, column, event, rootEl.value);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
const cellFocus = ({ row, column }: { row: IDictionary; column: GridColumnEditable }) => {
|
|
145
|
+
instance.selectCell(row, column);
|
|
146
|
+
|
|
147
|
+
if (!isCellEditable(row, column)) return;
|
|
148
|
+
|
|
149
|
+
if (mousedownCalled && instance.singleEdit) {
|
|
150
|
+
mousedownCalled = false;
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
enterEdit({ row, column });
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
const rowClick = (row: IDictionary<any>, event: Event) => {
|
|
158
|
+
instance.rowClick(row, event, gridScope.rootEl.value);
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const cellEnterEdit = ({ row, column }: { row: IDictionary<any>; column: GridColumnEditable }) => {
|
|
162
|
+
instance.inlineEdit(row, column, undefined, rootEl.value);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const updateSortBy = (sortBy: { key: string; order: 'asc' | 'desc' }[]) => {
|
|
166
|
+
if (instance.editing) return;
|
|
167
|
+
|
|
168
|
+
instance.changeOrder(sortBy);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const cellKeydown = ({
|
|
172
|
+
row,
|
|
173
|
+
column,
|
|
174
|
+
event,
|
|
175
|
+
}: { event: KeyboardEvent; row: IDictionary; column: GridColumnEditable }) => {
|
|
176
|
+
if (isEditing({ row, column })) return;
|
|
177
|
+
|
|
178
|
+
if (pressedControlKey(event)) return;
|
|
179
|
+
|
|
180
|
+
const inputValue = event.key === 'Backspace' || event.key === 'Delete' ? '' : event.key;
|
|
181
|
+
|
|
182
|
+
enterEdit({ row, column });
|
|
183
|
+
instance.inlineEdit(row, column, undefined, rootEl.value);
|
|
184
|
+
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
try {
|
|
187
|
+
const key = instance.getRowKey(row);
|
|
188
|
+
const input = instance.getComponent<Input>(String(key), column.name);
|
|
189
|
+
input.value = inputValue;
|
|
190
|
+
input.displayValue = inputValue;
|
|
191
|
+
} catch (e) {
|
|
192
|
+
if (e instanceof InstanceNotFoundError) return;
|
|
193
|
+
|
|
194
|
+
throw e;
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const pressedControlKey = (event: KeyboardEvent) => {
|
|
200
|
+
const key = event.key;
|
|
201
|
+
// if length > 1 means it pressed a control key
|
|
202
|
+
return (key.length > 1 && key !== 'Backspace' && key !== 'Delete') || event.ctrlKey || event.altKey;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
return {
|
|
206
|
+
...gridScope,
|
|
207
|
+
instance,
|
|
208
|
+
root,
|
|
209
|
+
updateSortBy,
|
|
210
|
+
isEditing,
|
|
211
|
+
cellClick,
|
|
212
|
+
cellFocus,
|
|
213
|
+
rowClick,
|
|
214
|
+
editingCell,
|
|
215
|
+
cellEnterEdit,
|
|
216
|
+
cellKeydown,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const gridEditableComponent = defineComponent({
|
|
221
|
+
props: ZdGridEditableProps,
|
|
222
|
+
inheritAttrs: false,
|
|
223
|
+
setup(props, ctx) {
|
|
224
|
+
const { instance, root } = useCreateInstance<GridEditable, ComponentPublicInstance>(props, ctx, GridEditable);
|
|
225
|
+
const gridEditableScope = useGridEditableInstance({ instance, root });
|
|
226
|
+
|
|
227
|
+
return {
|
|
228
|
+
...gridEditableScope,
|
|
229
|
+
instance,
|
|
230
|
+
root,
|
|
231
|
+
};
|
|
232
|
+
},
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
export default gridEditableComponent;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-data-table
|
|
3
|
+
v-show="instance.isVisible"
|
|
4
|
+
ref="root"
|
|
5
|
+
:id="instance.name"
|
|
6
|
+
v-model="selectedRows"
|
|
7
|
+
:class="[
|
|
8
|
+
'zd-grid',
|
|
9
|
+
'zd-grid-editable',
|
|
10
|
+
instance.cssClass,
|
|
11
|
+
{
|
|
12
|
+
'zd-grid--loading': instance.datasource.loading,
|
|
13
|
+
'zd-grid--cell-selection': instance.cellSelection,
|
|
14
|
+
},
|
|
15
|
+
]"
|
|
16
|
+
:style="[
|
|
17
|
+
cssColorVars,
|
|
18
|
+
{
|
|
19
|
+
height: $formatSize(instance.height),
|
|
20
|
+
width: $formatSize(instance.width),
|
|
21
|
+
maxHeight: $formatSize(instance.maxHeight),
|
|
22
|
+
minHeight: $formatSize(instance.minHeight),
|
|
23
|
+
maxWidth: $formatSize(instance.maxWidth),
|
|
24
|
+
minWidth: $formatSize(instance.minWidth),
|
|
25
|
+
},
|
|
26
|
+
$styleObject(instance.cssStyle),
|
|
27
|
+
]"
|
|
28
|
+
:theme="instance.theme"
|
|
29
|
+
sort-asc-icon="$collapse"
|
|
30
|
+
sort-desc-icon="$expand"
|
|
31
|
+
fixed-header
|
|
32
|
+
multi-sort
|
|
33
|
+
hide-default-footer
|
|
34
|
+
:name="instance.name"
|
|
35
|
+
:headers="headers"
|
|
36
|
+
:items="computedData"
|
|
37
|
+
:search="instance.datasource.search"
|
|
38
|
+
:density="instance.dense ? 'compact' : 'default'"
|
|
39
|
+
:loading="instance.datasource.loading"
|
|
40
|
+
:item-value="instance.datasource.uniqueKey"
|
|
41
|
+
:items-per-page="-1"
|
|
42
|
+
no-filter
|
|
43
|
+
:sort-by="sortBy"
|
|
44
|
+
disable-sort
|
|
45
|
+
return-object
|
|
46
|
+
tabindex="0"
|
|
47
|
+
@update:sort-by="updateSortBy($event)"
|
|
48
|
+
>
|
|
49
|
+
<template v-slot:top>
|
|
50
|
+
<zd-grid-toolbar v-if="!hasToolbarSlot"></zd-grid-toolbar>
|
|
51
|
+
<slot name="toolbarSlot"></slot>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<template
|
|
55
|
+
v-slot:headers="{ columns: tableColumns, isSorted, getSortIcon, toggleSort, sortBy }"
|
|
56
|
+
>
|
|
57
|
+
<zd-grid-header-row
|
|
58
|
+
v-if="instance.showHeader"
|
|
59
|
+
:name="instance.name"
|
|
60
|
+
:selectable="instance.selectable"
|
|
61
|
+
:headerBackground="instance.headerBackground"
|
|
62
|
+
:showSelectAll="instance.showSelectAll"
|
|
63
|
+
:allselectedState="allselectedState"
|
|
64
|
+
:visibleColumns="visibleColumns"
|
|
65
|
+
:dragColumns="instance.dragColumns"
|
|
66
|
+
:headerCellTextColor="instance.headerCellTextColor"
|
|
67
|
+
:resizeColumns="instance.resizeColumns"
|
|
68
|
+
:getSortIcon="getSortIcon"
|
|
69
|
+
:toggleSort="toggleSort"
|
|
70
|
+
:sortBy="sortBy"
|
|
71
|
+
:tableColumns="tableColumns"
|
|
72
|
+
:isSorted="isSorted"
|
|
73
|
+
:disableCheckbox="instance.editing"
|
|
74
|
+
@resizeMousedown="resizeMouseDownHandler($event.column, $event.event)"
|
|
75
|
+
@resizeClick="resizeClickHandler($event.event)"
|
|
76
|
+
@selectAllClick="selectAllClick($event)"
|
|
77
|
+
></zd-grid-header-row>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
<template
|
|
81
|
+
v-if="addTopPadding()"
|
|
82
|
+
v-slot:body.prepend="{ headers }"
|
|
83
|
+
>
|
|
84
|
+
<tr>
|
|
85
|
+
<td
|
|
86
|
+
:colspan="headers.length"
|
|
87
|
+
:style="`padding-top:${scrollData.startHeight}px`"
|
|
88
|
+
>
|
|
89
|
+
</td>
|
|
90
|
+
</tr>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<template
|
|
94
|
+
v-if="addBottomPadding()"
|
|
95
|
+
v-slot:body.append="{ headers }"
|
|
96
|
+
>
|
|
97
|
+
<tr>
|
|
98
|
+
<td
|
|
99
|
+
:colspan="headers.length"
|
|
100
|
+
:style="`padding-top:${scrollData.endHeight}px`"
|
|
101
|
+
>
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<template
|
|
107
|
+
v-if="instance.datasource.data.length"
|
|
108
|
+
v-slot:body="{ items, internalItems, isSelected }"
|
|
109
|
+
>
|
|
110
|
+
<template v-for="(item, i) in items">
|
|
111
|
+
<zd-grid-editable-row
|
|
112
|
+
v-if="shouldRender(i)"
|
|
113
|
+
:key="item.id"
|
|
114
|
+
:isSelected="isSelected(internalItems[i])"
|
|
115
|
+
:isCurrentRow="isCurrentRow(item)"
|
|
116
|
+
:selectable="instance.selectable"
|
|
117
|
+
:selectionDisabled="instance.callDisableSelection(item)"
|
|
118
|
+
:cellSelection="instance.cellSelection"
|
|
119
|
+
:isCurrent="isCurrent"
|
|
120
|
+
:columns="visibleColumns"
|
|
121
|
+
:row="item"
|
|
122
|
+
:fixedLeft="fixedLeft"
|
|
123
|
+
:fixedRight="fixedRight"
|
|
124
|
+
:isEditing="isEditing"
|
|
125
|
+
@cellFocus="cellFocus($event)"
|
|
126
|
+
@cellClick="cellClick($event)"
|
|
127
|
+
@click="rowClick(item, $event)"
|
|
128
|
+
@focusin="cellFocusIn($event)"
|
|
129
|
+
@checkboxClick="selectRowClick(item, !isSelected(internalItems[i]), $event)"
|
|
130
|
+
@cellEnterEdit="cellEnterEdit($event)"
|
|
131
|
+
@cellKeydown="cellKeydown($event)"
|
|
132
|
+
></zd-grid-editable-row>
|
|
133
|
+
</template>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<template v-slot:no-data>
|
|
137
|
+
<zd-iterable-no-data>
|
|
138
|
+
<template v-slot:errorSlot>
|
|
139
|
+
<slot name="errorSlot"></slot>
|
|
140
|
+
</template>
|
|
141
|
+
<template v-slot:noResultSlot>
|
|
142
|
+
<slot name="noResultSlot"></slot>
|
|
143
|
+
</template>
|
|
144
|
+
<template v-slot:noDataSlot>
|
|
145
|
+
<slot name="noDataSlot"></slot>
|
|
146
|
+
</template>
|
|
147
|
+
</zd-iterable-no-data>
|
|
148
|
+
</template>
|
|
149
|
+
|
|
150
|
+
<template v-slot:bottom>
|
|
151
|
+
<zd-grid-footer v-if="instance.showFooter && !hasFooterSlot"></zd-grid-footer>
|
|
152
|
+
<slot name="footerSlot"></slot>
|
|
153
|
+
</template>
|
|
154
|
+
</v-data-table>
|
|
155
|
+
</template>
|
|
156
|
+
|
|
157
|
+
<script lang="ts" src="./ZdGridEditable.ts"></script>
|
|
158
|
+
|
|
159
|
+
<style lang="scss">
|
|
160
|
+
</style>
|