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.
Files changed (247) hide show
  1. package/CHANGELOG.md +137 -1
  2. package/README.md +18 -6
  3. package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
  4. package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
  5. package/dist/components/HysAlert/HysAlert.vue.js +14 -14
  6. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
  9. package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
  10. package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
  11. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
  12. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
  13. package/dist/components/HysBadge/HysBadge.vue.js +2 -2
  14. package/dist/components/HysBadge/HysBadge2.vue.js +154 -26
  15. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
  16. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
  17. package/dist/components/HysButton/HysButton.vue.js +2 -2
  18. package/dist/components/HysButton/HysButton2.vue.js +29 -28
  19. package/dist/components/HysCalendar/HysCalendar.vue.js +5 -84
  20. package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
  21. package/dist/components/HysCard/HysCard.vue.js +1 -1
  22. package/dist/components/HysCard/HysCard2.vue.js +177 -44
  23. package/dist/components/HysCascader/HysCascader.vue.js +5 -182
  24. package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
  25. package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
  26. package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
  27. package/dist/components/HysCheckbox/HysCheckbox.vue.js +5 -39
  28. package/dist/components/HysCheckbox/HysCheckbox2.vue.js +200 -2
  29. package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
  30. package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
  31. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  32. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
  33. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
  34. package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
  35. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  36. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +397 -390
  37. package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
  38. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
  39. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
  40. package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
  41. package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
  42. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
  43. package/dist/components/HysDivider/HysDivider.vue.js +2 -2
  44. package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
  45. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  46. package/dist/components/HysDrawer/HysDrawer2.vue.js +55 -54
  47. package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
  48. package/dist/components/HysFileManager/HysFileManager2.vue.js +86 -2
  49. package/dist/components/HysForm/HysForm.vue.js +3 -3
  50. package/dist/components/HysForm/HysForm2.vue.js +580 -92
  51. package/dist/components/HysFormItem/HysFormItem.vue.js +5 -69
  52. package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
  53. package/dist/components/HysGantt/HysGantt.vue.js +5 -264
  54. package/dist/components/HysGantt/HysGantt2.vue.js +1399 -2
  55. package/dist/components/HysInput/HysInput.vue.js +2 -2
  56. package/dist/components/HysInput/HysInput2.vue.js +468 -120
  57. package/dist/components/HysMention/HysMention.vue.js +2 -2
  58. package/dist/components/HysMention/HysMention2.vue.js +89 -88
  59. package/dist/components/HysModal/HysModal.vue.js +2 -2
  60. package/dist/components/HysModal/HysModal2.vue.js +35 -35
  61. package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
  62. package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
  63. package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -70
  64. package/dist/components/HysOrgTree/HysOrgTree.vue.js +41 -36
  65. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  66. package/dist/components/HysPagination/HysPagination2.vue.js +93 -91
  67. package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
  68. package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +101 -2
  69. package/dist/components/HysRadio/HysRadio.vue.js +7 -0
  70. package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
  71. package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +5 -40
  72. package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +205 -2
  73. package/dist/components/HysRating/HysRating.vue.js +1 -1
  74. package/dist/components/HysRating/HysRating2.vue.js +288 -68
  75. package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
  76. package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
  77. package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +87 -67
  78. package/dist/components/HysSearch/HysSearch.vue.js +50 -38
  79. package/dist/components/HysSegmented/HysSegmented.vue.js +5 -58
  80. package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
  81. package/dist/components/HysSelect/HysSelect.vue.js +3 -2
  82. package/dist/components/HysSelect/HysSelect2.vue.js +859 -164
  83. package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
  84. package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
  85. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  86. package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
  87. package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
  88. package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
  89. package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
  90. package/dist/components/HysSteps/HysSteps.vue.js +2 -2
  91. package/dist/components/HysSteps/HysSteps2.vue.js +111 -36
  92. package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
  93. package/dist/components/HysSwitch/HysSwitch2.vue.js +235 -42
  94. package/dist/components/HysTable/HysTable.vue.js +1 -1
  95. package/dist/components/HysTable/HysTable2.vue.js +1471 -82
  96. package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
  97. package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
  98. package/dist/components/HysTabs/HysTabs.vue.js +2 -2
  99. package/dist/components/HysTabs/HysTabs2.vue.js +262 -66
  100. package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
  101. package/dist/components/HysTextarea/HysTextarea.vue.js +137 -66
  102. package/dist/components/HysToast/HysToast.vue.js +2 -2
  103. package/dist/components/HysToast/HysToast2.vue.js +121 -38
  104. package/dist/components/HysTour/HysTour.vue.js +47 -42
  105. package/dist/components/HysTransfer/HysTransfer.vue.js +5 -207
  106. package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
  107. package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
  108. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
  109. package/dist/components/HysTree/HysTree.vue.js +2 -3
  110. package/dist/components/HysTree/HysTree2.vue.js +641 -301
  111. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -129
  112. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
  113. package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
  114. package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
  115. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  116. package/dist/components/HysUpload/HysUpload2.vue.js +97 -78
  117. package/dist/composables/autocomplete.js +50 -0
  118. package/dist/composables/avatar.js +57 -0
  119. package/dist/composables/calendar.js +96 -0
  120. package/dist/composables/cascader.js +79 -0
  121. package/dist/composables/choice.js +38 -0
  122. package/dist/composables/choiceModel.js +67 -0
  123. package/dist/composables/datePicker.js +227 -0
  124. package/dist/composables/formContext.js +94 -3
  125. package/dist/composables/formLayout.js +57 -0
  126. package/dist/composables/formValidation.js +240 -0
  127. package/dist/composables/ganttConflicts.js +143 -0
  128. package/dist/composables/numberInput.js +91 -0
  129. package/dist/composables/rating.js +16 -0
  130. package/dist/composables/selectOptions.js +54 -0
  131. package/dist/composables/table.js +150 -0
  132. package/dist/composables/textInput.js +34 -0
  133. package/dist/composables/toastEscape.js +16 -0
  134. package/dist/composables/transfer.js +63 -0
  135. package/dist/composables/tree.js +118 -0
  136. package/dist/composables/treeSelect.js +71 -0
  137. package/dist/composables/useCascader.js +438 -0
  138. package/dist/composables/useDatePicker.js +425 -0
  139. package/dist/composables/useDialog.js +16 -16
  140. package/dist/composables/useFloating.js +98 -52
  141. package/dist/composables/useGanttDependencies.js +306 -0
  142. package/dist/composables/useGanttHistory.js +157 -0
  143. package/dist/composables/useGanttLabelResize.js +100 -0
  144. package/dist/composables/useHysToast.js +148 -0
  145. package/dist/composables/useTable.js +474 -0
  146. package/dist/composables/useTextareaSize.js +72 -0
  147. package/dist/composables/useTransfer.js +257 -0
  148. package/dist/composables/useTree.js +439 -0
  149. package/dist/composables/useTreeSelect.js +361 -0
  150. package/dist/config.js +18 -15
  151. package/dist/index.js +149 -136
  152. package/dist/style.css +1 -1
  153. package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
  154. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
  155. package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
  156. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
  157. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
  158. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
  159. package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
  160. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -29
  161. package/dist/types/components/HysCard/HysCard.vue.d.ts +57 -5
  162. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
  163. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
  164. package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +55 -27
  165. package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
  166. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
  167. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
  168. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
  169. package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
  170. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
  171. package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
  172. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -0
  173. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +8 -4
  174. package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
  175. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
  176. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +88 -4
  177. package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
  178. package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
  179. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -33
  180. package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +4 -1
  181. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
  182. package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
  183. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
  184. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
  185. package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
  186. package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +62 -17
  187. package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
  188. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
  189. package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
  190. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
  191. package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
  192. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -14
  193. package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
  194. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
  195. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
  196. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
  197. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +65 -9
  198. package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
  199. package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
  200. package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
  201. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
  202. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
  203. package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
  204. package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
  205. package/dist/types/components/HysTour/HysTour.vue.d.ts +5 -3
  206. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -30
  207. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
  208. package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
  209. package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
  210. package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
  211. package/dist/types/composables/autocomplete.d.ts +106 -0
  212. package/dist/types/composables/avatar.d.ts +70 -0
  213. package/dist/types/composables/calendar.d.ts +66 -0
  214. package/dist/types/composables/cascader.d.ts +192 -0
  215. package/dist/types/composables/choice.d.ts +110 -0
  216. package/dist/types/composables/choiceModel.d.ts +11 -0
  217. package/dist/types/composables/datePicker.d.ts +247 -0
  218. package/dist/types/composables/formContext.d.ts +138 -8
  219. package/dist/types/composables/formLayout.d.ts +11 -0
  220. package/dist/types/composables/formValidation.d.ts +13 -0
  221. package/dist/types/composables/gantt.d.ts +68 -0
  222. package/dist/types/composables/ganttConflicts.d.ts +30 -0
  223. package/dist/types/composables/numberInput.d.ts +45 -0
  224. package/dist/types/composables/rating.d.ts +18 -0
  225. package/dist/types/composables/segmented.d.ts +15 -0
  226. package/dist/types/composables/selectOptions.d.ts +44 -0
  227. package/dist/types/composables/slider.d.ts +21 -0
  228. package/dist/types/composables/table.d.ts +309 -0
  229. package/dist/types/composables/textInput.d.ts +76 -0
  230. package/dist/types/composables/toastEscape.d.ts +1 -0
  231. package/dist/types/composables/transfer.d.ts +180 -0
  232. package/dist/types/composables/tree.d.ts +237 -0
  233. package/dist/types/composables/treeSelect.d.ts +167 -0
  234. package/dist/types/composables/useCascader.d.ts +162 -0
  235. package/dist/types/composables/useDatePicker.d.ts +79 -0
  236. package/dist/types/composables/useFloating.d.ts +8 -5
  237. package/dist/types/composables/useGanttDependencies.d.ts +83 -0
  238. package/dist/types/composables/useGanttHistory.d.ts +42 -0
  239. package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
  240. package/dist/types/composables/useHysToast.d.ts +50 -0
  241. package/dist/types/composables/useTable.d.ts +60 -0
  242. package/dist/types/composables/useTextareaSize.d.ts +3 -0
  243. package/dist/types/composables/useTransfer.d.ts +58 -0
  244. package/dist/types/composables/useTree.d.ts +77 -0
  245. package/dist/types/composables/useTreeSelect.d.ts +117 -0
  246. package/dist/types/index.d.ts +38 -7
  247. package/package.json +47 -11
