hys-ui 0.6.0 → 0.8.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 +15 -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/HysDatePicker/HysDatePicker.vue.js +102 -48
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +874 -532
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +209 -168
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +102 -48
- package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
- package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
- 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/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/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/composables/datePicker.js +153 -94
- package/dist/composables/datePickerModel.js +156 -0
- package/dist/composables/datePickerPanels.js +78 -0
- package/dist/composables/datePickerRules.js +166 -0
- package/dist/composables/floatingPosition.js +32 -13
- package/dist/composables/formLayout.js +20 -42
- package/dist/composables/popupSurfaceStyle.js +30 -0
- package/dist/composables/useContainerWidth.js +24 -0
- package/dist/composables/useDatePicker.js +274 -381
- package/dist/composables/useFloating.js +42 -41
- package/dist/composables/usePageVisibility.js +19 -0
- package/dist/composables/usePopupSurface.js +153 -162
- package/dist/composables/usePopupSurfaceInteractions.js +91 -90
- 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 +229 -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/HysDatePicker/HysDatePicker.vue.d.ts +6 -9
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +12 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +6 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +6 -9
- 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/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/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/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/toastPresentation.d.ts +1 -1
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
- package/dist/types/composables/dataGrid.d.ts +34 -0
- package/dist/types/composables/datePicker.d.ts +14 -214
- package/dist/types/composables/datePickerModel.d.ts +63 -0
- package/dist/types/composables/datePickerPanels.d.ts +23 -0
- package/dist/types/composables/datePickerRules.d.ts +31 -0
- package/dist/types/composables/datePickerTypes.d.ts +277 -0
- package/dist/types/composables/floatingPosition.d.ts +1 -1
- package/dist/types/composables/formLayout.d.ts +1 -2
- package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
- package/dist/types/composables/table.d.ts +10 -1
- package/dist/types/composables/toastQueue.d.ts +4 -4
- package/dist/types/composables/toastQueueModel.d.ts +2 -2
- package/dist/types/composables/useColorPicker.d.ts +2 -4
- package/dist/types/composables/useContainerWidth.d.ts +2 -0
- package/dist/types/composables/useContextMenu.d.ts +2 -4
- package/dist/types/composables/useDatePicker.d.ts +20 -11
- package/dist/types/composables/useFloating.d.ts +4 -5
- package/dist/types/composables/usePageVisibility.d.ts +1 -0
- package/dist/types/composables/usePopupSurface.d.ts +9 -3
- package/dist/types/composables/usePopupSurfaceInteractions.d.ts +4 -2
- 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 +31 -3
- 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
|
@@ -20,9 +20,19 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
20
20
|
"onUpdate:pageSize"?: ((size: number) => any) | undefined;
|
|
21
21
|
onRowClick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
22
22
|
"onUpdate:selectedRowKeys"?: ((keys: HysTableKey[]) => any) | undefined;
|
|
23
|
+
"onUpdate:currentRowKey"?: ((key: HysTableKey | null) => any) | undefined;
|
|
24
|
+
onCurrentChange?: ((row: T | undefined, previous: T | undefined) => any) | undefined;
|
|
25
|
+
onHeaderClick?: ((column: HysTableColumn<T>, event: MouseEvent) => any) | undefined;
|
|
26
|
+
onHeaderContextmenu?: ((column: HysTableColumn<T>, event: MouseEvent) => any) | undefined;
|
|
27
|
+
onRowDblclick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
28
|
+
onRowContextmenu?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
29
|
+
onCellClick?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
30
|
+
onCellDblclick?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
31
|
+
onCellContextmenu?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
23
32
|
onSortChange?: ((sort: HysTableSort | null, sorts: HysTableSort[]) => any) | undefined;
|
|
24
33
|
onPageChange?: ((page: number) => any) | undefined;
|
|
25
34
|
onQueryChange?: ((query: HysTableQuery<T>) => any) | undefined;
|
|
35
|
+
"onUpdate:search"?: ((search: string) => any) | undefined;
|
|
26
36
|
"onUpdate:sort"?: ((sort: HysTableSort | null) => any) | undefined;
|
|
27
37
|
"onUpdate:sorts"?: ((sorts: HysTableSort[]) => any) | undefined;
|
|
28
38
|
"onUpdate:filters"?: ((filters: HysTableFilters) => any) | undefined;
|
|
@@ -30,19 +40,10 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
30
40
|
onSelectRange?: ((rows: T[], rangeRows: T[], checked: boolean) => any) | undefined;
|
|
31
41
|
onSelectInvert?: ((rows: T[], keys: HysTableKey[]) => any) | undefined;
|
|
32
42
|
onSelectNone?: (() => any) | undefined;
|
|
33
|
-
"onUpdate:currentRowKey"?: ((key: HysTableKey | null) => any) | undefined;
|
|
34
|
-
onCurrentChange?: ((row: T | undefined, previous: T | undefined) => any) | undefined;
|
|
35
43
|
onChildrenChange?: ((row: T, children: readonly T[]) => any) | undefined;
|
|
36
44
|
"onUpdate:expandedRowKeys"?: ((keys: HysTableKey[]) => any) | undefined;
|
|
37
|
-
onRowDblclick?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
38
|
-
onRowContextmenu?: ((row: T, index: number, event: MouseEvent) => any) | undefined;
|
|
39
|
-
onCellClick?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
40
|
-
onCellDblclick?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
41
|
-
onCellContextmenu?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
42
45
|
onCellMouseEnter?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
43
46
|
onCellMouseLeave?: ((context: HysTableCellContext<T>, event: MouseEvent) => any) | undefined;
|
|
44
|
-
onHeaderClick?: ((column: HysTableColumn<T>, event: MouseEvent) => any) | undefined;
|
|
45
|
-
onHeaderContextmenu?: ((column: HysTableColumn<T>, event: MouseEvent) => any) | undefined;
|
|
46
47
|
"onUpdate:filterColumnKey"?: ((key: string | null) => any) | undefined;
|
|
47
48
|
onFilterOpenChange?: ((key: string | null) => any) | undefined;
|
|
48
49
|
"onUpdate:columnWidths"?: ((widths: Record<string, number>) => any) | undefined;
|
|
@@ -72,6 +73,9 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
72
73
|
setSort: (value: HysTableSort | readonly HysTableSort[] | null) => void;
|
|
73
74
|
clearFilter: (keys?: readonly string[]) => void;
|
|
74
75
|
setFilter: (key: string, values: readonly HysTableFilterValue[]) => void;
|
|
76
|
+
setSearch: (value: string) => void;
|
|
77
|
+
clearSearch: () => void;
|
|
78
|
+
focusRow: (row: T | HysTableKey) => boolean;
|
|
75
79
|
showFilter: (key: string) => Promise<boolean>;
|
|
76
80
|
hideFilter: () => Promise<boolean>;
|
|
77
81
|
setPage: (n: number, action?: "page" | "pageSize") => void;
|
|
@@ -106,6 +110,8 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
106
110
|
rows: T[];
|
|
107
111
|
pageRows: T[];
|
|
108
112
|
query: HysTableQuery<T>;
|
|
113
|
+
search: string;
|
|
114
|
+
setSearch: (value: string) => void;
|
|
109
115
|
}) => any;
|
|
110
116
|
} & {
|
|
111
117
|
selection?: (props: {
|
|
@@ -1955,7 +1961,7 @@ declare const __VLS_export: <T extends object = Record<string, unknown>>(__VLS_p
|
|
|
1955
1961
|
emit: ((evt: "change", query: HysTableQuery<T>) => void) & ((evt: "select", rows: T[], row: T, checked: boolean) => void) & ((evt: "load", row: T, children: readonly T[]) => void) & ((evt: "scroll", position: {
|
|
1956
1962
|
scrollLeft: number;
|
|
1957
1963
|
scrollTop: number;
|
|
1958
|
-
}, event: Event) => void) & ((evt: "loadError", row: T, error: unknown) => void) & ((evt: "selectionChange", rows: T[], keys: HysTableKey[]) => void) & ((evt: "selectAll", rows: T[], checked: boolean, changedRows: T[]) => void) & ((evt: "expandChange", row: T, expanded: boolean, keys: HysTableKey[]) => void) & ((evt: "update:page", page: number) => void) & ((evt: "pageSizeChange", size: number) => void) & ((evt: "update:pageSize", size: number) => void) & ((evt: "rowClick", row: T, index: number, event: MouseEvent) => void) & ((evt: "update:selectedRowKeys", keys: HysTableKey[]) => void) & ((evt: "
|
|
1964
|
+
}, event: Event) => void) & ((evt: "loadError", row: T, error: unknown) => void) & ((evt: "selectionChange", rows: T[], keys: HysTableKey[]) => void) & ((evt: "selectAll", rows: T[], checked: boolean, changedRows: T[]) => void) & ((evt: "expandChange", row: T, expanded: boolean, keys: HysTableKey[]) => void) & ((evt: "update:page", page: number) => void) & ((evt: "pageSizeChange", size: number) => void) & ((evt: "update:pageSize", size: number) => void) & ((evt: "rowClick", row: T, index: number, event: MouseEvent) => void) & ((evt: "update:selectedRowKeys", keys: HysTableKey[]) => void) & ((evt: "update:currentRowKey", key: HysTableKey | null) => void) & ((evt: "currentChange", row: T | undefined, previous: T | undefined) => void) & ((evt: "headerClick", column: HysTableColumn<T>, event: MouseEvent) => void) & ((evt: "headerContextmenu", column: HysTableColumn<T>, event: MouseEvent) => void) & ((evt: "rowDblclick", row: T, index: number, event: MouseEvent) => void) & ((evt: "rowContextmenu", row: T, index: number, event: MouseEvent) => void) & ((evt: "cellClick", context: HysTableCellContext<T>, event: MouseEvent) => void) & ((evt: "cellDblclick", context: HysTableCellContext<T>, event: MouseEvent) => void) & ((evt: "cellContextmenu", context: HysTableCellContext<T>, event: MouseEvent) => void) & ((evt: "sortChange", sort: HysTableSort | null, sorts: HysTableSort[]) => void) & ((evt: "pageChange", page: number) => void) & ((evt: "queryChange", query: HysTableQuery<T>) => void) & ((evt: "update:search", search: string) => void) & ((evt: "update:sort", sort: HysTableSort | null) => void) & ((evt: "update:sorts", sorts: HysTableSort[]) => void) & ((evt: "update:filters", filters: HysTableFilters) => void) & ((evt: "filterChange", filters: HysTableFilters) => void) & ((evt: "selectRange", rows: T[], rangeRows: T[], checked: boolean) => void) & ((evt: "selectInvert", rows: T[], keys: HysTableKey[]) => void) & ((evt: "selectNone") => void) & ((evt: "childrenChange", row: T, children: readonly T[]) => void) & ((evt: "update:expandedRowKeys", keys: HysTableKey[]) => void) & ((evt: "cellMouseEnter", context: HysTableCellContext<T>, event: MouseEvent) => void) & ((evt: "cellMouseLeave", context: HysTableCellContext<T>, event: MouseEvent) => void) & ((evt: "update:filterColumnKey", key: string | null) => void) & ((evt: "filterOpenChange", key: string | null) => void) & ((evt: "update:columnWidths", widths: Record<string, number>) => void) & ((evt: "columnResize", column: HysTableColumn<T>, width: number, previous: number) => void);
|
|
1959
1965
|
}>) => import("vue").VNode & {
|
|
1960
1966
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
1961
1967
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type HysTableColumn } from "../../composables/table";
|
|
2
|
+
export declare function tableSearchPredicate<T extends object>(search: string, columns: readonly HysTableColumn<T>[], keys?: readonly string[], filter?: (search: string, row: T) => boolean): ((row: T) => boolean) | undefined;
|
|
@@ -1,95 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
addable?: boolean;
|
|
23
|
-
editable?: boolean;
|
|
24
|
-
trigger?: 'click' | 'hover';
|
|
25
|
-
activation?: 'auto' | 'manual';
|
|
26
|
-
/** 首次访问时才挂载面板;用于 panel 插槽。 */
|
|
27
|
-
lazy?: boolean;
|
|
28
|
-
/** 离开时销毁面板;默认保留已访问面板的局部状态。 */
|
|
29
|
-
destroyOnHide?: boolean;
|
|
30
|
-
animated?: boolean;
|
|
31
|
-
showScrollButtons?: boolean;
|
|
32
|
-
ariaLabel?: string;
|
|
33
|
-
beforeLeave?: (next: HysTabValue, current: HysTabValue) => boolean | void | Promise<boolean | void>;
|
|
34
|
-
beforeClose?: (value: HysTabValue) => boolean | void | Promise<boolean | void>;
|
|
35
|
-
};
|
|
36
|
-
declare function scrollToActiveTab(): void;
|
|
37
|
-
declare const __VLS_template: () => {
|
|
38
|
-
__VLS_Slots: {
|
|
39
|
-
prefix?: (props: {}) => any;
|
|
40
|
-
} & {
|
|
41
|
-
label?: (props: {
|
|
42
|
-
item: HysTabItem;
|
|
43
|
-
active: boolean;
|
|
44
|
-
}) => any;
|
|
45
|
-
} & {
|
|
46
|
-
'close-icon'?: (props: {
|
|
47
|
-
item: HysTabItem;
|
|
48
|
-
}) => any;
|
|
49
|
-
} & {
|
|
50
|
-
'add-icon'?: (props: {}) => any;
|
|
51
|
-
} & {
|
|
52
|
-
suffix?: (props: {}) => any;
|
|
53
|
-
} & {
|
|
54
|
-
panel?: (props: {
|
|
55
|
-
item: HysTabItem;
|
|
56
|
-
active: boolean;
|
|
57
|
-
}) => any;
|
|
58
|
-
} & {
|
|
59
|
-
default?: (props: {
|
|
60
|
-
active: HysTabValue;
|
|
61
|
-
}) => any;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
65
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
66
|
-
scrollToActiveTab: typeof scrollToActiveTab;
|
|
67
|
-
focus: (value?: HysTabValue) => void;
|
|
1
|
+
import type { HysTabCloseScope, HysTabItem, HysTabsProps, HysTabsSlots, HysTabValue } from "./tabsTypes";
|
|
2
|
+
export type { HysTabItem, HysTabValue } from "./tabsTypes";
|
|
3
|
+
type __VLS_Slots = HysTabsSlots;
|
|
4
|
+
declare const __VLS_base: import("vue").DefineComponent<HysTabsProps, {
|
|
5
|
+
active: import("vue").ComputedRef<HysTabValue>;
|
|
6
|
+
recent: import("vue").ComputedRef<HysTabValue[]>;
|
|
7
|
+
closed: import("vue").ComputedRef<HysTabItem[]>;
|
|
8
|
+
select: (value: HysTabValue) => Promise<boolean>;
|
|
9
|
+
focus: (value?: HysTabValue) => void | undefined;
|
|
10
|
+
scrollToActiveTab: () => void | undefined;
|
|
11
|
+
add: (item?: HysTabItem) => Promise<boolean>;
|
|
12
|
+
close: (value?: HysTabValue) => Promise<boolean>;
|
|
13
|
+
closeMany: (scope: HysTabCloseScope | readonly HysTabValue[], anchor?: HysTabValue) => Promise<HysTabValue[]>;
|
|
14
|
+
rename: (value: HysTabValue, label: string) => Promise<boolean>;
|
|
15
|
+
move: (value: HysTabValue, target: HysTabValue, after?: boolean) => Promise<boolean>;
|
|
16
|
+
pin: (value: HysTabValue, pinned?: boolean) => Promise<boolean>;
|
|
17
|
+
favorite: (value: HysTabValue, favorite?: boolean) => Promise<boolean>;
|
|
18
|
+
restore: () => Promise<boolean>;
|
|
19
|
+
preload: (value: HysTabValue) => Promise<boolean>;
|
|
20
|
+
reload: (value?: HysTabValue) => Promise<boolean>;
|
|
21
|
+
save: () => boolean;
|
|
68
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
69
23
|
change: (value: HysTabValue) => any;
|
|
70
24
|
"update:modelValue": (value: HysTabValue) => any;
|
|
71
25
|
guardError: (error: unknown) => any;
|
|
72
26
|
add: () => any;
|
|
73
27
|
close: (value: HysTabValue) => any;
|
|
74
|
-
|
|
28
|
+
load: (value: HysTabValue, content: import("./tabsTypes").HysTabContent) => any;
|
|
29
|
+
loadError: (value: HysTabValue, error: unknown) => any;
|
|
30
|
+
selectionChange: (context: import("./tabsTypes").HysTabChangeContext) => any;
|
|
31
|
+
"update:items": (items: HysTabItem[]) => any;
|
|
75
32
|
edit: (value: HysTabValue | undefined, action: "add" | "remove") => any;
|
|
76
|
-
|
|
33
|
+
reorder: (context: import("./tabsTypes").HysTabOrderContext) => any;
|
|
34
|
+
rename: (value: HysTabValue, label: string) => any;
|
|
35
|
+
restore: (item: HysTabItem) => any;
|
|
36
|
+
tabClick: (value: HysTabValue, event: MouseEvent) => any;
|
|
37
|
+
tabDblclick: (value: HysTabValue, event: MouseEvent) => any;
|
|
38
|
+
tabContextmenu: (value: HysTabValue, event: KeyboardEvent | PointerEvent | MouseEvent) => any;
|
|
39
|
+
tabLongpress: (value: HysTabValue, event: PointerEvent) => any;
|
|
40
|
+
previewChange: (value: HysTabValue | undefined) => any;
|
|
41
|
+
closeBatch: (values: HysTabValue[]) => any;
|
|
42
|
+
pinChange: (value: HysTabValue, pinned: boolean) => any;
|
|
43
|
+
favoriteChange: (value: HysTabValue, favorite: boolean) => any;
|
|
44
|
+
loadStart: (value: HysTabValue) => any;
|
|
45
|
+
storageError: (error: unknown) => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<HysTabsProps> & Readonly<{
|
|
77
47
|
onChange?: ((value: HysTabValue) => any) | undefined;
|
|
78
48
|
"onUpdate:modelValue"?: ((value: HysTabValue) => any) | undefined;
|
|
79
49
|
onGuardError?: ((error: unknown) => any) | undefined;
|
|
80
50
|
onAdd?: (() => any) | undefined;
|
|
81
51
|
onClose?: ((value: HysTabValue) => any) | undefined;
|
|
82
|
-
|
|
52
|
+
onLoad?: ((value: HysTabValue, content: import("./tabsTypes").HysTabContent) => any) | undefined;
|
|
53
|
+
onLoadError?: ((value: HysTabValue, error: unknown) => any) | undefined;
|
|
54
|
+
onSelectionChange?: ((context: import("./tabsTypes").HysTabChangeContext) => any) | undefined;
|
|
55
|
+
"onUpdate:items"?: ((items: HysTabItem[]) => any) | undefined;
|
|
83
56
|
onEdit?: ((value: HysTabValue | undefined, action: "add" | "remove") => any) | undefined;
|
|
57
|
+
onReorder?: ((context: import("./tabsTypes").HysTabOrderContext) => any) | undefined;
|
|
58
|
+
onRename?: ((value: HysTabValue, label: string) => any) | undefined;
|
|
59
|
+
onRestore?: ((item: HysTabItem) => any) | undefined;
|
|
60
|
+
onTabClick?: ((value: HysTabValue, event: MouseEvent) => any) | undefined;
|
|
61
|
+
onTabDblclick?: ((value: HysTabValue, event: MouseEvent) => any) | undefined;
|
|
62
|
+
onTabContextmenu?: ((value: HysTabValue, event: KeyboardEvent | PointerEvent | MouseEvent) => any) | undefined;
|
|
63
|
+
onTabLongpress?: ((value: HysTabValue, event: PointerEvent) => any) | undefined;
|
|
64
|
+
onPreviewChange?: ((value: HysTabValue | undefined) => any) | undefined;
|
|
65
|
+
onCloseBatch?: ((values: HysTabValue[]) => any) | undefined;
|
|
66
|
+
onPinChange?: ((value: HysTabValue, pinned: boolean) => any) | undefined;
|
|
67
|
+
onFavoriteChange?: ((value: HysTabValue, favorite: boolean) => any) | undefined;
|
|
68
|
+
onLoadStart?: ((value: HysTabValue) => any) | undefined;
|
|
69
|
+
onStorageError?: ((error: unknown) => any) | undefined;
|
|
84
70
|
}>, {
|
|
85
|
-
|
|
86
|
-
trigger: "click" | "hover";
|
|
71
|
+
disabled: boolean;
|
|
87
72
|
lazy: boolean;
|
|
88
73
|
destroyOnHide: boolean;
|
|
89
|
-
|
|
74
|
+
fixed: boolean;
|
|
75
|
+
draggable: boolean;
|
|
76
|
+
closable: boolean;
|
|
77
|
+
vertical: boolean;
|
|
78
|
+
stretch: boolean;
|
|
79
|
+
sticky: boolean;
|
|
80
|
+
separator: boolean;
|
|
81
|
+
readonly: boolean;
|
|
82
|
+
animationName: string;
|
|
83
|
+
editable: boolean;
|
|
84
|
+
contextMenu: boolean;
|
|
85
|
+
preview: boolean;
|
|
86
|
+
responsive: boolean;
|
|
87
|
+
shortcuts: boolean;
|
|
88
|
+
centered: boolean;
|
|
89
|
+
preload: boolean | readonly HysTabValue[];
|
|
90
|
+
swipe: boolean;
|
|
90
91
|
animated: boolean;
|
|
91
|
-
|
|
92
|
+
workbench: boolean;
|
|
93
|
+
addable: boolean;
|
|
94
|
+
autoActivate: boolean;
|
|
92
95
|
showScrollButtons: boolean;
|
|
96
|
+
dragScroll: boolean;
|
|
97
|
+
dragHandle: boolean;
|
|
98
|
+
titleTooltip: boolean;
|
|
99
|
+
moreSearch: boolean;
|
|
100
|
+
confirmDirty: boolean;
|
|
101
|
+
persistScroll: boolean;
|
|
93
102
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
94
103
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
95
104
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HysTabItem, HysTabsSlots, HysTabValue } from "../tabsTypes";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: readonly HysTabItem[];
|
|
4
|
+
overflow: readonly HysTabValue[];
|
|
5
|
+
recent: readonly HysTabValue[];
|
|
6
|
+
active: HysTabValue;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
search?: boolean;
|
|
9
|
+
slots: HysTabsSlots;
|
|
10
|
+
select: (value: HysTabValue) => Promise<boolean>;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { HysTabItem, HysTabsSlots, HysTabValue } from "../tabsTypes";
|
|
2
|
+
import type { TabDeclaration } from "../tabsItems";
|
|
3
|
+
import type { useTabsPanels } from "../useTabsPanels";
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
items: readonly HysTabItem[];
|
|
6
|
+
declarations: readonly TabDeclaration[];
|
|
7
|
+
slots: HysTabsSlots;
|
|
8
|
+
active: HysTabValue;
|
|
9
|
+
panels: ReturnType<typeof useTabsPanels>;
|
|
10
|
+
panelId: (value: HysTabValue) => string;
|
|
11
|
+
tabId: (value: HysTabValue) => string;
|
|
12
|
+
declarative: boolean;
|
|
13
|
+
forcePanels: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HysTabItem } from "../tabsTypes";
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {
|
|
3
|
+
confirm: (items: HysTabItem[], signal: AbortSignal) => Promise<boolean>;
|
|
4
|
+
rename: (item: HysTabItem) => Promise<string | boolean>;
|
|
5
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VNodeChild } from "vue";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
render: FunctionConstructor;
|
|
4
|
+
scope: ObjectConstructor;
|
|
5
|
+
}>, () => VNodeChild, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
6
|
+
render: FunctionConstructor;
|
|
7
|
+
scope: ObjectConstructor;
|
|
8
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type TabDeclaration } from "../tabsItems";
|
|
2
|
+
import type { HysTabItem, HysTabSource, HysTabsProps, HysTabsSlots, HysTabValue, TabsEmit } from "../tabsTypes";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
options: HysTabsProps;
|
|
5
|
+
declarations: TabDeclaration[];
|
|
6
|
+
declarative: boolean;
|
|
7
|
+
slots: HysTabsSlots;
|
|
8
|
+
emit: TabsEmit;
|
|
9
|
+
};
|
|
10
|
+
declare function focus(value?: HysTabValue): void;
|
|
11
|
+
declare function closeFocused(value?: HysTabValue): Promise<boolean>;
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
13
|
+
active: import("vue").ComputedRef<HysTabValue>;
|
|
14
|
+
recent: import("vue").ShallowRef<HysTabValue[], HysTabValue[]>;
|
|
15
|
+
closed: import("vue").ComputedRef<HysTabItem[]>;
|
|
16
|
+
select: (value: HysTabValue, source?: HysTabSource) => Promise<boolean>;
|
|
17
|
+
focus: typeof focus;
|
|
18
|
+
scrollToActiveTab: (value?: HysTabValue) => void;
|
|
19
|
+
add: (item?: HysTabItem) => Promise<boolean>;
|
|
20
|
+
close: typeof closeFocused;
|
|
21
|
+
closeMany: (scope: import("../tabsTypes").HysTabCloseScope | readonly HysTabValue[], anchor?: HysTabValue) => Promise<HysTabValue[]>;
|
|
22
|
+
rename: (value: HysTabValue, name: string) => Promise<boolean>;
|
|
23
|
+
pin: (value: HysTabValue, pinned?: boolean) => Promise<boolean>;
|
|
24
|
+
favorite: (value: HysTabValue, favorite?: boolean) => Promise<boolean>;
|
|
25
|
+
move: (value: HysTabValue, target: HysTabValue, after?: boolean) => Promise<boolean>;
|
|
26
|
+
restore: () => Promise<boolean>;
|
|
27
|
+
preload: (value: HysTabValue) => Promise<boolean>;
|
|
28
|
+
reload: (value?: HysTabValue) => Promise<boolean>;
|
|
29
|
+
save: () => boolean;
|
|
30
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HysTabsConfig, HysTabsProps } from "./tabsTypes";
|
|
2
|
+
export declare function configureHysTabs(config: HysTabsConfig): void;
|
|
3
|
+
export declare function provideHysTabs(config: HysTabsConfig): void;
|
|
4
|
+
export declare function useTabsOptions(props: HysTabsProps): import("vue").ComputedRef<HysTabsProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type VNodeChild } from "vue";
|
|
2
|
+
import type { HysTabItem, HysTabPaneSlots, HysTabValue } from "./tabsTypes";
|
|
3
|
+
export declare const tabToken: (key: HysTabValue) => string;
|
|
4
|
+
export declare function tabIdToken(key: HysTabValue): string;
|
|
5
|
+
export declare const usable: (item: HysTabItem) => boolean;
|
|
6
|
+
export declare function orderedTabs(items: readonly HysTabItem[]): HysTabItem[];
|
|
7
|
+
export declare function neighbor(items: readonly HysTabItem[], previous: readonly HysTabItem[], key: HysTabValue): HysTabItem | undefined;
|
|
8
|
+
export declare function tabLength(value: string | number | undefined): string | undefined;
|
|
9
|
+
export declare const bounded: (value: number | undefined, fallback: number, max: number) => number;
|
|
10
|
+
export interface TabDeclaration {
|
|
11
|
+
item: HysTabItem;
|
|
12
|
+
slots: HysTabPaneSlots;
|
|
13
|
+
}
|
|
14
|
+
export declare function collectTabPanes(content: VNodeChild): TabDeclaration[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { useTabsState } from "./useTabsState";
|
|
2
|
+
import type { HysTabsProps, TabsEmit } from "./tabsTypes";
|
|
3
|
+
export declare function useTabsPersistence(props: () => HysTabsProps, state: ReturnType<typeof useTabsState>, nav: () => HTMLElement | undefined, emit: TabsEmit): {
|
|
4
|
+
save: () => boolean;
|
|
5
|
+
scrolled: () => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { Component, CSSProperties, MaybeRefOrGetter, VNodeChild } from "vue";
|
|
2
|
+
export type HysTabValue = string | number;
|
|
3
|
+
export type HysTabPlacement = "top" | "right" | "bottom" | "left";
|
|
4
|
+
export type HysTabType = "line" | "card" | "border-card" | "pill" | "segment" | "button" | "minimal" | "borderless";
|
|
5
|
+
export type HysTabStatus = "loading" | "success" | "warning" | "error" | "info";
|
|
6
|
+
export type HysTabSource = "click" | "hover" | "keyboard" | "wheel" | "swipe" | "menu" | "api" | "fallback" | "restore";
|
|
7
|
+
export type HysTabAnimation = "fade" | "slide" | "scale" | "spring" | "none";
|
|
8
|
+
export type HysTabCloseScope = "current" | "left" | "right" | "others" | "all";
|
|
9
|
+
export type HysTabContent = string | Component | {
|
|
10
|
+
component: Component;
|
|
11
|
+
props?: Record<string, unknown>;
|
|
12
|
+
} | null;
|
|
13
|
+
export interface HysTabLoadContext {
|
|
14
|
+
item: HysTabItem;
|
|
15
|
+
signal: AbortSignal;
|
|
16
|
+
}
|
|
17
|
+
export interface HysTabItem {
|
|
18
|
+
label: string;
|
|
19
|
+
value: HysTabValue;
|
|
20
|
+
content?: string;
|
|
21
|
+
component?: Component;
|
|
22
|
+
componentProps?: Record<string, unknown>;
|
|
23
|
+
load?: (context: HysTabLoadContext) => HysTabContent | PromiseLike<HysTabContent>;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
readonly?: boolean;
|
|
26
|
+
hidden?: boolean;
|
|
27
|
+
closable?: boolean;
|
|
28
|
+
movable?: boolean;
|
|
29
|
+
pinned?: boolean;
|
|
30
|
+
favorite?: boolean;
|
|
31
|
+
dirty?: boolean;
|
|
32
|
+
unread?: boolean;
|
|
33
|
+
badge?: number | string;
|
|
34
|
+
dot?: boolean;
|
|
35
|
+
status?: HysTabStatus;
|
|
36
|
+
icon?: Component;
|
|
37
|
+
statusIcon?: Component;
|
|
38
|
+
color?: string;
|
|
39
|
+
class?: string;
|
|
40
|
+
style?: CSSProperties;
|
|
41
|
+
width?: number | string;
|
|
42
|
+
lazy?: boolean;
|
|
43
|
+
cache?: boolean;
|
|
44
|
+
forceRender?: boolean;
|
|
45
|
+
preload?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export interface HysTabGuardContext {
|
|
48
|
+
signal: AbortSignal;
|
|
49
|
+
source: HysTabSource;
|
|
50
|
+
item: HysTabItem;
|
|
51
|
+
}
|
|
52
|
+
export interface HysTabChangeContext {
|
|
53
|
+
value: HysTabValue;
|
|
54
|
+
previous: HysTabValue;
|
|
55
|
+
source: HysTabSource;
|
|
56
|
+
}
|
|
57
|
+
export interface HysTabOrderContext {
|
|
58
|
+
value: HysTabValue;
|
|
59
|
+
from: number;
|
|
60
|
+
to: number;
|
|
61
|
+
items: HysTabItem[];
|
|
62
|
+
}
|
|
63
|
+
export type HysTabSnapshot = Pick<HysTabItem, "value" | "label" | "pinned" | "favorite">;
|
|
64
|
+
export interface HysTabsProps {
|
|
65
|
+
modelValue?: HysTabValue;
|
|
66
|
+
defaultValue?: HysTabValue;
|
|
67
|
+
items?: readonly HysTabItem[];
|
|
68
|
+
defaultItems?: readonly HysTabItem[];
|
|
69
|
+
workbench?: boolean;
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
readonly?: boolean;
|
|
72
|
+
type?: HysTabType;
|
|
73
|
+
vertical?: boolean;
|
|
74
|
+
placement?: HysTabPlacement;
|
|
75
|
+
responsive?: boolean;
|
|
76
|
+
breakpoint?: number;
|
|
77
|
+
size?: "sm" | "md" | "lg";
|
|
78
|
+
stretch?: boolean;
|
|
79
|
+
centered?: boolean;
|
|
80
|
+
align?: "start" | "center" | "end" | "between";
|
|
81
|
+
tabWidth?: number | string;
|
|
82
|
+
tabHeight?: number | string;
|
|
83
|
+
tabMaxWidth?: number | string;
|
|
84
|
+
gap?: number | string;
|
|
85
|
+
radius?: number | string;
|
|
86
|
+
separator?: boolean;
|
|
87
|
+
sticky?: boolean;
|
|
88
|
+
fixed?: boolean;
|
|
89
|
+
barOffset?: number | string;
|
|
90
|
+
panelHeight?: number | string;
|
|
91
|
+
panelMaxHeight?: number | string;
|
|
92
|
+
closable?: boolean;
|
|
93
|
+
addable?: boolean;
|
|
94
|
+
editable?: boolean;
|
|
95
|
+
autoActivate?: boolean;
|
|
96
|
+
trigger?: "click" | "hover";
|
|
97
|
+
hoverDelay?: number;
|
|
98
|
+
preview?: boolean;
|
|
99
|
+
activation?: "auto" | "manual";
|
|
100
|
+
lazy?: boolean;
|
|
101
|
+
preload?: boolean | readonly HysTabValue[];
|
|
102
|
+
destroyOnHide?: boolean;
|
|
103
|
+
cacheLimit?: number;
|
|
104
|
+
animated?: boolean;
|
|
105
|
+
animation?: HysTabAnimation;
|
|
106
|
+
animationName?: string;
|
|
107
|
+
duration?: number;
|
|
108
|
+
easing?: string;
|
|
109
|
+
overflow?: "scroll" | "wrap" | "menu" | "clip";
|
|
110
|
+
showScrollButtons?: boolean;
|
|
111
|
+
scrollAlign?: "nearest" | "center";
|
|
112
|
+
wheel?: "none" | "scroll" | "switch";
|
|
113
|
+
dragScroll?: boolean;
|
|
114
|
+
swipe?: boolean;
|
|
115
|
+
draggable?: boolean;
|
|
116
|
+
dragHandle?: boolean;
|
|
117
|
+
longPress?: number;
|
|
118
|
+
contextMenu?: boolean;
|
|
119
|
+
shortcuts?: boolean;
|
|
120
|
+
titleTooltip?: boolean;
|
|
121
|
+
moreSearch?: boolean;
|
|
122
|
+
confirmDirty?: boolean;
|
|
123
|
+
historyLimit?: number;
|
|
124
|
+
storageKey?: string;
|
|
125
|
+
storage?: "session" | "local";
|
|
126
|
+
persistScroll?: boolean;
|
|
127
|
+
restoreItem?: (snapshot: HysTabSnapshot) => HysTabItem | undefined;
|
|
128
|
+
createTab?: (items: readonly HysTabItem[]) => HysTabItem | undefined | PromiseLike<HysTabItem | undefined>;
|
|
129
|
+
ariaLabel?: string;
|
|
130
|
+
beforeLeave?: (next: HysTabValue, current: HysTabValue, context: HysTabGuardContext) => boolean | void | PromiseLike<boolean | void>;
|
|
131
|
+
beforeClose?: (value: HysTabValue, context: HysTabGuardContext) => boolean | void | PromiseLike<boolean | void>;
|
|
132
|
+
beforeReorder?: (context: HysTabOrderContext) => boolean | void;
|
|
133
|
+
}
|
|
134
|
+
export interface HysTabsEmits {
|
|
135
|
+
"update:modelValue": [value: HysTabValue];
|
|
136
|
+
"update:items": [items: HysTabItem[]];
|
|
137
|
+
change: [value: HysTabValue];
|
|
138
|
+
selectionChange: [context: HysTabChangeContext];
|
|
139
|
+
tabClick: [value: HysTabValue, event: MouseEvent];
|
|
140
|
+
tabDblclick: [value: HysTabValue, event: MouseEvent];
|
|
141
|
+
tabContextmenu: [
|
|
142
|
+
value: HysTabValue,
|
|
143
|
+
event: MouseEvent | KeyboardEvent | PointerEvent
|
|
144
|
+
];
|
|
145
|
+
tabLongpress: [value: HysTabValue, event: PointerEvent];
|
|
146
|
+
previewChange: [value: HysTabValue | undefined];
|
|
147
|
+
close: [value: HysTabValue];
|
|
148
|
+
closeBatch: [values: HysTabValue[]];
|
|
149
|
+
add: [];
|
|
150
|
+
edit: [value: HysTabValue | undefined, action: "add" | "remove"];
|
|
151
|
+
reorder: [context: HysTabOrderContext];
|
|
152
|
+
restore: [item: HysTabItem];
|
|
153
|
+
rename: [value: HysTabValue, label: string];
|
|
154
|
+
pinChange: [value: HysTabValue, pinned: boolean];
|
|
155
|
+
favoriteChange: [value: HysTabValue, favorite: boolean];
|
|
156
|
+
loadStart: [value: HysTabValue];
|
|
157
|
+
load: [value: HysTabValue, content: HysTabContent];
|
|
158
|
+
loadError: [value: HysTabValue, error: unknown];
|
|
159
|
+
guardError: [error: unknown];
|
|
160
|
+
storageError: [error: unknown];
|
|
161
|
+
}
|
|
162
|
+
export type TabsEmit = <K extends keyof HysTabsEmits>(event: K, ...args: HysTabsEmits[K]) => void;
|
|
163
|
+
export interface HysTabScope {
|
|
164
|
+
item: HysTabItem;
|
|
165
|
+
active: boolean;
|
|
166
|
+
}
|
|
167
|
+
export interface HysTabPanelScope extends HysTabScope {
|
|
168
|
+
loading: boolean;
|
|
169
|
+
error?: unknown;
|
|
170
|
+
content?: HysTabContent;
|
|
171
|
+
reload: () => Promise<boolean>;
|
|
172
|
+
}
|
|
173
|
+
export interface HysTabsMenuScope {
|
|
174
|
+
items: readonly HysTabItem[];
|
|
175
|
+
overflowed: readonly HysTabItem[];
|
|
176
|
+
active: HysTabValue;
|
|
177
|
+
select: (value: HysTabValue) => Promise<boolean>;
|
|
178
|
+
close: () => void;
|
|
179
|
+
}
|
|
180
|
+
export interface HysTabsContextScope {
|
|
181
|
+
item: HysTabItem;
|
|
182
|
+
run: (action: HysTabMenuAction) => void;
|
|
183
|
+
close: () => void;
|
|
184
|
+
}
|
|
185
|
+
export type HysTabMenuAction = HysTabCloseScope | "reload" | "pin" | "favorite" | "rename" | "restore";
|
|
186
|
+
export interface HysTabsSlots {
|
|
187
|
+
default?: (scope: {
|
|
188
|
+
active: HysTabValue;
|
|
189
|
+
}) => VNodeChild;
|
|
190
|
+
panes?: () => VNodeChild;
|
|
191
|
+
label?: (scope: HysTabScope) => VNodeChild;
|
|
192
|
+
icon?: (scope: HysTabScope) => VNodeChild;
|
|
193
|
+
badge?: (scope: HysTabScope) => VNodeChild;
|
|
194
|
+
"status-icon"?: (scope: HysTabScope) => VNodeChild;
|
|
195
|
+
panel?: (scope: HysTabPanelScope) => VNodeChild;
|
|
196
|
+
loading?: (scope: HysTabPanelScope) => VNodeChild;
|
|
197
|
+
error?: (scope: HysTabPanelScope) => VNodeChild;
|
|
198
|
+
empty?: (scope: HysTabPanelScope) => VNodeChild;
|
|
199
|
+
preview?: (scope: HysTabScope) => VNodeChild;
|
|
200
|
+
prefix?: () => VNodeChild;
|
|
201
|
+
suffix?: () => VNodeChild;
|
|
202
|
+
"close-icon"?: (scope: HysTabScope) => VNodeChild;
|
|
203
|
+
"add-icon"?: () => VNodeChild;
|
|
204
|
+
"more-icon"?: () => VNodeChild;
|
|
205
|
+
more?: (scope: HysTabsMenuScope) => VNodeChild;
|
|
206
|
+
contextmenu?: (scope: HysTabsContextScope) => VNodeChild;
|
|
207
|
+
}
|
|
208
|
+
export type HysTabPaneProps = HysTabItem;
|
|
209
|
+
export interface HysTabPaneSlots {
|
|
210
|
+
default?: (scope: HysTabPanelScope) => VNodeChild;
|
|
211
|
+
label?: (scope: HysTabScope) => VNodeChild;
|
|
212
|
+
icon?: (scope: HysTabScope) => VNodeChild;
|
|
213
|
+
badge?: (scope: HysTabScope) => VNodeChild;
|
|
214
|
+
}
|
|
215
|
+
export interface HysTabsInstance {
|
|
216
|
+
readonly active: HysTabValue;
|
|
217
|
+
readonly recent: readonly HysTabValue[];
|
|
218
|
+
readonly closed: readonly HysTabSnapshot[];
|
|
219
|
+
select: (value: HysTabValue) => Promise<boolean>;
|
|
220
|
+
focus: (value?: HysTabValue) => void;
|
|
221
|
+
scrollToActiveTab: () => void;
|
|
222
|
+
add: (item?: HysTabItem) => Promise<boolean>;
|
|
223
|
+
close: (value?: HysTabValue) => Promise<boolean>;
|
|
224
|
+
closeMany: (scope: HysTabCloseScope | readonly HysTabValue[], anchor?: HysTabValue) => Promise<HysTabValue[]>;
|
|
225
|
+
rename: (value: HysTabValue, label: string) => Promise<boolean>;
|
|
226
|
+
move: (value: HysTabValue, target: HysTabValue, after?: boolean) => Promise<boolean>;
|
|
227
|
+
pin: (value: HysTabValue, pinned?: boolean) => Promise<boolean>;
|
|
228
|
+
favorite: (value: HysTabValue, favorite?: boolean) => Promise<boolean>;
|
|
229
|
+
restore: () => Promise<boolean>;
|
|
230
|
+
preload: (value: HysTabValue) => Promise<boolean>;
|
|
231
|
+
reload: (value?: HysTabValue) => Promise<boolean>;
|
|
232
|
+
save: () => boolean;
|
|
233
|
+
}
|
|
234
|
+
export interface HysTabsConfig {
|
|
235
|
+
defaults?: MaybeRefOrGetter<Partial<HysTabsProps>>;
|
|
236
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type MaybeRefOrGetter } from "vue";
|
|
2
|
+
import type { HysTabGuardContext, HysTabItem, HysTabValue } from "./tabsTypes";
|
|
3
|
+
export interface HysRouteTabItem extends HysTabItem {
|
|
4
|
+
to?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface HysRouteTabsOptions<R> {
|
|
7
|
+
route: MaybeRefOrGetter<R>;
|
|
8
|
+
resolve: (route: R) => HysRouteTabItem | undefined;
|
|
9
|
+
navigate: (item: HysRouteTabItem, signal: AbortSignal) => unknown;
|
|
10
|
+
allow?: (item: HysRouteTabItem, route: R) => boolean;
|
|
11
|
+
fallback?: () => HysRouteTabItem | undefined;
|
|
12
|
+
onError?: (error: unknown) => void;
|
|
13
|
+
historyLimit?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function useHysRouteTabs<R>(options: HysRouteTabsOptions<R>): {
|
|
16
|
+
items: import("vue").ShallowRef<HysRouteTabItem[], HysRouteTabItem[]>;
|
|
17
|
+
active: import("vue").Ref<HysTabValue | undefined, HysTabValue | undefined>;
|
|
18
|
+
history: import("vue").ShallowRef<HysTabValue[], HysTabValue[]>;
|
|
19
|
+
setItems: (next: readonly HysRouteTabItem[]) => void;
|
|
20
|
+
select: (key: HysTabValue) => Promise<boolean>;
|
|
21
|
+
beforeClose: (key: HysTabValue, context?: HysTabGuardContext) => Promise<boolean>;
|
|
22
|
+
};
|