bkui-vue 2.0.1-beta.99 → 2.0.2-beta.1

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 (346) hide show
  1. package/dist/index.cjs.js +133 -159
  2. package/dist/index.esm.js +26188 -29904
  3. package/dist/index.umd.js +133 -159
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/affix.css +0 -130
  7. package/lib/affix/affix.variable.css +1 -261
  8. package/lib/affix/index.js +30 -22
  9. package/lib/alert/alert.css +3 -133
  10. package/lib/alert/alert.variable.css +1 -261
  11. package/lib/alert/index.js +30 -22
  12. package/lib/animate-number/index.js +14 -10
  13. package/lib/backtop/backtop.css +3 -133
  14. package/lib/backtop/backtop.variable.css +4 -394
  15. package/lib/backtop/index.js +32 -22
  16. package/lib/badge/badge.css +26 -156
  17. package/lib/badge/badge.variable.css +1 -261
  18. package/lib/badge/index.js +24 -18
  19. package/lib/breadcrumb/breadcrumb.css +5 -135
  20. package/lib/breadcrumb/breadcrumb.variable.css +6 -396
  21. package/lib/breadcrumb/index.js +31 -23
  22. package/lib/button/button.css +143 -273
  23. package/lib/button/button.variable.css +1 -261
  24. package/lib/button/index.d.ts +2 -1
  25. package/lib/button/index.js +36 -26
  26. package/lib/card/card.css +4 -134
  27. package/lib/card/card.variable.css +5 -395
  28. package/lib/card/index.js +47 -33
  29. package/lib/cascader/cascader.css +27 -153
  30. package/lib/cascader/cascader.d.ts +2 -2
  31. package/lib/cascader/cascader.less +5 -0
  32. package/lib/cascader/cascader.variable.css +28 -414
  33. package/lib/cascader/index.d.ts +6 -6
  34. package/lib/cascader/index.js +1609 -859
  35. package/lib/checkbox/checkbox.css +10 -140
  36. package/lib/checkbox/checkbox.variable.css +1 -261
  37. package/lib/checkbox/index.js +44 -34
  38. package/lib/code-diff/code-diff.css +0 -130
  39. package/lib/code-diff/code-diff.variable.css +1 -261
  40. package/lib/code-diff/index.js +83 -79
  41. package/lib/collapse/collapse.css +1 -131
  42. package/lib/collapse/collapse.variable.css +1 -261
  43. package/lib/collapse/index.js +39 -33
  44. package/lib/collapse-transition/collapse-transition.css +0 -130
  45. package/lib/collapse-transition/collapse-transition.variable.css +1 -261
  46. package/lib/collapse-transition/index.js +20 -14
  47. package/lib/color-picker/color-picker.css +0 -130
  48. package/lib/color-picker/color-picker.variable.css +1 -261
  49. package/lib/color-picker/index.js +1646 -440
  50. package/lib/config-provider/config-provider.css +0 -130
  51. package/lib/config-provider/config-provider.variable.css +1 -261
  52. package/lib/config-provider/index.js +34 -26
  53. package/lib/container/container.css +0 -130
  54. package/lib/container/container.variable.css +1 -391
  55. package/lib/container/index.js +27 -21
  56. package/lib/date-picker/date-picker.css +17 -147
  57. package/lib/date-picker/date-picker.variable.css +1 -261
  58. package/lib/date-picker/index.d.ts +2 -1
  59. package/lib/date-picker/index.js +1992 -554
  60. package/lib/dialog/dialog.css +8 -138
  61. package/lib/dialog/dialog.variable.css +9 -399
  62. package/lib/dialog/index.js +101 -87
  63. package/lib/directives/index.d.ts +1 -0
  64. package/lib/directives/index.js +495 -378
  65. package/lib/divider/divider.css +3 -133
  66. package/lib/divider/divider.variable.css +1 -261
  67. package/lib/divider/index.js +21 -15
  68. package/lib/dropdown/dropdown.css +0 -130
  69. package/lib/dropdown/dropdown.variable.css +1 -391
  70. package/lib/dropdown/index.js +43 -31
  71. package/lib/exception/exception.css +0 -130
  72. package/lib/exception/exception.variable.css +1 -261
  73. package/lib/exception/index.js +55 -49
  74. package/lib/fixed-navbar/fixed-navbar.css +4 -134
  75. package/lib/fixed-navbar/fixed-navbar.variable.css +1 -261
  76. package/lib/fixed-navbar/index.js +20 -14
  77. package/lib/form/form.css +0 -130
  78. package/lib/form/form.variable.css +1 -261
  79. package/lib/form/index.js +1623 -198
  80. package/lib/icon/angle-double-down-line.js +14 -12
  81. package/lib/icon/angle-double-left-line.js +14 -12
  82. package/lib/icon/angle-double-left.js +14 -12
  83. package/lib/icon/angle-double-right-line.js +14 -12
  84. package/lib/icon/angle-double-right.js +14 -12
  85. package/lib/icon/angle-double-up-line.js +14 -12
  86. package/lib/icon/angle-down-fill.js +14 -12
  87. package/lib/icon/angle-down-line.js +14 -12
  88. package/lib/icon/angle-down.js +14 -12
  89. package/lib/icon/angle-left.js +14 -12
  90. package/lib/icon/angle-right.js +14 -12
  91. package/lib/icon/angle-up-fill.js +14 -12
  92. package/lib/icon/angle-up.js +14 -12
  93. package/lib/icon/archive-fill.js +14 -12
  94. package/lib/icon/arrows-left.js +14 -12
  95. package/lib/icon/arrows-right.js +14 -12
  96. package/lib/icon/assistant.js +14 -12
  97. package/lib/icon/audio-fill.js +14 -12
  98. package/lib/icon/bk.js +14 -12
  99. package/lib/icon/circle.js +14 -12
  100. package/lib/icon/close-line.js +14 -12
  101. package/lib/icon/close.js +14 -12
  102. package/lib/icon/code.js +14 -12
  103. package/lib/icon/cog-shape.js +14 -12
  104. package/lib/icon/collapse-left.js +14 -12
  105. package/lib/icon/copy-shape.js +14 -12
  106. package/lib/icon/copy.js +14 -12
  107. package/lib/icon/data-shape.js +14 -12
  108. package/lib/icon/del.js +14 -12
  109. package/lib/icon/doc-fill.js +14 -12
  110. package/lib/icon/done.js +14 -12
  111. package/lib/icon/down-shape.js +14 -12
  112. package/lib/icon/down-small.js +14 -12
  113. package/lib/icon/edit-line.js +14 -12
  114. package/lib/icon/ellipsis.js +14 -12
  115. package/lib/icon/enlarge-line.js +14 -12
  116. package/lib/icon/error.js +14 -12
  117. package/lib/icon/excel-fill.js +14 -12
  118. package/lib/icon/exclamation-circle-shape.js +14 -12
  119. package/lib/icon/eye.js +14 -12
  120. package/lib/icon/filliscreen-line.js +14 -12
  121. package/lib/icon/fix-line.js +14 -12
  122. package/lib/icon/fix-shape.js +14 -12
  123. package/lib/icon/folder-open.js +14 -12
  124. package/lib/icon/folder-shape-open.js +14 -12
  125. package/lib/icon/folder-shape.js +14 -12
  126. package/lib/icon/folder.js +14 -12
  127. package/lib/icon/funnel.js +14 -12
  128. package/lib/icon/grag-fill.js +14 -12
  129. package/lib/icon/help-document-fill.js +14 -12
  130. package/lib/icon/help-fill.js +14 -12
  131. package/lib/icon/help.js +14 -12
  132. package/lib/icon/image-fill.js +14 -12
  133. package/lib/icon/img-error.js +14 -12
  134. package/lib/icon/img-placehoulder.js +14 -12
  135. package/lib/icon/info-line.js +14 -12
  136. package/lib/icon/info.js +14 -12
  137. package/lib/icon/left-shape.js +14 -12
  138. package/lib/icon/left-turn-line.js +14 -12
  139. package/lib/icon/loading.js +14 -12
  140. package/lib/icon/narrow-line.js +14 -12
  141. package/lib/icon/original.js +14 -12
  142. package/lib/icon/pdf-fill.js +14 -12
  143. package/lib/icon/play-shape.js +14 -12
  144. package/lib/icon/plus.js +14 -12
  145. package/lib/icon/ppt-fill.js +14 -12
  146. package/lib/icon/qq.js +14 -12
  147. package/lib/icon/right-shape.js +14 -12
  148. package/lib/icon/right-turn-line.js +14 -12
  149. package/lib/icon/search.js +14 -12
  150. package/lib/icon/share.js +14 -12
  151. package/lib/icon/spinner.js +14 -12
  152. package/lib/icon/success.js +14 -12
  153. package/lib/icon/switcher-loading.js +14 -12
  154. package/lib/icon/text-all.js +14 -12
  155. package/lib/icon/text-file.js +14 -12
  156. package/lib/icon/text-fill.js +14 -12
  157. package/lib/icon/transfer.js +14 -12
  158. package/lib/icon/tree-application-shape.js +14 -12
  159. package/lib/icon/unfull-screen.js +14 -12
  160. package/lib/icon/unvisible.js +14 -12
  161. package/lib/icon/up-shape.js +14 -12
  162. package/lib/icon/upload.js +14 -12
  163. package/lib/icon/video-fill.js +14 -12
  164. package/lib/icon/warn.js +14 -12
  165. package/lib/icon/weixin-pro.js +14 -12
  166. package/lib/icon/weixin.js +14 -12
  167. package/lib/image/image-viewer.css +0 -130
  168. package/lib/image/image-viewer.variable.css +1 -261
  169. package/lib/image/image.css +0 -130
  170. package/lib/image/image.variable.css +1 -391
  171. package/lib/image/index.js +1502 -182
  172. package/lib/index.js +1 -1
  173. package/lib/info-box/index.js +101 -87
  174. package/lib/info-box/info-box.css +4 -134
  175. package/lib/info-box/info-box.variable.css +1 -261
  176. package/lib/input/index.js +1342 -42
  177. package/lib/input/input.css +75 -205
  178. package/lib/input/input.variable.css +76 -466
  179. package/lib/link/index.js +26 -18
  180. package/lib/link/link.css +16 -146
  181. package/lib/link/link.variable.css +1 -261
  182. package/lib/loading/index.js +25 -19
  183. package/lib/loading/loading.css +16 -146
  184. package/lib/loading/loading.variable.css +17 -407
  185. package/lib/locale/index.js +3 -3
  186. package/lib/menu/index.js +40 -32
  187. package/lib/menu/menu.css +20 -150
  188. package/lib/menu/menu.variable.css +21 -411
  189. package/lib/menu/submenu.css +0 -130
  190. package/lib/menu/submenu.variable.css +1 -261
  191. package/lib/message/index.js +47 -41
  192. package/lib/message/message.css +21 -151
  193. package/lib/message/message.variable.css +1 -261
  194. package/lib/modal/index.js +42 -29
  195. package/lib/modal/modal.css +4 -134
  196. package/lib/modal/modal.variable.css +5 -395
  197. package/lib/navigation/index.js +27 -19
  198. package/lib/navigation/navigation.css +2 -132
  199. package/lib/navigation/navigation.variable.css +1 -261
  200. package/lib/notify/index.js +37 -27
  201. package/lib/notify/notify.css +7 -137
  202. package/lib/notify/notify.variable.css +1 -261
  203. package/lib/overflow-title/components/overflow-title.d.ts +20 -0
  204. package/lib/overflow-title/index.d.ts +40 -0
  205. package/lib/overflow-title/index.js +43 -30
  206. package/lib/overflow-title/overflow-title.css +3 -0
  207. package/lib/overflow-title/overflow-title.less +4 -0
  208. package/lib/overflow-title/overflow-title.variable.css +3 -0
  209. package/lib/overflow-title/props.d.ts +10 -0
  210. package/lib/pagination/index.d.ts +3 -3
  211. package/lib/pagination/index.js +62 -46
  212. package/lib/pagination/pagination.css +1 -131
  213. package/lib/pagination/pagination.d.ts +1 -1
  214. package/lib/pagination/pagination.variable.css +1 -261
  215. package/lib/plugin-popover/index.d.ts +1 -1
  216. package/lib/plugin-popover/index.js +35 -21266
  217. package/lib/plugins/index.js +7 -5
  218. package/lib/pop-confirm/index.d.ts +8 -0
  219. package/lib/pop-confirm/index.js +64 -40
  220. package/lib/pop-confirm/pop-confirm.css +0 -130
  221. package/lib/pop-confirm/pop-confirm.d.ts +4 -0
  222. package/lib/pop-confirm/pop-confirm.variable.css +1 -261
  223. package/lib/pop-confirm/props.d.ts +3 -0
  224. package/lib/popover/index.d.ts +49 -3
  225. package/lib/popover/index.js +1323 -17381
  226. package/lib/popover/popover.css +0 -130
  227. package/lib/popover/popover.d.ts +23 -1
  228. package/lib/popover/popover.variable.css +1 -261
  229. package/lib/popover/props.d.ts +16 -0
  230. package/lib/popover/use-popover-init.d.ts +1 -2
  231. package/lib/popover/utils.d.ts +1 -1
  232. package/lib/popover2/index.js +14 -10
  233. package/lib/process/index.js +78 -74
  234. package/lib/process/process.css +13 -143
  235. package/lib/process/process.variable.css +1 -261
  236. package/lib/progress/index.js +26 -20
  237. package/lib/progress/progress.css +4 -134
  238. package/lib/progress/progress.variable.css +5 -395
  239. package/lib/radio/index.js +39 -31
  240. package/lib/radio/radio.css +42 -172
  241. package/lib/radio/radio.variable.css +1 -261
  242. package/lib/rate/index.js +25 -19
  243. package/lib/rate/rate.css +0 -130
  244. package/lib/rate/rate.variable.css +1 -261
  245. package/lib/resize-layout/index.js +30 -22
  246. package/lib/resize-layout/resize-layout.css +0 -130
  247. package/lib/resize-layout/resize-layout.variable.css +1 -261
  248. package/lib/scrollbar/css/scrollbar.css +0 -130
  249. package/lib/scrollbar/css/scrollbar.variable.css +1 -261
  250. package/lib/scrollbar/index.js +25 -25
  251. package/lib/search-select/index.d.ts +6 -0
  252. package/lib/search-select/index.js +1514 -238
  253. package/lib/search-select/input.d.ts +1 -0
  254. package/lib/search-select/search-select.css +78 -208
  255. package/lib/search-select/search-select.d.ts +2 -0
  256. package/lib/search-select/search-select.less +39 -39
  257. package/lib/search-select/search-select.variable.css +79 -469
  258. package/lib/search-select/selected.d.ts +2 -0
  259. package/lib/select/index.d.ts +78 -7
  260. package/lib/select/index.js +1460 -181
  261. package/lib/select/select.css +42 -169
  262. package/lib/select/select.d.ts +32 -2
  263. package/lib/select/select.less +4 -0
  264. package/lib/select/select.variable.css +43 -430
  265. package/lib/shared/index.js +57 -49
  266. package/lib/sideslider/index.js +89 -79
  267. package/lib/sideslider/sideslider.css +1 -131
  268. package/lib/sideslider/sideslider.variable.css +1 -261
  269. package/lib/slider/index.js +85 -75
  270. package/lib/slider/slider.css +5 -135
  271. package/lib/slider/slider.variable.css +1 -261
  272. package/lib/steps/index.js +78 -72
  273. package/lib/steps/steps.css +38 -168
  274. package/lib/steps/steps.variable.css +1 -261
  275. package/lib/styles/mixins/animate.css +0 -130
  276. package/lib/styles/mixins/animate.variable.css +1 -261
  277. package/lib/styles/mixins/mixins.css +0 -130
  278. package/lib/styles/mixins/mixins.variable.css +0 -130
  279. package/lib/styles/mixins/popper.css +0 -130
  280. package/lib/styles/mixins/popper.variable.css +1 -261
  281. package/lib/styles/mixins/scroll.css +0 -130
  282. package/lib/styles/mixins/scroll.variable.css +1 -261
  283. package/lib/styles/reset.css +0 -130
  284. package/lib/styles/reset.variable.css +1 -261
  285. package/lib/styles/themes/themes.less +130 -299
  286. package/lib/swiper/index.js +24 -18
  287. package/lib/swiper/swiper.css +0 -130
  288. package/lib/swiper/swiper.variable.css +1 -261
  289. package/lib/switcher/index.js +30 -22
  290. package/lib/switcher/switcher.css +17 -147
  291. package/lib/switcher/switcher.variable.css +18 -408
  292. package/lib/tab/index.js +1324 -43
  293. package/lib/tab/tab.css +26 -156
  294. package/lib/tab/tab.variable.css +1 -261
  295. package/lib/table/components/table-column.d.ts +1 -1
  296. package/lib/table/index.d.ts +7 -7
  297. package/lib/table/index.js +1543 -17458
  298. package/lib/table/plugins/head-filter.css +0 -130
  299. package/lib/table/plugins/head-filter.variable.css +1 -261
  300. package/lib/table/plugins/head-sort.css +0 -130
  301. package/lib/table/plugins/head-sort.variable.css +1 -261
  302. package/lib/table/plugins/settings.css +0 -130
  303. package/lib/table/plugins/settings.variable.css +1 -261
  304. package/lib/table/table.css +189 -319
  305. package/lib/table/table.d.ts +2 -2
  306. package/lib/table/table.variable.css +190 -580
  307. package/lib/table-column/index.d.ts +3 -3
  308. package/lib/table-column/index.js +17 -17995
  309. package/lib/tag/index.js +36 -26
  310. package/lib/tag/tag.css +5 -135
  311. package/lib/tag/tag.variable.css +1 -261
  312. package/lib/tag-input/index.d.ts +52 -10
  313. package/lib/tag-input/index.js +1453 -17423
  314. package/lib/tag-input/tag-input.css +21 -148
  315. package/lib/tag-input/tag-input.d.ts +24 -4
  316. package/lib/tag-input/tag-input.less +4 -0
  317. package/lib/tag-input/tag-input.variable.css +4 -261
  318. package/lib/tag-input/tag-props.d.ts +11 -1
  319. package/lib/tag-input/tag-render.d.ts +2 -2
  320. package/lib/time-picker/index.js +13 -9
  321. package/lib/time-picker/time-picker.css +0 -130
  322. package/lib/time-picker/time-picker.variable.css +1 -261
  323. package/lib/timeline/index.js +21 -15
  324. package/lib/timeline/timeline.css +19 -149
  325. package/lib/timeline/timeline.variable.css +1 -261
  326. package/lib/transfer/index.d.ts +3 -3
  327. package/lib/transfer/index.js +56 -40
  328. package/lib/transfer/transfer.css +19 -149
  329. package/lib/transfer/transfer.d.ts +1 -1
  330. package/lib/transfer/transfer.variable.css +1 -261
  331. package/lib/tree/index.d.ts +3 -3
  332. package/lib/tree/index.js +107 -17342
  333. package/lib/tree/tree.css +10 -140
  334. package/lib/tree/tree.d.ts +1 -1
  335. package/lib/tree/tree.variable.css +11 -401
  336. package/lib/upload/index.js +584 -572
  337. package/lib/upload/upload.css +27 -157
  338. package/lib/upload/upload.variable.css +28 -418
  339. package/lib/virtual-render/index.d.ts +3 -3
  340. package/lib/virtual-render/index.js +59 -17306
  341. package/lib/virtual-render/virtual-render.css +0 -130
  342. package/lib/virtual-render/virtual-render.d.ts +1 -1
  343. package/lib/virtual-render/virtual-render.variable.css +1 -391
  344. package/package.json +1 -1
  345. package/lib/styles/themes/themes.css +0 -130
  346. package/lib/styles/themes/themes.variable.css +0 -130