@@ -1,360 +1,700 @@
1
- import { defineComponent as he, ref as p, computed as s, watch as j, onDeactivated as fe, openBlock as r, createElementBlock as c, mergeProps as W, unref as I, withDirectives as pe, vModelText as ye, createCommentVNode as w, createElementVNode as E, normalizeStyle as F, Fragment as me, renderList as be, normalizeClass as ge, withModifiers as G, createBlock as J, resolveDynamicComponent as ke, toDisplayString as O, renderSlot as we, Teleport as Ce, withKeys as De, nextTick as Ke } from "vue";
2
- import { useHysRootAttrs as Ae } from "../../config.js";
3
- import { LoaderCircle as Me, ChevronDown as Se, ChevronRight as Te } from "lucide-vue-next";
4
- const Ie = ["disabled"], Be = ["aria-multiselectable"], Ve = ["aria-level", "aria-expanded", "aria-selected", "aria-disabled", "aria-checked", "tabindex", "draggable", "data-tree-id", "onFocus", "onKeydown", "onClick", "onDragstart", "onDragover", "onDrop", "onContextmenu", "data-drop-position"], $e = ["aria-label", "disabled", "onClick"], He = {
1
+ import { defineComponent as sa, useId as ua, ref as p, provide as ra, computed as E, onActivated as ca, watch as Z, shallowRef as va, onDeactivated as ya, onBeforeUnmount as fa, openBlock as r, createElementBlock as h, mergeProps as B, unref as l, createBlock as R, withCtx as ue, createVNode as w, createCommentVNode as M, createElementVNode as Y, normalizeStyle as re, normalizeClass as Se, withModifiers as X, renderSlot as H, createTextVNode as P, toDisplayString as S, Fragment as xe, renderList as ha, resolveDynamicComponent as ze, Teleport as ka, nextTick as _ } from "vue";
2
+ import { Search as ga, LoaderCircle as Ae, ChevronDown as pa, ChevronRight as ma, GripVertical as ba } from "lucide-vue-next";
3
+ import Ca from "../HysInput/HysInput.vue.js";
4
+ import xa from "../HysCheckbox/HysCheckbox.vue.js";
5
+ import De from "../HysButton/HysButton.vue.js";
6
+ import { useHysRootAttrs as Da } from "../../config.js";
7
+ import { useHysControlState as Ta, useHysFormItemContext as Ka, fieldKey as Na } from "../../composables/formContext.js";
8
+ import { useTree as Ea } from "../../composables/useTree.js";
9
+ const Ba = ["data-size"], Ma = ["id", "tabindex", "aria-label", "aria-multiselectable", "aria-disabled", "aria-busy", "aria-invalid", "aria-describedby"], Ha = {
10
+ key: 0,
11
+ class: "hys-ui-tree-loading",
12
+ role: "status"
13
+ }, Sa = ["aria-level", "aria-posinset", "aria-setsize", "aria-expanded", "aria-selected", "aria-disabled", "aria-checked", "tabindex", "draggable", "data-tree-id", "data-tree-key", "data-drop-position", "onFocus", "onKeydown", "onClick", "onDblclick", "onDragstart", "onDragover", "onDragleave", "onDrop", "onContextmenu"], za = ["aria-label", "disabled", "onClick"], Aa = {
5
14
  key: 1,
6
- class: "hys-ui-pf-tree-spacer",
7
- "aria-hidden": "true"
8
- }, Ee = ["checked", "disabled", "aria-label", "indeterminate", "onChange"], Le = {
15
+ class: "hys-ui-pf-tree-spacer"
16
+ }, $a = {
9
17
  key: 3,
18
+ class: "hys-ui-tree-icon",
10
19
  "aria-hidden": "true"
11
- }, Ne = { class: "hys-ui-pf-tree-label" }, Re = {
12
- key: 4,
13
- class: "hys-ui-pf-tree-error",
14
- role: "alert"
15
- }, qe = {
16
- key: 2,
20
+ }, Ia = { class: "hys-ui-pf-tree-label" }, Va = ["disabled", "onClick"], Fa = {
21
+ key: 1,
17
22
  class: "hys-ui-pf-tree-empty"
18
- }, Pe = /* @__PURE__ */ he({
23
+ }, Ga = /* @__PURE__ */ sa({
19
24
  __name: "HysTree",
20
25
  props: {
21
26
  nodes: {},
22
27
  modelValue: {},
23
- checkedKeys: { default: () => [] },
28
+ defaultValue: {},
29
+ checkedKeys: {},
30
+ defaultCheckedKeys: {},
31
+ halfCheckedKeys: {},
24
32
  expandedKeys: {},
33
+ defaultExpandedKeys: {},
34
+ loadedKeys: {},
25
35
  multiple: { type: Boolean },
36
+ selectable: { type: Boolean, default: !0 },
26
37
  checkable: { type: Boolean },
27
38
  searchable: { type: Boolean, default: !0 },
28
39
  disabled: { type: Boolean },
40
+ inheritDisabled: { type: Boolean },
41
+ loading: { type: Boolean },
42
+ size: {},
29
43
  defaultExpandAll: { type: Boolean },
44
+ autoExpandParent: { type: Boolean },
45
+ accordion: { type: Boolean },
46
+ expandOnClickNode: { type: Boolean },
47
+ expandOnDoubleClick: { type: Boolean },
48
+ checkOnClickNode: { type: Boolean },
49
+ checkOnClickLeaf: { type: Boolean },
50
+ selectOnClickNode: { type: Boolean, default: !0 },
51
+ allowDeselect: { type: Boolean },
52
+ highlightCurrent: { type: Boolean, default: !0 },
53
+ fieldNames: {},
54
+ nodeKey: {},
30
55
  showLine: { type: Boolean },
56
+ showIcon: { type: Boolean, default: !0 },
57
+ indent: { default: 20 },
58
+ blockNode: { type: Boolean, default: !0 },
31
59
  virtual: { type: Boolean },
32
60
  rowHeight: { default: 38 },
33
61
  viewportHeight: { default: 340 },
62
+ overscan: { default: 4 },
34
63
  draggable: { type: Boolean },
64
+ dragExpandDelay: { default: 700 },
65
+ allowDrag: {},
66
+ allowDrop: {},
35
67
  contextMenu: { type: Boolean },
36
68
  checkStrictly: { type: Boolean },
69
+ searchValue: {},
70
+ defaultSearchValue: {},
71
+ searchPlaceholder: {},
37
72
  filterNode: {},
38
- loadChildren: {}
73
+ filterMode: {},
74
+ showMatchedChildren: { type: Boolean },
75
+ emptyText: {},
76
+ ariaLabel: {},
77
+ locale: {},
78
+ loadChildren: {},
79
+ renderContent: {},
80
+ nodeClass: {},
81
+ nodeStyle: {},
82
+ validateEvent: { type: Boolean, default: !0 }
39
83
  },
40
- emits: ["update:modelValue", "update:checkedKeys", "update:expandedKeys", "select", "check", "node-drop", "node-contextmenu", "load-error", "children-loaded"],
41
- setup(i, { expose: ee, emit: le }) {
42
- const P = Ae(), d = i, v = le, b = p(""), C = p({}), K = p([]), M = p({}), S = p(0), A = p(""), B = p(""), Y = p("inside"), h = p(null), V = p(""), m = p(null), u = s(() => {
43
- const e = /* @__PURE__ */ new Map(), t = (l, n = 0, a, o = /* @__PURE__ */ new Set()) => {
44
- var H, k;
45
- for (const y of l)
46
- e.has(y.id) || o.has(y.id) || (e.set(y.id, { node: y, depth: n, parentId: a, hasChildren: !!((H = y.children) != null && H.length || (k = C.value[y.id]) != null && k.length || y.hasChildren) }), t(C.value[y.id] ?? y.children ?? [], n + 1, y.id, /* @__PURE__ */ new Set([...o, y.id])));
47
- };
48
- return t(d.nodes), e;
49
- }), $ = p([]);
50
- j(() => [d.nodes, d.defaultExpandAll], () => {
51
- d.defaultExpandAll && d.expandedKeys === void 0 && ($.value = [...u.value.values()].filter((e) => e.hasChildren).map((e) => e.node.id));
52
- }, { immediate: !0, deep: !0 }), j(() => d.nodes, () => {
53
- C.value = {}, M.value = {}, S.value = 0;
54
- }, { deep: !1 });
55
- const f = s(() => d.expandedKeys ?? $.value), te = s(() => {
56
- const e = /* @__PURE__ */ new Set(), t = b.value.trim().toLocaleLowerCase();
57
- if (!t) return e;
58
- for (const l of u.value.values()) {
59
- if (!(d.filterNode ? d.filterNode(t, l.node) : l.node.label.toLocaleLowerCase().includes(t))) continue;
60
- let n = l;
61
- for (; n; )
62
- e.add(n.node.id), n = n.parentId ? u.value.get(n.parentId) : void 0;
84
+ emits: ["update:modelValue", "update:checkedKeys", "update:expandedKeys", "update:loadedKeys", "update:searchValue", "update:nodes", "select", "check", "check-change", "selection-change", "node-click", "node-expand", "node-collapse", "node-drop", "node-drag-start", "node-drag-over", "node-drag-end", "node-contextmenu", "load-error", "children-loaded", "load", "data-change", "search", "scroll", "focus", "blur"],
85
+ setup(o, { expose: $e, emit: Ie }) {
86
+ const i = o, m = Ie, ce = Da(), ee = Ta(i), U = Ka(), Ve = ua(), ae = p(), y = p(), Te = p();
87
+ ra(Na, void 0);
88
+ const s = Ea(
89
+ i,
90
+ ee.disabled,
91
+ (e, ...a) => m(e, ...a),
92
+ () => {
93
+ i.validateEvent && U.validate("change");
94
+ }
95
+ ), {
96
+ index: G,
97
+ visible: k,
98
+ words: v,
99
+ busy: u,
100
+ live: ve,
101
+ query: q,
102
+ expanded: b,
103
+ selection: ye,
104
+ selected: Fe,
105
+ multiple: Le,
106
+ checked: W,
107
+ halfChecked: fe,
108
+ loadingKeys: he,
109
+ failures: Oe,
110
+ matches: Re,
111
+ expandNode: z,
112
+ setChecked: ke,
113
+ selectNode: ge,
114
+ filter: Ke
115
+ } = s, A = E(
116
+ () => Number.isFinite(i.rowHeight) ? Math.min(240, Math.max(24, i.rowHeight)) : 38
117
+ ), j = E(
118
+ () => Number.isFinite(i.viewportHeight) ? Math.min(1600, Math.max(80, i.viewportHeight)) : 340
119
+ ), Ne = E(
120
+ () => Number.isFinite(i.overscan) ? Math.min(30, Math.max(0, Math.floor(i.overscan))) : 4
121
+ ), Pe = E(
122
+ () => Number.isFinite(i.indent) ? Math.min(80, Math.max(0, i.indent)) : 20
123
+ ), V = p(0), te = p(0), $ = p(null), Ee = E(
124
+ () => i.virtual ? Math.max(0, Math.floor(V.value / A.value) - Ne.value) : 0
125
+ ), Ue = E(
126
+ () => i.virtual ? Math.min(
127
+ k.value.length,
128
+ Math.ceil(
129
+ (V.value + (te.value || j.value)) / A.value
130
+ ) + Ne.value
131
+ ) : k.value.length
132
+ ), qe = E(() => k.value.slice(Ee.value, Ue.value)), I = E(() => k.value.filter((e) => !e.disabled)), Ye = E(
133
+ () => {
134
+ var e;
135
+ return $.value !== null && k.value.some((a) => a.key === $.value && !a.disabled) ? $.value : (e = I.value[0]) == null ? void 0 : e.key;
63
136
  }
64
- return e;
65
- }), g = s(() => {
66
- const e = b.value.trim();
67
- return [...u.value.values()].filter((t) => {
68
- var n;
69
- if (e) return te.value.has(t.node.id);
70
- let l = t.parentId;
71
- for (; l; ) {
72
- if (!f.value.includes(l)) return !1;
73
- l = (n = u.value.get(l)) == null ? void 0 : n.parentId;
137
+ );
138
+ let J = 0, F = 0, x, pe = 0;
139
+ function Xe() {
140
+ x == null || x.disconnect(), i.virtual && y.value && typeof ResizeObserver < "u" && (x = new ResizeObserver((e) => {
141
+ var a;
142
+ te.value = ((a = e[0]) == null ? void 0 : a.contentRect.height) || 0;
143
+ }), x.observe(y.value));
144
+ }
145
+ function Ge() {
146
+ pe++, cancelAnimationFrame(J), J = 0, x == null || x.disconnect(), x = void 0;
147
+ }
148
+ async function Be() {
149
+ const e = ++pe;
150
+ await _(), !(!ve.value || e !== pe || !y.value) && (y.value.scrollTop = F, V.value = y.value.scrollTop, Xe());
151
+ }
152
+ ca(Be), Z([y, () => i.virtual], Be);
153
+ function We(e) {
154
+ var a;
155
+ !ve.value || !((a = y.value) != null && a.isConnected) || (F = y.value.scrollTop, i.virtual && !J && (J = requestAnimationFrame(() => {
156
+ J = 0, V.value = F;
157
+ })), m("scroll", e));
158
+ }
159
+ function je() {
160
+ F = 0, V.value = 0, y.value && (y.value.scrollTop = 0);
161
+ }
162
+ Z(q, je), Z(
163
+ () => k.value.length,
164
+ () => {
165
+ if (y.value) {
166
+ const e = Math.max(
167
+ 0,
168
+ k.value.length * A.value - (te.value || j.value)
169
+ );
170
+ i.virtual && F > e && (F = e, V.value = e, y.value.scrollTop = e);
74
171
  }
75
- return !0;
76
- });
77
- }), L = s(() => new Set(d.checkedKeys)), Q = s(() => {
78
- var t;
79
- const e = /* @__PURE__ */ new Set();
80
- for (const l of u.value.values()) {
81
- if (!L.value.has(l.node.id)) continue;
82
- let n = l.parentId;
83
- for (; n; )
84
- L.value.has(n) || e.add(n), n = (t = u.value.get(n)) == null ? void 0 : t.parentId;
85
172
  }
86
- return e;
87
- });
88
- async function N(e) {
89
- var n;
90
- const t = u.value.get(e);
91
- if (!t) return;
92
- if (!f.value.includes(e) && t.node.hasChildren && !((n = t.node.children) != null && n.length) && !Object.prototype.hasOwnProperty.call(C.value, e) && d.loadChildren && !K.value.includes(e)) {
93
- K.value = [...K.value, e], delete M.value[e];
94
- try {
95
- const a = await d.loadChildren(t.node);
96
- C.value = { ...C.value, [e]: a }, v("children-loaded", { node: t.node, children: a });
97
- } catch (a) {
98
- M.value = { ...M.value, [e]: "加载失败,点击重试" }, v("load-error", { node: t.node, error: a });
99
- return;
100
- } finally {
101
- K.value = K.value.filter((a) => a !== e);
173
+ );
174
+ const le = /* @__PURE__ */ new Map();
175
+ function Je(e, a) {
176
+ a instanceof HTMLElement ? le.set(e, a) : le.delete(e);
177
+ }
178
+ async function Me(e) {
179
+ if (u.value) return;
180
+ e.key !== void 0 && (await s.setExpandedKeys([
181
+ .../* @__PURE__ */ new Set([...s.rawExpanded.value, ...s.ancestors(e.key)])
182
+ ]), await _());
183
+ const a = y.value;
184
+ if (!a) return;
185
+ let t = e.top ?? a.scrollTop;
186
+ if (e.key !== void 0) {
187
+ const d = k.value.findIndex((n) => n.key === e.key);
188
+ if (d < 0) return;
189
+ if (i.virtual) {
190
+ const n = d * A.value, c = n + A.value, N = te.value || j.value;
191
+ t = e.align === "top" ? n : e.align === "bottom" ? c - N : n < a.scrollTop ? n : c > a.scrollTop + N ? c - N : a.scrollTop;
192
+ } else {
193
+ const n = le.get(e.key);
194
+ if (n) {
195
+ const c = n.getBoundingClientRect().top - a.getBoundingClientRect().top + a.scrollTop, N = c + n.offsetHeight;
196
+ t = e.align === "top" ? c : e.align === "bottom" ? N - a.clientHeight : c < a.scrollTop ? c : N > a.scrollTop + a.clientHeight ? N - a.clientHeight : a.scrollTop;
197
+ }
102
198
  }
103
199
  }
104
- const l = f.value.includes(e) ? f.value.filter((a) => a !== e) : [...f.value, e];
105
- d.expandedKeys === void 0 && ($.value = l), v("update:expandedKeys", l);
200
+ t = Math.max(0, Number.isFinite(t) ? t + (e.offset ?? 0) : 0), F = t, V.value = t, e.behavior === "smooth" && a.scrollTo ? a.scrollTo({ top: t, behavior: "smooth" }) : a.scrollTop = t, await _();
106
201
  }
107
- const R = s(() => new Set((Array.isArray(d.modelValue) ? d.modelValue : [d.modelValue]).filter((e) => typeof e == "string")));
108
- function q(e) {
109
- d.disabled || e.node.disabled || e.node.selectable === !1 || (v("update:modelValue", d.multiple || Array.isArray(d.modelValue) ? R.value.has(e.node.id) ? [...R.value].filter((t) => t !== e.node.id) : [...R.value, e.node.id] : e.node.id), v("select", e.node), V.value = e.node.id);
202
+ async function L(e) {
203
+ var d, n, c;
204
+ if (u.value) return;
205
+ const a = e ?? ($.value !== null ? $.value : void 0) ?? ((d = I.value[0]) == null ? void 0 : d.key);
206
+ if (a === void 0) {
207
+ (n = Te.value) == null || n.focus();
208
+ return;
209
+ }
210
+ const t = G.value.map.get(a);
211
+ !t || t.disabled || (await Me({ key: a }), !(!ve.value || !k.value.some((N) => N.key === a)) && ($.value = a, await _(), (c = le.get(a)) == null || c.focus({ preventScroll: !!i.virtual })));
110
212
  }
111
- function ne(e) {
112
- const t = [], l = (n) => {
113
- const a = u.value.get(n);
114
- if (a) {
115
- !a.node.disabled && a.node.checkable !== !1 && t.push(n);
116
- for (const o of C.value[n] ?? a.node.children ?? []) l(o.id);
117
- }
213
+ function C(e) {
214
+ return {
215
+ node: e.node,
216
+ key: e.key,
217
+ label: e.label,
218
+ depth: e.depth,
219
+ expanded: b.value.has(e.key) || !!q.value.trim() && i.filterMode !== "highlight",
220
+ selected: ye.value.has(e.key),
221
+ checked: W.value.has(e.key),
222
+ indeterminate: fe.value.has(e.key),
223
+ disabled: u.value || e.disabled,
224
+ loading: he.value.has(e.key),
225
+ leaf: !e.hasChildren
118
226
  };
119
- return l(e), t;
120
227
  }
121
- function Z(e) {
122
- if (d.disabled || e.node.disabled || e.node.checkable === !1) return;
123
- const t = d.checkStrictly ? [e.node.id] : ne(e.node.id), l = new Set(d.checkedKeys), n = !t.every((o) => l.has(o));
124
- for (const o of t)
125
- n ? l.add(o) : l.delete(o);
126
- for (const o of d.checkStrictly ? [] : [...u.value.values()].reverse()) {
127
- if (!o.hasChildren || o.node.disabled || o.node.checkable === !1) continue;
128
- const H = (C.value[o.node.id] ?? o.node.children ?? []).filter((k) => !k.disabled && k.checkable !== !1).map((k) => k.id);
129
- H.length && H.every((k) => l.has(k)) ? l.add(o.node.id) : l.delete(o.node.id);
130
- }
131
- const a = [...l];
132
- v("update:checkedKeys", a), v("check", a);
228
+ const ne = (e, a) => e instanceof Element && !!e.closest(
229
+ 'button,input,textarea,select,a,[contenteditable="true"],[role="button"]'
230
+ ) && e !== a;
231
+ function Qe(e, a) {
232
+ ne(e.target, e.currentTarget) || u.value || a.disabled || ($.value = a.key, m("node-click", a.node, e), i.selectOnClickNode && ge(a, e), i.checkable && (i.checkOnClickNode || i.checkOnClickLeaf && !a.hasChildren) && ke(
233
+ a.key,
234
+ !W.value.has(a.key),
235
+ !i.checkStrictly,
236
+ e
237
+ ), i.expandOnClickNode && a.hasChildren && z(a.key, !b.value.has(a.key)));
133
238
  }
134
- function T(e) {
135
- const t = g.value;
136
- if (!t.length) return;
137
- const l = t[Math.max(0, Math.min(e, t.length - 1))];
138
- if (V.value = l.node.id, d.virtual && m.value) {
139
- const n = e * D.value, a = n + D.value;
140
- n < m.value.scrollTop ? m.value.scrollTop = n : a > m.value.scrollTop + z.value && (m.value.scrollTop = a - z.value), S.value = m.value.scrollTop;
141
- }
142
- Ke(() => {
143
- var a;
144
- const n = [...((a = m.value) == null ? void 0 : a.querySelectorAll("[data-tree-id]")) || []].find((o) => o.dataset.treeId === l.node.id);
145
- n == null || n.focus();
146
- });
239
+ function Ze(e, a) {
240
+ i.expandOnDoubleClick && !i.expandOnClickNode && !ne(e.target, e.currentTarget) && a.hasChildren && z(a.key, !b.value.has(a.key));
147
241
  }
148
- function ae(e, t) {
149
- const l = g.value.findIndex((n) => n.node.id === t.node.id);
150
- if (e.key === "ArrowDown")
151
- e.preventDefault(), T(l + 1);
152
- else if (e.key === "ArrowUp")
153
- e.preventDefault(), T(l - 1);
154
- else if (e.key === "Home")
155
- e.preventDefault(), T(0);
156
- else if (e.key === "End")
157
- e.preventDefault(), T(g.value.length - 1);
158
- else if (e.key === "ArrowRight")
159
- e.preventDefault(), t.hasChildren && !f.value.includes(t.node.id) ? N(t.node.id) : t.hasChildren && T(l + 1);
160
- else if (e.key === "ArrowLeft") {
161
- if (e.preventDefault(), t.hasChildren && f.value.includes(t.node.id)) N(t.node.id);
162
- else if (t.parentId) {
163
- const n = g.value.findIndex((a) => a.node.id === t.parentId);
164
- T(n);
165
- }
166
- } else e.key === "Enter" ? (e.preventDefault(), q(t)) : e.key === " " && (e.preventDefault(), d.checkable ? Z(t) : q(t));
242
+ function we(e, a) {
243
+ var d, n;
244
+ if (e.isComposing || e.keyCode === 229 || ne(e.target, e.currentTarget) || u.value)
245
+ return;
246
+ const t = I.value.findIndex((c) => c.key === a.key);
247
+ if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
248
+ e.preventDefault();
249
+ const c = e.key === "Home" ? 0 : e.key === "End" ? I.value.length - 1 : Math.max(
250
+ 0,
251
+ Math.min(
252
+ I.value.length - 1,
253
+ t + (e.key === "ArrowDown" ? 1 : -1)
254
+ )
255
+ );
256
+ L((d = I.value[c]) == null ? void 0 : d.key);
257
+ } else e.key === "ArrowRight" ? (e.preventDefault(), a.hasChildren && !b.value.has(a.key) ? z(a.key) : a.hasChildren && L((n = I.value[t + 1]) == null ? void 0 : n.key)) : e.key === "ArrowLeft" ? (e.preventDefault(), a.hasChildren && b.value.has(a.key) ? z(a.key, !1) : a.parent !== void 0 && L(a.parent)) : e.key === "Enter" ? (e.preventDefault(), ge(a, e)) : e.key === " " ? (e.preventDefault(), i.checkable ? ke(
258
+ a.key,
259
+ !W.value.has(a.key),
260
+ !i.checkStrictly,
261
+ e
262
+ ) : ge(a, e)) : e.key === "Escape" && (e.preventDefault(), f.value ? g() : D.value !== null ? O(e) : i.allowDeselect && s.setSelectedKeys([]));
167
263
  }
168
- const D = s(() => Math.max(24, d.rowHeight)), z = s(() => Math.max(120, d.viewportHeight)), U = s(() => d.virtual ? Math.max(0, Math.floor(S.value / D.value) - 5) : 0), x = s(() => d.virtual ? Math.min(g.value.length, Math.ceil((S.value + z.value) / D.value) + 5) : g.value.length), de = s(() => g.value.slice(U.value, x.value)), oe = s(() => U.value * D.value), ie = s(() => Math.max(0, (g.value.length - x.value) * D.value));
169
- j([b, f], () => {
170
- S.value = 0, m.value && (m.value.scrollTop = 0);
171
- });
172
- function re(e) {
173
- S.value = e.target.scrollTop;
264
+ function _e(e) {
265
+ var a;
266
+ e.key === "Enter" && !e.isComposing && e.keyCode !== 229 ? e.preventDefault() : e.key === "ArrowDown" && !e.isComposing && (e.preventDefault(), L((a = I.value[0]) == null ? void 0 : a.key));
174
267
  }
175
- function ue(e, t) {
176
- var l;
177
- if (!d.draggable || d.disabled || t.node.disabled) {
268
+ const D = p(null), T = p(null), ie = p("inside");
269
+ let K, de, me = null;
270
+ function Q() {
271
+ clearTimeout(de), de = void 0, me = null;
272
+ }
273
+ function oe(e) {
274
+ (e.type === "blur" || e instanceof KeyboardEvent && e.key === "Escape") && O(e);
275
+ }
276
+ function O(e) {
277
+ const a = K;
278
+ D.value = null, T.value = null, K = void 0, Q(), window.removeEventListener("blur", oe), window.removeEventListener("keydown", oe, !0), a && m("node-drag-end", { node: a, event: e });
279
+ }
280
+ function ea(e, a) {
281
+ var t, d;
282
+ if (u.value || !i.draggable || a.disabled || ((t = i.allowDrag) == null ? void 0 : t.call(i, a.node)) === !1 || ne(e.target, e.currentTarget)) {
178
283
  e.preventDefault();
179
284
  return;
180
285
  }
181
- A.value = t.node.id, (l = e.dataTransfer) == null || l.setData("text/plain", t.node.id), e.dataTransfer && (e.dataTransfer.effectAllowed = "move");
286
+ O(), D.value = a.key, K = a.node, (d = e.dataTransfer) == null || d.setData("text/plain", String(a.key)), e.dataTransfer && (e.dataTransfer.effectAllowed = "move"), window.addEventListener("blur", oe), window.addEventListener("keydown", oe, !0), m("node-drag-start", { node: a.node, event: e });
287
+ }
288
+ function be(e, a) {
289
+ var d, n;
290
+ const t = D.value;
291
+ return t === null || t === e.key || u.value || !i.draggable || e.disabled || !K || ((d = G.value.map.get(t)) == null ? void 0 : d.node) !== K || s.ancestors(e.key).includes(t) || a === "inside" && e.leaf ? !1 : ((n = i.allowDrop) == null ? void 0 : n.call(i, K, e.node, a)) !== !1;
182
292
  }
183
- function se(e, t) {
184
- if (!d.draggable || !A.value || A.value === t.node.id) return;
185
- const l = u.value.get(A.value);
186
- let n = t;
187
- for (; n; ) {
188
- if (n.node.id === (l == null ? void 0 : l.node.id)) return;
189
- n = n.parentId ? u.value.get(n.parentId) : void 0;
293
+ function aa(e, a) {
294
+ const t = e.currentTarget.getBoundingClientRect(), d = (e.clientY - t.top) / (t.height || 1), n = d < 0.25 ? "before" : d > 0.75 ? "after" : "inside";
295
+ if (!be(a, n)) {
296
+ T.value = null, Q();
297
+ return;
190
298
  }
191
- e.preventDefault();
192
- const a = e.currentTarget.getBoundingClientRect(), o = (e.clientY - a.top) / a.height;
193
- Y.value = o < 0.25 ? "before" : o > 0.75 ? "after" : "inside", B.value = t.node.id;
299
+ e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), T.value = a.key, ie.value = n, m("node-drag-over", {
300
+ dragId: D.value,
301
+ targetId: a.key,
302
+ dragNode: K,
303
+ targetNode: a.node,
304
+ position: n,
305
+ event: e
306
+ }), n === "inside" && a.hasChildren && !b.value.has(a.key) && me !== a.key ? (Q(), me = a.key, Number.isFinite(i.dragExpandDelay) && i.dragExpandDelay >= 0 && (de = setTimeout(() => {
307
+ de = void 0, T.value === a.key && be(a, "inside") && z(a.key);
308
+ }, i.dragExpandDelay))) : n !== "inside" && Q();
309
+ }
310
+ function ta(e, a) {
311
+ (!(e.relatedTarget instanceof Node) || !e.currentTarget.contains(e.relatedTarget)) && (T.value === a.key && (T.value = null), Q());
194
312
  }
195
- function ce(e, t) {
196
- B.value !== t.node.id || !A.value || (e.preventDefault(), v("node-drop", { dragId: A.value, targetId: t.node.id, position: Y.value }), X());
313
+ function la(e, a) {
314
+ T.value === a.key && be(a, ie.value) && (e.preventDefault(), m("node-drop", {
315
+ dragId: D.value,
316
+ targetId: a.key,
317
+ position: ie.value,
318
+ dragNode: K,
319
+ targetNode: a.node,
320
+ event: e
321
+ })), O(e);
197
322
  }
198
- function X() {
199
- A.value = "", B.value = "";
323
+ Z(
324
+ () => [u.value, i.draggable, i.nodes],
325
+ () => {
326
+ var e;
327
+ (u.value || !i.draggable || D.value !== null && ((e = G.value.map.get(D.value)) == null ? void 0 : e.node) !== K) && O();
328
+ },
329
+ { flush: "sync" }
330
+ );
331
+ const f = va(), se = p(), Ce = p();
332
+ function g(e = !0) {
333
+ f.value = void 0, e && Ce.value !== void 0 && L(Ce.value);
200
334
  }
201
- function ve(e, t) {
202
- d.contextMenu && (e.preventDefault(), h.value = { node: t.node, x: Math.max(0, Math.min(e.clientX, window.innerWidth - 190)), y: Math.max(0, Math.min(e.clientY, window.innerHeight - 130)) }, v("node-contextmenu", { node: t.node, x: e.clientX, y: e.clientY }));
335
+ async function na(e, a) {
336
+ var t, d;
337
+ !i.contextMenu || u.value || a.disabled || (e.preventDefault(), Ce.value = a.key, f.value = {
338
+ node: a.node,
339
+ key: a.key,
340
+ x: Math.max(8, Math.min(e.clientX, window.innerWidth - 230)),
341
+ y: Math.max(8, Math.min(e.clientY, window.innerHeight - 155))
342
+ }, m("node-contextmenu", {
343
+ node: a.node,
344
+ x: e.clientX,
345
+ y: e.clientY,
346
+ event: e
347
+ }), await _(), (d = (t = se.value) == null ? void 0 : t.querySelector('button,[tabindex="0"]')) == null || d.focus());
203
348
  }
204
- function _(e) {
205
- const t = h.value;
206
- if (t) {
207
- if (e === "select") {
208
- const l = u.value.get(t.node.id);
209
- l && q(l);
210
- } else N(t.node.id);
211
- h.value = null;
349
+ function ia(e) {
350
+ var a, t;
351
+ if (e.key === "Escape")
352
+ e.preventDefault(), g();
353
+ else if (e.key === "Tab") g(!1);
354
+ else if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
355
+ e.preventDefault();
356
+ const d = [
357
+ ...((a = se.value) == null ? void 0 : a.querySelectorAll(
358
+ "[role=menuitem]:not(:disabled)"
359
+ )) ?? []
360
+ ], n = d.indexOf(document.activeElement), c = e.key === "Home" ? 0 : e.key === "End" ? d.length - 1 : (n + (e.key === "ArrowDown" ? 1 : -1) + d.length) % d.length;
361
+ (t = d[c]) == null || t.focus();
212
362
  }
213
363
  }
214
- return fe(() => {
215
- h.value = null, X();
216
- }), ee({ getNode: (e) => {
217
- var t;
218
- return (t = u.value.get(e)) == null ? void 0 : t.node;
219
- }, getCheckedKeys: () => [...d.checkedKeys], setCheckedKeys: (e) => {
220
- v("update:checkedKeys", e), v("check", e);
221
- }, filter: (e) => b.value = e, expandAll: () => {
222
- const e = [...u.value.values()].filter((t) => t.hasChildren).map((t) => t.node.id);
223
- $.value = e, v("update:expandedKeys", e);
224
- }, collapseAll: () => {
225
- $.value = [], v("update:expandedKeys", []);
226
- } }), (e, t) => (r(), c("div", W(I(P), {
227
- class: ["hys-ui-pf-tree", { "hys-ui-pf-tree-disabled": i.disabled }]
364
+ function da(e) {
365
+ var a;
366
+ (!(e.relatedTarget instanceof Node) || !((a = ae.value) != null && a.contains(e.relatedTarget))) && m("focus", e);
367
+ }
368
+ function oa(e) {
369
+ var a, t;
370
+ e.relatedTarget instanceof Node && ((a = ae.value) != null && a.contains(e.relatedTarget) || (t = se.value) != null && t.contains(e.relatedTarget)) || (m("blur", e), i.validateEvent && U.validate("blur"));
371
+ }
372
+ function He() {
373
+ O(), g(!1), Ge();
374
+ }
375
+ return Z(u, (e) => {
376
+ e && g(!1);
377
+ }), ya(He), fa(He), $e({
378
+ element: ae,
379
+ getNode: s.getNode,
380
+ getNodeInfo: s.getNodeInfo,
381
+ getCheckedKeys: s.getCheckedKeys,
382
+ getCheckedNodes: s.getCheckedNodes,
383
+ getHalfCheckedKeys: s.getHalfCheckedKeys,
384
+ getHalfCheckedNodes: () => s.checkInfo().halfCheckedNodes,
385
+ setCheckedKeys: s.setCheckedKeys,
386
+ setCheckedNodes: (e, a = !1) => s.setCheckedKeys(
387
+ e.flatMap((t) => {
388
+ var d;
389
+ return ((d = s.getNodeInfo(t)) == null ? void 0 : d.key) ?? [];
390
+ }),
391
+ a
392
+ ),
393
+ setChecked: s.setChecked,
394
+ getCurrentKey: s.getCurrentKey,
395
+ getCurrentNode: s.getCurrentNode,
396
+ getSelectedKeys: () => [...Fe.value],
397
+ setCurrentKey: s.setCurrentKey,
398
+ setCurrentNode: (e, a = !0) => {
399
+ var t;
400
+ return s.setCurrentKey(
401
+ e === null ? null : ((t = s.getNodeInfo(e)) == null ? void 0 : t.key) ?? null,
402
+ a
403
+ );
404
+ },
405
+ setSelectedKeys: s.setSelectedKeys,
406
+ getExpandedKeys: () => [...b.value],
407
+ setExpandedKeys: s.setExpandedKeys,
408
+ expandNode: z,
409
+ expandAll: () => s.setExpandedKeys(
410
+ G.value.rows.filter((e) => e.hasChildren).map((e) => e.key)
411
+ ),
412
+ collapseAll: () => s.setExpandedKeys([]),
413
+ filter: Ke,
414
+ reloadNode: s.reloadNode,
415
+ updateKeyChildren: s.updateKeyChildren,
416
+ append: s.append,
417
+ insertBefore: s.insertBefore,
418
+ insertAfter: s.insertAfter,
419
+ remove: s.remove,
420
+ scrollTo: Me,
421
+ focus: L
422
+ }), (e, a) => (r(), h("div", B({
423
+ ref_key: "element",
424
+ ref: ae
425
+ }, l(ce), {
426
+ class: ["hys-ui-pf-tree", {
427
+ "hys-ui-pf-tree-disabled": l(ee).disabled.value,
428
+ "hys-ui-tree-inline": !o.blockNode
429
+ }],
430
+ "data-size": l(ee).size.value,
431
+ onFocusin: da,
432
+ onFocusout: oa
228
433
  }), [
229
- i.searchable ? pe((r(), c("input", {
434
+ o.searchable ? (r(), R(Ca, {
230
435
  key: 0,
231
- "onUpdate:modelValue": t[0] || (t[0] = (l) => b.value = l),
232
- class: "hys-ui-pf-tree-search",
233
- type: "search",
234
- placeholder: "搜索节点…",
235
- "aria-label": "搜索树节点",
236
- disabled: i.disabled
237
- }, null, 8, Ie)), [
238
- [ye, b.value]
239
- ]) : w("", !0),
240
- E("div", {
436
+ ref_key: "search",
437
+ ref: Te,
438
+ class: "hys-ui-tree-search",
439
+ "data-hys-ui-form-internal": "",
440
+ "model-value": l(q),
441
+ placeholder: o.searchPlaceholder || l(v).search,
442
+ "aria-label": l(v).search,
443
+ disabled: l(u),
444
+ size: l(ee).size.value,
445
+ clearable: "",
446
+ "onUpdate:modelValue": l(Ke),
447
+ onKeydown: _e
448
+ }, {
449
+ prefix: ue(() => [
450
+ w(l(ga), {
451
+ size: 15,
452
+ "aria-hidden": "true"
453
+ })
454
+ ]),
455
+ _: 1
456
+ }, 8, ["model-value", "placeholder", "aria-label", "disabled", "size", "onUpdate:modelValue"])) : M("", !0),
457
+ Y("div", {
241
458
  ref_key: "root",
242
- ref: m,
459
+ ref: y,
460
+ id: l(U).id.value || l(Ve),
243
461
  role: "tree",
244
- "aria-multiselectable": i.multiple || i.checkable || Array.isArray(i.modelValue),
245
- "aria-label": "树形列表",
246
- class: "hys-ui-pf-tree-list",
247
- style: F({ maxHeight: z.value + "px" }),
248
- onScroll: re
462
+ "data-hys-ui-field-managed": "",
463
+ tabindex: l(u) ? -1 : 0,
464
+ onFocus: a[2] || (a[2] = X((t) => L(), ["self"])),
465
+ "aria-label": o.ariaLabel || l(U).label.value || l(v).tree,
466
+ "aria-multiselectable": l(Le) || o.checkable || void 0,
467
+ "aria-disabled": l(u) || void 0,
468
+ "aria-busy": o.loading || l(he).size > 0 || void 0,
469
+ "aria-invalid": l(U).invalid.value || void 0,
470
+ "aria-describedby": l(U).describedBy.value,
471
+ class: Se(["hys-ui-pf-tree-list", { "hys-ui-tree-virtual": o.virtual }]),
472
+ style: re({
473
+ maxHeight: j.value + "px",
474
+ height: o.virtual ? j.value + "px" : void 0,
475
+ "--hys-ui-tree-indent": Pe.value + "px",
476
+ "--hys-ui-tree-row-height": A.value + "px"
477
+ }),
478
+ onScroll: We
249
479
  }, [
250
- i.virtual ? (r(), c("div", {
251
- key: 0,
252
- style: F({ height: oe.value + "px" }),
253
- "aria-hidden": "true"
254
- }, null, 4)) : w("", !0),
255
- (r(!0), c(me, null, be(de.value, (l, n) => (r(), c("div", {
256
- key: l.node.id,
257
- class: ge(["hys-ui-pf-tree-row", { "hys-ui-pf-tree-selected": R.value.has(l.node.id), "hys-ui-pf-tree-line": i.showLine, "hys-ui-pf-tree-drop": B.value === l.node.id }]),
258
- role: "treeitem",
259
- "aria-level": l.depth + 1,
260
- "aria-expanded": l.hasChildren ? b.value.trim() ? !0 : f.value.includes(l.node.id) : void 0,
261
- "aria-selected": i.modelValue === l.node.id,
262
- "aria-disabled": i.disabled || l.node.disabled,
263
- "aria-checked": i.checkable ? L.value.has(l.node.id) ? "true" : Q.value.has(l.node.id) ? "mixed" : "false" : void 0,
264
- tabindex: V.value === l.node.id || !V.value && n === 0 && U.value === 0 ? 0 : -1,
265
- draggable: i.draggable && !i.disabled && !l.node.disabled,
266
- "data-tree-id": l.node.id,
267
- onFocus: (a) => V.value = l.node.id,
268
- onKeydown: (a) => ae(a, l),
269
- onClick: (a) => q(l),
270
- onDragstart: (a) => ue(a, l),
271
- onDragover: (a) => se(a, l),
272
- onDrop: (a) => ce(a, l),
273
- onDragend: X,
274
- onContextmenu: (a) => ve(a, l),
275
- "data-drop-position": B.value === l.node.id ? Y.value : void 0,
276
- style: F({ "--hys-ui-tree-depth": l.depth, minHeight: i.virtual ? D.value + "px" : void 0, height: i.virtual ? D.value + "px" : void 0 })
480
+ o.loading ? (r(), h("div", Ha, [
481
+ H(e.$slots, "loading", {}, () => [
482
+ w(l(Ae), {
483
+ size: 18,
484
+ class: "hys-ui-icon-spin",
485
+ "aria-hidden": "true"
486
+ }),
487
+ P(S(l(v).loading), 1)
488
+ ], !0)
489
+ ])) : M("", !0),
490
+ Y("div", {
491
+ class: "hys-ui-tree-space",
492
+ style: re(
493
+ o.virtual ? { height: l(k).length * A.value + "px" } : void 0
494
+ )
277
495
  }, [
278
- l.hasChildren ? (r(), c("button", {
279
- key: 0,
280
- class: "hys-ui-pf-tree-expander",
281
- type: "button",
282
- "aria-label": f.value.includes(l.node.id) ? "折叠" : "展开",
283
- disabled: i.disabled || l.node.disabled || K.value.includes(l.node.id),
284
- onClick: G((a) => N(l.node.id), ["stop"])
496
+ Y("div", {
497
+ class: "hys-ui-tree-rows",
498
+ style: re(
499
+ o.virtual ? {
500
+ position: "absolute",
501
+ top: Ee.value * A.value + "px",
502
+ insetInline: "0"
503
+ } : void 0
504
+ )
285
505
  }, [
286
- K.value.includes(l.node.id) ? (r(), J(I(Me), {
287
- key: 0,
288
- size: 15,
289
- "aria-hidden": "true",
290
- class: "hys-ui-icon-spin"
291
- })) : (r(), J(ke(b.value.trim() || f.value.includes(l.node.id) ? I(Se) : I(Te)), {
292
- key: 1,
293
- size: 15,
294
- "aria-hidden": "true"
295
- }))
296
- ], 8, $e)) : (r(), c("span", He)),
297
- i.checkable ? (r(), c("input", {
298
- key: 2,
299
- type: "checkbox",
300
- checked: L.value.has(l.node.id),
301
- disabled: i.disabled || l.node.disabled || l.node.checkable === !1,
302
- "aria-label": `勾选${l.node.label}`,
303
- indeterminate: Q.value.has(l.node.id),
304
- onClick: t[1] || (t[1] = G(() => {
305
- }, ["stop"])),
306
- onChange: (a) => Z(l)
307
- }, null, 40, Ee)) : w("", !0),
308
- l.node.icon ? (r(), c("span", Le, O(l.node.icon), 1)) : w("", !0),
309
- we(e.$slots, "node", {
310
- node: l.node,
311
- depth: l.depth,
312
- expanded: f.value.includes(l.node.id),
313
- selected: i.modelValue === l.node.id
314
- }, () => [
315
- E("span", Ne, O(l.node.label), 1)
316
- ], !0),
317
- M.value[l.node.id] ? (r(), c("span", Re, O(M.value[l.node.id]), 1)) : w("", !0)
318
- ], 46, Ve))), 128)),
319
- i.virtual ? (r(), c("div", {
320
- key: 1,
321
- style: F({ height: ie.value + "px" }),
322
- "aria-hidden": "true"
323
- }, null, 4)) : w("", !0),
324
- g.value.length ? w("", !0) : (r(), c("div", qe, O(b.value ? "无匹配节点" : "暂无数据"), 1))
325
- ], 44, Be),
326
- (r(), J(Ce, { to: "body" }, [
327
- h.value ? (r(), c("div", W({ key: 0 }, I(P), {
328
- class: "hys-ui-pf-tree-context",
329
- style: { left: h.value.x + "px", top: h.value.y + "px" },
330
- role: "menu",
331
- onKeydown: t[5] || (t[5] = De((l) => h.value = null, ["esc"]))
332
- }), [
333
- E("button", {
334
- type: "button",
335
- role: "menuitem",
336
- onClick: t[2] || (t[2] = (l) => _("select"))
337
- }, "选择节点"),
338
- E("button", {
339
- type: "button",
340
- role: "menuitem",
341
- onClick: t[3] || (t[3] = (l) => _("expand"))
342
- }, "展开 / 折叠"),
343
- E("button", {
344
- type: "button",
345
- role: "menuitem",
346
- onClick: t[4] || (t[4] = (l) => h.value = null)
347
- }, "关闭")
348
- ], 16)) : w("", !0),
349
- h.value ? (r(), c("div", W({ key: 1 }, I(P), {
350
- class: "hys-ui-pf-tree-context-backdrop",
351
- onClick: t[6] || (t[6] = (l) => h.value = null),
352
- onContextmenu: t[7] || (t[7] = G((l) => h.value = null, ["prevent"]))
353
- }), null, 16)) : w("", !0)
506
+ (r(!0), h(xe, null, ha(qe.value, (t) => {
507
+ var d;
508
+ return r(), h("div", {
509
+ key: typeof t.key + ":" + t.key,
510
+ ref_for: !0,
511
+ ref: (n) => Je(t.key, n),
512
+ class: Se(["hys-ui-pf-tree-row", [
513
+ typeof o.nodeClass == "function" ? o.nodeClass(t.node) : o.nodeClass,
514
+ {
515
+ "hys-ui-pf-tree-selected": o.highlightCurrent && l(ye).has(t.key),
516
+ "hys-ui-pf-tree-line": o.showLine,
517
+ "hys-ui-pf-tree-drop": T.value === t.key,
518
+ "hys-ui-tree-matched": l(q).trim() && l(Re).has(t.key),
519
+ "hys-ui-tree-row-disabled": t.disabled,
520
+ "hys-ui-tree-row-dragging": D.value === t.key
521
+ }
522
+ ]]),
523
+ style: re([
524
+ { "--hys-ui-tree-depth": t.depth },
525
+ typeof o.nodeStyle == "function" ? o.nodeStyle(t.node) : o.nodeStyle
526
+ ]),
527
+ role: "treeitem",
528
+ "aria-level": t.depth + 1,
529
+ "aria-posinset": t.pos,
530
+ "aria-setsize": t.size,
531
+ "aria-expanded": t.hasChildren ? C(t).expanded : void 0,
532
+ "aria-selected": o.selectable && t.selectable ? l(ye).has(t.key) : void 0,
533
+ "aria-disabled": l(u) || t.disabled || void 0,
534
+ "aria-checked": o.checkable && t.checkable ? l(fe).has(t.key) ? "mixed" : l(W).has(t.key) : void 0,
535
+ tabindex: !l(u) && Ye.value === t.key ? 0 : -1,
536
+ draggable: o.draggable && !l(u) && !t.disabled && ((d = o.allowDrag) == null ? void 0 : d.call(o, t.node)) !== !1,
537
+ "data-tree-id": t.key,
538
+ "data-tree-key": typeof t.key + ":" + t.key,
539
+ "data-drop-position": T.value === t.key ? ie.value : void 0,
540
+ onFocus: (n) => $.value = t.key,
541
+ onKeydown: (n) => we(n, t),
542
+ onClick: (n) => Qe(n, t),
543
+ onDblclick: (n) => Ze(n, t),
544
+ onDragstart: (n) => ea(n, t),
545
+ onDragover: (n) => aa(n, t),
546
+ onDragleave: (n) => ta(n, t),
547
+ onDrop: (n) => la(n, t),
548
+ onDragend: O,
549
+ onContextmenu: (n) => na(n, t)
550
+ }, [
551
+ t.hasChildren ? (r(), h("button", {
552
+ key: 0,
553
+ type: "button",
554
+ class: "hys-ui-pf-tree-expander",
555
+ "aria-label": (C(t).expanded ? l(v).collapse : l(v).expand) + " " + t.label,
556
+ disabled: l(u) || t.disabled,
557
+ tabindex: "-1",
558
+ onClick: X((n) => l(z)(t.key, !l(b).has(t.key)), ["stop"])
559
+ }, [
560
+ H(e.$slots, "switcher", B({ ref_for: !0 }, C(t)), () => [
561
+ l(he).has(t.key) ? (r(), R(l(Ae), {
562
+ key: 0,
563
+ size: 15,
564
+ class: "hys-ui-icon-spin",
565
+ "aria-hidden": "true"
566
+ })) : (r(), R(ze(C(t).expanded ? l(pa) : l(ma)), {
567
+ key: 1,
568
+ size: 15,
569
+ "aria-hidden": "true"
570
+ }))
571
+ ], !0)
572
+ ], 8, za)) : (r(), h("span", Aa, [
573
+ H(e.$slots, "switcher", B({ ref_for: !0 }, C(t)), void 0, !0)
574
+ ])),
575
+ o.checkable && t.checkable ? (r(), R(xa, {
576
+ key: 2,
577
+ tabindex: -1,
578
+ "model-value": l(W).has(t.key),
579
+ indeterminate: l(fe).has(t.key),
580
+ disabled: l(u) || t.checkboxDisabled,
581
+ "aria-label": l(v).check + " " + t.label,
582
+ onClick: a[0] || (a[0] = X(() => {
583
+ }, ["stop"])),
584
+ "onUpdate:modelValue": (n) => l(ke)(t.key, n, !o.checkStrictly)
585
+ }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label", "onUpdate:modelValue"])) : M("", !0),
586
+ o.showIcon && (t.icon || e.$slots.icon) ? (r(), h("span", $a, [
587
+ H(e.$slots, "icon", B({ ref_for: !0 }, C(t)), () => [
588
+ P(S(t.icon), 1)
589
+ ], !0)
590
+ ])) : M("", !0),
591
+ Y("span", Ia, [
592
+ H(e.$slots, "node", B({ ref_for: !0 }, C(t)), () => [
593
+ H(e.$slots, "default", B({ ref_for: !0 }, C(t)), () => [
594
+ o.renderContent ? (r(), R(ze(() => o.renderContent(C(t))), { key: 0 })) : (r(), h(xe, { key: 1 }, [
595
+ P(S(t.label), 1)
596
+ ], 64))
597
+ ], !0)
598
+ ], !0)
599
+ ]),
600
+ l(Oe).has(t.key) ? (r(), h("button", {
601
+ key: 4,
602
+ type: "button",
603
+ class: "hys-ui-tree-retry",
604
+ disabled: l(u) || t.disabled,
605
+ onClick: X((n) => l(s).reloadNode(t.key), ["stop"])
606
+ }, S(l(v).loadError) + " · " + S(l(v).retry), 9, Va)) : M("", !0),
607
+ e.$slots.actions ? (r(), h("span", {
608
+ key: 5,
609
+ class: "hys-ui-tree-actions",
610
+ onClick: a[1] || (a[1] = X(() => {
611
+ }, ["stop"]))
612
+ }, [
613
+ H(e.$slots, "actions", B({ ref_for: !0 }, C(t)), void 0, !0)
614
+ ])) : M("", !0),
615
+ o.draggable ? (r(), R(l(ba), {
616
+ key: 6,
617
+ class: "hys-ui-tree-grip",
618
+ size: 13,
619
+ "aria-hidden": "true"
620
+ })) : M("", !0)
621
+ ], 46, Sa);
622
+ }), 128))
623
+ ], 4)
624
+ ], 4),
625
+ !l(k).length && !o.loading ? (r(), h("div", Fa, [
626
+ H(e.$slots, "empty", { query: l(q) }, () => [
627
+ P(S(l(q).trim() ? l(v).noMatch : o.emptyText || l(v).empty), 1)
628
+ ], !0)
629
+ ])) : M("", !0)
630
+ ], 46, Ma),
631
+ (r(), R(ka, { to: "body" }, [
632
+ f.value ? (r(), h(xe, { key: 0 }, [
633
+ Y("div", B(l(ce), {
634
+ class: "hys-ui-tree-menu-backdrop",
635
+ onClick: a[3] || (a[3] = (t) => g()),
636
+ onContextmenu: a[4] || (a[4] = X((t) => g(), ["prevent"]))
637
+ }), null, 16),
638
+ Y("div", B({
639
+ ref_key: "menuPanel",
640
+ ref: se
641
+ }, l(ce), {
642
+ class: "hys-ui-tree-context",
643
+ style: { left: f.value.x + "px", top: f.value.y + "px" },
644
+ role: "menu",
645
+ onKeydown: ia
646
+ }), [
647
+ H(e.$slots, "contextmenu", {
648
+ node: f.value.node,
649
+ key: f.value.key,
650
+ close: g
651
+ }, () => {
652
+ var t;
653
+ return [
654
+ w(De, {
655
+ role: "menuitem",
656
+ variant: "ghost",
657
+ disabled: l(u),
658
+ onClick: a[5] || (a[5] = (d) => {
659
+ l(s).setCurrentKey(f.value.key), g();
660
+ })
661
+ }, {
662
+ default: ue(() => [
663
+ P(S(l(v).select), 1)
664
+ ]),
665
+ _: 1
666
+ }, 8, ["disabled"]),
667
+ w(De, {
668
+ role: "menuitem",
669
+ variant: "ghost",
670
+ disabled: l(u) || !((t = l(G).map.get(f.value.key)) != null && t.hasChildren),
671
+ onClick: a[6] || (a[6] = (d) => {
672
+ l(z)(f.value.key, !l(b).has(f.value.key)), g();
673
+ })
674
+ }, {
675
+ default: ue(() => [
676
+ P(S(l(b).has(f.value.key) ? l(v).collapse : l(v).expand), 1)
677
+ ]),
678
+ _: 1
679
+ }, 8, ["disabled"]),
680
+ w(De, {
681
+ role: "menuitem",
682
+ variant: "ghost",
683
+ onClick: a[7] || (a[7] = (d) => g())
684
+ }, {
685
+ default: ue(() => [
686
+ P(S(l(v).close), 1)
687
+ ]),
688
+ _: 1
689
+ })
690
+ ];
691
+ }, !0)
692
+ ], 16)
693
+ ], 64)) : M("", !0)
354
694
  ]))
355
- ], 16));
695
+ ], 16, Ba));
356
696
  }
357
697
  });
358
698
  export {
359
- Pe as default
699
+ Ga as default
360
700
  };