bkui-vue 0.0.1-beta.47 → 0.0.1-beta.470

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 (686) hide show
  1. package/License.txt +14 -0
  2. package/dist/index.cjs.js +360 -36
  3. package/dist/index.esm.js +31133 -19791
  4. package/dist/index.umd.js +360 -36
  5. package/dist/locale/en.esm.js +2 -0
  6. package/dist/locale/en.esm.js.map +1 -0
  7. package/dist/locale/en.umd.js +2 -0
  8. package/dist/locale/en.umd.js.map +1 -0
  9. package/dist/locale/zh-cn.esm.js +2 -0
  10. package/dist/locale/zh-cn.esm.js.map +1 -0
  11. package/dist/locale/zh-cn.umd.js +2 -0
  12. package/dist/locale/zh-cn.umd.js.map +1 -0
  13. package/dist/style.css +1 -1
  14. package/dist/style.variable.css +1 -0
  15. package/lib/affix/affix.css +3 -0
  16. package/lib/affix/affix.d.ts +47 -0
  17. package/lib/affix/affix.less +5 -0
  18. package/lib/affix/affix.variable.css +125 -0
  19. package/lib/affix/index.d.ts +167 -0
  20. package/lib/affix/index.js +1 -0
  21. package/lib/alert/alert.css +9 -3
  22. package/lib/alert/alert.d.ts +6 -6
  23. package/lib/alert/alert.less +29 -20
  24. package/lib/alert/alert.variable.css +41 -7
  25. package/lib/alert/index.d.ts +68 -48
  26. package/lib/alert/index.js +1 -1
  27. package/lib/animate-number/animate-number.d.ts +2 -2
  28. package/lib/animate-number/index.d.ts +58 -25
  29. package/lib/backtop/backtop.css +8 -0
  30. package/lib/backtop/backtop.d.ts +5 -5
  31. package/lib/backtop/backtop.less +8 -0
  32. package/lib/backtop/backtop.variable.css +40 -4
  33. package/lib/backtop/index.d.ts +67 -49
  34. package/lib/backtop/index.js +1 -1
  35. package/lib/badge/badge.css +7 -10
  36. package/lib/badge/badge.d.ts +29 -8
  37. package/lib/badge/badge.less +9 -11
  38. package/lib/badge/badge.variable.css +39 -14
  39. package/lib/badge/index.d.ts +120 -67
  40. package/lib/badge/index.js +1 -1
  41. package/lib/breadcrumb/breadcrumb-item.d.ts +5 -3
  42. package/lib/breadcrumb/breadcrumb.css +51 -0
  43. package/lib/breadcrumb/breadcrumb.d.ts +2 -2
  44. package/lib/breadcrumb/breadcrumb.variable.css +88 -9
  45. package/lib/breadcrumb/index.d.ts +65 -41
  46. package/lib/breadcrumb/index.js +1 -1
  47. package/lib/button/button-group.d.ts +4 -4
  48. package/lib/button/button.css +85 -50
  49. package/lib/button/button.d.ts +47 -27
  50. package/lib/button/button.less +72 -42
  51. package/lib/button/button.variable.css +117 -54
  52. package/lib/button/index.d.ts +123 -87
  53. package/lib/button/index.js +1 -1
  54. package/lib/card/card.css +97 -2
  55. package/lib/card/card.d.ts +48 -7
  56. package/lib/card/card.less +50 -2
  57. package/lib/card/card.variable.css +133 -10
  58. package/lib/card/index.d.ts +153 -58
  59. package/lib/card/index.js +1 -1
  60. package/lib/cascader/cascader-panel.d.ts +102 -0
  61. package/lib/cascader/cascader.css +316 -0
  62. package/lib/cascader/cascader.d.ts +354 -0
  63. package/lib/cascader/cascader.less +283 -0
  64. package/lib/cascader/cascader.variable.css +438 -0
  65. package/lib/cascader/index.d.ts +923 -0
  66. package/lib/cascader/index.js +2 -0
  67. package/lib/cascader/index.js.LICENSE.txt +1 -0
  68. package/lib/cascader/interface.d.ts +51 -0
  69. package/lib/cascader/node.d.ts +31 -0
  70. package/lib/cascader/store.d.ts +27 -0
  71. package/lib/checkbox/checkbox-group.d.ts +18 -2
  72. package/lib/checkbox/checkbox.css +40 -12
  73. package/lib/checkbox/checkbox.d.ts +33 -15
  74. package/lib/checkbox/checkbox.less +70 -34
  75. package/lib/checkbox/checkbox.variable.css +72 -16
  76. package/lib/checkbox/common.d.ts +1 -0
  77. package/lib/checkbox/index.d.ts +113 -61
  78. package/lib/checkbox/index.js +1 -1
  79. package/lib/checkbox/type.d.ts +1 -1
  80. package/lib/code-diff/code-diff.css +27 -7
  81. package/lib/code-diff/code-diff.d.ts +7 -7
  82. package/lib/code-diff/code-diff.less +42 -7
  83. package/lib/code-diff/code-diff.variable.css +59 -11
  84. package/lib/code-diff/index.d.ts +30 -43
  85. package/lib/code-diff/index.js +1 -1
  86. package/lib/collapse/collapse-panel.d.ts +103 -0
  87. package/lib/collapse/collapse.css +69 -14
  88. package/lib/collapse/collapse.d.ts +67 -53
  89. package/lib/collapse/collapse.less +112 -30
  90. package/lib/collapse/collapse.variable.css +191 -14
  91. package/lib/collapse/index.d.ts +292 -52
  92. package/lib/collapse/index.js +1 -1
  93. package/lib/collapse/props.d.ts +131 -0
  94. package/lib/collapse/utils.d.ts +11 -0
  95. package/lib/collapse-transition/collapse-transition.css +93 -0
  96. package/lib/collapse-transition/collapse-transition.d.ts +15 -0
  97. package/lib/collapse-transition/collapse-transition.less +111 -0
  98. package/lib/collapse-transition/collapse-transition.variable.css +215 -0
  99. package/lib/collapse-transition/index.d.ts +2 -0
  100. package/lib/collapse-transition/index.js +1 -0
  101. package/lib/color-picker/color-picker.css +275 -0
  102. package/lib/color-picker/color-picker.d.ts +144 -0
  103. package/lib/color-picker/color-picker.less +325 -0
  104. package/lib/color-picker/color-picker.variable.css +397 -0
  105. package/lib/color-picker/components/color-input.d.ts +42 -0
  106. package/lib/color-picker/components/hue-slider.d.ts +41 -0
  107. package/lib/color-picker/components/input-container.d.ts +42 -0
  108. package/lib/color-picker/components/recommend-colors.d.ts +51 -0
  109. package/lib/color-picker/components/saturation-panel.d.ts +41 -0
  110. package/lib/color-picker/index.d.ts +255 -0
  111. package/lib/color-picker/index.js +1 -0
  112. package/lib/color-picker/utils.d.ts +37 -0
  113. package/lib/components.d.ts +31 -8
  114. package/lib/components.js +1 -0
  115. package/lib/config-provider/config-provider.css +0 -0
  116. package/lib/config-provider/config-provider.d.ts +402 -0
  117. package/lib/config-provider/config-provider.less +1 -0
  118. package/lib/config-provider/config-provider.variable.css +122 -0
  119. package/lib/config-provider/index.d.ts +646 -0
  120. package/lib/config-provider/index.js +1 -0
  121. package/lib/config-provider/token.d.ts +128 -0
  122. package/lib/config-provider/use-global-config.d.ts +5 -0
  123. package/lib/config-provider/use-locale.d.ts +3 -0
  124. package/lib/config-provider/use-prefix.d.ts +9 -0
  125. package/lib/container/col.d.ts +51 -0
  126. package/lib/container/container.css +91 -0
  127. package/lib/container/container.d.ts +83 -0
  128. package/lib/container/container.less +20 -0
  129. package/lib/container/container.variable.css +213 -0
  130. package/lib/container/index.d.ts +204 -0
  131. package/lib/container/index.js +1 -0
  132. package/lib/container/interface.d.ts +7 -0
  133. package/lib/container/row.d.ts +4 -0
  134. package/lib/date-picker/base/confirm.d.ts +74 -0
  135. package/lib/date-picker/base/date-table.d.ts +96 -0
  136. package/lib/date-picker/base/month-table.d.ts +117 -0
  137. package/lib/date-picker/base/picker-dropdown.d.ts +74 -0
  138. package/lib/date-picker/base/time-spinner.d.ts +170 -0
  139. package/lib/date-picker/base/year-table.d.ts +117 -0
  140. package/lib/date-picker/date-picker.css +31 -1
  141. package/lib/date-picker/date-picker.d.ts +73 -35
  142. package/lib/date-picker/date-picker.less +110 -74
  143. package/lib/date-picker/date-picker.variable.css +63 -5
  144. package/lib/date-picker/index.d.ts +231 -211
  145. package/lib/date-picker/index.js +1 -1
  146. package/lib/date-picker/interface.d.ts +20 -10
  147. package/lib/date-picker/panel/date-range.d.ts +345 -0
  148. package/lib/date-picker/panel/date.d.ts +206 -0
  149. package/lib/date-picker/panel/time-range.d.ts +495 -0
  150. package/lib/date-picker/panel/time.d.ts +451 -0
  151. package/lib/date-picker/props.d.ts +55 -5
  152. package/lib/date-picker/time-picker.d.ts +390 -0
  153. package/lib/date-picker/utils.d.ts +22 -2
  154. package/lib/dialog/dialog.css +135 -26
  155. package/lib/dialog/dialog.d.ts +219 -104
  156. package/lib/dialog/dialog.less +99 -41
  157. package/lib/dialog/dialog.variable.css +257 -26
  158. package/lib/dialog/index.d.ts +467 -276
  159. package/lib/dialog/index.js +2 -1
  160. package/lib/dialog/index.js.LICENSE.txt +1 -0
  161. package/lib/dialog/props.d.ts +122 -0
  162. package/lib/directives/ellipsis.d.ts +7 -0
  163. package/lib/directives/index.d.ts +2 -0
  164. package/lib/directives/index.js +1 -1
  165. package/lib/directives/tooltips.d.ts +2 -1
  166. package/lib/dist.index.js +1 -0
  167. package/lib/divider/divider.d.ts +17 -17
  168. package/lib/divider/divider.variable.css +32 -4
  169. package/lib/divider/index.d.ts +85 -61
  170. package/lib/divider/index.js +1 -1
  171. package/lib/divider/props.d.ts +6 -6
  172. package/lib/dropdown/dropdown-item.d.ts +1 -1
  173. package/lib/dropdown/dropdown-menu.d.ts +2 -2
  174. package/lib/dropdown/dropdown.css +38 -7
  175. package/lib/dropdown/dropdown.d.ts +47 -15
  176. package/lib/dropdown/dropdown.less +48 -34
  177. package/lib/dropdown/dropdown.variable.css +70 -11
  178. package/lib/dropdown/index.d.ts +141 -65
  179. package/lib/dropdown/index.js +1 -1
  180. package/lib/exception/exception.css +40 -14
  181. package/lib/exception/exception.d.ts +33 -13
  182. package/lib/exception/exception.less +59 -22
  183. package/lib/exception/exception.variable.css +72 -18
  184. package/lib/exception/index.d.ts +91 -43
  185. package/lib/exception/index.js +1 -1
  186. package/lib/exception/typings/index.d.ts +4 -0
  187. package/lib/fixed-navbar/fixed-navbar.d.ts +17 -3
  188. package/lib/fixed-navbar/fixed-navbar.variable.css +32 -4
  189. package/lib/fixed-navbar/index.d.ts +89 -30
  190. package/lib/fixed-navbar/index.js +1 -1
  191. package/lib/form/compose-form-item.d.ts +2 -2
  192. package/lib/form/form-item.d.ts +25 -10
  193. package/lib/form/form.css +34 -7
  194. package/lib/form/form.d.ts +50 -16
  195. package/lib/form/form.less +83 -51
  196. package/lib/form/form.variable.css +66 -11
  197. package/lib/form/index.d.ts +154 -61
  198. package/lib/form/index.js +1 -1
  199. package/lib/form/type.d.ts +11 -8
  200. package/lib/form/utils.d.ts +2 -0
  201. package/lib/form/validator.d.ts +1 -0
  202. package/lib/hooks.d.ts +1 -0
  203. package/lib/hooks.js +1 -0
  204. package/lib/icon/angle-double-down-line.js +1 -1
  205. package/lib/icon/angle-double-left-line.js +1 -1
  206. package/lib/icon/angle-double-left.js +1 -1
  207. package/lib/icon/angle-double-right-line.js +1 -1
  208. package/lib/icon/angle-double-right.js +1 -1
  209. package/lib/icon/angle-double-up-line.js +1 -1
  210. package/lib/icon/angle-down-fill.js +1 -1
  211. package/lib/icon/angle-down-line.js +1 -1
  212. package/lib/icon/angle-down.js +1 -1
  213. package/lib/icon/angle-left.js +1 -1
  214. package/lib/icon/angle-right.js +1 -1
  215. package/lib/icon/angle-up-fill.js +1 -1
  216. package/lib/icon/angle-up.js +1 -1
  217. package/lib/icon/archive-fill.d.ts +4 -0
  218. package/lib/icon/archive-fill.js +1 -0
  219. package/lib/icon/arrows-left.js +1 -1
  220. package/lib/icon/arrows-right.js +1 -1
  221. package/lib/icon/audio-fill.d.ts +4 -0
  222. package/lib/icon/audio-fill.js +1 -0
  223. package/lib/icon/bk.js +1 -1
  224. package/lib/icon/circle.js +1 -1
  225. package/lib/icon/close-line.d.ts +4 -0
  226. package/lib/icon/close-line.js +1 -0
  227. package/lib/icon/close.js +1 -1
  228. package/lib/icon/code.js +1 -1
  229. package/lib/icon/cog-shape.js +1 -1
  230. package/lib/icon/collapse-left.js +1 -1
  231. package/lib/icon/copy-shape.d.ts +4 -0
  232. package/lib/icon/copy-shape.js +1 -0
  233. package/lib/icon/copy.js +1 -1
  234. package/lib/icon/data-shape.d.ts +4 -0
  235. package/lib/icon/data-shape.js +1 -0
  236. package/lib/icon/del.d.ts +4 -0
  237. package/lib/icon/del.js +1 -0
  238. package/lib/icon/doc-fill.d.ts +4 -0
  239. package/lib/icon/doc-fill.js +1 -0
  240. package/lib/icon/done.js +1 -1
  241. package/lib/icon/down-shape.js +1 -1
  242. package/lib/icon/down-small.js +1 -1
  243. package/lib/icon/edit-line.d.ts +4 -0
  244. package/lib/icon/edit-line.js +1 -0
  245. package/lib/icon/ellipsis.js +1 -1
  246. package/lib/icon/enlarge-line.d.ts +4 -0
  247. package/lib/icon/enlarge-line.js +1 -0
  248. package/lib/icon/error.js +1 -1
  249. package/lib/icon/excel-fill.d.ts +4 -0
  250. package/lib/icon/excel-fill.js +1 -0
  251. package/lib/icon/exclamation-circle-shape.d.ts +4 -0
  252. package/lib/icon/exclamation-circle-shape.js +1 -0
  253. package/lib/icon/eye.js +1 -1
  254. package/lib/icon/filliscreen-line.d.ts +4 -0
  255. package/lib/icon/filliscreen-line.js +1 -0
  256. package/lib/icon/fix-line.d.ts +4 -0
  257. package/lib/icon/fix-line.js +1 -0
  258. package/lib/icon/fix-shape.d.ts +4 -0
  259. package/lib/icon/fix-shape.js +1 -0
  260. package/lib/icon/folder-open.js +1 -1
  261. package/lib/icon/folder-shape-open.js +1 -1
  262. package/lib/icon/folder-shape.js +1 -1
  263. package/lib/icon/folder.js +1 -1
  264. package/lib/icon/funnel.js +1 -1
  265. package/lib/icon/help-document-fill.js +1 -1
  266. package/lib/icon/help-fill.js +1 -1
  267. package/lib/icon/help.js +1 -1
  268. package/lib/icon/image-fill.d.ts +4 -0
  269. package/lib/icon/image-fill.js +1 -0
  270. package/lib/icon/img-error.d.ts +4 -0
  271. package/lib/icon/img-error.js +1 -0
  272. package/lib/icon/img-placehoulder.d.ts +4 -0
  273. package/lib/icon/img-placehoulder.js +1 -0
  274. package/lib/icon/index.d.ts +83 -54
  275. package/lib/icon/index.js +1 -1
  276. package/lib/icon/info-line.js +1 -1
  277. package/lib/icon/info.js +1 -1
  278. package/lib/icon/left-shape.js +1 -1
  279. package/lib/icon/left-turn-line.d.ts +4 -0
  280. package/lib/icon/left-turn-line.js +1 -0
  281. package/lib/icon/narrow-line.d.ts +4 -0
  282. package/lib/icon/narrow-line.js +1 -0
  283. package/lib/icon/original.d.ts +4 -0
  284. package/lib/icon/original.js +1 -0
  285. package/lib/icon/pdf-fill.d.ts +4 -0
  286. package/lib/icon/pdf-fill.js +1 -0
  287. package/lib/icon/play-shape.js +1 -1
  288. package/lib/icon/plus.js +1 -1
  289. package/lib/icon/ppt-fill.d.ts +4 -0
  290. package/lib/icon/ppt-fill.js +1 -0
  291. package/lib/icon/qq.js +1 -1
  292. package/lib/icon/right-shape.js +1 -1
  293. package/lib/icon/right-turn-line.d.ts +4 -0
  294. package/lib/icon/right-turn-line.js +1 -0
  295. package/lib/icon/search.js +1 -1
  296. package/lib/icon/share.js +1 -1
  297. package/lib/icon/spinner.js +1 -1
  298. package/lib/icon/success.js +1 -1
  299. package/lib/icon/switcher-loading.js +1 -1
  300. package/lib/icon/text-file.js +1 -1
  301. package/lib/icon/text-fill.d.ts +4 -0
  302. package/lib/icon/text-fill.js +1 -0
  303. package/lib/icon/transfer.d.ts +4 -0
  304. package/lib/icon/transfer.js +1 -0
  305. package/lib/icon/tree-application-shape.js +1 -1
  306. package/lib/icon/unfull-screen.d.ts +4 -0
  307. package/lib/icon/unfull-screen.js +1 -0
  308. package/lib/icon/unvisible.js +1 -1
  309. package/lib/icon/up-shape.js +1 -1
  310. package/lib/icon/upload.d.ts +4 -0
  311. package/lib/icon/upload.js +1 -0
  312. package/lib/icon/video-fill.d.ts +4 -0
  313. package/lib/icon/video-fill.js +1 -0
  314. package/lib/icon/warn.js +1 -1
  315. package/lib/icon/weixin-pro.d.ts +4 -0
  316. package/lib/icon/weixin-pro.js +1 -0
  317. package/lib/icon/weixin.js +1 -1
  318. package/lib/image/image-viewer.css +142 -0
  319. package/lib/image/image-viewer.d.ts +73 -0
  320. package/lib/image/image-viewer.less +168 -0
  321. package/lib/image/image-viewer.variable.css +142 -0
  322. package/lib/image/image.css +37 -0
  323. package/lib/image/image.d.ts +93 -0
  324. package/lib/image/image.less +44 -0
  325. package/lib/image/image.variable.css +37 -0
  326. package/lib/image/index.d.ts +252 -0
  327. package/lib/image/index.js +1 -0
  328. package/lib/image/props.d.ts +71 -0
  329. package/lib/index.d.ts +3 -1
  330. package/lib/index.js +1 -0
  331. package/lib/info-box/index.d.ts +7 -0
  332. package/lib/info-box/index.js +2 -0
  333. package/lib/info-box/index.js.LICENSE.txt +1 -0
  334. package/lib/info-box/info-box.css +37 -0
  335. package/lib/info-box/info-box.d.ts +29 -0
  336. package/lib/info-box/info-box.less +51 -0
  337. package/lib/info-box/info-box.variable.css +159 -0
  338. package/lib/input/index.d.ts +228 -180
  339. package/lib/input/index.js +1 -1
  340. package/lib/input/input.css +183 -19
  341. package/lib/input/input.d.ts +121 -38
  342. package/lib/input/input.less +112 -18
  343. package/lib/input/input.variable.css +246 -55
  344. package/lib/link/index.d.ts +82 -55
  345. package/lib/link/index.js +1 -1
  346. package/lib/link/link.css +12 -12
  347. package/lib/link/link.d.ts +11 -9
  348. package/lib/link/link.less +16 -14
  349. package/lib/link/link.variable.css +44 -16
  350. package/lib/loading/directive.d.ts +14 -0
  351. package/lib/loading/index.d.ts +166 -54
  352. package/lib/loading/index.js +1 -1
  353. package/lib/loading/loading.css +86 -33
  354. package/lib/loading/loading.d.ts +97 -15
  355. package/lib/loading/loading.less +27 -23
  356. package/lib/loading/loading.variable.css +134 -53
  357. package/lib/locale/index.d.ts +3 -0
  358. package/lib/locale/index.js +1 -0
  359. package/lib/locale/lang/en.d.ts +126 -0
  360. package/lib/locale/lang/zh-cn.d.ts +3 -0
  361. package/lib/menu/index.d.ts +81 -52
  362. package/lib/menu/index.js +1 -1
  363. package/lib/menu/menu-group.d.ts +2 -2
  364. package/lib/menu/menu-item.d.ts +5 -1
  365. package/lib/menu/menu.css +51 -0
  366. package/lib/menu/menu.d.ts +8 -17
  367. package/lib/menu/menu.variable.css +101 -22
  368. package/lib/menu/submenu.d.ts +5 -1
  369. package/lib/menu/submenu.variable.css +32 -4
  370. package/lib/menu/utils.d.ts +1 -1
  371. package/lib/message/index.js +2 -1
  372. package/lib/message/index.js.LICENSE.txt +6 -0
  373. package/lib/message/message.css +170 -6
  374. package/lib/message/message.less +222 -7
  375. package/lib/message/message.variable.css +202 -10
  376. package/lib/message/messageConstructor.d.ts +136 -27
  377. package/lib/modal/index.d.ts +399 -201
  378. package/lib/modal/index.js +1 -1
  379. package/lib/modal/modal.css +52 -10
  380. package/lib/modal/modal.d.ts +152 -64
  381. package/lib/modal/modal.less +36 -25
  382. package/lib/modal/modal.variable.css +174 -10
  383. package/lib/modal/props.mixin.d.ts +63 -28
  384. package/lib/navigation/index.d.ts +329 -1
  385. package/lib/navigation/index.js +1 -1
  386. package/lib/navigation/navigation-title.d.ts +6 -3
  387. package/lib/navigation/navigation.css +1 -1
  388. package/lib/navigation/navigation.d.ts +21 -5
  389. package/lib/navigation/navigation.less +1 -1
  390. package/lib/navigation/navigation.variable.css +33 -5
  391. package/lib/notify/index.js +1 -1
  392. package/lib/notify/notify.css +25 -5
  393. package/lib/notify/notify.less +29 -6
  394. package/lib/notify/notify.variable.css +57 -9
  395. package/lib/notify/notifyConstructor.d.ts +63 -22
  396. package/lib/overflow-title/components/overflow-title.d.ts +57 -0
  397. package/lib/overflow-title/directive/overflow-title.d.ts +3 -0
  398. package/lib/overflow-title/index.d.ts +195 -0
  399. package/lib/overflow-title/index.js +1 -0
  400. package/lib/overflow-title/overflow.css +11 -0
  401. package/lib/overflow-title/overflow.less +13 -0
  402. package/lib/overflow-title/overflow.variable.css +11 -0
  403. package/lib/overflow-title/props.d.ts +43 -0
  404. package/lib/overflow-title/utils/getActualWidthByCanvas.d.ts +3 -0
  405. package/lib/overflow-title/utils/getActualWidthByDom.d.ts +3 -0
  406. package/lib/pagination/index.d.ts +92 -96
  407. package/lib/pagination/index.js +1 -1
  408. package/lib/pagination/pagination.css +54 -28
  409. package/lib/pagination/pagination.d.ts +19 -9
  410. package/lib/pagination/pagination.less +59 -30
  411. package/lib/pagination/pagination.variable.css +86 -32
  412. package/lib/pagination/type.d.ts +1 -1
  413. package/lib/pagination/use-limit.d.ts +3 -1
  414. package/lib/pagination/use-total.d.ts +3 -1
  415. package/lib/plugin-popover/index.d.ts +27 -0
  416. package/lib/plugin-popover/index.js +1 -0
  417. package/lib/plugins/index.d.ts +1 -0
  418. package/lib/plugins/index.js +1 -0
  419. package/lib/pop-confirm/index.d.ts +249 -0
  420. package/lib/pop-confirm/index.js +1 -0
  421. package/lib/pop-confirm/pop-confirm.css +28 -0
  422. package/lib/pop-confirm/pop-confirm.d.ts +95 -0
  423. package/lib/pop-confirm/pop-confirm.less +34 -0
  424. package/lib/pop-confirm/pop-confirm.variable.css +150 -0
  425. package/lib/pop-confirm/props.d.ts +67 -0
  426. package/lib/popover/arrow.d.ts +2 -0
  427. package/lib/popover/const.d.ts +16 -0
  428. package/lib/popover/content.d.ts +43 -0
  429. package/lib/popover/index.d.ts +453 -148
  430. package/lib/popover/index.js +1 -1
  431. package/lib/popover/plugin-popover.d.ts +12 -0
  432. package/lib/popover/popover.css +10 -50
  433. package/lib/popover/popover.d.ts +212 -48
  434. package/lib/popover/popover.less +19 -66
  435. package/lib/popover/popover.variable.css +42 -54
  436. package/lib/popover/props.d.ts +103 -35
  437. package/lib/popover/reference.d.ts +2 -0
  438. package/lib/popover/root.d.ts +27 -0
  439. package/lib/popover/use-floating.d.ts +34 -0
  440. package/lib/popover/use-platform.d.ts +30 -0
  441. package/lib/popover/use-popover-init.d.ts +23 -0
  442. package/lib/popover/use-popper-id.d.ts +6 -0
  443. package/lib/popover/utils.d.ts +8 -0
  444. package/lib/popover2/index.d.ts +89 -0
  445. package/lib/popover2/index.js +1 -0
  446. package/lib/popover2/popover.d.ts +2 -0
  447. package/lib/preset.d.ts +264 -2
  448. package/lib/preset.js +1 -0
  449. package/lib/process/index.d.ts +66 -52
  450. package/lib/process/index.js +2 -1
  451. package/lib/process/index.js.LICENSE.txt +1 -0
  452. package/lib/process/process.css +22 -0
  453. package/lib/process/process.d.ts +4 -4
  454. package/lib/process/process.less +30 -2
  455. package/lib/process/process.variable.css +54 -4
  456. package/lib/progress/index.d.ts +92 -119
  457. package/lib/progress/index.js +1 -1
  458. package/lib/progress/progress.css +51 -0
  459. package/lib/progress/progress.d.ts +14 -14
  460. package/lib/progress/progress.variable.css +87 -8
  461. package/lib/radio/index.d.ts +81 -42
  462. package/lib/radio/index.js +1 -1
  463. package/lib/radio/radio-button.d.ts +5 -7
  464. package/lib/radio/radio-group.d.ts +28 -2
  465. package/lib/radio/radio.css +136 -65
  466. package/lib/radio/radio.d.ts +2 -2
  467. package/lib/radio/radio.less +262 -173
  468. package/lib/radio/radio.variable.css +171 -72
  469. package/lib/radio/type.d.ts +1 -1
  470. package/lib/rate/index.d.ts +78 -28
  471. package/lib/rate/index.js +1 -1
  472. package/lib/rate/rate.d.ts +14 -3
  473. package/lib/rate/star.d.ts +2 -2
  474. package/lib/resize-layout/index.d.ts +77 -78
  475. package/lib/resize-layout/index.js +1 -1
  476. package/lib/resize-layout/resize-layout.css +6 -15
  477. package/lib/resize-layout/resize-layout.d.ts +8 -8
  478. package/lib/resize-layout/resize-layout.less +10 -19
  479. package/lib/resize-layout/resize-layout.variable.css +38 -19
  480. package/lib/search-select/index.d.ts +892 -0
  481. package/lib/search-select/index.js +2 -0
  482. package/lib/search-select/index.js.LICENSE.txt +1 -0
  483. package/lib/search-select/input.d.ts +101 -0
  484. package/lib/search-select/menu.d.ts +77 -0
  485. package/lib/search-select/search-select.css +427 -0
  486. package/lib/search-select/search-select.d.ts +361 -0
  487. package/lib/search-select/search-select.less +384 -0
  488. package/lib/search-select/search-select.variable.css +549 -0
  489. package/lib/search-select/selected.d.ts +155 -0
  490. package/lib/search-select/utils.d.ts +88 -0
  491. package/lib/select/common.d.ts +5 -12
  492. package/lib/select/index.d.ts +1697 -760
  493. package/lib/select/index.js +2 -1
  494. package/lib/select/index.js.LICENSE.txt +1 -0
  495. package/lib/select/option.d.ts +22 -6
  496. package/lib/select/optionGroup.d.ts +3 -3
  497. package/lib/select/select.css +209 -113
  498. package/lib/select/select.d.ts +747 -162
  499. package/lib/select/select.less +342 -197
  500. package/lib/select/select.variable.css +241 -117
  501. package/lib/select/selectTagInput.d.ts +94 -0
  502. package/lib/select/type.d.ts +25 -15
  503. package/lib/shared/dom.d.ts +3 -0
  504. package/lib/shared/helper.d.ts +9 -0
  505. package/lib/shared/hooks/use-form-item.d.ts +2 -0
  506. package/lib/shared/hooks/use-form.d.ts +2 -0
  507. package/lib/shared/index.d.ts +33 -8
  508. package/lib/shared/index.js +1 -1
  509. package/lib/shared/mask-manager.d.ts +21 -7
  510. package/lib/shared/pop-manager.d.ts +16 -5
  511. package/lib/shared/popover.d.ts +7 -3
  512. package/lib/shared/token.d.ts +4 -0
  513. package/lib/shared/utils.d.ts +19 -0
  514. package/lib/shared/vue-types.d.ts +116 -9
  515. package/lib/sideslider/index.d.ts +294 -183
  516. package/lib/sideslider/index.js +2 -1
  517. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  518. package/lib/sideslider/sideslider.css +58 -11
  519. package/lib/sideslider/sideslider.d.ts +136 -65
  520. package/lib/sideslider/sideslider.less +75 -14
  521. package/lib/sideslider/sideslider.variable.css +90 -15
  522. package/lib/slider/index.d.ts +384 -1
  523. package/lib/slider/index.js +2 -1
  524. package/lib/slider/index.js.LICENSE.txt +1 -0
  525. package/lib/slider/slider-button.d.ts +3 -2
  526. package/lib/slider/slider.d.ts +7 -7
  527. package/lib/slider/slider.variable.css +32 -4
  528. package/lib/steps/index.d.ts +102 -96
  529. package/lib/steps/index.js +2 -1
  530. package/lib/steps/index.js.LICENSE.txt +1 -0
  531. package/lib/steps/steps.css +15 -3
  532. package/lib/steps/steps.d.ts +34 -34
  533. package/lib/steps/steps.less +24 -3
  534. package/lib/steps/steps.variable.css +47 -7
  535. package/lib/styles/index.d.ts +10 -1
  536. package/lib/styles/mixins/clearfix.css +8 -0
  537. package/lib/styles/mixins/clearfix.less +10 -0
  538. package/lib/styles/mixins/clearfix.variable.css +8 -0
  539. package/lib/styles/mixins/mixins.css +51 -0
  540. package/lib/styles/mixins/mixins.less +2 -0
  541. package/lib/styles/mixins/mixins.variable.css +51 -0
  542. package/lib/styles/mixins/popper.css +1 -1
  543. package/lib/styles/mixins/popper.less +12 -11
  544. package/lib/styles/mixins/popper.variable.css +123 -1
  545. package/lib/styles/mixins/scroll.css +17 -0
  546. package/lib/styles/mixins/scroll.less +22 -0
  547. package/lib/styles/mixins/scroll.variable.css +139 -0
  548. package/lib/styles/reset.css +36 -0
  549. package/lib/styles/reset.less +26 -2
  550. package/lib/styles/reset.variable.css +36 -0
  551. package/lib/styles/themes/themes.less +42 -4
  552. package/lib/swiper/index.d.ts +60 -44
  553. package/lib/swiper/swiper.d.ts +1 -1
  554. package/lib/switcher/index.d.ts +99 -92
  555. package/lib/switcher/index.js +1 -1
  556. package/lib/switcher/switcher.css +57 -6
  557. package/lib/switcher/switcher.d.ts +20 -14
  558. package/lib/switcher/switcher.less +3 -26
  559. package/lib/switcher/switcher.variable.css +106 -27
  560. package/lib/tab/index.d.ts +170 -134
  561. package/lib/tab/index.js +1 -1
  562. package/lib/tab/props.d.ts +93 -41
  563. package/lib/tab/tab-nav.d.ts +51 -15
  564. package/lib/tab/tab-panel.d.ts +16 -9
  565. package/lib/tab/tab.css +151 -55
  566. package/lib/tab/tab.d.ts +44 -23
  567. package/lib/tab/tab.less +179 -86
  568. package/lib/tab/tab.variable.css +183 -59
  569. package/lib/table/cache.d.ts +6 -0
  570. package/lib/table/components/index.d.ts +3 -0
  571. package/lib/table/components/table-cell.d.ts +51 -0
  572. package/lib/table/components/table-column.d.ts +305 -0
  573. package/lib/table/components/table-row.d.ts +2 -0
  574. package/lib/table/const.d.ts +128 -1
  575. package/lib/table/index.d.ts +1364 -99
  576. package/lib/table/index.js +1 -1
  577. package/lib/table/plugins/body-empty.d.ts +36 -0
  578. package/lib/table/plugins/col-group.d.ts +38 -0
  579. package/lib/table/plugins/common.d.ts +6 -0
  580. package/lib/table/plugins/head-filter.css +30 -14
  581. package/lib/table/plugins/head-filter.d.ts +26 -0
  582. package/lib/table/plugins/head-filter.less +79 -52
  583. package/lib/table/plugins/head-filter.variable.css +62 -18
  584. package/lib/table/plugins/head-sort.css +7 -3
  585. package/lib/table/plugins/head-sort.d.ts +29 -0
  586. package/lib/table/plugins/head-sort.less +8 -4
  587. package/lib/table/plugins/head-sort.variable.css +39 -7
  588. package/lib/table/plugins/index.d.ts +5 -0
  589. package/lib/table/plugins/settings.css +147 -0
  590. package/lib/table/plugins/settings.d.ts +37 -0
  591. package/lib/table/plugins/settings.less +181 -0
  592. package/lib/table/plugins/settings.variable.css +269 -0
  593. package/lib/table/plugins/use-active-columns.d.ts +16 -0
  594. package/lib/table/plugins/use-column-resize.d.ts +15 -0
  595. package/lib/table/plugins/use-fixed-column.d.ts +26 -0
  596. package/lib/table/plugins/use-pagination.d.ts +16 -0
  597. package/lib/table/plugins/use-scroll-loading.d.ts +5 -0
  598. package/lib/table/props.d.ts +367 -19
  599. package/lib/table/render.d.ts +46 -18
  600. package/lib/table/table.css +1181 -33
  601. package/lib/table/table.d.ts +270 -19
  602. package/lib/table/table.less +314 -18
  603. package/lib/table/table.variable.css +1213 -37
  604. package/lib/table/use-column.d.ts +12 -0
  605. package/lib/table/use-common.d.ts +113 -0
  606. package/lib/table/utils.d.ts +52 -12
  607. package/lib/table-column/index.d.ts +797 -0
  608. package/lib/table-column/index.js +1 -0
  609. package/lib/tag/index.d.ts +89 -71
  610. package/lib/tag/index.js +1 -1
  611. package/lib/tag/tag.css +46 -13
  612. package/lib/tag/tag.d.ts +17 -13
  613. package/lib/tag/tag.less +46 -10
  614. package/lib/tag/tag.variable.css +78 -17
  615. package/lib/tag-input/common.d.ts +13 -1
  616. package/lib/tag-input/index.d.ts +1194 -1
  617. package/lib/tag-input/index.js +1 -1
  618. package/lib/tag-input/list-tag-render.d.ts +2 -5
  619. package/lib/tag-input/tag-input.css +23 -26
  620. package/lib/tag-input/tag-input.d.ts +303 -44
  621. package/lib/tag-input/tag-input.less +103 -105
  622. package/lib/tag-input/tag-input.variable.css +55 -30
  623. package/lib/tag-input/tag-props.d.ts +142 -8
  624. package/lib/tag-input/tag-render.d.ts +31 -5
  625. package/lib/time-picker/index.d.ts +833 -0
  626. package/lib/time-picker/index.js +1 -0
  627. package/lib/time-picker/time-picker.css +215 -0
  628. package/lib/time-picker/time-picker.less +260 -0
  629. package/lib/time-picker/time-picker.variable.css +337 -0
  630. package/lib/timeline/index.d.ts +61 -32
  631. package/lib/timeline/index.js +1 -1
  632. package/lib/timeline/timeline.css +16 -9
  633. package/lib/timeline/timeline.d.ts +3 -3
  634. package/lib/timeline/timeline.less +22 -9
  635. package/lib/timeline/timeline.variable.css +48 -13
  636. package/lib/transfer/const.d.ts +5 -0
  637. package/lib/transfer/index.d.ts +273 -191
  638. package/lib/transfer/index.js +1 -1
  639. package/lib/transfer/props.d.ts +59 -0
  640. package/lib/transfer/transfer.css +153 -92
  641. package/lib/transfer/transfer.d.ts +102 -96
  642. package/lib/transfer/transfer.less +142 -112
  643. package/lib/transfer/transfer.variable.css +191 -102
  644. package/lib/tree/constant.d.ts +63 -0
  645. package/lib/tree/index.d.ts +387 -107
  646. package/lib/tree/index.js +1 -1
  647. package/lib/tree/props.d.ts +138 -3
  648. package/lib/tree/tree.css +181 -9
  649. package/lib/tree/tree.d.ts +185 -21
  650. package/lib/tree/tree.less +54 -3
  651. package/lib/tree/tree.variable.css +213 -13
  652. package/lib/tree/use-empty.d.ts +6 -0
  653. package/lib/tree/use-node-action.d.ts +12 -0
  654. package/lib/tree/use-node-async.d.ts +5 -0
  655. package/lib/tree/use-node-attribute.d.ts +42 -0
  656. package/lib/tree/use-node-drag.d.ts +3 -0
  657. package/lib/tree/use-search.d.ts +11 -0
  658. package/lib/tree/use-tree-init.d.ts +15 -0
  659. package/lib/tree/util.d.ts +4 -6
  660. package/lib/upload/index.d.ts +509 -0
  661. package/lib/upload/index.js +2 -0
  662. package/lib/upload/index.js.LICENSE.txt +1 -0
  663. package/lib/upload/props.d.ts +111 -0
  664. package/lib/upload/upload-list.d.ts +47 -0
  665. package/lib/upload/upload-trigger.d.ts +51 -0
  666. package/lib/upload/upload.css +427 -0
  667. package/lib/upload/upload.d.ts +246 -0
  668. package/lib/upload/upload.less +466 -0
  669. package/lib/upload/upload.type.d.ts +78 -0
  670. package/lib/upload/upload.variable.css +549 -0
  671. package/lib/upload/use-ajax-upload.d.ts +3 -0
  672. package/lib/upload/use-file-handler.d.ts +21 -0
  673. package/lib/virtual-render/index.d.ts +117 -144
  674. package/lib/virtual-render/index.js +1 -1
  675. package/lib/virtual-render/props.d.ts +25 -1
  676. package/lib/virtual-render/use-tag-render.d.ts +7 -0
  677. package/lib/virtual-render/v-virtual-render.d.ts +0 -1
  678. package/lib/virtual-render/virtual-render.css +17 -17
  679. package/lib/virtual-render/virtual-render.d.ts +50 -4
  680. package/lib/virtual-render/virtual-render.less +2 -23
  681. package/lib/virtual-render/virtual-render.variable.css +139 -17
  682. package/lib/volar.components.d.ts +102 -0
  683. package/package.json +64 -43
  684. package/LICENSE.txt +0 -22
  685. package/lib/form/common.d.ts +0 -3
  686. package/lib/use-form.d.ts +0 -3
