bkui-vue 0.0.1-beta.387 → 0.0.1-beta.389

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 (150) hide show
  1. package/dist/index.cjs.js +22 -22
  2. package/dist/index.esm.js +1 -0
  3. package/dist/index.umd.js +23 -23
  4. package/lib/affix/index.js +353 -1
  5. package/lib/alert/index.js +251 -1
  6. package/lib/animate-number/index.js +226 -1
  7. package/lib/backtop/index.js +260 -1
  8. package/lib/badge/index.js +274 -1
  9. package/lib/breadcrumb/index.js +329 -1
  10. package/lib/button/index.js +371 -1
  11. package/lib/card/index.js +326 -1
  12. package/lib/cascader/index.js +2168 -1
  13. package/lib/checkbox/index.js +571 -1
  14. package/lib/code-diff/index.js +5520 -1
  15. package/lib/collapse/index.js +698 -1
  16. package/lib/color-picker/index.js +2816 -1
  17. package/lib/components.js +759 -1
  18. package/lib/container/index.js +369 -1
  19. package/lib/date-picker/index.js +5601 -1
  20. package/lib/dialog/index.js +545 -1
  21. package/lib/directives/index.js +1428 -2
  22. package/lib/dist.index.js +166 -1
  23. package/lib/divider/index.js +512 -1
  24. package/lib/dropdown/index.js +414 -1
  25. package/lib/exception/index.js +405 -1
  26. package/lib/fixed-navbar/index.js +214 -1
  27. package/lib/form/index.js +986 -1
  28. package/lib/icon/angle-double-down-line.js +426 -1
  29. package/lib/icon/angle-double-left-line.js +426 -1
  30. package/lib/icon/angle-double-left.js +426 -1
  31. package/lib/icon/angle-double-right-line.js +426 -1
  32. package/lib/icon/angle-double-right.js +426 -1
  33. package/lib/icon/angle-double-up-line.js +426 -1
  34. package/lib/icon/angle-down-fill.js +426 -1
  35. package/lib/icon/angle-down-line.js +426 -1
  36. package/lib/icon/angle-down.js +426 -1
  37. package/lib/icon/angle-left.js +426 -1
  38. package/lib/icon/angle-right.js +426 -1
  39. package/lib/icon/angle-up-fill.js +426 -1
  40. package/lib/icon/angle-up.js +426 -1
  41. package/lib/icon/archive-fill.js +426 -1
  42. package/lib/icon/arrows-left.js +426 -1
  43. package/lib/icon/arrows-right.js +426 -1
  44. package/lib/icon/audio-fill.js +426 -1
  45. package/lib/icon/bk.js +426 -1
  46. package/lib/icon/circle.js +426 -1
  47. package/lib/icon/close-line.js +426 -1
  48. package/lib/icon/close.js +426 -1
  49. package/lib/icon/code.js +426 -1
  50. package/lib/icon/cog-shape.js +426 -1
  51. package/lib/icon/collapse-left.js +426 -1
  52. package/lib/icon/copy.js +426 -1
  53. package/lib/icon/data-shape.js +426 -1
  54. package/lib/icon/del.js +426 -1
  55. package/lib/icon/doc-fill.js +426 -1
  56. package/lib/icon/done.js +426 -1
  57. package/lib/icon/down-shape.js +426 -1
  58. package/lib/icon/down-small.js +426 -1
  59. package/lib/icon/edit-line.js +426 -1
  60. package/lib/icon/ellipsis.js +426 -1
  61. package/lib/icon/enlarge-line.js +426 -1
  62. package/lib/icon/error.js +426 -1
  63. package/lib/icon/excel-fill.js +426 -1
  64. package/lib/icon/exclamation-circle-shape.js +426 -1
  65. package/lib/icon/eye.js +426 -1
  66. package/lib/icon/filliscreen-line.js +426 -1
  67. package/lib/icon/folder-open.js +426 -1
  68. package/lib/icon/folder-shape-open.js +426 -1
  69. package/lib/icon/folder-shape.js +426 -1
  70. package/lib/icon/folder.js +426 -1
  71. package/lib/icon/funnel.js +426 -1
  72. package/lib/icon/help-document-fill.js +426 -1
  73. package/lib/icon/help-fill.js +426 -1
  74. package/lib/icon/help.js +426 -1
  75. package/lib/icon/image-fill.js +426 -1
  76. package/lib/icon/img-placehoulder.js +448 -1
  77. package/lib/icon/index.js +2275 -1
  78. package/lib/icon/info-line.js +448 -1
  79. package/lib/icon/info.js +448 -1
  80. package/lib/icon/left-shape.js +448 -1
  81. package/lib/icon/left-turn-line.js +448 -1
  82. package/lib/icon/narrow-line.js +448 -1
  83. package/lib/icon/original.js +448 -1
  84. package/lib/icon/pdf-fill.js +448 -1
  85. package/lib/icon/play-shape.js +448 -1
  86. package/lib/icon/plus.js +448 -1
  87. package/lib/icon/ppt-fill.js +448 -1
  88. package/lib/icon/qq.js +448 -1
  89. package/lib/icon/right-shape.js +448 -1
  90. package/lib/icon/right-turn-line.js +448 -1
  91. package/lib/icon/search.js +448 -1
  92. package/lib/icon/share.js +448 -1
  93. package/lib/icon/spinner.js +448 -1
  94. package/lib/icon/success.js +448 -1
  95. package/lib/icon/switcher-loading.js +448 -1
  96. package/lib/icon/text-file.js +448 -1
  97. package/lib/icon/text-fill.js +448 -1
  98. package/lib/icon/transfer.js +448 -1
  99. package/lib/icon/tree-application-shape.js +448 -1
  100. package/lib/icon/unfull-screen.js +448 -1
  101. package/lib/icon/unvisible.js +448 -1
  102. package/lib/icon/up-shape.js +448 -1
  103. package/lib/icon/upload.js +448 -1
  104. package/lib/icon/video-fill.js +448 -1
  105. package/lib/icon/warn.js +448 -1
  106. package/lib/icon/weixin.js +448 -1
  107. package/lib/image/index.js +873 -1
  108. package/lib/index.js +169 -1
  109. package/lib/info-box/index.js +1784 -1
  110. package/lib/input/index.js +846 -1
  111. package/lib/link/index.js +226 -1
  112. package/lib/loading/index.js +309 -1
  113. package/lib/menu/index.js +796 -1
  114. package/lib/message/index.js +401 -1
  115. package/lib/modal/index.js +395 -1
  116. package/lib/navigation/index.js +431 -1
  117. package/lib/notify/index.js +430 -1
  118. package/lib/overflow-title/index.js +512 -1
  119. package/lib/pagination/index.js +1026 -1
  120. package/lib/plugin-popover/index.js +2448 -1
  121. package/lib/plugins/index.js +130 -1
  122. package/lib/popover/index.js +2454 -1
  123. package/lib/popover2/index.js +172 -1
  124. package/lib/preset.js +129 -1
  125. package/lib/process/index.js +1417 -1
  126. package/lib/progress/index.js +479 -1
  127. package/lib/radio/index.js +649 -1
  128. package/lib/rate/index.js +358 -1
  129. package/lib/resize-layout/index.js +495 -1
  130. package/lib/search-select/index.js +3388 -1
  131. package/lib/select/index.js +2819 -1
  132. package/lib/shared/index.js +2813 -1
  133. package/lib/sideslider/index.js +1362 -1
  134. package/lib/slider/index.js +2060 -1
  135. package/lib/steps/index.js +1504 -1
  136. package/lib/swiper/index.js +374 -1
  137. package/lib/switcher/index.js +308 -1
  138. package/lib/tab/index.js +919 -1
  139. package/lib/table/index.js +6635 -1
  140. package/lib/table-column/index.js +737 -1
  141. package/lib/tag/index.js +278 -1
  142. package/lib/tag-input/index.js +1897 -1
  143. package/lib/time-picker/index.js +142 -1
  144. package/lib/timeline/index.js +315 -1
  145. package/lib/transfer/index.js +658 -1
  146. package/lib/tree/index.js +2917 -1
  147. package/lib/upload/index.js +3735 -1
  148. package/lib/virtual-render/index.js +825 -1
  149. package/package.json +1 -3
  150. package/lib/directives/index.js.LICENSE.txt +0 -14
