@voicenter-team/voicenter-ui-plus 1.1.21 → 2.0.2

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 (704) hide show
  1. package/library/{entry-EvdwF4XL.mjs → core/index.mjs} +18563 -10397
  2. package/library/core/index.mjs.br +0 -0
  3. package/library/core/index.mjs.gz +0 -0
  4. package/library/core/index.umd.js +15 -0
  5. package/library/core/index.umd.js.br +0 -0
  6. package/library/core/index.umd.js.gz +0 -0
  7. package/library/core/style.css +1 -0
  8. package/library/core/style.css.br +0 -0
  9. package/library/core/style.css.gz +0 -0
  10. package/library/{types → core/types}/components/VcButton/index.d.ts +78 -78
  11. package/library/{types → core/types}/components/VcDropdown/VcDropdown.vue.d.ts +8 -8
  12. package/library/{types → core/types}/components/VcMeterGroup/VcMeterGroup.vue.d.ts +3 -3
  13. package/library/{types → core/types}/components/VcMeterGroup/VcMeterGroupLabel.vue.d.ts +1 -1
  14. package/library/{types → core/types}/components/VcSparkline/VcBarLine.vue.d.ts +25 -1
  15. package/library/{types → core/types}/components/VcSparkline/VcSparkline.vue.d.ts +1 -1
  16. package/library/{types → core/types}/components/VcSparkline/VcTrendLine.vue.d.ts +1 -1
  17. package/library/{types → core/types}/components/VcSparkline/helper.d.ts +1 -1
  18. package/library/{types → core/types}/components/VcTransfer/VcTransfer.vue.d.ts +1 -1
  19. package/library/{types → core/types}/components/VcTree/VcTreeSelect.vue.d.ts +20 -19
  20. package/library/{types/components/index.d.ts → core/types/components/exports.d.ts} +92 -105
  21. package/library/{types/entity/composable → core/types/composables}/useConfirmPopup.d.ts +5 -5
  22. package/library/core/types/entry.d.ts +32 -0
  23. package/library/core/types/localization/locales/en.json.d.ts +165 -0
  24. package/library/{types → core/types}/services/index.d.ts +2 -2
  25. package/library/core/types/theme/themes.json.d.ts +185 -0
  26. package/library/core/types/tokens/tokens.d.ts +6 -0
  27. package/library/{types → core/types}/types/VcDropdown.types.d.ts +2 -1
  28. package/library/{types → core/types}/types/VcTabs.types.d.ts +0 -4
  29. package/library/{types → core/types}/types/VcTree.types.d.ts +2 -2
  30. package/library/core/types/types/basic.types.d.ts +20 -0
  31. package/library/{types → core/types}/types/index.d.ts +2 -8
  32. package/package.json +33 -26
  33. package/src/{theme → core/theme}/themes.json +8 -0
  34. package/tailwind.config.js +1 -1
  35. package/library/VcExcelFileUploader-DdT4JMP3.mjs +0 -28203
  36. package/library/VcExcelFileUploader-DdT4JMP3.mjs.br +0 -0
  37. package/library/VcExcelFileUploader-DdT4JMP3.mjs.gz +0 -0
  38. package/library/VcHtmlEditor-C3zXhk2H.mjs +0 -691
  39. package/library/VcHtmlEditor-C3zXhk2H.mjs.br +0 -0
  40. package/library/VcHtmlEditor-C3zXhk2H.mjs.gz +0 -0
  41. package/library/VcImageUploader-Db8XF_ZV.mjs +0 -1772
  42. package/library/VcImageUploader-Db8XF_ZV.mjs.br +0 -0
  43. package/library/VcImageUploader-Db8XF_ZV.mjs.gz +0 -0
  44. package/library/VcJsonSchema-B4EM6LcW.mjs +0 -2216
  45. package/library/VcJsonSchema-B4EM6LcW.mjs.br +0 -0
  46. package/library/VcJsonSchema-B4EM6LcW.mjs.gz +0 -0
  47. package/library/VcMdEditor-CMlNJcLY.mjs +0 -4
  48. package/library/VcMdEditor.vue_vue_type_script_setup_true_lang-DOX1NBnx.mjs +0 -27376
  49. package/library/VcMdEditor.vue_vue_type_script_setup_true_lang-DOX1NBnx.mjs.br +0 -0
  50. package/library/VcMdEditor.vue_vue_type_script_setup_true_lang-DOX1NBnx.mjs.gz +0 -0
  51. package/library/VcPdfDocument-Cf7CB2iK.mjs +0 -33131
  52. package/library/VcPdfDocument-Cf7CB2iK.mjs.br +0 -0
  53. package/library/VcPdfDocument-Cf7CB2iK.mjs.gz +0 -0
  54. package/library/VcSoundPlayer-Bc4GDrHh.mjs +0 -258
  55. package/library/VcSoundPlayer-Bc4GDrHh.mjs.br +0 -0
  56. package/library/VcSoundPlayer-Bc4GDrHh.mjs.gz +0 -0
  57. package/library/VcSparkline-CwjaA-i6.mjs +0 -561
  58. package/library/VcSparkline-CwjaA-i6.mjs.br +0 -0
  59. package/library/VcSparkline-CwjaA-i6.mjs.gz +0 -0
  60. package/library/VcSystemUserPrompt-WxIPI7kS.mjs +0 -145
  61. package/library/VcSystemUserPrompt-WxIPI7kS.mjs.br +0 -0
  62. package/library/VcSystemUserPrompt-WxIPI7kS.mjs.gz +0 -0
  63. package/library/VcTour-DE5ioKMo.mjs +0 -1068
  64. package/library/VcTour-DE5ioKMo.mjs.br +0 -0
  65. package/library/VcTour-DE5ioKMo.mjs.gz +0 -0
  66. package/library/VcTransfer-CG4j9PzS.mjs +0 -567
  67. package/library/VcTransfer-CG4j9PzS.mjs.br +0 -0
  68. package/library/VcTransfer-CG4j9PzS.mjs.gz +0 -0
  69. package/library/VcTree-C2VshYQH.mjs +0 -4
  70. package/library/VcTree.vue_vue_type_style_index_0_lang-DqIT64MT.mjs +0 -2219
  71. package/library/VcTree.vue_vue_type_style_index_0_lang-DqIT64MT.mjs.br +0 -0
  72. package/library/VcTree.vue_vue_type_style_index_0_lang-DqIT64MT.mjs.gz +0 -0
  73. package/library/VcTreeSelect-CwsiIyeG.mjs +0 -339
  74. package/library/VcTreeSelect-CwsiIyeG.mjs.br +0 -0
  75. package/library/VcTreeSelect-CwsiIyeG.mjs.gz +0 -0
  76. package/library/_isIterateeCall-jrkoht6u.mjs +0 -16
  77. package/library/apl-fqmucPXA.mjs +0 -140
  78. package/library/apl-fqmucPXA.mjs.br +0 -0
  79. package/library/apl-fqmucPXA.mjs.gz +0 -0
  80. package/library/asciiarmor-DucZyvP0.mjs +0 -56
  81. package/library/asciiarmor-DucZyvP0.mjs.br +0 -0
  82. package/library/asciiarmor-DucZyvP0.mjs.gz +0 -0
  83. package/library/asn1-BnOEsgAm.mjs +0 -144
  84. package/library/asn1-BnOEsgAm.mjs.br +0 -0
  85. package/library/asn1-BnOEsgAm.mjs.gz +0 -0
  86. package/library/asterisk-QAlztEwS.mjs +0 -345
  87. package/library/asterisk-QAlztEwS.mjs.br +0 -0
  88. package/library/asterisk-QAlztEwS.mjs.gz +0 -0
  89. package/library/brainfuck-DZVCuF_t.mjs +0 -53
  90. package/library/brainfuck-DZVCuF_t.mjs.br +0 -0
  91. package/library/brainfuck-DZVCuF_t.mjs.gz +0 -0
  92. package/library/clike-DaICHkS3.mjs +0 -805
  93. package/library/clike-DaICHkS3.mjs.br +0 -0
  94. package/library/clike-DaICHkS3.mjs.gz +0 -0
  95. package/library/clojure-BhXMqnxz.mjs +0 -849
  96. package/library/clojure-BhXMqnxz.mjs.br +0 -0
  97. package/library/clojure-BhXMqnxz.mjs.gz +0 -0
  98. package/library/cmake-BGaNd9E7.mjs +0 -71
  99. package/library/cmake-BGaNd9E7.mjs.br +0 -0
  100. package/library/cmake-BGaNd9E7.mjs.gz +0 -0
  101. package/library/cobol-4yqQntpt.mjs +0 -120
  102. package/library/cobol-4yqQntpt.mjs.br +0 -0
  103. package/library/cobol-4yqQntpt.mjs.gz +0 -0
  104. package/library/coffeescript-D2dXvhEc.mjs +0 -308
  105. package/library/coffeescript-D2dXvhEc.mjs.br +0 -0
  106. package/library/coffeescript-D2dXvhEc.mjs.gz +0 -0
  107. package/library/commonlisp-CF_VNHQR.mjs +0 -130
  108. package/library/commonlisp-CF_VNHQR.mjs.br +0 -0
  109. package/library/commonlisp-CF_VNHQR.mjs.gz +0 -0
  110. package/library/crystal-DyuLTqLs.mjs +0 -398
  111. package/library/crystal-DyuLTqLs.mjs.br +0 -0
  112. package/library/crystal-DyuLTqLs.mjs.gz +0 -0
  113. package/library/css-c-jst79C.mjs +0 -1783
  114. package/library/css-c-jst79C.mjs.br +0 -0
  115. package/library/css-c-jst79C.mjs.gz +0 -0
  116. package/library/cypher-Dlu_3r4V.mjs +0 -121
  117. package/library/cypher-Dlu_3r4V.mjs.br +0 -0
  118. package/library/cypher-Dlu_3r4V.mjs.gz +0 -0
  119. package/library/d-UURgV0Ux.mjs +0 -179
  120. package/library/d-UURgV0Ux.mjs.br +0 -0
  121. package/library/d-UURgV0Ux.mjs.gz +0 -0
  122. package/library/diff-B_Bi2Crb.mjs +0 -25
  123. package/library/dockerfile-D1TIj5jA.mjs +0 -201
  124. package/library/dockerfile-D1TIj5jA.mjs.br +0 -0
  125. package/library/dockerfile-D1TIj5jA.mjs.gz +0 -0
  126. package/library/dtd-Dy74G54E.mjs +0 -114
  127. package/library/dtd-Dy74G54E.mjs.br +0 -0
  128. package/library/dtd-Dy74G54E.mjs.gz +0 -0
  129. package/library/dylan-TSb-Nfix.mjs +0 -314
  130. package/library/dylan-TSb-Nfix.mjs.br +0 -0
  131. package/library/dylan-TSb-Nfix.mjs.gz +0 -0
  132. package/library/ebnf-DAomQUbD.mjs +0 -139
  133. package/library/ebnf-DAomQUbD.mjs.br +0 -0
  134. package/library/ebnf-DAomQUbD.mjs.gz +0 -0
  135. package/library/ecl-B59qGGVg.mjs +0 -178
  136. package/library/ecl-B59qGGVg.mjs.br +0 -0
  137. package/library/ecl-B59qGGVg.mjs.gz +0 -0
  138. package/library/eiffel-Dze7nlu3.mjs +0 -134
  139. package/library/eiffel-Dze7nlu3.mjs.br +0 -0
  140. package/library/eiffel-Dze7nlu3.mjs.gz +0 -0
  141. package/library/elm-DG7jkhNZ.mjs +0 -176
  142. package/library/elm-DG7jkhNZ.mjs.br +0 -0
  143. package/library/elm-DG7jkhNZ.mjs.gz +0 -0
  144. package/library/entry-EvdwF4XL.mjs.br +0 -0
  145. package/library/entry-EvdwF4XL.mjs.gz +0 -0
  146. package/library/erlang-BO6gOnGA.mjs +0 -674
  147. package/library/erlang-BO6gOnGA.mjs.br +0 -0
  148. package/library/erlang-BO6gOnGA.mjs.gz +0 -0
  149. package/library/factor-ne7PWKF0.mjs +0 -65
  150. package/library/factor-ne7PWKF0.mjs.br +0 -0
  151. package/library/factor-ne7PWKF0.mjs.gz +0 -0
  152. package/library/fcl-CDDUNjTj.mjs +0 -141
  153. package/library/fcl-CDDUNjTj.mjs.br +0 -0
  154. package/library/fcl-CDDUNjTj.mjs.gz +0 -0
  155. package/library/floating-ui.dom-CfpJisRd.mjs +0 -1401
  156. package/library/floating-ui.dom-CfpJisRd.mjs.br +0 -0
  157. package/library/floating-ui.dom-CfpJisRd.mjs.gz +0 -0
  158. package/library/forth-B9D2JCeE.mjs +0 -116
  159. package/library/forth-B9D2JCeE.mjs.br +0 -0
  160. package/library/forth-B9D2JCeE.mjs.gz +0 -0
  161. package/library/fortran-CAG2BFbe.mjs +0 -467
  162. package/library/fortran-CAG2BFbe.mjs.br +0 -0
  163. package/library/fortran-CAG2BFbe.mjs.gz +0 -0
  164. package/library/gas-d3KEcW3x.mjs +0 -294
  165. package/library/gas-d3KEcW3x.mjs.br +0 -0
  166. package/library/gas-d3KEcW3x.mjs.gz +0 -0
  167. package/library/gherkin-DhZlEZiy.mjs +0 -115
  168. package/library/gherkin-DhZlEZiy.mjs.br +0 -0
  169. package/library/gherkin-DhZlEZiy.mjs.gz +0 -0
  170. package/library/groovy-CpwJiBl7.mjs +0 -223
  171. package/library/groovy-CpwJiBl7.mjs.br +0 -0
  172. package/library/groovy-CpwJiBl7.mjs.gz +0 -0
  173. package/library/haskell-BlGBCCe3.mjs +0 -459
  174. package/library/haskell-BlGBCCe3.mjs.br +0 -0
  175. package/library/haskell-BlGBCCe3.mjs.gz +0 -0
  176. package/library/haxe-7MlzfeYV.mjs +0 -514
  177. package/library/haxe-7MlzfeYV.mjs.br +0 -0
  178. package/library/haxe-7MlzfeYV.mjs.gz +0 -0
  179. package/library/http-BqypyemW.mjs +0 -79
  180. package/library/http-BqypyemW.mjs.br +0 -0
  181. package/library/http-BqypyemW.mjs.gz +0 -0
  182. package/library/idl-4HIGJlDI.mjs +0 -985
  183. package/library/idl-4HIGJlDI.mjs.br +0 -0
  184. package/library/idl-4HIGJlDI.mjs.gz +0 -0
  185. package/library/index-4jX79S-P.mjs +0 -150
  186. package/library/index-4jX79S-P.mjs.br +0 -0
  187. package/library/index-4jX79S-P.mjs.gz +0 -0
  188. package/library/index-9LYQtr4h.mjs +0 -328
  189. package/library/index-9LYQtr4h.mjs.br +0 -0
  190. package/library/index-9LYQtr4h.mjs.gz +0 -0
  191. package/library/index-BAAqkdMI.mjs +0 -96
  192. package/library/index-BAAqkdMI.mjs.br +0 -0
  193. package/library/index-BAAqkdMI.mjs.gz +0 -0
  194. package/library/index-Ba4OKxCw.mjs +0 -323
  195. package/library/index-Ba4OKxCw.mjs.br +0 -0
  196. package/library/index-Ba4OKxCw.mjs.gz +0 -0
  197. package/library/index-Bs6_pkvd.mjs +0 -688
  198. package/library/index-Bs6_pkvd.mjs.br +0 -0
  199. package/library/index-Bs6_pkvd.mjs.gz +0 -0
  200. package/library/index-BulKMlHH.mjs +0 -79
  201. package/library/index-BulKMlHH.mjs.br +0 -0
  202. package/library/index-BulKMlHH.mjs.gz +0 -0
  203. package/library/index-CWRhvk2r.mjs +0 -156
  204. package/library/index-CWRhvk2r.mjs.br +0 -0
  205. package/library/index-CWRhvk2r.mjs.gz +0 -0
  206. package/library/index-CkrjnzoC.mjs +0 -384
  207. package/library/index-CkrjnzoC.mjs.br +0 -0
  208. package/library/index-CkrjnzoC.mjs.gz +0 -0
  209. package/library/index-DLB9KgZi.mjs +0 -301
  210. package/library/index-DLB9KgZi.mjs.br +0 -0
  211. package/library/index-DLB9KgZi.mjs.gz +0 -0
  212. package/library/index-DQ5kp4Rw.mjs +0 -114
  213. package/library/index-DQ5kp4Rw.mjs.br +0 -0
  214. package/library/index-DQ5kp4Rw.mjs.gz +0 -0
  215. package/library/index-DZkxoGn3.mjs +0 -81
  216. package/library/index-DZkxoGn3.mjs.br +0 -0
  217. package/library/index-DZkxoGn3.mjs.gz +0 -0
  218. package/library/index-EVu8jdcY.mjs +0 -405
  219. package/library/index-EVu8jdcY.mjs.br +0 -0
  220. package/library/index-EVu8jdcY.mjs.gz +0 -0
  221. package/library/index-Ftvywh65.mjs +0 -177
  222. package/library/index-Ftvywh65.mjs.br +0 -0
  223. package/library/index-Ftvywh65.mjs.gz +0 -0
  224. package/library/index-PFn9GZaw.mjs +0 -60
  225. package/library/index-PFn9GZaw.mjs.br +0 -0
  226. package/library/index-PFn9GZaw.mjs.gz +0 -0
  227. package/library/index-ef4WGzk3.mjs +0 -678
  228. package/library/index-ef4WGzk3.mjs.br +0 -0
  229. package/library/index-ef4WGzk3.mjs.gz +0 -0
  230. package/library/index-emKs9XKV.mjs +0 -35242
  231. package/library/index-emKs9XKV.mjs.br +0 -0
  232. package/library/index-emKs9XKV.mjs.gz +0 -0
  233. package/library/index-kYmjso4n.mjs +0 -311
  234. package/library/index-kYmjso4n.mjs.br +0 -0
  235. package/library/index-kYmjso4n.mjs.gz +0 -0
  236. package/library/index.es-DQ0tvEe9.mjs +0 -25486
  237. package/library/index.es-DQ0tvEe9.mjs.br +0 -0
  238. package/library/index.es-DQ0tvEe9.mjs.gz +0 -0
  239. package/library/javascript-C3MnDRiU.mjs +0 -994
  240. package/library/javascript-C3MnDRiU.mjs.br +0 -0
  241. package/library/javascript-C3MnDRiU.mjs.gz +0 -0
  242. package/library/jinja2-2Vo2sGef.mjs +0 -208
  243. package/library/jinja2-2Vo2sGef.mjs.br +0 -0
  244. package/library/jinja2-2Vo2sGef.mjs.gz +0 -0
  245. package/library/julia-Bs6JJhYG.mjs +0 -407
  246. package/library/julia-Bs6JJhYG.mjs.br +0 -0
  247. package/library/julia-Bs6JJhYG.mjs.gz +0 -0
  248. package/library/livescript-DmzgM3Yt.mjs +0 -296
  249. package/library/livescript-DmzgM3Yt.mjs.br +0 -0
  250. package/library/livescript-DmzgM3Yt.mjs.gz +0 -0
  251. package/library/lua-8cJgIlqe.mjs +0 -256
  252. package/library/lua-8cJgIlqe.mjs.br +0 -0
  253. package/library/lua-8cJgIlqe.mjs.gz +0 -0
  254. package/library/mathematica-DNLOL9PQ.mjs +0 -110
  255. package/library/mathematica-DNLOL9PQ.mjs.br +0 -0
  256. package/library/mathematica-DNLOL9PQ.mjs.gz +0 -0
  257. package/library/mbox-Ga7d4MMN.mjs +0 -117
  258. package/library/mbox-Ga7d4MMN.mjs.br +0 -0
  259. package/library/mbox-Ga7d4MMN.mjs.gz +0 -0
  260. package/library/mirc-Dma3B8rS.mjs +0 -107
  261. package/library/mirc-Dma3B8rS.mjs.br +0 -0
  262. package/library/mirc-Dma3B8rS.mjs.gz +0 -0
  263. package/library/mllike-DHn7xckP.mjs +0 -334
  264. package/library/mllike-DHn7xckP.mjs.br +0 -0
  265. package/library/mllike-DHn7xckP.mjs.gz +0 -0
  266. package/library/modelica-0d55jYY0.mjs +0 -147
  267. package/library/modelica-0d55jYY0.mjs.br +0 -0
  268. package/library/modelica-0d55jYY0.mjs.gz +0 -0
  269. package/library/mscgen-DdqZYINH.mjs +0 -135
  270. package/library/mscgen-DdqZYINH.mjs.br +0 -0
  271. package/library/mscgen-DdqZYINH.mjs.gz +0 -0
  272. package/library/mumps-Btr8VblO.mjs +0 -93
  273. package/library/mumps-Btr8VblO.mjs.br +0 -0
  274. package/library/mumps-Btr8VblO.mjs.gz +0 -0
  275. package/library/nginx-DTDtBDVN.mjs +0 -141
  276. package/library/nginx-DTDtBDVN.mjs.br +0 -0
  277. package/library/nginx-DTDtBDVN.mjs.gz +0 -0
  278. package/library/nsis-BnYeX9pP.mjs +0 -62
  279. package/library/nsis-BnYeX9pP.mjs.br +0 -0
  280. package/library/nsis-BnYeX9pP.mjs.gz +0 -0
  281. package/library/ntriples-CvgOYMpL.mjs +0 -153
  282. package/library/ntriples-CvgOYMpL.mjs.br +0 -0
  283. package/library/ntriples-CvgOYMpL.mjs.gz +0 -0
  284. package/library/octave-DYBj3-tl.mjs +0 -200
  285. package/library/octave-DYBj3-tl.mjs.br +0 -0
  286. package/library/octave-DYBj3-tl.mjs.gz +0 -0
  287. package/library/oz-R_e8WMIi.mjs +0 -231
  288. package/library/oz-R_e8WMIi.mjs.br +0 -0
  289. package/library/oz-R_e8WMIi.mjs.gz +0 -0
  290. package/library/pascal-GD8iposT.mjs +0 -105
  291. package/library/pascal-GD8iposT.mjs.br +0 -0
  292. package/library/pascal-GD8iposT.mjs.gz +0 -0
  293. package/library/perl-DL9mHpoi.mjs +0 -1105
  294. package/library/perl-DL9mHpoi.mjs.br +0 -0
  295. package/library/perl-DL9mHpoi.mjs.gz +0 -0
  296. package/library/pig-C_4T4YIV.mjs +0 -101
  297. package/library/pig-C_4T4YIV.mjs.br +0 -0
  298. package/library/pig-C_4T4YIV.mjs.gz +0 -0
  299. package/library/powershell-B0suO7Vd.mjs +0 -328
  300. package/library/powershell-B0suO7Vd.mjs.br +0 -0
  301. package/library/powershell-B0suO7Vd.mjs.gz +0 -0
  302. package/library/properties-BR-vP1aU.mjs +0 -58
  303. package/library/properties-BR-vP1aU.mjs.br +0 -0
  304. package/library/properties-BR-vP1aU.mjs.gz +0 -0
  305. package/library/protobuf-BxgpyhoW.mjs +0 -77
  306. package/library/protobuf-BxgpyhoW.mjs.br +0 -0
  307. package/library/protobuf-BxgpyhoW.mjs.gz +0 -0
  308. package/library/pug-DGCLwxp4.mjs +0 -405
  309. package/library/pug-DGCLwxp4.mjs.br +0 -0
  310. package/library/pug-DGCLwxp4.mjs.gz +0 -0
  311. package/library/puppet-Bdao66PW.mjs +0 -137
  312. package/library/puppet-Bdao66PW.mjs.br +0 -0
  313. package/library/puppet-Bdao66PW.mjs.gz +0 -0
  314. package/library/python-CvWbmiX4.mjs +0 -427
  315. package/library/python-CvWbmiX4.mjs.br +0 -0
  316. package/library/python-CvWbmiX4.mjs.gz +0 -0
  317. package/library/q-819KmTeu.mjs +0 -128
  318. package/library/q-819KmTeu.mjs.br +0 -0
  319. package/library/q-819KmTeu.mjs.gz +0 -0
  320. package/library/r-V7nswm59.mjs +0 -170
  321. package/library/r-V7nswm59.mjs.br +0 -0
  322. package/library/r-V7nswm59.mjs.gz +0 -0
  323. package/library/rpm-C-DLY-If.mjs +0 -109
  324. package/library/rpm-C-DLY-If.mjs.br +0 -0
  325. package/library/rpm-C-DLY-If.mjs.gz +0 -0
  326. package/library/ruby-JDKLJNK0.mjs +0 -330
  327. package/library/ruby-JDKLJNK0.mjs.br +0 -0
  328. package/library/ruby-JDKLJNK0.mjs.gz +0 -0
  329. package/library/sas-D2UG-yhZ.mjs +0 -207
  330. package/library/sas-D2UG-yhZ.mjs.br +0 -0
  331. package/library/sas-D2UG-yhZ.mjs.gz +0 -0
  332. package/library/scheme-BKzrkGJD.mjs +0 -222
  333. package/library/scheme-BKzrkGJD.mjs.br +0 -0
  334. package/library/scheme-BKzrkGJD.mjs.gz +0 -0
  335. package/library/shell-BlsXDxCn.mjs +0 -222
  336. package/library/shell-BlsXDxCn.mjs.br +0 -0
  337. package/library/shell-BlsXDxCn.mjs.gz +0 -0
  338. package/library/sieve-CjwBwOY5.mjs +0 -135
  339. package/library/sieve-CjwBwOY5.mjs.br +0 -0
  340. package/library/sieve-CjwBwOY5.mjs.gz +0 -0
  341. package/library/simple-mode-zrLq6ojR.mjs +0 -129
  342. package/library/simple-mode-zrLq6ojR.mjs.br +0 -0
  343. package/library/simple-mode-zrLq6ojR.mjs.gz +0 -0
  344. package/library/smalltalk-BOIGQuhN.mjs +0 -121
  345. package/library/smalltalk-BOIGQuhN.mjs.br +0 -0
  346. package/library/smalltalk-BOIGQuhN.mjs.gz +0 -0
  347. package/library/solr-CwD7U71z.mjs +0 -69
  348. package/library/solr-CwD7U71z.mjs.br +0 -0
  349. package/library/solr-CwD7U71z.mjs.gz +0 -0
  350. package/library/sparql-DYskk2vE.mjs +0 -249
  351. package/library/sparql-DYskk2vE.mjs.br +0 -0
  352. package/library/sparql-DYskk2vE.mjs.gz +0 -0
  353. package/library/spreadsheet-Bgtt3oLP.mjs +0 -87
  354. package/library/spreadsheet-Bgtt3oLP.mjs.br +0 -0
  355. package/library/spreadsheet-Bgtt3oLP.mjs.gz +0 -0
  356. package/library/sql-BSrOzCRI.mjs +0 -354
  357. package/library/sql-BSrOzCRI.mjs.br +0 -0
  358. package/library/sql-BSrOzCRI.mjs.gz +0 -0
  359. package/library/stex-B6LNC55o.mjs +0 -231
  360. package/library/stex-B6LNC55o.mjs.br +0 -0
  361. package/library/stex-B6LNC55o.mjs.gz +0 -0
  362. package/library/style.css +0 -1
  363. package/library/style.css.br +0 -0
  364. package/library/style.css.gz +0 -0
  365. package/library/stylus-BkS-boTH.mjs +0 -565
  366. package/library/stylus-BkS-boTH.mjs.br +0 -0
  367. package/library/stylus-BkS-boTH.mjs.gz +0 -0
  368. package/library/super.mjs +0 -168
  369. package/library/super.mjs.br +0 -0
  370. package/library/super.mjs.gz +0 -0
  371. package/library/super.umd.js +0 -48
  372. package/library/super.umd.js.br +0 -0
  373. package/library/super.umd.js.gz +0 -0
  374. package/library/swift-FRZi1uvB.mjs +0 -291
  375. package/library/swift-FRZi1uvB.mjs.br +0 -0
  376. package/library/swift-FRZi1uvB.mjs.gz +0 -0
  377. package/library/tcl-CUcaCdmq.mjs +0 -114
  378. package/library/tcl-CUcaCdmq.mjs.br +0 -0
  379. package/library/tcl-CUcaCdmq.mjs.gz +0 -0
  380. package/library/textile-BnFpjsrl.mjs +0 -414
  381. package/library/textile-BnFpjsrl.mjs.br +0 -0
  382. package/library/textile-BnFpjsrl.mjs.gz +0 -0
  383. package/library/tiddlywiki-CjprD-Qp.mjs +0 -218
  384. package/library/tiddlywiki-CjprD-Qp.mjs.br +0 -0
  385. package/library/tiddlywiki-CjprD-Qp.mjs.gz +0 -0
  386. package/library/tiki-B4EPSQ1G.mjs +0 -265
  387. package/library/tiki-B4EPSQ1G.mjs.br +0 -0
  388. package/library/tiki-B4EPSQ1G.mjs.gz +0 -0
  389. package/library/toml-CrLTxh7K.mjs +0 -75
  390. package/library/toml-CrLTxh7K.mjs.br +0 -0
  391. package/library/toml-CrLTxh7K.mjs.gz +0 -0
  392. package/library/troff-E1bJ0PPL.mjs +0 -61
  393. package/library/troff-E1bJ0PPL.mjs.br +0 -0
  394. package/library/troff-E1bJ0PPL.mjs.gz +0 -0
  395. package/library/ttcn-cfg-Dc39-fIP.mjs +0 -133
  396. package/library/ttcn-cfg-Dc39-fIP.mjs.br +0 -0
  397. package/library/ttcn-cfg-Dc39-fIP.mjs.gz +0 -0
  398. package/library/ttcn-tKd4HLu4.mjs +0 -192
  399. package/library/ttcn-tKd4HLu4.mjs.br +0 -0
  400. package/library/ttcn-tKd4HLu4.mjs.gz +0 -0
  401. package/library/turtle-Dq7-1WAf.mjs +0 -124
  402. package/library/turtle-Dq7-1WAf.mjs.br +0 -0
  403. package/library/turtle-Dq7-1WAf.mjs.gz +0 -0
  404. package/library/types/components/VcExcelUploader/VcExcelFileProcessLoader.vue.d.ts +0 -68
  405. package/library/types/components/VcExcelUploader/VcExcelFileUploadBlock.vue.d.ts +0 -70
  406. package/library/types/components/VcExcelUploader/VcExcelFileUploader.vue.d.ts +0 -179
  407. package/library/types/components/VcExcelUploader/VcFileImportErrorsCard.vue.d.ts +0 -31
  408. package/library/types/components/VcExcelUploader/VcFileImportParseResultBlock.vue.d.ts +0 -69
  409. package/library/types/components/VcExcelUploader/VcFileImportResultBindData.vue.d.ts +0 -60
  410. package/library/types/components/VcExcelUploader/VcFileImportResultBindDataTable.vue.d.ts +0 -40
  411. package/library/types/components/VcHtmlEditor/VcHtmlEditor.vue.d.ts +0 -63
  412. package/library/types/components/VcHtmlEditor/VcHtmlEditorToolbar.vue.d.ts +0 -43
  413. package/library/types/components/VcHtmlEditor/htmlEditor.config.d.ts +0 -19
  414. package/library/types/components/VcImageUploader/VcImageUploader.vue.d.ts +0 -74
  415. package/library/types/components/VcImageUploader/index.d.ts +0 -2
  416. package/library/types/components/VcJsonSchema/Components/ImportJsonSchemaModal.vue.d.ts +0 -25
  417. package/library/types/components/VcJsonSchema/Components/JsonCodeMirror.vue.d.ts +0 -24
  418. package/library/types/components/VcJsonSchema/Components/JsonSchemaEditor.vue.d.ts +0 -86
  419. package/library/types/components/VcJsonSchema/Components/JsonSchemaManageModal.vue.d.ts +0 -28
  420. package/library/types/components/VcJsonSchema/PropertySetup/JsonSchemaPropertyModal.vue.d.ts +0 -39
  421. package/library/types/components/VcJsonSchema/VcJsonSchema.vue.d.ts +0 -49
  422. package/library/types/components/VcJsonSchema/helpers/jsonSchema.enum.d.ts +0 -9
  423. package/library/types/components/VcJsonSchema/helpers/jsonSchema.helper.d.ts +0 -3
  424. package/library/types/components/VcMdEditor/ParameterNode.vue.d.ts +0 -6
  425. package/library/types/components/VcMdEditor/VcMdEditor.vue.d.ts +0 -30
  426. package/library/types/components/VcMdEditor/VcMdEditorContent.vue.d.ts +0 -82
  427. package/library/types/components/VcMdEditor/VcMdEditorToolbar.vue.d.ts +0 -27
  428. package/library/types/components/VcMdEditor/mdEditor.config.d.ts +0 -91
  429. package/library/types/components/VcMdEditor/rtlCursorPlugin.d.ts +0 -8
  430. package/library/types/components/VcPdfViewer/VcPdfDocument.vue.d.ts +0 -40
  431. package/library/types/components/VcPdfViewer/VcPdfDocumentCard.vue.d.ts +0 -47
  432. package/library/types/components/VcPdfViewer/VcPdfDocumentPage.vue.d.ts +0 -55
  433. package/library/types/components/VcPdfViewer/VcPdfDocumentViewerFooter.vue.d.ts +0 -63
  434. package/library/types/components/VcPdfViewer/VcPdfDocumentViewerToolbar.vue.d.ts +0 -28
  435. package/library/types/components/VcPdfViewer/pdfjslib.d.ts +0 -4
  436. package/library/types/components/VcPdfViewer/utils.d.ts +0 -7
  437. package/library/types/components/VcSipFlow/VcSipFlow.vue.d.ts +0 -97
  438. package/library/types/components/VcSipFlow/index.d.ts +0 -3
  439. package/library/types/components/VcSipFlow/sip-flow.options.d.ts +0 -77
  440. package/library/types/components/VcSoundplayer/VcPlayerPlayStopButton.vue.d.ts +0 -55
  441. package/library/types/components/VcSoundplayer/VcPlayerPlaybackRate.vue.d.ts +0 -35
  442. package/library/types/components/VcSoundplayer/VcPlayerPlaybackRatePopup.vue.d.ts +0 -40
  443. package/library/types/components/VcSoundplayer/VcPlayerSkipButtons.vue.d.ts +0 -52
  444. package/library/types/components/VcSoundplayer/VcSoundCurrentTime.vue.d.ts +0 -2
  445. package/library/types/components/VcSoundplayer/VcSoundDuration.vue.d.ts +0 -2
  446. package/library/types/components/VcSoundplayer/VcSoundPlayer.vue.d.ts +0 -96
  447. package/library/types/components/VcSoundplayer/VcSoundPlayerError.vue.d.ts +0 -21
  448. package/library/types/components/VcSoundplayer/VcSoundPlayerProgress.vue.d.ts +0 -15
  449. package/library/types/components/VcSoundplayer/VcSoundPlayerWrapper.vue.d.ts +0 -208
  450. package/library/types/components/VcSoundplayer/VcSoundVolume.vue.d.ts +0 -44
  451. package/library/types/components/VcSoundplayer/player.options.d.ts +0 -10
  452. package/library/types/components/VcSoundplayer/soundPlayerParts.d.ts +0 -11
  453. package/library/types/components/VcSoundplayer/useSoundPlayerProvideInject.d.ts +0 -3
  454. package/library/types/components/VcSystemUserPrompt/VcSystemUserPrompt.vue.d.ts +0 -41
  455. package/library/types/components/VcSystemUserPrompt/enum.d.ts +0 -13
  456. package/library/types/components/VcTour/VcTour.vue.d.ts +0 -70
  457. package/library/types/components/exports.d.ts +0 -64
  458. package/library/types/components/heavy-components.d.ts +0 -41
  459. package/library/types/composables/useCopyButton.d.ts +0 -5
  460. package/library/types/composables/useVModel.d.ts +0 -1
  461. package/library/types/entity/components/Button/VcEntityAddButton.vue.d.ts +0 -41
  462. package/library/types/entity/components/Button/VcEntityCancelButton.vue.d.ts +0 -54
  463. package/library/types/entity/components/Button/VcEntityDeleteIconButton.vue.d.ts +0 -48
  464. package/library/types/entity/components/Button/VcEntityEditIconButton.vue.d.ts +0 -36
  465. package/library/types/entity/components/Button/VcEntityRestoreButton.vue.d.ts +0 -54
  466. package/library/types/entity/components/Button/VcEntityStatusButton.vue.d.ts +0 -48
  467. package/library/types/entity/components/Form/VcBaseVerticalForm.vue.d.ts +0 -55
  468. package/library/types/entity/components/Form/VcEntityEditPageForm.vue.d.ts +0 -59
  469. package/library/types/entity/components/Form/VcEntityVerticalCreateForm.vue.d.ts +0 -50
  470. package/library/types/entity/components/Form/VcEntityVerticalEditForm.vue.d.ts +0 -62
  471. package/library/types/entity/components/Table/VcEntityListTable.vue.d.ts +0 -146
  472. package/library/types/entity/components/Tabs/VcEntityEditableTabs.vue.d.ts +0 -165
  473. package/library/types/entity/components/index.d.ts +0 -29
  474. package/library/types/entity/composable/useEditableTabs.d.ts +0 -12
  475. package/library/types/entity/composable/useEntityListTableExternalPaginate.d.ts +0 -17
  476. package/library/types/entity/composable/useEntityProvideInject.d.ts +0 -24
  477. package/library/types/entity/composable/useEntityTabsProviseInject.d.ts +0 -3
  478. package/library/types/entity/index.d.ts +0 -1
  479. package/library/types/entity/services/BaseEntityService.d.ts +0 -105
  480. package/library/types/entity/services/index.d.ts +0 -1
  481. package/library/types/entry.d.ts +0 -27
  482. package/library/types/tokens/tokens.d.ts +0 -13
  483. package/library/types/types/Entity.types.d.ts +0 -5
  484. package/library/types/types/Tabs.d.ts +0 -23
  485. package/library/types/types/VcSipFlow.types.d.ts +0 -85
  486. package/library/types/types/VcSoundPlayer.types.d.ts +0 -34
  487. package/library/types/types/VcSystemUserPrompt.types.d.ts +0 -4
  488. package/library/types/types/VcTour.types.d.ts +0 -53
  489. package/library/types/types/basic.types.d.ts +0 -49
  490. package/library/types/types/heavy-components.types.d.ts +0 -54
  491. package/library/types/utils/excelParser/configs.d.ts +0 -5
  492. package/library/types/utils/excelParser/helper.d.ts +0 -20
  493. package/library/types/utils/excelParser/parser.d.ts +0 -244
  494. package/library/types/utils/excelParser/validations.d.ts +0 -27
  495. package/library/types/utils/isValidTime.d.ts +0 -2
  496. package/library/types/utils/mime-types.d.ts +0 -12
  497. package/library/vb-Dp90gtsv.mjs +0 -196
  498. package/library/vb-Dp90gtsv.mjs.br +0 -0
  499. package/library/vb-Dp90gtsv.mjs.gz +0 -0
  500. package/library/vbscript-CI6_mxxU.mjs +0 -479
  501. package/library/vbscript-CI6_mxxU.mjs.br +0 -0
  502. package/library/vbscript-CI6_mxxU.mjs.gz +0 -0
  503. package/library/velocity-BwIZK1TH.mjs +0 -149
  504. package/library/velocity-BwIZK1TH.mjs.br +0 -0
  505. package/library/velocity-BwIZK1TH.mjs.gz +0 -0
  506. package/library/verilog-DDCYnHN8.mjs +0 -430
  507. package/library/verilog-DDCYnHN8.mjs.br +0 -0
  508. package/library/verilog-DDCYnHN8.mjs.gz +0 -0
  509. package/library/vhdl-DCkMIyT9.mjs +0 -158
  510. package/library/vhdl-DCkMIyT9.mjs.br +0 -0
  511. package/library/vhdl-DCkMIyT9.mjs.gz +0 -0
  512. package/library/webidl-BTLTThCm.mjs +0 -204
  513. package/library/webidl-BTLTThCm.mjs.br +0 -0
  514. package/library/webidl-BTLTThCm.mjs.gz +0 -0
  515. package/library/xquery-BgiOC5Ce.mjs +0 -525
  516. package/library/xquery-BgiOC5Ce.mjs.br +0 -0
  517. package/library/xquery-BgiOC5Ce.mjs.gz +0 -0
  518. package/library/yacas-b5lAVEIl.mjs +0 -130
  519. package/library/yacas-b5lAVEIl.mjs.br +0 -0
  520. package/library/yacas-b5lAVEIl.mjs.gz +0 -0
  521. package/library/z80-BZV19vqv.mjs +0 -93
  522. package/library/z80-BZV19vqv.mjs.br +0 -0
  523. package/library/z80-BZV19vqv.mjs.gz +0 -0
  524. package/src/assets/sass/main/_icons.scss +0 -36
  525. package/src/components/VcButton/VcButton.scss +0 -191
  526. package/src/components/VcButton/VcButtonIcon.scss +0 -179
  527. package/src/components/VcInput/VcInput.scss +0 -100
  528. package/src/components/VcModal/VcModal.scss +0 -232
  529. package/src/components/VcPopover/VcPopover.scss +0 -10
  530. package/src/components/VcSelect/VcSelect.scss +0 -96
  531. package/src/components/VcSelect/VcSelectMixin.scss +0 -39
  532. package/src/components/VcSelect/VcSelectOption.scss +0 -29
  533. package/src/components/VcSelect/VcSelectVariables.scss +0 -1
  534. package/src/enum/constants.ts +0 -50
  535. package/src/enum/countries.ts +0 -1277
  536. package/src/enum/dataTestAttributes.ts +0 -9
  537. package/src/enum/icons.ts +0 -8919
  538. package/src/enum/inputDefaults.ts +0 -8
  539. package/src/utils/makeDataTestAttributeValue.ts +0 -5
  540. package/library/{types → core/types}/components/VcAutocomplete/VcAutocomplete.vue.d.ts +77 -77
  541. package/library/{types → core/types}/components/VcButton/VcButton.vue.d.ts +2 -2
  542. package/library/{types → core/types}/components/VcButton/VcButtonIcon.vue.d.ts +1 -1
  543. package/library/{types → core/types}/components/VcButton/VcToggleButton.vue.d.ts +3 -3
  544. package/library/{types → core/types}/components/VcCard/VcCard.vue.d.ts +0 -0
  545. package/library/{types → core/types}/components/VcCheckbox/VcCheckbox.vue.d.ts +15 -15
  546. package/library/{types → core/types}/components/VcCheckbox/VcCheckboxGroupEl.vue.d.ts +0 -0
  547. package/library/{types → core/types}/components/VcCheckboxGroup/VcCheckboxGroup.vue.d.ts +9 -9
  548. package/library/{types → core/types}/components/VcCollapse/VcCollapse.vue.d.ts +0 -0
  549. package/library/{types → core/types}/components/VcCollapse/VcCollapseItem.vue.d.ts +1 -1
  550. package/library/{types → core/types}/components/VcCollapse/VcCollapseTransition.vue.d.ts +0 -0
  551. package/library/{types → core/types}/components/VcColorPicker/VcColorPicker.vue.d.ts +2 -2
  552. package/library/{types → core/types}/components/VcDatePicker/VcDatePicker.vue.d.ts +18 -18
  553. package/library/{types → core/types}/components/VcDatePickerPanel/VcDatePickerPanel.vue.d.ts +6 -6
  554. package/library/{types → core/types}/components/VcDatetimeRangePicker/VcDatetimeRangePicker.vue.d.ts +0 -0
  555. package/library/{types → core/types}/components/VcDelimitedList/VcDelimitedList.vue.d.ts +0 -0
  556. package/library/{types → core/types}/components/VcDropdown/VcDropdownItem.vue.d.ts +0 -0
  557. package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerPart.vue.d.ts +1 -1
  558. package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/ExtendedDatetimeRangePickerRelative.vue.d.ts +1 -1
  559. package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePicker.vue.d.ts +4 -4
  560. package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/VcExtendedDatetimeRangePickerQuickOptionsSelection.vue.d.ts +1 -1
  561. package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/composable.d.ts +0 -0
  562. package/library/{types → core/types}/components/VcExtendedDatetimeRangePicker/enum.d.ts +0 -0
  563. package/library/{types → core/types}/components/VcFileUploader/VcFileUploader.vue.d.ts +2 -2
  564. package/library/{types → core/types}/components/VcForm/UiComponents/VcInputError.vue.d.ts +0 -0
  565. package/library/{types → core/types}/components/VcForm/UiComponents/VcInputLabel.vue.d.ts +0 -0
  566. package/library/{types → core/types}/components/VcForm/VcForm.vue.d.ts +1 -1
  567. package/library/{types → core/types}/components/VcForm/VcFormItem.vue.d.ts +0 -0
  568. package/library/{types → core/types}/components/VcHyperLink/VcHyperLink.vue.d.ts +0 -0
  569. package/library/{types → core/types}/components/VcIconPicker/VcIconPicker.vue.d.ts +3 -3
  570. package/library/{types → core/types}/components/VcInput/VcInput.vue.d.ts +5 -5
  571. package/library/{types → core/types}/components/VcInputNumber/VcInputNumber.vue.d.ts +3 -3
  572. package/library/{types → core/types}/components/VcLoading/Loaders/Circles.vue.d.ts +0 -0
  573. package/library/{types → core/types}/components/VcLoading/Loaders/DotSpinner.vue.d.ts +0 -0
  574. package/library/{types → core/types}/components/VcLoading/Loaders/LdsSpinner.vue.d.ts +0 -0
  575. package/library/{types → core/types}/components/VcLoading/Loaders/LoadIcon.vue.d.ts +0 -0
  576. package/library/{types → core/types}/components/VcLoading/Loaders/Stretch.vue.d.ts +0 -0
  577. package/library/{types → core/types}/components/VcLoading/Loaders/index.d.ts +0 -0
  578. package/library/{types → core/types}/components/VcLoading/VcLoading.vue.d.ts +0 -0
  579. package/library/{types → core/types}/components/VcLoading/enum.d.ts +0 -0
  580. package/library/{types → core/types}/components/VcModal/VcConfirmModal.vue.d.ts +0 -0
  581. package/library/{types → core/types}/components/VcModal/VcModal.vue.d.ts +2 -2
  582. package/library/{types → core/types}/components/VcNotification/VcNotification.vue.d.ts +0 -0
  583. package/library/{types → core/types}/components/VcNotification/VcNotificationMessage.vue.d.ts +0 -0
  584. package/library/{types → core/types}/components/VcOtpInput/VcOtpInput.vue.d.ts +6 -6
  585. package/library/{types → core/types}/components/VcPagination/VcPagination.vue.d.ts +0 -0
  586. package/library/{types → core/types}/components/VcPagination/VcPaginationButton.vue.d.ts +0 -0
  587. package/library/{types → core/types}/components/VcPhoneInput/VcFlagLabel.vue.d.ts +0 -0
  588. package/library/{types → core/types}/components/VcPhoneInput/VcPhoneInput.vue.d.ts +3 -3
  589. package/library/{types → core/types}/components/VcPopover/VcConfirmPopover.vue.d.ts +0 -0
  590. package/library/{types → core/types}/components/VcPopover/VcPopover.vue.d.ts +1 -1
  591. package/library/{types → core/types}/components/VcPopover/VcSelectPopover.vue.d.ts +6 -6
  592. package/library/{types → core/types}/components/VcProgress/VcProgress.vue.d.ts +1 -1
  593. package/library/{types → core/types}/components/VcProgress/VcProgressCircular.vue.d.ts +0 -0
  594. package/library/{types → core/types}/components/VcProgress/progress.options.d.ts +0 -0
  595. package/library/{types → core/types}/components/VcRadio/VcRadio.vue.d.ts +6 -6
  596. package/library/{types → core/types}/components/VcRadioButtons/VcRadioButtonsGroup.vue.d.ts +3 -3
  597. package/library/{types → core/types}/components/VcRadioGroup/VcRadioGroup.vue.d.ts +3 -3
  598. package/library/{types → core/types}/components/VcRadioTabs/UiComponents/VcRadioTabsNav.vue.d.ts +3 -3
  599. package/library/{types → core/types}/components/VcSegmented/VcSegmented.vue.d.ts +9 -9
  600. package/library/{types → core/types}/components/VcSelect/VcInfiniteScrollSelect.vue.d.ts +18 -18
  601. package/library/{types → core/types}/components/VcSelect/VcSelect.vue.d.ts +30 -30
  602. package/library/{types → core/types}/components/VcSelect/VcSelectGrouped.vue.d.ts +27 -27
  603. package/library/{types → core/types}/components/VcSelect/VcSelectOption.vue.d.ts +3 -3
  604. package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Card.vue.d.ts +0 -0
  605. package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Circle.vue.d.ts +0 -0
  606. package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Row.vue.d.ts +0 -0
  607. package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Square.vue.d.ts +0 -0
  608. package/library/{types → core/types}/components/VcSkeletonLoader/Loaders/Text.vue.d.ts +0 -0
  609. package/library/{types → core/types}/components/VcSkeletonLoader/VcSkeletonLoader.vue.d.ts +0 -0
  610. package/library/{types → core/types}/components/VcSlider/VcSlider.vue.d.ts +0 -0
  611. package/library/{types → core/types}/components/VcSplitButton/VcSplitButton.vue.d.ts +3 -3
  612. package/library/{types → core/types}/components/VcSwitch/VcSwitch.vue.d.ts +18 -18
  613. package/library/{types → core/types}/components/VcTable/VcTable.vue.d.ts +0 -0
  614. package/library/{types → core/types}/components/VcTable/tableOptions.d.ts +0 -0
  615. package/library/{types → core/types}/components/VcTabs/VcTabNav.vue.d.ts +0 -0
  616. package/library/{types → core/types}/components/VcTabs/VcTabPane.vue.d.ts +1 -1
  617. package/library/{types → core/types}/components/VcTabs/VcTabs.vue.d.ts +0 -0
  618. package/library/{types → core/types}/components/VcTag/VcTag.vue.d.ts +2 -2
  619. package/library/{types → core/types}/components/VcTagInput/VcTagInput.vue.d.ts +3 -3
  620. package/library/{types → core/types}/components/VcTimeInput/VcTimeInput.vue.d.ts +2 -2
  621. package/library/{types → core/types}/components/VcTree/VcTree.vue.d.ts +3 -3
  622. package/library/{types → core/types}/components/VcVerticalTabs/VcVerticalTabs.vue.d.ts +0 -0
  623. package/library/{types → core/types}/components/VcVerticalTabs/VerticalTabNav.vue.d.ts +0 -0
  624. package/library/{types → core/types}/components/VcViewSwitcher/VcViewSwitcher.vue.d.ts +6 -6
  625. /package/library/{types → core/types}/components/VcWizard/VcSummaryProgress.vue.d.ts +0 -0
  626. /package/library/{types → core/types}/components/VcWizard/VcSummaryStep.vue.d.ts +0 -0
  627. /package/library/{types → core/types}/components/VcWizard/VcWizard.vue.d.ts +0 -0
  628. /package/library/{types → core/types}/components/VcWizard/VcWizardNavigation.vue.d.ts +0 -0
  629. /package/library/{types → core/types}/components/VcWizard/VcWizardSummary.vue.d.ts +0 -0
  630. /package/library/{types → core/types}/composables/input/useInputBase.d.ts +0 -0
  631. /package/library/{types → core/types}/composables/input/useInputColor.d.ts +0 -0
  632. /package/library/{types → core/types}/composables/input/useInputError.d.ts +0 -0
  633. /package/library/{types → core/types}/composables/input/useInputLabel.d.ts +0 -0
  634. /package/library/{types → core/types}/composables/option/useOptionMethods.d.ts +0 -0
  635. /package/library/{types/entity/composable → core/types/composables}/useConfirmModal.d.ts +0 -0
  636. /package/library/{types → core/types}/composables/useRTL.d.ts +0 -0
  637. /package/library/{types → core/types}/directives/click-outside.d.ts +0 -0
  638. /package/library/{types → core/types}/directives/index.d.ts +0 -0
  639. /package/library/{types → core/types}/directives/input-mask.d.ts +0 -0
  640. /package/library/{types → core/types}/directives/long-press.d.ts +0 -0
  641. /package/library/{types → core/types}/directives/resize.d.ts +0 -0
  642. /package/library/{types → core/types}/enum/constants.d.ts +0 -0
  643. /package/library/{types → core/types}/enum/countries.d.ts +0 -0
  644. /package/library/{types → core/types}/enum/dataTestAttributes.d.ts +0 -0
  645. /package/library/{types → core/types}/enum/icons.d.ts +0 -0
  646. /package/library/{types → core/types}/enum/inputDefaults.d.ts +0 -0
  647. /package/library/{types → core/types}/font/FontLoader.d.ts +0 -0
  648. /package/library/{types → core/types}/font/index.d.ts +0 -0
  649. /package/library/{types → core/types}/localization/Localization.types.d.ts +0 -0
  650. /package/library/{types → core/types}/localization/index.d.ts +0 -0
  651. /package/library/{types/utils → core/types/services}/VcNotifyService.d.ts +0 -0
  652. /package/library/{types → core/types}/theme/index.d.ts +0 -0
  653. /package/library/{types → core/types}/theme/theme.types.d.ts +0 -0
  654. /package/library/{types → core/types}/tokens/element-plus.tokens.d.ts +0 -0
  655. /package/library/{types → core/types}/tokens/index.d.ts +0 -0
  656. /package/library/{types → core/types}/types/AppendToTarget.types.d.ts +0 -0
  657. /package/library/{types → core/types}/types/Dropdown.types.d.ts +0 -0
  658. /package/library/{types → core/types}/types/Entry.types.d.ts +0 -0
  659. /package/library/{types → core/types}/types/ExcelParser.types.d.ts +0 -0
  660. /package/library/{types → core/types}/types/OptionAndConfig.types.d.ts +0 -0
  661. /package/library/{types → core/types}/types/VcButton.types.d.ts +0 -0
  662. /package/library/{types → core/types}/types/VcCollapse.types.d.ts +0 -0
  663. /package/library/{types → core/types}/types/VcDatePicker.types.d.ts +0 -0
  664. /package/library/{types → core/types}/types/VcDatetimeRangePicker.types.d.ts +0 -0
  665. /package/library/{types → core/types}/types/VcDelimitedList.types.d.ts +0 -0
  666. /package/library/{types → core/types}/types/VcExtendedDatetimeRangePicker.types.d.ts +0 -0
  667. /package/library/{types → core/types}/types/VcFileUploader.types.d.ts +0 -0
  668. /package/library/{types → core/types}/types/VcForm.types.d.ts +0 -0
  669. /package/library/{types → core/types}/types/VcHyperLink.types.d.ts +0 -0
  670. /package/library/{types → core/types}/types/VcIconPicker.types.d.ts +0 -0
  671. /package/library/{types → core/types}/types/VcInput.types.d.ts +0 -0
  672. /package/library/{types → core/types}/types/VcLoading.types.d.ts +0 -0
  673. /package/library/{types → core/types}/types/VcMeterGroup.types.d.ts +0 -0
  674. /package/library/{types → core/types}/types/VcModal.types.d.ts +0 -0
  675. /package/library/{types → core/types}/types/VcNotification.types.d.ts +0 -0
  676. /package/library/{types → core/types}/types/VcOtpInput.types.d.ts +0 -0
  677. /package/library/{types → core/types}/types/VcPagination.types.d.ts +0 -0
  678. /package/library/{types → core/types}/types/VcPopover.types.d.ts +0 -0
  679. /package/library/{types → core/types}/types/VcProgress.types.d.ts +0 -0
  680. /package/library/{types → core/types}/types/VcRTL.types.d.ts +0 -0
  681. /package/library/{types → core/types}/types/VcRadioTabs.types.d.ts +0 -0
  682. /package/library/{types → core/types}/types/VcSelect.types.d.ts +0 -0
  683. /package/library/{types → core/types}/types/VcSkeletonLoader.types.d.ts +0 -0
  684. /package/library/{types → core/types}/types/VcSparkline.types.d.ts +0 -0
  685. /package/library/{types → core/types}/types/VcSplitButton.types.d.ts +0 -0
  686. /package/library/{types → core/types}/types/VcSwitch.types.d.ts +0 -0
  687. /package/library/{types → core/types}/types/VcTable.types.d.ts +0 -0
  688. /package/library/{types → core/types}/types/VcTag.types.d.ts +0 -0
  689. /package/library/{types → core/types}/types/VcTagInput.types.d.ts +0 -0
  690. /package/library/{types → core/types}/types/VcWizard.types.d.ts +0 -0
  691. /package/library/{types → core/types}/types/VueGeneric.types.d.ts +0 -0
  692. /package/library/{types → core/types}/types/generic.types.d.ts +0 -0
  693. /package/library/{types → core/types}/types/icons.types.d.ts +0 -0
  694. /package/library/{types → core/types}/utils/DomHandler.d.ts +0 -0
  695. /package/library/{types → core/types}/utils/ToastEventBus.d.ts +0 -0
  696. /package/library/{types → core/types}/utils/UniqueComponentId.d.ts +0 -0
  697. /package/library/{types → core/types}/utils/ZIndexUtils.d.ts +0 -0
  698. /package/library/{types → core/types}/utils/dateTime.d.ts +0 -0
  699. /package/library/{types → core/types}/utils/element-plus-imports.d.ts +0 -0
  700. /package/library/{types → core/types}/utils/helpers.d.ts +0 -0
  701. /package/library/{types → core/types}/utils/makeDataTestAttributeValue.d.ts +0 -0
  702. /package/src/{theme → core/theme}/index.ts +0 -0
  703. /package/src/{theme → core/theme}/tailwindScheme.js +0 -0
  704. /package/src/{theme → core/theme}/theme.types.ts +0 -0
