bkui-vue 0.0.2-beta.14 → 0.0.2-beta.141

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 (505) hide show
  1. package/dist/index.cjs.js +142 -160
  2. package/dist/index.esm.js +18004 -19937
  3. package/dist/index.umd.js +142 -160
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.d.ts +1 -1
  15. package/lib/affix/affix.variable.css +6 -2
  16. package/lib/affix/index.d.ts +4 -4
  17. package/lib/affix/index.js +322 -1
  18. package/lib/alert/alert.css +7 -0
  19. package/lib/alert/alert.d.ts +5 -5
  20. package/lib/alert/alert.less +16 -6
  21. package/lib/alert/alert.variable.css +13 -2
  22. package/lib/alert/index.d.ts +10 -10
  23. package/lib/alert/index.js +215 -1
  24. package/lib/animate-number/index.d.ts +1 -1
  25. package/lib/animate-number/index.js +155 -1
  26. package/lib/backtop/backtop.css +8 -8
  27. package/lib/backtop/backtop.less +3 -1
  28. package/lib/backtop/backtop.variable.css +17 -13
  29. package/lib/backtop/index.d.ts +1 -1
  30. package/lib/backtop/index.js +189 -1
  31. package/lib/badge/badge.css +8 -2
  32. package/lib/badge/badge.d.ts +2 -2
  33. package/lib/badge/badge.less +8 -4
  34. package/lib/badge/badge.variable.css +14 -4
  35. package/lib/badge/index.d.ts +7 -7
  36. package/lib/badge/index.js +236 -1
  37. package/lib/breadcrumb/breadcrumb.css +4 -4
  38. package/lib/breadcrumb/breadcrumb.variable.css +10 -6
  39. package/lib/breadcrumb/index.d.ts +2 -2
  40. package/lib/breadcrumb/index.js +310 -1
  41. package/lib/button/button-group.d.ts +2 -2
  42. package/lib/button/button.css +30 -7
  43. package/lib/button/button.d.ts +1 -1
  44. package/lib/button/button.less +29 -13
  45. package/lib/button/button.variable.css +44 -17
  46. package/lib/button/index.d.ts +7 -7
  47. package/lib/button/index.js +329 -1
  48. package/lib/card/card.css +11 -11
  49. package/lib/card/card.d.ts +1 -1
  50. package/lib/card/card.less +7 -7
  51. package/lib/card/card.variable.css +17 -13
  52. package/lib/card/index.d.ts +4 -4
  53. package/lib/card/index.js +292 -1
  54. package/lib/cascader/cascader-panel.d.ts +1 -0
  55. package/lib/cascader/cascader.css +7 -7
  56. package/lib/cascader/cascader.d.ts +1 -0
  57. package/lib/cascader/cascader.less +4 -6
  58. package/lib/cascader/cascader.variable.css +13 -9
  59. package/lib/cascader/index.d.ts +6 -2
  60. package/lib/cascader/index.js +2072 -2
  61. package/lib/cascader/interface.d.ts +1 -1
  62. package/lib/checkbox/checkbox-group.d.ts +6 -3
  63. package/lib/checkbox/checkbox.css +13 -1
  64. package/lib/checkbox/checkbox.d.ts +15 -12
  65. package/lib/checkbox/checkbox.less +15 -1
  66. package/lib/checkbox/checkbox.variable.css +19 -3
  67. package/lib/checkbox/common.d.ts +1 -0
  68. package/lib/checkbox/index.d.ts +43 -31
  69. package/lib/checkbox/index.js +570 -1
  70. package/lib/code-diff/code-diff.variable.css +6 -2
  71. package/lib/code-diff/index.d.ts +1 -1
  72. package/lib/code-diff/index.js +5502 -1
  73. package/lib/collapse/collapse.variable.css +6 -2
  74. package/lib/collapse/index.d.ts +2 -2
  75. package/lib/collapse/index.js +571 -1
  76. package/lib/collapse-transition/collapse-transition.variable.css +6 -2
  77. package/lib/collapse-transition/index.d.ts +128 -2
  78. package/lib/collapse-transition/index.js +177 -1
  79. package/lib/color-picker/color-picker.d.ts +16 -0
  80. package/lib/color-picker/color-picker.variable.css +6 -2
  81. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  82. package/lib/color-picker/index.d.ts +19 -1
  83. package/lib/color-picker/index.js +2666 -1
  84. package/lib/components.js +530 -1
  85. package/lib/config-provider/config-provider.d.ts +21 -0
  86. package/lib/config-provider/config-provider.variable.css +6 -2
  87. package/lib/config-provider/index.d.ts +29 -1
  88. package/lib/config-provider/index.js +365 -1
  89. package/lib/config-provider/token.d.ts +7 -0
  90. package/lib/config-provider/use-global-config.d.ts +2 -0
  91. package/lib/config-provider/use-prefix.d.ts +2 -0
  92. package/lib/container/container.css +4 -4
  93. package/lib/container/container.variable.css +10 -6
  94. package/lib/container/index.d.ts +2 -2
  95. package/lib/container/index.js +392 -1
  96. package/lib/date-picker/common.d.ts +2 -0
  97. package/lib/date-picker/date-picker.d.ts +6 -2
  98. package/lib/date-picker/date-picker.variable.css +6 -2
  99. package/lib/date-picker/index.d.ts +21 -8
  100. package/lib/date-picker/index.js +5636 -1
  101. package/lib/date-picker/panel/date-range.d.ts +2 -1
  102. package/lib/date-picker/panel/date.d.ts +2 -2
  103. package/lib/date-picker/panel/time-range.d.ts +17 -0
  104. package/lib/date-picker/panel/time.d.ts +17 -1
  105. package/lib/date-picker/time-picker.d.ts +3 -1
  106. package/lib/dialog/dialog.css +9 -6
  107. package/lib/dialog/dialog.less +7 -6
  108. package/lib/dialog/dialog.variable.css +15 -8
  109. package/lib/dialog/index.d.ts +1 -1
  110. package/lib/dialog/index.js +984 -2
  111. package/lib/directives/index.js +1387 -2
  112. package/lib/directives/tooltips.d.ts +2 -2
  113. package/lib/dist.index.js +87 -1
  114. package/lib/divider/divider.variable.css +6 -2
  115. package/lib/divider/index.d.ts +1 -1
  116. package/lib/divider/index.js +170 -1
  117. package/lib/dropdown/dropdown.css +2 -1
  118. package/lib/dropdown/dropdown.variable.css +8 -3
  119. package/lib/dropdown/index.d.ts +2 -2
  120. package/lib/dropdown/index.js +376 -1
  121. package/lib/exception/exception.variable.css +6 -2
  122. package/lib/exception/index.d.ts +2 -2
  123. package/lib/exception/index.js +386 -1
  124. package/lib/fixed-navbar/fixed-navbar.variable.css +6 -2
  125. package/lib/fixed-navbar/index.d.ts +1 -1
  126. package/lib/fixed-navbar/index.js +155 -1
  127. package/lib/form/form.css +2 -1
  128. package/lib/form/form.less +3 -2
  129. package/lib/form/form.variable.css +8 -3
  130. package/lib/form/index.d.ts +3 -3
  131. package/lib/form/index.js +953 -1
  132. package/lib/hooks.d.ts +1 -1
  133. package/lib/hooks.js +73 -1
  134. package/lib/icon/angle-double-down-line.js +191 -1
  135. package/lib/icon/angle-double-left-line.js +191 -1
  136. package/lib/icon/angle-double-left.js +191 -1
  137. package/lib/icon/angle-double-right-line.js +191 -1
  138. package/lib/icon/angle-double-right.js +191 -1
  139. package/lib/icon/angle-double-up-line.js +191 -1
  140. package/lib/icon/angle-down-fill.js +191 -1
  141. package/lib/icon/angle-down-line.js +191 -1
  142. package/lib/icon/angle-down.js +191 -1
  143. package/lib/icon/angle-left.js +191 -1
  144. package/lib/icon/angle-right.js +191 -1
  145. package/lib/icon/angle-up-fill.js +191 -1
  146. package/lib/icon/angle-up.js +191 -1
  147. package/lib/icon/archive-fill.js +191 -1
  148. package/lib/icon/arrows-left.js +191 -1
  149. package/lib/icon/arrows-right.js +191 -1
  150. package/lib/icon/assistant.d.ts +4 -0
  151. package/lib/icon/assistant.js +191 -0
  152. package/lib/icon/audio-fill.js +191 -1
  153. package/lib/icon/bk.js +191 -1
  154. package/lib/icon/circle.js +191 -1
  155. package/lib/icon/close-line.js +191 -1
  156. package/lib/icon/close.js +191 -1
  157. package/lib/icon/code.js +191 -1
  158. package/lib/icon/cog-shape.js +191 -1
  159. package/lib/icon/collapse-left.js +191 -1
  160. package/lib/icon/copy-shape.js +191 -1
  161. package/lib/icon/copy.js +191 -1
  162. package/lib/icon/data-shape.js +191 -1
  163. package/lib/icon/del.js +191 -1
  164. package/lib/icon/doc-fill.js +191 -1
  165. package/lib/icon/done.js +191 -1
  166. package/lib/icon/down-shape.js +191 -1
  167. package/lib/icon/down-small.js +191 -1
  168. package/lib/icon/edit-line.js +191 -1
  169. package/lib/icon/ellipsis.js +191 -1
  170. package/lib/icon/enlarge-line.js +191 -1
  171. package/lib/icon/error.js +191 -1
  172. package/lib/icon/excel-fill.js +191 -1
  173. package/lib/icon/exclamation-circle-shape.js +191 -1
  174. package/lib/icon/eye.js +191 -1
  175. package/lib/icon/filliscreen-line.js +191 -1
  176. package/lib/icon/fix-line.js +191 -1
  177. package/lib/icon/fix-shape.js +191 -1
  178. package/lib/icon/folder-open.js +191 -1
  179. package/lib/icon/folder-shape-open.js +191 -1
  180. package/lib/icon/folder-shape.js +191 -1
  181. package/lib/icon/folder.js +191 -1
  182. package/lib/icon/funnel.js +191 -1
  183. package/lib/icon/help-document-fill.js +191 -1
  184. package/lib/icon/help-fill.js +191 -1
  185. package/lib/icon/help.js +191 -1
  186. package/lib/icon/image-fill.js +276 -1
  187. package/lib/icon/img-error.js +276 -1
  188. package/lib/icon/img-placehoulder.js +276 -1
  189. package/lib/icon/index.d.ts +2 -0
  190. package/lib/icon/index.js +2432 -1
  191. package/lib/icon/info-line.js +276 -1
  192. package/lib/icon/info.js +276 -1
  193. package/lib/icon/left-shape.js +276 -1
  194. package/lib/icon/left-turn-line.js +276 -1
  195. package/lib/icon/loading.d.ts +4 -0
  196. package/lib/icon/loading.js +276 -0
  197. package/lib/icon/narrow-line.js +276 -1
  198. package/lib/icon/original.js +276 -1
  199. package/lib/icon/pdf-fill.js +276 -1
  200. package/lib/icon/play-shape.js +276 -1
  201. package/lib/icon/plus.js +276 -1
  202. package/lib/icon/ppt-fill.js +276 -1
  203. package/lib/icon/qq.js +276 -1
  204. package/lib/icon/right-shape.js +276 -1
  205. package/lib/icon/right-turn-line.js +276 -1
  206. package/lib/icon/search.js +276 -1
  207. package/lib/icon/share.js +276 -1
  208. package/lib/icon/spinner.js +276 -1
  209. package/lib/icon/success.js +276 -1
  210. package/lib/icon/switcher-loading.js +276 -1
  211. package/lib/icon/text-file.js +276 -1
  212. package/lib/icon/text-fill.js +276 -1
  213. package/lib/icon/transfer.js +276 -1
  214. package/lib/icon/tree-application-shape.js +276 -1
  215. package/lib/icon/unfull-screen.js +276 -1
  216. package/lib/icon/unvisible.js +276 -1
  217. package/lib/icon/up-shape.js +276 -1
  218. package/lib/icon/upload.js +276 -1
  219. package/lib/icon/video-fill.js +276 -1
  220. package/lib/icon/warn.js +276 -1
  221. package/lib/icon/weixin-pro.js +276 -1
  222. package/lib/icon/weixin.js +276 -1
  223. package/lib/image/image-viewer.variable.css +6 -2
  224. package/lib/image/image.variable.css +6 -2
  225. package/lib/image/index.d.ts +1 -1
  226. package/lib/image/index.js +641 -1
  227. package/lib/index.js +97 -1
  228. package/lib/info-box/index.js +1174 -2
  229. package/lib/info-box/info-box.css +2 -0
  230. package/lib/info-box/info-box.d.ts +4 -0
  231. package/lib/info-box/info-box.less +2 -1
  232. package/lib/info-box/info-box.variable.css +8 -2
  233. package/lib/input/index.d.ts +90 -12
  234. package/lib/input/index.js +1234 -1
  235. package/lib/input/input.css +51 -19
  236. package/lib/input/input.d.ts +79 -6
  237. package/lib/input/input.less +50 -13
  238. package/lib/input/input.variable.css +57 -21
  239. package/lib/input/util.d.ts +6 -0
  240. package/lib/link/index.d.ts +4 -4
  241. package/lib/link/index.js +161 -1
  242. package/lib/link/link.d.ts +1 -1
  243. package/lib/link/link.variable.css +6 -2
  244. package/lib/loading/index.d.ts +5 -5
  245. package/lib/loading/index.js +382 -1
  246. package/lib/loading/loading.css +13 -13
  247. package/lib/loading/loading.d.ts +1 -1
  248. package/lib/loading/loading.less +14 -9
  249. package/lib/loading/loading.variable.css +19 -15
  250. package/lib/locale/index.js +477 -1
  251. package/lib/locale/lang/en.d.ts +7 -0
  252. package/lib/menu/index.d.ts +2 -2
  253. package/lib/menu/index.js +725 -1
  254. package/lib/menu/menu.css +4 -4
  255. package/lib/menu/menu.variable.css +10 -6
  256. package/lib/menu/submenu.variable.css +6 -2
  257. package/lib/message/index.js +1796 -2
  258. package/lib/message/message.css +18 -2
  259. package/lib/message/message.less +16 -2
  260. package/lib/message/message.variable.css +24 -4
  261. package/lib/message/messageConstructor.d.ts +23 -3
  262. package/lib/modal/index.d.ts +2 -2
  263. package/lib/modal/index.js +397 -1
  264. package/lib/modal/modal.css +2 -0
  265. package/lib/modal/modal.variable.css +8 -2
  266. package/lib/navigation/index.d.ts +4 -1
  267. package/lib/navigation/index.js +368 -1
  268. package/lib/navigation/navigation.d.ts +1 -0
  269. package/lib/navigation/navigation.variable.css +6 -2
  270. package/lib/notify/index.js +398 -1
  271. package/lib/notify/notify.css +6 -6
  272. package/lib/notify/notify.less +6 -6
  273. package/lib/notify/notify.variable.css +12 -8
  274. package/lib/notify/notifyConstructor.d.ts +1 -1
  275. package/lib/overflow-title/components/overflow-title.d.ts +257 -2
  276. package/lib/overflow-title/index.d.ts +387 -2
  277. package/lib/overflow-title/index.js +292 -1
  278. package/lib/overflow-title/props.d.ts +129 -0
  279. package/lib/pagination/index.d.ts +6 -6
  280. package/lib/pagination/index.js +894 -1
  281. package/lib/pagination/pagination.css +1 -0
  282. package/lib/pagination/pagination.d.ts +3 -3
  283. package/lib/pagination/pagination.less +1 -0
  284. package/lib/pagination/pagination.variable.css +7 -2
  285. package/lib/plugin-popover/index.js +3833 -1
  286. package/lib/plugins/index.js +63 -1
  287. package/lib/pop-confirm/index.d.ts +43 -4
  288. package/lib/pop-confirm/index.js +294 -1
  289. package/lib/pop-confirm/pop-confirm.css +4 -4
  290. package/lib/pop-confirm/pop-confirm.d.ts +14 -1
  291. package/lib/pop-confirm/pop-confirm.less +4 -4
  292. package/lib/pop-confirm/pop-confirm.variable.css +10 -6
  293. package/lib/popover/content.d.ts +33 -0
  294. package/lib/popover/index.d.ts +74 -16
  295. package/lib/popover/index.js +3842 -1
  296. package/lib/popover/popover.css +2 -1
  297. package/lib/popover/popover.d.ts +40 -7
  298. package/lib/popover/popover.less +4 -3
  299. package/lib/popover/popover.variable.css +8 -3
  300. package/lib/popover/props.d.ts +25 -2
  301. package/lib/popover/use-floating.d.ts +1 -1
  302. package/lib/popover/use-popover-init.d.ts +2 -1
  303. package/lib/popover2/index.d.ts +1 -1
  304. package/lib/popover2/index.js +107 -1
  305. package/lib/preset.d.ts +14 -0
  306. package/lib/preset.js +93 -1
  307. package/lib/process/index.d.ts +1 -1
  308. package/lib/process/index.js +759 -2
  309. package/lib/process/process.variable.css +6 -2
  310. package/lib/progress/index.d.ts +5 -5
  311. package/lib/progress/index.js +432 -1
  312. package/lib/progress/progress.css +11 -7
  313. package/lib/progress/progress.d.ts +3 -3
  314. package/lib/progress/progress.less +8 -3
  315. package/lib/progress/progress.variable.css +17 -9
  316. package/lib/radio/common.d.ts +1 -0
  317. package/lib/radio/index.d.ts +31 -25
  318. package/lib/radio/index.js +636 -1
  319. package/lib/radio/radio-button.d.ts +8 -7
  320. package/lib/radio/radio-group.d.ts +7 -4
  321. package/lib/radio/radio.css +26 -12
  322. package/lib/radio/radio.d.ts +5 -4
  323. package/lib/radio/radio.less +42 -8
  324. package/lib/radio/radio.variable.css +26 -8
  325. package/lib/rate/index.d.ts +12 -8
  326. package/lib/rate/index.js +355 -1
  327. package/lib/rate/rate.d.ts +4 -3
  328. package/lib/rate/rate.variable.css +6 -2
  329. package/lib/rate/star.css +3 -0
  330. package/lib/rate/star.less +3 -0
  331. package/lib/rate/star.variable.css +9 -2
  332. package/lib/resize-layout/index.d.ts +4 -4
  333. package/lib/resize-layout/index.js +430 -1
  334. package/lib/resize-layout/resize-layout.css +14 -2
  335. package/lib/resize-layout/resize-layout.d.ts +1 -1
  336. package/lib/resize-layout/resize-layout.less +14 -2
  337. package/lib/resize-layout/resize-layout.variable.css +20 -4
  338. package/lib/search-select/index.d.ts +62 -29
  339. package/lib/search-select/index.js +2747 -2
  340. package/lib/search-select/input.d.ts +5 -1
  341. package/lib/search-select/menu.d.ts +33 -2
  342. package/lib/search-select/search-select.css +39 -21
  343. package/lib/search-select/search-select.d.ts +23 -20
  344. package/lib/search-select/search-select.less +44 -23
  345. package/lib/search-select/search-select.variable.css +45 -23
  346. package/lib/search-select/selected.d.ts +5 -1
  347. package/lib/search-select/utils.d.ts +13 -5
  348. package/lib/select/common.d.ts +4 -1
  349. package/lib/select/index.d.ts +287 -90
  350. package/lib/select/index.js +2422 -2
  351. package/lib/select/option.d.ts +12 -0
  352. package/lib/select/select.css +16 -5
  353. package/lib/select/select.d.ts +120 -39
  354. package/lib/select/select.less +14 -1
  355. package/lib/select/select.variable.css +46 -31
  356. package/lib/select/selectTagInput.d.ts +10 -5
  357. package/lib/select/type.d.ts +3 -0
  358. package/lib/shared/helper.d.ts +1 -1
  359. package/lib/shared/index.js +2690 -1
  360. package/lib/shared/mask-manager.d.ts +3 -4
  361. package/lib/shared/pop-manager.d.ts +6 -2
  362. package/lib/shared/popover.d.ts +2 -2
  363. package/lib/shared/vue-types.d.ts +4 -3
  364. package/lib/sideslider/index.d.ts +1 -1
  365. package/lib/sideslider/index.js +711 -2
  366. package/lib/sideslider/sideslider.variable.css +6 -2
  367. package/lib/slider/index.d.ts +1 -1
  368. package/lib/slider/index.js +1310 -2
  369. package/lib/slider/slider.css +2 -0
  370. package/lib/slider/slider.less +2 -0
  371. package/lib/slider/slider.variable.css +8 -2
  372. package/lib/steps/index.d.ts +5 -5
  373. package/lib/steps/index.js +826 -2
  374. package/lib/steps/steps.css +18 -6
  375. package/lib/steps/steps.d.ts +3 -3
  376. package/lib/steps/steps.less +26 -5
  377. package/lib/steps/steps.variable.css +24 -8
  378. package/lib/styles/index.d.ts +1 -0
  379. package/lib/styles/mixins/animate.css +4 -4
  380. package/lib/styles/mixins/animate.less +10 -6
  381. package/lib/styles/mixins/animate.variable.css +130 -4
  382. package/lib/styles/mixins/mixins.css +4 -4
  383. package/lib/styles/mixins/mixins.variable.css +4 -4
  384. package/lib/styles/mixins/popper.variable.css +6 -2
  385. package/lib/styles/mixins/scroll.variable.css +6 -2
  386. package/lib/styles/reset.variable.css +6 -2
  387. package/lib/styles/themes/themes.less +7 -3
  388. package/lib/swiper/index.d.ts +1 -1
  389. package/lib/swiper/index.js +337 -1
  390. package/lib/swiper/swiper.css +0 -6
  391. package/lib/swiper/swiper.less +0 -8
  392. package/lib/swiper/swiper.variable.css +6 -8
  393. package/lib/switcher/index.d.ts +34 -20
  394. package/lib/switcher/index.js +278 -1
  395. package/lib/switcher/switcher.css +4 -4
  396. package/lib/switcher/switcher.d.ts +76 -7
  397. package/lib/switcher/switcher.variable.css +10 -6
  398. package/lib/tab/index.d.ts +3 -3
  399. package/lib/tab/index.js +915 -1
  400. package/lib/tab/tab-nav.d.ts +12 -2
  401. package/lib/tab/tab-panel.d.ts +1 -1
  402. package/lib/tab/tab.variable.css +6 -2
  403. package/lib/table/components/table-cell.d.ts +22 -24
  404. package/lib/table/components/table-column.d.ts +100 -71
  405. package/lib/table/const.d.ts +25 -3
  406. package/lib/table/events.d.ts +26 -26
  407. package/lib/table/index.d.ts +309 -191
  408. package/lib/table/index.js +6562 -1
  409. package/lib/table/plugins/body-empty.d.ts +1 -1
  410. package/lib/table/plugins/head-filter.css +4 -28
  411. package/lib/table/plugins/head-filter.d.ts +2 -7
  412. package/lib/table/plugins/head-filter.less +5 -34
  413. package/lib/table/plugins/head-filter.variable.css +10 -30
  414. package/lib/table/plugins/head-sort.d.ts +2 -7
  415. package/lib/table/plugins/head-sort.variable.css +6 -2
  416. package/lib/table/plugins/settings.d.ts +2 -19
  417. package/lib/table/plugins/settings.variable.css +6 -2
  418. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  419. package/lib/table/plugins/use-fixed-column.d.ts +9 -9
  420. package/lib/table/plugins/use-head-cell.d.ts +7 -0
  421. package/lib/table/plugins/use-pagination.d.ts +8 -4
  422. package/lib/table/props.d.ts +84 -52
  423. package/lib/table/table.css +117 -53
  424. package/lib/table/table.d.ts +91 -68
  425. package/lib/table/table.less +70 -26
  426. package/lib/table/table.variable.css +123 -55
  427. package/lib/table/use-attributes.d.ts +59 -0
  428. package/lib/table/use-column.d.ts +264 -53
  429. package/lib/table/use-common.d.ts +1607 -88
  430. package/lib/table/use-render.d.ts +11 -0
  431. package/lib/table/utils.d.ts +34 -31
  432. package/lib/table-column/index.d.ts +356 -113
  433. package/lib/table-column/index.js +775 -1
  434. package/lib/tag/index.d.ts +10 -10
  435. package/lib/tag/index.js +234 -1
  436. package/lib/tag/tag.d.ts +5 -5
  437. package/lib/tag/tag.variable.css +6 -2
  438. package/lib/tag-input/index.d.ts +49 -7
  439. package/lib/tag-input/index.js +1678 -1
  440. package/lib/tag-input/list-tag-render.d.ts +11 -0
  441. package/lib/tag-input/tag-input.css +8 -0
  442. package/lib/tag-input/tag-input.d.ts +46 -6
  443. package/lib/tag-input/tag-input.less +9 -0
  444. package/lib/tag-input/tag-input.variable.css +14 -2
  445. package/lib/tag-input/tag-props.d.ts +16 -2
  446. package/lib/time-picker/index.d.ts +10 -4
  447. package/lib/time-picker/index.js +72 -1
  448. package/lib/time-picker/time-picker.css +4 -3
  449. package/lib/time-picker/time-picker.less +5 -9
  450. package/lib/time-picker/time-picker.variable.css +10 -5
  451. package/lib/timeline/index.d.ts +1 -1
  452. package/lib/timeline/index.js +241 -1
  453. package/lib/timeline/timeline.variable.css +6 -2
  454. package/lib/transfer/index.d.ts +1 -1
  455. package/lib/transfer/index.js +687 -1
  456. package/lib/transfer/transfer.css +2 -2
  457. package/lib/transfer/transfer.less +2 -2
  458. package/lib/transfer/transfer.variable.css +8 -4
  459. package/lib/tree/constant.d.ts +2 -2
  460. package/lib/tree/index.d.ts +70 -40
  461. package/lib/tree/index.js +2603 -1
  462. package/lib/tree/props.d.ts +20 -10
  463. package/lib/tree/tree.css +13 -1
  464. package/lib/tree/tree.d.ts +42 -21
  465. package/lib/tree/tree.variable.css +19 -3
  466. package/lib/tree/use-empty.d.ts +1 -3
  467. package/lib/tree/use-node-action.d.ts +5 -3
  468. package/lib/tree/use-node-attribute.d.ts +17 -8
  469. package/lib/tree/use-search.d.ts +2 -2
  470. package/lib/tree/use-tree-init.d.ts +1 -2
  471. package/lib/tree/util.d.ts +9 -3
  472. package/lib/upload/index.d.ts +1 -1
  473. package/lib/upload/index.js +2888 -2
  474. package/lib/upload/upload.css +4 -4
  475. package/lib/upload/upload.type.d.ts +1 -1
  476. package/lib/upload/upload.variable.css +10 -6
  477. package/lib/upload/use-file-handler.d.ts +2 -2
  478. package/lib/virtual-render/index.d.ts +43 -1
  479. package/lib/virtual-render/index.js +902 -1
  480. package/lib/virtual-render/props.d.ts +15 -0
  481. package/lib/virtual-render/use-fix-top.d.ts +18 -0
  482. package/lib/virtual-render/v-virtual-render.d.ts +24 -1
  483. package/lib/virtual-render/virtual-render.d.ts +25 -0
  484. package/lib/virtual-render/virtual-render.variable.css +6 -2
  485. package/lib/volar.components.d.ts +24 -24
  486. package/package.json +34 -19
  487. package/dist/index.cjs.source.js +0 -45605
  488. package/dist/index.esm.source.js +0 -45605
  489. package/dist/index.umd.source.js +0 -45608
  490. package/lib/cascader/index.js.LICENSE.txt +0 -1
  491. package/lib/dialog/index.js.LICENSE.txt +0 -1
  492. package/lib/directives/index.js.LICENSE.txt +0 -14
  493. package/lib/info-box/index.js.LICENSE.txt +0 -1
  494. package/lib/message/index.js.LICENSE.txt +0 -6
  495. package/lib/process/index.js.LICENSE.txt +0 -1
  496. package/lib/search-select/index.js.LICENSE.txt +0 -1
  497. package/lib/select/index.js.LICENSE.txt +0 -1
  498. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  499. package/lib/slider/index.js.LICENSE.txt +0 -1
  500. package/lib/steps/index.js.LICENSE.txt +0 -1
  501. package/lib/table/render.d.ts +0 -140
  502. package/lib/upload/index.js.LICENSE.txt +0 -1
  503. /package/lib/overflow-title/{overflow.css → overflow-title.css} +0 -0
  504. /package/lib/overflow-title/{overflow.less → overflow-title.less} +0 -0
  505. /package/lib/overflow-title/{overflow.variable.css → overflow-title.variable.css} +0 -0