@@ -3,13 +3,658 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../sh
3
3
  import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
6
- import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
7
- import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
6
+ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__ from "../plugin-popover";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
8
+ import * as __WEBPACK_EXTERNAL_MODULE__loading_4d683b23__ from "../loading";
9
+ import * as __WEBPACK_EXTERNAL_MODULE__overflow_title_f9bafa47__ from "../overflow-title";
8
10
  import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
9
- /******/ // The require scope
10
- /******/ var __webpack_require__ = {};
11
+ import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 1043:
15
+ /***/ ((module) => {
16
+
17
+ /**
18
+ * Copyright (c) 2015, Facebook, Inc.
19
+ * All rights reserved.
20
+ *
21
+ * This source code is licensed under the BSD-style license found in the
22
+ * LICENSE file in the root directory of this source tree. An additional grant
23
+ * of patent rights can be found in the PATENTS file in the same directory.
24
+ *
25
+ * @providesModule ExecutionEnvironment
26
+ */
27
+
28
+ /*jslint evil: true */
29
+
30
+
31
+
32
+ var canUseDOM = !!(
33
+ typeof window !== 'undefined' &&
34
+ window.document &&
35
+ window.document.createElement
36
+ );
37
+
38
+ /**
39
+ * Simple, lightweight module assisting with the detection and context of
40
+ * Worker. Helps avoid circular dependencies and allows code to reason about
41
+ * whether or not they are in a Worker, even if they never include the main
42
+ * `ReactWorker` dependency.
43
+ */
44
+ var ExecutionEnvironment = {
45
+
46
+ canUseDOM: canUseDOM,
47
+
48
+ canUseWorkers: typeof Worker !== 'undefined',
49
+
50
+ canUseEventListeners:
51
+ canUseDOM && !!(window.addEventListener || window.attachEvent),
52
+
53
+ canUseViewport: canUseDOM && !!window.screen,
54
+
55
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
56
+
57
+ };
58
+
59
+ module.exports = ExecutionEnvironment;
60
+
61
+
62
+ /***/ }),
63
+
64
+ /***/ 2586:
65
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
66
+
67
+ /**
68
+ * Copyright 2013-2015, Facebook, Inc.
69
+ * All rights reserved.
70
+ *
71
+ * This source code is licensed under the BSD-style license found in the
72
+ * LICENSE file in the root directory of this source tree. An additional grant
73
+ * of patent rights can be found in the PATENTS file in the same directory.
74
+ *
75
+ * @providesModule isEventSupported
76
+ */
77
+
78
+
79
+
80
+ var ExecutionEnvironment = __webpack_require__(1043);
81
+
82
+ var useHasFeature;
83
+ if (ExecutionEnvironment.canUseDOM) {
84
+ useHasFeature =
85
+ document.implementation &&
86
+ document.implementation.hasFeature &&
87
+ // always returns true in newer browsers as per the standard.
88
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
89
+ document.implementation.hasFeature('', '') !== true;
90
+ }
91
+
92
+ /**
93
+ * Checks if an event is supported in the current execution environment.
94
+ *
95
+ * NOTE: This will not work correctly for non-generic events such as `change`,
96
+ * `reset`, `load`, `error`, and `select`.
97
+ *
98
+ * Borrows from Modernizr.
99
+ *
100
+ * @param {string} eventNameSuffix Event name, e.g. "click".
101
+ * @param {?boolean} capture Check if the capture phase is supported.
102
+ * @return {boolean} True if the event is supported.
103
+ * @internal
104
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
105
+ */
106
+ function isEventSupported(eventNameSuffix, capture) {
107
+ if (!ExecutionEnvironment.canUseDOM ||
108
+ capture && !('addEventListener' in document)) {
109
+ return false;
110
+ }
111
+
112
+ var eventName = 'on' + eventNameSuffix;
113
+ var isSupported = eventName in document;
114
+
115
+ if (!isSupported) {
116
+ var element = document.createElement('div');
117
+ element.setAttribute(eventName, 'return;');
118
+ isSupported = typeof element[eventName] === 'function';
119
+ }
120
+
121
+ if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
122
+ // This is the only way to test support for the `wheel` event in IE9+.
123
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
124
+ }
125
+
126
+ return isSupported;
127
+ }
128
+
129
+ module.exports = isEventSupported;
130
+
131
+
132
+ /***/ }),
133
+
134
+ /***/ 5022:
135
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
136
+
137
+ /**
138
+ * Copyright (c) 2015, Facebook, Inc.
139
+ * All rights reserved.
140
+ *
141
+ * This source code is licensed under the BSD-style license found in the
142
+ * LICENSE file in the root directory of this source tree. An additional grant
143
+ * of patent rights can be found in the PATENTS file in the same directory.
144
+ *
145
+ * @providesModule normalizeWheel
146
+ * @typechecks
147
+ */
148
+
149
+
150
+
151
+ var UserAgent_DEPRECATED = __webpack_require__(7416);
152
+
153
+ var isEventSupported = __webpack_require__(2586);
154
+
155
+
156
+ // Reasonable defaults
157
+ var PIXEL_STEP = 10;
158
+ var LINE_HEIGHT = 40;
159
+ var PAGE_HEIGHT = 800;
160
+
161
+ /**
162
+ * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is
163
+ * complicated, thus this doc is long and (hopefully) detailed enough to answer
164
+ * your questions.
165
+ *
166
+ * If you need to react to the mouse wheel in a predictable way, this code is
167
+ * like your bestest friend. * hugs *
168
+ *
169
+ * As of today, there are 4 DOM event types you can listen to:
170
+ *
171
+ * 'wheel' -- Chrome(31+), FF(17+), IE(9+)
172
+ * 'mousewheel' -- Chrome, IE(6+), Opera, Safari
173
+ * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!
174
+ * 'DOMMouseScroll' -- FF(0.9.7+) since 2003
175
+ *
176
+ * So what to do? The is the best:
177
+ *
178
+ * normalizeWheel.getEventType();
179
+ *
180
+ * In your event callback, use this code to get sane interpretation of the
181
+ * deltas. This code will return an object with properties:
182
+ *
183
+ * spinX -- normalized spin speed (use for zoom) - x plane
184
+ * spinY -- " - y plane
185
+ * pixelX -- normalized distance (to pixels) - x plane
186
+ * pixelY -- " - y plane
187
+ *
188
+ * Wheel values are provided by the browser assuming you are using the wheel to
189
+ * scroll a web page by a number of lines or pixels (or pages). Values can vary
190
+ * significantly on different platforms and browsers, forgetting that you can
191
+ * scroll at different speeds. Some devices (like trackpads) emit more events
192
+ * at smaller increments with fine granularity, and some emit massive jumps with
193
+ * linear speed or acceleration.
194
+ *
195
+ * This code does its best to normalize the deltas for you:
196
+ *
197
+ * - spin is trying to normalize how far the wheel was spun (or trackpad
198
+ * dragged). This is super useful for zoom support where you want to
199
+ * throw away the chunky scroll steps on the PC and make those equal to
200
+ * the slow and smooth tiny steps on the Mac. Key data: This code tries to
201
+ * resolve a single slow step on a wheel to 1.
202
+ *
203
+ * - pixel is normalizing the desired scroll delta in pixel units. You'll
204
+ * get the crazy differences between browsers, but at least it'll be in
205
+ * pixels!
206
+ *
207
+ * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This
208
+ * should translate to positive value zooming IN, negative zooming OUT.
209
+ * This matches the newer 'wheel' event.
210
+ *
211
+ * Why are there spinX, spinY (or pixels)?
212
+ *
213
+ * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn
214
+ * with a mouse. It results in side-scrolling in the browser by default.
215
+ *
216
+ * - spinY is what you expect -- it's the classic axis of a mouse wheel.
217
+ *
218
+ * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and
219
+ * probably is by browsers in conjunction with fancy 3D controllers .. but
220
+ * you know.
221
+ *
222
+ * Implementation info:
223
+ *
224
+ * Examples of 'wheel' event if you scroll slowly (down) by one step with an
225
+ * average mouse:
226
+ *
227
+ * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)
228
+ * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)
229
+ * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)
230
+ * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)
231
+ * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)
232
+ *
233
+ * On the trackpad:
234
+ *
235
+ * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)
236
+ * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)
237
+ *
238
+ * On other/older browsers.. it's more complicated as there can be multiple and
239
+ * also missing delta values.
240
+ *
241
+ * The 'wheel' event is more standard:
242
+ *
243
+ * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents
244
+ *
245
+ * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and
246
+ * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain
247
+ * backward compatibility with older events. Those other values help us
248
+ * better normalize spin speed. Example of what the browsers provide:
249
+ *
250
+ * | event.wheelDelta | event.detail
251
+ * ------------------+------------------+--------------
252
+ * Safari v5/OS X | -120 | 0
253
+ * Safari v5/Win7 | -120 | 0
254
+ * Chrome v17/OS X | -120 | 0
255
+ * Chrome v17/Win7 | -120 | 0
256
+ * IE9/Win7 | -120 | undefined
257
+ * Firefox v4/OS X | undefined | 1
258
+ * Firefox v4/Win7 | undefined | 3
259
+ *
260
+ */
261
+ function normalizeWheel(/*object*/ event) /*object*/ {
262
+ var sX = 0, sY = 0, // spinX, spinY
263
+ pX = 0, pY = 0; // pixelX, pixelY
264
+
265
+ // Legacy
266
+ if ('detail' in event) { sY = event.detail; }
267
+ if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }
268
+ if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }
269
+ if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }
270
+
271
+ // side scrolling on FF with DOMMouseScroll
272
+ if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
273
+ sX = sY;
274
+ sY = 0;
275
+ }
276
+
277
+ pX = sX * PIXEL_STEP;
278
+ pY = sY * PIXEL_STEP;
279
+
280
+ if ('deltaY' in event) { pY = event.deltaY; }
281
+ if ('deltaX' in event) { pX = event.deltaX; }
282
+
283
+ if ((pX || pY) && event.deltaMode) {
284
+ if (event.deltaMode == 1) { // delta in LINE units
285
+ pX *= LINE_HEIGHT;
286
+ pY *= LINE_HEIGHT;
287
+ } else { // delta in PAGE units
288
+ pX *= PAGE_HEIGHT;
289
+ pY *= PAGE_HEIGHT;
290
+ }
291
+ }
292
+
293
+ // Fall-back if spin cannot be determined
294
+ if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }
295
+ if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }
296
+
297
+ return { spinX : sX,
298
+ spinY : sY,
299
+ pixelX : pX,
300
+ pixelY : pY };
301
+ }
302
+
303
+
304
+ /**
305
+ * The best combination if you prefer spinX + spinY normalization. It favors
306
+ * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with
307
+ * 'wheel' event, making spin speed determination impossible.
308
+ */
309
+ normalizeWheel.getEventType = function() /*string*/ {
310
+ return (UserAgent_DEPRECATED.firefox())
311
+ ? 'DOMMouseScroll'
312
+ : (isEventSupported('wheel'))
313
+ ? 'wheel'
314
+ : 'mousewheel';
315
+ };
316
+
317
+ module.exports = normalizeWheel;
318
+
319
+
320
+ /***/ }),
321
+
322
+ /***/ 7416:
323
+ /***/ ((module) => {
324
+
325
+ /**
326
+ * Copyright 2004-present Facebook. All Rights Reserved.
327
+ *
328
+ * @providesModule UserAgent_DEPRECATED
329
+ */
330
+
331
+ /**
332
+ * Provides entirely client-side User Agent and OS detection. You should prefer
333
+ * the non-deprecated UserAgent module when possible, which exposes our
334
+ * authoritative server-side PHP-based detection to the client.
335
+ *
336
+ * Usage is straightforward:
337
+ *
338
+ * if (UserAgent_DEPRECATED.ie()) {
339
+ * // IE
340
+ * }
341
+ *
342
+ * You can also do version checks:
343
+ *
344
+ * if (UserAgent_DEPRECATED.ie() >= 7) {
345
+ * // IE7 or better
346
+ * }
347
+ *
348
+ * The browser functions will return NaN if the browser does not match, so
349
+ * you can also do version compares the other way:
350
+ *
351
+ * if (UserAgent_DEPRECATED.ie() < 7) {
352
+ * // IE6 or worse
353
+ * }
354
+ *
355
+ * Note that the version is a float and may include a minor version number,
356
+ * so you should always use range operators to perform comparisons, not
357
+ * strict equality.
358
+ *
359
+ * **Note:** You should **strongly** prefer capability detection to browser
360
+ * version detection where it's reasonable:
361
+ *
362
+ * http://www.quirksmode.org/js/support.html
363
+ *
364
+ * Further, we have a large number of mature wrapper functions and classes
365
+ * which abstract away many browser irregularities. Check the documentation,
366
+ * grep for things, or ask on javascript@lists.facebook.com before writing yet
367
+ * another copy of "event || window.event".
368
+ *
369
+ */
370
+
371
+ var _populated = false;
372
+
373
+ // Browsers
374
+ var _ie, _firefox, _opera, _webkit, _chrome;
375
+
376
+ // Actual IE browser for compatibility mode
377
+ var _ie_real_version;
378
+
379
+ // Platforms
380
+ var _osx, _windows, _linux, _android;
381
+
382
+ // Architectures
383
+ var _win64;
384
+
385
+ // Devices
386
+ var _iphone, _ipad, _native;
387
+
388
+ var _mobile;
389
+
390
+ function _populate() {
391
+ if (_populated) {
392
+ return;
393
+ }
394
+
395
+ _populated = true;
396
+
397
+ // To work around buggy JS libraries that can't handle multi-digit
398
+ // version numbers, Opera 10's user agent string claims it's Opera
399
+ // 9, then later includes a Version/X.Y field:
400
+ //
401
+ // Opera/9.80 (foo) Presto/2.2.15 Version/10.10
402
+ var uas = navigator.userAgent;
403
+ var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
404
+ var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
405
+
406
+ _iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
407
+ _ipad = /\b(iP[ao]d)/.exec(uas);
408
+ _android = /Android/i.exec(uas);
409
+ _native = /FBAN\/\w+;/i.exec(uas);
410
+ _mobile = /Mobile/i.exec(uas);
411
+
412
+ // Note that the IE team blog would have you believe you should be checking
413
+ // for 'Win64; x64'. But MSDN then reveals that you can actually be coming
414
+ // from either x64 or ia64; so ultimately, you should just check for Win64
415
+ // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
416
+ // Windows will send 'WOW64' instead.
417
+ _win64 = !!(/Win64/.exec(uas));
418
+
419
+ if (agent) {
420
+ _ie = agent[1] ? parseFloat(agent[1]) : (
421
+ agent[5] ? parseFloat(agent[5]) : NaN);
422
+ // IE compatibility mode
423
+ if (_ie && document && document.documentMode) {
424
+ _ie = document.documentMode;
425
+ }
426
+ // grab the "true" ie version from the trident token if available
427
+ var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
428
+ _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
429
+
430
+ _firefox = agent[2] ? parseFloat(agent[2]) : NaN;
431
+ _opera = agent[3] ? parseFloat(agent[3]) : NaN;
432
+ _webkit = agent[4] ? parseFloat(agent[4]) : NaN;
433
+ if (_webkit) {
434
+ // We do not add the regexp to the above test, because it will always
435
+ // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
436
+ // the userAgent string.
437
+ agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
438
+ _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
439
+ } else {
440
+ _chrome = NaN;
441
+ }
442
+ } else {
443
+ _ie = _firefox = _opera = _chrome = _webkit = NaN;
444
+ }
445
+
446
+ if (os) {
447
+ if (os[1]) {
448
+ // Detect OS X version. If no version number matches, set _osx to true.
449
+ // Version examples: 10, 10_6_1, 10.7
450
+ // Parses version number as a float, taking only first two sets of
451
+ // digits. If only one set of digits is found, returns just the major
452
+ // version number.
453
+ var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
454
+
455
+ _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
456
+ } else {
457
+ _osx = false;
458
+ }
459
+ _windows = !!os[2];
460
+ _linux = !!os[3];
461
+ } else {
462
+ _osx = _windows = _linux = false;
463
+ }
464
+ }
465
+
466
+ var UserAgent_DEPRECATED = {
467
+
468
+ /**
469
+ * Check if the UA is Internet Explorer.
470
+ *
471
+ *
472
+ * @return float|NaN Version number (if match) or NaN.
473
+ */
474
+ ie: function() {
475
+ return _populate() || _ie;
476
+ },
477
+
478
+ /**
479
+ * Check if we're in Internet Explorer compatibility mode.
480
+ *
481
+ * @return bool true if in compatibility mode, false if
482
+ * not compatibility mode or not ie
483
+ */
484
+ ieCompatibilityMode: function() {
485
+ return _populate() || (_ie_real_version > _ie);
486
+ },
487
+
488
+
489
+ /**
490
+ * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
491
+ * only need this because Skype can't handle 64-bit IE yet. We need to remove
492
+ * this when we don't need it -- tracked by #601957.
493
+ */
494
+ ie64: function() {
495
+ return UserAgent_DEPRECATED.ie() && _win64;
496
+ },
497
+
498
+ /**
499
+ * Check if the UA is Firefox.
500
+ *
501
+ *
502
+ * @return float|NaN Version number (if match) or NaN.
503
+ */
504
+ firefox: function() {
505
+ return _populate() || _firefox;
506
+ },
507
+
508
+
509
+ /**
510
+ * Check if the UA is Opera.
511
+ *
512
+ *
513
+ * @return float|NaN Version number (if match) or NaN.
514
+ */
515
+ opera: function() {
516
+ return _populate() || _opera;
517
+ },
518
+
519
+
520
+ /**
521
+ * Check if the UA is WebKit.
522
+ *
523
+ *
524
+ * @return float|NaN Version number (if match) or NaN.
525
+ */
526
+ webkit: function() {
527
+ return _populate() || _webkit;
528
+ },
529
+
530
+ /**
531
+ * For Push
532
+ * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
533
+ */
534
+ safari: function() {
535
+ return UserAgent_DEPRECATED.webkit();
536
+ },
537
+
538
+ /**
539
+ * Check if the UA is a Chrome browser.
540
+ *
541
+ *
542
+ * @return float|NaN Version number (if match) or NaN.
543
+ */
544
+ chrome : function() {
545
+ return _populate() || _chrome;
546
+ },
547
+
548
+
549
+ /**
550
+ * Check if the user is running Windows.
551
+ *
552
+ * @return bool `true' if the user's OS is Windows.
553
+ */
554
+ windows: function() {
555
+ return _populate() || _windows;
556
+ },
557
+
558
+
559
+ /**
560
+ * Check if the user is running Mac OS X.
561
+ *
562
+ * @return float|bool Returns a float if a version number is detected,
563
+ * otherwise true/false.
564
+ */
565
+ osx: function() {
566
+ return _populate() || _osx;
567
+ },
568
+
569
+ /**
570
+ * Check if the user is running Linux.
571
+ *
572
+ * @return bool `true' if the user's OS is some flavor of Linux.
573
+ */
574
+ linux: function() {
575
+ return _populate() || _linux;
576
+ },
577
+
578
+ /**
579
+ * Check if the user is running on an iPhone or iPod platform.
580
+ *
581
+ * @return bool `true' if the user is running some flavor of the
582
+ * iPhone OS.
583
+ */
584
+ iphone: function() {
585
+ return _populate() || _iphone;
586
+ },
587
+
588
+ mobile: function() {
589
+ return _populate() || (_iphone || _ipad || _android || _mobile);
590
+ },
591
+
592
+ nativeApp: function() {
593
+ // webviews inside of the native apps
594
+ return _populate() || _native;
595
+ },
596
+
597
+ android: function() {
598
+ return _populate() || _android;
599
+ },
600
+
601
+ ipad: function() {
602
+ return _populate() || _ipad;
603
+ }
604
+ };
605
+
606
+ module.exports = UserAgent_DEPRECATED;
607
+
608
+
609
+ /***/ }),
610
+
611
+ /***/ 8283:
612
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
613
+
614
+ module.exports = __webpack_require__(5022);
615
+
616
+
617
+ /***/ })
618
+
619
+ /******/ });
620
+ /************************************************************************/
621
+ /******/ // The module cache
622
+ /******/ var __webpack_module_cache__ = {};
623
+ /******/
624
+ /******/ // The require function
625
+ /******/ function __webpack_require__(moduleId) {
626
+ /******/ // Check if module is in cache
627
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
628
+ /******/ if (cachedModule !== undefined) {
629
+ /******/ return cachedModule.exports;
630
+ /******/ }
631
+ /******/ // Create a new module (and put it into the cache)
632
+ /******/ var module = __webpack_module_cache__[moduleId] = {
633
+ /******/ // no module.id needed
634
+ /******/ // no module.loaded needed
635
+ /******/ exports: {}
636
+ /******/ };
637
+ /******/
638
+ /******/ // Execute the module function
639
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
640
+ /******/
641
+ /******/ // Return the exports of the module
642
+ /******/ return module.exports;
643
+ /******/ }
11
644
  /******/
