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
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
import { defineComponent as ke, ref as D, computed as o, watch as V, onDeactivated as we, onBeforeUnmount as ze, onMounted as Se, onActivated as Te, nextTick as R, openBlock as s, createElementBlock as u, mergeProps as Ce, unref as g, createElementVNode as m, renderSlot as z, createBlock as k, withCtx as C, toDisplayString as f, createVNode as K, createCommentVNode as w, normalizeStyle as U, normalizeClass as ee, resolveDynamicComponent as xe, TransitionGroup as Me, Fragment as W, renderList as Be, createTextVNode as P, withModifiers as He } from "vue";
|
|
2
|
+
import { Search as Ae, X as De, GripVertical as Ke, LoaderCircle as qe } from "lucide-vue-next";
|
|
3
|
+
import te from "../HysCheckbox/HysCheckbox.vue.js";
|
|
4
|
+
import ae from "../HysButton/HysButton.vue.js";
|
|
5
|
+
import $e from "../HysInput/HysInput.vue.js";
|
|
6
|
+
import Pe from "../HysPagination/HysPagination.vue.js";
|
|
7
|
+
import { useHysRootAttrs as Ee } from "../../config.js";
|
|
8
|
+
import { transferLabel as le, transferToken as q } from "../../composables/transfer.js";
|
|
9
|
+
const Fe = ["data-side", "aria-label", "aria-busy"], Le = { class: "hys-ui-pf-transfer-header" }, Ie = ["id"], Ne = ["id"], Oe = { class: "hys-ui-transfer-count" }, Ve = { class: "hys-ui-transfer-body" }, Re = ["aria-label"], Ue = ["data-transfer-key", "draggable", "title", "onDragstart"], We = { class: "hys-ui-transfer-label" }, Ge = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "hys-ui-transfer-label"
|
|
12
|
+
}, je = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "hys-ui-pf-transfer-empty"
|
|
15
|
+
}, Xe = ["aria-label"], Je = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "hys-ui-transfer-extra"
|
|
18
|
+
}, Qe = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "hys-ui-transfer-filter-count"
|
|
21
|
+
}, Ye = {
|
|
22
|
+
key: 2,
|
|
23
|
+
class: "hys-ui-transfer-pagination"
|
|
24
|
+
}, Ze = {
|
|
25
|
+
key: 3,
|
|
26
|
+
class: "hys-ui-transfer-footer"
|
|
27
|
+
}, st = /* @__PURE__ */ ke({
|
|
28
|
+
__name: "HysTransferPanel",
|
|
29
|
+
props: {
|
|
30
|
+
side: {},
|
|
31
|
+
title: {},
|
|
32
|
+
id: {},
|
|
33
|
+
items: {},
|
|
34
|
+
total: {},
|
|
35
|
+
filtered: {},
|
|
36
|
+
checkedKeys: {},
|
|
37
|
+
busy: { type: Boolean },
|
|
38
|
+
loading: { type: Boolean },
|
|
39
|
+
filterable: { type: Boolean },
|
|
40
|
+
query: {},
|
|
41
|
+
placeholder: {},
|
|
42
|
+
showSelectAll: { type: Boolean },
|
|
43
|
+
showInvert: { type: Boolean },
|
|
44
|
+
oneWay: { type: Boolean },
|
|
45
|
+
size: {},
|
|
46
|
+
listHeight: {},
|
|
47
|
+
itemHeight: {},
|
|
48
|
+
overscan: {},
|
|
49
|
+
virtual: { type: Boolean },
|
|
50
|
+
animated: { type: Boolean },
|
|
51
|
+
draggable: { type: Boolean },
|
|
52
|
+
draggedKeys: {},
|
|
53
|
+
dropTarget: { type: Boolean },
|
|
54
|
+
words: {},
|
|
55
|
+
page: {},
|
|
56
|
+
pageSize: {},
|
|
57
|
+
pagination: { type: [Object, Boolean] },
|
|
58
|
+
listStyle: {},
|
|
59
|
+
format: { type: Function },
|
|
60
|
+
renderContent: { type: Function }
|
|
61
|
+
},
|
|
62
|
+
emits: ["check", "checkAll", "invert", "search", "remove", "page", "pageSize", "dragStart", "dragEnd", "dragOver", "dragLeave", "drop", "scroll"],
|
|
63
|
+
setup(e, { expose: ie, emit: ne }) {
|
|
64
|
+
const a = e, d = ne, G = Ee(), n = D(), j = D(), X = D(), h = D(0), x = D(0);
|
|
65
|
+
let S = 0, y = !0, M = 0, E = 0, v;
|
|
66
|
+
function F() {
|
|
67
|
+
v == null || v.disconnect(), v = void 0, !(!y || !a.virtual || !n.value) && (x.value = n.value.clientHeight, typeof ResizeObserver < "u" && (v = new ResizeObserver(() => {
|
|
68
|
+
y && n.value && (x.value = n.value.clientHeight);
|
|
69
|
+
}), v.observe(n.value)));
|
|
70
|
+
}
|
|
71
|
+
const $ = o(() => new Set(a.checkedKeys)), se = o(() => new Set(a.draggedKeys)), B = o(() => a.items.filter((l) => !l.disabled)), L = o(() => !a.oneWay || a.side === "left"), J = o(
|
|
72
|
+
() => B.value.filter((l) => $.value.has(l.key)).length
|
|
73
|
+
), I = o(
|
|
74
|
+
() => !!B.value.length && J.value === B.value.length
|
|
75
|
+
), Q = o(() => J.value > 0 && !I.value), N = o(() => ({
|
|
76
|
+
side: a.side,
|
|
77
|
+
total: a.total,
|
|
78
|
+
filtered: a.filtered,
|
|
79
|
+
checked: a.checkedKeys.length
|
|
80
|
+
})), H = o(
|
|
81
|
+
() => Number.isFinite(a.listHeight) ? Math.max(80, Math.min(2e3, a.listHeight)) : 240
|
|
82
|
+
), c = o(
|
|
83
|
+
() => Number.isFinite(a.itemHeight) ? Math.max(24, Math.min(200, a.itemHeight)) : 36
|
|
84
|
+
), Y = o(
|
|
85
|
+
() => Number.isFinite(a.overscan) ? Math.max(0, Math.min(30, Math.floor(a.overscan))) : 4
|
|
86
|
+
), Z = o(
|
|
87
|
+
() => a.virtual ? Math.max(
|
|
88
|
+
0,
|
|
89
|
+
Math.min(
|
|
90
|
+
Math.max(0, a.items.length - 1),
|
|
91
|
+
Math.floor(h.value / c.value) - Y.value
|
|
92
|
+
)
|
|
93
|
+
) : 0
|
|
94
|
+
), re = o(
|
|
95
|
+
() => a.virtual ? Math.min(
|
|
96
|
+
a.items.length,
|
|
97
|
+
Math.ceil(
|
|
98
|
+
(h.value + (x.value || H.value)) / c.value
|
|
99
|
+
) + Y.value
|
|
100
|
+
) : a.items.length
|
|
101
|
+
), oe = o(() => a.items.slice(Z.value, re.value)), O = o(
|
|
102
|
+
() => a.animated && !a.virtual && a.items.length <= 100 && G.value["data-hys-motion"] !== "off"
|
|
103
|
+
), p = (l) => {
|
|
104
|
+
var i;
|
|
105
|
+
return ((i = a.renderContent) == null ? void 0 : i.call(a, l.item, a.side)) ?? "";
|
|
106
|
+
};
|
|
107
|
+
function de(l) {
|
|
108
|
+
const i = l;
|
|
109
|
+
i.inert = !0, i.setAttribute("aria-hidden", "true");
|
|
110
|
+
}
|
|
111
|
+
function ue(l) {
|
|
112
|
+
const i = l;
|
|
113
|
+
i.inert = !1, i.removeAttribute("aria-hidden");
|
|
114
|
+
}
|
|
115
|
+
function ce(l) {
|
|
116
|
+
var i;
|
|
117
|
+
!y || !((i = n.value) != null && i.isConnected) || (M = n.value.scrollTop, d("scroll", l), !(!a.virtual || S) && (S = requestAnimationFrame(() => {
|
|
118
|
+
S = 0, y && n.value && (h.value = n.value.scrollTop);
|
|
119
|
+
})));
|
|
120
|
+
}
|
|
121
|
+
function ve() {
|
|
122
|
+
M = 0, h.value = 0, n.value && (n.value.scrollTop = 0);
|
|
123
|
+
}
|
|
124
|
+
V(() => [a.query, a.page, a.pageSize, a.virtual], ve), V(
|
|
125
|
+
() => a.items.length,
|
|
126
|
+
() => {
|
|
127
|
+
n.value && h.value > a.items.length * c.value && (n.value.scrollTop = Math.max(
|
|
128
|
+
0,
|
|
129
|
+
a.items.length * c.value - H.value
|
|
130
|
+
), h.value = n.value.scrollTop);
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
async function fe(l) {
|
|
134
|
+
var r, T;
|
|
135
|
+
const i = a.items[l];
|
|
136
|
+
if (!i) return;
|
|
137
|
+
if (a.virtual && n.value) {
|
|
138
|
+
const b = l * c.value;
|
|
139
|
+
b < n.value.scrollTop ? n.value.scrollTop = b : b + c.value > n.value.scrollTop + (x.value || H.value) && (n.value.scrollTop = b + c.value - (x.value || H.value)), h.value = n.value.scrollTop, M = n.value.scrollTop;
|
|
140
|
+
}
|
|
141
|
+
if (await R(), !y) return;
|
|
142
|
+
const t = [
|
|
143
|
+
...((r = n.value) == null ? void 0 : r.querySelectorAll("[data-transfer-key]")) ?? []
|
|
144
|
+
].find((b) => b.dataset.transferKey === q(i.key));
|
|
145
|
+
(T = t == null ? void 0 : t.querySelector("input:not(:disabled),button:not(:disabled)")) == null || T.focus({ preventScroll: a.virtual });
|
|
146
|
+
}
|
|
147
|
+
function he(l) {
|
|
148
|
+
const i = l.target;
|
|
149
|
+
if (!i.matches('input[type="checkbox"]') && !i.closest(".hys-ui-transfer-remove") || a.busy || !["ArrowUp", "ArrowDown", "Home", "End"].includes(l.key))
|
|
150
|
+
return;
|
|
151
|
+
const t = l.target.closest(
|
|
152
|
+
"[data-transfer-key]"
|
|
153
|
+
);
|
|
154
|
+
if (!t) return;
|
|
155
|
+
const r = a.items.map((A, me) => ({ item: A, index: me })).filter((A) => !A.item.disabled);
|
|
156
|
+
if (!r.length) return;
|
|
157
|
+
l.preventDefault();
|
|
158
|
+
const T = r.findIndex(
|
|
159
|
+
(A) => q(A.item.key) === t.dataset.transferKey
|
|
160
|
+
), b = l.key === "Home" ? 0 : l.key === "End" ? r.length - 1 : Math.max(
|
|
161
|
+
0,
|
|
162
|
+
Math.min(
|
|
163
|
+
r.length - 1,
|
|
164
|
+
T + (l.key === "ArrowDown" ? 1 : -1)
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
fe(r[b].index);
|
|
168
|
+
}
|
|
169
|
+
function _() {
|
|
170
|
+
y = !1, E++, v == null || v.disconnect(), v = void 0, S && cancelAnimationFrame(S), S = 0;
|
|
171
|
+
}
|
|
172
|
+
we(_), ze(_), Se(F), V(() => a.virtual, F, { flush: "post" }), Te(() => {
|
|
173
|
+
y = !0;
|
|
174
|
+
const l = ++E;
|
|
175
|
+
R(() => {
|
|
176
|
+
!y || l !== E || !n.value || (n.value.scrollTop = M, h.value = n.value.scrollTop, F());
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
async function ye(l) {
|
|
180
|
+
if (!y || !n.value) return;
|
|
181
|
+
let i = l.top;
|
|
182
|
+
if (l.key !== void 0) {
|
|
183
|
+
const t = a.items.findIndex((r) => r.key === l.key);
|
|
184
|
+
if (t < 0) return;
|
|
185
|
+
if (a.virtual) i = t * c.value;
|
|
186
|
+
else {
|
|
187
|
+
await R();
|
|
188
|
+
const r = [
|
|
189
|
+
...n.value.querySelectorAll("[data-transfer-key]")
|
|
190
|
+
].find((T) => T.dataset.transferKey === q(l.key));
|
|
191
|
+
r && (i = r.offsetTop);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
i !== void 0 && Number.isFinite(i) && (n.value.scrollTo({ top: i, behavior: l.behavior ?? "auto" }), M = n.value.scrollTop, a.virtual && (h.value = n.value.scrollTop));
|
|
195
|
+
}
|
|
196
|
+
function ge() {
|
|
197
|
+
var l, i, t;
|
|
198
|
+
a.busy || (a.filterable ? (l = j.value) == null || l.focus() : (t = (i = X.value) == null ? void 0 : i.querySelector("input:not(:disabled),button:not(:disabled)")) == null || t.focus());
|
|
199
|
+
}
|
|
200
|
+
function be(l) {
|
|
201
|
+
l.key === "Enter" && !l.isComposing && l.keyCode !== 229 && l.preventDefault();
|
|
202
|
+
}
|
|
203
|
+
return ie({ scrollTo: ye, focus: ge }), (l, i) => (s(), u("section", Ce({
|
|
204
|
+
ref_key: "element",
|
|
205
|
+
ref: X
|
|
206
|
+
}, g(G), {
|
|
207
|
+
class: ["hys-ui-v4-pane hys-ui-transfer-pane", { "hys-ui-is-drop-target": e.dropTarget }],
|
|
208
|
+
"data-side": e.side,
|
|
209
|
+
"aria-label": e.title,
|
|
210
|
+
"aria-busy": e.loading || void 0,
|
|
211
|
+
onDragover: i[6] || (i[6] = (t) => d("dragOver", t)),
|
|
212
|
+
onDragleave: i[7] || (i[7] = (t) => d("dragLeave", t)),
|
|
213
|
+
onDrop: i[8] || (i[8] = (t) => d("drop", t))
|
|
214
|
+
}), [
|
|
215
|
+
m("header", Le, [
|
|
216
|
+
z(l.$slots, "header", {
|
|
217
|
+
info: N.value,
|
|
218
|
+
allChecked: I.value,
|
|
219
|
+
indeterminate: Q.value
|
|
220
|
+
}, () => [
|
|
221
|
+
e.showSelectAll && L.value ? (s(), k(te, {
|
|
222
|
+
key: 0,
|
|
223
|
+
"model-value": I.value,
|
|
224
|
+
indeterminate: Q.value,
|
|
225
|
+
size: e.size,
|
|
226
|
+
disabled: e.busy || !B.value.length,
|
|
227
|
+
"aria-label": g(le)(e.words.selectAll, { title: e.title }),
|
|
228
|
+
onChange: i[0] || (i[0] = (t) => d("checkAll", t))
|
|
229
|
+
}, {
|
|
230
|
+
default: C(() => [
|
|
231
|
+
m("strong", {
|
|
232
|
+
id: e.id + "-title"
|
|
233
|
+
}, f(e.title), 9, Ie)
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, ["model-value", "indeterminate", "size", "disabled", "aria-label"])) : (s(), u("strong", {
|
|
237
|
+
key: 1,
|
|
238
|
+
id: e.id + "-title"
|
|
239
|
+
}, f(e.title), 9, Ne)),
|
|
240
|
+
m("span", Oe, f(e.format ? e.format(N.value) : e.checkedKeys.length ? e.checkedKeys.length + " / " + e.total : e.total), 1)
|
|
241
|
+
], !0)
|
|
242
|
+
]),
|
|
243
|
+
e.filterable ? (s(), k($e, {
|
|
244
|
+
key: 0,
|
|
245
|
+
ref_key: "searchInput",
|
|
246
|
+
ref: j,
|
|
247
|
+
class: "hys-ui-pf-transfer-search",
|
|
248
|
+
"model-value": e.query,
|
|
249
|
+
size: e.size,
|
|
250
|
+
placeholder: e.placeholder,
|
|
251
|
+
"aria-label": e.placeholder + " · " + e.title,
|
|
252
|
+
disabled: e.busy,
|
|
253
|
+
clearable: "",
|
|
254
|
+
"onUpdate:modelValue": i[1] || (i[1] = (t) => d("search", String(t))),
|
|
255
|
+
onKeydown: be
|
|
256
|
+
}, {
|
|
257
|
+
prefix: C(() => [
|
|
258
|
+
K(g(Ae), {
|
|
259
|
+
size: 14,
|
|
260
|
+
"aria-hidden": "true"
|
|
261
|
+
})
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}, 8, ["model-value", "size", "placeholder", "aria-label", "disabled"])) : w("", !0),
|
|
265
|
+
m("div", Ve, [
|
|
266
|
+
m("div", {
|
|
267
|
+
ref_key: "viewport",
|
|
268
|
+
ref: n,
|
|
269
|
+
class: ee(["hys-ui-pf-transfer-list", { "hys-ui-transfer-virtual": e.virtual }]),
|
|
270
|
+
style: U({
|
|
271
|
+
height: H.value + "px",
|
|
272
|
+
"--hys-ui-transfer-item-height": c.value + "px",
|
|
273
|
+
...e.listStyle
|
|
274
|
+
}),
|
|
275
|
+
role: "group",
|
|
276
|
+
"aria-label": e.title,
|
|
277
|
+
onScrollPassive: ce,
|
|
278
|
+
onKeydown: he
|
|
279
|
+
}, [
|
|
280
|
+
z(l.$slots, "panel", {}, () => [
|
|
281
|
+
m("div", {
|
|
282
|
+
class: "hys-ui-transfer-content",
|
|
283
|
+
style: U(
|
|
284
|
+
e.virtual ? {
|
|
285
|
+
height: e.items.length * c.value + "px",
|
|
286
|
+
position: "relative"
|
|
287
|
+
} : void 0
|
|
288
|
+
)
|
|
289
|
+
}, [
|
|
290
|
+
(s(), k(xe(O.value ? Me : "div"), {
|
|
291
|
+
name: O.value ? "hys-ui-transfer-motion" : void 0,
|
|
292
|
+
tag: O.value ? "div" : void 0,
|
|
293
|
+
class: "hys-ui-transfer-rows",
|
|
294
|
+
style: U(
|
|
295
|
+
e.virtual ? {
|
|
296
|
+
position: "absolute",
|
|
297
|
+
top: Z.value * c.value + "px",
|
|
298
|
+
left: 0,
|
|
299
|
+
right: 0
|
|
300
|
+
} : void 0
|
|
301
|
+
),
|
|
302
|
+
onBeforeLeave: de,
|
|
303
|
+
onBeforeEnter: ue
|
|
304
|
+
}, {
|
|
305
|
+
default: C(() => [
|
|
306
|
+
(s(!0), u(W, null, Be(oe.value, (t) => (s(), u("div", {
|
|
307
|
+
key: g(q)(t.key),
|
|
308
|
+
class: ee(["hys-ui-v4-option hys-ui-transfer-row", {
|
|
309
|
+
"hys-ui-is-checked": $.value.has(t.key),
|
|
310
|
+
"hys-ui-is-disabled": t.disabled,
|
|
311
|
+
"hys-ui-is-dragging": se.value.has(t.key)
|
|
312
|
+
}]),
|
|
313
|
+
"data-transfer-key": g(q)(t.key),
|
|
314
|
+
draggable: e.draggable && !e.busy && !t.disabled && !(e.oneWay && e.side === "right"),
|
|
315
|
+
title: t.disabled ? void 0 : e.side === "left" ? e.words.dragRight : e.words.dragLeft,
|
|
316
|
+
onDragstart: (r) => d("dragStart", r, t.key),
|
|
317
|
+
onDragend: i[2] || (i[2] = (r) => d("dragEnd"))
|
|
318
|
+
}, [
|
|
319
|
+
L.value ? (s(), k(te, {
|
|
320
|
+
key: 0,
|
|
321
|
+
class: "hys-ui-transfer-check",
|
|
322
|
+
size: e.size,
|
|
323
|
+
"model-value": $.value.has(t.key),
|
|
324
|
+
disabled: e.busy || t.disabled,
|
|
325
|
+
"aria-label": t.label,
|
|
326
|
+
onChange: (r) => d("check", t.key, r)
|
|
327
|
+
}, {
|
|
328
|
+
default: C(() => [
|
|
329
|
+
m("span", We, [
|
|
330
|
+
z(l.$slots, "option", {
|
|
331
|
+
option: t.option,
|
|
332
|
+
label: t.label,
|
|
333
|
+
checked: $.value.has(t.key),
|
|
334
|
+
disabled: e.busy || t.disabled
|
|
335
|
+
}, () => [
|
|
336
|
+
e.renderContent ? (s(), k(p, {
|
|
337
|
+
key: 0,
|
|
338
|
+
item: t.option
|
|
339
|
+
}, null, 8, ["item"])) : (s(), u(W, { key: 1 }, [
|
|
340
|
+
P(f(t.label), 1)
|
|
341
|
+
], 64))
|
|
342
|
+
], !0)
|
|
343
|
+
])
|
|
344
|
+
]),
|
|
345
|
+
_: 2
|
|
346
|
+
}, 1032, ["size", "model-value", "disabled", "aria-label", "onChange"])) : (s(), u("span", Ge, [
|
|
347
|
+
z(l.$slots, "option", {
|
|
348
|
+
option: t.option,
|
|
349
|
+
label: t.label,
|
|
350
|
+
checked: !1,
|
|
351
|
+
disabled: e.busy || t.disabled
|
|
352
|
+
}, () => [
|
|
353
|
+
e.renderContent ? (s(), k(p, {
|
|
354
|
+
key: 0,
|
|
355
|
+
item: t.option
|
|
356
|
+
}, null, 8, ["item"])) : (s(), u(W, { key: 1 }, [
|
|
357
|
+
P(f(t.label), 1)
|
|
358
|
+
], 64))
|
|
359
|
+
], !0)
|
|
360
|
+
])),
|
|
361
|
+
e.oneWay && e.side === "right" ? (s(), k(ae, {
|
|
362
|
+
key: 2,
|
|
363
|
+
variant: "ghost",
|
|
364
|
+
size: "sm",
|
|
365
|
+
class: "hys-ui-transfer-remove",
|
|
366
|
+
disabled: e.busy || t.disabled,
|
|
367
|
+
"aria-label": g(le)(e.words.remove, { label: t.label }),
|
|
368
|
+
onClick: He((r) => d("remove", t.key), ["stop"])
|
|
369
|
+
}, {
|
|
370
|
+
default: C(() => [
|
|
371
|
+
K(g(De), {
|
|
372
|
+
size: 14,
|
|
373
|
+
"aria-hidden": "true"
|
|
374
|
+
})
|
|
375
|
+
]),
|
|
376
|
+
_: 1
|
|
377
|
+
}, 8, ["disabled", "aria-label", "onClick"])) : e.draggable && !t.disabled ? (s(), k(g(Ke), {
|
|
378
|
+
key: 3,
|
|
379
|
+
class: "hys-ui-pf-transfer-grip",
|
|
380
|
+
size: 12,
|
|
381
|
+
"aria-hidden": "true"
|
|
382
|
+
})) : w("", !0)
|
|
383
|
+
], 42, Ue))), 128))
|
|
384
|
+
]),
|
|
385
|
+
_: 3
|
|
386
|
+
}, 40, ["name", "tag", "style"]))
|
|
387
|
+
], 4),
|
|
388
|
+
!e.items.length && !e.loading ? (s(), u("div", je, [
|
|
389
|
+
z(l.$slots, "empty", { query: e.query }, () => [
|
|
390
|
+
P(f(e.query ? e.words.noMatch : e.side === "left" ? e.words.emptyLeft : e.words.emptyRight), 1)
|
|
391
|
+
], !0)
|
|
392
|
+
])) : w("", !0)
|
|
393
|
+
], !0)
|
|
394
|
+
], 46, Re),
|
|
395
|
+
e.loading ? (s(), u("div", {
|
|
396
|
+
key: 0,
|
|
397
|
+
class: "hys-ui-transfer-loading",
|
|
398
|
+
role: "status",
|
|
399
|
+
"aria-label": e.words.loading
|
|
400
|
+
}, [
|
|
401
|
+
z(l.$slots, "loading", {}, () => [
|
|
402
|
+
K(g(qe), {
|
|
403
|
+
size: 18,
|
|
404
|
+
class: "hys-ui-icon-spin",
|
|
405
|
+
"aria-hidden": "true"
|
|
406
|
+
}),
|
|
407
|
+
m("span", null, f(e.words.loading), 1)
|
|
408
|
+
], !0)
|
|
409
|
+
], 8, Xe)) : w("", !0)
|
|
410
|
+
]),
|
|
411
|
+
e.showInvert && L.value ? (s(), u("div", Je, [
|
|
412
|
+
K(ae, {
|
|
413
|
+
variant: "ghost",
|
|
414
|
+
size: "sm",
|
|
415
|
+
disabled: e.busy || !B.value.length,
|
|
416
|
+
onClick: i[3] || (i[3] = (t) => d("invert"))
|
|
417
|
+
}, {
|
|
418
|
+
default: C(() => [
|
|
419
|
+
P(f(e.words.invert), 1)
|
|
420
|
+
]),
|
|
421
|
+
_: 1
|
|
422
|
+
}, 8, ["disabled"]),
|
|
423
|
+
e.filtered !== e.total ? (s(), u("span", Qe, f(e.filtered) + " / " + f(e.total), 1)) : w("", !0)
|
|
424
|
+
])) : w("", !0),
|
|
425
|
+
e.pagination ? (s(), u("div", Ye, [
|
|
426
|
+
K(Pe, {
|
|
427
|
+
page: e.page,
|
|
428
|
+
"page-size": e.pageSize,
|
|
429
|
+
total: e.filtered,
|
|
430
|
+
disabled: e.busy,
|
|
431
|
+
compact: e.pagination.compact ?? !0,
|
|
432
|
+
"show-total": !1,
|
|
433
|
+
"show-size-changer": e.pagination.showSizeChanger,
|
|
434
|
+
"page-size-options": e.pagination.pageSizeOptions,
|
|
435
|
+
labels: {
|
|
436
|
+
first: e.words.firstPage,
|
|
437
|
+
previous: e.words.previousPage,
|
|
438
|
+
next: e.words.nextPage,
|
|
439
|
+
last: e.words.lastPage,
|
|
440
|
+
perPage: e.words.perPage
|
|
441
|
+
},
|
|
442
|
+
"onUpdate:page": i[4] || (i[4] = (t) => d("page", t)),
|
|
443
|
+
"onUpdate:pageSize": i[5] || (i[5] = (t) => d("pageSize", t))
|
|
444
|
+
}, null, 8, ["page", "page-size", "total", "disabled", "compact", "show-size-changer", "page-size-options", "labels"])
|
|
445
|
+
])) : w("", !0),
|
|
446
|
+
l.$slots.footer ? (s(), u("footer", Ze, [
|
|
447
|
+
z(l.$slots, "footer", { info: N.value }, void 0, !0)
|
|
448
|
+
])) : w("", !0)
|
|
449
|
+
], 16, Fe));
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
export {
|
|
453
|
+
st as default
|
|
454
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import o from "./HysTree2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
/* empty css */
|
|
4
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
5
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c38908e0"]]);
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
p as default
|
|
8
7
|
};
|