package/lib/tree/index.js CHANGED
@@ -1 +1 @@
1
- !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("../icon/"),require("../virtual-render"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon/","../virtual-render"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("../icon/"),require("../virtual-render")):n(e["../shared"],e.vue,e["../icon/"],e["../virtual-render"]);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,((e,n,t,r)=>(()=>{var o={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||[],f=(e=e||{}).node||r,d=void 0!==e.clockseq?e.clockseq:o;if(null==f||null==d){var p=i();null==f&&(f=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=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&&(d=d+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=d;var _=(1e4*(268435455&(v+=122192928e5))+y)%4294967296;s[c++]=_>>>24&255,s[c++]=_>>>16&255,s[c++]=_>>>8&255,s[c++]=255&_;var m=v/4294967296*1e4&268435455;s[c++]=m>>>8&255,s[c++]=255&m,s[c++]=m>>>24&15|16,s[c++]=m>>>16&255,s[c++]=d>>>8|128,s[c++]=255&d;for(var g=0;g<6;++g)s[c+g]=f[g];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)}},7685:e=>{"use strict";e.exports=t},4212:n=>{"use strict";n.exports=e},3511:e=>{"use strict";e.exports=r},748:e=>{"use strict";e.exports=n}},i={};function a(e){var n=i[e];if(void 0!==n)return n.exports;var t=i[e]={exports:{}};return o[e](t,t.exports,a),t.exports}a.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return a.d(n,{a:n}),n},a.d=(e,n)=>{for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},a.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{"use strict";a.r(l),a.d(l,{default:()=>T});var e=a(4212);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)}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var r=a(748),o=a(7685),i=a(3511),u=a.n(i),c={data:e.PropTypes.arrayOf(e.PropTypes.any).def([]),label:e.PropTypes.oneOfType([e.PropTypes.func.def(void 0),e.PropTypes.string.def("label")]),children:e.PropTypes.string.def("children"),indent:e.PropTypes.number.def(18),lineHeight:e.PropTypes.number.def(32),levelLine:e.PropTypes.oneOfType([e.PropTypes.bool.def(!1),e.PropTypes.func.def(void 0),e.PropTypes.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:e.PropTypes.bool.def(!1),prefixIcon:e.PropTypes.oneOfType([e.PropTypes.func.def((function(){})),e.PropTypes.bool.def(!1)]).def(!0),async:e.PropTypes.shape({callback:e.PropTypes.func.def(null),cache:e.PropTypes.bool.def(!0)}),offsetLeft:e.PropTypes.number.def(5)};function s(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 f(e){return function(e){if(Array.isArray(e))return s(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 s(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)?s(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 d=a(8022),p=void 0,v="1px dashed #c3cdd7",y=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=e.data,a=e.children,l=[],u=0,c=new Map;function s(e,n,t,r){var i=(o||[]).find((function(n){return n.__uuid===e}));return i?i[r]:n[t]}function f(e,n){return s(e,n,"isOpen","__isOpen")}function p(e,n){return s(e,n,"checked","__checked")}function v(e){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=e.length,y=0;y<s;y++){var h=e[y];if(Array.isArray(h))v(h,r,o,i);else if("object"===n(h)&&null!==h){var _=h.__uuid||(0,d.v4)(),m=null!==i?"".concat(i,"-").concat(y):"".concat(y),g=!!(h[a]||[]).length,b=t({__depth:r,__index:y,__uuid:_,__parentId:o,__hasChild:g,__path:m,__isRoot:null===o,__order:u,__isOpen:f(_,h)&&g,__checked:p(_,h)},a,null);Object.assign(h,{__uuid:_}),c.set(_,b),u+=1,l.push(Object.assign(Object.assign({},h),t({},a,null))),Object.prototype.hasOwnProperty.call(h,a)&&v(h[a]||[],r+1,_,m)}}}return v(r||i),[l,c]},h=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:_(t,e,n,i)},_=function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=t[r];if("string"==typeof i)return"object"===n(e)&&null!==e?(Object.prototype.hasOwnProperty.call(e,i)||console.error("cannot find node label with key ".concat(i)),e[i]):i;if("function"==typeof i){var a=i.apply(p,[e].concat(f(o)));return"string"==typeof a?a:void console.error("props label with function return value is not string, please check and return string")}},m=function(e,n){return _(e,n,"label")},g=function(e,n){return e.get(n)||{}},b=function(e,n,t){var r;return null===(r=g(e,n))||void 0===r?void 0:r[t]},x=function(e,n){return{"--level-line":h(n,"levelLine",e,v,null,["tree"]),"--lineHeight":"".concat(n.lineHeight,"px"),"--indent":"".concat(n.indent,"px"),"--offset-left":"".concat(n.offsetLeft,"px")}},N=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.schema,o=b(r,e.__uuid,"__depth");return Object.assign({"--depth":o},"function"==typeof n.levelLine?{"--level-line":h(n,"levelLine",e,v,null,["node"])}:{})},O=function(e,n,t){var r=g(n,e.__uuid)||{};return{"is-root":r.__isRoot,"bk-tree-node":!0,"is-open":r.__isOpen,"is-virtual-render":t.virtualRender,"level-line":t.levelLine}},j=function(n,r){return t({"is-checked":(g(r,n.__uuid)||{}).__checked},(0,e.resolveClassName)("node-row"),!0)},P=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||{})};const C=(0,r.defineComponent)({name:"Tree",props:c,emits:["check"],setup:function(i,a){var l=y(i),u=[],c=(0,r.reactive)({data:l[0],schema:l[1],levelLineSchema:{}});(0,r.watch)((function(){return[i.data]}),(function(e){var n=y(i,e,s.value);c.data=n[0],c.schema=n[1]}),{deep:!0});var s=(0,r.computed)((function(){return Array.from(c.schema.values())})),f=function(e){return c.schema.get(e)},d=function(e,n){var t;return null===(t=f(e.__uuid))||void 0===t?void 0:t[n]},p=function(e,n,r){return c.schema.set(e.__uuid,Object.assign(Object.assign({},f(e.__uuid)),t({},n,r)))},v=function(e){return d(e,"__path")},h=function(e){return d(e,"__isRoot")},_=function(e){return d(e,"__isOpen")},m=function(e){return d(e,"__hasChild")},g=(0,r.computed)((function(){return c.data.filter((function(e){return C(e)}))})),b=function(e){var t;return"object"===n(e)?_(e):"string"==typeof e&&(null===(t=f(e))||void 0===t?void 0:t.__isOpen)},x=function(n){return b(n)?(0,r.createVNode)(o.FolderShapeOpen,{class:(0,e.resolveClassName)("tree-icon")},null):(0,r.createVNode)(o.Folder,{class:(0,e.resolveClassName)("tree-icon")},null)},N=function(e){if("string"==typeof e)return e;if("object"===n(e)&&null!==e){if(e.__v_isVNode)return e;var t=e.node,o=e.className,i=e.text,a=e.style;return(0,r.h)(t,{class:o,style:a},i)}return null},O=function(e,r){if("object"===n(e)&&null!==e){p(r,"__isOpen",!0);var o=Array.isArray(e)?e:[e];!function(e,n,r,o,i){P(e,n,r,t({},o,i))}(v(r),i.data,i.children,i.children,o)}},j=function(e){if(e.async){var n=i.async||{},t=n.callback,r=void 0===t?null:t,o=n.cache,a=void 0===o||o;if("function"==typeof r){if(e.cached)return;Object.assign(e,{loading:!0}),r(e,(function(n){return O(n,e)})).then((function(n){return O(n,e)})).catch((function(e){return console.error("load remote data error:",e)})).finally((function(){P(v(e),i.data,i.children,Object.assign({loading:!1},a?{cached:!0}:{}))}))}else console.error("async need to set prop: asyncLoad with function wich will return promise object")}m(e)&&function(e){var n=!b(e);p(e,"__isOpen",n),n||g.value.filter((function(n){return String.prototype.startsWith.call(v(n),v(e))})).forEach((function(e){return p(e,"__isOpen",n)}))}(e)},C=function(e){return h(e)||b(e)||b(d(e,"__parentId"))},T=(0,r.ref)(),w=function(){var n;if(null===(n=T.value)||void 0===n?void 0:n.$el){var t=".".concat((0,e.resolveClassName)("tree-node")),r=".".concat((0,e.resolveClassName)("node-content"));Array.prototype.forEach.call(T.value.$el.querySelectorAll(t),(function(e){var n=e.querySelectorAll("".concat(r," span")),t=Array.prototype.slice.call(n,-1)[0];if(t){var o=e.offsetWidth-t.offsetLeft;t.style.setProperty("max-width","".concat(o,"px"))}}))}};return(0,r.onMounted)((function(){w()})),(0,r.onUpdated)((function(){w()})),{renderData:g,flatData:c,root:T,hanldeTreeNodeClick:j,handleNodeContentClick:function(e){u.includes(e.__uuid)||(u.forEach((function(e){return p({__uuid:e},"__checked",!1)})),u.length=0,p(e,"__checked",!0),u.push(e.__uuid),_(e)||j(e),a.emit("check",e,f(e.__uuid)))},handleNodeActionClick:function(e,n){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),j(n)},getActionIcon:function(e){var n=null;return"function"==typeof i.prefixIcon&&"default"!==(n=i.prefixIcon(h(e),m(e)||e.async,b(e),"action",e))?N(n):("default"===n||"boolean"==typeof i.prefixIcon&&i.prefixIcon)&&(m(e)||e.async)?b(e)?(0,r.createVNode)(o.DownShape,null,null):(0,r.createVNode)(o.RightShape,null,null):null},getRootIcon:x,getVirtualLines:function(e){if(!i.levelLine)return null;var n=d(e,"__depth")+1;return new Array(n).fill("").map((function(e,n){return n})).filter((function(n){return function(e,n){if(h(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 s.value.some((function(e){return e.__path===a}))}(n,e)})).filter((function(e){return e>0})).map((function(e){return(0,r.createVNode)("span",{class:"node-virtual-line",style:(t=n-e,{"--depth":t})},null);var t}))},getNodePrefixIcon:function(n){var t=null;return"function"==typeof i.prefixIcon&&"default"!==(t=i.prefixIcon(h(n),m(n)||n.async,b(n),"node_type",n))?N(t):"default"===t||"boolean"==typeof i.prefixIcon&&i.prefixIcon?h(n)||m(n)?x(n):(0,r.createVNode)(o.TextFile,{class:(0,e.resolveClassName)("tree-icon")},null):null},getLoadingIcon:function(e){return e.loading?(0,r.createVNode)(o.Spinner,null,null):""}}},render:function(){var n=this,t=this.$props,o=function(o){return(0,r.createVNode)("div",{class:j(o,n.flatData.schema)},[(0,r.createVNode)("div",{class:O(o,n.flatData.schema,t),style:N(o,t,n.flatData),onClick:function(){return n.handleNodeContentClick(o)}},[(0,r.createVNode)("span",{class:(0,e.resolveClassName)("node-action"),onClick:function(e){return n.handleNodeActionClick(e,o)}},[n.getActionIcon(o)]),(0,r.createVNode)("span",{class:(0,e.resolveClassName)("node-content")},[[n.getNodePrefixIcon(o),n.getLoadingIcon(o)],(0,r.createVNode)("span",{class:(0,e.resolveClassName)("node-text")},[m(o,t)])]),n.getVirtualLines(o)])])};return(0,r.createVNode)(u(),{class:(0,e.resolveClassName)("tree"),style:x(null,t),list:this.renderData,lineHeight:t.lineHeight,enabled:t.virtualRender,contentClassName:(0,e.resolveClassName)("container"),throttleDelay:0,ref:"root"},{default:function(e){return(e.data||[]).map(o)}})}}),T=(0,e.withInstall)(C)})(),l})()));
1
+ !function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("../shared"),require("vue"),require("../virtual-render"),require("vue-types"),require("../exception"),require("../checkbox"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../virtual-render","vue-types","../exception","../checkbox","../icon"],n);else{var t="object"==typeof exports?n(require("../shared"),require("vue"),require("../virtual-render"),require("vue-types"),require("../exception"),require("../checkbox"),require("../icon")):n(e["../shared"],e.vue,e["../virtual-render"],e["vue-types"],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,a)=>(()=>{var l={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,d=n||[],s=(e=e||{}).node||r,f=void 0!==e.clockseq?e.clockseq:o;if(null==s||null==f){var p=i();null==s&&(s=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,_=v-l+(y-u)/1e4;if(_<0&&void 0===e.clockseq&&(f=f+1&16383),(_<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;d[c++]=N>>>24&255,d[c++]=N>>>16&255,d[c++]=N>>>8&255,d[c++]=255&N;var h=v/4294967296*1e4&268435455;d[c++]=h>>>8&255,d[c++]=255&h,d[c++]=h>>>24&15|16,d[c++]=h>>>16&255,d[c++]=f>>>8|128,d[c++]=255&f;for(var E=0;E<6;++E)d[c+E]=s[E];return n||a(d)}},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=i},9911:e=>{"use strict";e.exports=o},6870:e=>{"use strict";e.exports=a},4212:n=>{"use strict";n.exports=e},3511:e=>{"use strict";e.exports=t},748:e=>{"use strict";e.exports=n},210:e=>{"use strict";e.exports=r}},u={};function c(e){var n=u[e];if(void 0!==n)return n.exports;var t=u[e]={exports:{}};return l[e](t,t.exports,c),t.exports}c.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return c.d(n,{a:n}),n},c.d=(e,n)=>{for(var t in n)c.o(n,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},c.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{"use strict";c.r(d),c.d(d,{default:()=>q});var e,n,t,r=c(4212),o=c(748),i=c(3511),a=c.n(i);function l(e){return l="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},l(e)}function u(e,n,t){return(n=function(e){var n=function(e,n){if("object"!==l(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(n)?n:String(n)}(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",e.NODE_DRAG_START="nodeDragStart",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DROP="nodeDrop"}(t||(t={}));var s,f=function(){return!0},p=(u(e={},t.NODE_CLICK,f),u(e,t.NODE_COLLAPSE,f),u(e,t.NODE_EXPAND,f),u(e,t.NODE_CHECKED,f),u(e,t.NODE_DRAG_START,f),u(e,t.NODE_DRAG_OVER,f),u(e,t.NODE_DRAG_LEAVE,f),u(e,t.NODE_DROP,f),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__",e.SOURCE_ITEM="__source_item__"}(s||(s={}));var v,y=(u(n={},s.IS_OPEN,"isOpen"),u(n,s.IS_SELECTED,"selected"),u(n,s.IS_MATCH,"isMatch"),u(n,s.HAS_CHILD,"hasChild"),u(n,s.IS_CHECKED,"checked"),u(n,s.IS_ASYNC,"async"),u(n,s.IS_LOADING,"loading"),u(n,s.IS_ROOT,"isRoot"),n);!function(e){e.CLICK="click",e.SELECTED="selected",e.EXPAND="expand",e.COLLAPSE="collapse"}(v||(v={}));var _,N,h,E=c(210);!function(e){e.ONCE="once",e.EVERY="every"}(_||(_={})),function(e){e.FUZZY="fuzzy",e.FULL="full"}(N||(N={})),function(e){e.TREE="tree",e.LIST="list"}(h||(h={}));var I={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:(0,E.toType)("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([(0,E.string)(),r.PropTypes.func]).def(N.FUZZY),resultType:(0,E.string)().def(h.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),disableDrag:r.PropTypes.func,disableDrop:r.PropTypes.func,dragSort:r.PropTypes.bool.def(!1),selectable:r.PropTypes.oneOfType([r.PropTypes.bool,r.PropTypes.func]).def(!0),disabledFolderSelectable:r.PropTypes.bool.def(!1),showCheckbox:r.PropTypes.bool.def(!1),showNodeTypeIcon:r.PropTypes.bool.def(!0),selected:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.number,r.PropTypes.object]),autoCheckChildren:r.PropTypes.bool.def(!0),autoOpenParentNode:r.PropTypes.bool.def(!0),expandAll:r.PropTypes.bool.def(!1),nodeContentAction:r.PropTypes.oneOfType([r.PropTypes.arrayOf((0,E.toType)("nodeContentActionType",{}).def(v.CLICK)),r.PropTypes.func.def((function(){return["selected"]}))]).def(["selected","expand","click"]),keepSlotData:r.PropTypes.bool.def(!1)},S=c(9911),D=c.n(S),T=c(5800),g=c.n(T),C=c(6870);const m=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])),u({},r,o)))},i=function(e){return r(e,s.PATH)},a=function(e){return r(e,s.UUID)},c=function(e){return r(e,s.IS_ROOT)},d=function(e){return r(e,s.IS_OPEN)},f=function(e){return r(e,s.HAS_CHILD)},p=function(e){return r(e,s.IS_MATCH)},v=function(e){return r(e,s.IS_CHECKED)},_=function(e){return r(e,s.PARENT_ID)},N=function(e){return r(u({},s.UUID,e),s.PARENT_ID)},h=function(e){var n;return"object"===l(e)?d(e):"string"==typeof e&&(null===(n=t(e))||void 0===n?void 0:n[s.IS_OPEN])},E=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)},I=function(e){return E(i(u({},s.UUID,e)))},S=function(e){var n;return u(n={},y[s.IS_LOADING],r(e,s.IS_LOADING)),u(n,y[s.HAS_CHILD],f(e)),u(n,y[s.IS_MATCH],p(e)),u(n,y[s.IS_CHECKED],v(e)),u(n,y[s.IS_OPEN],d(e)),u(n,y[s.IS_ROOT],c(e)),u(n,"fullPath",r(e,s.PATH)),u(n,"uuid",a(e)),u(n,"parentId",r(e,s.PARENT_ID)),n};return{getSchemaVal:t,getNodeAttr:r,getNodeId:a,getNodeParentId:_,getNodeParentIdById:N,getParentNodeData:function(e){return c(u({},s.UUID,e))?u({},n.children,n.data):I(N(e))},getParentNode:function(e){return t(_(e))},setNodeAttr:o,getNodePath:i,isRootNode:c,isNodeOpened:d,hasChildNode:f,isItemOpen:h,isNodeChecked:v,isNodeMatched:p,isNodeLoading:function(e){return r(e,s.IS_LOADING)},checkNodeIsOpen:function(e){return c(e)||function(e){return h(r(e,s.PARENT_ID))}(e)},getSourceNodeByPath:E,getSourceNodeByUID:I,deleteNodeSchema:function(n){return e.schema.delete(n)},resolveScopedSlotParam:S,setTreeNodeLoading:function(e,n){o(e,s.IS_LOADING,n)},extendNodeAttr:function(e){return Object.assign(Object.assign({},r(e,s.SOURCE_ITEM)),u({},s.TREE_NODE_ATTR,S(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]}))},extendNodeScopedData:function(e){return{data:r(e,s.SOURCE_ITEM),attributes:S(e)}}}};function A(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}var b="1px dashed #c3cdd7",O=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,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=n[t];if("string"==typeof i)return"object"===l(e)&&null!==e?(Object.prototype.hasOwnProperty.call(e,i)||console.error("cannot find node label with key ".concat(i)),e[i]):i;if("function"==typeof i){var a=i.apply(void 0,[e].concat(function(e){if(Array.isArray(e))return A(e)}(r=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,n){if(e){if("string"==typeof e)return A(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)?A(e,n):void 0}}(r)||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.")}()));return"string"==typeof a?a:void console.error("props label with function return value is not string, please check and return string")}},L=function(e,n){return P(e,n,"label")},U=function(e,n){return e.get(n)||{}},x=function(e,n){return{"--level-line":O(n,"levelLine",e,b,null,["tree"]),"--lineHeight":"".concat(n.lineHeight,"px"),"--indent":"".concat(n.indent,"px"),"--offset-left":"".concat(n.offsetLeft,"px")}},R=function(e,n){var t=function(e,n,t){var r;return null===(r=U(e,n))||void 0===r?void 0:r[t]}((arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).schema,e[s.UUID],s.DEPTH);return Object.assign({"--depth":t},"function"==typeof n.levelLine?{"--level-line":O(n,"levelLine",e,b,null,["node"])}:{})},k=function(e,n,t){var r=U(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=U(n,e[s.UUID])||{};return u({"is-checked":t.__is_checked,"is-selected":t.__is_selected,"node-folder":e.is_folder,"node-leaf":e.is_leaf},(0,r.resolveClassName)("node-row"),!0)},w=function(e){return null==e?{__IS_NULL:!0}:"string"==typeof e||"number"==typeof e||"symbol"===l(e)?u({},s.UUID,e):(Object.prototype.hasOwnProperty.call(e,s.UUID)||console.error("setNodeAction Error: node id cannot found"),e)};const j=function(e,n){var t=m(n,e),r=t.setNodeAttr,o=t.getNodePath,i=t.getNodeAttr,a=t.resolveScopedSlotParam,c=t.setTreeNodeLoading,d=function(n,t){if("object"===l(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,u({},r,o))}(o(t),e.data,e.children,e.children,i),Promise.resolve(n)}return Promise.resolve(n)},f=function(n){var t=e.async||{},o=t.callback,u=void 0===o?null:o,f=t.cache,p=void 0===f||f;if("function"==typeof u&&i(n,s.IS_ASYNC)){if(r(n,s.IS_ASYNC_INIT,!0),!i(n,s.IS_CACHED)){r(n,s.IS_CACHED,p);var v=a(n),y=u(n,(function(e){return d(e,n)}),v);if("object"===l(y)&&null!==y)return c(n,!0),y instanceof Promise?Promise.resolve(y.then((function(e){return d(e,n)})).catch((function(e){return console.error("load remote data error:",e)})).finally((function(){c(n,!1),r(n,s.IS_CACHED,!0)}))):(d(y,n),c(n,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)};return{asyncNodeClick:f,deepAutoOpen:function e(){var t=n.data.filter((function(e){return i(e,s.IS_ASYNC)&&e[y[s.IS_OPEN]]&&!i(e,s.IS_ASYNC_INIT)}));t.length&&Promise.all(t.map((function(e){return f(e)}))).then((function(){e()})).catch((function(e){console.warn(e)}))}}},V=function(e,n,i,a,c,d){var f=e.selected,p=m(i,e),v=p.setNodeAttr,y=p.getNodePath,_=p.getSchemaVal,N=p.getNodeAttr,h=p.getNodeId,E=p.getChildNodes,I=p.isRootNode,S=p.hasChildNode,D=p.isItemOpen,T=p.isNodeOpened,A=p.isNodeLoading,b=p.isNodeChecked,O=p.getParentNode,P=p.resolveScopedSlotParam,U=p.extendNodeAttr,x=p.extendNodeScopedData,V=d.registerNextLoop,M=j(e,i),K=M.asyncNodeClick,G=M.deepAutoOpen,q=function(e){if("string"==typeof e)return e;if("object"===l(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(ie(t));var i=null;return A(t)?function(e){var t,r,i;return(null!==(i=null===(r=(t=n.slots).nodeLoading)||void 0===r?void 0:r.call(t,ie(e)))&&void 0!==i?i:A(e))?(0,o.createVNode)(C.Spinner,null,null):""}(t):"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(ie(t),"node_action"))?q(i):("default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon)&&(S(t)||t.async||!e.autoCheckChildren)?D(t)?(0,o.createVNode)(C.DownShape,{class:(0,r.resolveClassName)("node-prefix")},null):(0,o.createVNode)(C.RightShape,{class:(0,r.resolveClassName)("node-prefix")},null):null},F=function(t){if(!e.showNodeTypeIcon)return null;if(n.slots.nodeType)return n.slots.nodeType(ie(t));var i=null;return"function"==typeof e.prefixIcon&&"default"!==(i=e.prefixIcon(ie(t),"node_type"))?q(i):"default"===i||"boolean"==typeof e.prefixIcon&&e.prefixIcon?I(t)||S(t)?function(e){return D(e)?(0,o.createVNode)(C.FolderShapeOpen,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null):(0,o.createVNode)(C.Folder,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null)}(t):(0,o.createVNode)(C.TextFile,{class:[(0,r.resolveClassName)("tree-icon"),(0,r.resolveClassName)("node-prefix")]},null):null},X=function e(n,t){var r=O(n);r&&(v(r,s.IS_CHECKED,t),I(r)||e(r,t))},z=function e(n,t,r){E(n).forEach((function(n){v(u({},s.UUID,n),t,r),e(u({},s.UUID,n),t,r)}))},B=function(e,r){v(e,s.IS_CHECKED,!!r),z(e,s.IS_CHECKED,!!r),X(e,r),n.emit(t.NODE_CHECKED,c.value.filter((function(e){return b(e)})).map((function(e){return e[s.UUID]})))},W=function(e){return b(e)&&!c.value.filter((function(n){var t;return null===(t=y(n))||void 0===t?void 0:t.startsWith(y(e))})).every((function(e){return b(e)}))},J=function(e){return b(e)||c.value.filter((function(n){var t;return null===(t=y(n))||void 0===t?void 0:t.startsWith(y(e))})).some((function(e){return b(e)}))},Z=function(n){return e.showCheckbox?(0,o.createVNode)(g(),{size:"small",modelValue:J(n),indeterminate:W(n),onChange:function(e){return B(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?!D(e):!!r;if(a||z(e,s.IS_OPEN,a),v(e,s.IS_OPEN,a),i){var l=D(e)?t.NODE_EXPAND:t.NODE_COLLAPSE,u=N(e,s.SOURCE_ITEM);n.emit(l,u,P(e),_(e[s.UUID]),o)}},Q=function(e,n,t){Array.isArray(e)?e.forEach((function(e){return v(w(e),n,t)})):v(w(e),n,t)},ee=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=w(n);o[s.IS_NULL]||(r?t?(Q(o,s.IS_OPEN,!0),I(o)||e(N(o,s.PARENT_ID),!0,!0)):$(o,!1,null,!1):Q(o,s.IS_OPEN,t))},ne=function(e,n){T(e)?$(e,!1,n):K(e).finally((function(){N(e,s.IS_LOADING)?V("setNodeOpenedAfterLoading",{type:"once",fn:function(){return $(e,!0,n)}}):$(e,!0,n)}))},te=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 l=w(a[0]);l[s.IS_NULL]||(!e.selectable||"function"==typeof e.selectable&&!e.selectable(t)||e.disabledFolderSelectable&&!0===(null==t?void 0:t.is_folder)?console.warn("props.selectable is false or undefined, please set selectable with true"):(null!=f&&v(u({},s.UUID,f),s.IS_SELECTED,!r),e.selected&&e.selected!==f&&v(u({},s.UUID,e.selected),s.IS_SELECTED,!r),v(l,s.IS_SELECTED,r),f=h(l),i&&1===a.length&&ee(l,!0,!0),N(l,s.IS_ASYNC)&&K(l).then((function(){(0,o.nextTick)((function(){a.shift(),n(a,r,i)}))}))))}},re=function(n){if(!e.levelLine)return null;var t=N(n,s.DEPTH)+1;return new Array(t).fill("").map((function(e,n){return n})).filter((function(e){return function(e,n){if(I(n))return!1;var t=y(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 c.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}))},oe=function(t){var r,o,i,a;return n.slots.node?null===(o=(r=n.slots).node)||void 0===o?void 0:o.call(r,ie(t)):n.slots.default?null===(a=(i=n.slots).default)||void 0===a?void 0:a.call(i,x(t)):[L(t,e)]},ie=function(n){return e.keepSlotData?x(n):U(n)};return{renderTreeNode:function(a){var l,u;return(0,o.createVNode)("div",{"data-tree-node":h(a),key:h(a),class:H(a,i.schema)},[(0,o.createVNode)("div",{class:k(a,i.schema,e),style:R(a,e,i),onClick:function(r){return function(r,o){var i,a=(i=r,"function"==typeof e.nodeContentAction?Reflect.apply(e.nodeContentAction,void 0,[{node:i}]):"string"==typeof e.nodeContentAction?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"]);if(a.includes("selected")&&te(r,!0,!1),a.includes("expand")&&(T(r)||ne(r,o)),a.includes("collapse")&&T(r)&&ne(r,o),a.includes("click")){var l=t.NODE_CLICK,u=N(r,s.SOURCE_ITEM);n.emit(l,u,P(r),_(r[s.UUID]),o)}}(a,r)}},[(0,o.createVNode)("div",{class:[(0,r.resolveClassName)("node-action")],onClick:function(e){return function(e,n){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),ne(n,e)}(e,a)}},[Y(a)]),(0,o.createVNode)("div",{class:(0,r.resolveClassName)("node-content")},[[Z(a),F(a)],(0,o.createVNode)("span",{class:(0,r.resolveClassName)("node-text")},[oe(a)]),null===(u=(l=n.slots).nodeAppend)||void 0===u?void 0:u.call(l,ie(a))]),re(a)])])},handleTreeNodeClick:ne,deepAutoOpen:G,asyncNodeClick:K,setNodeAction:Q,setNodeOpened:$,setSelect:te,setOpen:ee}};var M=c(8022),K=void 0;const G=(0,o.defineComponent)({name:"Tree",props:I,emits:p,setup:function(e,n){var i=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=[],c=[],d=0,f=new Map;function p(e,n,t,r){if(null!=e&&f.has(e)&&![s.UUID,s.PARENT_ID].includes(n)){var o=f.get(e);Object.prototype.hasOwnProperty.call(o,n)&&"function"==typeof r&&Reflect.apply(r,self,[o,n,t])&&(Object.assign(o,u({},n,t)),p(o[s.PARENT_ID],n,t,r))}}function v(n){var t=null;return"string"==typeof e.nodeKey&&(t=n[e.nodeKey]||(0,M.v4)()),t||n[s.UUID]||(0,M.v4)()}var _=(u(n={},s.IS_OPEN,(function(){return!!e.expandAll})),u(n,s.IS_CHECKED,(function(){return!1})),u(n,s.IS_MATCH,(function(){return!0})),u(n,s.IS_SELECTED,(function(n){return e.selected===n})),u(n,s.IS_CACHED,(function(){return!1})),u(n,s.IS_ASYNC,(function(){return null})),u(n,s.IS_LOADING,(function(){return!1})),n);function N(e,n,t){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=o;void 0===o&&"function"==typeof _[t]&&(i=_[t](e,n));var a=y[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 h(n,t){return!!e.selectable&&N(n,t,s.IS_SELECTED,e.selected===n)}function E(e,n,t){var r,o=N(e,n,s.IS_OPEN),i=!f.has(t)||(null===(r=f.get(t))||void 0===r?void 0:r[s.IS_OPEN]);return o&&i}function I(e){return!e[s.IS_OPEN]}return function n(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,y=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,_=t.length,S=0;S<_;S++){var D=t[S];if(Array.isArray(D))n(D,r,o,y);else if("object"===l(D)&&null!==D){var T,g,C=null!==y?"".concat(y,"-").concat(S):"".concat(S),m="".concat(v(D)),A=!!(D[i]||[]).length,b=N(m,D,s.IS_OPEN);e.autoOpenParentNode?b&&p(o,s.IS_OPEN,!0,I):b=E(m,D,o);var O=e.showCheckbox&&N(m,D,s.IS_CHECKED);O&&a.push(m),f.set(m,(u(T={},s.DEPTH,r),u(T,s.INDEX,S),u(T,s.UUID,m),u(T,s.PARENT_ID,o),u(T,s.HAS_CHILD,A),u(T,s.PATH,C),u(T,s.IS_ROOT,null===o),u(T,s.ORDER,d),u(T,s.IS_SELECTED,h(m,D)),u(T,s.IS_MATCH,N(m,D,s.IS_MATCH)),u(T,s.IS_OPEN,b),u(T,s.IS_CHECKED,O),u(T,s.IS_CACHED,N(m,D,s.IS_CACHED)),u(T,s.IS_ASYNC,N(m,D,s.IS_ASYNC)),u(T,s.IS_LOADING,N(m,D,s.IS_LOADING)),u(T,s.SOURCE_ITEM,D),u(T,i,null),T)),d+=1,c.push((u(g={},s.UUID,m),u(g,e.label,D[e.label]),u(g,s.IS_OPEN,b),u(g,i,null),g)),Object.prototype.hasOwnProperty.call(D,i)&&n(D[i]||[],r+1,m,C)}}}(t||o),e.showCheckbox&&(null==a||a.forEach((function(e){Array.from(f.values()).filter((function(n){var t;return null===(t=n[s.PATH])||void 0===t?void 0:t.startsWith(f.get(e)[s.PATH])})).forEach((function(e){return Object.assign(e,u({},s.IS_CHECKED,!0))})),p(e,s.IS_CHECKED,!0,(function(){return!0}))}))),[c,f]},r=t(e),i=new Map,a=[],c=[],d=(0,o.reactive)({data:r[0],schema:r[1],levelLineSchema:{}}),f=(0,o.computed)((function(){return Array.from(d.schema.values())})),p=j(e,d),v=p.asyncNodeClick,_=p.deepAutoOpen,N=function(e,n){(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&i.has(e)&&i.delete(e),i.set(e,n)},h=function(e){var n,t=function(e){return"function"==typeof e?{type:"loop",fn:e}:"object"===l(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,K,[]),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,f.value);d.data=a[0],d.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)&&_(),Array.from(i.keys()).forEach((function(e){var n=i.get(e);if(Array.isArray(n)){var t=[];n.forEach((function(e,n){"once"===h(e)&&t.unshift(n)})),t.length&&t.forEach((function(e){return n.splice(e,1)})),0===n.length&&i.delete(e)}else"once"===h(n)&&i.delete(e)}))}),{deep:!0}),e.selectable&&(0,o.onMounted)((function(){(0,o.watch)((function(){return e.selected}),(function(e){c.length=0,a.forEach((function(n){Reflect.apply(n,K,[e]),c.push((function(){return Reflect.apply(n,K,[e])}))})),N("afterSelectWatch",c)}),{immediate:!0})})),(null===(n=e.async)||void 0===n?void 0:n.callback)&&_(),{flatData:d,schemaValues:f,asyncNodeClick:v,deepAutoOpen:_,afterDataUpdate:function(e){N("afterDataUpdate",e)},registerNextLoop:N,onSelected:function(e){a.push(e)}}}(e),c=i.flatData,d=i.schemaValues,f=i.onSelected,p=i.registerNextLoop,v=m(c,e),_=v.setNodeAttr,N=v.checkNodeIsOpen,h=v.getNodeAttr,E=v.getNodePath,I=v.isRootNode,S=v.isNodeOpened,T=v.isNodeChecked,g=v.isNodeMatched,C=v.hasChildNode,A=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,u=r.resultType,c=void 0===u?"tree":u,d=function(e){return["string","number","boolean"].includes(l(e))},s=function(e,n){return e===n},f=function(e,n){return new RegExp("".concat(e),"i").test("".concat(n))},p=function(e,n){return Reflect.apply(e,void 0,n)},v=void 0===t.value||!1===t.value,y=(0,o.computed)((function(){return!1!==t.value&&(d(t.value)?"".concat(t.value).length>0:"object"===l(t.value))}));return{searchFn:function(e,n){if(v)return!0;if(d(t.value))return p(f,[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?f:s;return 0==="".concat(i).length||p(u,[i,e,n])},refSearch:t,isSearchActive:y,isSearchDisabled:v,openResultNode:a,resultType:c,isTreeUI:"tree"===c}}(e),b=A.searchFn,O=A.isSearchActive,P=A.refSearch,U=A.openResultNode,R=A.isTreeUI;A.isSearchDisabled||(0,o.watch)([P],(function(){c.data.forEach((function(n){var t=b(L(n,e),n);_(n,s.IS_MATCH,t),U&&F(n,!0,!0)}))}));var k=(0,o.computed)((function(){return c.data.filter((function(e){return N(e)&&function(e){return!O.value||(h(e,s.IS_MATCH)||!!R&&d.value.some((function(n){var t;return(null===(t=n[s.PATH])||void 0===t?void 0:t.startsWith(E(e)))&&n[s.IS_MATCH]})))}(e)}))})),H=V(e,n,c,0,d,{registerNextLoop:p}),G=H.renderTreeNode,q=H.handleTreeNodeClick,Y=H.setNodeOpened,F=H.setOpen,X=H.setNodeAction,z=H.setSelect,B=H.asyncNodeClick;f((function(n){z(n,!0,e.autoOpenParentNode)})),n.expose({handleTreeNodeClick:q,isNodeChecked:T,isRootNode:I,isNodeOpened:S,isNodeMatched:g,hasChildNode:C,setOpen:F,setChecked:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];X(w(e),s.IS_CHECKED,n)},setNodeAction:X,setNodeOpened:Y,setSelect:z,asyncNodeClick:B,getData:function(){return c}});var W=(0,o.ref)(),J=function(e,n){var t=n.slots;return{renderEmpty:function(n){var r,i;return(0,o.createVNode)(D(),{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),Z=J.renderEmpty;return function(e,n,r,i){var a=m(i,e),l=a.getSourceNodeByUID,c=a.getNodeParentIdById,d=a.getParentNodeData,f=a.extendNodeAttr,p=a.getNodeAttr,v=a.getNodePath,y=a.isRootNode,_=(0,o.computed)((function(){return"function"==typeof e.disableDrag})),N=(0,o.computed)((function(){return"function"==typeof e.disableDrop})),h=function(e){return e.target.closest("[data-tree-node]")},E=function(e){var n,t=null===(n=null==e?void 0:e.dataset)||void 0===n?void 0:n.treeNode;return l(t)},I=function e(n){h(n).removeEventListener("mouseup",e)},S=function(n){var t=h(n),r=E(t);!1===r.draggable||_.value&&e.disableDrag(r)?t.classList.add("bk-tree-drag-disabled"):(t.setAttribute("draggable","true"),t.addEventListener("mouseup",I))},D=function(r){r.preventDefault();var o=h(r),i=f(E(o));if(n.emit(t.NODE_DRAG_OVER,r,o,i),N.value&&(null==e?void 0:e.disableDrop(i)))return r.dataTransfer.effectAllowed="move",r.dataTransfer.dropEffect="none",void o.classList.add("bk-tree-drop-disabled");o.classList.add("bk-tree-drop-active");var a=r.dataTransfer.getData("node-id"),l=o.getAttribute("data-tree-node"),u=C(a,l)?"move":"none";r.dataTransfer.effectAllowed=u,r.dataTransfer.dropEffect=u},T=function(e){e.dataTransfer.effectAllowed="move",e.dataTransfer.dropEffect="move";var r=h(e);e.dataTransfer.setData("text/plain",""),e.dataTransfer.setData("node-id",r.getAttribute("data-tree-node")),n.emit(t.NODE_DRAG_START,e,r)},g=function(r){r.preventDefault(),r.stopPropagation();var o=h(r);o.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled");var i=f(E(o));if(!N.value||!e.disableDrop(i)){var a=r.dataTransfer.getData("node-id"),l=o.getAttribute("data-tree-node");Reflect.apply(e.dragSort?A:b,void 0,[a,l]),n.emit(t.NODE_DROP,r,o,i)}},C=function(e,n){var t=v(u({},s.UUID,e)),r=v(u({},s.UUID,n));return c(e)===c(n)||-1===t.indexOf(r)&&-1===r.indexOf(t)},A=function(n,t){if(C(n,t)){var r=JSON.parse(JSON.stringify(l(n))),o=JSON.parse(JSON.stringify(l(t))),i=d(n),a=d(t),c=p(u({},s.UUID,n),s.INDEX),f=p(u({},s.UUID,t),s.INDEX);null==i||i[e.children].splice(c,1,o),null==a||a[e.children].splice(f,1,r)}},b=function(n,t){var r=l(n),o=l(t),i=null;if(y(u({},s.UUID,n)))i=e.data;else{var a=c(n);if(null!=a){i=l(a);var d=p(u({},s.UUID,n),s.INDEX);null==i||i[e.children].splice(d,1)}}o[e.children]||(o[e.children]=[]),o[e.children].unshift(r)},O=function(e){e.preventDefault();var r=h(e);r.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled"),n.emit(t.NODE_DRAG_LEAVE,e,r)};(0,o.onMounted)((function(){if(e.draggable&&r.value){var n=r.value.$el;n.addEventListener("mousedown",S),n.addEventListener("dragstart",T),n.addEventListener("dragover",D),n.addEventListener("dragleave",O),n.addEventListener("drop",g)}})),(0,o.onUnmounted)((function(){if(e.draggable&&r.value){var n=r.value.$el;n.removeEventListener("mousedown",S),n.removeEventListener("dragstart",T),n.removeEventListener("dragover",D),n.removeEventListener("dragleave",O),n.removeEventListener("drop",g)}}))}(e,n,W,c),function(){return(0,o.createVNode)(a(),{class:(0,r.resolveClassName)("tree"),style:x(null,e),list:k.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:(0,r.resolveClassName)("container"),throttleDelay:0,ref:W},{default:function(e){return function(e){var t,r,o;if(e.length)return e.map(G);var i=O.value?"search-empty":"empty";return null!==(o=null===(r=(t=n.slots).empty)||void 0===r?void 0:r.call(t))&&void 0!==o?o:Z(i)}(e.data||[])}})}}}),q=(0,r.withInstall)(G)})(),d})()));
@@ -1,4 +1,12 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
+ declare enum TreeSearchMatchEnum {
3
+ FUZZY = "fuzzy",
4
+ FULL = "full"
5
+ }
6
+ declare enum TreeSearchResultEnum {
7
+ TREE = "tree",
8
+ LIST = "list"
9
+ }
2
10
  /**
3
11
  * Tree Prop: prefixIcon function
4
12
  * @param {} isRoot 是否为分跟节点
@@ -7,7 +15,7 @@ import { ExtractPropTypes } from 'vue';
7
15
  * @param {} renderType 当前渲染类型(action: 用来标识当前节点状态,展开 | 收起, node_type:节点类型,文件、文件夹)
8
16
  * @param {} item 当前节点数据
9
17
  */
10
- export declare type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: any) => any;
18
+ export type IPrefixIcon = (isRoot: boolean, hasChild: boolean, isOpen: boolean, renderType: string, item: any) => any;
11
19
  export declare const treeProps: {
12
20
  /**
13
21
  * 渲染列表
@@ -19,6 +27,15 @@ export declare const treeProps: {
19
27
  * 指定节点标签为节点对象的某个属性值
20
28
  */
21
29
  label: import("vue-types").VueTypeDef<any>;
30
+ /**
31
+ * 每个树节点用来作为唯一标识的属性,此标识应该是唯一的
32
+ * 如果设置系统会默认自动生成唯一id
33
+ */
34
+ nodeKey: import("vue-types").VueTypeValidableDef<string> & {
35
+ default: string;
36
+ } & {
37
+ default: string;
38
+ };
22
39
  /**
23
40
  * 子节点 Key, 用于读取子节点
24
41
  * 默认 children
@@ -80,10 +97,128 @@ export declare const treeProps: {
80
97
  } & {
81
98
  default: number;
82
99
  };
100
+ /**
101
+ * 搜索配置
102
+ * 可以为一个配置项 SearchOption
103
+ * 或者直接为一个字符串,如果直接为字符串则模糊匹配此值
104
+ */
105
+ search: import("vue-types").VueTypeDef<string | number | boolean | SearchOption> & {
106
+ default: string | number | boolean | (() => SearchOption);
107
+ };
108
+ emptyText: import("vue-types").VueTypeValidableDef<string> & {
109
+ default: string;
110
+ } & {
111
+ default: string;
112
+ };
113
+ draggable: import("vue-types").VueTypeValidableDef<boolean> & {
114
+ default: boolean;
115
+ } & {
116
+ default: boolean;
117
+ };
118
+ disableDrag: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
119
+ default: (...args: any[]) => any;
120
+ };
121
+ disableDrop: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
122
+ default: (...args: any[]) => any;
123
+ };
124
+ /**
125
+ * 节点拖拽时可交换位置(开启拖拽可交换位置后将不支持改变层级)
126
+ */
127
+ dragSort: import("vue-types").VueTypeValidableDef<boolean> & {
128
+ default: boolean;
129
+ } & {
130
+ default: boolean;
131
+ };
132
+ /**
133
+ * 节点是否可以选中
134
+ */
135
+ selectable: import("vue-types").VueTypeDef<any> & {
136
+ default: any;
137
+ };
138
+ disabledFolderSelectable: import("vue-types").VueTypeValidableDef<boolean> & {
139
+ default: boolean;
140
+ } & {
141
+ default: boolean;
142
+ };
143
+ /**
144
+ * 是否支持多选
145
+ */
146
+ showCheckbox: import("vue-types").VueTypeValidableDef<boolean> & {
147
+ default: boolean;
148
+ } & {
149
+ default: boolean;
150
+ };
151
+ /**
152
+ * 是否显示节点类型Icon
153
+ */
154
+ showNodeTypeIcon: import("vue-types").VueTypeValidableDef<boolean> & {
155
+ default: boolean;
156
+ } & {
157
+ default: boolean;
158
+ };
159
+ /**
160
+ * 默认选中的节点id,selectable为false时无效
161
+ */
162
+ selected: import("vue-types").VueTypeDef<string | number | {
163
+ [key: string]: any;
164
+ }>;
165
+ /**
166
+ * 是否自动检查当前节点是否有子节点
167
+ * 节点前面的展开收起Icon会根据判定值做改变
168
+ * 如果需要自已控制,请设置为false
169
+ */
170
+ autoCheckChildren: import("vue-types").VueTypeValidableDef<boolean> & {
171
+ default: boolean;
172
+ } & {
173
+ default: boolean;
174
+ };
175
+ /**
176
+ * 如果设置了某一个叶子节点状态为展开,是否自动展开所有父级节点
177
+ * 默认为true,如果设置为false,则每层状态需要自己控制
178
+ */
179
+ autoOpenParentNode: import("vue-types").VueTypeValidableDef<boolean> & {
180
+ default: boolean;
181
+ } & {
182
+ default: boolean;
183
+ };
184
+ /**
185
+ * 默认是否展开所有节点
186
+ */
187
+ expandAll: import("vue-types").VueTypeValidableDef<boolean> & {
188
+ default: boolean;
189
+ } & {
190
+ default: boolean;
191
+ };
192
+ /**
193
+ * 节点内容点击行为
194
+ * 此处配置每个节点除了展开\收起箭头之外的内容块时的行为
195
+ * 默认为 ['selected', 'expand', 'click'],点击内容块为选中当前节点
196
+ */
197
+ nodeContentAction: import("vue-types").VueTypeDef<any> & {
198
+ default: any;
199
+ };
200
+ /**
201
+ * 是否作用域插槽抛出参数是否保持源数据的引用
202
+ * 如果设置为true,则作用域插槽参数格式为: { data: node, attributes: {} }
203
+ * 如果设置为false,则作用域插槽参数格式为: { ...node, ...attributes }
204
+ * attributes 为节点内置属性,包含节点是否展开,是否选中,是否有子节点等等
205
+ */
206
+ keepSlotData: import("vue-types").VueTypeValidableDef<boolean> & {
207
+ default: boolean;
208
+ } & {
209
+ default: boolean;
210
+ };
83
211
  };
84
- declare type AsyncOption = {
212
+ type AsyncOption = {
85
213
  callback: (item: any, cb: any) => Promise<any>;
86
214
  cache: Boolean;
215
+ deepAutoOpen?: string;
216
+ };
217
+ export type SearchOption = {
218
+ value: string | number | boolean;
219
+ match?: `${TreeSearchMatchEnum}` | Function;
220
+ resultType?: `${TreeSearchResultEnum}`;
221
+ openResultNode: boolean;
87
222
  };
88
- export declare type TreePropTypes = Readonly<ExtractPropTypes<typeof treeProps>>;
223
+ export type TreePropTypes = Readonly<ExtractPropTypes<typeof treeProps>>;
89
224
  export {};
package/lib/tree/tree.css CHANGED
@@ -1,10 +1,150 @@
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 {
19
+ position: relative;
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-group {
35
+ display: inline-flex;
36
+ letter-spacing: normal;
37
+ }
38
+ .bk-checkbox {
39
+ display: inline-flex;
40
+ justify-self: center;
41
+ align-items: center;
42
+ font-size: 14px;
43
+ letter-spacing: normal;
44
+ color: #63656e;
45
+ cursor: pointer;
46
+ user-select: none;
47
+ }
48
+ .bk-checkbox ~ .bk-checkbox {
49
+ margin-left: 30px;
50
+ }
51
+ .bk-checkbox.is-checked .bk-checkbox-input {
52
+ background: #3a84ff;
53
+ border-color: #3a84ff;
54
+ transition: all 0.1s;
55
+ }
56
+ .bk-checkbox.is-checked .bk-checkbox-input.small::after {
57
+ width: 3px;
58
+ height: 6px;
59
+ }
60
+ .bk-checkbox.is-checked .bk-checkbox-input::after {
61
+ position: absolute;
62
+ top: 50%;
63
+ left: 50%;
64
+ width: 4px;
65
+ height: 8px;
66
+ border: 2px solid #fff;
67
+ border-top: 0;
68
+ border-left: 0;
69
+ content: '';
70
+ transform: translate(-50%, -60%) scaleY(1) rotate(45deg);
71
+ transform-origin: center;
72
+ }
73
+ .bk-checkbox.is-indeterminated .bk-checkbox-input {
74
+ background: #3a84ff;
75
+ border-color: #3a84ff;
76
+ transition: all 0.1s;
77
+ }
78
+ .bk-checkbox.is-indeterminated .bk-checkbox-input.small::after {
79
+ width: 6px;
80
+ height: 2px;
81
+ }
82
+ .bk-checkbox.is-indeterminated .bk-checkbox-input::after {
83
+ position: absolute;
84
+ top: 50%;
85
+ left: 50%;
86
+ width: 8px;
87
+ height: 2px;
88
+ background: #fff;
89
+ border: none;
90
+ border-radius: 2px;
91
+ content: '';
92
+ transform: translate(-50%, -50%);
93
+ }
94
+ .bk-checkbox.is-disabled {
95
+ color: #c4c6cc;
96
+ cursor: not-allowed;
97
+ }
98
+ .bk-checkbox.is-disabled .bk-checkbox-input {
99
+ background: #fafbfd;
100
+ border-color: #dcdee5;
101
+ }
102
+ .bk-checkbox.is-disabled .bk-checkbox-input::after {
103
+ background: #dcdee5;
104
+ }
105
+ .bk-checkbox.is-disabled.is-checked .bk-checkbox-input {
106
+ background: #a3c5fd;
107
+ border-color: #a3c5fd;
108
+ }
109
+ .bk-checkbox.is-disabled.is-checked .bk-checkbox-input::after {
110
+ background: #a3c5fd;
111
+ }
112
+ .bk-checkbox-input {
113
+ position: relative;
114
+ display: inline-block;
115
+ width: 16px;
116
+ height: 16px;
117
+ vertical-align: middle;
118
+ border: 1px solid #979ba5;
119
+ border-radius: 2px;
120
+ }
121
+ .bk-checkbox-input.small {
122
+ width: 14px;
123
+ height: 14px;
124
+ }
125
+ .bk-checkbox-original {
126
+ position: absolute;
127
+ top: 0;
128
+ left: 0;
129
+ z-index: -1;
130
+ width: 0;
131
+ height: 0;
132
+ }
133
+ .bk-checkbox-label {
134
+ display: inline-block;
135
+ margin-left: 6px;
136
+ vertical-align: middle;
137
+ }
138
+ .bk-tree {
139
+ font-size: 14px;
140
+ }
1
141
  .bk-tree .bk-node-row {
2
142
  padding-left: calc(var(--offset-left));
3
143
  }
4
- .bk-tree .bk-node-row.is-checked {
144
+ .bk-tree .bk-node-row.is-selected {
5
145
  background-color: #ebf2ff;
6
146
  }
7
- .bk-tree .bk-tree-node {
147
+ .bk-tree-node {
8
148
  position: relative;
9
149
  display: flex;
10
150
  height: var(--lineHeight);
@@ -13,10 +153,10 @@
13
153
  cursor: pointer;
14
154
  align-items: center;
15
155
  }
16
- .bk-tree .bk-tree-node:not(.is-root) {
156
+ .bk-tree-node:not(.is-root) {
17
157
  margin-left: calc(var(--depth)*var(--indent));
18
158
  }
19
- .bk-tree .bk-tree-node:not(.is-root).level-line::before {
159
+ .bk-tree-node:not(.is-root).level-line::before {
20
160
  position: absolute;
21
161
  top: calc(50% + 1px);
22
162
  left: calc(0px - var(--indent) + 6px);
@@ -27,7 +167,10 @@
27
167
  border-bottom: var(--level-line);
28
168
  content: '';
29
169
  }
30
- .bk-tree .bk-tree-node .node-virtual-line {
170
+ .bk-tree-node.is-open .bk-node-action {
171
+ color: #63656e;
172
+ }
173
+ .bk-tree-node .node-virtual-line {
31
174
  position: absolute;
32
175
  top: -12px;
33
176
  bottom: 50%;
@@ -36,15 +179,44 @@
36
179
  width: 0;
37
180
  border-left: var(--level-line);
38
181
  }
39
- .bk-tree .bk-tree-node .bk-tree-icon {
182
+ .bk-tree-node .bk-node-prefix {
183
+ display: flex;
184
+ width: 14px;
185
+ height: 14px;
186
+ align-items: center;
187
+ justify-content: center;
188
+ }
189
+ .bk-tree-node .bk-node-action {
190
+ margin-right: 6px;
191
+ color: #979ba5;
192
+ }
193
+ .bk-tree-node .bk-tree-icon {
40
194
  margin: 0 6px 0 4px;
41
195
  }
42
- .bk-tree .bk-tree-node .bk-node-content {
43
- display: inline-flex;
196
+ .bk-tree-node .bk-node-content {
197
+ display: flex;
198
+ flex: 1;
44
199
  align-items: center;
200
+ min-width: 0;
201
+ }
202
+ .bk-tree-node .bk-node-content .bk-checkbox {
203
+ margin: 0;
204
+ }
205
+ .bk-tree-node .bk-node-content .bk-checkbox .bk-checkbox-input {
206
+ margin: 0;
45
207
  }
46
- .bk-tree .bk-tree-node .bk-node-content .bk-node-text {
208
+ .bk-tree-node .bk-node-content .bk-node-text {
209
+ flex: 1;
47
210
  overflow: hidden;
48
211
  text-overflow: ellipsis;
49
212
  white-space: nowrap;
50
213
  }
214
+ .bk-tree-drop-active {
215
+ background: #f5f7fa;
216
+ }
217
+ .bk-tree-drop-disabled {
218
+ background: #ffd5d5;
219
+ }
220
+ .bk-tree-drop-disabled .bk-tree-node {
221
+ cursor: no-drop;
222
+ }