@web-utils/form-ui 1.0.0-beta7 → 1.0.0-beta70

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 (458) hide show
  1. package/address-input/index.mjs +2 -0
  2. package/address-input/style.css +1 -0
  3. package/affix/index.mjs +49 -0
  4. package/affix/style.css +1 -0
  5. package/api/index.d.ts +66 -0
  6. package/api/index.mjs +42 -0
  7. package/awesome-button/index.mjs +49 -0
  8. package/base.css +1 -1
  9. package/capsule-tab/index.mjs +27 -0
  10. package/capsule-tab/style.css +1 -0
  11. package/card/index.mjs +89 -0
  12. package/card/style.css +1 -0
  13. package/chunks/3gUkQF12.mjs +207 -0
  14. package/chunks/49634Q2N2.mjs +936 -0
  15. package/chunks/5itVLmv82.mjs +108 -0
  16. package/chunks/6kdakei5.mjs +644 -0
  17. package/chunks/77cFhiAz.mjs +13 -0
  18. package/chunks/7Cv9Cq-02.mjs +1354 -0
  19. package/chunks/7JVbVOff2.mjs +46 -0
  20. package/chunks/9rQitPz7.mjs +590 -0
  21. package/chunks/B1ATN2my.mjs +26 -0
  22. package/chunks/B1GA44yT2.mjs +42 -0
  23. package/chunks/B31ub5xS.mjs +46 -0
  24. package/chunks/B3d4fdGH.mjs +17 -0
  25. package/chunks/B5voIv4_.mjs +194 -0
  26. package/chunks/B7O8aGqC2.mjs +58 -0
  27. package/chunks/B8wGY5Hs2.mjs +26 -0
  28. package/chunks/BBPczt0U.mjs +4 -0
  29. package/chunks/BBqq6o072.mjs +243 -0
  30. package/chunks/BCVhSMZN.mjs +1328 -0
  31. package/chunks/BDVLN2ly.mjs +105 -0
  32. package/chunks/BEysX5TF2.mjs +1038 -0
  33. package/chunks/BI-ZFlSw2.mjs +26 -0
  34. package/chunks/BIj6pa8Z.mjs +15 -0
  35. package/chunks/BJby9uHB2.mjs +233 -0
  36. package/chunks/BMTtnkb7.mjs +60 -0
  37. package/chunks/BPpMbPS8.mjs +63 -0
  38. package/chunks/BQNqBw8h2.mjs +27 -0
  39. package/chunks/BUAQybGW.mjs +230 -0
  40. package/chunks/BVIHqL6g.mjs +17 -0
  41. package/chunks/BVSQ6DfJ.mjs +17 -0
  42. package/chunks/BVuwiZGi.mjs +37 -0
  43. package/chunks/B__5L22p2.mjs +346 -0
  44. package/chunks/BaLjN8Ow.mjs +197 -0
  45. package/chunks/Baam4z-g.mjs +275 -0
  46. package/chunks/Bdeug17L.mjs +42 -0
  47. package/chunks/BeWNlclr.mjs +295 -0
  48. package/chunks/BecO0t0_2.mjs +2430 -0
  49. package/chunks/BffxPn8a.mjs +34 -0
  50. package/chunks/Bgw_3soo.mjs +35 -0
  51. package/chunks/BjCfQFUL.mjs +54 -0
  52. package/chunks/BjWs-r2V.mjs +25 -0
  53. package/chunks/BkEMJ725.mjs +214 -0
  54. package/chunks/BlB1fEo92.mjs +8 -0
  55. package/chunks/BoId6V9J.mjs +17 -0
  56. package/chunks/BrYtAPbN2.mjs +161 -0
  57. package/chunks/BsKwchVA.mjs +14 -0
  58. package/chunks/BsM0L7CS.mjs +132 -0
  59. package/chunks/BvbjlaN02.mjs +514 -0
  60. package/chunks/BvcK4D8A2.mjs +1800 -0
  61. package/chunks/BwYEpK-u.mjs +8 -0
  62. package/chunks/C1RsHtGI.mjs +40 -0
  63. package/chunks/C5f3Xfsc2.mjs +36 -0
  64. package/chunks/C7l9aZGE.mjs +577 -0
  65. package/chunks/CDqVJ7U3.mjs +449 -0
  66. package/chunks/CFvkR9Ze2.mjs +31 -0
  67. package/chunks/CGM03LI5.mjs +588 -0
  68. package/chunks/CIybFvu92.mjs +30 -0
  69. package/chunks/CPejK_GQ2.mjs +383 -0
  70. package/chunks/CQSTyCVP.mjs +6 -0
  71. package/chunks/CQxz8uUc.mjs +454 -0
  72. package/chunks/CR29QUwT2.mjs +28 -0
  73. package/chunks/CWvo-ucD.mjs +446 -0
  74. package/chunks/C_eGir-J.mjs +17 -0
  75. package/chunks/CaRunrOV2.mjs +5289 -0
  76. package/chunks/Calzy0Az.mjs +1275 -0
  77. package/chunks/CbbjpJFg2.mjs +26 -0
  78. package/chunks/CbgD7y-5.mjs +5 -0
  79. package/chunks/CbsGuLZz2.mjs +105 -0
  80. package/chunks/CcT5SsZk.mjs +48 -0
  81. package/chunks/CdBytH8S.mjs +266 -0
  82. package/chunks/Ch_zaHx9.mjs +89 -0
  83. package/chunks/CiFlMt6Z.mjs +41 -0
  84. package/chunks/CjjJimnU.mjs +20 -0
  85. package/chunks/Cjkq49252.mjs +60 -0
  86. package/chunks/CjmfMN1X2.mjs +34 -0
  87. package/chunks/CnCSm3LY2.mjs +4 -0
  88. package/chunks/CsLrkldT2.mjs +225 -0
  89. package/chunks/Csiz_xCa2.mjs +273 -0
  90. package/chunks/Ctd3_wOH2.mjs +6 -0
  91. package/chunks/Cu2A_1vk2.mjs +106 -0
  92. package/chunks/CuoF9V8s.mjs +3091 -0
  93. package/chunks/CwBq1JZV.mjs +250 -0
  94. package/chunks/CwWfRmD3.mjs +57 -0
  95. package/chunks/CwqeV7002.mjs +67 -0
  96. package/chunks/Cy8jqgun2.mjs +41 -0
  97. package/chunks/D-hj62se2.mjs +525 -0
  98. package/chunks/D3Xixh5v.mjs +5 -0
  99. package/chunks/D4oNQiIK.mjs +461 -0
  100. package/chunks/D6vTCC1Z2.mjs +110 -0
  101. package/chunks/D8r81QxD.mjs +732 -0
  102. package/chunks/D9qn1x3X2.mjs +87 -0
  103. package/chunks/DL0o_C092.mjs +1093 -0
  104. package/chunks/DLgn1tQG2.mjs +60 -0
  105. package/chunks/DNSPORak.mjs +479 -0
  106. package/chunks/DStwh2ne.mjs +281 -0
  107. package/chunks/DTUh8o0p2.mjs +145 -0
  108. package/chunks/DXiLi19u2.mjs +33 -0
  109. package/chunks/DZ0frL1U.mjs +69 -0
  110. package/chunks/D_qwjNah.mjs +1094 -0
  111. package/chunks/DbtlO6wD.mjs +52 -0
  112. package/chunks/DfJJr053.mjs +217 -0
  113. package/chunks/Dg9Q-Tbi2.mjs +299 -0
  114. package/chunks/DhQF2ZlD.mjs +182 -0
  115. package/chunks/Dls3rTka2.mjs +24 -0
  116. package/chunks/DnBzQ-xh.mjs +4 -0
  117. package/chunks/DoNfjRR1.mjs +68 -0
  118. package/chunks/DoOkwYtO.mjs +609 -0
  119. package/chunks/DrKq_frR.mjs +98 -0
  120. package/chunks/DsYXqJLZ.mjs +641 -0
  121. package/chunks/DsZznbt2.mjs +208 -0
  122. package/chunks/Dsd58O0g.mjs +25 -0
  123. package/chunks/Dtq1xYk8.mjs +47 -0
  124. package/chunks/DxL9oojv2.mjs +418 -0
  125. package/chunks/EA6hte7s2.mjs +49 -0
  126. package/chunks/FeuisuNY2.mjs +88 -0
  127. package/chunks/GEtlriHC.mjs +188 -0
  128. package/chunks/GsvG1yFW.mjs +1919 -0
  129. package/chunks/KGmxNbpi.mjs +21 -0
  130. package/chunks/Q2Mal3Qn2.mjs +439 -0
  131. package/chunks/T_jwNKBr.mjs +379 -0
  132. package/chunks/TtxSplBB.mjs +195 -0
  133. package/chunks/Wl17p0C82.mjs +94 -0
  134. package/chunks/Z0BPDZlb.mjs +66 -0
  135. package/chunks/akEzJ4kG.mjs +18 -0
  136. package/chunks/cMuWbLPt.mjs +196 -0
  137. package/chunks/e70aZf3z.mjs +64 -0
  138. package/chunks/gh52LMTG.mjs +12 -0
  139. package/chunks/h-Uhst9y.mjs +98 -0
  140. package/chunks/hgAOQY9a.mjs +406 -0
  141. package/chunks/lGc5ksPb.mjs +279 -0
  142. package/chunks/mD3gmiOy2.mjs +96 -0
  143. package/chunks/nLBvkerV2.mjs +621 -0
  144. package/chunks/pZQfJv282.mjs +4 -0
  145. package/chunks/qrHhuZXg.mjs +465 -0
  146. package/chunks/uqKZ4RIo.mjs +222 -0
  147. package/code-mirror-editor/index.mjs +99 -0
  148. package/code-mirror-editor/style.css +1 -0
  149. package/confirm-button/index.mjs +35 -0
  150. package/confirmable/index.mjs +8 -0
  151. package/constants/index.d.ts +73 -0
  152. package/constants/index.mjs +4 -0
  153. package/context-menu/index.mjs +196 -0
  154. package/context-menu/style.css +1 -0
  155. package/count-up/index.mjs +94 -0
  156. package/custom-scrollbar/index.mjs +93 -0
  157. package/data-box/index.mjs +68 -0
  158. package/data-box/style.css +1 -0
  159. package/data-card/index.mjs +63 -0
  160. package/data-card/style.css +1 -0
  161. package/data-card-text/index.mjs +67 -0
  162. package/data-card-text/style.css +1 -0
  163. package/data-display/index.mjs +73 -0
  164. package/data-display/style.css +1 -0
  165. package/data-icons/index.mjs +74 -0
  166. package/data-icons/style.css +1 -0
  167. package/data-imgtext/index.mjs +71 -0
  168. package/data-imgtext/style.css +1 -0
  169. package/data-operatext/index.mjs +54 -0
  170. package/data-operatext/style.css +1 -0
  171. package/data-panel/index.mjs +61 -0
  172. package/data-panel/style.css +1 -0
  173. package/data-pay/index.mjs +110 -0
  174. package/data-pay/style.css +1 -0
  175. package/data-price/index.mjs +51 -0
  176. package/data-price/style.css +1 -0
  177. package/data-progress/index.mjs +72 -0
  178. package/data-progress/style.css +1 -0
  179. package/data-rotate/index.mjs +65 -0
  180. package/data-rotate/style.css +1 -0
  181. package/data-table-picker/index.mjs +118 -0
  182. package/data-tabs/index.mjs +71 -0
  183. package/data-tabs/style.css +1 -0
  184. package/dict-render/index.mjs +2 -0
  185. package/e-charts/index.mjs +179 -0
  186. package/e-charts/style.css +1 -0
  187. package/easy-popup/index.mjs +92 -0
  188. package/easy-popup/style.css +1 -0
  189. package/editable-progress/index.mjs +120 -0
  190. package/editable-progress/style.css +1 -0
  191. package/editable-tree/index.mjs +2 -0
  192. package/editable-tree/style.css +1 -0
  193. package/element-dialog/index.mjs +2 -91
  194. package/element-dialog/style.css +1 -1
  195. package/element-listeners/style.css +1 -0
  196. package/element-multi-instance/style.css +1 -0
  197. package/element-resize-observer/index.mjs +40 -0
  198. package/element-resize-observer/style.css +1 -0
  199. package/empty-view/index.mjs +1 -1
  200. package/error-view/index.mjs +37 -0
  201. package/error-view/style.css +1 -0
  202. package/flex-box/index.mjs +2 -0
  203. package/flex-column/index.mjs +2 -0
  204. package/flex-item/index.mjs +2 -0
  205. package/flex-row/index.mjs +2 -0
  206. package/flex-scroll-area/index.mjs +1 -1
  207. package/flex-scroller/index.mjs +29 -0
  208. package/flex-scroller/style.css +1 -0
  209. package/flow-designer/index.mjs +2 -0
  210. package/flow-designer/style.css +1 -0
  211. package/flow-viewer/index.mjs +159 -0
  212. package/flow-viewer/style.css +1 -0
  213. package/form-advice/index.mjs +13 -12
  214. package/form-button/index.mjs +36 -0
  215. package/form-card/index.mjs +18 -0
  216. package/form-cascader/index.mjs +2 -0
  217. package/form-checkbox/index.mjs +1 -1
  218. package/form-checkbox-group/index.mjs +2 -0
  219. package/form-checkbox-group/style.css +1 -0
  220. package/form-date-picker/index.mjs +1 -1
  221. package/form-holder/index.mjs +1 -1
  222. package/form-holder/style.css +1 -1
  223. package/form-image/index.mjs +1 -1
  224. package/form-input/index.mjs +1 -1
  225. package/form-input/style.css +1 -0
  226. package/form-input-cron-expression/index.mjs +2 -0
  227. package/form-input-cron-expression/style.css +1 -0
  228. package/form-input-email/index.mjs +1 -1
  229. package/form-input-id-card/index.mjs +1 -1
  230. package/form-input-number/index.mjs +1 -1
  231. package/form-input-phone-number/index.mjs +1 -1
  232. package/form-input-tag/index.mjs +1 -3
  233. package/form-input-time/index.mjs +1 -3
  234. package/form-item-config-provider/index.mjs +24 -0
  235. package/form-item-group/index.mjs +2 -78
  236. package/form-item-group/style.css +1 -1
  237. package/form-item-x/index.mjs +1 -1
  238. package/form-item-x/style.css +1 -0
  239. package/form-radio-group/index.mjs +1 -1
  240. package/form-rate/index.mjs +1 -1
  241. package/form-red-table/index.mjs +27 -26
  242. package/form-row/index.mjs +1 -1
  243. package/form-select/index.mjs +1 -1
  244. package/form-slider/index.mjs +1 -1
  245. package/form-switch/index.mjs +1 -1
  246. package/form-table/index.mjs +2 -0
  247. package/form-table-plus/index.mjs +2 -0
  248. package/form-text/index.mjs +1 -1
  249. package/form-textarea/index.mjs +2 -0
  250. package/form-time-select/index.mjs +2 -0
  251. package/form-tree-select/index.mjs +2 -0
  252. package/form-tree-select/style.css +1 -0
  253. package/form-tree-select-multiple/index.mjs +2 -0
  254. package/form-view/index.mjs +280 -6
  255. package/form-view/style.css +1 -0
  256. package/guide-steps/index.mjs +2 -0
  257. package/guide-steps/style.css +1 -0
  258. package/helper/dictionary.d.ts +29 -0
  259. package/helper/dictionary.mjs +97 -0
  260. package/helper/form-item.d.ts +17 -0
  261. package/helper/form-item.mjs +27 -0
  262. package/helper/input.d.ts +47 -0
  263. package/helper/input.mjs +2 -0
  264. package/helper/sub-table-plus.d.ts +98 -0
  265. package/helper/sub-table-plus.mjs +4 -0
  266. package/highlight-j-s/index.mjs +51 -0
  267. package/highlight-j-s/style.css +1 -0
  268. package/hook/useDictionary.d.ts +60 -0
  269. package/hook/useDictionary.mjs +15 -0
  270. package/hook/useVisibilityChange.d.ts +4 -0
  271. package/hook/useVisibilityChange.mjs +14 -0
  272. package/iframe-window/index.mjs +37 -0
  273. package/iframe-window/style.css +1 -0
  274. package/image-cropper/index.mjs +155 -0
  275. package/image-cropper/style.css +1 -0
  276. package/image-preview/index.mjs +2 -0
  277. package/image-preview/style.css +1 -0
  278. package/image-viewer/index.mjs +70 -0
  279. package/image-viewer/style.css +1 -0
  280. package/index.css +2 -0
  281. package/index.d.ts +91 -6
  282. package/index.mjs +123 -61
  283. package/input-number-range/index.mjs +76 -0
  284. package/input-number-range/style.css +1 -0
  285. package/keyboard/index.mjs +2 -0
  286. package/keyboard/style.css +1 -0
  287. package/loading-view/index.mjs +39 -0
  288. package/loading-view/style.css +1 -0
  289. package/name-avatar/index.mjs +61 -0
  290. package/name-avatar/style.css +1 -0
  291. package/nav-bar/index.mjs +36 -0
  292. package/nav-bar/style.css +1 -0
  293. package/package.json +28 -17
  294. package/page/index.mjs +17 -0
  295. package/page/style.css +1 -0
  296. package/page-header/index.mjs +25 -0
  297. package/page-header/style.css +1 -0
  298. package/page-index/index.mjs +123 -0
  299. package/page-index/style.css +1 -0
  300. package/page-index-top/index.mjs +85 -0
  301. package/page-skeleton/index.mjs +44 -0
  302. package/page-skeleton/style.css +1 -0
  303. package/page-skeleton-new/index.mjs +80 -0
  304. package/page-skeleton-new/style.css +1 -0
  305. package/pageable-table/index.mjs +2 -0
  306. package/pageable-table/style.css +1 -0
  307. package/photo-swipe/index.mjs +2 -0
  308. package/props/cascader.d.ts +326 -0
  309. package/props/cascader.mjs +145 -0
  310. package/props/checkbox-group.d.ts +213 -0
  311. package/props/checkbox-group.mjs +83 -0
  312. package/props/checkbox.d.ts +205 -0
  313. package/props/checkbox.mjs +74 -0
  314. package/props/col.d.ts +74 -0
  315. package/props/col.mjs +32 -0
  316. package/props/common.d.ts +114 -0
  317. package/props/common.mjs +18 -0
  318. package/props/date.d.ts +339 -0
  319. package/props/date.mjs +145 -0
  320. package/props/form-item.d.ts +144 -0
  321. package/props/form-item.mjs +73 -0
  322. package/props/form.d.ts +157 -0
  323. package/props/form.mjs +89 -0
  324. package/props/image.d.ts +102 -0
  325. package/props/image.mjs +10 -0
  326. package/props/input-cron.d.ts +102 -0
  327. package/props/input-cron.mjs +16 -0
  328. package/props/input-number.d.ts +216 -0
  329. package/props/input-number.mjs +72 -0
  330. package/props/input-tag.d.ts +123 -0
  331. package/props/input-tag.mjs +33 -0
  332. package/props/input.d.ts +299 -0
  333. package/props/input.mjs +97 -0
  334. package/props/radio-group.d.ts +205 -0
  335. package/props/radio-group.mjs +84 -0
  336. package/props/rate.d.ts +211 -0
  337. package/props/rate.mjs +66 -0
  338. package/props/select.d.ts +450 -0
  339. package/props/select.mjs +218 -0
  340. package/props/slide.d.ts +235 -0
  341. package/props/slide.mjs +72 -0
  342. package/props/switch.d.ts +229 -0
  343. package/props/switch.mjs +80 -0
  344. package/props/text.d.ts +127 -0
  345. package/props/text.mjs +22 -0
  346. package/props/textarea.d.ts +266 -0
  347. package/props/textarea.mjs +82 -0
  348. package/props/time-select.d.ts +216 -0
  349. package/props/time-select.mjs +67 -0
  350. package/props/time.d.ts +304 -0
  351. package/props/time.mjs +138 -0
  352. package/props/tree-select-multiple.d.ts +324 -0
  353. package/props/tree-select-multiple.mjs +16 -0
  354. package/props/tree-select.d.ts +326 -0
  355. package/props/tree-select.mjs +25 -0
  356. package/props/tree.d.ts +76 -0
  357. package/props/tree.mjs +75 -0
  358. package/props/vue-tree-select.d.ts +458 -0
  359. package/props/vue-tree-select.mjs +213 -0
  360. package/resolver/index.mjs +29 -0
  361. package/sign-panel/index.mjs +183 -0
  362. package/sign-panel/style.css +1 -0
  363. package/skeleton-panel/index.mjs +37 -0
  364. package/skeleton-panel/style.css +1 -0
  365. package/split-pane/index.mjs +2 -0
  366. package/split-pane/style.css +1 -0
  367. package/stateful/index.mjs +67 -0
  368. package/stateful/style.css +1 -0
  369. package/sub-table/index.mjs +2 -0
  370. package/sub-table/style.css +1 -0
  371. package/sub-table-plus/index.mjs +2 -0
  372. package/sub-table-plus/style.css +1 -0
  373. package/swiper/index.mjs +126 -0
  374. package/swiper/style.css +1 -0
  375. package/table-column/index.mjs +2 -0
  376. package/table-column/style.css +1 -0
  377. package/table-column-def/index.mjs +11 -0
  378. package/table-view/index.mjs +468 -6
  379. package/table-view/style.css +1 -0
  380. package/tag-render/index.mjs +86 -0
  381. package/tag-render/style.css +1 -0
  382. package/text-ellipsis/index.mjs +124 -0
  383. package/text-ellipsis/style.css +1 -0
  384. package/toolbar/index.mjs +1 -8
  385. package/toolbar/style.css +1 -0
  386. package/toolbar-button/index.mjs +1 -8
  387. package/toolbar-button/style.css +1 -0
  388. package/vue-cron/index.mjs +2 -0
  389. package/vue-cron/style.css +1 -0
  390. package/vue-qr-code/index.mjs +32 -0
  391. package/vue-tags-input/index.mjs +350 -0
  392. package/vue-tags-input/style.css +1 -0
  393. package/vue-tree-select/index.mjs +2 -0
  394. package/vue-tree-select/style.css +1 -0
  395. package/vue-video-player/index.mjs +136 -0
  396. package/vue-video-player/style.css +1 -0
  397. package/watermark/index.mjs +2 -0
  398. package/watermark/style.css +1 -0
  399. package/web-types.json +1 -1
  400. package/x-input-tag/index.mjs +232 -0
  401. package/x-input-tag/style.css +1 -0
  402. package/year-calendar/index.mjs +2 -0
  403. package/year-calendar/style.css +1 -0
  404. package/chunks/B4M_TFeR.mjs +0 -152
  405. package/chunks/B5BIQCcK.mjs +0 -149
  406. package/chunks/BHNKrW1j.mjs +0 -61
  407. package/chunks/BO9jWhBl.mjs +0 -46
  408. package/chunks/BZ8aOa78.mjs +0 -35
  409. package/chunks/Bsz7y4Xp.mjs +0 -73
  410. package/chunks/Bxj372sF.mjs +0 -53
  411. package/chunks/C33EmJN8.mjs +0 -32
  412. package/chunks/C6Li3-l7.mjs +0 -28
  413. package/chunks/CBcdalMX.mjs +0 -35
  414. package/chunks/CdRsyF0n.mjs +0 -43
  415. package/chunks/ClNahmiU.mjs +0 -23
  416. package/chunks/CstztYMu.mjs +0 -28
  417. package/chunks/DC9b53M6.mjs +0 -32
  418. package/chunks/DDVAgRED.mjs +0 -36
  419. package/chunks/DpJQABVD.mjs +0 -91
  420. package/chunks/ZsLNWI9x.mjs +0 -46
  421. package/chunks/jn_iQrVZ.mjs +0 -28
  422. package/constants.d.ts +0 -1
  423. package/constants.mjs +0 -4
  424. package/element-dialog/index.d.ts +0 -53
  425. package/empty-view/index.d.ts +0 -29
  426. package/flex-scroll-area/index.d.ts +0 -22
  427. package/form-advice/index.d.ts +0 -9
  428. package/form-cell/index.d.ts +0 -25
  429. package/form-check-box-group/index.d.ts +0 -93
  430. package/form-check-box-group/index.mjs +0 -2
  431. package/form-checkbox/index.d.ts +0 -81
  432. package/form-date-picker/index.d.ts +0 -104
  433. package/form-holder/index.d.ts +0 -95
  434. package/form-image/index.d.ts +0 -82
  435. package/form-input/index.d.ts +0 -91
  436. package/form-input-email/index.d.ts +0 -79
  437. package/form-input-id-card/index.d.ts +0 -79
  438. package/form-input-number/index.d.ts +0 -95
  439. package/form-input-phone-number/index.d.ts +0 -79
  440. package/form-input-tag/index.d.ts +0 -2
  441. package/form-input-time/index.d.ts +0 -2
  442. package/form-item-group/index.d.ts +0 -18
  443. package/form-item-x/index.d.ts +0 -54
  444. package/form-radio-group/index.d.ts +0 -81
  445. package/form-rate/index.d.ts +0 -79
  446. package/form-red-table/index.d.ts +0 -21
  447. package/form-row/index.d.ts +0 -11
  448. package/form-select/index.d.ts +0 -81
  449. package/form-slider/index.d.ts +0 -79
  450. package/form-switch/index.d.ts +0 -79
  451. package/form-text/index.d.ts +0 -77
  452. package/form-view/index.d.ts +0 -2
  453. package/input/style.css +0 -1
  454. package/resolver.mjs +0 -79
  455. package/table-view/index.d.ts +0 -2
  456. package/toolbar/index.d.ts +0 -2
  457. package/toolbar-button/index.d.ts +0 -2
  458. /package/{resolver.d.ts → resolver/index.d.ts} +0 -0
