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.
Files changed (201) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +15 -1
  3. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  4. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  5. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
  6. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
  7. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
  8. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
  9. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
  10. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
  11. package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
  12. package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
  13. package/dist/components/HysCascader/HysCascader.vue.js +2 -2
  14. package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
  15. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  16. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  17. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  18. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
  19. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  20. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  21. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  22. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  23. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  24. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  25. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  26. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
  27. package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
  28. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  29. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
  30. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
  31. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  32. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  33. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  34. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  35. package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
  36. package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
  37. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  38. package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
  39. package/dist/components/HysMention/HysMention.vue.js +1 -1
  40. package/dist/components/HysMention/HysMention2.vue.js +112 -100
  41. package/dist/components/HysModal/HysModal.vue.js +2 -2
  42. package/dist/components/HysModal/HysModal2.vue.js +490 -85
  43. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  44. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  45. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  46. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  47. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  48. package/dist/components/HysSelect/HysSelect2.vue.js +730 -594
  49. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  50. package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
  51. package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
  52. package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
  53. package/dist/components/HysTable/HysTable.vue.js +2 -2
  54. package/dist/components/HysTable/HysTable2.vue.js +389 -368
  55. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
  56. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  57. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  58. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  59. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  60. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  61. package/dist/components/HysTour/HysTour.vue.js +46 -42
  62. package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
  63. package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
  64. package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
  65. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
  66. package/dist/components/HysTree/HysTree.vue.js +2 -2
  67. package/dist/components/HysTree/HysTree2.vue.js +195 -184
  68. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
  69. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
  70. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  71. package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
  72. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  73. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  74. package/dist/composables/color.js +97 -0
  75. package/dist/composables/dataGrid.js +68 -0
  76. package/dist/composables/drawer.js +17 -0
  77. package/dist/composables/feedback.js +14 -0
  78. package/dist/composables/menu.js +96 -0
  79. package/dist/composables/modal.js +14 -0
  80. package/dist/composables/overlayManager.js +48 -18
  81. package/dist/composables/progress.js +94 -0
  82. package/dist/composables/tagInput.js +16 -0
  83. package/dist/composables/timeline.js +19 -0
  84. package/dist/composables/transfer.js +19 -17
  85. package/dist/composables/upload.js +55 -0
  86. package/dist/composables/uploadRequest.js +58 -0
  87. package/dist/composables/useAlert.js +124 -0
  88. package/dist/composables/useColorPicker.js +402 -0
  89. package/dist/composables/useContextMenu.js +514 -0
  90. package/dist/composables/useDataGridRemote.js +67 -0
  91. package/dist/composables/useDialog.js +86 -43
  92. package/dist/composables/useDrawerPush.js +33 -0
  93. package/dist/composables/useDrawerResize.js +221 -0
  94. package/dist/composables/useFloating.js +110 -76
  95. package/dist/composables/useHysModal.js +185 -0
  96. package/dist/composables/useModal.js +295 -0
  97. package/dist/composables/useModalInteraction.js +394 -0
  98. package/dist/composables/usePopupSurface.js +458 -0
  99. package/dist/composables/useTagInput.js +313 -0
  100. package/dist/composables/useTransferMotion.js +185 -0
  101. package/dist/composables/useUpload.js +472 -0
  102. package/dist/composables/useUploadModel.js +65 -0
  103. package/dist/composables/useUploadRequests.js +266 -0
  104. package/dist/composables/useVirtualTableLayout.js +277 -0
  105. package/dist/composables/virtualTable.js +43 -0
  106. package/dist/index.js +27 -24
  107. package/dist/internal/PopupReference.js +39 -0
  108. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  109. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  110. package/dist/motion/PopupMotion.js +105 -0
  111. package/dist/motion/popup.js +10 -0
  112. package/dist/style.css +1 -1
  113. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  114. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
  115. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
  116. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
  117. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
  118. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
  119. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
  120. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
  121. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  122. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  123. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  124. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  125. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  126. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  127. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  128. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +1 -1
  129. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  130. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  131. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  132. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
  133. package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -1
  134. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  135. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  136. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  137. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  138. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +13 -4
  139. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
  140. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
  141. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +2 -2
  142. package/dist/types/components/HysTable/HysTable.vue.d.ts +4 -4
  143. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
  144. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
  145. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  146. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  147. package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -1
  148. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
  149. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
  150. package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
  151. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  152. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  153. package/dist/types/composables/autocomplete.d.ts +3 -0
  154. package/dist/types/composables/avatar.d.ts +3 -0
  155. package/dist/types/composables/cascader.d.ts +3 -0
  156. package/dist/types/composables/color.d.ts +97 -0
  157. package/dist/types/composables/dataGrid.d.ts +100 -0
  158. package/dist/types/composables/datePicker.d.ts +3 -0
  159. package/dist/types/composables/drawer.d.ts +102 -0
  160. package/dist/types/composables/feedback.d.ts +98 -0
  161. package/dist/types/composables/formContext.d.ts +2 -0
  162. package/dist/types/composables/menu.d.ts +183 -0
  163. package/dist/types/composables/modal.d.ts +183 -0
  164. package/dist/types/composables/overlayManager.d.ts +7 -3
  165. package/dist/types/composables/popupSurface.d.ts +83 -0
  166. package/dist/types/composables/progress.d.ts +92 -0
  167. package/dist/types/composables/selectOptions.d.ts +2 -0
  168. package/dist/types/composables/table.d.ts +3 -0
  169. package/dist/types/composables/tagInput.d.ts +96 -0
  170. package/dist/types/composables/timeline.d.ts +82 -0
  171. package/dist/types/composables/transfer.d.ts +7 -0
  172. package/dist/types/composables/tree.d.ts +3 -0
  173. package/dist/types/composables/treeSelect.d.ts +3 -0
  174. package/dist/types/composables/upload.d.ts +202 -0
  175. package/dist/types/composables/uploadRequest.d.ts +3 -0
  176. package/dist/types/composables/useAlert.d.ts +21 -0
  177. package/dist/types/composables/useCascader.d.ts +1 -1
  178. package/dist/types/composables/useColorPicker.d.ts +101 -0
  179. package/dist/types/composables/useContextMenu.d.ts +81 -0
  180. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  181. package/dist/types/composables/useDialog.d.ts +16 -3
  182. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  183. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  184. package/dist/types/composables/useFloating.d.ts +21 -2
  185. package/dist/types/composables/useHysModal.d.ts +44 -0
  186. package/dist/types/composables/useModal.d.ts +62 -0
  187. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  188. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  189. package/dist/types/composables/useTagInput.d.ts +66 -0
  190. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  191. package/dist/types/composables/useUpload.d.ts +94 -0
  192. package/dist/types/composables/useUploadModel.d.ts +14 -0
  193. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  194. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  195. package/dist/types/composables/virtualTable.d.ts +126 -0
  196. package/dist/types/index.d.ts +17 -2
  197. package/dist/types/internal/PopupReference.d.ts +18 -0
  198. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  199. package/dist/types/motion/PopupMotion.d.ts +59 -0
  200. package/dist/types/motion/popup.d.ts +12 -0
  201. package/package.json +1 -1
