hys-ui 0.2.0 → 0.4.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 (261) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +68 -59
  3. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  4. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  5. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
  6. package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
  9. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
  10. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
  11. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
  12. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
  13. package/dist/components/HysButton/HysButton.vue.js +2 -2
  14. package/dist/components/HysButton/HysButton2.vue.js +227 -60
  15. package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
  16. package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
  17. package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
  18. package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
  19. package/dist/components/HysCascader/HysCascader.vue.js +2 -2
  20. package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
  21. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  22. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  23. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  24. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
  25. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  26. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  27. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  28. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  29. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  30. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  31. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  32. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
  33. package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
  34. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  35. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
  36. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
  37. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  38. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  39. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  40. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  41. package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
  42. package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
  43. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  44. package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
  45. package/dist/components/HysMention/HysMention.vue.js +1 -1
  46. package/dist/components/HysMention/HysMention2.vue.js +1092 -142
  47. package/dist/components/HysModal/HysModal.vue.js +2 -2
  48. package/dist/components/HysModal/HysModal2.vue.js +491 -85
  49. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  50. package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
  51. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  52. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  53. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  54. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  55. package/dist/components/HysSearch/HysSearch.vue.js +5 -82
  56. package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
  57. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  58. package/dist/components/HysSelect/HysSelect2.vue.js +755 -590
  59. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  60. package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
  61. package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
  62. package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
  63. package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
  64. package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
  65. package/dist/components/HysTable/HysTable.vue.js +2 -2
  66. package/dist/components/HysTable/HysTable2.vue.js +1416 -1127
  67. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
  68. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  69. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  70. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  71. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  72. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  73. package/dist/components/HysTour/HysTour.vue.js +291 -63
  74. package/dist/components/HysTour/HysTour3.vue.js +5 -0
  75. package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
  76. package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
  77. package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
  78. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
  79. package/dist/components/HysTree/HysTree.vue.js +2 -2
  80. package/dist/components/HysTree/HysTree2.vue.js +195 -184
  81. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
  82. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
  83. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  84. package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
  85. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  86. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  87. package/dist/composables/buttonGroup.js +12 -0
  88. package/dist/composables/color.js +97 -0
  89. package/dist/composables/dataGrid.js +68 -0
  90. package/dist/composables/drawer.js +17 -0
  91. package/dist/composables/feedback.js +14 -0
  92. package/dist/composables/floatingPosition.js +18 -0
  93. package/dist/composables/mentionDocument.js +79 -0
  94. package/dist/composables/mentionEditor.js +58 -0
  95. package/dist/composables/menu.js +96 -0
  96. package/dist/composables/modal.js +14 -0
  97. package/dist/composables/overlayManager.js +48 -18
  98. package/dist/composables/progress.js +94 -0
  99. package/dist/composables/selectOptions.js +44 -38
  100. package/dist/composables/splitPaneSizes.js +58 -0
  101. package/dist/composables/table.js +128 -105
  102. package/dist/composables/tagInput.js +16 -0
  103. package/dist/composables/timeline.js +19 -0
  104. package/dist/composables/transfer.js +19 -17
  105. package/dist/composables/upload.js +55 -0
  106. package/dist/composables/uploadRequest.js +58 -0
  107. package/dist/composables/useAlert.js +124 -0
  108. package/dist/composables/useColorPicker.js +402 -0
  109. package/dist/composables/useContextMenu.js +514 -0
  110. package/dist/composables/useDataGridRemote.js +67 -0
  111. package/dist/composables/useDialog.js +86 -43
  112. package/dist/composables/useDrawerPush.js +33 -0
  113. package/dist/composables/useDrawerResize.js +221 -0
  114. package/dist/composables/useFloating.js +118 -80
  115. package/dist/composables/useHysModal.js +185 -0
  116. package/dist/composables/useMentionCaret.js +81 -0
  117. package/dist/composables/useMentionList.js +81 -0
  118. package/dist/composables/useMentionModel.js +90 -0
  119. package/dist/composables/useMentionOptions.js +421 -0
  120. package/dist/composables/useModal.js +295 -0
  121. package/dist/composables/useModalInteraction.js +394 -0
  122. package/dist/composables/usePopupSurface.js +458 -0
  123. package/dist/composables/useSplitPaneDrag.js +52 -0
  124. package/dist/composables/useSplitPaneStorage.js +38 -0
  125. package/dist/composables/useTable.js +344 -312
  126. package/dist/composables/useTableSticky.js +79 -0
  127. package/dist/composables/useTagInput.js +313 -0
  128. package/dist/composables/useTourLayout.js +129 -0
  129. package/dist/composables/useTransferMotion.js +185 -0
  130. package/dist/composables/useUpload.js +472 -0
  131. package/dist/composables/useUploadModel.js +65 -0
  132. package/dist/composables/useUploadRequests.js +266 -0
  133. package/dist/composables/useVirtualTableLayout.js +277 -0
  134. package/dist/composables/virtualTable.js +43 -0
  135. package/dist/config.js +11 -11
  136. package/dist/index.js +175 -153
  137. package/dist/internal/MultiSplitPane.vue.js +305 -0
  138. package/dist/internal/MultiSplitPane2.vue.js +4 -0
  139. package/dist/internal/PopupReference.js +39 -0
  140. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  141. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  142. package/dist/motion/PopupMotion.js +105 -0
  143. package/dist/motion/popup.js +10 -0
  144. package/dist/style.css +1 -1
  145. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  146. package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
  147. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
  148. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
  149. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
  150. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
  151. package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
  152. package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
  153. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
  154. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
  155. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
  156. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  157. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  158. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  159. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  160. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  161. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  162. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  163. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +3 -3
  164. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  165. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  166. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  167. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
  168. package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -39
  169. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  170. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
  171. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
  172. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  173. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  174. package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
  175. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  176. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
  177. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +19 -5
  178. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
  179. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
  180. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
  181. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
  182. package/dist/types/components/HysTable/HysTable.vue.d.ts +1742 -5
  183. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
  184. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
  185. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  186. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  187. package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -8
  188. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
  189. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
  190. package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
  191. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  192. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  193. package/dist/types/composables/autocomplete.d.ts +3 -0
  194. package/dist/types/composables/avatar.d.ts +3 -0
  195. package/dist/types/composables/buttonGroup.d.ts +9 -0
  196. package/dist/types/composables/cascader.d.ts +3 -0
  197. package/dist/types/composables/color.d.ts +97 -0
  198. package/dist/types/composables/dataGrid.d.ts +100 -0
  199. package/dist/types/composables/datePicker.d.ts +3 -0
  200. package/dist/types/composables/drawer.d.ts +102 -0
  201. package/dist/types/composables/feedback.d.ts +98 -0
  202. package/dist/types/composables/floatingPosition.d.ts +14 -0
  203. package/dist/types/composables/formContext.d.ts +2 -0
  204. package/dist/types/composables/mention.d.ts +284 -0
  205. package/dist/types/composables/mentionDocument.d.ts +15 -0
  206. package/dist/types/composables/mentionEditor.d.ts +7 -0
  207. package/dist/types/composables/menu.d.ts +183 -0
  208. package/dist/types/composables/modal.d.ts +185 -0
  209. package/dist/types/composables/overlayManager.d.ts +7 -3
  210. package/dist/types/composables/popupSurface.d.ts +83 -0
  211. package/dist/types/composables/progress.d.ts +92 -0
  212. package/dist/types/composables/selectOptions.d.ts +7 -0
  213. package/dist/types/composables/splitPaneSizes.d.ts +11 -0
  214. package/dist/types/composables/table.d.ts +119 -6
  215. package/dist/types/composables/tagInput.d.ts +96 -0
  216. package/dist/types/composables/timeline.d.ts +82 -0
  217. package/dist/types/composables/tour.d.ts +68 -0
  218. package/dist/types/composables/transfer.d.ts +7 -0
  219. package/dist/types/composables/tree.d.ts +3 -0
  220. package/dist/types/composables/treeSelect.d.ts +3 -0
  221. package/dist/types/composables/upload.d.ts +202 -0
  222. package/dist/types/composables/uploadRequest.d.ts +3 -0
  223. package/dist/types/composables/useAlert.d.ts +21 -0
  224. package/dist/types/composables/useCascader.d.ts +1 -1
  225. package/dist/types/composables/useColorPicker.d.ts +101 -0
  226. package/dist/types/composables/useContextMenu.d.ts +81 -0
  227. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  228. package/dist/types/composables/useDialog.d.ts +16 -3
  229. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  230. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  231. package/dist/types/composables/useFloating.d.ts +22 -3
  232. package/dist/types/composables/useHysModal.d.ts +44 -0
  233. package/dist/types/composables/useMentionCaret.d.ts +6 -0
  234. package/dist/types/composables/useMentionList.d.ts +23 -0
  235. package/dist/types/composables/useMentionModel.d.ts +14 -0
  236. package/dist/types/composables/useMentionOptions.d.ts +26 -0
  237. package/dist/types/composables/useModal.d.ts +62 -0
  238. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  239. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  240. package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
  241. package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
  242. package/dist/types/composables/useTable.d.ts +7 -3
  243. package/dist/types/composables/useTableSticky.d.ts +22 -0
  244. package/dist/types/composables/useTagInput.d.ts +66 -0
  245. package/dist/types/composables/useTourLayout.d.ts +33 -0
  246. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  247. package/dist/types/composables/useUpload.d.ts +94 -0
  248. package/dist/types/composables/useUploadModel.d.ts +14 -0
  249. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  250. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  251. package/dist/types/composables/virtualTable.d.ts +126 -0
  252. package/dist/types/config.d.ts +1 -0
  253. package/dist/types/index.d.ts +53 -3
  254. package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
  255. package/dist/types/internal/PopupReference.d.ts +18 -0
  256. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  257. package/dist/types/motion/PopupMotion.d.ts +59 -0
  258. package/dist/types/motion/popup.d.ts +12 -0
  259. package/package.json +3 -2
  260. package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
  261. package/dist/components/HysTour/HysTour2.vue.js +0 -4