@@ -0,0 +1,1354 @@
1
+ import { allProps as e } from "../props/vue-tree-select.mjs";
2
+ import { Fragment as t, Teleport as n, Transition as r, TransitionGroup as i, computed as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, inject as u, isVNode as d, mergeProps as f, nextTick as p, onBeforeUnmount as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, useTemplateRef as y, watch as b } from "vue";
3
+ import { isPromise as x } from "@web-utils/core";
4
+ import { debounce as S, last as C, noop as w, once as T } from "lodash-es";
5
+ //#region src/components/tree-select/utils/index.ts
6
+ var E = w, D = (e) => function(t, ...n) {
7
+ t.type === "mousedown" && t.button === 0 && e.call(this, t, ...n);
8
+ }, O = (e, t) => {
9
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = t.offsetHeight / 3;
10
+ r.bottom + i > n.bottom ? e.scrollTop = Math.min(t.offsetTop + t.clientHeight - e.offsetHeight + i, e.scrollHeight) : r.top - i < n.top && (e.scrollTop = Math.max(t.offsetTop - i, 0));
11
+ };
12
+ function k(e) {
13
+ let t = [], n = e.parentNode;
14
+ for (; n && n.nodeName !== "BODY" && n.nodeType === document.ELEMENT_NODE;) A(n) && t.push(n), n = n.parentNode;
15
+ return t.push(window), t;
16
+ }
17
+ function A(e) {
18
+ if (!e) return !1;
19
+ let { overflow: t, overflowX: n, overflowY: r } = getComputedStyle(e);
20
+ return /(auto|scroll|overlay)/.test(t + r + n);
21
+ }
22
+ function j(e, t) {
23
+ let n = k(e);
24
+ return window.addEventListener("resize", t, { passive: !0 }), n.forEach((e) => {
25
+ e.addEventListener("scroll", t, { passive: !0 });
26
+ }), function() {
27
+ window.removeEventListener("resize", t), n.forEach((e) => {
28
+ e.removeEventListener("scroll", t);
29
+ });
30
+ };
31
+ }
32
+ var M = (e) => Number.isNaN(e), N = () => ({});
33
+ function P(e) {
34
+ return typeof e != "object" || !e ? !1 : Object.getPrototypeOf(e) === Object.prototype;
35
+ }
36
+ function ee(e, t, n) {
37
+ P(n) ? (e[t] || (e[t] = {}), F(e[t], n)) : e[t] = n;
38
+ }
39
+ function F(e, t) {
40
+ if (P(t)) {
41
+ let n = Object.keys(t);
42
+ for (let r = 0, i = n.length; r < i; r++) ee(e, n[r], t[n[r]]);
43
+ }
44
+ return e;
45
+ }
46
+ function I(e, t, n) {
47
+ for (let r = 0, i = e.length; r < i; r++) if (t.call(n, e[r], r, e)) return e[r];
48
+ }
49
+ function te(e, t) {
50
+ let n = e.indexOf(t);
51
+ n !== -1 && e.splice(n, 1);
52
+ }
53
+ function L(e, t) {
54
+ return e.indexOf(t) !== -1;
55
+ }
56
+ function R(e, t) {
57
+ if (e.length !== t.length) return !0;
58
+ for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !0;
59
+ return !1;
60
+ }
61
+ function ne(e, t) {
62
+ let n = t.length, r = e.length;
63
+ if (r > n) return !1;
64
+ if (r === n) return e === t;
65
+ outer: for (let i = 0, a = 0; i < r; i++) {
66
+ let r = e.charCodeAt(i);
67
+ for (; a < n;) if (t.charCodeAt(a++) === r) continue outer;
68
+ return !1;
69
+ }
70
+ return !0;
71
+ }
72
+ var z, B = [], re = 100;
73
+ function ie() {
74
+ z = window.setInterval(() => {
75
+ B.forEach(oe);
76
+ }, re);
77
+ }
78
+ function ae() {
79
+ z && clearInterval(z), z = null;
80
+ }
81
+ function oe(e) {
82
+ let { $el: t, listener: n, lastWidth: r, lastHeight: i } = e, a = t.offsetWidth, o = t.offsetHeight;
83
+ (r !== a || i !== o) && (e.lastWidth = a, e.lastHeight = o, n({
84
+ width: a,
85
+ height: o
86
+ }));
87
+ }
88
+ function se(e, t) {
89
+ let n = {
90
+ $el: e,
91
+ listener: t,
92
+ lastWidth: null,
93
+ lastHeight: null
94
+ };
95
+ return B.push(n), oe(n), ie(), () => {
96
+ te(B, n), B.length || ae();
97
+ };
98
+ }
99
+ function ce(e, t) {
100
+ let n = document.createElement("_"), r = n.appendChild(document.createElement("_")), i = n.appendChild(document.createElement("_")), a = r.appendChild(document.createElement("_")), o, s;
101
+ return r.style.cssText = n.style.cssText = "height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1", a.style.cssText = i.style.cssText = "display:block;height:100%;transition:0s;width:100%", a.style.width = a.style.height = "200%", e.appendChild(n), c(), u;
102
+ function c() {
103
+ l();
104
+ let a = e.offsetWidth, u = e.offsetHeight;
105
+ (a !== o || u !== s) && (o = a, s = u, i.style.width = `${a * 2}px`, i.style.height = `${u * 2}px`, n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight, r.scrollLeft = r.scrollWidth, r.scrollTop = r.scrollHeight, t({
106
+ width: a,
107
+ height: u
108
+ })), r.addEventListener("scroll", c), n.addEventListener("scroll", c);
109
+ }
110
+ function l() {
111
+ r.removeEventListener("scroll", c), n.removeEventListener("scroll", c);
112
+ }
113
+ function u() {
114
+ l(), e.removeChild(n);
115
+ }
116
+ }
117
+ function le(e, t) {
118
+ let n = document.documentMode === 9, r = !0, i = (n ? se : ce)(e, (...e) => r || t(...e));
119
+ return r = !1, i;
120
+ }
121
+ //#endregion
122
+ //#region src/components/tree-select/constants.ts
123
+ var V = "ALL_CHILDREN", H = "ALL_DESCENDANTS", U = "LEAF_CHILDREN", W = "LEAF_DESCENDANTS", ue = "LOAD_ROOT_OPTIONS", de = "LOAD_CHILDREN_OPTIONS", fe = "ASYNC_SEARCH", G = {
124
+ BACKSPACE: 8,
125
+ ENTER: 13,
126
+ ESCAPE: 27,
127
+ END: 35,
128
+ HOME: 36,
129
+ ARROW_LEFT: 37,
130
+ ARROW_UP: 38,
131
+ ARROW_RIGHT: 39,
132
+ ARROW_DOWN: 40,
133
+ DELETE: 46
134
+ }, K = Symbol("vueTreeSelect");
135
+ //#endregion
136
+ //#region src/components/tree-select/components/VueTreeSelectHiddenFields.vue?vue&type=script&lang.jsx
137
+ function pe(e) {
138
+ // istanbul ignore next
139
+ return typeof e == "string" ? e :
140
+ // istanbul ignore else
141
+ e != null && !M(e) ? JSON.stringify(e) : "";
142
+ }
143
+ //#endregion
144
+ //#region src/components/tree-select/components/VueTreeSelectHiddenFields.vue
145
+ var me = {
146
+ name: "VueTreeSelectHiddenFields",
147
+ setup() {
148
+ let e = u(K);
149
+ return () => {
150
+ if (!e.name || e.disabled || !e.hasValue) return null;
151
+ let t = e.internalValue.map(pe);
152
+ return e.multiple && e.joinValues && (t = [t.join(e.delimiter)]), t.map((t, n) => l("input", {
153
+ type: "hidden",
154
+ name: e.name,
155
+ value: t,
156
+ key: `hidden-field-${n}`
157
+ }, null));
158
+ };
159
+ }
160
+ }, he = [
161
+ G.ENTER,
162
+ G.END,
163
+ G.HOME,
164
+ G.ARROW_LEFT,
165
+ G.ARROW_UP,
166
+ G.ARROW_RIGHT,
167
+ G.ARROW_DOWN
168
+ ], ge = {
169
+ name: "VueTreeSelectInput",
170
+ setup(e, { expose: t }) {
171
+ let n = u(K), r = v(""), i = v(5), o = y("sizer"), s = y("input"), c = () => {
172
+ n.trigger.searchQuery = r.value;
173
+ }, d = S(c, 200, {
174
+ leading: !0,
175
+ trailing: !0
176
+ }), m = a(() => n.searchable && !n.disabled && n.multiple), h = a(() => ({ width: m.value ? `${i.value}px` : null })), g = () => {
177
+ if (!n.disabled) {
178
+ var e;
179
+ (e = s.value) == null || e.focus();
180
+ }
181
+ }, _ = () => {
182
+ var e;
183
+ (e = s.value) == null || e.blur();
184
+ }, x = () => {
185
+ // istanbul ignore else
186
+ n.trigger.isFocused = !0, n.openOnFocus && n.openMenu();
187
+ }, C = () => {
188
+ let e = n.getMenu();
189
+ // istanbul ignore next
190
+ if (e && document.activeElement === e) return g();
191
+ n.trigger.isFocused = !1, n.closeMenu();
192
+ }, w = (e) => {
193
+ let { value: t } = e.target;
194
+ r.value = t, t ? d() : (d.cancel(), c());
195
+ }, T = () => {
196
+ w({ target: { value: "" } });
197
+ }, E = (e) => {
198
+ let t = "which" in e ? e.which : /* istanbul ignore next */ e.keyCode;
199
+ if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) {
200
+ if (!n.menu.isOpen && L(he, t)) return e.preventDefault(), n.openMenu();
201
+ switch (t) {
202
+ case G.BACKSPACE:
203
+ n.backspaceRemoves && !r.value.length && n.removeLastValue();
204
+ break;
205
+ case G.ENTER: {
206
+ if (e.preventDefault(), n.menu.current === null) return;
207
+ let t = n.getNode(n.menu.current);
208
+ if (t.isBranch && n.disableBranchNodes) return;
209
+ n.select(t);
210
+ break;
211
+ }
212
+ case G.ESCAPE:
213
+ r.value.length ? T() : n.menu.isOpen && n.closeMenu();
214
+ break;
215
+ case G.END:
216
+ e.preventDefault(), n.highlightLastOption();
217
+ break;
218
+ case G.HOME:
219
+ e.preventDefault(), n.highlightFirstOption();
220
+ break;
221
+ case G.ARROW_LEFT: {
222
+ let t = n.getNode(n.menu.current);
223
+ t.isBranch && n.shouldExpand(t) ? (e.preventDefault(), n.toggleExpanded(t)) : !t.isRootNode && (t.isLeaf || t.isBranch && !n.shouldExpand(t)) && (e.preventDefault(), n.setCurrentHighlightedOption(t.parentNode));
224
+ break;
225
+ }
226
+ case G.ARROW_UP:
227
+ e.preventDefault(), n.highlightPrevOption();
228
+ break;
229
+ case G.ARROW_RIGHT: {
230
+ let t = n.getNode(n.menu.current);
231
+ t.isBranch && !n.shouldExpand(t) && (e.preventDefault(), n.toggleExpanded(t));
232
+ break;
233
+ }
234
+ case G.ARROW_DOWN:
235
+ e.preventDefault(), n.highlightNextOption();
236
+ break;
237
+ case G.DELETE:
238
+ n.deleteRemoves && !r.value.length && n.removeLastValue();
239
+ break;
240
+ default:
241
+ // istanbul ignore else
242
+ n.openMenu();
243
+ }
244
+ }
245
+ }, D = (e) => {
246
+ // istanbul ignore next
247
+ r.value.length && e.stopPropagation();
248
+ }, O = () => l("input", {
249
+ ref: "input",
250
+ class: "vue-treeselect__input",
251
+ type: "text",
252
+ autocomplete: "off",
253
+ tabIndex: n.tabIndex,
254
+ required: n.required && !n.hasValue,
255
+ value: r.value,
256
+ style: h.value,
257
+ onFocus: x,
258
+ onInput: w,
259
+ onBlur: C,
260
+ onKeydown: E,
261
+ onMousedown: D
262
+ }, null), k = () => l("div", {
263
+ ref: "sizer",
264
+ class: "vue-treeselect__sizer"
265
+ }, [r.value]), A = () => {
266
+ var e;
267
+ i.value = Math.max(5, ((e = o.value) == null ? void 0 : e.scrollWidth) + 15);
268
+ };
269
+ return b(() => n.trigger.searchQuery, (e) => {
270
+ r.value = e;
271
+ }), b(r, () => {
272
+ // istanbul ignore else
273
+ m.value && p(A);
274
+ }), t({
275
+ blur: _,
276
+ focus: g
277
+ }), () => {
278
+ let e = {}, t = [];
279
+ return n.searchable && !n.disabled && (t.push(O()), m.value && t.push(k())), n.searchable || F(e, {
280
+ on: {
281
+ focus: x,
282
+ blur: C,
283
+ keydown: E
284
+ },
285
+ ref: "input"
286
+ }), !n.searchable && !n.disabled && F(e, { attrs: { tabIndex: n.tabIndex } }), l("div", f({ class: "vue-treeselect__input-container" }, e), [t]);
287
+ };
288
+ }
289
+ }, _e = {
290
+ name: "VueTreeSelectPlaceholder",
291
+ setup() {
292
+ let e = u(K);
293
+ return () => l("div", { class: {
294
+ "vue-treeselect__placeholder": !0,
295
+ "vue-treeselect-helper-zoom-effect-off": !0,
296
+ "vue-treeselect-helper-hide": e.hasValue || e.trigger.searchQuery
297
+ } }, [e.placeholder]);
298
+ }
299
+ }, ve = {
300
+ name: "VueTreeSelectSingleValue",
301
+ setup(e, { expose: n }) {
302
+ let r = u(K);
303
+ return n({ input: y("input") }), () => {
304
+ let e = r.selectedNodes[0];
305
+ return l(t, null, [
306
+ r.hasValue && !r.trigger.searchQuery ? l("div", { class: "vue-treeselect__single-value" }, [r.$slots["value-label"] ? r.$slots["value-label"]({ node: e }) : e.label]) : null,
307
+ l(_e, null, null),
308
+ l(ge, { ref: "input" }, null)
309
+ ]);
310
+ };
311
+ }
312
+ }, ye = {
313
+ xmlns: "http://www.w3.org/2000/svg",
314
+ viewBox: "0 0 348.333 348.333"
315
+ }, be = /* @__PURE__ */ Object.assign({ name: "VueTreeSelectDelete" }, {
316
+ __name: "VueTreeSelectDelete",
317
+ setup(e) {
318
+ return (e, t) => (_(), o("svg", ye, [...t[0] || (t[0] = [s("path", { d: "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" }, null, -1)])]));
319
+ }
320
+ }), xe = {
321
+ name: "VueTreeSelectMultiValueItem",
322
+ props: { node: {
323
+ type: Object,
324
+ required: !0
325
+ } },
326
+ setup(e) {
327
+ let t = u(K), n = D(() => {
328
+ t.select(e.node);
329
+ });
330
+ return () => l("div", { class: "vue-treeselect__multi-value-item-container" }, [l("div", {
331
+ class: {
332
+ "vue-treeselect__multi-value-item": !0,
333
+ "vue-treeselect__multi-value-item-disabled": e.node.isDisabled,
334
+ "vue-treeselect__multi-value-item-new": e.node.isNew
335
+ },
336
+ onMousedown: n
337
+ }, [l("span", { class: "vue-treeselect__multi-value-label" }, [t.$slots["value-label"] ? t.$slots["value-label"]({ node: e.node }) : e.node.label]), l("span", { class: "vue-treeselect__icon vue-treeselect__value-remove" }, [l(be, null, null)])])]);
338
+ }
339
+ }, Se = {
340
+ name: "VueTreeSelectMultiValue",
341
+ setup(e, { expose: t }) {
342
+ let n = u(K), r = { props: {
343
+ tag: "div",
344
+ name: "vue-treeselect__multi-value-item--transition",
345
+ appear: !0
346
+ } }, a = () => n.internalValue.slice(0, n.limit).map(n.getNode).map((e) => l(xe, {
347
+ key: `multi-value-item-${e.id}`,
348
+ node: e
349
+ }, null)), o = () => {
350
+ let e = n.internalValue.length - n.limit;
351
+ return e <= 0 ? null : l("div", {
352
+ class: "vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off",
353
+ key: "exceed-limit-tip"
354
+ }, [l("span", { class: "vue-treeselect__limit-tip-text" }, [n.limitText(e)])]);
355
+ };
356
+ return t({ input: y("input") }), () => l(i, f({ class: "vue-treeselect__multi-value" }, r), { default: () => [
357
+ a(),
358
+ o(),
359
+ l(_e, { key: "placeholder" }, null),
360
+ l(ge, {
361
+ ref: "input",
362
+ key: "input"
363
+ }, null)
364
+ ] });
365
+ }
366
+ }, Ce = {
367
+ xmlns: "http://www.w3.org/2000/svg",
368
+ viewBox: "0 0 292.362 292.362"
369
+ }, we = /* @__PURE__ */ Object.assign({ name: "VueTreeSelectArrow" }, {
370
+ __name: "VueTreeSelectArrow",
371
+ setup(e) {
372
+ return (e, t) => (_(), o("svg", Ce, [...t[0] || (t[0] = [s("path", { d: "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" }, null, -1)])]));
373
+ }
374
+ }), Te = {
375
+ name: "VueTreeSelectControl",
376
+ setup(e, { expose: t }) {
377
+ let n = u(K), r = a(() => n.hasValue && n.internalValue.some((e) => !n.getNode(e).isDisabled)), i = a(() => n.clearable && !n.disabled && n.hasValue && (r.value || n.allowClearingDisabled)), o = a(() => n.alwaysOpen ? !n.menu.isOpen : !0), s = D((e) => {
378
+ e.preventDefault(), e.stopPropagation(), n.focusInput(), n.toggleMenu();
379
+ }), c = () => {
380
+ let e = n.multiple ? n.clearAllText : n.clearValueText;
381
+ return i.value ? l("div", {
382
+ class: "vue-treeselect__x-container",
383
+ title: e,
384
+ onMousedown: f
385
+ }, [l(be, { class: "vue-treeselect__x" }, null)]) : null;
386
+ }, d = () => {
387
+ let e = {
388
+ "vue-treeselect__control-arrow": !0,
389
+ "vue-treeselect__control-arrow--rotated": n.menu.isOpen
390
+ };
391
+ return o.value ? l("div", {
392
+ class: "vue-treeselect__control-arrow-container",
393
+ onMousedown: s
394
+ }, [l(we, { class: e }, null)]) : null;
395
+ }, f = D((e) => {
396
+ e.stopPropagation(), e.preventDefault();
397
+ let t = n.beforeClearAll(), r = (e) => {
398
+ e && n.clear();
399
+ };
400
+ x(t) ? t.then(r) : setTimeout(() => r(t), 0);
401
+ });
402
+ return t({
403
+ container: y("container"),
404
+ valueContainer: y("value-container")
405
+ }), () => {
406
+ let e = n.single ? ve : Se;
407
+ return l("div", {
408
+ class: "vue-treeselect__control",
409
+ onMousedown: n.handleMouseDown
410
+ }, [
411
+ l("div", {
412
+ class: "vue-treeselect__value-container",
413
+ ref: "container"
414
+ }, [l(e, { ref: "value-container" }, null)]),
415
+ c(),
416
+ d()
417
+ ]);
418
+ };
419
+ }
420
+ };
421
+ //#endregion
422
+ //#region src/components/tree-select/components/VueTreeSelectTip.jsx
423
+ function q(e, { slots: t }) {
424
+ var n;
425
+ return l("div", { class: `vue-treeselect__tip vue-treeselect__${e.type}-tip` }, [l("div", { class: "vue-treeselect__icon-container" }, [l("span", { class: `vue-treeselect__icon-${e.icon}` }, null)]), l("span", { class: `vue-treeselect__tip-text vue-treeselect__${e.type}-tip-text` }, [(n = t.default) == null ? void 0 : n.call(t)])]);
426
+ }
427
+ q.props = {
428
+ type: {
429
+ type: String,
430
+ required: !0
431
+ },
432
+ icon: {
433
+ type: String,
434
+ required: !0
435
+ }
436
+ }, q.inheritAttrs = !1;
437
+ //#endregion
438
+ //#region src/components/tree-select/components/VueTreeSelectOption.vue?vue&type=script&lang.jsx
439
+ function Ee(e) {
440
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
441
+ }
442
+ var J, Y, X, De = {
443
+ name: "VueTreeSelectOption",
444
+ props: { node: {
445
+ type: Object,
446
+ required: !0
447
+ } },
448
+ setup(e) {
449
+ let t = u(K), n = a(() => e.node.isBranch && t.shouldExpand(e.node)), i = a(() => t.shouldShowOptionInMenu(e.node)), o = () => l("div", {
450
+ class: {
451
+ "vue-treeselect__option": !0,
452
+ "vue-treeselect__option--disabled": e.node.isDisabled,
453
+ "vue-treeselect__option--selected": t.isSelected(e.node),
454
+ "vue-treeselect__option--highlight": e.node.isHighlighted,
455
+ "vue-treeselect__option--matched": t.localSearch.active && e.node.isMatched,
456
+ "vue-treeselect__option--hide": !i.value
457
+ },
458
+ onMouseenter: b,
459
+ "data-id": e.node.id
460
+ }, [d(), f([p([m()]), h()])]), s = () => n.value ? l("div", { class: "vue-treeselect__list" }, [
461
+ g(),
462
+ _(),
463
+ v(),
464
+ y()
465
+ ]) : null, d = () => {
466
+ if (t.shouldFlattenOptions && i.value) return null;
467
+ if (e.node.isBranch) {
468
+ let e = { props: {
469
+ name: "vue-treeselect__option-arrow--prepare",
470
+ appear: !0
471
+ } }, t = {
472
+ "vue-treeselect__option-arrow": !0,
473
+ "vue-treeselect__option-arrow--rotated": n.value
474
+ };
475
+ return l("div", {
476
+ class: "vue-treeselect__option-arrow-container",
477
+ onMousedown: x
478
+ }, [l(r, e, { default: () => [l(we, { class: t }, null)] })]);
479
+ }
480
+ return t.hasBranchNodes ? (J || (J = l("div", { class: "vue-treeselect__option-arrow-placeholder" }, [c("\xA0")])), J) : null;
481
+ }, f = (e) => l("div", {
482
+ class: "vue-treeselect__label-container",
483
+ onMousedown: S
484
+ }, [e]), p = (n) => t.single || t.disableBranchNodes && e.node.isBranch ? null : l("div", { class: "vue-treeselect__checkbox-container" }, [n]), m = () => {
485
+ let n = t.forest.checkedStateMap[e.node.id], r = {
486
+ "vue-treeselect__checkbox": !0,
487
+ "vue-treeselect__checkbox--checked": n === 2,
488
+ "vue-treeselect__checkbox--indeterminate": n === 1,
489
+ "vue-treeselect__checkbox--unchecked": n === 0,
490
+ "vue-treeselect__checkbox--disabled": e.node.isDisabled
491
+ };
492
+ return Y || (Y = l("span", { class: "vue-treeselect__check-mark" }, null)), X || (X = l("span", { class: "vue-treeselect__minus-mark" }, null)), l("span", { class: r }, [Y, X]);
493
+ }, h = () => {
494
+ let n = e.node.isBranch && (t.localSearch.active ? t.showCountOnSearchComputed : t.showCount), r = n ? t.localSearch.active ? t.localSearch.countMap[e.node.id][t.showCountOf] : e.node.count[t.showCountOf] : NaN, i = "vue-treeselect__label", a = "vue-treeselect__count", o = t.$slots["option-label"];
495
+ return o ? o({
496
+ node: e.node,
497
+ shouldShowCount: n,
498
+ count: r,
499
+ labelClassName: i,
500
+ countClassName: a
501
+ }) : l("label", { class: i }, [e.node.label, n && l("span", { class: a }, [
502
+ c("("),
503
+ r,
504
+ c(")")
505
+ ])]);
506
+ }, g = () => e.node.childrenStates.isLoaded ? e.node.children.map((e) => l(De, {
507
+ node: e,
508
+ key: e.id
509
+ }, null)) : null, _ = () => !e.node.childrenStates.isLoaded || e.node.children.length ? null : l(q, {
510
+ type: "no-children",
511
+ icon: "warning"
512
+ }, { default: () => [t.noChildrenText] }), v = () => e.node.childrenStates.isLoading ? l(q, {
513
+ type: "loading",
514
+ icon: "loader"
515
+ }, { default: () => [t.loadingText] }) : null, y = () => e.node.childrenStates.loadingError ? l(q, {
516
+ type: "error",
517
+ icon: "error"
518
+ }, { default: () => [e.node.childrenStates.loadingError, l("a", {
519
+ class: "vue-treeselect__retry",
520
+ title: t.retryTitle,
521
+ onMousedown: C
522
+ }, [t.retryText])] }) : null, b = (n) => {
523
+ n.target === n.currentTarget && t.setCurrentHighlightedOption(e.node, !1);
524
+ }, x = D(() => {
525
+ t.toggleExpanded(e.node);
526
+ }), S = D(() => {
527
+ e.node.isBranch && t.disableBranchNodes ? t.toggleExpanded(e.node) : t.select(e.node);
528
+ }), C = D(() => {
529
+ t.loadChildrenOptions(e.node);
530
+ });
531
+ return () => {
532
+ let n;
533
+ return l("div", { class: {
534
+ "vue-treeselect__list-item": !0,
535
+ [`vue-treeselect__indent-level-${t.shouldFlattenOptions ? 0 : e.node.level}`]: !0
536
+ } }, [o(), e.node.isBranch && l(r, { name: "vue-treeselect__list--transition" }, Ee(n = s()) ? n : { default: () => [n] })]);
537
+ };
538
+ }
539
+ };
540
+ //#endregion
541
+ //#region src/components/tree-select/components/VueTreeSelectMenu.vue?vue&type=script&lang.jsx
542
+ function Oe(e) {
543
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
544
+ }
545
+ var ke = {
546
+ top: "top",
547
+ bottom: "bottom",
548
+ above: "top",
549
+ below: "bottom"
550
+ }, Ae = {
551
+ name: "VueTreeSelectMenu",
552
+ setup() {
553
+ let e = u(K), t = null, n = null, i = a(() => ({ maxHeight: `${e.maxHeight}px` })), o = a(() => ({ zIndex: e.appendToBody ? null : e.zIndex })), s = () => e.menu.isOpen ? l("div", {
554
+ ref: "menu",
555
+ class: "vue-treeselect__menu",
556
+ onMousedown: e.handleMouseDown,
557
+ style: i.value
558
+ }, [
559
+ c(),
560
+ e.async ? _() : e.localSearch.active ? m() : f(),
561
+ d()
562
+ ]) : null, c = () => {
563
+ let t = e.$slots["before-list"];
564
+ return t ? t() : null;
565
+ }, d = () => {
566
+ let t = e.$slots["after-list"];
567
+ return t ? t() : null;
568
+ }, f = () => e.rootOptionsStates.isLoading ? x() : e.rootOptionsStates.loadingError ? S() : e.rootOptionsStates.isLoaded && e.forest.normalizedOptions.length === 0 ? w() : v(), m = () => e.rootOptionsStates.isLoading ? x() : e.rootOptionsStates.loadingError ? S() : e.rootOptionsStates.isLoaded && e.forest.normalizedOptions.length === 0 ? w() : e.localSearch.noResults ? T() : v(), _ = () => {
569
+ let t = e.getRemoteSearchEntry(), n = e.trigger.searchQuery === "" && !e.defaultOptions, r = n ? !1 : t.isLoaded && t.options.length === 0;
570
+ return n ? y() : t.isLoading ? x() : t.loadingError ? C() : r ? T() : v();
571
+ }, v = () => l("div", { class: "vue-treeselect__list" }, [e.forest.normalizedOptions.map((e) => l(De, {
572
+ node: e,
573
+ key: e.id
574
+ }, null))]), y = () => l(q, {
575
+ type: "search-prompt",
576
+ icon: "warning"
577
+ }, { default: () => [e.searchPromptText] }), x = () => l(q, {
578
+ type: "loading",
579
+ icon: "loader"
580
+ }, { default: () => [e.loadingText] }), S = () => l(q, {
581
+ type: "error",
582
+ icon: "error"
583
+ }, { default: () => [e.rootOptionsStates.loadingError, l("a", {
584
+ class: "vue-treeselect__retry",
585
+ onClick: e.loadRootOptions,
586
+ title: e.retryTitle
587
+ }, [e.retryText])] }), C = () => {
588
+ let t = e.getRemoteSearchEntry();
589
+ return l(q, {
590
+ type: "error",
591
+ icon: "error"
592
+ }, { default: () => [t.loadingError, l("a", {
593
+ class: "vue-treeselect__retry",
594
+ onClick: e.handleRemoteSearch,
595
+ title: e.retryTitle
596
+ }, [e.retryText])] });
597
+ }, w = () => l(q, {
598
+ type: "no-options",
599
+ icon: "warning"
600
+ }, { default: () => [e.noOptionsText] }), T = () => l(q, {
601
+ type: "no-results",
602
+ icon: "warning"
603
+ }, { default: () => [e.noResultsText] }), E = () => {
604
+ O(), k(), A();
605
+ }, D = () => {
606
+ M(), N();
607
+ }, O = () => {
608
+ if (!e.menu.isOpen) return;
609
+ let t = e.getMenu(), n = e.getControl(), r = t.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.height, o = window.innerHeight, s = i.top, c = window.innerHeight - i.bottom, l = i.top >= 0 && i.top <= o || i.top < 0 && i.bottom > 0, u = c > a + 40, d = s > a + 40;
610
+ l ? e.openDirection === "auto" ? u || !d ? e.menu.placement = "bottom" : e.menu.placement = "top" : e.menu.placement = ke[e.openDirection] : e.closeMenu();
611
+ }, k = () => {
612
+ let n = e.getMenu();
613
+ t || (t = { remove: le(n, O) });
614
+ }, A = () => {
615
+ let t = e.getControl();
616
+ n || (n = { remove: j(t, O) });
617
+ }, M = () => {
618
+ t && (t.remove(), t = null);
619
+ }, N = () => {
620
+ n && (n.remove(), n = null);
621
+ };
622
+ return b(() => e.menu.isOpen, (e) => {
623
+ e ? p(E) : D();
624
+ }), h(() => {
625
+ e.menu.isOpen && p(E);
626
+ }), g(() => {
627
+ D();
628
+ }), () => {
629
+ let e;
630
+ return l("div", {
631
+ ref: "menu-container",
632
+ class: "vue-treeselect__menu-container",
633
+ style: o.value
634
+ }, [l(r, { name: "vue-treeselect__menu--transition" }, Oe(e = s()) ? e : { default: () => [e] })]);
635
+ };
636
+ }
637
+ }, je = {
638
+ name: "VueTreeSelectPortalTarget",
639
+ setup() {
640
+ let e = u(K), t = y("el"), n = y("menu"), r = null, i = null, a = () => {
641
+ let r = e.getControl().getBoundingClientRect(), i = t.value.getBoundingClientRect(), a = e.menu.placement === "bottom" ? r.height : 0, o = `${Math.round(r.left - i.left)}px`, s = `${Math.round(r.top - i.top + a)}px`, c = n.value.$refs["menu-container"].style, l = I([
642
+ "transform",
643
+ "webkitTransform",
644
+ "MozTransform",
645
+ "msTransform"
646
+ ], (e) => e in document.body.style);
647
+ c[l] = `translate(${o}, ${s})`;
648
+ }, o = () => {
649
+ let t = e.getControl();
650
+ r || (r = { remove: j(t, a) });
651
+ }, s = () => {
652
+ let n = e.getControl().getBoundingClientRect();
653
+ t.value.style.width = `${n.width}px`;
654
+ }, c = () => {
655
+ let t = e.getControl();
656
+ i || (i = { remove: le(t, () => {
657
+ s(), a();
658
+ }) });
659
+ }, d = () => {
660
+ r && (r.remove(), r = null);
661
+ }, f = () => {
662
+ i && (i.remove(), i = null);
663
+ }, p = () => {
664
+ d(), f();
665
+ }, g = () => {
666
+ s(), a(), o(), c();
667
+ };
668
+ return b(() => e.menu.isOpen, (e) => {
669
+ e ? g() : p();
670
+ }), b(() => e.menu.placement, () => {
671
+ a();
672
+ }), h(() => {
673
+ e.menu.isOpen && g();
674
+ }), m(() => {
675
+ p();
676
+ }), () => l("div", {
677
+ ref: "el",
678
+ class: ["vue-treeselect__portal-target", e.wrapperClass],
679
+ style: { zIndex: e.zIndex },
680
+ "data-instance-id": e.getInstanceId()
681
+ }, [l(Ae, { ref: "menu" }, null)]);
682
+ }
683
+ }, Me = {
684
+ name: "VueTreeSelectMenuPortal",
685
+ setup(e, { expose: t }) {
686
+ return t({ portalTarget: y("portalTarget") }), () => l(n, { to: "body" }, { default: () => [l(je, { ref: "portalTarget" }, null)] });
687
+ }
688
+ };
689
+ //#endregion
690
+ //#region src/components/tree-select/VueTreeSelect.vue?vue&type=script&lang.jsx
691
+ function Z(e, t) {
692
+ let n = 0;
693
+ do {
694
+ if (e.level < n) return -1;
695
+ if (t.level < n) return 1;
696
+ if (e.index[n] !== t.index[n]) return e.index[n] - t.index[n];
697
+ n++;
698
+ } while (!0);
699
+ }
700
+ function Ne(e, t) {
701
+ return e.level === t.level ? Z(e, t) : e.level - t.level;
702
+ }
703
+ function Q() {
704
+ return {
705
+ isLoaded: !1,
706
+ isLoading: !1,
707
+ loadingError: ""
708
+ };
709
+ }
710
+ function Pe(e) {
711
+ // istanbul ignore next
712
+ return typeof e == "string" ? e : typeof e == "number" && !M(e) ? `${e}` : "";
713
+ }
714
+ function Fe(e, t, n) {
715
+ return e ? ne(t, n) : L(n, t);
716
+ }
717
+ function $(e) {
718
+ return e.message || String(e);
719
+ }
720
+ //#endregion
721
+ //#region src/components/tree-select/VueTreeSelect.vue
722
+ var Ie = {
723
+ name: "VueTreeSelect",
724
+ provide() {
725
+ return { [K]: this };
726
+ },
727
+ props: { ...e },
728
+ emits: [
729
+ "update:modelValue",
730
+ "search-change",
731
+ "close",
732
+ "open",
733
+ "deselect",
734
+ "select"
735
+ ],
736
+ data() {
737
+ return {
738
+ trigger: {
739
+ isFocused: !1,
740
+ searchQuery: ""
741
+ },
742
+ menu: {
743
+ isOpen: !1,
744
+ current: null,
745
+ lastScrollPosition: 0,
746
+ placement: "bottom"
747
+ },
748
+ forest: {
749
+ normalizedOptions: [],
750
+ nodeMap: N(),
751
+ checkedStateMap: N(),
752
+ selectedNodeIds: this.extractCheckedNodeIdsFromValue(),
753
+ selectedNodeMap: N()
754
+ },
755
+ rootOptionsStates: Q(),
756
+ localSearch: {
757
+ active: !1,
758
+ noResults: !0,
759
+ countMap: N()
760
+ },
761
+ remoteSearch: N()
762
+ };
763
+ },
764
+ computed: {
765
+ selectedNodes() {
766
+ return this.forest.selectedNodeIds.map(this.getNode);
767
+ },
768
+ internalValue() {
769
+ let e;
770
+ // istanbul ignore else
771
+ if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === "ALL") e = this.forest.selectedNodeIds.slice();
772
+ else if (this.valueConsistsOf === "BRANCH_PRIORITY") e = this.forest.selectedNodeIds.filter((e) => {
773
+ let t = this.getNode(e);
774
+ return t.isRootNode ? !0 : !this.isSelected(t.parentNode);
775
+ });
776
+ else if (this.valueConsistsOf === "LEAF_PRIORITY") e = this.forest.selectedNodeIds.filter((e) => {
777
+ let t = this.getNode(e);
778
+ return t.isLeaf ? !0 : t.children.length === 0;
779
+ });
780
+ else if (this.valueConsistsOf === "ALL_WITH_INDETERMINATE") {
781
+ let t = [];
782
+ e = this.forest.selectedNodeIds.slice(), this.selectedNodes.forEach((n) => {
783
+ n.ancestors.forEach((n) => {
784
+ L(t, n.id) || L(e, n.id) || t.push(n.id);
785
+ });
786
+ }), e.push(...t);
787
+ }
788
+ return this.sortValueBy === "LEVEL" ? e.sort((e, t) => Ne(this.getNode(e), this.getNode(t))) : this.sortValueBy === "INDEX" && e.sort((e, t) => Z(this.getNode(e), this.getNode(t))), e;
789
+ },
790
+ hasValue() {
791
+ return this.internalValue.length > 0;
792
+ },
793
+ single() {
794
+ return !this.multiple;
795
+ },
796
+ visibleOptionIds() {
797
+ let e = [];
798
+ return this.traverseAllNodesByIndex((t) => {
799
+ if ((!this.localSearch.active || this.shouldOptionBeIncludedInSearchResult(t)) && e.push(t.id), t.isBranch && !this.shouldExpand(t)) return !1;
800
+ }), e;
801
+ },
802
+ hasVisibleOptions() {
803
+ return this.visibleOptionIds.length !== 0;
804
+ },
805
+ showCountOnSearchComputed() {
806
+ return typeof this.showCountOnSearch == "boolean" ? this.showCountOnSearch : this.showCount;
807
+ },
808
+ hasBranchNodes() {
809
+ return this.forest.normalizedOptions.some((e) => e.isBranch);
810
+ },
811
+ shouldFlattenOptions() {
812
+ return this.localSearch.active && this.flattenSearchResults;
813
+ },
814
+ wrapperClass() {
815
+ return {
816
+ "vue-treeselect": !0,
817
+ "vue-treeselect--single": this.single,
818
+ "vue-treeselect--multi": this.multiple,
819
+ "vue-treeselect--searchable": this.searchable,
820
+ "vue-treeselect--disabled": this.disabled,
821
+ "vue-treeselect--focused": this.trigger.isFocused,
822
+ "vue-treeselect--has-value": this.hasValue,
823
+ "vue-treeselect--open": this.menu.isOpen,
824
+ "vue-treeselect--open-above": this.menu.placement === "top",
825
+ "vue-treeselect--open-below": this.menu.placement === "bottom",
826
+ "vue-treeselect--branch-nodes-disabled": this.disableBranchNodes,
827
+ "vue-treeselect--append-to-body": this.appendToBody
828
+ };
829
+ }
830
+ },
831
+ watch: {
832
+ alwaysOpen(e) {
833
+ e ? this.openMenu() : this.closeMenu();
834
+ },
835
+ branchNodesFirst() {
836
+ this.initialize();
837
+ },
838
+ disabled(e) {
839
+ e && this.menu.isOpen ? this.closeMenu() : !e && !this.menu.isOpen && this.alwaysOpen && this.openMenu();
840
+ },
841
+ flat() {
842
+ this.initialize();
843
+ },
844
+ internalValue(e, t) {
845
+ R(e, t) && this.$emit("update:modelValue", this.getValue(), this.getInstanceId());
846
+ },
847
+ matchKeys() {
848
+ this.initialize();
849
+ },
850
+ multiple(e) {
851
+ // istanbul ignore else
852
+ e && this.buildForestState();
853
+ },
854
+ options: {
855
+ handler() {
856
+ this.async || (this.initialize(), this.rootOptionsStates.isLoaded = Array.isArray(this.options));
857
+ },
858
+ deep: !0,
859
+ immediate: !0
860
+ },
861
+ "trigger.searchQuery"() {
862
+ this.async ? this.handleRemoteSearch() : this.handleLocalSearch(), this.$emit("search-change", this.trigger.searchQuery, this.getInstanceId());
863
+ },
864
+ value() {
865
+ let e = this.extractCheckedNodeIdsFromValue();
866
+ R(e, this.internalValue) && this.fixSelectedNodeIds(e);
867
+ }
868
+ },
869
+ created() {
870
+ this.verifyProps(), this.resetFlags();
871
+ },
872
+ mounted() {
873
+ this.autoFocus && this.focusInput(), !this.options && !this.async && this.autoLoadRootOptions && this.loadRootOptions(), this.alwaysOpen && this.openMenu(), this.async && this.defaultOptions && this.handleRemoteSearch();
874
+ },
875
+ beforeUnmount() {
876
+ // istanbul ignore next
877
+ this.toggleClickOutsideEvent(!1);
878
+ },
879
+ methods: {
880
+ verifyProps() {
881
+ E(() => this.async ? this.searchable : !0, () => "For async search mode, the value of \"searchable\" prop must be true."), this.options == null && !this.loadOptions && E(() => !1, () => "Are you meant to dynamically load options? You need to use \"loadOptions\" prop."), this.flat && E(() => this.multiple, () => "You are using flat mode. But you forgot to add \"multiple=true\"?"), this.flat || [
882
+ "autoSelectAncestors",
883
+ "autoSelectDescendants",
884
+ "autoDeselectAncestors",
885
+ "autoDeselectDescendants"
886
+ ].forEach((e) => {
887
+ E(() => !this[e], () => `"${e}" only applies to flat mode.`);
888
+ });
889
+ },
890
+ resetFlags() {
891
+ this._blurOnSelect = !1;
892
+ },
893
+ initialize() {
894
+ let e = this.async ? this.getRemoteSearchEntry().options : this.options;
895
+ if (Array.isArray(e)) {
896
+ let t = this.forest.nodeMap;
897
+ this.forest.nodeMap = N(), this.keepDataOfSelectedNodes(t), this.forest.normalizedOptions = this.normalize(null, e, t), this.fixSelectedNodeIds(this.internalValue);
898
+ } else this.forest.normalizedOptions = [];
899
+ },
900
+ getInstanceId() {
901
+ return this.instanceId == null ? this.id : this.instanceId;
902
+ },
903
+ getValue() {
904
+ if (this.valueFormat === "id") return this.multiple ? this.internalValue.slice() : this.internalValue[0];
905
+ let e = this.internalValue.map((e) => this.getNode(e).raw);
906
+ return this.multiple ? e : e[0];
907
+ },
908
+ getNode(e) {
909
+ return E(() => e != null, () => `Invalid node id: ${e}`), e == null ? null : e in this.forest.nodeMap ? this.forest.nodeMap[e] : this.createFallbackNode(e);
910
+ },
911
+ createFallbackNode(e) {
912
+ let t = this.extractNodeFromValue(e), n = {
913
+ id: e,
914
+ label: this.enhancedNormalizer(t).label || `${e} (unknown)`,
915
+ ancestors: [],
916
+ parentNode: null,
917
+ isFallbackNode: !0,
918
+ isRootNode: !0,
919
+ isLeaf: !0,
920
+ isBranch: !1,
921
+ isDisabled: !1,
922
+ isNew: !1,
923
+ index: [-1],
924
+ level: 0,
925
+ raw: t
926
+ };
927
+ return this.forest.nodeMap[e] = n;
928
+ },
929
+ extractCheckedNodeIdsFromValue() {
930
+ return this.modelValue == null ? [] : this.valueFormat === "id" ? this.multiple ? this.modelValue.slice() : [this.modelValue] : (this.multiple ? this.modelValue : [this.modelValue]).map((e) => this.enhancedNormalizer(e)).map((e) => e.id);
931
+ },
932
+ extractNodeFromValue(e) {
933
+ let t = { id: e };
934
+ return this.valueFormat === "id" ? t : I(this.multiple ? Array.isArray(this.modelValue) ? this.modelValue : [] : this.modelValue ? [this.modelValue] : [], (t) => t && this.enhancedNormalizer(t).id === e) || t;
935
+ },
936
+ fixSelectedNodeIds(e) {
937
+ let t = [];
938
+ // istanbul ignore else
939
+ if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === "ALL") t = e;
940
+ else if (this.valueConsistsOf === "BRANCH_PRIORITY") e.forEach((e) => {
941
+ t.push(e);
942
+ let n = this.getNode(e);
943
+ n.isBranch && this.traverseDescendantsBFS(n, (e) => {
944
+ t.push(e.id);
945
+ });
946
+ });
947
+ else if (this.valueConsistsOf === "LEAF_PRIORITY") {
948
+ let n = N(), r = e.slice();
949
+ for (; r.length;) {
950
+ let e = r.shift(), i = this.getNode(e);
951
+ t.push(e), !i.isRootNode && (i.parentNode.id in n || (n[i.parentNode.id] = i.parentNode.children.length), --n[i.parentNode.id] === 0 && r.push(i.parentNode.id));
952
+ }
953
+ } else if (this.valueConsistsOf === "ALL_WITH_INDETERMINATE") {
954
+ let n = N(), r = e.filter((e) => {
955
+ let t = this.getNode(e);
956
+ return t.isLeaf || t.children.length === 0;
957
+ });
958
+ for (; r.length;) {
959
+ let e = r.shift(), i = this.getNode(e);
960
+ t.push(e), !i.isRootNode && (i.parentNode.id in n || (n[i.parentNode.id] = i.parentNode.children.length), --n[i.parentNode.id] === 0 && r.push(i.parentNode.id));
961
+ }
962
+ }
963
+ R(this.forest.selectedNodeIds, t) && (this.forest.selectedNodeIds = t), this.buildForestState();
964
+ },
965
+ keepDataOfSelectedNodes(e) {
966
+ this.forest.selectedNodeIds.forEach((t) => {
967
+ if (!e[t]) return;
968
+ let n = {
969
+ ...e[t],
970
+ isFallbackNode: !0
971
+ };
972
+ this.forest.nodeMap[t] = n;
973
+ });
974
+ },
975
+ isSelected(e) {
976
+ return this.forest.selectedNodeMap[e.id] === !0;
977
+ },
978
+ traverseDescendantsBFS(e, t) {
979
+ // istanbul ignore if
980
+ if (!e.isBranch) return;
981
+ let n = e.children.slice();
982
+ for (; n.length;) {
983
+ let e = n[0];
984
+ e.isBranch && n.push(...e.children), t(e), n.shift();
985
+ }
986
+ },
987
+ traverseDescendantsDFS(e, t) {
988
+ e.isBranch && e.children.forEach((e) => {
989
+ this.traverseDescendantsDFS(e, t), t(e);
990
+ });
991
+ },
992
+ traverseAllNodesDFS(e) {
993
+ this.forest.normalizedOptions.forEach((t) => {
994
+ this.traverseDescendantsDFS(t, e), e(t);
995
+ });
996
+ },
997
+ traverseAllNodesByIndex(e) {
998
+ let t = (n) => {
999
+ n.children.forEach((n) => {
1000
+ e(n) !== !1 && n.isBranch && t(n);
1001
+ });
1002
+ };
1003
+ t({ children: this.forest.normalizedOptions });
1004
+ },
1005
+ toggleClickOutsideEvent(e) {
1006
+ e ? document.addEventListener("mousedown", this.handleClickOutside, !1) : document.removeEventListener("mousedown", this.handleClickOutside, !1);
1007
+ },
1008
+ getContainer() {
1009
+ return this.$refs.control.container;
1010
+ },
1011
+ getInput() {
1012
+ return this.$refs.control.valueContainer.input;
1013
+ },
1014
+ focusInput() {
1015
+ this.getInput().focus();
1016
+ },
1017
+ blurInput() {
1018
+ this.getInput().blur();
1019
+ },
1020
+ handleMouseDown: D(function(e) {
1021
+ e.preventDefault(), e.stopPropagation(), !this.disabled && (this.getContainer().contains(e.target) && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused) && this.openMenu(), this._blurOnSelect ? this.blurInput() : this.focusInput(), this.resetFlags());
1022
+ }),
1023
+ handleClickOutside(e) {
1024
+ // istanbul ignore else
1025
+ this.$refs.wrapper && !this.$refs.wrapper.contains(e.target) && (this.blurInput(), this.closeMenu());
1026
+ },
1027
+ handleLocalSearch() {
1028
+ let { searchQuery: e } = this.trigger, t = () => this.resetHighlightedOptionWhenNecessary(!0);
1029
+ if (!e) return this.localSearch.active = !1, t();
1030
+ this.localSearch.active = !0, this.localSearch.noResults = !0, this.traverseAllNodesDFS((e) => {
1031
+ e.isBranch && (e.isExpandedOnSearch = !1, e.showAllChildrenOnSearch = !1, e.isMatched = !1, e.hasMatchedDescendants = !1, this.localSearch.countMap[e.id] = {
1032
+ [V]: 0,
1033
+ [H]: 0,
1034
+ [U]: 0,
1035
+ [W]: 0
1036
+ });
1037
+ });
1038
+ let n = e.trim().toLocaleLowerCase(), r = n.replace(/\s+/g, " ").split(" ");
1039
+ this.traverseAllNodesDFS((e) => {
1040
+ this.searchNested && r.length > 1 ? e.isMatched = r.every((t) => Fe(!1, t, e.nestedSearchLabel)) : e.isMatched = this.matchKeys.some((t) => Fe(!this.disableFuzzyMatching, n, e.lowerCased[t])), e.isMatched && (this.localSearch.noResults = !1, e.ancestors.forEach((e) => this.localSearch.countMap[e.id][H]++), e.isLeaf && e.ancestors.forEach((e) => this.localSearch.countMap[e.id][W]++), e.parentNode !== null && (this.localSearch.countMap[e.parentNode.id][V] += 1, e.isLeaf && (this.localSearch.countMap[e.parentNode.id][U] += 1))), (e.isMatched || e.isBranch && e.isExpandedOnSearch) && e.parentNode !== null && (e.parentNode.isExpandedOnSearch = !0, e.parentNode.hasMatchedDescendants = !0);
1041
+ }), t();
1042
+ },
1043
+ handleRemoteSearch() {
1044
+ let { searchQuery: e } = this.trigger, t = this.getRemoteSearchEntry(), n = () => {
1045
+ this.initialize(), this.resetHighlightedOptionWhenNecessary(!0);
1046
+ };
1047
+ if ((e === "" || this.cacheOptions) && t.isLoaded) return n();
1048
+ this.callLoadOptionsProp({
1049
+ action: fe,
1050
+ args: { searchQuery: e },
1051
+ isPending() {
1052
+ return t.isLoading;
1053
+ },
1054
+ start: () => {
1055
+ t.isLoading = !0, t.isLoaded = !1, t.loadingError = "";
1056
+ },
1057
+ succeed: (r) => {
1058
+ t.isLoaded = !0, t.options = r, this.trigger.searchQuery === e && n();
1059
+ },
1060
+ fail: (e) => {
1061
+ t.loadingError = $(e);
1062
+ },
1063
+ end: () => {
1064
+ t.isLoading = !1;
1065
+ }
1066
+ });
1067
+ },
1068
+ getRemoteSearchEntry() {
1069
+ let { searchQuery: e } = this.trigger, t = this.remoteSearch[e] || {
1070
+ ...Q(),
1071
+ options: []
1072
+ };
1073
+ if (this.$watch(() => t.options, () => {
1074
+ this.trigger.searchQuery === e && this.initialize();
1075
+ }, { deep: !0 }), e === "") {
1076
+ if (Array.isArray(this.defaultOptions)) return t.options = this.defaultOptions, t.isLoaded = !0, t;
1077
+ if (this.defaultOptions !== !0) return t.isLoaded = !0, t;
1078
+ }
1079
+ return this.remoteSearch[e] || (this.remoteSearch[e] = t), t;
1080
+ },
1081
+ shouldExpand(e) {
1082
+ return this.localSearch.active ? e.isExpandedOnSearch : e.isExpanded;
1083
+ },
1084
+ shouldOptionBeIncludedInSearchResult(e) {
1085
+ return !!(e.isMatched || e.isBranch && e.hasMatchedDescendants && !this.flattenSearchResults || !e.isRootNode && e.parentNode.showAllChildrenOnSearch);
1086
+ },
1087
+ shouldShowOptionInMenu(e) {
1088
+ return !(this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(e));
1089
+ },
1090
+ getControl() {
1091
+ return this.$refs.control.$el;
1092
+ },
1093
+ getMenu() {
1094
+ let e = (this.appendToBody ? this.$refs.portal.portalTarget : this).$refs.menu.$refs.menu;
1095
+ return e && e.nodeName !== "#comment" ? e : null;
1096
+ },
1097
+ setCurrentHighlightedOption(e, t = !0) {
1098
+ let n = this.menu.current;
1099
+ if (n != null && n in this.forest.nodeMap && (this.forest.nodeMap[n].isHighlighted = !1), this.menu.current = e.id, e.isHighlighted = !0, this.menu.isOpen && t) {
1100
+ let t = () => {
1101
+ let t = this.getMenu(), n = t.querySelector(`.vue-treeselect__option[data-id="${e.id}"]`);
1102
+ n && O(t, n);
1103
+ };
1104
+ this.getMenu() ? t() :
1105
+ // istanbul ignore next
1106
+ this.$nextTick(t);
1107
+ }
1108
+ },
1109
+ resetHighlightedOptionWhenNecessary(e = !1) {
1110
+ let { current: t } = this.menu;
1111
+ (e || t == null || !(t in this.forest.nodeMap) || !this.shouldShowOptionInMenu(this.getNode(t))) && this.highlightFirstOption();
1112
+ },
1113
+ highlightFirstOption() {
1114
+ if (!this.hasVisibleOptions) return;
1115
+ let e = this.visibleOptionIds[0];
1116
+ this.setCurrentHighlightedOption(this.getNode(e));
1117
+ },
1118
+ highlightPrevOption() {
1119
+ if (!this.hasVisibleOptions) return;
1120
+ let e = this.visibleOptionIds.indexOf(this.menu.current) - 1;
1121
+ if (e === -1) return this.highlightLastOption();
1122
+ this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]));
1123
+ },
1124
+ highlightNextOption() {
1125
+ if (!this.hasVisibleOptions) return;
1126
+ let e = this.visibleOptionIds.indexOf(this.menu.current) + 1;
1127
+ if (e === this.visibleOptionIds.length) return this.highlightFirstOption();
1128
+ this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]));
1129
+ },
1130
+ highlightLastOption() {
1131
+ if (!this.hasVisibleOptions) return;
1132
+ let e = C(this.visibleOptionIds);
1133
+ this.setCurrentHighlightedOption(this.getNode(e));
1134
+ },
1135
+ resetSearchQuery() {
1136
+ this.trigger.searchQuery = "";
1137
+ },
1138
+ closeMenu() {
1139
+ !this.menu.isOpen || !this.disabled && this.alwaysOpen || (this.saveMenuScrollPosition(), this.menu.isOpen = !1, this.toggleClickOutsideEvent(!1), this.resetSearchQuery(), this.$emit("close", this.getValue(), this.getInstanceId()));
1140
+ },
1141
+ openMenu() {
1142
+ this.disabled || this.menu.isOpen || (this.menu.isOpen = !0, this.$nextTick(this.resetHighlightedOptionWhenNecessary), this.$nextTick(this.restoreMenuScrollPosition), !this.options && !this.async && this.loadRootOptions(), this.toggleClickOutsideEvent(!0), this.$emit("open", this.getInstanceId()));
1143
+ },
1144
+ toggleMenu() {
1145
+ this.menu.isOpen ? this.closeMenu() : this.openMenu();
1146
+ },
1147
+ toggleExpanded(e) {
1148
+ let t;
1149
+ this.localSearch.active ? (t = e.isExpandedOnSearch = !e.isExpandedOnSearch, t && (e.showAllChildrenOnSearch = !0)) : t = e.isExpanded = !e.isExpanded, t && !e.childrenStates.isLoaded && this.loadChildrenOptions(e);
1150
+ },
1151
+ buildForestState() {
1152
+ let e = N();
1153
+ this.forest.selectedNodeIds.forEach((t) => {
1154
+ e[t] = !0;
1155
+ }), this.forest.selectedNodeMap = e;
1156
+ let t = N();
1157
+ this.multiple && (this.traverseAllNodesByIndex((e) => {
1158
+ t[e.id] = 0;
1159
+ }), this.selectedNodes.forEach((e) => {
1160
+ t[e.id] = 2, !this.flat && !this.disableBranchNodes && e.ancestors.forEach((e) => {
1161
+ this.isSelected(e) || (t[e.id] = 1);
1162
+ });
1163
+ })), this.forest.checkedStateMap = t;
1164
+ },
1165
+ enhancedNormalizer(e) {
1166
+ return {
1167
+ ...e,
1168
+ ...this.normalizer(e, this.getInstanceId())
1169
+ };
1170
+ },
1171
+ normalize(e, t, n) {
1172
+ let r = t.map((e) => [this.enhancedNormalizer(e), e]).map(([t, r], i) => {
1173
+ this.checkDuplication(t), this.verifyNodeShape(t);
1174
+ let { id: a, label: o, children: s, isDefaultExpanded: c } = t, l = e === null, u = l ? 0 : e.level + 1, d = Array.isArray(s) || s === null, f = !d, p = !!t.isDisabled || !this.flat && !l && e.isDisabled, m = !!t.isNew, h = this.matchKeys.reduce((e, n) => ({
1175
+ ...e,
1176
+ [n]: Pe(t[n]).toLocaleLowerCase()
1177
+ }), {}), g = l ? h.label : `${e.nestedSearchLabel} ${h.label}`;
1178
+ this.forest.nodeMap[a] = N();
1179
+ let _ = this.forest.nodeMap[a];
1180
+ if (_.id = a, _.label = o, _.level = u, _.ancestors = l ? [] : [e].concat(e.ancestors), _.index = (l ? [] : e.index).concat(i), _.parentNode = e, _.lowerCased = h, _.nestedSearchLabel = g, _.isDisabled = p, _.isNew = m, _.isMatched = !1, _.isHighlighted = !1, _.isBranch = d, _.isLeaf = f, _.isRootNode = l, _.raw = r, d) {
1181
+ let e = Array.isArray(s);
1182
+ _.childrenStates = {
1183
+ ...Q(),
1184
+ isLoaded: e
1185
+ }, _.isExpanded = typeof c == "boolean" ? c : u < this.defaultExpandLevel, _.hasMatchedDescendants = !1, _.hasDisabledDescendants = !1, _.isExpandedOnSearch = !1, _.showAllChildrenOnSearch = !1, _.count = {
1186
+ [V]: 0,
1187
+ [H]: 0,
1188
+ [U]: 0,
1189
+ [W]: 0
1190
+ }, _.children = e ? this.normalize(_, s, n) : [], c === !0 && _.ancestors.forEach((e) => {
1191
+ e.isExpanded = !0;
1192
+ }), !e && typeof this.loadOptions != "function" ? E(() => !1, () => "Unloaded branch node detected. \"loadOptions\" prop is required to load its children.") : !e && _.isExpanded && this.loadChildrenOptions(_);
1193
+ }
1194
+ if (_.ancestors.forEach((e) => e.count[H]++), f && _.ancestors.forEach((e) => e.count[W]++), l || (e.count[V] += 1, f && (e.count[U] += 1), p && (e.hasDisabledDescendants = !0)), n && n[a]) {
1195
+ let e = n[a];
1196
+ _.isMatched = e.isMatched, _.showAllChildrenOnSearch = e.showAllChildrenOnSearch, _.isHighlighted = e.isHighlighted, e.isBranch && _.isBranch && (_.isExpanded = e.isExpanded, _.isExpandedOnSearch = e.isExpandedOnSearch, e.childrenStates.isLoaded && !_.childrenStates.isLoaded ? _.isExpanded = !1 : _.childrenStates = { ...e.childrenStates });
1197
+ }
1198
+ return _;
1199
+ });
1200
+ if (this.branchNodesFirst) {
1201
+ let e = r.filter((e) => e.isBranch), t = r.filter((e) => e.isLeaf);
1202
+ r = e.concat(t);
1203
+ }
1204
+ return r;
1205
+ },
1206
+ loadRootOptions() {
1207
+ this.callLoadOptionsProp({
1208
+ action: ue,
1209
+ isPending: () => this.rootOptionsStates.isLoading,
1210
+ start: () => {
1211
+ this.rootOptionsStates.isLoading = !0, this.rootOptionsStates.loadingError = "";
1212
+ },
1213
+ succeed: () => {
1214
+ this.rootOptionsStates.isLoaded = !0, this.$nextTick(() => {
1215
+ this.resetHighlightedOptionWhenNecessary(!0);
1216
+ });
1217
+ },
1218
+ fail: (e) => {
1219
+ this.rootOptionsStates.loadingError = $(e);
1220
+ },
1221
+ end: () => {
1222
+ this.rootOptionsStates.isLoading = !1;
1223
+ }
1224
+ });
1225
+ },
1226
+ loadChildrenOptions(e) {
1227
+ let { id: t, raw: n } = e;
1228
+ this.callLoadOptionsProp({
1229
+ action: de,
1230
+ args: { parentNode: n },
1231
+ isPending: () => this.getNode(t).childrenStates.isLoading,
1232
+ start: () => {
1233
+ this.getNode(t).childrenStates.isLoading = !0, this.getNode(t).childrenStates.loadingError = "";
1234
+ },
1235
+ succeed: () => {
1236
+ this.getNode(t).childrenStates.isLoaded = !0;
1237
+ },
1238
+ fail: (e) => {
1239
+ this.getNode(t).childrenStates.loadingError = $(e);
1240
+ },
1241
+ end: () => {
1242
+ this.getNode(t).childrenStates.isLoading = !1;
1243
+ }
1244
+ });
1245
+ },
1246
+ callLoadOptionsProp({ action: e, args: t, isPending: n, start: r, succeed: i, fail: a, end: o }) {
1247
+ if (!this.loadOptions || n()) return;
1248
+ r();
1249
+ let s = T((e, t) => {
1250
+ e ? a(e) : i(t), o();
1251
+ }), c = this.loadOptions({
1252
+ id: this.getInstanceId(),
1253
+ instanceId: this.getInstanceId(),
1254
+ action: e,
1255
+ ...t,
1256
+ callback: s
1257
+ });
1258
+ x(c) && c.then(() => {
1259
+ s();
1260
+ }, (e) => {
1261
+ s(e);
1262
+ }).catch((e) => {
1263
+ // istanbul ignore next
1264
+ console.error(e);
1265
+ });
1266
+ },
1267
+ checkDuplication(e) {
1268
+ E(() => !(e.id in this.forest.nodeMap && !this.forest.nodeMap[e.id].isFallbackNode), () => `Detected duplicate presence of node id ${JSON.stringify(e.id)}. Their labels are "${this.forest.nodeMap[e.id].label}" and "${e.label}" respectively.`);
1269
+ },
1270
+ verifyNodeShape(e) {
1271
+ E(() => !(e.children === void 0 && e.isBranch === !0), () => "Are you meant to declare an unloaded branch node? `isBranch: true` is no longer supported, please use `children: null` instead.");
1272
+ },
1273
+ select(e) {
1274
+ if (this.disabled || e.isDisabled) return;
1275
+ this.single && this.clear();
1276
+ let t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] === 0 : !this.isSelected(e);
1277
+ t ? this._selectNode(e) : this._deselectNode(e), this.buildForestState(), t ? this.$emit("select", e.raw, this.getInstanceId()) : this.$emit("deselect", e.raw, this.getInstanceId()), this.localSearch.active && t && (this.single || this.clearOnSelect) && this.resetSearchQuery(), this.single && this.closeOnSelect && (this.closeMenu(), this.searchable && (this._blurOnSelect = !0));
1278
+ },
1279
+ clear() {
1280
+ this.hasValue && (this.single || this.allowClearingDisabled ? this.forest.selectedNodeIds = [] : this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter((e) => this.getNode(e).isDisabled), this.buildForestState());
1281
+ },
1282
+ _selectNode(e) {
1283
+ if (this.single || this.disableBranchNodes) return this.addValue(e);
1284
+ if (this.flat) {
1285
+ this.addValue(e), this.autoSelectAncestors ? e.ancestors.forEach((e) => {
1286
+ !this.isSelected(e) && !e.isDisabled && this.addValue(e);
1287
+ }) : this.autoSelectDescendants && this.traverseDescendantsBFS(e, (e) => {
1288
+ !this.isSelected(e) && !e.isDisabled && this.addValue(e);
1289
+ });
1290
+ return;
1291
+ }
1292
+ let t = e.isLeaf || !e.hasDisabledDescendants || this.allowSelectingDisabledDescendants;
1293
+ if (t && this.addValue(e), e.isBranch && this.traverseDescendantsBFS(e, (e) => {
1294
+ (!e.isDisabled || this.allowSelectingDisabledDescendants) && this.addValue(e);
1295
+ }), t) {
1296
+ let t = e;
1297
+ for (; (t = t.parentNode) !== null && t.children.every(this.isSelected);) this.addValue(t);
1298
+ }
1299
+ },
1300
+ _deselectNode(e) {
1301
+ if (this.disableBranchNodes) return this.removeValue(e);
1302
+ if (this.flat) {
1303
+ this.removeValue(e), this.autoDeselectAncestors ? e.ancestors.forEach((e) => {
1304
+ this.isSelected(e) && !e.isDisabled && this.removeValue(e);
1305
+ }) : this.autoDeselectDescendants && this.traverseDescendantsBFS(e, (e) => {
1306
+ this.isSelected(e) && !e.isDisabled && this.removeValue(e);
1307
+ });
1308
+ return;
1309
+ }
1310
+ let t = !1;
1311
+ if (e.isBranch && this.traverseDescendantsDFS(e, (e) => {
1312
+ (!e.isDisabled || this.allowSelectingDisabledDescendants) && (this.removeValue(e), t = !0);
1313
+ }), e.isLeaf || t || e.children.length === 0) {
1314
+ this.removeValue(e);
1315
+ let t = e;
1316
+ for (; (t = t.parentNode) !== null && this.isSelected(t);) this.removeValue(t);
1317
+ }
1318
+ },
1319
+ addValue(e) {
1320
+ this.forest.selectedNodeIds.push(e.id), this.forest.selectedNodeMap[e.id] = !0;
1321
+ },
1322
+ removeValue(e) {
1323
+ te(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
1324
+ },
1325
+ removeLastValue() {
1326
+ if (!this.hasValue) return;
1327
+ if (this.single) return this.clear();
1328
+ let e = C(this.internalValue), t = this.getNode(e);
1329
+ this.select(t);
1330
+ },
1331
+ saveMenuScrollPosition() {
1332
+ let e = this.getMenu();
1333
+ // istanbul ignore else
1334
+ e && (this.menu.lastScrollPosition = e.scrollTop);
1335
+ },
1336
+ restoreMenuScrollPosition() {
1337
+ let e = this.getMenu();
1338
+ // istanbul ignore else
1339
+ e && (e.scrollTop = this.menu.lastScrollPosition);
1340
+ }
1341
+ },
1342
+ render() {
1343
+ return l("div", {
1344
+ ref: "wrapper",
1345
+ class: this.wrapperClass
1346
+ }, [
1347
+ l(me, null, null),
1348
+ l(Te, { ref: "control" }, null),
1349
+ this.appendToBody ? l(Me, { ref: "portal" }, null) : l(Ae, { ref: "menu" }, null)
1350
+ ]);
1351
+ }
1352
+ };
1353
+ //#endregion
1354
+ export { Ie as t };