@zeedhi/vuetify 3.0.11 → 3.2.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 +49 -59
- package/dist/zd-vuetify.min.css +1 -1
- package/dist/zd-vuetify.min.js +14 -16
- package/dist/zd-vuetify.mjs +1278 -922
- package/environments.json +16 -0
- package/package.json +3 -3
- package/src/components/index.ts +3 -1
- package/src/components/zd-alert/ZdAlert.ts +1 -1
- package/src/components/zd-badge/ZdBadge.ts +1 -1
- package/src/components/zd-breadcrumbs/ZdBreadcrumbs.ts +2 -1
- package/src/components/zd-button/ZdButton.ts +1 -1
- package/src/components/zd-button-group/ZdButtonGroup.ts +1 -1
- package/src/components/zd-card/ZdCard.ts +1 -1
- package/src/components/zd-card/ZdCard.vue +2 -2
- package/src/components/zd-carousel/ZdCarousel.ts +3 -1
- package/src/components/zd-checkbox/ZdCheckbox.ts +1 -1
- package/src/components/zd-checkbox/ZdCheckbox.vue +4 -0
- package/src/components/zd-checkbox-multiple/ZdCheckboxMultiple.ts +3 -1
- package/src/components/zd-chip/ZdChip.ts +1 -1
- package/src/components/zd-code-viewer/ZdCodeViewer.ts +1 -1
- package/src/components/zd-col/ZdCol.ts +1 -1
- package/src/components/zd-collapse-card/ZdCollapseCard.ts +3 -1
- package/src/components/zd-component/ZdComponent.ts +23 -1
- package/src/components/zd-component/ZdComponentRender.ts +2 -0
- package/src/components/zd-container/ZdContainer.ts +1 -1
- package/src/components/zd-currency/ZdCurrency.ts +1 -1
- package/src/components/zd-date-input/ZdDateInput.ts +2 -1
- package/src/components/zd-date-range/ZdDateRange.ts +1 -1
- package/src/components/zd-divider/ZdDivider.ts +1 -1
- package/src/components/zd-dropdown/ZdDropdown.ts +2 -1
- package/src/components/zd-dropdown/ZdDropdown.vue +1 -1
- package/src/components/zd-footer/ZdFooter.ts +1 -1
- package/src/components/zd-form/ZdForm.ts +2 -1
- package/src/components/zd-frame/ZdFrame.ts +3 -1
- package/src/components/zd-frame-page/ZdFramePage.ts +1 -1
- package/src/components/zd-frame-page/ZdFramePage.vue +1 -1
- package/src/components/zd-grid/ZdGrid.ts +10 -2
- package/src/components/zd-grid/ZdGrid.vue +1 -1
- package/src/components/zd-grid/cell/ZdGridCellContent.vue +5 -7
- package/src/components/zd-grid/column-header/ZdGridColumnHeader.vue +4 -7
- package/src/components/zd-grid-editable/ZdGridEditable.ts +25 -15
- package/src/components/zd-grid-editable/cell/ZdGridEditableCell.vue +1 -0
- package/src/components/zd-header/ZdHeader.ts +4 -1
- package/src/components/zd-icon/ZdIcon.ts +1 -1
- package/src/components/zd-image/ZdImage.ts +1 -1
- package/src/components/zd-increment/ZdIncrement.ts +1 -1
- package/src/components/zd-input/ZdInput.ts +10 -3
- package/src/components/zd-iterable/ZdIterable.ts +2 -0
- package/src/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.ts +6 -1
- package/src/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.ts +1 -1
- package/src/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.ts +2 -1
- package/src/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.ts +8 -3
- package/src/components/zd-iterable/zd-search/ZdSearch.ts +1 -1
- package/src/components/zd-iterable-component-render/ZdIterableComponentRender.ts +12 -1
- package/src/components/zd-layout/ZdLayout.ts +1 -1
- package/src/components/zd-list/ZdList.scss +3 -0
- package/src/components/zd-list/ZdList.ts +2 -1
- package/src/components/zd-list/ZdListGroup.ts +2 -1
- package/src/components/zd-list/ZdListGroup.vue +14 -16
- package/src/components/zd-list/ZdListItem.ts +1 -1
- package/src/components/zd-loading/ZdLoading.ts +1 -1
- package/src/components/zd-loading/ZdLoading.vue +30 -53
- package/src/components/zd-login/ZdLogin.ts +3 -1
- package/src/components/zd-login/ZdLoginButton.ts +1 -1
- package/src/components/zd-main/ZdMain.ts +1 -1
- package/src/components/zd-master-detail/ZdMasterDetail.ts +1 -1
- package/src/components/zd-menu/ZdMenu.ts +9 -4
- package/src/components/zd-menu/ZdMenu.vue +6 -5
- package/src/components/zd-menu/ZdMenuButton.ts +1 -1
- package/src/components/zd-menu/ZdMenuGroup.ts +2 -1
- package/src/components/zd-menu/ZdMenuLink.ts +1 -1
- package/src/components/zd-menu/ZdMenuSeparator.ts +1 -1
- package/src/components/zd-modal/ZdModal.ts +1 -21
- package/src/components/zd-modal/ZdModal.vue +18 -77
- package/src/components/zd-modal/ZdModalCard.ts +100 -0
- package/src/components/zd-modal/ZdModalCard.vue +47 -0
- package/src/components/zd-modal/ZdModalCloseButton.ts +1 -1
- package/src/components/zd-month/ZdMonth.ts +1 -1
- package/src/components/zd-number-input/ZdNumberInput.ts +1 -1
- package/src/components/zd-password/ZdPassword.ts +1 -1
- package/src/components/zd-progress/ZdProgress.ts +2 -1
- package/src/components/zd-radio/ZdRadio.ts +2 -1
- package/src/components/zd-row/ZdRow.ts +1 -1
- package/src/components/zd-select/ZdSelect.ts +28 -3
- package/src/components/zd-select/ZdSelect.vue +5 -8
- package/src/components/zd-select-multiple/ZdSelectMultiple.ts +27 -4
- package/src/components/zd-select-multiple/ZdSelectMultiple.vue +11 -2
- package/src/components/zd-svg-map/ZdSvgMap.ts +1 -1
- package/src/components/zd-switch/ZdSwitch.ts +1 -1
- package/src/components/zd-table/ZdTable.ts +1 -1
- package/src/components/zd-tabs/ZdTab.ts +1 -1
- package/src/components/zd-tabs/ZdTabItem.vue +3 -0
- package/src/components/zd-tabs/ZdTabs.ts +4 -3
- package/src/components/zd-tabs/ZdTabs.vue +14 -5
- package/src/components/zd-tag/ZdTag.ts +1 -1
- package/src/components/zd-text/ZdText.ts +1 -1
- package/src/components/zd-text-input/ZdTextInput.ts +7 -1
- package/src/components/zd-text-input/ZdTextInput.vue +3 -3
- package/src/components/zd-textarea/ZdTextarea.ts +5 -1
- package/src/components/zd-textarea/ZdTextarea.vue +6 -2
- package/src/components/zd-time/ZdTime.ts +1 -1
- package/src/components/zd-tooltip/ZdTooltip.ts +1 -1
- package/src/components/zd-tooltip/ZdTooltip.vue +2 -1
- package/src/components/zd-tooltip-overflow/ZdTooltipOverflow.vue +45 -0
- package/src/components/zd-tree/ZdTree.ts +5 -1
- package/src/components/zd-tree-grid/ZdTreeGrid.ts +2 -1
- package/src/composables/columnDrag.ts +9 -11
- package/src/composables/gridColumns.ts +11 -6
- package/src/composables/tableNavigation.ts +5 -1
- package/src/composables/useTooltipManager.ts +24 -0
- package/src/directives/index.ts +1 -0
- package/src/directives/v-tooltip-overflow.ts +97 -0
- package/src/index.ts +11 -0
- package/src/styles/_zd-input.scss +3 -2
- package/src/utils/fillHeight.ts +3 -2
- package/src/utils/index.ts +1 -0
- package/src/utils/plugins/getIconPlugin.ts +4 -3
- package/src/utils/tooltip-overflow/index.ts +2 -0
- package/src/utils/tooltip-overflow/install.ts +27 -0
- package/src/utils/tooltip-overflow/uninstall.ts +32 -0
- package/types/components/zd-alert/ZdAlert.d.ts +158 -80
- package/types/components/zd-badge/ZdBadge.d.ts +76 -52
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.d.ts +81 -54
- package/types/components/zd-button/ZdButton.d.ts +92 -68
- package/types/components/zd-button-group/ZdButtonGroup.d.ts +59 -44
- package/types/components/zd-card/ZdCard.d.ts +87 -63
- package/types/components/zd-carousel/ZdCarousel.d.ts +229 -225
- package/types/components/zd-checkbox/ZdCheckbox.d.ts +41 -14
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.d.ts +202 -169
- package/types/components/zd-chip/ZdChip.d.ts +87 -63
- package/types/components/zd-code-viewer/ZdCodeViewer.d.ts +96 -66
- package/types/components/zd-col/ZdCol.d.ts +76 -52
- package/types/components/zd-collapse-card/ZdCollapseCard.d.ts +195 -111
- package/types/components/zd-component/ZdComponent.d.ts +12 -5
- package/types/components/zd-component/ZdComponentRender.d.ts +12 -4
- package/types/components/zd-container/ZdContainer.d.ts +79 -55
- package/types/components/zd-currency/ZdCurrency.d.ts +192 -165
- package/types/components/zd-date-input/ZdDateInput.d.ts +62 -29
- package/types/components/zd-date-range/ZdDateRange.d.ts +206 -176
- package/types/components/zd-dialog/ZdDialog.d.ts +36 -12
- package/types/components/zd-divider/ZdDivider.d.ts +76 -52
- package/types/components/zd-dropdown/ZdDropdown.d.ts +90 -72
- package/types/components/zd-footer/ZdFooter.d.ts +204 -142
- package/types/components/zd-form/ZdForm.d.ts +12 -4
- package/types/components/zd-frame/ZdFrame.d.ts +13 -4
- package/types/components/zd-frame-page/ZdFramePage.d.ts +84 -57
- package/types/components/zd-grid/ZdGrid.d.ts +2646 -2673
- package/types/components/zd-grid/cell/ZdGridAction.d.ts +2 -2
- package/types/components/zd-grid/cell/ZdGridCell.d.ts +4 -4
- package/types/components/zd-grid/cell/ZdGridCellContent.d.ts +4 -4
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.d.ts +2 -2
- package/types/components/zd-grid/composables/grid-instance.d.ts +983 -294
- package/types/components/zd-grid/footer/ZdGridFooter.d.ts +983 -294
- package/types/components/zd-grid/row/ZdGridRow.d.ts +6 -6
- package/types/components/zd-grid/toolbar/ZdGridToolbar.d.ts +983 -294
- package/types/components/zd-grid-editable/ZdGridEditable.d.ts +3684 -4887
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.d.ts +71 -71
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.d.ts +6 -6
- package/types/components/zd-header/ZdHeader.d.ts +230 -172
- package/types/components/zd-icon/ZdIcon.d.ts +39 -15
- package/types/components/zd-image/ZdImage.d.ts +73 -52
- package/types/components/zd-increment/ZdIncrement.d.ts +192 -165
- package/types/components/zd-input/ZdInput.d.ts +15 -6
- package/types/components/zd-iterable/ZdIterable.d.ts +26 -12
- package/types/components/zd-iterable/ZdIterableNoData.d.ts +983 -294
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.d.ts +422 -139
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.d.ts +410 -121
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.d.ts +938 -266
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.d.ts +422 -130
- package/types/components/zd-iterable/zd-search/ZdSearch.d.ts +50 -23
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.d.ts +437 -293
- package/types/components/zd-layout/ZdLayout.d.ts +75 -54
- package/types/components/zd-list/ZdList.d.ts +336 -97
- package/types/components/zd-list/ZdListGroup.d.ts +361 -122
- package/types/components/zd-list/ZdListItem.d.ts +200 -70
- package/types/components/zd-loading/ZdLoading.d.ts +35 -14
- package/types/components/zd-login/ZdLogin.d.ts +119 -89
- package/types/components/zd-login/ZdLoginButton.d.ts +170 -146
- package/types/components/zd-main/ZdMain.d.ts +73 -52
- package/types/components/zd-master-detail/ZdMasterDetail.d.ts +94 -70
- package/types/components/zd-menu/ZdMenu.d.ts +578 -535
- package/types/components/zd-menu/ZdMenuButton.d.ts +85 -61
- package/types/components/zd-menu/ZdMenuGroup.d.ts +811 -778
- package/types/components/zd-menu/ZdMenuLink.d.ts +1327 -1303
- package/types/components/zd-menu/ZdMenuSeparator.d.ts +76 -52
- package/types/components/zd-modal/ZdModal.d.ts +0 -2
- package/types/components/zd-modal/ZdModalCard.d.ts +125 -0
- package/types/components/zd-modal/ZdModalCloseButton.d.ts +85 -61
- package/types/components/zd-month/ZdMonth.d.ts +204 -176
- package/types/components/zd-number-input/ZdNumberInput.d.ts +192 -165
- package/types/components/zd-password/ZdPassword.d.ts +192 -165
- package/types/components/zd-progress/ZdProgress.d.ts +111 -84
- package/types/components/zd-radio/ZdRadio.d.ts +44 -14
- package/types/components/zd-row/ZdRow.d.ts +76 -52
- package/types/components/zd-select/ZdSelect.d.ts +17 -5
- package/types/components/zd-select-multiple/ZdSelectMultiple.d.ts +17 -5
- package/types/components/zd-svg-map/ZdSvgMap.d.ts +37 -13
- package/types/components/zd-switch/ZdSwitch.d.ts +191 -164
- package/types/components/zd-table/ZdTable.d.ts +319 -118
- package/types/components/zd-tabs/ZdTab.d.ts +121 -44
- package/types/components/zd-tabs/ZdTabItem.d.ts +36 -12
- package/types/components/zd-tabs/ZdTabs.d.ts +268 -82
- package/types/components/zd-tag/ZdTag.d.ts +76 -52
- package/types/components/zd-text/ZdText.d.ts +96 -66
- package/types/components/zd-text-input/ZdTextInput.d.ts +41 -14
- package/types/components/zd-textarea/ZdTextarea.d.ts +55 -15
- package/types/components/zd-time/ZdTime.d.ts +201 -174
- package/types/components/zd-toggleable/ZdToggleable.d.ts +13 -4
- package/types/components/zd-tooltip/ZdTooltip.d.ts +82 -58
- package/types/components/zd-tree/ZdTree.d.ts +208 -172
- package/types/components/zd-tree/ZdTreeAfterTitle.d.ts +3 -3
- package/types/components/zd-tree/ZdTreeCheckbox.d.ts +5 -5
- package/types/components/zd-tree-grid/ZdTreeGrid.d.ts +1215 -1199
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.d.ts +4 -4
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.d.ts +6 -6
- package/types/composables/cellSelection.d.ts +2 -264
- package/types/composables/gridColumns.d.ts +88 -35
- package/types/composables/gridSorting.d.ts +1 -1
- package/types/composables/tableNavigation.d.ts +3 -2
- package/types/composables/useTooltipManager.d.ts +13 -0
- package/types/directives/index.d.ts +1 -0
- package/types/directives/v-tooltip-overflow.d.ts +12 -0
- package/types/index.d.ts +1 -0
- package/types/utils/fillHeight.d.ts +1 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/tooltip-overflow/index.d.ts +2 -0
- package/types/utils/tooltip-overflow/install.d.ts +13 -0
- package/types/utils/tooltip-overflow/uninstall.d.ts +14 -0
- package/src/components/tooltip-overflow/ZdTooltipOverflow.ts +0 -63
- package/src/components/tooltip-overflow/ZdTooltipOverflow.vue +0 -63
- package/types/components/tek-grid/TekGrid.d.ts +0 -7258
- package/types/components/tek-grid/TekGrid.ts.d.ts +0 -7258
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +0 -129
- package/types/components/tek-grid/column-filter/TekGridColumnFilter.ts.d.ts +0 -129
- package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +0 -225
- package/types/components/tek-grid/column-header/TekGridHeaderRow.ts.d.ts +0 -225
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +0 -2432
- package/types/components/tek-grid/columns-button/TekGridColumnsButton.ts.d.ts +0 -2432
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +0 -65
- package/types/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +0 -9
- package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +0 -2920
- package/types/components/tek-grid/filter-button/TekGridFilterButton.ts.d.ts +0 -2920
- package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +0 -32
- package/types/components/tek-grid/indentation/TekGridIndentation.ts.d.ts +0 -32
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +0 -1892
- package/types/components/tek-grid/layout-options/TekGridLayoutOptions.ts.d.ts +0 -1892
- package/types/components/tek-grid/row/TekGridFooterRow.d.ts +0 -90
- package/types/components/tek-grid/row/TekGridFooterRow.ts.d.ts +0 -90
- package/types/components/tek-grid/row/TekGridGroupRow.d.ts +0 -87
- package/types/components/tek-grid/row/TekGridGroupRow.ts.d.ts +0 -87
- package/types/components/tooltip-overflow/ZdTooltipOverflow.ts.d.ts +0 -50
- package/types/components/zd-activator-wrapper/ZdActivatorWrapper.ts.d.ts +0 -25
- package/types/components/zd-alert/ZdAlert.ts.d.ts +0 -884
- package/types/components/zd-badge/ZdBadge.ts.d.ts +0 -624
- package/types/components/zd-breadcrumbs/ZdBreadcrumbs.ts.d.ts +0 -697
- package/types/components/zd-button/ZdButton.ts.d.ts +0 -1158
- package/types/components/zd-button-group/ZdButtonGroup.ts.d.ts +0 -785
- package/types/components/zd-card/ZdCard.ts.d.ts +0 -1028
- package/types/components/zd-carousel/ZdCarousel.ts.d.ts +0 -2007
- package/types/components/zd-checkbox/ZdCheckbox.ts.d.ts +0 -642
- package/types/components/zd-checkbox-multiple/ZdCheckboxMultiple.ts.d.ts +0 -2010
- package/types/components/zd-chip/ZdChip.ts.d.ts +0 -1256
- package/types/components/zd-code-viewer/ZdCodeViewer.ts.d.ts +0 -791
- package/types/components/zd-col/ZdCol.ts.d.ts +0 -741
- package/types/components/zd-collapse-card/ZdCollapseCard.ts.d.ts +0 -1583
- package/types/components/zd-container/ZdContainer.ts.d.ts +0 -722
- package/types/components/zd-currency/ZdCurrency.ts.d.ts +0 -2024
- package/types/components/zd-date-input/ZdDateInput.ts.d.ts +0 -960
- package/types/components/zd-dialog/ZdDialog.ts.d.ts +0 -262
- package/types/components/zd-divider/ZdDivider.ts.d.ts +0 -623
- package/types/components/zd-dropdown/ZdDropdown.ts.d.ts +0 -836
- package/types/components/zd-footer/ZdFooter.ts.d.ts +0 -1262
- package/types/components/zd-form/ZdForm.ts.d.ts +0 -118
- package/types/components/zd-frame/ZdFrame.ts.d.ts +0 -138
- package/types/components/zd-frame-page/ZdFramePage.ts.d.ts +0 -805
- package/types/components/zd-grid/ZdGrid.ts.d.ts +0 -7304
- package/types/components/zd-grid/cell/ZdGridAction.ts.d.ts +0 -14
- package/types/components/zd-grid/cell/ZdGridCell.ts.d.ts +0 -68
- package/types/components/zd-grid/cell/ZdGridCellContent.ts.d.ts +0 -58
- package/types/components/zd-grid/cell/ZdGridCheckbox.ts.d.ts +0 -53
- package/types/components/zd-grid/column-header/ZdGridColumnHeader.ts.d.ts +0 -112
- package/types/components/zd-grid/column-header/ZdGridHeaderIcon.ts.d.ts +0 -46
- package/types/components/zd-grid/column-header/ZdGridHeaderRow.ts.d.ts +0 -165
- package/types/components/zd-grid/column-header/ZdGridSort.ts.d.ts +0 -47
- package/types/components/zd-grid/footer/ZdGridFooter.ts.d.ts +0 -2087
- package/types/components/zd-grid/helper/ZdGridHelper.ts.d.ts +0 -16
- package/types/components/zd-grid/row/TableRow.ts.d.ts +0 -34
- package/types/components/zd-grid/row/ZdGridRow.ts.d.ts +0 -105
- package/types/components/zd-grid/toolbar/ZdGridToolbar.ts.d.ts +0 -2086
- package/types/components/zd-grid-editable/ZdGridEditable.ts.d.ts +0 -8663
- package/types/components/zd-grid-editable/cell/ZdGridEditableCell.ts.d.ts +0 -637
- package/types/components/zd-grid-editable/row/ZdGridEditableRow.ts.d.ts +0 -126
- package/types/components/zd-header/ZdHeader.ts.d.ts +0 -1320
- package/types/components/zd-icon/ZdIcon.ts.d.ts +0 -383
- package/types/components/zd-image/ZdImage.ts.d.ts +0 -753
- package/types/components/zd-increment/ZdIncrement.ts.d.ts +0 -2069
- package/types/components/zd-iterable/ZdIterableNoData.ts.d.ts +0 -2089
- package/types/components/zd-iterable/zd-iterable-columns-button/ZdIterableColumnsButton.ts.d.ts +0 -1645
- package/types/components/zd-iterable/zd-iterable-page-info/ZdIterablePageInfo.ts.d.ts +0 -1081
- package/types/components/zd-iterable/zd-iterable-page-size/ZdIterablePageSize.ts.d.ts +0 -2763
- package/types/components/zd-iterable/zd-iterable-pagination/ZdIterablePagination.ts.d.ts +0 -1627
- package/types/components/zd-iterable/zd-search/ZdSearch.ts.d.ts +0 -766
- package/types/components/zd-iterable-component-render/ZdIterableComponentRender.ts.d.ts +0 -2484
- package/types/components/zd-layout/ZdLayout.ts.d.ts +0 -647
- package/types/components/zd-list/ZdList.ts.d.ts +0 -1140
- package/types/components/zd-list/ZdListGroup.ts.d.ts +0 -1332
- package/types/components/zd-list/ZdListItem.ts.d.ts +0 -848
- package/types/components/zd-loading/ZdLoading.ts.d.ts +0 -350
- package/types/components/zd-login/ZdLogin.ts.d.ts +0 -1072
- package/types/components/zd-login/ZdLoginButton.ts.d.ts +0 -1910
- package/types/components/zd-main/ZdMain.ts.d.ts +0 -619
- package/types/components/zd-master-detail/ZdMasterDetail.ts.d.ts +0 -684
- package/types/components/zd-menu/ZdMenu.ts.d.ts +0 -4484
- package/types/components/zd-menu/ZdMenuButton.ts.d.ts +0 -1142
- package/types/components/zd-menu/ZdMenuGroup.ts.d.ts +0 -6286
- package/types/components/zd-menu/ZdMenuLink.ts.d.ts +0 -10437
- package/types/components/zd-menu/ZdMenuSeparator.ts.d.ts +0 -600
- package/types/components/zd-modal/ZdModal.ts.d.ts +0 -10
- package/types/components/zd-modal/ZdModalCloseButton.ts.d.ts +0 -1137
- package/types/components/zd-month/ZdMonth.ts.d.ts +0 -2217
- package/types/components/zd-number-input/ZdNumberInput.ts.d.ts +0 -2021
- package/types/components/zd-password/ZdPassword.ts.d.ts +0 -2014
- package/types/components/zd-progress/ZdProgress.ts.d.ts +0 -859
- package/types/components/zd-radio/ZdRadio.ts.d.ts +0 -682
- package/types/components/zd-row/ZdRow.ts.d.ts +0 -734
- package/types/components/zd-select/ZdSelect.ts.d.ts +0 -313
- package/types/components/zd-select-multiple/ZdSelectMultiple.ts.d.ts +0 -333
- package/types/components/zd-svg-map/ZdSvgMap.ts.d.ts +0 -414
- package/types/components/zd-switch/ZdSwitch.ts.d.ts +0 -1918
- package/types/components/zd-table/ZdTable.ts.d.ts +0 -1092
- package/types/components/zd-tabs/ZdTab.ts.d.ts +0 -674
- package/types/components/zd-tabs/ZdTabItem.ts.d.ts +0 -268
- package/types/components/zd-tabs/ZdTabs.ts.d.ts +0 -929
- package/types/components/zd-tag/ZdTag.ts.d.ts +0 -613
- package/types/components/zd-text/ZdText.ts.d.ts +0 -670
- package/types/components/zd-text-input/ZdTextInput.ts.d.ts +0 -746
- package/types/components/zd-textarea/ZdTextarea.ts.d.ts +0 -877
- package/types/components/zd-time/ZdTime.ts.d.ts +0 -2224
- package/types/components/zd-tooltip/ZdTooltip.ts.d.ts +0 -781
- package/types/components/zd-tree/ZdTree.ts.d.ts +0 -1878
- package/types/components/zd-tree/ZdTreeAfterTitle.ts.d.ts +0 -26
- package/types/components/zd-tree/ZdTreeCheckbox.ts.d.ts +0 -74
- package/types/components/zd-tree-grid/ZdTreeGrid.ts.d.ts +0 -4178
- package/types/components/zd-tree-grid/cell/ZdTreeGridCell.ts.d.ts +0 -92
- package/types/components/zd-tree-grid/row/ZdTreeGridRow.ts.d.ts +0 -124
- package/types/composables/useTableLayout.d.ts +0 -25
- package/types/utils/isArrayOperation.d.ts +0 -2
|
@@ -6,6 +6,7 @@ import { buildProps } from '../../utils';
|
|
|
6
6
|
import { getRootElement } from '../zd-component/ZdComponent';
|
|
7
7
|
import { useCreateInputInstance } from '../zd-input/ZdInput';
|
|
8
8
|
import { ZdSelectProps, useSelect } from '../zd-select/ZdSelect';
|
|
9
|
+
import { ListItem } from 'vuetify/lib/composables/list-items';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Select Multiple component
|
|
@@ -42,7 +43,12 @@ const selectMultipleComponent: any = defineComponent({
|
|
|
42
43
|
props: ZdSelectMultipleProps,
|
|
43
44
|
inheritAttrs: false,
|
|
44
45
|
setup(props, ctx) {
|
|
45
|
-
const { instance, root } = useCreateInputInstance<SelectMultiple>(
|
|
46
|
+
const { instance, root } = useCreateInputInstance<SelectMultiple>(
|
|
47
|
+
props,
|
|
48
|
+
ctx,
|
|
49
|
+
SelectMultiple,
|
|
50
|
+
ZdSelectMultipleProps,
|
|
51
|
+
);
|
|
46
52
|
const selectScope = useSelect(instance, ctx, root);
|
|
47
53
|
const element = ref<HTMLElement>();
|
|
48
54
|
const checkboxItem = ref<Array<any>>([]);
|
|
@@ -325,12 +331,12 @@ const selectMultipleComponent: any = defineComponent({
|
|
|
325
331
|
return selectFormatterFn(item, formatterProps);
|
|
326
332
|
};
|
|
327
333
|
|
|
328
|
-
const removeItem = (item:
|
|
334
|
+
const removeItem = (item: ListItem<any>) => {
|
|
329
335
|
const rootValue = root.value as VSelect;
|
|
330
|
-
rootValue.select(item
|
|
336
|
+
rootValue.select(item, false);
|
|
331
337
|
};
|
|
332
338
|
|
|
333
|
-
const selectChange = (value: any, event
|
|
339
|
+
const selectChange = (value: any[], event?: Event) => {
|
|
334
340
|
const input = getRootElement(root);
|
|
335
341
|
|
|
336
342
|
instance.selectChange(
|
|
@@ -340,6 +346,22 @@ const selectMultipleComponent: any = defineComponent({
|
|
|
340
346
|
);
|
|
341
347
|
};
|
|
342
348
|
|
|
349
|
+
const selectClear = () => {
|
|
350
|
+
const input = getRootElement(root);
|
|
351
|
+
const hasSelectedValue = Array.isArray(instance.value) && instance.value.length > 0;
|
|
352
|
+
const hasSearchText = !!instance.search;
|
|
353
|
+
|
|
354
|
+
if (hasSelectedValue) {
|
|
355
|
+
instance.selectChange([], undefined, input.value);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (hasSearchText) {
|
|
359
|
+
selectScope.selectInput('');
|
|
360
|
+
} else {
|
|
361
|
+
instance.search = '';
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
|
|
343
365
|
let observer: ResizeObserver | undefined;
|
|
344
366
|
|
|
345
367
|
onMounted(() => {
|
|
@@ -376,6 +398,7 @@ const selectMultipleComponent: any = defineComponent({
|
|
|
376
398
|
selectClick,
|
|
377
399
|
selectBlur,
|
|
378
400
|
selectChange,
|
|
401
|
+
selectClear,
|
|
379
402
|
formattedDataDiscreteText,
|
|
380
403
|
ajustSize,
|
|
381
404
|
onLoadMoreIntersect,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
!(
|
|
22
22
|
instance.alwaysShowError &&
|
|
23
23
|
$refs.root &&
|
|
24
|
-
$refs.root.
|
|
24
|
+
$refs.root.errorMessages.length
|
|
25
25
|
),
|
|
26
26
|
'zd-no-border': !instance.showBorder,
|
|
27
27
|
'zd-dense': instance.dense,
|
|
@@ -80,6 +80,15 @@
|
|
|
80
80
|
@keydown="instance.keydown($event)"
|
|
81
81
|
v-on="getIconClickEvents()"
|
|
82
82
|
>
|
|
83
|
+
<template #clear="{ props }">
|
|
84
|
+
<v-icon
|
|
85
|
+
:tabindex="props.tabindex"
|
|
86
|
+
@focus="props.onFocus"
|
|
87
|
+
@blur="props.onBlur"
|
|
88
|
+
@click="selectClear"
|
|
89
|
+
></v-icon>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
83
92
|
<template #prepend-item v-if="instance.itemBeforeSlot.length || instance.showSelectAll">
|
|
84
93
|
<template v-if="instance.showSelectAll">
|
|
85
94
|
<v-list-item
|
|
@@ -297,4 +306,4 @@
|
|
|
297
306
|
.zd-select__menu .v-list-item-title, .zd-select__menu .v-list-item__content {
|
|
298
307
|
font-size: var(--zd-font-body1-size);
|
|
299
308
|
}
|
|
300
|
-
</style>
|
|
309
|
+
</style>
|
|
@@ -57,7 +57,7 @@ export default defineComponent({
|
|
|
57
57
|
|
|
58
58
|
setup(props, ctx) {
|
|
59
59
|
const container = ref<HTMLElement | null>(null);
|
|
60
|
-
const { instance, root } = useCreateInputInstance<any>(props, ctx, SvgMap);
|
|
60
|
+
const { instance, root } = useCreateInputInstance<any>(props, ctx, SvgMap, ZdSvgMapProps);
|
|
61
61
|
const componentScope = useGetMethods(instance, root);
|
|
62
62
|
const theme = useTheme();
|
|
63
63
|
|
|
@@ -19,7 +19,7 @@ const switchComponent = defineComponent({
|
|
|
19
19
|
props: ZdSwitchProps,
|
|
20
20
|
inheritAttrs: false,
|
|
21
21
|
setup(props, ctx) {
|
|
22
|
-
const { instance, root } = useCreateInstance<Switch>(props, ctx, Switch);
|
|
22
|
+
const { instance, root } = useCreateInstance<Switch>(props, ctx, Switch, ZdSwitchProps);
|
|
23
23
|
|
|
24
24
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
25
25
|
|
|
@@ -28,7 +28,7 @@ const tableComponent = defineComponent({
|
|
|
28
28
|
props: ZdTableProps,
|
|
29
29
|
inheritAttrs: false,
|
|
30
30
|
setup(props, ctx) {
|
|
31
|
-
const { instance, root } = useCreateInstance<Table>(props, ctx, Table);
|
|
31
|
+
const { instance, root } = useCreateInstance<Table>(props, ctx, Table, ZdTableProps);
|
|
32
32
|
|
|
33
33
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
34
34
|
|
|
@@ -65,7 +65,7 @@ const tabComponent = defineComponent({
|
|
|
65
65
|
props: ZdTabProps,
|
|
66
66
|
inheritAttrs: false,
|
|
67
67
|
setup(props, ctx) {
|
|
68
|
-
const { instance, root } = useCreateInstance<Tab>(props, ctx, Tab);
|
|
68
|
+
const { instance, root } = useCreateInstance<Tab>(props, ctx, Tab, ZdTabProps);
|
|
69
69
|
const { density } = useDensity({ instance });
|
|
70
70
|
|
|
71
71
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
@@ -16,6 +16,7 @@ export const ZdTabsProps = buildProps({
|
|
|
16
16
|
tabs: {
|
|
17
17
|
type: [Array],
|
|
18
18
|
default: () => [],
|
|
19
|
+
watch: false,
|
|
19
20
|
},
|
|
20
21
|
color: {
|
|
21
22
|
type: [String],
|
|
@@ -53,14 +54,14 @@ const tabsComponent = defineComponent({
|
|
|
53
54
|
props: ZdTabsProps,
|
|
54
55
|
inheritAttrs: false,
|
|
55
56
|
setup(props, ctx) {
|
|
56
|
-
const { instance, root } = useCreateInstance<Tabs>(props, ctx, Tabs);
|
|
57
|
+
const { instance, root } = useCreateInstance<Tabs>(props, ctx, Tabs, ZdTabsProps);
|
|
57
58
|
const { density } = useDensity({ instance });
|
|
58
59
|
|
|
59
60
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
60
61
|
|
|
61
|
-
const change = (
|
|
62
|
+
const change = () => {
|
|
62
63
|
const rootElement = getRootElement(root);
|
|
63
|
-
instance.change(
|
|
64
|
+
instance.change(new Event('change'), rootElement.value);
|
|
64
65
|
};
|
|
65
66
|
|
|
66
67
|
const keydown = (event: Event, index: number) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
3
|
ref="root"
|
|
4
4
|
:id="instance.name"
|
|
5
5
|
v-show="instance.isVisible"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<v-tabs
|
|
15
15
|
v-model="instance.activeTab"
|
|
16
16
|
show-arrows
|
|
17
|
-
@
|
|
17
|
+
@update:model-value="change"
|
|
18
18
|
:theme="instance.theme"
|
|
19
19
|
:color="instance.color"
|
|
20
20
|
:bg-color="instance.backgroudColor"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
>
|
|
38
38
|
</zd-tab>
|
|
39
39
|
</v-tabs>
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
<v-window
|
|
42
42
|
v-model="instance.activeTab"
|
|
43
43
|
>
|
|
@@ -94,13 +94,22 @@
|
|
|
94
94
|
|
|
95
95
|
.v-tabs{
|
|
96
96
|
flex-grow: 0;
|
|
97
|
+
flex-shrink: 0;
|
|
97
98
|
}
|
|
98
99
|
|
|
99
|
-
.v-
|
|
100
|
+
.v-window {
|
|
100
101
|
flex-grow: 1;
|
|
101
102
|
overflow-y: auto;
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
&__container {
|
|
105
|
+
height: 100%;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.v-tabs-window-item {
|
|
110
|
+
height: 100%;
|
|
111
|
+
|
|
112
|
+
> .v-container {
|
|
104
113
|
height:100% !important;
|
|
105
114
|
}
|
|
106
115
|
}
|
|
@@ -20,7 +20,7 @@ const tagComponent = defineComponent({
|
|
|
20
20
|
props: ZdTagProps,
|
|
21
21
|
inheritAttrs: false,
|
|
22
22
|
setup(props, ctx) {
|
|
23
|
-
const { instance, root } = useCreateInstance<Tag>(props, ctx, Tag);
|
|
23
|
+
const { instance, root } = useCreateInstance<Tag>(props, ctx, Tag, ZdTagProps);
|
|
24
24
|
|
|
25
25
|
const { click, focus, blur, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
26
26
|
|
|
@@ -24,7 +24,7 @@ const textComponent = defineComponent({
|
|
|
24
24
|
props: ZdTextProps,
|
|
25
25
|
inheritAttrs: false,
|
|
26
26
|
setup(props, ctx) {
|
|
27
|
-
const { instance, root } = useCreateInstance<Text>(props, ctx, Text);
|
|
27
|
+
const { instance, root } = useCreateInstance<Text>(props, ctx, Text, ZdTextProps);
|
|
28
28
|
|
|
29
29
|
const { click, mouseenter, mouseleave } = useGetMethods(instance, root);
|
|
30
30
|
|
|
@@ -72,7 +72,7 @@ const textInputComponent = defineComponent({
|
|
|
72
72
|
props: ZdTextInputProps,
|
|
73
73
|
inheritAttrs: false,
|
|
74
74
|
setup(props, ctx) {
|
|
75
|
-
const { instance, root } = useCreateInstance<TextInput>(props, ctx, TextInput);
|
|
75
|
+
const { instance, root } = useCreateInstance<TextInput>(props, ctx, TextInput, ZdTextInputProps);
|
|
76
76
|
|
|
77
77
|
const textInputScope = useTextInput(instance, ctx, root);
|
|
78
78
|
const { maskOptions } = useMaska(instance, { disable: props.disableMaska });
|
|
@@ -171,6 +171,11 @@ export function useTextInput<TG extends TextInput>(
|
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
173
|
|
|
174
|
+
const clearInput = () => {
|
|
175
|
+
inputScope.input();
|
|
176
|
+
inputScope.change();
|
|
177
|
+
};
|
|
178
|
+
|
|
174
179
|
const getIconClickEvents = () => {
|
|
175
180
|
const events: any = {};
|
|
176
181
|
if (instance.events.appendIconClick) {
|
|
@@ -207,6 +212,7 @@ export function useTextInput<TG extends TextInput>(
|
|
|
207
212
|
appendOuterIconClick,
|
|
208
213
|
prependOuterIconClick,
|
|
209
214
|
setBlur,
|
|
215
|
+
clearInput,
|
|
210
216
|
getIconClickEvents,
|
|
211
217
|
};
|
|
212
218
|
}
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
!instance.showHelper &&
|
|
20
20
|
!(
|
|
21
21
|
instance.alwaysShowError &&
|
|
22
|
-
$refs.
|
|
23
|
-
$refs.
|
|
22
|
+
$refs.root &&
|
|
23
|
+
$refs.root.errorMessages.length
|
|
24
24
|
),
|
|
25
25
|
'zd-no-label': !instance.showLabel,
|
|
26
26
|
'zd-text-input--suffix': !!instance.suffix,
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@change="change()"
|
|
48
48
|
@keyup="keyup($event)"
|
|
49
49
|
@keydown="keydown($event)"
|
|
50
|
-
@click:clear="
|
|
50
|
+
@click:clear="clearInput()"
|
|
51
51
|
:hide-details="instance.autoHintDetails ? 'auto' : false"
|
|
52
52
|
:tabindex="instance.tabStop ? '' : '-1'"
|
|
53
53
|
v-bind="{
|
|
@@ -46,6 +46,10 @@ export const ZdTextareaProps = buildProps({
|
|
|
46
46
|
type: [Number, String],
|
|
47
47
|
default: 5,
|
|
48
48
|
},
|
|
49
|
+
maxRows: {
|
|
50
|
+
type: [Number, String],
|
|
51
|
+
default: 10,
|
|
52
|
+
},
|
|
49
53
|
height: {
|
|
50
54
|
type: [String, Number],
|
|
51
55
|
default: 'auto',
|
|
@@ -60,7 +64,7 @@ const textareaComponent = defineComponent({
|
|
|
60
64
|
props: ZdTextareaProps,
|
|
61
65
|
inheritAttrs: false,
|
|
62
66
|
setup(props, ctx) {
|
|
63
|
-
const { instance, root } = useCreateInstance<Textarea>(props, ctx, Textarea);
|
|
67
|
+
const { instance, root } = useCreateInstance<Textarea>(props, ctx, Textarea, ZdTextareaProps);
|
|
64
68
|
|
|
65
69
|
const { click, mouseenter, mouseleave, focus, blur } = useGetMethods(instance, root);
|
|
66
70
|
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
!instance.showHelper &&
|
|
18
18
|
!(
|
|
19
19
|
instance.alwaysShowError &&
|
|
20
|
-
$refs.
|
|
21
|
-
$refs.
|
|
20
|
+
$refs.root &&
|
|
21
|
+
$refs.root.errorMessages.length
|
|
22
22
|
),
|
|
23
23
|
'zd-no-label': !instance.showLabel,
|
|
24
24
|
'zd-text-input--prepend-icon':
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
@input="input()"
|
|
48
48
|
@keydown="keydown($event)"
|
|
49
49
|
@change="change($event)"
|
|
50
|
+
@click:clear="clearInput()"
|
|
50
51
|
@blur="blur($event)"
|
|
51
52
|
v-bind="{
|
|
52
53
|
'append-inner-icon': !instance.suffix ? $getIcon(instance.appendIcon) : '',
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
rounded: instance.rounded,
|
|
76
77
|
rowHeight: instance.rowHeight,
|
|
77
78
|
rows: instance.rows,
|
|
79
|
+
maxRows: instance.maxRows,
|
|
78
80
|
rules: instance.rules,
|
|
79
81
|
singleLine: true,
|
|
80
82
|
type: instance.type,
|
|
@@ -109,6 +111,8 @@
|
|
|
109
111
|
textarea {
|
|
110
112
|
padding: var(--spacing-2);
|
|
111
113
|
line-height: unset;
|
|
114
|
+
-webkit-mask-image: none;
|
|
115
|
+
mask-image: none;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
&.zd-text-align-left {
|
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
name: 'ZdTime',
|
|
80
80
|
props: ZdTimeProps,
|
|
81
81
|
setup(props, ctx) {
|
|
82
|
-
const { instance, root } = useCreateInstance<Time>(props, ctx, Time);
|
|
82
|
+
const { instance, root } = useCreateInstance<Time>(props, ctx, Time, ZdTimeProps);
|
|
83
83
|
const { isMobile } = useIsMobile();
|
|
84
84
|
const textInputInstance = ref<any>(null);
|
|
85
85
|
const pickerRef = ref<any>(null);
|
|
@@ -69,7 +69,7 @@ const tooltipComponent = defineComponent({
|
|
|
69
69
|
ZdActivatorWrapper,
|
|
70
70
|
},
|
|
71
71
|
setup(props, ctx) {
|
|
72
|
-
const { instance, root } = useCreateInstance<Tooltip>(props, ctx, Tooltip);
|
|
72
|
+
const { instance, root } = useCreateInstance<Tooltip>(props, ctx, Tooltip, ZdTooltipProps);
|
|
73
73
|
|
|
74
74
|
const getLocation = (): any => {
|
|
75
75
|
if (instance.right) return 'right';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-tooltip
|
|
3
|
+
:model-value="isVisible"
|
|
4
|
+
:activator="targetElement"
|
|
5
|
+
:text="text"
|
|
6
|
+
location="bottom"
|
|
7
|
+
:openOnClick="false"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts" setup>
|
|
12
|
+
import { useTooltipManager } from '../../composables/useTooltipManager';
|
|
13
|
+
|
|
14
|
+
const { isVisible, text, targetElement} = useTooltipManager();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style lang="scss">
|
|
18
|
+
.zd-tooltip-overflow {
|
|
19
|
+
&--hidden {
|
|
20
|
+
text-overflow: unset;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--wrap {
|
|
24
|
+
white-space: pre-wrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--clamp {
|
|
28
|
+
white-space: normal;
|
|
29
|
+
-webkit-box-orient: vertical;
|
|
30
|
+
display: -webkit-box;
|
|
31
|
+
|
|
32
|
+
&-2 { -webkit-line-clamp: 2; line-clamp: 2; }
|
|
33
|
+
&-3 { -webkit-line-clamp: 3; line-clamp: 3; }
|
|
34
|
+
&-4 { -webkit-line-clamp: 4; line-clamp: 4; }
|
|
35
|
+
&-5 { -webkit-line-clamp: 5; line-clamp: 5; }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--ellipsis {
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
text-overflow: ellipsis;
|
|
41
|
+
overflow-wrap: break-word;
|
|
42
|
+
white-space: pre;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
</style>
|
|
@@ -48,18 +48,22 @@ export const ZdTreeProps = buildProps({
|
|
|
48
48
|
afterTitleSlot: {
|
|
49
49
|
type: [String, Object] as PropType<ITreeConditionComponent>,
|
|
50
50
|
default: () => [],
|
|
51
|
+
watch: false,
|
|
51
52
|
},
|
|
52
53
|
toolbarSlot: {
|
|
53
54
|
type: Array as PropType<IComponentRender[]>,
|
|
54
55
|
default: () => [],
|
|
56
|
+
watch: false,
|
|
55
57
|
},
|
|
56
58
|
titleSlot: {
|
|
57
59
|
type: Array as PropType<ITreeConditionComponent[]>,
|
|
58
60
|
default: () => [],
|
|
61
|
+
watch: false,
|
|
59
62
|
},
|
|
60
63
|
datasource: {
|
|
61
64
|
type: Object as PropType<IDatasource>,
|
|
62
65
|
default: () => ({}),
|
|
66
|
+
watch: false,
|
|
63
67
|
},
|
|
64
68
|
parentField: {
|
|
65
69
|
type: String,
|
|
@@ -125,7 +129,7 @@ export default defineComponent({
|
|
|
125
129
|
props: ZdTreeProps,
|
|
126
130
|
setup(props, ctx) {
|
|
127
131
|
const treeRef = ref<any>();
|
|
128
|
-
const { instance, root } = useCreateInstance<Tree>(props, ctx, Tree);
|
|
132
|
+
const { instance, root } = useCreateInstance<Tree>(props, ctx, Tree, ZdTreeProps);
|
|
129
133
|
const selectedNodesTitle = ref('');
|
|
130
134
|
const beforeNodeState = ref<IDictionary>({});
|
|
131
135
|
const proxy = getCurrentInstance()?.proxy;
|
|
@@ -38,6 +38,7 @@ export const ZdTreeGridProps = buildProps({
|
|
|
38
38
|
footerSlot: {
|
|
39
39
|
type: Array,
|
|
40
40
|
default: () => [],
|
|
41
|
+
watch: false,
|
|
41
42
|
},
|
|
42
43
|
});
|
|
43
44
|
|
|
@@ -45,7 +46,7 @@ const treeGridComponent = defineComponent({
|
|
|
45
46
|
props: ZdTreeGridProps,
|
|
46
47
|
inheritAttrs: false,
|
|
47
48
|
setup(props, ctx) {
|
|
48
|
-
const { instance, root } = useCreateInstance<TreeGrid, ComponentPublicInstance>(props, ctx, TreeGrid);
|
|
49
|
+
const { instance, root } = useCreateInstance<TreeGrid, ComponentPublicInstance>(props, ctx, TreeGrid, ZdTreeGridProps);
|
|
49
50
|
|
|
50
51
|
const gridScope = useGridInstance({ instance, root });
|
|
51
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridColumn, IGrid } from '@zeedhi/common';
|
|
2
2
|
import Sortable, { MoveEvent, SortableEvent } from 'sortablejs';
|
|
3
|
-
import { ComputedRef, UnwrapNestedRefs, UnwrapRef, onMounted, watch } from 'vue';
|
|
3
|
+
import { ComputedRef, UnwrapNestedRefs, UnwrapRef, onMounted, onUnmounted, watch } from 'vue';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Composable for components that can have their columns dragged
|
|
@@ -33,10 +33,12 @@ export function useColumnDrag<T extends IGrid>({
|
|
|
33
33
|
return event.related.classList.contains('sort-handle');
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
let sortableInstance: Sortable | null = null;
|
|
37
|
+
|
|
36
38
|
const initDragColumns = () => {
|
|
37
39
|
const tr = rootEl.value?.querySelector<HTMLElement>('thead tr');
|
|
38
40
|
if (tr) {
|
|
39
|
-
Sortable.create(tr, {
|
|
41
|
+
sortableInstance = Sortable.create(tr, {
|
|
40
42
|
onEnd: sortColumns,
|
|
41
43
|
onMove: checkMove,
|
|
42
44
|
handle: '.sort-handle',
|
|
@@ -46,15 +48,7 @@ export function useColumnDrag<T extends IGrid>({
|
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
const destroyDragColumns = () => {
|
|
49
|
-
|
|
50
|
-
if (tr) {
|
|
51
|
-
Sortable.create(tr, {
|
|
52
|
-
onEnd: sortColumns,
|
|
53
|
-
onMove: checkMove,
|
|
54
|
-
handle: '.sort-handle',
|
|
55
|
-
scroll: false,
|
|
56
|
-
}).destroy();
|
|
57
|
-
}
|
|
51
|
+
sortableInstance?.destroy();
|
|
58
52
|
};
|
|
59
53
|
|
|
60
54
|
const sortColumns = (event: SortableEvent) => {
|
|
@@ -101,5 +95,9 @@ export function useColumnDrag<T extends IGrid>({
|
|
|
101
95
|
return orderHeaders(instance.columns);
|
|
102
96
|
};
|
|
103
97
|
|
|
98
|
+
onUnmounted(() => {
|
|
99
|
+
destroyDragColumns();
|
|
100
|
+
});
|
|
101
|
+
|
|
104
102
|
return {};
|
|
105
103
|
}
|
|
@@ -40,15 +40,20 @@ export function useGridColumns<T extends IIterable>({
|
|
|
40
40
|
const setViewGetWidth = () => {
|
|
41
41
|
instance.columns.forEach((column) => {
|
|
42
42
|
column.setViewGetWidth(() => {
|
|
43
|
-
const
|
|
43
|
+
const el = rootEl.value;
|
|
44
|
+
if (!el) return 0;
|
|
45
|
+
|
|
46
|
+
const headerColumns = Array.from(el.querySelectorAll<HTMLTableCellElement>('table thead tr th[column-name]'));
|
|
47
|
+
const namedColumnEl = headerColumns.find((col) => col.getAttribute('column-name') === column.name);
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
if (namedColumnEl) {
|
|
50
|
+
return parseFloat(getComputedStyle(namedColumnEl).width) || namedColumnEl.clientWidth || 0;
|
|
51
|
+
}
|
|
46
52
|
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
`);
|
|
53
|
+
const index = instance.columns.filter((col) => col.isVisible).findIndex((col) => col.name === column.name);
|
|
54
|
+
const indexedColumnEl = el.querySelector<HTMLElement>(`table thead tr th[index='${index}']`);
|
|
50
55
|
|
|
51
|
-
return
|
|
56
|
+
return indexedColumnEl?.clientWidth || 0;
|
|
52
57
|
});
|
|
53
58
|
});
|
|
54
59
|
};
|
|
@@ -7,9 +7,11 @@ import { ComputedRef, UnwrapNestedRefs } from 'vue';
|
|
|
7
7
|
export function useTableNavigation<T extends IDataNavigator & IViewNavigator>({
|
|
8
8
|
instance,
|
|
9
9
|
rootEl,
|
|
10
|
+
isNavigableRow,
|
|
10
11
|
}: {
|
|
11
12
|
instance: UnwrapNestedRefs<T>;
|
|
12
13
|
rootEl: ComputedRef<HTMLElement | undefined>;
|
|
14
|
+
isNavigableRow?: (element: Element) => boolean;
|
|
13
15
|
}) {
|
|
14
16
|
const navigate = (direction: 'up' | 'down' | 'left' | 'right', event?: Event) => {
|
|
15
17
|
if (direction === 'up' || direction === 'down') {
|
|
@@ -115,7 +117,9 @@ export function useTableNavigation<T extends IDataNavigator & IViewNavigator>({
|
|
|
115
117
|
};
|
|
116
118
|
|
|
117
119
|
const getArrayFromTrElement = (node: Element | HTMLElement | null) => {
|
|
118
|
-
return getArrayFromElementTag('TR', node).filter(
|
|
120
|
+
return getArrayFromElementTag('TR', node).filter(
|
|
121
|
+
(element) => isElementVisible(element) && (isNavigableRow?.(element) ?? true),
|
|
122
|
+
);
|
|
119
123
|
};
|
|
120
124
|
|
|
121
125
|
const findNextTd = (
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { computed, ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface TooltipManager {
|
|
4
|
+
text: string;
|
|
5
|
+
targetElement: HTMLElement | null;
|
|
6
|
+
showTooltip: (element: HTMLElement, text: string) => void;
|
|
7
|
+
hideTooltip: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const text = ref('');
|
|
11
|
+
|
|
12
|
+
const targetElement = ref<HTMLElement | null>(null);
|
|
13
|
+
|
|
14
|
+
export function useTooltipManager() {
|
|
15
|
+
const showTooltip = (element: HTMLElement, content: string) => {
|
|
16
|
+
targetElement.value = element;
|
|
17
|
+
text.value = content;
|
|
18
|
+
}
|
|
19
|
+
const hideTooltip = () => {
|
|
20
|
+
targetElement.value = null;
|
|
21
|
+
}
|
|
22
|
+
const isVisible = computed(() => (targetElement.value !== null));
|
|
23
|
+
return { isVisible, text, targetElement, showTooltip, hideTooltip };
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { vTooltipOverflow } from './v-tooltip-overflow';
|