bkui-vue 0.0.2-beta.99 → 0.0.2-modal-refactor.2

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 (303) hide show
  1. package/dist/index.cjs.js +47 -47
  2. package/dist/index.esm.js +12587 -12621
  3. package/dist/index.umd.js +34 -34
  4. package/dist/locale/en.esm.js +1 -1
  5. package/dist/locale/en.esm.js.map +1 -1
  6. package/dist/locale/en.umd.js +1 -1
  7. package/dist/locale/en.umd.js.map +1 -1
  8. package/dist/locale/zh-cn.esm.js +1 -1
  9. package/dist/locale/zh-cn.esm.js.map +1 -1
  10. package/dist/locale/zh-cn.umd.js +1 -1
  11. package/dist/locale/zh-cn.umd.js.map +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/style.variable.css +1 -1
  14. package/lib/affix/affix.css +0 -122
  15. package/lib/affix/affix.variable.css +5 -245
  16. package/lib/alert/alert.css +3 -125
  17. package/lib/alert/alert.variable.css +5 -245
  18. package/lib/backtop/backtop.css +3 -125
  19. package/lib/backtop/backtop.variable.css +8 -370
  20. package/lib/badge/badge.css +34 -150
  21. package/lib/badge/badge.less +8 -4
  22. package/lib/badge/badge.variable.css +13 -247
  23. package/lib/breadcrumb/breadcrumb.css +5 -127
  24. package/lib/breadcrumb/breadcrumb.variable.css +10 -372
  25. package/lib/button/button-group.d.ts +2 -2
  26. package/lib/button/button.css +137 -256
  27. package/lib/button/button.d.ts +1 -1
  28. package/lib/button/button.less +98 -93
  29. package/lib/button/button.variable.css +23 -260
  30. package/lib/button/index.d.ts +5 -5
  31. package/lib/card/card.css +11 -133
  32. package/lib/card/card.less +7 -7
  33. package/lib/card/card.variable.css +16 -378
  34. package/lib/cascader/cascader-panel.d.ts +1 -0
  35. package/lib/cascader/cascader.css +26 -148
  36. package/lib/cascader/cascader.d.ts +1 -0
  37. package/lib/cascader/cascader.less +4 -6
  38. package/lib/cascader/cascader.variable.css +31 -393
  39. package/lib/cascader/index.d.ts +4 -0
  40. package/lib/cascader/index.js +31 -14
  41. package/lib/checkbox/checkbox.css +22 -132
  42. package/lib/checkbox/checkbox.d.ts +9 -8
  43. package/lib/checkbox/checkbox.less +15 -1
  44. package/lib/checkbox/checkbox.variable.css +18 -246
  45. package/lib/checkbox/common.d.ts +1 -0
  46. package/lib/checkbox/index.d.ts +15 -12
  47. package/lib/checkbox/index.js +33 -9
  48. package/lib/code-diff/code-diff.css +0 -122
  49. package/lib/code-diff/code-diff.variable.css +5 -245
  50. package/lib/collapse/collapse.css +1 -123
  51. package/lib/collapse/collapse.variable.css +5 -245
  52. package/lib/collapse-transition/collapse-transition.css +0 -122
  53. package/lib/collapse-transition/collapse-transition.variable.css +5 -245
  54. package/lib/color-picker/color-picker.css +0 -122
  55. package/lib/color-picker/color-picker.variable.css +5 -245
  56. package/lib/config-provider/config-provider.css +0 -122
  57. package/lib/config-provider/config-provider.d.ts +18 -0
  58. package/lib/config-provider/config-provider.variable.css +5 -245
  59. package/lib/config-provider/index.d.ts +24 -0
  60. package/lib/config-provider/token.d.ts +6 -0
  61. package/lib/container/container.css +0 -122
  62. package/lib/container/container.variable.css +5 -367
  63. package/lib/date-picker/common.d.ts +2 -0
  64. package/lib/date-picker/date-picker.css +17 -139
  65. package/lib/date-picker/date-picker.d.ts +2 -0
  66. package/lib/date-picker/date-picker.variable.css +5 -245
  67. package/lib/date-picker/index.d.ts +6 -0
  68. package/lib/date-picker/index.js +184 -110
  69. package/lib/date-picker/panel/date.d.ts +2 -2
  70. package/lib/date-picker/panel/time-range.d.ts +17 -0
  71. package/lib/date-picker/panel/time.d.ts +17 -1
  72. package/lib/date-picker/time-picker.d.ts +2 -0
  73. package/lib/date-picker/use-calendar.d.ts +24 -0
  74. package/lib/dialog/dialog.css +76 -172
  75. package/lib/dialog/dialog.d.ts +18 -9
  76. package/lib/dialog/dialog.less +9 -8
  77. package/lib/dialog/dialog.variable.css +81 -417
  78. package/lib/dialog/index.d.ts +34 -18
  79. package/lib/dialog/index.js +4 -7
  80. package/lib/dialog/props.d.ts +7 -3
  81. package/lib/directives/index.js +15 -4
  82. package/lib/divider/divider.css +3 -125
  83. package/lib/divider/divider.variable.css +5 -245
  84. package/lib/dropdown/dropdown.css +1 -123
  85. package/lib/dropdown/dropdown.variable.css +6 -368
  86. package/lib/dropdown/index.js +2 -2
  87. package/lib/exception/exception.css +0 -122
  88. package/lib/exception/exception.variable.css +5 -245
  89. package/lib/fixed-navbar/fixed-navbar.css +4 -126
  90. package/lib/fixed-navbar/fixed-navbar.variable.css +5 -245
  91. package/lib/form/form.css +2 -123
  92. package/lib/form/form.less +3 -2
  93. package/lib/form/form.variable.css +7 -246
  94. package/lib/icon/index.d.ts +1 -0
  95. package/lib/icon/index.js +58 -25
  96. package/lib/icon/loading.d.ts +4 -0
  97. package/lib/icon/loading.js +276 -0
  98. package/lib/image/image-viewer.css +0 -122
  99. package/lib/image/image-viewer.variable.css +5 -245
  100. package/lib/image/image.css +0 -122
  101. package/lib/image/image.variable.css +5 -367
  102. package/lib/info-box/index.js +28 -20
  103. package/lib/info-box/info-box.css +10 -132
  104. package/lib/info-box/info-box.less +37 -34
  105. package/lib/info-box/info-box.variable.css +15 -255
  106. package/lib/input/index.d.ts +4 -4
  107. package/lib/input/index.js +12 -5
  108. package/lib/input/input.css +84 -190
  109. package/lib/input/input.d.ts +3 -3
  110. package/lib/input/input.less +19 -0
  111. package/lib/input/input.variable.css +89 -435
  112. package/lib/link/link.css +16 -138
  113. package/lib/link/link.variable.css +5 -245
  114. package/lib/loading/index.d.ts +3 -3
  115. package/lib/loading/loading.css +25 -147
  116. package/lib/loading/loading.d.ts +1 -1
  117. package/lib/loading/loading.less +14 -9
  118. package/lib/loading/loading.variable.css +30 -392
  119. package/lib/locale/index.js +14 -2
  120. package/lib/locale/lang/en.d.ts +6 -0
  121. package/lib/menu/menu.css +18 -140
  122. package/lib/menu/menu.variable.css +23 -385
  123. package/lib/menu/submenu.css +0 -122
  124. package/lib/menu/submenu.variable.css +5 -245
  125. package/lib/message/message.css +21 -143
  126. package/lib/message/message.variable.css +5 -245
  127. package/lib/modal/index.d.ts +103 -60
  128. package/lib/modal/index.js +131 -103
  129. package/lib/modal/modal.css +35 -132
  130. package/lib/modal/modal.d.ts +38 -20
  131. package/lib/modal/modal.less +33 -0
  132. package/lib/modal/modal.variable.css +40 -377
  133. package/lib/modal/props.mixin.d.ts +7 -3
  134. package/lib/navigation/navigation.css +2 -124
  135. package/lib/navigation/navigation.variable.css +5 -245
  136. package/lib/notify/notify.css +13 -135
  137. package/lib/notify/notify.less +6 -6
  138. package/lib/notify/notify.variable.css +11 -251
  139. package/lib/overflow-title/components/overflow-title.d.ts +0 -1
  140. package/lib/overflow-title/index.js +2 -178
  141. package/lib/pagination/index.d.ts +4 -4
  142. package/lib/pagination/pagination.css +2 -123
  143. package/lib/pagination/pagination.d.ts +3 -3
  144. package/lib/pagination/pagination.less +1 -0
  145. package/lib/pagination/pagination.variable.css +6 -245
  146. package/lib/plugin-popover/index.js +31 -103
  147. package/lib/pop-confirm/index.d.ts +42 -3
  148. package/lib/pop-confirm/index.js +55 -47
  149. package/lib/pop-confirm/pop-confirm.css +4 -126
  150. package/lib/pop-confirm/pop-confirm.d.ts +14 -1
  151. package/lib/pop-confirm/pop-confirm.less +4 -4
  152. package/lib/pop-confirm/pop-confirm.variable.css +9 -249
  153. package/lib/popover/index.js +31 -103
  154. package/lib/popover/popover.css +1 -123
  155. package/lib/popover/popover.less +1 -1
  156. package/lib/popover/popover.variable.css +6 -246
  157. package/lib/preset.d.ts +12 -0
  158. package/lib/process/process.css +13 -135
  159. package/lib/process/process.variable.css +5 -245
  160. package/lib/progress/index.d.ts +4 -4
  161. package/lib/progress/progress.css +11 -129
  162. package/lib/progress/progress.d.ts +3 -3
  163. package/lib/progress/progress.less +8 -3
  164. package/lib/progress/progress.variable.css +16 -374
  165. package/lib/radio/common.d.ts +1 -0
  166. package/lib/radio/index.d.ts +8 -2
  167. package/lib/radio/index.js +11 -3
  168. package/lib/radio/radio-button.d.ts +4 -3
  169. package/lib/radio/radio-group.d.ts +3 -0
  170. package/lib/radio/radio.css +49 -157
  171. package/lib/radio/radio.d.ts +1 -0
  172. package/lib/radio/radio.less +42 -8
  173. package/lib/radio/radio.variable.css +25 -251
  174. package/lib/rate/index.d.ts +4 -4
  175. package/lib/rate/index.js +22 -6
  176. package/lib/rate/rate.css +0 -122
  177. package/lib/rate/rate.d.ts +2 -2
  178. package/lib/rate/rate.variable.css +5 -245
  179. package/lib/rate/star.css +3 -122
  180. package/lib/rate/star.less +3 -0
  181. package/lib/rate/star.variable.css +8 -245
  182. package/lib/resize-layout/index.d.ts +3 -3
  183. package/lib/resize-layout/resize-layout.css +2 -124
  184. package/lib/resize-layout/resize-layout.d.ts +1 -1
  185. package/lib/resize-layout/resize-layout.less +2 -2
  186. package/lib/resize-layout/resize-layout.variable.css +7 -247
  187. package/lib/search-select/index.js +6 -6
  188. package/lib/search-select/search-select.css +34 -156
  189. package/lib/search-select/search-select.less +9 -9
  190. package/lib/search-select/search-select.variable.css +39 -401
  191. package/lib/select/common.d.ts +3 -1
  192. package/lib/select/index.d.ts +92 -21
  193. package/lib/select/index.js +193 -63
  194. package/lib/select/option.d.ts +1 -0
  195. package/lib/select/select.css +27 -146
  196. package/lib/select/select.d.ts +38 -9
  197. package/lib/select/select.less +3 -0
  198. package/lib/select/select.variable.css +32 -391
  199. package/lib/select/selectTagInput.d.ts +2 -0
  200. package/lib/select/type.d.ts +3 -0
  201. package/lib/shared/index.d.ts +1 -2
  202. package/lib/shared/index.js +484 -1133
  203. package/lib/shared/mask.d.ts +11 -0
  204. package/lib/shared/vue-types.d.ts +1 -1
  205. package/lib/sideslider/index.d.ts +34 -18
  206. package/lib/sideslider/index.js +0 -11
  207. package/lib/sideslider/sideslider.css +12 -134
  208. package/lib/sideslider/sideslider.d.ts +18 -9
  209. package/lib/sideslider/sideslider.less +80 -77
  210. package/lib/sideslider/sideslider.variable.css +16 -256
  211. package/lib/slider/index.js +7 -1
  212. package/lib/slider/slider.css +6 -126
  213. package/lib/slider/slider.less +2 -0
  214. package/lib/slider/slider.variable.css +7 -245
  215. package/lib/steps/index.d.ts +4 -4
  216. package/lib/steps/index.js +1 -1
  217. package/lib/steps/steps.css +53 -163
  218. package/lib/steps/steps.d.ts +3 -3
  219. package/lib/steps/steps.less +26 -5
  220. package/lib/steps/steps.variable.css +23 -251
  221. package/lib/styles/index.d.ts +1 -0
  222. package/lib/styles/mixins/animate.css +0 -122
  223. package/lib/styles/mixins/animate.variable.css +5 -245
  224. package/lib/styles/mixins/mixins.css +0 -122
  225. package/lib/styles/mixins/mixins.variable.css +0 -122
  226. package/lib/styles/mixins/popper.css +0 -122
  227. package/lib/styles/mixins/popper.variable.css +5 -245
  228. package/lib/styles/mixins/scroll.css +0 -122
  229. package/lib/styles/mixins/scroll.variable.css +5 -245
  230. package/lib/styles/reset.css +0 -122
  231. package/lib/styles/reset.variable.css +5 -245
  232. package/lib/styles/themes/themes.less +124 -289
  233. package/lib/swiper/swiper.css +0 -122
  234. package/lib/swiper/swiper.variable.css +5 -245
  235. package/lib/switcher/index.d.ts +4 -4
  236. package/lib/switcher/switcher.css +17 -139
  237. package/lib/switcher/switcher.d.ts +3 -3
  238. package/lib/switcher/switcher.variable.css +22 -384
  239. package/lib/tab/tab.css +17 -139
  240. package/lib/tab/tab.variable.css +5 -245
  241. package/lib/table/components/table-column.d.ts +5 -4
  242. package/lib/table/index.d.ts +8 -7
  243. package/lib/table/index.js +877 -630
  244. package/lib/table/plugins/body-empty.d.ts +1 -1
  245. package/lib/table/plugins/head-filter.css +1 -150
  246. package/lib/table/plugins/head-filter.less +2 -34
  247. package/lib/table/plugins/head-filter.variable.css +6 -273
  248. package/lib/table/plugins/head-sort.css +0 -122
  249. package/lib/table/plugins/head-sort.variable.css +5 -245
  250. package/lib/table/plugins/settings.css +0 -122
  251. package/lib/table/plugins/settings.d.ts +0 -7
  252. package/lib/table/plugins/settings.variable.css +5 -245
  253. package/lib/table/plugins/use-head-cell.d.ts +7 -0
  254. package/lib/table/plugins/use-pagination.d.ts +2 -1
  255. package/lib/table/props.d.ts +3 -1
  256. package/lib/table/table.css +207 -337
  257. package/lib/table/table.d.ts +1 -1
  258. package/lib/table/table.less +27 -21
  259. package/lib/table/table.variable.css +212 -582
  260. package/lib/table/use-attributes.d.ts +5 -1
  261. package/lib/table/use-column.d.ts +3 -0
  262. package/lib/table/use-common.d.ts +0 -1
  263. package/lib/table/utils.d.ts +6 -4
  264. package/lib/table-column/index.d.ts +13 -10
  265. package/lib/tag/tag.css +5 -127
  266. package/lib/tag/tag.variable.css +5 -245
  267. package/lib/tag-input/index.js +17 -13
  268. package/lib/tag-input/list-tag-render.d.ts +11 -0
  269. package/lib/tag-input/tag-input.css +18 -140
  270. package/lib/tag-input/tag-input.d.ts +14 -2
  271. package/lib/tag-input/tag-input.variable.css +5 -245
  272. package/lib/time-picker/index.d.ts +6 -0
  273. package/lib/time-picker/time-picker.css +4 -125
  274. package/lib/time-picker/time-picker.less +5 -9
  275. package/lib/time-picker/time-picker.variable.css +9 -248
  276. package/lib/timeline/timeline.css +19 -141
  277. package/lib/timeline/timeline.variable.css +5 -245
  278. package/lib/transfer/transfer.css +21 -143
  279. package/lib/transfer/transfer.less +2 -2
  280. package/lib/transfer/transfer.variable.css +7 -247
  281. package/lib/tree/index.d.ts +3 -3
  282. package/lib/tree/index.js +54 -8
  283. package/lib/tree/tree.css +22 -132
  284. package/lib/tree/tree.d.ts +5 -1
  285. package/lib/tree/tree.variable.css +27 -377
  286. package/lib/tree/use-empty.d.ts +1 -3
  287. package/lib/upload/index.js +2 -2
  288. package/lib/upload/upload.css +27 -149
  289. package/lib/upload/upload.variable.css +32 -394
  290. package/lib/virtual-render/index.js +71 -30
  291. package/lib/virtual-render/use-fix-top.d.ts +18 -0
  292. package/lib/virtual-render/v-virtual-render.d.ts +5 -0
  293. package/lib/virtual-render/virtual-render.css +0 -122
  294. package/lib/virtual-render/virtual-render.variable.css +5 -367
  295. package/package.json +4 -3
  296. package/lib/shared/mask-manager.d.ts +0 -89
  297. package/lib/shared/pop-manager.d.ts +0 -41
  298. package/lib/styles/themes/themes.css +0 -122
  299. package/lib/styles/themes/themes.variable.css +0 -122
  300. package/lib/table/render.d.ts +0 -130
  301. /package/lib/overflow-title/{overflow.css → overflow-title.css} +0 -0
  302. /package/lib/overflow-title/{overflow.less → overflow-title.less} +0 -0
  303. /package/lib/overflow-title/{overflow.variable.css → overflow-title.variable.css} +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