12
645
  /************************************************************************/
646
+ /******/ /* webpack/runtime/compat get default export */
647
+ /******/ (() => {
648
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
649
+ /******/ __webpack_require__.n = (module) => {
650
+ /******/ var getter = module && module.__esModule ?
651
+ /******/ () => (module['default']) :
652
+ /******/ () => (module);
653
+ /******/ __webpack_require__.d(getter, { a: getter });
654
+ /******/ return getter;
655
+ /******/ };
656
+ /******/ })();
657
+ /******/
13
658
  /******/ /* webpack/runtime/define property getters */
14
659
  /******/ (() => {
15
660
  /******/ // define getter functions for harmony exports
@@ -37,62 +682,208 @@ __webpack_require__.d(__webpack_exports__, {
37
682
  "default": () => (/* binding */ src)
38
683
  });
39
684
 
40
- ;// CONCATENATED MODULE: external "../shared"
41
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
42
- var y = x => () => x
43
- const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager, ["getFullscreenRoot"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.getFullscreenRoot, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
44
- ;// CONCATENATED MODULE: external "vue"
45
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
46
- var external_vue_y = x => () => x
47
- const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["Teleport"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Teleport, ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["effectScope"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.effectScope, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
48
- ;// CONCATENATED MODULE: external "../config-provider"
49
- var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
50
- var config_provider_y = x => () => x
51
- const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
52
- ;// CONCATENATED MODULE: external "../icon"
53
- var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
54
- var icon_y = x => () => x
55
- const icon_namespaceObject = icon_x({ ["AngleLeft"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleLeft, ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleRight, ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Spinner"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Spinner });
56
- ;// CONCATENATED MODULE: external "vue-types"
57
- var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
58
- var external_vue_types_y = x => () => x
59
- const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType });
60
- ;// CONCATENATED MODULE: ../../packages/image/src/props.ts
685
+ ;// external "../shared"
686
+ var x = (y) => {
687
+ var x = {}; __webpack_require__.d(x, y); return x
688
+ }
689
+ var y = (x) => (() => (x))
690
+ const shared_namespaceObject = x({ ["PropTypes"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes), ["bkZIndexManager"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.bkZIndexManager), ["getFullscreenRoot"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.getFullscreenRoot), ["resolveClassName"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.resolveClassName), ["withInstall"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall) });
691
+ ;// external "vue"
692
+ var external_vue_x = (y) => {
693
+ var x = {}; __webpack_require__.d(x, y); return x
694
+ }
695
+ var external_vue_y = (x) => (() => (x))
696
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.Fragment), ["Teleport"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.Teleport), ["Transition"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.Transition), ["computed"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.computed), ["createTextVNode"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode), ["createVNode"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.createVNode), ["defineComponent"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.defineComponent), ["effectScope"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.effectScope), ["h"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.h), ["nextTick"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.nextTick), ["ref"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.ref), ["render"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.render), ["resolveDirective"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective), ["shallowRef"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.shallowRef), ["watch"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.watch), ["withDirectives"]: () => (__WEBPACK_EXTERNAL_MODULE_vue__.withDirectives) });
697
+ ;// external "../config-provider"
698
+ var config_provider_x = (y) => {
699
+ var x = {}; __webpack_require__.d(x, y); return x
700
+ }
701
+ var config_provider_y = (x) => (() => (x))
702
+ const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix) });
703
+ ;// external "../icon"
704
+ var icon_x = (y) => {
705
+ var x = {}; __webpack_require__.d(x, y); return x
706
+ }
707
+ var icon_y = (x) => (() => (x))
708
+ const icon_namespaceObject = icon_x({ ["AngleLeft"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleLeft), ["AngleRight"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleRight), ["Close"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close), ["Spinner"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Spinner) });
709
+ ;// ../../node_modules/@babel/runtime/helpers/esm/typeof.js
710
+ function _typeof(o) {
711
+ "@babel/helpers - typeof";
61
712
 
713
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
714
+ return typeof o;
715
+ } : function (o) {
716
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
717
+ }, _typeof(o);
718
+ }
719
+ ;// ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
62
720
 
