bkui-vue 0.0.2-beta.9 → 0.0.2-beta.91

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 (407) hide show
  1. package/dist/index.cjs.js +143 -161
  2. package/dist/index.esm.js +21050 -23162
  3. package/dist/index.umd.js +143 -161
  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/index.d.ts +4 -4
  16. package/lib/affix/index.js +321 -1
  17. package/lib/alert/alert.css +7 -0
  18. package/lib/alert/alert.d.ts +5 -5
  19. package/lib/alert/alert.less +16 -6
  20. package/lib/alert/alert.variable.css +7 -0
  21. package/lib/alert/index.d.ts +10 -10
  22. package/lib/alert/index.js +214 -1
  23. package/lib/animate-number/index.d.ts +1 -1
  24. package/lib/animate-number/index.js +155 -1
  25. package/lib/backtop/backtop.css +8 -8
  26. package/lib/backtop/backtop.less +3 -1
  27. package/lib/backtop/backtop.variable.css +11 -11
  28. package/lib/backtop/index.d.ts +1 -1
  29. package/lib/backtop/index.js +188 -1
  30. package/lib/badge/badge.d.ts +2 -2
  31. package/lib/badge/index.d.ts +7 -7
  32. package/lib/badge/index.js +235 -1
  33. package/lib/breadcrumb/breadcrumb.css +4 -4
  34. package/lib/breadcrumb/breadcrumb.variable.css +4 -4
  35. package/lib/breadcrumb/index.d.ts +2 -2
  36. package/lib/breadcrumb/index.js +309 -1
  37. package/lib/button/button.css +20 -0
  38. package/lib/button/button.less +105 -94
  39. package/lib/button/button.variable.css +20 -0
  40. package/lib/button/index.d.ts +2 -2
  41. package/lib/button/index.js +321 -1
  42. package/lib/card/card.css +4 -4
  43. package/lib/card/card.d.ts +1 -1
  44. package/lib/card/card.variable.css +4 -4
  45. package/lib/card/index.d.ts +4 -4
  46. package/lib/card/index.js +285 -1
  47. package/lib/cascader/cascader.css +4 -4
  48. package/lib/cascader/cascader.d.ts +1 -0
  49. package/lib/cascader/cascader.variable.css +4 -4
  50. package/lib/cascader/index.d.ts +5 -2
  51. package/lib/cascader/index.js +2036 -2
  52. package/lib/cascader/interface.d.ts +1 -1
  53. package/lib/checkbox/checkbox-group.d.ts +6 -3
  54. package/lib/checkbox/checkbox.d.ts +6 -4
  55. package/lib/checkbox/index.d.ts +28 -19
  56. package/lib/checkbox/index.js +545 -1
  57. package/lib/code-diff/index.d.ts +1 -1
  58. package/lib/code-diff/index.js +5501 -1
  59. package/lib/collapse/index.d.ts +2 -2
  60. package/lib/collapse/index.js +570 -1
  61. package/lib/collapse-transition/index.d.ts +128 -2
  62. package/lib/collapse-transition/index.js +177 -1
  63. package/lib/color-picker/color-picker.d.ts +16 -0
  64. package/lib/color-picker/components/recommend-colors.d.ts +16 -0
  65. package/lib/color-picker/index.d.ts +19 -1
  66. package/lib/color-picker/index.js +2665 -1
  67. package/lib/components.js +530 -1
  68. package/lib/config-provider/config-provider.d.ts +3 -0
  69. package/lib/config-provider/index.d.ts +5 -1
  70. package/lib/config-provider/index.js +365 -1
  71. package/lib/config-provider/token.d.ts +1 -0
  72. package/lib/config-provider/use-global-config.d.ts +2 -0
  73. package/lib/config-provider/use-prefix.d.ts +2 -0
  74. package/lib/container/container.css +4 -4
  75. package/lib/container/container.variable.css +4 -4
  76. package/lib/container/index.d.ts +2 -2
  77. package/lib/container/index.js +391 -1
  78. package/lib/date-picker/date-picker.d.ts +4 -2
  79. package/lib/date-picker/index.d.ts +15 -8
  80. package/lib/date-picker/index.js +5555 -1
  81. package/lib/date-picker/panel/date-range.d.ts +2 -1
  82. package/lib/date-picker/time-picker.d.ts +1 -1
  83. package/lib/dialog/dialog.css +2 -0
  84. package/lib/dialog/dialog.variable.css +2 -0
  85. package/lib/dialog/index.d.ts +1 -1
  86. package/lib/dialog/index.js +975 -2
  87. package/lib/directives/index.js +1376 -2
  88. package/lib/directives/tooltips.d.ts +3 -2
  89. package/lib/dist.index.js +87 -1
  90. package/lib/divider/index.d.ts +1 -1
  91. package/lib/divider/index.js +169 -1
  92. package/lib/dropdown/dropdown.css +1 -0
  93. package/lib/dropdown/dropdown.variable.css +1 -0
  94. package/lib/dropdown/index.d.ts +2 -2
  95. package/lib/dropdown/index.js +369 -1
  96. package/lib/exception/index.d.ts +2 -2
  97. package/lib/exception/index.js +385 -1
  98. package/lib/fixed-navbar/index.d.ts +1 -1
  99. package/lib/fixed-navbar/index.js +154 -1
  100. package/lib/form/index.d.ts +3 -3
  101. package/lib/form/index.js +952 -1
  102. package/lib/hooks.d.ts +1 -1
  103. package/lib/hooks.js +73 -1
  104. package/lib/icon/angle-double-down-line.js +191 -1
  105. package/lib/icon/angle-double-left-line.js +191 -1
  106. package/lib/icon/angle-double-left.js +191 -1
  107. package/lib/icon/angle-double-right-line.js +191 -1
  108. package/lib/icon/angle-double-right.js +191 -1
  109. package/lib/icon/angle-double-up-line.js +191 -1
  110. package/lib/icon/angle-down-fill.js +191 -1
  111. package/lib/icon/angle-down-line.js +191 -1
  112. package/lib/icon/angle-down.js +191 -1
  113. package/lib/icon/angle-left.js +191 -1
  114. package/lib/icon/angle-right.js +191 -1
  115. package/lib/icon/angle-up-fill.js +191 -1
  116. package/lib/icon/angle-up.js +191 -1
  117. package/lib/icon/archive-fill.js +191 -1
  118. package/lib/icon/arrows-left.js +191 -1
  119. package/lib/icon/arrows-right.js +191 -1
  120. package/lib/icon/assistant.d.ts +4 -0
  121. package/lib/icon/assistant.js +191 -0
  122. package/lib/icon/audio-fill.js +191 -1
  123. package/lib/icon/bk.js +191 -1
  124. package/lib/icon/circle.js +191 -1
  125. package/lib/icon/close-line.js +191 -1
  126. package/lib/icon/close.js +191 -1
  127. package/lib/icon/code.js +191 -1
  128. package/lib/icon/cog-shape.js +191 -1
  129. package/lib/icon/collapse-left.js +191 -1
  130. package/lib/icon/copy-shape.js +191 -1
  131. package/lib/icon/copy.js +191 -1
  132. package/lib/icon/data-shape.js +191 -1
  133. package/lib/icon/del.js +191 -1
  134. package/lib/icon/doc-fill.js +191 -1
  135. package/lib/icon/done.js +191 -1
  136. package/lib/icon/down-shape.js +191 -1
  137. package/lib/icon/down-small.js +191 -1
  138. package/lib/icon/edit-line.js +191 -1
  139. package/lib/icon/ellipsis.js +191 -1
  140. package/lib/icon/enlarge-line.js +191 -1
  141. package/lib/icon/error.js +191 -1
  142. package/lib/icon/excel-fill.js +191 -1
  143. package/lib/icon/exclamation-circle-shape.js +191 -1
  144. package/lib/icon/eye.js +191 -1
  145. package/lib/icon/filliscreen-line.js +191 -1
  146. package/lib/icon/fix-line.js +191 -1
  147. package/lib/icon/fix-shape.js +191 -1
  148. package/lib/icon/folder-open.js +191 -1
  149. package/lib/icon/folder-shape-open.js +191 -1
  150. package/lib/icon/folder-shape.js +191 -1
  151. package/lib/icon/folder.js +191 -1
  152. package/lib/icon/funnel.js +191 -1
  153. package/lib/icon/help-document-fill.js +191 -1
  154. package/lib/icon/help-fill.js +191 -1
  155. package/lib/icon/help.js +191 -1
  156. package/lib/icon/image-fill.js +276 -1
  157. package/lib/icon/img-error.js +276 -1
  158. package/lib/icon/img-placehoulder.js +276 -1
  159. package/lib/icon/index.d.ts +1 -0
  160. package/lib/icon/index.js +2399 -1
  161. package/lib/icon/info-line.js +276 -1
  162. package/lib/icon/info.js +276 -1
  163. package/lib/icon/left-shape.js +276 -1
  164. package/lib/icon/left-turn-line.js +276 -1
  165. package/lib/icon/narrow-line.js +276 -1
  166. package/lib/icon/original.js +276 -1
  167. package/lib/icon/pdf-fill.js +276 -1
  168. package/lib/icon/play-shape.js +276 -1
  169. package/lib/icon/plus.js +276 -1
  170. package/lib/icon/ppt-fill.js +276 -1
  171. package/lib/icon/qq.js +276 -1
  172. package/lib/icon/right-shape.js +276 -1
  173. package/lib/icon/right-turn-line.js +276 -1
  174. package/lib/icon/search.js +276 -1
  175. package/lib/icon/share.js +276 -1
  176. package/lib/icon/spinner.js +276 -1
  177. package/lib/icon/success.js +276 -1
  178. package/lib/icon/switcher-loading.js +276 -1
  179. package/lib/icon/text-file.js +276 -1
  180. package/lib/icon/text-fill.js +276 -1
  181. package/lib/icon/transfer.js +276 -1
  182. package/lib/icon/tree-application-shape.js +276 -1
  183. package/lib/icon/unfull-screen.js +276 -1
  184. package/lib/icon/unvisible.js +276 -1
  185. package/lib/icon/up-shape.js +276 -1
  186. package/lib/icon/upload.js +276 -1
  187. package/lib/icon/video-fill.js +276 -1
  188. package/lib/icon/warn.js +276 -1
  189. package/lib/icon/weixin-pro.js +276 -1
  190. package/lib/icon/weixin.js +276 -1
  191. package/lib/image/index.d.ts +1 -1
  192. package/lib/image/index.js +641 -1
  193. package/lib/index.js +97 -1
  194. package/lib/info-box/index.js +1165 -2
  195. package/lib/info-box/info-box.css +2 -0
  196. package/lib/info-box/info-box.less +2 -1
  197. package/lib/info-box/info-box.variable.css +2 -0
  198. package/lib/input/index.d.ts +146 -50
  199. package/lib/input/index.js +1218 -1
  200. package/lib/input/input.css +38 -10
  201. package/lib/input/input.d.ts +100 -11
  202. package/lib/input/input.less +53 -14
  203. package/lib/input/input.variable.css +38 -10
  204. package/lib/input/util.d.ts +6 -0
  205. package/lib/link/index.d.ts +4 -4
  206. package/lib/link/index.js +160 -1
  207. package/lib/link/link.d.ts +1 -1
  208. package/lib/loading/index.d.ts +2 -2
  209. package/lib/loading/index.js +381 -1
  210. package/lib/loading/loading.css +4 -4
  211. package/lib/loading/loading.variable.css +4 -4
  212. package/lib/locale/index.js +465 -1
  213. package/lib/locale/lang/en.d.ts +1 -0
  214. package/lib/menu/index.d.ts +2 -2
  215. package/lib/menu/index.js +724 -1
  216. package/lib/menu/menu.css +4 -4
  217. package/lib/menu/menu.variable.css +4 -4
  218. package/lib/message/index.js +1795 -2
  219. package/lib/message/message.css +33 -9
  220. package/lib/message/message.less +78 -54
  221. package/lib/message/message.variable.css +33 -9
  222. package/lib/message/messageConstructor.d.ts +25 -4
  223. package/lib/modal/index.d.ts +2 -2
  224. package/lib/modal/index.js +396 -1
  225. package/lib/modal/modal.css +2 -0
  226. package/lib/modal/modal.variable.css +2 -0
  227. package/lib/navigation/index.d.ts +4 -1
  228. package/lib/navigation/index.js +367 -1
  229. package/lib/navigation/navigation.d.ts +1 -0
  230. package/lib/notify/index.js +397 -1
  231. package/lib/notify/notifyConstructor.d.ts +1 -1
  232. package/lib/overflow-title/components/overflow-title.d.ts +257 -1
  233. package/lib/overflow-title/index.d.ts +387 -2
  234. package/lib/overflow-title/index.js +461 -1
  235. package/lib/overflow-title/props.d.ts +129 -0
  236. package/lib/pagination/index.d.ts +2 -2
  237. package/lib/pagination/index.js +880 -1
  238. package/lib/plugin-popover/index.js +3905 -1
  239. package/lib/plugins/index.js +63 -1
  240. package/lib/pop-confirm/index.d.ts +1 -1
  241. package/lib/pop-confirm/index.js +273 -1
  242. package/lib/popover/content.d.ts +33 -0
  243. package/lib/popover/index.d.ts +74 -16
  244. package/lib/popover/index.js +3913 -1
  245. package/lib/popover/popover.css +1 -0
  246. package/lib/popover/popover.d.ts +40 -7
  247. package/lib/popover/popover.less +3 -2
  248. package/lib/popover/popover.variable.css +1 -0
  249. package/lib/popover/props.d.ts +25 -2
  250. package/lib/popover/use-floating.d.ts +1 -1
  251. package/lib/popover/use-popover-init.d.ts +2 -1
  252. package/lib/popover2/index.d.ts +1 -1
  253. package/lib/popover2/index.js +107 -1
  254. package/lib/preset.d.ts +2 -0
  255. package/lib/preset.js +93 -1
  256. package/lib/process/index.d.ts +1 -1
  257. package/lib/process/index.js +759 -2
  258. package/lib/progress/index.d.ts +1 -1
  259. package/lib/progress/index.js +431 -1
  260. package/lib/progress/progress.css +4 -4
  261. package/lib/progress/progress.variable.css +4 -4
  262. package/lib/radio/index.d.ts +23 -23
  263. package/lib/radio/index.js +627 -1
  264. package/lib/radio/radio-button.d.ts +4 -4
  265. package/lib/radio/radio-group.d.ts +4 -4
  266. package/lib/radio/radio.d.ts +4 -4
  267. package/lib/rate/index.d.ts +8 -4
  268. package/lib/rate/index.js +338 -1
  269. package/lib/rate/rate.d.ts +2 -1
  270. package/lib/resize-layout/index.d.ts +4 -4
  271. package/lib/resize-layout/index.js +429 -1
  272. package/lib/resize-layout/resize-layout.css +12 -0
  273. package/lib/resize-layout/resize-layout.d.ts +1 -1
  274. package/lib/resize-layout/resize-layout.less +12 -0
  275. package/lib/resize-layout/resize-layout.variable.css +12 -0
  276. package/lib/search-select/index.d.ts +62 -29
  277. package/lib/search-select/index.js +2729 -2
  278. package/lib/search-select/input.d.ts +5 -1
  279. package/lib/search-select/menu.d.ts +33 -2
  280. package/lib/search-select/search-select.css +38 -20
  281. package/lib/search-select/search-select.d.ts +23 -20
  282. package/lib/search-select/search-select.less +35 -14
  283. package/lib/search-select/search-select.variable.css +38 -20
  284. package/lib/search-select/selected.d.ts +5 -1
  285. package/lib/search-select/utils.d.ts +13 -5
  286. package/lib/select/common.d.ts +1 -0
  287. package/lib/select/index.d.ts +198 -72
  288. package/lib/select/index.js +2254 -2
  289. package/lib/select/option.d.ts +11 -0
  290. package/lib/select/select.css +13 -5
  291. package/lib/select/select.d.ts +83 -31
  292. package/lib/select/select.less +11 -1
  293. package/lib/select/select.variable.css +37 -29
  294. package/lib/select/selectTagInput.d.ts +8 -5
  295. package/lib/shared/helper.d.ts +1 -1
  296. package/lib/shared/index.js +2689 -1
  297. package/lib/shared/mask-manager.d.ts +3 -4
  298. package/lib/shared/pop-manager.d.ts +6 -2
  299. package/lib/shared/popover.d.ts +2 -2
  300. package/lib/shared/vue-types.d.ts +3 -2
  301. package/lib/sideslider/index.d.ts +1 -1
  302. package/lib/sideslider/index.js +714 -2
  303. package/lib/slider/index.d.ts +1 -1
  304. package/lib/slider/index.js +1291 -2
  305. package/lib/steps/index.d.ts +1 -1
  306. package/lib/steps/index.js +825 -2
  307. package/lib/styles/mixins/animate.css +4 -4
  308. package/lib/styles/mixins/animate.less +10 -6
  309. package/lib/styles/mixins/animate.variable.css +126 -4
  310. package/lib/styles/mixins/clearfix.css +8 -0
  311. package/lib/styles/mixins/clearfix.less +10 -0
  312. package/lib/styles/mixins/clearfix.variable.css +8 -0
  313. package/lib/styles/mixins/mixins.css +72 -0
  314. package/lib/styles/mixins/mixins.less +5 -0
  315. package/lib/styles/mixins/mixins.variable.css +72 -0
  316. package/lib/styles/mixins/popper.less +6 -5
  317. package/lib/swiper/index.d.ts +1 -1
  318. package/lib/swiper/index.js +336 -1
  319. package/lib/swiper/swiper.css +0 -6
  320. package/lib/swiper/swiper.less +0 -8
  321. package/lib/swiper/swiper.variable.css +0 -6
  322. package/lib/switcher/index.d.ts +30 -16
  323. package/lib/switcher/index.js +277 -1
  324. package/lib/switcher/switcher.css +4 -4
  325. package/lib/switcher/switcher.d.ts +74 -5
  326. package/lib/switcher/switcher.variable.css +4 -4
  327. package/lib/tab/index.d.ts +3 -3
  328. package/lib/tab/index.js +914 -1
  329. package/lib/tab/tab-nav.d.ts +12 -2
  330. package/lib/tab/tab-panel.d.ts +1 -1
  331. package/lib/table/components/table-cell.d.ts +22 -24
  332. package/lib/table/components/table-column.d.ts +125 -82
  333. package/lib/table/const.d.ts +24 -2
  334. package/lib/table/events.d.ts +26 -26
  335. package/lib/table/index.d.ts +281 -295
  336. package/lib/table/index.js +6243 -1
  337. package/lib/table/plugins/head-filter.css +3 -0
  338. package/lib/table/plugins/head-filter.less +3 -0
  339. package/lib/table/plugins/head-filter.variable.css +3 -0
  340. package/lib/table/plugins/settings.d.ts +7 -17
  341. package/lib/table/plugins/use-column-resize.d.ts +30 -10
  342. package/lib/table/plugins/use-fixed-column.d.ts +9 -9
  343. package/lib/table/plugins/use-pagination.d.ts +7 -4
  344. package/lib/table/props.d.ts +118 -58
  345. package/lib/table/render.d.ts +7 -17
  346. package/lib/table/table.css +83 -11
  347. package/lib/table/table.d.ts +95 -72
  348. package/lib/table/table.less +59 -21
  349. package/lib/table/table.variable.css +83 -11
  350. package/lib/table/use-attributes.d.ts +55 -0
  351. package/lib/table/use-column.d.ts +264 -49
  352. package/lib/table/use-common.d.ts +1608 -88
  353. package/lib/table/use-render.d.ts +11 -0
  354. package/lib/table/utils.d.ts +30 -29
  355. package/lib/table-column/index.d.ts +241 -408
  356. package/lib/table-column/index.js +766 -1
  357. package/lib/tag/index.d.ts +10 -10
  358. package/lib/tag/index.js +233 -1
  359. package/lib/tag/tag.d.ts +5 -5
  360. package/lib/tag-input/index.d.ts +49 -7
  361. package/lib/tag-input/index.js +1660 -1
  362. package/lib/tag-input/tag-input.css +9 -1
  363. package/lib/tag-input/tag-input.d.ts +32 -4
  364. package/lib/tag-input/tag-input.less +13 -4
  365. package/lib/tag-input/tag-input.variable.css +9 -1
  366. package/lib/tag-input/tag-props.d.ts +16 -2
  367. package/lib/time-picker/index.d.ts +4 -4
  368. package/lib/time-picker/index.js +71 -1
  369. package/lib/timeline/index.d.ts +1 -1
  370. package/lib/timeline/index.js +241 -1
  371. package/lib/transfer/index.d.ts +1 -1
  372. package/lib/transfer/index.js +673 -1
  373. package/lib/tree/constant.d.ts +2 -2
  374. package/lib/tree/index.d.ts +58 -22
  375. package/lib/tree/index.js +2512 -1
  376. package/lib/tree/props.d.ts +18 -6
  377. package/lib/tree/tree.d.ts +32 -11
  378. package/lib/tree/use-node-action.d.ts +5 -3
  379. package/lib/tree/use-node-attribute.d.ts +17 -8
  380. package/lib/tree/use-search.d.ts +2 -2
  381. package/lib/tree/use-tree-init.d.ts +1 -2
  382. package/lib/tree/util.d.ts +8 -3
  383. package/lib/upload/index.d.ts +1 -1
  384. package/lib/upload/index.js +2874 -2
  385. package/lib/upload/upload.css +4 -4
  386. package/lib/upload/upload.type.d.ts +1 -1
  387. package/lib/upload/upload.variable.css +4 -4
  388. package/lib/upload/use-file-handler.d.ts +2 -2
  389. package/lib/virtual-render/index.d.ts +43 -1
  390. package/lib/virtual-render/index.js +865 -1
  391. package/lib/virtual-render/props.d.ts +15 -0
  392. package/lib/virtual-render/v-virtual-render.d.ts +19 -1
  393. package/lib/virtual-render/virtual-render.d.ts +25 -0
  394. package/lib/volar.components.d.ts +24 -24
  395. package/package.json +29 -17
  396. package/lib/cascader/index.js.LICENSE.txt +0 -1
  397. package/lib/dialog/index.js.LICENSE.txt +0 -1
  398. package/lib/directives/index.js.LICENSE.txt +0 -14
  399. package/lib/info-box/index.js.LICENSE.txt +0 -1
  400. package/lib/message/index.js.LICENSE.txt +0 -6
  401. package/lib/process/index.js.LICENSE.txt +0 -1
  402. package/lib/search-select/index.js.LICENSE.txt +0 -1
  403. package/lib/select/index.js.LICENSE.txt +0 -1
  404. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  405. package/lib/slider/index.js.LICENSE.txt +0 -1
  406. package/lib/steps/index.js.LICENSE.txt +0 -1
  407. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,880 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../select"),require("../icon"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../select","../icon","../popover"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../select"),require("../icon"),require("../popover")):t(e["../shared"],e.vue,e["../config-provider"],e["../select"],e["../icon"],e["../popover"]);for(var a in n)("object"==typeof exports?exports:e)[a]=n[a]}}(self,((e,t,n,a,r,o)=>(()=>{"use strict";var i={2717:e=>{e.exports=n},6870:e=>{e.exports=r},5537:e=>{e.exports=o},6422:e=>{e.exports=a},4212:t=>{t.exports=e},748:e=>{e.exports=t}},l={};function u(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,u),n.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{u.r(c),u.d(c,{BkPagination:()=>g,default:()=>y});var e=u(4212);function t(e){return t="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},t(e)}function n(e,n,a){return(n=function(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,"string");if("object"!==t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(n)?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,l=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(a=o.call(n)).done)&&(l.push(a.value),l.length!==t);u=!0);}catch(e){c=!0,r=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var o=u(748),i=u(2717),l=u(6422),s=u.n(l),f=u(6870),d=u(5537),v=u.n(d);var p={modelValue:e.PropTypes.number.def(1),count:e.PropTypes.number.def(0).isRequired,limit:e.PropTypes.number.def(10),limitList:e.PropTypes.arrayOf(Number).def([10,20,50,100]),showLimit:e.PropTypes.bool.def(!0),type:e.PropTypes.oneOf(["default","compact"]).def("default"),location:e.PropTypes.oneOf(["left","right"]).def("right"),align:e.PropTypes.oneOf(["left","center","right"]).def("left"),size:e.PropTypes.size(),small:e.PropTypes.bool.def(!1),showTotalCount:e.PropTypes.bool.def(!0),prevText:e.PropTypes.string,nextText:e.PropTypes.string,disabled:e.PropTypes.bool.def(!1),beforeChange:e.PropTypes.func,layout:e.PropTypes.custom((function(e){var t={total:!0,list:!0,limit:!0};return e.some((function(e){return t[e]}))}),"layout 的值只支持 * total、list、limit *").def(["total","list","limit"])};const m=(0,o.defineComponent)({name:"Pagination",props:p,emits:["update:modelValue","change","update:limit","limitChange"],setup:function(e,t){var a=(0,i.useLocale)("pagination"),u=(0,o.ref)(0),c=(0,o.toRefs)(e),d=c.count,p=c.limit,m=function(e){return function(t){var a,r=t.isFirst,l=t.isLast,u=(0,o.getCurrentInstance)().props;if(!u.showTotalCount)return null;var c=(0,i.usePrefix)().resolveClassName;return(0,o.createVNode)("div",(0,o.mergeProps)({class:(a={},n(a,"".concat(c("pagination-total")),!0),n(a,"is-first",r),n(a,"is-last",l),a)},{disabled:u.disabled}),[e.value.total,(0,o.createVNode)("div",{class:"".concat(c("pagination-total-num"))},[u.count]),e.value.strip])}}(a),g=function(){var e=(0,o.getCurrentInstance)().proxy,t=(0,o.ref)(1),a=(0,o.computed)((function(){return 1===t.value})),r=(0,o.computed)((function(){return t.value===e.totalPageNum})),l=(0,o.ref)(!1),u=(0,o.ref)(!1),c=(0,o.computed)((function(){l.value=!1,u.value=!1;var n=[];if(e.totalPageNum<=7){for(var a=2;a<=e.totalPageNum-1;a++)n.push(a);return n}var r=Math.floor(2.5);e.totalPageNum>5&&(l.value=t.value-r>2,u.value=t.value+r<e.totalPageNum-1);for(var o=Math.min(e.totalPageNum-5,Math.max(2,t.value-r)),i=o;i<o+5;i++)n.push(i);return n}));(0,o.watch)((function(){return e.modelValue}),(function(n){(0,o.nextTick)((function(){n>=1&&n<=e.totalPageNum?t.value=n:t.value=n<1?1:e.totalPageNum}))}),{immediate:!0}),(0,o.nextTick)((function(){(0,o.watch)((function(){return e.totalPageNum}),(function(e){t.value>e&&(t.value=e)}))}));var s=function(){a.value||(t.value=t.value-1)},d=function(){r.value||(t.value=t.value+1)},v=function(e){e!==t.value&&(t.value=e)},p=function(){t.value=Math.max(1,t.value-5)},m=function(){t.value=Math.min(e.totalPageNum,t.value+5)},g=(0,i.usePrefix)().resolveClassName;return{current:t,render:function(i){var y,b,h,N,P,x=i.isFirst,V=i.isLast;return(0,o.createVNode)("div",{class:(y={},n(y,"".concat(g("pagination-list")),!0),n(y,"is-first",x),n(y,"is-last",V),y)},[(0,o.createVNode)("div",{class:(b={},n(b,"".concat(g("pagination-list-pre")),!0),n(b,"is-disabled",a.value),b),onClick:s},[e.prevText||(0,o.createVNode)(f.AngleLeft,null,null)]),(0,o.createVNode)("div",{class:(h={},n(h,"".concat(g("pagination-list-item")),!0),n(h,"is-active",1===t.value),h),key:"1",onClick:function(){return v(1)}},[(0,o.createTextVNode)("1")]),l.value&&(0,o.createVNode)("div",{key:"pre-batch",class:"".concat(g("pagination-list-pre-batch")),onClick:p},[(0,o.createVNode)(f.Ellipsis,null,null)]),c.value.map((function(e){var a;return(0,o.createVNode)("div",{class:(a={},n(a,"".concat(g("pagination-list-item")),!0),n(a,"is-active",t.value===e),a),key:e,onClick:function(){return v(e)}},[e])})),u.value&&(0,o.createVNode)("div",{key:"next-batch",class:"".concat(g("pagination-list-next-batch")),onClick:m},[(0,o.createVNode)(f.Ellipsis,null,null)]),e.totalPageNum>1&&(0,o.createVNode)("div",{class:(N={},n(N,"".concat(g("pagination-list-item")),!0),n(N,"is-active",t.value===e.totalPageNum),N),key:"last",onClick:function(){return v(e.totalPageNum)}},[e.totalPageNum]),(0,o.createVNode)("div",{class:(P={},n(P,"".concat(g("pagination-list-pre")),!0),n(P,"is-disabled",r.value),P),onClick:d},[e.nextText||(0,o.createVNode)(f.AngleRight,null,null)])])}}}(),y=g.current,b=g.render,h=function(){var e=(0,o.getCurrentInstance)().proxy,t=(0,o.ref)(null),a=(0,o.ref)(!1),r=(0,o.ref)(1),l=(0,o.computed)((function(){return 1===r.value})),u=(0,o.computed)((function(){return r.value===e.totalPageNum})),c=0,s=(0,o.computed)((function(){for(var t=[],n=1;n<=e.totalPageNum;n++)t.push(n);return t}));(0,o.watch)((function(){return e.modelValue}),(function(t){(0,o.nextTick)((function(){t>=1&&t<=e.totalPageNum?r.value=t:r.value=t<1?1:e.totalPageNum,c=r.value}))}),{immediate:!0}),(0,o.nextTick)((function(){(0,o.watch)((function(){return e.totalPageNum}),(function(e){r.value>e&&(r.value=e)}))}));var d=function(){l.value||(r.value=r.value-1)},p=function(){u.value||(r.value=r.value+1)},m=function(){a.value=!0},g=function(){a.value=!1,t.value.textContent="".concat(c),c!==r.value&&(r.value=c)},y=function(t){var n=t.target,a=Number(n.textContent);!a||a<1||a>e.totalPageNum||a===r.value||(c=a)},b=function(e){["Enter","NumpadEnter"].includes(e.code)&&(e.preventDefault(),g())},h=(0,i.usePrefix)().resolveClassName;return{current:r,render:function(){var i,N;return(0,o.createVNode)("div",{class:"".concat(h("pagination-small-list"))},[(0,o.createVNode)("div",{class:(i={},n(i,"".concat(h("pagination-btn-pre")),!0),n(i,"is-disabled",l.value),i),onClick:d},[(0,o.createVNode)(f.AngleLeft,null,null)]),(0,o.createVNode)(v(),{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:function(){var i;return(0,o.createVNode)("div",{class:(i={},n(i,"".concat(h("pagination-picker")),!0),n(i,"is-focused",a.value),i)},[(0,o.createVNode)("span",{ref:t,class:"".concat(h("pagination-editor")),contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:g,onInput:y,onKeydown:b},[r.value]),(0,o.createVNode)("span",null,[(0,o.createTextVNode)("/")]),(0,o.createVNode)("span",{class:"".concat(h("pagination-small-list-total"))},[e.totalPageNum])])},content:function(){return(0,o.createVNode)("div",{class:"".concat(h("pagination-picker-list"))},[s.value.map((function(e){return(0,o.createVNode)("div",{class:{item:!0,"is-actived":e===r.value},key:e,onClick:function(){return function(e){c=e,g()}(e)}},[e])}))])}}),(0,o.createVNode)("div",{class:(N={},n(N,"".concat(h("pagination-btn-next")),!0),n(N,"is-disabled",u.value),N),onClick:p},[(0,o.createVNode)(f.AngleRight,null,null)])])}}}(),N=h.current,P=h.render,x=function(e){var t=(0,o.getCurrentInstance)().proxy,a=(0,o.ref)(t.limit);(0,o.watch)((function(){return t.limit}),(function(e){a.value=e})),(0,o.watch)((function(){return t.limitList}),(function(e){(0,o.nextTick)((function(){if(!e.includes(a.value)){var t=r(e,1);a.value=t[0]}}))}),{immediate:!0});var u=function(e){a.value=e},c=(0,i.usePrefix)().resolveClassName;return{limit:a,render:function(r){var i,f,d,v=r.isFirst,p=r.isLast;return t.showLimit?(0,o.createVNode)("div",(0,o.mergeProps)({class:(f={},n(f,c("pagination-limit"),!0),n(f,"is-first",v),n(f,"is-last",p),f)},{disabled:t.disabled}),[(0,o.createVNode)("div",null,[e.value.eachPage]),(0,o.createVNode)(s(),{class:"".concat(c("pagination-limit-select")),clearable:!1,size:"small",withValidate:!1,modelValue:a.value,onChange:u,disabled:t.disabled},(d=i=t.limitList.map((function(e,t){return(0,o.createVNode)(l.BkOption,{id:e,name:"".concat(e),key:"".concat(t,"_").concat(e)},null)})),"function"==typeof d||"[object Object]"===Object.prototype.toString.call(d)&&!(0,o.isVNode)(d)?i:{default:function(){return[i]}})),(0,o.createVNode)("div",null,[e.value.strip])]):null}}}(a),V=x.limit,T=x.render;(0,o.watch)([d,V,p],(function(e){var t=r(e,2),n=t[0],a=t[1],o=Math.ceil(n/a);u.value=o<1?1:o}),{immediate:!0}),(0,o.watch)(y,(function(e){t.emit("update:modelValue",e),t.emit("change",e)})),(0,o.watch)(N,(function(n){e.small&&(t.emit("update:modelValue",n),t.emit("change",n))})),(0,o.watch)(V,(function(e){t.emit("limitChange",e)}));var C=(0,i.usePrefix)().resolveClassName;return{totalPageNum:u,renderTotal:m,renderList:b,renderLimit:T,renderSmallList:P,resolveClassName:C}},render:function(){var t,a=this,r=(0,e.classes)((n(t={},"".concat(this.resolveClassName("pagination")),!0),n(t,"".concat(this.resolveClassName("pagination--".concat(this.size))),!0),n(t,"is-align-".concat(this.align),!0),t)),i={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return(0,o.createVNode)("div",{class:r},[this.layout.map((function(e,t){return i[e]({isFirst:0===t,isLast:t===a.layout.length-1})}))])}});var g=(0,e.withInstall)(m);const y=g})(),c})()));
