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,4 +1,762 @@
1
- import f from "./HysCascader.vue.js";
1
+ import { defineComponent as Ze, useAttrs as _e, ref as I, useId as ea, provide as aa, computed as x, watch as U, nextTick as j, onMounted as la, onUpdated as ta, onActivated as ia, onBeforeUnmount as oa, onDeactivated as na, openBlock as r, createElementBlock as u, mergeProps as ee, unref as a, createElementVNode as O, withModifiers as ae, renderSlot as f, createCommentVNode as m, toDisplayString as w, Fragment as H, renderList as fe, normalizeClass as Ae, createTextVNode as P, createBlock as E, resolveDynamicComponent as De, createVNode as V, withCtx as M, Teleport as sa, createSlots as He, normalizeProps as ra, guardReactiveProps as ua, normalizeStyle as da } from "vue";
2
+ import { X as Me, LoaderCircle as ye, ChevronDown as ca, Search as ha } from "lucide-vue-next";
3
+ import va from "../HysInput/HysInput.vue.js";
4
+ import me from "../HysButton/HysButton.vue.js";
5
+ import fa from "../HysTooltip/HysTooltip.vue.js";
6
+ import Re from "./HysCascaderColumn.vue.js";
7
+ import { useHysRootAttrs as ya } from "../../config.js";
8
+ import { useFloating as ma } from "../../composables/useFloating.js";
9
+ import { useHysControlState as ga, useHysFormItemContext as ba, fieldKey as pa } from "../../composables/formContext.js";
10
+ import { useCascader as ka } from "../../composables/useCascader.js";
11
+ import { cascaderToken as J } from "../../composables/cascader.js";
12
+ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-invalid", "aria-describedby", "aria-disabled", "tabindex"], xa = ["disabled"], Ca = ["id", "aria-controls", "aria-expanded", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], Ba = {
13
+ key: 0,
14
+ class: "hys-ui-cascader-prefix"
15
+ }, Sa = {
16
+ key: 1,
17
+ class: "hys-ui-cascader-placeholder"
18
+ }, Ta = {
19
+ key: 2,
20
+ class: "hys-ui-cascader-tags"
21
+ }, Pa = { class: "hys-ui-cascader-tag-label" }, Ea = ["disabled", "aria-label", "onClick"], za = ["aria-label"], $a = {
22
+ key: 3,
23
+ class: "hys-ui-cascader-value"
24
+ }, La = { class: "hys-ui-cascader-indicators" }, Aa = ["aria-label"], Da = ["name", "form", "value", "disabled"], Ha = ["id", "role", "aria-label", "aria-busy"], Ma = {
25
+ key: 0,
26
+ class: "hys-ui-cascader-header"
27
+ }, Ra = {
28
+ key: 2,
29
+ class: "hys-ui-cascader-status",
30
+ role: "status"
31
+ }, Wa = {
32
+ key: 3,
33
+ class: "hys-ui-cascader-status hys-ui-cascader-error",
34
+ role: "alert"
35
+ }, Na = {
36
+ key: 1,
37
+ class: "hys-ui-cascader-status",
38
+ role: "status"
39
+ }, Oa = {
40
+ class: "hys-ui-cascader-status",
41
+ role: "status"
42
+ }, Va = {
43
+ key: 6,
44
+ class: "hys-ui-cascader-footer"
45
+ }, Za = /* @__PURE__ */ Ze({
46
+ inheritAttrs: !1,
47
+ __name: "HysCascader",
48
+ props: {
49
+ options: {},
50
+ modelValue: {},
51
+ defaultValue: {},
52
+ cacheData: {},
53
+ fieldNames: {},
54
+ valueKey: {},
55
+ disabledMethod: {},
56
+ leafMethod: {},
57
+ disabled: { type: Boolean },
58
+ readonly: { type: Boolean },
59
+ loading: { type: Boolean },
60
+ size: {},
61
+ status: {},
62
+ placeholder: { default: "选择分类" },
63
+ ariaLabel: {},
64
+ name: {},
65
+ form: {},
66
+ autofocus: { type: Boolean },
67
+ multiple: { type: Boolean },
68
+ emitPath: { type: Boolean, default: !0 },
69
+ checkStrictly: { type: Boolean },
70
+ changeOnSelect: { type: Boolean },
71
+ showCheckedStrategy: { default: "child" },
72
+ checkOnClickNode: { type: Boolean },
73
+ checkOnClickLeaf: { type: Boolean, default: !0 },
74
+ showPrefix: { type: Boolean, default: !0 },
75
+ showAllLevels: { type: Boolean, default: !0 },
76
+ separator: { default: " / " },
77
+ displayRender: {},
78
+ clearable: { type: Boolean },
79
+ clearValue: {},
80
+ removable: { type: Boolean, default: !0 },
81
+ multipleLimit: {},
82
+ maxTagCount: { default: 3 },
83
+ maxTagTextLength: {},
84
+ filterable: { type: Boolean },
85
+ searchValue: {},
86
+ defaultSearchValue: {},
87
+ searchPlaceholder: {},
88
+ filterMethod: {},
89
+ searchSort: {},
90
+ searchLimit: { type: [Number, Boolean], default: 50 },
91
+ debounce: {},
92
+ beforeFilter: {},
93
+ retainSearch: { type: Boolean },
94
+ clearSearchAfterSelect: { type: Boolean, default: !0 },
95
+ expandTrigger: { default: "click" },
96
+ hoverDelay: { default: 150 },
97
+ expandedPath: {},
98
+ defaultExpandedPath: {},
99
+ loadChildren: {},
100
+ loadRoot: {},
101
+ inline: { type: Boolean },
102
+ showFooter: { type: Boolean, default: !0 },
103
+ open: { type: Boolean, default: void 0 },
104
+ defaultOpen: { type: Boolean },
105
+ showOnFocus: { type: Boolean },
106
+ popupMatchWidth: { type: Boolean, default: !0 },
107
+ popupWidth: {},
108
+ popupClass: {},
109
+ popupStyle: {},
110
+ appendTo: { type: [String, Boolean], default: "body" },
111
+ placement: {},
112
+ columnWidth: { default: 180 },
113
+ listHeight: { default: 256 },
114
+ virtual: { type: Boolean },
115
+ itemHeight: {},
116
+ overscan: { default: 4 },
117
+ emptyText: {},
118
+ noMatchText: {},
119
+ loadingText: {},
120
+ locale: {},
121
+ validateEvent: { type: Boolean, default: !0 }
122
+ },
123
+ emits: ["update:modelValue", "change", "value-change", "update:open", "visible-change", "update:searchValue", "search", "search-error", "update:expandedPath", "expandChange", "node-expand", "node-collapse", "load-error", "children-loaded", "load", "root-load", "root-load-error", "select", "remove-tag", "clear", "limit", "focus", "blur", "scroll"],
124
+ setup(o, { expose: We, emit: Ne }) {
125
+ const n = o, L = Ne, Oe = _e(), ge = ya(), d = ga(n), g = ba(), b = I(), le = I(), be = I(), pe = I(), te = ea(), ne = I(""), F = I(!0);
126
+ aa(pa, void 0);
127
+ let X = !1, se = !1, C = 0, re = !1, ie;
128
+ const p = ma(b, le, {
129
+ get placement() {
130
+ return n.placement;
131
+ },
132
+ matchWidth: () => n.popupMatchWidth ? !0 : "min",
133
+ width: () => n.popupWidth,
134
+ requestOpen: (e, l) => (e || (re = !!l), L("update:open", e), n.open === void 0 ? void 0 : !1)
135
+ }), A = p.open, z = x(() => F.value && (n.inline || A.value)), t = ka(
136
+ n,
137
+ d.disabled,
138
+ z,
139
+ (e, ...l) => L(e, ...l),
140
+ () => {
141
+ g.validate("change");
142
+ }
143
+ ), { items: k, multiple: B, blocked: R, words: c } = t, G = t.engine.query, Ve = x(() => n.inline || A.value), Fe = x(
144
+ () => n.inline ? {
145
+ ...n.popupStyle,
146
+ position: "static",
147
+ width: "100%",
148
+ maxWidth: "100%",
149
+ boxShadow: "none"
150
+ } : {
151
+ ...n.popupStyle,
152
+ ...p.style.value,
153
+ maxHeight: "min(65dvh,calc(100dvh - 20px))"
154
+ }
155
+ ), Ke = x(() => ({
156
+ "--hys-ui-cascader-control-height": (d.size.value === "sm" ? 30 : d.size.value === "lg" ? 44 : 38) + "px"
157
+ })), S = x(() => !!n.filterable && !!G.value.trim()), D = x(
158
+ () => R.value || t.checking.value || t.rootPending.value
159
+ ), ke = x(
160
+ () => Number.isFinite(n.maxTagCount) ? Math.max(0, Math.floor(n.maxTagCount)) : 1 / 0
161
+ ), qe = x(() => k.value.slice(0, ke.value)), K = x(() => k.value.slice(ke.value)), Ie = x(
162
+ () => n.clearable && !R.value && k.value.some((e) => !e.disabled)
163
+ ), Q = /* @__PURE__ */ new Map();
164
+ function we(e, l) {
165
+ l ? Q.set(e, l) : Q.delete(e);
166
+ }
167
+ function Ue(e) {
168
+ n.inline && (b.value = e instanceof HTMLElement ? e : void 0);
169
+ }
170
+ function ue(e) {
171
+ return e ? J(t.browsing.value.slice(0, e)) : "root";
172
+ }
173
+ function de(e) {
174
+ const l = t.engine.tree.index.value.map.get(e.value);
175
+ return {
176
+ ...t.item(e.value),
177
+ node: e.raw,
178
+ level: e.path.length - 1,
179
+ leaf: !(l != null && l.hasChildren),
180
+ expanded: t.engine.tree.expanded.value.has(e.value),
181
+ checked: B.value ? t.engine.tree.checked.value.has(e.value) : t.modelKeys.value.includes(e.value),
182
+ indeterminate: t.engine.tree.halfChecked.value.has(e.value),
183
+ loading: t.engine.tree.loadingKeys.value.has(e.value)
184
+ };
185
+ }
186
+ const $ = (e) => {
187
+ var l;
188
+ return !!((l = t.engine.tree.index.value.map.get(e.value)) != null && l.hasChildren);
189
+ }, xe = x(
190
+ () => n.itemHeight ?? (d.size.value === "sm" ? 30 : d.size.value === "lg" ? 42 : 36)
191
+ ), Ce = (e) => t.engine.tree.failures.value.get(e.value), ce = (e, l) => e.replace("{label}", l);
192
+ function Be(e) {
193
+ var l;
194
+ return ((l = n.displayRender) == null ? void 0 : l.call(n, e)) ?? e.label;
195
+ }
196
+ function Se(e) {
197
+ return n.maxTagTextLength !== void 0 && n.maxTagTextLength >= 0 ? e.label.slice(0, n.maxTagTextLength) + (e.label.length > n.maxTagTextLength ? "…" : "") : void 0;
198
+ }
199
+ function je() {
200
+ return Object.fromEntries(
201
+ Object.entries(Oe).filter(([e]) => !["class", "style"].includes(e))
202
+ );
203
+ }
204
+ function Te() {
205
+ var i;
206
+ const e = (i = b.value) == null ? void 0 : i.closest("label");
207
+ if (!e) return;
208
+ const l = e.cloneNode(!0);
209
+ l.querySelectorAll(".hys-ui-cascader-wrap").forEach((s) => s.remove()), ne.value = (l.textContent ?? "").replace(/\s+/g, " ").trim();
210
+ }
211
+ function W() {
212
+ clearTimeout(ie), ie = void 0;
213
+ }
214
+ async function N(e, l) {
215
+ var h, v;
216
+ if (Q.has(e) || await j(), !z.value || D.value) return;
217
+ await ((h = Q.get(e)) == null ? void 0 : h.focus(l));
218
+ const i = (v = Q.get(e)) == null ? void 0 : v.element, s = pe.value;
219
+ if (i && s) {
220
+ const y = i.getBoundingClientRect().left - s.getBoundingClientRect().left + s.scrollLeft;
221
+ y < s.scrollLeft ? s.scrollLeft = y : y + i.offsetWidth > s.scrollLeft + s.clientWidth && (s.scrollLeft = y + i.offsetWidth - s.clientWidth);
222
+ }
223
+ }
224
+ async function Y(e, l = !1) {
225
+ if (D.value || e.disabled) return !1;
226
+ W();
227
+ const i = C, s = await t.expandPath(e.path);
228
+ return await j(), !z.value || i !== C ? !1 : (p.update(), l && s && await N(e.path.length), s);
229
+ }
230
+ function Je(e) {
231
+ W(), !(n.expandTrigger !== "hover" || !e || !$(e) || D.value || e.disabled) && (ie = setTimeout(
232
+ () => {
233
+ ie = void 0, Y(e);
234
+ },
235
+ Math.max(0, Math.min(1e3, n.hoverDelay))
236
+ ));
237
+ }
238
+ async function oe(e, l, i) {
239
+ if (D.value || e.disabled) return;
240
+ W();
241
+ const s = C;
242
+ if ($(e) && i === void 0 && !S.value && !await Y(e) || !z.value || s !== C || !(i !== void 0 || S.value || n.changeOnSelect && !B.value || n.checkOnClickNode || !n.showPrefix || !$(e) && n.checkOnClickLeaf) || !B.value && !t.anyLevel.value && $(e))
243
+ return;
244
+ const y = await t.pick(e.value, l, i);
245
+ !z.value || s !== C || (!B.value && (y || t.modelKeys.value.includes(e.value)) && !$(e) && !n.inline || !B.value && n.checkStrictly && i !== void 0 && y && !n.inline) && p.close(!0);
246
+ }
247
+ async function Pe(e) {
248
+ await t.reloadNode(e.path) && await N(e.path.length);
249
+ }
250
+ function Ee(e, l, i) {
251
+ var Le;
252
+ if (e.isComposing || e.keyCode === 229 || D.value) return;
253
+ const s = e.target;
254
+ if (s.closest("button") || s.matches("input") && ["Enter", " "].includes(e.key))
255
+ return;
256
+ const h = S.value ? t.searchResults.value : t.columns.value[i] ?? [], v = h.filter((_) => !_.disabled), y = v.findIndex((_) => _.value === l.value);
257
+ if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
258
+ e.preventDefault();
259
+ const _ = e.key === "Home" ? 0 : e.key === "End" ? v.length - 1 : (y + (e.key === "ArrowDown" ? 1 : -1) + v.length) % v.length;
260
+ N(i, (Le = v[_]) == null ? void 0 : Le.value);
261
+ } else e.key === "ArrowRight" && !S.value ? (e.preventDefault(), $(l) && Y(l, !0)) : e.key === "ArrowLeft" && !S.value && i > 0 ? (e.preventDefault(), N(i - 1, J(l.path.slice(0, i)))) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), B.value || n.checkStrictly ? oe(l, e, !de(l).checked) : $(l) ? Y(l, !0) : oe(l, e));
262
+ }
263
+ function Xe(e) {
264
+ var l, i;
265
+ if (!(e.isComposing || e.keyCode === 229 || D.value) && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
266
+ e.preventDefault();
267
+ const s = S.value ? -1 : 0, h = S.value ? t.searchResults.value : t.columns.value[0] ?? [], v = h.filter((y) => !y.disabled);
268
+ N(
269
+ s,
270
+ e.key === "ArrowUp" ? (l = v.at(-1)) == null ? void 0 : l.value : (i = v[0]) == null ? void 0 : i.value
271
+ );
272
+ }
273
+ }
274
+ async function T(e = !0, l = !1) {
275
+ var v, y;
276
+ if (!F.value || d.disabled.value || n.readonly) return !1;
277
+ const i = C, s = A.value, h = !se;
278
+ return n.inline || await p.show(l), await j(), !z.value || i !== C || (!n.inline && !s && se && !n.retainSearch && t.filter(""), se = !0, !h && !s && !n.inline && n.expandedPath === void 0 && await t.engine.tree.setExpandedKeys([]), !t.browsing.value.length && ((v = t.selectedPaths.value[0]) != null && v.length) && t.expandPath(t.selectedPaths.value[0]), await j(), !z.value || i !== C) ? !1 : (e && (n.filterable ? (y = be.value) == null || y.focus() : await N(0)), !0);
279
+ }
280
+ function q(e = !1) {
281
+ n.inline || p.close(e);
282
+ }
283
+ function Ge(e) {
284
+ var l;
285
+ (l = e.target) != null && l.closest("button") || (A.value ? q() : T());
286
+ }
287
+ function ze(e) {
288
+ if (!(e.isComposing || e.keyCode === 229 || e.target !== b.value)) {
289
+ if (["ArrowDown", "ArrowUp", "Enter", " "].includes(e.key))
290
+ e.preventDefault(), T();
291
+ else if (e.key === "Backspace" && B.value && !R.value) {
292
+ const l = [...k.value].reverse().find((i) => !i.disabled);
293
+ l && (e.preventDefault(), t.removeTag(l.path));
294
+ }
295
+ }
296
+ }
297
+ async function Z() {
298
+ const e = await t.clear();
299
+ return e && !n.inline && q(!0), e;
300
+ }
301
+ function he(e) {
302
+ X || (X = !0, L("focus", e)), e.target === b.value && n.showOnFocus && !p.restoringFocus.value && !n.inline && T(!1);
303
+ }
304
+ async function ve(e) {
305
+ var i, s;
306
+ if (await j(), !F.value) return;
307
+ const l = document.activeElement;
308
+ (i = b.value) != null && i.contains(l) || (s = le.value) != null && s.contains(l) || X && (X = !1, L("blur", e), n.validateEvent && g.validate("blur"));
309
+ }
310
+ async function Qe(e) {
311
+ await T(!1) && await t.expandPath(e) && await N(e.length - 1, J(e));
312
+ }
313
+ async function Ye(e) {
314
+ return await T(!1) ? t.expandPath(e) : !1;
315
+ }
316
+ U(
317
+ () => n.open,
318
+ (e) => {
319
+ if (!(!F.value || n.inline))
320
+ if (e) T(!1, !0);
321
+ else {
322
+ const l = re;
323
+ re = !1, p.close(l, !0);
324
+ }
325
+ }
326
+ ), U(A, (e) => {
327
+ L("visible-change", e), e || (C++, W(), n.retainSearch || t.filter(""));
328
+ }), U(
329
+ [d.disabled, () => n.readonly],
330
+ ([e, l]) => {
331
+ (e || l) && (W(), p.close(!1, !0), n.open && L("update:open", !1));
332
+ },
333
+ { flush: "sync" }
334
+ ), U(
335
+ [
336
+ k,
337
+ G,
338
+ t.browsing,
339
+ () => d.size.value,
340
+ () => n.popupWidth,
341
+ () => n.popupMatchWidth
342
+ ],
343
+ () => {
344
+ j().then(() => p.update());
345
+ }
346
+ ), U(t.browsing, W), U(t.rootPending, (e) => {
347
+ var l;
348
+ !e && z.value && !R.value && !t.rootError.value && !t.browsing.value.length && ((l = t.selectedPaths.value[0]) != null && l.length) && t.expandPath(t.selectedPaths.value[0]);
349
+ }), la(() => {
350
+ var e, l;
351
+ Te(), n.inline && ((e = t.selectedPaths.value[0]) != null && e.length) ? t.expandPath(t.selectedPaths.value[0]) : (n.open ?? n.defaultOpen) && T(!1, !0), n.autofocus && !d.disabled.value && ((l = b.value) == null || l.focus());
352
+ }), ta(Te), ia(() => {
353
+ F.value = !0, n.open && !n.inline && T(!1, !0);
354
+ });
355
+ function $e() {
356
+ F.value = !1, C++, X = !1, W(), p.close(!1, !0);
357
+ }
358
+ return oa($e), na($e), We({
359
+ element: b,
360
+ open: z,
361
+ focus: () => {
362
+ var e;
363
+ d.disabled.value || (e = b.value) == null || e.focus();
364
+ },
365
+ blur: () => {
366
+ var e, l, i;
367
+ q(), ((e = b.value) != null && e.contains(document.activeElement) || (l = le.value) != null && l.contains(document.activeElement)) && ((i = document.activeElement) == null || i.blur());
368
+ },
369
+ show: () => T(),
370
+ hide: q,
371
+ clear: Z,
372
+ clearCheckedNodes: Z,
373
+ removeTag: t.removeTag,
374
+ setValue: t.setValue,
375
+ filter: t.filter,
376
+ getSelectedItems: () => [...k.value],
377
+ getCheckedNodes: t.getCheckedNodes,
378
+ getExpandedPath: () => [...t.browsing.value],
379
+ setExpandedPath: Ye,
380
+ reloadNode: t.reloadNode,
381
+ reloadRoot: t.reloadRoot,
382
+ scrollTo: Qe
383
+ }), (e, l) => (r(), u("div", ee({ ref: Ue }, a(ge), {
384
+ class: ["hys-ui-cascader-wrap", [
385
+ e.$attrs.class,
386
+ "hys-ui-cascader-" + a(d).size.value,
387
+ { "hys-ui-cascader-inline-managed": o.inline }
388
+ ]],
389
+ style: [e.$attrs.style, Ke.value],
390
+ id: o.inline ? e.$attrs.id || a(g).id.value || a(te) : void 0,
391
+ role: o.inline ? "group" : void 0,
392
+ "data-hys-ui-field-managed": o.inline ? "" : void 0,
393
+ "aria-label": o.inline ? o.ariaLabel || a(g).label.value || ne.value || a(c).panel : void 0,
394
+ "aria-invalid": o.inline && (o.status === "error" || a(g).invalid.value) || void 0,
395
+ "aria-describedby": o.inline ? a(g).describedBy.value : void 0,
396
+ "aria-disabled": o.inline && a(d).disabled.value || void 0,
397
+ tabindex: o.inline ? a(d).disabled.value ? -1 : 0 : void 0,
398
+ onKeydown: l[6] || (l[6] = (i) => o.inline && ze(i)),
399
+ onFocusin: l[7] || (l[7] = (i) => o.inline && he(i)),
400
+ onFocusout: l[8] || (l[8] = (i) => o.inline && ve(i))
401
+ }), [
402
+ O("button", {
403
+ hidden: "",
404
+ type: "button",
405
+ tabindex: "-1",
406
+ "aria-hidden": "true",
407
+ disabled: a(d).disabled.value,
408
+ onClick: l[0] || (l[0] = ae((i) => {
409
+ var s;
410
+ (s = b.value) == null || s.focus(), T();
411
+ }, ["prevent"]))
412
+ }, null, 8, xa),
413
+ o.inline ? m("", !0) : (r(), u("div", ee({
414
+ key: 0,
415
+ ref_key: "trigger",
416
+ ref: b
417
+ }, je(), {
418
+ id: e.$attrs.id || a(g).id.value || a(te),
419
+ "data-hys-ui-field-managed": "",
420
+ role: "combobox",
421
+ "aria-haspopup": "dialog",
422
+ "aria-controls": a(A) ? a(te) + "-panel" : void 0,
423
+ "aria-expanded": a(A),
424
+ "aria-label": o.ariaLabel || a(g).label.value || ne.value || o.placeholder || a(c).panel,
425
+ "aria-disabled": a(d).disabled.value || void 0,
426
+ "aria-readonly": o.readonly || void 0,
427
+ "aria-invalid": o.status === "error" || a(g).invalid.value || void 0,
428
+ "aria-describedby": a(g).describedBy.value,
429
+ "aria-required": a(g).required.value || void 0,
430
+ "aria-busy": o.loading || a(t).checking.value || void 0,
431
+ tabindex: a(d).disabled.value ? -1 : 0,
432
+ class: ["hys-ui-cascader-control", {
433
+ "hys-ui-cascader-control-disabled": a(d).disabled.value,
434
+ "hys-ui-cascader-control-error": o.status === "error" || a(g).invalid.value,
435
+ "hys-ui-cascader-control-warning": o.status === "warning",
436
+ "hys-ui-cascader-control-success": o.status === "success"
437
+ }],
438
+ onClick: Ge,
439
+ onKeydown: ze,
440
+ onFocusin: he,
441
+ onFocusout: ve
442
+ }), [
443
+ e.$slots.prefix ? (r(), u("span", Ba, [
444
+ f(e.$slots, "prefix", {}, void 0, !0)
445
+ ])) : m("", !0),
446
+ a(k).length ? a(B) ? (r(), u("div", Ta, [
447
+ (r(!0), u(H, null, fe(qe.value, (i) => f(e.$slots, "tag", {
448
+ item: i,
449
+ remove: () => a(t).removeTag(i.path)
450
+ }, () => [
451
+ O("span", {
452
+ class: Ae(["hys-ui-cascader-tag", { "hys-ui-cascader-tag-disabled": i.disabled }])
453
+ }, [
454
+ O("span", Pa, [
455
+ Se(i) !== void 0 ? (r(), u(H, { key: 0 }, [
456
+ P(w(Se(i)), 1)
457
+ ], 64)) : (r(), E(De(() => Be(i)), { key: 1 }))
458
+ ]),
459
+ o.removable ? (r(), u("button", {
460
+ key: 0,
461
+ type: "button",
462
+ class: "hys-ui-cascader-tag-remove",
463
+ disabled: a(R) || i.disabled,
464
+ "aria-label": ce(a(c).remove, i.label),
465
+ onMousedown: l[1] || (l[1] = ae(() => {
466
+ }, ["prevent"])),
467
+ onClick: ae((s) => a(t).removeTag(i.path), ["stop"])
468
+ }, [
469
+ f(e.$slots, "remove-icon", {}, () => [
470
+ V(a(Me), { size: 12 })
471
+ ], !0)
472
+ ], 40, Ea)) : m("", !0)
473
+ ], 2)
474
+ ], !0, a(J)(i.path))), 128)),
475
+ K.value.length ? (r(), E(fa, {
476
+ key: 0,
477
+ text: K.value.slice(0, 20).map((i) => i.label).join("、")
478
+ }, {
479
+ default: M(() => [
480
+ O("span", {
481
+ class: "hys-ui-cascader-tag hys-ui-cascader-more",
482
+ "aria-label": a(c).more.replace("{count}", String(K.value.length))
483
+ }, [
484
+ f(e.$slots, "max-tag-placeholder", {
485
+ items: K.value,
486
+ count: K.value.length
487
+ }, () => [
488
+ P("+" + w(K.value.length), 1)
489
+ ], !0)
490
+ ], 8, za)
491
+ ]),
492
+ _: 3
493
+ }, 8, ["text"])) : m("", !0)
494
+ ])) : (r(), u("span", $a, [
495
+ f(e.$slots, "display", {
496
+ item: a(k)[0]
497
+ }, () => [
498
+ (r(), E(De(() => Be(a(k)[0]))))
499
+ ], !0)
500
+ ])) : (r(), u("span", Sa, w(o.placeholder), 1)),
501
+ O("span", La, [
502
+ o.loading || a(t).checking.value ? (r(), E(a(ye), {
503
+ key: 0,
504
+ size: 15,
505
+ class: "hys-ui-icon-spin"
506
+ })) : m("", !0),
507
+ Ie.value ? (r(), u("button", {
508
+ key: 1,
509
+ type: "button",
510
+ class: "hys-ui-cascader-clear",
511
+ "aria-label": a(c).clear,
512
+ onMousedown: l[2] || (l[2] = ae(() => {
513
+ }, ["prevent"])),
514
+ onClick: ae(Z, ["stop"])
515
+ }, [
516
+ f(e.$slots, "clear-icon", {}, () => [
517
+ V(a(Me), { size: 14 })
518
+ ], !0)
519
+ ], 40, Aa)) : m("", !0),
520
+ f(e.$slots, "suffix", {}, () => [
521
+ V(a(ca), {
522
+ size: 16,
523
+ class: Ae(["hys-ui-cascader-chevron", { "hys-ui-cascader-chevron-open": a(A) }])
524
+ }, null, 8, ["class"])
525
+ ], !0)
526
+ ])
527
+ ], 16, Ca)),
528
+ o.name ? (r(!0), u(H, { key: 1 }, fe(a(k), (i) => (r(), u("input", {
529
+ key: a(J)(i.path),
530
+ type: "hidden",
531
+ name: o.name,
532
+ form: o.form,
533
+ value: o.emitPath ? JSON.stringify(i.path) : i.value,
534
+ disabled: a(d).disabled.value
535
+ }, null, 8, Da))), 128)) : m("", !0),
536
+ (r(), E(sa, {
537
+ to: o.appendTo === !1 || o.inline ? "body" : o.appendTo,
538
+ disabled: o.appendTo === !1 || o.inline
539
+ }, [
540
+ Ve.value ? (r(), u("div", ee({
541
+ key: 0,
542
+ id: a(te) + "-panel",
543
+ ref_key: "panel",
544
+ ref: le
545
+ }, a(ge), {
546
+ class: ["hys-ui-cascader-menu", [
547
+ o.popupClass,
548
+ "hys-ui-cascader-" + a(d).size.value,
549
+ {
550
+ "hys-ui-cascader-inline": o.inline,
551
+ "hys-ui-cascader-menu-disabled": a(d).disabled.value
552
+ }
553
+ ]],
554
+ style: Fe.value,
555
+ role: o.inline ? "group" : "dialog",
556
+ "aria-label": a(c).panel,
557
+ "aria-busy": o.loading || a(t).rootPending.value || a(t).checking.value || void 0,
558
+ onFocusin: he,
559
+ onFocusout: ve
560
+ }), [
561
+ e.$slots.header ? (r(), u("header", Ma, [
562
+ f(e.$slots, "header", {}, void 0, !0)
563
+ ])) : m("", !0),
564
+ o.filterable ? (r(), E(va, {
565
+ key: 1,
566
+ ref_key: "search",
567
+ ref: be,
568
+ "model-value": a(G),
569
+ class: "hys-ui-cascader-search",
570
+ "aria-label": a(c).search,
571
+ placeholder: a(c).search,
572
+ disabled: a(R),
573
+ size: a(d).size.value,
574
+ clearable: "",
575
+ "onUpdate:modelValue": a(t).filter,
576
+ onKeydown: Xe
577
+ }, {
578
+ prefix: M(() => [
579
+ V(a(ha), { size: 14 })
580
+ ]),
581
+ _: 1
582
+ }, 8, ["model-value", "aria-label", "placeholder", "disabled", "size", "onUpdate:modelValue"])) : m("", !0),
583
+ o.loading || a(t).rootPending.value || S.value && a(t).filterPending.value ? (r(), u("div", Ra, [
584
+ f(e.$slots, "loading", { level: 0 }, () => [
585
+ V(a(ye), {
586
+ size: 17,
587
+ class: "hys-ui-icon-spin"
588
+ }),
589
+ P(w(a(c).loading), 1)
590
+ ], !0)
591
+ ])) : a(t).rootError.value || S.value && a(t).filterError.value ? (r(), u("div", Wa, [
592
+ O("span", null, w(a(c).loadError), 1),
593
+ V(me, {
594
+ size: "sm",
595
+ variant: "ghost",
596
+ onClick: l[3] || (l[3] = (i) => a(t).rootError.value ? a(t).reloadRoot() : a(t).retrySearch())
597
+ }, {
598
+ default: M(() => [
599
+ P(w(a(c).retry), 1)
600
+ ]),
601
+ _: 1
602
+ })
603
+ ])) : S.value ? (r(), u(H, { key: 4 }, [
604
+ a(t).searchResults.value.length ? (r(), E(Re, {
605
+ key: 0,
606
+ ref: (i) => we(-1, i),
607
+ rows: a(t).searchResults.value,
608
+ level: -1,
609
+ label: a(c).search,
610
+ multiple: a(B),
611
+ strict: o.checkStrictly,
612
+ "show-prefix": o.showPrefix,
613
+ disabled: D.value,
614
+ search: !0,
615
+ size: a(d).size.value,
616
+ virtual: o.virtual,
617
+ "list-height": o.listHeight,
618
+ "item-height": xe.value,
619
+ overscan: o.overscan,
620
+ context: de,
621
+ "has-children": $,
622
+ error: Ce,
623
+ "retry-text": a(c).retry,
624
+ "expand-label": (i) => ce(a(c).expand, i.label),
625
+ onChoose: oe,
626
+ onKeyboard: Ee,
627
+ onRetry: Pe,
628
+ onScroll: l[4] || (l[4] = (i) => L("scroll", { level: -1, event: i }))
629
+ }, He({ _: 2 }, [
630
+ e.$slots.suggestion ? {
631
+ name: "suggestion",
632
+ fn: M((i) => [
633
+ f(e.$slots, "suggestion", ra(ua(i)), void 0, !0)
634
+ ]),
635
+ key: "0"
636
+ } : void 0
637
+ ]), 1032, ["rows", "label", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "retry-text", "expand-label"])) : (r(), u("div", Na, [
638
+ f(e.$slots, "empty", {
639
+ query: a(G),
640
+ level: 0
641
+ }, () => [
642
+ P(w(a(c).noMatch), 1)
643
+ ], !0)
644
+ ]))
645
+ ], 64)) : (r(), u("div", {
646
+ key: 5,
647
+ ref_key: "columnsElement",
648
+ ref: pe,
649
+ class: "hys-ui-cascader-columns"
650
+ }, [
651
+ (r(!0), u(H, null, fe(a(t).columns.value, (i, s) => (r(), u(H, {
652
+ key: ue(s)
653
+ }, [
654
+ i.length ? (r(), E(Re, {
655
+ key: 0,
656
+ ref_for: !0,
657
+ ref: (h) => we(s, h),
658
+ rows: i,
659
+ level: s,
660
+ label: a(c).level.replace("{level}", String(s + 1)),
661
+ "active-key": a(t).browsing.value[s] === void 0 ? void 0 : a(J)(a(t).browsing.value.slice(0, s + 1)),
662
+ multiple: a(B),
663
+ strict: o.checkStrictly,
664
+ "show-prefix": o.showPrefix,
665
+ disabled: D.value,
666
+ size: a(d).size.value,
667
+ virtual: o.virtual,
668
+ "list-height": o.listHeight,
669
+ "item-height": xe.value,
670
+ overscan: o.overscan,
671
+ "column-width": o.columnWidth,
672
+ context: de,
673
+ "has-children": $,
674
+ error: Ce,
675
+ "retry-text": a(c).retry,
676
+ "expand-label": (h) => ce(a(c).expand, h.label),
677
+ onChoose: oe,
678
+ onExpand: Y,
679
+ onHover: Je,
680
+ onKeyboard: Ee,
681
+ onRetry: Pe,
682
+ onScroll: (h) => L("scroll", { level: s, event: h })
683
+ }, He({ _: 2 }, [
684
+ e.$slots.option ? {
685
+ name: "option",
686
+ fn: M((h) => [
687
+ f(e.$slots, "option", ee({ ref_for: !0 }, h), void 0, !0)
688
+ ]),
689
+ key: "0"
690
+ } : void 0,
691
+ e.$slots["expand-icon"] ? {
692
+ name: "expand-icon",
693
+ fn: M((h) => [
694
+ f(e.$slots, "expand-icon", ee({ ref_for: !0 }, h), void 0, !0)
695
+ ]),
696
+ key: "1"
697
+ } : void 0
698
+ ]), 1032, ["rows", "level", "label", "active-key", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "column-width", "retry-text", "expand-label", "onScroll"])) : (r(), u("div", {
699
+ key: 1,
700
+ class: "hys-ui-cascader-empty-column",
701
+ style: da({
702
+ minWidth: typeof o.columnWidth == "number" ? o.columnWidth + "px" : o.columnWidth
703
+ })
704
+ }, [
705
+ O("div", Oa, [
706
+ s && a(t).engine.tree.loadingKeys.value.has(ue(s)) ? (r(), u(H, { key: 0 }, [
707
+ V(a(ye), {
708
+ size: 16,
709
+ class: "hys-ui-icon-spin"
710
+ }),
711
+ P(w(a(c).loading), 1)
712
+ ], 64)) : s && a(t).engine.tree.failures.value.has(ue(s)) ? (r(), u(H, { key: 1 }, [
713
+ P(w(a(c).loadError), 1)
714
+ ], 64)) : f(e.$slots, "empty", {
715
+ query: a(G),
716
+ level: s
717
+ }, () => [
718
+ P(w(a(c).empty), 1)
719
+ ], !0, 2)
720
+ ])
721
+ ], 4))
722
+ ], 64))), 128))
723
+ ], 512)),
724
+ e.$slots.footer || o.showFooter && (!o.inline || o.clearable) ? (r(), u("footer", Va, [
725
+ f(e.$slots, "footer", {
726
+ items: a(k),
727
+ clear: Z,
728
+ close: () => q(!0)
729
+ }, () => [
730
+ o.clearable ? (r(), E(me, {
731
+ key: 0,
732
+ size: "sm",
733
+ variant: "ghost",
734
+ disabled: a(R) || !a(k).some((i) => !i.disabled),
735
+ onClick: Z
736
+ }, {
737
+ default: M(() => [
738
+ P(w(a(c).clear), 1)
739
+ ]),
740
+ _: 1
741
+ }, 8, ["disabled"])) : m("", !0),
742
+ o.inline ? m("", !0) : (r(), E(me, {
743
+ key: 1,
744
+ size: "sm",
745
+ variant: "secondary",
746
+ onClick: l[5] || (l[5] = (i) => q(!0))
747
+ }, {
748
+ default: M(() => [
749
+ P(w(a(c).close), 1)
750
+ ]),
751
+ _: 1
752
+ }))
753
+ ], !0)
754
+ ])) : m("", !0)
755
+ ], 16, Ha)) : m("", !0)
756
+ ], 8, ["to", "disabled"]))
757
+ ], 16, wa));
758
+ }
759
+ });
2
760
  export {
3
- f as default
761
+ Za as default
4
762
  };