package/lib/menu/index.js CHANGED
@@ -1 +1,796 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../icon/"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../icon/"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../icon/")):t(e["../shared"],e.vue,e["../icon/"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,((e,t,n)=>(()=>{"use strict";var o={7685:e=>{e.exports=n},4212:t=>{t.exports=e},748:e=>{e.exports=t}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={exports:{}};return o[e](n,n.exports,a),n.exports}a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return(()=>{a.r(l),a.d(l,{BkMenu:()=>x,BkMenuGroup:()=>y,BkMenuItem:()=>m,BkSubmenu:()=>b,default:()=>S});var e=a(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function n(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,n):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var o=a(748),r=Symbol("MENU_PROVIDER_KEY"),i=Symbol("MENU_PROVIDER_KEY_PATH"),u=function(){return(0,o.inject)(r)},c=function(){var e,t=(0,o.getCurrentInstance)(),n=t.parent?t.parent.provides:null===(e=t.vnode.appContext)||void 0===e?void 0:e.provides;return n&&i in n?(0,o.inject)(i):{parentInfo:void 0,parentKeys:(0,o.ref)([])}},s=function(e){return(e||"").split(" ").filter((function(e){return!!e.trim()}))};function d(e,t){if(e&&t){var o=s(t),r=e.getAttribute("class")||"";if(e.classList){var a;(a=e.classList).remove.apply(a,n(o))}else{o.forEach((function(e){r=r.replace(" ".concat(e," ")," ")}));var l=s(r).join(" ");e.setAttribute("class",l)}}}function v(e,t){if(e){var o,r=e.getAttribute("class")||"",a=s(r),l=(t||"").split(" ").filter((function(e){return!a.includes(e)&&!!e.trim()}));e.classList?(o=e.classList).add.apply(o,n(l)):(r+=" ".concat(l.join(" ")),e.setAttribute("class",r))}}var p={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};const f=(0,o.defineComponent)({name:"Menu",props:p,emits:["update:activeKey","update:openKeys","click","openChange"],setup:function(e,t){var a,l=t.slots,i=t.emit,u=t.expose,c=(0,o.ref)(""),s=(0,o.ref)([]),d=(0,o.ref)({}),v=(0,o.computed)((function(){return e.mode})),p=(0,o.ref)(e.collapse),f=(0,o.ref)([]);return(0,o.watchEffect)((function(){void 0!==e.activeKey&&(c.value=e.activeKey)})),(0,o.watch)((function(){return e.collapse}),(function(){p.value=e.collapse;var t=n(f.value),o=n(s.value);s.value=p.value?[]:t,f.value=p.value?o:[]}),{immediate:!0}),(0,o.watch)((function(){return e.openedKeys}),(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.value;s.value=e}),{immediate:!0}),a={activeKey:c,menuStore:d,registerMenuInfo:function(e,t){d.value=Object.assign(Object.assign({},d.value),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,t))},unregisterMenuInfo:function(e){delete d.value[e],d.value=Object.assign({},d.value)},mode:v.value,openedKeys:s,collapse:p,handleOpenChange:function(t,o){o?e.uniqueOpen?s.value=[t]:s.value.push(t):s.value=s.value.filter((function(e){return e!==t})),i("openChange",o,d.value[t]),i("update:openKeys",n(s.value))},handleActiveChange:function(e){c.value=e,i("click",d.value[e]),i("update:activeKey",e,d.value[e])}},(0,o.provide)(r,a),u({activeKey:c,openedKeys:s,menuStore:d}),function(){var e;return(0,o.createVNode)("div",{class:{"bk-menu":!0,"is-collapse":p.value}},[null===(e=l.default)||void 0===e?void 0:e.call(l)])}}}),y=(0,o.defineComponent)({name:"MenuGroup",props:{name:{type:String,default:""}},setup:function(e,t){var n=t.slots;return function(){var t;return(0,o.createVNode)("div",{class:"bk-menu-group"},[(0,o.createVNode)("div",{class:"group-name"},[e.name]),(0,o.createVNode)("ul",{class:"group-wrap"},[null===(t=n.default)||void 0===t?void 0:t.call(n)])])}}}),m=(0,o.defineComponent)({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup:function(e,t){var n,r,a=t.slots,l=t.emit,i=u(),s=i.registerMenuInfo,d=i.unregisterMenuInfo,v=i.activeKey,p=i.handleActiveChange,f=(0,o.getCurrentInstance)(),y=c().parentInfo,m=(null===(r=null===(n=f.vnode.key)||void 0===n?void 0:n.toString)||void 0===r?void 0:r.call(n))||String(f.uid),g=(0,o.computed)((function(){return v.value===m})),h=(0,o.computed)((function(){return e.needIcon}));s(m,{key:m,parentKey:null==y?void 0:y.key});var b=function(e){p(m),l("click",e)};return(0,o.onBeforeUnmount)((function(){return d(m)})),function(){var e,t;return(0,o.createVNode)("li",{class:{"bk-menu-item":!0,"is-active":g.value},onClick:b},[h.value&&(0,o.createVNode)("span",{class:"item-icon"},[(null===(e=null==a?void 0:a.icon)||void 0===e?void 0:e.call(a))||(0,o.createVNode)("i",{class:"default-icon"},null)]),(0,o.createVNode)("span",{class:"item-content"},[null===(t=a.default)||void 0===t?void 0:t.call(a)])])}}});var g=a(7685),h={title:{type:String,default:"title"}};const b=(0,o.defineComponent)({name:"Submenu",props:h,emits:["collapse"],slots:["icon"],setup:function(e,t){var r,a,l=t.slots,s=t.emit,p=u(),f=p.registerMenuInfo,y=p.unregisterMenuInfo,m=p.openedKeys,h=p.handleOpenChange,b=p.collapse,x=p.activeKey,S=p.menuStore,I=c().parentInfo,K=(0,o.getCurrentInstance)(),w=(null===(a=null===(r=K.vnode.key)||void 0===r?void 0:r.toString)||void 0===a?void 0:a.call(r))||String(K.uid),k=(0,o.ref)({css:!0,onBeforeEnter:function(e){v(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:function(e){e.dataset.oldOverflow=e.style.overflow,0!==e.scrollHeight?(e.style.height="".concat(e.scrollHeight,"px"),e.style.maxHeight="".concat(e.scrollHeight,"px")):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:function(e){e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,d(e,"collapse-transition")},onBeforeLeave:function(e){e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height="".concat(e.scrollHeight,"px"),e.style.maxHeight="".concat(e.scrollHeight,"px"),e.style.overflow="hidden"},onLeave:function(e){0!==e.scrollHeight&&(v(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:function(e){d(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),O=(0,o.computed)((function(){return m.value.includes(w)})),j=(0,o.computed)((function(){var e,t,n=null===(t=null===(e=S.value)||void 0===e?void 0:e[x.value])||void 0===t?void 0:t.parentKey;return b.value&&n===w&&O}));!function(e){var t=c(),r=t.parentKeys,a=t.parentInfo,l=(0,o.computed)((function(){return[].concat(n(r.value),[e])}));(0,o.provide)(i,{parentInfo:{key:e,parentKey:null==a?void 0:a.key},parentKeys:l})}(w),f(w,{key:w,parentKey:null==I?void 0:I.key}),(0,o.onBeforeUnmount)((function(){return y(w)}));var A=function(){h(w,!O.value),s("collapse",!O.value,K)};return function(){var t,n;return(0,o.createVNode)("li",{class:{"bk-menu-submenu":!0,"is-opened":O.value}},[(0,o.createVNode)("div",{class:{"submenu-header":!0,"is-collapse":j.value},onClick:A},[(0,o.createVNode)("span",{class:"submenu-header-icon"},[(null===(t=l.icon)||void 0===t?void 0:t.call(l))||(0,o.createVNode)(g.TreeApplicationShape,{class:"menu-icon"},null)]),(0,o.createVNode)("span",{class:"submenu-header-content"},[e.title]),(0,o.createVNode)(g.AngleDown,{class:{"submenu-header-collapse":!0,"is-collapse":m.value.includes(w)}},null)]),(0,o.createVNode)(o.Transition,k.value,{default:function(){return[(0,o.withDirectives)((0,o.createVNode)("ul",{class:"submenu-list"},[null===(n=l.default)||void 0===n?void 0:n.call(l)]),[[o.vShow,O.value]])]}})])}}});var x=(0,e.withInstallProps)(f,{Item:m,Submenu:b,Group:y});const S=x})(),l})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../icon/"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../icon/"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../icon/")) : factory(root["../shared"], root["vue"], root["../icon/"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__7685__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ "use strict";
13
+ /******/ var __webpack_modules__ = ({
14
+
15
+ /***/ 7685:
16
+ /***/ ((module) => {
17
+
18
+ module.exports = __WEBPACK_EXTERNAL_MODULE__7685__;
19
+
20
+ /***/ }),
21
+
22
+ /***/ 4212:
23
+ /***/ ((module) => {
24
+
25
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
26
+
27
+ /***/ }),
28
+
29
+ /***/ 748:
30
+ /***/ ((module) => {
31
+
32
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
33
+
34
+ /***/ })
35
+
36
+ /******/ });
37
+ /************************************************************************/
38
+ /******/ // The module cache
39
+ /******/ var __webpack_module_cache__ = {};
40
+ /******/
41
+ /******/ // The require function
42
+ /******/ function __webpack_require__(moduleId) {
43
+ /******/ // Check if module is in cache
44
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
45
+ /******/ if (cachedModule !== undefined) {
46
+ /******/ return cachedModule.exports;
47
+ /******/ }
48
+ /******/ // Create a new module (and put it into the cache)
49
+ /******/ var module = __webpack_module_cache__[moduleId] = {
50
+ /******/ // no module.id needed
51
+ /******/ // no module.loaded needed
52
+ /******/ exports: {}
53
+ /******/ };
54
+ /******/
55
+ /******/ // Execute the module function
56
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
57
+ /******/
58
+ /******/ // Return the exports of the module
59
+ /******/ return module.exports;
60
+ /******/ }
61
+ /******/
62
+ /************************************************************************/
63
+ /******/ /* webpack/runtime/define property getters */
64
+ /******/ (() => {
65
+ /******/ // define getter functions for harmony exports
66
+ /******/ __webpack_require__.d = (exports, definition) => {
67
+ /******/ for(var key in definition) {
68
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
69
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
70
+ /******/ }
71
+ /******/ }
72
+ /******/ };
73
+ /******/ })();
74
+ /******/
75
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
76
+ /******/ (() => {
77
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
78
+ /******/ })();
79
+ /******/
80
+ /******/ /* webpack/runtime/make namespace object */
81
+ /******/ (() => {
82
+ /******/ // define __esModule on exports
83
+ /******/ __webpack_require__.r = (exports) => {
84
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
85
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
86
+ /******/ }
87
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
88
+ /******/ };
89
+ /******/ })();
90
+ /******/
91
+ /************************************************************************/
92
+ var __webpack_exports__ = {};
93
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
94
+ (() => {
95
+ // ESM COMPAT FLAG
96
+ __webpack_require__.r(__webpack_exports__);
97
+
98
+ // EXPORTS
99
+ __webpack_require__.d(__webpack_exports__, {
100
+ "BkMenu": () => (/* binding */ BkMenu),
101
+ "BkMenuGroup": () => (/* reexport */ menu_group),
102
+ "BkMenuItem": () => (/* reexport */ menu_item),
103
+ "BkSubmenu": () => (/* reexport */ submenu),
104
+ "default": () => (/* binding */ src)
105
+ });
106
+
107
+ // EXTERNAL MODULE: external "../shared"
108
+ var external_shared_ = __webpack_require__(4212);
109
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
110
+ function _defineProperty(obj, key, value) {
111
+ if (key in obj) {
112
+ Object.defineProperty(obj, key, {
113
+ value: value,
114
+ enumerable: true,
115
+ configurable: true,
116
+ writable: true
117
+ });
118
+ } else {
119
+ obj[key] = value;
120
+ }
121
+
122
+ return obj;
123
+ }
124
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
125
+ function _arrayLikeToArray(arr, len) {
126
+ if (len == null || len > arr.length) len = arr.length;
127
+
128
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
129
+ arr2[i] = arr[i];
130
+ }
131
+
132
+ return arr2;
133
+ }
134
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
135
+
136
+ function _arrayWithoutHoles(arr) {
137
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
138
+ }
139
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
140
+ function _iterableToArray(iter) {
141
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
142
+ }
143
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
144
+
145
+ function _unsupportedIterableToArray(o, minLen) {
146
+ if (!o) return;
147
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
148
+ var n = Object.prototype.toString.call(o).slice(8, -1);
149
+ if (n === "Object" && o.constructor) n = o.constructor.name;
150
+ if (n === "Map" || n === "Set") return Array.from(o);
151
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
152
+ }
153
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
154
+ function _nonIterableSpread() {
155
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
156
+ }
157
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
158
+
159
+
160
+
161
+
162
+ function _toConsumableArray(arr) {
163
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
164
+ }
165
+ // EXTERNAL MODULE: external "vue"
166
+ var external_vue_ = __webpack_require__(748);
167
+ ;// CONCATENATED MODULE: ../../packages/menu/src/utils.ts
168
+
169
+
170
+ /* eslint-disable no-param-reassign */
171
+
172
+ /*
173
+ * Tencent is pleased to support the open source community by making
174
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
175
+ *
176
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
177
+ *
178
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
179
+ *
180
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
181
+ *
182
+ * ---------------------------------------------------
183
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
184
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
185
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
186
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
187
+ *
188
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
189
+ * the Software.
190
+ *
191
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
192
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
193
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
194
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
195
+ * IN THE SOFTWARE.
196
+ */
197
+
198
+ var MENU_PROVIDER_KEY = Symbol('MENU_PROVIDER_KEY');
199
+ var MENU_PROVIDER_KEY_PATH = Symbol('MENU_PROVIDER_KEY_PATH');
200
+ var useMenuProvider = function useMenuProvider(data) {
201
+ (0,external_vue_.provide)(MENU_PROVIDER_KEY, data);
202
+ };
203
+ var useMenuPathProvider = function useMenuPathProvider(key) {
204
+ var _useMenuPathInject = useMenuPathInject(),
205
+ parentKeys = _useMenuPathInject.parentKeys,
206
+ parentInfo = _useMenuPathInject.parentInfo;
207
+
208
+ var keys = (0,external_vue_.computed)(function () {
209
+ return [].concat(_toConsumableArray(parentKeys.value), [key]);
210
+ });
211
+ (0,external_vue_.provide)(MENU_PROVIDER_KEY_PATH, {
212
+ parentInfo: {
213
+ key: key,
214
+ parentKey: parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.key
215
+ },
216
+ parentKeys: keys
217
+ });
218
+ };
219
+ var useMenuInject = function useMenuInject() {
220
+ return (0,external_vue_.inject)(MENU_PROVIDER_KEY);
221
+ };
222
+ var useMenuPathInject = function useMenuPathInject() {
223
+ var _a;
224
+
225
+ var instance = (0,external_vue_.getCurrentInstance)();
226
+ var provides = !instance.parent ? (_a = instance.vnode.appContext) === null || _a === void 0 ? void 0 : _a.provides : instance.parent.provides;
227
+
228
+ if (provides && MENU_PROVIDER_KEY_PATH in provides) {
229
+ return (0,external_vue_.inject)(MENU_PROVIDER_KEY_PATH);
230
+ }
231
+
232
+ return {
233
+ parentInfo: undefined,
234
+ parentKeys: (0,external_vue_.ref)([])
235
+ };
236
+ };
237
+
238
+ var trimArr = function trimArr(s) {
239
+ return (s || '').split(' ').filter(function (item) {
240
+ return !!item.trim();
241
+ });
242
+ };
243
+
244
+ function removeClass(el, cls) {
245
+ if (!el || !cls) return;
246
+ var classes = trimArr(cls);
247
+ var curClass = el.getAttribute('class') || '';
248
+
249
+ if (el.classList) {
250
+ var _el$classList;
251
+
252
+ (_el$classList = el.classList).remove.apply(_el$classList, _toConsumableArray(classes));
253
+
254
+ return;
255
+ }
256
+
257
+ classes.forEach(function (item) {
258
+ curClass = curClass.replace(" ".concat(item, " "), ' ');
259
+ });
260
+ var className = trimArr(curClass).join(' ');
261
+ el.setAttribute('class', className);
262
+ }
263
+ /* istanbul ignore next */
264
+
265
+ function addClass(el, cls) {
266
+ if (!el) return;
267
+ var className = el.getAttribute('class') || '';
268
+ var curClass = trimArr(className);
269
+ var classes = (cls || '').split(' ').filter(function (item) {
270
+ return !curClass.includes(item) && !!item.trim();
271
+ });
272
+
273
+ if (el.classList) {
274
+ var _el$classList2;
275
+
276
+ (_el$classList2 = el.classList).add.apply(_el$classList2, _toConsumableArray(classes));
277
+ } else {
278
+ className += " ".concat(classes.join(' '));
279
+ el.setAttribute('class', className);
280
+ }
281
+ }
282
+ var collapseMotion = function collapseMotion() {
283
+ return {
284
+ css: true,
285
+ onBeforeEnter: function onBeforeEnter(el) {
286
+ addClass(el, 'collapse-transition');
287
+ if (!el.dataset) el.dataset = {};
288
+ el.style.height = '0px';
289
+ el.style.maxHeight = '0px';
290
+ },
291
+ onEnter: function onEnter(el) {
292
+ el.dataset.oldOverflow = el.style.overflow;
293
+
294
+ if (el.scrollHeight !== 0) {
295
+ el.style.height = "".concat(el.scrollHeight, "px");
296
+ el.style.maxHeight = "".concat(el.scrollHeight, "px");
297
+ } else {
298
+ el.style.height = '0px';
299
+ el.style.maxHeight = '0px';
300
+ }
301
+
302
+ el.style.overflow = 'hidden';
303
+ },
304
+ onAfterEnter: function onAfterEnter(el) {
305
+ el.style.height = '';
306
+ el.style.maxHeight = '';
307
+ el.style.overflow = el.dataset.oldOverflow;
308
+ removeClass(el, 'collapse-transition');
309
+ },
310
+ onBeforeLeave: function onBeforeLeave(el) {
311
+ if (!el.dataset) el.dataset = {};
312
+ el.dataset.oldOverflow = el.style.overflow;
313
+ el.style.height = "".concat(el.scrollHeight, "px");
314
+ el.style.maxHeight = "".concat(el.scrollHeight, "px");
315
+ el.style.overflow = 'hidden';
316
+ },
317
+ onLeave: function onLeave(el) {
318
+ if (el.scrollHeight !== 0) {
319
+ addClass(el, 'collapse-transition');
320
+ el.style.transitionProperty = 'height';
321
+ el.style.height = '0px';
322
+ el.style.maxHeight = '0px';
323
+ }
324
+ },
325
+ onAfterLeave: function onAfterLeave(el) {
326
+ removeClass(el, 'collapse-transition');
327
+ el.style.height = '';
328
+ el.style.maxHeight = '';
329
+ el.style.overflow = el.dataset.oldOverflow;
330
+ }
331
+ };
332
+ };
333
+ ;// CONCATENATED MODULE: ../../packages/menu/src/menu.tsx
334
+
335
+
336
+
337
+
338
+ /*
339
+ * Tencent is pleased to support the open source community by making
340
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
341
+ *
342
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
343
+ *
344
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
345
+ *
346
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
347
+ *
348
+ * ---------------------------------------------------
349
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
350
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
351
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
352
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
353
+ *
354
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
355
+ * the Software.
356
+ *
357
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
358
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
359
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
360
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
361
+ * IN THE SOFTWARE.
362
+ */
363
+
364
+
365
+ var menuProps = {
366
+ activeKey: String,
367
+ collapse: Boolean,
368
+ openedKeys: {
369
+ type: Array
370
+ },
371
+ mode: {
372
+ type: String,
373
+ "default": 'vertical'
374
+ },
375
+ uniqueOpen: {
376
+ type: Boolean,
377
+ "default": true
378
+ }
379
+ };
380
+ /* harmony default export */ const menu = ((0,external_vue_.defineComponent)({
381
+ name: 'Menu',
382
+ props: menuProps,
383
+ emits: ['update:activeKey', 'update:openKeys', 'click', 'openChange'],
384
+ setup: function setup(props, _ref) {
385
+ var slots = _ref.slots,
386
+ emit = _ref.emit,
387
+ expose = _ref.expose;
388
+ var activeKey = (0,external_vue_.ref)('');
389
+ var openedKeys = (0,external_vue_.ref)([]);
390
+ var menuStore = (0,external_vue_.ref)({});
391
+ var mode = (0,external_vue_.computed)(function () {
392
+ return props.mode;
393
+ });
394
+ var collapse = (0,external_vue_.ref)(props.collapse);
395
+ var oldOpenKeys = (0,external_vue_.ref)([]);
396
+ (0,external_vue_.watchEffect)(function () {
397
+ if (props.activeKey !== undefined) {
398
+ activeKey.value = props.activeKey;
399
+ }
400
+ });
401
+ (0,external_vue_.watch)(function () {
402
+ return props.collapse;
403
+ }, function () {
404
+ collapse.value = props.collapse;
405
+
406
+ var oldKeys = _toConsumableArray(oldOpenKeys.value);
407
+
408
+ var openKeys = _toConsumableArray(openedKeys.value);
409
+
410
+ openedKeys.value = collapse.value ? [] : oldKeys;
411
+ oldOpenKeys.value = collapse.value ? openKeys : [];
412
+ }, {
413
+ immediate: true
414
+ });
415
+ (0,external_vue_.watch)(function () {
416
+ return props.openedKeys;
417
+ }, function () {
418
+ var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : openedKeys.value;
419
+ openedKeys.value = keys;
420
+ }, {
421
+ immediate: true
422
+ });
423
+
424
+ var registerMenuInfo = function registerMenuInfo(key, info) {
425
+ menuStore.value = Object.assign(Object.assign({}, menuStore.value), _defineProperty({}, key, info));
426
+ };
427
+
428
+ var unregisterMenuInfo = function unregisterMenuInfo(key) {
429
+ delete menuStore.value[key];
430
+ menuStore.value = Object.assign({}, menuStore.value);
431
+ };
432
+
433
+ var handleOpenChange = function handleOpenChange(key, opened) {
434
+ if (opened) {
435
+ if (props.uniqueOpen) {
436
+ openedKeys.value = [key];
437
+ } else openedKeys.value.push(key);
438
+ } else {
439
+ openedKeys.value = openedKeys.value.filter(function (v) {
440
+ return v !== key;
441
+ });
442
+ }
443
+
444
+ emit('openChange', opened, menuStore.value[key]);
445
+ emit('update:openKeys', _toConsumableArray(openedKeys.value));
446
+ };
447
+
448
+ var handleActiveChange = function handleActiveChange(key) {
449
+ activeKey.value = key;
450
+ emit('click', menuStore.value[key]);
451
+ emit('update:activeKey', key, menuStore.value[key]);
452
+ };
453
+
454
+ useMenuProvider({
455
+ activeKey: activeKey,
456
+ menuStore: menuStore,
457
+ registerMenuInfo: registerMenuInfo,
458
+ unregisterMenuInfo: unregisterMenuInfo,
459
+ mode: mode.value,
460
+ openedKeys: openedKeys,
461
+ collapse: collapse,
462
+ handleOpenChange: handleOpenChange,
463
+ handleActiveChange: handleActiveChange
464
+ });
465
+ expose({
466
+ activeKey: activeKey,
467
+ openedKeys: openedKeys,
468
+ menuStore: menuStore
469
+ });
470
+ return function () {
471
+ var _a;
472
+
473
+ return (0,external_vue_.createVNode)("div", {
474
+ "class": {
475
+ 'bk-menu': true,
476
+ 'is-collapse': collapse.value
477
+ }
478
+ }, [(_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots)]);
479
+ };
480
+ }
481
+ }));
482
+ ;// CONCATENATED MODULE: ../../packages/menu/src/menu-group.tsx
483
+
484
+
485
+ /*
486
+ * Tencent is pleased to support the open source community by making
487
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
488
+ *
489
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
490
+ *
491
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
492
+ *
493
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
494
+ *
495
+ * ---------------------------------------------------
496
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
497
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
498
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
499
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
500
+ *
501
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
502
+ * the Software.
503
+ *
504
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
505
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
506
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
507
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
508
+ * IN THE SOFTWARE.
509
+ */
510
+
511
+ /* harmony default export */ const menu_group = ((0,external_vue_.defineComponent)({
512
+ name: 'MenuGroup',
513
+ props: {
514
+ name: {
515
+ type: String,
516
+ "default": ''
517
+ }
518
+ },
519
+ setup: function setup(props, _ref) {
520
+ var slots = _ref.slots;
521
+ return function () {
522
+ var _a;
523
+
524
+ return (0,external_vue_.createVNode)("div", {
525
+ "class": "bk-menu-group"
526
+ }, [(0,external_vue_.createVNode)("div", {
527
+ "class": "group-name"
528
+ }, [props.name]), (0,external_vue_.createVNode)("ul", {
529
+ "class": "group-wrap"
530
+ }, [(_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots)])]);
531
+ };
532
+ }
533
+ }));
534
+ ;// CONCATENATED MODULE: ../../packages/menu/src/menu-item.tsx
535
+
536
+
537
+ /*
538
+ * Tencent is pleased to support the open source community by making
539
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
540
+ *
541
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
542
+ *
543
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
544
+ *
545
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
546
+ *
547
+ * ---------------------------------------------------
548
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
549
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
550
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
551
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
552
+ *
553
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
554
+ * the Software.
555
+ *
556
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
557
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
558
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
559
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
560
+ * IN THE SOFTWARE.
561
+ */
562
+
563
+
564
+ /* harmony default export */ const menu_item = ((0,external_vue_.defineComponent)({
565
+ name: 'MenuItem',
566
+ props: {
567
+ needIcon: {
568
+ type: Boolean,
569
+ "default": true
570
+ }
571
+ },
572
+ emits: ['click'],
573
+ slots: ['icon'],
574
+ setup: function setup(props, _ref) {
575
+ var slots = _ref.slots,
576
+ emit = _ref.emit;
577
+
578
+ var _a, _b;
579
+
580
+ var _useMenuInject = useMenuInject(),
581
+ registerMenuInfo = _useMenuInject.registerMenuInfo,
582
+ unregisterMenuInfo = _useMenuInject.unregisterMenuInfo,
583
+ activeKey = _useMenuInject.activeKey,
584
+ handleActiveChange = _useMenuInject.handleActiveChange;
585
+
586
+ var instance = (0,external_vue_.getCurrentInstance)();
587
+
588
+ var _useMenuPathInject = useMenuPathInject(),
589
+ parentInfo = _useMenuPathInject.parentInfo;
590
+
591
+ var key = ((_b = (_a = instance.vnode.key) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) || String(instance.uid);
592
+ var isActive = (0,external_vue_.computed)(function () {
593
+ return activeKey.value === key;
594
+ });
595
+ var needIcon = (0,external_vue_.computed)(function () {
596
+ return props.needIcon;
597
+ });
598
+ registerMenuInfo(key, {
599
+ key: key,
600
+ parentKey: parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.key
601
+ });
602
+
603
+ var handleClick = function handleClick(e) {
604
+ handleActiveChange(key);
605
+ emit('click', e);
606
+ };
607
+
608
+ (0,external_vue_.onBeforeUnmount)(function () {
609
+ return unregisterMenuInfo(key);
610
+ });
611
+ return function () {
612
+ var _a, _b;
613
+
614
+ return (0,external_vue_.createVNode)("li", {
615
+ "class": {
616
+ 'bk-menu-item': true,
617
+ 'is-active': isActive.value
618
+ },
619
+ "onClick": handleClick
620
+ }, [needIcon.value && (0,external_vue_.createVNode)("span", {
621
+ "class": "item-icon"
622
+ }, [((_a = slots === null || slots === void 0 ? void 0 : slots.icon) === null || _a === void 0 ? void 0 : _a.call(slots)) || (0,external_vue_.createVNode)("i", {
623
+ "class": "default-icon"
624
+ }, null)]), (0,external_vue_.createVNode)("span", {
625
+ "class": "item-content"
626
+ }, [(_b = slots["default"]) === null || _b === void 0 ? void 0 : _b.call(slots)])]);
627
+ };
628
+ }
629
+ }));
630
+ // EXTERNAL MODULE: external "../icon/"
631
+ var _ = __webpack_require__(7685);
632
+ ;// CONCATENATED MODULE: ../../packages/menu/src/submenu.tsx
633
+
634
+
635
+ /*
636
+ * Tencent is pleased to support the open source community by making
637
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
638
+ *
639
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
640
+ *
641
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
642
+ *
643
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
644
+ *
645
+ * ---------------------------------------------------
646
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
647
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
648
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
649
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
650
+ *
651
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
652
+ * the Software.
653
+ *
654
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
655
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
656
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
657
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
658
+ * IN THE SOFTWARE.
659
+ */
660
+
661
+
662
+
663
+ var subMenuProps = {
664
+ title: {
665
+ type: String,
666
+ "default": 'title'
667
+ }
668
+ };
669
+ /* harmony default export */ const submenu = ((0,external_vue_.defineComponent)({
670
+ name: 'Submenu',
671
+ props: subMenuProps,
672
+ emits: ['collapse'],
673
+ slots: ['icon'],
674
+ setup: function setup(props, _ref) {
675
+ var slots = _ref.slots,
676
+ emit = _ref.emit;
677
+
678
+ var _a, _b;
679
+
680
+ var _useMenuInject = useMenuInject(),
681
+ registerMenuInfo = _useMenuInject.registerMenuInfo,
682
+ unregisterMenuInfo = _useMenuInject.unregisterMenuInfo,
683
+ openedKeys = _useMenuInject.openedKeys,
684
+ handleOpenChange = _useMenuInject.handleOpenChange,
685
+ collapse = _useMenuInject.collapse,
686
+ activeKey = _useMenuInject.activeKey,
687
+ menuStore = _useMenuInject.menuStore;
688
+
689
+ var _useMenuPathInject = useMenuPathInject(),
690
+ parentInfo = _useMenuPathInject.parentInfo;
691
+
692
+ var instance = (0,external_vue_.getCurrentInstance)();
693
+ var key = ((_b = (_a = instance.vnode.key) === null || _a === void 0 ? void 0 : _a.toString) === null || _b === void 0 ? void 0 : _b.call(_a)) || String(instance.uid);
694
+ var transition = (0,external_vue_.ref)(collapseMotion());
695
+ var isShow = (0,external_vue_.computed)(function () {
696
+ return openedKeys.value.includes(key);
697
+ });
698
+ var specialCollapse = (0,external_vue_.computed)(function () {
699
+ var _a, _b;
700
+
701
+ var activeParentKey = (_b = (_a = menuStore.value) === null || _a === void 0 ? void 0 : _a[activeKey.value]) === null || _b === void 0 ? void 0 : _b.parentKey;
702
+ return collapse.value && activeParentKey === key && isShow;
703
+ });
704
+ useMenuPathProvider(key);
705
+ registerMenuInfo(key, {
706
+ key: key,
707
+ parentKey: parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.key
708
+ });
709
+ (0,external_vue_.onBeforeUnmount)(function () {
710
+ return unregisterMenuInfo(key);
711
+ });
712
+
713
+ var handleCollapse = function handleCollapse() {
714
+ handleOpenChange(key, !isShow.value);
715
+ emit('collapse', !isShow.value, instance);
716
+ };
717
+
718
+ return function () {
719
+ var _a, _b;
720
+
721
+ return (0,external_vue_.createVNode)("li", {
722
+ "class": {
723
+ 'bk-menu-submenu': true,
724
+ 'is-opened': isShow.value
725
+ }
726
+ }, [(0,external_vue_.createVNode)("div", {
727
+ "class": {
728
+ 'submenu-header': true,
729
+ 'is-collapse': specialCollapse.value
730
+ },
731
+ "onClick": handleCollapse
732
+ }, [(0,external_vue_.createVNode)("span", {
733
+ "class": "submenu-header-icon"
734
+ }, [((_a = slots.icon) === null || _a === void 0 ? void 0 : _a.call(slots)) || (0,external_vue_.createVNode)(_.TreeApplicationShape, {
735
+ "class": "menu-icon"
736
+ }, null)]), (0,external_vue_.createVNode)("span", {
737
+ "class": "submenu-header-content"
738
+ }, [props.title]), (0,external_vue_.createVNode)(_.AngleDown, {
739
+ "class": {
740
+ 'submenu-header-collapse': true,
741
+ 'is-collapse': openedKeys.value.includes(key)
742
+ }
743
+ }, null)]), (0,external_vue_.createVNode)(external_vue_.Transition, transition.value, {
744
+ "default": function _default() {
745
+ return [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("ul", {
746
+ "class": "submenu-list"
747
+ }, [(_b = slots["default"]) === null || _b === void 0 ? void 0 : _b.call(slots)]), [[external_vue_.vShow, isShow.value]])];
748
+ }
749
+ })]);
750
+ };
751
+ }
752
+ }));
753
+ ;// CONCATENATED MODULE: ../../packages/menu/src/index.ts
754
+ /*
755
+ * Tencent is pleased to support the open source community by making
756
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
757
+ *
758
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
759
+ *
760
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
761
+ *
762
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
763
+ *
764
+ * ---------------------------------------------------
765
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
766
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
767
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
768
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
769
+ *
770
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
771
+ * the Software.
772
+ *
773
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
774
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
775
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
776
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
777
+ * IN THE SOFTWARE.
778
+ */
779
+
780
+
781
+
782
+
783
+
784
+ var BkMenu = (0,external_shared_.withInstallProps)(menu, {
785
+ Item: menu_item,
786
+ Submenu: submenu,
787
+ Group: menu_group
788
+ });
789
+ /* harmony default export */ const src = (BkMenu);
790
+
791
+ })();
792
+
793
+ /******/ return __webpack_exports__;
794
+ /******/ })()
795
+ ;
796
+ });