@@ -1,54 +1,60 @@
1
- import { toRaw as g } from "vue";
2
- function W(a) {
3
- let r = 0;
4
- const s = /* @__PURE__ */ new WeakMap();
5
- return (e) => {
6
- if (e && typeof e == "object") {
7
- const n = g(e), o = a().split(".").reduce(
8
- (l, i) => l && typeof l == "object" && Object.prototype.hasOwnProperty.call(l, i) ? l[i] : void 0,
9
- n
1
+ import { toRaw as S } from "vue";
2
+ function W(n) {
3
+ if (typeof n != "object" || typeof n.label != "string" || !Object.hasOwn(n, "value")) return !1;
4
+ const e = n.value;
5
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e !== null && typeof e == "object" && !Array.isArray(e);
6
+ }
7
+ function z(n) {
8
+ let e = 0;
9
+ const c = /* @__PURE__ */ new WeakMap();
10
+ return (t) => {
11
+ if (t && typeof t == "object") {
12
+ const l = S(t), r = n().split(".").reduce(
13
+ (s, a) => s && typeof s == "object" && Object.prototype.hasOwnProperty.call(s, a) ? s[a] : void 0,
14
+ l
10
15
  );
11
- return o != null && typeof o != "object" ? "object:" + typeof o + ":" + String(o) : (s.has(n) || s.set(n, ++r), "reference:" + s.get(n));
16
+ return r != null && typeof r != "object" ? "object:" + typeof r + ":" + String(r) : (c.has(l) || c.set(l, ++e), "reference:" + c.get(l));
12
17
  }
13
- return typeof e + ":" + String(e);
18
+ return typeof t + ":" + String(t);
14
19
  };
15
20
  }
16
- function z(a, r, s) {
17
- const e = [], n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new WeakSet();
18
- let l = 0;
19
- const i = r.label ?? "label", u = r.value ?? "value", K = r.options ?? "options", v = r.disabled ?? "disabled";
20
- function p(x, d, O = !1, b = "") {
21
- x.forEach((t, h) => {
22
- if (!t || typeof t != "object") return;
23
- const w = t[K], j = O || !!t[v], f = String(t[i] ?? t[u] ?? "");
21
+ function E(n, e, c) {
22
+ const t = [], l = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new WeakSet();
23
+ let s = 0;
24
+ const a = e.label ?? "label", p = e.value ?? "value", K = e.options ?? "options", O = e.disabled ?? "disabled";
25
+ function u(x, f, A = !1, d = "") {
26
+ x.forEach((o, j) => {
27
+ if (!o || typeof o != "object") return;
28
+ const w = o[K], h = A || !!o[O], y = String(o[a] ?? o[p] ?? "");
24
29
  if (Array.isArray(w)) {
25
- const k = g(t);
26
- if (o.has(k)) return;
27
- o.add(k);
28
- const S = d ? d + " / " + f : f;
29
- e.push({ key: "group:" + b + h, group: S, index: -1 }), p(w, S, j, b + h + ".");
30
+ const g = S(o);
31
+ if (r.has(g)) return;
32
+ r.add(g);
33
+ const k = f ? f + " / " + y : y;
34
+ t.push({ key: "group:" + d + j, group: k, index: -1 }), u(w, k, h, d + j + ".");
30
35
  return;
31
36
  }
32
- const c = t[u];
33
- if (c == null || !["string", "number", "boolean", "object"].includes(typeof c))
37
+ const i = o[p];
38
+ if (i == null || !["string", "number", "boolean", "object"].includes(typeof i))
34
39
  return;
35
- const y = s(c);
36
- n.has(y) || (n.add(y), e.push({
37
- key: y,
40
+ const b = c(i);
41
+ l.has(b) || (l.add(b), t.push({
42
+ key: b,
38
43
  option: {
39
- ...t,
40
- value: c,
41
- label: f,
42
- disabled: j
44
+ ...o,
45
+ value: i,
46
+ label: y,
47
+ disabled: h
43
48
  },
44
- group: d,
45
- index: l++
49
+ group: f,
50
+ index: s++
46
51
  }));
47
52
  });
48
53
  }
49
- return p(a), e;
54
+ return u(n), t;
50
55
  }
51
56
  export {
52
- z as normalizeSelectOptions,
53
- W as selectKeyFactory
57
+ W as isSelectLabeledValue,
58
+ E as normalizeSelectOptions,
59
+ z as selectKeyFactory
54
60
  };
@@ -0,0 +1,58 @@
1
+ const E = 1e-7;
2
+ function b(e, i) {
3
+ if (e === void 0) return;
4
+ const a = typeof e == "number" ? e : Number.parseFloat(e);
5
+ if (Number.isFinite(a)) {
6
+ if (a <= 0) return 0;
7
+ if (typeof e == "string" && e.endsWith("%")) return a;
8
+ if (i > 0) return a / i * 100;
9
+ }
10
+ }
11
+ function x(e) {
12
+ const i = e.map(({ min: t, max: n, preferred: o }) => Math.min(n, Math.max(t, o ?? t))), a = i.reduce((t, n) => t + n, 0), u = e.flatMap((t, n) => t.relative ? [n] : []);
13
+ if (a > 100 + 1e-7) {
14
+ let t = function(r) {
15
+ const c = r.reduce((s, M) => s + i[M] - e[M].min, 0);
16
+ if (c <= 1e-7 || o <= 1e-7) return;
17
+ const p = Math.min(o, c);
18
+ for (const s of r) i[s] -= (i[s] - e[s].min) * p / c;
19
+ o -= p;
20
+ };
21
+ const n = e.reduce((r, c) => r + c.min, 0);
22
+ if (n >= 100) return e.map((r) => r.min / n * 100);
23
+ let o = a - 100;
24
+ return t(u), t(e.map((r, c) => c)), i;
25
+ }
26
+ let f = 100 - a;
27
+ const h = e.flatMap((t, n) => t.preferred === void 0 ? [n] : []), g = h.flatMap((t) => [
28
+ { size: e[t].min, change: 1 },
29
+ { size: e[t].max, change: -1 }
30
+ ]).sort((t, n) => t.size - n.size);
31
+ let m = 0, l = 0;
32
+ for (const t of g) {
33
+ const n = (t.size - m) * l;
34
+ if (f < n) {
35
+ m += f / l, f = 0;
36
+ break;
37
+ }
38
+ m = t.size, f -= n, l += t.change;
39
+ }
40
+ for (const t of h)
41
+ i[t] = Math.min(e[t].max, Math.max(i[t], m));
42
+ function z(t) {
43
+ let n = t.filter((o) => e[o].max > i[o]);
44
+ for (; f > 1e-7 && n.length; ) {
45
+ const o = f / n.length;
46
+ n = n.filter((r) => {
47
+ const c = Math.min(o, e[r].max - i[r]);
48
+ return i[r] += c, f -= c, i[r] + 1e-7 < e[r].max;
49
+ });
50
+ }
51
+ }
52
+ return z(u), i;
53
+ }
54
+ export {
55
+ x as fitPaneSizes,
56
+ E as paneEpsilon,
57
+ b as paneRatio
58
+ };
@@ -1,150 +1,173 @@
1
- const N = (n) => typeof n + ":" + n;
2
- function g(n, r) {
3
- const s = typeof r == "string" ? r.split(".") : r;
4
- let o = n;
5
- for (const e of s) {
6
- if (o == null || typeof o != "object") return;
7
- o = o[e];
1
+ const C = (i) => typeof i + ":" + i;
2
+ function v(i, o) {
3
+ const a = typeof o == "string" ? o.split(".") : o;
4
+ let s = i;
5
+ for (const e of a) {
6
+ if (s == null || typeof s != "object") return;
7
+ s = s[e];
8
8
  }
9
- return o;
9
+ return s;
10
10
  }
11
- const M = (n) => n < 576 ? "xs" : n < 768 ? "sm" : n < 992 ? "md" : n < 1200 ? "lg" : n < 1600 ? "xl" : "xxl";
12
- function S(n, r, s = !0) {
13
- const o = /* @__PURE__ */ new Set();
14
- function e(y, u, i = /* @__PURE__ */ new Set(), p = 0) {
15
- return p > 32 ? [] : y.flatMap((d) => {
16
- if (i.has(d) || d.hidden || !s && d.type === "expand" || d.responsive && !d.responsive.includes(r) || o.has(d.key))
11
+ const F = (i) => i < 576 ? "xs" : i < 768 ? "sm" : i < 992 ? "md" : i < 1200 ? "lg" : i < 1600 ? "xl" : "xxl";
12
+ function I(i, o, a = !0) {
13
+ const s = /* @__PURE__ */ new Set();
14
+ function e(h, r, n = /* @__PURE__ */ new Set(), c = 0) {
15
+ return c > 32 ? [] : h.flatMap((l) => {
16
+ if (n.has(l) || l.hidden || !a && l.type === "expand" || l.responsive && !l.responsive.includes(o) || s.has(l.key))
17
17
  return [];
18
- o.add(d.key);
19
- const v = d.fixed === !1 ? void 0 : d.fixed === !0 ? "left" : d.fixed ?? u, b = d.children ? e(
20
- d.children,
21
- v,
22
- /* @__PURE__ */ new Set([...i, d]),
23
- p + 1
18
+ s.add(l.key);
19
+ const m = l.fixed === !1 ? void 0 : l.fixed === !0 ? "left" : l.fixed ?? r, k = l.children ? e(
20
+ l.children,
21
+ m,
22
+ /* @__PURE__ */ new Set([...n, l]),
23
+ c + 1
24
24
  ) : void 0;
25
- return b && !b.length ? [] : [{ ...d, fixed: v, children: b }];
25
+ return k && !k.length ? [] : [{ ...l, fixed: m, children: k }];
26
26
  });
27
27
  }
28
- const t = e(n);
29
- function a(y, u) {
30
- return y.flatMap((i) => {
31
- if (i.children) {
32
- const p = a(i.children, u);
33
- return p.length ? [{ ...i, children: p, fixed: u }] : [];
28
+ const t = e(i);
29
+ function u(h, r) {
30
+ return h.flatMap((n) => {
31
+ if (n.children) {
32
+ const c = u(n.children, r);
33
+ return c.length ? [{ ...n, children: c, fixed: r }] : [];
34
34
  }
35
- return i.fixed === u ? [i] : [];
35
+ return n.fixed === r ? [n] : [];
36
36
  });
37
37
  }
38
- const f = [
39
- ...a(t, "left"),
40
- ...a(t),
41
- ...a(t, "right")
38
+ const d = [
39
+ ...u(t, "left"),
40
+ ...u(t),
41
+ ...u(t, "right")
42
42
  ];
43
- function m(y) {
44
- return y.flatMap((u) => u.children ? m(u.children) : [u]);
43
+ function x(h) {
44
+ return h.flatMap((r) => r.children ? x(r.children) : [r]);
45
45
  }
46
- function l(y) {
46
+ function f(h) {
47
47
  return Math.max(
48
48
  1,
49
- ...y.map((u) => u.children ? 1 + l(u.children) : 1)
49
+ ...h.map((r) => r.children ? 1 + f(r.children) : 1)
50
50
  );
51
51
  }
52
- const c = l(f), h = Array.from({ length: c }, () => []);
53
- function x(y, u) {
54
- for (const i of y) {
55
- const p = i.children ? m(i.children) : [i];
56
- h[u].push({
57
- column: i,
58
- key: i.key + ":" + (i.fixed || "center"),
59
- leaves: p,
60
- colspan: p.length,
61
- rowspan: i.children ? 1 : c - u,
62
- fixed: i.fixed === "left" || i.fixed === "right" ? i.fixed : void 0
63
- }), i.children && x(i.children, u + 1);
52
+ const p = f(d), y = Array.from({ length: p }, () => []);
53
+ function b(h, r) {
54
+ for (const n of h) {
55
+ const c = n.children ? x(n.children) : [n];
56
+ y[r].push({
57
+ column: n,
58
+ key: n.key + ":" + (n.fixed || "center"),
59
+ leaves: c,
60
+ colspan: c.length,
61
+ rowspan: n.children ? 1 : p - r,
62
+ fixed: n.fixed === "left" || n.fixed === "right" ? n.fixed : void 0
63
+ }), n.children && b(n.children, r + 1);
64
64
  }
65
65
  }
66
- return x(f, 0), { leaves: m(f), headers: h };
66
+ b(d, 0);
67
+ const N = x(d), M = new Map(N.map((h, r) => [h.key, r])), w = y.map((h) => {
68
+ const r = [];
69
+ for (let n = 0; n < h.length; n++) {
70
+ const c = h[n], l = c.column.headerColSpan;
71
+ if (l === 0) {
72
+ r.push({ ...c, blank: !0 });
73
+ continue;
74
+ }
75
+ if (l === void 0 || !Number.isSafeInteger(l) || l <= 1 || c.column.children) {
76
+ r.push(c);
77
+ continue;
78
+ }
79
+ const m = [...c.leaves], k = M.get(m[0].key);
80
+ for (; m.length < l; ) {
81
+ const g = h[n + 1];
82
+ if (!g || g.column.children || g.column.type && g.column.type !== "default" || g.fixed !== c.fixed || g.rowspan !== c.rowspan || M.get(g.column.key) !== k + m.length) break;
83
+ m.push(g.column), n++;
84
+ }
85
+ r.push({ ...c, leaves: m, colspan: m.length });
86
+ }
87
+ return r;
88
+ });
89
+ return { leaves: N, headers: w };
67
90
  }
68
- function F(n, r) {
69
- const s = new Intl.Collator("zh-CN", {
91
+ function B(i, o) {
92
+ const a = new Intl.Collator("zh-CN", {
70
93
  numeric: !0,
71
94
  sensitivity: "base"
72
- }), o = n.flatMap((e) => {
73
- const t = r.find((a) => a.key === e.key);
95
+ }), s = i.flatMap((e) => {
96
+ const t = o.find((u) => u.key === e.key);
74
97
  return t && t.sortable !== "custom" ? [{ ...e, column: t }] : [];
75
98
  });
76
99
  return (e, t) => {
77
- for (const { direction: a, column: f } of o) {
78
- if (f.sorter) {
79
- const l = f.sorter(e, t);
80
- if (Number.isFinite(l) && l !== 0)
81
- return (a === "asc" ? 1 : -1) * l;
100
+ for (const { direction: u, column: d } of s) {
101
+ if (d.sorter) {
102
+ const f = d.sorter(e, t);
103
+ if (Number.isFinite(f) && f !== 0)
104
+ return (u === "asc" ? 1 : -1) * f;
82
105
  continue;
83
106
  }
84
- const m = Array.isArray(f.sortBy) ? f.sortBy : [f.sortBy ?? f.dataIndex ?? f.key];
85
- for (const l of m) {
86
- const c = typeof l == "function" ? l(e) : g(e, l), h = typeof l == "function" ? l(t) : g(t, l);
87
- if (c == null || h == null) {
88
- if (c == null && h == null) continue;
89
- return c == null ? 1 : -1;
107
+ const x = Array.isArray(d.sortBy) ? d.sortBy : [d.sortBy ?? d.dataIndex ?? d.key];
108
+ for (const f of x) {
109
+ const p = typeof f == "function" ? f(e) : v(e, f), y = typeof f == "function" ? f(t) : v(t, f);
110
+ if (p == null || y == null) {
111
+ if (p == null && y == null) continue;
112
+ return p == null ? 1 : -1;
90
113
  }
91
- const x = typeof c == "number" && typeof h == "number" ? Number.isNaN(c) ? Number.isNaN(h) ? 0 : 1 : Number.isNaN(h) ? -1 : c - h : s.compare(String(c), String(h));
92
- if (Number.isFinite(x) && x !== 0)
93
- return (a === "asc" ? 1 : -1) * x;
114
+ const b = typeof p == "number" && typeof y == "number" ? Number.isNaN(p) ? Number.isNaN(y) ? 0 : 1 : Number.isNaN(y) ? -1 : p - y : a.compare(String(p), String(y));
115
+ if (Number.isFinite(b) && b !== 0)
116
+ return (u === "asc" ? 1 : -1) * b;
94
117
  }
95
118
  }
96
119
  return 0;
97
120
  };
98
121
  }
99
- function w(n, r) {
100
- var o;
101
- const s = /* @__PURE__ */ new Map();
102
- for (const e of r) {
103
- const t = n[e.key];
122
+ function L(i, o) {
123
+ var s;
124
+ const a = /* @__PURE__ */ new Map();
125
+ for (const e of o) {
126
+ const t = i[e.key];
104
127
  if (!(t != null && t.length) || !e.filters || e.filterMethod) continue;
105
- const a = new Set(t), f = k(e.filters), m = new Map(f.map((l) => [l.value, l]));
106
- for (const l of t) {
107
- const c = (o = m.get(l)) == null ? void 0 : o.children;
108
- if (c)
109
- for (const h of k(c))
110
- a.add(h.value);
128
+ const u = new Set(t), d = S(e.filters), x = new Map(d.map((f) => [f.value, f]));
129
+ for (const f of t) {
130
+ const p = (s = x.get(f)) == null ? void 0 : s.children;
131
+ if (p)
132
+ for (const y of S(p))
133
+ u.add(y.value);
111
134
  }
112
- s.set(e.key, a);
135
+ a.set(e.key, u);
113
136
  }
114
- return (e) => r.every((t) => {
115
- const a = n[t.key];
116
- return a != null && a.length ? s.has(t.key) ? s.get(t.key).has(
117
- g(
137
+ return (e) => o.every((t) => {
138
+ const u = i[t.key];
139
+ return u != null && u.length ? a.has(t.key) ? a.get(t.key).has(
140
+ v(
118
141
  e,
119
142
  t.dataIndex ?? t.key
120
143
  )
121
- ) : a.some(
122
- (f) => t.filterMethod ? t.filterMethod(f, e, t) : String(g(e, t.dataIndex ?? t.key) ?? "").toLocaleLowerCase().includes(String(f).toLocaleLowerCase())
144
+ ) : u.some(
145
+ (d) => t.filterMethod ? t.filterMethod(d, e, t) : String(v(e, t.dataIndex ?? t.key) ?? "").toLocaleLowerCase().includes(String(d).toLocaleLowerCase())
123
146
  ) : !0;
124
147
  });
125
148
  }
126
- function k(n) {
127
- const r = [], s = /* @__PURE__ */ new Set(), o = [...n].reverse();
128
- for (; o.length; ) {
129
- const e = o.pop();
130
- s.has(e) || (s.add(e), r.push(e), e.children && o.push(...[...e.children].reverse()));
149
+ function S(i) {
150
+ const o = [], a = /* @__PURE__ */ new Set(), s = [...i].reverse();
151
+ for (; s.length; ) {
152
+ const e = s.pop();
153
+ a.has(e) || (a.add(e), o.push(e), e.children && s.push(...[...e.children].reverse()));
131
154
  }
132
- return r;
155
+ return o;
133
156
  }
134
- function C(n, r) {
135
- if (r.summary === "count") return n.length;
136
- const s = n.map((e) => g(e, r.dataIndex ?? r.key)).filter((e) => typeof e == "number" && Number.isFinite(e));
137
- if (!s.length) return "—";
138
- const o = s.reduce((e, t) => e + t, 0);
139
- return r.summary === "sum" ? +o.toFixed(12) : r.summary === "avg" ? +(o / s.length).toFixed(12) : r.summary === "min" ? s.reduce((e, t) => Math.min(e, t)) : r.summary === "max" ? s.reduce((e, t) => Math.max(e, t)) : "";
157
+ function A(i, o) {
158
+ if (o.summary === "count") return i.length;
159
+ const a = i.map((e) => v(e, o.dataIndex ?? o.key)).filter((e) => typeof e == "number" && Number.isFinite(e));
160
+ if (!a.length) return "—";
161
+ const s = a.reduce((e, t) => e + t, 0);
162
+ return o.summary === "sum" ? +s.toFixed(12) : o.summary === "avg" ? +(s / a.length).toFixed(12) : o.summary === "min" ? a.reduce((e, t) => Math.min(e, t)) : o.summary === "max" ? a.reduce((e, t) => Math.max(e, t)) : "";
140
163
  }
141
164
  export {
142
- M as tableBreakpoint,
143
- S as tableColumns,
144
- F as tableCompare,
145
- k as tableFilterOptions,
146
- w as tableFilterPredicate,
147
- C as tableSummary,
148
- N as tableToken,
149
- g as tableValue
165
+ F as tableBreakpoint,
166
+ I as tableColumns,
167
+ B as tableCompare,
168
+ S as tableFilterOptions,
169
+ L as tableFilterPredicate,
170
+ A as tableSummary,
171
+ C as tableToken,
172
+ v as tableValue
150
173
  };
@@ -0,0 +1,16 @@
1
+ function f(t, n) {
2
+ if (!n || typeof n == "string" && !n.length)
3
+ return [t];
4
+ if (n instanceof RegExp)
5
+ return t.split(new RegExp(n.source, n.flags.replace(/[gy]/g, ""))).filter((e) => e !== void 0);
6
+ const g = (typeof n == "string" ? [n] : [...n]).filter(Boolean).sort((e, i) => i.length - e.length);
7
+ return g.length ? t.split(
8
+ new RegExp(
9
+ g.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"),
10
+ "u"
11
+ )
12
+ ) : [t];
13
+ }
14
+ export {
15
+ f as splitTags
16
+ };
@@ -0,0 +1,19 @@
1
+ function n(e, i) {
2
+ return i.split(".").reduce(
3
+ (r, t) => r != null && typeof r == "object" ? r[t] : void 0,
4
+ e
5
+ );
6
+ }
7
+ const s = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", u = (e) => ({
8
+ primary: "var(--hys-ui-primary,var(--hys-ui-theme-primary))",
9
+ success: "var(--hys-ui-success,#16a46e)",
10
+ warning: "var(--hys-ui-warning,#d9860c)",
11
+ danger: "var(--hys-ui-red,var(--hys-ui-theme-red,#ed4556))",
12
+ info: "var(--hys-ui-info,#3867f5)",
13
+ neutral: "var(--hys-ui-muted,var(--hys-ui-theme-muted))"
14
+ })[e] || "var(--hys-ui-muted,var(--hys-ui-theme-muted))";
15
+ export {
16
+ n as timelineRead,
17
+ s as timelineText,
18
+ u as timelineTone
19
+ };
@@ -1,30 +1,30 @@
1
- const f = (e) => typeof e + ":" + e;
1
+ const d = (e) => typeof e + ":" + e;
2
2
  function l(e, a) {
3
3
  return a.split(".").reduce(
4
- (t, n) => t != null && Object.prototype.hasOwnProperty.call(Object(t), n) ? t[n] : void 0,
4
+ (t, o) => t != null && Object.prototype.hasOwnProperty.call(Object(t), o) ? t[o] : void 0,
5
5
  e
6
6
  );
7
7
  }
8
- function d(e) {
9
- var n, s, c;
8
+ function f(e) {
9
+ var o, s, c;
10
10
  const a = [], t = /* @__PURE__ */ new Map();
11
- for (const o of e.options) {
12
- if (!o || typeof o != "object") continue;
13
- const r = e.rowKey ? e.rowKey(o) : l(o, ((n = e.fieldNames) == null ? void 0 : n.value) ?? "value");
14
- if (typeof r != "string" && (typeof r != "number" || !Number.isFinite(r)) || t.has(r))
11
+ for (const n of e.options) {
12
+ if (!n || typeof n != "object") continue;
13
+ const i = e.rowKey ? e.rowKey(n) : l(n, ((o = e.fieldNames) == null ? void 0 : o.value) ?? "value");
14
+ if (typeof i != "string" && (typeof i != "number" || !Number.isFinite(i)) || t.has(i))
15
15
  continue;
16
- const i = {
17
- key: r,
16
+ const r = {
17
+ key: i,
18
18
  label: String(
19
- l(o, ((s = e.fieldNames) == null ? void 0 : s.label) ?? "label") ?? r
19
+ l(n, ((s = e.fieldNames) == null ? void 0 : s.label) ?? "label") ?? i
20
20
  ),
21
21
  disabled: !!l(
22
- o,
22
+ n,
23
23
  ((c = e.fieldNames) == null ? void 0 : c.disabled) ?? "disabled"
24
24
  ),
25
- option: o
25
+ option: n
26
26
  };
27
- a.push(i), t.set(i.key, i);
27
+ a.push(r), t.set(r.key, r);
28
28
  }
29
29
  return { rows: a, map: t };
30
30
  }
@@ -43,6 +43,8 @@ const u = (e) => ({
43
43
  moveLeft: "移除选中项",
44
44
  dragRight: "拖动到已选择区域",
45
45
  dragLeft: "拖动到待选择区域",
46
+ doubleClickRight: "双击移入已选择区域,也可拖拽移动",
47
+ doubleClickLeft: "双击移回待选择区域,也可拖拽移动",
46
48
  dragCount: "正在拖动 {count} 项",
47
49
  moved: "已{direction} {count} 项",
48
50
  added: "移入",
@@ -53,11 +55,11 @@ const u = (e) => ({
53
55
  lastPage: "末页",
54
56
  perPage: "每页条数",
55
57
  ...e
56
- }), g = (e, a) => e.replace(/\{(\w+)\}/g, (t, n) => String(a[n] ?? t));
58
+ }), g = (e, a) => e.replace(/\{(\w+)\}/g, (t, o) => String(a[o] ?? t));
57
59
  export {
58
60
  g as transferLabel,
59
- d as transferRows,
60
- f as transferToken,
61
+ f as transferRows,
62
+ d as transferToken,
61
63
  l as transferValue,
62
64
  u as transferWords
63
65
  };
@@ -0,0 +1,55 @@
1
+ const r = {
2
+ choose: "选择文件",
3
+ drag: "点击选择或拖入文件",
4
+ checking: "正在检查文件…",
5
+ localHint: "文件通过事件交给业务层上传",
6
+ uploadHint: "支持选择、拖入和上传进度管理",
7
+ files: "文件列表",
8
+ ready: "待上传",
9
+ uploading: "上传中",
10
+ success: "已完成",
11
+ error: "上传失败",
12
+ queued: "等待上传",
13
+ removing: "正在移除",
14
+ submit: "开始上传",
15
+ abort: "取消上传",
16
+ retry: "重试",
17
+ clear: "清空",
18
+ remove: "移除",
19
+ preview: "预览",
20
+ download: "下载",
21
+ empty: "暂无文件"
22
+ }, n = (t) => ["ready", "uploading", "success", "error"].includes(t.status ?? "") ? t.status : t.raw ? "ready" : "success", a = (t) => n(t) === "success" ? 100 : Number.isFinite(t.percentage) ? Math.max(0, Math.min(100, t.percentage)) : 0, o = (t) => {
23
+ var e, s;
24
+ return !!((s = t.type ?? ((e = t.raw) == null ? void 0 : e.type)) != null && s.startsWith("image/")) || /\.(png|jpe?g|gif|webp|avif|bmp|svg)(?:[?#]|$)/i.test(
25
+ t.name || t.url || ""
26
+ );
27
+ };
28
+ function c(t) {
29
+ return !Number.isFinite(t) || t < 0 ? "" : t < 1024 ? t + " B" : t < 1048576 ? (t / 1024).toFixed(1) + " KB" : (t / 1048576).toFixed(1) + " MB";
30
+ }
31
+ function i(t, e = "custom") {
32
+ return t instanceof Error ? Object.assign(new Error(t.message, { cause: t }), t, {
33
+ kind: t.kind ?? e
34
+ }) : Object.assign(new Error(typeof t == "string" ? t : "上传失败"), {
35
+ kind: e
36
+ });
37
+ }
38
+ function u(t, e = !1) {
39
+ if (t)
40
+ try {
41
+ const s = new URL(t, document.baseURI);
42
+ if (["http:", "https:", "blob:"].includes(s.protocol) || e && /^data:image\//i.test(t))
43
+ return s.href;
44
+ } catch {
45
+ }
46
+ }
47
+ export {
48
+ i as uploadFailure,
49
+ o as uploadImage,
50
+ r as uploadLocale,
51
+ a as uploadPercent,
52
+ c as uploadSize,
53
+ n as uploadStatus,
54
+ u as uploadUrl
55
+ };