@@ -1,20 +1,21 @@
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";
1
+ import { defineComponent as De, ref as I, useId as $e, provide as Be, watch as M, computed as R, onDeactivated as Ke, onBeforeUnmount as Pe, openBlock as m, createElementBlock as C, mergeProps as h, unref as l, Fragment as re, renderList as Ee, normalizeStyle as Ae, renderSlot as g, createVNode as L, withCtx as k, toDisplayString as $, createCommentVNode as B, createBlock as Ie, createSlots as Le, createTextVNode as Ve, createElementVNode as He, nextTick as le } from "vue";
2
+ import { ChevronRight as Ne, ChevronLeft as Oe } from "lucide-vue-next";
3
+ import oe from "../HysButton/HysButton.vue.js";
4
+ import Me from "./HysTransferPanel.vue.js";
5
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 = {
6
+ import { useHysFormItemContext as We, useHysControlState as Fe, fieldKey as je } from "../../composables/formContext.js";
7
+ import { useTransferMotion as qe } from "../../composables/useTransferMotion.js";
8
+ import { useTransfer as Ue } from "../../composables/useTransfer.js";
9
+ import { transferLabel as Ge } from "../../composables/transfer.js";
10
+ const Je = ["id", "data-size", "aria-label", "aria-invalid", "aria-describedby", "aria-busy"], Qe = { key: 0 }, Xe = { key: 0 }, Ye = {
10
11
  key: 0,
11
12
  class: "hys-ui-transfer-drag-count",
12
13
  "aria-hidden": "true"
13
- }, Qe = {
14
+ }, Ze = {
14
15
  class: "hys-ui-pf-transfer-status",
15
16
  role: "status",
16
17
  "aria-live": "polite"
17
- }, rt = /* @__PURE__ */ we({
18
+ }, st = /* @__PURE__ */ De({
18
19
  __name: "HysTransfer",
19
20
  props: {
20
21
  options: {},
@@ -40,7 +41,12 @@ const je = ["id", "data-size", "aria-label", "aria-invalid", "aria-describedby",
40
41
  oneWay: { type: Boolean },
41
42
  draggable: { type: Boolean, default: !0 },
42
43
  dragChecked: { type: Boolean, default: !0 },
44
+ moveOnDoubleClick: { type: Boolean, default: !1 },
43
45
  animated: { type: Boolean, default: !0 },
46
+ moveAnimation: { default: "flight" },
47
+ moveDuration: { default: 240 },
48
+ maxAnimatedItems: { default: 6 },
49
+ highlightOnArrival: { type: Boolean, default: !0 },
44
50
  size: {},
45
51
  listHeight: { default: 240 },
46
52
  listStyle: {},
@@ -59,305 +65,329 @@ const je = ["id", "data-size", "aria-label", "aria-invalid", "aria-describedby",
59
65
  validateEvent: { type: Boolean, default: !0 }
60
66
  },
61
67
  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),
68
+ setup(o, { expose: ie, emit: se }) {
69
+ const s = o, W = (e) => e === "left" ? "left-empty" : "right-empty", F = (e) => e === "left" ? "left-footer" : "right-footer", p = se, ne = Re(), z = I(), j = $e(), b = We(), S = Fe(s);
70
+ Be(je, void 0);
71
+ const i = Ue(
72
+ s,
73
+ S.disabled,
74
+ (e, ...t) => p(e, ...t),
69
75
  () => {
70
- k.validate("change");
76
+ b.validate("change");
71
77
  }
72
78
  ), {
73
79
  live: q,
74
80
  busy: d,
75
- keys: le,
76
- checked: oe,
77
- words: b,
78
- all: M,
81
+ keys: de,
82
+ checked: U,
83
+ words: w,
84
+ all: G,
79
85
  filtered: V,
80
- visible: j,
81
- pages: U,
82
- pageSizes: G,
83
- pagination: ie,
84
- searchValues: J,
85
- announcement: se,
86
+ visible: J,
87
+ pages: Q,
88
+ pageSizes: X,
89
+ pagination: ue,
90
+ searchValues: Y,
91
+ announcement: fe,
86
92
  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(() => {
93
+ check: Z,
94
+ checkAll: K,
95
+ invertSelection: x,
96
+ setSearch: _,
97
+ setPage: H,
98
+ setPageSize: ee
99
+ } = i, P = qe(z, s);
100
+ M(
101
+ [() => i.keys.value, () => i.data.value],
102
+ P.cancelPlaying
103
+ ), M(
104
+ [
105
+ () => i.searchValues.value.left,
106
+ () => i.searchValues.value.right,
107
+ () => s.loading,
108
+ () => S.disabled.value
109
+ ],
110
+ P.stop
111
+ );
112
+ async function c(e, t = f(
113
+ e === "right" ? "left" : "right"
114
+ )) {
115
+ if (d.value) return !1;
116
+ const a = [...new Set(t)].filter((y) => {
117
+ const ae = i.data.value.map.get(y);
118
+ return ae && !ae.disabled && i.targetSet.value.has(y) !== (e === "right");
119
+ }), u = P.capture(e, a), r = await i.move(e, t);
120
+ return r && (await le(), P.play(u)), r;
121
+ }
122
+ const ge = ["left", "right"], ce = R(() => {
95
123
  var e, t;
96
124
  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
125
+ left: ((e = s.titles) == null ? void 0 : e[0]) ?? w.value.leftTitle,
126
+ right: ((t = s.titles) == null ? void 0 : t[1]) ?? w.value.rightTitle
99
127
  };
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(
128
+ }), ve = R(
129
+ () => ge.map((e) => ({ side: e, title: ce.value[e] }))
130
+ ), n = I([]), T = I(), E = I();
131
+ let N = !1;
132
+ const A = /* @__PURE__ */ new Map();
133
+ function he(e, t) {
134
+ t ? A.set(
107
135
  e,
108
136
  t
109
- ) : P.delete(e);
137
+ ) : A.delete(e);
110
138
  }
111
- function ge(e) {
139
+ function ye(e) {
112
140
  var t;
113
- return typeof i.filterPlaceholder == "string" ? i.filterPlaceholder : ((t = i.filterPlaceholder) == null ? void 0 : t[e === "left" ? 0 : 1]) ?? b.value.search;
141
+ return typeof s.filterPlaceholder == "string" ? s.filterPlaceholder : ((t = s.filterPlaceholder) == null ? void 0 : t[e === "left" ? 0 : 1]) ?? w.value.search;
114
142
  }
115
- function p(e) {
143
+ function D(e) {
116
144
  return {
117
145
  side: e,
118
- items: j.value[e].map((t) => t.option),
146
+ items: J.value[e].map((t) => t.option),
119
147
  filteredItems: V.value[e].map((t) => t.option),
120
148
  checkedKeys: f(e),
121
149
  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([
150
+ query: Y.value[e],
151
+ check: (t, a) => i.targetSet.value.has(t) === (e === "right") ? Z(t, a) : Promise.resolve(!1),
152
+ setCheckedKeys: (t) => i.setCheckedKeys([
125
153
  ...f(e === "left" ? "right" : "left"),
126
154
  ...t.filter(
127
- (a) => s.targetSet.value.has(a) === (e === "right")
155
+ (a) => i.targetSet.value.has(a) === (e === "right")
128
156
  )
129
157
  ]),
130
- checkAll: (t = !0) => E(e, t),
131
- remove: (t) => h("left", t)
158
+ checkAll: (t = !0) => K(e, t),
159
+ remove: (t) => c("left", t)
132
160
  };
133
161
  }
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");
162
+ function v() {
163
+ const e = N;
164
+ n.value = [], T.value = void 0, E.value = void 0, N = !1, window.removeEventListener("keydown", te), window.removeEventListener("blur", v), e && q.value && p("dragEnd");
137
165
  }
138
- function x(e) {
139
- e.key === "Escape" && g();
166
+ function te(e) {
167
+ e.key === "Escape" && v();
140
168
  }
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) {
169
+ function me(e, t, a) {
170
+ const u = i.data.value.map.get(a);
171
+ if (d.value || !s.draggable || u != null && u.disabled || !u || s.oneWay && t === "right" || !e.dataTransfer) {
144
172
  e.preventDefault();
145
173
  return;
146
174
  }
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(
175
+ v(), n.value = s.dragChecked && i.checkedSet.value.has(a) ? f(t) : [a], T.value = t, N = !0, e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData(
148
176
  "text/plain",
149
177
  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);
178
+ ), e.dataTransfer.setData("application/x-hys-ui-transfer", j), window.addEventListener("keydown", te), window.addEventListener("blur", v), p("dragStart", t, [...n.value], e);
151
179
  }
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");
180
+ const ke = R(
181
+ () => !d.value && !!s.draggable && n.value.length > 0 && !(s.oneWay && T.value === "right") && n.value.every((e) => {
182
+ const t = i.data.value.map.get(e);
183
+ return t && !t.disabled && i.targetSet.value.has(e) === (T.value === "right");
156
184
  })
157
185
  );
158
- function N(e) {
159
- return ve.value && T.value !== e;
186
+ function O(e) {
187
+ return ke.value && T.value !== e;
160
188
  }
161
- function he(e, t) {
162
- N(t) && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), K.value = t);
189
+ function be(e, t) {
190
+ O(t) && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), E.value = t);
163
191
  }
164
- function ye(e) {
165
- e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget) || (K.value = void 0);
192
+ function Se(e) {
193
+ e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget) || (E.value = void 0);
166
194
  }
167
- function me(e, t) {
168
- N(t) && (e.preventDefault(), h(t, [...n.value])), g();
195
+ function we(e, t) {
196
+ O(t) && (e.preventDefault(), c(t, [...n.value])), v();
169
197
  }
170
- ze(
198
+ M(
171
199
  () => [
172
200
  d.value,
173
- i.draggable,
174
- i.oneWay,
175
- s.data.value,
176
- s.keys.value
201
+ s.draggable,
202
+ s.oneWay,
203
+ i.data.value,
204
+ i.keys.value
177
205
  ],
178
206
  () => {
179
- n.value.length && (d.value || !i.draggable || !N(T.value === "left" ? "right" : "left")) && g();
207
+ n.value.length && (d.value || !s.draggable || !O(T.value === "left" ? "right" : "left")) && v();
180
208
  },
181
209
  { flush: "sync" }
182
- ), $e(g), De(g);
183
- function ke(e = "left") {
210
+ ), Ke(v), Pe(v);
211
+ function Ce(e = "left") {
184
212
  var t;
185
- d.value || (t = P.get(e)) == null || t.focus();
213
+ d.value || (t = A.get(e)) == null || t.focus();
186
214
  }
187
- async function be(e, t) {
215
+ async function pe(e, t) {
188
216
  var a;
189
217
  if (q.value) {
190
- if (t.key !== void 0 && i.pagination) {
191
- const c = V.value[e].findIndex(
192
- (z) => z.key === t.key
218
+ if (t.key !== void 0 && s.pagination) {
219
+ const u = V.value[e].findIndex(
220
+ (y) => y.key === t.key
193
221
  );
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;
222
+ if (u < 0) return;
223
+ const r = Math.floor(u / X.value[e]) + 1;
224
+ if (H(e, r), await le(), Q.value[e] !== r) return;
197
225
  }
198
- await ((a = P.get(e)) == null ? void 0 : a.scrollTo(t));
226
+ await ((a = A.get(e)) == null ? void 0 : a.scrollTo(t));
199
227
  }
200
228
  }
201
- function Se(e) {
229
+ function Te(e) {
202
230
  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"));
231
+ e.relatedTarget instanceof Node && ((t = z.value) != null && t.contains(e.relatedTarget)) || (p("blur", e), s.validateEvent && !S.disabled.value && b.validate("blur"));
204
232
  }
205
- function Ce(e) {
233
+ function ze(e) {
206
234
  var t;
207
- e.relatedTarget instanceof Node && ((t = B.value) != null && t.contains(e.relatedTarget)) || C("focus", e);
235
+ e.relatedTarget instanceof Node && ((t = z.value) != null && t.contains(e.relatedTarget)) || p("focus", e);
208
236
  }
209
- return te({
210
- element: B,
211
- targetKeys: le,
212
- checkedKeys: oe,
237
+ return ie({
238
+ element: z,
239
+ targetKeys: de,
240
+ checkedKeys: U,
213
241
  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,
242
+ getTargetItems: () => G.value.right.map((e) => e.option),
243
+ move: c,
244
+ remove: (e) => c("left", e),
245
+ setCheckedKeys: i.setCheckedKeys,
246
+ clearChecked: i.clearChecked,
247
+ checkAll: K,
248
+ invertSelection: x,
249
+ setSearch: _,
250
+ clearSearch: i.clearSearch,
251
+ setPage: H,
252
+ setPageSize: ee,
253
+ scrollTo: pe,
254
+ focus: Ce
255
+ }), (e, t) => (m(), C("div", h({
256
+ id: l(b).id.value,
229
257
  ref_key: "element",
230
- ref: B
231
- }, r(re), {
258
+ ref: z
259
+ }, l(ne), {
232
260
  class: ["hys-ui-v4-transfer hys-ui-pf-transfer hys-ui-transfer", {
233
- "hys-ui-transfer-error": o.status === "error" || r(k).invalid.value,
261
+ "hys-ui-transfer-error": o.status === "error" || l(b).invalid.value,
234
262
  "hys-ui-transfer-warning": o.status === "warning"
235
263
  }],
236
- "data-size": r(w).size.value,
264
+ "data-size": l(S).size.value,
237
265
  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,
266
+ "aria-label": o.ariaLabel || l(b).label.value || "穿梭选择",
267
+ "aria-invalid": o.status === "error" || l(b).invalid.value || void 0,
268
+ "aria-describedby": l(b).describedBy.value,
241
269
  "aria-busy": o.loading || void 0,
242
- onFocusin: Ce,
243
- onFocusout: Se
270
+ onFocusin: ze,
271
+ onFocusout: Te
244
272
  }), [
245
- (y(!0), S(_, null, Be(ue.value, (a, c) => (y(), S(_, {
273
+ (m(!0), C(re, null, Ee(ve.value, (a, u) => (m(), C(re, {
246
274
  key: a.side
247
275
  }, [
248
- c === 1 ? (y(), S("div", {
276
+ u === 1 ? (m(), C("div", {
249
277
  key: 0,
250
278
  class: "hys-ui-v4-move",
251
- style: Ee(o.operationStyle)
279
+ style: Ae(o.operationStyle)
252
280
  }, [
253
- u(e.$slots, "operations", {
254
- move: r(h),
255
- disabled: r(d),
256
- leftChecked: r(f)("left"),
257
- rightChecked: r(f)("right")
281
+ g(e.$slots, "operations", {
282
+ move: c,
283
+ disabled: l(d),
284
+ leftChecked: l(f)("left"),
285
+ rightChecked: l(f)("right")
258
286
  }, () => [
259
- H(ee, {
287
+ L(oe, {
260
288
  variant: "secondary",
261
- size: r(w).size.value === "lg" ? "md" : "sm",
289
+ size: l(S).size.value === "lg" ? "md" : "sm",
262
290
  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"))
291
+ disabled: l(d) || !l(f)("left").length,
292
+ "aria-label": l(w).moveRight,
293
+ onClick: t[0] || (t[0] = (r) => c("right"))
266
294
  }, {
267
- default: m(() => {
268
- var l;
295
+ default: k(() => {
296
+ var r;
269
297
  return [
270
- H(r(Ae), {
298
+ L(l(Ne), {
271
299
  size: 16,
272
300
  "aria-hidden": "true"
273
301
  }),
274
- (l = o.buttonTexts) != null && l[0] ? (y(), S("span", Ue, $(o.buttonTexts[0]), 1)) : D("", !0)
302
+ (r = o.buttonTexts) != null && r[0] ? (m(), C("span", Qe, $(o.buttonTexts[0]), 1)) : B("", !0)
275
303
  ];
276
304
  }),
277
305
  _: 1
278
306
  }, 8, ["size", "disabled", "aria-label"]),
279
- o.oneWay ? D("", !0) : (y(), Ke(ee, {
307
+ o.oneWay ? B("", !0) : (m(), Ie(oe, {
280
308
  key: 0,
281
309
  variant: "secondary",
282
- size: r(w).size.value === "lg" ? "md" : "sm",
310
+ size: l(S).size.value === "lg" ? "md" : "sm",
283
311
  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"))
312
+ disabled: l(d) || !l(f)("right").length,
313
+ "aria-label": l(w).moveLeft,
314
+ onClick: t[1] || (t[1] = (r) => c("left"))
287
315
  }, {
288
- default: m(() => {
289
- var l;
316
+ default: k(() => {
317
+ var r;
290
318
  return [
291
- H(r(Ie), {
319
+ L(l(Oe), {
292
320
  size: 16,
293
321
  "aria-hidden": "true"
294
322
  }),
295
- (l = o.buttonTexts) != null && l[1] ? (y(), S("span", Ge, $(o.buttonTexts[1]), 1)) : D("", !0)
323
+ (r = o.buttonTexts) != null && r[1] ? (m(), C("span", Xe, $(o.buttonTexts[1]), 1)) : B("", !0)
296
324
  ];
297
325
  }),
298
326
  _: 1
299
327
  }, 8, ["size", "disabled", "aria-label"]))
300
328
  ], !0),
301
- n.value.length > 1 ? (y(), S("span", Je, $(n.value.length), 1)) : D("", !0)
302
- ], 4)) : D("", !0),
303
- H(Ne, {
329
+ n.value.length > 1 ? (m(), C("span", Ye, $(n.value.length), 1)) : B("", !0)
330
+ ], 4)) : B("", !0),
331
+ L(Me, {
304
332
  ref_for: !0,
305
- ref: (l) => fe(a.side, l),
306
- id: r(O) + "-" + a.side,
333
+ ref: (r) => he(a.side, r),
334
+ id: l(j) + "-" + a.side,
307
335
  side: a.side,
308
336
  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),
337
+ items: l(J)[a.side],
338
+ total: l(G)[a.side].length,
339
+ filtered: l(V)[a.side].length,
340
+ "checked-keys": l(f)(a.side),
341
+ busy: l(d),
314
342
  loading: o.loading,
315
343
  filterable: o.filterable,
316
- query: r(J)[a.side],
317
- placeholder: ge(a.side),
344
+ query: l(Y)[a.side],
345
+ placeholder: ye(a.side),
318
346
  "show-select-all": o.showSelectAll,
319
347
  "show-invert": !!o.showInvert,
320
348
  "one-way": !!o.oneWay,
321
- size: r(w).size.value,
349
+ size: l(S).size.value,
322
350
  "list-height": o.listHeight,
323
351
  "item-height": o.itemHeight,
324
352
  overscan: o.overscan,
325
353
  virtual: !!o.virtual,
326
- animated: o.animated,
327
354
  draggable: o.draggable,
355
+ "move-on-double-click": o.moveOnDoubleClick,
328
356
  "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,
357
+ "drop-target": E.value === a.side,
358
+ words: l(w),
359
+ page: l(Q)[a.side],
360
+ "page-size": l(X)[a.side],
361
+ pagination: s.pagination ? l(ue) : !1,
334
362
  "list-style": o.listStyle,
335
363
  format: o.format,
336
364
  "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 }, [
365
+ onCheck: l(Z),
366
+ onRangeCheck: t[2] || (t[2] = (r) => l(i).setCheckedKeys([.../* @__PURE__ */ new Set([...l(U), ...r])])),
367
+ onMoveItem: (r) => c(a.side === "left" ? "right" : "left", [r]),
368
+ onCheckAll: (r) => l(K)(a.side, r),
369
+ onInvert: (r) => l(x)(a.side),
370
+ onSearch: (r) => l(_)(a.side, r),
371
+ onRemove: t[3] || (t[3] = (r) => c("left", [r])),
372
+ onPage: (r) => l(H)(a.side, r),
373
+ onPageSize: (r) => l(ee)(a.side, r),
374
+ onDragStart: (r, y) => me(r, a.side, y),
375
+ onDragEnd: v,
376
+ onDragOver: (r) => be(r, a.side),
377
+ onDragLeave: Se,
378
+ onDrop: (r) => we(r, a.side),
379
+ onScroll: (r) => p("scroll", a.side, r)
380
+ }, Le({ _: 2 }, [
351
381
  e.$slots.option || e.$slots.default ? {
352
382
  name: "option",
353
- fn: m((l) => [
354
- u(e.$slots, "option", v({ ref_for: !0 }, l, {
383
+ fn: k((r) => [
384
+ g(e.$slots, "option", h({ ref_for: !0 }, r, {
355
385
  side: a.side
356
386
  }), () => [
357
- u(e.$slots, "default", v({ ref_for: !0 }, l, {
387
+ g(e.$slots, "default", h({ ref_for: !0 }, r, {
358
388
  side: a.side
359
389
  }), () => [
360
- Le($(l.label), 1)
390
+ Ve($(r.label), 1)
361
391
  ], !0)
362
392
  ], !0)
363
393
  ]),
@@ -365,54 +395,54 @@ const je = ["id", "data-size", "aria-label", "aria-invalid", "aria-describedby",
365
395
  } : void 0,
366
396
  e.$slots.header ? {
367
397
  name: "header",
368
- fn: m((l) => [
369
- u(e.$slots, "header", v({ ref_for: !0 }, l, {
398
+ fn: k((r) => [
399
+ g(e.$slots, "header", h({ ref_for: !0 }, r, {
370
400
  side: a.side,
371
- checkAll: (z = !0) => r(E)(a.side, z)
401
+ checkAll: (y = !0) => l(K)(a.side, y)
372
402
  }), void 0, !0)
373
403
  ]),
374
404
  key: "1"
375
405
  } : void 0,
376
406
  e.$slots.panel ? {
377
407
  name: "panel",
378
- fn: m(() => [
379
- u(e.$slots, "panel", v({ ref_for: !0 }, p(a.side)), void 0, !0)
408
+ fn: k(() => [
409
+ g(e.$slots, "panel", h({ ref_for: !0 }, D(a.side)), void 0, !0)
380
410
  ]),
381
411
  key: "2"
382
412
  } : void 0,
383
413
  e.$slots[W(a.side)] || e.$slots.empty ? {
384
414
  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)
415
+ fn: k(() => [
416
+ g(e.$slots, W(a.side), h({ ref_for: !0 }, D(a.side)), () => [
417
+ g(e.$slots, "empty", h({ ref_for: !0 }, D(a.side)), void 0, !0)
388
418
  ], !0)
389
419
  ]),
390
420
  key: "3"
391
421
  } : void 0,
392
422
  e.$slots[F(a.side)] || e.$slots.footer ? {
393
423
  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)
424
+ fn: k(() => [
425
+ g(e.$slots, F(a.side), h({ ref_for: !0 }, D(a.side)), () => [
426
+ g(e.$slots, "footer", h({ ref_for: !0 }, D(a.side)), void 0, !0)
397
427
  ], !0)
398
428
  ]),
399
429
  key: "4"
400
430
  } : void 0,
401
431
  e.$slots.loading ? {
402
432
  name: "loading",
403
- fn: m(() => [
404
- u(e.$slots, "loading", {
433
+ fn: k(() => [
434
+ g(e.$slots, "loading", {
405
435
  side: a.side
406
436
  }, void 0, !0)
407
437
  ]),
408
438
  key: "5"
409
439
  } : 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"])
440
+ ]), 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", "draggable", "move-on-double-click", "dragged-keys", "drop-target", "words", "page", "page-size", "pagination", "list-style", "format", "render-content", "onCheck", "onMoveItem", "onCheckAll", "onInvert", "onSearch", "onPage", "onPageSize", "onDragStart", "onDragOver", "onDrop", "onScroll"])
411
441
  ], 64))), 128)),
412
- He("span", Qe, $(n.value.length ? r(Me)(r(b).dragCount, { count: n.value.length }) : r(se)), 1)
413
- ], 16, je));
442
+ He("span", Ze, $(n.value.length ? l(Ge)(l(w).dragCount, { count: n.value.length }) : l(fe)), 1)
443
+ ], 16, Je));
414
444
  }
415
445
  });
416
446
  export {
417
- rt as default
447
+ st as default
418
448
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./HysTransferPanel2.vue.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2538ae23"]]);
4
+ const s = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b47deb49"]]);
5
5
  export {
6
6
  s as default
7
7
  };