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
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { defineComponent as V, computed as P, openBlock as n, createElementBlock as o, Fragment as d, renderList as f, withDirectives as D, createVNode as u, unref as c, withCtx as y, createTextVNode as b, createElementVNode as F, createBlock as B, resolveDynamicComponent as S, mergeProps as T, toDisplayString as z, vShow as E, createCommentVNode as I, toRaw as L } from "vue";
|
|
2
|
+
import { LoaderCircle as j } from "lucide-vue-next";
|
|
3
|
+
import v from "../TabsSlot/TabsSlot.js";
|
|
4
|
+
import H from "../../HysButton/HysButton.vue.js";
|
|
5
|
+
const M = ["id", "aria-labelledby", "data-active", "aria-busy"], R = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "hys-tab-panel-message",
|
|
8
|
+
role: "status"
|
|
9
|
+
}, $ = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "hys-tab-panel-message",
|
|
12
|
+
role: "alert"
|
|
13
|
+
}, q = {
|
|
14
|
+
key: 2,
|
|
15
|
+
class: "hys-tab-panel-message"
|
|
16
|
+
}, A = ["id", "aria-labelledby"], Q = /* @__PURE__ */ V({
|
|
17
|
+
__name: "TabsPanels",
|
|
18
|
+
props: {
|
|
19
|
+
items: {},
|
|
20
|
+
declarations: {},
|
|
21
|
+
slots: {},
|
|
22
|
+
active: {},
|
|
23
|
+
panels: {},
|
|
24
|
+
panelId: { type: Function },
|
|
25
|
+
tabId: { type: Function },
|
|
26
|
+
declarative: { type: Boolean },
|
|
27
|
+
forcePanels: { type: Boolean }
|
|
28
|
+
},
|
|
29
|
+
setup(a) {
|
|
30
|
+
const r = a, p = P(
|
|
31
|
+
() => new Map(r.declarations.map((e) => [e.item.value, e.slots]))
|
|
32
|
+
), w = P(
|
|
33
|
+
() => r.declarative || r.forcePanels || r.slots.panel || r.items.some(
|
|
34
|
+
(e) => e.content !== void 0 || e.component || e.load
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
function g(e) {
|
|
38
|
+
const l = r.panels.loaded.get(e.value);
|
|
39
|
+
return {
|
|
40
|
+
item: e,
|
|
41
|
+
active: r.active === e.value,
|
|
42
|
+
loading: !!e.load && (!l || l.state === "loading"),
|
|
43
|
+
error: l == null ? void 0 : l.error,
|
|
44
|
+
content: m(e),
|
|
45
|
+
reload: () => r.panels.reload(e.value)
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function m(e) {
|
|
49
|
+
var l;
|
|
50
|
+
return e.load ? (l = r.panels.loaded.get(e.value)) == null ? void 0 : l.content : e.component ? { component: e.component, props: e.componentProps } : e.content;
|
|
51
|
+
}
|
|
52
|
+
function k(e) {
|
|
53
|
+
return e && typeof e != "string" ? L(
|
|
54
|
+
"component" in e && e.component ? e.component : e
|
|
55
|
+
) : void 0;
|
|
56
|
+
}
|
|
57
|
+
function N(e) {
|
|
58
|
+
return e && typeof e == "object" && "component" in e ? e.props : void 0;
|
|
59
|
+
}
|
|
60
|
+
return (e, l) => w.value ? (n(!0), o(d, { key: 0 }, f(a.items, (t) => (n(), o(d, {
|
|
61
|
+
key: t.value
|
|
62
|
+
}, [
|
|
63
|
+
a.panels.render(t) ? D((n(), o("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
id: a.panelId(t.value),
|
|
66
|
+
"aria-labelledby": a.tabId(t.value),
|
|
67
|
+
class: "hys-ui-tab-panel",
|
|
68
|
+
"data-active": a.active === t.value,
|
|
69
|
+
"aria-busy": g(t).loading || void 0,
|
|
70
|
+
role: "tabpanel",
|
|
71
|
+
tabindex: "0"
|
|
72
|
+
}, [
|
|
73
|
+
(n(), o("div", {
|
|
74
|
+
key: a.panels.versions.get(t.value) ?? 0,
|
|
75
|
+
class: "hys-tab-panel-body"
|
|
76
|
+
}, [
|
|
77
|
+
(n(!0), o(d, null, f([g(t)], (i) => {
|
|
78
|
+
var h, C, x;
|
|
79
|
+
return n(), o(d, { key: 0 }, [
|
|
80
|
+
i.loading ? (n(), o("div", R, [
|
|
81
|
+
u(c(v), {
|
|
82
|
+
render: a.slots.loading,
|
|
83
|
+
scope: i
|
|
84
|
+
}, {
|
|
85
|
+
default: y(() => [
|
|
86
|
+
u(c(j), {
|
|
87
|
+
size: 17,
|
|
88
|
+
class: "hys-tab-spinner",
|
|
89
|
+
"aria-hidden": "true"
|
|
90
|
+
}),
|
|
91
|
+
l[0] || (l[0] = b(" 正在加载页签…", -1))
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
}, 8, ["render", "scope"])
|
|
95
|
+
])) : ((h = a.panels.loaded.get(t.value)) == null ? void 0 : h.state) === "error" ? (n(), o("div", $, [
|
|
96
|
+
u(c(v), {
|
|
97
|
+
render: a.slots.error,
|
|
98
|
+
scope: i
|
|
99
|
+
}, {
|
|
100
|
+
default: y(() => [
|
|
101
|
+
l[2] || (l[2] = F("span", null, "页签加载失败。", -1)),
|
|
102
|
+
u(H, {
|
|
103
|
+
size: "sm",
|
|
104
|
+
variant: "secondary",
|
|
105
|
+
onClick: (s) => i.reload()
|
|
106
|
+
}, {
|
|
107
|
+
default: y(() => [...l[1] || (l[1] = [
|
|
108
|
+
b("重试", -1)
|
|
109
|
+
])]),
|
|
110
|
+
_: 1
|
|
111
|
+
}, 8, ["onClick"])
|
|
112
|
+
]),
|
|
113
|
+
_: 2
|
|
114
|
+
}, 1032, ["render", "scope"])
|
|
115
|
+
])) : (C = p.value.get(t.value)) != null && C.default || a.slots.panel ? (n(), B(c(v), {
|
|
116
|
+
key: 2,
|
|
117
|
+
render: ((x = p.value.get(t.value)) == null ? void 0 : x.default) ?? a.slots.panel,
|
|
118
|
+
scope: i
|
|
119
|
+
}, null, 8, ["render", "scope"])) : (n(!0), o(d, { key: 3 }, f([m(t)], (s) => (n(), o(d, { key: 0 }, [
|
|
120
|
+
k(s) ? (n(), B(S(k(s)), T({
|
|
121
|
+
key: 0,
|
|
122
|
+
ref_for: !0
|
|
123
|
+
}, N(s) ?? {}), null, 16)) : typeof s == "string" && s !== "" ? (n(), o(d, { key: 1 }, [
|
|
124
|
+
b(z(s), 1)
|
|
125
|
+
], 64)) : (n(), o("div", q, [
|
|
126
|
+
u(c(v), {
|
|
127
|
+
render: a.slots.empty,
|
|
128
|
+
scope: i
|
|
129
|
+
}, {
|
|
130
|
+
default: y(() => [...l[3] || (l[3] = [
|
|
131
|
+
b("暂无页签内容", -1)
|
|
132
|
+
])]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["render", "scope"])
|
|
135
|
+
]))
|
|
136
|
+
], 64))), 128))
|
|
137
|
+
], 64);
|
|
138
|
+
}), 128))
|
|
139
|
+
]))
|
|
140
|
+
], 8, M)), [
|
|
141
|
+
[E, a.active === t.value]
|
|
142
|
+
]) : I("", !0)
|
|
143
|
+
], 64))), 128)) : a.slots.default && a.items.some((t) => t.value === a.active) ? (n(), o("div", {
|
|
144
|
+
key: 1,
|
|
145
|
+
id: a.panelId(a.active),
|
|
146
|
+
class: "hys-ui-tab-panel",
|
|
147
|
+
role: "tabpanel",
|
|
148
|
+
"aria-labelledby": a.tabId(a.active),
|
|
149
|
+
tabindex: "0",
|
|
150
|
+
"data-active": "true"
|
|
151
|
+
}, [
|
|
152
|
+
u(c(v), {
|
|
153
|
+
render: a.slots.default,
|
|
154
|
+
scope: { active: a.active }
|
|
155
|
+
}, null, 8, ["render", "scope"])
|
|
156
|
+
], 8, A)) : I("", !0);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
export {
|
|
160
|
+
Q as default
|
|
161
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as w, shallowRef as x, ref as C, computed as V, onDeactivated as B, onBeforeUnmount as $, openBlock as u, createBlock as d, withCtx as s, createElementBlock as E, toDisplayString as k, withKeys as H, createVNode as N, createTextVNode as m, createCommentVNode as P } from "vue";
|
|
2
|
+
import U from "../../HysModal/HysModal.vue.js";
|
|
3
|
+
import v from "../../HysButton/HysButton.vue.js";
|
|
4
|
+
import D from "../../HysInput/HysInput.vue.js";
|
|
5
|
+
const K = { key: 0 }, R = /* @__PURE__ */ w({
|
|
6
|
+
__name: "TabsPrompts",
|
|
7
|
+
setup(L, { expose: y }) {
|
|
8
|
+
const r = x(), l = C("");
|
|
9
|
+
let a, i;
|
|
10
|
+
function n(t) {
|
|
11
|
+
i == null || i(), i = void 0;
|
|
12
|
+
const e = a;
|
|
13
|
+
a = void 0, r.value = void 0, e == null || e(t);
|
|
14
|
+
}
|
|
15
|
+
function f(t, e) {
|
|
16
|
+
return a || e != null && e.aborted ? Promise.resolve(!1) : (r.value = t, new Promise((o) => {
|
|
17
|
+
if (a = o, e) {
|
|
18
|
+
const p = () => n(!1);
|
|
19
|
+
e.addEventListener("abort", p, { once: !0 }), i = () => e.removeEventListener("abort", p);
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
const b = V(
|
|
24
|
+
() => {
|
|
25
|
+
var t;
|
|
26
|
+
return ((t = r.value) == null ? void 0 : t.kind) === "rename" ? "重命名页签" : "关闭未保存的页签?";
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
return y({
|
|
30
|
+
confirm: async (t, e) => await f({ kind: "dirty", items: t }, e) === !0,
|
|
31
|
+
rename: async (t) => a ? !1 : (l.value = t.label, f({ kind: "rename", item: t }))
|
|
32
|
+
}), B(() => n(!1)), $(() => n(!1)), (t, e) => r.value ? (u(), d(U, {
|
|
33
|
+
key: 0,
|
|
34
|
+
open: !0,
|
|
35
|
+
title: b.value,
|
|
36
|
+
width: 420,
|
|
37
|
+
"close-on-mask": !1,
|
|
38
|
+
"onUpdate:open": e[5] || (e[5] = (o) => !o && n(!1))
|
|
39
|
+
}, {
|
|
40
|
+
footer: s(() => [
|
|
41
|
+
N(v, {
|
|
42
|
+
variant: "secondary",
|
|
43
|
+
onClick: e[2] || (e[2] = (o) => n(!1))
|
|
44
|
+
}, {
|
|
45
|
+
default: s(() => [...e[6] || (e[6] = [
|
|
46
|
+
m("取消", -1)
|
|
47
|
+
])]),
|
|
48
|
+
_: 1
|
|
49
|
+
}),
|
|
50
|
+
r.value.kind === "dirty" ? (u(), d(v, {
|
|
51
|
+
key: 0,
|
|
52
|
+
variant: "danger",
|
|
53
|
+
onClick: e[3] || (e[3] = (o) => n(!0))
|
|
54
|
+
}, {
|
|
55
|
+
default: s(() => [...e[7] || (e[7] = [
|
|
56
|
+
m("仍然关闭", -1)
|
|
57
|
+
])]),
|
|
58
|
+
_: 1
|
|
59
|
+
})) : (u(), d(v, {
|
|
60
|
+
key: 1,
|
|
61
|
+
disabled: !l.value.trim(),
|
|
62
|
+
onClick: e[4] || (e[4] = (o) => n(l.value.trim()))
|
|
63
|
+
}, {
|
|
64
|
+
default: s(() => [...e[8] || (e[8] = [
|
|
65
|
+
m("保存名称", -1)
|
|
66
|
+
])]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, ["disabled"]))
|
|
69
|
+
]),
|
|
70
|
+
default: s(() => [
|
|
71
|
+
r.value.kind === "dirty" ? (u(), E("p", K, " 「" + k(r.value.items.slice(0, 3).map((o) => o.label).join("、")) + "」" + k(r.value.items.length > 3 ? "等 " + r.value.items.length + " 项" : "") + "包含未保存的修改。关闭后这些修改可能丢失。 ", 1)) : (u(), d(D, {
|
|
72
|
+
key: 1,
|
|
73
|
+
modelValue: l.value,
|
|
74
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => l.value = o),
|
|
75
|
+
"aria-label": "页签名称",
|
|
76
|
+
maxlength: 120,
|
|
77
|
+
autofocus: "",
|
|
78
|
+
clearable: "",
|
|
79
|
+
onKeydown: e[1] || (e[1] = H((o) => l.value.trim() && n(l.value.trim()), ["enter"]))
|
|
80
|
+
}, null, 8, ["modelValue"]))
|
|
81
|
+
]),
|
|
82
|
+
_: 1
|
|
83
|
+
}, 8, ["title"])) : P("", !0);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
R as default
|
|
88
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
const c = t({
|
|
3
|
+
props: { render: Function, scope: Object },
|
|
4
|
+
setup(e, { slots: n }) {
|
|
5
|
+
return () => {
|
|
6
|
+
var r;
|
|
7
|
+
return e.render ? e.render(e.scope) : (r = n.default) == null ? void 0 : r.call(n);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
c as default
|
|
13
|
+
};
|