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,43 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import Ye from "
|
|
4
|
-
import Ge from "../
|
|
5
|
-
import Je from "../
|
|
6
|
-
import Qe from "
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import { defineComponent as Ve, useAttrs as Ae, ref as H, useId as Fe, provide as Oe, computed as T, watch as D, nextTick as I, onMounted as De, onUpdated as Ie, onActivated as Pe, onDeactivated as We, onBeforeUnmount as qe, openBlock as n, createElementBlock as d, mergeProps as Q, unref as a, createElementVNode as $, withModifiers as Z, renderSlot as h, createCommentVNode as v, toDisplayString as z, Fragment as _, renderList as pe, normalizeClass as fe, createTextVNode as P, createBlock as E, resolveDynamicComponent as ye, createVNode as B, withCtx as S, Teleport as Ue, createSlots as je, normalizeProps as W, guardReactiveProps as q } from "vue";
|
|
2
|
+
import Re from "../../motion/PopupMotion.js";
|
|
3
|
+
import { X as me, LoaderCircle as ge, ChevronDown as Xe, Search as Ye } from "lucide-vue-next";
|
|
4
|
+
import Ge from "../HysInput/HysInput.vue.js";
|
|
5
|
+
import Je from "../HysButton/HysButton.vue.js";
|
|
6
|
+
import Qe from "../HysTooltip/HysTooltip.vue.js";
|
|
7
|
+
import Ze from "./HysTreeSelectPanel.vue.js";
|
|
8
|
+
import { useFloating as _e } from "../../composables/useFloating.js";
|
|
9
|
+
import { useHysRootAttrs as ea } from "../../config.js";
|
|
10
|
+
import { useHysControlState as aa, useHysFormItemContext as ta, fieldKey as la } from "../../composables/formContext.js";
|
|
11
|
+
import { useTreeSelect as oa } from "../../composables/useTreeSelect.js";
|
|
12
|
+
const sa = ["disabled"], ia = ["id", "aria-expanded", "aria-controls", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], ra = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "hys-ui-tree-select-prefix"
|
|
14
|
-
},
|
|
15
|
+
}, na = {
|
|
15
16
|
key: 1,
|
|
16
17
|
class: "hys-ui-tree-select-placeholder"
|
|
17
|
-
},
|
|
18
|
+
}, ua = {
|
|
18
19
|
key: 2,
|
|
19
20
|
class: "hys-ui-tree-select-tags"
|
|
20
|
-
}, da = { class: "hys-ui-tree-select-tag-label" },
|
|
21
|
+
}, da = { class: "hys-ui-tree-select-tag-label" }, ca = ["disabled", "aria-label", "onClick"], ha = ["aria-label"], va = {
|
|
21
22
|
key: 3,
|
|
22
23
|
class: "hys-ui-tree-select-value"
|
|
23
|
-
},
|
|
24
|
+
}, pa = { class: "hys-ui-tree-select-indicators" }, fa = ["name", "value", "disabled"], ya = {
|
|
24
25
|
key: 0,
|
|
25
26
|
class: "hys-ui-tree-select-header"
|
|
26
|
-
},
|
|
27
|
+
}, ma = {
|
|
27
28
|
key: 2,
|
|
28
29
|
class: "hys-ui-tree-select-loading",
|
|
29
30
|
role: "status"
|
|
30
|
-
},
|
|
31
|
+
}, ga = {
|
|
31
32
|
key: 3,
|
|
32
33
|
class: "hys-ui-tree-select-error",
|
|
33
34
|
role: "alert"
|
|
34
|
-
},
|
|
35
|
+
}, ba = {
|
|
35
36
|
key: 4,
|
|
36
37
|
class: "hys-ui-tree-select-footer"
|
|
37
|
-
},
|
|
38
|
+
}, La = /* @__PURE__ */ Ve({
|
|
38
39
|
inheritAttrs: !1,
|
|
39
40
|
__name: "HysTreeSelect",
|
|
40
41
|
props: {
|
|
42
|
+
popupTransition: {},
|
|
43
|
+
popupTransitionDuration: {},
|
|
41
44
|
modelValue: {},
|
|
42
45
|
defaultValue: {},
|
|
43
46
|
nodes: {},
|
|
@@ -110,25 +113,25 @@ const oa = ["disabled"], sa = ["id", "aria-expanded", "aria-controls", "aria-lab
|
|
|
110
113
|
},
|
|
111
114
|
emits: ["update:modelValue", "change", "value-change", "select", "deselect", "check", "clear", "remove-tag", "limit", "update:searchValue", "search", "search-error", "search-complete", "update:open", "visible-change", "update:expandedKeys", "update:loadedKeys", "node-expand", "node-collapse", "load-error", "children-loaded", "load", "scroll", "focus", "blur"],
|
|
112
115
|
setup(i, { expose: be, emit: ke }) {
|
|
113
|
-
const
|
|
114
|
-
Oe(
|
|
115
|
-
let k = !0, K = !1,
|
|
116
|
-
const
|
|
116
|
+
const t = i, C = ke, we = Ae(), ee = ea(), u = aa(t), g = ta(), p = H(), M = H(), U = H(), b = H(), V = Fe(), ae = H("");
|
|
117
|
+
Oe(la, void 0);
|
|
118
|
+
let k = !0, K = !1, j = !1, N = 0;
|
|
119
|
+
const A = _e(p, M, {
|
|
117
120
|
get placement() {
|
|
118
|
-
return
|
|
121
|
+
return t.placement;
|
|
119
122
|
},
|
|
120
|
-
matchWidth: () =>
|
|
123
|
+
matchWidth: () => t.popupMatchWidth ? !0 : "min",
|
|
121
124
|
width: () => {
|
|
122
125
|
var e;
|
|
123
|
-
return
|
|
126
|
+
return t.popupWidth ?? (t.virtual && !t.popupMatchWidth ? Math.max(((e = p.value) == null ? void 0 : e.getBoundingClientRect().width) ?? 0, 240) : void 0);
|
|
124
127
|
},
|
|
125
|
-
requestOpen: (e, l) => (e || (
|
|
126
|
-
}), { open: c, style: xe, show:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
requestOpen: (e, l) => (e || (j = !!l), C("update:open", e), t.open === void 0 ? void 0 : !1)
|
|
129
|
+
}), { open: c, style: xe, show: Te, close: f } = A, Be = T(() => c.value && k), o = oa(
|
|
130
|
+
t,
|
|
131
|
+
u.disabled,
|
|
132
|
+
Be,
|
|
130
133
|
(e, ...l) => {
|
|
131
|
-
|
|
134
|
+
C(e, ...l), e === "value-change" && t.clearSearchAfterSelect && !t.retainSearch && o.filter("");
|
|
132
135
|
},
|
|
133
136
|
() => {
|
|
134
137
|
g.validate("change");
|
|
@@ -136,425 +139,434 @@ const oa = ["disabled"], sa = ["id", "aria-expanded", "aria-controls", "aria-lab
|
|
|
136
139
|
), {
|
|
137
140
|
items: w,
|
|
138
141
|
multiple: R,
|
|
139
|
-
busy:
|
|
142
|
+
busy: ka,
|
|
140
143
|
blocked: X,
|
|
141
144
|
query: te,
|
|
142
145
|
words: L,
|
|
143
146
|
remoteError: le,
|
|
144
147
|
remotePending: Y
|
|
145
|
-
} =
|
|
146
|
-
"--hys-ui-tree-select-control-height": (
|
|
147
|
-
})), Ce =
|
|
148
|
-
...
|
|
148
|
+
} = o, Se = T(() => ({
|
|
149
|
+
"--hys-ui-tree-select-control-height": (u.size.value === "sm" ? 30 : u.size.value === "lg" ? 44 : 38) + "px"
|
|
150
|
+
})), Ce = T(() => ({
|
|
151
|
+
...t.popupStyle,
|
|
149
152
|
...xe.value,
|
|
150
153
|
maxHeight: "min(60dvh, calc(100dvh - 20px))",
|
|
151
154
|
overflowY: "hidden"
|
|
152
|
-
})), $e =
|
|
153
|
-
() =>
|
|
154
|
-
), oe =
|
|
155
|
-
() => Number.isFinite(
|
|
156
|
-
), ze =
|
|
157
|
-
() =>
|
|
155
|
+
})), $e = T(
|
|
156
|
+
() => t.itemHeight ?? (u.size.value === "sm" ? 30 : u.size.value === "lg" ? 42 : 36)
|
|
157
|
+
), oe = T(
|
|
158
|
+
() => Number.isFinite(t.maxTagCount) ? Math.max(0, Math.floor(t.maxTagCount)) : 1 / 0
|
|
159
|
+
), ze = T(() => w.value.slice(0, oe.value)), x = T(() => w.value.slice(oe.value)), F = (e) => typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : String(e.value), se = (e) => Number.isFinite(t.maxTagTextLength) && t.maxTagTextLength >= 0 ? F(e).slice(0, t.maxTagTextLength) + (F(e).length > t.maxTagTextLength ? "…" : "") : void 0, Ee = T(
|
|
160
|
+
() => t.clearable && !X.value && o.values.value.some((e) => !o.item(e).disabled)
|
|
158
161
|
), Ke = () => Object.fromEntries(
|
|
159
162
|
Object.entries(we).filter(([e]) => !["class", "style"].includes(e))
|
|
160
163
|
);
|
|
161
164
|
function ie() {
|
|
162
|
-
var
|
|
163
|
-
const e = (
|
|
165
|
+
var s;
|
|
166
|
+
const e = (s = p.value) == null ? void 0 : s.closest("label");
|
|
164
167
|
if (!e) return;
|
|
165
168
|
const l = e.cloneNode(!0);
|
|
166
|
-
l.querySelectorAll(".hys-ui-tree-select-wrap").forEach((
|
|
169
|
+
l.querySelectorAll(".hys-ui-tree-select-wrap").forEach((r) => r.remove()), ae.value = (l.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
167
170
|
}
|
|
168
|
-
async function
|
|
169
|
-
var
|
|
170
|
-
if (!k ||
|
|
171
|
-
const
|
|
172
|
-
if (await
|
|
173
|
-
if (!
|
|
174
|
-
const J =
|
|
175
|
-
(
|
|
171
|
+
async function y(e = !0, l = !1) {
|
|
172
|
+
var de, ce, he, ve;
|
|
173
|
+
if (!k || u.disabled.value || t.readonly) return !1;
|
|
174
|
+
const s = c.value, r = N;
|
|
175
|
+
if (await Te(l), await I(), !k || !c.value || r !== N) return !1;
|
|
176
|
+
if (!s && !t.retainSearch && o.filter(""), t.expandSelected && o.values.value.length) {
|
|
177
|
+
const J = o.values.value.flatMap(
|
|
178
|
+
(O) => o.tree.ancestors(O)
|
|
176
179
|
);
|
|
177
|
-
await
|
|
178
|
-
.../* @__PURE__ */ new Set([...
|
|
180
|
+
await o.tree.setExpandedKeys([
|
|
181
|
+
.../* @__PURE__ */ new Set([...o.tree.rawExpanded.value, ...J])
|
|
179
182
|
]);
|
|
180
183
|
}
|
|
181
|
-
if (await I(), !k || !c.value ||
|
|
182
|
-
const
|
|
183
|
-
(J) =>
|
|
184
|
+
if (await I(), !k || !c.value || r !== N) return !1;
|
|
185
|
+
const m = o.values.value.find(
|
|
186
|
+
(J) => o.tree.visible.value.some((O) => O.key === J && !O.disabled)
|
|
184
187
|
);
|
|
185
|
-
return
|
|
188
|
+
return m !== void 0 && ((de = b.value) == null || de.setActive(m), await ((ce = b.value) == null ? void 0 : ce.scrollTo({ key: m }))), e && (t.searchable ? (he = U.value) == null || he.focus() : await ((ve = b.value) == null ? void 0 : ve.focus(m))), !0;
|
|
186
189
|
}
|
|
187
190
|
async function G() {
|
|
188
|
-
const e = await
|
|
189
|
-
return e &&
|
|
191
|
+
const e = await o.clear();
|
|
192
|
+
return e && f(!0), e;
|
|
190
193
|
}
|
|
191
194
|
function Ne(e) {
|
|
192
|
-
(e == null ? void 0 : e.target) instanceof Element && e.target.closest("button") || (c.value ?
|
|
195
|
+
(e == null ? void 0 : e.target) instanceof Element && e.target.closest("button") || (c.value ? f() : y());
|
|
193
196
|
}
|
|
194
197
|
function Le(e) {
|
|
195
|
-
!R.value &&
|
|
198
|
+
!R.value && o.values.value.includes(e) && f(!0);
|
|
196
199
|
}
|
|
197
|
-
function
|
|
198
|
-
var l,
|
|
199
|
-
if (!(e.isComposing || e.keyCode === 229 || e.target !==
|
|
200
|
+
function He(e) {
|
|
201
|
+
var l, s;
|
|
202
|
+
if (!(e.isComposing || e.keyCode === 229 || e.target !== p.value)) {
|
|
200
203
|
if (["ArrowDown", "ArrowUp", "Enter", " "].includes(e.key))
|
|
201
|
-
e.preventDefault(), c.value ?
|
|
204
|
+
e.preventDefault(), c.value ? t.searchable ? (l = U.value) == null || l.focus() : (s = b.value) == null || s.focus() : y();
|
|
202
205
|
else if (e.key === "Escape" && c.value)
|
|
203
|
-
e.preventDefault(),
|
|
206
|
+
e.preventDefault(), f(!0);
|
|
204
207
|
else if (e.key === "Backspace" && R.value && !X.value) {
|
|
205
|
-
const
|
|
206
|
-
|
|
208
|
+
const r = [...w.value].reverse().find((m) => !m.disabled);
|
|
209
|
+
r && (e.preventDefault(), o.removeTag(r.value));
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
}
|
|
210
213
|
function re(e) {
|
|
211
|
-
K || (K = !0,
|
|
214
|
+
K || (K = !0, C("focus", e)), e.target === p.value && t.showOnFocus && !A.restoringFocus.value && y(!1);
|
|
212
215
|
}
|
|
213
216
|
async function ne(e) {
|
|
214
|
-
var
|
|
217
|
+
var s, r;
|
|
215
218
|
if (await I(), !k) return;
|
|
216
219
|
const l = e.relatedTarget instanceof Node ? e.relatedTarget : document.activeElement;
|
|
217
|
-
(
|
|
220
|
+
(s = p.value) != null && s.contains(l) || (r = M.value) != null && r.contains(l) || K && (K = !1, C("blur", e), t.validateEvent && g.validate("blur"));
|
|
218
221
|
}
|
|
219
|
-
async function
|
|
222
|
+
async function Me(e) {
|
|
220
223
|
var l;
|
|
221
|
-
await
|
|
224
|
+
await y(!1) && await ((l = b.value) == null ? void 0 : l.scrollTo(e));
|
|
222
225
|
}
|
|
223
|
-
|
|
224
|
-
() =>
|
|
226
|
+
D(
|
|
227
|
+
() => t.open,
|
|
225
228
|
(e) => {
|
|
226
229
|
if (k)
|
|
227
|
-
if (e)
|
|
230
|
+
if (e) y(!1, !0);
|
|
228
231
|
else {
|
|
229
|
-
const l =
|
|
230
|
-
|
|
232
|
+
const l = j;
|
|
233
|
+
j = !1, f(l, !0);
|
|
231
234
|
}
|
|
232
235
|
}
|
|
233
|
-
),
|
|
234
|
-
e || N++,
|
|
235
|
-
}),
|
|
236
|
-
[() =>
|
|
236
|
+
), D(c, (e) => {
|
|
237
|
+
e || N++, C("visible-change", e), !e && !t.retainSearch && o.filter("");
|
|
238
|
+
}), D(
|
|
239
|
+
[() => t.readonly, u.disabled],
|
|
237
240
|
([e, l]) => {
|
|
238
|
-
(e || l) && (
|
|
241
|
+
(e || l) && (f(!1, !0), t.open && C("update:open", !1));
|
|
239
242
|
},
|
|
240
243
|
{ flush: "sync" }
|
|
241
|
-
),
|
|
244
|
+
), D(
|
|
242
245
|
[
|
|
243
246
|
te,
|
|
244
247
|
w,
|
|
245
|
-
() =>
|
|
246
|
-
() =>
|
|
247
|
-
() =>
|
|
248
|
+
() => t.popupWidth,
|
|
249
|
+
() => t.popupMatchWidth,
|
|
250
|
+
() => u.size.value
|
|
248
251
|
],
|
|
249
252
|
() => {
|
|
250
|
-
I().then(() =>
|
|
253
|
+
I().then(() => A.update());
|
|
251
254
|
}
|
|
252
|
-
),
|
|
253
|
-
ie(), (
|
|
254
|
-
}),
|
|
255
|
-
k = !0,
|
|
255
|
+
), De(() => {
|
|
256
|
+
ie(), (t.open ?? t.defaultOpen) && y(!1, !0);
|
|
257
|
+
}), Ie(ie), Pe(() => {
|
|
258
|
+
k = !0, t.open && y(!1, !0);
|
|
256
259
|
});
|
|
257
|
-
function
|
|
258
|
-
k = !1, K = !1, N++,
|
|
260
|
+
function ue() {
|
|
261
|
+
k = !1, K = !1, N++, f(!1, !0);
|
|
259
262
|
}
|
|
260
|
-
return
|
|
261
|
-
element:
|
|
263
|
+
return We(ue), qe(ue), be({
|
|
264
|
+
element: p,
|
|
262
265
|
open: c,
|
|
263
266
|
focus: () => {
|
|
264
267
|
var e;
|
|
265
|
-
|
|
268
|
+
u.disabled.value || (e = p.value) == null || e.focus();
|
|
266
269
|
},
|
|
267
270
|
blur: () => {
|
|
268
|
-
var e, l,
|
|
269
|
-
|
|
271
|
+
var e, l, s;
|
|
272
|
+
f(), ((e = p.value) != null && e.contains(document.activeElement) || (l = M.value) != null && l.contains(document.activeElement)) && ((s = document.activeElement) == null || s.blur());
|
|
270
273
|
},
|
|
271
|
-
show: () =>
|
|
272
|
-
hide: (e = !1) =>
|
|
274
|
+
show: () => y(),
|
|
275
|
+
hide: (e = !1) => f(e),
|
|
273
276
|
clear: G,
|
|
274
|
-
removeTag:
|
|
275
|
-
setValue:
|
|
276
|
-
filter:
|
|
277
|
-
getSelectedKeys: () => [...
|
|
277
|
+
removeTag: o.removeTag,
|
|
278
|
+
setValue: o.setValue,
|
|
279
|
+
filter: o.filter,
|
|
280
|
+
getSelectedKeys: () => [...o.values.value],
|
|
278
281
|
getSelectedItems: () => [...w.value],
|
|
279
|
-
getCheckedKeys:
|
|
280
|
-
getHalfCheckedKeys:
|
|
282
|
+
getCheckedKeys: o.tree.getCheckedKeys,
|
|
283
|
+
getHalfCheckedKeys: o.tree.getHalfCheckedKeys,
|
|
281
284
|
getNode: (e) => {
|
|
282
|
-
const l =
|
|
283
|
-
return l ?
|
|
285
|
+
const l = o.tree.getNode(e);
|
|
286
|
+
return l ? o.rawNode(l) : void 0;
|
|
284
287
|
},
|
|
285
|
-
getExpandedKeys: () => [...
|
|
286
|
-
setExpandedKeys:
|
|
287
|
-
expandNode:
|
|
288
|
-
reloadNode:
|
|
289
|
-
scrollTo:
|
|
290
|
-
}), (e, l) => {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
288
|
+
getExpandedKeys: () => [...o.tree.expanded.value],
|
|
289
|
+
setExpandedKeys: o.tree.setExpandedKeys,
|
|
290
|
+
expandNode: o.tree.expandNode,
|
|
291
|
+
reloadNode: o.tree.reloadNode,
|
|
292
|
+
scrollTo: Me
|
|
293
|
+
}), (e, l) => (n(), d("div", Q(a(ee), {
|
|
294
|
+
class: ["hys-ui-tree-select-wrap", [e.$attrs.class, "hys-ui-tree-select-" + a(u).size.value]],
|
|
295
|
+
style: [e.$attrs.style, Se.value]
|
|
296
|
+
}), [
|
|
297
|
+
$("button", {
|
|
298
|
+
hidden: "",
|
|
299
|
+
type: "button",
|
|
300
|
+
tabindex: "-1",
|
|
301
|
+
"aria-hidden": "true",
|
|
302
|
+
disabled: a(u).disabled.value,
|
|
303
|
+
onClick: l[0] || (l[0] = Z((s) => {
|
|
304
|
+
var r;
|
|
305
|
+
(r = p.value) == null || r.focus(), y();
|
|
306
|
+
}, ["prevent"]))
|
|
307
|
+
}, null, 8, sa),
|
|
308
|
+
$("div", Q({
|
|
309
|
+
ref_key: "trigger",
|
|
310
|
+
ref: p
|
|
311
|
+
}, Ke(), {
|
|
312
|
+
id: e.$attrs.id || a(g).id.value || a(V),
|
|
313
|
+
"data-hys-ui-field-managed": "",
|
|
314
|
+
role: "combobox",
|
|
315
|
+
"aria-haspopup": "tree",
|
|
316
|
+
"aria-expanded": a(c),
|
|
317
|
+
"aria-controls": a(c) ? a(V) + "-tree" : void 0,
|
|
318
|
+
"aria-label": i.ariaLabel || a(g).label.value || ae.value || i.placeholder || "选择节点",
|
|
319
|
+
"aria-disabled": a(u).disabled.value || void 0,
|
|
320
|
+
"aria-readonly": i.readonly || void 0,
|
|
321
|
+
"aria-invalid": i.status === "error" || a(g).invalid.value || void 0,
|
|
322
|
+
"aria-describedby": a(g).describedBy.value,
|
|
323
|
+
"aria-required": a(g).required.value || void 0,
|
|
324
|
+
"aria-busy": i.loading || a(Y) || void 0,
|
|
325
|
+
tabindex: a(u).disabled.value ? -1 : 0,
|
|
326
|
+
class: ["hys-ui-tree-select-control", {
|
|
327
|
+
"hys-ui-tree-select-control-disabled": a(u).disabled.value,
|
|
328
|
+
"hys-ui-tree-select-control-error": i.status === "error" || a(g).invalid.value,
|
|
329
|
+
"hys-ui-tree-select-control-warning": i.status === "warning",
|
|
330
|
+
"hys-ui-tree-select-control-success": i.status === "success"
|
|
331
|
+
}],
|
|
332
|
+
onClick: Ne,
|
|
333
|
+
onKeydown: He,
|
|
334
|
+
onFocusin: re,
|
|
335
|
+
onFocusout: ne
|
|
295
336
|
}), [
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
(
|
|
305
|
-
|
|
306
|
-
}, null, 8, oa),
|
|
307
|
-
S("div", Q({
|
|
308
|
-
ref_key: "trigger",
|
|
309
|
-
ref: y
|
|
310
|
-
}, Ke(), {
|
|
311
|
-
id: e.$attrs.id || a(g).id.value || a(M),
|
|
312
|
-
"data-hys-ui-field-managed": "",
|
|
313
|
-
role: "combobox",
|
|
314
|
-
"aria-haspopup": "tree",
|
|
315
|
-
"aria-expanded": a(c),
|
|
316
|
-
"aria-controls": a(c) ? a(M) + "-tree" : void 0,
|
|
317
|
-
"aria-label": i.ariaLabel || a(g).label.value || ae.value || i.placeholder || "选择节点",
|
|
318
|
-
"aria-disabled": a(n).disabled.value || void 0,
|
|
319
|
-
"aria-readonly": i.readonly || void 0,
|
|
320
|
-
"aria-invalid": i.status === "error" || a(g).invalid.value || void 0,
|
|
321
|
-
"aria-describedby": a(g).describedBy.value,
|
|
322
|
-
"aria-required": a(g).required.value || void 0,
|
|
323
|
-
"aria-busy": i.loading || a(Y) || void 0,
|
|
324
|
-
tabindex: a(n).disabled.value ? -1 : 0,
|
|
325
|
-
class: ["hys-ui-tree-select-control", {
|
|
326
|
-
"hys-ui-tree-select-control-disabled": a(n).disabled.value,
|
|
327
|
-
"hys-ui-tree-select-control-error": i.status === "error" || a(g).invalid.value,
|
|
328
|
-
"hys-ui-tree-select-control-warning": i.status === "warning",
|
|
329
|
-
"hys-ui-tree-select-control-success": i.status === "success"
|
|
330
|
-
}],
|
|
331
|
-
onClick: Ne,
|
|
332
|
-
onKeydown: Ve,
|
|
333
|
-
onFocusin: re,
|
|
334
|
-
onFocusout: ne
|
|
335
|
-
}), [
|
|
336
|
-
e.$slots.prefix ? (r(), u("span", ia, [
|
|
337
|
-
v(e.$slots, "prefix", {}, void 0, !0)
|
|
338
|
-
])) : f("", !0),
|
|
339
|
-
a(w).length ? a(R) ? (r(), u("div", na, [
|
|
340
|
-
(r(!0), u(_, null, fe(ze.value, (t) => v(e.$slots, "tag", {
|
|
341
|
-
item: t,
|
|
342
|
-
remove: () => a(s).removeTag(t.value)
|
|
343
|
-
}, () => [
|
|
344
|
-
S("span", {
|
|
345
|
-
class: ye(["hys-ui-tree-select-tag", { "hys-ui-tree-select-tag-disabled": t.disabled }])
|
|
346
|
-
}, [
|
|
347
|
-
S("span", da, [
|
|
348
|
-
se(t) !== void 0 ? (r(), u(_, { key: 0 }, [
|
|
349
|
-
D(z(se(t)), 1)
|
|
350
|
-
], 64)) : (r(), E(pe(() => t.label), { key: 1 }))
|
|
351
|
-
]),
|
|
352
|
-
i.removable ? (r(), u("button", {
|
|
353
|
-
key: 0,
|
|
354
|
-
type: "button",
|
|
355
|
-
class: "hys-ui-tree-select-tag-remove",
|
|
356
|
-
disabled: a(X) || t.disabled,
|
|
357
|
-
"aria-label": "移除 " + A(t),
|
|
358
|
-
onClick: Z((h) => a(s).removeTag(t.value), ["stop"])
|
|
359
|
-
}, [
|
|
360
|
-
C(a(me), {
|
|
361
|
-
size: 12,
|
|
362
|
-
"aria-hidden": "true"
|
|
363
|
-
})
|
|
364
|
-
], 8, ua)) : f("", !0)
|
|
365
|
-
], 2)
|
|
366
|
-
], !0, typeof t.value + ":" + t.value)), 128)),
|
|
367
|
-
x.value.length ? (r(), E(Je, {
|
|
368
|
-
key: 0,
|
|
369
|
-
text: x.value.slice(0, 20).map(A).join("、") + (x.value.length > 20 ? " 等 " + x.value.length + " 项" : "")
|
|
370
|
-
}, {
|
|
371
|
-
default: $(() => [
|
|
372
|
-
S("span", {
|
|
373
|
-
class: "hys-ui-tree-select-tag hys-ui-tree-select-more",
|
|
374
|
-
"aria-label": "另外 " + x.value.length + " 项"
|
|
375
|
-
}, [
|
|
376
|
-
v(e.$slots, "max-tag-placeholder", {
|
|
377
|
-
items: x.value,
|
|
378
|
-
count: x.value.length
|
|
379
|
-
}, () => [
|
|
380
|
-
D("+" + z(x.value.length), 1)
|
|
381
|
-
], !0)
|
|
382
|
-
], 8, ca)
|
|
383
|
-
]),
|
|
384
|
-
_: 3
|
|
385
|
-
}, 8, ["text"])) : f("", !0)
|
|
386
|
-
])) : (r(), u("span", ha, [
|
|
387
|
-
(r(), E(pe(() => a(w)[0].label)))
|
|
388
|
-
])) : (r(), u("span", ra, z(i.placeholder || "选择节点"), 1)),
|
|
389
|
-
S("span", va, [
|
|
390
|
-
i.loading || a(Y) ? (r(), E(a(ge), {
|
|
391
|
-
key: 0,
|
|
392
|
-
size: 15,
|
|
393
|
-
class: "hys-ui-icon-spin",
|
|
394
|
-
"aria-hidden": "true"
|
|
395
|
-
})) : f("", !0),
|
|
396
|
-
Ee.value ? (r(), u("button", {
|
|
397
|
-
key: 1,
|
|
398
|
-
type: "button",
|
|
399
|
-
class: "hys-ui-tree-select-clear",
|
|
400
|
-
"aria-label": "清空选择",
|
|
401
|
-
onClick: Z(G, ["stop"])
|
|
337
|
+
e.$slots.prefix ? (n(), d("span", ra, [
|
|
338
|
+
h(e.$slots, "prefix", {}, void 0, !0)
|
|
339
|
+
])) : v("", !0),
|
|
340
|
+
a(w).length ? a(R) ? (n(), d("div", ua, [
|
|
341
|
+
(n(!0), d(_, null, pe(ze.value, (s) => h(e.$slots, "tag", {
|
|
342
|
+
item: s,
|
|
343
|
+
remove: () => a(o).removeTag(s.value)
|
|
344
|
+
}, () => [
|
|
345
|
+
$("span", {
|
|
346
|
+
class: fe(["hys-ui-tree-select-tag", { "hys-ui-tree-select-tag-disabled": s.disabled }])
|
|
402
347
|
}, [
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
])) : f("", !0),
|
|
408
|
-
v(e.$slots, "suffix", {}, () => [
|
|
409
|
-
C(a(Re), {
|
|
410
|
-
size: 16,
|
|
411
|
-
class: ye(["hys-ui-tree-select-chevron", { "hys-ui-tree-select-chevron-open": a(c) }]),
|
|
412
|
-
"aria-hidden": "true"
|
|
413
|
-
}, null, 8, ["class"])
|
|
414
|
-
], !0)
|
|
415
|
-
])
|
|
416
|
-
], 16, sa),
|
|
417
|
-
i.name ? (r(!0), u(_, { key: 0 }, fe(a(s).values.value, (t) => (r(), u("input", {
|
|
418
|
-
key: typeof t + ":" + t,
|
|
419
|
-
type: "hidden",
|
|
420
|
-
name: i.name,
|
|
421
|
-
value: t,
|
|
422
|
-
disabled: a(n).disabled.value
|
|
423
|
-
}, null, 8, fa))), 128)) : f("", !0),
|
|
424
|
-
(r(), E(Ue, {
|
|
425
|
-
to: i.appendTo === !1 ? "body" : i.appendTo,
|
|
426
|
-
disabled: i.appendTo === !1
|
|
427
|
-
}, [
|
|
428
|
-
a(c) ? (r(), u("div", Q({
|
|
429
|
-
key: 0,
|
|
430
|
-
ref_key: "panel",
|
|
431
|
-
ref: H
|
|
432
|
-
}, a(ee), {
|
|
433
|
-
class: ["hys-ui-tree-select-menu hys-ui-pf-tree-select-menu", [i.popupClass, "hys-ui-tree-select-" + a(n).size.value]],
|
|
434
|
-
style: Ce.value,
|
|
435
|
-
onFocusin: re,
|
|
436
|
-
onFocusout: ne
|
|
437
|
-
}), [
|
|
438
|
-
e.$slots.header ? (r(), u("header", ya, [
|
|
439
|
-
v(e.$slots, "header", {}, void 0, !0)
|
|
440
|
-
])) : f("", !0),
|
|
441
|
-
i.searchable ? (r(), E(Ye, {
|
|
442
|
-
key: 1,
|
|
443
|
-
ref_key: "search",
|
|
444
|
-
ref: P,
|
|
445
|
-
class: "hys-ui-tree-select-search",
|
|
446
|
-
"model-value": a(te),
|
|
447
|
-
placeholder: a(L).search,
|
|
448
|
-
"aria-label": a(L).search,
|
|
449
|
-
"aria-controls": a(M) + "-tree",
|
|
450
|
-
"aria-activedescendant": (d = b.value) == null ? void 0 : d.activeId,
|
|
451
|
-
disabled: a(n).disabled.value || i.readonly || i.loading,
|
|
452
|
-
size: a(n).size.value,
|
|
453
|
-
clearable: "",
|
|
454
|
-
"onUpdate:modelValue": a(s).filter,
|
|
455
|
-
onKeydown: l[1] || (l[1] = (t) => {
|
|
456
|
-
var h;
|
|
457
|
-
return (h = b.value) == null ? void 0 : h.searchKeys(t);
|
|
458
|
-
})
|
|
459
|
-
}, {
|
|
460
|
-
prefix: $(() => [
|
|
461
|
-
C(a(Xe), {
|
|
462
|
-
size: 14,
|
|
463
|
-
"aria-hidden": "true"
|
|
464
|
-
})
|
|
348
|
+
$("span", da, [
|
|
349
|
+
se(s) !== void 0 ? (n(), d(_, { key: 0 }, [
|
|
350
|
+
P(z(se(s)), 1)
|
|
351
|
+
], 64)) : (n(), E(ye(() => s.label), { key: 1 }))
|
|
465
352
|
]),
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
353
|
+
i.removable ? (n(), d("button", {
|
|
354
|
+
key: 0,
|
|
355
|
+
type: "button",
|
|
356
|
+
class: "hys-ui-tree-select-tag-remove",
|
|
357
|
+
disabled: a(X) || s.disabled,
|
|
358
|
+
"aria-label": "移除 " + F(s),
|
|
359
|
+
onClick: Z((r) => a(o).removeTag(s.value), ["stop"])
|
|
360
|
+
}, [
|
|
361
|
+
B(a(me), {
|
|
362
|
+
size: 12,
|
|
473
363
|
"aria-hidden": "true"
|
|
474
|
-
})
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
364
|
+
})
|
|
365
|
+
], 8, ca)) : v("", !0)
|
|
366
|
+
], 2)
|
|
367
|
+
], !0, typeof s.value + ":" + s.value)), 128)),
|
|
368
|
+
x.value.length ? (n(), E(Qe, {
|
|
369
|
+
key: 0,
|
|
370
|
+
text: x.value.slice(0, 20).map(F).join("、") + (x.value.length > 20 ? " 等 " + x.value.length + " 项" : "")
|
|
371
|
+
}, {
|
|
372
|
+
default: S(() => [
|
|
373
|
+
$("span", {
|
|
374
|
+
class: "hys-ui-tree-select-tag hys-ui-tree-select-more",
|
|
375
|
+
"aria-label": "另外 " + x.value.length + " 项"
|
|
376
|
+
}, [
|
|
377
|
+
h(e.$slots, "max-tag-placeholder", {
|
|
378
|
+
items: x.value,
|
|
379
|
+
count: x.value.length
|
|
380
|
+
}, () => [
|
|
381
|
+
P("+" + z(x.value.length), 1)
|
|
382
|
+
], !0)
|
|
383
|
+
], 8, ha)
|
|
384
|
+
]),
|
|
385
|
+
_: 3
|
|
386
|
+
}, 8, ["text"])) : v("", !0)
|
|
387
|
+
])) : (n(), d("span", va, [
|
|
388
|
+
(n(), E(ye(() => a(w)[0].label)))
|
|
389
|
+
])) : (n(), d("span", na, z(i.placeholder || "选择节点"), 1)),
|
|
390
|
+
$("span", pa, [
|
|
391
|
+
i.loading || a(Y) ? (n(), E(a(ge), {
|
|
392
|
+
key: 0,
|
|
393
|
+
size: 15,
|
|
394
|
+
class: "hys-ui-icon-spin",
|
|
395
|
+
"aria-hidden": "true"
|
|
396
|
+
})) : v("", !0),
|
|
397
|
+
Ee.value ? (n(), d("button", {
|
|
398
|
+
key: 1,
|
|
399
|
+
type: "button",
|
|
400
|
+
class: "hys-ui-tree-select-clear",
|
|
401
|
+
"aria-label": "清空选择",
|
|
402
|
+
onClick: Z(G, ["stop"])
|
|
403
|
+
}, [
|
|
404
|
+
B(a(me), {
|
|
405
|
+
size: 14,
|
|
406
|
+
"aria-hidden": "true"
|
|
407
|
+
})
|
|
408
|
+
])) : v("", !0),
|
|
409
|
+
h(e.$slots, "suffix", {}, () => [
|
|
410
|
+
B(a(Xe), {
|
|
411
|
+
size: 16,
|
|
412
|
+
class: fe(["hys-ui-tree-select-chevron", { "hys-ui-tree-select-chevron-open": a(c) }]),
|
|
413
|
+
"aria-hidden": "true"
|
|
414
|
+
}, null, 8, ["class"])
|
|
415
|
+
], !0)
|
|
416
|
+
])
|
|
417
|
+
], 16, ia),
|
|
418
|
+
i.name ? (n(!0), d(_, { key: 0 }, pe(a(o).values.value, (s) => (n(), d("input", {
|
|
419
|
+
key: typeof s + ":" + s,
|
|
420
|
+
type: "hidden",
|
|
421
|
+
name: i.name,
|
|
422
|
+
value: s,
|
|
423
|
+
disabled: a(u).disabled.value
|
|
424
|
+
}, null, 8, fa))), 128)) : v("", !0),
|
|
425
|
+
(n(), E(Ue, {
|
|
426
|
+
to: i.appendTo === !1 ? "body" : i.appendTo,
|
|
427
|
+
disabled: i.appendTo === !1
|
|
428
|
+
}, [
|
|
429
|
+
B(a(Re), {
|
|
430
|
+
"popup-transition": t.popupTransition,
|
|
431
|
+
"popup-transition-duration": t.popupTransitionDuration,
|
|
432
|
+
placement: a(A).placement.value
|
|
433
|
+
}, {
|
|
434
|
+
default: S(() => {
|
|
435
|
+
var s;
|
|
436
|
+
return [
|
|
437
|
+
a(c) ? (n(), d("div", Q({
|
|
438
|
+
key: 0,
|
|
439
|
+
ref_key: "panel",
|
|
440
|
+
ref: M
|
|
441
|
+
}, a(ee), {
|
|
442
|
+
class: ["hys-ui-tree-select-menu hys-ui-pf-tree-select-menu", [i.popupClass, "hys-ui-tree-select-" + a(u).size.value]],
|
|
443
|
+
style: Ce.value,
|
|
444
|
+
onFocusin: re,
|
|
445
|
+
onFocusout: ne
|
|
446
|
+
}), [
|
|
447
|
+
e.$slots.header ? (n(), d("header", ya, [
|
|
448
|
+
h(e.$slots, "header", {}, void 0, !0)
|
|
449
|
+
])) : v("", !0),
|
|
450
|
+
i.searchable ? (n(), E(Ge, {
|
|
451
|
+
key: 1,
|
|
452
|
+
ref_key: "search",
|
|
453
|
+
ref: U,
|
|
454
|
+
class: "hys-ui-tree-select-search",
|
|
455
|
+
"model-value": a(te),
|
|
456
|
+
placeholder: a(L).search,
|
|
457
|
+
"aria-label": a(L).search,
|
|
458
|
+
"aria-controls": a(V) + "-tree",
|
|
459
|
+
"aria-activedescendant": (s = b.value) == null ? void 0 : s.activeId,
|
|
460
|
+
disabled: a(u).disabled.value || i.readonly || i.loading,
|
|
461
|
+
size: a(u).size.value,
|
|
462
|
+
clearable: "",
|
|
463
|
+
"onUpdate:modelValue": a(o).filter,
|
|
464
|
+
onKeydown: l[1] || (l[1] = (r) => {
|
|
465
|
+
var m;
|
|
466
|
+
return (m = b.value) == null ? void 0 : m.searchKeys(r);
|
|
467
|
+
})
|
|
488
468
|
}, {
|
|
489
|
-
|
|
490
|
-
|
|
469
|
+
prefix: S(() => [
|
|
470
|
+
B(a(Ye), {
|
|
471
|
+
size: 14,
|
|
472
|
+
"aria-hidden": "true"
|
|
473
|
+
})
|
|
491
474
|
]),
|
|
492
475
|
_: 1
|
|
493
|
-
})
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
476
|
+
}, 8, ["model-value", "placeholder", "aria-label", "aria-controls", "aria-activedescendant", "disabled", "size", "onUpdate:modelValue"])) : v("", !0),
|
|
477
|
+
i.loading || a(Y) ? (n(), d("div", ma, [
|
|
478
|
+
h(e.$slots, "loading", {}, () => [
|
|
479
|
+
B(a(ge), {
|
|
480
|
+
size: 16,
|
|
481
|
+
class: "hys-ui-icon-spin",
|
|
482
|
+
"aria-hidden": "true"
|
|
483
|
+
}),
|
|
484
|
+
P(z(a(L).loading), 1)
|
|
485
|
+
], !0)
|
|
486
|
+
])) : v("", !0),
|
|
487
|
+
a(le) ? (n(), d("div", ga, [
|
|
488
|
+
h(e.$slots, "error", {
|
|
489
|
+
error: a(le),
|
|
490
|
+
retry: a(o).retrySearch
|
|
491
|
+
}, () => [
|
|
492
|
+
$("span", null, z(a(L).loadError), 1),
|
|
493
|
+
B(Je, {
|
|
494
|
+
size: "sm",
|
|
495
|
+
variant: "ghost",
|
|
496
|
+
onClick: l[2] || (l[2] = (r) => a(o).retrySearch())
|
|
497
|
+
}, {
|
|
498
|
+
default: S(() => [
|
|
499
|
+
P(z(a(L).retry), 1)
|
|
500
|
+
]),
|
|
501
|
+
_: 1
|
|
502
|
+
})
|
|
503
|
+
], !0)
|
|
504
|
+
])) : v("", !0),
|
|
505
|
+
B(Ze, {
|
|
506
|
+
ref_key: "view",
|
|
507
|
+
ref: b,
|
|
508
|
+
store: a(o),
|
|
509
|
+
size: a(u).size.value,
|
|
510
|
+
"tree-id": a(V) + "-tree",
|
|
511
|
+
checkable: i.checkable,
|
|
512
|
+
"check-strictly": i.checkStrictly,
|
|
513
|
+
"leaf-only": i.leafOnly,
|
|
514
|
+
"expand-on-click-node": i.expandOnClickNode,
|
|
515
|
+
"show-line": i.showLine,
|
|
516
|
+
"show-icon": i.showIcon,
|
|
517
|
+
indent: i.indent,
|
|
518
|
+
"list-height": i.listHeight,
|
|
519
|
+
virtual: i.virtual,
|
|
520
|
+
"item-height": $e.value,
|
|
521
|
+
overscan: i.overscan,
|
|
522
|
+
onChoose: Le,
|
|
523
|
+
onScroll: l[3] || (l[3] = (r) => C("scroll", r))
|
|
524
|
+
}, je({ _: 2 }, [
|
|
525
|
+
e.$slots.option ? {
|
|
526
|
+
name: "option",
|
|
527
|
+
fn: S((r) => [
|
|
528
|
+
h(e.$slots, "option", W(q(r)), void 0, !0)
|
|
529
|
+
]),
|
|
530
|
+
key: "0"
|
|
531
|
+
} : void 0,
|
|
532
|
+
e.$slots.icon ? {
|
|
533
|
+
name: "icon",
|
|
534
|
+
fn: S((r) => [
|
|
535
|
+
h(e.$slots, "icon", W(q(r)), void 0, !0)
|
|
536
|
+
]),
|
|
537
|
+
key: "1"
|
|
538
|
+
} : void 0,
|
|
539
|
+
e.$slots.switcher ? {
|
|
540
|
+
name: "switcher",
|
|
541
|
+
fn: S((r) => [
|
|
542
|
+
h(e.$slots, "switcher", W(q(r)), void 0, !0)
|
|
543
|
+
]),
|
|
544
|
+
key: "2"
|
|
545
|
+
} : void 0,
|
|
546
|
+
e.$slots.empty ? {
|
|
547
|
+
name: "empty",
|
|
548
|
+
fn: S((r) => [
|
|
549
|
+
h(e.$slots, "empty", W(q(r)), void 0, !0)
|
|
550
|
+
]),
|
|
551
|
+
key: "3"
|
|
552
|
+
} : void 0
|
|
553
|
+
]), 1032, ["store", "size", "tree-id", "checkable", "check-strictly", "leaf-only", "expand-on-click-node", "show-line", "show-icon", "indent", "list-height", "virtual", "item-height", "overscan"]),
|
|
554
|
+
e.$slots.footer ? (n(), d("footer", ba, [
|
|
555
|
+
h(e.$slots, "footer", {
|
|
556
|
+
items: a(w),
|
|
557
|
+
clear: G,
|
|
558
|
+
close: () => a(f)(!0)
|
|
559
|
+
}, void 0, !0)
|
|
560
|
+
])) : v("", !0)
|
|
561
|
+
], 16)) : v("", !0)
|
|
562
|
+
];
|
|
563
|
+
}),
|
|
564
|
+
_: 3
|
|
565
|
+
}, 8, ["popup-transition", "popup-transition-duration", "placement"])
|
|
566
|
+
], 8, ["to", "disabled"]))
|
|
567
|
+
], 16));
|
|
556
568
|
}
|
|
557
569
|
});
|
|
558
570
|
export {
|
|
559
|
-
|
|
571
|
+
La as default
|
|
560
572
|
};
|