bkui-vue 0.0.1-beta.14 → 0.0.1-beta.140

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 (528) hide show
  1. package/README.md +31 -19
  2. package/dist/index.cjs.js +171 -0
  3. package/dist/index.esm.js +31770 -0
  4. package/dist/index.umd.js +171 -0
  5. package/dist/style.css +1 -4190
  6. package/dist/style.variable.css +1 -0
  7. package/lib/affix/affix.css +3 -0
  8. package/lib/affix/affix.d.ts +47 -0
  9. package/lib/affix/affix.less +5 -0
  10. package/lib/affix/affix.variable.css +116 -0
  11. package/lib/affix/index.d.ts +143 -0
  12. package/lib/affix/index.js +1 -0
  13. package/lib/alert/alert.css +5 -3
  14. package/lib/alert/alert.d.ts +24 -15
  15. package/lib/alert/alert.less +7 -3
  16. package/lib/alert/alert.variable.css +35 -6
  17. package/lib/alert/index.d.ts +96 -60
  18. package/lib/alert/index.js +1 -1
  19. package/lib/animate-number/animate-number.d.ts +12 -7
  20. package/lib/animate-number/index.d.ts +48 -28
  21. package/lib/animate-number/index.js +1 -1
  22. package/lib/backtop/backtop.d.ts +28 -14
  23. package/lib/backtop/backtop.variable.css +30 -3
  24. package/lib/backtop/index.d.ts +111 -55
  25. package/lib/backtop/index.js +1 -1
  26. package/lib/badge/badge.css +5 -5
  27. package/lib/badge/badge.d.ts +64 -22
  28. package/lib/badge/badge.less +5 -6
  29. package/lib/badge/badge.variable.css +35 -8
  30. package/lib/badge/index.d.ts +202 -84
  31. package/lib/badge/index.js +1 -1
  32. package/lib/breadcrumb/breadcrumb-item.d.ts +13 -9
  33. package/lib/breadcrumb/breadcrumb.css +61 -1
  34. package/lib/breadcrumb/breadcrumb.d.ts +37 -9
  35. package/lib/breadcrumb/breadcrumb.less +13 -2
  36. package/lib/breadcrumb/breadcrumb.variable.css +91 -4
  37. package/lib/breadcrumb/index.d.ts +117 -45
  38. package/lib/breadcrumb/index.js +1 -1
  39. package/lib/button/button-group.d.ts +3 -5
  40. package/lib/button/button.css +92 -44
  41. package/lib/button/button.d.ts +76 -26
  42. package/lib/button/button.less +88 -46
  43. package/lib/button/button.variable.css +122 -47
  44. package/lib/button/index.d.ts +191 -102
  45. package/lib/button/index.js +1 -1
  46. package/lib/card/card.css +96 -1
  47. package/lib/card/card.d.ts +74 -18
  48. package/lib/card/card.less +50 -2
  49. package/lib/card/card.variable.css +126 -4
  50. package/lib/card/index.d.ts +225 -69
  51. package/lib/card/index.js +1 -1
  52. package/lib/cascader/cascader-panel.d.ts +48 -0
  53. package/lib/cascader/cascader.css +130 -0
  54. package/lib/cascader/cascader.d.ts +274 -0
  55. package/lib/cascader/cascader.less +146 -0
  56. package/lib/cascader/cascader.variable.css +243 -0
  57. package/lib/cascader/index.d.ts +733 -0
  58. package/lib/cascader/index.js +1 -0
  59. package/lib/cascader/interface.d.ts +44 -0
  60. package/lib/cascader/node.d.ts +24 -0
  61. package/lib/cascader/store.d.ts +15 -0
  62. package/lib/checkbox/checkbox-group.d.ts +13 -9
  63. package/lib/checkbox/checkbox.css +33 -6
  64. package/lib/checkbox/checkbox.d.ts +43 -32
  65. package/lib/checkbox/checkbox.less +44 -6
  66. package/lib/checkbox/checkbox.variable.css +63 -9
  67. package/lib/checkbox/common.d.ts +3 -3
  68. package/lib/checkbox/index.d.ts +150 -104
  69. package/lib/checkbox/index.js +1 -1
  70. package/lib/checkbox/type.d.ts +3 -7
  71. package/lib/code-diff/code-diff.css +186 -0
  72. package/lib/code-diff/code-diff.d.ts +80 -0
  73. package/lib/code-diff/code-diff.less +238 -0
  74. package/lib/code-diff/code-diff.variable.css +299 -0
  75. package/lib/code-diff/index.d.ts +154 -0
  76. package/lib/code-diff/index.js +1 -0
  77. package/lib/collapse/collapse.css +17 -1
  78. package/lib/collapse/collapse.d.ts +51 -22
  79. package/lib/collapse/collapse.less +24 -2
  80. package/lib/collapse/collapse.variable.css +130 -1
  81. package/lib/collapse/index.d.ts +127 -75
  82. package/lib/collapse/index.js +1 -1
  83. package/lib/collapse/utils.d.ts +11 -0
  84. package/lib/components.d.ts +26 -5
  85. package/lib/components.js +1 -0
  86. package/lib/container/col.d.ts +51 -0
  87. package/lib/container/container.css +91 -0
  88. package/lib/container/container.d.ts +83 -0
  89. package/lib/container/container.less +20 -0
  90. package/lib/container/container.variable.css +204 -0
  91. package/lib/container/index.d.ts +223 -0
  92. package/lib/container/index.js +1 -0
  93. package/lib/container/row.d.ts +4 -0
  94. package/lib/date-picker/date-picker.css +3 -2
  95. package/lib/date-picker/date-picker.d.ts +92 -137
  96. package/lib/date-picker/date-picker.less +5 -2
  97. package/lib/date-picker/date-picker.variable.css +33 -5
  98. package/lib/date-picker/index.d.ts +504 -276
  99. package/lib/date-picker/index.js +1 -1
  100. package/lib/date-picker/interface.d.ts +1 -1
  101. package/lib/date-picker/props.d.ts +118 -0
  102. package/lib/date-picker/utils.d.ts +1 -1
  103. package/lib/dialog/dialog.css +76 -20
  104. package/lib/dialog/dialog.d.ts +285 -52
  105. package/lib/dialog/dialog.less +54 -21
  106. package/lib/dialog/dialog.variable.css +76 -20
  107. package/lib/dialog/index.d.ts +665 -115
  108. package/lib/dialog/index.js +1 -1
  109. package/lib/directives/clickoutside.d.ts +3 -23
  110. package/lib/directives/index.js +2 -15
  111. package/lib/directives/index.js.LICENSE.txt +14 -0
  112. package/lib/directives/tooltips.d.ts +1 -1
  113. package/lib/dist.index.js +1 -0
  114. package/lib/divider/divider.d.ts +21 -13
  115. package/lib/divider/divider.variable.css +30 -3
  116. package/lib/divider/index.d.ts +84 -52
  117. package/lib/divider/index.js +1 -1
  118. package/lib/divider/props.d.ts +21 -0
  119. package/lib/dropdown/dropdown-item.d.ts +6 -5
  120. package/lib/dropdown/dropdown-menu.d.ts +6 -5
  121. package/lib/dropdown/dropdown.css +4 -0
  122. package/lib/dropdown/dropdown.d.ts +28 -14
  123. package/lib/dropdown/dropdown.less +5 -0
  124. package/lib/dropdown/dropdown.variable.css +34 -3
  125. package/lib/dropdown/index.d.ts +109 -69
  126. package/lib/dropdown/index.js +1 -1
  127. package/lib/exception/exception.d.ts +11 -9
  128. package/lib/exception/exception.variable.css +30 -3
  129. package/lib/exception/index.d.ts +44 -36
  130. package/lib/exception/index.js +1 -1
  131. package/lib/fixed-navbar/fixed-navbar.d.ts +29 -9
  132. package/lib/fixed-navbar/fixed-navbar.variable.css +30 -3
  133. package/lib/fixed-navbar/index.d.ts +96 -37
  134. package/lib/fixed-navbar/index.js +1 -1
  135. package/lib/form/compose-form-item.d.ts +16 -0
  136. package/lib/form/form-item.d.ts +61 -45
  137. package/lib/form/form.css +96 -10
  138. package/lib/form/form.d.ts +45 -40
  139. package/lib/form/form.less +136 -34
  140. package/lib/form/form.variable.css +209 -10
  141. package/lib/form/index.d.ts +303 -3
  142. package/lib/form/index.js +1 -1
  143. package/lib/form/type.d.ts +8 -6
  144. package/lib/form/validator.d.ts +1 -0
  145. package/lib/icon/angle-double-down-line.d.ts +4 -0
  146. package/lib/icon/angle-double-down-line.js +1 -0
  147. package/lib/icon/angle-double-left-line.d.ts +4 -0
  148. package/lib/icon/angle-double-left-line.js +1 -0
  149. package/lib/icon/angle-double-left.js +1 -0
  150. package/lib/icon/angle-double-right-line.d.ts +4 -0
  151. package/lib/icon/angle-double-right-line.js +1 -0
  152. package/lib/icon/angle-double-right.js +1 -0
  153. package/lib/icon/angle-double-up-line.d.ts +4 -0
  154. package/lib/icon/angle-double-up-line.js +1 -0
  155. package/lib/icon/angle-down-fill.d.ts +4 -0
  156. package/lib/icon/angle-down-fill.js +1 -0
  157. package/lib/icon/angle-down-line.js +1 -0
  158. package/lib/icon/angle-down.js +1 -0
  159. package/lib/icon/angle-left.js +1 -0
  160. package/lib/icon/angle-right.js +1 -0
  161. package/lib/icon/angle-up-fill.d.ts +4 -0
  162. package/lib/icon/angle-up-fill.js +1 -0
  163. package/lib/icon/angle-up.js +1 -0
  164. package/lib/icon/archive-fill.d.ts +4 -0
  165. package/lib/icon/archive-fill.js +1 -0
  166. package/lib/icon/arrows-left.d.ts +4 -0
  167. package/lib/icon/arrows-left.js +1 -0
  168. package/lib/icon/arrows-right.d.ts +4 -0
  169. package/lib/icon/arrows-right.js +1 -0
  170. package/lib/icon/audio-fill.d.ts +4 -0
  171. package/lib/icon/audio-fill.js +1 -0
  172. package/lib/icon/bk.d.ts +4 -0
  173. package/lib/icon/bk.js +1 -0
  174. package/lib/icon/circle.js +1 -0
  175. package/lib/icon/close-line.d.ts +4 -0
  176. package/lib/icon/close-line.js +1 -0
  177. package/lib/icon/close.js +1 -0
  178. package/lib/icon/code.js +1 -0
  179. package/lib/icon/cog-shape.js +1 -0
  180. package/lib/icon/collapse-left.js +1 -0
  181. package/lib/icon/copy.js +1 -0
  182. package/lib/icon/data-shape.d.ts +4 -0
  183. package/lib/icon/data-shape.js +1 -0
  184. package/lib/icon/del.d.ts +4 -0
  185. package/lib/icon/del.js +1 -0
  186. package/lib/icon/doc-fill.d.ts +4 -0
  187. package/lib/icon/doc-fill.js +1 -0
  188. package/lib/icon/done.js +1 -0
  189. package/lib/icon/down-shape.js +1 -0
  190. package/lib/icon/down-small.js +1 -0
  191. package/lib/icon/edit-line.d.ts +4 -0
  192. package/lib/icon/edit-line.js +1 -0
  193. package/lib/icon/ellipsis.d.ts +4 -0
  194. package/lib/icon/ellipsis.js +1 -0
  195. package/lib/icon/error.js +1 -0
  196. package/lib/icon/excel-fill.d.ts +4 -0
  197. package/lib/icon/excel-fill.js +1 -0
  198. package/lib/icon/exclamation-circle-shape.d.ts +4 -0
  199. package/lib/icon/exclamation-circle-shape.js +1 -0
  200. package/lib/icon/eye.js +1 -0
  201. package/lib/icon/folder-open.js +1 -0
  202. package/lib/icon/folder-shape-open.js +1 -0
  203. package/lib/icon/folder-shape.js +1 -0
  204. package/lib/icon/funnel.d.ts +4 -0
  205. package/lib/icon/funnel.js +1 -0
  206. package/lib/icon/help-document-fill.js +1 -0
  207. package/lib/icon/help-fill.js +1 -0
  208. package/lib/icon/help.js +1 -0
  209. package/lib/icon/image-fill.d.ts +4 -0
  210. package/lib/icon/image-fill.js +1 -0
  211. package/lib/icon/index.d.ts +34 -3
  212. package/lib/icon/index.js +1 -15
  213. package/lib/icon/info-line.js +1 -0
  214. package/lib/icon/info.js +1 -0
  215. package/lib/icon/left-shape.d.ts +4 -0
  216. package/lib/icon/left-shape.js +1 -0
  217. package/lib/icon/pdf-fill.d.ts +4 -0
  218. package/lib/icon/pdf-fill.js +1 -0
  219. package/lib/icon/play-shape.js +1 -0
  220. package/lib/icon/plus.js +1 -0
  221. package/lib/icon/ppt-fill.d.ts +4 -0
  222. package/lib/icon/ppt-fill.js +1 -0
  223. package/lib/icon/qq.d.ts +4 -0
  224. package/lib/icon/qq.js +1 -0
  225. package/lib/icon/right-shape.js +1 -0
  226. package/lib/icon/search.js +1 -0
  227. package/lib/icon/share.js +1 -0
  228. package/lib/icon/spinner.d.ts +4 -0
  229. package/lib/icon/spinner.js +1 -0
  230. package/lib/icon/success.js +1 -0
  231. package/lib/icon/switcher-loading.js +1 -0
  232. package/lib/icon/text-file.js +1 -0
  233. package/lib/icon/text-fill.d.ts +4 -0
  234. package/lib/icon/text-fill.js +1 -0
  235. package/lib/icon/tree-application-shape.js +1 -0
  236. package/lib/icon/unvisible.js +1 -0
  237. package/lib/icon/up-shape.d.ts +4 -0
  238. package/lib/icon/up-shape.js +1 -0
  239. package/lib/icon/upload.d.ts +4 -0
  240. package/lib/icon/upload.js +1 -0
  241. package/lib/icon/video-fill.d.ts +4 -0
  242. package/lib/icon/video-fill.js +1 -0
  243. package/lib/icon/warn.js +1 -0
  244. package/lib/icon/weixin.d.ts +4 -0
  245. package/lib/icon/weixin.js +1 -0
  246. package/lib/index.d.ts +0 -1
  247. package/lib/index.js +1 -0
  248. package/lib/input/index.d.ts +406 -199
  249. package/lib/input/index.js +1 -15
  250. package/lib/input/input.css +232 -16
  251. package/lib/input/input.d.ts +171 -51
  252. package/lib/input/input.less +182 -19
  253. package/lib/input/input.variable.css +259 -15
  254. package/lib/link/index.d.ts +102 -54
  255. package/lib/link/index.js +1 -1
  256. package/lib/link/link.d.ts +25 -13
  257. package/lib/link/link.variable.css +30 -3
  258. package/lib/loading/index.d.ts +187 -71
  259. package/lib/loading/index.js +1 -1
  260. package/lib/loading/loading.css +177 -98
  261. package/lib/loading/loading.d.ts +109 -25
  262. package/lib/loading/loading.less +84 -73
  263. package/lib/loading/loading.variable.css +207 -101
  264. package/lib/menu/index.d.ts +82 -71
  265. package/lib/menu/index.js +1 -1
  266. package/lib/menu/menu-group.d.ts +6 -5
  267. package/lib/menu/menu-item.d.ts +6 -5
  268. package/lib/menu/menu.css +51 -0
  269. package/lib/menu/menu.d.ts +16 -21
  270. package/lib/menu/menu.variable.css +81 -3
  271. package/lib/menu/submenu.css +3 -0
  272. package/lib/menu/submenu.d.ts +6 -5
  273. package/lib/menu/submenu.less +1 -1
  274. package/lib/menu/submenu.variable.css +33 -3
  275. package/lib/menu/utils.d.ts +1 -1
  276. package/lib/message/index.js +1 -1
  277. package/lib/message/message.css +24 -3
  278. package/lib/message/message.less +27 -2
  279. package/lib/message/message.variable.css +54 -6
  280. package/lib/message/messageConstructor.d.ts +69 -21
  281. package/lib/modal/index.d.ts +517 -68
  282. package/lib/modal/index.js +1 -1
  283. package/lib/modal/modal.css +25 -1
  284. package/lib/modal/modal.d.ts +191 -24
  285. package/lib/modal/modal.less +33 -1
  286. package/lib/modal/modal.variable.css +25 -1
  287. package/lib/modal/props.mixin.d.ts +77 -10
  288. package/lib/navigation/index.d.ts +310 -1
  289. package/lib/navigation/index.js +1 -1
  290. package/lib/navigation/navigation-title.d.ts +10 -7
  291. package/lib/navigation/navigation.css +1 -1
  292. package/lib/navigation/navigation.d.ts +50 -24
  293. package/lib/navigation/navigation.less +1 -1
  294. package/lib/navigation/navigation.variable.css +31 -4
  295. package/lib/notify/index.js +1 -1
  296. package/lib/notify/notify.css +24 -4
  297. package/lib/notify/notify.less +27 -4
  298. package/lib/notify/notify.variable.css +54 -7
  299. package/lib/notify/notifyConstructor.d.ts +84 -24
  300. package/lib/pagination/index.d.ts +395 -0
  301. package/lib/pagination/index.js +1 -0
  302. package/lib/pagination/pagination.css +179 -0
  303. package/lib/pagination/pagination.d.ts +220 -0
  304. package/lib/pagination/pagination.less +201 -0
  305. package/lib/pagination/pagination.variable.css +292 -0
  306. package/lib/pagination/type.d.ts +6 -0
  307. package/lib/pagination/use-limit.d.ts +8 -0
  308. package/lib/pagination/use-list.d.ts +8 -0
  309. package/lib/pagination/use-small-list.d.ts +5 -0
  310. package/lib/pagination/use-total.d.ts +5 -0
  311. package/lib/popover/index.d.ts +322 -137
  312. package/lib/popover/index.js +1 -1
  313. package/lib/popover/popover.css +26 -13
  314. package/lib/popover/popover.d.ts +122 -45
  315. package/lib/popover/popover.less +59 -45
  316. package/lib/popover/popover.variable.css +56 -16
  317. package/lib/popover/props.d.ts +104 -0
  318. package/lib/popover2/arrow.d.ts +2 -0
  319. package/lib/popover2/const.d.ts +10 -0
  320. package/lib/popover2/content.d.ts +24 -0
  321. package/lib/popover2/index.d.ts +495 -0
  322. package/lib/popover2/index.js +1 -0
  323. package/lib/popover2/popover2.css +25 -0
  324. package/lib/popover2/popover2.d.ts +209 -0
  325. package/lib/popover2/popover2.less +35 -0
  326. package/lib/popover2/popover2.variable.css +138 -0
  327. package/lib/popover2/props.d.ts +108 -0
  328. package/lib/popover2/reference.d.ts +2 -0
  329. package/lib/popover2/root.d.ts +16 -0
  330. package/lib/popover2/use-floating.d.ts +20 -0
  331. package/lib/popover2/use-platform.d.ts +30 -0
  332. package/lib/popover2/use-popper-id.d.ts +7 -0
  333. package/lib/preset.js +1 -0
  334. package/lib/process/index.d.ts +123 -63
  335. package/lib/process/index.js +1 -15
  336. package/lib/process/process.css +2 -3
  337. package/lib/process/process.d.ts +31 -16
  338. package/lib/process/process.less +2 -3
  339. package/lib/process/process.variable.css +32 -6
  340. package/lib/progress/index.d.ts +305 -135
  341. package/lib/progress/index.js +1 -1
  342. package/lib/progress/progress.css +51 -3
  343. package/lib/progress/progress.d.ts +89 -36
  344. package/lib/progress/progress.less +0 -4
  345. package/lib/progress/progress.variable.css +81 -6
  346. package/lib/radio/common.d.ts +5 -5
  347. package/lib/radio/index.d.ts +145 -96
  348. package/lib/radio/index.js +1 -1
  349. package/lib/radio/radio-button.d.ts +30 -23
  350. package/lib/radio/radio-group.d.ts +11 -10
  351. package/lib/radio/radio.css +62 -57
  352. package/lib/radio/radio.d.ts +27 -17
  353. package/lib/radio/radio.less +181 -172
  354. package/lib/radio/radio.variable.css +94 -62
  355. package/lib/radio/type.d.ts +10 -5
  356. package/lib/rate/index.d.ts +52 -40
  357. package/lib/rate/index.js +1 -1
  358. package/lib/rate/rate.d.ts +13 -10
  359. package/lib/rate/star.d.ts +33 -16
  360. package/lib/resize-layout/index.d.ts +336 -0
  361. package/lib/resize-layout/index.js +1 -0
  362. package/lib/resize-layout/resize-layout.css +189 -0
  363. package/lib/resize-layout/resize-layout.d.ts +127 -0
  364. package/lib/resize-layout/resize-layout.less +233 -0
  365. package/lib/resize-layout/resize-layout.variable.css +302 -0
  366. package/lib/select/common.d.ts +20 -22
  367. package/lib/select/index.d.ts +1061 -705
  368. package/lib/select/index.js +1 -15
  369. package/lib/select/option.d.ts +23 -19
  370. package/lib/select/optionGroup.d.ts +36 -97
  371. package/lib/select/select.css +238 -70
  372. package/lib/select/select.d.ts +376 -192
  373. package/lib/select/select.less +284 -130
  374. package/lib/select/select.variable.css +268 -73
  375. package/lib/select/selectTagInput.d.ts +72 -0
  376. package/lib/select/type.d.ts +38 -0
  377. package/lib/shared/{bk-helper-core.d.ts → helper.d.ts} +6 -1
  378. package/lib/shared/index.d.ts +26 -4
  379. package/lib/shared/index.js +1 -1
  380. package/lib/shared/{bk-mask-manager.d.ts → mask-manager.d.ts} +33 -3
  381. package/lib/shared/{bk-pop-manager.d.ts → pop-manager.d.ts} +10 -2
  382. package/lib/shared/{bk-popover.d.ts → popover.d.ts} +50 -5
  383. package/lib/shared/token.d.ts +4 -0
  384. package/lib/shared/utils.d.ts +18 -0
  385. package/lib/shared/vue-types.d.ts +11 -7
  386. package/lib/sideslider/index.d.ts +432 -80
  387. package/lib/sideslider/index.js +1 -1
  388. package/lib/sideslider/sideslider.css +54 -10
  389. package/lib/sideslider/sideslider.d.ts +185 -30
  390. package/lib/sideslider/sideslider.less +71 -13
  391. package/lib/sideslider/sideslider.variable.css +84 -13
  392. package/lib/slider/index.d.ts +414 -1
  393. package/lib/slider/index.js +1 -15
  394. package/lib/slider/slider-button.d.ts +15 -7
  395. package/lib/slider/slider.d.ts +84 -42
  396. package/lib/slider/slider.variable.css +30 -3
  397. package/lib/steps/index.d.ts +160 -108
  398. package/lib/steps/index.js +1 -15
  399. package/lib/steps/steps.css +17 -3
  400. package/lib/steps/steps.d.ts +40 -27
  401. package/lib/steps/steps.less +27 -3
  402. package/lib/steps/steps.variable.css +47 -6
  403. package/lib/styles/index.d.ts +13 -0
  404. package/lib/styles/mixins/clearfix.css +8 -0
  405. package/lib/styles/mixins/clearfix.less +10 -0
  406. package/lib/styles/mixins/clearfix.variable.css +8 -0
  407. package/lib/styles/mixins/mixins.css +51 -0
  408. package/lib/styles/mixins/mixins.less +2 -0
  409. package/lib/styles/mixins/mixins.variable.css +51 -0
  410. package/lib/styles/mixins/scroll.css +17 -0
  411. package/lib/styles/mixins/scroll.less +22 -0
  412. package/lib/styles/mixins/scroll.variable.css +130 -0
  413. package/lib/styles/themes/themes.less +40 -3
  414. package/lib/swiper/index.d.ts +181 -0
  415. package/lib/swiper/index.js +1 -0
  416. package/lib/swiper/swiper.css +91 -0
  417. package/lib/swiper/swiper.d.ts +65 -0
  418. package/lib/swiper/swiper.less +107 -0
  419. package/lib/swiper/swiper.variable.css +91 -0
  420. package/lib/switcher/index.d.ts +201 -137
  421. package/lib/switcher/index.js +1 -1
  422. package/lib/switcher/switcher.css +200 -135
  423. package/lib/switcher/switcher.d.ts +52 -36
  424. package/lib/switcher/switcher.less +190 -155
  425. package/lib/switcher/switcher.variable.css +230 -138
  426. package/lib/tab/index.d.ts +306 -282
  427. package/lib/tab/index.js +1 -1
  428. package/lib/tab/props.d.ts +194 -0
  429. package/lib/tab/tab-nav.d.ts +102 -87
  430. package/lib/tab/tab-panel.d.ts +53 -26
  431. package/lib/tab/tab.css +25 -1
  432. package/lib/tab/tab.d.ts +59 -51
  433. package/lib/tab/tab.less +31 -19
  434. package/lib/tab/tab.variable.css +55 -4
  435. package/lib/table/const.d.ts +67 -0
  436. package/lib/table/index.d.ts +498 -70
  437. package/lib/table/index.js +1 -1
  438. package/lib/table/plugins/head-filter.css +68 -0
  439. package/lib/table/plugins/head-filter.less +88 -0
  440. package/lib/table/plugins/head-filter.variable.css +181 -0
  441. package/lib/table/plugins/head-sort.css +22 -0
  442. package/lib/table/plugins/head-sort.less +28 -0
  443. package/lib/table/plugins/head-sort.variable.css +135 -0
  444. package/lib/table/plugins/settings.css +129 -0
  445. package/lib/table/plugins/settings.less +157 -0
  446. package/lib/table/plugins/settings.variable.css +242 -0
  447. package/lib/table/props.d.ts +210 -2
  448. package/lib/table/render.d.ts +76 -5
  449. package/lib/table/table.css +1094 -15
  450. package/lib/table/table.d.ts +221 -14
  451. package/lib/table/table.less +253 -24
  452. package/lib/table/table.variable.css +1125 -19
  453. package/lib/table/use-common.d.ts +72 -0
  454. package/lib/table/utils.d.ts +84 -2
  455. package/lib/tag/index.d.ts +165 -274
  456. package/lib/tag/index.js +1 -1
  457. package/lib/tag/tag.css +97 -0
  458. package/lib/tag/tag.d.ts +83 -53
  459. package/lib/tag/tag.less +110 -2
  460. package/lib/tag/tag.variable.css +127 -3
  461. package/lib/tag-input/common.d.ts +24 -0
  462. package/lib/tag-input/index.d.ts +894 -0
  463. package/lib/tag-input/index.js +1 -0
  464. package/lib/tag-input/list-tag-render.d.ts +47 -0
  465. package/lib/tag-input/tag-input.css +209 -0
  466. package/lib/tag-input/tag-input.d.ts +374 -0
  467. package/lib/tag-input/tag-input.less +251 -0
  468. package/lib/tag-input/tag-input.variable.css +322 -0
  469. package/lib/tag-input/tag-props.d.ts +131 -0
  470. package/lib/tag-input/tag-render.d.ts +38 -0
  471. package/lib/timeline/index.d.ts +129 -0
  472. package/lib/timeline/index.js +1 -0
  473. package/lib/timeline/timeline.css +235 -0
  474. package/lib/timeline/timeline.d.ts +81 -0
  475. package/lib/timeline/timeline.less +240 -0
  476. package/lib/timeline/timeline.variable.css +348 -0
  477. package/lib/transfer/const.d.ts +5 -0
  478. package/lib/transfer/index.d.ts +365 -0
  479. package/lib/transfer/index.js +1 -0
  480. package/lib/transfer/props.d.ts +54 -0
  481. package/lib/transfer/transfer.css +139 -0
  482. package/lib/transfer/transfer.d.ts +160 -0
  483. package/lib/transfer/transfer.less +144 -0
  484. package/lib/transfer/transfer.variable.css +252 -0
  485. package/lib/tree/constant.d.ts +45 -0
  486. package/lib/tree/index.d.ts +469 -94
  487. package/lib/tree/index.js +1 -1
  488. package/lib/tree/props.d.ts +184 -0
  489. package/lib/tree/tree.css +176 -15
  490. package/lib/tree/tree.d.ts +201 -31
  491. package/lib/tree/tree.less +75 -38
  492. package/lib/tree/tree.variable.css +289 -15
  493. package/lib/tree/use-empty.d.ts +6 -0
  494. package/lib/tree/use-node-action.d.ts +12 -0
  495. package/lib/tree/use-node-async.d.ts +5 -0
  496. package/lib/tree/use-node-attribute.d.ts +33 -0
  497. package/lib/tree/use-node-drag.d.ts +3 -0
  498. package/lib/tree/use-search.d.ts +11 -0
  499. package/lib/tree/use-tree-init.d.ts +15 -0
  500. package/lib/tree/util.d.ts +34 -57
  501. package/lib/upload/index.d.ts +580 -0
  502. package/lib/upload/index.js +1 -0
  503. package/lib/upload/props.d.ts +113 -0
  504. package/lib/upload/upload-list.d.ts +46 -0
  505. package/lib/upload/upload-trigger.d.ts +54 -0
  506. package/lib/upload/upload.css +417 -0
  507. package/lib/upload/upload.d.ts +252 -0
  508. package/lib/upload/upload.less +455 -0
  509. package/lib/upload/upload.type.d.ts +78 -0
  510. package/lib/upload/upload.variable.css +530 -0
  511. package/lib/upload/use-ajax-upload.d.ts +3 -0
  512. package/lib/upload/use-file-handler.d.ts +44 -0
  513. package/lib/virtual-render/index.d.ts +579 -0
  514. package/lib/virtual-render/index.js +1 -0
  515. package/lib/virtual-render/props.d.ts +167 -0
  516. package/lib/virtual-render/use-tag-render.d.ts +7 -0
  517. package/lib/virtual-render/v-virtual-render.d.ts +6 -0
  518. package/lib/virtual-render/virtual-render.css +33 -0
  519. package/lib/virtual-render/virtual-render.d.ts +255 -0
  520. package/lib/virtual-render/virtual-render.less +22 -0
  521. package/lib/virtual-render/virtual-render.variable.css +146 -0
  522. package/lib/volar.components.d.ts +100 -0
  523. package/package.json +107 -86
  524. package/dist/bkui-vue.cjs.js +0 -10327
  525. package/dist/bkui-vue.esm.js +0 -10283
  526. package/dist/bkui-vue.umd.js +0 -10330
  527. package/lib/form/common.d.ts +0 -3
  528. package/lib/styles/index.js +0 -1