63
- var FitEnum;
64
- (function (FitEnum) {
65
- FitEnum["CONTAIN"] = "contain";
66
- FitEnum["COVER"] = "cover";
67
- FitEnum["FILL"] = "fill";
68
- FitEnum["NONE"] = "none";
69
- FitEnum["SCALE_DOWN"] = "scale-down";
70
- })(FitEnum || (FitEnum = {}));
71
- var propsImage = {
72
- src: shared_namespaceObject.PropTypes.string.def(''),
73
- fallback: shared_namespaceObject.PropTypes.string.def(''),
74
- placeholder: shared_namespaceObject.PropTypes.any,
75
- fit: (0,external_vue_types_namespaceObject.toType)('fit', {}).def(FitEnum.FILL),
76
- lazy: shared_namespaceObject.PropTypes.bool,
77
- urlList: shared_namespaceObject.PropTypes.array.def([]),
78
- isShowPreviewTitle: shared_namespaceObject.PropTypes.bool.def(true),
79
- maskClose: shared_namespaceObject.PropTypes.bool.def(true),
80
- zIndex: shared_namespaceObject.PropTypes.number.def(2000)
721
+ function toPrimitive(t, r) {
722
+ if ("object" != _typeof(t) || !t) return t;
723
+ var e = t[Symbol.toPrimitive];
724
+ if (void 0 !== e) {
725
+ var i = e.call(t, r || "default");
726
+ if ("object" != _typeof(i)) return i;
727
+ throw new TypeError("@@toPrimitive must return a primitive value.");
728
+ }
729
+ return ("string" === r ? String : Number)(t);
730
+ }
731
+ ;// ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
732
+
733
+
734
+ function toPropertyKey(t) {
735
+ var i = toPrimitive(t, "string");
736
+ return "symbol" == _typeof(i) ? i : String(i);
737
+ }
738
+ ;// ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
739
+
740
+ function _defineProperty(obj, key, value) {
741
+ key = toPropertyKey(key);
742
+ if (key in obj) {
743
+ Object.defineProperty(obj, key, {
744
+ value: value,
745
+ enumerable: true,
746
+ configurable: true,
747
+ writable: true
748
+ });
749
+ } else {
750
+ obj[key] = value;
751
+ }
752
+ return obj;
753
+ }
754
+ ;// ../../packages/directives/src/clickoutside.ts
755
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
756
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
757
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
758
+ /*
759
+ * Tencent is pleased to support the open source community by making
760
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
761
+ *
762
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
763
+ *
764
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
765
+ *
766
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
767
+ *
768
+ * ---------------------------------------------------
769
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
770
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
771
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
772
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
773
+ *
774
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
775
+ * the Software.
776
+ *
777
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
778
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
779
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
780
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
781
+ * IN THE SOFTWARE.
782
+ */
783
+ var isElement = function isElement(e) {
784
+ if (typeof Element === 'undefined') return false;
785
+ return e instanceof Element;
81
786
  };
82
- var propsImageViever = {
83
- urlList: {
84
- type: Array,
85
- "default": function _default() {
86
- return [];
787
+ var nodeList = new Map();
788
+ var startClick;
789
+ document.addEventListener('mousedown', function (e) {
790
+ return startClick = e;
791
+ });
792
+ document.addEventListener('mouseup', function (e) {
793
+ var _iterator = _createForOfIteratorHelper(nodeList.values()),
794
+ _step;
795
+ try {
796
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
797
+ var handlers = _step.value;
798
+ var _iterator2 = _createForOfIteratorHelper(handlers),
799
+ _step2;
800
+ try {
801
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
802
+ var documentHandler = _step2.value.documentHandler;
803
+ documentHandler(e, startClick);
804
+ }
805
+ } catch (err) {
806
+ _iterator2.e(err);
807
+ } finally {
808
+ _iterator2.f();
809
+ }
87
810
  }
811
+ } catch (err) {
812
+ _iterator.e(err);
813
+ } finally {
814
+ _iterator.f();
815
+ }
816
+ });
817
+ function createDocumentHandler(el, binding) {
818
+ var excludes = [];
819
+ if (Array.isArray(binding.arg)) {
820
+ excludes = binding.arg;
821
+ } else if (isElement(binding.arg)) {
822
+ excludes.push(binding.arg);
823
+ }
824
+ return function (mouseup, mousedown) {
825
+ var popperRef = binding.instance.popperRef;
826
+ var mouseUpTarget = mouseup.target;
827
+ var mouseDownTarget = mousedown === null || mousedown === void 0 ? void 0 : mousedown.target;
828
+ var isBound = !binding || !binding.instance;
829
+ var isTargetExists = !mouseUpTarget || !mouseDownTarget;
830
+ var isContainedByEl = el.contains(mouseUpTarget) || el.contains(mouseDownTarget);
831
+ var isSelf = el === mouseUpTarget;
832
+ var isTargetExcluded = excludes.length && excludes.some(function (item) {
833
+ return item === null || item === void 0 ? void 0 : item.contains(mouseUpTarget);
834
+ }) || excludes.length && excludes.includes(mouseDownTarget);
835
+ var isContainedByPopper = popperRef && (popperRef.contains(mouseUpTarget) || popperRef.contains(mouseDownTarget));
836
+ if (isBound || isTargetExists || isContainedByEl || isSelf || isTargetExcluded || isContainedByPopper) {
837
+ return;
838
+ }
839
+ binding.value(mouseup, mousedown);
840
+ };
841
+ }
842
+ var ClickOutside = {
843
+ beforeMount: function beforeMount(el, binding) {
844
+ if (!nodeList.has(el)) {
845
+ nodeList.set(el, []);
846
+ }
847
+ nodeList.get(el).push({
848
+ documentHandler: createDocumentHandler(el, binding),
849
+ bindingFn: binding.value
850
+ });
88
851
  },
89
- zIndex: shared_namespaceObject.PropTypes.number.def(2000),
90
- initialIndex: shared_namespaceObject.PropTypes.number.def(0),
91
- isShowTitle: shared_namespaceObject.PropTypes.bool.def(true),
92
- loops: shared_namespaceObject.PropTypes.bool.def(true),
93
- maskClose: shared_namespaceObject.PropTypes.bool.def(true)
852
+ updated: function updated(el, binding) {
853
+ if (!nodeList.has(el)) {
854
+ nodeList.set(el, []);
855
+ }
856
+ var handlers = nodeList.get(el);
857
+ var oldHandlerIndex = handlers.findIndex(function (item) {
858
+ return item.bindingFn === binding.oldValue;
859
+ });
860
+ var newHandler = {
861
+ documentHandler: createDocumentHandler(el, binding),
862
+ bindingFn: binding.value
863
+ };
864
+ if (oldHandlerIndex >= 0) {
865
+ // replace the old handler to the new handler
866
+ handlers.splice(oldHandlerIndex, 1, newHandler);
867
+ } else {
868
+ handlers.push(newHandler);
869
+ }
870
+ },
871
+ unmounted: function unmounted(el) {
872
+ // remove all listeners when a component unmounted
873
+ nodeList["delete"](el);
874
+ }
875
+ };
876
+ ClickOutside.install = function (app) {
877
+ app.directive('bkTooltips', ClickOutside);
94
878
  };
95
- ;// CONCATENATED MODULE: ../../packages/image/src/image.tsx
879
+ /* harmony default export */ const clickoutside = ((/* unused pure expression or super */ null && (ClickOutside)));
880
+ ;// external "../plugin-popover"
881
+ var plugin_popover_x = (y) => {
882
+ var x = {}; __webpack_require__.d(x, y); return x
883
+ }
884
+ var plugin_popover_y = (x) => (() => (x))
885
+ const plugin_popover_namespaceObject = plugin_popover_x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_plugin_popover_300e25d0__["default"]) });
886
+ ;// ../../packages/directives/src/ellipsis.ts
96
887
 