@@ -1 +1,902 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("lodash"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","lodash"],t);else{var o="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("lodash")):t(e["../shared"],e.vue,e["../config-provider"],e.lodash);for(var r in o)("object"==typeof exports?exports:e)[r]=o[r]}}(self,((e,t,o,r)=>(()=>{"use strict";var n={2717:e=>{e.exports=o},4212:t=>{t.exports=e},467:e=>{e.exports=r},748:e=>{e.exports=t}},l={};function i(e){var t=l[e];if(void 0!==t)return t.exports;var o=l[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{i.r(s),i.d(s,{default:()=>g});var e=i(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function o(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,o){if(e){if("string"==typeof e)return t(e,o);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,o):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.")}()}function r(e){return r="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},r(e)}var n=i(748),l=i(2717),a={onContentScroll:Function},u=Object.assign({list:e.PropTypes.array.def([]),enabled:e.PropTypes.bool.def(!0),scrollEvent:e.PropTypes.bool.def(!1),lineHeight:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.func]).def(30),minHeight:e.PropTypes.number.def(30),height:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),width:e.PropTypes.oneOfType([e.PropTypes.string.def("100%"),e.PropTypes.number]).def("100%"),className:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentClassName:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.object,e.PropTypes.arrayOf(e.PropTypes.object),e.PropTypes.string]).def(""),contentStyle:e.PropTypes.object.def({}),scrollXName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-x")),scrollYName:e.PropTypes.string.def((0,e.resolveClassName)("F-scroll-y")),groupItemCount:e.PropTypes.number.def(1),preloadItemCount:e.PropTypes.number.def(1),renderAs:e.PropTypes.string.def("div"),contentAs:e.PropTypes.string.def("div"),scrollOffsetTop:e.PropTypes.number.def(0),scrollPosition:e.PropTypes.string.def("content"),abosuteHeight:e.PropTypes.oneOfType([e.PropTypes.string.def("auto"),e.PropTypes.number]).def("auto"),throttleDelay:e.PropTypes.number.def(60),rowKey:e.PropTypes.string.def(void 0),keepAlive:e.PropTypes.bool.def(!1)},a),c=i(467);function p(e,t,o,r){for(var n=0,l=0,i=0,s=0;n<e;n++){if(l+(s=r(n,[n*o,(n+1)*o,"virtual"]))>t){i=t-l;break}l+=s}return{startIndex:n,height:l,diffHeight:i}}function f(e,t,o,r,n){if(r){var l=r.scrollTop,i=r.scrollLeft,s=o.scrollTop,a=o.count,u=o.groupItemCount,c=o.startIndex,f=o.endIndex,d=o.scrollLeft,v=r.offsetHeight,y=0,g=0,h=0;if("number"==typeof e&&(y=Math.floor(l/e),g=Math.ceil(v/e)+y,h=l%e),"function"==typeof e){var m=p(a,l,u,e);y=m.startIndex>0?m.startIndex:0,h=m.diffHeight,g=p(a,v,u,e).startIndex+y+1}if(l!==s||y!==c||g!==f||d!==i){var b=r.scrollHeight-r.offsetHeight-r.scrollTop;"function"==typeof t&&t(n,y,g,l,h,i,{bottom:b>=0?b:0})}}}var d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;return(0,c.throttle)((function(e,t,o){return function(e,t,o){var r=o.value,n=r.lineHeight,l=void 0===n?30:n,i=r.handleScrollCallback,s=r.pagination,a=void 0===s?{}:s;if(r.onlyScroll){var u=t.scrollTop,c=t.scrollLeft,p=t.scrollHeight-t.offsetHeight-t.scrollTop;i(e,null,null,u,u,c,{bottom:p>=0?p:0})}else{var d=a.startIndex,v=a.endIndex,y=a.groupItemCount,g=a.count;f(l,i,{scrollTop:a.scrollTop,startIndex:d,endIndex:v,groupItemCount:y,count:g,scrollLeft:a.scrollLeft},t,e)}}(e,t,o)}),e)};const v={mounted:function(e,t){var o=e.parentNode,r=t.value.throttleDelay;o.addEventListener("scroll",(function(e){!function(e,t,o){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:60;Reflect.apply(d(r),void 0,[e,t,o])}(e,o,t,r)}))},unbind:function(e){if(e){var t=e.parentNode;if(!t)return;t.removeEventListener("scroll",d)}}},y=(0,n.defineComponent)({name:"VirtualRender",directives:{bkVirtualRender:v},props:u,emits:["content-scroll"],slots:Object,setup:function(e,t){var i=this,s=e.renderAs,a=e.contentAs,u=function(e){return"string"==typeof e?[e]:"object"!==r(e)||Array.isArray(e)?e:[e]};if(!e.enabled){var c=function(e,t){var o=e.renderAs,r=e.contentAs,l=(0,n.resolveDirective)("bkVirtualRender"),i={lineHeight:e.lineHeight,handleScrollCallback:function(e,o,r,n,l,i,s){t.emit("content-scroll",[e,{translateY:l,translateX:i,pos:s}])},pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},s=(0,n.ref)(null);return t.expose({scrollTo:function(e){var t=e.left,o=void 0===t?0:t,r=e.top,n=void 0===r?0:r;s.value.scrollTo(o,n)}}),{rendAsTag:function(){var a,u,c,p,f,d,v,y,g,h,m,b;return(0,n.h)(o,{class:e.className,ref:s},[null!==(c=null===(u=(a=t.slots).beforeContent)||void 0===u?void 0:u.call(a))&&void 0!==c?c:"",(0,n.withDirectives)((0,n.h)(r,{class:e.contentClassName,style:e.contentStyle},[null!==(d=null===(f=(p=t.slots).default)||void 0===f?void 0:f.call(p,{data:e.list}))&&void 0!==d?d:""]),[[l,i]]),null!==(g=null===(y=(v=t.slots).afterContent)||void 0===y?void 0:y.call(v))&&void 0!==g?g:"",null!==(b=null===(m=(h=t.slots).afterSection)||void 0===m?void 0:m.call(h))&&void 0!==b?b:""])}}}(e,t);return c.rendAsTag}var p=(0,n.ref)(null),d=(0,n.reactive)({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),v=function(e,o,r,n,l,i,s){d.startIndex=o,d.endIndex=r,d.scrollTop=n,d.translateY=l,d.translateX=i,d.scrollLeft=i,d.pos=s,t.emit("content-scroll",[e,d])};(0,n.onMounted)((function(){(0,n.nextTick)((function(){m(e.list),b()}))})),(0,n.watch)((function(){return e.list}),(function(){var t;t={left:d.scrollLeft,top:d.scrollTop},y(),b(),e.keepAlive&&w(t)}),{deep:!0}),(0,n.watch)((function(){return e.lineHeight}),(function(){y(),b()}));var y=function(){m(e.list)},g=(0,n.ref)(0),h=(0,n.ref)(0),m=function(t){if(g.value=Math.ceil((t||[]).length/e.groupItemCount),d.count=g.value,d.startIndex=0,d.endIndex=0,d.translateY=0,d.scrollTop=0,"string"==typeof e.abosuteHeight&&"auto"===e.abosuteHeight)if("function"==typeof e.lineHeight){h.value=0;for(var o=0,r=0;r<g.value;r++){var n=e.lineHeight.call(i,r,t.slice(r*e.groupItemCount,e.groupItemCount));o+="number"==typeof n?n:0}h.value=o}else h.value=e.lineHeight*g.value;else h.value=e.abosuteHeight},b=function(){var t,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},r=null===(t=p.value)||void 0===t?void 0:t.parentNode;f(e.lineHeight,v,d,r,null),o&&p.value&&w(o)},T=(0,n.computed)((function(){return void 0!==e.rowKey?e.list:(e.list||[]).map((function(e,t){return Object.assign(Object.assign({},e),{$index:t})}))})),P=(0,n.computed)((function(){return T.value.slice(d.startIndex*e.groupItemCount,(d.endIndex+e.preloadItemCount)*e.groupItemCount)})),x=(0,n.computed)((function(){return"content"===e.scrollPosition?{top:"".concat(d.scrollTop+e.scrollOffsetTop,"px"),transform:"translateY(-".concat(d.translateY,"px)")}:{}})),I=(0,n.computed)((function(){return Object.assign({height:"number"==typeof e.height?"".concat(e.height,"px"):e.height,width:"number"==typeof e.width?"".concat(e.width,"px"):e.width,display:"inline-block"},"container"===e.scrollPosition?x.value:{})})),C=(0,n.computed)((function(){var t="number"==typeof e.abosuteHeight&&0===e.abosuteHeight;return{height:"".concat(h.value<e.minHeight?e.minHeight:h.value,"px"),display:t?"none":"block"}})),H=(0,l.usePrefix)().resolveClassName,O=(0,n.computed)((function(){return[H("virtual-render"),e.scrollXName,e.scrollYName].concat(o(u(e.className)),["container"===e.scrollPosition?H("virtual-content"):""])})),S=(0,n.computed)((function(){return["content"===e.scrollPosition?H("virtual-content"):""].concat(o(u(e.contentClassName)))})),j=(0,n.resolveDirective)("bkVirtualRender"),A={lineHeight:e.lineHeight,handleScrollCallback:v,pagination:d,throttleDelay:e.throttleDelay},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,top:0},t=e.left,o=e.top;p.value.scrollTo(t,o)};return t.expose({reset:function(){y(),b()},scrollTo:w}),function(){var o,r,l,i,u,c,f,d,v,y,g,h;return(0,n.h)(s||"div",{ref:p,class:O.value,style:I.value},[null!==(l=null===(r=(o=t.slots).beforeContent)||void 0===r?void 0:r.call(o))&&void 0!==l?l:"",(0,n.withDirectives)((0,n.h)(a||"div",{class:S.value,style:Object.assign(Object.assign({},x.value),e.contentStyle)},[null!==(c=null===(u=(i=t.slots).default)||void 0===u?void 0:u.call(i,{data:P.value}))&&void 0!==c?c:""]),[[j,A]]),null!==(v=null===(d=(f=t.slots).afterContent)||void 0===d?void 0:d.call(f))&&void 0!==v?v:"",(0,n.h)("div",{class:[H("virtual-section")],style:C.value}),null!==(h=null===(g=(y=t.slots).afterSection)||void 0===g?void 0:g.call(y))&&void 0!==h?h:""])}}}),g=(0,e.withInstall)(y)})(),s})()));
1
+ import "./virtual-render.less";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
5
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
6
+ /******/ // The require scope
7
+ /******/ var __webpack_require__ = {};
8
+ /******/
9
+ /************************************************************************/
10
+ /******/ /* webpack/runtime/define property getters */
11
+ /******/ (() => {
12
+ /******/ // define getter functions for harmony exports
13
+ /******/ __webpack_require__.d = (exports, definition) => {
14
+ /******/ for(var key in definition) {
15
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
16
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
17
+ /******/ }
18
+ /******/ }
19
+ /******/ };
20
+ /******/ })();
21
+ /******/
22
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
23
+ /******/ (() => {
24
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
25
+ /******/ })();
26
+ /******/
27
+ /************************************************************************/
28
+ var __webpack_exports__ = {};
29
+
30
+ // EXPORTS
31
+ __webpack_require__.d(__webpack_exports__, {
32
+ Z: () => (/* binding */ src)
33
+ });
34
+
35
+ ;// CONCATENATED MODULE: external "../shared"
36
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
37
+ var y = x => () => x
38
+ const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["resolveClassName"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
39
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
40
+ function _arrayLikeToArray(arr, len) {
41
+ if (len == null || len > arr.length) len = arr.length;
42
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
43
+ return arr2;
44
+ }
45
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
46
+
47
+ function _arrayWithoutHoles(arr) {
48
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
49
+ }
50
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
51
+ function _iterableToArray(iter) {
52
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
53
+ }
54
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
55
+
56
+ function _unsupportedIterableToArray(o, minLen) {
57
+ if (!o) return;
58
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
59
+ var n = Object.prototype.toString.call(o).slice(8, -1);
60
+ if (n === "Object" && o.constructor) n = o.constructor.name;
61
+ if (n === "Map" || n === "Set") return Array.from(o);
62
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
63
+ }
64
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
65
+ function _nonIterableSpread() {
66
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
67
+ }
68
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
69
+
70
+
71
+
72
+
73
+ function _toConsumableArray(arr) {
74
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
75
+ }
76
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
77
+ function _typeof(obj) {
78
+ "@babel/helpers - typeof";
79
+
80
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
81
+ return typeof obj;
82
+ } : function (obj) {
83
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
84
+ }, _typeof(obj);
85
+ }
86
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
87
+
88
+ function _toPrimitive(input, hint) {
89
+ if (_typeof(input) !== "object" || input === null) return input;
90
+ var prim = input[Symbol.toPrimitive];
91
+ if (prim !== undefined) {
92
+ var res = prim.call(input, hint || "default");
93
+ if (_typeof(res) !== "object") return res;
94
+ throw new TypeError("@@toPrimitive must return a primitive value.");
95
+ }
96
+ return (hint === "string" ? String : Number)(input);
97
+ }
98
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
99
+
100
+
101
+ function _toPropertyKey(arg) {
102
+ var key = _toPrimitive(arg, "string");
103
+ return _typeof(key) === "symbol" ? key : String(key);
104
+ }
105
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
106
+
107
+ function _defineProperty(obj, key, value) {
108
+ key = _toPropertyKey(key);
109
+ if (key in obj) {
110
+ Object.defineProperty(obj, key, {
111
+ value: value,
112
+ enumerable: true,
113
+ configurable: true,
114
+ writable: true
115
+ });
116
+ } else {
117
+ obj[key] = value;
118
+ }
119
+ return obj;
120
+ }
121
+ ;// CONCATENATED MODULE: external "vue"
122
+ var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
123
+ var external_vue_y = x => () => x
124
+ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["onUnmounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onUnmounted, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
125
+ ;// CONCATENATED MODULE: external "../config-provider"
126
+ var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
127
+ var config_provider_y = x => () => x
128
+ const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
129
+ ;// CONCATENATED MODULE: ../../packages/virtual-render/src/props.ts
130
+
131
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
132
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
133
+ /*
134
+ * Tencent is pleased to support the open source community by making
135
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
136
+ *
137
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
138
+ *
139
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
140
+ *
141
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
142
+ *
143
+ * ---------------------------------------------------
144
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
145
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
146
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
147
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
148
+ *
149
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
150
+ * the Software.
151
+ *
152
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
153
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
154
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
155
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
156
+ * IN THE SOFTWARE.
157
+ */
158
+
159
+ var EventProps = {
160
+ onContentScroll: Function
161
+ };
162
+ var virtualRenderProps = _objectSpread({
163
+ /** 传入原始数据源 */
164
+ list: shared_namespaceObject.PropTypes.array.def([]),
165
+ /**
166
+ * 是否启用此功能
167
+ * 如果设置为false,则此组件只会渲染两层指定的 容器,默认渲染两层 div
168
+ * 设置为true才会启用所有的虚拟渲染 & 滚动相关计算
169
+ * 此属性设置为了兼容需要按需开启\关闭虚拟渲染场景,避免外层设计两套样式架构
170
+ * Note: 目前此属性不支持动态修改
171
+ */
172
+ enabled: shared_namespaceObject.PropTypes.bool.def(true),
173
+ /**
174
+ * 是否启用内置的Scroll Listener
175
+ * 当启用虚拟滚动时(enabled = true),滚动监听为内置生效
176
+ * 只有当(enabled = false)时此配置项才生效
177
+ */
178
+ scrollEvent: shared_namespaceObject.PropTypes.bool.def(false),
179
+ /**
180
+ * 每行数据高度
181
+ * 默认为数值类型,默认高度 30px
182
+ * 如果每行高度不一致,可为回调函数:(index: number, row: any[]): number => {}
183
+ * 函数参数为当前行index & 当前行数据 row,row为数组,当不分组时,为当前行item
184
+ * 如果有分组展示, index 为当前分组 index, row为数组,当前行分组所有 item 数据
185
+ */
186
+ lineHeight: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.func]).def(30),
187
+ /** 整体最小高度 */
188
+ minHeight: shared_namespaceObject.PropTypes.number.def(30),
189
+ /** 整体最大高度 */
190
+ maxHeight: shared_namespaceObject.PropTypes.number,
191
+ /**
192
+ * 整体高度
193
+ * 可设置具体值,如果设置为 100%,则组件会自动计算外层DOM元素offsetHeight,用于计算可渲染行数
194
+ */
195
+ height: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string.def('100%'), shared_namespaceObject.PropTypes.number]).def('100%'),
196
+ /**
197
+ * 渲染区域宽度
198
+ * 如果设置 100% 则自适应外层元素宽度
199
+ */
200
+ width: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string.def('100%'), shared_namespaceObject.PropTypes.number]).def('100%'),
201
+ /** 最外层元素ClassName */
202
+ className: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.string), shared_namespaceObject.PropTypes.object, shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.object), shared_namespaceObject.PropTypes.string]).def(''),
203
+ /** 内层层元素ClassName */
204
+ contentClassName: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.string), shared_namespaceObject.PropTypes.object, shared_namespaceObject.PropTypes.arrayOf(shared_namespaceObject.PropTypes.object), shared_namespaceObject.PropTypes.string]).def(''),
205
+ /** 内层元素样式 */
206
+ contentStyle: shared_namespaceObject.PropTypes.object.def({}),
207
+ /** 用于自定义X轴滚动条样式 */
208
+ scrollXName: shared_namespaceObject.PropTypes.string.def((0,shared_namespaceObject.resolveClassName)('F-scroll-x')),
209
+ /** 用于自定义Y轴滚动条样式 */
210
+ scrollYName: shared_namespaceObject.PropTypes.string.def((0,shared_namespaceObject.resolveClassName)('F-scroll-y')),
211
+ /** 分组展示,一行数据可能有多条数据 */
212
+ groupItemCount: shared_namespaceObject.PropTypes.number.def(1),
213
+ /** 预加载行数,避免空白渲染 */
214
+ preloadItemCount: shared_namespaceObject.PropTypes.number.def(1),
215
+ /** 外层Dom元素需要渲染成的目标元素 */
216
+ renderAs: shared_namespaceObject.PropTypes.string.def('div'),
217
+ /** 内容层渲染成目标元素 */
218
+ contentAs: shared_namespaceObject.PropTypes.string.def('div'),
219
+ /** top 滚动填充 */
220
+ scrollOffsetTop: shared_namespaceObject.PropTypes.number.def(0),
221
+ /**
222
+ * 内置滚动位置
223
+ * 可选:container (最外层容器),content(内容层容器)
224
+ * Note: container 慎选,需要自己处理样式 & 位置
225
+ */
226
+ scrollPosition: shared_namespaceObject.PropTypes.string.def('content'),
227
+ /**
228
+ * 绝对高度 | 实际高估
229
+ * 可选值: auto(根据行高和行数计算, LineHeight * List.length) number(外层给定高度,若为0,则不显示)
230
+ */
231
+ abosuteHeight: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.string.def('auto'), shared_namespaceObject.PropTypes.number]).def('auto'),
232
+ /**
233
+ * 滚动刷新计算间隔时间
234
+ * 默认60 ms
235
+ */
236
+ throttleDelay: shared_namespaceObject.PropTypes.number.def(60),
237
+ rowKey: shared_namespaceObject.PropTypes.string.def(undefined),
238
+ /**
239
+ * 数据改变时是否保持之前的状态
240
+ * 保持滚动条位置、当前渲染区间
241
+ */
242
+ keepAlive: shared_namespaceObject.PropTypes.bool.def(false),
243
+ /**
244
+ * 数据监听改变时,是否自动重置位置到[0, 0]
245
+ */
246
+ autoReset: shared_namespaceObject.PropTypes.bool.def(true),
247
+ wrapperStyle: shared_namespaceObject.PropTypes.any.def({})
248
+ }, EventProps);
249
+ ;// CONCATENATED MODULE: ../../packages/virtual-render/src/use-fix-top.tsx
250
+ /* harmony default export */ const use_fix_top = (function (props, refRoot) {
251
+ var scrollTo = function scrollTo() {
252
+ var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
253
+ left: 0,
254
+ top: 0
255
+ };
256
+ var left = option.left,
257
+ top = option.top;
258
+ refRoot.value.scrollTo(left, top);
259
+ };
260
+ /**
261
+ * 指定元素滚动到顶部
262
+ * @param param0
263
+ */
264
+ var fixToTop = function fixToTop(params) {
265
+ var id = params.id,
266
+ index = params.index,
267
+ item = params.item;
268
+ var targetIndex = typeof index === 'number' ? index - 1 : 0;
269
+ if (id !== undefined) {
270
+ var _props$list$findIndex;
271
+ targetIndex = (_props$list$findIndex = props.list.findIndex(function (row) {
272
+ return row[props.rowKey] === id;
273
+ })) !== null && _props$list$findIndex !== void 0 ? _props$list$findIndex : targetIndex;
274
+ }
275
+ if (item !== undefined) {
276
+ var _props$list$findIndex2;
277
+ targetIndex = (_props$list$findIndex2 = props.list.findIndex(function (row) {
278
+ return item[props.rowKey] === row[props.rowKey];
279
+ })) !== null && _props$list$findIndex2 !== void 0 ? _props$list$findIndex2 : targetIndex;
280
+ }
281
+ if (typeof targetIndex === 'number') {
282
+ var resolvedIndex = targetIndex >= 0 ? targetIndex : 0;
283
+ var offsetY = resolvedIndex * props.lineHeight;
284
+ scrollTo({
285
+ left: 0,
286
+ top: offsetY
287
+ });
288
+ }
289
+ };
290
+ return {
291
+ fixToTop: fixToTop,
292
+ scrollTo: scrollTo
293
+ };
294
+ });
295
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
296
+ function _classCallCheck(instance, Constructor) {
297
+ if (!(instance instanceof Constructor)) {
298
+ throw new TypeError("Cannot call a class as a function");
299
+ }
300
+ }
301
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/createClass.js
302
+
303
+ function _defineProperties(target, props) {
304
+ for (var i = 0; i < props.length; i++) {
305
+ var descriptor = props[i];
306
+ descriptor.enumerable = descriptor.enumerable || false;
307
+ descriptor.configurable = true;
308
+ if ("value" in descriptor) descriptor.writable = true;
309
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
310
+ }
311
+ }
312
+ function _createClass(Constructor, protoProps, staticProps) {
313
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
314
+ if (staticProps) _defineProperties(Constructor, staticProps);
315
+ Object.defineProperty(Constructor, "prototype", {
316
+ writable: false
317
+ });
318
+ return Constructor;
319
+ }
320
+ ;// CONCATENATED MODULE: external "lodash/throttle"
321
+ var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
322
+ var throttle_y = x => () => x
323
+ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
324
+ ;// CONCATENATED MODULE: ../../packages/virtual-render/src/v-virtual-render.ts
325
+
326
+
327
+ /*
328
+ * Tencent is pleased to support the open source community by making
329
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
330
+ *
331
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
332
+ *
333
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
334
+ *
335
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
336
+ *
337
+ * ---------------------------------------------------
338
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
339
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
340
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
341
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
342
+ *
343
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
344
+ * the Software.
345
+ *
346
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
347
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
348
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
349
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
350
+ * IN THE SOFTWARE.
351
+ */
352
+ /**
353
+ * @file v-virtual-render
354
+ *
355
+ * Copyright © 2012-2019 Tencent BlueKing. All Rights Reserved. 蓝鲸智云 版权所有
356
+ */
357
+
358
+ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
359
+ var startIndex = 0;
360
+ var height = 0;
361
+ var diffHeight = 0;
362
+ var lastHeight = 0;
363
+ for (; startIndex < maxCount; startIndex++) {
364
+ lastHeight = callback(startIndex, [startIndex * groupItemCount, (startIndex + 1) * groupItemCount, 'virtual']);
365
+ if (height + lastHeight > maxHeight) {
366
+ diffHeight = maxHeight - height;
367
+ break;
368
+ }
369
+ height += lastHeight;
370
+ }
371
+ return {
372
+ startIndex: startIndex,
373
+ height: height,
374
+ diffHeight: diffHeight
375
+ };
376
+ }
377
+ function computedVirtualIndex(lineHeight, callback, pagination, _el, event) {
378
+ if (!event.target) {
379
+ return;
380
+ }
381
+ var elScrollTop = event.target.scrollTop;
382
+ var elScrollLeft = event.target.scrollLeft;
383
+ var elScrollHeight = event.target.scrollHeight;
384
+ var elOffsetHeight = event.target.offsetHeight;
385
+ var count = pagination.count,
386
+ groupItemCount = pagination.groupItemCount;
387
+ var targetStartIndex = 0;
388
+ var targetEndIndex = 0;
389
+ var translateY = 0;
390
+ if (typeof lineHeight === 'number') {
391
+ targetStartIndex = Math.floor(elScrollTop / lineHeight);
392
+ targetEndIndex = Math.ceil(elOffsetHeight / lineHeight) + targetStartIndex;
393
+ translateY = elScrollTop % lineHeight;
394
+ }
395
+ if (typeof lineHeight === 'function') {
396
+ var startValue = getMatchedIndex(count, elScrollTop, groupItemCount, lineHeight);
397
+ targetStartIndex = startValue.startIndex > 0 ? startValue.startIndex : 0;
398
+ translateY = startValue.diffHeight;
399
+ var endValue = getMatchedIndex(count, elOffsetHeight, groupItemCount, lineHeight);
400
+ targetEndIndex = endValue.startIndex + targetStartIndex;
401
+ }
402
+ var bottom = elScrollHeight - elOffsetHeight - elScrollTop;
403
+ typeof callback === 'function' && callback(event, targetStartIndex, targetEndIndex, elScrollTop, translateY, elScrollLeft, {
404
+ bottom: bottom >= 0 ? bottom : 0
405
+ });
406
+ return {
407
+ targetStartIndex: targetStartIndex,
408
+ targetEndIndex: targetEndIndex,
409
+ elScrollTop: elScrollTop,
410
+ translateY: translateY,
411
+ elScrollLeft: elScrollLeft
412
+ };
413
+ }
414
+ var VisibleRender = /*#__PURE__*/function () {
415
+ function VisibleRender(binding, el) {
416
+ _classCallCheck(this, VisibleRender);
417
+ this.binding = binding;
418
+ this.wrapper = el;
419
+ var throttleDelay = binding.value.throttleDelay;
420
+ this.delay = throttleDelay;
421
+ }
422
+ _createClass(VisibleRender, [{
423
+ key: "render",
424
+ value: function render(e) {
425
+ var _this$binding$value = this.binding.value,
426
+ _this$binding$value$l = _this$binding$value.lineHeight,
427
+ lineHeight = _this$binding$value$l === void 0 ? 30 : _this$binding$value$l,
428
+ handleScrollCallback = _this$binding$value.handleScrollCallback,
429
+ _this$binding$value$p = _this$binding$value.pagination,
430
+ pagination = _this$binding$value$p === void 0 ? {} : _this$binding$value$p,
431
+ onlyScroll = _this$binding$value.onlyScroll;
432
+ if (onlyScroll) {
433
+ var elScrollTop = this.wrapper.scrollTop;
434
+ var elScrollLeft = this.wrapper.scrollLeft;
435
+ var bottom = this.wrapper.scrollHeight - this.wrapper.offsetHeight - this.wrapper.scrollTop;
436
+ handleScrollCallback(e, null, null, elScrollTop, elScrollTop, elScrollLeft, {
437
+ bottom: bottom >= 0 ? bottom : 0
438
+ });
439
+ return;
440
+ }
441
+ var startIndex = pagination.startIndex,
442
+ endIndex = pagination.endIndex,
443
+ groupItemCount = pagination.groupItemCount,
444
+ count = pagination.count,
445
+ scrollTop = pagination.scrollTop,
446
+ scrollLeft = pagination.scrollLeft;
447
+ computedVirtualIndex(lineHeight, handleScrollCallback, {
448
+ scrollTop: scrollTop,
449
+ startIndex: startIndex,
450
+ endIndex: endIndex,
451
+ groupItemCount: groupItemCount,
452
+ count: count,
453
+ scrollLeft: scrollLeft
454
+ }, this.wrapper, e);
455
+ }
456
+ }, {
457
+ key: "executeThrottledRender",
458
+ value: function executeThrottledRender(e) {
459
+ (0,throttle_namespaceObject["default"])(this.render.bind(this), this.delay)(e);
460
+ }
461
+ }, {
462
+ key: "install",
463
+ value: function install() {
464
+ var _this$wrapper;
465
+ (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 ? void 0 : _this$wrapper.addEventListener('scroll', this.executeThrottledRender.bind(this));
466
+ }
467
+ }, {
468
+ key: "uninstall",
469
+ value: function uninstall() {
470
+ var _this$wrapper2, _this$wrapper2$remove;
471
+ (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 || (_this$wrapper2$remove = _this$wrapper2.removeListener) === null || _this$wrapper2$remove === void 0 ? void 0 : _this$wrapper2$remove.call(_this$wrapper2, 'scroll', this.executeThrottledRender.bind(this));
472
+ }
473
+ }, {
474
+ key: "setBinding",
475
+ value: function setBinding(binding) {
476
+ this.binding = binding;
477
+ }
478
+ }]);
479
+ return VisibleRender;
480
+ }();
481
+ var instance = null;
482
+ /* harmony default export */ const v_virtual_render = ({
483
+ mounted: function mounted(el, binding) {
484
+ var wrapper = el.parentNode;
485
+ instance = new VisibleRender(binding, el);
486
+ wrapper.addEventListener('scroll', instance.executeThrottledRender.bind(instance));
487
+ },
488
+ updated: function updated(_el, binding) {
489
+ var _instance;
490
+ (_instance = instance) === null || _instance === void 0 ? void 0 : _instance.setBinding(binding);
491
+ },
492
+ unbind: function unbind(el) {
493
+ if (el) {
494
+ var wrapper = el.parentNode;
495
+ if (!wrapper || !instance) {
496
+ return;
497
+ }
498
+ wrapper.removeEventListener('scroll', instance.executeThrottledRender);
499
+ }
500
+ }
501
+ });
502
+ ;// CONCATENATED MODULE: ../../packages/virtual-render/src/use-tag-render.tsx
503
+
504
+ function use_tag_render_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
505
+ function use_tag_render_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? use_tag_render_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : use_tag_render_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
506
+ /*
507
+ * Tencent is pleased to support the open source community by making
508
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
509
+ *
510
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
511
+ *
512
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
513
+ *
514
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
515
+ *
516
+ * ---------------------------------------------------
517
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
518
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
519
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
520
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
521
+ *
522
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
523
+ * the Software.
524
+ *
525
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
526
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
527
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
528
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
529
+ * IN THE SOFTWARE.
530
+ */
531
+
532
+
533
+
534
+ /* harmony default export */ const use_tag_render = (function (props, ctx) {
535
+ var renderAs = props.renderAs,
536
+ contentAs = props.contentAs;
537
+ /** 指令触发Scroll事件,计算当前startIndex & endIndex & scrollTop & translateY */
538
+ var handleScrollCallback = function handleScrollCallback(event, _startIndex, _endIndex, _scrollTop, translateY, scrollLeft, pos) {
539
+ ctx.emit('content-scroll', [event, {
540
+ translateY: translateY,
541
+ translateX: scrollLeft,
542
+ pos: pos
543
+ }]);
544
+ };
545
+ var instance = null;
546
+ var binding = (0,external_vue_namespaceObject.computed)(function () {
547
+ return {
548
+ lineHeight: props.lineHeight,
549
+ handleScrollCallback: handleScrollCallback,
550
+ pagination: {},
551
+ throttleDelay: props.throttleDelay,
552
+ onlyScroll: props.scrollEvent
553
+ };
554
+ });
555
+ var refRoot = (0,external_vue_namespaceObject.ref)(null);
556
+ /** 虚拟渲染外层容器样式 */
557
+ var wrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
558
+ var _props$maxHeight;
559
+ var height = typeof props.height === 'number' ? "".concat(props.height, "px") : props.height;
560
+ return use_tag_render_objectSpread({
561
+ height: height,
562
+ width: typeof props.width === 'number' ? "".concat(props.width, "px") : props.width,
563
+ display: 'inline-block',
564
+ maxHeight: (_props$maxHeight = props.maxHeight) !== null && _props$maxHeight !== void 0 ? _props$maxHeight : height
565
+ }, props.wrapperStyle);
566
+ });
567
+ var _useFixTop = use_fix_top(props, refRoot),
568
+ scrollTo = _useFixTop.scrollTo,
569
+ fixToTop = _useFixTop.fixToTop;
570
+ ctx.expose({
571
+ scrollTo: scrollTo,
572
+ fixToTop: fixToTop
573
+ });
574
+ (0,external_vue_namespaceObject.onMounted)(function () {
575
+ instance = new VisibleRender(binding, refRoot.value);
576
+ instance.install();
577
+ });
578
+ (0,external_vue_namespaceObject.onUnmounted)(function () {
579
+ var _instance;
580
+ (_instance = instance) === null || _instance === void 0 ? void 0 : _instance.uninstall();
581
+ });
582
+ return {
583
+ rendAsTag: function rendAsTag() {
584
+ var _ctx$slots$beforeCont, _ctx$slots$beforeCont2, _ctx$slots, _ctx$slots$default, _ctx$slots$default2, _ctx$slots2, _ctx$slots$afterConte, _ctx$slots$afterConte2, _ctx$slots3, _ctx$slots$afterSecti, _ctx$slots$afterSecti2, _ctx$slots4;
585
+ return (0,external_vue_namespaceObject.h)(
586
+ // @ts-ignore:next-line
587
+ renderAs, {
588
+ "class": props.className,
589
+ style: wrapperStyle.value,
590
+ ref: refRoot
591
+ }, [(_ctx$slots$beforeCont = (_ctx$slots$beforeCont2 = (_ctx$slots = ctx.slots).beforeContent) === null || _ctx$slots$beforeCont2 === void 0 ? void 0 : _ctx$slots$beforeCont2.call(_ctx$slots)) !== null && _ctx$slots$beforeCont !== void 0 ? _ctx$slots$beforeCont : '', (0,external_vue_namespaceObject.h)(contentAs, {
592
+ "class": props.contentClassName,
593
+ style: props.contentStyle
594
+ }, [(_ctx$slots$default = (_ctx$slots$default2 = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default2 === void 0 ? void 0 : _ctx$slots$default2.call(_ctx$slots2, {
595
+ data: props.list
596
+ })) !== null && _ctx$slots$default !== void 0 ? _ctx$slots$default : '']), (_ctx$slots$afterConte = (_ctx$slots$afterConte2 = (_ctx$slots3 = ctx.slots).afterContent) === null || _ctx$slots$afterConte2 === void 0 ? void 0 : _ctx$slots$afterConte2.call(_ctx$slots3)) !== null && _ctx$slots$afterConte !== void 0 ? _ctx$slots$afterConte : '', (_ctx$slots$afterSecti = (_ctx$slots$afterSecti2 = (_ctx$slots4 = ctx.slots).afterSection) === null || _ctx$slots$afterSecti2 === void 0 ? void 0 : _ctx$slots$afterSecti2.call(_ctx$slots4)) !== null && _ctx$slots$afterSecti !== void 0 ? _ctx$slots$afterSecti : '']);
597
+ }
598
+ };
599
+ });
600
+ ;// CONCATENATED MODULE: ../../packages/virtual-render/src/virtual-render.tsx
601
+
602
+
603
+
604
+ function virtual_render_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
605
+ function virtual_render_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? virtual_render_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : virtual_render_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
606
+ /*
607
+ * Tencent is pleased to support the open source community by making
608
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
609
+ *
610
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
611
+ *
612
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
613
+ *
614
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
615
+ *
616
+ * ---------------------------------------------------
617
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
618
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
619
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
620
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
621
+ *
622
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
623
+ * the Software.
624
+ *
625
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
626
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
627
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
628
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
629
+ * IN THE SOFTWARE.
630
+ */
631
+ /**
632
+ * @file virtual-render
633
+ *
634
+ * Copyright © 2012-2019 Tencent BlueKing. All Rights Reserved. 蓝鲸智云 版权所有
635
+ */
636
+
637
+
638
+
639
+
640
+
641
+
642
+ /* harmony default export */ const virtual_render = ((0,external_vue_namespaceObject.defineComponent)({
643
+ name: 'VirtualRender',
644
+ directives: {
645
+ bkVirtualRender: v_virtual_render
646
+ },
647
+ props: virtualRenderProps,
648
+ emits: ['content-scroll'],
649
+ slots: Object,
650
+ setup: function setup(props, ctx) {
651
+ var _this = this;
652
+ var renderAs = props.renderAs,
653
+ contentAs = props.contentAs;
654
+ var resolvePropClassName = function resolvePropClassName(prop) {
655
+ if (typeof prop === 'string') {
656
+ return [prop];
657
+ }
658
+ if (_typeof(prop) === 'object' && !Array.isArray(prop)) {
659
+ return [prop];
660
+ }
661
+ return prop;
662
+ };
663
+ if (!props.enabled) {
664
+ var _useTagRender = use_tag_render(props, ctx),
665
+ rendAsTag = _useTagRender.rendAsTag;
666
+ return rendAsTag;
667
+ }
668
+ var binding = (0,external_vue_namespaceObject.computed)(function () {
669
+ return {
670
+ lineHeight: props.lineHeight,
671
+ handleScrollCallback: handleScrollCallback,
672
+ pagination: pagination,
673
+ throttleDelay: props.throttleDelay
674
+ };
675
+ });
676
+ var refRoot = (0,external_vue_namespaceObject.ref)(null);
677
+ var instance = null;
678
+ var pagination = (0,external_vue_namespaceObject.reactive)({
679
+ startIndex: 0,
680
+ endIndex: 0,
681
+ scrollTop: 1,
682
+ scrollLeft: 0,
683
+ translateY: 0,
684
+ translateX: 0,
685
+ count: 0,
686
+ pos: {},
687
+ groupItemCount: props.groupItemCount
688
+ });
689
+ var calcList = (0,external_vue_namespaceObject.ref)([]);
690
+ /** 指令触发Scroll事件,计算当前startIndex & endIndex & scrollTop & translateY */
691
+ var handleScrollCallback = function handleScrollCallback(event, startIndex, endIndex, scrollTop, translateY, scrollLeft, pos) {
692
+ var translateX = scrollLeft;
693
+ Object.assign(pagination, {
694
+ startIndex: startIndex,
695
+ endIndex: endIndex,
696
+ scrollTop: scrollTop,
697
+ translateX: translateX,
698
+ translateY: translateY,
699
+ scrollLeft: scrollLeft,
700
+ pos: pos
701
+ });
702
+ var start = pagination.startIndex * props.groupItemCount;
703
+ var end = (pagination.endIndex + props.preloadItemCount) * props.groupItemCount;
704
+ var total = localList.value.length;
705
+ if (total < end) {
706
+ var contentLength = end - start;
707
+ calcList.value = localList.value.slice(start, total);
708
+ end = total + 1;
709
+ start = end - contentLength;
710
+ start = start < 0 ? 0 : start;
711
+ }
712
+ var value = localList.value.slice(start, end + 10);
713
+ calcList.value = value;
714
+ if (event) {
715
+ ctx.emit('content-scroll', [event, pagination]);
716
+ }
717
+ };
718
+ (0,external_vue_namespaceObject.onMounted)(function () {
719
+ instance = new VisibleRender(binding, refRoot.value);
720
+ instance.install();
721
+ });
722
+ (0,external_vue_namespaceObject.onUnmounted)(function () {
723
+ var _instance;
724
+ (_instance = instance) === null || _instance === void 0 ? void 0 : _instance.uninstall();
725
+ });
726
+ var handleChangeListConfig = function handleChangeListConfig() {
727
+ /** 数据改变时激活当前表单,使其渲染DOM */
728
+ handleListChanged(props.list);
729
+ };
730
+ /** 如果有分组状态,计算总行数 */
731
+ var listLength = (0,external_vue_namespaceObject.ref)(0);
732
+ /** 实际高度,根据行高和总行数计算出来的实际高度 */
733
+ var innerHeight = (0,external_vue_namespaceObject.ref)(0);
734
+ /**
735
+ * 列表数据改变时,处理相关参数
736
+ */
737
+ var handleListChanged = function handleListChanged(list) {
738
+ listLength.value = Math.ceil((list || []).length / props.groupItemCount);
739
+ pagination.count = listLength.value;
740
+ var isAuto = typeof props.abosuteHeight === 'string' && props.abosuteHeight === 'auto';
741
+ if (isAuto) {
742
+ if (typeof props.lineHeight === 'function') {
743
+ innerHeight.value = 0;
744
+ var fnValue = 0;
745
+ for (var i = 0; i < listLength.value; i++) {
746
+ var fnVal = props.lineHeight.call(_this, i, list.slice(i * props.groupItemCount, props.groupItemCount));
747
+ fnValue += typeof fnVal === 'number' ? fnVal : 0;
748
+ }
749
+ innerHeight.value = fnValue;
750
+ } else {
751
+ innerHeight.value = props.lineHeight * listLength.value;
752
+ }
753
+ } else {
754
+ innerHeight.value = props.abosuteHeight;
755
+ }
756
+ };
757
+ /** 列表数据重置之后的处理事项 */
758
+ var afterListDataReset = function afterListDataReset() {
759
+ var _scrollToOpt = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
760
+ left: 0,
761
+ top: 0
762
+ };
763
+ var el = refRoot.value;
764
+ (0,external_vue_namespaceObject.nextTick)(function () {
765
+ computedVirtualIndex(props.lineHeight, handleScrollCallback, pagination, el, {
766
+ target: el
767
+ });
768
+ });
769
+ };
770
+ /** 映射传入的数组为新的数组,增加 $index属性,用来处理唯一Index */
771
+ var localList = (0,external_vue_namespaceObject.computed)(function () {
772
+ if (props.rowKey !== undefined) {
773
+ return props.list;
774
+ }
775
+ return (props.list || []).map(function (item, index) {
776
+ return virtual_render_objectSpread(virtual_render_objectSpread({}, item), {}, {
777
+ $index: index
778
+ });
779
+ });
780
+ });
781
+ /** 展示列表内容区域样式 */
782
+ var innerContentStyle = (0,external_vue_namespaceObject.computed)(function () {
783
+ return props.scrollPosition === 'content' ? {
784
+ top: "".concat(pagination.scrollTop + props.scrollOffsetTop, "px"),
785
+ transform: "translateY(-".concat(pagination.translateY, "px)")
786
+ } : {};
787
+ });
788
+ /** 虚拟渲染外层容器样式 */
789
+ var wrapperStyle = (0,external_vue_namespaceObject.computed)(function () {
790
+ var _props$maxHeight;
791
+ var height = typeof props.height === 'number' ? "".concat(props.height, "px") : props.height;
792
+ return virtual_render_objectSpread(virtual_render_objectSpread({
793
+ height: height,
794
+ width: typeof props.width === 'number' ? "".concat(props.width, "px") : props.width,
795
+ display: 'inline-block',
796
+ maxHeight: (_props$maxHeight = props.maxHeight) !== null && _props$maxHeight !== void 0 ? _props$maxHeight : height
797
+ }, props.scrollPosition === 'container' ? innerContentStyle.value : {}), props.wrapperStyle);
798
+ });
799
+ /** 虚拟渲染区域内置占位区域样式,用来撑起总高度,出现滚动条 */
800
+ var innerStyle = (0,external_vue_namespaceObject.computed)(function () {
801
+ var isHidden = typeof props.abosuteHeight === 'number' && props.abosuteHeight === 0;
802
+ return {
803
+ height: "".concat(innerHeight.value < props.minHeight ? props.minHeight : innerHeight.value, "px"),
804
+ display: isHidden ? 'none' : 'block'
805
+ };
806
+ });
807
+ var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
808
+ resolveClassName = _usePrefix.resolveClassName;
809
+ /** 外层样式列表 */
810
+ var wrapperClass = (0,external_vue_namespaceObject.computed)(function () {
811
+ return [resolveClassName('virtual-render'), props.scrollXName, props.scrollYName].concat(_toConsumableArray(resolvePropClassName(props.className)), [props.scrollPosition === 'container' ? resolveClassName('virtual-content') : '']);
812
+ });
813
+ /** 内容区域样式列表 */
814
+ var innerClass = (0,external_vue_namespaceObject.computed)(function () {
815
+ return [props.scrollPosition === 'content' ? resolveClassName('virtual-content') : ''].concat(_toConsumableArray(resolvePropClassName(props.contentClassName)));
816
+ });
817
+ /**
818
+ * 重置当前配置
819
+ * @param keepLastPostion
820
+ */
821
+ var reset = function reset() {
822
+ handleChangeListConfig();
823
+ afterListDataReset();
824
+ };
825
+ var _useFixTop = use_fix_top(props, refRoot),
826
+ scrollTo = _useFixTop.scrollTo,
827
+ fixToTop = _useFixTop.fixToTop;
828
+ (0,external_vue_namespaceObject.watch)(function () {
829
+ return [props.lineHeight, props.height, props.list, props.maxHeight];
830
+ }, function () {
831
+ var _instance2;
832
+ (_instance2 = instance) === null || _instance2 === void 0 ? void 0 : _instance2.setBinding(binding);
833
+ handleChangeListConfig();
834
+ (0,external_vue_namespaceObject.nextTick)(function () {
835
+ afterListDataReset();
836
+ });
837
+ }, {
838
+ deep: true,
839
+ immediate: true
840
+ });
841
+ ctx.expose({
842
+ reset: reset,
843
+ scrollTo: scrollTo,
844
+ fixToTop: fixToTop
845
+ });
846
+ return function () {
847
+ var _ctx$slots$beforeCont, _ctx$slots$beforeCont2, _ctx$slots, _ctx$slots$default, _ctx$slots$default2, _ctx$slots2, _ctx$slots$afterConte, _ctx$slots$afterConte2, _ctx$slots3, _ctx$slots$afterSecti, _ctx$slots$afterSecti2, _ctx$slots4;
848
+ return (0,external_vue_namespaceObject.h)(
849
+ // @ts-ignore:next-line
850
+ renderAs || 'div', {
851
+ ref: refRoot,
852
+ "class": wrapperClass.value,
853
+ style: wrapperStyle.value
854
+ }, [(_ctx$slots$beforeCont = (_ctx$slots$beforeCont2 = (_ctx$slots = ctx.slots).beforeContent) === null || _ctx$slots$beforeCont2 === void 0 ? void 0 : _ctx$slots$beforeCont2.call(_ctx$slots)) !== null && _ctx$slots$beforeCont !== void 0 ? _ctx$slots$beforeCont : '', (0,external_vue_namespaceObject.h)(contentAs || 'div', {
855
+ "class": innerClass.value,
856
+ style: virtual_render_objectSpread(virtual_render_objectSpread({}, innerContentStyle.value), props.contentStyle)
857
+ }, [(_ctx$slots$default = (_ctx$slots$default2 = (_ctx$slots2 = ctx.slots)["default"]) === null || _ctx$slots$default2 === void 0 ? void 0 : _ctx$slots$default2.call(_ctx$slots2, {
858
+ data: calcList.value
859
+ })) !== null && _ctx$slots$default !== void 0 ? _ctx$slots$default : '']), (_ctx$slots$afterConte = (_ctx$slots$afterConte2 = (_ctx$slots3 = ctx.slots).afterContent) === null || _ctx$slots$afterConte2 === void 0 ? void 0 : _ctx$slots$afterConte2.call(_ctx$slots3)) !== null && _ctx$slots$afterConte !== void 0 ? _ctx$slots$afterConte : '', (0,external_vue_namespaceObject.h)('div', {
860
+ "class": [resolveClassName('virtual-section')],
861
+ style: innerStyle.value
862
+ }), (_ctx$slots$afterSecti = (_ctx$slots$afterSecti2 = (_ctx$slots4 = ctx.slots).afterSection) === null || _ctx$slots$afterSecti2 === void 0 ? void 0 : _ctx$slots$afterSecti2.call(_ctx$slots4)) !== null && _ctx$slots$afterSecti !== void 0 ? _ctx$slots$afterSecti : '']);
863
+ };
864
+ }
865
+ }));
866
+ ;// CONCATENATED MODULE: ../../packages/virtual-render/src/index.ts
867
+ /*
868
+ * Tencent is pleased to support the open source community by making
869
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
870
+ *
871
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
872
+ *
873
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
874
+ *
875
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
876
+ *
877
+ * ---------------------------------------------------
878
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
879
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
880
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
881
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
882
+ *
883
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
884
+ * the Software.
885
+ *
886
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
887
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
888
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
889
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
890
+ * IN THE SOFTWARE.
891
+ */
892
+ /**
893
+ * @file virtual-render enter
894
+ *
895
+ * Copyright © 2012-2019 Tencent BlueKing. All Rights Reserved. 蓝鲸智云 版权所有
896
+ */
897
+
898
+
899
+ var BkVirtualRender = (0,shared_namespaceObject.withInstall)(virtual_render);
900
+ /* harmony default export */ const src = (BkVirtualRender);
901
+ var __webpack_exports__default = __webpack_exports__.Z;
902
+ export { __webpack_exports__default as default };