1
+ import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__select_22a14f69__ from "../select";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__ from "../icon";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__ from "../popover";
7
+ /******/ // The require scope
8
+ /******/ var __webpack_require__ = {};
9
+ /******/
10
+ /************************************************************************/
11
+ /******/ /* webpack/runtime/define property getters */
12
+ /******/ (() => {
13
+ /******/ // define getter functions for harmony exports
14
+ /******/ __webpack_require__.d = (exports, definition) => {
15
+ /******/ for(var key in definition) {
16
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
17
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
18
+ /******/ }
19
+ /******/ }
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
24
+ /******/ (() => {
25
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
26
+ /******/ })();
27
+ /******/
28
+ /************************************************************************/
29
+ var __webpack_exports__ = {};
30
+
31
+ // EXPORTS
32
+ __webpack_require__.d(__webpack_exports__, {
33
+ h: () => (/* binding */ BkPagination),
34
+ Z: () => (/* binding */ src)
35
+ });
36
+
37
+ ;// CONCATENATED MODULE: external "../shared"
38
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
39
+ var y = x => () => x
40
+ const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
41
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
42
+ function _typeof(obj) {
43
+ "@babel/helpers - typeof";
44
+
45
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
46
+ return typeof obj;
47
+ } : function (obj) {
48
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
49
+ }, _typeof(obj);
50
+ }
51
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
52
+
53
+ function _toPrimitive(input, hint) {
54
+ if (_typeof(input) !== "object" || input === null) return input;
55
+ var prim = input[Symbol.toPrimitive];
56
+ if (prim !== undefined) {
57
+ var res = prim.call(input, hint || "default");
58
+ if (_typeof(res) !== "object") return res;
59
+ throw new TypeError("@@toPrimitive must return a primitive value.");
60
+ }
61
+ return (hint === "string" ? String : Number)(input);
62
+ }
63
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
64
+
65
+
66
+ function _toPropertyKey(arg) {
67
+ var key = _toPrimitive(arg, "string");
68
+ return _typeof(key) === "symbol" ? key : String(key);
69
+ }
70
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
71
+
72
+ function _defineProperty(obj, key, value) {
73
+ key = _toPropertyKey(key);
74
+ if (key in obj) {
75
+ Object.defineProperty(obj, key, {
76
+ value: value,
77
+ enumerable: true,
78
+ configurable: true,
79
+ writable: true
80
+ });
81
+ } else {
82
+ obj[key] = value;
83
+ }
84
+ return obj;
85
+ }
86
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
87
+ function _arrayWithHoles(arr) {
88
+ if (Array.isArray(arr)) return arr;
89
+ }
90
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
91
+ function _iterableToArrayLimit(arr, i) {
92
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
93
+ if (null != _i) {
94
+ var _s,
95
+ _e,
96
+ _x,
97
+ _r,
98
+ _arr = [],
99
+ _n = !0,
100
+ _d = !1;
101
+ try {
102
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
103
+ if (Object(_i) !== _i) return;
104
+ _n = !1;
105
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
106
+ } catch (err) {
107
+ _d = !0, _e = err;
108
+ } finally {
109
+ try {
110
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
111
+ } finally {
112
+ if (_d) throw _e;
113
+ }
114
+ }
115
+ return _arr;
116
+ }
117
+ }
118
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
119
+ function _arrayLikeToArray(arr, len) {
120
+ if (len == null || len > arr.length) len = arr.length;
121
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
122
+ return arr2;
123
+ }
124
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
125
+
126
+ function _unsupportedIterableToArray(o, minLen) {
127
+ if (!o) return;
128
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
129
+ var n = Object.prototype.toString.call(o).slice(8, -1);
130
+ if (n === "Object" && o.constructor) n = o.constructor.name;
131
+ if (n === "Map" || n === "Set") return Array.from(o);
132
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
133
+ }
134
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
135
+ function _nonIterableRest() {
136
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
137
+ }
138
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
139
+
140
+
141
+
142
+
143
+ function _slicedToArray(arr, i) {
144
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
145
+ }
146
+ ;// CONCATENATED MODULE: external "vue"
147
+ var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
148
+ var external_vue_y = x => () => x
149
+ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["nextTick"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.nextTick, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
150
+ ;// CONCATENATED MODULE: external "../config-provider"
151
+ var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
152
+ var external_config_provider_y = x => () => x
153
+ const external_config_provider_namespaceObject = external_config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
154
+ ;// CONCATENATED MODULE: external "../select"
155
+ var external_select_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
156
+ var external_select_y = x => () => x
157
+ const external_select_namespaceObject = external_select_x({ ["BkOption"]: () => __WEBPACK_EXTERNAL_MODULE__select_22a14f69__.BkOption, ["default"]: () => __WEBPACK_EXTERNAL_MODULE__select_22a14f69__["default"] });
158
+ ;// CONCATENATED MODULE: ../../packages/pagination/src/use-limit.tsx
159
+
160
+
161
+
162
+ /*
163
+ * Tencent is pleased to support the open source community by making
164
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
165
+ *
166
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
167
+ *
168
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
169
+ *
170
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
171
+ *
172
+ * ---------------------------------------------------
173
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
174
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
175
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
176
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
177
+ *
178
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
179
+ * the Software.
180
+ *
181
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
182
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
183
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
184
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
185
+ * IN THE SOFTWARE.
186
+ */
187
+
188
+
189
+
190
+ function _isSlot(s) {
191
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
192
+ }
193
+ /* harmony default export */ const use_limit = (function (t) {
194
+ var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
195
+ proxy = _getCurrentInstance.proxy;
196
+ var localLimit = (0,external_vue_namespaceObject.ref)(proxy.limit);
197
+ /**
198
+ * @desc 同步props.limit的变化
199
+ */
200
+ (0,external_vue_namespaceObject.watch)(function () {
201
+ return proxy.limit;
202
+ }, function (limit) {
203
+ localLimit.value = limit;
204
+ });
205
+ /**
206
+ * @desc 同步props.limitlist的变化并判断props.limit的合法性
207
+ */
208
+ (0,external_vue_namespaceObject.watch)(function () {
209
+ return proxy.limitList;
210
+ }, function (limitList) {
211
+ (0,external_vue_namespaceObject.nextTick)(function () {
212
+ if (!limitList.includes(localLimit.value)) {
213
+ var _limitList = _slicedToArray(limitList, 1);
214
+ localLimit.value = _limitList[0];
215
+ }
216
+ });
217
+ }, {
218
+ immediate: true
219
+ });
220
+ /**
221
+ * @desc 选择每页条数
222
+ */
223
+ var handleLimitChange = function handleLimitChange(limit) {
224
+ localLimit.value = limit;
225
+ };
226
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
227
+ resolveClassName = _usePrefix.resolveClassName;
228
+ var render = function render(_ref) {
229
+ var _slot;
230
+ var _ref2;
231
+ var isFirst = _ref.isFirst,
232
+ isLast = _ref.isLast;
233
+ if (!proxy.showLimit) {
234
+ return null;
235
+ }
236
+ return (0,external_vue_namespaceObject.createVNode)("div", (0,external_vue_namespaceObject.mergeProps)({
237
+ "class": (_ref2 = {}, _defineProperty(_ref2, resolveClassName('pagination-limit'), true), _defineProperty(_ref2, 'is-first', isFirst), _defineProperty(_ref2, 'is-last', isLast), _ref2)
238
+ }, {
239
+ disabled: proxy.disabled
240
+ }), [(0,external_vue_namespaceObject.createVNode)("div", null, [t.value.eachPage]), (0,external_vue_namespaceObject.createVNode)(external_select_namespaceObject["default"], {
241
+ "class": "".concat(resolveClassName('pagination-limit-select')),
242
+ "clearable": false,
243
+ "size": "small",
244
+ "withValidate": false,
245
+ "modelValue": localLimit.value,
246
+ "onChange": handleLimitChange,
247
+ "disabled": proxy.disabled
248
+ }, _isSlot(_slot = proxy.limitList.map(function (num, index) {
249
+ return (0,external_vue_namespaceObject.createVNode)(external_select_namespaceObject.BkOption, {
250
+ "id": num,
251
+ "name": "".concat(num),
252
+ "key": "".concat(index, "_").concat(num)
253
+ }, null);
254
+ })) ? _slot : {
255
+ "default": function _default() {
256
+ return [_slot];
257
+ }
258
+ }), (0,external_vue_namespaceObject.createVNode)("div", null, [t.value.strip])]);
259
+ };
260
+ return {
261
+ limit: localLimit,
262
+ render: render
263
+ };
264
+ });
265
+ ;// CONCATENATED MODULE: external "../icon"
266
+ var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
267
+ var external_icon_y = x => () => x
268
+ const external_icon_namespaceObject = external_icon_x({ ["AngleLeft"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleLeft, ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleRight, ["Ellipsis"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Ellipsis });
269
+ ;// CONCATENATED MODULE: ../../packages/pagination/src/use-list.tsx
270
+
271
+
272
+ /*
273
+ * Tencent is pleased to support the open source community by making
274
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
275
+ *
276
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
277
+ *
278
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
279
+ *
280
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
281
+ *
282
+ * ---------------------------------------------------
283
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
284
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
285
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
286
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
287
+ *
288
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
289
+ * the Software.
290
+ *
291
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
292
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
293
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
294
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
295
+ * IN THE SOFTWARE.
296
+ */
297
+
298
+
299
+
300
+ var PAGE_ITEMS_NUM = 5;
301
+ /* harmony default export */ const use_list = (function () {
302
+ var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
303
+ proxy = _getCurrentInstance.proxy;
304
+ var localCurrent = (0,external_vue_namespaceObject.ref)(1);
305
+ var isPagePreDisabled = (0,external_vue_namespaceObject.computed)(function () {
306
+ return localCurrent.value === 1;
307
+ });
308
+ var isPageNextDisabled = (0,external_vue_namespaceObject.computed)(function () {
309
+ return localCurrent.value === proxy.totalPageNum;
310
+ });
311
+ var showPreBatch = (0,external_vue_namespaceObject.ref)(false);
312
+ var showNextBatch = (0,external_vue_namespaceObject.ref)(false);
313
+ var list = (0,external_vue_namespaceObject.computed)(function () {
314
+ showPreBatch.value = false;
315
+ showNextBatch.value = false;
316
+ var stack = [];
317
+ if (proxy.totalPageNum <= PAGE_ITEMS_NUM + 2) {
318
+ for (var i = 2; i <= proxy.totalPageNum - 1; i++) {
319
+ stack.push(i);
320
+ }
321
+ return stack;
322
+ }
323
+ var pageItemsNumHalf = Math.floor(PAGE_ITEMS_NUM / 2);
324
+ if (proxy.totalPageNum > PAGE_ITEMS_NUM) {
325
+ showPreBatch.value = localCurrent.value - pageItemsNumHalf > 2;
326
+ showNextBatch.value = localCurrent.value + pageItemsNumHalf < proxy.totalPageNum - 1;
327
+ }
328
+ var start = Math.min(proxy.totalPageNum - PAGE_ITEMS_NUM, Math.max(2, localCurrent.value - pageItemsNumHalf));
329
+ for (var _i = start; _i < start + PAGE_ITEMS_NUM; _i++) {
330
+ stack.push(_i);
331
+ }
332
+ return stack;
333
+ });
334
+ (0,external_vue_namespaceObject.watch)(function () {
335
+ return proxy.modelValue;
336
+ }, function (modelValue) {
337
+ // nextTick延后执行,保证proxy.totalPageNum计算正确
338
+ (0,external_vue_namespaceObject.nextTick)(function () {
339
+ if (modelValue >= 1 && modelValue <= proxy.totalPageNum) {
340
+ localCurrent.value = modelValue;
341
+ } else if (modelValue < 1) {
342
+ localCurrent.value = 1;
343
+ } else {
344
+ localCurrent.value = proxy.totalPageNum;
345
+ }
346
+ });
347
+ }, {
348
+ immediate: true
349
+ });
350
+ // 切换limit时会导致totalPageNum变小旧的current可能会超出范围,修正localCurrent
351
+ (0,external_vue_namespaceObject.nextTick)(function () {
352
+ (0,external_vue_namespaceObject.watch)(function () {
353
+ return proxy.totalPageNum;
354
+ }, function (totalPageNum) {
355
+ if (localCurrent.value > totalPageNum) {
356
+ localCurrent.value = totalPageNum;
357
+ }
358
+ });
359
+ });
360
+ /**
361
+ * @desc 上一页
362
+ */
363
+ var handlePrePage = function handlePrePage() {
364
+ if (isPagePreDisabled.value) {
365
+ return;
366
+ }
367
+ localCurrent.value = localCurrent.value - 1;
368
+ };
369
+ /**
370
+ * @desc 下一页
371
+ */
372
+ var handleNextPage = function handleNextPage() {
373
+ if (isPageNextDisabled.value) {
374
+ return;
375
+ }
376
+ localCurrent.value = localCurrent.value + 1;
377
+ };
378
+ /**
379
+ * @desc 跳转指定页码
380
+ * @param { Number } totalPageNum
381
+ */
382
+ var handleItemClick = function handleItemClick(totalPageNum) {
383
+ if (totalPageNum === localCurrent.value) {
384
+ return;
385
+ }
386
+ localCurrent.value = totalPageNum;
387
+ };
388
+ /**
389
+ * @desc 上一批分页
390
+ */
391
+ var handlePreBatch = function handlePreBatch() {
392
+ localCurrent.value = Math.max(1, localCurrent.value - PAGE_ITEMS_NUM);
393
+ };
394
+ /**
395
+ * @desc 下一批分页
396
+ */
397
+ var handleNextBatch = function handleNextBatch() {
398
+ localCurrent.value = Math.min(proxy.totalPageNum, localCurrent.value + PAGE_ITEMS_NUM);
399
+ };
400
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
401
+ resolveClassName = _usePrefix.resolveClassName;
402
+ var render = function render(_ref) {
403
+ var _ref2, _ref3, _ref4, _ref6, _ref7;
404
+ var isFirst = _ref.isFirst,
405
+ isLast = _ref.isLast;
406
+ return (0,external_vue_namespaceObject.createVNode)("div", {
407
+ "class": (_ref2 = {}, _defineProperty(_ref2, "".concat(resolveClassName('pagination-list')), true), _defineProperty(_ref2, 'is-first', isFirst), _defineProperty(_ref2, 'is-last', isLast), _ref2)
408
+ }, [(0,external_vue_namespaceObject.createVNode)("div", {
409
+ "class": (_ref3 = {}, _defineProperty(_ref3, "".concat(resolveClassName('pagination-list-pre')), true), _defineProperty(_ref3, 'is-disabled', isPagePreDisabled.value), _ref3),
410
+ "onClick": handlePrePage
411
+ }, [proxy.prevText || (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleLeft, null, null)]), (0,external_vue_namespaceObject.createVNode)("div", {
412
+ "class": (_ref4 = {}, _defineProperty(_ref4, "".concat(resolveClassName('pagination-list-item')), true), _defineProperty(_ref4, 'is-active', localCurrent.value === 1), _ref4),
413
+ "key": "1",
414
+ "onClick": function onClick() {
415
+ return handleItemClick(1);
416
+ }
417
+ }, [(0,external_vue_namespaceObject.createTextVNode)("1")]), showPreBatch.value && (0,external_vue_namespaceObject.createVNode)("div", {
418
+ "key": "pre-batch",
419
+ "class": "".concat(resolveClassName('pagination-list-pre-batch')),
420
+ "onClick": handlePreBatch
421
+ }, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Ellipsis, null, null)]), list.value.map(function (num) {
422
+ var _ref5;
423
+ return (0,external_vue_namespaceObject.createVNode)("div", {
424
+ "class": (_ref5 = {}, _defineProperty(_ref5, "".concat(resolveClassName('pagination-list-item')), true), _defineProperty(_ref5, 'is-active', localCurrent.value === num), _ref5),
425
+ "key": num,
426
+ "onClick": function onClick() {
427
+ return handleItemClick(num);
428
+ }
429
+ }, [num]);
430
+ }), showNextBatch.value && (0,external_vue_namespaceObject.createVNode)("div", {
431
+ "key": "next-batch",
432
+ "class": "".concat(resolveClassName('pagination-list-next-batch')),
433
+ "onClick": handleNextBatch
434
+ }, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.Ellipsis, null, null)]), proxy.totalPageNum > 1 && (0,external_vue_namespaceObject.createVNode)("div", {
435
+ "class": (_ref6 = {}, _defineProperty(_ref6, "".concat(resolveClassName('pagination-list-item')), true), _defineProperty(_ref6, 'is-active', localCurrent.value === proxy.totalPageNum), _ref6),
436
+ "key": "last",
437
+ "onClick": function onClick() {
438
+ return handleItemClick(proxy.totalPageNum);
439
+ }
440
+ }, [proxy.totalPageNum]), (0,external_vue_namespaceObject.createVNode)("div", {
441
+ "class": (_ref7 = {}, _defineProperty(_ref7, "".concat(resolveClassName('pagination-list-pre')), true), _defineProperty(_ref7, 'is-disabled', isPageNextDisabled.value), _ref7),
442
+ "onClick": handleNextPage
443
+ }, [proxy.nextText || (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleRight, null, null)])]);
444
+ };
445
+ return {
446
+ current: localCurrent,
447
+ render: render
448
+ };
449
+ });
450
+ ;// CONCATENATED MODULE: external "../popover"
451
+ var external_popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
452
+ var external_popover_y = x => () => x
453
+ const external_popover_namespaceObject = external_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__["default"] });
454
+ ;// CONCATENATED MODULE: ../../packages/pagination/src/use-small-list.tsx
455
+
456
+
457
+ /*
458
+ * Tencent is pleased to support the open source community by making
459
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
460
+ *
461
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
462
+ *
463
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
464
+ *
465
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
466
+ *
467
+ * ---------------------------------------------------
468
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
469
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
470
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
471
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
472
+ *
473
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
474
+ * the Software.
475
+ *
476
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
477
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
478
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
479
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
480
+ * IN THE SOFTWARE.
481
+ */
482
+
483
+
484
+
485
+
486
+ /* harmony default export */ const use_small_list = (function () {
487
+ var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
488
+ proxy = _getCurrentInstance.proxy;
489
+ var inputRef = (0,external_vue_namespaceObject.ref)(null);
490
+ var isFocused = (0,external_vue_namespaceObject.ref)(false);
491
+ var localCurrent = (0,external_vue_namespaceObject.ref)(1);
492
+ var isPagePreDisabled = (0,external_vue_namespaceObject.computed)(function () {
493
+ return localCurrent.value === 1;
494
+ });
495
+ var isPageNextDisabled = (0,external_vue_namespaceObject.computed)(function () {
496
+ return localCurrent.value === proxy.totalPageNum;
497
+ });
498
+ // 缓存input输入,失焦或者enter键触发提交
499
+ var inputMemo = 0;
500
+ // 页码可选列表
501
+ var list = (0,external_vue_namespaceObject.computed)(function () {
502
+ var stack = [];
503
+ for (var i = 1; i <= proxy.totalPageNum; i++) {
504
+ stack.push(i);
505
+ }
506
+ return stack;
507
+ });
508
+ (0,external_vue_namespaceObject.watch)(function () {
509
+ return proxy.modelValue;
510
+ }, function (modelValue) {
511
+ // nextTick延后执行,保证proxy.totalPageNum计算正确
512
+ (0,external_vue_namespaceObject.nextTick)(function () {
513
+ if (modelValue >= 1 && modelValue <= proxy.totalPageNum) {
514
+ localCurrent.value = modelValue;
515
+ } else if (modelValue < 1) {
516
+ localCurrent.value = 1;
517
+ } else {
518
+ localCurrent.value = proxy.totalPageNum;
519
+ }
520
+ inputMemo = localCurrent.value;
521
+ });
522
+ }, {
523
+ immediate: true
524
+ });
525
+ // 切换limit时会导致totalPageNum变小旧的current可能会超出范围,修正localCurrent
526
+ (0,external_vue_namespaceObject.nextTick)(function () {
527
+ (0,external_vue_namespaceObject.watch)(function () {
528
+ return proxy.totalPageNum;
529
+ }, function (totalPageNum) {
530
+ if (localCurrent.value > totalPageNum) {
531
+ localCurrent.value = totalPageNum;
532
+ }
533
+ });
534
+ });
535
+ /**
536
+ * @desc 上一页
537
+ */
538
+ var handlePrePage = function handlePrePage() {
539
+ if (isPagePreDisabled.value) {
540
+ return;
541
+ }
542
+ localCurrent.value = localCurrent.value - 1;
543
+ };
544
+ /**
545
+ * @desc 下一页
546
+ */
547
+ var handleNextPage = function handleNextPage() {
548
+ if (isPageNextDisabled.value) {
549
+ return;
550
+ }
551
+ localCurrent.value = localCurrent.value + 1;
552
+ };
553
+ /**
554
+ * @desc 获得焦点
555
+ */
556
+ var handlePageEditorFocus = function handlePageEditorFocus() {
557
+ isFocused.value = true;
558
+ };
559
+ /**
560
+ * @desc 失去焦点
561
+ */
562
+ var handlePageEditorBlur = function handlePageEditorBlur() {
563
+ isFocused.value = false;
564
+ inputRef.value.textContent = "".concat(inputMemo);
565
+ if (inputMemo !== localCurrent.value) {
566
+ localCurrent.value = inputMemo;
567
+ }
568
+ };
569
+ /**
570
+ * @desc 键盘输入
571
+ * @param { Event } event
572
+ */
573
+ var handlePageEditorInput = function handlePageEditorInput(event) {
574
+ var $target = event.target;
575
+ var value = Number($target.textContent);
576
+ // 无效值不抛出事件
577
+ if (!value || value < 1 || value > proxy.totalPageNum || value === localCurrent.value) {
578
+ return;
579
+ }
580
+ inputMemo = value;
581
+ };
582
+ /**
583
+ * @desc 处理Enter事件
584
+ * @param { KeyboardEvent } event
585
+ */
586
+ var handlePageEditorKeydown = function handlePageEditorKeydown(event) {
587
+ // 阻止默认enter事件(keycode判断可能会被弃用)
588
+ if (['Enter', 'NumpadEnter'].includes(event.code)) {
589
+ event.preventDefault();
590
+ handlePageEditorBlur();
591
+ }
592
+ };
593
+ /**
594
+ * @desc 更新
595
+ */
596
+ var handlePageChange = function handlePageChange(item) {
597
+ inputMemo = item;
598
+ handlePageEditorBlur();
599
+ };
600
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
601
+ resolveClassName = _usePrefix.resolveClassName;
602
+ var render = function render() {
603
+ var _ref, _ref3;
604
+ return (0,external_vue_namespaceObject.createVNode)("div", {
605
+ "class": "".concat(resolveClassName('pagination-small-list'))
606
+ }, [(0,external_vue_namespaceObject.createVNode)("div", {
607
+ "class": (_ref = {}, _defineProperty(_ref, "".concat(resolveClassName('pagination-btn-pre')), true), _defineProperty(_ref, 'is-disabled', isPagePreDisabled.value), _ref),
608
+ "onClick": handlePrePage
609
+ }, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleLeft, null, null)]), (0,external_vue_namespaceObject.createVNode)(external_popover_namespaceObject["default"], {
610
+ "theme": "light",
611
+ "trigger": "click",
612
+ "arrow": false,
613
+ "width": 56,
614
+ "boundary": "body",
615
+ "placement": "bottom"
616
+ }, {
617
+ "default": function _default() {
618
+ var _ref2;
619
+ return (0,external_vue_namespaceObject.createVNode)("div", {
620
+ "class": (_ref2 = {}, _defineProperty(_ref2, "".concat(resolveClassName('pagination-picker')), true), _defineProperty(_ref2, 'is-focused', isFocused.value), _ref2)
621
+ }, [(0,external_vue_namespaceObject.createVNode)("span", {
622
+ "ref": inputRef,
623
+ "class": "".concat(resolveClassName('pagination-editor')),
624
+ "contenteditable": true,
625
+ "spellcheck": "false",
626
+ "onFocus": handlePageEditorFocus,
627
+ "onBlur": handlePageEditorBlur,
628
+ "onInput": handlePageEditorInput,
629
+ "onKeydown": handlePageEditorKeydown
630
+ }, [localCurrent.value]), (0,external_vue_namespaceObject.createVNode)("span", null, [(0,external_vue_namespaceObject.createTextVNode)("/")]), (0,external_vue_namespaceObject.createVNode)("span", {
631
+ "class": "".concat(resolveClassName('pagination-small-list-total'))
632
+ }, [proxy.totalPageNum])]);
633
+ },
634
+ content: function content() {
635
+ return (0,external_vue_namespaceObject.createVNode)("div", {
636
+ "class": "".concat(resolveClassName('pagination-picker-list'))
637
+ }, [list.value.map(function (item) {
638
+ return (0,external_vue_namespaceObject.createVNode)("div", {
639
+ "class": {
640
+ item: true,
641
+ 'is-actived': item === localCurrent.value
642
+ },
643
+ "key": item,
644
+ "onClick": function onClick() {
645
+ return handlePageChange(item);
646
+ }
647
+ }, [item]);
648
+ })]);
649
+ }
650
+ }), (0,external_vue_namespaceObject.createVNode)("div", {
651
+ "class": (_ref3 = {}, _defineProperty(_ref3, "".concat(resolveClassName('pagination-btn-next')), true), _defineProperty(_ref3, 'is-disabled', isPageNextDisabled.value), _ref3),
652
+ "onClick": handleNextPage
653
+ }, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleRight, null, null)])]);
654
+ };
655
+ return {
656
+ current: localCurrent,
657
+ render: render
658
+ };
659
+ });
660
+ ;// CONCATENATED MODULE: ../../packages/pagination/src/use-total.tsx
661
+
662
+
663
+ /*
664
+ * Tencent is pleased to support the open source community by making
665
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
666
+ *
667
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
668
+ *
669
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
670
+ *
671
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
672
+ *
673
+ * ---------------------------------------------------
674
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
675
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
676
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
677
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
678
+ *
679
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
680
+ * the Software.
681
+ *
682
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
683
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
684
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
685
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
686
+ * IN THE SOFTWARE.
687
+ */
688
+
689
+
690
+ /* harmony default export */ const use_total = (function (t) {
691
+ return function (_ref) {
692
+ var _ref2;
693
+ var isFirst = _ref.isFirst,
694
+ isLast = _ref.isLast;
695
+ var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
696
+ props = _getCurrentInstance.props;
697
+ if (!props.showTotalCount) {
698
+ return null;
699
+ }
700
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
701
+ resolveClassName = _usePrefix.resolveClassName;
702
+ return (0,external_vue_namespaceObject.createVNode)("div", (0,external_vue_namespaceObject.mergeProps)({
703
+ "class": (_ref2 = {}, _defineProperty(_ref2, "".concat(resolveClassName('pagination-total')), true), _defineProperty(_ref2, 'is-first', isFirst), _defineProperty(_ref2, 'is-last', isLast), _ref2)
704
+ }, {
705
+ disabled: props.disabled
706
+ }), [t.value.total, (0,external_vue_namespaceObject.createVNode)("div", {
707
+ "class": "".concat(resolveClassName('pagination-total-num'))
708
+ }, [props.count]), t.value.strip]);
709
+ };
710
+ });
711
+ ;// CONCATENATED MODULE: ../../packages/pagination/src/pagination.tsx
712
+
713
+
714
+
715
+ /*
716
+ * Tencent is pleased to support the open source community by making
717
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
718
+ *
719
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
720
+ *
721
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
722
+ *
723
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
724
+ *
725
+ * ---------------------------------------------------
726
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
727
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
728
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
729
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
730
+ *
731
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
732
+ * the Software.
733
+ *
734
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
735
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
736
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
737
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
738
+ * IN THE SOFTWARE.
739
+ */
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+ var paginationProps = {
748
+ modelValue: external_shared_namespaceObject.PropTypes.number.def(1),
749
+ count: external_shared_namespaceObject.PropTypes.number.def(0).isRequired,
750
+ limit: external_shared_namespaceObject.PropTypes.number.def(10),
751
+ limitList: external_shared_namespaceObject.PropTypes.arrayOf(Number).def([10, 20, 50, 100]),
752
+ showLimit: external_shared_namespaceObject.PropTypes.bool.def(true),
753
+ type: external_shared_namespaceObject.PropTypes.oneOf(['default', 'compact']).def('default'),
754
+ location: external_shared_namespaceObject.PropTypes.oneOf(['left', 'right']).def('right'),
755
+ align: external_shared_namespaceObject.PropTypes.oneOf(['left', 'center', 'right']).def('left'),
756
+ size: external_shared_namespaceObject.PropTypes.size(),
757
+ small: external_shared_namespaceObject.PropTypes.bool.def(false),
758
+ showTotalCount: external_shared_namespaceObject.PropTypes.bool.def(true),
759
+ prevText: external_shared_namespaceObject.PropTypes.string,
760
+ nextText: external_shared_namespaceObject.PropTypes.string,
761
+ disabled: external_shared_namespaceObject.PropTypes.bool.def(false),
762
+ beforeChange: external_shared_namespaceObject.PropTypes.func,
763
+ layout: external_shared_namespaceObject.PropTypes.custom(function (value) {
764
+ var layoutNameMap = {
765
+ total: true,
766
+ list: true,
767
+ limit: true
768
+ };
769
+ return value.some(function (item) {
770
+ return layoutNameMap[item];
771
+ });
772
+ }, 'layout 的值只支持 * total、list、limit *').def(['total', 'list', 'limit'])
773
+ };
774
+ /* harmony default export */ const pagination = ((0,external_vue_namespaceObject.defineComponent)({
775
+ name: 'Pagination',
776
+ props: paginationProps,
777
+ emits: ['update:modelValue', 'change', 'update:limit', 'limitChange'],
778
+ setup: function setup(props, context) {
779
+ var t = (0,external_config_provider_namespaceObject.useLocale)('pagination');
780
+ var totalPageNum = (0,external_vue_namespaceObject.ref)(0);
781
+ var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
782
+ count = _toRefs.count,
783
+ limit = _toRefs.limit;
784
+ var renderTotal = use_total(t);
785
+ var _useList = use_list(),
786
+ listCurrent = _useList.current,
787
+ renderList = _useList.render;
788
+ var _useSmallList = use_small_list(),
789
+ smallListCurrent = _useSmallList.current,
790
+ renderSmallList = _useSmallList.render;
791
+ var _useLimit = use_limit(t),
792
+ localLimit = _useLimit.limit,
793
+ renderLimit = _useLimit.render;
794
+ (0,external_vue_namespaceObject.watch)([count, localLimit, limit], function (_ref) {
795
+ var _ref2 = _slicedToArray(_ref, 2),
796
+ count = _ref2[0],
797
+ localLimit = _ref2[1];
798
+ var total = Math.ceil(count / localLimit);
799
+ totalPageNum.value = total < 1 ? 1 : total;
800
+ }, {
801
+ immediate: true
802
+ });
803
+ (0,external_vue_namespaceObject.watch)(listCurrent, function (listCurrent) {
804
+ context.emit('update:modelValue', listCurrent);
805
+ context.emit('change', listCurrent);
806
+ });
807
+ (0,external_vue_namespaceObject.watch)(smallListCurrent, function (smallListCurrent) {
808
+ if (!props.small) {
809
+ return;
810
+ }
811
+ context.emit('update:modelValue', smallListCurrent);
812
+ context.emit('change', smallListCurrent);
813
+ });
814
+ (0,external_vue_namespaceObject.watch)(localLimit, function (localLimit) {
815
+ context.emit('limitChange', localLimit);
816
+ });
817
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
818
+ resolveClassName = _usePrefix.resolveClassName;
819
+ return {
820
+ totalPageNum: totalPageNum,
821
+ renderTotal: renderTotal,
822
+ renderList: renderList,
823
+ renderLimit: renderLimit,
824
+ renderSmallList: renderSmallList,
825
+ resolveClassName: resolveClassName
826
+ };
827
+ },
828
+ render: function render() {
829
+ var _classes,
830
+ _this = this;
831
+ var paginationClass = (0,external_shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, "".concat(this.resolveClassName('pagination')), true), _defineProperty(_classes, "".concat(this.resolveClassName("pagination--".concat(this.size))), true), _defineProperty(_classes, "is-align-".concat(this.align), true), _classes));
832
+ var layoutMap = {
833
+ total: this.renderTotal,
834
+ list: this.small ? this.renderSmallList : this.renderList,
835
+ limit: this.renderLimit
836
+ };
837
+ return (0,external_vue_namespaceObject.createVNode)("div", {
838
+ "class": paginationClass
839
+ }, [this.layout.map(function (layout, index) {
840
+ return layoutMap[layout]({
841
+ isFirst: index === 0,
842
+ isLast: index === _this.layout.length - 1
843
+ });
844
+ })]);
845
+ }
846
+ }));
847
+ ;// CONCATENATED MODULE: ../../packages/pagination/src/index.ts
848
+ /*
849
+ * Tencent is pleased to support the open source community by making
850
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
851
+ *
852
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
853
+ *
854
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
855
+ *
856
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
857
+ *
858
+ * ---------------------------------------------------
859
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
860
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
861
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
862
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
863
+ *
864
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
865
+ * the Software.
866
+ *
867
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
868
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
869
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
870
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
871
+ * IN THE SOFTWARE.
872
+ */
873
+
874
+
875
+ var BkPagination = (0,external_shared_namespaceObject.withInstall)(pagination);
876
+ /* harmony default export */ const src = (BkPagination);
877
+
878
+ var __webpack_exports__BkPagination = __webpack_exports__.h;
879
+ var __webpack_exports__default = __webpack_exports__.Z;
880
+ export { __webpack_exports__BkPagination as BkPagination, __webpack_exports__default as default };