97
888
  /*
98
889
  * Tencent is pleased to support the open source community by making
@@ -120,146 +911,565 @@ var propsImageViever = {
120
911
  * IN THE SOFTWARE.
121
912
  */
122
913
 
914
+ var resolveOptions = function resolveOptions(el, binding) {
915
+ var options = {
916
+ content: '',
917
+ target: el
918
+ };
919
+ if (_typeof(binding) === 'object') {
920
+ Object.assign(options, binding);
921
+ if (Object.prototype.hasOwnProperty.call(binding, 'popoverOption')) {
922
+ Object.assign(options, binding.popoverOption);
923
+ }
924
+ } else {
925
+ options.content = binding;
926
+ }
927
+ return options;
928
+ };
929
+ var createInstance = function createInstance(el, binding) {
930
+ var instance = null;
931
+ var createTimer = null;
932
+ var hidePopTimer = null;
933
+ var options = resolveOptions(el, binding);
934
+ var disabled = options.disabled;
935
+ if (disabled || instance) {
936
+ return;
937
+ }
938
+ var handleContentEnter = function handleContentEnter() {
939
+ hidePopTimer && clearTimeout(hidePopTimer);
940
+ hidePopTimer = null;
941
+ };
942
+ var handleContentLeave = function handleContentLeave() {
943
+ var _instance, _instance2;
944
+ if (createTimer) {
945
+ clearTimeout(createTimer);
946
+ }
947
+ (_instance = instance) === null || _instance === void 0 || _instance.hide();
948
+ (_instance2 = instance) === null || _instance2 === void 0 || _instance2.close();
949
+ instance = null;
950
+ };
951
+ var handleMouseEnter = function handleMouseEnter() {
952
+ handleContentLeave();
953
+ createTimer && clearTimeout(createTimer);
954
+ createTimer = setTimeout(function () {
955
+ var targetOptions = resolveOptions(el, binding);
956
+ targetOptions.isShow = true;
957
+ targetOptions.content = typeof targetOptions.content === 'function' ? targetOptions.content() : targetOptions.content || el.innerText;
958
+ targetOptions.allowHtml = true;
959
+ Object.assign(targetOptions, {
960
+ onContentMouseenter: handleContentEnter,
961
+ onContentMouseleave: handleContentLeave
962
+ });
963
+ instance = (0,plugin_popover_namespaceObject["default"])(targetOptions);
964
+ }, 300);
965
+ };
966
+ var handleMouseLeave = function handleMouseLeave() {
967
+ hidePopTimer = setTimeout(function () {
968
+ var _instance3, _instance4;
969
+ if (createTimer) {
970
+ clearTimeout(createTimer);
971
+ }
972
+ (_instance3 = instance) === null || _instance3 === void 0 || _instance3.hide();
973
+ (_instance4 = instance) === null || _instance4 === void 0 || _instance4.close();
974
+ instance = null;
975
+ }, 120);
976
+ };
977
+ el.addEventListener('mouseenter', handleMouseEnter);
978
+ el.addEventListener('mouseleave', handleMouseLeave);
979
+ var destroyInstance = function destroyInstance(element) {
980
+ var _ref, _ref2;
981
+ handleMouseLeave();
982
+ (_ref = element !== null && element !== void 0 ? element : el) === null || _ref === void 0 || _ref.removeEventListener('mouseenter', handleMouseEnter);
983
+ (_ref2 = element !== null && element !== void 0 ? element : el) === null || _ref2 === void 0 || _ref2.removeEventListener('mouseleave', handleMouseLeave);
984
+ };
985
+ return {
986
+ destroyInstance: destroyInstance,
987
+ instance: instance
988
+ };
989
+ };
990
+ var ellipsis = {
991
+ mounted: function mounted(el, binding) {
992
+ createInstance(el, binding);
993
+ }
994
+ };
995
+ /* harmony default export */ const src_ellipsis = ((/* unused pure expression or super */ null && (ellipsis)));
996
+ // EXTERNAL MODULE: ../../node_modules/normalize-wheel/index.js
997
+ var normalize_wheel = __webpack_require__(8283);
998
+ var normalize_wheel_default = /*#__PURE__*/__webpack_require__.n(normalize_wheel);
999
+ ;// ../../packages/directives/src/mousewheel.ts
1000
+ /*
1001
+ * Tencent is pleased to support the open source community by making
1002
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1003
+ *
1004
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1005
+ *
1006
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1007
+ *
1008
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1009
+ *
1010
+ * ---------------------------------------------------
1011
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1012
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1013
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1014
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1015
+ *
1016
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1017
+ * the Software.
1018
+ *
1019
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1020
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1021
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1022
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1023
+ * IN THE SOFTWARE.
1024
+ */
1025
+
1026
+ var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
1027
+ var mousewheelHandler = function mousewheelHandler(element, callback) {
1028
+ if (element !== null && element !== void 0 && element.addEventListener) {
1029
+ element.addEventListener(isFirefox ? 'DOMMouseScroll' : 'mousewheel', function (e) {
1030
+ var normalized = normalize_wheel_default()(e);
1031
+ callback === null || callback === void 0 || callback.apply(this, [e, normalized]);
1032
+ });
1033
+ }
1034
+ };
1035
+ var mousewheel = {
1036
+ beforeMount: function beforeMount(el, binding) {
1037
+ mousewheelHandler(el, binding.value);
1038
+ }
1039
+ };
1040
+ /* harmony default export */ const src_mousewheel = ((/* unused pure expression or super */ null && (mousewheel)));
1041
+ ;// ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1042
+ function arrayLikeToArray_arrayLikeToArray(arr, len) {
1043
+ if (len == null || len > arr.length) len = arr.length;
1044
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1045
+ return arr2;
1046
+ }
1047
+ ;// ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
123
1048
 
