hys-ui 0.1.0 → 0.2.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 +137 -1
- package/README.md +18 -6
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- package/dist/components/HysAlert/HysAlert.vue.js +14 -14
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
- package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
- package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -26
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +29 -28
- package/dist/components/HysCalendar/HysCalendar.vue.js +5 -84
- package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
- package/dist/components/HysCard/HysCard.vue.js +1 -1
- package/dist/components/HysCard/HysCard2.vue.js +177 -44
- package/dist/components/HysCascader/HysCascader.vue.js +5 -182
- package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
- package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
- package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +5 -39
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +200 -2
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
- package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +397 -390
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
- package/dist/components/HysDivider/HysDivider.vue.js +2 -2
- package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +55 -54
- package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
- package/dist/components/HysFileManager/HysFileManager2.vue.js +86 -2
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +580 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -69
- package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
- package/dist/components/HysGantt/HysGantt.vue.js +5 -264
- package/dist/components/HysGantt/HysGantt2.vue.js +1399 -2
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +468 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +89 -88
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +35 -35
- package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -70
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +41 -36
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +93 -91
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +101 -2
- package/dist/components/HysRadio/HysRadio.vue.js +7 -0
- package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +5 -40
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +205 -2
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +87 -67
- package/dist/components/HysSearch/HysSearch.vue.js +50 -38
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -58
- package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
- package/dist/components/HysSelect/HysSelect.vue.js +3 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +859 -164
- package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
- package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
- package/dist/components/HysSteps/HysSteps.vue.js +2 -2
- package/dist/components/HysSteps/HysSteps2.vue.js +111 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +235 -42
- package/dist/components/HysTable/HysTable.vue.js +1 -1
- package/dist/components/HysTable/HysTable2.vue.js +1471 -82
- package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
- package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
- package/dist/components/HysTabs/HysTabs.vue.js +2 -2
- package/dist/components/HysTabs/HysTabs2.vue.js +262 -66
- package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
- package/dist/components/HysTextarea/HysTextarea.vue.js +137 -66
- package/dist/components/HysToast/HysToast.vue.js +2 -2
- package/dist/components/HysToast/HysToast2.vue.js +121 -38
- package/dist/components/HysTour/HysTour.vue.js +47 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -207
- package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +641 -301
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -129
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
- package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
- package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +97 -78
- package/dist/composables/autocomplete.js +50 -0
- package/dist/composables/avatar.js +57 -0
- package/dist/composables/calendar.js +96 -0
- package/dist/composables/cascader.js +79 -0
- package/dist/composables/choice.js +38 -0
- package/dist/composables/choiceModel.js +67 -0
- package/dist/composables/datePicker.js +227 -0
- package/dist/composables/formContext.js +94 -3
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/numberInput.js +91 -0
- package/dist/composables/rating.js +16 -0
- package/dist/composables/selectOptions.js +54 -0
- package/dist/composables/table.js +150 -0
- package/dist/composables/textInput.js +34 -0
- package/dist/composables/toastEscape.js +16 -0
- package/dist/composables/transfer.js +63 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useDialog.js +16 -16
- package/dist/composables/useFloating.js +98 -52
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useHysToast.js +148 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/config.js +18 -15
- package/dist/index.js +149 -136
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
- package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -29
- package/dist/types/components/HysCard/HysCard.vue.d.ts +57 -5
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +55 -27
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -0
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +8 -4
- package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +88 -4
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -33
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +4 -1
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +62 -17
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
- package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
- package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -14
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +65 -9
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
- package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
- package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
- package/dist/types/components/HysTour/HysTour.vue.d.ts +5 -3
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -30
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
- package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
- package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
- package/dist/types/composables/autocomplete.d.ts +106 -0
- package/dist/types/composables/avatar.d.ts +70 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +192 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/datePicker.d.ts +247 -0
- package/dist/types/composables/formContext.d.ts +138 -8
- package/dist/types/composables/formLayout.d.ts +11 -0
- package/dist/types/composables/formValidation.d.ts +13 -0
- package/dist/types/composables/gantt.d.ts +68 -0
- package/dist/types/composables/ganttConflicts.d.ts +30 -0
- package/dist/types/composables/numberInput.d.ts +45 -0
- package/dist/types/composables/rating.d.ts +18 -0
- package/dist/types/composables/segmented.d.ts +15 -0
- package/dist/types/composables/selectOptions.d.ts +44 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +309 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/toastEscape.d.ts +1 -0
- package/dist/types/composables/transfer.d.ts +180 -0
- package/dist/types/composables/tree.d.ts +237 -0
- package/dist/types/composables/treeSelect.d.ts +167 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useFloating.d.ts +8 -5
- package/dist/types/composables/useGanttDependencies.d.ts +83 -0
- package/dist/types/composables/useGanttHistory.d.ts +42 -0
- package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
- package/dist/types/composables/useHysToast.d.ts +50 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/index.d.ts +38 -7
- package/package.json +47 -11
|
@@ -1,209 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "hys-ui-pf-transfer-search"
|
|
7
|
-
}, se = ["draggable", "title", "onDragstart"], ne = ["value", "disabled"], re = { class: "hys-ui-v4-move" }, ie = ["disabled"], ue = ["disabled"], oe = { class: "hys-ui-pf-transfer-header" }, de = ["draggable", "title", "onDragstart"], ve = ["value", "disabled"], fe = {
|
|
8
|
-
class: "hys-ui-pf-transfer-status",
|
|
9
|
-
role: "status"
|
|
10
|
-
}, ye = /* @__PURE__ */ J({
|
|
11
|
-
__name: "HysTransfer",
|
|
12
|
-
props: {
|
|
13
|
-
modelValue: {},
|
|
14
|
-
options: {},
|
|
15
|
-
disabled: { type: Boolean },
|
|
16
|
-
filterable: { type: Boolean },
|
|
17
|
-
titles: {}
|
|
18
|
-
},
|
|
19
|
-
emits: ["update:modelValue"],
|
|
20
|
-
setup(r, { emit: O }) {
|
|
21
|
-
const P = _(), s = r, R = O, c = g([]), b = g([]), V = g(""), T = $(() => s.options.filter((l) => !s.modelValue.includes(l.value) && l.label.toLowerCase().includes(V.value.toLowerCase()))), C = $(() => s.options.filter((l) => s.modelValue.includes(l.value))), j = Symbol("empty-available"), I = Symbol("empty-selected"), y = g(null), h = g(null), L = g("");
|
|
22
|
-
function S(l, a = l ? c.value : b.value) {
|
|
23
|
-
if (s.disabled) return;
|
|
24
|
-
const n = a.filter((e) => s.options.some((i) => i.value === e && !i.disabled)), D = l ? [.../* @__PURE__ */ new Set([...s.modelValue, ...n])] : s.modelValue.filter((e) => !n.includes(e));
|
|
25
|
-
D.length !== s.modelValue.length && (R("update:modelValue", D), L.value = l ? "已移入已选择区域" : "已移回待选择区域"), c.value = [], b.value = [];
|
|
26
|
-
}
|
|
27
|
-
function N(l, a, n) {
|
|
28
|
-
if (s.disabled || a.disabled || !l.dataTransfer) {
|
|
29
|
-
l.preventDefault();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
y.value = { value: a.value, fromSelected: n }, l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", a.value);
|
|
33
|
-
}
|
|
34
|
-
function A(l) {
|
|
35
|
-
const a = y.value;
|
|
36
|
-
return !s.disabled && !!a && a.fromSelected !== l && s.modelValue.includes(a.value) === a.fromSelected && s.options.some((n) => n.value === a.value && !n.disabled);
|
|
37
|
-
}
|
|
38
|
-
function B(l, a) {
|
|
39
|
-
A(a) && (l.preventDefault(), l.dataTransfer && (l.dataTransfer.dropEffect = "move"), h.value = a);
|
|
40
|
-
}
|
|
41
|
-
function E(l) {
|
|
42
|
-
l.relatedTarget instanceof Node && l.currentTarget.contains(l.relatedTarget) || (h.value = null);
|
|
43
|
-
}
|
|
44
|
-
function m() {
|
|
45
|
-
y.value = null, h.value = null;
|
|
46
|
-
}
|
|
47
|
-
function U(l, a) {
|
|
48
|
-
if (!A(a)) {
|
|
49
|
-
m();
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
l.preventDefault(), S(a, [y.value.value]), m();
|
|
53
|
-
}
|
|
54
|
-
return Q(m), (l, a) => {
|
|
55
|
-
var n, D;
|
|
56
|
-
return u(), o("div", W(d(P), { class: "hys-ui-v4-transfer hys-ui-pf-transfer" }), [
|
|
57
|
-
t("section", {
|
|
58
|
-
class: k(["hys-ui-v4-pane", { "hys-ui-is-drop-target": h.value === !1 }]),
|
|
59
|
-
"aria-label": "待选择",
|
|
60
|
-
onDragover: a[2] || (a[2] = (e) => B(e, !1)),
|
|
61
|
-
onDragleave: E,
|
|
62
|
-
onDrop: a[3] || (a[3] = (e) => U(e, !1))
|
|
63
|
-
}, [
|
|
64
|
-
t("header", le, [
|
|
65
|
-
t("strong", null, v(((n = r.titles) == null ? void 0 : n[0]) || "待选择"), 1),
|
|
66
|
-
t("span", null, v(T.value.length), 1)
|
|
67
|
-
]),
|
|
68
|
-
r.filterable !== !1 ? (u(), o("div", te, [
|
|
69
|
-
p(d(x), {
|
|
70
|
-
size: 14,
|
|
71
|
-
"aria-hidden": "true"
|
|
72
|
-
}),
|
|
73
|
-
w(t("input", {
|
|
74
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) => V.value = e),
|
|
75
|
-
placeholder: "筛选成员",
|
|
76
|
-
"aria-label": "筛选成员"
|
|
77
|
-
}, null, 512), [
|
|
78
|
-
[X, V.value]
|
|
79
|
-
])
|
|
80
|
-
])) : z("", !0),
|
|
81
|
-
p(G, {
|
|
82
|
-
name: "hys-ui-transfer-motion",
|
|
83
|
-
tag: "div",
|
|
84
|
-
class: "hys-ui-pf-transfer-list"
|
|
85
|
-
}, {
|
|
86
|
-
default: H(() => [
|
|
87
|
-
(u(!0), o(K, null, M(T.value, (e) => {
|
|
88
|
-
var i;
|
|
89
|
-
return u(), o("label", {
|
|
90
|
-
key: e.value,
|
|
91
|
-
class: k(["hys-ui-v4-option", { "hys-ui-is-checked": c.value.includes(e.value), "hys-ui-is-disabled": e.disabled, "hys-ui-is-dragging": ((i = y.value) == null ? void 0 : i.value) === e.value }]),
|
|
92
|
-
draggable: !r.disabled && !e.disabled,
|
|
93
|
-
title: e.disabled ? void 0 : "拖动到已选择区域",
|
|
94
|
-
onDragstart: (f) => N(f, e, !1),
|
|
95
|
-
onDragend: m
|
|
96
|
-
}, [
|
|
97
|
-
w(t("input", {
|
|
98
|
-
"onUpdate:modelValue": a[1] || (a[1] = (f) => c.value = f),
|
|
99
|
-
type: "checkbox",
|
|
100
|
-
value: e.value,
|
|
101
|
-
disabled: r.disabled || e.disabled
|
|
102
|
-
}, null, 8, ne), [
|
|
103
|
-
[q, c.value]
|
|
104
|
-
]),
|
|
105
|
-
t("span", null, [
|
|
106
|
-
Y(l.$slots, "option", { option: e }, () => [
|
|
107
|
-
Z(v(e.label), 1)
|
|
108
|
-
])
|
|
109
|
-
]),
|
|
110
|
-
p(d(F), {
|
|
111
|
-
class: "hys-ui-pf-transfer-grip",
|
|
112
|
-
size: 12,
|
|
113
|
-
"aria-hidden": "true"
|
|
114
|
-
})
|
|
115
|
-
], 42, se);
|
|
116
|
-
}), 128)),
|
|
117
|
-
T.value.length ? z("", !0) : (u(), o("p", {
|
|
118
|
-
key: d(j),
|
|
119
|
-
class: "hys-ui-pf-transfer-empty"
|
|
120
|
-
}, v(V.value ? "无匹配成员" : "暂无待选成员"), 1))
|
|
121
|
-
]),
|
|
122
|
-
_: 3
|
|
123
|
-
})
|
|
124
|
-
], 34),
|
|
125
|
-
t("div", re, [
|
|
126
|
-
t("button", {
|
|
127
|
-
type: "button",
|
|
128
|
-
class: "hys-ui-v4-control",
|
|
129
|
-
disabled: r.disabled || !c.value.length,
|
|
130
|
-
onClick: a[4] || (a[4] = (e) => S(!0)),
|
|
131
|
-
"aria-label": "添加选中项"
|
|
132
|
-
}, [
|
|
133
|
-
p(d(ee), {
|
|
134
|
-
size: 16,
|
|
135
|
-
"aria-hidden": "true"
|
|
136
|
-
})
|
|
137
|
-
], 8, ie),
|
|
138
|
-
t("button", {
|
|
139
|
-
type: "button",
|
|
140
|
-
class: "hys-ui-v4-control",
|
|
141
|
-
disabled: r.disabled || !b.value.length,
|
|
142
|
-
onClick: a[5] || (a[5] = (e) => S(!1)),
|
|
143
|
-
"aria-label": "移除选中项"
|
|
144
|
-
}, [
|
|
145
|
-
p(d(ae), {
|
|
146
|
-
size: 16,
|
|
147
|
-
"aria-hidden": "true"
|
|
148
|
-
})
|
|
149
|
-
], 8, ue)
|
|
150
|
-
]),
|
|
151
|
-
t("section", {
|
|
152
|
-
class: k(["hys-ui-v4-pane", { "hys-ui-is-drop-target": h.value === !0 }]),
|
|
153
|
-
"aria-label": "已选择",
|
|
154
|
-
onDragover: a[7] || (a[7] = (e) => B(e, !0)),
|
|
155
|
-
onDragleave: E,
|
|
156
|
-
onDrop: a[8] || (a[8] = (e) => U(e, !0))
|
|
157
|
-
}, [
|
|
158
|
-
t("header", oe, [
|
|
159
|
-
t("strong", null, v(((D = r.titles) == null ? void 0 : D[1]) || "已选择"), 1),
|
|
160
|
-
t("span", null, v(C.value.length), 1)
|
|
161
|
-
]),
|
|
162
|
-
p(G, {
|
|
163
|
-
name: "hys-ui-transfer-motion",
|
|
164
|
-
tag: "div",
|
|
165
|
-
class: "hys-ui-pf-transfer-list"
|
|
166
|
-
}, {
|
|
167
|
-
default: H(() => [
|
|
168
|
-
(u(!0), o(K, null, M(C.value, (e) => {
|
|
169
|
-
var i;
|
|
170
|
-
return u(), o("label", {
|
|
171
|
-
key: e.value,
|
|
172
|
-
class: k(["hys-ui-v4-option", { "hys-ui-is-checked": b.value.includes(e.value), "hys-ui-is-disabled": e.disabled, "hys-ui-is-dragging": ((i = y.value) == null ? void 0 : i.value) === e.value }]),
|
|
173
|
-
draggable: !e.disabled,
|
|
174
|
-
title: e.disabled ? void 0 : "拖动到待选择区域",
|
|
175
|
-
onDragstart: (f) => N(f, e, !0),
|
|
176
|
-
onDragend: m
|
|
177
|
-
}, [
|
|
178
|
-
w(t("input", {
|
|
179
|
-
"onUpdate:modelValue": a[6] || (a[6] = (f) => b.value = f),
|
|
180
|
-
type: "checkbox",
|
|
181
|
-
value: e.value,
|
|
182
|
-
disabled: e.disabled
|
|
183
|
-
}, null, 8, ve), [
|
|
184
|
-
[q, b.value]
|
|
185
|
-
]),
|
|
186
|
-
t("span", null, v(e.label), 1),
|
|
187
|
-
p(d(F), {
|
|
188
|
-
class: "hys-ui-pf-transfer-grip",
|
|
189
|
-
size: 12,
|
|
190
|
-
"aria-hidden": "true"
|
|
191
|
-
})
|
|
192
|
-
], 42, de);
|
|
193
|
-
}), 128)),
|
|
194
|
-
C.value.length ? z("", !0) : (u(), o("p", {
|
|
195
|
-
key: d(I),
|
|
196
|
-
class: "hys-ui-pf-transfer-empty"
|
|
197
|
-
}, "暂无已选成员"))
|
|
198
|
-
]),
|
|
199
|
-
_: 1
|
|
200
|
-
})
|
|
201
|
-
], 34),
|
|
202
|
-
t("span", fe, v(L.value), 1)
|
|
203
|
-
], 16);
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
});
|
|
1
|
+
import o from "./HysTransfer2.vue.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0d8bcb72"]]);
|
|
207
5
|
export {
|
|
208
|
-
|
|
6
|
+
f as default
|
|
209
7
|
};
|
|
@@ -1,4 +1,418 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as we, ref as L, useId as Te, provide as pe, computed as R, watch as ze, onDeactivated as $e, onBeforeUnmount as De, openBlock as y, createElementBlock as S, mergeProps as v, unref as r, Fragment as _, renderList as Be, normalizeStyle as Ee, renderSlot as u, createVNode as H, withCtx as m, toDisplayString as $, createCommentVNode as D, createBlock as Ke, createSlots as Pe, createTextVNode as Le, createElementVNode as He, nextTick as Ve } from "vue";
|
|
2
|
+
import { ChevronRight as Ae, ChevronLeft as Ie } from "lucide-vue-next";
|
|
3
|
+
import ee from "../HysButton/HysButton.vue.js";
|
|
4
|
+
import Ne from "./HysTransferPanel.vue.js";
|
|
5
|
+
import { useHysRootAttrs as Re } from "../../config.js";
|
|
6
|
+
import { useHysFormItemContext as We, useHysControlState as Fe, fieldKey as Oe } from "../../composables/formContext.js";
|
|
7
|
+
import { useTransfer as qe } from "../../composables/useTransfer.js";
|
|
8
|
+
import { transferLabel as Me } from "../../composables/transfer.js";
|
|
9
|
+
const je = ["id", "data-size", "aria-label", "aria-invalid", "aria-describedby", "aria-busy"], Ue = { key: 0 }, Ge = { key: 0 }, Je = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "hys-ui-transfer-drag-count",
|
|
12
|
+
"aria-hidden": "true"
|
|
13
|
+
}, Qe = {
|
|
14
|
+
class: "hys-ui-pf-transfer-status",
|
|
15
|
+
role: "status",
|
|
16
|
+
"aria-live": "polite"
|
|
17
|
+
}, rt = /* @__PURE__ */ we({
|
|
18
|
+
__name: "HysTransfer",
|
|
19
|
+
props: {
|
|
20
|
+
options: {},
|
|
21
|
+
modelValue: {},
|
|
22
|
+
defaultValue: {},
|
|
23
|
+
fieldNames: {},
|
|
24
|
+
rowKey: {},
|
|
25
|
+
disabled: { type: Boolean },
|
|
26
|
+
loading: { type: Boolean },
|
|
27
|
+
filterable: { type: Boolean, default: !0 },
|
|
28
|
+
filterMethod: {},
|
|
29
|
+
filterPlaceholder: {},
|
|
30
|
+
searchValues: {},
|
|
31
|
+
titles: {},
|
|
32
|
+
buttonTexts: {},
|
|
33
|
+
showSelectAll: { type: Boolean, default: !0 },
|
|
34
|
+
showInvert: { type: Boolean },
|
|
35
|
+
checkedKeys: {},
|
|
36
|
+
defaultCheckedKeys: {},
|
|
37
|
+
leftDefaultChecked: {},
|
|
38
|
+
rightDefaultChecked: {},
|
|
39
|
+
targetOrder: { default: "original" },
|
|
40
|
+
oneWay: { type: Boolean },
|
|
41
|
+
draggable: { type: Boolean, default: !0 },
|
|
42
|
+
dragChecked: { type: Boolean, default: !0 },
|
|
43
|
+
animated: { type: Boolean, default: !0 },
|
|
44
|
+
size: {},
|
|
45
|
+
listHeight: { default: 240 },
|
|
46
|
+
listStyle: {},
|
|
47
|
+
operationStyle: {},
|
|
48
|
+
status: {},
|
|
49
|
+
pagination: { type: [Boolean, Object] },
|
|
50
|
+
pages: {},
|
|
51
|
+
pageSizes: {},
|
|
52
|
+
virtual: { type: Boolean },
|
|
53
|
+
itemHeight: { default: 36 },
|
|
54
|
+
overscan: { default: 4 },
|
|
55
|
+
locale: {},
|
|
56
|
+
format: {},
|
|
57
|
+
renderContent: {},
|
|
58
|
+
ariaLabel: {},
|
|
59
|
+
validateEvent: { type: Boolean, default: !0 }
|
|
60
|
+
},
|
|
61
|
+
emits: ["update:modelValue", "change", "update:checkedKeys", "checkChange", "selectChange", "update:searchValues", "search", "update:pages", "pageChange", "update:pageSizes", "pageSizeChange", "scroll", "dragStart", "dragEnd", "focus", "blur"],
|
|
62
|
+
setup(o, { expose: te, emit: ae }) {
|
|
63
|
+
const i = o, W = (e) => e === "left" ? "left-empty" : "right-empty", F = (e) => e === "left" ? "left-footer" : "right-footer", C = ae, re = Re(), B = L(), O = Te(), k = We(), w = Fe(i);
|
|
64
|
+
pe(Oe, void 0);
|
|
65
|
+
const s = qe(
|
|
66
|
+
i,
|
|
67
|
+
w.disabled,
|
|
68
|
+
(e, ...t) => C(e, ...t),
|
|
69
|
+
() => {
|
|
70
|
+
k.validate("change");
|
|
71
|
+
}
|
|
72
|
+
), {
|
|
73
|
+
live: q,
|
|
74
|
+
busy: d,
|
|
75
|
+
keys: le,
|
|
76
|
+
checked: oe,
|
|
77
|
+
words: b,
|
|
78
|
+
all: M,
|
|
79
|
+
filtered: V,
|
|
80
|
+
visible: j,
|
|
81
|
+
pages: U,
|
|
82
|
+
pageSizes: G,
|
|
83
|
+
pagination: ie,
|
|
84
|
+
searchValues: J,
|
|
85
|
+
announcement: se,
|
|
86
|
+
getCheckedKeys: f,
|
|
87
|
+
check: Q,
|
|
88
|
+
checkAll: E,
|
|
89
|
+
invertSelection: X,
|
|
90
|
+
move: h,
|
|
91
|
+
setSearch: Y,
|
|
92
|
+
setPage: A,
|
|
93
|
+
setPageSize: Z
|
|
94
|
+
} = s, ne = ["left", "right"], de = R(() => {
|
|
95
|
+
var e, t;
|
|
96
|
+
return {
|
|
97
|
+
left: ((e = i.titles) == null ? void 0 : e[0]) ?? b.value.leftTitle,
|
|
98
|
+
right: ((t = i.titles) == null ? void 0 : t[1]) ?? b.value.rightTitle
|
|
99
|
+
};
|
|
100
|
+
}), ue = R(
|
|
101
|
+
() => ne.map((e) => ({ side: e, title: de.value[e] }))
|
|
102
|
+
), n = L([]), T = L(), K = L();
|
|
103
|
+
let I = !1;
|
|
104
|
+
const P = /* @__PURE__ */ new Map();
|
|
105
|
+
function fe(e, t) {
|
|
106
|
+
t ? P.set(
|
|
107
|
+
e,
|
|
108
|
+
t
|
|
109
|
+
) : P.delete(e);
|
|
110
|
+
}
|
|
111
|
+
function ge(e) {
|
|
112
|
+
var t;
|
|
113
|
+
return typeof i.filterPlaceholder == "string" ? i.filterPlaceholder : ((t = i.filterPlaceholder) == null ? void 0 : t[e === "left" ? 0 : 1]) ?? b.value.search;
|
|
114
|
+
}
|
|
115
|
+
function p(e) {
|
|
116
|
+
return {
|
|
117
|
+
side: e,
|
|
118
|
+
items: j.value[e].map((t) => t.option),
|
|
119
|
+
filteredItems: V.value[e].map((t) => t.option),
|
|
120
|
+
checkedKeys: f(e),
|
|
121
|
+
disabled: d.value,
|
|
122
|
+
query: J.value[e],
|
|
123
|
+
check: (t, a) => s.targetSet.value.has(t) === (e === "right") ? Q(t, a) : Promise.resolve(!1),
|
|
124
|
+
setCheckedKeys: (t) => s.setCheckedKeys([
|
|
125
|
+
...f(e === "left" ? "right" : "left"),
|
|
126
|
+
...t.filter(
|
|
127
|
+
(a) => s.targetSet.value.has(a) === (e === "right")
|
|
128
|
+
)
|
|
129
|
+
]),
|
|
130
|
+
checkAll: (t = !0) => E(e, t),
|
|
131
|
+
remove: (t) => h("left", t)
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function g() {
|
|
135
|
+
const e = I;
|
|
136
|
+
n.value = [], T.value = void 0, K.value = void 0, I = !1, window.removeEventListener("keydown", x), window.removeEventListener("blur", g), e && q.value && C("dragEnd");
|
|
137
|
+
}
|
|
138
|
+
function x(e) {
|
|
139
|
+
e.key === "Escape" && g();
|
|
140
|
+
}
|
|
141
|
+
function ce(e, t, a) {
|
|
142
|
+
const c = s.data.value.map.get(a);
|
|
143
|
+
if (d.value || !i.draggable || c != null && c.disabled || !c || i.oneWay && t === "right" || !e.dataTransfer) {
|
|
144
|
+
e.preventDefault();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
g(), n.value = i.dragChecked && s.checkedSet.value.has(a) ? f(t) : [a], T.value = t, I = !0, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData(
|
|
148
|
+
"text/plain",
|
|
149
|
+
n.value.map(String).join(", ")
|
|
150
|
+
), e.dataTransfer.setData("application/x-hys-ui-transfer", O), window.addEventListener("keydown", x), window.addEventListener("blur", g), C("dragStart", t, [...n.value], e);
|
|
151
|
+
}
|
|
152
|
+
const ve = R(
|
|
153
|
+
() => !d.value && !!i.draggable && n.value.length > 0 && !(i.oneWay && T.value === "right") && n.value.every((e) => {
|
|
154
|
+
const t = s.data.value.map.get(e);
|
|
155
|
+
return t && !t.disabled && s.targetSet.value.has(e) === (T.value === "right");
|
|
156
|
+
})
|
|
157
|
+
);
|
|
158
|
+
function N(e) {
|
|
159
|
+
return ve.value && T.value !== e;
|
|
160
|
+
}
|
|
161
|
+
function he(e, t) {
|
|
162
|
+
N(t) && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), K.value = t);
|
|
163
|
+
}
|
|
164
|
+
function ye(e) {
|
|
165
|
+
e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget) || (K.value = void 0);
|
|
166
|
+
}
|
|
167
|
+
function me(e, t) {
|
|
168
|
+
N(t) && (e.preventDefault(), h(t, [...n.value])), g();
|
|
169
|
+
}
|
|
170
|
+
ze(
|
|
171
|
+
() => [
|
|
172
|
+
d.value,
|
|
173
|
+
i.draggable,
|
|
174
|
+
i.oneWay,
|
|
175
|
+
s.data.value,
|
|
176
|
+
s.keys.value
|
|
177
|
+
],
|
|
178
|
+
() => {
|
|
179
|
+
n.value.length && (d.value || !i.draggable || !N(T.value === "left" ? "right" : "left")) && g();
|
|
180
|
+
},
|
|
181
|
+
{ flush: "sync" }
|
|
182
|
+
), $e(g), De(g);
|
|
183
|
+
function ke(e = "left") {
|
|
184
|
+
var t;
|
|
185
|
+
d.value || (t = P.get(e)) == null || t.focus();
|
|
186
|
+
}
|
|
187
|
+
async function be(e, t) {
|
|
188
|
+
var a;
|
|
189
|
+
if (q.value) {
|
|
190
|
+
if (t.key !== void 0 && i.pagination) {
|
|
191
|
+
const c = V.value[e].findIndex(
|
|
192
|
+
(z) => z.key === t.key
|
|
193
|
+
);
|
|
194
|
+
if (c < 0) return;
|
|
195
|
+
const l = Math.floor(c / G.value[e]) + 1;
|
|
196
|
+
if (A(e, l), await Ve(), U.value[e] !== l) return;
|
|
197
|
+
}
|
|
198
|
+
await ((a = P.get(e)) == null ? void 0 : a.scrollTo(t));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function Se(e) {
|
|
202
|
+
var t;
|
|
203
|
+
e.relatedTarget instanceof Node && ((t = B.value) != null && t.contains(e.relatedTarget)) || (C("blur", e), i.validateEvent && !w.disabled.value && k.validate("blur"));
|
|
204
|
+
}
|
|
205
|
+
function Ce(e) {
|
|
206
|
+
var t;
|
|
207
|
+
e.relatedTarget instanceof Node && ((t = B.value) != null && t.contains(e.relatedTarget)) || C("focus", e);
|
|
208
|
+
}
|
|
209
|
+
return te({
|
|
210
|
+
element: B,
|
|
211
|
+
targetKeys: le,
|
|
212
|
+
checkedKeys: oe,
|
|
213
|
+
getCheckedKeys: f,
|
|
214
|
+
getTargetItems: () => M.value.right.map((e) => e.option),
|
|
215
|
+
move: h,
|
|
216
|
+
remove: (e) => h("left", e),
|
|
217
|
+
setCheckedKeys: s.setCheckedKeys,
|
|
218
|
+
clearChecked: s.clearChecked,
|
|
219
|
+
checkAll: E,
|
|
220
|
+
invertSelection: X,
|
|
221
|
+
setSearch: Y,
|
|
222
|
+
clearSearch: s.clearSearch,
|
|
223
|
+
setPage: A,
|
|
224
|
+
setPageSize: Z,
|
|
225
|
+
scrollTo: be,
|
|
226
|
+
focus: ke
|
|
227
|
+
}), (e, t) => (y(), S("div", v({
|
|
228
|
+
id: r(k).id.value,
|
|
229
|
+
ref_key: "element",
|
|
230
|
+
ref: B
|
|
231
|
+
}, r(re), {
|
|
232
|
+
class: ["hys-ui-v4-transfer hys-ui-pf-transfer hys-ui-transfer", {
|
|
233
|
+
"hys-ui-transfer-error": o.status === "error" || r(k).invalid.value,
|
|
234
|
+
"hys-ui-transfer-warning": o.status === "warning"
|
|
235
|
+
}],
|
|
236
|
+
"data-size": r(w).size.value,
|
|
237
|
+
role: "group",
|
|
238
|
+
"aria-label": o.ariaLabel || r(k).label.value || "穿梭选择",
|
|
239
|
+
"aria-invalid": o.status === "error" || r(k).invalid.value || void 0,
|
|
240
|
+
"aria-describedby": r(k).describedBy.value,
|
|
241
|
+
"aria-busy": o.loading || void 0,
|
|
242
|
+
onFocusin: Ce,
|
|
243
|
+
onFocusout: Se
|
|
244
|
+
}), [
|
|
245
|
+
(y(!0), S(_, null, Be(ue.value, (a, c) => (y(), S(_, {
|
|
246
|
+
key: a.side
|
|
247
|
+
}, [
|
|
248
|
+
c === 1 ? (y(), S("div", {
|
|
249
|
+
key: 0,
|
|
250
|
+
class: "hys-ui-v4-move",
|
|
251
|
+
style: Ee(o.operationStyle)
|
|
252
|
+
}, [
|
|
253
|
+
u(e.$slots, "operations", {
|
|
254
|
+
move: r(h),
|
|
255
|
+
disabled: r(d),
|
|
256
|
+
leftChecked: r(f)("left"),
|
|
257
|
+
rightChecked: r(f)("right")
|
|
258
|
+
}, () => [
|
|
259
|
+
H(ee, {
|
|
260
|
+
variant: "secondary",
|
|
261
|
+
size: r(w).size.value === "lg" ? "md" : "sm",
|
|
262
|
+
class: "hys-ui-transfer-move",
|
|
263
|
+
disabled: r(d) || !r(f)("left").length,
|
|
264
|
+
"aria-label": r(b).moveRight,
|
|
265
|
+
onClick: t[0] || (t[0] = (l) => r(h)("right"))
|
|
266
|
+
}, {
|
|
267
|
+
default: m(() => {
|
|
268
|
+
var l;
|
|
269
|
+
return [
|
|
270
|
+
H(r(Ae), {
|
|
271
|
+
size: 16,
|
|
272
|
+
"aria-hidden": "true"
|
|
273
|
+
}),
|
|
274
|
+
(l = o.buttonTexts) != null && l[0] ? (y(), S("span", Ue, $(o.buttonTexts[0]), 1)) : D("", !0)
|
|
275
|
+
];
|
|
276
|
+
}),
|
|
277
|
+
_: 1
|
|
278
|
+
}, 8, ["size", "disabled", "aria-label"]),
|
|
279
|
+
o.oneWay ? D("", !0) : (y(), Ke(ee, {
|
|
280
|
+
key: 0,
|
|
281
|
+
variant: "secondary",
|
|
282
|
+
size: r(w).size.value === "lg" ? "md" : "sm",
|
|
283
|
+
class: "hys-ui-transfer-move",
|
|
284
|
+
disabled: r(d) || !r(f)("right").length,
|
|
285
|
+
"aria-label": r(b).moveLeft,
|
|
286
|
+
onClick: t[1] || (t[1] = (l) => r(h)("left"))
|
|
287
|
+
}, {
|
|
288
|
+
default: m(() => {
|
|
289
|
+
var l;
|
|
290
|
+
return [
|
|
291
|
+
H(r(Ie), {
|
|
292
|
+
size: 16,
|
|
293
|
+
"aria-hidden": "true"
|
|
294
|
+
}),
|
|
295
|
+
(l = o.buttonTexts) != null && l[1] ? (y(), S("span", Ge, $(o.buttonTexts[1]), 1)) : D("", !0)
|
|
296
|
+
];
|
|
297
|
+
}),
|
|
298
|
+
_: 1
|
|
299
|
+
}, 8, ["size", "disabled", "aria-label"]))
|
|
300
|
+
], !0),
|
|
301
|
+
n.value.length > 1 ? (y(), S("span", Je, $(n.value.length), 1)) : D("", !0)
|
|
302
|
+
], 4)) : D("", !0),
|
|
303
|
+
H(Ne, {
|
|
304
|
+
ref_for: !0,
|
|
305
|
+
ref: (l) => fe(a.side, l),
|
|
306
|
+
id: r(O) + "-" + a.side,
|
|
307
|
+
side: a.side,
|
|
308
|
+
title: a.title,
|
|
309
|
+
items: r(j)[a.side],
|
|
310
|
+
total: r(M)[a.side].length,
|
|
311
|
+
filtered: r(V)[a.side].length,
|
|
312
|
+
"checked-keys": r(f)(a.side),
|
|
313
|
+
busy: r(d),
|
|
314
|
+
loading: o.loading,
|
|
315
|
+
filterable: o.filterable,
|
|
316
|
+
query: r(J)[a.side],
|
|
317
|
+
placeholder: ge(a.side),
|
|
318
|
+
"show-select-all": o.showSelectAll,
|
|
319
|
+
"show-invert": !!o.showInvert,
|
|
320
|
+
"one-way": !!o.oneWay,
|
|
321
|
+
size: r(w).size.value,
|
|
322
|
+
"list-height": o.listHeight,
|
|
323
|
+
"item-height": o.itemHeight,
|
|
324
|
+
overscan: o.overscan,
|
|
325
|
+
virtual: !!o.virtual,
|
|
326
|
+
animated: o.animated,
|
|
327
|
+
draggable: o.draggable,
|
|
328
|
+
"dragged-keys": n.value,
|
|
329
|
+
"drop-target": K.value === a.side,
|
|
330
|
+
words: r(b),
|
|
331
|
+
page: r(U)[a.side],
|
|
332
|
+
"page-size": r(G)[a.side],
|
|
333
|
+
pagination: i.pagination ? r(ie) : !1,
|
|
334
|
+
"list-style": o.listStyle,
|
|
335
|
+
format: o.format,
|
|
336
|
+
"render-content": o.renderContent,
|
|
337
|
+
onCheck: r(Q),
|
|
338
|
+
onCheckAll: (l) => r(E)(a.side, l),
|
|
339
|
+
onInvert: (l) => r(X)(a.side),
|
|
340
|
+
onSearch: (l) => r(Y)(a.side, l),
|
|
341
|
+
onRemove: t[2] || (t[2] = (l) => r(h)("left", [l])),
|
|
342
|
+
onPage: (l) => r(A)(a.side, l),
|
|
343
|
+
onPageSize: (l) => r(Z)(a.side, l),
|
|
344
|
+
onDragStart: (l, z) => ce(l, a.side, z),
|
|
345
|
+
onDragEnd: g,
|
|
346
|
+
onDragOver: (l) => he(l, a.side),
|
|
347
|
+
onDragLeave: ye,
|
|
348
|
+
onDrop: (l) => me(l, a.side),
|
|
349
|
+
onScroll: (l) => C("scroll", a.side, l)
|
|
350
|
+
}, Pe({ _: 2 }, [
|
|
351
|
+
e.$slots.option || e.$slots.default ? {
|
|
352
|
+
name: "option",
|
|
353
|
+
fn: m((l) => [
|
|
354
|
+
u(e.$slots, "option", v({ ref_for: !0 }, l, {
|
|
355
|
+
side: a.side
|
|
356
|
+
}), () => [
|
|
357
|
+
u(e.$slots, "default", v({ ref_for: !0 }, l, {
|
|
358
|
+
side: a.side
|
|
359
|
+
}), () => [
|
|
360
|
+
Le($(l.label), 1)
|
|
361
|
+
], !0)
|
|
362
|
+
], !0)
|
|
363
|
+
]),
|
|
364
|
+
key: "0"
|
|
365
|
+
} : void 0,
|
|
366
|
+
e.$slots.header ? {
|
|
367
|
+
name: "header",
|
|
368
|
+
fn: m((l) => [
|
|
369
|
+
u(e.$slots, "header", v({ ref_for: !0 }, l, {
|
|
370
|
+
side: a.side,
|
|
371
|
+
checkAll: (z = !0) => r(E)(a.side, z)
|
|
372
|
+
}), void 0, !0)
|
|
373
|
+
]),
|
|
374
|
+
key: "1"
|
|
375
|
+
} : void 0,
|
|
376
|
+
e.$slots.panel ? {
|
|
377
|
+
name: "panel",
|
|
378
|
+
fn: m(() => [
|
|
379
|
+
u(e.$slots, "panel", v({ ref_for: !0 }, p(a.side)), void 0, !0)
|
|
380
|
+
]),
|
|
381
|
+
key: "2"
|
|
382
|
+
} : void 0,
|
|
383
|
+
e.$slots[W(a.side)] || e.$slots.empty ? {
|
|
384
|
+
name: "empty",
|
|
385
|
+
fn: m(() => [
|
|
386
|
+
u(e.$slots, W(a.side), v({ ref_for: !0 }, p(a.side)), () => [
|
|
387
|
+
u(e.$slots, "empty", v({ ref_for: !0 }, p(a.side)), void 0, !0)
|
|
388
|
+
], !0)
|
|
389
|
+
]),
|
|
390
|
+
key: "3"
|
|
391
|
+
} : void 0,
|
|
392
|
+
e.$slots[F(a.side)] || e.$slots.footer ? {
|
|
393
|
+
name: "footer",
|
|
394
|
+
fn: m(() => [
|
|
395
|
+
u(e.$slots, F(a.side), v({ ref_for: !0 }, p(a.side)), () => [
|
|
396
|
+
u(e.$slots, "footer", v({ ref_for: !0 }, p(a.side)), void 0, !0)
|
|
397
|
+
], !0)
|
|
398
|
+
]),
|
|
399
|
+
key: "4"
|
|
400
|
+
} : void 0,
|
|
401
|
+
e.$slots.loading ? {
|
|
402
|
+
name: "loading",
|
|
403
|
+
fn: m(() => [
|
|
404
|
+
u(e.$slots, "loading", {
|
|
405
|
+
side: a.side
|
|
406
|
+
}, void 0, !0)
|
|
407
|
+
]),
|
|
408
|
+
key: "5"
|
|
409
|
+
} : void 0
|
|
410
|
+
]), 1032, ["id", "side", "title", "items", "total", "filtered", "checked-keys", "busy", "loading", "filterable", "query", "placeholder", "show-select-all", "show-invert", "one-way", "size", "list-height", "item-height", "overscan", "virtual", "animated", "draggable", "dragged-keys", "drop-target", "words", "page", "page-size", "pagination", "list-style", "format", "render-content", "onCheck", "onCheckAll", "onInvert", "onSearch", "onPage", "onPageSize", "onDragStart", "onDragOver", "onDrop", "onScroll"])
|
|
411
|
+
], 64))), 128)),
|
|
412
|
+
He("span", Qe, $(n.value.length ? r(Me)(r(b).dragCount, { count: n.value.length }) : r(se)), 1)
|
|
413
|
+
], 16, je));
|
|
414
|
+
}
|
|
415
|
+
});
|
|
2
416
|
export {
|
|
3
|
-
|
|
417
|
+
rt as default
|
|
4
418
|
};
|