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,192 +1,198 @@
|
|
|
1
|
-
import { ref as R, computed as s, shallowRef as
|
|
2
|
-
import { tableValue as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ref as R, computed as s, shallowRef as de, watch as U, nextTick as te, onActivated as Je, onDeactivated as Le, onBeforeUnmount as Qe } from "vue";
|
|
2
|
+
import { tableValue as ve, tableToken as b, tableFilterPredicate as Ye, tableCompare as Ze } from "./table.js";
|
|
3
|
+
import { tableSearchPredicate as $e } from "../components/HysTable/tableSearch.js";
|
|
4
|
+
function at(l, x, fe, i) {
|
|
5
|
+
const d = R(!0), g = s(() => !!l.loading || !!l.disabled), O = s(
|
|
5
6
|
() => typeof l.pagination == "object" ? l.pagination : {}
|
|
6
|
-
),
|
|
7
|
-
Array.isArray(l.defaultSort) ? [...l.defaultSort] : l.defaultSort ? [l.defaultSort] : l.defaultSort === void 0 ?
|
|
8
|
-
),
|
|
7
|
+
), he = R(
|
|
8
|
+
Array.isArray(l.defaultSort) ? [...l.defaultSort] : l.defaultSort ? [l.defaultSort] : l.defaultSort === void 0 ? x().filter((e) => e.defaultSortOrder).map((e) => ({ key: e.key, direction: e.defaultSortOrder })) : []
|
|
9
|
+
), ae = R({
|
|
9
10
|
...Object.fromEntries(
|
|
10
|
-
|
|
11
|
+
x().filter((e) => e.defaultFilterValue).map((e) => [e.key, [...e.defaultFilterValue]])
|
|
11
12
|
),
|
|
12
13
|
...l.defaultFilters
|
|
13
|
-
}),
|
|
14
|
+
}), K = R(O.value.defaultPage ?? 1), _ = R(O.value.defaultPageSize ?? 10), ge = R([
|
|
14
15
|
...l.defaultSelectedRowKeys ?? []
|
|
15
|
-
]),
|
|
16
|
+
]), we = R([...l.defaultExpandedRowKeys ?? []]), ne = R(
|
|
16
17
|
l.defaultCurrentRowKey ?? null
|
|
17
|
-
),
|
|
18
|
+
), m = de(
|
|
18
19
|
/* @__PURE__ */ new Map()
|
|
19
|
-
), h =
|
|
20
|
+
), h = de(
|
|
20
21
|
/* @__PURE__ */ new Map()
|
|
21
|
-
),
|
|
22
|
+
), E = de(/* @__PURE__ */ new Map());
|
|
22
23
|
let W = /* @__PURE__ */ new WeakSet();
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
function
|
|
26
|
-
const a = typeof l.rowKey == "function" ? l.rowKey(e) :
|
|
27
|
-
return typeof a == "string" || typeof a == "number" && Number.isFinite(a) ? a : (
|
|
24
|
+
const le = /* @__PURE__ */ new WeakMap();
|
|
25
|
+
let Fe = 0;
|
|
26
|
+
function oe(e) {
|
|
27
|
+
const a = typeof l.rowKey == "function" ? l.rowKey(e) : ve(e, l.rowKey ?? "id");
|
|
28
|
+
return typeof a == "string" || typeof a == "number" && Number.isFinite(a) ? a : (le.has(e) || le.set(e, "@hys-table-row:" + ++Fe), le.get(e));
|
|
28
29
|
}
|
|
29
|
-
const
|
|
30
|
+
const v = s(() => {
|
|
30
31
|
const e = [], a = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new WeakSet(), o = [...l.rows].reverse().map((r) => ({
|
|
31
32
|
row: r,
|
|
32
33
|
parent: void 0,
|
|
33
34
|
depth: 0
|
|
34
35
|
}));
|
|
35
36
|
for (; o.length; ) {
|
|
36
|
-
const { row: r, parent:
|
|
37
|
+
const { row: r, parent: c, depth: u } = o.pop();
|
|
37
38
|
if (!r || typeof r != "object" || n.has(r)) continue;
|
|
38
39
|
n.add(r);
|
|
39
|
-
const y =
|
|
40
|
-
if (t.has(
|
|
41
|
-
const
|
|
40
|
+
const y = oe(r), w = b(y);
|
|
41
|
+
if (t.has(w)) continue;
|
|
42
|
+
const A = l.treeMode ? ve(r, l.childrenKey ?? "children") : void 0, k = m.value.get(w), H = (k == null ? void 0 : k.row) === r && k.override ? k.rows : Array.isArray(A) ? A : (k == null ? void 0 : k.row) === r ? k.rows : [], N = {
|
|
42
43
|
row: r,
|
|
43
44
|
key: y,
|
|
44
|
-
token:
|
|
45
|
+
token: w,
|
|
45
46
|
index: a.length,
|
|
46
|
-
depth:
|
|
47
|
-
rootToken: (
|
|
48
|
-
parent:
|
|
47
|
+
depth: u,
|
|
48
|
+
rootToken: (c == null ? void 0 : c.rootToken) ?? w,
|
|
49
|
+
parent: c,
|
|
49
50
|
children: [],
|
|
50
|
-
lazy: !!l.treeMode && !!l.loadChildren && !Array.isArray(
|
|
51
|
+
lazy: !!l.treeMode && !!l.loadChildren && !Array.isArray(A) && (k == null ? void 0 : k.row) !== r && !!ve(r, l.hasChildrenKey ?? "hasChildren")
|
|
51
52
|
};
|
|
52
|
-
if (t.set(
|
|
53
|
-
for (let
|
|
54
|
-
o.push({ row:
|
|
53
|
+
if (t.set(w, N), a.push(N), ((c == null ? void 0 : c.children) ?? e).push(N), l.treeMode)
|
|
54
|
+
for (let f = H.length - 1; f >= 0; f--)
|
|
55
|
+
o.push({ row: H[f], parent: N, depth: u + 1 });
|
|
55
56
|
}
|
|
56
57
|
return { roots: e, all: a, map: t };
|
|
57
|
-
}),
|
|
58
|
-
...new Set(l.selectedRowKeys ??
|
|
59
|
-
]),
|
|
60
|
-
() => new Set(
|
|
61
|
-
),
|
|
58
|
+
}), re = R(), G = s(() => l.search ?? re.value ?? l.defaultSearch ?? ""), M = s(() => [
|
|
59
|
+
...new Set(l.selectedRowKeys ?? ge.value)
|
|
60
|
+
]), S = s(
|
|
61
|
+
() => new Set(M.value.map(b))
|
|
62
|
+
), V = s(() => [
|
|
62
63
|
...new Set(
|
|
63
|
-
l.expandedRowKeys ?? (l.defaultExpandAll && !
|
|
64
|
+
l.expandedRowKeys ?? (l.defaultExpandAll && !ke.value ? v.value.all.filter((e) => e.children.length || e.lazy || fe()).map((e) => e.key) : we.value)
|
|
64
65
|
)
|
|
65
|
-
]),
|
|
66
|
-
|
|
67
|
-
[
|
|
66
|
+
]), ke = R(!1), X = s(() => new Set(V.value.map(b))), J = /* @__PURE__ */ new Map();
|
|
67
|
+
U(
|
|
68
|
+
[M, () => v.value.all, () => l.reserveSelection],
|
|
68
69
|
() => {
|
|
69
70
|
var a, t;
|
|
70
|
-
for (const n of
|
|
71
|
-
|
|
72
|
-
for (const n of
|
|
73
|
-
const o =
|
|
74
|
-
o &&
|
|
71
|
+
for (const n of J.keys())
|
|
72
|
+
S.value.has(n) || J.delete(n);
|
|
73
|
+
for (const n of M.value) {
|
|
74
|
+
const o = v.value.map.get(b(n));
|
|
75
|
+
o && J.set(o.token, o.row);
|
|
75
76
|
}
|
|
76
77
|
if (!l.reserveSelection) {
|
|
77
|
-
const n =
|
|
78
|
-
(o) =>
|
|
78
|
+
const n = M.value.filter(
|
|
79
|
+
(o) => v.value.map.has(b(o))
|
|
79
80
|
);
|
|
80
|
-
n.length !==
|
|
81
|
+
n.length !== M.value.length && p(n);
|
|
81
82
|
}
|
|
82
83
|
let e;
|
|
83
|
-
for (const [n, o] of
|
|
84
|
-
((a =
|
|
85
|
-
e && (
|
|
84
|
+
for (const [n, o] of m.value)
|
|
85
|
+
((a = v.value.map.get(n)) == null ? void 0 : a.row) !== o.row && (e ?? (e = new Map(m.value)), e.delete(n));
|
|
86
|
+
e && (m.value = e);
|
|
86
87
|
for (const [n, o] of h.value)
|
|
87
|
-
((t =
|
|
88
|
+
((t = v.value.map.get(n)) == null ? void 0 : t.row) !== o.row && q(n);
|
|
88
89
|
},
|
|
89
90
|
{ immediate: !0 }
|
|
90
91
|
);
|
|
91
|
-
function
|
|
92
|
-
const a = new Map(
|
|
92
|
+
function L(e) {
|
|
93
|
+
const a = new Map(x().filter((n) => n.sortable).map((n) => [n.key, n])), t = /* @__PURE__ */ new Set();
|
|
93
94
|
return e.filter(
|
|
94
95
|
(n) => ["asc", "desc"].includes(n.direction) && a.has(n.key) && !t.has(n.key) && (t.add(n.key), !0)
|
|
95
96
|
).slice(0, l.multiSort ? void 0 : 1).sort(
|
|
96
97
|
(n, o) => {
|
|
97
|
-
var r,
|
|
98
|
-
return (((r = a.get(o.key)) == null ? void 0 : r.sortPriority) ?? 0) - (((
|
|
98
|
+
var r, c;
|
|
99
|
+
return (((r = a.get(o.key)) == null ? void 0 : r.sortPriority) ?? 0) - (((c = a.get(n.key)) == null ? void 0 : c.sortPriority) ?? 0);
|
|
99
100
|
}
|
|
100
101
|
);
|
|
101
102
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
)),
|
|
105
|
-
if (l.sorts !== void 0) return
|
|
106
|
-
if (l.sort !== void 0) return
|
|
107
|
-
const e =
|
|
108
|
-
const n =
|
|
103
|
+
const ue = s(() => new Map(
|
|
104
|
+
x().filter((e) => e.sortable && e.sortOrder !== void 0).map((e) => [e.key, e.sortOrder])
|
|
105
|
+
)), j = s(() => {
|
|
106
|
+
if (l.sorts !== void 0) return L(l.sorts);
|
|
107
|
+
if (l.sort !== void 0) return L(l.sort ? [l.sort] : []);
|
|
108
|
+
const e = he.value.filter((t) => !ue.value.has(t.key)), a = x().flatMap(({ key: t }) => {
|
|
109
|
+
const n = ue.value.get(t);
|
|
109
110
|
return n ? [{ key: t, direction: n }] : [];
|
|
110
111
|
});
|
|
111
|
-
return
|
|
112
|
-
}),
|
|
112
|
+
return L([...a, ...e]);
|
|
113
|
+
}), P = s(() => {
|
|
113
114
|
if (l.filters !== void 0) return l.filters;
|
|
114
|
-
const e =
|
|
115
|
+
const e = x().flatMap(
|
|
115
116
|
({ key: a, filteredValue: t }) => t === void 0 ? [] : [[a, t]]
|
|
116
117
|
);
|
|
117
|
-
return e.length ? { ...
|
|
118
|
-
}),
|
|
119
|
-
const e =
|
|
118
|
+
return e.length ? { ...ae.value, ...Object.fromEntries(e) } : ae.value;
|
|
119
|
+
}), z = s(() => {
|
|
120
|
+
const e = v.value, a = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Map(), n = Ye(P.value, x()), o = l.serverMode ? void 0 : $e(
|
|
121
|
+
G.value,
|
|
122
|
+
x(),
|
|
123
|
+
l.searchColumns,
|
|
124
|
+
l.searchMethod
|
|
125
|
+
);
|
|
120
126
|
if (!l.serverMode)
|
|
121
127
|
for (let u = e.all.length - 1; u >= 0; u--) {
|
|
122
|
-
const
|
|
123
|
-
(n(
|
|
128
|
+
const y = e.all[u];
|
|
129
|
+
(n(y.row) && (!o || o(y.row)) || y.children.some((w) => a.has(w.token))) && a.add(y.token);
|
|
124
130
|
}
|
|
125
|
-
const
|
|
126
|
-
function
|
|
127
|
-
const
|
|
128
|
-
return l.serverMode || !
|
|
131
|
+
const r = Ze(j.value, x());
|
|
132
|
+
function c(u) {
|
|
133
|
+
const y = l.serverMode ? [...u] : u.filter((w) => a.has(w.token));
|
|
134
|
+
return l.serverMode || !j.value.length ? y : y.sort((w, A) => r(w.row, A.row) || w.index - A.index);
|
|
129
135
|
}
|
|
130
136
|
for (const u of e.all)
|
|
131
|
-
u.children.length && t.set(u.token,
|
|
132
|
-
return { roots:
|
|
133
|
-
}),
|
|
134
|
-
const e = l.pageSize ??
|
|
137
|
+
u.children.length && t.set(u.token, c(u.children));
|
|
138
|
+
return { roots: c(e.roots), children: t };
|
|
139
|
+
}), D = s(() => {
|
|
140
|
+
const e = l.pageSize ?? O.value.pageSize ?? _.value;
|
|
135
141
|
return Number.isFinite(e) && e > 0 ? Math.min(Number.MAX_SAFE_INTEGER, Math.max(1, Math.floor(e))) : 10;
|
|
136
|
-
}),
|
|
137
|
-
const e =
|
|
142
|
+
}), ye = s(() => {
|
|
143
|
+
const e = O.value.pageCount;
|
|
138
144
|
return l.serverMode && e !== void 0 && Number.isFinite(e) && e > 0 ? Math.min(Number.MAX_SAFE_INTEGER, Math.max(1, Math.floor(e))) : void 0;
|
|
139
|
-
}),
|
|
140
|
-
if (!l.serverMode) return
|
|
141
|
-
const e = l.total ??
|
|
142
|
-
return e === void 0 ?
|
|
143
|
-
}),
|
|
144
|
-
() =>
|
|
145
|
-
),
|
|
146
|
-
const e = l.page ??
|
|
145
|
+
}), Se = s(() => {
|
|
146
|
+
if (!l.serverMode) return z.value.roots.length;
|
|
147
|
+
const e = l.total ?? O.value.total;
|
|
148
|
+
return e === void 0 ? ye.value === void 0 ? l.rows.length : void 0 : Number.isFinite(e) ? Math.min(Number.MAX_SAFE_INTEGER, Math.max(0, Math.floor(e))) : 0;
|
|
149
|
+
}), ie = s(
|
|
150
|
+
() => ye.value ?? Math.max(1, Math.ceil((Se.value ?? 0) / D.value))
|
|
151
|
+
), Q = s(() => {
|
|
152
|
+
const e = l.page ?? O.value.page ?? K.value;
|
|
147
153
|
return Math.min(
|
|
148
|
-
|
|
154
|
+
ie.value,
|
|
149
155
|
Math.max(1, Number.isFinite(e) ? Math.floor(e) : 1)
|
|
150
156
|
);
|
|
151
|
-
}),
|
|
152
|
-
() => !l.pagination || l.serverMode ?
|
|
153
|
-
(
|
|
154
|
-
|
|
157
|
+
}), Me = s(
|
|
158
|
+
() => !l.pagination || l.serverMode ? z.value.roots : z.value.roots.slice(
|
|
159
|
+
(Q.value - 1) * D.value,
|
|
160
|
+
Q.value * D.value
|
|
155
161
|
)
|
|
156
|
-
),
|
|
157
|
-
const e = [], a = [...
|
|
162
|
+
), Y = s(() => {
|
|
163
|
+
const e = [], a = [...Me.value].reverse();
|
|
158
164
|
for (; a.length; ) {
|
|
159
165
|
const t = a.pop();
|
|
160
|
-
if (e.push(t),
|
|
161
|
-
const n =
|
|
166
|
+
if (e.push(t), X.value.has(t.token) || !l.serverMode && (G.value.trim() || Object.values(P.value).some((n) => n.length))) {
|
|
167
|
+
const n = z.value.children.get(t.token) ?? [];
|
|
162
168
|
for (let o = n.length - 1; o >= 0; o--) a.push(n[o]);
|
|
163
169
|
}
|
|
164
170
|
}
|
|
165
171
|
return e;
|
|
166
|
-
}),
|
|
167
|
-
const e = [], a = [...
|
|
172
|
+
}), be = s(() => {
|
|
173
|
+
const e = [], a = [...z.value.roots].reverse();
|
|
168
174
|
for (; a.length; ) {
|
|
169
175
|
const t = a.pop();
|
|
170
176
|
e.push(t.row);
|
|
171
|
-
const n =
|
|
177
|
+
const n = z.value.children.get(t.token) ?? [];
|
|
172
178
|
for (let o = n.length - 1; o >= 0; o--) a.push(n[o]);
|
|
173
179
|
}
|
|
174
180
|
return e;
|
|
175
|
-
}),
|
|
176
|
-
() => l.currentRowKey !== void 0 ? l.currentRowKey :
|
|
177
|
-
),
|
|
181
|
+
}), Z = s(
|
|
182
|
+
() => l.currentRowKey !== void 0 ? l.currentRowKey : ne.value
|
|
183
|
+
), $ = s(
|
|
178
184
|
() => {
|
|
179
185
|
var e;
|
|
180
|
-
return
|
|
186
|
+
return Z.value == null || (e = v.value.map.get(b(Z.value))) == null ? void 0 : e.row;
|
|
181
187
|
}
|
|
182
|
-
),
|
|
188
|
+
), ce = s(() => {
|
|
183
189
|
const e = /* @__PURE__ */ new Set();
|
|
184
190
|
if (l.checkStrictly !== !1) return e;
|
|
185
|
-
for (let a =
|
|
186
|
-
const t =
|
|
191
|
+
for (let a = v.value.all.length - 1; a >= 0; a--) {
|
|
192
|
+
const t = v.value.all[a];
|
|
187
193
|
t.children.some(
|
|
188
|
-
(n) => e.has(n.token) ||
|
|
189
|
-
) && !t.children.filter(C).every((n) =>
|
|
194
|
+
(n) => e.has(n.token) || S.value.has(n.token)
|
|
195
|
+
) && !t.children.filter(C).every((n) => S.value.has(n.token)) && e.add(t.token);
|
|
190
196
|
}
|
|
191
197
|
return e;
|
|
192
198
|
});
|
|
@@ -194,313 +200,322 @@ function Ze(l, m, fe, i) {
|
|
|
194
200
|
var a;
|
|
195
201
|
return l.selectable !== !1 && ((a = l.getSelectionProps) == null ? void 0 : a.call(l, e.row, e.index).disabled) !== !0 && (typeof l.selectable != "function" || l.selectable(e.row, e.index));
|
|
196
202
|
}
|
|
197
|
-
const
|
|
198
|
-
const e = [], a = [...
|
|
203
|
+
const F = s(() => {
|
|
204
|
+
const e = [], a = [...Me.value].reverse();
|
|
199
205
|
for (; a.length; ) {
|
|
200
206
|
const t = a.pop();
|
|
201
207
|
C(t) && e.push(t);
|
|
202
|
-
const n =
|
|
208
|
+
const n = z.value.children.get(t.token) ?? [];
|
|
203
209
|
for (let o = n.length - 1; o >= 0; o--) a.push(n[o]);
|
|
204
210
|
}
|
|
205
211
|
return e;
|
|
206
|
-
}),
|
|
207
|
-
() => !!
|
|
208
|
-
),
|
|
209
|
-
() => !
|
|
210
|
-
(e) =>
|
|
212
|
+
}), se = s(
|
|
213
|
+
() => !!F.value.length && F.value.every((e) => S.value.has(e.token))
|
|
214
|
+
), xe = s(
|
|
215
|
+
() => !se.value && F.value.some(
|
|
216
|
+
(e) => S.value.has(e.token) || ce.value.has(e.token)
|
|
211
217
|
)
|
|
212
|
-
),
|
|
218
|
+
), me = s(() => ({
|
|
213
219
|
action: "page",
|
|
214
|
-
page:
|
|
215
|
-
pageSize:
|
|
216
|
-
sorts:
|
|
220
|
+
page: Q.value,
|
|
221
|
+
pageSize: D.value,
|
|
222
|
+
sorts: j.value.map((e) => ({ ...e })),
|
|
217
223
|
filters: Object.fromEntries(
|
|
218
|
-
Object.entries(
|
|
224
|
+
Object.entries(P.value).map(([e, a]) => [e, [...a]])
|
|
219
225
|
),
|
|
220
|
-
|
|
226
|
+
...l.search !== void 0 || l.defaultSearch !== void 0 || re.value !== void 0 ? { search: G.value } : {},
|
|
227
|
+
currentData: be.value
|
|
221
228
|
}));
|
|
222
|
-
function
|
|
223
|
-
const t = { ...
|
|
229
|
+
function B(e, a = {}) {
|
|
230
|
+
const t = { ...me.value, ...a, action: e };
|
|
224
231
|
i("queryChange", t), i("change", t);
|
|
225
232
|
}
|
|
226
|
-
function
|
|
227
|
-
if (g.value || !
|
|
228
|
-
const t = Math.max(1, Math.min(
|
|
229
|
-
|
|
233
|
+
function Te(e, a = "page") {
|
|
234
|
+
if (g.value || !d.value) return;
|
|
235
|
+
const t = Math.max(1, Math.min(ie.value, Math.floor(e) || 1));
|
|
236
|
+
K.value = t, i("update:page", t), i("pageChange", t), B(a, { page: t });
|
|
230
237
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
238
|
+
function Ne(e) {
|
|
239
|
+
l.disabled || !d.value || e === G.value || (l.search === void 0 && (re.value = e), K.value = 1, i("update:search", e), i("update:page", 1), B("search", { search: e, page: 1 }));
|
|
233
240
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
241
|
+
U(() => l.search, (e, a) => {
|
|
242
|
+
e !== a && (K.value = 1);
|
|
243
|
+
});
|
|
244
|
+
function je(e) {
|
|
245
|
+
g.value || !d.value || !Number.isFinite(e) || e < 1 || (_.value = Math.floor(e), K.value = 1, i("update:pageSize", _.value), i("pageSizeChange", _.value), i("update:page", 1), i("pageChange", 1), B("pageSize", { page: 1, pageSize: _.value }));
|
|
246
|
+
}
|
|
247
|
+
function Ce(e) {
|
|
248
|
+
if (g.value || !d.value) return;
|
|
249
|
+
const a = L(
|
|
237
250
|
Array.isArray(e) ? [...e] : e ? [e] : []
|
|
238
251
|
);
|
|
239
|
-
|
|
252
|
+
he.value = l.sorts !== void 0 || l.sort !== void 0 ? a : a.filter((t) => !ue.value.has(t.key)), K.value = 1, i("update:sort", a[0] ?? null), i("update:sorts", a), i("sortChange", a[0] ?? null, a), i("update:page", 1), B("sort", { sorts: a, page: 1 });
|
|
240
253
|
}
|
|
241
|
-
function
|
|
242
|
-
var o, r,
|
|
243
|
-
const t = (o =
|
|
254
|
+
function Ae(e, a) {
|
|
255
|
+
var o, r, c;
|
|
256
|
+
const t = (o = j.value.find((u) => u.key === e.key)) == null ? void 0 : o.direction, n = (r = e.sortOrders) != null && r.length ? e.sortOrders : (c = l.sortOrders) != null && c.length ? l.sortOrders : ["asc", "desc", null];
|
|
244
257
|
return a ? t === a ? null : a : n[(n.indexOf(t ?? null) + 1) % n.length];
|
|
245
258
|
}
|
|
246
|
-
function
|
|
259
|
+
function Pe(e, a) {
|
|
247
260
|
if (!e.sortable) return;
|
|
248
|
-
const t =
|
|
249
|
-
t && n.push({ key: e.key, direction: t }),
|
|
261
|
+
const t = Ae(e, a), n = l.multiSort ? j.value.filter((o) => o.key !== e.key) : [];
|
|
262
|
+
t && n.push({ key: e.key, direction: t }), Ce(n);
|
|
250
263
|
}
|
|
251
|
-
function
|
|
252
|
-
if (g.value || !
|
|
253
|
-
const a = new Set(
|
|
254
|
-
|
|
264
|
+
function Re(e) {
|
|
265
|
+
if (g.value || !d.value) return;
|
|
266
|
+
const a = new Set(x().filter((t) => t.filteredValue !== void 0).map((t) => t.key));
|
|
267
|
+
ae.value = l.filters !== void 0 || !a.size ? e : Object.fromEntries(Object.entries(e).filter(([t]) => !a.has(t))), K.value = 1, i("update:filters", e), i("filterChange", e), i("update:page", 1), B("filter", { filters: e, page: 1 });
|
|
255
268
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
269
|
+
function Ie(e, a) {
|
|
270
|
+
x().some((t) => t.key === e) && Re({ ...P.value, [e]: [...a] });
|
|
258
271
|
}
|
|
259
|
-
function
|
|
260
|
-
|
|
272
|
+
function qe(e) {
|
|
273
|
+
Re(
|
|
261
274
|
e ? Object.fromEntries(
|
|
262
|
-
Object.entries(
|
|
275
|
+
Object.entries(P.value).filter(
|
|
263
276
|
([a]) => !e.includes(a)
|
|
264
277
|
)
|
|
265
278
|
) : {}
|
|
266
279
|
);
|
|
267
280
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
270
|
-
b(typeof e == "object" ?
|
|
281
|
+
function I(e) {
|
|
282
|
+
return v.value.map.get(
|
|
283
|
+
b(typeof e == "object" ? oe(e) : e)
|
|
271
284
|
);
|
|
272
285
|
}
|
|
273
|
-
function
|
|
274
|
-
return
|
|
286
|
+
function T() {
|
|
287
|
+
return M.value.flatMap((e) => {
|
|
275
288
|
var n;
|
|
276
|
-
const a = b(e), t = ((n =
|
|
289
|
+
const a = b(e), t = ((n = v.value.map.get(a)) == null ? void 0 : n.row) ?? (l.reserveSelection ? J.get(a) : void 0);
|
|
277
290
|
return t ? [t] : [];
|
|
278
291
|
});
|
|
279
292
|
}
|
|
280
|
-
async function
|
|
281
|
-
if (g.value || !
|
|
293
|
+
async function p(e) {
|
|
294
|
+
if (g.value || !d.value) return !1;
|
|
282
295
|
const a = [...new Set(e)];
|
|
283
|
-
|
|
284
|
-
const t =
|
|
285
|
-
return t && i("selectionChange",
|
|
296
|
+
ge.value = a, i("update:selectedRowKeys", a), await te();
|
|
297
|
+
const t = d.value && a.length === M.value.length && a.every((n) => S.value.has(b(n)));
|
|
298
|
+
return t && i("selectionChange", T(), M.value), t;
|
|
286
299
|
}
|
|
287
|
-
function
|
|
300
|
+
function _e(e) {
|
|
288
301
|
if (!(l.checkStrictly !== !1 || l.selectionType === "radio"))
|
|
289
|
-
for (let a =
|
|
290
|
-
const t =
|
|
302
|
+
for (let a = v.value.all.length - 1; a >= 0; a--) {
|
|
303
|
+
const t = v.value.all[a], n = t.children.filter(C);
|
|
291
304
|
!n.length || !C(t) || (n.every((o) => e.has(o.token)) ? e.add(t.token) : e.delete(t.token));
|
|
292
305
|
}
|
|
293
306
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
296
|
-
const a =
|
|
297
|
-
for (const t of
|
|
298
|
-
e.has(t.token) && !
|
|
299
|
-
return
|
|
307
|
+
function ee(e) {
|
|
308
|
+
_e(e);
|
|
309
|
+
const a = M.value.filter((t) => e.has(b(t)));
|
|
310
|
+
for (const t of v.value.all)
|
|
311
|
+
e.has(t.token) && !S.value.has(t.token) && a.push(t.key);
|
|
312
|
+
return p(a);
|
|
300
313
|
}
|
|
301
|
-
let
|
|
302
|
-
async function
|
|
303
|
-
const n =
|
|
304
|
-
if (!n || !r && !C(n) || g.value || !
|
|
314
|
+
let Ee;
|
|
315
|
+
async function We(e, a, t = !1) {
|
|
316
|
+
const n = I(e), o = typeof t == "boolean" ? t : t.range, r = typeof t == "object" && t.ignoreSelectable;
|
|
317
|
+
if (!n || !r && !C(n) || g.value || !d.value)
|
|
305
318
|
return !1;
|
|
306
|
-
const
|
|
319
|
+
const c = a ?? !S.value.has(n.token);
|
|
307
320
|
if (l.selectionType === "radio") {
|
|
308
|
-
const
|
|
309
|
-
return
|
|
321
|
+
const f = await p(c ? [n.key] : []);
|
|
322
|
+
return f && i("select", T(), n.row, c), f;
|
|
310
323
|
}
|
|
311
|
-
const
|
|
312
|
-
for (;
|
|
313
|
-
const
|
|
314
|
-
|
|
324
|
+
const u = o && l.rangeSelection ? Y.value.findIndex((f) => f.token === Ee) : -1, y = Y.value.findIndex((f) => f.token === n.token), w = u >= 0 && y >= 0 ? Y.value.slice(Math.min(u, y), Math.max(u, y) + 1) : [n], A = new Set(S.value), k = [...w], H = /* @__PURE__ */ new Set();
|
|
325
|
+
for (; k.length; ) {
|
|
326
|
+
const f = k.pop();
|
|
327
|
+
H.has(f.token) || (H.add(f.token), (r && f === n || C(f)) && (c ? A.add(f.token) : A.delete(f.token)), l.checkStrictly === !1 && k.push(...f.children));
|
|
315
328
|
}
|
|
316
|
-
const
|
|
317
|
-
return
|
|
329
|
+
const N = await ee(A);
|
|
330
|
+
return N && (Ee = n.token, i("select", T(), n.row, c), w.length > 1 && i(
|
|
318
331
|
"selectRange",
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
)),
|
|
332
|
+
T(),
|
|
333
|
+
w.filter(C).map((f) => f.row),
|
|
334
|
+
c
|
|
335
|
+
)), N;
|
|
323
336
|
}
|
|
324
|
-
async function
|
|
337
|
+
async function Ge(e) {
|
|
325
338
|
if (l.selectionType === "radio") return !1;
|
|
326
|
-
const a = e ?? (
|
|
327
|
-
for (const
|
|
328
|
-
a ? n.add(
|
|
329
|
-
const r = await
|
|
339
|
+
const a = e ?? (xe.value && l.selectOnIndeterminate === !1 ? !1 : !se.value), t = S.value, n = new Set(t), o = F.value;
|
|
340
|
+
for (const c of o)
|
|
341
|
+
a ? n.add(c.token) : n.delete(c.token);
|
|
342
|
+
const r = await ee(n);
|
|
330
343
|
if (r) {
|
|
331
|
-
const
|
|
332
|
-
i("selectAll",
|
|
344
|
+
const c = o.filter(({ token: u }) => t.has(u) !== n.has(u));
|
|
345
|
+
i("selectAll", T(), a, c.map(({ row: u }) => u));
|
|
333
346
|
}
|
|
334
347
|
return r;
|
|
335
348
|
}
|
|
336
|
-
async function
|
|
337
|
-
if (l.selectionType === "radio" || g.value || !
|
|
349
|
+
async function Ve() {
|
|
350
|
+
if (l.selectionType === "radio" || g.value || !d.value)
|
|
338
351
|
return !1;
|
|
339
|
-
const e = new Set(
|
|
340
|
-
for (const t of
|
|
352
|
+
const e = new Set(S.value);
|
|
353
|
+
for (const t of F.value)
|
|
341
354
|
(l.checkStrictly !== !1 || !t.children.some(C)) && (e.has(t.token) ? e.delete(t.token) : e.add(t.token));
|
|
342
|
-
const a = await
|
|
343
|
-
return a && i("selectInvert",
|
|
355
|
+
const a = await ee(e);
|
|
356
|
+
return a && i("selectInvert", T(), M.value), a;
|
|
344
357
|
}
|
|
345
|
-
async function
|
|
346
|
-
if (l.selectionType === "radio" || g.value || !
|
|
347
|
-
const t = new Set(e.map(b)), n = new Set(
|
|
358
|
+
async function Xe(e, a = F.value) {
|
|
359
|
+
if (l.selectionType === "radio" || g.value || !d.value) return !1;
|
|
360
|
+
const t = new Set(e.map(b)), n = new Set(S.value);
|
|
348
361
|
for (const o of a) {
|
|
349
|
-
const r =
|
|
362
|
+
const r = v.value.map.get(o.token);
|
|
350
363
|
(r == null ? void 0 : r.row) !== o.row || !C(r) || (t.has(o.token) ? n.add(o.token) : n.delete(o.token));
|
|
351
364
|
}
|
|
352
|
-
return
|
|
365
|
+
return ee(n);
|
|
353
366
|
}
|
|
354
|
-
async function
|
|
355
|
-
const e =
|
|
367
|
+
async function De() {
|
|
368
|
+
const e = M.value.length > 0, a = await p([]);
|
|
356
369
|
return e && a && i("selectNone"), a;
|
|
357
370
|
}
|
|
358
|
-
async function
|
|
359
|
-
if (g.value || !
|
|
360
|
-
const a = e == null ? void 0 :
|
|
371
|
+
async function Be(e) {
|
|
372
|
+
if (g.value || !d.value) return !1;
|
|
373
|
+
const a = e == null ? void 0 : I(e);
|
|
361
374
|
if (e != null && !a) return !1;
|
|
362
|
-
const t =
|
|
363
|
-
|
|
364
|
-
const n =
|
|
365
|
-
return n &&
|
|
375
|
+
const t = $.value;
|
|
376
|
+
ne.value = (a == null ? void 0 : a.key) ?? null, i("update:currentRowKey", ne.value), await te();
|
|
377
|
+
const n = d.value && Z.value === ((a == null ? void 0 : a.key) ?? null);
|
|
378
|
+
return n && $.value !== t && i("currentChange", $.value, t), n;
|
|
366
379
|
}
|
|
367
|
-
function
|
|
380
|
+
function q(e) {
|
|
368
381
|
const a = h.value.get(e);
|
|
369
382
|
if (!a) return;
|
|
370
383
|
a.controller.abort(), W.delete(a.row);
|
|
371
384
|
const t = new Map(h.value);
|
|
372
385
|
t.delete(e), h.value = t;
|
|
373
386
|
}
|
|
374
|
-
async function
|
|
375
|
-
var
|
|
376
|
-
const t =
|
|
377
|
-
if (!t || !n || !l.treeMode || g.value || !
|
|
387
|
+
async function ze(e, a = !1) {
|
|
388
|
+
var c;
|
|
389
|
+
const t = I(e), n = l.loadChildren;
|
|
390
|
+
if (!t || !n || !l.treeMode || g.value || !d.value || h.value.has(t.token))
|
|
378
391
|
return !1;
|
|
379
|
-
if (!a && !t.lazy &&
|
|
392
|
+
if (!a && !t.lazy && m.value.has(t.token)) return !0;
|
|
380
393
|
W.add(t.row);
|
|
381
394
|
const o = { row: t.row, controller: new AbortController() };
|
|
382
395
|
h.value = new Map(h.value).set(t.token, o);
|
|
383
|
-
const r = new Map(
|
|
384
|
-
r.delete(t.token),
|
|
396
|
+
const r = new Map(E.value);
|
|
397
|
+
r.delete(t.token), E.value = r;
|
|
385
398
|
try {
|
|
386
|
-
const
|
|
399
|
+
const u = await n(t.row, {
|
|
387
400
|
signal: o.controller.signal,
|
|
388
401
|
key: t.key,
|
|
389
402
|
depth: t.depth
|
|
390
403
|
});
|
|
391
|
-
if (!
|
|
404
|
+
if (!d.value || o.controller.signal.aborted || h.value.get(t.token) !== o || ((c = v.value.map.get(t.token)) == null ? void 0 : c.row) !== t.row || l.loadChildren !== n)
|
|
392
405
|
return !1;
|
|
393
|
-
if (!Array.isArray(
|
|
406
|
+
if (!Array.isArray(u))
|
|
394
407
|
throw new TypeError("loadChildren must return an array");
|
|
395
|
-
return
|
|
408
|
+
return m.value = new Map(m.value).set(t.token, {
|
|
396
409
|
row: t.row,
|
|
397
|
-
rows:
|
|
398
|
-
}), i("load", t.row,
|
|
399
|
-
} catch (
|
|
400
|
-
return
|
|
410
|
+
rows: u
|
|
411
|
+
}), i("load", t.row, u), !0;
|
|
412
|
+
} catch (u) {
|
|
413
|
+
return d.value && !o.controller.signal.aborted && h.value.get(t.token) === o && (E.value = new Map(E.value).set(t.token, u), i("loadError", t.row, u)), !1;
|
|
401
414
|
} finally {
|
|
402
415
|
if (h.value.get(t.token) === o) {
|
|
403
|
-
const
|
|
404
|
-
|
|
416
|
+
const u = new Map(h.value);
|
|
417
|
+
u.delete(t.token), h.value = u;
|
|
405
418
|
}
|
|
406
419
|
}
|
|
407
420
|
}
|
|
408
|
-
function
|
|
421
|
+
function Oe(e) {
|
|
409
422
|
var a;
|
|
410
423
|
return ((a = l.rowExpandable) == null ? void 0 : a.call(l, e.row)) !== !1 && (e.children.length > 0 || e.lazy || !!l.expandable || fe());
|
|
411
424
|
}
|
|
412
|
-
async function
|
|
425
|
+
async function He(e, a) {
|
|
413
426
|
var r;
|
|
414
|
-
const t =
|
|
415
|
-
if (!t || !l.treeMode || g.value || !
|
|
427
|
+
const t = I(e);
|
|
428
|
+
if (!t || !l.treeMode || g.value || !d.value || !Array.isArray(a))
|
|
416
429
|
return !1;
|
|
417
|
-
|
|
430
|
+
q(t.token), W.add(t.row);
|
|
418
431
|
const n = { row: t.row, rows: [...a], override: !0 };
|
|
419
|
-
|
|
420
|
-
const o = new Map(
|
|
421
|
-
return o.delete(t.token),
|
|
432
|
+
m.value = new Map(m.value).set(t.token, n);
|
|
433
|
+
const o = new Map(E.value);
|
|
434
|
+
return o.delete(t.token), E.value = o, await te(), !d.value || m.value.get(t.token) !== n || ((r = v.value.map.get(t.token)) == null ? void 0 : r.row) !== t.row ? !1 : (i("childrenChange", t.row, n.rows), !0);
|
|
422
435
|
}
|
|
423
|
-
async function
|
|
424
|
-
const t =
|
|
425
|
-
if (!t || !
|
|
426
|
-
const n = a ?? !
|
|
427
|
-
return n && o.push(t.key),
|
|
436
|
+
async function Ue(e, a) {
|
|
437
|
+
const t = I(e);
|
|
438
|
+
if (!t || !Oe(t) || g.value || !d.value) return !1;
|
|
439
|
+
const n = a ?? !X.value.has(t.token), o = V.value.filter((c) => b(c) !== t.token);
|
|
440
|
+
return n && o.push(t.key), ke.value = !0, we.value = o, i("update:expandedRowKeys", o), await te(), d.value && X.value.has(t.token) === n ? (i("expandChange", t.row, n, V.value), n || q(t.token), !0) : !1;
|
|
428
441
|
}
|
|
429
|
-
function
|
|
430
|
-
|
|
431
|
-
for (const e of [...h.value.keys()])
|
|
442
|
+
function Ke() {
|
|
443
|
+
d.value = !1;
|
|
444
|
+
for (const e of [...h.value.keys()]) q(e);
|
|
432
445
|
}
|
|
433
|
-
return
|
|
446
|
+
return U(
|
|
434
447
|
() => l.loadChildren,
|
|
435
448
|
() => {
|
|
436
|
-
for (const e of [...h.value.keys()])
|
|
437
|
-
|
|
449
|
+
for (const e of [...h.value.keys()]) q(e);
|
|
450
|
+
m.value = /* @__PURE__ */ new Map(), E.value = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new WeakSet();
|
|
438
451
|
}
|
|
439
|
-
),
|
|
440
|
-
if (e) for (const a of [...h.value.keys()])
|
|
441
|
-
}),
|
|
442
|
-
[
|
|
452
|
+
), U(g, (e) => {
|
|
453
|
+
if (e) for (const a of [...h.value.keys()]) q(a);
|
|
454
|
+
}), U(
|
|
455
|
+
[V, () => v.value.all, () => h.value.size, d, g],
|
|
443
456
|
() => {
|
|
444
457
|
var a;
|
|
445
|
-
if (!
|
|
458
|
+
if (!d.value || g.value) return;
|
|
446
459
|
let e = Math.max(0, 4 - h.value.size);
|
|
447
|
-
for (const t of
|
|
460
|
+
for (const t of v.value.all) {
|
|
448
461
|
if (!e) break;
|
|
449
|
-
t.lazy &&
|
|
462
|
+
t.lazy && X.value.has(t.token) && !W.has(t.row) && !E.value.has(t.token) && ((a = l.rowExpandable) == null ? void 0 : a.call(l, t.row)) !== !1 && (e--, ze(t.key));
|
|
450
463
|
}
|
|
451
464
|
},
|
|
452
465
|
{ immediate: !0, flush: "post" }
|
|
453
|
-
),
|
|
454
|
-
live:
|
|
466
|
+
), Je(() => d.value = !0), Le(Ke), Qe(Ke), {
|
|
467
|
+
live: d,
|
|
455
468
|
busy: g,
|
|
456
|
-
graph:
|
|
457
|
-
rowId:
|
|
458
|
-
selectedKeys:
|
|
459
|
-
selectedSet:
|
|
460
|
-
expandedKeys:
|
|
461
|
-
expandedSet:
|
|
462
|
-
halfSet:
|
|
469
|
+
graph: v,
|
|
470
|
+
rowId: oe,
|
|
471
|
+
selectedKeys: M,
|
|
472
|
+
selectedSet: S,
|
|
473
|
+
expandedKeys: V,
|
|
474
|
+
expandedSet: X,
|
|
475
|
+
halfSet: ce,
|
|
463
476
|
eligible: C,
|
|
464
|
-
allSelected:
|
|
465
|
-
someSelected:
|
|
466
|
-
selectionPage:
|
|
467
|
-
sorts:
|
|
468
|
-
filters:
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
477
|
+
allSelected: se,
|
|
478
|
+
someSelected: xe,
|
|
479
|
+
selectionPage: F,
|
|
480
|
+
sorts: j,
|
|
481
|
+
filters: P,
|
|
482
|
+
search: G,
|
|
483
|
+
processed: z,
|
|
484
|
+
filteredRows: be,
|
|
485
|
+
display: Y,
|
|
486
|
+
page: Q,
|
|
487
|
+
pageSize: D,
|
|
488
|
+
pageCount: ie,
|
|
489
|
+
paginationTotal: Se,
|
|
490
|
+
pagination: O,
|
|
491
|
+
currentKey: Z,
|
|
492
|
+
currentRow: $,
|
|
493
|
+
query: me,
|
|
480
494
|
pending: h,
|
|
481
|
-
loadErrors:
|
|
482
|
-
canExpand:
|
|
483
|
-
nextSortOrder:
|
|
484
|
-
toggleSort:
|
|
485
|
-
setSort:
|
|
486
|
-
setFilter:
|
|
487
|
-
clearFilter:
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
495
|
+
loadErrors: E,
|
|
496
|
+
canExpand: Oe,
|
|
497
|
+
nextSortOrder: Ae,
|
|
498
|
+
toggleSort: Pe,
|
|
499
|
+
setSort: Ce,
|
|
500
|
+
setFilter: Ie,
|
|
501
|
+
clearFilter: qe,
|
|
502
|
+
setSearch: Ne,
|
|
503
|
+
requestPage: Te,
|
|
504
|
+
changeSize: je,
|
|
505
|
+
toggleRowSelection: We,
|
|
506
|
+
toggleAllSelection: Ge,
|
|
507
|
+
invertSelection: Ve,
|
|
508
|
+
clearSelection: De,
|
|
509
|
+
selectPage: Xe,
|
|
510
|
+
getSelectionRows: T,
|
|
511
|
+
getHalfSelectionRows: () => v.value.all.filter((e) => ce.value.has(e.token)).map((e) => e.row),
|
|
512
|
+
setCurrentRow: Be,
|
|
513
|
+
toggleRowExpansion: Ue,
|
|
514
|
+
loadRow: ze,
|
|
515
|
+
updateKeyChildren: He,
|
|
516
|
+
find: I
|
|
502
517
|
};
|
|
503
518
|
}
|
|
504
519
|
export {
|
|
505
|
-
|
|
520
|
+
at as useTable
|
|
506
521
|
};
|