hys-ui 0.5.0 → 0.7.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/CHANGELOG.md +16 -0
- package/LICENSE +19 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1055 -753
- package/dist/components/HysDataGrid/gridColumnLayout.js +46 -0
- package/dist/components/HysDataGrid/gridPresentation.js +17 -0
- package/dist/components/HysDataGrid/useGridContextMenu.js +33 -0
- package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
- package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +2 -2
- package/dist/components/HysForm/HysForm2.vue.js +9 -8
- package/dist/components/HysIcon/HysIcon.vue.js +373 -0
- package/dist/components/HysIcon/HysIcon2.vue.js +5 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic.vue.js +147 -0
- package/dist/components/HysIcon/IconGraphic/IconGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.js +7 -0
- package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel2.vue.js +440 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.js +29 -0
- package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic2.vue.js +4 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip.vue.js +19 -0
- package/dist/components/HysIcon/IconTooltip/IconTooltip2.vue.js +4 -0
- package/dist/components/HysIcon/builtins/access.js +180 -0
- package/dist/components/HysIcon/builtins/actions.js +327 -0
- package/dist/components/HysIcon/builtins/business.js +364 -0
- package/dist/components/HysIcon/builtins/catalog/access-1.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/access-2.json.js +35 -0
- package/dist/components/HysIcon/builtins/catalog/accessibility.json.js +26 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-2.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/arrows-3.json.js +42 -0
- package/dist/components/HysIcon/builtins/catalog/charts-1.json.js +50 -0
- package/dist/components/HysIcon/builtins/catalog/charts-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/commerce.json.js +43 -0
- package/dist/components/HysIcon/builtins/catalog/communication-1.json.js +49 -0
- package/dist/components/HysIcon/builtins/catalog/communication-2.json.js +37 -0
- package/dist/components/HysIcon/builtins/catalog/design-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/design-2.json.js +27 -0
- package/dist/components/HysIcon/builtins/catalog/development-1.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/development-2.json.js +60 -0
- package/dist/components/HysIcon/builtins/catalog/development-3.json.js +25 -0
- package/dist/components/HysIcon/builtins/catalog/devices-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/devices-2.json.js +55 -0
- package/dist/components/HysIcon/builtins/catalog/devices-3.json.js +23 -0
- package/dist/components/HysIcon/builtins/catalog/education.json.js +34 -0
- package/dist/components/HysIcon/builtins/catalog/emoji.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/files-1.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/files-2.json.js +47 -0
- package/dist/components/HysIcon/builtins/catalog/files-3.json.js +8 -0
- package/dist/components/HysIcon/builtins/catalog/food-1.json.js +67 -0
- package/dist/components/HysIcon/builtins/catalog/food-2.json.js +40 -0
- package/dist/components/HysIcon/builtins/catalog/home.json.js +36 -0
- package/dist/components/HysIcon/builtins/catalog/layout-1.json.js +46 -0
- package/dist/components/HysIcon/builtins/catalog/layout-2.json.js +45 -0
- package/dist/components/HysIcon/builtins/catalog/manifest.json.js +4 -0
- package/dist/components/HysIcon/builtins/catalog/maps-1.json.js +61 -0
- package/dist/components/HysIcon/builtins/catalog/maps-2.json.js +24 -0
- package/dist/components/HysIcon/builtins/catalog/media-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/media-2.json.js +13 -0
- package/dist/components/HysIcon/builtins/catalog/medical.json.js +30 -0
- package/dist/components/HysIcon/builtins/catalog/nature.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/recreation.json.js +51 -0
- package/dist/components/HysIcon/builtins/catalog/shapes.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-1.json.js +52 -0
- package/dist/components/HysIcon/builtins/catalog/text-2.json.js +54 -0
- package/dist/components/HysIcon/builtins/catalog/text-3.json.js +58 -0
- package/dist/components/HysIcon/builtins/catalog/text-4.json.js +41 -0
- package/dist/components/HysIcon/builtins/catalog/time.json.js +39 -0
- package/dist/components/HysIcon/builtins/catalog/transport-1.json.js +57 -0
- package/dist/components/HysIcon/builtins/catalog/transport-2.json.js +7 -0
- package/dist/components/HysIcon/builtins/catalog/weather.json.js +46 -0
- package/dist/components/HysIcon/builtins/communication.js +314 -0
- package/dist/components/HysIcon/builtins/documents.js +315 -0
- package/dist/components/HysIcon/builtins/extendedCatalog.js +75 -0
- package/dist/components/HysIcon/builtins/iconInCategory.js +11 -0
- package/dist/components/HysIcon/builtins/media.js +255 -0
- package/dist/components/HysIcon/builtins/navigation.js +276 -0
- package/dist/components/HysIcon/builtins/technology.js +189 -0
- package/dist/components/HysIcon/iconBuiltins.js +228 -0
- package/dist/components/HysIcon/iconConfig.js +30 -0
- package/dist/components/HysIcon/iconRegistry.js +183 -0
- package/dist/components/HysIcon/iconSafety.js +191 -0
- package/dist/components/HysIcon/iconStyle.js +70 -0
- package/dist/components/HysIcon/useIconResource.js +75 -0
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +38 -38
- package/dist/components/HysPopconfirm/HysPopconfirm.vue.js +7 -0
- package/dist/components/HysPopconfirm/HysPopconfirm2.vue.js +346 -0
- package/dist/components/HysPopconfirm/usePopconfirmAction.js +32 -0
- package/dist/components/HysResult/HysResult.vue.js +7 -0
- package/dist/components/HysResult/HysResult2.vue.js +124 -0
- package/dist/components/HysSearch/HysSearch.vue.js +2 -2
- package/dist/components/HysSortableList/HysSortableList.vue.js +2 -2
- package/dist/components/HysSortableList/HysSortableList2.vue.js +498 -129
- package/dist/components/HysSortableList/SortableGhost/SortableGhost.vue.js +7 -0
- package/dist/components/HysSortableList/SortableGhost/SortableGhost2.vue.js +43 -0
- package/dist/components/HysSortableList/SortableGhost/useSortGhost.js +54 -0
- package/dist/components/HysSortableList/geometry.js +230 -0
- package/dist/components/HysSortableList/model.js +254 -0
- package/dist/components/HysSortableList/transactions.js +281 -0
- package/dist/components/HysSortableList/useSortDrag.js +270 -0
- package/dist/components/HysSortableList/useSortKeyboard.js +72 -0
- package/dist/components/HysSortableList/useSortWindow.js +144 -0
- package/dist/components/HysSpace/HysSpace.vue.js +7 -0
- package/dist/components/HysSpace/HysSpace2.vue.js +79 -0
- package/dist/components/HysSpace/spaceItems.js +17 -0
- package/dist/components/HysSpin/HysSpin.vue.js +7 -0
- package/dist/components/HysSpin/HysSpin2.vue.js +427 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph.vue.js +334 -0
- package/dist/components/HysSpin/SpinGlyph/SpinGlyph2.vue.js +5 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal.vue.js +7 -0
- package/dist/components/HysSpin/SpinPortal/SpinPortal2.vue.js +66 -0
- package/dist/components/HysSpin/SpinPortal/spinTarget.js +57 -0
- package/dist/components/HysSpin/spinCatalog.js +35 -0
- package/dist/components/HysSpin/spinConfig.js +32 -0
- package/dist/components/HysSpin/spinService.js +160 -0
- package/dist/components/HysSpin/spinStyle.js +39 -0
- package/dist/components/HysSpin/useHysSpinTask.js +92 -0
- package/dist/components/HysSpin/useSpinFullscreen.js +60 -0
- package/dist/components/HysSpin/useSpinVisibility.js +59 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +285 -204
- package/dist/components/HysSplitPane/splitPaneResize.js +75 -0
- package/dist/components/HysTabPane/HysTabPane.vue.js +49 -0
- package/dist/components/HysTabPane/HysTabPane2.vue.js +4 -0
- package/dist/components/HysTable/HysTable.vue.js +3 -3
- package/dist/components/HysTable/HysTable2.vue.js +412 -383
- package/dist/components/HysTable/tableSearch.js +24 -0
- package/dist/components/HysTabs/HysTabs.vue.js +172 -5
- package/dist/components/HysTabs/HysTabs2.vue.js +2 -275
- package/dist/components/HysTabs/TabsMore/TabsMore.vue.js +7 -0
- package/dist/components/HysTabs/TabsMore/TabsMore2.vue.js +133 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels.vue.js +161 -0
- package/dist/components/HysTabs/TabsPanels/TabsPanels2.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts.vue.js +4 -0
- package/dist/components/HysTabs/TabsPrompts/TabsPrompts2.vue.js +88 -0
- package/dist/components/HysTabs/TabsSlot/TabsSlot.js +13 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.js +7 -0
- package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench2.vue.js +687 -0
- package/dist/components/HysTabs/tabsConfig.js +35 -0
- package/dist/components/HysTabs/tabsItems.js +79 -0
- package/dist/components/HysTabs/tabsPersistence.js +118 -0
- package/dist/components/HysTabs/useHysRouteTabs.js +77 -0
- package/dist/components/HysTabs/useTabsDragGhost.js +47 -0
- package/dist/components/HysTabs/useTabsNav.js +127 -0
- package/dist/components/HysTabs/useTabsOverlays.js +52 -0
- package/dist/components/HysTabs/useTabsPanels.js +101 -0
- package/dist/components/HysTabs/useTabsPointer.js +131 -0
- package/dist/components/HysTabs/useTabsState.js +263 -0
- package/dist/components/HysToast/HysToast.vue.js +3 -3
- package/dist/components/HysToast/HysToast2.vue.js +379 -107
- package/dist/components/HysToast/ToastViewport/ToastViewport.vue.js +7 -0
- package/dist/components/HysToast/ToastViewport/ToastViewport2.vue.js +211 -0
- package/dist/components/HysToast/ToastViewport/useToastStackDisclosure.js +71 -0
- package/dist/components/HysToast/toastPresentation.js +98 -0
- package/dist/components/HysToast/useToastActions.js +62 -0
- package/dist/components/HysToast/useToastSwipe.js +48 -0
- package/dist/components/HysToast/useToastTimer.js +90 -0
- package/dist/composables/formLayout.js +20 -42
- package/dist/composables/popupReferenceBinding.js +41 -0
- package/dist/composables/popupSurfaceStyle.js +30 -0
- package/dist/composables/toastEscape.js +18 -10
- package/dist/composables/toastQueue.js +276 -0
- package/dist/composables/toastQueueModel.js +86 -0
- package/dist/composables/toastTasks.js +58 -0
- package/dist/composables/useContainerWidth.js +24 -0
- package/dist/composables/useFloating.js +28 -28
- package/dist/composables/useHysToast.js +117 -135
- package/dist/composables/usePageVisibility.js +19 -0
- package/dist/composables/usePopupSurface.js +181 -356
- package/dist/composables/usePopupSurfaceInteractions.js +173 -0
- package/dist/composables/useSplitPaneDrag.js +29 -26
- package/dist/composables/useSvgInstanceId.js +15 -0
- package/dist/composables/useTable.js +321 -306
- package/dist/composables/useTabularRowNavigation.js +46 -0
- package/dist/index.js +231 -185
- package/dist/internal/MultiSplitPane.vue.js +246 -205
- package/dist/internal/PopupSurfacePanel.vue.js +2 -2
- package/dist/internal/PopupSurfacePanel2.vue.js +35 -30
- package/dist/style.css +1 -1
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +40 -2
- package/dist/types/components/HysDataGrid/gridColumnLayout.d.ts +22 -0
- package/dist/types/components/HysDataGrid/gridPresentation.d.ts +47 -0
- package/dist/types/components/HysDataGrid/useGridContextMenu.d.ts +14 -0
- package/dist/types/components/HysDescriptions/HysDescriptions.vue.d.ts +20 -0
- package/dist/types/components/HysDescriptions/descriptionsTypes.d.ts +54 -0
- package/dist/types/components/HysForm/HysForm.vue.d.ts +1 -1
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +1 -1
- package/dist/types/components/HysIcon/HysIcon.vue.d.ts +76 -0
- package/dist/types/components/HysIcon/IconGraphic/IconGraphic.vue.d.ts +43 -0
- package/dist/types/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.d.ts +17 -0
- package/dist/types/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.d.ts +10 -0
- package/dist/types/components/HysIcon/IconTooltip/IconTooltip.vue.d.ts +11 -0
- package/dist/types/components/HysIcon/builtins/access.d.ts +15 -0
- package/dist/types/components/HysIcon/builtins/actions.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/business.d.ts +31 -0
- package/dist/types/components/HysIcon/builtins/communication.d.ts +27 -0
- package/dist/types/components/HysIcon/builtins/documents.d.ts +29 -0
- package/dist/types/components/HysIcon/builtins/extendedCatalog.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/iconInCategory.d.ts +2 -0
- package/dist/types/components/HysIcon/builtins/media.d.ts +24 -0
- package/dist/types/components/HysIcon/builtins/navigation.d.ts +30 -0
- package/dist/types/components/HysIcon/builtins/technology.d.ts +18 -0
- package/dist/types/components/HysIcon/iconBuiltins.d.ts +2 -0
- package/dist/types/components/HysIcon/iconConfig.d.ts +10 -0
- package/dist/types/components/HysIcon/iconRegistry.d.ts +5 -0
- package/dist/types/components/HysIcon/iconSafety.d.ts +8 -0
- package/dist/types/components/HysIcon/iconStyle.d.ts +6 -0
- package/dist/types/components/HysIcon/iconTypes.d.ts +192 -0
- package/dist/types/components/HysIcon/useIconResource.d.ts +14 -0
- package/dist/types/components/HysModal/HysModal.vue.d.ts +1 -1
- package/dist/types/components/HysPopconfirm/HysPopconfirm.vue.d.ts +85 -0
- package/dist/types/components/HysPopconfirm/popconfirmTypes.d.ts +72 -0
- package/dist/types/components/HysPopconfirm/usePopconfirmAction.d.ts +6 -0
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysResult/HysResult.vue.d.ts +22 -0
- package/dist/types/components/HysResult/resultTypes.d.ts +32 -0
- package/dist/types/components/HysSortableList/HysSortableList.vue.d.ts +48 -25
- package/dist/types/components/HysSortableList/SortableGhost/SortableGhost.vue.d.ts +31 -0
- package/dist/types/components/HysSortableList/SortableGhost/useSortGhost.d.ts +23 -0
- package/dist/types/components/HysSortableList/geometry.d.ts +35 -0
- package/dist/types/components/HysSortableList/model.d.ts +61 -0
- package/dist/types/components/HysSortableList/sortableList.d.ts +151 -0
- package/dist/types/components/HysSortableList/transactions.d.ts +10 -0
- package/dist/types/components/HysSortableList/useSortDrag.d.ts +25 -0
- package/dist/types/components/HysSortableList/useSortKeyboard.d.ts +17 -0
- package/dist/types/components/HysSortableList/useSortWindow.d.ts +16 -0
- package/dist/types/components/HysSpace/HysSpace.vue.d.ts +15 -0
- package/dist/types/components/HysSpace/spaceItems.d.ts +9 -0
- package/dist/types/components/HysSpace/spaceTypes.d.ts +20 -0
- package/dist/types/components/HysSpin/HysSpin.vue.d.ts +84 -0
- package/dist/types/components/HysSpin/SpinGlyph/SpinGlyph.vue.d.ts +16 -0
- package/dist/types/components/HysSpin/SpinPortal/SpinPortal.vue.d.ts +21 -0
- package/dist/types/components/HysSpin/SpinPortal/spinTarget.d.ts +3 -0
- package/dist/types/components/HysSpin/spinCatalog.d.ts +122 -0
- package/dist/types/components/HysSpin/spinConfig.d.ts +10 -0
- package/dist/types/components/HysSpin/spinService.d.ts +7 -0
- package/dist/types/components/HysSpin/spinStyle.d.ts +5 -0
- package/dist/types/components/HysSpin/spinTypes.d.ts +133 -0
- package/dist/types/components/HysSpin/useHysSpinTask.d.ts +4 -0
- package/dist/types/components/HysSpin/useSpinFullscreen.d.ts +17 -0
- package/dist/types/components/HysSpin/useSpinVisibility.d.ts +10 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +25 -2
- package/dist/types/components/HysSplitPane/splitPaneResize.d.ts +17 -0
- package/dist/types/components/HysTabPane/HysTabPane.vue.d.ts +11 -0
- package/dist/types/components/HysTable/HysTable.vue.d.ts +16 -10
- package/dist/types/components/HysTable/tableSearch.d.ts +2 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +83 -74
- package/dist/types/components/HysTabs/TabsMore/TabsMore.vue.d.ts +14 -0
- package/dist/types/components/HysTabs/TabsPanels/TabsPanels.vue.d.ts +17 -0
- package/dist/types/components/HysTabs/TabsPrompts/TabsPrompts.vue.d.ts +7 -0
- package/dist/types/components/HysTabs/TabsSlot/TabsSlot.d.ts +9 -0
- package/dist/types/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.d.ts +32 -0
- package/dist/types/components/HysTabs/tabsConfig.d.ts +4 -0
- package/dist/types/components/HysTabs/tabsItems.d.ts +14 -0
- package/dist/types/components/HysTabs/tabsPersistence.d.ts +6 -0
- package/dist/types/components/HysTabs/tabsTypes.d.ts +236 -0
- package/dist/types/components/HysTabs/useHysRouteTabs.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsDragGhost.d.ts +22 -0
- package/dist/types/components/HysTabs/useTabsNav.d.ts +20 -0
- package/dist/types/components/HysTabs/useTabsOverlays.d.ts +54 -0
- package/dist/types/components/HysTabs/useTabsPanels.d.ts +14 -0
- package/dist/types/components/HysTabs/useTabsPointer.d.ts +30 -0
- package/dist/types/components/HysTabs/useTabsState.d.ts +32 -0
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +2 -2
- package/dist/types/components/HysToast/HysToast.vue.d.ts +44 -46
- package/dist/types/components/HysToast/ToastViewport/ToastViewport.vue.d.ts +25 -0
- package/dist/types/components/HysToast/ToastViewport/useToastStackDisclosure.d.ts +16 -0
- package/dist/types/components/HysToast/toastPresentation.d.ts +8 -0
- package/dist/types/components/HysToast/toastTypes.d.ts +212 -0
- package/dist/types/components/HysToast/useToastActions.d.ts +18 -0
- package/dist/types/components/HysToast/useToastSwipe.d.ts +11 -0
- package/dist/types/components/HysToast/useToastTimer.d.ts +22 -0
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
- package/dist/types/composables/dataGrid.d.ts +34 -0
- package/dist/types/composables/formLayout.d.ts +1 -2
- package/dist/types/composables/popupReferenceBinding.d.ts +9 -0
- package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
- package/dist/types/composables/table.d.ts +10 -1
- package/dist/types/composables/toastEscape.d.ts +1 -1
- package/dist/types/composables/toastQueue.d.ts +121 -0
- package/dist/types/composables/toastQueueModel.d.ts +116 -0
- package/dist/types/composables/toastTasks.d.ts +2 -0
- package/dist/types/composables/useColorPicker.d.ts +1 -1
- package/dist/types/composables/useContainerWidth.d.ts +2 -0
- package/dist/types/composables/useContextMenu.d.ts +1 -1
- package/dist/types/composables/useFloating.d.ts +2 -2
- package/dist/types/composables/useHysToast.d.ts +4 -48
- package/dist/types/composables/usePageVisibility.d.ts +1 -0
- package/dist/types/composables/usePopupSurface.d.ts +28 -22
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +35 -0
- package/dist/types/composables/useSplitPaneDrag.d.ts +2 -2
- package/dist/types/composables/useSvgInstanceId.d.ts +1 -0
- package/dist/types/composables/useTable.d.ts +2 -0
- package/dist/types/composables/useTabularRowNavigation.d.ts +18 -0
- package/dist/types/index.d.ts +33 -6
- package/dist/types/internal/MultiSplitPane.vue.d.ts +10 -1
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,46 +1,63 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Settings2 as
|
|
3
|
-
import { useHysRootAttrs as
|
|
4
|
-
import
|
|
5
|
-
import { useMotion as
|
|
6
|
-
import { gridRows as
|
|
7
|
-
import { useDataGridRemote as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
1
|
+
import { defineComponent as ia, ref as C, useId as ol, computed as f, shallowRef as Ge, watch as F, onMounted as ra, onDeactivated as sa, onBeforeUnmount as ua, openBlock as r, createElementBlock as d, mergeProps as ee, unref as v, createElementVNode as y, createVNode as k, createTextVNode as T, createCommentVNode as g, withCtx as M, toDisplayString as z, createBlock as D, renderSlot as $, normalizeStyle as I, normalizeClass as pe, Fragment as N, renderList as te, withModifiers as U, withKeys as nl, resolveDynamicComponent as il, nextTick as ye } from "vue";
|
|
2
|
+
import { Settings2 as da, ChevronUp as ca, ChevronDown as St, Search as fa, Ellipsis as va, ChevronRight as rl } from "lucide-vue-next";
|
|
3
|
+
import { useHysRootAttrs as pa } from "../../config.js";
|
|
4
|
+
import ya from "../../motion/PopupMotion.js";
|
|
5
|
+
import { useMotion as ga } from "../../motion/useMotion.js";
|
|
6
|
+
import { gridRows as ma, gridValue as Ne, gridTree as ha, gridToken as W, positiveInteger as xt, gridKey as ba } from "../../composables/dataGrid.js";
|
|
7
|
+
import { useDataGridRemote as ka } from "../../composables/useDataGridRemote.js";
|
|
8
|
+
import { useTabularRowNavigation as wa } from "../../composables/useTabularRowNavigation.js";
|
|
9
|
+
import { normalizeGridColumnLayout as sl, gridMaxColumnWidth as ul, gridMinColumnWidth as dl, gridBoundColumnWidth as at } from "./gridColumnLayout.js";
|
|
10
|
+
import { gridHeaderGroups as Ca } from "./gridPresentation.js";
|
|
11
|
+
import { useGridContextMenu as Sa } from "./useGridContextMenu.js";
|
|
12
|
+
import xa from "../HysContextMenu/HysContextMenu.vue.js";
|
|
13
|
+
import Ra from "../HysSortableList/HysSortableList.vue.js";
|
|
14
|
+
import cl from "../HysSelect/HysSelect.vue.js";
|
|
15
|
+
import ot from "../HysInput/HysInput.vue.js";
|
|
16
|
+
import Rt from "../HysCheckbox/HysCheckbox.vue.js";
|
|
17
|
+
import Ma from "../HysRadio/HysRadio.vue.js";
|
|
18
|
+
import B from "../HysButton/HysButton.vue.js";
|
|
19
|
+
import za from "../HysPagination/HysPagination.vue.js";
|
|
20
|
+
const Ka = ["aria-busy"], Ta = { class: "hys-ui-pf-grid-toolbar" }, Da = { class: "hys-ui-pf-grid-search" }, Ea = {
|
|
16
21
|
key: 0,
|
|
17
22
|
class: "hys-ui-pf-grid-group-label"
|
|
18
|
-
},
|
|
23
|
+
}, Na = {
|
|
19
24
|
key: 1,
|
|
20
25
|
class: "hys-ui-pf-grid-batch"
|
|
21
|
-
},
|
|
26
|
+
}, Ba = { class: "hys-ui-pf-grid-count" }, Aa = {
|
|
22
27
|
key: 0,
|
|
23
28
|
class: "hys-ui-pf-grid-panel"
|
|
24
|
-
},
|
|
29
|
+
}, La = { key: 0 }, Va = { key: 1 }, Oa = {
|
|
25
30
|
key: 0,
|
|
26
|
-
|
|
27
|
-
},
|
|
31
|
+
class: "hys-ui-pf-grid-header-groups"
|
|
32
|
+
}, Fa = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "hys-ui-pf-grid-select-col"
|
|
35
|
+
}, qa = ["scope", "colspan"], Ha = {
|
|
28
36
|
key: 0,
|
|
29
37
|
scope: "col",
|
|
30
38
|
class: "hys-ui-pf-grid-select-col"
|
|
31
|
-
},
|
|
39
|
+
}, $a = { key: 1 }, Ia = ["tabindex", "data-column-key", "data-drop-position", "draggable", "onDragstart", "onDragover", "onDrop", "onClick", "onContextmenu", "onKeydown", "aria-sort"], Ua = { class: "hys-ui-pf-grid-head" }, Pa = { class: "hys-ui-pf-grid-sort-label" }, ja = {
|
|
40
|
+
key: 1,
|
|
41
|
+
class: "hys-ui-pf-grid-sort-label"
|
|
42
|
+
}, Ga = ["aria-label"], Qa = ["aria-label", "onPointerdown", "aria-valuemin", "aria-valuemax", "aria-valuenow", "onKeydown"], Wa = ["id"], Ja = {
|
|
32
43
|
key: 0,
|
|
33
44
|
class: "hys-ui-pf-grid-select-col"
|
|
34
|
-
},
|
|
45
|
+
}, Xa = ["data-filter-key", "data-column-key"], Ya = { key: 0 }, Za = ["colspan"], _a = {
|
|
46
|
+
class: "hys-ui-pf-grid-state",
|
|
47
|
+
role: "status"
|
|
48
|
+
}, eo = { key: 1 }, to = ["colspan"], lo = { class: "hys-ui-pf-grid-state" }, ao = {
|
|
35
49
|
key: 0,
|
|
36
50
|
class: "hys-ui-pf-grid-group-row"
|
|
37
|
-
},
|
|
51
|
+
}, oo = ["colspan"], no = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "hys-ui-pf-grid-group-summary"
|
|
54
|
+
}, io = { key: 0 }, ro = ["data-grid-row", "aria-current", "onClick", "onDblclick", "onContextmenu"], so = {
|
|
38
55
|
key: 0,
|
|
39
56
|
class: "hys-ui-pf-grid-select-col"
|
|
40
|
-
},
|
|
57
|
+
}, uo = ["data-column-key", "tabindex", "title", "onClick", "onDblclick", "onContextmenu", "onKeydown"], co = ["inert"], fo = { key: 0 }, vo = ["colspan"], po = { class: "hys-ui-pf-grid-state" }, yo = { key: 2 }, go = { class: "hys-ui-pf-grid-summary-row" }, mo = {
|
|
41
58
|
key: 0,
|
|
42
59
|
class: "hys-ui-pf-grid-select-col"
|
|
43
|
-
},
|
|
60
|
+
}, ho = ["data-column-key"], bo = { class: "hys-ui-pf-grid-footer" }, qo = /* @__PURE__ */ ia({
|
|
44
61
|
__name: "HysDataGrid",
|
|
45
62
|
props: {
|
|
46
63
|
columns: {},
|
|
@@ -69,300 +86,369 @@ const $a = ["aria-busy"], Ia = { class: "hys-ui-pf-grid-toolbar" }, ja = { class
|
|
|
69
86
|
maxHeight: {},
|
|
70
87
|
scrollToTopOnQuery: { type: Boolean },
|
|
71
88
|
groupable: { type: Boolean },
|
|
89
|
+
groupBy: {},
|
|
90
|
+
defaultGroupBy: {},
|
|
91
|
+
groupSummary: { type: Boolean },
|
|
72
92
|
showSummary: { type: Boolean },
|
|
93
|
+
summaryScope: { default: "filtered" },
|
|
73
94
|
summaryMethod: {},
|
|
74
95
|
treeMode: { type: Boolean },
|
|
75
96
|
parentKey: { default: "parentId" },
|
|
76
97
|
editable: { type: Boolean },
|
|
98
|
+
keyboardNavigation: { type: Boolean },
|
|
99
|
+
caption: {},
|
|
100
|
+
striped: { type: Boolean },
|
|
101
|
+
highlightCurrentRow: { type: Boolean },
|
|
102
|
+
currentRowKey: {},
|
|
103
|
+
defaultCurrentRowKey: {},
|
|
104
|
+
rowClassName: {},
|
|
105
|
+
rowStyle: {},
|
|
106
|
+
cellClassName: {},
|
|
107
|
+
cellStyle: {},
|
|
108
|
+
headerClassName: {},
|
|
109
|
+
headerStyle: {},
|
|
110
|
+
contextMenu: { type: [Boolean, Function] },
|
|
77
111
|
popupTransition: {},
|
|
78
112
|
popupTransitionDuration: {}
|
|
79
113
|
},
|
|
80
|
-
emits: ["rowClick", "selectionChange", "update:selectedRowKeys", "columnsChange", "sortChange", "pageChange", "pageSizeChange", "update:query", "queryChange", "loadError", "cellEdit", "batchEdit"],
|
|
81
|
-
setup(
|
|
82
|
-
const i =
|
|
114
|
+
emits: ["rowClick", "selectionChange", "update:selectedRowKeys", "columnsChange", "columnLayoutChange", "update:currentRowKey", "currentChange", "headerClick", "headerContextmenu", "rowDblclick", "rowContextmenu", "cellClick", "cellDblclick", "cellContextmenu", "contextMenuSelect", "update:groupBy", "groupChange", "sortChange", "pageChange", "pageSizeChange", "update:query", "queryChange", "loadError", "cellEdit", "batchEdit"],
|
|
115
|
+
setup(s, { expose: fl, emit: vl }) {
|
|
116
|
+
const i = s, p = vl, pl = pa(), ge = C(null), le = C(null), nt = C(null), ae = C(!1), oe = C(!1), me = C(), Mt = ol(), yl = ol(), S = f(
|
|
83
117
|
() => new Map(i.columns.map((e) => [e.key, e]))
|
|
84
118
|
);
|
|
85
|
-
function
|
|
86
|
-
const
|
|
119
|
+
function he(e) {
|
|
120
|
+
const l = [], t = /* @__PURE__ */ new Set();
|
|
87
121
|
for (const o of e.sort ?? []) {
|
|
88
|
-
const n =
|
|
89
|
-
if (!(!n || n.sortable === !1 || t.has(o.key)) && !(o.direction !== "asc" && o.direction !== "desc") && (t.add(o.key),
|
|
122
|
+
const n = S.value.get(o.key);
|
|
123
|
+
if (!(!n || n.sortable === !1 || t.has(o.key)) && !(o.direction !== "asc" && o.direction !== "desc") && (t.add(o.key), l.push({ key: o.key, direction: o.direction }), !i.multiSort))
|
|
90
124
|
break;
|
|
91
125
|
}
|
|
92
|
-
const
|
|
126
|
+
const a = Object.fromEntries(
|
|
93
127
|
Object.entries(e.filters ?? {}).filter(([o, n]) => {
|
|
94
|
-
const
|
|
95
|
-
return
|
|
128
|
+
const c = S.value.get(o);
|
|
129
|
+
return c && c.filterable !== !1 && typeof n == "string" && n !== "";
|
|
96
130
|
})
|
|
97
131
|
);
|
|
98
132
|
return {
|
|
99
|
-
page:
|
|
100
|
-
pageSize:
|
|
101
|
-
sort:
|
|
133
|
+
page: xt(e.page, 1),
|
|
134
|
+
pageSize: xt(e.pageSize, 10),
|
|
135
|
+
sort: l,
|
|
102
136
|
search: e.search ?? "",
|
|
103
|
-
filters:
|
|
137
|
+
filters: a
|
|
104
138
|
};
|
|
105
139
|
}
|
|
106
|
-
const
|
|
107
|
-
var e,
|
|
108
|
-
return
|
|
140
|
+
const zt = () => {
|
|
141
|
+
var e, l;
|
|
142
|
+
return he({
|
|
109
143
|
...i.defaultQuery,
|
|
110
144
|
page: i.page ?? ((e = i.defaultQuery) == null ? void 0 : e.page),
|
|
111
|
-
pageSize: i.pageSize ?? ((
|
|
145
|
+
pageSize: i.pageSize ?? ((l = i.defaultQuery) == null ? void 0 : l.pageSize)
|
|
112
146
|
});
|
|
113
|
-
},
|
|
114
|
-
() =>
|
|
115
|
-
),
|
|
116
|
-
get: () =>
|
|
147
|
+
}, ne = Ge(zt()), be = f(
|
|
148
|
+
() => he(i.query ?? ne.value)
|
|
149
|
+
), x = f(() => be.value.sort), it = f({
|
|
150
|
+
get: () => be.value.search,
|
|
117
151
|
set: (e) => J({ search: e, page: 1 })
|
|
118
|
-
}),
|
|
119
|
-
|
|
120
|
-
|
|
152
|
+
}), Qe = f(() => be.value.filters), rt = (e) => Object.hasOwn(Qe.value, e) ? Qe.value[e] : "", ie = f(() => be.value.pageSize), ke = f(() => i.serverMode || !!i.loadRows), Kt = C(), we = f(() => {
|
|
153
|
+
const e = i.groupBy ?? Kt.value ?? i.defaultGroupBy ?? "";
|
|
154
|
+
return S.value.has(e) ? e : "";
|
|
155
|
+
});
|
|
156
|
+
function Tt(e) {
|
|
157
|
+
const l = S.value.has(e) ? e : "";
|
|
158
|
+
l !== we.value && (i.groupBy === void 0 && (Kt.value = l), p("update:groupBy", l));
|
|
159
|
+
}
|
|
160
|
+
const Ce = Ge(/* @__PURE__ */ new Set()), re = Ge(/* @__PURE__ */ new Set()), P = C(null), We = C(""), Be = C(""), Je = C(""), gl = new Intl.Collator("zh-CN", { numeric: !0 }), se = f(() => ({
|
|
161
|
+
...be.value,
|
|
162
|
+
page: Math.min(be.value.page, dt.value)
|
|
121
163
|
})), {
|
|
122
|
-
pending:
|
|
123
|
-
failure:
|
|
124
|
-
reload:
|
|
125
|
-
sourceRows:
|
|
126
|
-
remoteTotal:
|
|
127
|
-
} =
|
|
128
|
-
() =>
|
|
129
|
-
|
|
164
|
+
pending: ml,
|
|
165
|
+
failure: Ae,
|
|
166
|
+
reload: hl,
|
|
167
|
+
sourceRows: Dt,
|
|
168
|
+
remoteTotal: Xe
|
|
169
|
+
} = ka(i, se, (e) => p("loadError", e)), ue = f(() => i.loading || ml.value), Et = f(
|
|
170
|
+
() => ma(
|
|
171
|
+
Dt.value,
|
|
130
172
|
i.rowKey,
|
|
131
|
-
|
|
173
|
+
ke.value ? (se.value.page - 1) * ie.value : 0
|
|
132
174
|
)
|
|
133
|
-
),
|
|
134
|
-
const e =
|
|
135
|
-
if (
|
|
136
|
-
const
|
|
175
|
+
), Se = (e, l) => String(Ne(e, l) ?? ""), Le = f(() => {
|
|
176
|
+
const e = Et.value;
|
|
177
|
+
if (ke.value) return e;
|
|
178
|
+
const l = it.value.trim().toLocaleLowerCase(), t = Object.entries(Qe.value).flatMap(
|
|
137
179
|
([o, n]) => {
|
|
138
|
-
const
|
|
139
|
-
return
|
|
180
|
+
const c = S.value.get(o);
|
|
181
|
+
return c ? [{ column: c, value: n, term: n.toLocaleLowerCase() }] : [];
|
|
140
182
|
}
|
|
141
|
-
),
|
|
142
|
-
({ row: o }) => (!
|
|
143
|
-
(n) =>
|
|
183
|
+
), a = e.filter(
|
|
184
|
+
({ row: o }) => (!l || i.columns.some(
|
|
185
|
+
(n) => Se(o, n).toLocaleLowerCase().includes(l)
|
|
144
186
|
)) && t.every(
|
|
145
|
-
(n) => n.column.filterMethod ? n.column.filterMethod(n.value, o) :
|
|
187
|
+
(n) => n.column.filterMethod ? n.column.filterMethod(n.value, o) : Se(o, n.column).toLocaleLowerCase().includes(n.term)
|
|
146
188
|
)
|
|
147
189
|
);
|
|
148
|
-
return
|
|
149
|
-
for (const { key:
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
190
|
+
return x.value.length ? a.sort((o, n) => {
|
|
191
|
+
for (const { key: c, direction: m } of x.value) {
|
|
192
|
+
const b = S.value.get(c), O = Ne(o.row, b), Z = Ne(n.row, b), u = b.sortMethod ? b.sortMethod(o.row, n.row) : typeof O == "number" && typeof Z == "number" ? O - Z : gl.compare(String(O ?? ""), String(Z ?? ""));
|
|
193
|
+
if (u) return m === "asc" ? u : -u;
|
|
152
194
|
}
|
|
153
195
|
return 0;
|
|
154
|
-
}) :
|
|
155
|
-
}),
|
|
156
|
-
() => i.treeMode ?
|
|
157
|
-
),
|
|
158
|
-
() =>
|
|
196
|
+
}) : a;
|
|
197
|
+
}), st = f(
|
|
198
|
+
() => i.treeMode ? ha(Le.value, i.parentKey, Ce.value) : Le.value.map((e) => ({ ...e, depth: 0, hasChildren: !1 }))
|
|
199
|
+
), ut = f(
|
|
200
|
+
() => ke.value ? Math.max(
|
|
159
201
|
0,
|
|
160
202
|
Math.floor(
|
|
161
|
-
Number.isFinite(
|
|
203
|
+
Number.isFinite(Xe.value) ? Xe.value : Dt.value.length
|
|
162
204
|
)
|
|
163
|
-
) :
|
|
164
|
-
),
|
|
165
|
-
() => i.loadRows &&
|
|
166
|
-
),
|
|
167
|
-
() =>
|
|
168
|
-
(
|
|
169
|
-
|
|
205
|
+
) : st.value.length
|
|
206
|
+
), dt = f(
|
|
207
|
+
() => i.loadRows && Xe.value === void 0 ? Number.MAX_SAFE_INTEGER : Math.max(1, Math.ceil(ut.value / ie.value))
|
|
208
|
+
), xe = f(() => se.value.page), Ve = f(
|
|
209
|
+
() => ke.value ? st.value : st.value.slice(
|
|
210
|
+
(xe.value - 1) * ie.value,
|
|
211
|
+
xe.value * ie.value
|
|
170
212
|
)
|
|
171
|
-
),
|
|
213
|
+
), Oe = () => he(se.value);
|
|
172
214
|
function J(e) {
|
|
173
|
-
const
|
|
174
|
-
JSON.stringify(
|
|
215
|
+
const l = he({ ...se.value, ...e });
|
|
216
|
+
JSON.stringify(l) !== JSON.stringify(se.value) && (i.query === void 0 && (ne.value = l), p("update:query", he(l)));
|
|
175
217
|
}
|
|
176
|
-
function
|
|
177
|
-
J(
|
|
218
|
+
function bl() {
|
|
219
|
+
J(zt());
|
|
178
220
|
}
|
|
179
|
-
function
|
|
180
|
-
i.loadRows ?
|
|
221
|
+
function ct() {
|
|
222
|
+
i.loadRows ? hl() : p("queryChange", Oe());
|
|
181
223
|
}
|
|
182
|
-
function
|
|
183
|
-
J({ filters: { ...
|
|
224
|
+
function Nt(e, l) {
|
|
225
|
+
J({ filters: { ...Qe.value, [e]: l }, page: 1 });
|
|
184
226
|
}
|
|
185
|
-
|
|
227
|
+
F(
|
|
186
228
|
[() => i.page, () => i.pageSize],
|
|
187
|
-
([e,
|
|
188
|
-
const o =
|
|
189
|
-
|
|
229
|
+
([e, l], [t, a]) => {
|
|
230
|
+
const o = ne.value;
|
|
231
|
+
ne.value = he({
|
|
190
232
|
...o,
|
|
191
|
-
page: e !== t ? e :
|
|
192
|
-
pageSize:
|
|
233
|
+
page: e !== t ? e : l !== a ? 1 : o.page,
|
|
234
|
+
pageSize: l !== a ? l : o.pageSize
|
|
193
235
|
});
|
|
194
236
|
}
|
|
195
|
-
),
|
|
196
|
-
i.query === void 0 &&
|
|
197
|
-
}),
|
|
198
|
-
() => JSON.stringify(
|
|
237
|
+
), F([dt, () => ne.value.page], ([e]) => {
|
|
238
|
+
i.query === void 0 && ne.value.page > e && (ne.value = { ...ne.value, page: e });
|
|
239
|
+
}), F(
|
|
240
|
+
() => JSON.stringify(se.value),
|
|
199
241
|
() => {
|
|
200
|
-
|
|
242
|
+
P.value = null, i.scrollToTopOnQuery && le.value && (le.value.scrollTop = 0), p("queryChange", Oe());
|
|
201
243
|
},
|
|
202
244
|
{ flush: "post" }
|
|
203
|
-
),
|
|
204
|
-
i.immediateQuery &&
|
|
245
|
+
), ra(() => {
|
|
246
|
+
i.immediateQuery && p("queryChange", Oe());
|
|
205
247
|
});
|
|
206
|
-
let
|
|
207
|
-
async function
|
|
208
|
-
if (
|
|
209
|
-
const
|
|
210
|
-
J({ page: Math.min(e,
|
|
248
|
+
let ft = !1;
|
|
249
|
+
async function kl(e) {
|
|
250
|
+
if (ft) return;
|
|
251
|
+
const l = xe.value;
|
|
252
|
+
J({ page: Math.min(e, dt.value) }), await ye(), xe.value !== l && p("pageChange", xe.value);
|
|
211
253
|
}
|
|
212
|
-
async function
|
|
213
|
-
const
|
|
214
|
-
|
|
254
|
+
async function wl(e) {
|
|
255
|
+
const l = ie.value;
|
|
256
|
+
ft = !0, J({ pageSize: e, page: 1 }), await ye(), ft = !1, ie.value !== l && p("pageSizeChange", ie.value);
|
|
215
257
|
}
|
|
216
|
-
async function
|
|
258
|
+
async function Ye(e, l) {
|
|
217
259
|
if (e.sortable === !1) return;
|
|
218
|
-
const t = JSON.stringify(
|
|
219
|
-
|
|
260
|
+
const t = JSON.stringify(x.value), a = i.multiSort ? x.value.filter((o) => o.key !== e.key) : [];
|
|
261
|
+
l && a.push({ key: e.key, direction: l }), J({ sort: a, page: 1 }), await ye(), JSON.stringify(x.value) !== t && p("sortChange", x.value[0] ?? null);
|
|
220
262
|
}
|
|
221
|
-
function
|
|
263
|
+
function Cl(e) {
|
|
222
264
|
var t;
|
|
223
|
-
const
|
|
224
|
-
(
|
|
265
|
+
const l = (t = x.value.find(
|
|
266
|
+
(a) => a.key === e.key
|
|
225
267
|
)) == null ? void 0 : t.direction;
|
|
226
|
-
|
|
268
|
+
Ye(
|
|
227
269
|
e,
|
|
228
|
-
|
|
270
|
+
l === "asc" ? "desc" : l === "desc" ? null : "asc"
|
|
229
271
|
);
|
|
230
272
|
}
|
|
231
|
-
function
|
|
232
|
-
var
|
|
233
|
-
const t = (
|
|
273
|
+
function Bt(e, l) {
|
|
274
|
+
var a;
|
|
275
|
+
const t = (a = x.value.find(
|
|
234
276
|
(o) => o.key === e.key
|
|
235
|
-
)) == null ? void 0 :
|
|
236
|
-
|
|
277
|
+
)) == null ? void 0 : a.direction;
|
|
278
|
+
Ye(e, t === l ? null : l);
|
|
237
279
|
}
|
|
238
|
-
const
|
|
280
|
+
const Sl = f(
|
|
239
281
|
() => i.columns.filter((e) => e.key !== i.rowKey)
|
|
240
282
|
);
|
|
241
|
-
function
|
|
283
|
+
function xl(e, l) {
|
|
242
284
|
try {
|
|
243
285
|
return "group:" + JSON.stringify(e ?? null);
|
|
244
286
|
} catch {
|
|
245
|
-
return "group:" + typeof e + ":" +
|
|
287
|
+
return "group:" + typeof e + ":" + l;
|
|
246
288
|
}
|
|
247
289
|
}
|
|
248
|
-
const
|
|
249
|
-
const e =
|
|
290
|
+
const vt = f(() => {
|
|
291
|
+
const e = Ve.value.map((o, n) => ({
|
|
250
292
|
kind: "row",
|
|
251
|
-
key: "row:" +
|
|
293
|
+
key: "row:" + W(o.id),
|
|
252
294
|
item: o,
|
|
253
295
|
pageIndex: n
|
|
254
|
-
})),
|
|
255
|
-
if (!
|
|
296
|
+
})), l = S.value.get(we.value);
|
|
297
|
+
if (!l) return e;
|
|
256
298
|
const t = /* @__PURE__ */ new Map();
|
|
257
299
|
for (const o of e) {
|
|
258
|
-
const n =
|
|
259
|
-
|
|
300
|
+
const n = Ne(o.item.row, l), c = n == null || n === "" ? "(空)" : String(n), m = xl(n, c), b = t.get(m);
|
|
301
|
+
b ? b.rows.push(o) : t.set(m, { label: c, rows: [o] });
|
|
260
302
|
}
|
|
261
|
-
const
|
|
303
|
+
const a = [];
|
|
262
304
|
for (const [o, n] of t)
|
|
263
|
-
|
|
305
|
+
a.push({
|
|
264
306
|
kind: "group",
|
|
265
307
|
key: o,
|
|
266
308
|
label: n.label,
|
|
267
|
-
|
|
268
|
-
}),
|
|
269
|
-
return
|
|
309
|
+
rows: n.rows.map(({ item: c }) => c.row)
|
|
310
|
+
}), re.value.has(o) || a.push(...n.rows);
|
|
311
|
+
return a;
|
|
312
|
+
}), Fe = f(() => new Map(vt.value.flatMap(
|
|
313
|
+
(e) => e.kind === "row" ? [[W(e.item.id), e.item]] : []
|
|
314
|
+
))), Rl = f(() => [...Fe.value.keys()]), At = wa({
|
|
315
|
+
enabled: () => !!i.keyboardNavigation && !ue.value && Ae.value == null,
|
|
316
|
+
table: () => {
|
|
317
|
+
var e;
|
|
318
|
+
return (e = le.value) == null ? void 0 : e.querySelector(":scope > table");
|
|
319
|
+
},
|
|
320
|
+
tokens: () => Rl.value,
|
|
321
|
+
attribute: "data-grid-row",
|
|
322
|
+
toggle(e) {
|
|
323
|
+
const l = Fe.value.get(e);
|
|
324
|
+
return !l || !i.selectable || !ze(l) ? !1 : (Ie(l.id), !0);
|
|
325
|
+
}
|
|
270
326
|
});
|
|
271
|
-
function
|
|
327
|
+
function Lt(e, l) {
|
|
272
328
|
const t = new Set(e);
|
|
273
|
-
return t.has(
|
|
329
|
+
return t.has(l) ? t.delete(l) : t.add(l), t;
|
|
274
330
|
}
|
|
275
|
-
function
|
|
276
|
-
|
|
331
|
+
function Ml(e) {
|
|
332
|
+
Ce.value = Lt(Ce.value, e);
|
|
277
333
|
}
|
|
278
|
-
function
|
|
279
|
-
|
|
334
|
+
function zl(e) {
|
|
335
|
+
re.value = Lt(re.value, e);
|
|
280
336
|
}
|
|
281
|
-
|
|
282
|
-
|
|
337
|
+
F(we, () => {
|
|
338
|
+
re.value = /* @__PURE__ */ new Set(), p("groupChange", we.value);
|
|
283
339
|
});
|
|
284
|
-
function
|
|
285
|
-
|
|
340
|
+
function Kl(e) {
|
|
341
|
+
const l = vt.value.flatMap((a) => a.kind === "group" ? [a.key] : []), t = new Set(re.value);
|
|
342
|
+
for (const a of l)
|
|
343
|
+
e ? t.delete(a) : t.add(a);
|
|
344
|
+
re.value = t;
|
|
286
345
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
289
|
-
|
|
346
|
+
function Vt(e, l) {
|
|
347
|
+
if (!i.editable || !l.editable) return;
|
|
348
|
+
const t = { id: e.id, key: l.key };
|
|
349
|
+
P.value = t, We.value = Se(e.row, l), ye(() => {
|
|
350
|
+
var n, c, m, b;
|
|
351
|
+
if (((n = P.value) == null ? void 0 : n.id) !== t.id || ((c = P.value) == null ? void 0 : c.key) !== t.key) return;
|
|
352
|
+
const a = Array.from(((m = le.value) == null ? void 0 : m.querySelectorAll("[data-grid-row]")) ?? []).find((O) => O.dataset.gridRow === W(t.id)), o = Array.from((a == null ? void 0 : a.cells) ?? []).find((O) => O.dataset.columnKey === t.key);
|
|
353
|
+
(b = o == null ? void 0 : o.querySelector("input")) == null || b.focus();
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
function Ot(e, l) {
|
|
357
|
+
var t, a;
|
|
358
|
+
((t = P.value) == null ? void 0 : t.id) !== e.id || ((a = P.value) == null ? void 0 : a.key) !== l.key || (P.value = null, p("cellEdit", {
|
|
290
359
|
row: e.row,
|
|
291
360
|
rowKey: e.id,
|
|
292
|
-
column:
|
|
293
|
-
value:
|
|
361
|
+
column: l.key,
|
|
362
|
+
value: We.value
|
|
294
363
|
}));
|
|
295
364
|
}
|
|
296
|
-
function
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
365
|
+
function Ze(e, l) {
|
|
366
|
+
var t, a;
|
|
367
|
+
return ((t = P.value) == null ? void 0 : t.id) === e.id && ((a = P.value) == null ? void 0 : a.key) === l.key;
|
|
368
|
+
}
|
|
369
|
+
function Tl(e) {
|
|
370
|
+
!e.isComposing && e.keyCode !== 229 && (P.value = null);
|
|
371
|
+
}
|
|
372
|
+
function Dl() {
|
|
373
|
+
!Be.value || !w.value.length || (p("batchEdit", {
|
|
374
|
+
keys: [...w.value],
|
|
375
|
+
column: Be.value,
|
|
376
|
+
value: Je.value
|
|
377
|
+
}), Je.value = "");
|
|
302
378
|
}
|
|
303
|
-
const
|
|
379
|
+
const El = new Intl.NumberFormat("zh-CN", {
|
|
304
380
|
maximumFractionDigits: 2
|
|
305
|
-
});
|
|
306
|
-
function
|
|
307
|
-
|
|
308
|
-
if (i.summaryMethod) return i.summaryMethod(e, a);
|
|
381
|
+
}), Nl = f(() => Al(i.summaryScope));
|
|
382
|
+
function Ft(e, l = Nl.value) {
|
|
383
|
+
if (i.summaryMethod) return i.summaryMethod(e, l);
|
|
309
384
|
if (!e.summary) return "";
|
|
310
|
-
const t =
|
|
385
|
+
const t = l.map((c) => Ne(c, e)).filter((c) => c != null && c !== "");
|
|
311
386
|
if (e.summary === "count") return String(t.length);
|
|
312
|
-
const
|
|
313
|
-
if (!
|
|
314
|
-
const o =
|
|
315
|
-
(
|
|
387
|
+
const a = t.map(Number).filter(Number.isFinite);
|
|
388
|
+
if (!a.length) return "—";
|
|
389
|
+
const o = a.reduce((c, m) => c + m, 0), n = e.summary === "sum" ? o : e.summary === "avg" ? o / a.length : a.reduce(
|
|
390
|
+
(c, m) => e.summary === "min" ? Math.min(c, m) : Math.max(c, m)
|
|
316
391
|
);
|
|
317
|
-
return
|
|
318
|
-
}
|
|
319
|
-
function
|
|
320
|
-
const
|
|
321
|
-
return i.selectionType === "radio" ?
|
|
322
|
-
}
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
),
|
|
326
|
-
() =>
|
|
327
|
-
),
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
() =>
|
|
334
|
-
),
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
392
|
+
return El.format(n);
|
|
393
|
+
}
|
|
394
|
+
function pt(e) {
|
|
395
|
+
const l = [...new Set(e.filter(ba))];
|
|
396
|
+
return i.selectionType === "radio" ? l.slice(0, 1) : l;
|
|
397
|
+
}
|
|
398
|
+
const qt = Ge(
|
|
399
|
+
pt(i.defaultSelectedRowKeys ?? [])
|
|
400
|
+
), w = f(
|
|
401
|
+
() => pt(i.selectedRowKeys ?? qt.value)
|
|
402
|
+
), yt = C(), Re = f(() => i.currentRowKey !== void 0 ? i.currentRowKey : yt.value === void 0 ? i.defaultCurrentRowKey ?? null : yt.value);
|
|
403
|
+
function gt(e) {
|
|
404
|
+
e === Re.value || e !== null && !Me.value.has(e) || (i.currentRowKey === void 0 && (yt.value = e), p("update:currentRowKey", e));
|
|
405
|
+
}
|
|
406
|
+
F(Re, (e, l) => p("currentChange", e, l));
|
|
407
|
+
const qe = f(() => new Set(w.value)), Me = f(
|
|
408
|
+
() => new Map(Et.value.map((e) => [e.id, e]))
|
|
409
|
+
), ze = (e) => {
|
|
410
|
+
var l;
|
|
411
|
+
return ((l = i.rowSelectable) == null ? void 0 : l.call(i, e.row, e.index)) !== !1;
|
|
412
|
+
}, He = f(
|
|
413
|
+
() => Ve.value.filter(ze).map((e) => e.id)
|
|
414
|
+
), Ht = f(
|
|
415
|
+
() => He.value.length > 0 && He.value.every((e) => qe.value.has(e))
|
|
416
|
+
), Bl = f(
|
|
417
|
+
() => He.value.some((e) => qe.value.has(e))
|
|
418
|
+
), $t = () => [...w.value];
|
|
419
|
+
function Al(e) {
|
|
420
|
+
return e === "selected" ? w.value.flatMap((l) => {
|
|
421
|
+
const t = Me.value.get(l);
|
|
422
|
+
return t ? [t.row] : [];
|
|
423
|
+
}) : (e === "page" ? Ve.value : Le.value).map(({ row: l }) => l);
|
|
424
|
+
}
|
|
425
|
+
function $e(e) {
|
|
426
|
+
const l = pt(e);
|
|
427
|
+
l.length === w.value.length && l.every((t, a) => t === w.value[a]) || (i.selectedRowKeys === void 0 && (qt.value = l), p("update:selectedRowKeys", [...l]));
|
|
428
|
+
}
|
|
429
|
+
F(
|
|
430
|
+
() => JSON.stringify(w.value),
|
|
431
|
+
() => p("selectionChange", $t())
|
|
432
|
+
), F([Me, () => i.reserveSelection, ke], () => {
|
|
433
|
+
i.selectedRowKeys === void 0 && !(i.reserveSelection ?? ke.value) && $e(w.value.filter((e) => Me.value.has(e)));
|
|
348
434
|
});
|
|
349
|
-
function
|
|
350
|
-
const t =
|
|
351
|
-
!i.selectable || !t || !
|
|
352
|
-
|
|
435
|
+
function Ie(e, l = !qe.value.has(e)) {
|
|
436
|
+
const t = Me.value.get(e);
|
|
437
|
+
!i.selectable || !t || !ze(t) || $e(
|
|
438
|
+
l ? i.selectionType === "radio" ? [e] : [...w.value, e] : w.value.filter((a) => a !== e)
|
|
353
439
|
);
|
|
354
440
|
}
|
|
355
|
-
function
|
|
356
|
-
|
|
441
|
+
function Ll() {
|
|
442
|
+
$e([]);
|
|
357
443
|
}
|
|
358
|
-
function
|
|
444
|
+
function Vl(e) {
|
|
359
445
|
if (i.selectionType === "radio") return;
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
e ? [...
|
|
446
|
+
const l = new Set(He.value);
|
|
447
|
+
$e(
|
|
448
|
+
e ? [...w.value, ...l] : w.value.filter((t) => !l.has(t))
|
|
363
449
|
);
|
|
364
450
|
}
|
|
365
|
-
function
|
|
451
|
+
function Ol() {
|
|
366
452
|
if (!i.storageKey || typeof localStorage > "u") return {};
|
|
367
453
|
try {
|
|
368
454
|
const e = JSON.parse(
|
|
@@ -373,884 +459,1100 @@ const $a = ["aria-busy"], Ia = { class: "hys-ui-pf-grid-toolbar" }, ja = { class
|
|
|
373
459
|
return {};
|
|
374
460
|
}
|
|
375
461
|
}
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
Object.
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
462
|
+
const _e = sl(S.value, Ol()), j = C(_e.order), A = C(_e.hidden), R = C(_e.widths), G = C(_e.pins);
|
|
463
|
+
function mt() {
|
|
464
|
+
return {
|
|
465
|
+
order: [...j.value],
|
|
466
|
+
hidden: [...A.value],
|
|
467
|
+
widths: { ...R.value },
|
|
468
|
+
...Object.keys(G.value).length ? { pins: { ...G.value } } : {}
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
function It(e) {
|
|
472
|
+
const l = sl(S.value, e);
|
|
473
|
+
j.value = l.order, A.value = l.hidden, R.value = l.widths, G.value = l.pins;
|
|
474
|
+
}
|
|
475
|
+
const et = Ge(), Q = (e) => {
|
|
476
|
+
var l;
|
|
477
|
+
return ((l = et.value) == null ? void 0 : l.key) === e.key ? et.value.width : Object.hasOwn(R.value, e.key) ? R.value[e.key] : xt(e.width, 160);
|
|
389
478
|
};
|
|
390
|
-
|
|
479
|
+
F(
|
|
391
480
|
() => i.columns.map((e) => [
|
|
392
481
|
e.key,
|
|
393
482
|
e.hideable,
|
|
483
|
+
e.pinnable,
|
|
394
484
|
e.minWidth,
|
|
395
485
|
e.maxWidth
|
|
396
486
|
]),
|
|
397
|
-
(e,
|
|
398
|
-
|
|
399
|
-
const t = F.value, l = [...t.keys()];
|
|
400
|
-
E.value = [
|
|
401
|
-
.../* @__PURE__ */ new Set([...E.value.filter((o) => t.has(o)), ...l])
|
|
402
|
-
], C.value = [
|
|
403
|
-
...new Set(
|
|
404
|
-
C.value.filter(
|
|
405
|
-
(o) => {
|
|
406
|
-
var n;
|
|
407
|
-
return t.has(o) && ((n = t.get(o)) == null ? void 0 : n.hideable) !== !1;
|
|
408
|
-
}
|
|
409
|
-
)
|
|
410
|
-
)
|
|
411
|
-
], l.every((o) => C.value.includes(o)) && (C.value = []), K.value = Object.fromEntries(
|
|
412
|
-
Object.entries(K.value).flatMap(([o, n]) => {
|
|
413
|
-
const r = t.get(o);
|
|
414
|
-
return r ? [[o, qe(r, n)]] : [];
|
|
415
|
-
})
|
|
416
|
-
);
|
|
487
|
+
(e, l) => {
|
|
488
|
+
l && L(), It(mt());
|
|
417
489
|
},
|
|
418
490
|
{ immediate: !0 }
|
|
419
491
|
);
|
|
420
|
-
const
|
|
421
|
-
() =>
|
|
422
|
-
const
|
|
423
|
-
return
|
|
492
|
+
const K = f(
|
|
493
|
+
() => j.value.flatMap((e) => {
|
|
494
|
+
const l = S.value.get(e);
|
|
495
|
+
return l && !A.value.includes(e) ? [l] : [];
|
|
424
496
|
})
|
|
425
|
-
)
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
497
|
+
);
|
|
498
|
+
function q(e) {
|
|
499
|
+
return (Object.hasOwn(G.value, e.key) ? G.value[e.key] : e.pinned) ?? void 0;
|
|
500
|
+
}
|
|
501
|
+
const H = f(() => [
|
|
502
|
+
...K.value.filter((e) => q(e) === "left"),
|
|
503
|
+
...K.value.filter((e) => !q(e)),
|
|
504
|
+
...K.value.filter((e) => q(e) === "right")
|
|
505
|
+
]), ht = f(() => Ca(H.value, q)), Fl = f(() => ht.value.some(({ group: e }) => !!e)), ql = f(
|
|
506
|
+
() => j.value.flatMap((e) => {
|
|
507
|
+
const l = S.value.get(e);
|
|
508
|
+
return l ? [{ id: e, label: l.label }] : [];
|
|
433
509
|
})
|
|
434
510
|
);
|
|
435
|
-
|
|
511
|
+
F([j, A, R, G], () => {
|
|
436
512
|
if (i.storageKey && typeof localStorage < "u")
|
|
437
513
|
try {
|
|
438
514
|
localStorage.setItem(
|
|
439
515
|
"hys-ui-grid:" + i.storageKey,
|
|
440
516
|
JSON.stringify({
|
|
441
|
-
order:
|
|
442
|
-
hidden:
|
|
443
|
-
widths:
|
|
517
|
+
order: j.value,
|
|
518
|
+
hidden: A.value,
|
|
519
|
+
widths: R.value,
|
|
520
|
+
pins: G.value
|
|
444
521
|
})
|
|
445
522
|
);
|
|
446
523
|
} catch {
|
|
447
524
|
}
|
|
448
|
-
|
|
525
|
+
p(
|
|
449
526
|
"columnsChange",
|
|
450
|
-
|
|
451
|
-
);
|
|
527
|
+
H.value.map((e) => e.key)
|
|
528
|
+
), p("columnLayoutChange", mt());
|
|
452
529
|
});
|
|
453
|
-
function
|
|
454
|
-
|
|
530
|
+
function Hl(e) {
|
|
531
|
+
bt(e.key, A.value.includes(e.key));
|
|
532
|
+
}
|
|
533
|
+
function bt(e, l) {
|
|
534
|
+
const t = S.value.get(e);
|
|
535
|
+
return !t || l === !A.value.includes(e) || !l && (t.hideable === !1 || K.value.length <= 1) ? !1 : (L(), ce(), A.value = l ? A.value.filter((a) => a !== e) : [...A.value, e], !0);
|
|
536
|
+
}
|
|
537
|
+
function tt(e, l) {
|
|
538
|
+
const t = S.value.get(e);
|
|
539
|
+
return !t || t.pinnable === !1 || l !== null && l !== "left" && l !== "right" || q(t) === (l ?? void 0) ? !1 : (L(), ce(), De(), G.value = { ...G.value, [e]: l }, t.pinned === (l ?? void 0) && delete G.value[e], !0);
|
|
455
540
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
541
|
+
function $l(e, l) {
|
|
542
|
+
const t = S.value.get(e);
|
|
543
|
+
if (!t || t.resizable === !1 || !Number.isFinite(l)) return !1;
|
|
544
|
+
const a = at(t, l);
|
|
545
|
+
return a === Q(t) ? !1 : (L(), R.value = { ...R.value, [e]: a }, !0);
|
|
546
|
+
}
|
|
547
|
+
function Ut(e) {
|
|
548
|
+
if (!Object.hasOwn(R.value, e)) return !1;
|
|
549
|
+
L();
|
|
550
|
+
const l = { ...R.value };
|
|
551
|
+
return delete l[e], R.value = l, !0;
|
|
552
|
+
}
|
|
553
|
+
const Il = f(
|
|
554
|
+
() => H.value.reduce(
|
|
555
|
+
(e, l) => e + Q(l),
|
|
459
556
|
i.selectable ? 44 : 0
|
|
460
557
|
)
|
|
461
|
-
),
|
|
558
|
+
), Ul = f(() => {
|
|
462
559
|
const e = /* @__PURE__ */ new Map();
|
|
463
|
-
let
|
|
464
|
-
for (const
|
|
465
|
-
|
|
560
|
+
let l = i.selectable ? 44 : 0;
|
|
561
|
+
for (const a of H.value)
|
|
562
|
+
q(a) === "left" && (e.set(a.key, { left: l + "px" }), l += Q(a));
|
|
466
563
|
let t = 0;
|
|
467
|
-
for (const
|
|
468
|
-
|
|
564
|
+
for (const a of [...H.value].reverse())
|
|
565
|
+
q(a) === "right" && (e.set(a.key, { right: t + "px" }), t += Q(a));
|
|
469
566
|
return e;
|
|
470
|
-
}),
|
|
567
|
+
}), Ue = (e, l = !1) => q(e) ? {
|
|
471
568
|
position: "sticky",
|
|
472
|
-
...
|
|
473
|
-
zIndex:
|
|
569
|
+
...Ul.value.get(e.key),
|
|
570
|
+
zIndex: l ? 5 : 2
|
|
474
571
|
} : {};
|
|
475
|
-
async function
|
|
572
|
+
async function Pt(e = !0) {
|
|
476
573
|
var o, n;
|
|
477
|
-
if (
|
|
478
|
-
await
|
|
574
|
+
if (oe.value = !1, !e) return;
|
|
575
|
+
await ye();
|
|
479
576
|
const t = [
|
|
480
|
-
...((o =
|
|
577
|
+
...((o = ge.value) == null ? void 0 : o.querySelectorAll(
|
|
481
578
|
"thead th[data-column-key]"
|
|
482
579
|
)) ?? []
|
|
483
580
|
].find(
|
|
484
|
-
(
|
|
485
|
-
),
|
|
486
|
-
|
|
487
|
-
}
|
|
488
|
-
async function
|
|
489
|
-
var t,
|
|
490
|
-
if (
|
|
491
|
-
await
|
|
581
|
+
(c) => c.dataset.columnKey === me.value
|
|
582
|
+
), a = (t == null ? void 0 : t.querySelector(".hys-ui-pf-grid-filter")) ?? ((n = ge.value) == null ? void 0 : n.querySelector(".hys-ui-pf-grid-filter"));
|
|
583
|
+
a == null || a.focus({ preventScroll: !0 });
|
|
584
|
+
}
|
|
585
|
+
async function jt(e) {
|
|
586
|
+
var t, a, o;
|
|
587
|
+
if (oe.value && me.value === e.key) {
|
|
588
|
+
await Pt(!1);
|
|
492
589
|
return;
|
|
493
590
|
}
|
|
494
|
-
|
|
495
|
-
...((t =
|
|
496
|
-
].find((n) => n.dataset.filterKey === e.key)) == null ? void 0 :
|
|
591
|
+
me.value = e.key, oe.value = !0, await ye(), (o = (a = [
|
|
592
|
+
...((t = ge.value) == null ? void 0 : t.querySelectorAll("[data-filter-key]")) ?? []
|
|
593
|
+
].find((n) => n.dataset.filterKey === e.key)) == null ? void 0 : a.querySelector("input")) == null || o.focus({ preventScroll: !0 });
|
|
497
594
|
}
|
|
498
|
-
let
|
|
499
|
-
function
|
|
500
|
-
!
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
), !
|
|
504
|
-
|
|
595
|
+
let h, Pe = 0, Gt = 0;
|
|
596
|
+
function Qt(e) {
|
|
597
|
+
!h || e.pointerId !== h.pointer || (Gt = at(
|
|
598
|
+
h.column,
|
|
599
|
+
h.width + e.clientX - h.start
|
|
600
|
+
), !Pe && (Pe = requestAnimationFrame(() => {
|
|
601
|
+
Pe = 0, h && (et.value = { key: h.column.key, width: Gt });
|
|
505
602
|
})));
|
|
506
603
|
}
|
|
507
|
-
function
|
|
508
|
-
|
|
604
|
+
function L() {
|
|
605
|
+
h && (cancelAnimationFrame(Pe), Pe = 0, et.value = void 0, document.body.style.cursor === "col-resize" && (document.body.style.cursor = h.cursor), h = void 0, window.removeEventListener("pointermove", Qt), window.removeEventListener("pointerup", Xt), window.removeEventListener("pointercancel", Wt), window.removeEventListener("blur", L), window.removeEventListener("keydown", Jt, !0));
|
|
509
606
|
}
|
|
510
|
-
function
|
|
511
|
-
e.pointerId === (
|
|
607
|
+
function Wt(e) {
|
|
608
|
+
e.pointerId === (h == null ? void 0 : h.pointer) && L();
|
|
512
609
|
}
|
|
513
|
-
function
|
|
514
|
-
e.key === "Escape" &&
|
|
610
|
+
function Jt(e) {
|
|
611
|
+
e.key === "Escape" && h && (e.preventDefault(), e.stopPropagation(), L());
|
|
515
612
|
}
|
|
516
|
-
function
|
|
517
|
-
if (!
|
|
518
|
-
const { column:
|
|
519
|
-
|
|
613
|
+
function Xt(e) {
|
|
614
|
+
if (!h || e.pointerId !== h.pointer) return;
|
|
615
|
+
const { column: l, start: t, width: a } = h, o = e.clientX - t, n = o === 0 ? a : at(l, a + o);
|
|
616
|
+
L(), n !== a && (R.value = { ...R.value, [l.key]: n });
|
|
520
617
|
}
|
|
521
|
-
function
|
|
522
|
-
|
|
523
|
-
column:
|
|
618
|
+
function Pl(e, l) {
|
|
619
|
+
l.resizable === !1 || e.button !== 0 || h || (e.preventDefault(), e.stopPropagation(), h = {
|
|
620
|
+
column: l,
|
|
524
621
|
pointer: e.pointerId,
|
|
525
622
|
start: e.clientX,
|
|
526
|
-
width:
|
|
623
|
+
width: Q(l),
|
|
527
624
|
cursor: document.body.style.cursor
|
|
528
|
-
}, document.body.style.cursor = "col-resize", window.addEventListener("pointermove",
|
|
625
|
+
}, document.body.style.cursor = "col-resize", window.addEventListener("pointermove", Qt), window.addEventListener("pointerup", Xt), window.addEventListener("pointercancel", Wt), window.addEventListener("blur", L), window.addEventListener("keydown", Jt, !0));
|
|
529
626
|
}
|
|
530
|
-
function
|
|
531
|
-
const t = e.shiftKey ? 40 : 10,
|
|
627
|
+
function jl(e, l) {
|
|
628
|
+
const t = e.shiftKey ? 40 : 10, a = Q(l), o = e.key === "ArrowLeft" ? a - t : e.key === "ArrowRight" ? a + t : e.key === "Home" ? dl(l) : e.key === "End" ? ul(l) : void 0;
|
|
532
629
|
if (o === void 0) return;
|
|
533
630
|
e.preventDefault();
|
|
534
|
-
const n =
|
|
535
|
-
n !==
|
|
536
|
-
}
|
|
537
|
-
const { effectiveMotion:
|
|
538
|
-
let
|
|
539
|
-
const
|
|
540
|
-
function
|
|
541
|
-
|
|
542
|
-
for (const e of
|
|
543
|
-
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
e === "off" &&
|
|
631
|
+
const n = at(l, o);
|
|
632
|
+
n !== a && (R.value = { ...R.value, [l.key]: n });
|
|
633
|
+
}
|
|
634
|
+
const { effectiveMotion: lt } = ga(), Ke = C(null), de = C(null);
|
|
635
|
+
let X = 0, Te = null, kt = 0;
|
|
636
|
+
const je = /* @__PURE__ */ new Set(), Yt = 160;
|
|
637
|
+
function De() {
|
|
638
|
+
kt++;
|
|
639
|
+
for (const e of je) e.cancel();
|
|
640
|
+
je.clear();
|
|
641
|
+
}
|
|
642
|
+
F(lt, (e) => {
|
|
643
|
+
e === "off" && De();
|
|
547
644
|
});
|
|
548
|
-
function
|
|
549
|
-
cancelAnimationFrame(
|
|
645
|
+
function ce() {
|
|
646
|
+
cancelAnimationFrame(X), X = 0, Te = null, Ke.value = null, de.value = null;
|
|
550
647
|
}
|
|
551
|
-
function
|
|
552
|
-
if (
|
|
648
|
+
function Gl(e, l) {
|
|
649
|
+
if (h || l.reorderable === !1 || !e.dataTransfer) {
|
|
553
650
|
e.preventDefault();
|
|
554
651
|
return;
|
|
555
652
|
}
|
|
556
|
-
|
|
653
|
+
De(), Ke.value = l.key, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", l.key);
|
|
557
654
|
}
|
|
558
|
-
function
|
|
559
|
-
const
|
|
560
|
-
return !!
|
|
655
|
+
function wt(e) {
|
|
656
|
+
const l = i.columns.find((t) => t.key === Ke.value);
|
|
657
|
+
return !!l && l.key !== e.key && l.reorderable !== !1 && e.reorderable !== !1 && q(l) === q(e);
|
|
561
658
|
}
|
|
562
|
-
function
|
|
563
|
-
const
|
|
659
|
+
function Zt(e, l, t) {
|
|
660
|
+
const a = t.getBoundingClientRect();
|
|
564
661
|
return {
|
|
565
662
|
key: e.key,
|
|
566
|
-
position:
|
|
663
|
+
position: l < a.left + a.width / 2 ? "before" : "after"
|
|
567
664
|
};
|
|
568
665
|
}
|
|
569
|
-
function
|
|
570
|
-
if (!
|
|
571
|
-
cancelAnimationFrame(
|
|
666
|
+
function Ql(e, l) {
|
|
667
|
+
if (!wt(l)) {
|
|
668
|
+
cancelAnimationFrame(X), X = 0, Te = null, de.value = null;
|
|
572
669
|
return;
|
|
573
670
|
}
|
|
574
|
-
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"),
|
|
671
|
+
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), Te = {
|
|
575
672
|
element: e.currentTarget,
|
|
576
|
-
column:
|
|
673
|
+
column: l,
|
|
577
674
|
x: e.clientX
|
|
578
|
-
}, !
|
|
675
|
+
}, !X && (X = requestAnimationFrame(() => {
|
|
579
676
|
var o;
|
|
580
|
-
|
|
581
|
-
const t =
|
|
582
|
-
if (
|
|
583
|
-
const
|
|
584
|
-
(((o =
|
|
677
|
+
X = 0;
|
|
678
|
+
const t = Te;
|
|
679
|
+
if (Te = null, !t || !wt(t.column)) return;
|
|
680
|
+
const a = Zt(t.column, t.x, t.element);
|
|
681
|
+
(((o = de.value) == null ? void 0 : o.key) !== a.key || de.value.position !== a.position) && (de.value = a);
|
|
585
682
|
}));
|
|
586
683
|
}
|
|
587
|
-
function
|
|
588
|
-
e.relatedTarget instanceof Element && e.relatedTarget.closest("th[data-column-key]") && e.currentTarget.contains(e.relatedTarget) || (cancelAnimationFrame(
|
|
684
|
+
function Wl(e) {
|
|
685
|
+
e.relatedTarget instanceof Element && e.relatedTarget.closest("th[data-column-key]") && e.currentTarget.contains(e.relatedTarget) || (cancelAnimationFrame(X), X = 0, Te = null, de.value = null);
|
|
589
686
|
}
|
|
590
|
-
function
|
|
687
|
+
function _t() {
|
|
591
688
|
var e;
|
|
592
689
|
return new Map(
|
|
593
690
|
Array.from(
|
|
594
|
-
((e =
|
|
595
|
-
).map((
|
|
596
|
-
|
|
597
|
-
|
|
691
|
+
((e = ge.value) == null ? void 0 : e.querySelectorAll("th[data-column-key]")) || []
|
|
692
|
+
).map((l) => [
|
|
693
|
+
l.dataset.columnKey,
|
|
694
|
+
l.getBoundingClientRect()
|
|
598
695
|
])
|
|
599
696
|
);
|
|
600
697
|
}
|
|
601
|
-
function
|
|
602
|
-
var
|
|
603
|
-
if (
|
|
604
|
-
const
|
|
698
|
+
function Jl(e) {
|
|
699
|
+
var Z;
|
|
700
|
+
if (lt.value === "off") return;
|
|
701
|
+
const l = (Z = ge.value) == null ? void 0 : Z.querySelector(
|
|
605
702
|
".hys-ui-pf-grid-scroll"
|
|
606
703
|
);
|
|
607
|
-
if (!
|
|
608
|
-
const t =
|
|
609
|
-
if (
|
|
610
|
-
const
|
|
611
|
-
for (const [
|
|
612
|
-
const
|
|
613
|
-
|
|
704
|
+
if (!l) return;
|
|
705
|
+
const t = l.getBoundingClientRect(), a = Math.max(0, t.top), o = Math.min(window.innerHeight, t.bottom), n = Math.max(0, t.left), c = Math.min(window.innerWidth, t.right);
|
|
706
|
+
if (a >= o || n >= c) return;
|
|
707
|
+
const m = /* @__PURE__ */ new Map();
|
|
708
|
+
for (const [u, _] of _t()) {
|
|
709
|
+
const E = e.get(u);
|
|
710
|
+
E && _.right > n && _.left < c && Math.abs(E.left - _.left) > 0.5 && m.set(u, E.left - _.left);
|
|
614
711
|
}
|
|
615
|
-
const
|
|
616
|
-
for (const
|
|
617
|
-
|
|
712
|
+
const b = [];
|
|
713
|
+
for (const u of Array.from(
|
|
714
|
+
l.querySelectorAll("thead tr,tbody tr,tfoot tr")
|
|
618
715
|
)) {
|
|
619
|
-
const
|
|
620
|
-
if (
|
|
621
|
-
if (!(
|
|
622
|
-
for (const
|
|
623
|
-
if (
|
|
624
|
-
if (
|
|
716
|
+
const _ = u.getBoundingClientRect();
|
|
717
|
+
if (_.top >= o) break;
|
|
718
|
+
if (!(_.bottom <= a)) {
|
|
719
|
+
for (const E of Array.from(u.children))
|
|
720
|
+
if (E instanceof HTMLElement && m.has(E.dataset.columnKey || "") && b.push(E), b.length >= Yt) break;
|
|
721
|
+
if (b.length >= Yt) break;
|
|
625
722
|
}
|
|
626
723
|
}
|
|
627
|
-
const
|
|
628
|
-
for (const
|
|
629
|
-
const
|
|
724
|
+
const O = lt.value === "full" ? 280 : 180;
|
|
725
|
+
for (const u of b) {
|
|
726
|
+
const _ = m.get(u.dataset.columnKey), E = u.animate(
|
|
630
727
|
[
|
|
631
|
-
{ transform: "translateX(" +
|
|
728
|
+
{ transform: "translateX(" + _ + "px)" },
|
|
632
729
|
{ transform: "translateX(0)" }
|
|
633
730
|
],
|
|
634
|
-
{ duration:
|
|
731
|
+
{ duration: O, easing: "cubic-bezier(.2,.8,.2,1)" }
|
|
635
732
|
);
|
|
636
|
-
|
|
733
|
+
je.add(E), E.onfinish = () => je.delete(E), E.oncancel = () => je.delete(E);
|
|
637
734
|
}
|
|
638
735
|
}
|
|
639
|
-
async function
|
|
640
|
-
if (!
|
|
641
|
-
|
|
736
|
+
async function Xl(e, l) {
|
|
737
|
+
if (!wt(l)) {
|
|
738
|
+
ce();
|
|
642
739
|
return;
|
|
643
740
|
}
|
|
644
741
|
e.preventDefault();
|
|
645
|
-
const t =
|
|
646
|
-
|
|
742
|
+
const t = Zt(
|
|
743
|
+
l,
|
|
647
744
|
e.clientX,
|
|
648
745
|
e.currentTarget
|
|
649
|
-
),
|
|
746
|
+
), a = j.value.filter((m) => m !== Ke.value), o = a.indexOf(t.key);
|
|
650
747
|
if (o < 0) {
|
|
651
|
-
|
|
748
|
+
ce();
|
|
652
749
|
return;
|
|
653
750
|
}
|
|
654
|
-
if (
|
|
751
|
+
if (a.splice(
|
|
655
752
|
o + (t.position === "after" ? 1 : 0),
|
|
656
753
|
0,
|
|
657
|
-
|
|
658
|
-
),
|
|
659
|
-
|
|
660
|
-
const n =
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
function
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
function
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
754
|
+
Ke.value
|
|
755
|
+
), ce(), a.every((m, b) => m === j.value[b])) return;
|
|
756
|
+
De();
|
|
757
|
+
const n = kt, c = lt.value === "off" ? /* @__PURE__ */ new Map() : _t();
|
|
758
|
+
j.value = a, await ye(), n === kt && Jl(c);
|
|
759
|
+
}
|
|
760
|
+
function el(e) {
|
|
761
|
+
L(), ce(), De(), It(e);
|
|
762
|
+
}
|
|
763
|
+
function tl() {
|
|
764
|
+
el({});
|
|
765
|
+
}
|
|
766
|
+
function Yl() {
|
|
767
|
+
const e = K.value, l = (n) => '"' + n.replace(/"/g, '""') + '"', t = [
|
|
768
|
+
e.map((n) => l(n.label)).join(","),
|
|
769
|
+
...Le.value.map(
|
|
770
|
+
({ row: n }) => e.map((c) => l(Se(n, c))).join(",")
|
|
671
771
|
)
|
|
672
|
-
],
|
|
772
|
+
], a = URL.createObjectURL(
|
|
673
773
|
new Blob(["\uFEFF" + t.join(`\r
|
|
674
774
|
`)], {
|
|
675
775
|
type: "text/csv;charset=utf-8"
|
|
676
776
|
})
|
|
677
777
|
), o = document.createElement("a");
|
|
678
|
-
o.href =
|
|
778
|
+
o.href = a, o.download = "projectflow-table.csv", o.click(), setTimeout(() => URL.revokeObjectURL(a), 1e3);
|
|
679
779
|
}
|
|
680
|
-
const
|
|
780
|
+
const Zl = f(
|
|
681
781
|
() => typeof i.maxHeight == "number" ? i.maxHeight > 0 && Number.isFinite(i.maxHeight) ? i.maxHeight + "px" : void 0 : i.maxHeight
|
|
682
782
|
);
|
|
683
|
-
function
|
|
684
|
-
var
|
|
685
|
-
(
|
|
783
|
+
function _l(e) {
|
|
784
|
+
var l;
|
|
785
|
+
(l = le.value) == null || l.scrollTo(e);
|
|
786
|
+
}
|
|
787
|
+
function ea(e) {
|
|
788
|
+
var t;
|
|
789
|
+
const l = [
|
|
790
|
+
...((t = le.value) == null ? void 0 : t.querySelectorAll("[data-grid-row]")) ?? []
|
|
791
|
+
].find((a) => a.dataset.gridRow === W(e));
|
|
792
|
+
return l == null || l.scrollIntoView({ block: "nearest", inline: "nearest" }), !!l;
|
|
686
793
|
}
|
|
687
|
-
function
|
|
794
|
+
function ve(e) {
|
|
795
|
+
const { item: l, pageIndex: t } = e;
|
|
796
|
+
return {
|
|
797
|
+
row: l.row,
|
|
798
|
+
rowKey: l.id,
|
|
799
|
+
index: l.index,
|
|
800
|
+
pageIndex: t,
|
|
801
|
+
depth: l.depth,
|
|
802
|
+
selected: qe.value.has(l.id),
|
|
803
|
+
current: Re.value === l.id
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
function fe(e, l, t) {
|
|
807
|
+
return { ...ve(e), column: l, columnIndex: t, value: Ne(e.item.row, l) };
|
|
808
|
+
}
|
|
809
|
+
function Y(e, l) {
|
|
688
810
|
var t;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
811
|
+
return {
|
|
812
|
+
column: e,
|
|
813
|
+
columnIndex: l,
|
|
814
|
+
sort: (t = x.value.find((a) => a.key === e.key)) == null ? void 0 : t.direction,
|
|
815
|
+
filter: rt(e.key),
|
|
816
|
+
pinned: q(e)
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
function Ee(e, l) {
|
|
820
|
+
return typeof e == "function" ? e(l) : e;
|
|
821
|
+
}
|
|
822
|
+
function ta(e, l) {
|
|
823
|
+
i.highlightCurrentRow && !l.target.closest("button,a,input,select,textarea,[contenteditable]") && gt(e.item.id), p("rowClick", e.item.row);
|
|
824
|
+
}
|
|
825
|
+
function ll(e, l, t) {
|
|
826
|
+
const a = Y(l, t);
|
|
827
|
+
e.type === "contextmenu" && p("headerContextmenu", a, e), V.open({ ...a, type: "header" }, e);
|
|
828
|
+
}
|
|
829
|
+
function la(e, l) {
|
|
830
|
+
const t = ve(l);
|
|
831
|
+
p("rowContextmenu", t, e), V.open({ ...t, type: "row" }, e);
|
|
832
|
+
}
|
|
833
|
+
function aa(e, l, t, a) {
|
|
834
|
+
const o = fe(l, t, a);
|
|
835
|
+
p("cellContextmenu", o, e), p("rowContextmenu", ve(l), e), !e.target.closest("input,textarea,[contenteditable]") && V.open({ ...o, type: "cell" }, e);
|
|
836
|
+
}
|
|
837
|
+
function oa(e, l, t, a) {
|
|
838
|
+
p("cellDblclick", fe(l, t, a), e), !e.defaultPrevented && !e.target.closest("button,a,input,select,textarea,[contenteditable]") && Vt(l.item, t);
|
|
839
|
+
}
|
|
840
|
+
function na(e) {
|
|
841
|
+
if (e.type === "header") {
|
|
842
|
+
const { column: t, pinned: a, sort: o, filter: n } = e;
|
|
843
|
+
return [
|
|
844
|
+
...t.sortable === !1 ? [] : [
|
|
845
|
+
{ label: "升序排列", value: "sort-asc", disabled: o === "asc" },
|
|
846
|
+
{ label: "降序排列", value: "sort-desc", disabled: o === "desc" },
|
|
847
|
+
{ label: "清除本列排序", value: "clear-sort", disabled: !o }
|
|
848
|
+
],
|
|
849
|
+
...t.filterable === !1 ? [] : [
|
|
850
|
+
{ label: "筛选此列", value: "filter" },
|
|
851
|
+
{ label: "清除本列筛选", value: "clear-filter", disabled: !n }
|
|
852
|
+
],
|
|
853
|
+
...t.pinnable === !1 ? [] : [
|
|
854
|
+
{ label: "固定在左侧", value: "pin-left", disabled: a === "left" },
|
|
855
|
+
{ label: "固定在右侧", value: "pin-right", disabled: a === "right" },
|
|
856
|
+
{ label: "取消固定", value: "unpin", disabled: !a }
|
|
857
|
+
],
|
|
858
|
+
{ label: "隐藏此列", value: "hide-column", disabled: t.hideable === !1 || K.value.length <= 1 },
|
|
859
|
+
{ label: "恢复列宽", value: "reset-width", disabled: !Object.hasOwn(R.value, t.key) }
|
|
860
|
+
];
|
|
861
|
+
}
|
|
862
|
+
const l = Me.value.get(e.rowKey);
|
|
863
|
+
return [
|
|
864
|
+
...i.selectable ? [{ label: e.selected ? "取消选择此行" : "选择此行", value: "toggle-selection", disabled: !l || !ze(l) }] : [],
|
|
865
|
+
...i.highlightCurrentRow ? [{ label: "设为当前行", value: "current-row", disabled: e.current }] : [],
|
|
866
|
+
...e.type === "cell" && i.editable && e.column.editable ? [{ label: "编辑此单元格", value: "edit-cell" }] : []
|
|
867
|
+
];
|
|
868
|
+
}
|
|
869
|
+
const V = Sa({
|
|
870
|
+
enabled: (e) => !!i.contextMenu && !ue.value && (e.type === "header" ? K.value.some((l) => l.key === e.column.key) : Fe.value.has(W(e.rowKey))),
|
|
871
|
+
config: () => i.contextMenu,
|
|
872
|
+
defaults: na,
|
|
873
|
+
select(e, l, t) {
|
|
874
|
+
if (l.type === "header") {
|
|
875
|
+
const a = S.value.get(l.column.key);
|
|
876
|
+
e === "sort-asc" && Ye(a, "asc"), e === "sort-desc" && Ye(a, "desc"), e === "clear-sort" && J({ sort: x.value.filter((o) => o.key !== a.key), page: 1 }), e === "filter" && requestAnimationFrame(() => {
|
|
877
|
+
var o;
|
|
878
|
+
(o = le.value) != null && o.isConnected && K.value.includes(a) && jt(a);
|
|
879
|
+
}), e === "clear-filter" && Nt(a.key, ""), e === "pin-left" && tt(a.key, "left"), e === "pin-right" && tt(a.key, "right"), e === "unpin" && tt(a.key, null), e === "hide-column" && bt(a.key, !1), e === "reset-width" && Ut(a.key);
|
|
880
|
+
} else if (e === "toggle-selection" && Ie(l.rowKey), e === "current-row" && gt(l.rowKey), e === "edit-cell" && l.type === "cell") {
|
|
881
|
+
const a = Fe.value.get(W(l.rowKey)), o = S.value.get(l.column.key);
|
|
882
|
+
a && o && requestAnimationFrame(() => {
|
|
883
|
+
!ue.value && Fe.value.get(W(l.rowKey)) === a && K.value.includes(o) && Vt(a, o);
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
p("contextMenuSelect", e, l, t);
|
|
887
|
+
}
|
|
888
|
+
});
|
|
889
|
+
F([ue, () => i.contextMenu, Ve, H], V.close), fl({
|
|
890
|
+
resetColumns: tl,
|
|
891
|
+
getColumnLayout: mt,
|
|
892
|
+
applyColumnLayout: el,
|
|
893
|
+
setGroupBy: Tt,
|
|
894
|
+
setGroupsExpanded: Kl,
|
|
895
|
+
getQuery: Oe,
|
|
697
896
|
setQuery: J,
|
|
698
|
-
resetQuery:
|
|
699
|
-
reload:
|
|
700
|
-
getSelection:
|
|
701
|
-
clearSelection:
|
|
702
|
-
toggleRowSelection:
|
|
703
|
-
scrollTo:
|
|
704
|
-
scrollToRow:
|
|
897
|
+
resetQuery: bl,
|
|
898
|
+
reload: ct,
|
|
899
|
+
getSelection: $t,
|
|
900
|
+
clearSelection: Ll,
|
|
901
|
+
toggleRowSelection: Ie,
|
|
902
|
+
scrollTo: _l,
|
|
903
|
+
scrollToRow: ea,
|
|
904
|
+
focusRow: (e) => At.focusRow(W(e)),
|
|
905
|
+
getCurrentRowKey: () => Re.value,
|
|
906
|
+
setCurrentRow: gt,
|
|
907
|
+
setColumnVisibility: bt,
|
|
908
|
+
pinColumn: tt,
|
|
909
|
+
resizeColumn: $l,
|
|
910
|
+
resetColumnWidth: Ut
|
|
705
911
|
});
|
|
706
|
-
function
|
|
707
|
-
|
|
912
|
+
function Ct(e) {
|
|
913
|
+
nt.value && !nt.value.contains(e.target) && (ae.value = !1);
|
|
708
914
|
}
|
|
709
|
-
|
|
710
|
-
e ? document.addEventListener("pointerdown",
|
|
915
|
+
F(ae, (e) => {
|
|
916
|
+
e ? document.addEventListener("pointerdown", Ct) : document.removeEventListener("pointerdown", Ct);
|
|
711
917
|
});
|
|
712
|
-
function
|
|
713
|
-
|
|
918
|
+
function al() {
|
|
919
|
+
V.close(), ce(), De(), L(), ae.value = !1, document.removeEventListener("pointerdown", Ct);
|
|
714
920
|
}
|
|
715
|
-
return
|
|
716
|
-
class: ["hys-ui-pf-grid", "hys-ui-pf-grid--" +
|
|
921
|
+
return sa(al), ua(al), (e, l) => (r(), d("section", ee(v(pl), {
|
|
922
|
+
class: ["hys-ui-pf-grid", ["hys-ui-pf-grid--" + s.density, { "hys-ui-pf-grid-striped": s.striped }]],
|
|
717
923
|
"aria-label": "数据表格",
|
|
718
924
|
ref_key: "tableRef",
|
|
719
|
-
ref:
|
|
720
|
-
"aria-busy":
|
|
925
|
+
ref: ge,
|
|
926
|
+
"aria-busy": ue.value || void 0
|
|
721
927
|
}), [
|
|
722
|
-
y("div",
|
|
723
|
-
y("label",
|
|
724
|
-
|
|
725
|
-
|
|
928
|
+
y("div", Ta, [
|
|
929
|
+
y("label", Da, [
|
|
930
|
+
l[14] || (l[14] = y("span", null, "搜索", -1)),
|
|
931
|
+
k(ot, {
|
|
726
932
|
size: "sm",
|
|
727
|
-
modelValue:
|
|
728
|
-
"onUpdate:modelValue":
|
|
933
|
+
modelValue: it.value,
|
|
934
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => it.value = t),
|
|
729
935
|
type: "search",
|
|
730
936
|
placeholder: "搜索全部列…",
|
|
731
937
|
"aria-label": "搜索表格",
|
|
732
938
|
clearable: ""
|
|
733
939
|
}, null, 8, ["modelValue"])
|
|
734
940
|
]),
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
941
|
+
s.groupable ? (r(), d("label", Ea, [
|
|
942
|
+
l[15] || (l[15] = T("分组 ", -1)),
|
|
943
|
+
k(cl, {
|
|
738
944
|
size: "sm",
|
|
739
|
-
|
|
740
|
-
"onUpdate:modelValue":
|
|
945
|
+
"model-value": we.value,
|
|
946
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => Tt(String(t ?? ""))),
|
|
741
947
|
"aria-label": "按列分组",
|
|
742
948
|
options: [
|
|
743
949
|
{ label: "不分组", value: "" },
|
|
744
|
-
...
|
|
950
|
+
...Sl.value.map((t) => ({ label: t.label, value: t.key }))
|
|
745
951
|
]
|
|
746
|
-
}, null, 8, ["
|
|
747
|
-
])) :
|
|
748
|
-
|
|
749
|
-
|
|
952
|
+
}, null, 8, ["model-value", "options"])
|
|
953
|
+
])) : g("", !0),
|
|
954
|
+
s.editable && w.value.length ? (r(), d("div", Na, [
|
|
955
|
+
k(cl, {
|
|
750
956
|
size: "sm",
|
|
751
|
-
modelValue:
|
|
752
|
-
"onUpdate:modelValue":
|
|
957
|
+
modelValue: Be.value,
|
|
958
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => Be.value = t),
|
|
753
959
|
"aria-label": "批量编辑字段",
|
|
754
960
|
options: [
|
|
755
961
|
{ label: "选择编辑列", value: "" },
|
|
756
|
-
...
|
|
962
|
+
...s.columns.filter((t) => t.editable).map((t) => ({ label: t.label, value: t.key }))
|
|
757
963
|
]
|
|
758
964
|
}, null, 8, ["modelValue", "options"]),
|
|
759
|
-
|
|
965
|
+
k(ot, {
|
|
760
966
|
size: "sm",
|
|
761
|
-
modelValue:
|
|
762
|
-
"onUpdate:modelValue":
|
|
967
|
+
modelValue: Je.value,
|
|
968
|
+
"onUpdate:modelValue": l[3] || (l[3] = (t) => Je.value = t),
|
|
763
969
|
"aria-label": "批量编辑值",
|
|
764
970
|
placeholder: "新值"
|
|
765
971
|
}, null, 8, ["modelValue"]),
|
|
766
|
-
|
|
972
|
+
k(B, {
|
|
767
973
|
variant: "ghost",
|
|
768
974
|
size: "sm",
|
|
769
975
|
type: "button",
|
|
770
|
-
disabled: !
|
|
771
|
-
onClick:
|
|
976
|
+
disabled: !Be.value,
|
|
977
|
+
onClick: Dl
|
|
772
978
|
}, {
|
|
773
|
-
default:
|
|
774
|
-
|
|
979
|
+
default: M(() => [
|
|
980
|
+
T("应用到 " + z(w.value.length) + " 行", 1)
|
|
775
981
|
]),
|
|
776
982
|
_: 1
|
|
777
983
|
}, 8, ["disabled"])
|
|
778
|
-
])) :
|
|
779
|
-
|
|
984
|
+
])) : g("", !0),
|
|
985
|
+
oe.value ? (r(), D(B, {
|
|
780
986
|
key: 2,
|
|
781
987
|
variant: "ghost",
|
|
782
988
|
size: "sm",
|
|
783
989
|
type: "button",
|
|
784
|
-
onClick:
|
|
990
|
+
onClick: l[4] || (l[4] = (t) => J({ filters: {}, page: 1 }))
|
|
785
991
|
}, {
|
|
786
|
-
default:
|
|
787
|
-
|
|
992
|
+
default: M(() => [...l[16] || (l[16] = [
|
|
993
|
+
T("清空筛选", -1)
|
|
788
994
|
])]),
|
|
789
995
|
_: 1
|
|
790
|
-
})) :
|
|
791
|
-
y("span",
|
|
996
|
+
})) : g("", !0),
|
|
997
|
+
y("span", Ba, z(ut.value) + " 条记录 · 已选 " + z(w.value.length), 1),
|
|
792
998
|
y("div", {
|
|
793
999
|
class: "hys-ui-pf-grid-menu",
|
|
794
1000
|
ref_key: "menuRef",
|
|
795
|
-
ref:
|
|
1001
|
+
ref: nt
|
|
796
1002
|
}, [
|
|
797
|
-
|
|
1003
|
+
k(B, {
|
|
798
1004
|
variant: "ghost",
|
|
799
1005
|
size: "sm",
|
|
800
1006
|
type: "button",
|
|
801
|
-
onClick:
|
|
802
|
-
"aria-expanded":
|
|
1007
|
+
onClick: l[5] || (l[5] = (t) => ae.value = !ae.value),
|
|
1008
|
+
"aria-expanded": ae.value,
|
|
803
1009
|
"aria-label": "配置显示列"
|
|
804
1010
|
}, {
|
|
805
|
-
default:
|
|
806
|
-
|
|
1011
|
+
default: M(() => [
|
|
1012
|
+
k(v(da), {
|
|
807
1013
|
size: 16,
|
|
808
1014
|
"aria-hidden": "true"
|
|
809
1015
|
}),
|
|
810
|
-
|
|
1016
|
+
l[17] || (l[17] = T(" 列设置", -1))
|
|
811
1017
|
]),
|
|
812
1018
|
_: 1
|
|
813
1019
|
}, 8, ["aria-expanded"]),
|
|
814
|
-
|
|
1020
|
+
k(v(ya), {
|
|
815
1021
|
"popup-transition": i.popupTransition,
|
|
816
1022
|
"popup-transition-duration": i.popupTransitionDuration,
|
|
817
|
-
onInactive:
|
|
1023
|
+
onInactive: l[7] || (l[7] = (t) => ae.value = !1)
|
|
818
1024
|
}, {
|
|
819
|
-
default:
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
1025
|
+
default: M(() => [
|
|
1026
|
+
ae.value ? (r(), d("div", Aa, [
|
|
1027
|
+
l[19] || (l[19] = y("strong", null, "显示列与排序", -1)),
|
|
1028
|
+
k(Ra, {
|
|
823
1029
|
class: "hys-ui-pf-grid-settings-list",
|
|
824
|
-
"model-value":
|
|
825
|
-
"onUpdate:modelValue":
|
|
1030
|
+
"model-value": ql.value,
|
|
1031
|
+
"onUpdate:modelValue": l[6] || (l[6] = (t) => j.value = t.map((a) => a.id))
|
|
826
1032
|
}, {
|
|
827
|
-
item:
|
|
828
|
-
var
|
|
1033
|
+
item: M(({ item: t }) => {
|
|
1034
|
+
var a;
|
|
829
1035
|
return [
|
|
830
|
-
|
|
831
|
-
"model-value": !
|
|
1036
|
+
k(Rt, {
|
|
1037
|
+
"model-value": !A.value.includes(t.id),
|
|
832
1038
|
label: t.label,
|
|
833
|
-
disabled: ((
|
|
834
|
-
"onUpdate:modelValue": (o) =>
|
|
835
|
-
|
|
1039
|
+
disabled: ((a = s.columns.find((o) => o.key === t.id)) == null ? void 0 : a.hideable) === !1 || !A.value.includes(t.id) && K.value.length === 1,
|
|
1040
|
+
"onUpdate:modelValue": (o) => Hl(
|
|
1041
|
+
s.columns.find((n) => n.key === t.id)
|
|
836
1042
|
)
|
|
837
1043
|
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"])
|
|
838
1044
|
];
|
|
839
1045
|
}),
|
|
840
1046
|
_: 1
|
|
841
1047
|
}, 8, ["model-value"]),
|
|
842
|
-
|
|
1048
|
+
k(B, {
|
|
843
1049
|
variant: "ghost",
|
|
844
1050
|
size: "sm",
|
|
845
1051
|
type: "button",
|
|
846
|
-
onClick:
|
|
1052
|
+
onClick: tl
|
|
847
1053
|
}, {
|
|
848
|
-
default:
|
|
849
|
-
|
|
1054
|
+
default: M(() => [...l[18] || (l[18] = [
|
|
1055
|
+
T("恢复默认列", -1)
|
|
850
1056
|
])]),
|
|
851
1057
|
_: 1
|
|
852
1058
|
})
|
|
853
|
-
])) :
|
|
1059
|
+
])) : g("", !0)
|
|
854
1060
|
]),
|
|
855
1061
|
_: 1
|
|
856
1062
|
}, 8, ["popup-transition", "popup-transition-duration"])
|
|
857
1063
|
], 512),
|
|
858
|
-
|
|
1064
|
+
k(B, {
|
|
859
1065
|
variant: "ghost",
|
|
860
1066
|
size: "sm",
|
|
861
1067
|
type: "button",
|
|
862
|
-
onClick:
|
|
1068
|
+
onClick: Yl
|
|
863
1069
|
}, {
|
|
864
|
-
default:
|
|
865
|
-
|
|
1070
|
+
default: M(() => [...l[20] || (l[20] = [
|
|
1071
|
+
T("导出 CSV", -1)
|
|
866
1072
|
])]),
|
|
867
1073
|
_: 1
|
|
868
|
-
})
|
|
1074
|
+
}),
|
|
1075
|
+
$(e.$slots, "toolbar-actions", {
|
|
1076
|
+
query: se.value,
|
|
1077
|
+
selectedKeys: w.value
|
|
1078
|
+
}, void 0, !0)
|
|
869
1079
|
]),
|
|
870
1080
|
y("div", {
|
|
871
1081
|
ref_key: "scrollRef",
|
|
872
|
-
ref:
|
|
1082
|
+
ref: le,
|
|
873
1083
|
class: "hys-ui-pf-grid-scroll",
|
|
874
|
-
style:
|
|
1084
|
+
style: I({ maxHeight: Zl.value }),
|
|
875
1085
|
tabindex: "0",
|
|
876
1086
|
role: "region",
|
|
877
1087
|
"aria-label": "表格滚动区域",
|
|
878
|
-
onDragleave:
|
|
1088
|
+
onDragleave: Wl,
|
|
1089
|
+
onScroll: l[13] || (l[13] = //@ts-ignore
|
|
1090
|
+
(...t) => v(V).close && v(V).close(...t))
|
|
879
1091
|
}, [
|
|
880
1092
|
y("table", {
|
|
881
|
-
class:
|
|
882
|
-
style:
|
|
1093
|
+
class: pe({ "hys-ui-pf-grid-sticky-head": s.stickyHeader }),
|
|
1094
|
+
style: I({ minWidth: Il.value + "px" })
|
|
883
1095
|
}, [
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
(
|
|
887
|
-
|
|
888
|
-
|
|
1096
|
+
s.caption ? (r(), d("caption", La, z(s.caption), 1)) : g("", !0),
|
|
1097
|
+
s.selectable ? (r(), d("colgroup", Va, [...l[21] || (l[21] = [
|
|
1098
|
+
y("col", { style: { width: "44px" } }, null, -1)
|
|
1099
|
+
])])) : g("", !0),
|
|
1100
|
+
(r(!0), d(N, null, te(ht.value, (t) => (r(), d("colgroup", {
|
|
1101
|
+
key: t.id
|
|
1102
|
+
}, [
|
|
1103
|
+
(r(!0), d(N, null, te(t.columns, (a) => (r(), d("col", {
|
|
1104
|
+
key: a.key,
|
|
1105
|
+
style: I({ width: Q(a) + "px" })
|
|
889
1106
|
}, null, 4))), 128))
|
|
890
|
-
]),
|
|
1107
|
+
]))), 128)),
|
|
891
1108
|
y("thead", null, [
|
|
1109
|
+
Fl.value ? (r(), d("tr", Oa, [
|
|
1110
|
+
s.selectable ? (r(), d("th", Fa)) : g("", !0),
|
|
1111
|
+
(r(!0), d(N, null, te(ht.value, (t) => (r(), d("th", {
|
|
1112
|
+
key: t.id,
|
|
1113
|
+
scope: t.group ? "colgroup" : void 0,
|
|
1114
|
+
colspan: t.columns.length,
|
|
1115
|
+
style: I(Ue(t.pinned === "right" ? t.columns[t.columns.length - 1] : t.columns[0], !0))
|
|
1116
|
+
}, [
|
|
1117
|
+
t.group ? $(e.$slots, "header-group", {
|
|
1118
|
+
group: t.group,
|
|
1119
|
+
columns: t.columns,
|
|
1120
|
+
pinned: t.pinned
|
|
1121
|
+
}, () => [
|
|
1122
|
+
T(z(t.group.label), 1)
|
|
1123
|
+
], !0, 0) : g("", !0)
|
|
1124
|
+
], 12, qa))), 128))
|
|
1125
|
+
])) : g("", !0),
|
|
892
1126
|
y("tr", null, [
|
|
893
|
-
|
|
894
|
-
|
|
1127
|
+
s.selectable ? (r(), d("th", Ha, [
|
|
1128
|
+
s.selectionType !== "radio" ? (r(), D(Rt, {
|
|
895
1129
|
key: 0,
|
|
896
1130
|
"aria-label": "选择当前页全部行",
|
|
897
|
-
"model-value":
|
|
898
|
-
indeterminate:
|
|
899
|
-
disabled: !
|
|
900
|
-
"onUpdate:modelValue":
|
|
901
|
-
}, null, 8, ["model-value", "indeterminate", "disabled"])) : (
|
|
902
|
-
])) :
|
|
903
|
-
(
|
|
904
|
-
var
|
|
905
|
-
return
|
|
1131
|
+
"model-value": Ht.value,
|
|
1132
|
+
indeterminate: Bl.value && !Ht.value,
|
|
1133
|
+
disabled: !He.value.length || ue.value || !!v(Ae),
|
|
1134
|
+
"onUpdate:modelValue": Vl
|
|
1135
|
+
}, null, 8, ["model-value", "indeterminate", "disabled"])) : (r(), d("span", $a, "选择"))
|
|
1136
|
+
])) : g("", !0),
|
|
1137
|
+
(r(!0), d(N, null, te(H.value, (t, a) => {
|
|
1138
|
+
var o, n, c, m, b, O, Z;
|
|
1139
|
+
return r(), d("th", {
|
|
906
1140
|
key: t.key,
|
|
907
1141
|
scope: "col",
|
|
1142
|
+
tabindex: s.contextMenu ? -1 : void 0,
|
|
908
1143
|
"data-column-key": t.key,
|
|
909
|
-
class:
|
|
910
|
-
"data-drop-position": ((
|
|
1144
|
+
class: pe([Ee(s.headerClassName, Y(t, a)), { "hys-ui-is-column-dragging": Ke.value === t.key, "hys-ui-pf-grid-header-wrap": t.headerWrap }]),
|
|
1145
|
+
"data-drop-position": ((o = de.value) == null ? void 0 : o.key) === t.key ? de.value.position : void 0,
|
|
911
1146
|
draggable: t.reorderable !== !1,
|
|
912
|
-
onDragstart: (
|
|
913
|
-
onDragend:
|
|
914
|
-
onDragover: (
|
|
915
|
-
onDrop: (
|
|
916
|
-
|
|
917
|
-
|
|
1147
|
+
onDragstart: (u) => Gl(u, t),
|
|
1148
|
+
onDragend: ce,
|
|
1149
|
+
onDragover: (u) => Ql(u, t),
|
|
1150
|
+
onDrop: (u) => Xl(u, t),
|
|
1151
|
+
onClick: (u) => p("headerClick", Y(t, a), u),
|
|
1152
|
+
onContextmenu: (u) => ll(u, t, a),
|
|
1153
|
+
onKeydown: (u) => v(V).keydown({ ...Y(t, a), type: "header" }, u),
|
|
1154
|
+
"aria-sort": ((n = x.value.find((u) => u.key === t.key)) == null ? void 0 : n.direction) === "asc" ? "ascending" : ((c = x.value.find((u) => u.key === t.key)) == null ? void 0 : c.direction) === "desc" ? "descending" : "none",
|
|
1155
|
+
style: I([Ee(s.headerStyle, Y(t, a)), { ...Ue(t, !0), textAlign: t.headerAlign || t.align || "left" }])
|
|
918
1156
|
}, [
|
|
919
|
-
y("div",
|
|
920
|
-
y("div",
|
|
921
|
-
|
|
1157
|
+
y("div", Ua, [
|
|
1158
|
+
y("div", {
|
|
1159
|
+
class: "hys-ui-pf-grid-sort-group",
|
|
1160
|
+
style: I({ justifyContent: (t.headerAlign ?? t.align) === "center" ? "center" : (t.headerAlign ?? t.align) === "right" ? "end" : "start" })
|
|
1161
|
+
}, [
|
|
1162
|
+
t.sortable !== !1 ? (r(), D(B, {
|
|
1163
|
+
key: 0,
|
|
922
1164
|
variant: "ghost",
|
|
923
1165
|
size: "sm",
|
|
924
1166
|
type: "button",
|
|
925
|
-
class:
|
|
926
|
-
"hys-ui-is-sorted":
|
|
927
|
-
(
|
|
1167
|
+
class: pe(["hys-ui-pf-grid-sort", {
|
|
1168
|
+
"hys-ui-is-sorted": x.value.some(
|
|
1169
|
+
(u) => u.key === t.key
|
|
928
1170
|
)
|
|
929
1171
|
}]),
|
|
930
|
-
onClick: (
|
|
1172
|
+
onClick: (u) => Cl(t)
|
|
931
1173
|
}, {
|
|
932
|
-
default:
|
|
933
|
-
y("span",
|
|
1174
|
+
default: M(() => [
|
|
1175
|
+
y("span", Pa, [
|
|
1176
|
+
$(e.$slots, "header-" + t.key, ee({ ref_for: !0 }, Y(t, a)), () => [
|
|
1177
|
+
$(e.$slots, "header-cell", ee({ ref_for: !0 }, Y(t, a)), () => [
|
|
1178
|
+
T(z(t.label), 1)
|
|
1179
|
+
], !0)
|
|
1180
|
+
], !0)
|
|
1181
|
+
])
|
|
934
1182
|
]),
|
|
935
1183
|
_: 2
|
|
936
|
-
}, 1032, ["class", "onClick"]),
|
|
937
|
-
|
|
938
|
-
|
|
1184
|
+
}, 1032, ["class", "onClick"])) : (r(), d("span", ja, [
|
|
1185
|
+
$(e.$slots, "header-" + t.key, ee({ ref_for: !0 }, Y(t, a)), () => [
|
|
1186
|
+
$(e.$slots, "header-cell", ee({ ref_for: !0 }, Y(t, a)), () => [
|
|
1187
|
+
T(z(t.label), 1)
|
|
1188
|
+
], !0)
|
|
1189
|
+
], !0)
|
|
1190
|
+
])),
|
|
1191
|
+
t.sortable !== !1 ? (r(), d("span", {
|
|
1192
|
+
key: 2,
|
|
939
1193
|
class: "hys-ui-pf-grid-sort-controls",
|
|
940
1194
|
role: "group",
|
|
941
1195
|
"aria-label": t.label + "排序"
|
|
942
1196
|
}, [
|
|
943
|
-
|
|
1197
|
+
k(B, {
|
|
944
1198
|
type: "button",
|
|
945
1199
|
variant: "ghost",
|
|
946
1200
|
size: "sm",
|
|
947
|
-
class:
|
|
948
|
-
"hys-ui-is-active": ((
|
|
1201
|
+
class: pe(["hys-ui-pf-grid-sort-direction", {
|
|
1202
|
+
"hys-ui-is-active": ((m = x.value.find((u) => u.key === t.key)) == null ? void 0 : m.direction) === "asc"
|
|
949
1203
|
}]),
|
|
950
1204
|
"aria-label": t.label + "升序",
|
|
951
|
-
"aria-pressed": ((
|
|
952
|
-
onClick:
|
|
1205
|
+
"aria-pressed": ((b = x.value.find((u) => u.key === t.key)) == null ? void 0 : b.direction) === "asc",
|
|
1206
|
+
onClick: U((u) => Bt(t, "asc"), ["stop"])
|
|
953
1207
|
}, {
|
|
954
|
-
default:
|
|
955
|
-
|
|
1208
|
+
default: M(() => [
|
|
1209
|
+
k(v(ca), {
|
|
956
1210
|
size: 11,
|
|
957
1211
|
"aria-hidden": "true"
|
|
958
1212
|
})
|
|
959
1213
|
]),
|
|
960
1214
|
_: 1
|
|
961
1215
|
}, 8, ["class", "aria-label", "aria-pressed", "onClick"]),
|
|
962
|
-
|
|
1216
|
+
k(B, {
|
|
963
1217
|
type: "button",
|
|
964
1218
|
variant: "ghost",
|
|
965
1219
|
size: "sm",
|
|
966
|
-
class:
|
|
967
|
-
"hys-ui-is-active": ((
|
|
1220
|
+
class: pe(["hys-ui-pf-grid-sort-direction", {
|
|
1221
|
+
"hys-ui-is-active": ((O = x.value.find((u) => u.key === t.key)) == null ? void 0 : O.direction) === "desc"
|
|
968
1222
|
}]),
|
|
969
1223
|
"aria-label": t.label + "降序",
|
|
970
|
-
"aria-pressed": ((
|
|
971
|
-
onClick:
|
|
1224
|
+
"aria-pressed": ((Z = x.value.find((u) => u.key === t.key)) == null ? void 0 : Z.direction) === "desc",
|
|
1225
|
+
onClick: U((u) => Bt(t, "desc"), ["stop"])
|
|
972
1226
|
}, {
|
|
973
|
-
default:
|
|
974
|
-
|
|
1227
|
+
default: M(() => [
|
|
1228
|
+
k(v(St), {
|
|
975
1229
|
size: 11,
|
|
976
1230
|
"aria-hidden": "true"
|
|
977
1231
|
})
|
|
978
1232
|
]),
|
|
979
1233
|
_: 1
|
|
980
1234
|
}, 8, ["class", "aria-label", "aria-pressed", "onClick"])
|
|
981
|
-
], 8,
|
|
982
|
-
]),
|
|
983
|
-
t.filterable !== !1 ? (
|
|
1235
|
+
], 8, Ga)) : g("", !0)
|
|
1236
|
+
], 4),
|
|
1237
|
+
t.filterable !== !1 ? (r(), D(B, {
|
|
984
1238
|
key: 0,
|
|
985
1239
|
variant: "ghost",
|
|
986
1240
|
size: "sm",
|
|
987
1241
|
type: "button",
|
|
988
|
-
class:
|
|
989
|
-
"hys-ui-is-filtered": !!
|
|
990
|
-
"hys-ui-is-filtering":
|
|
1242
|
+
class: pe(["hys-ui-pf-grid-filter", {
|
|
1243
|
+
"hys-ui-is-filtered": !!rt(t.key),
|
|
1244
|
+
"hys-ui-is-filtering": oe.value && me.value === t.key
|
|
991
1245
|
}]),
|
|
992
1246
|
"aria-label": "筛选" + t.label,
|
|
993
|
-
"aria-expanded":
|
|
994
|
-
"aria-controls":
|
|
995
|
-
title:
|
|
996
|
-
onClick: (
|
|
1247
|
+
"aria-expanded": oe.value,
|
|
1248
|
+
"aria-controls": v(Mt),
|
|
1249
|
+
title: oe.value && me.value === t.key ? "再次点击收起筛选(Esc)" : "筛选" + t.label,
|
|
1250
|
+
onClick: (u) => jt(t)
|
|
997
1251
|
}, {
|
|
998
|
-
default:
|
|
999
|
-
|
|
1252
|
+
default: M(() => [
|
|
1253
|
+
k(v(fa), {
|
|
1000
1254
|
size: 13,
|
|
1001
1255
|
"aria-hidden": "true"
|
|
1002
1256
|
})
|
|
1003
1257
|
]),
|
|
1004
1258
|
_: 1
|
|
1005
|
-
}, 8, ["aria-label", "aria-expanded", "aria-controls", "title", "class", "onClick"])) :
|
|
1006
|
-
|
|
1259
|
+
}, 8, ["aria-label", "aria-expanded", "aria-controls", "title", "class", "onClick"])) : g("", !0),
|
|
1260
|
+
s.contextMenu ? (r(), D(B, {
|
|
1007
1261
|
key: 1,
|
|
1262
|
+
variant: "ghost",
|
|
1263
|
+
size: "sm",
|
|
1264
|
+
type: "button",
|
|
1265
|
+
class: "hys-ui-pf-grid-column-menu",
|
|
1266
|
+
"aria-label": "列操作 · " + t.label,
|
|
1267
|
+
"aria-haspopup": "menu",
|
|
1268
|
+
onClick: U((u) => ll(u, t, a), ["stop"])
|
|
1269
|
+
}, {
|
|
1270
|
+
default: M(() => [
|
|
1271
|
+
k(v(va), {
|
|
1272
|
+
size: 14,
|
|
1273
|
+
"aria-hidden": "true"
|
|
1274
|
+
})
|
|
1275
|
+
]),
|
|
1276
|
+
_: 1
|
|
1277
|
+
}, 8, ["aria-label", "onClick"])) : g("", !0),
|
|
1278
|
+
t.resizable !== !1 ? (r(), d("span", {
|
|
1279
|
+
key: 2,
|
|
1008
1280
|
class: "hys-ui-pf-grid-resize",
|
|
1009
1281
|
role: "separator",
|
|
1010
1282
|
tabindex: "0",
|
|
1011
1283
|
"aria-label": "调整" + t.label + "列宽",
|
|
1012
|
-
onPointerdown: (
|
|
1284
|
+
onPointerdown: (u) => Pl(u, t),
|
|
1013
1285
|
"aria-orientation": "vertical",
|
|
1014
|
-
"aria-valuemin": Math.min(
|
|
1015
|
-
"aria-valuemax": Math.max(
|
|
1016
|
-
"aria-valuenow":
|
|
1017
|
-
onKeydown: (
|
|
1018
|
-
}, null, 40,
|
|
1286
|
+
"aria-valuemin": Math.min(v(dl)(t), Q(t)),
|
|
1287
|
+
"aria-valuemax": Math.max(v(ul)(t), Q(t)),
|
|
1288
|
+
"aria-valuenow": Q(t),
|
|
1289
|
+
onKeydown: (u) => jl(u, t)
|
|
1290
|
+
}, null, 40, Qa)) : g("", !0)
|
|
1019
1291
|
])
|
|
1020
|
-
], 46,
|
|
1292
|
+
], 46, Ia);
|
|
1021
1293
|
}), 128))
|
|
1022
1294
|
]),
|
|
1023
|
-
|
|
1024
|
-
key:
|
|
1295
|
+
oe.value ? (r(), d("tr", {
|
|
1296
|
+
key: 1,
|
|
1025
1297
|
class: "hys-ui-pf-grid-filter-row",
|
|
1026
|
-
id:
|
|
1027
|
-
onKeydown:
|
|
1298
|
+
id: v(Mt),
|
|
1299
|
+
onKeydown: l[8] || (l[8] = nl(U((t) => Pt(), ["stop", "prevent"]), ["esc"])),
|
|
1028
1300
|
"aria-label": "列筛选"
|
|
1029
1301
|
}, [
|
|
1030
|
-
|
|
1031
|
-
(
|
|
1302
|
+
s.selectable ? (r(), d("td", Ja)) : g("", !0),
|
|
1303
|
+
(r(!0), d(N, null, te(H.value, (t) => (r(), d("td", {
|
|
1032
1304
|
key: t.key,
|
|
1033
1305
|
"data-filter-key": t.key,
|
|
1034
1306
|
"data-column-key": t.key,
|
|
1035
|
-
style:
|
|
1307
|
+
style: I(Ue(t))
|
|
1036
1308
|
}, [
|
|
1037
|
-
t.filterable !== !1 ? (
|
|
1309
|
+
t.filterable !== !1 ? (r(), D(ot, {
|
|
1038
1310
|
key: 0,
|
|
1039
|
-
"model-value":
|
|
1040
|
-
"onUpdate:modelValue": (
|
|
1041
|
-
onFocus: (
|
|
1311
|
+
"model-value": rt(t.key),
|
|
1312
|
+
"onUpdate:modelValue": (a) => Nt(t.key, a),
|
|
1313
|
+
onFocus: (a) => me.value = t.key,
|
|
1042
1314
|
"aria-label": "过滤" + t.label,
|
|
1043
1315
|
placeholder: "筛选…",
|
|
1044
1316
|
clearable: ""
|
|
1045
|
-
}, null, 8, ["model-value", "onUpdate:modelValue", "onFocus", "aria-label"])) :
|
|
1046
|
-
], 12,
|
|
1047
|
-
], 40,
|
|
1317
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "onFocus", "aria-label"])) : g("", !0)
|
|
1318
|
+
], 12, Xa))), 128))
|
|
1319
|
+
], 40, Wa)) : g("", !0)
|
|
1048
1320
|
]),
|
|
1049
1321
|
y("tbody", null, [
|
|
1050
|
-
|
|
1322
|
+
ue.value ? (r(), d("tr", Ya, [
|
|
1051
1323
|
y("td", {
|
|
1052
|
-
colspan: Math.max(1,
|
|
1324
|
+
colspan: Math.max(1, K.value.length + Number(s.selectable)),
|
|
1053
1325
|
class: "hys-ui-pf-grid-empty"
|
|
1054
1326
|
}, [
|
|
1055
|
-
y("div",
|
|
1056
|
-
$
|
|
1057
|
-
|
|
1327
|
+
y("div", _a, [
|
|
1328
|
+
$(e.$slots, "loading", {}, () => [
|
|
1329
|
+
l[22] || (l[22] = T("正在加载…", -1))
|
|
1058
1330
|
], !0)
|
|
1059
1331
|
])
|
|
1060
|
-
], 8,
|
|
1061
|
-
])) :
|
|
1332
|
+
], 8, Za)
|
|
1333
|
+
])) : v(Ae) ? (r(), d("tr", eo, [
|
|
1062
1334
|
y("td", {
|
|
1063
|
-
colspan: Math.max(1,
|
|
1335
|
+
colspan: Math.max(1, K.value.length + Number(s.selectable)),
|
|
1064
1336
|
class: "hys-ui-pf-grid-empty"
|
|
1065
1337
|
}, [
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1338
|
+
y("div", lo, [
|
|
1339
|
+
$(e.$slots, "error", {
|
|
1340
|
+
error: v(Ae).error,
|
|
1341
|
+
retry: ct
|
|
1342
|
+
}, () => [
|
|
1343
|
+
l[24] || (l[24] = y("span", { role: "status" }, "加载失败", -1)),
|
|
1344
|
+
k(B, {
|
|
1345
|
+
size: "sm",
|
|
1346
|
+
variant: "ghost",
|
|
1347
|
+
onClick: ct
|
|
1348
|
+
}, {
|
|
1349
|
+
default: M(() => [...l[23] || (l[23] = [
|
|
1350
|
+
T("重试", -1)
|
|
1351
|
+
])]),
|
|
1352
|
+
_: 1
|
|
1353
|
+
})
|
|
1354
|
+
], !0)
|
|
1355
|
+
])
|
|
1356
|
+
], 8, to)
|
|
1357
|
+
])) : (r(), d(N, { key: 2 }, [
|
|
1358
|
+
(r(!0), d(N, null, te(vt.value, (t) => (r(), d(N, {
|
|
1085
1359
|
key: t.key
|
|
1086
1360
|
}, [
|
|
1087
|
-
t.kind === "group" ? (
|
|
1361
|
+
t.kind === "group" ? (r(), d("tr", ao, [
|
|
1088
1362
|
y("td", {
|
|
1089
|
-
colspan:
|
|
1363
|
+
colspan: K.value.length + Number(s.selectable)
|
|
1090
1364
|
}, [
|
|
1091
|
-
|
|
1365
|
+
k(B, {
|
|
1092
1366
|
variant: "ghost",
|
|
1093
1367
|
size: "sm",
|
|
1094
|
-
"aria-expanded": !
|
|
1095
|
-
onClick: (
|
|
1368
|
+
"aria-expanded": !re.value.has(t.key),
|
|
1369
|
+
onClick: (a) => zl(t.key)
|
|
1096
1370
|
}, {
|
|
1097
|
-
default:
|
|
1098
|
-
var
|
|
1371
|
+
default: M(() => {
|
|
1372
|
+
var a;
|
|
1099
1373
|
return [
|
|
1100
|
-
(
|
|
1101
|
-
|
|
1374
|
+
(r(), D(il(
|
|
1375
|
+
re.value.has(t.key) ? v(rl) : v(St)
|
|
1102
1376
|
), {
|
|
1103
1377
|
size: 15,
|
|
1104
1378
|
"aria-hidden": "true"
|
|
1105
1379
|
})),
|
|
1106
|
-
|
|
1107
|
-
y("span", null, "(" +
|
|
1380
|
+
T(" " + z((a = S.value.get(we.value)) == null ? void 0 : a.label) + ":" + z(t.label) + " ", 1),
|
|
1381
|
+
y("span", null, "(" + z(t.rows.length) + ")", 1)
|
|
1108
1382
|
];
|
|
1109
1383
|
}),
|
|
1110
1384
|
_: 2
|
|
1111
|
-
}, 1032, ["aria-expanded", "onClick"])
|
|
1112
|
-
|
|
1113
|
-
|
|
1385
|
+
}, 1032, ["aria-expanded", "onClick"]),
|
|
1386
|
+
s.groupSummary ? (r(), d("span", no, [
|
|
1387
|
+
(r(!0), d(N, null, te(H.value, (a) => (r(), d(N, {
|
|
1388
|
+
key: a.key
|
|
1389
|
+
}, [
|
|
1390
|
+
a.summary ? (r(), d("span", io, z(a.label) + " " + z(Ft(a, t.rows)), 1)) : g("", !0)
|
|
1391
|
+
], 64))), 128))
|
|
1392
|
+
])) : g("", !0)
|
|
1393
|
+
], 8, oo)
|
|
1394
|
+
])) : (r(), d("tr", ee({
|
|
1114
1395
|
key: 1,
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1396
|
+
ref_for: !0
|
|
1397
|
+
}, ee(s.contextMenu ? { tabindex: -1, onKeydown: (a) => v(V).keydown({ ...ve(t), type: "row" }, a) } : {}, v(At).rowNavigationAttrs(v(W)(t.item.id))), {
|
|
1398
|
+
"data-grid-row": v(W)(t.item.id),
|
|
1399
|
+
class: [s.rowClassName && Ee(s.rowClassName, ve(t)), { "hys-ui-pf-grid-current-row": s.highlightCurrentRow && Re.value === t.item.id, "hys-ui-pf-grid-even-row": s.striped && t.pageIndex % 2 === 1 }],
|
|
1400
|
+
style: s.rowStyle && Ee(s.rowStyle, ve(t)),
|
|
1401
|
+
"aria-current": s.highlightCurrentRow && Re.value === t.item.id ? "true" : void 0,
|
|
1402
|
+
onClick: (a) => ta(t, a),
|
|
1403
|
+
onDblclick: (a) => p("rowDblclick", ve(t), a),
|
|
1404
|
+
onContextmenu: (a) => la(a, t)
|
|
1405
|
+
}), [
|
|
1406
|
+
s.selectable ? (r(), d("td", so, [
|
|
1407
|
+
s.selectionType === "radio" ? (r(), D(Ma, {
|
|
1120
1408
|
key: 0,
|
|
1121
|
-
name:
|
|
1409
|
+
name: v(yl),
|
|
1122
1410
|
"aria-label": "选择第" + (t.pageIndex + 1) + "行",
|
|
1123
|
-
"model-value":
|
|
1411
|
+
"model-value": w.value[0] ?? null,
|
|
1124
1412
|
value: t.item.id,
|
|
1125
|
-
disabled: !
|
|
1126
|
-
onClick:
|
|
1413
|
+
disabled: !ze(t.item),
|
|
1414
|
+
onClick: l[9] || (l[9] = U(() => {
|
|
1127
1415
|
}, ["stop"])),
|
|
1128
|
-
"onUpdate:modelValue": (
|
|
1129
|
-
}, null, 8, ["name", "aria-label", "model-value", "value", "disabled", "onUpdate:modelValue"])) : (
|
|
1416
|
+
"onUpdate:modelValue": (a) => Ie(t.item.id, !0)
|
|
1417
|
+
}, null, 8, ["name", "aria-label", "model-value", "value", "disabled", "onUpdate:modelValue"])) : (r(), D(Rt, {
|
|
1130
1418
|
key: 1,
|
|
1131
1419
|
"aria-label": "选择第" + (t.pageIndex + 1) + "行",
|
|
1132
|
-
"model-value":
|
|
1133
|
-
disabled: !
|
|
1134
|
-
onClick:
|
|
1420
|
+
"model-value": qe.value.has(t.item.id),
|
|
1421
|
+
disabled: !ze(t.item),
|
|
1422
|
+
onClick: l[10] || (l[10] = U(() => {
|
|
1135
1423
|
}, ["stop"])),
|
|
1136
|
-
"onUpdate:modelValue": (
|
|
1424
|
+
"onUpdate:modelValue": (a) => Ie(t.item.id, a)
|
|
1137
1425
|
}, null, 8, ["aria-label", "model-value", "disabled", "onUpdate:modelValue"]))
|
|
1138
|
-
])) :
|
|
1139
|
-
(
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1426
|
+
])) : g("", !0),
|
|
1427
|
+
(r(!0), d(N, null, te(H.value, (a, o) => (r(), d("td", {
|
|
1428
|
+
key: a.key,
|
|
1429
|
+
"data-column-key": a.key,
|
|
1430
|
+
tabindex: s.contextMenu ? -1 : void 0,
|
|
1431
|
+
class: pe([s.cellClassName && Ee(s.cellClassName, fe(t, a, o)), { "hys-ui-pf-grid-cell-editing": Ze(t.item, a) }]),
|
|
1432
|
+
style: I([s.cellStyle && Ee(s.cellStyle, fe(t, a, o)), {
|
|
1433
|
+
...Ue(a),
|
|
1434
|
+
textAlign: a.align || "left"
|
|
1435
|
+
}]),
|
|
1436
|
+
title: Ze(t.item, a) ? void 0 : Se(t.item.row, a),
|
|
1437
|
+
onClick: (n) => p("cellClick", fe(t, a, o), n),
|
|
1438
|
+
onDblclick: (n) => oa(n, t, a, o),
|
|
1439
|
+
onContextmenu: U((n) => aa(n, t, a, o), ["stop"]),
|
|
1440
|
+
onKeydown: U((n) => v(V).keydown({ ...fe(t, a, o), type: "cell" }, n), ["self"])
|
|
1441
|
+
}, [
|
|
1442
|
+
Ze(t.item, a) ? (r(), D(ot, {
|
|
1443
|
+
key: 0,
|
|
1444
|
+
modelValue: We.value,
|
|
1445
|
+
"onUpdate:modelValue": l[11] || (l[11] = (n) => We.value = n),
|
|
1446
|
+
class: "hys-ui-pf-grid-edit",
|
|
1447
|
+
"aria-label": "编辑" + a.label,
|
|
1448
|
+
onClick: l[12] || (l[12] = U(() => {
|
|
1449
|
+
}, ["stop"])),
|
|
1450
|
+
onPressEnter: (n) => Ot(t.item, a),
|
|
1451
|
+
onKeydown: nl(U(Tl, ["stop"]), ["esc"]),
|
|
1452
|
+
onFocusout: (n) => Ot(t.item, a)
|
|
1453
|
+
}, null, 8, ["modelValue", "aria-label", "onPressEnter", "onKeydown", "onFocusout"])) : g("", !0),
|
|
1454
|
+
y("span", {
|
|
1455
|
+
class: "hys-ui-pf-grid-cell-display",
|
|
1456
|
+
inert: Ze(t.item, a)
|
|
1149
1457
|
}, [
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
]),
|
|
1183
|
-
_: 2
|
|
1184
|
-
}, 1032, ["style", "aria-expanded", "aria-label", "onClick"])) : (s(), u("span", {
|
|
1185
|
-
key: 1,
|
|
1186
|
-
style: $({
|
|
1187
|
-
display: "inline-block",
|
|
1188
|
-
width: t.item.depth * 16 + 20 + "px"
|
|
1189
|
-
})
|
|
1190
|
-
}, null, 4))
|
|
1191
|
-
], 64)) : h("", !0),
|
|
1192
|
-
y("span", {
|
|
1193
|
-
onDblclick: q((f) => ea(t.item, l), ["stop"])
|
|
1194
|
-
}, [
|
|
1195
|
-
$e(e.$slots, l.key, {
|
|
1196
|
-
row: t.item.row,
|
|
1197
|
-
value: m(me)(t.item.row, l),
|
|
1198
|
-
index: t.item.index
|
|
1199
|
-
}, () => [
|
|
1200
|
-
V(O(re(t.item.row, l)), 1)
|
|
1458
|
+
s.treeMode && o === 0 ? (r(), d(N, { key: 0 }, [
|
|
1459
|
+
t.item.hasChildren ? (r(), D(B, {
|
|
1460
|
+
key: 0,
|
|
1461
|
+
variant: "ghost",
|
|
1462
|
+
size: "sm",
|
|
1463
|
+
class: "hys-ui-pf-grid-tree-toggle",
|
|
1464
|
+
style: I({ marginLeft: t.item.depth * 16 + "px" }),
|
|
1465
|
+
"aria-expanded": Ce.value.has(t.item.id),
|
|
1466
|
+
"aria-label": Ce.value.has(t.item.id) ? "折叠子行" : "展开子行",
|
|
1467
|
+
onClick: U((n) => Ml(t.item.id), ["stop"])
|
|
1468
|
+
}, {
|
|
1469
|
+
default: M(() => [
|
|
1470
|
+
(r(), D(il(
|
|
1471
|
+
Ce.value.has(t.item.id) ? v(St) : v(rl)
|
|
1472
|
+
), {
|
|
1473
|
+
size: 15,
|
|
1474
|
+
"aria-hidden": "true"
|
|
1475
|
+
}))
|
|
1476
|
+
]),
|
|
1477
|
+
_: 2
|
|
1478
|
+
}, 1032, ["style", "aria-expanded", "aria-label", "onClick"])) : (r(), d("span", {
|
|
1479
|
+
key: 1,
|
|
1480
|
+
style: I({
|
|
1481
|
+
display: "inline-block",
|
|
1482
|
+
width: t.item.depth * 16 + 20 + "px"
|
|
1483
|
+
})
|
|
1484
|
+
}, null, 4))
|
|
1485
|
+
], 64)) : g("", !0),
|
|
1486
|
+
y("span", null, [
|
|
1487
|
+
$(e.$slots, a.key, ee({ ref_for: !0 }, fe(t, a, o)), () => [
|
|
1488
|
+
$(e.$slots, "body-cell", ee({ ref_for: !0 }, fe(t, a, o)), () => [
|
|
1489
|
+
T(z(Se(t.item.row, a)), 1)
|
|
1201
1490
|
], !0)
|
|
1202
|
-
],
|
|
1203
|
-
]
|
|
1204
|
-
],
|
|
1205
|
-
|
|
1206
|
-
],
|
|
1491
|
+
], !0)
|
|
1492
|
+
])
|
|
1493
|
+
], 8, co)
|
|
1494
|
+
], 46, uo))), 128))
|
|
1495
|
+
], 16, ro))
|
|
1207
1496
|
], 64))), 128)),
|
|
1208
|
-
|
|
1497
|
+
Ve.value.length ? g("", !0) : (r(), d("tr", fo, [
|
|
1209
1498
|
y("td", {
|
|
1210
|
-
colspan: Math.max(1,
|
|
1499
|
+
colspan: Math.max(1, K.value.length + Number(s.selectable)),
|
|
1211
1500
|
class: "hys-ui-pf-grid-empty"
|
|
1212
1501
|
}, [
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1502
|
+
y("div", po, [
|
|
1503
|
+
$(e.$slots, "empty", {
|
|
1504
|
+
query: Oe()
|
|
1505
|
+
}, () => [
|
|
1506
|
+
T(z(s.emptyText), 1)
|
|
1507
|
+
], !0)
|
|
1508
|
+
])
|
|
1509
|
+
], 8, vo)
|
|
1219
1510
|
]))
|
|
1220
1511
|
], 64))
|
|
1221
1512
|
]),
|
|
1222
|
-
|
|
1223
|
-
y("tr",
|
|
1224
|
-
|
|
1225
|
-
(
|
|
1513
|
+
s.showSummary && !ue.value && !v(Ae) && Le.value.length ? (r(), d("tfoot", yo, [
|
|
1514
|
+
y("tr", go, [
|
|
1515
|
+
s.selectable ? (r(), d("td", mo, "合计")) : g("", !0),
|
|
1516
|
+
(r(!0), d(N, null, te(H.value, (t, a) => (r(), d("td", {
|
|
1226
1517
|
key: t.key,
|
|
1227
1518
|
"data-column-key": t.key,
|
|
1228
|
-
style:
|
|
1229
|
-
...
|
|
1519
|
+
style: I({
|
|
1520
|
+
...Ue(t),
|
|
1230
1521
|
textAlign: t.align || "left"
|
|
1231
1522
|
})
|
|
1232
|
-
},
|
|
1523
|
+
}, z(t.summary || s.summaryMethod ? Ft(t) : !s.selectable && a === 0 ? "合计" : ""), 13, ho))), 128))
|
|
1233
1524
|
])
|
|
1234
|
-
])) :
|
|
1525
|
+
])) : g("", !0)
|
|
1235
1526
|
], 6)
|
|
1236
1527
|
], 36),
|
|
1237
|
-
y("footer",
|
|
1238
|
-
!
|
|
1528
|
+
y("footer", bo, [
|
|
1529
|
+
!s.loadRows || v(Xe) !== void 0 ? (r(), D(za, {
|
|
1239
1530
|
key: 0,
|
|
1240
|
-
page:
|
|
1241
|
-
total:
|
|
1242
|
-
"page-size":
|
|
1531
|
+
page: xe.value,
|
|
1532
|
+
total: ut.value,
|
|
1533
|
+
"page-size": ie.value,
|
|
1243
1534
|
"show-size-changer": "",
|
|
1244
1535
|
"show-quick-jumper": "",
|
|
1245
|
-
disabled:
|
|
1536
|
+
disabled: s.loading,
|
|
1246
1537
|
"page-size-options": [10, 12, 20, 50, 100],
|
|
1247
|
-
onChange:
|
|
1248
|
-
"onUpdate:pageSize":
|
|
1249
|
-
}, null, 8, ["page", "total", "page-size", "disabled"])) :
|
|
1250
|
-
])
|
|
1251
|
-
|
|
1538
|
+
onChange: kl,
|
|
1539
|
+
"onUpdate:pageSize": wl
|
|
1540
|
+
}, null, 8, ["page", "total", "page-size", "disabled"])) : g("", !0)
|
|
1541
|
+
]),
|
|
1542
|
+
s.contextMenu ? (r(), D(xa, {
|
|
1543
|
+
key: 0,
|
|
1544
|
+
ref: "gridContextMenu",
|
|
1545
|
+
trigger: [],
|
|
1546
|
+
items: v(V).items.value,
|
|
1547
|
+
class: "hys-ui-pf-grid-menu-anchor",
|
|
1548
|
+
"aria-label": "表格操作",
|
|
1549
|
+
"popup-transition": s.popupTransition,
|
|
1550
|
+
"popup-transition-duration": s.popupTransitionDuration,
|
|
1551
|
+
onSelect: v(V).select
|
|
1552
|
+
}, null, 8, ["items", "popup-transition", "popup-transition-duration", "onSelect"])) : g("", !0)
|
|
1553
|
+
], 16, Ka));
|
|
1252
1554
|
}
|
|
1253
1555
|
});
|
|
1254
1556
|
export {
|
|
1255
|
-
|
|
1557
|
+
qo as default
|
|
1256
1558
|
};
|