package/lib/tree/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("crypto"),require("@bkui-vue/icon/")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","crypto","@bkui-vue/icon/"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e.require$$0,e._)}(this,(function(e,t,n,o,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=i(o);function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u={exports:{}};!function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0}(u);var s=a(u.exports),c={exports:{}};!function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}(c);var p=a(c.exports),d={exports:{}},f={exports:{}},v={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o},e.exports.default=e.exports,e.exports.__esModule=!0}(v),function(e){var t=v.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.default=e.exports,e.exports.__esModule=!0}(f);var h={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0}(h);var _={exports:{}};!function(e){var t=v.exports;e.exports=function(e,n){if(e){if("string"==typeof e)return t(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}(_);var y={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}(y),function(e){var t=f.exports,n=h.exports,o=_.exports,r=y.exports;e.exports=function(e){return t(e)||n(e)||o(e)||r()},e.exports.default=e.exports,e.exports.__esModule=!0}(d);for(var x=a(d.exports),b=l.default,g=function(){return b.randomBytes(16)},m=[],O=0;O<256;++O)m[O]=(O+256).toString(16).substr(1);var j,N,T=function(e,t){var n=t||0,o=m;return[o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],"-",o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]],o[e[n++]]].join("")},S=g,w=T,P=0,C=0;var k=function(e,t,n){var o=t&&n||0,r=t||[],i=(e=e||{}).node||j,l=void 0!==e.clockseq?e.clockseq:N;if(null==i||null==l){var a=S();null==i&&(i=j=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==l&&(l=N=16383&(a[6]<<8|a[7]))}var u=void 0!==e.msecs?e.msecs:(new Date).getTime(),s=void 0!==e.nsecs?e.nsecs:C+1,c=u-P+(s-C)/1e4;if(c<0&&void 0===e.clockseq&&(l=l+1&16383),(c<0||u>P)&&void 0===e.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");P=u,C=s,N=l;var p=(1e4*(268435455&(u+=122192928e5))+s)%4294967296;r[o++]=p>>>24&255,r[o++]=p>>>16&255,r[o++]=p>>>8&255,r[o++]=255&p;var d=u/4294967296*1e4&268435455;r[o++]=d>>>8&255,r[o++]=255&d,r[o++]=d>>>24&15|16,r[o++]=d>>>16&255,r[o++]=l>>>8|128,r[o++]=255&l;for(var f=0;f<6;++f)r[o+f]=i[f];return t||w(r)},L=g,M=T;var A=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var r=(e=e||{}).random||(e.rng||L)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t)for(var i=0;i<16;++i)t[o+i]=r[i];return t||M(r)},V=k,I=A,q=I;q.v1=V,q.v4=I;var R=q,D=void 0,$="1px dashed #c3cdd7",E={data:n.PropTypes.arrayOf(n.PropTypes.any).def([]),label:n.PropTypes.oneOfType([n.PropTypes.func.def(void 0),n.PropTypes.string.def("label")]),children:n.PropTypes.string.def("children"),indent:n.PropTypes.number.def(18),lineHeight:n.PropTypes.number.def(32),levelLine:n.PropTypes.oneOfType([n.PropTypes.bool.def(!1),n.PropTypes.func.def(void 0),n.PropTypes.string.def("1px dashed #c3cdd7")])},F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.data,o=e.children,r=[],i=0,l={};function a(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=0;c<e.length;c++){var d=e[c];if(Array.isArray(d))a(d,t,n,u);else{var f=Object.assign({},d);if("object"===p(f)&&null!==f){var v=R.v4(),h=""!==u?"".concat(u,"-").concat(c):"".concat(c),_=s({__depth:t,__index:c,__uuid:v,__parentId:n,__hasChild:!!(d[o]||[]).length,__path:h,__isRoot:null===n,__order:i},o,null);Object.assign(f,_),Object.assign(l,s({},h,{__isOpen:!1,__showLines:0})),i+=1,r.push(f),Object.prototype.hasOwnProperty.call(d,o)&&a(d[o],t+1,v,h)}}}}return a(t||n),[r,l]},H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],l=e[t];return"boolean"==typeof l?l?o:r:B(n,e,t,i)},B=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=t[n];if("string"==typeof r)return"object"===p(e)&&null!==e?(Object.prototype.hasOwnProperty.call(e,r)||console.error("cannot find node label with key ".concat(r)),e[r]):r;if("function"==typeof r){var i=r.apply(D,[e].concat(x(o)));return"string"==typeof i?i:void console.error("props label with function return value is not string, please check and return string")}},U=function(e,t){return B(e,t,"label")},W=function(e,t){return{"--level-line":H(t,"levelLine",e,$,null,["tree"]),"--lineHeight":"".concat(t.lineHeight,"px"),"--indent":"".concat(t.indent,"px"),padding:0}},z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n[e.__path]||{},r=o.childNodeCount,i=void 0===r?0:r,l=o.isLeaf,a=void 0!==l&&l,u=o.lastNode,s=void 0===u?null:u,c=a?0:(n[s]||{childNodeCount:0}).childNodeCount;return Object.assign({"--depth":e.__depth,paddingLeft:0,"--lines":i-c},"function"==typeof t.levelLine?{"--level-line":H(t,"levelLine",e,$,null,["node"])}:{})},G=function(e,t){return{"is-root":e.__isRoot,"bk-tree-node":!0,"is-open":t[e.__path].__isOpen}},J=t.defineComponent({name:"Tree",props:E,setup:function(e){var n=F(e),o=t.reactive({data:n[0],schema:n[1],levelLineSchema:{}});t.watch((function(){return[e.data]}),(function(t){var n=F(e,t);o.data=n[0],o.schema=n[1],u()}),{deep:!0}),t.watch((function(){return[e.levelLine]}),(function(){u()}));var i=t.computed((function(){return o.data.filter((function(e){return d(e)}))})),l=t.computed((function(){return i.value.map((function(e){return e.__path}))})),a=function(e){return"object"===p(e)?(o.schema[e.__path]||{}).__isOpen:"string"==typeof e&&(o.schema[e]||{}).__isOpen},u=function(){e.levelLine?setTimeout((function(){for(var e=i.value.length,t={},n=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object.prototype.hasOwnProperty.call(t,e)||Object.assign(t,s({},e,Object.assign(Object.assign({childNodeCount:0,isLastNode:!1},null!==n?{lastNode:n}:{}),null!==o?{isLeaf:o}:{})))};e>0;e--){var r=i.value[e-1],a=c(r),u=!l.value.includes("".concat(r.__path,"-0"));n(r.__path,null,u),n(a,r.__path);var p=t[a],d=t[r.__path],f=d.childNodeCount,v=void 0===f?0:f;d.childNodeCount=v+1,d.isLastNode=p.lastNode===r.__path,p.childNodeCount+=d.childNodeCount}o.levelLineSchema=t})):o.levelLineSchema={}},c=function(e){if(e.__isRoot)return null;var t="-".concat(e.__index).length;return String.prototype.substring.call(e.__path,0,e.__path.length-t)},d=function(e){return e.__isRoot||a(e)||a(c(e))};return u(),{renderData:i,flatData:o,hanldeTreeNodeClick:function(e){if(e.__hasChild){var t=!a(e);Object.assign(e,{__isOpen:t}),i.value.filter((function(t){return String.prototype.startsWith.call(t.__path,e.__path)})).forEach((function(e){return Object.assign(o.schema[e.__path],{__isOpen:t})})),u()}},getActionIcon:function(e){return e.__hasChild?a(e)?t.createVNode(r.DownShape,null,null):t.createVNode(r.RightShape,null,null):null},getRootIcon:function(e){return a(e)?t.createVNode(r.FolderShapeOpen,{class:"bk-tree-icon"},null):t.createVNode(r.Folder,{class:"bk-tree-icon"},null)}}},render:function(){var e=this,n=this.$props;return t.createVNode("div",{class:"bk-tree",style:W(null,n)},[this.renderData.map((function(o){return t.createVNode("div",{class:G(o,e.flatData.schema),style:z(o,n,e.flatData.levelLineSchema),onClick:function(){return e.hanldeTreeNodeClick(o)}},[[e.getActionIcon(o),o.__isRoot?e.getRootIcon(o):t.createVNode(r.TextFile,{class:"bk-tree-icon"},null)],t.createVNode("span",null,[U(o,n)])])}))])}}),K=n.withInstall(J);e.default=K,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("../virtual-render"),require("../exception"),require("../checkbox"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../virtual-render","../exception","../checkbox","../icon"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("../virtual-render"),require("../exception"),require("../checkbox"),require("../icon")):n(e["../shared"],e.vue,e["../virtual-render"],e["../exception"],e["../checkbox"],e["../icon"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,n,t,r,o,i)=>(()=>{var a={8022:(e,n,t)=>{var r=t(4481),o=t(6426),i=o;i.v1=r,i.v4=o,e.exports=i},8725:e=>{for(var n=[],t=0;t<256;++t)n[t]=(t+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,o=n;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},9157:e=>{var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=new Array(16);e.exports=function(){for(var e,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}},4481:(e,n,t)=>{var r,o,i=t(9157),a=t(8725),l=0,u=0;e.exports=function(e,n,t){var c=n&&t||0,s=n||[],d=(e=e||{}).node||r,f=void 0!==e.clockseq?e.clockseq:o;if(null==d||null==f){var p=i();null==d&&(d=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==f&&(f=o=16383&(p[6]<<8|p[7]))}var v=void 0!==e.msecs?e.msecs:(new Date).getTime(),y=void 0!==e.nsecs?e.nsecs:u+1,h=v-l+(y-u)/1e4;if(h<0&&void 0===e.clockseq&&(f=f+1&16383),(h<0||v>l)&&void 0===e.nsecs&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=v,u=y,o=f;var N=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;s[c++]=N>>>24&255,s[c++]=N>>>16&255,s[c++]=N>>>8&255,s[c++]=255&N;var _=v/4294967296*1e4&268435455;s[c++]=_>>>8&255,s[c++]=255&_,s[c++]=_>>>24&15|16,s[c++]=_>>>16&255,s[c++]=f>>>8|128,s[c++]=255&f;for(var I=0;I<6;++I)s[c+I]=d[I];return n||a(s)}},6426:(e,n,t)=>{var r=t(9157),o=t(8725);e.exports=function(e,n,t){var i=n&&t||0;"string"==typeof e&&(n="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,n)for(var l=0;l<16;++l)n[i+l]=a[l];return n||o(a)}},5800:e=>{"use strict";e.exports=o},9911:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=i},4212:n=>{"use strict";n.exports=e},3511:e=>{"use strict";e.exports=t},748:e=>{"use strict";e.exports=n}},l={};function u(e){var n=l[e];if(void 0!==n)return n.exports;var t=l[e]={exports:{}};return a[e](t,t.exports,u),t.exports}u.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return u.d(n,{a:n}),n},u.d=(e,n)=>{for(var t in n)u.o(n,t)&&!u.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},u.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";u.r(c),u.d(c,{default:()=>K});var e,n,t,r=u(4212),o=u(748),i=u(3511),a=u.n(i);function l(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}!function(e){e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked"}(t||(t={}));var s,d=function(){return!0},f=(l(e={},t.NODE_CLICK,d),l(e,t.NODE_COLLAPSE,d),l(e,t.NODE_EXPAND,d),l(e,t.NODE_CHECKED,d),e);!function(e){e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__"}(s||(s={}));var p=(l(n={},s.IS_OPEN,"isOpen"),l(n,s.IS_SELECTED,"selected"),l(n,s.IS_MATCH,"isMatch"),l(n,s.HAS_CHILD,"hasChild"),l(n,s.IS_CHECKED,"checked"),l(n,s.IS_ASYNC,"async"),l(n,s.IS_LOADING,"loading"),l(n,s.IS_ROOT,"isRoot"),n),v={data:r.PropTypes.arrayOf(r.PropTypes.any).def([]),label:r.PropTypes.oneOfType([r.PropTypes.func.def(void 0),r.PropTypes.string.def("label")]),nodeKey:r.PropTypes.string.def(void 0),children:r.PropTypes.string.def("children"),indent:r.PropTypes.number.def(18),lineHeight:r.PropTypes.number.def(32),levelLine:r.PropTypes.oneOfType([r.PropTypes.bool.def(!1),r.PropTypes.func.def(void 0),r.PropTypes.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:r.PropTypes.bool.def(!1),prefixIcon:r.PropTypes.oneOfType([r.PropTypes.func.def((function(){})),r.PropTypes.bool.def(!1)]).def(!0),async:r.PropTypes.shape({callback:r.PropTypes.func.def(void 0),cache:r.PropTypes.bool.def(!0),deepAutoOpen:r.PropTypes.commonType(["once","every"],"columnType").def("once")}),offsetLeft:r.PropTypes.number.def(5),search:r.PropTypes.oneOfType([r.PropTypes.shape({value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string,r.PropTypes.bool]).def(""),match:r.PropTypes.oneOfType([r.PropTypes.commonType(["fuzzy","full"],"TreeSearchMatchType"),r.PropTypes.func]),resultType:r.PropTypes.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:r.PropTypes.bool}),r.PropTypes.string,r.PropTypes.number,r.PropTypes.bool]).def(void 0),emptyText:r.PropTypes.string.def("没有数据"),draggable:r.PropTypes.bool.def(!1),dragSort:r.PropTypes.bool.def(!1),selectable:r.PropTypes.bool.def(!0),showCheckbox:r.PropTypes.bool.def(!1),showNodeTypeIcon:r.PropTypes.bool.def(!0),selected:r.PropTypes.oneOfType([r.PropTypes.string,null,r.PropTypes.number,r.PropTypes.object]).def(null),autoCheckChildren:r.PropTypes.bool.def(!0),autoOpenParentNode:r.PropTypes.bool.def(!0)},y=u(9911),h=u.n(y);function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}var _=u(5800),I=u.n(_),S=u(6870);const g=function(e,n){var t=function(n){return e.schema.get(n)},r=function(e,n){var r;return null===(r=t(e[s.UUID]))||void 0===r?void 0:r[n]},o=function(n,r,o){e.schema.set(n[s.UUID],Object.assign(Object.assign({},t(n[s.UUID])),l({},r,o)))},i=function(e){return r(e,s.PATH)},a=function(e){return r(e,s.UUID)},u=function(e){return r(e,s.IS_ROOT)},c=function(e){return r(e,s.IS_OPEN)},d=function(e){return r(e,s.HAS_CHILD)},f=function(e){return r(e,s.IS_MATCH)},v=function(e){return r(e,s.IS_CHECKED)},y=function(e){return r(e,s.PARENT_ID)},h=function(e){return r(l({},s.UUID,e),s.PARENT_ID)},_=function(e){var n;return"object"===N(e)?c(e):"string"==typeof e&&(null===(n=t(e))||void 0===n?void 0:n[s.IS_OPEN])},I=function(e){return e.split("-").reduce((function(e,t){var r=Number(t);return Array.isArray(e)?e[r]:e[n.children][r]}),n.data)},S=function(e){return I(i(l({},s.UUID,e)))},g=function(e){var n;return l(n={},p[s.IS_LOADING],r(e,s.IS_LOADING)),l(n,p[s.HAS_CHILD],d(e)),l(n,p[s.IS_MATCH],f(e)),l(n,p[s.IS_CHECKED],v(e)),l(n,p[s.IS_OPEN],c(e)),l(n,p[s.IS_ROOT],u(e)),l(n,"fullPath",r(e,s.PATH)),l(n,"uuid",a(e)),l(n,"parentId",r(e,s.PARENT_ID)),n};return{getSchemaVal:t,getNodeAttr:r,getNodeId:a,getNodeParentId:y,getNodeParentIdById:h,getParentNodeData:function(e){return u(l({},s.UUID,e))?l({},n.children,n.data):S(h(e))},getParentNode:function(e){return t(y(e))},setNodeAttr:o,getNodePath:i,isRootNode:u,isNodeOpened:c,hasChildNode:d,isItemOpen:_,isNodeChecked:v,isNodeMatched:f,isNodeLoading:function(e){return r(e,s.IS_LOADING)},checkNodeIsOpen:function(e){return u(e)||function(e){return _(r(e,s.PARENT_ID))}(e)},getSourceNodeByPath:I,getSourceNodeByUID:S,deleteNodeSchema:function(n){return e.schema.delete(n)},resolveScopedSlotParam:g,setTreeNodeLoading:function(e,n){o(e,s.IS_LOADING,n)},extendNodeAttr:function(e){return Object.assign(Object.assign({},e),l({},s.TREE_NODE_ATTR,g(e)))},getChildNodes:function(n){var t=e.schema;return Array.prototype.filter.call(Array.from(t.keys()),(function(e){return t.get(e)[s.PARENT_ID]===n[s.UUID]}))}}};function E(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function m(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return E(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?E(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var T=void 0,C="1px dashed #c3cdd7",D=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],a=e[n];return"boolean"==typeof a?a?r:o:P(t,e,n,i)},P=function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=n[t];if("string"==typeof o)return"object"===N(e)&&null!==e?(Object.prototype.hasOwnProperty.call(e,o)||console.error("cannot find node label with key ".concat(o)),e[o]):o;if("function"==typeof o){var i=o.apply(T,[e].concat(m(r)));return"string"==typeof i?i:void console.error("props label with function return value is not string, please check and return string")}},A=function(e,n){return P(e,n,"label")},O=function(e,n){return e.get(n)||{}},b=function(e,n,t){var r;return null===(r=O(e,n))||void 0===r?void 0:r[t]},U=function(e,n){return{"--level-line":D(n,"levelLine",e,C,null,["tree"]),"--lineHeight":"".concat(n.lineHeight,"px"),"--indent":"".concat(n.indent,"px"),"--offset-left":"".concat(n.offsetLeft,"px")}},x=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.schema,o=b(r,e[s.UUID],s.DEPTH);return Object.assign({"--depth":o},"function"==typeof n.levelLine?{"--level-line":D(n,"levelLine",e,C,null,["node"])}:{})},L=function(e,n,t){var r=O(n,e[s.UUID])||{};return{"is-root":r.__is_root,"bk-tree-node":!0,"is-open":r.__is_open,"is-virtual-render":t.virtualRender,"level-line":t.levelLine}},H=function(e,n){var t=O(n,e[s.UUID])||{};return l({"is-checked":t.__is_checked,"is-selected":t.__is_selected},(0,r.resolveClassName)("node-row"),!0)},R=function(e){return null==e?{__IS_NULL:!0}:"string"==typeof e||"number"==typeof e||"symbol"===N(e)?l({},s.UUID,e):(Object.prototype.hasOwnProperty.call(e,s.UUID)||console.error("setNodeAction Error: node id cannot found"),e)};const k=function(e,n){var t=g(n,e),r=t.setNodeAttr,o=t.getNodePath,i=t.getNodeAttr,a=t.resolveScopedSlotParam,u=t.setTreeNodeLoading,c=function(n,t){if("object"===N(n)&&null!==n){r(t,s.IS_OPEN,!0);var i=Array.isArray(n)?n:[n];return function(e,n,t,r,o){!function(e,n,t,r){var o=e.split("-").reduce((function(e,n){var r=Number(n);return Array.isArray(e)?e[r]:e[t][r]}),n);Object.assign(o,r||{})}(e,n,t,l({},r,o))}(o(t),e.data,e.children,e.children,i),Promise.resolve(n)}return Promise.resolve(n)},d=function(n){var t=e.async||{},o=t.callback,l=void 0===o?null:o,d=t.cache,f=void 0===d||d;if("function"==typeof l&&i(n,s.IS_ASYNC)){if(r(n,s.IS_ASYNC_INIT,!0),!i(n,s.IS_CACHED)){r(n,s.IS_CACHED,f);var p=a(n),v=l(n,(function(e){return c(e,n)}),p);if("object"===N(v)&&null!==v)return u(n,!0),v instanceof Promise?Promise.resolve(v.then((function(e){return c(e,n)})).catch((function(e){return console.error("load remote data error:",e)})).finally((function(){u(n,!1),r(n,s.IS_CACHED,!0)}))):(c(v,n),u(n,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)};return{asyncNodeClick:d,deepAutoOpen:function e(){var t=n.data.filter((function(e){return i(e,s.IS_ASYNC)&&e[p[s.IS_OPEN]]&&!i(e,s.IS_ASYNC_INIT)}));t.length&&Promise.all(t.map((function(e){return d(e)}))).then((function(){e()})).catch((function(e){console.warn(e)}))}}},w=function(e,n,i,a,u,c){var d=e.selected,f=g(i,e),p=f.setNodeAttr,v=f.getNodePath,y=f.getSchemaVal,h=f.getNodeAttr,_=f.getNodeId,E=f.getChildNodes,m=f.isRootNode,T=f.hasChildNode,C=f.isItemOpen,D=f.isNodeOpened,P=f.isNodeLoading,O=f.isNodeChecked,b=f.getParentNode,U=f.resolveScopedSlotParam,w=f.extendNodeAttr,j=c.registerNextLoop,V=k(e,i),M=V.asyncNodeClick,K=V.deepAutoOpen,q=function(e){if("string"==typeof e)return e;if("object"===N(e)&&null!==e){if(e.__v_isVNode)return e;var n=e.node,t=e.className,r=e.text,i=e.style;return(0,o.h)(n,{class:t,style:i},r)}return null},Y=function(t){if(n.slots.nodeAction)return n.slots.nodeAction(w(t));var i=null;return P(t)?function(e){var t,r,i;return(null!==(i=null===(r=(t=n.slots).nodeLoading)||void 0===r?void 0:r.call(t,w(e)))&&void 0!==i?i:P(e))?(0,o.createVNode)(S.Spinner,null,null):""}(t):"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(w(t),"node_action"))?q(i):("default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon)&&(T(t)||t.async||!e.autoCheckChildren)?C(t)?(0,o.createVNode)(S.DownShape,{class:(0,r.resolveClassName)("node-prefix")},null):(0,o.createVNode)(S.RightShape,{class:(0,r.resolveClassName)("node-prefix")},null):null},G=function(t){if(!e.showNodeTypeIcon)return null;if(n.slots.nodeType)return n.slots.nodeType(w(t));var i=null;return"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(w(t),"node_type"))?q(i):"default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon?m(t)||T(t)?function(e){return C(e)?(0,o.createVNode)(S.FolderShapeOpen,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null):(0,o.createVNode)(S.Folder,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null)}(t):(0,o.createVNode)(S.TextFile,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null):null},X=function e(n,t){var r=b(n);r&&(p(r,s.IS_CHECKED,t),m(r)||e(r,t))},z=function e(n,t,r){E(n).forEach((function(n){p(l({},s.UUID,n),t,r),e(l({},s.UUID,n),t,r)}))},J=function(e,r){p(e,s.IS_CHECKED,!!r),z(e,s.IS_CHECKED,!!r),X(e,r),n.emit(t.NODE_CHECKED,u.value.filter((function(e){return O(e)})).map((function(e){return e[s.UUID]})))},B=function(e){return O(e)&&!u.value.filter((function(n){var t;return null===(t=v(n))||void 0===t?void 0:t.startsWith(v(e))})).every((function(e){return O(e)}))},F=function(e){return O(e)||u.value.filter((function(n){var t;return null===(t=v(n))||void 0===t?void 0:t.startsWith(v(e))})).some((function(e){return O(e)}))},W=function(n){return e.showCheckbox?(0,o.createVNode)(I(),{size:"small",modelValue:F(n),indeterminate:B(n),onChange:function(e){return J(n,e)}},null):null},$=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=null===r?!C(e):!!r;if(a||z(e,s.IS_OPEN,a),p(e,s.IS_OPEN,a),i){var l=C(e)?t.NODE_EXPAND:t.NODE_COLLAPSE;n.emit(l,e,U(e),y(e[s.UUID]),o)}},Q=function(e,n,t){Array.isArray(e)?e.forEach((function(e){return p(R(e),n,t)})):p(R(e),n,t)},Z=function e(n){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=R(n);if(!o[s.IS_NULL])if(r)if(t){if(Q(o,s.IS_OPEN,!0),!m(o)){var i=h(o,s.PARENT_ID);e(i,!0,!0)}}else $(o,!1,null,!1);else Q(o,s.IS_OPEN,t)},ee=function(e,n){D(e)?$(e,!1,n):M(e).finally((function(){h(e,s.IS_LOADING)?j("setNodeOpenedAfterLoading",{type:"once",fn:function(){return $(e,!0,n)}}):$(e,!0,n)}))},ne=function n(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Array.isArray(t)?t:[t];if(a.length){var u=R(a[0]);u[s.IS_NULL]||(e.selectable?(null!=d&&p(l({},s.UUID,d),s.IS_SELECTED,!r),e.selected&&e.selected!==d&&p(l({},s.UUID,e.selected),s.IS_SELECTED,!r),p(u,s.IS_SELECTED,r),d=_(u),i&&1===a.length&&Z(u,!0,!0),h(u,s.IS_ASYNC)&&M(u).then((function(){(0,o.nextTick)((function(){a.shift(),n(a,r,i)}))}))):console.warn("props.selectable is false or undefined, please set selectable with true"))}},te=function(n){if(!e.levelLine)return null;var t=h(n,s.DEPTH)+1;return new Array(t).fill("").map((function(e,n){return n})).filter((function(e){return function(e,n){if(m(n))return!1;var t=v(n),r="".concat(t).split("-").slice(0,e+1);if(r.join("-")===t)return!0;var o=r.pop(),i=parseInt(o,10);r.push("".concat(i+1));var a=r.join("-");return u.value.some((function(e){return e[s.PATH]===a}))}(e,n)})).filter((function(e){return e>0})).map((function(e){return(0,o.createVNode)("span",{class:"node-virtual-line",style:(n=t-e,{"--depth":n})},null);var n}))};return{renderTreeNode:function(a){var l,u,c,d,f;return(0,o.createVNode)("div",{"data-tree-node":_(a),key:_(a),class:H(a,i.schema)},[(0,o.createVNode)("div",{class:L(a,i.schema,e),style:x(a,e,i),onClick:function(e){return function(e,r){ne(e,!0,!1),D(e)||ee(e,r);var o=t.NODE_CLICK;n.emit(o,e,U(e),y(e[s.UUID]),r)}(a,e)}},[(0,o.createVNode)("span",{class:[(0,r.resolveClassName)("node-action")],onClick:function(e){return function(e,n){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),ee(n,e)}(e,a)}},[Y(a)]),(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-content")},[[W(a),G(a)],(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-text")},[null!==(c=null===(u=(l=n.slots).node)||void 0===u?void 0:u.call(l,w(a)))&&void 0!==c?c:[A(a,e)]]),null===(f=(d=n.slots).nodeAppend)||void 0===f?void 0:f.call(d,w(a))]),te(a)])])},hanldeTreeNodeClick:ee,deepAutoOpen:K,asyncNodeClick:M,setNodeAction:Q,setNodeOpened:$,setSelect:ne,setOpen:Z}};var j=u(8022),V=void 0;const M=(0,o.defineComponent)({name:"Tree",props:v,emits:f,setup:function(e,n){var t=function(e){var n,t=function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=e.data,i=e.children,a=[],u=[],c=0,d=new Map;function f(e,n,t,r){if(null!=e&&d.has(e)&&![s.UUID,s.PARENT_ID].includes(n)){var o=d.get(e);Object.prototype.hasOwnProperty.call(o,n)&&"function"==typeof r&&Reflect.apply(r,self,[o,n,t])&&(Object.assign(o,l({},n,t)),f(o[s.PARENT_ID],n,t,r))}}function v(n){var t=null;return"string"==typeof e.nodeKey&&(t=n[e.nodeKey]||(0,j.v4)()),t||n[s.UUID]||(0,j.v4)()}var y=(l(n={},s.IS_OPEN,(function(){return!1})),l(n,s.IS_CHECKED,(function(){return!1})),l(n,s.IS_MATCH,(function(){return!0})),l(n,s.IS_SELECTED,(function(n){return e.selected===n})),l(n,s.IS_CACHED,(function(){return!1})),l(n,s.IS_ASYNC,(function(){return null})),l(n,s.IS_LOADING,(function(){return!1})),n);function h(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=o;void 0===o&&"function"==typeof y[t]&&(i=y[t](e,n));var a=p[t];if(Object.prototype.hasOwnProperty.call(n,a))return n[a];var l=(r||[]).find((function(n){return n[s.UUID]===e})),u=void 0;return l&&(u=l[t]),null==u&&(u=i),u}function _(n,t){return!!e.selectable&&h(n,t,s.IS_SELECTED,e.selected===n)}function I(e,n,t){var r,o=h(e,n,s.IS_OPEN),i=!d.has(t)||(null===(r=d.get(t))||void 0===r?void 0:r[s.IS_OPEN]);return o&&i}function S(e){return!e[s.IS_OPEN]}function g(n){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,p=n.length,y=0;y<p;y++){var E=n[y];if(Array.isArray(E))g(E,t,r,o);else if("object"===N(E)&&null!==E){var m,T,C=null!==o?"".concat(o,"-").concat(y):"".concat(y),D="".concat(v(E)),P=!!(E[i]||[]).length,A=h(D,E,s.IS_OPEN);e.autoOpenParentNode?A&&f(r,s.IS_OPEN,!0,S):A=I(D,E,r),Object.assign(E,l({},s.UUID,D));var O=e.showCheckbox&&h(D,E,s.IS_CHECKED);O&&a.push(D),d.set(D,(l(m={},s.DEPTH,t),l(m,s.INDEX,y),l(m,s.UUID,D),l(m,s.PARENT_ID,r),l(m,s.HAS_CHILD,P),l(m,s.PATH,C),l(m,s.IS_ROOT,null===r),l(m,s.ORDER,c),l(m,s.IS_SELECTED,_(D,E)),l(m,s.IS_MATCH,h(D,E,s.IS_MATCH)),l(m,s.IS_OPEN,A),l(m,s.IS_CHECKED,O),l(m,s.IS_CACHED,h(D,E,s.IS_CACHED)),l(m,s.IS_ASYNC,h(D,E,s.IS_ASYNC)),l(m,s.IS_LOADING,h(D,E,s.IS_LOADING)),l(m,i,null),m)),c+=1,u.push(Object.assign(Object.assign({},JSON.parse(JSON.stringify(E,(function(n,t){return n===e.children?null:t})))),(l(T={},s.IS_OPEN,A),l(T,i,null),T))),Object.prototype.hasOwnProperty.call(E,i)&&g(E[i]||[],t+1,D,C)}}}return g(t||o),e.showCheckbox&&(null==a||a.forEach((function(e){Array.from(d.values()).filter((function(n){var t;return null===(t=n[s.PATH])||void 0===t?void 0:t.startsWith(d.get(e)[s.PATH])})).forEach((function(e){return Object.assign(e,l({},s.IS_CHECKED,!0))})),f(e,s.IS_CHECKED,!0,(function(){return!0}))}))),[u,d]},r=t(e),i=new Map,a=[],u=[],c=(0,o.reactive)({data:r[0],schema:r[1],levelLineSchema:{}}),d=(0,o.computed)((function(){return Array.from(c.schema.values())})),f=k(e,c),v=f.asyncNodeClick,y=f.deepAutoOpen,h=function(e,n){(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&i.has(e)&&i.delete(e),i.set(e,n)},_=function(e){var n,t=function(e){return"function"==typeof e?{type:"loop",fn:e}:"object"===N(e)&&"string"==typeof e.type&&"function"==typeof e.fn?e:(console.error("loop event error",e),null)}(e);return null!==t&&Reflect.apply(t.fn,V,[]),null!==(n=null==t?void 0:t.type)&&void 0!==n?n:"once"};return(0,o.watch)((function(){return[e.data]}),(function(n){var r,o,a=t(e,n,d.value);c.data=a[0],c.schema=a[1],(null===(r=e.async)||void 0===r?void 0:r.callback)&&"every"===(null===(o=e.async)||void 0===o?void 0:o.deepAutoOpen)&&y(),Array.from(i.keys()).forEach((function(e){var n=i.get(e);if(Array.isArray(n)){var t=[];n.forEach((function(e,n){"once"===_(e)&&t.unshift(n)})),t.length&&t.forEach((function(e){return n.splice(e,1)})),0===n.length&&i.delete(e)}else"once"===_(n)&&i.delete(e)}))}),{deep:!0}),e.selectable&&(0,o.watch)((function(){return e.selected}),(function(e){u.length=0,a.forEach((function(n){Reflect.apply(n,V,[e]),u.push((function(){return Reflect.apply(n,V,[e])}))})),h("afterSelectWatch",u)}),{immediate:!0}),(null===(n=e.async)||void 0===n?void 0:n.callback)&&y(),{flatData:c,schemaValues:d,asyncNodeClick:v,deepAutoOpen:y,afterDataUpdate:function(e){h("afterDataUpdate",e)},registerNextLoop:h,onSelected:function(e){a.push(e)}}}(e),i=t.flatData,u=t.schemaValues,c=t.onSelected,d=t.registerNextLoop,f=g(i,e),v=f.setNodeAttr,y=f.checkNodeIsOpen,_=f.getNodeAttr,I=f.getNodePath,S=f.isRootNode,E=f.isNodeOpened,m=f.isNodeChecked,T=f.isNodeMatched,C=f.hasChildNode,D=function(e){var n,t=(0,o.toRef)(e,"search"),r=null!==(n=e.search)&&void 0!==n?n:{},i=r.openResultNode,a=void 0!==i&&i,l=r.resultType,u=void 0===l?"tree":l,c=function(e){return["string","number","boolean"].includes(N(e))},s=function(e,n){return e===n},d=function(e,n){return new RegExp("".concat(e),"i").test("".concat(n))},f=function(e,n){return Reflect.apply(e,void 0,n)},p=void 0===t.value||!1===t.value,v=(0,o.computed)((function(){return!1!==t.value&&(c(t.value)?"".concat(t.value).length>0:"object"===N(t.value))}));return{searchFn:function(e,n){if(p)return!0;if(c(t.value))return f(d,[t.value,e,n]);var r=t.value,o=r.value,i=void 0===o?"":o,a=r.match,l=void 0===a?"fuzzy":a,u="function"==typeof l?l:"fuzzy"===l?d:s;return 0==="".concat(i).length||f(u,[i,e,n])},refSearch:t,isSearchActive:v,isSearchDisabled:p,openResultNode:a,resultType:u,isTreeUI:"tree"===u}}(e),P=D.searchFn,O=D.isSearchActive,b=D.refSearch,x=D.openResultNode,L=D.isTreeUI;D.isSearchDisabled||(0,o.watch)([b],(function(){i.data.forEach((function(n){var t=P(A(n,e),n);v(n,s.IS_MATCH,t),x&&G(n,!0,!0)}))}));var H=(0,o.computed)((function(){return i.data.filter((function(e){return y(e)&&function(e){return!O.value||(_(e,s.IS_MATCH)||!!L&&u.value.some((function(n){var t;return(null===(t=n[s.PATH])||void 0===t?void 0:t.startsWith(I(e)))&&n[s.IS_MATCH]})))}(e)}))})),M=w(e,n,i,0,u,{registerNextLoop:d}),K=M.renderTreeNode,q=M.hanldeTreeNodeClick,Y=M.setNodeOpened,G=M.setOpen,X=M.setNodeAction,z=M.setSelect,J=M.asyncNodeClick;c((function(n){z(n,!0,e.autoOpenParentNode)})),n.expose({hanldeTreeNodeClick:q,isNodeChecked:m,isRootNode:S,isNodeOpened:E,isNodeMatched:T,hasChildNode:C,setOpen:G,setChecked:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];X(R(e),s.IS_CHECKED,n)},setNodeAction:X,setNodeOpened:Y,setSelect:z,asyncNodeClick:J,getData:function(){return i}});var B=(0,o.ref)(),F=function(e,n){var t=n.slots;return{renderEmpty:function(n){var r,i;return(0,o.createVNode)(h(),{scene:"part",type:n},{default:function(){return[null!==(i=null===(r=t.default)||void 0===r?void 0:r.call(t))&&void 0!==i?i:e.emptyText]}})}}}(e,n),W=F.renderEmpty;return function(e,n,t){var r=g(t,e),i=r.getSourceNodeByUID,a=r.getNodeParentIdById,u=r.getParentNodeData,c=r.getNodeAttr,d=r.getNodePath,f=r.isRootNode,p=function(e){return e.target.closest("[data-tree-node]")},v=function e(n){p(n).removeEventListener("mouseup",e)},y=function(e){var n=p(e);n.setAttribute("draggable","true"),n.addEventListener("mouseup",v)},h=function(e){e.preventDefault();var n=p(e),t=e.dataTransfer.getData("node-id"),r=n.getAttribute("data-tree-node"),o=I(t,r)?"move":"none";e.dataTransfer.effectAllowed=o,e.dataTransfer.dropEffect=o},N=function(e){e.dataTransfer.effectAllowed="move",e.dataTransfer.dropEffect="move";var n=p(e);e.dataTransfer.setData("text/plain",""),e.dataTransfer.setData("node-id",n.getAttribute("data-tree-node"))},_=function(n){n.preventDefault(),n.stopPropagation();var t=p(n),r=n.dataTransfer.getData("node-id"),o=t.getAttribute("data-tree-node");Reflect.apply(e.dragSort?S:E,void 0,[r,o])},I=function(e,n){var t=d(l({},s.UUID,e)),r=d(l({},s.UUID,n));return a(e)===a(n)||-1===t.indexOf(r)&&-1===r.indexOf(t)},S=function(n,t){if(I(n,t)){var r=JSON.parse(JSON.stringify(i(n))),o=JSON.parse(JSON.stringify(i(t))),a=u(n),d=u(t),f=c(l({},s.UUID,n),s.INDEX),p=c(l({},s.UUID,t),s.INDEX);null==a||a[e.children].splice(f,1,o),null==d||d[e.children].splice(p,1,r)}},E=function(n,t){var r=i(n),o=i(t),u=null;if(f(l({},s.UUID,n)))u=e.data;else{var d=a(n);if(null!=d){u=i(d);var p=c(l({},s.UUID,n),s.INDEX);null==u||u[e.children].splice(p,1)}}o[e.children]||(o[e.children]=[]),o[e.children].unshift(r)};(0,o.onMounted)((function(){if(e.draggable&&n.value){var t=n.value.$el;t.addEventListener("mousedown",y),t.addEventListener("dragstart",N),t.addEventListener("dragover",h),t.addEventListener("drop",_)}})),(0,o.onUnmounted)((function(){if(e.draggable&&n.value){var t=n.value.$el;t.removeEventListener("mousedown",y),t.removeEventListener("dragstart",N),t.removeEventListener("dragover",h),t.removeEventListener("drop",_)}}))}(e,B,i),function(){return(0,o.createVNode)(a(),{class:(0,r.resolveClassName)("tree"),style:U(null,e),list:H.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:(0,r.resolveClassName)("container"),throttleDelay:0,ref:B},{default:function(e){return function(e){if(e.length)return e.map(K);var n=O.value?"search-empty":"empty";return W(n)}(e.data||[])}})}}}),K=(0,r.withInstall)(M)})(),c})()));
@@ -0,0 +1,184 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ /**
3
+ * Tree Prop: prefixIcon function
4
+ * @param {} isRoot 是否为分跟节点
5
+ * @param {} hasChild 是否有孩子节点
6
+ * @param {} isOpen 当前节点是否展开
7
+ * @param {} renderType 当前渲染类型(action: 用来标识当前节点状态,展开 | 收起, node_type:节点类型,文件、文件夹)
8
+ * @param {} item 当前节点数据
9
+ */
10
+ export declare type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: any) => any;
11
+ export declare const treeProps: {
12
+ /**
13
+ * 渲染列表
14
+ */
15
+ data: import("vue-types").VueTypeDef<any[]> & {
16
+ default: () => any[];
17
+ };
18
+ /**
19
+ * 指定节点标签为节点对象的某个属性值
20
+ */
21
+ label: import("vue-types").VueTypeDef<any>;
22
+ /**
23
+ * 每个树节点用来作为唯一标识的属性,此标识应该是唯一的
24
+ * 如果设置系统会默认自动生成唯一id
25
+ */
26
+ nodeKey: import("vue-types").VueTypeValidableDef<string> & {
27
+ default: string;
28
+ } & {
29
+ default: string;
30
+ };
31
+ /**
32
+ * 子节点 Key, 用于读取子节点
33
+ * 默认 children
34
+ */
35
+ children: import("vue-types").VueTypeValidableDef<string> & {
36
+ default: string;
37
+ } & {
38
+ default: string;
39
+ };
40
+ /**
41
+ * 相邻级节点间的水平缩进,单位为像素
42
+ */
43
+ indent: import("vue-types").VueTypeValidableDef<number> & {
44
+ default: number;
45
+ } & {
46
+ default: number;
47
+ };
48
+ /**
49
+ * 设置行高
50
+ */
51
+ lineHeight: import("vue-types").VueTypeValidableDef<number> & {
52
+ default: number;
53
+ } & {
54
+ default: number;
55
+ };
56
+ /**
57
+ * 设置层级连线
58
+ */
59
+ levelLine: import("vue-types").VueTypeDef<any> & {
60
+ default: any;
61
+ };
62
+ /**
63
+ * 是否开启虚拟滚动
64
+ * 默认虚拟滚动是开启的,数据量大的情况下有利于性能优化,可以通过设置 virtualRender = false 关闭虚拟滚动
65
+ */
66
+ virtualRender: import("vue-types").VueTypeValidableDef<boolean> & {
67
+ default: boolean;
68
+ } & {
69
+ default: boolean;
70
+ };
71
+ /**
72
+ * 当前节点标识图标
73
+ * 默认 true
74
+ */
75
+ prefixIcon: import("vue-types").VueTypeDef<any> & {
76
+ default: any;
77
+ };
78
+ /**
79
+ * 异步加载节点数据配置
80
+ * @param callback 请求数据回调函数,函数返回 Promise
81
+ * @param cache 是否缓存请求结果,默认为True,只有在第一次才会发起请求,若设置为false则每次都会发起请求
82
+ */
83
+ async: import("vue-types").VueTypeShape<AsyncOption>;
84
+ /**
85
+ * 每个节点偏移左侧距离
86
+ */
87
+ offsetLeft: import("vue-types").VueTypeValidableDef<number> & {
88
+ default: number;
89
+ } & {
90
+ default: number;
91
+ };
92
+ /**
93
+ * 搜索配置
94
+ * 可以为一个配置项 SearchOption
95
+ * 或者直接为一个字符串,如果直接为字符串则模糊匹配此值
96
+ */
97
+ search: import("vue-types").VueTypeDef<string | number | boolean | SearchOption> & {
98
+ default: string | number | boolean | (() => SearchOption);
99
+ };
100
+ emptyText: import("vue-types").VueTypeValidableDef<string> & {
101
+ default: string;
102
+ } & {
103
+ default: string;
104
+ };
105
+ draggable: import("vue-types").VueTypeValidableDef<boolean> & {
106
+ default: boolean;
107
+ } & {
108
+ default: boolean;
109
+ };
110
+ /**
111
+ * 节点拖拽时可交换位置(开启拖拽可交换位置后将不支持改变层级)
112
+ */
113
+ dragSort: import("vue-types").VueTypeValidableDef<boolean> & {
114
+ default: boolean;
115
+ } & {
116
+ default: boolean;
117
+ };
118
+ /**
119
+ * 节点是否可以选中
120
+ */
121
+ selectable: import("vue-types").VueTypeValidableDef<boolean> & {
122
+ default: boolean;
123
+ } & {
124
+ default: boolean;
125
+ };
126
+ /**
127
+ * 是否支持多选
128
+ */
129
+ showCheckbox: import("vue-types").VueTypeValidableDef<boolean> & {
130
+ default: boolean;
131
+ } & {
132
+ default: boolean;
133
+ };
134
+ /**
135
+ * 是否显示节点类型Icon
136
+ */
137
+ showNodeTypeIcon: import("vue-types").VueTypeValidableDef<boolean> & {
138
+ default: boolean;
139
+ } & {
140
+ default: boolean;
141
+ };
142
+ /**
143
+ * 默认选中的节点id,selectable为false时无效
144
+ */
145
+ selected: import("vue-types").VueTypeDef<string | number | {
146
+ [key: string]: any;
147
+ }> & {
148
+ default: string | number | (() => {
149
+ [key: string]: any;
150
+ });
151
+ };
152
+ /**
153
+ * 是否自动检查当前节点是否有子节点
154
+ * 节点前面的展开收起Icon会根据判定值做改变
155
+ * 如果需要自已控制,请设置为false
156
+ */
157
+ autoCheckChildren: import("vue-types").VueTypeValidableDef<boolean> & {
158
+ default: boolean;
159
+ } & {
160
+ default: boolean;
161
+ };
162
+ /**
163
+ * 如果设置了某一个叶子节点状态为展开,是否自动展开所有父级节点
164
+ * 默认为true,如果设置为false,则每层状态需要自己控制
165
+ */
166
+ autoOpenParentNode: import("vue-types").VueTypeValidableDef<boolean> & {
167
+ default: boolean;
168
+ } & {
169
+ default: boolean;
170
+ };
171
+ };
172
+ declare type AsyncOption = {
173
+ callback: (item: any, cb: any) => Promise<any>;
174
+ cache: Boolean;
175
+ deepAutoOpen?: string;
176
+ };
177
+ export declare type SearchOption = {
178
+ value: string | number | boolean;
179
+ match: string | Function;
180
+ resultType: string;
181
+ openResultNode: boolean;
182
+ };
183
+ export declare type TreePropTypes = Readonly<ExtractPropTypes<typeof treeProps>>;
184
+ export {};
package/lib/tree/tree.css CHANGED
@@ -1,35 +1,196 @@
1
- .bk-tree .bk-tree-node {
1
+ .bk-F-scroll-x {
2
+ overflow-x: auto;
3
+ scrollbar-color: #a0a0a0 transparent;
4
+ scrollbar-width: thin;
5
+ }
6
+ .bk-F-scroll-x::-webkit-scrollbar {
7
+ height: 6px;
8
+ }
9
+ .bk-F-scroll-y {
10
+ overflow-y: auto;
11
+ }
12
+ .bk-F-scroll-y::-webkit-scrollbar {
13
+ width: 4px;
14
+ }
15
+ .bk-F-scroll-y::-webkit-scrollbar-thumb {
16
+ border-radius: 4px;
17
+ }
18
+ .bk-virtual-render {
2
19
  position: relative;
3
- height: var(--lineHeight);
4
- padding-left: 0;
5
- line-height: var(--lineHeight);
20
+ }
21
+ .bk-virtual-render .bk-virtual-content,
22
+ .bk-virtual-render.bk-virtual-content {
23
+ position: absolute;
24
+ top: 0;
25
+ bottom: 0;
26
+ left: 0;
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+ .bk-virtual-render .bk-virtual-section {
31
+ width: 1px;
32
+ background: transparent;
33
+ }
34
+ .bk-checkbox {
35
+ display: inline-flex;
36
+ justify-self: center;
37
+ font-size: 14px;
38
+ line-height: 18px;
39
+ letter-spacing: normal;
40
+ color: #63656e;
6
41
  cursor: pointer;
42
+ user-select: none;
43
+ }
44
+ .bk-checkbox ~ .bk-checkbox {
45
+ margin-left: 30px;
46
+ }
47
+ .bk-checkbox.is-checked .bk-checkbox-input {
48
+ background: #3a84ff;
49
+ border-color: #3a84ff;
50
+ transition: all 0.1s;
51
+ }
52
+ .bk-checkbox.is-checked .bk-checkbox-input.small::after {
53
+ width: 3px;
54
+ height: 6px;
55
+ }
56
+ .bk-checkbox.is-checked .bk-checkbox-input::after {
57
+ position: absolute;
58
+ top: 50%;
59
+ left: 50%;
60
+ width: 4px;
61
+ height: 8px;
62
+ border: 2px solid #fff;
63
+ border-top: 0;
64
+ border-left: 0;
65
+ content: '';
66
+ transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
67
+ transform-origin: center;
68
+ }
69
+ .bk-checkbox.is-indeterminated .bk-checkbox-input.small::after {
70
+ width: 6px;
71
+ height: 2px;
72
+ }
73
+ .bk-checkbox.is-indeterminated .bk-checkbox-input::after {
74
+ position: absolute;
75
+ top: 50%;
76
+ left: 50%;
77
+ width: 8px;
78
+ height: 2px;
79
+ background: #fff;
80
+ border: none;
81
+ border-radius: 2px;
82
+ content: '';
83
+ transform: translate(-50%, -50%);
84
+ }
85
+ .bk-checkbox.is-disabled {
86
+ color: #c4c6cc;
87
+ cursor: not-allowed;
88
+ }
89
+ .bk-checkbox.is-disabled .bk-checkbox-input {
90
+ background: #fafbfd;
91
+ border-color: #dcdee5;
92
+ }
93
+ .bk-checkbox.is-disabled .bk-checkbox-input::after {
94
+ background: #dcdee5;
95
+ }
96
+ .bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
97
+ background: #dcdee5;
7
98
  }
8
- .bk-tree .bk-tree-node.is-open::after {
99
+ .bk-checkbox .bk-checkbox-input {
100
+ position: relative;
101
+ display: inline-block;
102
+ width: 16px;
103
+ height: 16px;
104
+ margin-right: 5px;
105
+ vertical-align: middle;
106
+ border: 1px solid #979ba5;
107
+ border-radius: 2px;
108
+ }
109
+ .bk-checkbox .bk-checkbox-input.small {
110
+ width: 14px;
111
+ height: 14px;
112
+ }
113
+ .bk-checkbox .bk-checkbox-original {
9
114
  position: absolute;
10
- top: calc(var(--lineHeight) / 2);
115
+ top: 0;
11
116
  left: 0;
12
- z-index: 1;
117
+ z-index: -1;
13
118
  width: 0;
14
- height: calc(var(--lines) * var(--lineHeight));
15
- pointer-events: none;
16
- border-left: var(--level-line);
17
- content: '';
119
+ height: 0;
120
+ }
121
+ .bk-checkbox .bk-checkbox-label {
122
+ display: inline-block;
123
+ vertical-align: middle;
124
+ }
125
+ .bk-tree {
126
+ font-size: 14px;
127
+ }
128
+ .bk-tree .bk-node-row {
129
+ padding-left: calc(var(--offset-left));
130
+ }
131
+ .bk-tree .bk-node-row.is-selected {
132
+ background-color: #ebf2ff;
133
+ }
134
+ .bk-tree .bk-tree-node {
135
+ position: relative;
136
+ display: flex;
137
+ height: var(--lineHeight);
138
+ padding-left: 0;
139
+ line-height: var(--lineHeight);
140
+ cursor: pointer;
141
+ align-items: center;
18
142
  }
19
143
  .bk-tree .bk-tree-node:not(.is-root) {
20
144
  margin-left: calc(var(--depth)*var(--indent));
21
145
  }
22
- .bk-tree .bk-tree-node:not(.is-root)::before {
146
+ .bk-tree .bk-tree-node:not(.is-root).level-line::before {
23
147
  position: absolute;
24
- top: 50%;
25
- left: calc(0px - var(--indent));
148
+ top: calc(50% + 1px);
149
+ left: calc(0px - var(--indent) + 6px);
26
150
  z-index: 1;
27
- width: var(--indent);
151
+ width: calc(var(--indent) - 6px);
28
152
  height: 0;
29
153
  pointer-events: none;
30
154
  border-bottom: var(--level-line);
31
155
  content: '';
32
156
  }
157
+ .bk-tree .bk-tree-node .node-virtual-line {
158
+ position: absolute;
159
+ top: -12px;
160
+ bottom: 50%;
161
+ left: calc(var(--depth) * var(--indent) * -1 + 6px);
162
+ display: inline-block;
163
+ width: 0;
164
+ border-left: var(--level-line);
165
+ }
166
+ .bk-tree .bk-tree-node .bk-node-prefix {
167
+ display: flex;
168
+ width: 14px;
169
+ height: 14px;
170
+ align-items: center;
171
+ justify-content: center;
172
+ }
173
+ .bk-tree .bk-tree-node .bk-node-action {
174
+ margin-right: 2px;
175
+ }
33
176
  .bk-tree .bk-tree-node .bk-tree-icon {
34
177
  margin: 0 6px 0 4px;
35
178
  }
179
+ .bk-tree .bk-tree-node .bk-node-content {
180
+ display: flex;
181
+ flex: 1;
182
+ align-items: center;
183
+ min-width: 0;
184
+ }
185
+ .bk-tree .bk-tree-node .bk-node-content .bk-checkbox {
186
+ margin: 0;
187
+ }
188
+ .bk-tree .bk-tree-node .bk-node-content .bk-checkbox .bk-checkbox-input {
189
+ margin: 0;
190
+ }
191
+ .bk-tree .bk-tree-node .bk-node-content .bk-node-text {
192
+ flex: 1;
193
+ overflow: hidden;
194
+ text-overflow: ellipsis;
195
+ white-space: nowrap;
196
+ }