2
- import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
3
2
  import * as __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__ from "@popperjs/core";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__ from "lodash/throttle";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
5
5
  /******/ // The require scope
6
6
  /******/ var __webpack_require__ = {};
@@ -31,9 +31,7 @@ __webpack_require__.d(__webpack_exports__, {
31
31
  oY: () => (/* reexport */ AlignEnum),
32
32
  p3: () => (/* reexport */ BKLAYERD_INDEX_EFAULT_VALUE),
33
33
  Ql: () => (/* reexport */ BKLAYERTYPE),
34
- Eo: () => (/* reexport */ BKPopIndexManager),
35
34
  mZ: () => (/* reexport */ BKPopover),
36
- Wg: () => (/* reexport */ BkMaskManager),
37
35
  _D: () => (/* reexport */ DialogTypeEnum),
38
36
  dq: () => (/* reexport */ DirectionEnum),
39
37
  kT: () => (/* binding */ EMPTY_OBJ),
@@ -60,8 +58,6 @@ __webpack_require__.d(__webpack_exports__, {
60
58
  os: () => (/* reexport */ TriggerEnum),
61
59
  WW: () => (/* reexport */ alignType),
62
60
  h6: () => (/* binding */ arrayEqual),
63
- Lx: () => (/* reexport */ bKMaskManager),
64
- aR: () => (/* reexport */ bkPopIndexManager),
65
61
  ue: () => (/* reexport */ bkZIndexManager),
66
62
  kC: () => (/* reexport */ capitalize),
67
63
  ao: () => (/* reexport */ checkOverflow),
@@ -85,6 +81,7 @@ __webpack_require__.d(__webpack_exports__, {
85
81
  sS: () => (/* reexport */ isNullOrUndef),
86
82
  Kn: () => (/* reexport */ isObject),
87
83
  zW: () => (/* reexport */ lineStyleType),
84
+ Ax: () => (/* reexport */ mask),
88
85
  oq: () => (/* reexport */ maybeShowTooltip),
89
86
  TS: () => (/* reexport */ merge),
90
87
  NG: () => (/* reexport */ mergeIf),
@@ -548,6 +545,43 @@ var useForm = function useForm() {
548
545
  var useFormItem = function useFormItem() {
549
546
  return (0,external_vue_namespaceObject.inject)(formItemKey, undefined);
550
547
  };
548
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
549
+ function _arrayLikeToArray(arr, len) {
550
+ if (len == null || len > arr.length) len = arr.length;
551
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
552
+ return arr2;
553
+ }
554
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
555
+
556
+ function _arrayWithoutHoles(arr) {
557
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
558
+ }
559
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
560
+ function _iterableToArray(iter) {
561
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
562
+ }
563
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
564
+
565
+ function _unsupportedIterableToArray(o, minLen) {
566
+ if (!o) return;
567
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
568
+ var n = Object.prototype.toString.call(o).slice(8, -1);
569
+ if (n === "Object" && o.constructor) n = o.constructor.name;
570
+ if (n === "Map" || n === "Set") return Array.from(o);
571
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
572
+ }
573
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
574
+ function _nonIterableSpread() {
575
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
576
+ }
577
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
578
+
579
+
580
+
581
+
582
+ function _toConsumableArray(arr) {
583
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
584
+ }
551
585
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
552
586
  function _classCallCheck(instance, Constructor) {
553
587
  if (!(instance instanceof Constructor)) {
@@ -608,1093 +642,105 @@ function _defineProperty(obj, key, value) {
608
642
  }
609
643
  return obj;
610
644
  }
611
- ;// CONCATENATED MODULE: external "lodash/throttle"
612
- var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
613
- var throttle_y = x => () => x
614
- const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
615
- ;// CONCATENATED MODULE: ../../packages/shared/src/utils.ts
616
- /*
617
- * Tencent is pleased to support the open source community by making
618
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
619
- *
620
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
621
- *
622
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
623
- *
624
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
625
- *
626
- * ---------------------------------------------------
627
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
628
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
629
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
630
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
631
- *
632
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
633
- * the Software.
634
- *
635
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
636
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
637
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
638
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
639
- * IN THE SOFTWARE.
640
- */
645
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
646
+ const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
647
+ /* harmony default export */ const esm_browser_native = ({
648
+ randomUUID
649
+ });
650
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
651
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
652
+ // require the crypto API and do not support built-in fallback to lower quality random number
653
+ // generators (like Math.random()).
654
+ let getRandomValues;
655
+ const rnds8 = new Uint8Array(16);
656
+ function rng() {
657
+ // lazy load so that environments that need to polyfill have a chance to do so
658
+ if (!getRandomValues) {
659
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
660
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
641
661
 
642
- var lowerStr = 'abcdefghijklmnopqrstuvwxyz0123456789';
643
- /**
644
- * 生成n位长度的字符串
645
- * @param {Number} n
646
- * @param str,默认26位字母及数字
647
- */
648
- var random = function random(n) {
649
- var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : lowerStr;
650
- var result = '';
651
- for (var i = 0; i < n; i++) {
652
- result += str[parseInt((Math.random() * str.length).toString(), 10)];
653
- }
654
- return result;
655
- };
656
- /**
657
- * 监听目标元素的Resize事件
658
- * @param root 目标元素
659
- * @param callbackFn 执行函数
660
- * @param delay 延迟执行时间,默认 60
661
- * @param immediate 是否立即执行回调函数
662
- * @returns "{ start: () => void, stop: () => void }"
663
- */
664
- var observerResize = function observerResize(root, callbackFn) {
665
- var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
666
- var immediate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
667
- var callFn = (0,throttle_namespaceObject["default"])(function () {
668
- if (typeof callbackFn === 'function') {
669
- callbackFn();
670
- }
671
- }, delay);
672
- var resizeObserver = new ResizeObserver(function () {
673
- callFn();
674
- });
675
- if (immediate) {
676
- if (typeof callbackFn === 'function') {
677
- callbackFn();
662
+ if (!getRandomValues) {
663
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
678
664
  }
679
665
  }
680
- return {
681
- start: function start() {
682
- resizeObserver.observe(root);
683
- },
684
- stop: function stop() {
685
- resizeObserver.disconnect();
686
- resizeObserver.unobserve(root);
687
- }
688
- };
689
- };
690
- var capitalize = function capitalize(str) {
691
- return str[0].toUpperCase() + str.slice(1);
692
- };
666
+
667
+ return getRandomValues(rnds8);
668
+ }
669
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
670
+
693
671
  /**
694
- * 判断元素是否溢出容器
695
- * @param {*} el
696
- * @returns
672
+ * Convert array of 16 byte values to UUID string format of the form:
673
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
697
674
  */
698
- function checkOverflow(el) {
699
- if (!el) return false;
700
- var createDom = function createDom(el, css) {
701
- var dom = document.createElement('div');
702
- var width = parseFloat(css.width) ? "".concat(Math.ceil(parseFloat(css.width)), "px") : css.width;
703
- dom.style.cssText = "\n width: ".concat(width, ";\n line-height: ").concat(css['line-height'], ";\n font-size: ").concat(css['font-size'], ";\n word-break: ").concat(css['word-break'], ";\n padding: ").concat(css.padding, ";\n ");
704
- dom.textContent = el.textContent;
705
- return dom;
706
- };
707
- var isOverflow = false;
708
- try {
709
- var css = window.getComputedStyle(el, null);
710
- var lineClamp = css.webkitLineClamp;
711
- if (lineClamp !== 'none') {
712
- var targetHeight = parseFloat(css.height);
713
- var dom = createDom(el, css);
714
- document.body.appendChild(dom);
715
- var domHeight = window.getComputedStyle(dom, null).height;
716
- document.body.removeChild(dom);
717
- isOverflow = targetHeight < parseFloat(domHeight);
718
- } else {
719
- isOverflow = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
675
+
676
+ const byteToHex = [];
677
+
678
+ for (let i = 0; i < 256; ++i) {
679
+ byteToHex.push((i + 0x100).toString(16).slice(1));
680
+ }
681
+
682
+ function unsafeStringify(arr, offset = 0) {
683
+ // Note: Be careful editing this code! It's been tuned for performance
684
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
685
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
686
+ }
687
+
688
+ function stringify(arr, offset = 0) {
689
+ const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
690
+ // of the following:
691
+ // - One or more input array values don't map to a hex octet (leading to
692
+ // "undefined" in the uuid)
693
+ // - Invalid input values for the RFC `version` or `variant` fields
694
+
695
+ if (!validate(uuid)) {
696
+ throw TypeError('Stringified UUID is invalid');
697
+ }
698
+
699
+ return uuid;
700
+ }
701
+
702
+ /* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
703
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
704
+
705
+
706
+
707
+
708
+ function v4(options, buf, offset) {
709
+ if (esm_browser_native.randomUUID && !buf && !options) {
710
+ return esm_browser_native.randomUUID();
711
+ }
712
+
713
+ options = options || {};
714
+ const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
715
+
716
+ rnds[6] = rnds[6] & 0x0f | 0x40;
717
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
718
+
719
+ if (buf) {
720
+ offset = offset || 0;
721
+
722
+ for (let i = 0; i < 16; ++i) {
723
+ buf[offset + i] = rnds[i];
720
724
  }
721
- } catch (e) {
722
- console.warn('There is an error when check element overflow state: ', e);
725
+
726
+ return buf;
723
727
  }
724
- return isOverflow;
728
+
729
+ return unsafeStringify(rnds);
725
730
  }
726
- ;// CONCATENATED MODULE: ../../packages/shared/src/z-index-manager.ts
727
731
 
732
+ /* harmony default export */ const esm_browser_v4 = (v4);
733
+ ;// CONCATENATED MODULE: external "@popperjs/core"
734
+ var core_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
735
+ var core_y = x => () => x
736
+ const core_namespaceObject = core_x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
737
+ ;// CONCATENATED MODULE: ../../packages/shared/src/popover.ts
728
738
 
729
739
 
730
- var _BKLAYERD_INDEX_EFAUL;
731
- /**
732
- * Tencent is pleased to support the open source community by making
733
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
734
- *
735
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
736
- *
737
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
738
- *
739
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
740
- *
741
- * ---------------------------------------------------
742
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
743
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
744
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
745
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
746
- *
747
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
748
- * the Software.
749
- *
750
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
751
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
752
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
753
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
754
- * IN THE SOFTWARE.
755
- */
756
- /**
757
- * 页面框架层级
758
- */
759
- var BKLAYERTYPE;
760
- (function (BKLAYERTYPE) {
761
- /** 网站内容的背景、拓扑的画布等 */
762
- BKLAYERTYPE["BOTTOM"] = "bottom";
763
- /** 页面呈现的各类内容 */
764
- BKLAYERTYPE["CONTENT"] = "content";
765
- /** 顶部导航、侧边导航以及用户信息等 */
766
- BKLAYERTYPE["NAVI"] = "navi";
767
- /** 页面需全屏操作的部分功能或编辑器的全屏模式 */
768
- BKLAYERTYPE["FULLSCREEN"] = "fullScreen";
769
- /** 各类功能插件 */
770
- BKLAYERTYPE["PLUGINS"] = "plugins";
771
- /** 各类弹窗或抽屉(非模态弹窗不考虑) */
772
- BKLAYERTYPE["MODAL"] = "modal";
773
- /** 各类消息提示 */
774
- BKLAYERTYPE["MESSAGE"] = "message";
775
- /** 各类popper提示 */
776
- BKLAYERTYPE["POPPER"] = "popper";
777
- })(BKLAYERTYPE || (BKLAYERTYPE = {}));
778
- /** 定义不同分层默认值 */
779
- var BKLAYERD_INDEX_EFAULT_VALUE = (_BKLAYERD_INDEX_EFAUL = {}, _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.BOTTOM, 0), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.CONTENT, 1), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.NAVI, 100), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.FULLSCREEN, 1000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.MODAL, 3000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.PLUGINS, 8000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.MESSAGE, 10000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.POPPER, 99999), _BKLAYERD_INDEX_EFAUL);
780
- var BKZIndexManager = /*#__PURE__*/function () {
781
- function BKZIndexManager() {
782
- _classCallCheck(this, BKZIndexManager);
783
- _defineProperty(this, "storageLayerIndexValue", {});
784
- this.copyDefaultValue();
785
- }
786
- /**
787
- *
788
- * @param type
789
- * @returns
790
- */
791
- _createClass(BKZIndexManager, [{
792
- key: "getNextIndex",
793
- value: function getNextIndex(type) {
794
- if (Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue, type)) {
795
- this.storageLayerIndexValue[type] = this.storageLayerIndexValue[type] + 1;
796
- return this.storageLayerIndexValue[type];
797
- }
798
- this.storageLayerIndexValue[BKLAYERTYPE.MODAL] = this.storageLayerIndexValue[BKLAYERTYPE.MODAL] + 1;
799
- return this.storageLayerIndexValue[BKLAYERTYPE.MODAL];
800
- }
801
- /** 获取弹窗类型最新zIndex的值 */
802
- }, {
803
- key: "getModalNextIndex",
804
- value: function getModalNextIndex() {
805
- return this.getNextIndex(BKLAYERTYPE.MODAL);
806
- }
807
- /** 获取Message类型最新zIndex的值 */
808
- }, {
809
- key: "getMessageNextIndex",
810
- value: function getMessageNextIndex() {
811
- return this.getNextIndex(BKLAYERTYPE.MESSAGE);
812
- }
813
- /** 获取全屏类型最新zIndex的值 */
814
- }, {
815
- key: "getFullScreenNextIndex",
816
- value: function getFullScreenNextIndex() {
817
- return this.getNextIndex(BKLAYERTYPE.FULLSCREEN);
818
- }
819
- /** 获取导航类型最新zIndex的值 */
820
- }, {
821
- key: "getNaviNextIndex",
822
- value: function getNaviNextIndex() {
823
- return this.getNextIndex(BKLAYERTYPE.NAVI);
824
- }
825
- /** 获取导航类型最新zIndex的值 */
826
- }, {
827
- key: "getPopperIndex",
828
- value: function getPopperIndex() {
829
- return BKLAYERD_INDEX_EFAULT_VALUE.popper;
830
- }
831
- /**
832
- * 更新自定义默认zIndex配置
833
- * @param config 配置项
834
- */
835
- }, {
836
- key: "setDefaultZIndex",
837
- value: function setDefaultZIndex(config) {
838
- var _this = this;
839
- Object.keys(config || {}).forEach(function (key) {
840
- if (Object.prototype.hasOwnProperty.call(_this.storageLayerIndexValue.__proto__, key)) {
841
- Object.assign(_this.storageLayerIndexValue.__proto__, _defineProperty({}, key, config[key]));
842
- }
843
- });
844
- this.copyDefaultValue();
845
- }
846
- /**
847
- * 重置zIndex
848
- * @param config 配置项
849
- */
850
- }, {
851
- key: "resetZIndex",
852
- value: function resetZIndex(config) {
853
- var _this2 = this;
854
- Object.keys(config || {}).forEach(function (key) {
855
- if (Object.prototype.hasOwnProperty.call(_this2.storageLayerIndexValue, key)) {
856
- Object.assign(_this2.storageLayerIndexValue, _defineProperty({}, key, config[key]));
857
- }
858
- });
859
- }
860
- /**
861
- * 根据默认设置创建副本
862
- */
863
- }, {
864
- key: "copyDefaultValue",
865
- value: function copyDefaultValue() {
866
- var properties = Object.keys(BKLAYERD_INDEX_EFAULT_VALUE).reduce(function (props, key) {
867
- return Object.assign(props, _defineProperty({}, key, {
868
- value: BKLAYERD_INDEX_EFAULT_VALUE[key],
869
- writable: true,
870
- configurable: true
871
- }));
872
- }, {});
873
- this.storageLayerIndexValue = Object.create(BKLAYERD_INDEX_EFAULT_VALUE, properties);
874
- }
875
- }]);
876
- return BKZIndexManager;
877
- }();
878
- var bkZIndexManager = new BKZIndexManager();
879
- ;// CONCATENATED MODULE: ../../packages/shared/src/mask-manager.ts
880
-
881
-
882
-
883
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
884
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
885
- /*
886
- * Tencent is pleased to support the open source community by making
887
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
888
- *
889
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
890
- *
891
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
892
- *
893
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
894
- *
895
- * ---------------------------------------------------
896
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
897
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
898
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
899
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
900
- *
901
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
902
- * the Software.
903
- *
904
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
905
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
906
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
907
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
908
- * IN THE SOFTWARE.
909
- */
910
-
911
-
912
- // eslint-disable-next-line @typescript-eslint/naming-convention
913
- var DEFAULT_MASK_UUID = function DEFAULT_MASK_UUID() {};
914
- DEFAULT_MASK_UUID.prototype.def_val = "__bk_mask_".concat(random(16));
915
- var MaskEventMap = new WeakMap();
916
- var getMaskEvent = function getMaskEvent(mask) {
917
- if (MaskEventMap.has(mask)) {
918
- return MaskEventMap.get(mask);
919
- }
920
- return [];
921
- };
922
- var setMaskEvent = function setMaskEvent(mask, event, args, content, instanceId) {
923
- var maskEvent = getMaskEvent(mask);
924
- if (maskEvent.some(function (evet) {
925
- return evet.instanceId === instanceId;
926
- })) {
927
- return;
928
- }
929
- maskEvent.push({
930
- event: event,
931
- args: args,
932
- content: content,
933
- instanceId: instanceId
934
- });
935
- MaskEventMap.set(mask, maskEvent);
936
- };
937
- var setMaskEventIns = function setMaskEventIns(mask, maskEvent) {
938
- MaskEventMap.set(mask, maskEvent);
939
- };
940
- var MaskQueueMaker = /*#__PURE__*/function () {
941
- function MaskQueueMaker() {
942
- _classCallCheck(this, MaskQueueMaker);
943
- _defineProperty(this, "timer", null);
944
- _defineProperty(this, "store", []);
945
- _defineProperty(this, "maskMap", new WeakMap());
946
- }
947
- _createClass(MaskQueueMaker, [{
948
- key: "appendMaker",
949
- value: function appendMaker(fn) {
950
- this.store.push(fn);
951
- this.executeMaker();
952
- }
953
- }, {
954
- key: "pushMaskStyle",
955
- value: function pushMaskStyle(parentNode, style) {
956
- var value = this.getMaskMap(parentNode);
957
- this.setMaskMap(parentNode, _objectSpread({
958
- styles: [style]
959
- }, value || {}));
960
- }
961
- }, {
962
- key: "getMaskStyles",
963
- value: function getMaskStyles(parentNode) {
964
- var _this$getMaskMap;
965
- return ((_this$getMaskMap = this.getMaskMap(parentNode)) === null || _this$getMaskMap === void 0 ? void 0 : _this$getMaskMap.styles) || [];
966
- }
967
- }, {
968
- key: "setMaskId",
969
- value: function setMaskId(parentNode, id) {
970
- var value = this.getMaskMap(parentNode);
971
- if (!value) {
972
- this.setMaskMap(parentNode, _objectSpread({
973
- id: id
974
- }, value || {}));
975
- } else {
976
- Object.assign(value, {
977
- id: id
978
- });
979
- this.setMaskMap(parentNode, value);
980
- }
981
- }
982
- }, {
983
- key: "getMaskId",
984
- value: function getMaskId(parentNode) {
985
- var _this$getMaskMap2;
986
- return (_this$getMaskMap2 = this.getMaskMap(parentNode)) === null || _this$getMaskMap2 === void 0 ? void 0 : _this$getMaskMap2.id;
987
- }
988
- }, {
989
- key: "setMaskMap",
990
- value: function setMaskMap(key, value) {
991
- this.maskMap.set(key, value);
992
- }
993
- }, {
994
- key: "getMaskMap",
995
- value: function getMaskMap(key) {
996
- return this.maskMap.get(key);
997
- }
998
- }, {
999
- key: "executeMaker",
1000
- value: function executeMaker() {
1001
- var _this = this;
1002
- this.timer && cancelAnimationFrame(this.timer);
1003
- this.timer = requestAnimationFrame(function () {
1004
- var fn = _this.store.pop();
1005
- if (typeof fn === 'function') {
1006
- Reflect.apply(fn, _this, []);
1007
- _this.executeMaker();
1008
- }
1009
- });
1010
- }
1011
- }]);
1012
- return MaskQueueMaker;
1013
- }();
1014
- var bkMaskMaker = new MaskQueueMaker();
1015
- var BkMaskManager = /*#__PURE__*/function () {
1016
- /**
1017
- * 遮罩管理器
1018
- *
1019
- * @param multiInstance 是否允许多实例
1020
- * @param maskAttrTag 遮罩DOM唯一标志,支持自定义和 auto
1021
- */
1022
- function BkMaskManager(config) {
1023
- var _this2 = this;
1024
- _classCallCheck(this, BkMaskManager);
1025
- /** 遮罩容器 */
1026
- /** 遮罩备份容器,用于多个组件实例显示,遮罩只显示最后一个 **/
1027
- /** 是否允许多个遮罩实例 */
1028
- _defineProperty(this, "multiInstance", false);
1029
- /** 遮罩控制器唯一标识 */
1030
- _defineProperty(this, "uniqueMaskAttrTag", '');
1031
- /** 设置弹出层父级组件,默认是body */
1032
- _defineProperty(this, "parentNode", document.body);
1033
- /** 遮罩当前显示组件实例 **/
1034
- _defineProperty(this, "activeInstance", undefined);
1035
- /** 记录已在使用的z-index */
1036
- _defineProperty(this, "zIndexStore", new Map());
1037
- /** 记录最后一个UUID */
1038
- _defineProperty(this, "lastUUID", null);
1039
- /** 遮罩样式 **/
1040
- _defineProperty(this, "maskStyle", {
1041
- position: 'fixed',
1042
- left: 0,
1043
- top: 0,
1044
- bottom: 0,
1045
- right: 0,
1046
- display: 'none',
1047
- 'background-color': 'rgba(0,0,0,.6)'
1048
- });
1049
- // 用于判定是否已经初始化过当前实例
1050
- _defineProperty(this, "isInit", false);
1051
- _defineProperty(this, "maskAttrTag", 'auto');
1052
- var _ref = config || {},
1053
- _ref$multiInstance = _ref.multiInstance,
1054
- multiInstance = _ref$multiInstance === void 0 ? false : _ref$multiInstance,
1055
- _ref$maskAttrTag = _ref.maskAttrTag,
1056
- maskAttrTag = _ref$maskAttrTag === void 0 ? 'auto' : _ref$maskAttrTag,
1057
- _ref$parentNode = _ref.parentNode,
1058
- parentNode = _ref$parentNode === void 0 ? document.body : _ref$parentNode,
1059
- _ref$maskStyle = _ref.maskStyle,
1060
- maskStyle = _ref$maskStyle === void 0 ? {} : _ref$maskStyle;
1061
- this.parentNode = parentNode || document;
1062
- this.maskAttrTag = maskAttrTag;
1063
- this.activeInstance = undefined;
1064
- this.multiInstance = multiInstance;
1065
- this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
1066
- // 避免多个实例多处初始化,此处会做队列处理
1067
- // 合并重复的处理请求
1068
- // 如果当前实例初始化时,仍未执行完队列,则需要进行请求合并
1069
- bkMaskMaker.appendMaker(function () {
1070
- _this2.initInstance(maskStyle);
1071
- });
1072
- }
1073
- _createClass(BkMaskManager, [{
1074
- key: "setOption",
1075
- value: function setOption(option) {
1076
- var _ref2 = option || {},
1077
- _ref2$parentNode = _ref2.parentNode,
1078
- parentNode = _ref2$parentNode === void 0 ? document.body : _ref2$parentNode,
1079
- _ref2$maskStyle = _ref2.maskStyle,
1080
- maskStyle = _ref2$maskStyle === void 0 ? {} : _ref2$maskStyle,
1081
- _ref2$maskAttrTag = _ref2.maskAttrTag,
1082
- maskAttrTag = _ref2$maskAttrTag === void 0 ? this.maskAttrTag : _ref2$maskAttrTag;
1083
- this.parentNode = parentNode || document;
1084
- this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
1085
- this.uniqueMaskAttrTag = this.getMaskAttrTag(maskAttrTag);
1086
- }
1087
- }, {
1088
- key: "destroyEvent",
1089
- value: function destroyEvent(id) {
1090
- if (this.mask) {
1091
- var events = getMaskEvent(this.mask) || [];
1092
- var index = events.findIndex(function (evt) {
1093
- return evt.instanceId === id;
1094
- });
1095
- if (index >= 0) {
1096
- events.splice(index, 1);
1097
- setMaskEventIns(this.mask, events);
1098
- }
1099
- }
1100
- }
1101
- /**
1102
- * 显示遮罩
1103
- * @param content 遮罩内容
1104
- * @param zIndex z-index
1105
- * @param showMask 是否显示遮罩
1106
- * @param appendStyle 追加样式
1107
- * @param transfer 是否显示将内容加入遮罩下
1108
- */
1109
- }, {
1110
- key: "show",
1111
- value: function show(content, zIndex) {
1112
- var showMask = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
1113
- var appendStyle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
1114
- var uuid = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
1115
- var transfer = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
1116
- var onMaskClick = arguments.length > 6 ? arguments[6] : undefined;
1117
- var instanceId = arguments.length > 7 ? arguments[7] : undefined;
1118
- var uid = uuid !== null && uuid !== void 0 ? uuid : random(16);
1119
- // @ts-ignore
1120
- var localZIndex = /-?\d+/.test("".concat(zIndex)) ? zIndex : bkZIndexManager.getModalNextIndex();
1121
- var style = Object.assign({}, this.maskStyle, appendStyle || {});
1122
- /**
1123
- * 如果不显示遮罩,此处遮罩继承父级
1124
- * 同时,如果父级弹出层有遮罩,此处不能覆盖
1125
- */
1126
- if (!showMask) {
1127
- if (this.lastUUID) {
1128
- var preStore = this.zIndexStore.get(this.lastUUID);
1129
- if (preStore) {
1130
- style = preStore === null || preStore === void 0 ? void 0 : preStore.style;
1131
- }
1132
- }
1133
- }
1134
- /** 缓存当前z-index */
1135
- this.storeMaskInsCfg({
1136
- zIndex: localZIndex,
1137
- style: _objectSpread({}, style),
1138
- uuid: uid,
1139
- preUID: this.lastUUID
1140
- });
1141
- Object.assign(style, {
1142
- display: 'block',
1143
- 'z-index': "".concat(localZIndex),
1144
- 'pointer-events': 'all'
1145
- });
1146
- this.initInstance(style);
1147
- if (onMaskClick) {
1148
- this.catchClickEvent(content, onMaskClick, instanceId);
1149
- }
1150
- this.setMaskStyle(style);
1151
- bkMaskMaker.pushMaskStyle(this.parentNode, _objectSpread({}, style));
1152
- this.backupMask.style.setProperty('z-index', "".concat(localZIndex - 1));
1153
- if (!showMask) {
1154
- this.mask.style.setProperty('pointer-events', 'none');
1155
- content === null || content === void 0 ? void 0 : content.style.setProperty('pointer-events', 'all');
1156
- }
1157
- if (content) {
1158
- if (transfer) content.style.setProperty('z-index', "".concat(localZIndex + 1)); // 表明内容不在遮罩下,内容区z-index + 1
1159
- this.activeInstance = content;
1160
- this.appendContentToMask(content); // 表明内容在body下,即在遮罩下
1161
- }
1162
- }
1163
- }, {
1164
- key: "hide",
1165
- value: function hide() {
1166
- var transfer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1167
- var content = arguments.length > 1 ? arguments[1] : undefined;
1168
- var uuid = arguments.length > 2 ? arguments[2] : undefined;
1169
- var uid = uuid !== null && uuid !== void 0 ? uuid : this.lastUUID;
1170
- if (!transfer) {
1171
- var _this$activeInstance;
1172
- content === null || content === void 0 ? void 0 : content.remove();
1173
- (_this$activeInstance = this.activeInstance) === null || _this$activeInstance === void 0 ? void 0 : _this$activeInstance.remove();
1174
- }
1175
- this.removeClickEvent();
1176
- this.activeInstance = undefined;
1177
- this.popIndexStore(uid);
1178
- var maskList = bkMaskMaker.getMaskStyles(this.parentNode);
1179
- maskList === null || maskList === void 0 ? void 0 : maskList.pop();
1180
- if (!(maskList !== null && maskList !== void 0 && maskList.length)) {
1181
- this.mask.style.setProperty('display', 'none');
1182
- } else {
1183
- var style = maskList.slice(-1)[0];
1184
- this.setMaskStyle(style);
1185
- }
1186
- }
1187
- }, {
1188
- key: "storeMaskInsCfg",
1189
- value: function storeMaskInsCfg(config) {
1190
- this.zIndexStore.set(config.uuid, config);
1191
- this.lastUUID = config.uuid;
1192
- return this.zIndexStore.get(config.uuid);
1193
- }
1194
- /**
1195
- * 移除最后一次缓存数据
1196
- */
1197
- }, {
1198
- key: "popIndexStore",
1199
- value: function popIndexStore(uuid) {
1200
- if (this.zIndexStore.has(uuid)) {
1201
- var rmIns = this.zIndexStore.get(uuid);
1202
- this.lastUUID = rmIns.preUID;
1203
- return this.zIndexStore["delete"](uuid);
1204
- }
1205
- this.lastUUID = null;
1206
- return false;
1207
- }
1208
- }, {
1209
- key: "backupActiveInstance",
1210
- value: function backupActiveInstance() {
1211
- if (this.activeInstance) {
1212
- this.backupMask.append(this.activeInstance);
1213
- }
1214
- }
1215
- }, {
1216
- key: "backupContentElement",
1217
- value: function backupContentElement(content) {
1218
- var _this$backupMask;
1219
- content && ((_this$backupMask = this.backupMask) === null || _this$backupMask === void 0 ? void 0 : _this$backupMask.append(content));
1220
- }
1221
- }, {
1222
- key: "getActiveContentInstance",
1223
- value: function getActiveContentInstance() {
1224
- return this.activeInstance;
1225
- }
1226
- }, {
1227
- key: "removeClickEvent",
1228
- value: function removeClickEvent() {
1229
- // if (this.mask) {
1230
- // const events = getMaskEvent(this.mask);
1231
- // if (!events.length) {
1232
- // console.log('removeEventListener handleMaskClick');
1233
- // this.mask.removeEventListener('click', this.handleMaskClick);
1234
- // }
1235
- // }
1236
- }
1237
- }, {
1238
- key: "initInstance",
1239
- value: function initInstance(maskStyle) {
1240
- if (!this.isInit) {
1241
- this.isInit = true;
1242
- this.backupMask = this.getBackupMask();
1243
- var _this$getMask = this.getMask(),
1244
- instance = _this$getMask.instance,
1245
- isExist = _this$getMask.isExist;
1246
- this.mask = instance;
1247
- !isExist && this.setMaskStyle(Object.assign({}, this.maskStyle, maskStyle));
1248
- }
1249
- }
1250
- /**
1251
- * 初始化当前遮罩管理器
1252
- * @returns 当前遮罩容器
1253
- */
1254
- }, {
1255
- key: "getMask",
1256
- value: function getMask() {
1257
- var _this3 = this;
1258
- if (this.multiInstance) {
1259
- return {
1260
- instance: this.createMask(),
1261
- isExist: false
1262
- };
1263
- }
1264
- var isExist = true;
1265
- var div = this.parentNode.querySelector("[data-bk-mask-uid='".concat(this.uniqueMaskAttrTag, "']"));
1266
- if (!div) {
1267
- isExist = false;
1268
- div = this.createMask();
1269
- div.addEventListener('click', function (e) {
1270
- return _this3.handleMaskClick(e);
1271
- }, true);
1272
- }
1273
- return {
1274
- instance: div,
1275
- isExist: isExist
1276
- };
1277
- }
1278
- }, {
1279
- key: "catchClickEvent",
1280
- value: function catchClickEvent(content, onMaskClick, instanceId) {
1281
- if (this.mask) {
1282
- setMaskEvent(this.mask, onMaskClick, [], content, instanceId);
1283
- }
1284
- }
1285
- }, {
1286
- key: "handleMaskClick",
1287
- value: function handleMaskClick(e) {
1288
- if (e.target !== this.mask) {
1289
- return;
1290
- }
1291
- var events = getMaskEvent(this.mask);
1292
- if (events.length) {
1293
- var event = events.slice(-1)[0].event;
1294
- if (typeof event === 'function') {
1295
- event(e);
1296
- }
1297
- }
1298
- }
1299
- }, {
1300
- key: "getBackupMask",
1301
- value: function getBackupMask() {
1302
- var attrName = 'data-bk-backup-uid';
1303
- var div = this.parentNode.querySelector("[".concat(attrName, "]"));
1304
- if (!div) {
1305
- div = this.createMask(attrName);
1306
- }
1307
- return div;
1308
- }
1309
- /**
1310
- * 创建遮罩层DOM
1311
- * @returns 返回DOM
1312
- */
1313
- }, {
1314
- key: "createMask",
1315
- value: function createMask() {
1316
- var attrName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'data-bk-mask-uid';
1317
- var div = document.createElement('div');
1318
- div.setAttribute(attrName, this.uniqueMaskAttrTag);
1319
- this.parentNode.append(div);
1320
- return div;
1321
- }
1322
- }, {
1323
- key: "setMaskStyle",
1324
- value: function setMaskStyle() {
1325
- var _this4 = this;
1326
- var maskStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1327
- if (this.mask) {
1328
- Object.entries(maskStyle).forEach(function (cfg) {
1329
- return _this4.mask.style.setProperty(cfg[0], cfg[1]);
1330
- });
1331
- }
1332
- }
1333
- /**
1334
- * 根据输入生成唯一遮罩标识
1335
- * @param tag 输入标识
1336
- * @returns string 返回唯一标识
1337
- */
1338
- }, {
1339
- key: "getMaskAttrTag",
1340
- value: function getMaskAttrTag(tag) {
1341
- if (/^(auto|\s+)$/i.test(tag) || tag === null || tag === undefined || tag === '') {
1342
- if (!bkMaskMaker.getMaskId(this.parentNode)) {
1343
- bkMaskMaker.setMaskId(this.parentNode, "__bk_mask_".concat(random(16)));
1344
- }
1345
- return bkMaskMaker.getMaskId(this.parentNode);
1346
- }
1347
- return tag;
1348
- }
1349
- }, {
1350
- key: "appendContentToMask",
1351
- value: function appendContentToMask(content) {
1352
- this.mask.append(content);
1353
- }
1354
- }]);
1355
- return BkMaskManager;
1356
- }();
1357
- var bKMaskManager = new BkMaskManager({});
1358
- ;// CONCATENATED MODULE: ../../packages/shared/src/pop-manager.ts
1359
-
1360
-
1361
- /*
1362
- * Tencent is pleased to support the open source community by making
1363
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1364
- *
1365
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1366
- *
1367
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1368
- *
1369
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1370
- *
1371
- * ---------------------------------------------------
1372
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1373
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1374
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1375
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1376
- *
1377
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1378
- * the Software.
1379
- *
1380
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1381
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1382
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1383
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1384
- * IN THE SOFTWARE.
1385
- */
1386
-
1387
-
1388
-
1389
-
1390
- var popInstanceStore = new WeakMap();
1391
- var BKPopIndexManager = /*#__PURE__*/function () {
1392
- /** 用来缓存弹出层实例 */
1393
-
1394
- function BKPopIndexManager(options) {
1395
- _classCallCheck(this, BKPopIndexManager);
1396
- this.clickFn = undefined;
1397
- this.uuidAttrName = 'data-bk-pop-uuid';
1398
- this.uniqId = random(16);
1399
- this.transfer = this.getParentNode(options === null || options === void 0 ? void 0 : options.transfer);
1400
- this.bKMaskManagerInstance = new BkMaskManager({
1401
- parentNode: this.getParentNode(options === null || options === void 0 ? void 0 : options.transfer),
1402
- popInstance: this,
1403
- onClick: this.onMaskClickFn
1404
- });
1405
- }
1406
- _createClass(BKPopIndexManager, [{
1407
- key: "popInstanceList",
1408
- get: function get() {
1409
- if (!popInstanceStore.has(this.transfer)) {
1410
- popInstanceStore.set(this.transfer, []);
1411
- }
1412
- return popInstanceStore.get(this.transfer);
1413
- },
1414
- set: function set(val) {
1415
- popInstanceStore.set(this.transfer, val);
1416
- }
1417
- }, {
1418
- key: "getParentNode",
1419
- value: function getParentNode(transfer) {
1420
- if (typeof transfer === 'string') {
1421
- var target = document.querySelector(transfer);
1422
- if (target) {
1423
- return target;
1424
- }
1425
- }
1426
- if (helper_isElement(transfer)) {
1427
- return transfer;
1428
- }
1429
- return document.body;
1430
- }
1431
- }, {
1432
- key: "onMaskClick",
1433
- value: function onMaskClick(callFn, target) {
1434
- this.clickFn = {
1435
- fn: callFn,
1436
- target: target
1437
- };
1438
- }
1439
- /**
1440
- * 展示弹窗
1441
- * @param content 弹窗内容
1442
- * @param showMask 是否显示遮罩
1443
- * @param appendStyle 追加样式
1444
- * @param transfer 是否显示在body内(即是否显示在div#app内,默认为false)
1445
- * @returns
1446
- */
1447
- }, {
1448
- key: "show",
1449
- value: function show(content) {
1450
- var showMask = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
1451
- var appendStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1452
- var transfer = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1453
- var zindex = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
1454
- var onMaskClick = arguments.length > 5 ? arguments[5] : undefined;
1455
- if (!content) {
1456
- console.warn('pop show error: content is null or undefined');
1457
- return;
1458
- }
1459
- var zIndex = typeof zindex === 'number' ? zindex : bkZIndexManager.getModalNextIndex();
1460
- var uuid = random(16);
1461
- content.setAttribute(this.uuidAttrName, uuid);
1462
- if (this.popInstanceList.length > 0) {
1463
- showMask && this.bKMaskManagerInstance.backupContentElement(this.popInstanceList.slice(-1)[0].content);
1464
- }
1465
- this.popInstanceList.push({
1466
- uuid: uuid,
1467
- zIndex: zIndex,
1468
- content: content,
1469
- showMask: showMask,
1470
- appendStyle: appendStyle
1471
- });
1472
- this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid, transfer, onMaskClick, this.uniqId);
1473
- }
1474
- /**
1475
- * 销毁指定实例
1476
- * @param content 指定实例内容
1477
- * @param transfer
1478
- */
1479
- }, {
1480
- key: "destroy",
1481
- value: function destroy(content) {
1482
- var transfer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1483
- this.clickFn = undefined;
1484
- this.hide(content, transfer);
1485
- }
1486
- /**
1487
- * 关闭最后一个弹窗 如果当前还有父级弹窗,则激活父级弹窗
1488
- * @param removeLastContent 默认:true 是否自动关闭最后一个弹窗实例 某些场景下,已经主动关闭最后一个弹窗,此处只需要处理其他逻辑
1489
- */
1490
- }, {
1491
- key: "popHide",
1492
- value: function popHide() {
1493
- var removeLastContent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1494
- if (this.popInstanceList.length) {
1495
- if (removeLastContent) {
1496
- var lastItem = this.popInstanceList.pop();
1497
- this.bKMaskManagerInstance.popIndexStore(lastItem.uuid);
1498
- lastItem.remove();
1499
- }
1500
- if (this.popInstanceList.length) {
1501
- var activeItem = this.popInstanceList.slice(-1)[0];
1502
- var zIndex = activeItem.zIndex,
1503
- content = activeItem.content,
1504
- showMask = activeItem.showMask,
1505
- appendStyle = activeItem.appendStyle,
1506
- uuid = activeItem.uuid;
1507
- this.bKMaskManagerInstance.show(content, zIndex, showMask, appendStyle, uuid);
1508
- } else {
1509
- this.bKMaskManagerInstance.hide();
1510
- // this.clickFn.length = 0;
1511
- }
1512
- }
1513
- }
1514
- /**
1515
- * 关闭指定弹窗
1516
- * @param content { HTMLElement } 关闭弹窗内容
1517
- * **/
1518
- }, {
1519
- key: "hide",
1520
- value: function hide(content) {
1521
- var transfer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1522
- /** 检查当前实例是否存在于已缓存列表 */
1523
- var uuid = content === null || content === void 0 ? void 0 : content.getAttribute(this.uuidAttrName);
1524
- if (uuid) {
1525
- var itemIndex = this.popInstanceList.findIndex(function (item) {
1526
- return item.uuid === uuid;
1527
- });
1528
- if (itemIndex >= 0) {
1529
- if (!transfer) this.popInstanceList[itemIndex].content.remove();
1530
- this.popInstanceList.splice(itemIndex, 1);
1531
- this.bKMaskManagerInstance.popIndexStore(uuid);
1532
- if (!this.popInstanceList.length) {
1533
- this.bKMaskManagerInstance.hide(transfer);
1534
- } else {
1535
- this.popHide(false);
1536
- }
1537
- }
1538
- } else {
1539
- content === null || content === void 0 ? void 0 : content.remove();
1540
- }
1541
- this.bKMaskManagerInstance.removeClickEvent();
1542
- }
1543
- }, {
1544
- key: "removeLastEvent",
1545
- value: function removeLastEvent() {
1546
- this.bKMaskManagerInstance.destroyEvent(this.uniqId);
1547
- }
1548
- }, {
1549
- key: "onMaskClickFn",
1550
- value: function onMaskClickFn(e) {
1551
- if (this.clickFn) {
1552
- var fn = this.clickFn.fn;
1553
- if (fn) {
1554
- Reflect.apply(fn, this, [e]);
1555
- }
1556
- }
1557
- }
1558
- }]);
1559
- return BKPopIndexManager;
1560
- }();
1561
- var bkPopIndexManager = new BKPopIndexManager();
1562
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
1563
- function _arrayLikeToArray(arr, len) {
1564
- if (len == null || len > arr.length) len = arr.length;
1565
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1566
- return arr2;
1567
- }
1568
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
1569
-
1570
- function _arrayWithoutHoles(arr) {
1571
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1572
- }
1573
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
1574
- function _iterableToArray(iter) {
1575
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1576
- }
1577
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
1578
-
1579
- function _unsupportedIterableToArray(o, minLen) {
1580
- if (!o) return;
1581
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1582
- var n = Object.prototype.toString.call(o).slice(8, -1);
1583
- if (n === "Object" && o.constructor) n = o.constructor.name;
1584
- if (n === "Map" || n === "Set") return Array.from(o);
1585
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1586
- }
1587
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
1588
- function _nonIterableSpread() {
1589
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1590
- }
1591
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
1592
-
1593
-
1594
-
1595
-
1596
- function _toConsumableArray(arr) {
1597
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1598
- }
1599
- ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/native.js
1600
- const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
1601
- /* harmony default export */ const esm_browser_native = ({
1602
- randomUUID
1603
- });
1604
- ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
1605
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
1606
- // require the crypto API and do not support built-in fallback to lower quality random number
1607
- // generators (like Math.random()).
1608
- let getRandomValues;
1609
- const rnds8 = new Uint8Array(16);
1610
- function rng() {
1611
- // lazy load so that environments that need to polyfill have a chance to do so
1612
- if (!getRandomValues) {
1613
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
1614
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
1615
-
1616
- if (!getRandomValues) {
1617
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
1618
- }
1619
- }
1620
-
1621
- return getRandomValues(rnds8);
1622
- }
1623
- ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
1624
-
1625
- /**
1626
- * Convert array of 16 byte values to UUID string format of the form:
1627
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
1628
- */
1629
-
1630
- const byteToHex = [];
1631
-
1632
- for (let i = 0; i < 256; ++i) {
1633
- byteToHex.push((i + 0x100).toString(16).slice(1));
1634
- }
1635
-
1636
- function unsafeStringify(arr, offset = 0) {
1637
- // Note: Be careful editing this code! It's been tuned for performance
1638
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
1639
- return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
1640
- }
1641
-
1642
- function stringify(arr, offset = 0) {
1643
- const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
1644
- // of the following:
1645
- // - One or more input array values don't map to a hex octet (leading to
1646
- // "undefined" in the uuid)
1647
- // - Invalid input values for the RFC `version` or `variant` fields
1648
-
1649
- if (!validate(uuid)) {
1650
- throw TypeError('Stringified UUID is invalid');
1651
- }
1652
-
1653
- return uuid;
1654
- }
1655
-
1656
- /* harmony default export */ const esm_browser_stringify = ((/* unused pure expression or super */ null && (stringify)));
1657
- ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
1658
-
1659
-
1660
-
1661
-
1662
- function v4(options, buf, offset) {
1663
- if (esm_browser_native.randomUUID && !buf && !options) {
1664
- return esm_browser_native.randomUUID();
1665
- }
1666
-
1667
- options = options || {};
1668
- const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
1669
-
1670
- rnds[6] = rnds[6] & 0x0f | 0x40;
1671
- rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
1672
-
1673
- if (buf) {
1674
- offset = offset || 0;
1675
-
1676
- for (let i = 0; i < 16; ++i) {
1677
- buf[offset + i] = rnds[i];
1678
- }
1679
-
1680
- return buf;
1681
- }
1682
-
1683
- return unsafeStringify(rnds);
1684
- }
1685
-
1686
- /* harmony default export */ const esm_browser_v4 = (v4);
1687
- ;// CONCATENATED MODULE: external "@popperjs/core"
1688
- var core_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1689
- var core_y = x => () => x
1690
- const core_namespaceObject = core_x({ ["createPopper"]: () => __WEBPACK_EXTERNAL_MODULE__popperjs_core_a5c7319c__.createPopper });
1691
- ;// CONCATENATED MODULE: ../../packages/shared/src/popover.ts
1692
-
1693
-
1694
-
1695
-
1696
-
1697
- /*
740
+
741
+
742
+
743
+ /*
1698
744
  * Tencent is pleased to support the open source community by making
1699
745
  * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1700
746
  *
@@ -2089,53 +1135,168 @@ var getPopContainerId = function getPopContainerId() {
2089
1135
  popContainer.setAttribute('data-popper-id', popContainerId);
2090
1136
  document.body.append(popContainer);
2091
1137
  }
2092
- return "".concat(prefix).concat(popContainerId);
1138
+ return "".concat(prefix).concat(popContainerId);
1139
+ };
1140
+ ;// CONCATENATED MODULE: ../../packages/shared/src/scrollbar-width.ts
1141
+ /*
1142
+ * Tencent is pleased to support the open source community by making
1143
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1144
+ *
1145
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1146
+ *
1147
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1148
+ *
1149
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1150
+ *
1151
+ * ---------------------------------------------------
1152
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1153
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1154
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1155
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1156
+ *
1157
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1158
+ * the Software.
1159
+ *
1160
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1161
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1162
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1163
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1164
+ * IN THE SOFTWARE.
1165
+ */
1166
+ var scrollBarWidth;
1167
+ function scrollbarWidth() {
1168
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
1169
+ var outer = document.createElement('div');
1170
+ outer.className = 'bk-scrollbar-wrap';
1171
+ outer.style.visibility = 'hidden';
1172
+ outer.style.width = '100px';
1173
+ outer.style.position = 'absolute';
1174
+ outer.style.top = '-9999px';
1175
+ document.body.appendChild(outer);
1176
+ var widthNoScroll = outer.offsetWidth;
1177
+ outer.style.overflow = 'scroll';
1178
+ var inner = document.createElement('div');
1179
+ inner.style.width = '100%';
1180
+ outer.appendChild(inner);
1181
+ var widthWithScroll = inner.offsetWidth;
1182
+ outer.parentNode.removeChild(outer);
1183
+ scrollBarWidth = widthNoScroll - widthWithScroll;
1184
+ return scrollBarWidth;
1185
+ }
1186
+ ;// CONCATENATED MODULE: external "lodash/throttle"
1187
+ var throttle_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
1188
+ var throttle_y = x => () => x
1189
+ const throttle_namespaceObject = throttle_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_throttle_a7b7506a__["default"] });
1190
+ ;// CONCATENATED MODULE: ../../packages/shared/src/utils.ts
1191
+ /*
1192
+ * Tencent is pleased to support the open source community by making
1193
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1194
+ *
1195
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1196
+ *
1197
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1198
+ *
1199
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1200
+ *
1201
+ * ---------------------------------------------------
1202
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1203
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1204
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1205
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1206
+ *
1207
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1208
+ * the Software.
1209
+ *
1210
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1211
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1212
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1213
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1214
+ * IN THE SOFTWARE.
1215
+ */
1216
+
1217
+ var lowerStr = 'abcdefghijklmnopqrstuvwxyz0123456789';
1218
+ /**
1219
+ * 生成n位长度的字符串
1220
+ * @param {Number} n
1221
+ * @param str,默认26位字母及数字
1222
+ */
1223
+ var random = function random(n) {
1224
+ var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : lowerStr;
1225
+ var result = '';
1226
+ for (var i = 0; i < n; i++) {
1227
+ result += str[parseInt((Math.random() * str.length).toString(), 10)];
1228
+ }
1229
+ return result;
1230
+ };
1231
+ /**
1232
+ * 监听目标元素的Resize事件
1233
+ * @param root 目标元素
1234
+ * @param callbackFn 执行函数
1235
+ * @param delay 延迟执行时间,默认 60
1236
+ * @param immediate 是否立即执行回调函数
1237
+ * @returns "{ start: () => void, stop: () => void }"
1238
+ */
1239
+ var observerResize = function observerResize(root, callbackFn) {
1240
+ var delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
1241
+ var immediate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1242
+ var callFn = (0,throttle_namespaceObject["default"])(function () {
1243
+ if (typeof callbackFn === 'function') {
1244
+ callbackFn();
1245
+ }
1246
+ }, delay);
1247
+ var resizeObserver = new ResizeObserver(function () {
1248
+ callFn();
1249
+ });
1250
+ if (immediate) {
1251
+ if (typeof callbackFn === 'function') {
1252
+ callbackFn();
1253
+ }
1254
+ }
1255
+ return {
1256
+ start: function start() {
1257
+ resizeObserver.observe(root);
1258
+ },
1259
+ stop: function stop() {
1260
+ resizeObserver.disconnect();
1261
+ resizeObserver.unobserve(root);
1262
+ }
1263
+ };
2093
1264
  };
2094
- ;// CONCATENATED MODULE: ../../packages/shared/src/scrollbar-width.ts
2095
- /*
2096
- * Tencent is pleased to support the open source community by making
2097
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2098
- *
2099
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2100
- *
2101
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2102
- *
2103
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2104
- *
2105
- * ---------------------------------------------------
2106
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2107
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2108
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2109
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2110
- *
2111
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2112
- * the Software.
2113
- *
2114
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2115
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2116
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2117
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2118
- * IN THE SOFTWARE.
1265
+ var capitalize = function capitalize(str) {
1266
+ return str[0].toUpperCase() + str.slice(1);
1267
+ };
1268
+ /**
1269
+ * 判断元素是否溢出容器
1270
+ * @param {*} el
1271
+ * @returns
2119
1272
  */
2120
- var scrollBarWidth;
2121
- function scrollbarWidth() {
2122
- if (scrollBarWidth !== undefined) return scrollBarWidth;
2123
- var outer = document.createElement('div');
2124
- outer.className = 'bk-scrollbar-wrap';
2125
- outer.style.visibility = 'hidden';
2126
- outer.style.width = '100px';
2127
- outer.style.position = 'absolute';
2128
- outer.style.top = '-9999px';
2129
- document.body.appendChild(outer);
2130
- var widthNoScroll = outer.offsetWidth;
2131
- outer.style.overflow = 'scroll';
2132
- var inner = document.createElement('div');
2133
- inner.style.width = '100%';
2134
- outer.appendChild(inner);
2135
- var widthWithScroll = inner.offsetWidth;
2136
- outer.parentNode.removeChild(outer);
2137
- scrollBarWidth = widthNoScroll - widthWithScroll;
2138
- return scrollBarWidth;
1273
+ function checkOverflow(el) {
1274
+ if (!el) return false;
1275
+ var createDom = function createDom(el, css) {
1276
+ var dom = document.createElement('div');
1277
+ var width = parseFloat(css.width) ? "".concat(Math.ceil(parseFloat(css.width)), "px") : css.width;
1278
+ dom.style.cssText = "\n width: ".concat(width, ";\n line-height: ").concat(css['line-height'], ";\n font-size: ").concat(css['font-size'], ";\n word-break: ").concat(css['word-break'], ";\n padding: ").concat(css.padding, ";\n ");
1279
+ dom.textContent = el.textContent;
1280
+ return dom;
1281
+ };
1282
+ var isOverflow = false;
1283
+ try {
1284
+ var css = window.getComputedStyle(el, null);
1285
+ var lineClamp = css.webkitLineClamp;
1286
+ if (lineClamp !== 'none') {
1287
+ var targetHeight = parseFloat(css.height);
1288
+ var dom = createDom(el, css);
1289
+ document.body.appendChild(dom);
1290
+ var domHeight = window.getComputedStyle(dom, null).height;
1291
+ document.body.removeChild(dom);
1292
+ isOverflow = targetHeight < parseFloat(domHeight);
1293
+ } else {
1294
+ isOverflow = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
1295
+ }
1296
+ } catch (e) {
1297
+ console.warn('There is an error when check element overflow state: ', e);
1298
+ }
1299
+ return isOverflow;
2139
1300
  }
2140
1301
  ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
2141
1302
  function _setPrototypeOf(o, p) {
@@ -2395,7 +1556,7 @@ var PropTypes = /*#__PURE__*/function (_propTypesNS) {
2395
1556
  _createClass(PropTypes, null, [{
2396
1557
  key: "size",
2397
1558
  value: function size() {
2398
- var defaultList = ['small', 'default', 'large'];
1559
+ var defaultList = ['small', 'default', 'large', 'huge'];
2399
1560
  return (0,external_vue_types_namespaceObject.toType)('Size', {
2400
1561
  validator: function validator(val) {
2401
1562
  if (!val || defaultList.includes(val)) {
@@ -2469,8 +1630,201 @@ var SelectedTypeEnum;
2469
1630
  function SelectedType() {
2470
1631
  return (0,external_vue_types_namespaceObject.toType)('selectedStyle', {}).def(SelectedTypeEnum.CHECK);
2471
1632
  }
2472
- ;// CONCATENATED MODULE: ../../packages/shared/src/index.ts
1633
+ ;// CONCATENATED MODULE: ../../packages/shared/src/z-index-manager.ts
1634
+
1635
+
1636
+
1637
+ var _BKLAYERD_INDEX_EFAUL;
1638
+ /**
1639
+ * Tencent is pleased to support the open source community by making
1640
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1641
+ *
1642
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1643
+ *
1644
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1645
+ *
1646
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1647
+ *
1648
+ * ---------------------------------------------------
1649
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1650
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1651
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1652
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1653
+ *
1654
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1655
+ * the Software.
1656
+ *
1657
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1658
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1659
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1660
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1661
+ * IN THE SOFTWARE.
1662
+ */
1663
+ /**
1664
+ * 页面框架层级
1665
+ */
1666
+ var BKLAYERTYPE;
1667
+ (function (BKLAYERTYPE) {
1668
+ /** 网站内容的背景、拓扑的画布等 */
1669
+ BKLAYERTYPE["BOTTOM"] = "bottom";
1670
+ /** 页面呈现的各类内容 */
1671
+ BKLAYERTYPE["CONTENT"] = "content";
1672
+ /** 顶部导航、侧边导航以及用户信息等 */
1673
+ BKLAYERTYPE["NAVI"] = "navi";
1674
+ /** 页面需全屏操作的部分功能或编辑器的全屏模式 */
1675
+ BKLAYERTYPE["FULLSCREEN"] = "fullScreen";
1676
+ /** 各类功能插件 */
1677
+ BKLAYERTYPE["PLUGINS"] = "plugins";
1678
+ /** 各类弹窗或抽屉(非模态弹窗不考虑) */
1679
+ BKLAYERTYPE["MODAL"] = "modal";
1680
+ /** 各类消息提示 */
1681
+ BKLAYERTYPE["MESSAGE"] = "message";
1682
+ /** 各类popper提示 */
1683
+ BKLAYERTYPE["POPPER"] = "popper";
1684
+ })(BKLAYERTYPE || (BKLAYERTYPE = {}));
1685
+ /** 定义不同分层默认值 */
1686
+ var BKLAYERD_INDEX_EFAULT_VALUE = (_BKLAYERD_INDEX_EFAUL = {}, _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.BOTTOM, 0), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.CONTENT, 1), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.NAVI, 100), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.FULLSCREEN, 1000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.MODAL, 2000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.PLUGINS, 5000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.MESSAGE, 6000), _defineProperty(_BKLAYERD_INDEX_EFAUL, BKLAYERTYPE.POPPER, 8000), _BKLAYERD_INDEX_EFAUL);
1687
+ var BKZIndexManager = /*#__PURE__*/function () {
1688
+ function BKZIndexManager() {
1689
+ _classCallCheck(this, BKZIndexManager);
1690
+ _defineProperty(this, "storageLayerIndexValue", {});
1691
+ this.copyDefaultValue();
1692
+ }
1693
+ /**
1694
+ *
1695
+ * @param type
1696
+ * @returns
1697
+ */
1698
+ _createClass(BKZIndexManager, [{
1699
+ key: "getNextIndex",
1700
+ value: function getNextIndex(type) {
1701
+ if (Object.prototype.hasOwnProperty.call(this.storageLayerIndexValue, type)) {
1702
+ this.storageLayerIndexValue[type] = this.storageLayerIndexValue[type] + 1;
1703
+ return this.storageLayerIndexValue[type];
1704
+ }
1705
+ this.storageLayerIndexValue[BKLAYERTYPE.MODAL] = this.storageLayerIndexValue[BKLAYERTYPE.MODAL] + 1;
1706
+ return this.storageLayerIndexValue[BKLAYERTYPE.MODAL];
1707
+ }
1708
+ /** 获取弹窗类型最新zIndex的值 */
1709
+ }, {
1710
+ key: "getModalNextIndex",
1711
+ value: function getModalNextIndex() {
1712
+ return this.getNextIndex(BKLAYERTYPE.MODAL);
1713
+ }
1714
+ /** 获取Message类型最新zIndex的值 */
1715
+ }, {
1716
+ key: "getMessageNextIndex",
1717
+ value: function getMessageNextIndex() {
1718
+ return this.getNextIndex(BKLAYERTYPE.MESSAGE);
1719
+ }
1720
+ /** 获取全屏类型最新zIndex的值 */
1721
+ }, {
1722
+ key: "getFullScreenNextIndex",
1723
+ value: function getFullScreenNextIndex() {
1724
+ return this.getNextIndex(BKLAYERTYPE.FULLSCREEN);
1725
+ }
1726
+ /** 获取导航类型最新zIndex的值 */
1727
+ }, {
1728
+ key: "getNaviNextIndex",
1729
+ value: function getNaviNextIndex() {
1730
+ return this.getNextIndex(BKLAYERTYPE.NAVI);
1731
+ }
1732
+ /** 获取导航类型最新zIndex的值 */
1733
+ }, {
1734
+ key: "getPopperIndex",
1735
+ value: function getPopperIndex() {
1736
+ return this.getNextIndex(BKLAYERTYPE.POPPER);
1737
+ }
1738
+ /**
1739
+ * 更新自定义默认zIndex配置
1740
+ * @param config 配置项
1741
+ */
1742
+ }, {
1743
+ key: "setDefaultZIndex",
1744
+ value: function setDefaultZIndex(config) {
1745
+ var _this = this;
1746
+ Object.keys(config || {}).forEach(function (key) {
1747
+ if (Object.prototype.hasOwnProperty.call(_this.storageLayerIndexValue.__proto__, key)) {
1748
+ Object.assign(_this.storageLayerIndexValue.__proto__, _defineProperty({}, key, config[key]));
1749
+ }
1750
+ });
1751
+ this.copyDefaultValue();
1752
+ }
1753
+ /**
1754
+ * 重置zIndex
1755
+ * @param config 配置项
1756
+ */
1757
+ }, {
1758
+ key: "resetZIndex",
1759
+ value: function resetZIndex(config) {
1760
+ var _this2 = this;
1761
+ Object.keys(config || {}).forEach(function (key) {
1762
+ if (Object.prototype.hasOwnProperty.call(_this2.storageLayerIndexValue, key)) {
1763
+ Object.assign(_this2.storageLayerIndexValue, _defineProperty({}, key, config[key]));
1764
+ }
1765
+ });
1766
+ }
1767
+ /**
1768
+ * 根据默认设置创建副本
1769
+ */
1770
+ }, {
1771
+ key: "copyDefaultValue",
1772
+ value: function copyDefaultValue() {
1773
+ var properties = Object.keys(BKLAYERD_INDEX_EFAULT_VALUE).reduce(function (props, key) {
1774
+ return Object.assign(props, _defineProperty({}, key, {
1775
+ value: BKLAYERD_INDEX_EFAULT_VALUE[key],
1776
+ writable: true,
1777
+ configurable: true
1778
+ }));
1779
+ }, {});
1780
+ this.storageLayerIndexValue = Object.create(BKLAYERD_INDEX_EFAULT_VALUE, properties);
1781
+ }
1782
+ }]);
1783
+ return BKZIndexManager;
1784
+ }();
1785
+ var bkZIndexManager = new BKZIndexManager();
1786
+ ;// CONCATENATED MODULE: ../../packages/shared/src/mask.ts
2473
1787
 
1788
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1789
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1790
+ var instanceStore = new WeakMap();
1791
+ var activeModal;
1792
+ var loopSetMaskStyle = function loopSetMaskStyle(modal, show) {
1793
+ if (!modal) {
1794
+ return;
1795
+ }
1796
+ if (instanceStore.has(modal)) {
1797
+ var _instanceStore$get = instanceStore.get(modal),
1798
+ _mask = _instanceStore$get.mask,
1799
+ backgroundColor = _instanceStore$get.backgroundColor;
1800
+ _mask === null || _mask === void 0 ? void 0 : _mask.style.setProperty('background-color', show ? 'transparent' : backgroundColor);
1801
+ }
1802
+ };
1803
+ var showMask = function showMask(options) {
1804
+ if (!options.el) {
1805
+ return;
1806
+ }
1807
+ if (!instanceStore.has(options.el)) {
1808
+ instanceStore.set(options.el, _objectSpread(_objectSpread({}, options), {}, {
1809
+ referenceParent: activeModal
1810
+ }));
1811
+ }
1812
+ loopSetMaskStyle(activeModal, options.showMask);
1813
+ activeModal = options.el;
1814
+ };
1815
+ var hideMask = function hideMask(options) {
1816
+ if (options.el && instanceStore.has(options.el)) {
1817
+ var _instanceStore$get2 = instanceStore.get(options.el),
1818
+ referenceParent = _instanceStore$get2.referenceParent;
1819
+ activeModal = referenceParent;
1820
+ loopSetMaskStyle(referenceParent, false);
1821
+ }
1822
+ };
1823
+ var mask = {
1824
+ showMask: showMask,
1825
+ hideMask: hideMask
1826
+ };
1827
+ ;// CONCATENATED MODULE: ../../packages/shared/src/index.ts
2474
1828
 
2475
1829
 
2476
1830
 
@@ -2608,9 +1962,7 @@ function arrayEqual() {
2608
1962
  var __webpack_exports__AlignEnum = __webpack_exports__.oY;
2609
1963
  var __webpack_exports__BKLAYERD_INDEX_EFAULT_VALUE = __webpack_exports__.p3;
2610
1964
  var __webpack_exports__BKLAYERTYPE = __webpack_exports__.Ql;
2611
- var __webpack_exports__BKPopIndexManager = __webpack_exports__.Eo;
2612
1965
  var __webpack_exports__BKPopover = __webpack_exports__.mZ;
2613
- var __webpack_exports__BkMaskManager = __webpack_exports__.Wg;
2614
1966
  var __webpack_exports__DialogTypeEnum = __webpack_exports__._D;
2615
1967
  var __webpack_exports__DirectionEnum = __webpack_exports__.dq;
2616
1968
  var __webpack_exports__EMPTY_OBJ = __webpack_exports__.kT;
@@ -2637,8 +1989,6 @@ var __webpack_exports__ThemeEnum = __webpack_exports__.bY;
2637
1989
  var __webpack_exports__TriggerEnum = __webpack_exports__.os;
2638
1990
  var __webpack_exports__alignType = __webpack_exports__.WW;
2639
1991
  var __webpack_exports__arrayEqual = __webpack_exports__.h6;
2640
- var __webpack_exports__bKMaskManager = __webpack_exports__.Lx;
2641
- var __webpack_exports__bkPopIndexManager = __webpack_exports__.aR;
2642
1992
  var __webpack_exports__bkZIndexManager = __webpack_exports__.ue;
2643
1993
  var __webpack_exports__capitalize = __webpack_exports__.kC;
2644
1994
  var __webpack_exports__checkOverflow = __webpack_exports__.ao;
@@ -2662,6 +2012,7 @@ var __webpack_exports__isFinite = __webpack_exports__.xV;
2662
2012
  var __webpack_exports__isNullOrUndef = __webpack_exports__.sS;
2663
2013
  var __webpack_exports__isObject = __webpack_exports__.Kn;
2664
2014
  var __webpack_exports__lineStyleType = __webpack_exports__.zW;
2015
+ var __webpack_exports__mask = __webpack_exports__.Ax;
2665
2016
  var __webpack_exports__maybeShowTooltip = __webpack_exports__.oq;
2666
2017
  var __webpack_exports__merge = __webpack_exports__.TS;
2667
2018
  var __webpack_exports__mergeIf = __webpack_exports__.NG;
@@ -2686,4 +2037,4 @@ var __webpack_exports__useFormItem = __webpack_exports__.A9;
2686
2037
  var __webpack_exports__valueOrDefault = __webpack_exports__.Be;
2687
2038
  var __webpack_exports__withInstall = __webpack_exports__.nz;
2688
2039
  var __webpack_exports__withInstallProps = __webpack_exports__.B;
2689
- export { __webpack_exports__AlignEnum as AlignEnum, __webpack_exports__BKLAYERD_INDEX_EFAULT_VALUE as BKLAYERD_INDEX_EFAULT_VALUE, __webpack_exports__BKLAYERTYPE as BKLAYERTYPE, __webpack_exports__BKPopIndexManager as BKPopIndexManager, __webpack_exports__BKPopover as BKPopover, __webpack_exports__BkMaskManager as BkMaskManager, __webpack_exports__DialogTypeEnum as DialogTypeEnum, __webpack_exports__DirectionEnum as DirectionEnum, __webpack_exports__EMPTY_OBJ as EMPTY_OBJ, __webpack_exports__InputBehaviorEnum as InputBehaviorEnum, __webpack_exports__InputBehaviorType as InputBehaviorType, __webpack_exports__LineStyleEnum as LineStyleEnum, __webpack_exports__PlacementEnum as PlacementEnum, __webpack_exports__Placements as Placements, __webpack_exports__ProgressEnum as ProgressEnum, __webpack_exports__ProgressStrokeLineCapEnum as ProgressStrokeLineCapEnum, __webpack_exports__ProgressStrokeLineCapType as ProgressStrokeLineCapType, __webpack_exports__ProgressType as ProgressType, __webpack_exports__PropTypes as PropTypes, __webpack_exports__RenderDirectiveEnum as RenderDirectiveEnum, __webpack_exports__RenderType as RenderType, __webpack_exports__SelectedType as SelectedType, __webpack_exports__SelectedTypeEnum as SelectedTypeEnum, __webpack_exports__SizeEnum as SizeEnum, __webpack_exports__SwitcherThemeEnum as SwitcherThemeEnum, __webpack_exports__SwitcherThemeType as SwitcherThemeType, __webpack_exports__TagThemeEnum as TagThemeEnum, __webpack_exports__TagThemeType as TagThemeType, __webpack_exports__ThemeEnum as ThemeEnum, __webpack_exports__TriggerEnum as TriggerEnum, __webpack_exports__alignType as alignType, __webpack_exports__arrayEqual as arrayEqual, __webpack_exports__bKMaskManager as bKMaskManager, __webpack_exports__bkPopIndexManager as bkPopIndexManager, __webpack_exports__bkZIndexManager as bkZIndexManager, __webpack_exports__capitalize as capitalize, __webpack_exports__checkOverflow as checkOverflow, __webpack_exports__classes as classes, __webpack_exports__clone as clone, __webpack_exports__debounce as debounce, __webpack_exports__dialogTypeUnion as dialogTypeUnion, __webpack_exports__directionType as directionType, __webpack_exports__elementsEqual as elementsEqual, __webpack_exports__filterProperty as filterProperty, __webpack_exports__finiteOrDefault as finiteOrDefault, __webpack_exports__formItemKey as formItemKey, __webpack_exports__formKey as formKey, __webpack_exports__getPopContainerId as getPopContainerId, __webpack_exports__hasOverflowEllipsis as hasOverflowEllipsis, __webpack_exports__isArray as isArray, __webpack_exports__isElement as isElement, __webpack_exports__isEmpty as isEmpty, __webpack_exports__isEmptyObj as isEmptyObj, __webpack_exports__isFinite as isFinite, __webpack_exports__isNullOrUndef as isNullOrUndef, __webpack_exports__isObject as isObject, __webpack_exports__lineStyleType as lineStyleType, __webpack_exports__maybeShowTooltip as maybeShowTooltip, __webpack_exports__merge as merge, __webpack_exports__mergeIf as mergeIf, __webpack_exports__mergerFn as mergerFn, __webpack_exports__mergerIfFn as mergerIfFn, __webpack_exports__noop as noop, __webpack_exports__observerResize as observerResize, __webpack_exports__off as off, __webpack_exports__on as on, __webpack_exports__placementType as placementType, __webpack_exports__random as random, __webpack_exports__renderDirectiveType as renderDirectiveType, __webpack_exports__renderEmptyVNode as renderEmptyVNode, __webpack_exports__renderType as renderType, __webpack_exports__resolveClassName as resolveClassName, __webpack_exports__scrollTop as scrollTop, __webpack_exports__scrollbarWidth as scrollbarWidth, __webpack_exports__stringEnum as stringEnum, __webpack_exports__triggerType as triggerType, __webpack_exports__useForm as useForm, __webpack_exports__useFormItem as useFormItem, __webpack_exports__valueOrDefault as valueOrDefault, __webpack_exports__withInstall as withInstall, __webpack_exports__withInstallProps as withInstallProps };
2040
+ export { __webpack_exports__AlignEnum as AlignEnum, __webpack_exports__BKLAYERD_INDEX_EFAULT_VALUE as BKLAYERD_INDEX_EFAULT_VALUE, __webpack_exports__BKLAYERTYPE as BKLAYERTYPE, __webpack_exports__BKPopover as BKPopover, __webpack_exports__DialogTypeEnum as DialogTypeEnum, __webpack_exports__DirectionEnum as DirectionEnum, __webpack_exports__EMPTY_OBJ as EMPTY_OBJ, __webpack_exports__InputBehaviorEnum as InputBehaviorEnum, __webpack_exports__InputBehaviorType as InputBehaviorType, __webpack_exports__LineStyleEnum as LineStyleEnum, __webpack_exports__PlacementEnum as PlacementEnum, __webpack_exports__Placements as Placements, __webpack_exports__ProgressEnum as ProgressEnum, __webpack_exports__ProgressStrokeLineCapEnum as ProgressStrokeLineCapEnum, __webpack_exports__ProgressStrokeLineCapType as ProgressStrokeLineCapType, __webpack_exports__ProgressType as ProgressType, __webpack_exports__PropTypes as PropTypes, __webpack_exports__RenderDirectiveEnum as RenderDirectiveEnum, __webpack_exports__RenderType as RenderType, __webpack_exports__SelectedType as SelectedType, __webpack_exports__SelectedTypeEnum as SelectedTypeEnum, __webpack_exports__SizeEnum as SizeEnum, __webpack_exports__SwitcherThemeEnum as SwitcherThemeEnum, __webpack_exports__SwitcherThemeType as SwitcherThemeType, __webpack_exports__TagThemeEnum as TagThemeEnum, __webpack_exports__TagThemeType as TagThemeType, __webpack_exports__ThemeEnum as ThemeEnum, __webpack_exports__TriggerEnum as TriggerEnum, __webpack_exports__alignType as alignType, __webpack_exports__arrayEqual as arrayEqual, __webpack_exports__bkZIndexManager as bkZIndexManager, __webpack_exports__capitalize as capitalize, __webpack_exports__checkOverflow as checkOverflow, __webpack_exports__classes as classes, __webpack_exports__clone as clone, __webpack_exports__debounce as debounce, __webpack_exports__dialogTypeUnion as dialogTypeUnion, __webpack_exports__directionType as directionType, __webpack_exports__elementsEqual as elementsEqual, __webpack_exports__filterProperty as filterProperty, __webpack_exports__finiteOrDefault as finiteOrDefault, __webpack_exports__formItemKey as formItemKey, __webpack_exports__formKey as formKey, __webpack_exports__getPopContainerId as getPopContainerId, __webpack_exports__hasOverflowEllipsis as hasOverflowEllipsis, __webpack_exports__isArray as isArray, __webpack_exports__isElement as isElement, __webpack_exports__isEmpty as isEmpty, __webpack_exports__isEmptyObj as isEmptyObj, __webpack_exports__isFinite as isFinite, __webpack_exports__isNullOrUndef as isNullOrUndef, __webpack_exports__isObject as isObject, __webpack_exports__lineStyleType as lineStyleType, __webpack_exports__mask as mask, __webpack_exports__maybeShowTooltip as maybeShowTooltip, __webpack_exports__merge as merge, __webpack_exports__mergeIf as mergeIf, __webpack_exports__mergerFn as mergerFn, __webpack_exports__mergerIfFn as mergerIfFn, __webpack_exports__noop as noop, __webpack_exports__observerResize as observerResize, __webpack_exports__off as off, __webpack_exports__on as on, __webpack_exports__placementType as placementType, __webpack_exports__random as random, __webpack_exports__renderDirectiveType as renderDirectiveType, __webpack_exports__renderEmptyVNode as renderEmptyVNode, __webpack_exports__renderType as renderType, __webpack_exports__resolveClassName as resolveClassName, __webpack_exports__scrollTop as scrollTop, __webpack_exports__scrollbarWidth as scrollbarWidth, __webpack_exports__stringEnum as stringEnum, __webpack_exports__triggerType as triggerType, __webpack_exports__useForm as useForm, __webpack_exports__useFormItem as useFormItem, __webpack_exports__valueOrDefault as valueOrDefault, __webpack_exports__withInstall as withInstall, __webpack_exports__withInstallProps as withInstallProps };