1049
+ function _arrayWithoutHoles(arr) {
1050
+ if (Array.isArray(arr)) return arrayLikeToArray_arrayLikeToArray(arr);
1051
+ }
1052
+ ;// ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
1053
+ function _iterableToArray(iter) {
1054
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1055
+ }
1056
+ ;// ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
124
1057
 
1058
+ function unsupportedIterableToArray_unsupportedIterableToArray(o, minLen) {
1059
+ if (!o) return;
1060
+ if (typeof o === "string") return arrayLikeToArray_arrayLikeToArray(o, minLen);
1061
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1062
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1063
+ if (n === "Map" || n === "Set") return Array.from(o);
1064
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray_arrayLikeToArray(o, minLen);
1065
+ }
1066
+ ;// ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
1067
+ function _nonIterableSpread() {
1068
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1069
+ }
1070
+ ;// ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
125
1071
 
126
1072
 
127
- /* harmony default export */ const src_image = ((0,external_vue_namespaceObject.defineComponent)({
128
- name: 'Image',
129
- props: propsImage,
130
- emits: ['loaded', 'error', 'close', 'change'],
131
- setup: function setup(props, _ref) {
132
- var emit = _ref.emit,
133
- slots = _ref.slots;
134
- var loading = (0,external_vue_namespaceObject.ref)(true);
135
- var hasError = (0,external_vue_namespaceObject.ref)(true);
136
- var isShowViewer = (0,external_vue_namespaceObject.ref)(false);
137
- var prevOverflow = (0,external_vue_namespaceObject.ref)('');
138
- var imageSrc = (0,external_vue_namespaceObject.ref)('');
139
- function clickHandler() {}
140
- (0,external_vue_namespaceObject.watch)(function () {
141
- return props.src;
142
- }, function () {
143
- loadImage();
144
- });
145
- var preview = (0,external_vue_namespaceObject.computed)(function () {
146
- var _props$urlList;
147
- return (props === null || props === void 0 || (_props$urlList = props.urlList) === null || _props$urlList === void 0 ? void 0 : _props$urlList.length) > 0;
148
- });
149
- function closeViewer() {
150
- document.body.style.overflow = prevOverflow.value;
151
- isShowViewer.value = false;
152
- emit('close');
153
- }
154
- function change(val) {
155
- emit('change', val);
156
- }
157
- function loadImage() {
158
- loading.value = true;
159
- hasError.value = false;
160
- imageSrc.value = props.src;
1073
+
1074
+
1075
+ function _toConsumableArray(arr) {
1076
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || unsupportedIterableToArray_unsupportedIterableToArray(arr) || _nonIterableSpread();
1077
+ }
1078
+ ;// external "@popperjs/core"
1079
+ var core_x = (y) => {
1080
+ var x = {}; __webpack_require__.d(x, y); return x
1081
+ }
1082
+ var core_y = (x) => (() => (x))
1083
+ const core_namespaceObject = core_x({ ["createPopper"]: () => (__WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper) });
1084
+ ;// ../../packages/directives/src/tooltips.ts
1085
+
1086
+
1087
+
1088
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1089
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1090
+ /*
1091
+ * Tencent is pleased to support the open source community by making
1092
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1093
+ *
1094
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1095
+ *
1096
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1097
+ *
1098
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1099
+ *
1100
+ * ---------------------------------------------------
1101
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1102
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1103
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1104
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1105
+ *
1106
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1107
+ * the Software.
1108
+ *
1109
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1110
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1111
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1112
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1113
+ * IN THE SOFTWARE.
1114
+ */
1115
+
1116
+
1117
+
1118
+ var tooltips_nodeList = new WeakMap();
1119
+ var tooltips = {
1120
+ beforeMount: function beforeMount(el, binding) {
1121
+ var opts = getOpts(binding);
1122
+ var trigger = opts.trigger,
1123
+ showOnInit = opts.showOnInit;
1124
+ var popper = renderContent(opts);
1125
+ var delayTimeout = null;
1126
+ if (showOnInit) {
1127
+ (0,external_vue_namespaceObject.nextTick)(function () {
1128
+ show(el);
1129
+ });
161
1130
  }
162
- var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
163
- resolveClassName = _usePrefix.resolveClassName;
164
- return function () {
165
- function getContent() {
166
- if (loading.value) {
167
- return (0,external_vue_namespaceObject.createVNode)("div", {
168
- "class": "".concat(resolveClassName('image-placeholder'))
169
- }, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Spinner, null, null)]);
170
- }
171
- if (hasError.value) {
172
- if (slots.error) {
173
- if (typeof slots.error === 'function') {
174
- return slots.error();
175
- }
176
- return slots.error;
177
- }
178
- return (0,external_vue_namespaceObject.createVNode)("div", {
179
- "class": "".concat(resolveClassName('image-placeholder'))
180
- }, [props.fallback ? (0,external_vue_namespaceObject.createVNode)("img", {
181
- "alt": "\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF",
182
- "src": props.fallback
183
- }, null) : '', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("i", {
184
- "class": "".concat(resolveClassName('icon'), " icon-image-fail")
185
- }, null), [[(0,external_vue_namespaceObject.resolveDirective)("else")]])]);
1131
+ if (trigger === 'hover') {
1132
+ var hideTimeout = null;
1133
+ el.addEventListener('mouseenter', function () {
1134
+ delayTimeout = setTimeout(function () {
1135
+ show(el);
1136
+ clearTimeout(hideTimeout);
1137
+ clearTimeout(delayTimeout);
1138
+ }, opts.delay);
1139
+ });
1140
+ popper.addEventListener('mouseenter', function () {
1141
+ clearTimeout(hideTimeout);
1142
+ });
1143
+ el.addEventListener('mouseleave', function () {
1144
+ clearTimeout(delayTimeout);
1145
+ hideTimeout = setTimeout(function () {
1146
+ hide(el);
1147
+ }, 100);
1148
+ });
1149
+ el.addEventListener('click', function () {
1150
+ hide(el);
1151
+ });
1152
+ popper.addEventListener('mouseleave', function () {
1153
+ clearTimeout(delayTimeout);
1154
+ hideTimeout = setTimeout(function () {
1155
+ hide(el);
1156
+ }, 100);
1157
+ });
1158
+ } else if (trigger === 'click') {
1159
+ document.body.addEventListener('click', function (event) {
1160
+ if (el.contains(event.target) && !popper.hasAttribute('data-show')) {
1161
+ delayTimeout = setTimeout(function () {
1162
+ show(el);
1163
+ clearTimeout(delayTimeout);
1164
+ }, opts.delay);
1165
+ } else if (popper.hasAttribute('data-show')) {
1166
+ hide(el);
186
1167
  }
187
- return (0,external_vue_namespaceObject.createVNode)("img", {
188
- "src": props.src,
189
- "onClick": clickHandler
190
- }, null);
191
- }
192
- return (0,external_vue_namespaceObject.createVNode)("div", {
193
- "class": "".concat(resolveClassName('image'))
194
- }, [getContent(), preview.value && isShowViewer.value ? (0,external_vue_namespaceObject.createVNode)(image_viewer, {
195
- "is-show-title": props.isShowPreviewTitle,
196
- "maskClose": props.maskClose,
197
- "url-list": props.urlList,
198
- "zIndex": props.zIndex,
199
- "onChange": change,
200
- "onClose": closeViewer
201
- }, null) : '']);
202
- };
1168
+ });
1169
+ }
1170
+ tooltips_nodeList.set(el, {
1171
+ opts: opts,
1172
+ popper: popper,
1173
+ popperInstance: null
1174
+ });
1175
+ },
1176
+ updated: function updated(el, binding) {
1177
+ if (tooltips_nodeList.get(el)) {
1178
+ tooltips_nodeList.get(el).opts = getOpts(binding);
1179
+ }
1180
+ },
1181
+ unmounted: function unmounted(el) {
1182
+ hide(el);
1183
+ tooltips_nodeList["delete"](el);
203
1184
  }
204
- }));
205
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
206
- function _typeof(o) {
207
- "@babel/helpers - typeof";
208
-
209
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
210
- return typeof o;
211
- } : function (o) {
212
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
213
- }, _typeof(o);
1185
+ };
1186
+ /**
1187
+ * 初始化配置
1188
+ * @returns tooltips配置
1189
+ */
1190
+ function initOptions() {
1191
+ var defaultOpts = {
1192
+ arrow: true,
1193
+ disabled: false,
1194
+ trigger: 'hover',
1195
+ theme: 'dark',
1196
+ content: '',
1197
+ showOnInit: false,
1198
+ placement: 'top',
1199
+ distance: 8,
1200
+ extCls: '',
1201
+ sameWidth: false,
1202
+ delay: 0,
1203
+ onShow: function onShow() {},
1204
+ onHide: function onHide() {}
1205
+ };
1206
+ return defaultOpts;
214
1207
  }