@@ -1,2219 +0,0 @@
1
- import { defineComponent, createBlock, openBlock, Transition, mergeProps, unref, toHandlers, withCtx, renderSlot, ref, computed, onMounted, onUpdated, resolveDynamicComponent, normalizeStyle, normalizeClass, useAttrs, reactive, nextTick, inject, h, provide, resolveComponent, withDirectives, createElementBlock, withModifiers, createElementVNode, createVNode, createCommentVNode, Fragment, renderList, vShow, getCurrentInstance, watch, toDisplayString, onUnmounted } from "vue";
2
- import { aB as _export_sfc, aC as useNamespace, aD as withInstall, aE as buildProps, aF as componentSizes, aG as useFormSize, aH as isUndefined, aI as hasOwn, aJ as isBoolean, aK as isArray, aL as isNil, aM as isFunction, aN as isString, aO as NOOP, aP as isObject, aQ as isPropAbsent, aR as removeClass, aS as addClass, aT as loading_default, aU as ElIcon, aV as ElCheckbox, aW as caret_right_default, aX as useEventListener, aY as EVENT_CODE, aZ as iconPropType, a_ as definePropType, a$ as useLocale, b0 as selectKey, b1 as isEqual, b2 as formItemContextKey, b3 as useRTL, b4 as TEXT_COLORS, c as convertToUnit, b5 as VcLoading, b6 as resolveFieldData, b7 as set } from "./entry-EvdwF4XL.mjs";
3
- const __default__$1 = defineComponent({
4
- name: "ElCollapseTransition"
5
- });
6
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
7
- ...__default__$1,
8
- setup(__props) {
9
- const ns = useNamespace("collapse-transition");
10
- const reset = (el) => {
11
- el.style.maxHeight = "";
12
- el.style.overflow = el.dataset.oldOverflow;
13
- el.style.paddingTop = el.dataset.oldPaddingTop;
14
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
15
- };
16
- const on = {
17
- beforeEnter(el) {
18
- if (!el.dataset)
19
- el.dataset = {};
20
- el.dataset.oldPaddingTop = el.style.paddingTop;
21
- el.dataset.oldPaddingBottom = el.style.paddingBottom;
22
- if (el.style.height)
23
- el.dataset.elExistsHeight = el.style.height;
24
- el.style.maxHeight = 0;
25
- el.style.paddingTop = 0;
26
- el.style.paddingBottom = 0;
27
- },
28
- enter(el) {
29
- requestAnimationFrame(() => {
30
- el.dataset.oldOverflow = el.style.overflow;
31
- if (el.dataset.elExistsHeight) {
32
- el.style.maxHeight = el.dataset.elExistsHeight;
33
- } else if (el.scrollHeight !== 0) {
34
- el.style.maxHeight = `${el.scrollHeight}px`;
35
- } else {
36
- el.style.maxHeight = 0;
37
- }
38
- el.style.paddingTop = el.dataset.oldPaddingTop;
39
- el.style.paddingBottom = el.dataset.oldPaddingBottom;
40
- el.style.overflow = "hidden";
41
- });
42
- },
43
- afterEnter(el) {
44
- el.style.maxHeight = "";
45
- el.style.overflow = el.dataset.oldOverflow;
46
- },
47
- enterCancelled(el) {
48
- reset(el);
49
- },
50
- beforeLeave(el) {
51
- if (!el.dataset)
52
- el.dataset = {};
53
- el.dataset.oldPaddingTop = el.style.paddingTop;
54
- el.dataset.oldPaddingBottom = el.style.paddingBottom;
55
- el.dataset.oldOverflow = el.style.overflow;
56
- el.style.maxHeight = `${el.scrollHeight}px`;
57
- el.style.overflow = "hidden";
58
- },
59
- leave(el) {
60
- if (el.scrollHeight !== 0) {
61
- el.style.maxHeight = 0;
62
- el.style.paddingTop = 0;
63
- el.style.paddingBottom = 0;
64
- }
65
- },
66
- afterLeave(el) {
67
- reset(el);
68
- },
69
- leaveCancelled(el) {
70
- reset(el);
71
- }
72
- };
73
- return (_ctx, _cache) => {
74
- return openBlock(), createBlock(Transition, mergeProps({
75
- name: unref(ns).b()
76
- }, toHandlers(on)), {
77
- default: withCtx(() => [
78
- renderSlot(_ctx.$slots, "default")
79
- ]),
80
- _: 3
81
- }, 16, ["name"]);
82
- };
83
- }
84
- });
85
- var CollapseTransition = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "collapse-transition.vue"]]);
86
- const ElCollapseTransition = withInstall(CollapseTransition);
87
- const textProps = buildProps({
88
- type: {
89
- type: String,
90
- values: ["primary", "success", "info", "warning", "danger", ""],
91
- default: ""
92
- },
93
- size: {
94
- type: String,
95
- values: componentSizes,
96
- default: ""
97
- },
98
- truncated: Boolean,
99
- lineClamp: {
100
- type: [String, Number]
101
- },
102
- tag: {
103
- type: String,
104
- default: "span"
105
- }
106
- });
107
- const __default__ = defineComponent({
108
- name: "ElText"
109
- });
110
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
111
- ...__default__,
112
- props: textProps,
113
- setup(__props) {
114
- const props = __props;
115
- const textRef = ref();
116
- const textSize = useFormSize();
117
- const ns = useNamespace("text");
118
- const textKls = computed(() => [
119
- ns.b(),
120
- ns.m(props.type),
121
- ns.m(textSize.value),
122
- ns.is("truncated", props.truncated),
123
- ns.is("line-clamp", !isUndefined(props.lineClamp))
124
- ]);
125
- const bindTitle = () => {
126
- var _a, _b, _c, _d, _e, _f, _g;
127
- const inheritTitle = useAttrs().title;
128
- if (inheritTitle)
129
- return;
130
- let shouldAddTitle = false;
131
- const text = ((_a = textRef.value) == null ? void 0 : _a.textContent) || "";
132
- if (props.truncated) {
133
- const width = (_b = textRef.value) == null ? void 0 : _b.offsetWidth;
134
- const scrollWidth = (_c = textRef.value) == null ? void 0 : _c.scrollWidth;
135
- if (width && scrollWidth && scrollWidth > width) {
136
- shouldAddTitle = true;
137
- }
138
- } else if (!isUndefined(props.lineClamp)) {
139
- const height = (_d = textRef.value) == null ? void 0 : _d.offsetHeight;
140
- const scrollHeight = (_e = textRef.value) == null ? void 0 : _e.scrollHeight;
141
- if (height && scrollHeight && scrollHeight > height) {
142
- shouldAddTitle = true;
143
- }
144
- }
145
- if (shouldAddTitle) {
146
- (_f = textRef.value) == null ? void 0 : _f.setAttribute("title", text);
147
- } else {
148
- (_g = textRef.value) == null ? void 0 : _g.removeAttribute("title");
149
- }
150
- };
151
- onMounted(bindTitle);
152
- onUpdated(bindTitle);
153
- return (_ctx, _cache) => {
154
- return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
155
- ref_key: "textRef",
156
- ref: textRef,
157
- class: normalizeClass(unref(textKls)),
158
- style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
159
- }, {
160
- default: withCtx(() => [
161
- renderSlot(_ctx.$slots, "default")
162
- ]),
163
- _: 3
164
- }, 8, ["class", "style"]);
165
- };
166
- }
167
- });
168
- var Text = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "text.vue"]]);
169
- const ElText = withInstall(Text);
170
- const NODE_KEY = "$treeNodeId";
171
- const markNodeData = function(node, data) {
172
- if (!data || data[NODE_KEY])
173
- return;
174
- Object.defineProperty(data, NODE_KEY, {
175
- value: node.id,
176
- enumerable: false,
177
- configurable: false,
178
- writable: false
179
- });
180
- };
181
- const getNodeKey = (key, data) => data == null ? void 0 : data[key || NODE_KEY];
182
- const handleCurrentChange = (store, emit, setCurrent) => {
183
- const preCurrentNode = store.value.currentNode;
184
- setCurrent();
185
- const currentNode = store.value.currentNode;
186
- if (preCurrentNode === currentNode)
187
- return;
188
- emit("current-change", currentNode ? currentNode.data : null, currentNode);
189
- };
190
- const getChildState = (node) => {
191
- let all = true;
192
- let none = true;
193
- let allWithoutDisable = true;
194
- for (let i = 0, j = node.length; i < j; i++) {
195
- const n = node[i];
196
- if (n.checked !== true || n.indeterminate) {
197
- all = false;
198
- if (!n.disabled) {
199
- allWithoutDisable = false;
200
- }
201
- }
202
- if (n.checked !== false || n.indeterminate) {
203
- none = false;
204
- }
205
- }
206
- return { all, none, allWithoutDisable, half: !all && !none };
207
- };
208
- const reInitChecked = function(node) {
209
- if (node.childNodes.length === 0 || node.loading)
210
- return;
211
- const { all, none, half } = getChildState(node.childNodes);
212
- if (all) {
213
- node.checked = true;
214
- node.indeterminate = false;
215
- } else if (half) {
216
- node.checked = false;
217
- node.indeterminate = true;
218
- } else if (none) {
219
- node.checked = false;
220
- node.indeterminate = false;
221
- }
222
- const parent = node.parent;
223
- if (!parent || parent.level === 0)
224
- return;
225
- if (!node.store.checkStrictly) {
226
- reInitChecked(parent);
227
- }
228
- };
229
- const getPropertyFromData = function(node, prop) {
230
- const props = node.store.props;
231
- const data = node.data || {};
232
- const config = props[prop];
233
- if (isFunction(config)) {
234
- return config(data, node);
235
- } else if (isString(config)) {
236
- return data[config];
237
- } else if (isUndefined(config)) {
238
- const dataProp = data[prop];
239
- return isUndefined(dataProp) ? "" : dataProp;
240
- }
241
- };
242
- const setCanFocus = function(childNodes, focus) {
243
- childNodes.forEach((item) => {
244
- item.canFocus = focus;
245
- setCanFocus(item.childNodes, focus);
246
- });
247
- };
248
- let nodeIdSeed = 0;
249
- class Node {
250
- constructor(options) {
251
- this.isLeafByUser = void 0;
252
- this.isLeaf = void 0;
253
- this.id = nodeIdSeed++;
254
- this.text = null;
255
- this.checked = false;
256
- this.indeterminate = false;
257
- this.data = null;
258
- this.expanded = false;
259
- this.parent = null;
260
- this.visible = true;
261
- this.isCurrent = false;
262
- this.canFocus = false;
263
- for (const name in options) {
264
- if (hasOwn(options, name)) {
265
- this[name] = options[name];
266
- }
267
- }
268
- this.level = 0;
269
- this.loaded = false;
270
- this.childNodes = [];
271
- this.loading = false;
272
- if (this.parent) {
273
- this.level = this.parent.level + 1;
274
- }
275
- }
276
- initialize() {
277
- var _a;
278
- const store = this.store;
279
- if (!store) {
280
- throw new Error("[Node]store is required!");
281
- }
282
- store.registerNode(this);
283
- const props = store.props;
284
- if (props && typeof props.isLeaf !== "undefined") {
285
- const isLeaf = getPropertyFromData(this, "isLeaf");
286
- if (isBoolean(isLeaf)) {
287
- this.isLeafByUser = isLeaf;
288
- }
289
- }
290
- if (store.lazy !== true && this.data) {
291
- this.setData(this.data);
292
- if (store.defaultExpandAll) {
293
- this.expanded = true;
294
- this.canFocus = true;
295
- }
296
- } else if (this.level > 0 && store.lazy && store.defaultExpandAll && !this.isLeafByUser) {
297
- this.expand();
298
- }
299
- if (!isArray(this.data)) {
300
- markNodeData(this, this.data);
301
- }
302
- if (!this.data)
303
- return;
304
- const defaultExpandedKeys = store.defaultExpandedKeys;
305
- const key = store.key;
306
- if (key && !isNil(this.key) && defaultExpandedKeys && defaultExpandedKeys.includes(this.key)) {
307
- this.expand(null, store.autoExpandParent);
308
- }
309
- if (key && store.currentNodeKey !== void 0 && this.key === store.currentNodeKey) {
310
- store.currentNode = this;
311
- store.currentNode.isCurrent = true;
312
- }
313
- if (store.lazy) {
314
- store._initDefaultCheckedNode(this);
315
- }
316
- this.updateLeafState();
317
- if (this.level === 1 || ((_a = this.parent) == null ? void 0 : _a.expanded) === true)
318
- this.canFocus = true;
319
- }
320
- setData(data) {
321
- if (!isArray(data)) {
322
- markNodeData(this, data);
323
- }
324
- this.data = data;
325
- this.childNodes = [];
326
- let children;
327
- if (this.level === 0 && isArray(this.data)) {
328
- children = this.data;
329
- } else {
330
- children = getPropertyFromData(this, "children") || [];
331
- }
332
- for (let i = 0, j = children.length; i < j; i++) {
333
- this.insertChild({ data: children[i] });
334
- }
335
- }
336
- get label() {
337
- return getPropertyFromData(this, "label");
338
- }
339
- get key() {
340
- const nodeKey = this.store.key;
341
- if (this.data)
342
- return this.data[nodeKey];
343
- return null;
344
- }
345
- get disabled() {
346
- return getPropertyFromData(this, "disabled");
347
- }
348
- get nextSibling() {
349
- const parent = this.parent;
350
- if (parent) {
351
- const index = parent.childNodes.indexOf(this);
352
- if (index > -1) {
353
- return parent.childNodes[index + 1];
354
- }
355
- }
356
- return null;
357
- }
358
- get previousSibling() {
359
- const parent = this.parent;
360
- if (parent) {
361
- const index = parent.childNodes.indexOf(this);
362
- if (index > -1) {
363
- return index > 0 ? parent.childNodes[index - 1] : null;
364
- }
365
- }
366
- return null;
367
- }
368
- contains(target, deep = true) {
369
- return (this.childNodes || []).some((child) => child === target || deep && child.contains(target));
370
- }
371
- remove() {
372
- const parent = this.parent;
373
- if (parent) {
374
- parent.removeChild(this);
375
- }
376
- }
377
- insertChild(child, index, batch) {
378
- if (!child)
379
- throw new Error("InsertChild error: child is required.");
380
- if (!(child instanceof Node)) {
381
- if (!batch) {
382
- const children = this.getChildren(true);
383
- if (!(children == null ? void 0 : children.includes(child.data))) {
384
- if (isUndefined(index) || index < 0) {
385
- children == null ? void 0 : children.push(child.data);
386
- } else {
387
- children == null ? void 0 : children.splice(index, 0, child.data);
388
- }
389
- }
390
- }
391
- Object.assign(child, {
392
- parent: this,
393
- store: this.store
394
- });
395
- child = reactive(new Node(child));
396
- if (child instanceof Node) {
397
- child.initialize();
398
- }
399
- }
400
- child.level = this.level + 1;
401
- if (isUndefined(index) || index < 0) {
402
- this.childNodes.push(child);
403
- } else {
404
- this.childNodes.splice(index, 0, child);
405
- }
406
- this.updateLeafState();
407
- }
408
- insertBefore(child, ref2) {
409
- let index;
410
- if (ref2) {
411
- index = this.childNodes.indexOf(ref2);
412
- }
413
- this.insertChild(child, index);
414
- }
415
- insertAfter(child, ref2) {
416
- let index;
417
- if (ref2) {
418
- index = this.childNodes.indexOf(ref2);
419
- if (index !== -1)
420
- index += 1;
421
- }
422
- this.insertChild(child, index);
423
- }
424
- removeChild(child) {
425
- const children = this.getChildren() || [];
426
- const dataIndex = children.indexOf(child.data);
427
- if (dataIndex > -1) {
428
- children.splice(dataIndex, 1);
429
- }
430
- const index = this.childNodes.indexOf(child);
431
- if (index > -1) {
432
- this.store && this.store.deregisterNode(child);
433
- child.parent = null;
434
- this.childNodes.splice(index, 1);
435
- }
436
- this.updateLeafState();
437
- }
438
- removeChildByData(data) {
439
- let targetNode = null;
440
- for (let i = 0; i < this.childNodes.length; i++) {
441
- if (this.childNodes[i].data === data) {
442
- targetNode = this.childNodes[i];
443
- break;
444
- }
445
- }
446
- if (targetNode) {
447
- this.removeChild(targetNode);
448
- }
449
- }
450
- expand(callback, expandParent) {
451
- const done = () => {
452
- if (expandParent) {
453
- let parent = this.parent;
454
- while (parent && parent.level > 0) {
455
- parent.expanded = true;
456
- parent = parent.parent;
457
- }
458
- }
459
- this.expanded = true;
460
- if (callback)
461
- callback();
462
- setCanFocus(this.childNodes, true);
463
- };
464
- if (this.shouldLoadData()) {
465
- this.loadData((data) => {
466
- if (isArray(data)) {
467
- if (this.checked) {
468
- this.setChecked(true, true);
469
- } else if (!this.store.checkStrictly) {
470
- reInitChecked(this);
471
- }
472
- done();
473
- }
474
- });
475
- } else {
476
- done();
477
- }
478
- }
479
- doCreateChildren(array, defaultProps = {}) {
480
- array.forEach((item) => {
481
- this.insertChild(Object.assign({ data: item }, defaultProps), void 0, true);
482
- });
483
- }
484
- collapse() {
485
- this.expanded = false;
486
- setCanFocus(this.childNodes, false);
487
- }
488
- shouldLoadData() {
489
- return Boolean(this.store.lazy === true && this.store.load && !this.loaded);
490
- }
491
- updateLeafState() {
492
- if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== "undefined") {
493
- this.isLeaf = this.isLeafByUser;
494
- return;
495
- }
496
- const childNodes = this.childNodes;
497
- if (!this.store.lazy || this.store.lazy === true && this.loaded === true) {
498
- this.isLeaf = !childNodes || childNodes.length === 0;
499
- return;
500
- }
501
- this.isLeaf = false;
502
- }
503
- setChecked(value, deep, recursion, passValue) {
504
- this.indeterminate = value === "half";
505
- this.checked = value === true;
506
- if (this.store.checkStrictly)
507
- return;
508
- if (!(this.shouldLoadData() && !this.store.checkDescendants)) {
509
- const { all, allWithoutDisable } = getChildState(this.childNodes);
510
- if (!this.isLeaf && !all && allWithoutDisable) {
511
- this.checked = false;
512
- value = false;
513
- }
514
- const handleDescendants = () => {
515
- if (deep) {
516
- const childNodes = this.childNodes;
517
- for (let i = 0, j = childNodes.length; i < j; i++) {
518
- const child = childNodes[i];
519
- passValue = passValue || value !== false;
520
- const isCheck = child.disabled ? child.checked : passValue;
521
- child.setChecked(isCheck, deep, true, passValue);
522
- }
523
- const { half, all: all2 } = getChildState(childNodes);
524
- if (!all2) {
525
- this.checked = all2;
526
- this.indeterminate = half;
527
- }
528
- }
529
- };
530
- if (this.shouldLoadData()) {
531
- this.loadData(() => {
532
- handleDescendants();
533
- reInitChecked(this);
534
- }, {
535
- checked: value !== false
536
- });
537
- return;
538
- } else {
539
- handleDescendants();
540
- }
541
- }
542
- const parent = this.parent;
543
- if (!parent || parent.level === 0)
544
- return;
545
- if (!recursion) {
546
- reInitChecked(parent);
547
- }
548
- }
549
- getChildren(forceInit = false) {
550
- if (this.level === 0)
551
- return this.data;
552
- const data = this.data;
553
- if (!data)
554
- return null;
555
- const props = this.store.props;
556
- let children = "children";
557
- if (props) {
558
- children = props.children || "children";
559
- }
560
- if (isUndefined(data[children])) {
561
- data[children] = null;
562
- }
563
- if (forceInit && !data[children]) {
564
- data[children] = [];
565
- }
566
- return data[children];
567
- }
568
- updateChildren() {
569
- const newData = this.getChildren() || [];
570
- const oldData = this.childNodes.map((node) => node.data);
571
- const newDataMap = {};
572
- const newNodes = [];
573
- newData.forEach((item, index) => {
574
- const key = item[NODE_KEY];
575
- const isNodeExists = !!key && oldData.findIndex((data) => (data == null ? void 0 : data[NODE_KEY]) === key) >= 0;
576
- if (isNodeExists) {
577
- newDataMap[key] = { index, data: item };
578
- } else {
579
- newNodes.push({ index, data: item });
580
- }
581
- });
582
- if (!this.store.lazy) {
583
- oldData.forEach((item) => {
584
- if (!newDataMap[item == null ? void 0 : item[NODE_KEY]])
585
- this.removeChildByData(item);
586
- });
587
- }
588
- newNodes.forEach(({ index, data }) => {
589
- this.insertChild({ data }, index);
590
- });
591
- this.updateLeafState();
592
- }
593
- loadData(callback, defaultProps = {}) {
594
- if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
595
- this.loading = true;
596
- const resolve = (children) => {
597
- this.childNodes = [];
598
- this.doCreateChildren(children, defaultProps);
599
- this.loaded = true;
600
- this.loading = false;
601
- this.updateLeafState();
602
- if (callback) {
603
- callback.call(this, children);
604
- }
605
- };
606
- const reject = () => {
607
- this.loading = false;
608
- };
609
- this.store.load(this, resolve, reject);
610
- } else {
611
- if (callback) {
612
- callback.call(this);
613
- }
614
- }
615
- }
616
- eachNode(callback) {
617
- const arr = [this];
618
- while (arr.length) {
619
- const node = arr.shift();
620
- arr.unshift(...node.childNodes);
621
- callback(node);
622
- }
623
- }
624
- reInitChecked() {
625
- if (this.store.checkStrictly)
626
- return;
627
- reInitChecked(this);
628
- }
629
- }
630
- class TreeStore {
631
- constructor(options) {
632
- this.lazy = false;
633
- this.checkStrictly = false;
634
- this.autoExpandParent = false;
635
- this.defaultExpandAll = false;
636
- this.checkDescendants = false;
637
- this.currentNode = null;
638
- this.currentNodeKey = null;
639
- for (const option in options) {
640
- if (hasOwn(options, option)) {
641
- this[option] = options[option];
642
- }
643
- }
644
- this.nodesMap = {};
645
- }
646
- initialize() {
647
- this.root = new Node({
648
- data: this.data,
649
- store: this
650
- });
651
- this.root.initialize();
652
- if (this.lazy && this.load) {
653
- const loadFn = this.load;
654
- loadFn(this.root, (data) => {
655
- this.root.doCreateChildren(data);
656
- this._initDefaultCheckedNodes();
657
- }, NOOP);
658
- } else {
659
- this._initDefaultCheckedNodes();
660
- }
661
- }
662
- filter(value) {
663
- const filterNodeMethod = this.filterNodeMethod;
664
- const lazy = this.lazy;
665
- const traverse = async function(node) {
666
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
667
- for (const [index, child] of childNodes.entries()) {
668
- child.visible = !!(filterNodeMethod == null ? void 0 : filterNodeMethod.call(child, value, child.data, child));
669
- if (index % 80 === 0 && index > 0) {
670
- await nextTick();
671
- }
672
- await traverse(child);
673
- }
674
- if (!node.visible && childNodes.length) {
675
- let allHidden = true;
676
- allHidden = !childNodes.some((child) => child.visible);
677
- if (node.root) {
678
- node.root.visible = allHidden === false;
679
- } else {
680
- node.visible = allHidden === false;
681
- }
682
- }
683
- if (!value)
684
- return;
685
- if (node.visible && !node.isLeaf) {
686
- if (!lazy || node.loaded) {
687
- node.expand();
688
- }
689
- }
690
- };
691
- traverse(this);
692
- }
693
- setData(newVal) {
694
- const instanceChanged = newVal !== this.root.data;
695
- if (instanceChanged) {
696
- this.nodesMap = {};
697
- this.root.setData(newVal);
698
- this._initDefaultCheckedNodes();
699
- this.setCurrentNodeKey(this.currentNodeKey);
700
- } else {
701
- this.root.updateChildren();
702
- }
703
- }
704
- getNode(data) {
705
- if (data instanceof Node)
706
- return data;
707
- const key = isObject(data) ? getNodeKey(this.key, data) : data;
708
- return this.nodesMap[key] || null;
709
- }
710
- insertBefore(data, refData) {
711
- var _a;
712
- const refNode = this.getNode(refData);
713
- (_a = refNode.parent) == null ? void 0 : _a.insertBefore({ data }, refNode);
714
- }
715
- insertAfter(data, refData) {
716
- var _a;
717
- const refNode = this.getNode(refData);
718
- (_a = refNode.parent) == null ? void 0 : _a.insertAfter({ data }, refNode);
719
- }
720
- remove(data) {
721
- const node = this.getNode(data);
722
- if (node && node.parent) {
723
- if (node === this.currentNode) {
724
- this.currentNode = null;
725
- }
726
- node.parent.removeChild(node);
727
- }
728
- }
729
- append(data, parentData) {
730
- const parentNode = !isPropAbsent(parentData) ? this.getNode(parentData) : this.root;
731
- if (parentNode) {
732
- parentNode.insertChild({ data });
733
- }
734
- }
735
- _initDefaultCheckedNodes() {
736
- const defaultCheckedKeys = this.defaultCheckedKeys || [];
737
- const nodesMap = this.nodesMap;
738
- defaultCheckedKeys.forEach((checkedKey) => {
739
- const node = nodesMap[checkedKey];
740
- if (node) {
741
- node.setChecked(true, !this.checkStrictly);
742
- }
743
- });
744
- }
745
- _initDefaultCheckedNode(node) {
746
- const defaultCheckedKeys = this.defaultCheckedKeys || [];
747
- if (!isNil(node.key) && defaultCheckedKeys.includes(node.key)) {
748
- node.setChecked(true, !this.checkStrictly);
749
- }
750
- }
751
- setDefaultCheckedKey(newVal) {
752
- if (newVal !== this.defaultCheckedKeys) {
753
- this.defaultCheckedKeys = newVal;
754
- this._initDefaultCheckedNodes();
755
- }
756
- }
757
- registerNode(node) {
758
- const key = this.key;
759
- if (!node || !node.data)
760
- return;
761
- if (!key) {
762
- this.nodesMap[node.id] = node;
763
- } else {
764
- const nodeKey = node.key;
765
- if (!isNil(nodeKey))
766
- this.nodesMap[nodeKey] = node;
767
- }
768
- }
769
- deregisterNode(node) {
770
- const key = this.key;
771
- if (!key || !node || !node.data)
772
- return;
773
- node.childNodes.forEach((child) => {
774
- this.deregisterNode(child);
775
- });
776
- delete this.nodesMap[node.key];
777
- }
778
- getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
779
- const checkedNodes = [];
780
- const traverse = function(node) {
781
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
782
- childNodes.forEach((child) => {
783
- if ((child.checked || includeHalfChecked && child.indeterminate) && (!leafOnly || leafOnly && child.isLeaf)) {
784
- checkedNodes.push(child.data);
785
- }
786
- traverse(child);
787
- });
788
- };
789
- traverse(this);
790
- return checkedNodes;
791
- }
792
- getCheckedKeys(leafOnly = false) {
793
- return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]);
794
- }
795
- getHalfCheckedNodes() {
796
- const nodes = [];
797
- const traverse = function(node) {
798
- const childNodes = node.root ? node.root.childNodes : node.childNodes;
799
- childNodes.forEach((child) => {
800
- if (child.indeterminate) {
801
- nodes.push(child.data);
802
- }
803
- traverse(child);
804
- });
805
- };
806
- traverse(this);
807
- return nodes;
808
- }
809
- getHalfCheckedKeys() {
810
- return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
811
- }
812
- _getAllNodes() {
813
- const allNodes = [];
814
- const nodesMap = this.nodesMap;
815
- for (const nodeKey in nodesMap) {
816
- if (hasOwn(nodesMap, nodeKey)) {
817
- allNodes.push(nodesMap[nodeKey]);
818
- }
819
- }
820
- return allNodes;
821
- }
822
- updateChildren(key, data) {
823
- const node = this.nodesMap[key];
824
- if (!node)
825
- return;
826
- const childNodes = node.childNodes;
827
- for (let i = childNodes.length - 1; i >= 0; i--) {
828
- const child = childNodes[i];
829
- this.remove(child.data);
830
- }
831
- for (let i = 0, j = data.length; i < j; i++) {
832
- const child = data[i];
833
- this.append(child, node.data);
834
- }
835
- }
836
- _setCheckedKeys(key, leafOnly = false, checkedKeys) {
837
- const allNodes = this._getAllNodes().sort((a, b) => a.level - b.level);
838
- const cache = /* @__PURE__ */ Object.create(null);
839
- const keys = Object.keys(checkedKeys);
840
- allNodes.forEach((node) => node.setChecked(false, false));
841
- const cacheCheckedChild = (node) => {
842
- node.childNodes.forEach((child) => {
843
- var _a;
844
- cache[child.data[key]] = true;
845
- if ((_a = child.childNodes) == null ? void 0 : _a.length) {
846
- cacheCheckedChild(child);
847
- }
848
- });
849
- };
850
- for (let i = 0, j = allNodes.length; i < j; i++) {
851
- const node = allNodes[i];
852
- const nodeKey = node.data[key].toString();
853
- const checked = keys.includes(nodeKey);
854
- if (!checked) {
855
- if (node.checked && !cache[nodeKey]) {
856
- node.setChecked(false, false);
857
- }
858
- continue;
859
- }
860
- if (node.childNodes.length) {
861
- cacheCheckedChild(node);
862
- }
863
- if (node.isLeaf || this.checkStrictly) {
864
- node.setChecked(true, false);
865
- continue;
866
- }
867
- node.setChecked(true, true);
868
- if (leafOnly) {
869
- node.setChecked(false, false);
870
- const traverse = function(node2) {
871
- const childNodes = node2.childNodes;
872
- childNodes.forEach((child) => {
873
- if (!child.isLeaf) {
874
- child.setChecked(false, false);
875
- }
876
- traverse(child);
877
- });
878
- };
879
- traverse(node);
880
- }
881
- }
882
- }
883
- setCheckedNodes(array, leafOnly = false) {
884
- const key = this.key;
885
- const checkedKeys = {};
886
- array.forEach((item) => {
887
- checkedKeys[(item || {})[key]] = true;
888
- });
889
- this._setCheckedKeys(key, leafOnly, checkedKeys);
890
- }
891
- setCheckedKeys(keys, leafOnly = false) {
892
- this.defaultCheckedKeys = keys;
893
- const key = this.key;
894
- const checkedKeys = {};
895
- keys.forEach((key2) => {
896
- checkedKeys[key2] = true;
897
- });
898
- this._setCheckedKeys(key, leafOnly, checkedKeys);
899
- }
900
- setDefaultExpandedKeys(keys) {
901
- keys = keys || [];
902
- this.defaultExpandedKeys = keys;
903
- keys.forEach((key) => {
904
- const node = this.getNode(key);
905
- if (node)
906
- node.expand(null, this.autoExpandParent);
907
- });
908
- }
909
- setChecked(data, checked, deep) {
910
- const node = this.getNode(data);
911
- if (node) {
912
- node.setChecked(!!checked, deep);
913
- }
914
- }
915
- getCurrentNode() {
916
- return this.currentNode;
917
- }
918
- setCurrentNode(currentNode) {
919
- const prevCurrentNode = this.currentNode;
920
- if (prevCurrentNode) {
921
- prevCurrentNode.isCurrent = false;
922
- }
923
- this.currentNode = currentNode;
924
- this.currentNode.isCurrent = true;
925
- }
926
- setUserCurrentNode(node, shouldAutoExpandParent = true) {
927
- var _a;
928
- const key = node[this.key];
929
- const currNode = this.nodesMap[key];
930
- this.setCurrentNode(currNode);
931
- if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) {
932
- (_a = this.currentNode.parent) == null ? void 0 : _a.expand(null, true);
933
- }
934
- }
935
- setCurrentNodeKey(key, shouldAutoExpandParent = true) {
936
- var _a;
937
- this.currentNodeKey = key;
938
- if (isPropAbsent(key)) {
939
- this.currentNode && (this.currentNode.isCurrent = false);
940
- this.currentNode = null;
941
- return;
942
- }
943
- const node = this.getNode(key);
944
- if (node) {
945
- this.setCurrentNode(node);
946
- if (shouldAutoExpandParent && this.currentNode && this.currentNode.level > 1) {
947
- (_a = this.currentNode.parent) == null ? void 0 : _a.expand(null, true);
948
- }
949
- }
950
- }
951
- }
952
- const ROOT_TREE_INJECTION_KEY = "RootTree";
953
- const NODE_INSTANCE_INJECTION_KEY = "NodeInstance";
954
- const TREE_NODE_MAP_INJECTION_KEY = "TreeNodeMap";
955
- const _sfc_main$3 = defineComponent({
956
- name: "ElTreeNodeContent",
957
- props: {
958
- node: {
959
- type: Object,
960
- required: true
961
- },
962
- renderContent: Function
963
- },
964
- setup(props) {
965
- const ns = useNamespace("tree");
966
- const nodeInstance = inject(NODE_INSTANCE_INJECTION_KEY);
967
- const tree = inject(ROOT_TREE_INJECTION_KEY);
968
- return () => {
969
- const node = props.node;
970
- const { data, store } = node;
971
- return props.renderContent ? props.renderContent(h, { _self: nodeInstance, node, data, store }) : renderSlot(tree.ctx.slots, "default", { node, data }, () => [
972
- h(ElText, { tag: "span", truncated: true, class: ns.be("node", "label") }, () => [node.label])
973
- ]);
974
- };
975
- }
976
- });
977
- var NodeContent = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "tree-node-content.vue"]]);
978
- function useNodeExpandEventBroadcast(props) {
979
- const parentNodeMap = inject(TREE_NODE_MAP_INJECTION_KEY, null);
980
- const currentNodeMap = {
981
- treeNodeExpand: (node) => {
982
- var _a;
983
- if (props.node !== node) {
984
- (_a = props.node) == null ? void 0 : _a.collapse();
985
- }
986
- },
987
- children: []
988
- };
989
- if (parentNodeMap) {
990
- parentNodeMap.children.push(currentNodeMap);
991
- }
992
- provide(TREE_NODE_MAP_INJECTION_KEY, currentNodeMap);
993
- return {
994
- broadcastExpanded: (node) => {
995
- if (!props.accordion)
996
- return;
997
- for (const childNode of currentNodeMap.children) {
998
- childNode.treeNodeExpand(node);
999
- }
1000
- }
1001
- };
1002
- }
1003
- const dragEventsKey = Symbol("dragEvents");
1004
- function useDragNodeHandler({
1005
- props,
1006
- ctx,
1007
- el$,
1008
- dropIndicator$,
1009
- store
1010
- }) {
1011
- const ns = useNamespace("tree");
1012
- const dragState = ref({
1013
- showDropIndicator: false,
1014
- draggingNode: null,
1015
- dropNode: null,
1016
- allowDrop: true,
1017
- dropType: null
1018
- });
1019
- const treeNodeDragStart = ({ event, treeNode }) => {
1020
- if (!event.dataTransfer)
1021
- return;
1022
- if (isFunction(props.allowDrag) && !props.allowDrag(treeNode.node)) {
1023
- event.preventDefault();
1024
- return false;
1025
- }
1026
- event.dataTransfer.effectAllowed = "move";
1027
- try {
1028
- event.dataTransfer.setData("text/plain", "");
1029
- } catch (e) {
1030
- }
1031
- dragState.value.draggingNode = treeNode;
1032
- ctx.emit("node-drag-start", treeNode.node, event);
1033
- };
1034
- const treeNodeDragOver = ({ event, treeNode }) => {
1035
- if (!event.dataTransfer)
1036
- return;
1037
- const dropNode = treeNode;
1038
- const oldDropNode = dragState.value.dropNode;
1039
- if (oldDropNode && oldDropNode.node.id !== dropNode.node.id) {
1040
- removeClass(oldDropNode.$el, ns.is("drop-inner"));
1041
- }
1042
- const draggingNode = dragState.value.draggingNode;
1043
- if (!draggingNode || !dropNode)
1044
- return;
1045
- let dropPrev = true;
1046
- let dropInner = true;
1047
- let dropNext = true;
1048
- let userAllowDropInner = true;
1049
- if (isFunction(props.allowDrop)) {
1050
- dropPrev = props.allowDrop(draggingNode.node, dropNode.node, "prev");
1051
- userAllowDropInner = dropInner = props.allowDrop(draggingNode.node, dropNode.node, "inner");
1052
- dropNext = props.allowDrop(draggingNode.node, dropNode.node, "next");
1053
- }
1054
- event.dataTransfer.dropEffect = dropInner || dropPrev || dropNext ? "move" : "none";
1055
- if ((dropPrev || dropInner || dropNext) && (oldDropNode == null ? void 0 : oldDropNode.node.id) !== dropNode.node.id) {
1056
- if (oldDropNode) {
1057
- ctx.emit("node-drag-leave", draggingNode.node, oldDropNode.node, event);
1058
- }
1059
- ctx.emit("node-drag-enter", draggingNode.node, dropNode.node, event);
1060
- }
1061
- if (dropPrev || dropInner || dropNext) {
1062
- dragState.value.dropNode = dropNode;
1063
- } else {
1064
- dragState.value.dropNode = null;
1065
- }
1066
- if (dropNode.node.nextSibling === draggingNode.node) {
1067
- dropNext = false;
1068
- }
1069
- if (dropNode.node.previousSibling === draggingNode.node) {
1070
- dropPrev = false;
1071
- }
1072
- if (dropNode.node.contains(draggingNode.node, false)) {
1073
- dropInner = false;
1074
- }
1075
- if (draggingNode.node === dropNode.node || draggingNode.node.contains(dropNode.node)) {
1076
- dropPrev = false;
1077
- dropInner = false;
1078
- dropNext = false;
1079
- }
1080
- const dropEl = dropNode.$el;
1081
- const targetPosition = dropEl.querySelector(`.${ns.be("node", "content")}`).getBoundingClientRect();
1082
- const treePosition = el$.value.getBoundingClientRect();
1083
- let dropType;
1084
- const prevPercent = dropPrev ? dropInner ? 0.25 : dropNext ? 0.45 : 1 : Number.NEGATIVE_INFINITY;
1085
- const nextPercent = dropNext ? dropInner ? 0.75 : dropPrev ? 0.55 : 0 : Number.POSITIVE_INFINITY;
1086
- let indicatorTop = -9999;
1087
- const distance = event.clientY - targetPosition.top;
1088
- if (distance < targetPosition.height * prevPercent) {
1089
- dropType = "before";
1090
- } else if (distance > targetPosition.height * nextPercent) {
1091
- dropType = "after";
1092
- } else if (dropInner) {
1093
- dropType = "inner";
1094
- } else {
1095
- dropType = "none";
1096
- }
1097
- const iconPosition = dropEl.querySelector(`.${ns.be("node", "expand-icon")}`).getBoundingClientRect();
1098
- const dropIndicator = dropIndicator$.value;
1099
- if (dropType === "before") {
1100
- indicatorTop = iconPosition.top - treePosition.top;
1101
- } else if (dropType === "after") {
1102
- indicatorTop = iconPosition.bottom - treePosition.top;
1103
- }
1104
- dropIndicator.style.top = `${indicatorTop}px`;
1105
- dropIndicator.style.left = `${iconPosition.right - treePosition.left}px`;
1106
- if (dropType === "inner") {
1107
- addClass(dropEl, ns.is("drop-inner"));
1108
- } else {
1109
- removeClass(dropEl, ns.is("drop-inner"));
1110
- }
1111
- dragState.value.showDropIndicator = dropType === "before" || dropType === "after";
1112
- dragState.value.allowDrop = dragState.value.showDropIndicator || userAllowDropInner;
1113
- dragState.value.dropType = dropType;
1114
- ctx.emit("node-drag-over", draggingNode.node, dropNode.node, event);
1115
- };
1116
- const treeNodeDragEnd = (event) => {
1117
- var _a, _b;
1118
- const { draggingNode, dropType, dropNode } = dragState.value;
1119
- event.preventDefault();
1120
- if (event.dataTransfer) {
1121
- event.dataTransfer.dropEffect = "move";
1122
- }
1123
- if ((draggingNode == null ? void 0 : draggingNode.node.data) && dropNode) {
1124
- const draggingNodeCopy = { data: draggingNode.node.data };
1125
- if (dropType !== "none") {
1126
- draggingNode.node.remove();
1127
- }
1128
- if (dropType === "before") {
1129
- (_a = dropNode.node.parent) == null ? void 0 : _a.insertBefore(draggingNodeCopy, dropNode.node);
1130
- } else if (dropType === "after") {
1131
- (_b = dropNode.node.parent) == null ? void 0 : _b.insertAfter(draggingNodeCopy, dropNode.node);
1132
- } else if (dropType === "inner") {
1133
- dropNode.node.insertChild(draggingNodeCopy);
1134
- }
1135
- if (dropType !== "none") {
1136
- store.value.registerNode(draggingNodeCopy);
1137
- if (store.value.key) {
1138
- draggingNode.node.eachNode((node) => {
1139
- var _a2;
1140
- (_a2 = store.value.nodesMap[node.data[store.value.key]]) == null ? void 0 : _a2.setChecked(node.checked, !store.value.checkStrictly);
1141
- });
1142
- }
1143
- }
1144
- removeClass(dropNode.$el, ns.is("drop-inner"));
1145
- ctx.emit("node-drag-end", draggingNode.node, dropNode.node, dropType, event);
1146
- if (dropType !== "none") {
1147
- ctx.emit("node-drop", draggingNode.node, dropNode.node, dropType, event);
1148
- }
1149
- }
1150
- if (draggingNode && !dropNode) {
1151
- ctx.emit("node-drag-end", draggingNode.node, null, dropType, event);
1152
- }
1153
- dragState.value.showDropIndicator = false;
1154
- dragState.value.draggingNode = null;
1155
- dragState.value.dropNode = null;
1156
- dragState.value.allowDrop = true;
1157
- };
1158
- provide(dragEventsKey, {
1159
- treeNodeDragStart,
1160
- treeNodeDragOver,
1161
- treeNodeDragEnd
1162
- });
1163
- return {
1164
- dragState
1165
- };
1166
- }
1167
- const _sfc_main$2 = defineComponent({
1168
- name: "ElTreeNode",
1169
- components: {
1170
- ElCollapseTransition,
1171
- ElCheckbox,
1172
- NodeContent,
1173
- ElIcon,
1174
- Loading: loading_default
1175
- },
1176
- props: {
1177
- node: {
1178
- type: Node,
1179
- default: () => ({})
1180
- },
1181
- props: {
1182
- type: Object,
1183
- default: () => ({})
1184
- },
1185
- accordion: Boolean,
1186
- renderContent: Function,
1187
- renderAfterExpand: Boolean,
1188
- showCheckbox: Boolean
1189
- },
1190
- emits: ["node-expand"],
1191
- setup(props, ctx) {
1192
- const ns = useNamespace("tree");
1193
- const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
1194
- const tree = inject(ROOT_TREE_INJECTION_KEY);
1195
- const expanded = ref(false);
1196
- const childNodeRendered = ref(false);
1197
- const oldChecked = ref();
1198
- const oldIndeterminate = ref();
1199
- const node$ = ref();
1200
- const dragEvents = inject(dragEventsKey);
1201
- const instance = getCurrentInstance();
1202
- provide(NODE_INSTANCE_INJECTION_KEY, instance);
1203
- if (props.node.expanded) {
1204
- expanded.value = true;
1205
- childNodeRendered.value = true;
1206
- }
1207
- const childrenKey = tree.props.props["children"] || "children";
1208
- watch(() => {
1209
- var _a;
1210
- const children = (_a = props.node.data) == null ? void 0 : _a[childrenKey];
1211
- return children && [...children];
1212
- }, () => {
1213
- props.node.updateChildren();
1214
- });
1215
- watch(() => props.node.indeterminate, (val) => {
1216
- handleSelectChange(props.node.checked, val);
1217
- });
1218
- watch(() => props.node.checked, (val) => {
1219
- handleSelectChange(val, props.node.indeterminate);
1220
- });
1221
- watch(() => props.node.childNodes.length, () => props.node.reInitChecked());
1222
- watch(() => props.node.expanded, (val) => {
1223
- nextTick(() => expanded.value = val);
1224
- if (val) {
1225
- childNodeRendered.value = true;
1226
- }
1227
- });
1228
- const getNodeKey$1 = (node) => {
1229
- return getNodeKey(tree.props.nodeKey, node.data);
1230
- };
1231
- const getNodeClass = (node) => {
1232
- const nodeClassFunc = props.props.class;
1233
- if (!nodeClassFunc) {
1234
- return {};
1235
- }
1236
- let className;
1237
- if (isFunction(nodeClassFunc)) {
1238
- const { data } = node;
1239
- className = nodeClassFunc(data, node);
1240
- } else {
1241
- className = nodeClassFunc;
1242
- }
1243
- if (isString(className)) {
1244
- return { [className]: true };
1245
- } else {
1246
- return className;
1247
- }
1248
- };
1249
- const handleSelectChange = (checked, indeterminate) => {
1250
- if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) {
1251
- tree.ctx.emit("check-change", props.node.data, checked, indeterminate);
1252
- }
1253
- oldChecked.value = checked;
1254
- oldIndeterminate.value = indeterminate;
1255
- };
1256
- const handleClick = (e) => {
1257
- handleCurrentChange(tree.store, tree.ctx.emit, () => {
1258
- var _a;
1259
- const nodeKeyProp = (_a = tree == null ? void 0 : tree.props) == null ? void 0 : _a.nodeKey;
1260
- if (nodeKeyProp) {
1261
- const curNodeKey = getNodeKey$1(props.node);
1262
- tree.store.value.setCurrentNodeKey(curNodeKey);
1263
- } else {
1264
- tree.store.value.setCurrentNode(props.node);
1265
- }
1266
- });
1267
- tree.currentNode.value = props.node;
1268
- if (tree.props.expandOnClickNode) {
1269
- handleExpandIconClick();
1270
- }
1271
- if ((tree.props.checkOnClickNode || props.node.isLeaf && tree.props.checkOnClickLeaf && props.showCheckbox) && !props.node.disabled) {
1272
- handleCheckChange(!props.node.checked);
1273
- }
1274
- tree.ctx.emit("node-click", props.node.data, props.node, instance, e);
1275
- };
1276
- const handleContextMenu = (event) => {
1277
- var _a;
1278
- if ((_a = tree.instance.vnode.props) == null ? void 0 : _a["onNodeContextmenu"]) {
1279
- event.stopPropagation();
1280
- event.preventDefault();
1281
- }
1282
- tree.ctx.emit("node-contextmenu", event, props.node.data, props.node, instance);
1283
- };
1284
- const handleExpandIconClick = () => {
1285
- if (props.node.isLeaf)
1286
- return;
1287
- if (expanded.value) {
1288
- tree.ctx.emit("node-collapse", props.node.data, props.node, instance);
1289
- props.node.collapse();
1290
- } else {
1291
- props.node.expand(() => {
1292
- ctx.emit("node-expand", props.node.data, props.node, instance);
1293
- });
1294
- }
1295
- };
1296
- const handleCheckChange = (value) => {
1297
- props.node.setChecked(value, !(tree == null ? void 0 : tree.props.checkStrictly));
1298
- nextTick(() => {
1299
- const store = tree.store.value;
1300
- tree.ctx.emit("check", props.node.data, {
1301
- checkedNodes: store.getCheckedNodes(),
1302
- checkedKeys: store.getCheckedKeys(),
1303
- halfCheckedNodes: store.getHalfCheckedNodes(),
1304
- halfCheckedKeys: store.getHalfCheckedKeys()
1305
- });
1306
- });
1307
- };
1308
- const handleChildNodeExpand = (nodeData, node, instance2) => {
1309
- broadcastExpanded(node);
1310
- tree.ctx.emit("node-expand", nodeData, node, instance2);
1311
- };
1312
- const handleDragStart = (event) => {
1313
- if (!tree.props.draggable)
1314
- return;
1315
- dragEvents.treeNodeDragStart({ event, treeNode: props });
1316
- };
1317
- const handleDragOver = (event) => {
1318
- event.preventDefault();
1319
- if (!tree.props.draggable)
1320
- return;
1321
- dragEvents.treeNodeDragOver({
1322
- event,
1323
- treeNode: { $el: node$.value, node: props.node }
1324
- });
1325
- };
1326
- const handleDrop = (event) => {
1327
- event.preventDefault();
1328
- };
1329
- const handleDragEnd = (event) => {
1330
- if (!tree.props.draggable)
1331
- return;
1332
- dragEvents.treeNodeDragEnd(event);
1333
- };
1334
- return {
1335
- ns,
1336
- node$,
1337
- tree,
1338
- expanded,
1339
- childNodeRendered,
1340
- oldChecked,
1341
- oldIndeterminate,
1342
- getNodeKey: getNodeKey$1,
1343
- getNodeClass,
1344
- handleSelectChange,
1345
- handleClick,
1346
- handleContextMenu,
1347
- handleExpandIconClick,
1348
- handleCheckChange,
1349
- handleChildNodeExpand,
1350
- handleDragStart,
1351
- handleDragOver,
1352
- handleDrop,
1353
- handleDragEnd,
1354
- CaretRight: caret_right_default
1355
- };
1356
- }
1357
- });
1358
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1359
- const _component_el_icon = resolveComponent("el-icon");
1360
- const _component_el_checkbox = resolveComponent("el-checkbox");
1361
- const _component_loading = resolveComponent("loading");
1362
- const _component_node_content = resolveComponent("node-content");
1363
- const _component_el_tree_node = resolveComponent("el-tree-node");
1364
- const _component_el_collapse_transition = resolveComponent("el-collapse-transition");
1365
- return withDirectives((openBlock(), createElementBlock("div", {
1366
- ref: "node$",
1367
- class: normalizeClass([
1368
- _ctx.ns.b("node"),
1369
- _ctx.ns.is("expanded", _ctx.expanded),
1370
- _ctx.ns.is("current", _ctx.node.isCurrent),
1371
- _ctx.ns.is("hidden", !_ctx.node.visible),
1372
- _ctx.ns.is("focusable", !_ctx.node.disabled),
1373
- _ctx.ns.is("checked", !_ctx.node.disabled && _ctx.node.checked),
1374
- _ctx.getNodeClass(_ctx.node)
1375
- ]),
1376
- role: "treeitem",
1377
- tabindex: "-1",
1378
- "aria-expanded": _ctx.expanded,
1379
- "aria-disabled": _ctx.node.disabled,
1380
- "aria-checked": _ctx.node.checked,
1381
- draggable: _ctx.tree.props.draggable,
1382
- "data-key": _ctx.getNodeKey(_ctx.node),
1383
- onClick: withModifiers(_ctx.handleClick, ["stop"]),
1384
- onContextmenu: _ctx.handleContextMenu,
1385
- onDragstart: withModifiers(_ctx.handleDragStart, ["stop"]),
1386
- onDragover: withModifiers(_ctx.handleDragOver, ["stop"]),
1387
- onDragend: withModifiers(_ctx.handleDragEnd, ["stop"]),
1388
- onDrop: withModifiers(_ctx.handleDrop, ["stop"])
1389
- }, [
1390
- createElementVNode("div", {
1391
- class: normalizeClass(_ctx.ns.be("node", "content")),
1392
- style: normalizeStyle({ paddingLeft: (_ctx.node.level - 1) * _ctx.tree.props.indent + "px" })
1393
- }, [
1394
- _ctx.tree.props.icon || _ctx.CaretRight ? (openBlock(), createBlock(_component_el_icon, {
1395
- key: 0,
1396
- class: normalizeClass([
1397
- _ctx.ns.be("node", "expand-icon"),
1398
- _ctx.ns.is("leaf", _ctx.node.isLeaf),
1399
- {
1400
- expanded: !_ctx.node.isLeaf && _ctx.expanded
1401
- }
1402
- ]),
1403
- onClick: withModifiers(_ctx.handleExpandIconClick, ["stop"])
1404
- }, {
1405
- default: withCtx(() => [
1406
- (openBlock(), createBlock(resolveDynamicComponent(_ctx.tree.props.icon || _ctx.CaretRight)))
1407
- ]),
1408
- _: 1
1409
- }, 8, ["class", "onClick"])) : createCommentVNode("v-if", true),
1410
- _ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
1411
- key: 1,
1412
- "model-value": _ctx.node.checked,
1413
- indeterminate: _ctx.node.indeterminate,
1414
- disabled: !!_ctx.node.disabled,
1415
- onClick: withModifiers(() => {
1416
- }, ["stop"]),
1417
- onChange: _ctx.handleCheckChange
1418
- }, null, 8, ["model-value", "indeterminate", "disabled", "onClick", "onChange"])) : createCommentVNode("v-if", true),
1419
- _ctx.node.loading ? (openBlock(), createBlock(_component_el_icon, {
1420
- key: 2,
1421
- class: normalizeClass([_ctx.ns.be("node", "loading-icon"), _ctx.ns.is("loading")])
1422
- }, {
1423
- default: withCtx(() => [
1424
- createVNode(_component_loading)
1425
- ]),
1426
- _: 1
1427
- }, 8, ["class"])) : createCommentVNode("v-if", true),
1428
- createVNode(_component_node_content, {
1429
- node: _ctx.node,
1430
- "render-content": _ctx.renderContent
1431
- }, null, 8, ["node", "render-content"])
1432
- ], 6),
1433
- createVNode(_component_el_collapse_transition, null, {
1434
- default: withCtx(() => [
1435
- !_ctx.renderAfterExpand || _ctx.childNodeRendered ? withDirectives((openBlock(), createElementBlock("div", {
1436
- key: 0,
1437
- class: normalizeClass(_ctx.ns.be("node", "children")),
1438
- role: "group",
1439
- "aria-expanded": _ctx.expanded,
1440
- onClick: withModifiers(() => {
1441
- }, ["stop"])
1442
- }, [
1443
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.childNodes, (child) => {
1444
- return openBlock(), createBlock(_component_el_tree_node, {
1445
- key: _ctx.getNodeKey(child),
1446
- "render-content": _ctx.renderContent,
1447
- "render-after-expand": _ctx.renderAfterExpand,
1448
- "show-checkbox": _ctx.showCheckbox,
1449
- node: child,
1450
- accordion: _ctx.accordion,
1451
- props: _ctx.props,
1452
- onNodeExpand: _ctx.handleChildNodeExpand
1453
- }, null, 8, ["render-content", "render-after-expand", "show-checkbox", "node", "accordion", "props", "onNodeExpand"]);
1454
- }), 128))
1455
- ], 10, ["aria-expanded", "onClick"])), [
1456
- [vShow, _ctx.expanded]
1457
- ]) : createCommentVNode("v-if", true)
1458
- ]),
1459
- _: 1
1460
- })
1461
- ], 42, ["aria-expanded", "aria-disabled", "aria-checked", "draggable", "data-key", "onClick", "onContextmenu", "onDragstart", "onDragover", "onDragend", "onDrop"])), [
1462
- [vShow, _ctx.node.visible]
1463
- ]);
1464
- }
1465
- var ElTreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__file", "tree-node.vue"]]);
1466
- function useKeydown({ el$ }, store) {
1467
- const ns = useNamespace("tree");
1468
- onMounted(() => {
1469
- initTabIndex();
1470
- });
1471
- onUpdated(() => {
1472
- const checkboxItems = Array.from(el$.value.querySelectorAll("input[type=checkbox]"));
1473
- checkboxItems.forEach((checkbox) => {
1474
- checkbox.setAttribute("tabindex", "-1");
1475
- });
1476
- });
1477
- function canNodeFocus(treeItems, nextIndex) {
1478
- var _a, _b;
1479
- const currentNode = store.value.getNode(treeItems[nextIndex].dataset.key);
1480
- return currentNode.canFocus && currentNode.visible && (((_a = currentNode.parent) == null ? void 0 : _a.expanded) || ((_b = currentNode.parent) == null ? void 0 : _b.level) === 0);
1481
- }
1482
- const handleKeydown = (ev) => {
1483
- const currentItem = ev.target;
1484
- if (!currentItem.className.includes(ns.b("node")))
1485
- return;
1486
- const code = ev.code;
1487
- const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
1488
- const currentIndex = treeItems.indexOf(currentItem);
1489
- let nextIndex;
1490
- if ([EVENT_CODE.up, EVENT_CODE.down].includes(code)) {
1491
- ev.preventDefault();
1492
- if (code === EVENT_CODE.up) {
1493
- nextIndex = currentIndex === -1 ? 0 : currentIndex !== 0 ? currentIndex - 1 : treeItems.length - 1;
1494
- const startIndex = nextIndex;
1495
- while (true) {
1496
- if (canNodeFocus(treeItems, nextIndex)) {
1497
- break;
1498
- }
1499
- nextIndex--;
1500
- if (nextIndex === startIndex) {
1501
- nextIndex = -1;
1502
- break;
1503
- }
1504
- if (nextIndex < 0) {
1505
- nextIndex = treeItems.length - 1;
1506
- }
1507
- }
1508
- } else {
1509
- nextIndex = currentIndex === -1 ? 0 : currentIndex < treeItems.length - 1 ? currentIndex + 1 : 0;
1510
- const startIndex = nextIndex;
1511
- while (true) {
1512
- if (canNodeFocus(treeItems, nextIndex)) {
1513
- break;
1514
- }
1515
- nextIndex++;
1516
- if (nextIndex === startIndex) {
1517
- nextIndex = -1;
1518
- break;
1519
- }
1520
- if (nextIndex >= treeItems.length) {
1521
- nextIndex = 0;
1522
- }
1523
- }
1524
- }
1525
- nextIndex !== -1 && treeItems[nextIndex].focus();
1526
- }
1527
- if ([EVENT_CODE.left, EVENT_CODE.right].includes(code)) {
1528
- ev.preventDefault();
1529
- currentItem.click();
1530
- }
1531
- const hasInput = currentItem.querySelector('[type="checkbox"]');
1532
- if ([EVENT_CODE.enter, EVENT_CODE.numpadEnter, EVENT_CODE.space].includes(code) && hasInput) {
1533
- ev.preventDefault();
1534
- hasInput.click();
1535
- }
1536
- };
1537
- useEventListener(el$, "keydown", handleKeydown);
1538
- const initTabIndex = () => {
1539
- var _a;
1540
- if (!el$.value)
1541
- return;
1542
- const treeItems = Array.from(el$.value.querySelectorAll(`.${ns.is("focusable")}[role=treeitem]`));
1543
- const checkboxItems = Array.from(el$.value.querySelectorAll("input[type=checkbox]"));
1544
- checkboxItems.forEach((checkbox) => {
1545
- checkbox.setAttribute("tabindex", "-1");
1546
- });
1547
- const checkedItem = el$.value.querySelectorAll(`.${ns.is("checked")}[role=treeitem]`);
1548
- if (checkedItem.length) {
1549
- checkedItem[0].setAttribute("tabindex", "0");
1550
- return;
1551
- }
1552
- (_a = treeItems[0]) == null ? void 0 : _a.setAttribute("tabindex", "0");
1553
- };
1554
- }
1555
- const _sfc_main$1 = defineComponent({
1556
- name: "ElTree",
1557
- components: { ElTreeNode },
1558
- props: {
1559
- data: {
1560
- type: definePropType(Array),
1561
- default: () => []
1562
- },
1563
- emptyText: {
1564
- type: String
1565
- },
1566
- renderAfterExpand: {
1567
- type: Boolean,
1568
- default: true
1569
- },
1570
- nodeKey: String,
1571
- checkStrictly: Boolean,
1572
- defaultExpandAll: Boolean,
1573
- expandOnClickNode: {
1574
- type: Boolean,
1575
- default: true
1576
- },
1577
- checkOnClickNode: Boolean,
1578
- checkOnClickLeaf: {
1579
- type: Boolean,
1580
- default: true
1581
- },
1582
- checkDescendants: Boolean,
1583
- autoExpandParent: {
1584
- type: Boolean,
1585
- default: true
1586
- },
1587
- defaultCheckedKeys: Array,
1588
- defaultExpandedKeys: Array,
1589
- currentNodeKey: [String, Number],
1590
- renderContent: {
1591
- type: definePropType(Function)
1592
- },
1593
- showCheckbox: Boolean,
1594
- draggable: Boolean,
1595
- allowDrag: {
1596
- type: definePropType(Function)
1597
- },
1598
- allowDrop: {
1599
- type: definePropType(Function)
1600
- },
1601
- props: {
1602
- type: Object,
1603
- default: () => ({
1604
- children: "children",
1605
- label: "label",
1606
- disabled: "disabled"
1607
- })
1608
- },
1609
- lazy: Boolean,
1610
- highlightCurrent: Boolean,
1611
- load: Function,
1612
- filterNodeMethod: Function,
1613
- accordion: Boolean,
1614
- indent: {
1615
- type: Number,
1616
- default: 18
1617
- },
1618
- icon: {
1619
- type: iconPropType
1620
- }
1621
- },
1622
- emits: [
1623
- "check-change",
1624
- "current-change",
1625
- "node-click",
1626
- "node-contextmenu",
1627
- "node-collapse",
1628
- "node-expand",
1629
- "check",
1630
- "node-drag-start",
1631
- "node-drag-end",
1632
- "node-drop",
1633
- "node-drag-leave",
1634
- "node-drag-enter",
1635
- "node-drag-over"
1636
- ],
1637
- setup(props, ctx) {
1638
- const { t } = useLocale();
1639
- const ns = useNamespace("tree");
1640
- const selectInfo = inject(selectKey, null);
1641
- const store = ref(new TreeStore({
1642
- key: props.nodeKey,
1643
- data: props.data,
1644
- lazy: props.lazy,
1645
- props: props.props,
1646
- load: props.load,
1647
- currentNodeKey: props.currentNodeKey,
1648
- checkStrictly: props.checkStrictly,
1649
- checkDescendants: props.checkDescendants,
1650
- defaultCheckedKeys: props.defaultCheckedKeys,
1651
- defaultExpandedKeys: props.defaultExpandedKeys,
1652
- autoExpandParent: props.autoExpandParent,
1653
- defaultExpandAll: props.defaultExpandAll,
1654
- filterNodeMethod: props.filterNodeMethod
1655
- }));
1656
- store.value.initialize();
1657
- const root = ref(store.value.root);
1658
- const currentNode = ref(null);
1659
- const el$ = ref(null);
1660
- const dropIndicator$ = ref(null);
1661
- const { broadcastExpanded } = useNodeExpandEventBroadcast(props);
1662
- const { dragState } = useDragNodeHandler({
1663
- props,
1664
- ctx,
1665
- el$,
1666
- dropIndicator$,
1667
- store
1668
- });
1669
- useKeydown({ el$ }, store);
1670
- const isEmpty = computed(() => {
1671
- const { childNodes } = root.value;
1672
- const hasFilteredOptions = selectInfo ? selectInfo.hasFilteredOptions !== 0 : false;
1673
- return (!childNodes || childNodes.length === 0 || childNodes.every(({ visible }) => !visible)) && !hasFilteredOptions;
1674
- });
1675
- watch(() => props.currentNodeKey, (newVal) => {
1676
- store.value.setCurrentNodeKey(newVal != null ? newVal : null);
1677
- });
1678
- watch(() => props.defaultCheckedKeys, (newVal, oldVal) => {
1679
- if (isEqual(newVal, oldVal))
1680
- return;
1681
- store.value.setDefaultCheckedKey(newVal != null ? newVal : []);
1682
- });
1683
- watch(() => props.defaultExpandedKeys, (newVal) => {
1684
- store.value.setDefaultExpandedKeys(newVal != null ? newVal : []);
1685
- });
1686
- watch(() => props.data, (newVal) => {
1687
- store.value.setData(newVal);
1688
- }, { deep: true });
1689
- watch(() => props.checkStrictly, (newVal) => {
1690
- store.value.checkStrictly = newVal;
1691
- });
1692
- const filter = (value) => {
1693
- if (!props.filterNodeMethod)
1694
- throw new Error("[Tree] filterNodeMethod is required when filter");
1695
- store.value.filter(value);
1696
- };
1697
- const getNodeKey$1 = (node) => {
1698
- return getNodeKey(props.nodeKey, node.data);
1699
- };
1700
- const getNodePath = (data) => {
1701
- if (!props.nodeKey)
1702
- throw new Error("[Tree] nodeKey is required in getNodePath");
1703
- const node = store.value.getNode(data);
1704
- if (!node)
1705
- return [];
1706
- const path = [node.data];
1707
- let parent = node.parent;
1708
- while (parent && parent !== root.value) {
1709
- path.push(parent.data);
1710
- parent = parent.parent;
1711
- }
1712
- return path.reverse();
1713
- };
1714
- const getCheckedNodes = (leafOnly, includeHalfChecked) => {
1715
- return store.value.getCheckedNodes(leafOnly, includeHalfChecked);
1716
- };
1717
- const getCheckedKeys = (leafOnly) => {
1718
- return store.value.getCheckedKeys(leafOnly);
1719
- };
1720
- const getCurrentNode = () => {
1721
- const currentNode2 = store.value.getCurrentNode();
1722
- return currentNode2 ? currentNode2.data : null;
1723
- };
1724
- const getCurrentKey = () => {
1725
- if (!props.nodeKey)
1726
- throw new Error("[Tree] nodeKey is required in getCurrentKey");
1727
- const currentNode2 = getCurrentNode();
1728
- return currentNode2 ? currentNode2[props.nodeKey] : null;
1729
- };
1730
- const setCheckedNodes = (nodes, leafOnly) => {
1731
- if (!props.nodeKey)
1732
- throw new Error("[Tree] nodeKey is required in setCheckedNodes");
1733
- store.value.setCheckedNodes(nodes, leafOnly);
1734
- };
1735
- const setCheckedKeys = (keys, leafOnly) => {
1736
- if (!props.nodeKey)
1737
- throw new Error("[Tree] nodeKey is required in setCheckedKeys");
1738
- store.value.setCheckedKeys(keys, leafOnly);
1739
- };
1740
- const setChecked = (data, checked, deep) => {
1741
- store.value.setChecked(data, checked, deep);
1742
- };
1743
- const getHalfCheckedNodes = () => {
1744
- return store.value.getHalfCheckedNodes();
1745
- };
1746
- const getHalfCheckedKeys = () => {
1747
- return store.value.getHalfCheckedKeys();
1748
- };
1749
- const setCurrentNode = (node, shouldAutoExpandParent = true) => {
1750
- if (!props.nodeKey)
1751
- throw new Error("[Tree] nodeKey is required in setCurrentNode");
1752
- handleCurrentChange(store, ctx.emit, () => {
1753
- broadcastExpanded(node);
1754
- store.value.setUserCurrentNode(node, shouldAutoExpandParent);
1755
- });
1756
- };
1757
- const setCurrentKey = (key, shouldAutoExpandParent = true) => {
1758
- if (!props.nodeKey)
1759
- throw new Error("[Tree] nodeKey is required in setCurrentKey");
1760
- handleCurrentChange(store, ctx.emit, () => {
1761
- broadcastExpanded();
1762
- store.value.setCurrentNodeKey(key != null ? key : null, shouldAutoExpandParent);
1763
- });
1764
- };
1765
- const getNode = (data) => {
1766
- return store.value.getNode(data);
1767
- };
1768
- const remove = (data) => {
1769
- store.value.remove(data);
1770
- };
1771
- const append = (data, parentNode) => {
1772
- store.value.append(data, parentNode);
1773
- };
1774
- const insertBefore = (data, refNode) => {
1775
- store.value.insertBefore(data, refNode);
1776
- };
1777
- const insertAfter = (data, refNode) => {
1778
- store.value.insertAfter(data, refNode);
1779
- };
1780
- const handleNodeExpand = (nodeData, node, instance) => {
1781
- broadcastExpanded(node);
1782
- ctx.emit("node-expand", nodeData, node, instance);
1783
- };
1784
- const updateKeyChildren = (key, data) => {
1785
- if (!props.nodeKey)
1786
- throw new Error("[Tree] nodeKey is required in updateKeyChild");
1787
- store.value.updateChildren(key, data);
1788
- };
1789
- provide(ROOT_TREE_INJECTION_KEY, {
1790
- ctx,
1791
- props,
1792
- store,
1793
- root,
1794
- currentNode,
1795
- instance: getCurrentInstance()
1796
- });
1797
- provide(formItemContextKey, void 0);
1798
- return {
1799
- ns,
1800
- store,
1801
- root,
1802
- currentNode,
1803
- dragState,
1804
- el$,
1805
- dropIndicator$,
1806
- isEmpty,
1807
- filter,
1808
- getNodeKey: getNodeKey$1,
1809
- getNodePath,
1810
- getCheckedNodes,
1811
- getCheckedKeys,
1812
- getCurrentNode,
1813
- getCurrentKey,
1814
- setCheckedNodes,
1815
- setCheckedKeys,
1816
- setChecked,
1817
- getHalfCheckedNodes,
1818
- getHalfCheckedKeys,
1819
- setCurrentNode,
1820
- setCurrentKey,
1821
- t,
1822
- getNode,
1823
- remove,
1824
- append,
1825
- insertBefore,
1826
- insertAfter,
1827
- handleNodeExpand,
1828
- updateKeyChildren
1829
- };
1830
- }
1831
- });
1832
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1833
- const _component_el_tree_node = resolveComponent("el-tree-node");
1834
- return openBlock(), createElementBlock("div", {
1835
- ref: "el$",
1836
- class: normalizeClass([
1837
- _ctx.ns.b(),
1838
- _ctx.ns.is("dragging", !!_ctx.dragState.draggingNode),
1839
- _ctx.ns.is("drop-not-allow", !_ctx.dragState.allowDrop),
1840
- _ctx.ns.is("drop-inner", _ctx.dragState.dropType === "inner"),
1841
- { [_ctx.ns.m("highlight-current")]: _ctx.highlightCurrent }
1842
- ]),
1843
- role: "tree"
1844
- }, [
1845
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.root.childNodes, (child) => {
1846
- return openBlock(), createBlock(_component_el_tree_node, {
1847
- key: _ctx.getNodeKey(child),
1848
- node: child,
1849
- props: _ctx.props,
1850
- accordion: _ctx.accordion,
1851
- "render-after-expand": _ctx.renderAfterExpand,
1852
- "show-checkbox": _ctx.showCheckbox,
1853
- "render-content": _ctx.renderContent,
1854
- onNodeExpand: _ctx.handleNodeExpand
1855
- }, null, 8, ["node", "props", "accordion", "render-after-expand", "show-checkbox", "render-content", "onNodeExpand"]);
1856
- }), 128)),
1857
- _ctx.isEmpty ? (openBlock(), createElementBlock("div", {
1858
- key: 0,
1859
- class: normalizeClass(_ctx.ns.e("empty-block"))
1860
- }, [
1861
- renderSlot(_ctx.$slots, "empty", {}, () => {
1862
- var _a;
1863
- return [
1864
- createElementVNode("span", {
1865
- class: normalizeClass(_ctx.ns.e("empty-text"))
1866
- }, toDisplayString((_a = _ctx.emptyText) != null ? _a : _ctx.t("el.tree.emptyText")), 3)
1867
- ];
1868
- })
1869
- ], 2)) : createCommentVNode("v-if", true),
1870
- withDirectives(createElementVNode("div", {
1871
- ref: "dropIndicator$",
1872
- class: normalizeClass(_ctx.ns.e("drop-indicator"))
1873
- }, null, 2), [
1874
- [vShow, _ctx.dragState.showDropIndicator]
1875
- ])
1876
- ], 2);
1877
- }
1878
- var Tree = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "tree.vue"]]);
1879
- const ElTree = withInstall(Tree);
1880
- const _hoisted_1 = {
1881
- key: 0,
1882
- class: "vc-tree__filter-container"
1883
- };
1884
- const _hoisted_2 = {
1885
- key: 1,
1886
- class: "vc-tree__container-top"
1887
- };
1888
- const _sfc_main = /* @__PURE__ */ defineComponent({
1889
- __name: "VcTree",
1890
- props: {
1891
- config: {},
1892
- nodeKey: { default: "key" },
1893
- color: { default: "primary" },
1894
- loading: { type: Boolean, default: false },
1895
- emptyText: { default: "" },
1896
- selectable: { type: Boolean, default: true },
1897
- defaultExpandAll: { type: Boolean, default: false },
1898
- expandedKeys: { default: () => [] },
1899
- defaultCheckedKeys: { default: () => [] },
1900
- filterPlaceholder: { default: "" },
1901
- lazy: { type: Boolean },
1902
- options: { default: () => [] },
1903
- filterPrefixIcon: { default: "" },
1904
- filterPrefixIconColor: { default: "" },
1905
- useTypes: { default: () => [] },
1906
- scrollHeight: { default: void 0 },
1907
- clearFilterOnOptionsChange: { type: Boolean, default: true }
1908
- },
1909
- emits: ["update:selectedKeys", "update:selectNode", "update:selectedNodes"],
1910
- setup(__props, { expose: __expose, emit: __emit }) {
1911
- const props = __props;
1912
- const emit = __emit;
1913
- const filterValue = ref("");
1914
- const localOptions = ref([]);
1915
- const treeRef = ref();
1916
- const treeContainerRef = ref();
1917
- let mutationObserver = null;
1918
- const { isRTL } = useRTL();
1919
- const filterByKey = computed(() => props.config.filterBy);
1920
- const childrenKey = computed(() => props.config.childrenKey);
1921
- const colorClass = computed(() => {
1922
- return props.color ? TEXT_COLORS[props.color] || "" : "";
1923
- });
1924
- const filterable = computed(() => !!filterByKey.value);
1925
- const elTreeProps = computed(() => {
1926
- const _labelKey = props.config.labelKey || "label";
1927
- const _childKey = String(props.config.childrenKey || "children");
1928
- const _disabledKey = props.config.disabledKey || "disabled";
1929
- return {
1930
- label: _labelKey,
1931
- children: _childKey,
1932
- disabled: _disabledKey
1933
- };
1934
- });
1935
- const maxHeightWrapper = computed(() => {
1936
- if (!props.scrollHeight) {
1937
- return "";
1938
- }
1939
- return convertToUnit(props.scrollHeight);
1940
- });
1941
- function handleCheck(node, opt) {
1942
- emit("update:selectedKeys", opt.checkedKeys);
1943
- emit("update:selectedNodes", opt.checkedNodes);
1944
- emit("update:selectNode", node);
1945
- }
1946
- function filterNodeFn(value, data) {
1947
- const _filterByKey = filterByKey.value;
1948
- if (!value || !_filterByKey) return true;
1949
- const searchFields = _filterByKey.split(",");
1950
- const _searchVal = value.trim().toLocaleLowerCase(props.config.filterLocale);
1951
- return isFilterMatched(data, {
1952
- searchFields,
1953
- filterText: _searchVal
1954
- });
1955
- }
1956
- function isFilterMatched(node, params) {
1957
- var _a;
1958
- let matched = false;
1959
- for (const field of params.searchFields) {
1960
- const fieldValue = String(resolveFieldData(node, field.trim())).toLocaleLowerCase((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.filterLocale);
1961
- if (fieldValue.indexOf(params.filterText) > -1) {
1962
- matched = true;
1963
- }
1964
- }
1965
- return matched;
1966
- }
1967
- function initOptions(options) {
1968
- if (props.clearFilterOnOptionsChange) {
1969
- filterValue.value = "";
1970
- }
1971
- if (props.useTypes.length) {
1972
- localOptions.value = [...filterOptionsByTypes(options)];
1973
- } else {
1974
- localOptions.value = [...options];
1975
- }
1976
- }
1977
- function filterOptionsByTypes(options) {
1978
- return [...options].reduce((acc, item) => {
1979
- var _a;
1980
- const _itemData = { ...item };
1981
- const nodeType = _itemData["type"];
1982
- const _isTypeValid = props.useTypes.includes(nodeType);
1983
- let _children = [];
1984
- if ((_a = _itemData[childrenKey.value]) == null ? void 0 : _a.length) {
1985
- _children = filterOptionsByTypes(_itemData[props.config.childrenKey]);
1986
- }
1987
- set(_itemData, childrenKey.value, _children);
1988
- if (_isTypeValid || _children.length) {
1989
- acc.push(_itemData);
1990
- }
1991
- return acc;
1992
- }, []);
1993
- }
1994
- function getCheckedNodesFn(leafOnly = false) {
1995
- return treeRef.value.getCheckedNodes(leafOnly, false);
1996
- }
1997
- function getCheckedKeysFn(leafOnly = false) {
1998
- return treeRef.value.getCheckedKeys(leafOnly);
1999
- }
2000
- function setCheckedNodesFn(nodes) {
2001
- treeRef.value.setCheckedNodes(nodes, false);
2002
- }
2003
- function setCheckedKeys(keys) {
2004
- treeRef.value.setCheckedKeys(keys, false);
2005
- }
2006
- function resetChecked() {
2007
- treeRef.value.setCheckedKeys([], false);
2008
- }
2009
- function getParentSelectedNodes(options = [], data = []) {
2010
- const _allChecked = getCheckedKeysFn();
2011
- return options.reduce((acc, item) => {
2012
- if (_allChecked.includes(item[props.nodeKey])) {
2013
- acc.push(item);
2014
- } else {
2015
- getParentSelectedNodes(item[props.config.childrenKey], acc);
2016
- }
2017
- return acc;
2018
- }, data);
2019
- }
2020
- function getAllNodeKeys(options) {
2021
- return options.reduce((acc, item) => {
2022
- var _a;
2023
- acc.push(item[props.nodeKey]);
2024
- if ((_a = item[childrenKey.value]) == null ? void 0 : _a.length) {
2025
- acc.push(...getAllNodeKeys(item[childrenKey.value]));
2026
- }
2027
- return acc;
2028
- }, []);
2029
- }
2030
- function fixRTLPadding() {
2031
- if (!treeContainerRef.value) return;
2032
- if (!isRTL.value) return;
2033
- const treeNodeContents = treeContainerRef.value.querySelectorAll(".el-tree-node__content");
2034
- treeNodeContents.forEach((element) => {
2035
- const computedStyle = window.getComputedStyle(element);
2036
- const paddingLeft = computedStyle.paddingLeft;
2037
- if (paddingLeft && paddingLeft !== "0px") {
2038
- element.style.paddingRight = paddingLeft;
2039
- element.style.paddingLeft = "0";
2040
- }
2041
- });
2042
- }
2043
- function setupRTLObserver() {
2044
- if (!treeContainerRef.value) return;
2045
- if (mutationObserver) {
2046
- mutationObserver.disconnect();
2047
- }
2048
- mutationObserver = new MutationObserver(() => {
2049
- setTimeout(() => {
2050
- fixRTLPadding();
2051
- }, 0);
2052
- });
2053
- mutationObserver.observe(treeContainerRef.value, {
2054
- childList: true,
2055
- subtree: true,
2056
- attributes: true,
2057
- attributeFilter: ["class", "style"]
2058
- });
2059
- }
2060
- watch(
2061
- filterValue,
2062
- (val) => {
2063
- treeRef.value.filter(val);
2064
- }
2065
- );
2066
- watch(
2067
- () => props.options,
2068
- (val) => {
2069
- var _a;
2070
- const currentCheckedKeys = ((_a = treeRef.value) == null ? void 0 : _a.getCheckedKeys(false)) || [];
2071
- initOptions(val);
2072
- if (!props.clearFilterOnOptionsChange && filterValue.value && treeRef.value) {
2073
- nextTick(() => {
2074
- var _a2;
2075
- (_a2 = treeRef.value) == null ? void 0 : _a2.filter(filterValue.value);
2076
- });
2077
- }
2078
- if (currentCheckedKeys.length > 0) {
2079
- const validKeys = getAllNodeKeys(localOptions.value);
2080
- const validCheckedKeys = currentCheckedKeys.filter((key) => validKeys.includes(key));
2081
- nextTick(() => {
2082
- if (treeRef.value) {
2083
- treeRef.value.setCheckedKeys(validCheckedKeys, false);
2084
- if (validCheckedKeys.length !== currentCheckedKeys.length) {
2085
- emit("update:selectedKeys", validCheckedKeys);
2086
- const checkedNodes = treeRef.value.getCheckedNodes(false, false) || [];
2087
- emit("update:selectedNodes", checkedNodes);
2088
- }
2089
- }
2090
- });
2091
- }
2092
- setTimeout(() => {
2093
- fixRTLPadding();
2094
- }, 0);
2095
- },
2096
- { immediate: true }
2097
- );
2098
- watch(
2099
- () => props.defaultCheckedKeys,
2100
- (newKeys) => {
2101
- if (treeRef.value) {
2102
- setTimeout(() => {
2103
- var _a;
2104
- (_a = treeRef.value) == null ? void 0 : _a.setCheckedKeys(newKeys, false);
2105
- }, 0);
2106
- }
2107
- }
2108
- );
2109
- watch(
2110
- () => props.expandedKeys,
2111
- () => {
2112
- setTimeout(() => {
2113
- fixRTLPadding();
2114
- }, 0);
2115
- }
2116
- );
2117
- onMounted(() => {
2118
- setTimeout(() => {
2119
- fixRTLPadding();
2120
- setupRTLObserver();
2121
- }, 0);
2122
- });
2123
- onUnmounted(() => {
2124
- if (mutationObserver) {
2125
- mutationObserver.disconnect();
2126
- mutationObserver = null;
2127
- }
2128
- });
2129
- __expose({
2130
- getCheckedNodes: getCheckedNodesFn,
2131
- getCheckedKeys: getCheckedKeysFn,
2132
- setCheckedNodes: setCheckedNodesFn,
2133
- setCheckedKeys,
2134
- resetChecked,
2135
- getParentSelectedNodes: () => {
2136
- return getParentSelectedNodes(localOptions.value);
2137
- }
2138
- });
2139
- return (_ctx, _cache) => {
2140
- const _component_VcInput = resolveComponent("VcInput");
2141
- return openBlock(), createElementBlock("div", {
2142
- ref_key: "treeContainerRef",
2143
- ref: treeContainerRef,
2144
- class: "vc-tree"
2145
- }, [
2146
- filterable.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
2147
- createVNode(_component_VcInput, {
2148
- modelValue: filterValue.value,
2149
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterValue.value = $event),
2150
- placeholder: _ctx.filterPlaceholder,
2151
- disabled: _ctx.loading || !_ctx.options.length,
2152
- color: _ctx.color,
2153
- "prefix-icon": _ctx.filterPrefixIcon,
2154
- "prefix-icon-color": _ctx.filterPrefixIconColor,
2155
- clearable: "",
2156
- class: "vc-tree__input",
2157
- "max-width": "100%"
2158
- }, null, 8, ["modelValue", "placeholder", "disabled", "color", "prefix-icon", "prefix-icon-color"])
2159
- ])) : createCommentVNode("", true),
2160
- _ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_2, [
2161
- renderSlot(_ctx.$slots, "default")
2162
- ])) : createCommentVNode("", true),
2163
- createElementVNode("div", {
2164
- style: normalizeStyle({ maxHeight: maxHeightWrapper.value }),
2165
- class: "vc-tree__container"
2166
- }, [
2167
- createVNode(unref(ElTree), {
2168
- ref_key: "treeRef",
2169
- ref: treeRef,
2170
- data: localOptions.value,
2171
- "empty-text": _ctx.emptyText,
2172
- "show-checkbox": _ctx.selectable,
2173
- "default-expand-all": _ctx.defaultExpandAll,
2174
- "default-expanded-keys": _ctx.expandedKeys,
2175
- "default-checked-keys": _ctx.defaultCheckedKeys,
2176
- "filter-node-method": filterNodeFn,
2177
- props: elTreeProps.value,
2178
- "node-key": String(props.nodeKey),
2179
- "auto-expand-parent": "",
2180
- onCheck: handleCheck
2181
- }, {
2182
- default: withCtx(({ node, data }) => [
2183
- _ctx.$slots["node-label"] ? renderSlot(_ctx.$slots, "node-label", {
2184
- key: 0,
2185
- node,
2186
- data
2187
- }) : (openBlock(), createElementBlock("div", {
2188
- key: 1,
2189
- class: normalizeClass([props.config.nodeClassName ? data[props.config.nodeClassName] : "", "vc-tree-node-item"])
2190
- }, [
2191
- data[props.config.iconKey] ? (openBlock(), createElementBlock("span", {
2192
- key: 0,
2193
- class: normalizeClass([[
2194
- data[props.config.iconKey],
2195
- colorClass.value
2196
- ], "vc-tree-node-icon icon-lg"])
2197
- }, null, 2)) : createCommentVNode("", true),
2198
- createElementVNode("span", {
2199
- class: normalizeClass([props.config.nodeLabelClassName ? data[props.config.nodeLabelClassName] : "", "vc-tree-node-label"])
2200
- }, toDisplayString(data[props.config.labelKey]), 3)
2201
- ], 2))
2202
- ]),
2203
- _: 3
2204
- }, 8, ["data", "empty-text", "show-checkbox", "default-expand-all", "default-expanded-keys", "default-checked-keys", "props", "node-key"])
2205
- ], 4),
2206
- createVNode(VcLoading, {
2207
- active: _ctx.loading,
2208
- loader: "lds-spinner",
2209
- color: "primary",
2210
- size: "30",
2211
- class: "z-1 rounded"
2212
- }, null, 8, ["active"])
2213
- ], 512);
2214
- };
2215
- }
2216
- });
2217
- export {
2218
- _sfc_main as _
2219
- };