hys-ui 0.2.0 → 0.3.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 +38 -0
- package/README.md +15 -1
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
- package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
- package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
- package/dist/components/HysCascader/HysCascader.vue.js +2 -2
- package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
- package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
- package/dist/components/HysMention/HysMention.vue.js +1 -1
- package/dist/components/HysMention/HysMention2.vue.js +112 -100
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +490 -85
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysSelect/HysSelect.vue.js +2 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +730 -594
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
- package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
- package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +389 -368
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +46 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
- package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
- package/dist/components/HysTree/HysTree.vue.js +2 -2
- package/dist/components/HysTree/HysTree2.vue.js +195 -184
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +19 -17
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +110 -76
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/index.js +27 -24
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +1 -1
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -1
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +13 -4
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +2 -2
- package/dist/types/components/HysTable/HysTable.vue.d.ts +4 -4
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -1
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
- package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +3 -0
- package/dist/types/composables/avatar.d.ts +3 -0
- package/dist/types/composables/cascader.d.ts +3 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +3 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/formContext.d.ts +2 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +183 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/selectOptions.d.ts +2 -0
- package/dist/types/composables/table.d.ts +3 -0
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/transfer.d.ts +7 -0
- package/dist/types/composables/tree.d.ts +3 -0
- package/dist/types/composables/treeSelect.d.ts +3 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +1 -1
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +21 -2
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/index.d.ts +17 -2
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import { defineComponent as sa, useId as ua, ref as
|
|
2
|
-
import
|
|
3
|
-
import Ca from "
|
|
4
|
-
import xa from "../
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as sa, useId as ua, ref as g, provide as ra, computed as B, onActivated as ca, watch as Z, shallowRef as va, onDeactivated as ya, onBeforeUnmount as fa, openBlock as r, createElementBlock as h, mergeProps as M, unref as l, createBlock as R, withCtx as w, createVNode as Y, createCommentVNode as x, createElementVNode as ue, normalizeStyle as re, normalizeClass as He, withModifiers as X, renderSlot as H, createTextVNode as P, toDisplayString as S, Fragment as Se, renderList as ha, resolveDynamicComponent as ze, Teleport as ka, nextTick as _ } from "vue";
|
|
2
|
+
import pa from "../../motion/PopupMotion.js";
|
|
3
|
+
import { Search as ga, LoaderCircle as Ae, ChevronDown as ma, ChevronRight as ba, GripVertical as Ca } from "lucide-vue-next";
|
|
4
|
+
import xa from "../HysInput/HysInput.vue.js";
|
|
5
|
+
import Ta from "../HysCheckbox/HysCheckbox.vue.js";
|
|
6
|
+
import xe from "../HysButton/HysButton.vue.js";
|
|
6
7
|
import { useHysRootAttrs as Da } from "../../config.js";
|
|
7
|
-
import { useHysControlState as
|
|
8
|
-
import { useTree as
|
|
9
|
-
const
|
|
8
|
+
import { useHysControlState as Ka, useHysFormItemContext as Na, fieldKey as Ea } from "../../composables/formContext.js";
|
|
9
|
+
import { useTree as Ba } from "../../composables/useTree.js";
|
|
10
|
+
const Ma = ["data-size"], Ha = ["id", "tabindex", "aria-label", "aria-multiselectable", "aria-disabled", "aria-busy", "aria-invalid", "aria-describedby"], Sa = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "hys-ui-tree-loading",
|
|
12
13
|
role: "status"
|
|
13
|
-
},
|
|
14
|
+
}, za = ["aria-level", "aria-posinset", "aria-setsize", "aria-expanded", "aria-selected", "aria-disabled", "aria-checked", "tabindex", "draggable", "data-tree-id", "data-tree-key", "data-drop-position", "onFocus", "onKeydown", "onClick", "onDblclick", "onDragstart", "onDragover", "onDragleave", "onDrop", "onContextmenu"], Aa = ["aria-label", "disabled", "onClick"], Ia = {
|
|
14
15
|
key: 1,
|
|
15
16
|
class: "hys-ui-pf-tree-spacer"
|
|
16
17
|
}, $a = {
|
|
17
18
|
key: 3,
|
|
18
19
|
class: "hys-ui-tree-icon",
|
|
19
20
|
"aria-hidden": "true"
|
|
20
|
-
},
|
|
21
|
+
}, Va = { class: "hys-ui-pf-tree-label" }, Fa = ["disabled", "onClick"], La = {
|
|
21
22
|
key: 1,
|
|
22
23
|
class: "hys-ui-pf-tree-empty"
|
|
23
|
-
},
|
|
24
|
+
}, ja = /* @__PURE__ */ sa({
|
|
24
25
|
__name: "HysTree",
|
|
25
26
|
props: {
|
|
27
|
+
popupTransition: {},
|
|
28
|
+
popupTransitionDuration: {},
|
|
26
29
|
nodes: {},
|
|
27
30
|
modelValue: {},
|
|
28
31
|
defaultValue: {},
|
|
@@ -82,10 +85,10 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
82
85
|
validateEvent: { type: Boolean, default: !0 }
|
|
83
86
|
},
|
|
84
87
|
emits: ["update:modelValue", "update:checkedKeys", "update:expandedKeys", "update:loadedKeys", "update:searchValue", "update:nodes", "select", "check", "check-change", "selection-change", "node-click", "node-expand", "node-collapse", "node-drop", "node-drag-start", "node-drag-over", "node-drag-end", "node-contextmenu", "load-error", "children-loaded", "load", "data-change", "search", "scroll", "focus", "blur"],
|
|
85
|
-
setup(o, { expose:
|
|
86
|
-
const i = o, m =
|
|
87
|
-
ra(
|
|
88
|
-
const s =
|
|
88
|
+
setup(o, { expose: Ie, emit: $e }) {
|
|
89
|
+
const i = o, m = $e, ce = Da(), ee = Ka(i), U = Na(), Ve = ua(), ae = g(), y = g(), Te = g();
|
|
90
|
+
ra(Ea, void 0);
|
|
91
|
+
const s = Ba(
|
|
89
92
|
i,
|
|
90
93
|
ee.disabled,
|
|
91
94
|
(e, ...a) => m(e, ...a),
|
|
@@ -94,7 +97,7 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
94
97
|
}
|
|
95
98
|
), {
|
|
96
99
|
index: G,
|
|
97
|
-
visible:
|
|
100
|
+
visible: p,
|
|
98
101
|
words: v,
|
|
99
102
|
busy: u,
|
|
100
103
|
live: ve,
|
|
@@ -110,46 +113,46 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
110
113
|
matches: Re,
|
|
111
114
|
expandNode: z,
|
|
112
115
|
setChecked: ke,
|
|
113
|
-
selectNode:
|
|
114
|
-
filter:
|
|
115
|
-
} = s, A =
|
|
116
|
+
selectNode: pe,
|
|
117
|
+
filter: De
|
|
118
|
+
} = s, A = B(
|
|
116
119
|
() => Number.isFinite(i.rowHeight) ? Math.min(240, Math.max(24, i.rowHeight)) : 38
|
|
117
|
-
), j =
|
|
120
|
+
), j = B(
|
|
118
121
|
() => Number.isFinite(i.viewportHeight) ? Math.min(1600, Math.max(80, i.viewportHeight)) : 340
|
|
119
|
-
),
|
|
122
|
+
), Ke = B(
|
|
120
123
|
() => Number.isFinite(i.overscan) ? Math.min(30, Math.max(0, Math.floor(i.overscan))) : 4
|
|
121
|
-
), Pe =
|
|
124
|
+
), Pe = B(
|
|
122
125
|
() => Number.isFinite(i.indent) ? Math.min(80, Math.max(0, i.indent)) : 20
|
|
123
|
-
), V =
|
|
124
|
-
() => i.virtual ? Math.max(0, Math.floor(V.value / A.value) -
|
|
125
|
-
), Ue =
|
|
126
|
+
), V = g(0), te = g(0), I = g(null), Ne = B(
|
|
127
|
+
() => i.virtual ? Math.max(0, Math.floor(V.value / A.value) - Ke.value) : 0
|
|
128
|
+
), Ue = B(
|
|
126
129
|
() => i.virtual ? Math.min(
|
|
127
|
-
|
|
130
|
+
p.value.length,
|
|
128
131
|
Math.ceil(
|
|
129
132
|
(V.value + (te.value || j.value)) / A.value
|
|
130
|
-
) +
|
|
131
|
-
) :
|
|
132
|
-
), qe =
|
|
133
|
+
) + Ke.value
|
|
134
|
+
) : p.value.length
|
|
135
|
+
), qe = B(() => p.value.slice(Ne.value, Ue.value)), $ = B(() => p.value.filter((e) => !e.disabled)), Ye = B(
|
|
133
136
|
() => {
|
|
134
137
|
var e;
|
|
135
|
-
return
|
|
138
|
+
return I.value !== null && p.value.some((a) => a.key === I.value && !a.disabled) ? I.value : (e = $.value[0]) == null ? void 0 : e.key;
|
|
136
139
|
}
|
|
137
140
|
);
|
|
138
|
-
let J = 0, F = 0,
|
|
141
|
+
let J = 0, F = 0, T, ge = 0;
|
|
139
142
|
function Xe() {
|
|
140
|
-
|
|
143
|
+
T == null || T.disconnect(), i.virtual && y.value && typeof ResizeObserver < "u" && (T = new ResizeObserver((e) => {
|
|
141
144
|
var a;
|
|
142
145
|
te.value = ((a = e[0]) == null ? void 0 : a.contentRect.height) || 0;
|
|
143
|
-
}),
|
|
146
|
+
}), T.observe(y.value));
|
|
144
147
|
}
|
|
145
148
|
function Ge() {
|
|
146
|
-
|
|
149
|
+
ge++, cancelAnimationFrame(J), J = 0, T == null || T.disconnect(), T = void 0;
|
|
147
150
|
}
|
|
148
|
-
async function
|
|
149
|
-
const e = ++
|
|
150
|
-
await _(), !(!ve.value || e !==
|
|
151
|
+
async function Ee() {
|
|
152
|
+
const e = ++ge;
|
|
153
|
+
await _(), !(!ve.value || e !== ge || !y.value) && (y.value.scrollTop = F, V.value = y.value.scrollTop, Xe());
|
|
151
154
|
}
|
|
152
|
-
ca(
|
|
155
|
+
ca(Ee), Z([y, () => i.virtual], Ee);
|
|
153
156
|
function We(e) {
|
|
154
157
|
var a;
|
|
155
158
|
!ve.value || !((a = y.value) != null && a.isConnected) || (F = y.value.scrollTop, i.virtual && !J && (J = requestAnimationFrame(() => {
|
|
@@ -160,12 +163,12 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
160
163
|
F = 0, V.value = 0, y.value && (y.value.scrollTop = 0);
|
|
161
164
|
}
|
|
162
165
|
Z(q, je), Z(
|
|
163
|
-
() =>
|
|
166
|
+
() => p.value.length,
|
|
164
167
|
() => {
|
|
165
168
|
if (y.value) {
|
|
166
169
|
const e = Math.max(
|
|
167
170
|
0,
|
|
168
|
-
|
|
171
|
+
p.value.length * A.value - (te.value || j.value)
|
|
169
172
|
);
|
|
170
173
|
i.virtual && F > e && (F = e, V.value = e, y.value.scrollTop = e);
|
|
171
174
|
}
|
|
@@ -175,7 +178,7 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
175
178
|
function Je(e, a) {
|
|
176
179
|
a instanceof HTMLElement ? le.set(e, a) : le.delete(e);
|
|
177
180
|
}
|
|
178
|
-
async function
|
|
181
|
+
async function Be(e) {
|
|
179
182
|
if (u.value) return;
|
|
180
183
|
e.key !== void 0 && (await s.setExpandedKeys([
|
|
181
184
|
.../* @__PURE__ */ new Set([...s.rawExpanded.value, ...s.ancestors(e.key)])
|
|
@@ -184,16 +187,16 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
184
187
|
if (!a) return;
|
|
185
188
|
let t = e.top ?? a.scrollTop;
|
|
186
189
|
if (e.key !== void 0) {
|
|
187
|
-
const d =
|
|
190
|
+
const d = p.value.findIndex((n) => n.key === e.key);
|
|
188
191
|
if (d < 0) return;
|
|
189
192
|
if (i.virtual) {
|
|
190
|
-
const n = d * A.value, c = n + A.value,
|
|
191
|
-
t = e.align === "top" ? n : e.align === "bottom" ? c -
|
|
193
|
+
const n = d * A.value, c = n + A.value, E = te.value || j.value;
|
|
194
|
+
t = e.align === "top" ? n : e.align === "bottom" ? c - E : n < a.scrollTop ? n : c > a.scrollTop + E ? c - E : a.scrollTop;
|
|
192
195
|
} else {
|
|
193
196
|
const n = le.get(e.key);
|
|
194
197
|
if (n) {
|
|
195
|
-
const c = n.getBoundingClientRect().top - a.getBoundingClientRect().top + a.scrollTop,
|
|
196
|
-
t = e.align === "top" ? c : e.align === "bottom" ?
|
|
198
|
+
const c = n.getBoundingClientRect().top - a.getBoundingClientRect().top + a.scrollTop, E = c + n.offsetHeight;
|
|
199
|
+
t = e.align === "top" ? c : e.align === "bottom" ? E - a.clientHeight : c < a.scrollTop ? c : E > a.scrollTop + a.clientHeight ? E - a.clientHeight : a.scrollTop;
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
}
|
|
@@ -202,13 +205,13 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
202
205
|
async function L(e) {
|
|
203
206
|
var d, n, c;
|
|
204
207
|
if (u.value) return;
|
|
205
|
-
const a = e ?? (
|
|
208
|
+
const a = e ?? (I.value !== null ? I.value : void 0) ?? ((d = $.value[0]) == null ? void 0 : d.key);
|
|
206
209
|
if (a === void 0) {
|
|
207
210
|
(n = Te.value) == null || n.focus();
|
|
208
211
|
return;
|
|
209
212
|
}
|
|
210
213
|
const t = G.value.map.get(a);
|
|
211
|
-
!t || t.disabled || (await
|
|
214
|
+
!t || t.disabled || (await Be({ key: a }), !(!ve.value || !p.value.some((E) => E.key === a)) && (I.value = a, await _(), (c = le.get(a)) == null || c.focus({ preventScroll: !!i.virtual })));
|
|
212
215
|
}
|
|
213
216
|
function C(e) {
|
|
214
217
|
return {
|
|
@@ -229,7 +232,7 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
229
232
|
'button,input,textarea,select,a,[contenteditable="true"],[role="button"]'
|
|
230
233
|
) && e !== a;
|
|
231
234
|
function Qe(e, a) {
|
|
232
|
-
ne(e.target, e.currentTarget) || u.value || a.disabled || (
|
|
235
|
+
ne(e.target, e.currentTarget) || u.value || a.disabled || (I.value = a.key, m("node-click", a.node, e), i.selectOnClickNode && pe(a, e), i.checkable && (i.checkOnClickNode || i.checkOnClickLeaf && !a.hasChildren) && ke(
|
|
233
236
|
a.key,
|
|
234
237
|
!W.value.has(a.key),
|
|
235
238
|
!i.checkStrictly,
|
|
@@ -243,30 +246,30 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
243
246
|
var d, n;
|
|
244
247
|
if (e.isComposing || e.keyCode === 229 || ne(e.target, e.currentTarget) || u.value)
|
|
245
248
|
return;
|
|
246
|
-
const t =
|
|
249
|
+
const t = $.value.findIndex((c) => c.key === a.key);
|
|
247
250
|
if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
|
|
248
251
|
e.preventDefault();
|
|
249
|
-
const c = e.key === "Home" ? 0 : e.key === "End" ?
|
|
252
|
+
const c = e.key === "Home" ? 0 : e.key === "End" ? $.value.length - 1 : Math.max(
|
|
250
253
|
0,
|
|
251
254
|
Math.min(
|
|
252
|
-
|
|
255
|
+
$.value.length - 1,
|
|
253
256
|
t + (e.key === "ArrowDown" ? 1 : -1)
|
|
254
257
|
)
|
|
255
258
|
);
|
|
256
|
-
L((d =
|
|
257
|
-
} else e.key === "ArrowRight" ? (e.preventDefault(), a.hasChildren && !b.value.has(a.key) ? z(a.key) : a.hasChildren && L((n =
|
|
259
|
+
L((d = $.value[c]) == null ? void 0 : d.key);
|
|
260
|
+
} else e.key === "ArrowRight" ? (e.preventDefault(), a.hasChildren && !b.value.has(a.key) ? z(a.key) : a.hasChildren && L((n = $.value[t + 1]) == null ? void 0 : n.key)) : e.key === "ArrowLeft" ? (e.preventDefault(), a.hasChildren && b.value.has(a.key) ? z(a.key, !1) : a.parent !== void 0 && L(a.parent)) : e.key === "Enter" ? (e.preventDefault(), pe(a, e)) : e.key === " " ? (e.preventDefault(), i.checkable ? ke(
|
|
258
261
|
a.key,
|
|
259
262
|
!W.value.has(a.key),
|
|
260
263
|
!i.checkStrictly,
|
|
261
264
|
e
|
|
262
|
-
) :
|
|
265
|
+
) : pe(a, e)) : e.key === "Escape" && (e.preventDefault(), f.value ? k() : D.value !== null ? O(e) : i.allowDeselect && s.setSelectedKeys([]));
|
|
263
266
|
}
|
|
264
267
|
function _e(e) {
|
|
265
268
|
var a;
|
|
266
|
-
e.key === "Enter" && !e.isComposing && e.keyCode !== 229 ? e.preventDefault() : e.key === "ArrowDown" && !e.isComposing && (e.preventDefault(), L((a =
|
|
269
|
+
e.key === "Enter" && !e.isComposing && e.keyCode !== 229 ? e.preventDefault() : e.key === "ArrowDown" && !e.isComposing && (e.preventDefault(), L((a = $.value[0]) == null ? void 0 : a.key));
|
|
267
270
|
}
|
|
268
|
-
const D =
|
|
269
|
-
let
|
|
271
|
+
const D = g(null), K = g(null), ie = g("inside");
|
|
272
|
+
let N, de, me = null;
|
|
270
273
|
function Q() {
|
|
271
274
|
clearTimeout(de), de = void 0, me = null;
|
|
272
275
|
}
|
|
@@ -274,8 +277,8 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
274
277
|
(e.type === "blur" || e instanceof KeyboardEvent && e.key === "Escape") && O(e);
|
|
275
278
|
}
|
|
276
279
|
function O(e) {
|
|
277
|
-
const a =
|
|
278
|
-
D.value = null,
|
|
280
|
+
const a = N;
|
|
281
|
+
D.value = null, K.value = null, N = void 0, Q(), window.removeEventListener("blur", oe), window.removeEventListener("keydown", oe, !0), a && m("node-drag-end", { node: a, event: e });
|
|
279
282
|
}
|
|
280
283
|
function ea(e, a) {
|
|
281
284
|
var t, d;
|
|
@@ -283,39 +286,39 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
283
286
|
e.preventDefault();
|
|
284
287
|
return;
|
|
285
288
|
}
|
|
286
|
-
O(), D.value = a.key,
|
|
289
|
+
O(), D.value = a.key, N = a.node, (d = e.dataTransfer) == null || d.setData("text/plain", String(a.key)), e.dataTransfer && (e.dataTransfer.effectAllowed = "move"), window.addEventListener("blur", oe), window.addEventListener("keydown", oe, !0), m("node-drag-start", { node: a.node, event: e });
|
|
287
290
|
}
|
|
288
291
|
function be(e, a) {
|
|
289
292
|
var d, n;
|
|
290
293
|
const t = D.value;
|
|
291
|
-
return t === null || t === e.key || u.value || !i.draggable || e.disabled || !
|
|
294
|
+
return t === null || t === e.key || u.value || !i.draggable || e.disabled || !N || ((d = G.value.map.get(t)) == null ? void 0 : d.node) !== N || s.ancestors(e.key).includes(t) || a === "inside" && e.leaf ? !1 : ((n = i.allowDrop) == null ? void 0 : n.call(i, N, e.node, a)) !== !1;
|
|
292
295
|
}
|
|
293
296
|
function aa(e, a) {
|
|
294
297
|
const t = e.currentTarget.getBoundingClientRect(), d = (e.clientY - t.top) / (t.height || 1), n = d < 0.25 ? "before" : d > 0.75 ? "after" : "inside";
|
|
295
298
|
if (!be(a, n)) {
|
|
296
|
-
|
|
299
|
+
K.value = null, Q();
|
|
297
300
|
return;
|
|
298
301
|
}
|
|
299
|
-
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"),
|
|
302
|
+
e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), K.value = a.key, ie.value = n, m("node-drag-over", {
|
|
300
303
|
dragId: D.value,
|
|
301
304
|
targetId: a.key,
|
|
302
|
-
dragNode:
|
|
305
|
+
dragNode: N,
|
|
303
306
|
targetNode: a.node,
|
|
304
307
|
position: n,
|
|
305
308
|
event: e
|
|
306
309
|
}), n === "inside" && a.hasChildren && !b.value.has(a.key) && me !== a.key ? (Q(), me = a.key, Number.isFinite(i.dragExpandDelay) && i.dragExpandDelay >= 0 && (de = setTimeout(() => {
|
|
307
|
-
de = void 0,
|
|
310
|
+
de = void 0, K.value === a.key && be(a, "inside") && z(a.key);
|
|
308
311
|
}, i.dragExpandDelay))) : n !== "inside" && Q();
|
|
309
312
|
}
|
|
310
313
|
function ta(e, a) {
|
|
311
|
-
(!(e.relatedTarget instanceof Node) || !e.currentTarget.contains(e.relatedTarget)) && (
|
|
314
|
+
(!(e.relatedTarget instanceof Node) || !e.currentTarget.contains(e.relatedTarget)) && (K.value === a.key && (K.value = null), Q());
|
|
312
315
|
}
|
|
313
316
|
function la(e, a) {
|
|
314
|
-
|
|
317
|
+
K.value === a.key && be(a, ie.value) && (e.preventDefault(), m("node-drop", {
|
|
315
318
|
dragId: D.value,
|
|
316
319
|
targetId: a.key,
|
|
317
320
|
position: ie.value,
|
|
318
|
-
dragNode:
|
|
321
|
+
dragNode: N,
|
|
319
322
|
targetNode: a.node,
|
|
320
323
|
event: e
|
|
321
324
|
})), O(e);
|
|
@@ -324,12 +327,12 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
324
327
|
() => [u.value, i.draggable, i.nodes],
|
|
325
328
|
() => {
|
|
326
329
|
var e;
|
|
327
|
-
(u.value || !i.draggable || D.value !== null && ((e = G.value.map.get(D.value)) == null ? void 0 : e.node) !==
|
|
330
|
+
(u.value || !i.draggable || D.value !== null && ((e = G.value.map.get(D.value)) == null ? void 0 : e.node) !== N) && O();
|
|
328
331
|
},
|
|
329
332
|
{ flush: "sync" }
|
|
330
333
|
);
|
|
331
|
-
const f = va(), se =
|
|
332
|
-
function
|
|
334
|
+
const f = va(), se = g(), Ce = g();
|
|
335
|
+
function k(e = !0) {
|
|
333
336
|
f.value = void 0, e && Ce.value !== void 0 && L(Ce.value);
|
|
334
337
|
}
|
|
335
338
|
async function na(e, a) {
|
|
@@ -349,8 +352,8 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
349
352
|
function ia(e) {
|
|
350
353
|
var a, t;
|
|
351
354
|
if (e.key === "Escape")
|
|
352
|
-
e.preventDefault(),
|
|
353
|
-
else if (e.key === "Tab")
|
|
355
|
+
e.preventDefault(), k();
|
|
356
|
+
else if (e.key === "Tab") k(!1);
|
|
354
357
|
else if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
|
|
355
358
|
e.preventDefault();
|
|
356
359
|
const d = [
|
|
@@ -369,12 +372,12 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
369
372
|
var a, t;
|
|
370
373
|
e.relatedTarget instanceof Node && ((a = ae.value) != null && a.contains(e.relatedTarget) || (t = se.value) != null && t.contains(e.relatedTarget)) || (m("blur", e), i.validateEvent && U.validate("blur"));
|
|
371
374
|
}
|
|
372
|
-
function
|
|
373
|
-
O(),
|
|
375
|
+
function Me() {
|
|
376
|
+
O(), k(!1), Ge();
|
|
374
377
|
}
|
|
375
378
|
return Z(u, (e) => {
|
|
376
|
-
e &&
|
|
377
|
-
}), ya(
|
|
379
|
+
e && k(!1);
|
|
380
|
+
}), ya(Me), fa(Me), Ie({
|
|
378
381
|
element: ae,
|
|
379
382
|
getNode: s.getNode,
|
|
380
383
|
getNodeInfo: s.getNodeInfo,
|
|
@@ -410,16 +413,16 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
410
413
|
G.value.rows.filter((e) => e.hasChildren).map((e) => e.key)
|
|
411
414
|
),
|
|
412
415
|
collapseAll: () => s.setExpandedKeys([]),
|
|
413
|
-
filter:
|
|
416
|
+
filter: De,
|
|
414
417
|
reloadNode: s.reloadNode,
|
|
415
418
|
updateKeyChildren: s.updateKeyChildren,
|
|
416
419
|
append: s.append,
|
|
417
420
|
insertBefore: s.insertBefore,
|
|
418
421
|
insertAfter: s.insertAfter,
|
|
419
422
|
remove: s.remove,
|
|
420
|
-
scrollTo:
|
|
423
|
+
scrollTo: Be,
|
|
421
424
|
focus: L
|
|
422
|
-
}), (e, a) => (r(), h("div",
|
|
425
|
+
}), (e, a) => (r(), h("div", M({
|
|
423
426
|
ref_key: "element",
|
|
424
427
|
ref: ae
|
|
425
428
|
}, l(ce), {
|
|
@@ -431,7 +434,7 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
431
434
|
onFocusin: da,
|
|
432
435
|
onFocusout: oa
|
|
433
436
|
}), [
|
|
434
|
-
o.searchable ? (r(), R(
|
|
437
|
+
o.searchable ? (r(), R(xa, {
|
|
435
438
|
key: 0,
|
|
436
439
|
ref_key: "search",
|
|
437
440
|
ref: Te,
|
|
@@ -443,18 +446,18 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
443
446
|
disabled: l(u),
|
|
444
447
|
size: l(ee).size.value,
|
|
445
448
|
clearable: "",
|
|
446
|
-
"onUpdate:modelValue": l(
|
|
449
|
+
"onUpdate:modelValue": l(De),
|
|
447
450
|
onKeydown: _e
|
|
448
451
|
}, {
|
|
449
|
-
prefix:
|
|
450
|
-
|
|
452
|
+
prefix: w(() => [
|
|
453
|
+
Y(l(ga), {
|
|
451
454
|
size: 15,
|
|
452
455
|
"aria-hidden": "true"
|
|
453
456
|
})
|
|
454
457
|
]),
|
|
455
458
|
_: 1
|
|
456
|
-
}, 8, ["model-value", "placeholder", "aria-label", "disabled", "size", "onUpdate:modelValue"])) :
|
|
457
|
-
|
|
459
|
+
}, 8, ["model-value", "placeholder", "aria-label", "disabled", "size", "onUpdate:modelValue"])) : x("", !0),
|
|
460
|
+
ue("div", {
|
|
458
461
|
ref_key: "root",
|
|
459
462
|
ref: y,
|
|
460
463
|
id: l(U).id.value || l(Ve),
|
|
@@ -468,7 +471,7 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
468
471
|
"aria-busy": o.loading || l(he).size > 0 || void 0,
|
|
469
472
|
"aria-invalid": l(U).invalid.value || void 0,
|
|
470
473
|
"aria-describedby": l(U).describedBy.value,
|
|
471
|
-
class:
|
|
474
|
+
class: He(["hys-ui-pf-tree-list", { "hys-ui-tree-virtual": o.virtual }]),
|
|
472
475
|
style: re({
|
|
473
476
|
maxHeight: j.value + "px",
|
|
474
477
|
height: o.virtual ? j.value + "px" : void 0,
|
|
@@ -477,44 +480,44 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
477
480
|
}),
|
|
478
481
|
onScroll: We
|
|
479
482
|
}, [
|
|
480
|
-
o.loading ? (r(), h("div",
|
|
483
|
+
o.loading ? (r(), h("div", Sa, [
|
|
481
484
|
H(e.$slots, "loading", {}, () => [
|
|
482
|
-
|
|
485
|
+
Y(l(Ae), {
|
|
483
486
|
size: 18,
|
|
484
487
|
class: "hys-ui-icon-spin",
|
|
485
488
|
"aria-hidden": "true"
|
|
486
489
|
}),
|
|
487
490
|
P(S(l(v).loading), 1)
|
|
488
491
|
], !0)
|
|
489
|
-
])) :
|
|
490
|
-
|
|
492
|
+
])) : x("", !0),
|
|
493
|
+
ue("div", {
|
|
491
494
|
class: "hys-ui-tree-space",
|
|
492
495
|
style: re(
|
|
493
|
-
o.virtual ? { height: l(
|
|
496
|
+
o.virtual ? { height: l(p).length * A.value + "px" } : void 0
|
|
494
497
|
)
|
|
495
498
|
}, [
|
|
496
|
-
|
|
499
|
+
ue("div", {
|
|
497
500
|
class: "hys-ui-tree-rows",
|
|
498
501
|
style: re(
|
|
499
502
|
o.virtual ? {
|
|
500
503
|
position: "absolute",
|
|
501
|
-
top:
|
|
504
|
+
top: Ne.value * A.value + "px",
|
|
502
505
|
insetInline: "0"
|
|
503
506
|
} : void 0
|
|
504
507
|
)
|
|
505
508
|
}, [
|
|
506
|
-
(r(!0), h(
|
|
509
|
+
(r(!0), h(Se, null, ha(qe.value, (t) => {
|
|
507
510
|
var d;
|
|
508
511
|
return r(), h("div", {
|
|
509
512
|
key: typeof t.key + ":" + t.key,
|
|
510
513
|
ref_for: !0,
|
|
511
514
|
ref: (n) => Je(t.key, n),
|
|
512
|
-
class:
|
|
515
|
+
class: He(["hys-ui-pf-tree-row", [
|
|
513
516
|
typeof o.nodeClass == "function" ? o.nodeClass(t.node) : o.nodeClass,
|
|
514
517
|
{
|
|
515
518
|
"hys-ui-pf-tree-selected": o.highlightCurrent && l(ye).has(t.key),
|
|
516
519
|
"hys-ui-pf-tree-line": o.showLine,
|
|
517
|
-
"hys-ui-pf-tree-drop":
|
|
520
|
+
"hys-ui-pf-tree-drop": K.value === t.key,
|
|
518
521
|
"hys-ui-tree-matched": l(q).trim() && l(Re).has(t.key),
|
|
519
522
|
"hys-ui-tree-row-disabled": t.disabled,
|
|
520
523
|
"hys-ui-tree-row-dragging": D.value === t.key
|
|
@@ -536,8 +539,8 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
536
539
|
draggable: o.draggable && !l(u) && !t.disabled && ((d = o.allowDrag) == null ? void 0 : d.call(o, t.node)) !== !1,
|
|
537
540
|
"data-tree-id": t.key,
|
|
538
541
|
"data-tree-key": typeof t.key + ":" + t.key,
|
|
539
|
-
"data-drop-position":
|
|
540
|
-
onFocus: (n) =>
|
|
542
|
+
"data-drop-position": K.value === t.key ? ie.value : void 0,
|
|
543
|
+
onFocus: (n) => I.value = t.key,
|
|
541
544
|
onKeydown: (n) => we(n, t),
|
|
542
545
|
onClick: (n) => Qe(n, t),
|
|
543
546
|
onDblclick: (n) => Ze(n, t),
|
|
@@ -557,22 +560,22 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
557
560
|
tabindex: "-1",
|
|
558
561
|
onClick: X((n) => l(z)(t.key, !l(b).has(t.key)), ["stop"])
|
|
559
562
|
}, [
|
|
560
|
-
H(e.$slots, "switcher",
|
|
563
|
+
H(e.$slots, "switcher", M({ ref_for: !0 }, C(t)), () => [
|
|
561
564
|
l(he).has(t.key) ? (r(), R(l(Ae), {
|
|
562
565
|
key: 0,
|
|
563
566
|
size: 15,
|
|
564
567
|
class: "hys-ui-icon-spin",
|
|
565
568
|
"aria-hidden": "true"
|
|
566
|
-
})) : (r(), R(ze(C(t).expanded ? l(
|
|
569
|
+
})) : (r(), R(ze(C(t).expanded ? l(ma) : l(ba)), {
|
|
567
570
|
key: 1,
|
|
568
571
|
size: 15,
|
|
569
572
|
"aria-hidden": "true"
|
|
570
573
|
}))
|
|
571
574
|
], !0)
|
|
572
|
-
], 8,
|
|
573
|
-
H(e.$slots, "switcher",
|
|
575
|
+
], 8, Aa)) : (r(), h("span", Ia, [
|
|
576
|
+
H(e.$slots, "switcher", M({ ref_for: !0 }, C(t)), void 0, !0)
|
|
574
577
|
])),
|
|
575
|
-
o.checkable && t.checkable ? (r(), R(
|
|
578
|
+
o.checkable && t.checkable ? (r(), R(Ta, {
|
|
576
579
|
key: 2,
|
|
577
580
|
tabindex: -1,
|
|
578
581
|
"model-value": l(W).has(t.key),
|
|
@@ -582,16 +585,16 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
582
585
|
onClick: a[0] || (a[0] = X(() => {
|
|
583
586
|
}, ["stop"])),
|
|
584
587
|
"onUpdate:modelValue": (n) => l(ke)(t.key, n, !o.checkStrictly)
|
|
585
|
-
}, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "onUpdate:modelValue"])) :
|
|
588
|
+
}, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "onUpdate:modelValue"])) : x("", !0),
|
|
586
589
|
o.showIcon && (t.icon || e.$slots.icon) ? (r(), h("span", $a, [
|
|
587
|
-
H(e.$slots, "icon",
|
|
590
|
+
H(e.$slots, "icon", M({ ref_for: !0 }, C(t)), () => [
|
|
588
591
|
P(S(t.icon), 1)
|
|
589
592
|
], !0)
|
|
590
|
-
])) :
|
|
591
|
-
|
|
592
|
-
H(e.$slots, "node",
|
|
593
|
-
H(e.$slots, "default",
|
|
594
|
-
o.renderContent ? (r(), R(ze(() => o.renderContent(C(t))), { key: 0 })) : (r(), h(
|
|
593
|
+
])) : x("", !0),
|
|
594
|
+
ue("span", Va, [
|
|
595
|
+
H(e.$slots, "node", M({ ref_for: !0 }, C(t)), () => [
|
|
596
|
+
H(e.$slots, "default", M({ ref_for: !0 }, C(t)), () => [
|
|
597
|
+
o.renderContent ? (r(), R(ze(() => o.renderContent(C(t))), { key: 0 })) : (r(), h(Se, { key: 1 }, [
|
|
595
598
|
P(S(t.label), 1)
|
|
596
599
|
], 64))
|
|
597
600
|
], !0)
|
|
@@ -603,98 +606,106 @@ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselec
|
|
|
603
606
|
class: "hys-ui-tree-retry",
|
|
604
607
|
disabled: l(u) || t.disabled,
|
|
605
608
|
onClick: X((n) => l(s).reloadNode(t.key), ["stop"])
|
|
606
|
-
}, S(l(v).loadError) + " · " + S(l(v).retry), 9,
|
|
609
|
+
}, S(l(v).loadError) + " · " + S(l(v).retry), 9, Fa)) : x("", !0),
|
|
607
610
|
e.$slots.actions ? (r(), h("span", {
|
|
608
611
|
key: 5,
|
|
609
612
|
class: "hys-ui-tree-actions",
|
|
610
613
|
onClick: a[1] || (a[1] = X(() => {
|
|
611
614
|
}, ["stop"]))
|
|
612
615
|
}, [
|
|
613
|
-
H(e.$slots, "actions",
|
|
614
|
-
])) :
|
|
615
|
-
o.draggable ? (r(), R(l(
|
|
616
|
+
H(e.$slots, "actions", M({ ref_for: !0 }, C(t)), void 0, !0)
|
|
617
|
+
])) : x("", !0),
|
|
618
|
+
o.draggable ? (r(), R(l(Ca), {
|
|
616
619
|
key: 6,
|
|
617
620
|
class: "hys-ui-tree-grip",
|
|
618
621
|
size: 13,
|
|
619
622
|
"aria-hidden": "true"
|
|
620
|
-
})) :
|
|
621
|
-
], 46,
|
|
623
|
+
})) : x("", !0)
|
|
624
|
+
], 46, za);
|
|
622
625
|
}), 128))
|
|
623
626
|
], 4)
|
|
624
627
|
], 4),
|
|
625
|
-
!l(
|
|
628
|
+
!l(p).length && !o.loading ? (r(), h("div", La, [
|
|
626
629
|
H(e.$slots, "empty", { query: l(q) }, () => [
|
|
627
630
|
P(S(l(q).trim() ? l(v).noMatch : o.emptyText || l(v).empty), 1)
|
|
628
631
|
], !0)
|
|
629
|
-
])) :
|
|
630
|
-
], 46,
|
|
632
|
+
])) : x("", !0)
|
|
633
|
+
], 46, Ha),
|
|
631
634
|
(r(), R(ka, { to: "body" }, [
|
|
632
|
-
f.value ? (r(), h(
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
635
|
+
f.value ? (r(), h("div", M({ key: 0 }, l(ce), {
|
|
636
|
+
class: "hys-ui-tree-menu-backdrop",
|
|
637
|
+
onClick: a[3] || (a[3] = (t) => k()),
|
|
638
|
+
onContextmenu: a[4] || (a[4] = X((t) => k(), ["prevent"]))
|
|
639
|
+
}), null, 16)) : x("", !0),
|
|
640
|
+
Y(l(pa), {
|
|
641
|
+
"popup-transition": i.popupTransition,
|
|
642
|
+
"popup-transition-duration": i.popupTransitionDuration,
|
|
643
|
+
onInactive: k
|
|
644
|
+
}, {
|
|
645
|
+
default: w(() => [
|
|
646
|
+
f.value ? (r(), h("div", M({
|
|
647
|
+
key: 0,
|
|
648
|
+
ref_key: "menuPanel",
|
|
649
|
+
ref: se
|
|
650
|
+
}, l(ce), {
|
|
651
|
+
class: "hys-ui-tree-context",
|
|
652
|
+
style: { left: f.value.x + "px", top: f.value.y + "px" },
|
|
653
|
+
role: "menu",
|
|
654
|
+
onKeydown: ia
|
|
655
|
+
}), [
|
|
656
|
+
H(e.$slots, "contextmenu", {
|
|
657
|
+
node: f.value.node,
|
|
658
|
+
key: f.value.key,
|
|
659
|
+
close: k
|
|
660
|
+
}, () => {
|
|
661
|
+
var t;
|
|
662
|
+
return [
|
|
663
|
+
Y(xe, {
|
|
664
|
+
role: "menuitem",
|
|
665
|
+
variant: "ghost",
|
|
666
|
+
disabled: l(u),
|
|
667
|
+
onClick: a[5] || (a[5] = (d) => {
|
|
668
|
+
l(s).setCurrentKey(f.value.key), k();
|
|
669
|
+
})
|
|
670
|
+
}, {
|
|
671
|
+
default: w(() => [
|
|
672
|
+
P(S(l(v).select), 1)
|
|
673
|
+
]),
|
|
674
|
+
_: 1
|
|
675
|
+
}, 8, ["disabled"]),
|
|
676
|
+
Y(xe, {
|
|
677
|
+
role: "menuitem",
|
|
678
|
+
variant: "ghost",
|
|
679
|
+
disabled: l(u) || !((t = l(G).map.get(f.value.key)) != null && t.hasChildren),
|
|
680
|
+
onClick: a[6] || (a[6] = (d) => {
|
|
681
|
+
l(z)(f.value.key, !l(b).has(f.value.key)), k();
|
|
682
|
+
})
|
|
683
|
+
}, {
|
|
684
|
+
default: w(() => [
|
|
685
|
+
P(S(l(b).has(f.value.key) ? l(v).collapse : l(v).expand), 1)
|
|
686
|
+
]),
|
|
687
|
+
_: 1
|
|
688
|
+
}, 8, ["disabled"]),
|
|
689
|
+
Y(xe, {
|
|
690
|
+
role: "menuitem",
|
|
691
|
+
variant: "ghost",
|
|
692
|
+
onClick: a[7] || (a[7] = (d) => k())
|
|
693
|
+
}, {
|
|
694
|
+
default: w(() => [
|
|
695
|
+
P(S(l(v).close), 1)
|
|
696
|
+
]),
|
|
697
|
+
_: 1
|
|
660
698
|
})
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
w(De, {
|
|
668
|
-
role: "menuitem",
|
|
669
|
-
variant: "ghost",
|
|
670
|
-
disabled: l(u) || !((t = l(G).map.get(f.value.key)) != null && t.hasChildren),
|
|
671
|
-
onClick: a[6] || (a[6] = (d) => {
|
|
672
|
-
l(z)(f.value.key, !l(b).has(f.value.key)), g();
|
|
673
|
-
})
|
|
674
|
-
}, {
|
|
675
|
-
default: ue(() => [
|
|
676
|
-
P(S(l(b).has(f.value.key) ? l(v).collapse : l(v).expand), 1)
|
|
677
|
-
]),
|
|
678
|
-
_: 1
|
|
679
|
-
}, 8, ["disabled"]),
|
|
680
|
-
w(De, {
|
|
681
|
-
role: "menuitem",
|
|
682
|
-
variant: "ghost",
|
|
683
|
-
onClick: a[7] || (a[7] = (d) => g())
|
|
684
|
-
}, {
|
|
685
|
-
default: ue(() => [
|
|
686
|
-
P(S(l(v).close), 1)
|
|
687
|
-
]),
|
|
688
|
-
_: 1
|
|
689
|
-
})
|
|
690
|
-
];
|
|
691
|
-
}, !0)
|
|
692
|
-
], 16)
|
|
693
|
-
], 64)) : M("", !0)
|
|
699
|
+
];
|
|
700
|
+
}, !0)
|
|
701
|
+
], 16)) : x("", !0)
|
|
702
|
+
]),
|
|
703
|
+
_: 3
|
|
704
|
+
}, 8, ["popup-transition", "popup-transition-duration"])
|
|
694
705
|
]))
|
|
695
|
-
], 16,
|
|
706
|
+
], 16, Ma));
|
|
696
707
|
}
|
|
697
708
|
});
|
|
698
709
|
export {
|
|
699
|
-
|
|
710
|
+
ja as default
|
|
700
711
|
};
|