215
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
216
-
217
- function toPrimitive(t, r) {
218
- if ("object" != _typeof(t) || !t) return t;
219
- var e = t[Symbol.toPrimitive];
220
- if (void 0 !== e) {
221
- var i = e.call(t, r || "default");
222
- if ("object" != _typeof(i)) return i;
223
- throw new TypeError("@@toPrimitive must return a primitive value.");
1208
+ /**
1209
+ * 获取配置
1210
+ * @returns tooltips配置
1211
+ */
1212
+ function getOpts(binding) {
1213
+ var opts = initOptions();
1214
+ if (_typeof(binding.value) === 'object') {
1215
+ Object.assign(opts, binding.value);
1216
+ } else {
1217
+ opts.content = binding.value;
224
1218
  }
225
- return ("string" === r ? String : Number)(t);
1219
+ return opts;
226
1220
  }
227
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
228
-
229
-
230
- function toPropertyKey(t) {
231
- var i = toPrimitive(t, "string");
232
- return "symbol" == _typeof(i) ? i : String(i);
1221
+ /**
1222
+ * 创建tooltips DOM
1223
+ * @param opts
1224
+ * @returns
1225
+ */
1226
+ function renderContext(value, content) {
1227
+ if (typeof value === 'string') {
1228
+ content.innerText = value;
1229
+ } else {
1230
+ // 如果 content 是 Vue 组件的实例,则挂载它
1231
+ var container = document.createElement('div');
1232
+ var vnode = (0,external_vue_namespaceObject.h)(value);
1233
+ (0,external_vue_namespaceObject.render)(vnode, container);
1234
+ content.innerHTML = container.innerHTML;
1235
+ }
233
1236
  }
234
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
235
-
236
- function _defineProperty(obj, key, value) {
237
- key = toPropertyKey(key);
238
- if (key in obj) {
239
- Object.defineProperty(obj, key, {
240
- value: value,
241
- enumerable: true,
242
- configurable: true,
243
- writable: true
1237
+ function renderContent(opts) {
1238
+ var value = opts.content,
1239
+ hasArrow = opts.arrow,
1240
+ theme = opts.theme,
1241
+ extCls = opts.extCls;
1242
+ var isLight = theme === 'light';
1243
+ var zIndex = shared_namespaceObject.bkZIndexManager.getPopperIndex();
1244
+ var content = document.createElement('div');
1245
+ var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1246
+ content.className = "".concat((0,shared_namespaceObject.resolveClassName)('popper', prefix), " ").concat(isLight ? 'light' : 'dark', " ").concat(extCls);
1247
+ content.innerText = value;
1248
+ content.style.zIndex = String(zIndex);
1249
+ renderContext(value, content);
1250
+ if (hasArrow) {
1251
+ var arrow = renderArrow();
1252
+ content.appendChild(arrow);
1253
+ }
1254
+ return content;
1255
+ }
1256
+ /**
1257
+ * 渲染箭头dom
1258
+ * @returns arrow DOM
1259
+ */
1260
+ function renderArrow() {
1261
+ var arrow = document.createElement('div');
1262
+ var prefix = document.documentElement.style.getPropertyValue('--bk-prefix') || 'bk';
1263
+ arrow.className = (0,shared_namespaceObject.resolveClassName)('popper-arrow', prefix);
1264
+ arrow.setAttribute('data-popper-arrow', '');
1265
+ return arrow;
1266
+ }
1267
+ /**
1268
+ * 创建popper实例
1269
+ * @param el
1270
+ * @param popper
1271
+ * @returns popper实例
1272
+ */
1273
+ function createPopperInstance(el, popper) {
1274
+ var _nodeList$get = tooltips_nodeList.get(el),
1275
+ opts = _nodeList$get.opts;
1276
+ var placement = opts.placement,
1277
+ distance = opts.distance,
1278
+ sameWidth = opts.sameWidth;
1279
+ var popperInstance = (0,core_namespaceObject.createPopper)(el, popper, {
1280
+ placement: placement,
1281
+ modifiers: [{
1282
+ name: 'offset',
1283
+ options: {
1284
+ offset: [0, distance]
1285
+ }
1286
+ }, {
1287
+ name: 'arrow',
1288
+ options: {
1289
+ padding: 5
1290
+ }
1291
+ }].concat(_toConsumableArray(sameWidth ? [{
1292
+ name: 'sameWidth',
1293
+ enabled: true,
1294
+ phase: 'beforeWrite',
1295
+ requires: ['computeStyles'],
1296
+ fn: function fn(_ref) {
1297
+ var state = _ref.state;
1298
+ state.styles.popper.width = "".concat(state.rects.reference.width, "px");
1299
+ },
1300
+ effect: function effect(_ref2) {
1301
+ var state = _ref2.state;
1302
+ state.elements.popper.style.overflowWrap = 'break-word';
1303
+ state.elements.popper.style.width = "".concat(state.elements.reference.offsetWidth, "px");
1304
+ }
1305
+ }] : []))
1306
+ });
1307
+ return popperInstance;
1308
+ }
1309
+ /**
1310
+ * 显示
1311
+ * @param el
1312
+ */
1313
+ function show(el) {
1314
+ var _nodeList$get2 = tooltips_nodeList.get(el),
1315
+ popper = _nodeList$get2.popper,
1316
+ opts = _nodeList$get2.opts;
1317
+ var disabled = opts.disabled,
1318
+ content = opts.content,
1319
+ hasArrow = opts.arrow,
1320
+ onShow = opts.onShow,
1321
+ boundary = opts.boundary,
1322
+ _opts$modifiers = opts.modifiers,
1323
+ modifiers = _opts$modifiers === void 0 ? [] : _opts$modifiers;
1324
+ if (disabled) return;
1325
+ renderContext(content, popper);
1326
+ if (hasArrow) {
1327
+ var arrow = renderArrow();
1328
+ popper.appendChild(arrow);
1329
+ }
1330
+ var container = document.body;
1331
+ if (boundary) {
1332
+ if (boundary === 'parent') {
1333
+ container = el.parentElement;
1334
+ } else if (boundary instanceof HTMLElement) {
1335
+ container = boundary;
1336
+ }
1337
+ }
1338
+ container.appendChild(popper);
1339
+ var popperInstance = createPopperInstance(el, popper);
1340
+ onShow();
1341
+ // Make the tooltip visible
1342
+ popper.setAttribute('data-show', '');
1343
+ // Enable the event listeners
1344
+ popperInstance.setOptions(function (options) {
1345
+ return _objectSpread(_objectSpread({}, options), {}, {
1346
+ modifiers: [].concat(_toConsumableArray(options.modifiers), _toConsumableArray(modifiers), [{
1347
+ name: 'eventListeners',
1348
+ enabled: true
1349
+ }])
244
1350
  });
245
- } else {
246
- obj[key] = value;
1351
+ });
1352
+ // Update its position
1353
+ popperInstance.forceUpdate();
1354
+ tooltips_nodeList.get(el).popperInstance = popperInstance;
1355
+ }
1356
+ /**
1357
+ * 隐藏
1358
+ * @param el
1359
+ */
1360
+ function hide(el) {
1361
+ if (!tooltips_nodeList.get(el)) return;
1362
+ var _nodeList$get3 = tooltips_nodeList.get(el),
1363
+ popper = _nodeList$get3.popper,
1364
+ popperInstance = _nodeList$get3.popperInstance,
1365
+ opts = _nodeList$get3.opts;
1366
+ var onHide = opts.onHide;
1367
+ if (popper && document.body.contains(popper)) {
1368
+ var _popper$parentNode;
1369
+ popper.removeAttribute('data-show');
1370
+ popperInstance === null || popperInstance === void 0 || popperInstance.destroy();
1371
+ popper === null || popper === void 0 || (_popper$parentNode = popper.parentNode) === null || _popper$parentNode === void 0 || _popper$parentNode.removeChild(popper);
1372
+ onHide();
247
1373
  }
248
- return obj;
249
1374
  }
250
- ;// CONCATENATED MODULE: external "../directives"
251
- var directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
252
- var directives_y = x => () => x
253
- const directives_namespaceObject = directives_x({ ["bkTooltips"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__.bkTooltips });
254
- ;// CONCATENATED MODULE: external "lodash/throttle"
255
- var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
256
- var throttle_y = x => () => x
257
- const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
258
- ;// CONCATENATED MODULE: ../../packages/image/src/image-viewer.tsx
1375
+ /* harmony default export */ const src_tooltips = (tooltips);
1376
+ ;// external "../loading"
1377
+ var external_loading_x = (y) => {
1378
+ var x = {}; __webpack_require__.d(x, y); return x
1379
+ }
1380
+ var external_loading_y = (x) => (() => (x))
1381
+ const external_loading_namespaceObject = external_loading_x({ });
1382
+ ;// external "../overflow-title"
1383
+ var external_overflow_title_x = (y) => {
1384
+ var x = {}; __webpack_require__.d(x, y); return x
1385
+ }
1386
+ var external_overflow_title_y = (x) => (() => (x))
1387
+ const external_overflow_title_namespaceObject = external_overflow_title_x({ });
1388
+ ;// ../../packages/directives/src/index.ts
1389
+ /*
1390
+ * Tencent is pleased to support the open source community by making
1391
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1392
+ *
1393
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1394
+ *
1395
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1396
+ *
1397
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1398
+ *
1399
+ * ---------------------------------------------------
1400
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1401
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1402
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1403
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1404
+ *
1405
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1406
+ * the Software.
1407
+ *
1408
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1409
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1410
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1411
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1412
+ * IN THE SOFTWARE.
1413
+ */
259
1414
 
260
1415
 
261
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
262
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1416
+
1417
+
1418
+
1419
+
1420
+ // export { createInstance as bkEllipsisInstance } from './ellipsis';
1421
+ ;// external "lodash/throttle"
1422
+ var throttle_x = (y) => {
1423
+ var x = {}; __webpack_require__.d(x, y); return x
1424
+ }
1425
+ var throttle_y = (x) => (() => (x))
1426
+ const throttle_namespaceObject = throttle_x({ ["default"]: () => (__WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"]) });
1427
+ ;// external "vue-types"
1428
+ var external_vue_types_x = (y) => {
1429
+ var x = {}; __webpack_require__.d(x, y); return x
1430
+ }
1431
+ var external_vue_types_y = (x) => (() => (x))
1432
+ const external_vue_types_namespaceObject = external_vue_types_x({ ["toType"]: () => (__WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.toType) });
1433
+ ;// ../../packages/image/src/props.ts
1434
+
1435
+
1436
+ var FitEnum;
1437
+ (function (FitEnum) {
1438
+ FitEnum["CONTAIN"] = "contain";
1439
+ FitEnum["COVER"] = "cover";
1440
+ FitEnum["FILL"] = "fill";
1441
+ FitEnum["NONE"] = "none";
1442
+ FitEnum["SCALE_DOWN"] = "scale-down";
1443
+ })(FitEnum || (FitEnum = {}));
1444
+ var propsImage = {
1445
+ src: shared_namespaceObject.PropTypes.string.def(''),
1446
+ fallback: shared_namespaceObject.PropTypes.string.def(''),
1447
+ placeholder: shared_namespaceObject.PropTypes.any,
1448
+ fit: (0,external_vue_types_namespaceObject.toType)('fit', {}).def(FitEnum.FILL),
1449
+ lazy: shared_namespaceObject.PropTypes.bool,
1450
+ urlList: shared_namespaceObject.PropTypes.array.def([]),
1451
+ isShowPreviewTitle: shared_namespaceObject.PropTypes.bool.def(true),
1452
+ maskClose: shared_namespaceObject.PropTypes.bool.def(true),
1453
+ zIndex: shared_namespaceObject.PropTypes.number.def(2000)
1454
+ };
1455
+ var propsImageViever = {
1456
+ urlList: {
1457
+ type: Array,
1458
+ "default": function _default() {
1459
+ return [];
1460
+ }
1461
+ },
1462
+ zIndex: shared_namespaceObject.PropTypes.number.def(2000),
1463
+ initialIndex: shared_namespaceObject.PropTypes.number.def(0),
1464
+ isShowTitle: shared_namespaceObject.PropTypes.bool.def(true),
1465
+ loops: shared_namespaceObject.PropTypes.bool.def(true),
1466
+ maskClose: shared_namespaceObject.PropTypes.bool.def(true)
1467
+ };
1468
+ ;// ../../packages/image/src/image-viewer.tsx
1469
+
1470
+
1471
+ function image_viewer_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1472
+ function image_viewer_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? image_viewer_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : image_viewer_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
263
1473
  /*
264
1474
  * Tencent is pleased to support the open source community by making
265
1475
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
@@ -295,7 +1505,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
295
1505
  /* harmony default export */ const image_viewer = ((0,external_vue_namespaceObject.defineComponent)({
296
1506
  name: 'ImageViewer',
297
1507
  directives: {
298
- bkTooltips: directives_namespaceObject.bkTooltips
1508
+ bkTooltips: src_tooltips
299
1509
  },
300
1510
  props: propsImageViever,
301
1511
  emits: ['close', 'change'],
@@ -462,7 +1672,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
462
1672
  function handleActions(action) {
463
1673
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
464
1674
  if (loading.value) return;
465
- var _zoomRate$rotateDeg$e = _objectSpread({
1675
+ var _zoomRate$rotateDeg$e = image_viewer_objectSpread({
466
1676
  zoomRate: 0.2,
467
1677
  rotateDeg: 90,
468
1678
  enableTransition: true
@@ -508,7 +1718,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
508
1718
  var startX = e.pageX;
509
1719
  var startY = e.pageY;
510
1720
  var mousemove = (0,throttle_namespaceObject["default"])(function (ev) {
511
- transform.value = _objectSpread(_objectSpread({}, transform.value), {}, {
1721
+ transform.value = image_viewer_objectSpread(image_viewer_objectSpread({}, transform.value), {}, {
512
1722
  offsetX: offsetX + ev.pageX - startX,
513
1723
  offsetY: offsetY + ev.pageY - startY
514
1724
  });
@@ -606,7 +1816,117 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
606
1816
  };
607
1817
  }
608
1818
  }));
609
- ;// CONCATENATED MODULE: ../../packages/image/src/index.ts
1819
+ ;// ../../packages/image/src/image.tsx
1820
+
1821
+ /*
1822
+ * Tencent is pleased to support the open source community by making
1823
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1824
+ *
1825
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1826
+ *
1827
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1828
+ *
1829
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1830
+ *
1831
+ * ---------------------------------------------------
1832
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1833
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1834
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1835
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1836
+ *
1837
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1838
+ * the Software.
1839
+ *
1840
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1841
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1842
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1843
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1844
+ * IN THE SOFTWARE.
1845
+ */
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+ /* harmony default export */ const src_image = ((0,external_vue_namespaceObject.defineComponent)({
1852
+ name: 'Image',
1853
+ props: propsImage,
1854
+ emits: ['loaded', 'error', 'close', 'change'],
1855
+ setup: function setup(props, _ref) {
1856
+ var emit = _ref.emit,
1857
+ slots = _ref.slots;
1858
+ var loading = (0,external_vue_namespaceObject.ref)(true);
1859
+ var hasError = (0,external_vue_namespaceObject.ref)(true);
1860
+ var isShowViewer = (0,external_vue_namespaceObject.ref)(false);
1861
+ var prevOverflow = (0,external_vue_namespaceObject.ref)('');
1862
+ var imageSrc = (0,external_vue_namespaceObject.ref)('');
1863
+ function clickHandler() {}
1864
+ (0,external_vue_namespaceObject.watch)(function () {
1865
+ return props.src;
1866
+ }, function () {
1867
+ loadImage();
1868
+ });
1869
+ var preview = (0,external_vue_namespaceObject.computed)(function () {
1870
+ var _props$urlList;
1871
+ return (props === null || props === void 0 || (_props$urlList = props.urlList) === null || _props$urlList === void 0 ? void 0 : _props$urlList.length) > 0;
1872
+ });
1873
+ function closeViewer() {
1874
+ document.body.style.overflow = prevOverflow.value;
1875
+ isShowViewer.value = false;
1876
+ emit('close');
1877
+ }
1878
+ function change(val) {
1879
+ emit('change', val);
1880
+ }
1881
+ function loadImage() {
1882
+ loading.value = true;
1883
+ hasError.value = false;
1884
+ imageSrc.value = props.src;
1885
+ }
1886
+ var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
1887
+ resolveClassName = _usePrefix.resolveClassName;
1888
+ return function () {
1889
+ function getContent() {
1890
+ if (loading.value) {
1891
+ return (0,external_vue_namespaceObject.createVNode)("div", {
1892
+ "class": "".concat(resolveClassName('image-placeholder'))
1893
+ }, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Spinner, null, null)]);
1894
+ }
1895
+ if (hasError.value) {
1896
+ if (slots.error) {
1897
+ if (typeof slots.error === 'function') {
1898
+ return slots.error();
1899
+ }
1900
+ return slots.error;
1901
+ }
1902
+ return (0,external_vue_namespaceObject.createVNode)("div", {
1903
+ "class": "".concat(resolveClassName('image-placeholder'))
1904
+ }, [props.fallback ? (0,external_vue_namespaceObject.createVNode)("img", {
1905
+ "alt": "\u56FE\u7247\u52A0\u8F7D\u9519\u8BEF",
1906
+ "src": props.fallback
1907
+ }, null) : '', (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("i", {
1908
+ "class": "".concat(resolveClassName('icon'), " icon-image-fail")
1909
+ }, null), [[(0,external_vue_namespaceObject.resolveDirective)("else")]])]);
1910
+ }
1911
+ return (0,external_vue_namespaceObject.createVNode)("img", {
1912
+ "src": props.src,
1913
+ "onClick": clickHandler
1914
+ }, null);
1915
+ }
1916
+ return (0,external_vue_namespaceObject.createVNode)("div", {
1917
+ "class": "".concat(resolveClassName('image'))
1918
+ }, [getContent(), preview.value && isShowViewer.value ? (0,external_vue_namespaceObject.createVNode)(image_viewer, {
1919
+ "is-show-title": props.isShowPreviewTitle,
1920
+ "maskClose": props.maskClose,
1921
+ "url-list": props.urlList,
1922
+ "zIndex": props.zIndex,
1923
+ "onChange": change,
1924
+ "onClose": closeViewer
1925
+ }, null) : '']);
1926
+ };
1927
+ }
1928
+ }));
1929
+ ;// ../../packages/image/src/index.ts
610
1930
  /*
611
1931
  * Tencent is pleased to support the open source community by making
612
1932
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.