bkui-vue 0.0.2-beta.36 → 0.0.2-beta.37

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