bkui-vue 0.0.2-beta.72 → 0.0.2-beta.74

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 (170) hide show
  1. package/lib/affix/index.js +319 -1
  2. package/lib/alert/index.js +215 -1
  3. package/lib/animate-number/index.js +155 -1
  4. package/lib/backtop/index.js +188 -1
  5. package/lib/badge/index.js +236 -1
  6. package/lib/breadcrumb/index.js +309 -1
  7. package/lib/button/index.js +321 -1
  8. package/lib/card/index.js +274 -1
  9. package/lib/cascader/index.js +2019 -2
  10. package/lib/checkbox/index.js +542 -1
  11. package/lib/code-diff/index.js +5501 -1
  12. package/lib/collapse/index.js +518 -1
  13. package/lib/collapse-transition/index.js +178 -1
  14. package/lib/color-picker/index.js +2662 -1
  15. package/lib/components.js +530 -1
  16. package/lib/config-provider/index.js +317 -1
  17. package/lib/container/index.js +343 -1
  18. package/lib/date-picker/index.js +5481 -1
  19. package/lib/dialog/index.js +1266 -2
  20. package/lib/directives/index.js +1335 -2
  21. package/lib/dist.index.js +87 -1
  22. package/lib/divider/index.js +169 -1
  23. package/lib/dropdown/index.js +369 -1
  24. package/lib/exception/index.js +385 -1
  25. package/lib/fixed-navbar/index.js +154 -1
  26. package/lib/form/index.js +918 -1
  27. package/lib/hooks.js +73 -1
  28. package/lib/icon/angle-double-down-line.js +481 -1
  29. package/lib/icon/angle-double-left-line.js +481 -1
  30. package/lib/icon/angle-double-left.js +481 -1
  31. package/lib/icon/angle-double-right-line.js +481 -1
  32. package/lib/icon/angle-double-right.js +481 -1
  33. package/lib/icon/angle-double-up-line.js +481 -1
  34. package/lib/icon/angle-down-fill.js +481 -1
  35. package/lib/icon/angle-down-line.js +481 -1
  36. package/lib/icon/angle-down.js +481 -1
  37. package/lib/icon/angle-left.js +481 -1
  38. package/lib/icon/angle-right.js +481 -1
  39. package/lib/icon/angle-up-fill.js +481 -1
  40. package/lib/icon/angle-up.js +481 -1
  41. package/lib/icon/archive-fill.js +481 -1
  42. package/lib/icon/arrows-left.js +481 -1
  43. package/lib/icon/arrows-right.js +481 -1
  44. package/lib/icon/assistant.js +481 -1
  45. package/lib/icon/audio-fill.js +481 -1
  46. package/lib/icon/bk.js +481 -1
  47. package/lib/icon/circle.js +481 -1
  48. package/lib/icon/close-line.js +481 -1
  49. package/lib/icon/close.js +481 -1
  50. package/lib/icon/code.js +481 -1
  51. package/lib/icon/cog-shape.js +481 -1
  52. package/lib/icon/collapse-left.js +481 -1
  53. package/lib/icon/copy-shape.js +481 -1
  54. package/lib/icon/copy.js +481 -1
  55. package/lib/icon/data-shape.js +481 -1
  56. package/lib/icon/del.js +481 -1
  57. package/lib/icon/doc-fill.js +481 -1
  58. package/lib/icon/done.js +481 -1
  59. package/lib/icon/down-shape.js +481 -1
  60. package/lib/icon/down-small.js +481 -1
  61. package/lib/icon/edit-line.js +481 -1
  62. package/lib/icon/ellipsis.js +481 -1
  63. package/lib/icon/enlarge-line.js +481 -1
  64. package/lib/icon/error.js +481 -1
  65. package/lib/icon/excel-fill.js +481 -1
  66. package/lib/icon/exclamation-circle-shape.js +481 -1
  67. package/lib/icon/eye.js +481 -1
  68. package/lib/icon/filliscreen-line.js +481 -1
  69. package/lib/icon/fix-line.js +481 -1
  70. package/lib/icon/fix-shape.js +481 -1
  71. package/lib/icon/folder-open.js +481 -1
  72. package/lib/icon/folder-shape-open.js +481 -1
  73. package/lib/icon/folder-shape.js +481 -1
  74. package/lib/icon/folder.js +481 -1
  75. package/lib/icon/funnel.js +481 -1
  76. package/lib/icon/help-document-fill.js +481 -1
  77. package/lib/icon/help-fill.js +481 -1
  78. package/lib/icon/help.js +481 -1
  79. package/lib/icon/image-fill.js +527 -1
  80. package/lib/icon/img-error.js +527 -1
  81. package/lib/icon/img-placehoulder.js +527 -1
  82. package/lib/icon/index.js +2367 -1
  83. package/lib/icon/info-line.js +527 -1
  84. package/lib/icon/info.js +527 -1
  85. package/lib/icon/left-shape.js +527 -1
  86. package/lib/icon/left-turn-line.js +527 -1
  87. package/lib/icon/narrow-line.js +527 -1
  88. package/lib/icon/original.js +527 -1
  89. package/lib/icon/pdf-fill.js +527 -1
  90. package/lib/icon/play-shape.js +527 -1
  91. package/lib/icon/plus.js +527 -1
  92. package/lib/icon/ppt-fill.js +527 -1
  93. package/lib/icon/qq.js +527 -1
  94. package/lib/icon/right-shape.js +527 -1
  95. package/lib/icon/right-turn-line.js +527 -1
  96. package/lib/icon/search.js +527 -1
  97. package/lib/icon/share.js +527 -1
  98. package/lib/icon/spinner.js +527 -1
  99. package/lib/icon/success.js +527 -1
  100. package/lib/icon/switcher-loading.js +527 -1
  101. package/lib/icon/text-file.js +527 -1
  102. package/lib/icon/text-fill.js +527 -1
  103. package/lib/icon/transfer.js +527 -1
  104. package/lib/icon/tree-application-shape.js +527 -1
  105. package/lib/icon/unfull-screen.js +527 -1
  106. package/lib/icon/unvisible.js +527 -1
  107. package/lib/icon/up-shape.js +527 -1
  108. package/lib/icon/upload.js +527 -1
  109. package/lib/icon/video-fill.js +527 -1
  110. package/lib/icon/warn.js +527 -1
  111. package/lib/icon/weixin-pro.js +527 -1
  112. package/lib/icon/weixin.js +527 -1
  113. package/lib/image/index.js +593 -1
  114. package/lib/index.js +97 -1
  115. package/lib/info-box/index.js +1456 -2
  116. package/lib/input/index.js +1528 -2
  117. package/lib/link/index.js +160 -1
  118. package/lib/loading/index.js +379 -1
  119. package/lib/locale/index.js +465 -1
  120. package/lib/menu/index.js +725 -1
  121. package/lib/message/index.js +1790 -2
  122. package/lib/modal/index.js +337 -1
  123. package/lib/navigation/index.js +367 -1
  124. package/lib/notify/index.js +394 -1
  125. package/lib/overflow-title/index.js +485 -1
  126. package/lib/pagination/index.js +880 -1
  127. package/lib/plugin-popover/index.js +4067 -1
  128. package/lib/plugins/index.js +63 -1
  129. package/lib/pop-confirm/index.js +273 -1
  130. package/lib/popover/index.js +4075 -1
  131. package/lib/popover2/index.js +107 -1
  132. package/lib/preset.js +93 -1
  133. package/lib/process/index.js +1099 -2
  134. package/lib/progress/index.js +428 -1
  135. package/lib/radio/index.js +627 -1
  136. package/lib/rate/index.js +338 -1
  137. package/lib/resize-layout/index.js +430 -1
  138. package/lib/search-select/index.js +3036 -2
  139. package/lib/select/index.js +2571 -2
  140. package/lib/shared/index.js +2865 -1
  141. package/lib/sideslider/index.js +1005 -2
  142. package/lib/slider/index.js +1629 -2
  143. package/lib/steps/index.js +1163 -2
  144. package/lib/swiper/index.js +336 -1
  145. package/lib/switcher/index.js +277 -1
  146. package/lib/tab/index.js +859 -1
  147. package/lib/table/index.js +6568 -1
  148. package/lib/table-column/index.js +730 -1
  149. package/lib/tag/index.js +233 -1
  150. package/lib/tag-input/index.js +1652 -1
  151. package/lib/time-picker/index.js +71 -1
  152. package/lib/timeline/index.js +242 -1
  153. package/lib/transfer/index.js +673 -1
  154. package/lib/tree/index.js +2625 -1
  155. package/lib/upload/index.js +3193 -2
  156. package/lib/virtual-render/index.js +748 -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/input/index.js.LICENSE.txt +0 -1
  163. package/lib/message/index.js.LICENSE.txt +0 -6
  164. package/lib/process/index.js.LICENSE.txt +0 -1
  165. package/lib/search-select/index.js.LICENSE.txt +0 -1
  166. package/lib/select/index.js.LICENSE.txt +0 -1
  167. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  168. package/lib/slider/index.js.LICENSE.txt +0 -1
  169. package/lib/steps/index.js.LICENSE.txt +0 -1
  170. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,518 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../collapse-transition"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../collapse-transition","../icon"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../collapse-transition"),require("../icon")):t(e["../shared"],e.vue,e["../config-provider"],e["../collapse-transition"],e["../icon"]);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(self,((e,t,r,o,n)=>(()=>{"use strict";var a={9891:e=>{e.exports=o},2717:e=>{e.exports=r},6870:e=>{e.exports=n},4212:t=>{t.exports=e},748:e=>{e.exports=t}},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return a[e](r,r.exports,l),r.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var r in t)l.o(t,r)&&!l.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{l.r(c),l.d(c,{BkCollapsePanel:()=>u,Collapse:()=>f,default:()=>v});var e=l(4212);function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var r=l(748),o=l(2717),n=l(9891),a=l.n(n),i=l(6870),s={list:e.PropTypes.arrayOf(e.PropTypes.any).def([]),idFiled:e.PropTypes.string.def("$index"),titleField:e.PropTypes.string.def("name"),contentField:e.PropTypes.string.def("content"),modelValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number).def([]),e.PropTypes.arrayOf(e.PropTypes.string).def([]),e.PropTypes.number.def(-1)]),accordion:e.PropTypes.bool.def(!1),hasHeaderBorder:e.PropTypes.bool.def(!1),hasHeaderHover:e.PropTypes.bool.def(!0),headerIcon:e.PropTypes.string.def(""),useCardTheme:e.PropTypes.bool.def(!1),headerIconAlign:e.PropTypes.string.def("left")},d={itemClick:{type:Function}},p=Object.assign({name:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]).def(""),title:e.PropTypes.any,content:e.PropTypes.string,disabled:e.PropTypes.bool.def(!1),isFormList:e.PropTypes.bool.def(!1),renderDirective:(0,e.renderDirectiveType)(),modelValue:e.PropTypes.bool.def(!1),alone:e.PropTypes.bool.def(!1),icon:e.PropTypes.string.def("angle-right")},d);const u=(0,r.defineComponent)({name:"CollapsePanel",props:p,emits:["change","update:modelValue","after-leave","before-enter"],setup:function(e,t){var n=t.emit,a=t.slots,l=null,c=null,s=(0,r.ref)(e.modelValue);(0,r.watch)((function(){return e.modelValue}),(function(e){s.value=e})),e.alone||(l=(0,r.inject)("localActiveItems"),c=(0,r.inject)("handleItemClick"),(0,r.watch)(l,(function(t){(null==t?void 0:t.length)&&(s.value=t.includes(e.name))}),{immediate:!0}));var d,p=(0,o.usePrefix)().resolveClassName;return{isActive:s,collapseIcon:i["".concat((d=e.icon,d.split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join("")))],clickItem:function(){var t=e.disabled,r=e.name,o=e.itemClick;if(!t){var a={name:r};s.value=!s.value,n("update:modelValue",s.value),n("change",a),"function"==typeof o?o(a):"function"==typeof c&&c({name:r})}},renderPanel:function(){return"if"!==e.renderDirective||s.value?(0,r.withDirectives)((0,r.createVNode)("div",{class:"".concat(p("collapse-content")," ").concat(s.value?"active":"")},[e.content?e.content:"function"==typeof a.content?a.content(r.h):a.content]),[[r.vShow,s.value]]):""},renderHeader:function(t){return a.header?"function"==typeof a.header?a.header(r.h):a.header:(o=a.default?"function"==typeof a.default?a.default(r.h):a.default:e.title,(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)("div",{class:"".concat(p("collapse-header"))},[(0,r.createVNode)("span",{class:"".concat(p("collapse-title"))},[o]),t])]));var o},resolveClassName:p}},render:function(){var e,t,o=this;return(0,r.createVNode)("div",{class:"".concat(this.resolveClassName("collapse-item")," ").concat(this.disabled?"is-disabled":""," ").concat(this.isActive?"".concat(this.resolveClassName("collapse-item-active")):"")},[(0,r.createVNode)("div",{onClick:function(){return o.clickItem()}},[this.renderHeader((0,r.createVNode)(this.collapseIcon,{class:"".concat(this.resolveClassName("collapse-icon")," ").concat(this.isActive?"rotate-icon":"")},null))]),(0,r.createVNode)(a(),null,(t=e=this.renderPanel(),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!(0,r.isVNode)(t)?e:{default:function(){return[e]}}))])}}),f=(0,r.defineComponent)({name:"Collapse",props:s,emits:["item-click","update:modelValue","after-leave","before-enter"],setup:function(e,n){var a=n.emit,i=n.slots,l=(0,r.ref)([]);(0,r.watch)((function(){return[e.modelValue]}),(function(){var r,o=e.modelValue;Array.isArray(o)?l.value=function(e){if(Array.isArray(e))return t(e)}(r=o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,r){if(e){if("string"==typeof e)return t(e,r);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,r):void 0}}(r)||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.")}():l.value=void 0!==o?[o]:[]}),{immediate:!0});var c=function(t){var r=t.name;if(e.accordion){var o=l.value.findIndex((function(e){return e===r}));o>=0?l.value.splice(o,1):l.value=[r]}else{var n=l.value.findIndex((function(e){return e===r}));n>=0?l.value.splice(n,1):l.value.push(r)}a("item-click",t),a("update:modelValue",l.value)};(0,r.provide)("localActiveItems",l),(0,r.provide)("handleItemClick",c);var s=(0,o.usePrefix)().resolveClassName,d=s("collapse-wrapper");if(e.hasHeaderBorder&&(d+=" ".concat(s("collapse-header-border"))),e.hasHeaderHover&&(d+=" ".concat(s("collapse-header-hover"))),e.useCardTheme&&(d+=" ".concat(s("collapse-card"))),"left"===e.headerIconAlign?d+=" ".concat(s("collapse-icon-left")):d+=" ".concat(s("collapse-icon-right")),!Array.isArray(e.list)||!e.list.length)return function(){return(0,r.createVNode)("div",{class:d},[(0,r.renderSlot)(i,"default",{props:{isList:!0}})])};var p=(0,r.computed)((function(){return(e.list||[]).map((function(e,t){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e?{$index:t,name:e}:Object.assign({$index:t},e)}))}));return function(){return(0,r.createVNode)("div",{class:d},[p.value.map((function(t,o){var n,a,l,s=t[e.idFiled]||o,d=t[e.titleField],p=e.headerIcon||"angle-right";return i.title&&(d="function"==typeof i.title?i.title(t,o):i.title),i.default&&(d=null===(n=i.default)||void 0===n?void 0:n.call(i,t,o)),(0,r.createVNode)(u,{key:o,"item-click":c,disabled:t.disabled,name:s,icon:p,isFormList:!0,title:d,content:null!==(l=null===(a=i.content)||void 0===a?void 0:a.call(i,t,o))&&void 0!==l?l:t[e.contentField]},null)}))])}}}),v=(0,e.withInstallProps)(f,{CollapsePanel:u})})(),c})()));
1
+ import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__collapse_transition_cbd5c828__ from "../collapse-transition";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__ from "../icon";
6
+ /******/ // The require scope
7
+ /******/ var __webpack_require__ = {};
8
+ /******/
9
+ /************************************************************************/
10
+ /******/ /* webpack/runtime/define property getters */
11
+ /******/ (() => {
12
+ /******/ // define getter functions for harmony exports
13
+ /******/ __webpack_require__.d = (exports, definition) => {
14
+ /******/ for(var key in definition) {
15
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
16
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
17
+ /******/ }
18
+ /******/ }
19
+ /******/ };
20
+ /******/ })();
21
+ /******/
22
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
23
+ /******/ (() => {
24
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
25
+ /******/ })();
26
+ /******/
27
+ /************************************************************************/
28
+ var __webpack_exports__ = {};
29
+
30
+ // EXPORTS
31
+ __webpack_require__.d(__webpack_exports__, {
32
+ AP: () => (/* reexport */ collapse_panel),
33
+ UO: () => (/* reexport */ collapse),
34
+ ZP: () => (/* binding */ src)
35
+ });
36
+
37
+ ;// CONCATENATED MODULE: external "../shared"
38
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
39
+ var y = x => () => x
40
+ const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["renderDirectiveType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.renderDirectiveType, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
41
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
42
+ function _arrayLikeToArray(arr, len) {
43
+ if (len == null || len > arr.length) len = arr.length;
44
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
45
+ return arr2;
46
+ }
47
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
48
+
49
+ function _arrayWithoutHoles(arr) {
50
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
51
+ }
52
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
53
+ function _iterableToArray(iter) {
54
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
55
+ }
56
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
57
+
58
+ function _unsupportedIterableToArray(o, minLen) {
59
+ if (!o) return;
60
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
61
+ var n = Object.prototype.toString.call(o).slice(8, -1);
62
+ if (n === "Object" && o.constructor) n = o.constructor.name;
63
+ if (n === "Map" || n === "Set") return Array.from(o);
64
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
65
+ }
66
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
67
+ function _nonIterableSpread() {
68
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
69
+ }
70
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
71
+
72
+
73
+
74
+
75
+ function _toConsumableArray(arr) {
76
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
77
+ }
78
+ ;// CONCATENATED MODULE: external "vue"
79
+ var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
80
+ var external_vue_y = x => () => x
81
+ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Fragment, ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["isVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.isVNode, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["renderSlot"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.renderSlot, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
82
+ ;// CONCATENATED MODULE: external "../config-provider"
83
+ var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
84
+ var external_config_provider_y = x => () => x
85
+ const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
86
+ ;// CONCATENATED MODULE: external "../collapse-transition"
87
+ var external_collapse_transition_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
88
+ var external_collapse_transition_y = x => () => x
89
+ const external_collapse_transition_namespaceObject = external_collapse_transition_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__collapse_transition_cbd5c828__["default"] });
90
+ ;// CONCATENATED MODULE: external "../icon"
91
+ var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
92
+ var external_icon_y = x => () => x
93
+ const external_icon_namespaceObject = __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__;
94
+ ;// CONCATENATED MODULE: ../../packages/collapse/src/props.ts
95
+ /*
96
+ * Tencent is pleased to support the open source community by making
97
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
98
+ *
99
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
100
+ *
101
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
102
+ *
103
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
104
+ *
105
+ * ---------------------------------------------------
106
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
107
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
108
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
109
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
110
+ *
111
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
112
+ * the Software.
113
+ *
114
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
115
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
116
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
117
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
118
+ * IN THE SOFTWARE.
119
+ */
120
+
121
+ var propsCollapse = {
122
+ /**
123
+ * 渲染列表
124
+ * 对象数组或者字符串数组,字符串数组默认会增加 name 字段,值为传入的字符串值
125
+ */
126
+ list: external_shared_namespaceObject.PropTypes.arrayOf(external_shared_namespaceObject.PropTypes.any).def([]),
127
+ /**
128
+ * ID字段
129
+ */
130
+ idFiled: external_shared_namespaceObject.PropTypes.string.def('$index'),
131
+ /**
132
+ * Title 字段
133
+ */
134
+ titleField: external_shared_namespaceObject.PropTypes.string.def('name'),
135
+ /**
136
+ * Content 字段,默认渲染内容,不配置时自动读取 content 字段
137
+ * 自定义配置slot时可以忽略
138
+ */
139
+ contentField: external_shared_namespaceObject.PropTypes.string.def('content'),
140
+ /**
141
+ * 当前激活Index
142
+ */
143
+ modelValue: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.arrayOf(external_shared_namespaceObject.PropTypes.number).def([]), external_shared_namespaceObject.PropTypes.arrayOf(external_shared_namespaceObject.PropTypes.string).def([]), external_shared_namespaceObject.PropTypes.number.def(-1)]),
144
+ /**
145
+ * 是否使用手风琴效果
146
+ */
147
+ accordion: external_shared_namespaceObject.PropTypes.bool.def(false),
148
+ /**
149
+ * 是否使用带线条样式
150
+ */
151
+ hasHeaderBorder: external_shared_namespaceObject.PropTypes.bool.def(false),
152
+ /**
153
+ * 是否使用Hover效果
154
+ */
155
+ hasHeaderHover: external_shared_namespaceObject.PropTypes.bool.def(true),
156
+ /**
157
+ * 自定义图标
158
+ */
159
+ headerIcon: external_shared_namespaceObject.PropTypes.string.def(''),
160
+ /**
161
+ * 是否使用卡片样式
162
+ */
163
+ useCardTheme: external_shared_namespaceObject.PropTypes.bool.def(false),
164
+ /**
165
+ * 图标位置
166
+ */
167
+ headerIconAlign: external_shared_namespaceObject.PropTypes.string.def('left')
168
+ };
169
+ var CollapsePanelEventProps = {
170
+ itemClick: {
171
+ type: Function
172
+ }
173
+ };
174
+ var propsCollapsePanel = Object.assign({
175
+ name: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.number, external_shared_namespaceObject.PropTypes.string]).def(''),
176
+ title: external_shared_namespaceObject.PropTypes.any,
177
+ content: external_shared_namespaceObject.PropTypes.string,
178
+ disabled: external_shared_namespaceObject.PropTypes.bool.def(false),
179
+ isFormList: external_shared_namespaceObject.PropTypes.bool.def(false),
180
+ renderDirective: (0,external_shared_namespaceObject.renderDirectiveType)(),
181
+ modelValue: external_shared_namespaceObject.PropTypes.bool.def(false),
182
+ alone: external_shared_namespaceObject.PropTypes.bool.def(false),
183
+ icon: external_shared_namespaceObject.PropTypes.string.def('angle-right')
184
+ }, CollapsePanelEventProps);
185
+ ;// CONCATENATED MODULE: ../../packages/collapse/src/collapse-panel.tsx
186
+
187
+ /*
188
+ * Tencent is pleased to support the open source community by making
189
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
190
+ *
191
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
192
+ *
193
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
194
+ *
195
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
196
+ *
197
+ * ---------------------------------------------------
198
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
199
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
200
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
201
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
202
+ *
203
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
204
+ * the Software.
205
+ *
206
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
207
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
208
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
209
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
210
+ * IN THE SOFTWARE.
211
+ */
212
+
213
+
214
+
215
+
216
+
217
+ function _isSlot(s) {
218
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_namespaceObject.isVNode)(s);
219
+ }
220
+ /* harmony default export */ const collapse_panel = ((0,external_vue_namespaceObject.defineComponent)({
221
+ name: 'CollapsePanel',
222
+ props: propsCollapsePanel,
223
+ emits: ['change', 'update:modelValue', 'after-leave', 'before-enter'],
224
+ setup: function setup(props, _ref) {
225
+ var emit = _ref.emit,
226
+ slots = _ref.slots;
227
+ var localActiveItems = null;
228
+ var handleItemClick = null;
229
+ var isActive = (0,external_vue_namespaceObject.ref)(props.modelValue);
230
+ (0,external_vue_namespaceObject.watch)(function () {
231
+ return props.modelValue;
232
+ }, function (newVal) {
233
+ isActive.value = newVal;
234
+ });
235
+ // 如果单独使用,避免报 injection "*" not found. 相比getCurrentInstance()?.parent.type.name 方法简洁
236
+ if (!props.alone) {
237
+ localActiveItems = (0,external_vue_namespaceObject.inject)('localActiveItems');
238
+ handleItemClick = (0,external_vue_namespaceObject.inject)('handleItemClick');
239
+ (0,external_vue_namespaceObject.watch)(localActiveItems, function (newVal) {
240
+ if (newVal === null || newVal === void 0 ? void 0 : newVal.length) {
241
+ isActive.value = newVal.includes(props.name);
242
+ }
243
+ }, {
244
+ immediate: true
245
+ });
246
+ }
247
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
248
+ resolveClassName = _usePrefix.resolveClassName;
249
+ function toCamelCase(str) {
250
+ var words = str.split('-');
251
+ var camelCaseWords = words.map(function (word) {
252
+ return word.charAt(0).toUpperCase() + word.slice(1);
253
+ });
254
+ return camelCaseWords.join('');
255
+ }
256
+ function clickItem() {
257
+ var disabled = props.disabled,
258
+ name = props.name,
259
+ itemClick = props.itemClick;
260
+ if (disabled) return;
261
+ var data = {
262
+ name: name
263
+ };
264
+ isActive.value = !isActive.value;
265
+ emit('update:modelValue', isActive.value);
266
+ emit('change', data);
267
+ if (typeof itemClick === 'function') {
268
+ itemClick(data);
269
+ } else if (typeof handleItemClick === 'function') {
270
+ handleItemClick({
271
+ name: name
272
+ });
273
+ }
274
+ }
275
+ function getContent() {
276
+ if (props.content) {
277
+ return props.content;
278
+ }
279
+ if (typeof slots.content === 'function') {
280
+ return slots.content(external_vue_namespaceObject.h);
281
+ }
282
+ return slots.content;
283
+ }
284
+ function renderPanel() {
285
+ if (props.renderDirective === 'if' && !isActive.value) {
286
+ return '';
287
+ }
288
+ return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
289
+ "class": "".concat(resolveClassName('collapse-content'), " ").concat(isActive.value && 'active' || '')
290
+ }, [getContent()]), [[external_vue_namespaceObject.vShow, isActive.value]]);
291
+ }
292
+ function renderHeader(icon) {
293
+ if (slots.header) {
294
+ if (typeof slots.header === 'function') {
295
+ return slots.header(external_vue_namespaceObject.h);
296
+ }
297
+ return slots.header;
298
+ }
299
+ var title;
300
+ if (slots["default"]) {
301
+ if (typeof slots["default"] === 'function') {
302
+ title = slots["default"](external_vue_namespaceObject.h);
303
+ } else {
304
+ title = slots["default"];
305
+ }
306
+ } else {
307
+ title = props.title;
308
+ }
309
+ return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)("div", {
310
+ "class": "".concat(resolveClassName('collapse-header'))
311
+ }, [(0,external_vue_namespaceObject.createVNode)("span", {
312
+ "class": "".concat(resolveClassName('collapse-title'))
313
+ }, [title]), icon])]);
314
+ }
315
+ return {
316
+ isActive: isActive,
317
+ collapseIcon: external_icon_namespaceObject["".concat(toCamelCase(props.icon))],
318
+ clickItem: clickItem,
319
+ renderPanel: renderPanel,
320
+ renderHeader: renderHeader,
321
+ resolveClassName: resolveClassName
322
+ };
323
+ },
324
+ render: function render() {
325
+ var _slot;
326
+ var _this = this;
327
+ return (0,external_vue_namespaceObject.createVNode)("div", {
328
+ "class": "".concat(this.resolveClassName('collapse-item'), " ").concat(this.disabled ? 'is-disabled' : '', " ").concat(this.isActive ? "".concat(this.resolveClassName('collapse-item-active')) : '')
329
+ }, [(0,external_vue_namespaceObject.createVNode)("div", {
330
+ "onClick": function onClick() {
331
+ return _this.clickItem();
332
+ }
333
+ }, [this.renderHeader((0,external_vue_namespaceObject.createVNode)(this.collapseIcon, {
334
+ "class": "".concat(this.resolveClassName('collapse-icon'), " ").concat(this.isActive && 'rotate-icon' || '')
335
+ }, null))]), (0,external_vue_namespaceObject.createVNode)(external_collapse_transition_namespaceObject["default"], null, _isSlot(_slot = this.renderPanel()) ? _slot : {
336
+ "default": function _default() {
337
+ return [_slot];
338
+ }
339
+ })]);
340
+ }
341
+ }));
342
+ ;// CONCATENATED MODULE: ../../packages/collapse/src/collapse.tsx
343
+
344
+
345
+ /*
346
+ * Tencent is pleased to support the open source community by making
347
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
348
+ *
349
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
350
+ *
351
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
352
+ *
353
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
354
+ *
355
+ * ---------------------------------------------------
356
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
357
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
358
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
359
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
360
+ *
361
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
362
+ * the Software.
363
+ *
364
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
365
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
366
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
367
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
368
+ * IN THE SOFTWARE.
369
+ */
370
+
371
+
372
+
373
+
374
+ /* harmony default export */ const collapse = ((0,external_vue_namespaceObject.defineComponent)({
375
+ name: 'Collapse',
376
+ props: propsCollapse,
377
+ emits: ['item-click', 'update:modelValue', 'after-leave', 'before-enter'],
378
+ setup: function setup(props, _ref) {
379
+ var emit = _ref.emit,
380
+ slots = _ref.slots;
381
+ var localActiveItems = (0,external_vue_namespaceObject.ref)([]);
382
+ // 以保证当前的设置生效
383
+ (0,external_vue_namespaceObject.watch)(function () {
384
+ return [props.modelValue];
385
+ }, function () {
386
+ var value = props.modelValue;
387
+ if (Array.isArray(value)) {
388
+ localActiveItems.value = _toConsumableArray(value);
389
+ } else if (typeof value !== 'undefined') {
390
+ localActiveItems.value = [value];
391
+ } else {
392
+ localActiveItems.value = [];
393
+ }
394
+ }, {
395
+ immediate: true
396
+ });
397
+ var handleItemClick = function handleItemClick(item) {
398
+ // 手风琴模式,只有一个Active,移除一个新增一个
399
+ var name = item.name;
400
+ if (props.accordion) {
401
+ var activeItemIndex = localActiveItems.value.findIndex(function (local) {
402
+ return local === name;
403
+ });
404
+ if (activeItemIndex >= 0) {
405
+ localActiveItems.value.splice(activeItemIndex, 1);
406
+ } else {
407
+ localActiveItems.value = [name];
408
+ }
409
+ } else {
410
+ var _activeItemIndex = localActiveItems.value.findIndex(function (local) {
411
+ return local === name;
412
+ });
413
+ if (_activeItemIndex >= 0) {
414
+ localActiveItems.value.splice(_activeItemIndex, 1);
415
+ } else {
416
+ localActiveItems.value.push(name);
417
+ }
418
+ }
419
+ emit('item-click', item);
420
+ emit('update:modelValue', localActiveItems.value);
421
+ };
422
+ (0,external_vue_namespaceObject.provide)('localActiveItems', localActiveItems);
423
+ (0,external_vue_namespaceObject.provide)('handleItemClick', handleItemClick);
424
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
425
+ resolveClassName = _usePrefix.resolveClassName;
426
+ var className = resolveClassName('collapse-wrapper');
427
+ // 线条样式
428
+ if (props.hasHeaderBorder) {
429
+ className += " ".concat(resolveClassName('collapse-header-border'));
430
+ }
431
+ // hover效果
432
+ if (props.hasHeaderHover) {
433
+ className += " ".concat(resolveClassName('collapse-header-hover'));
434
+ }
435
+ // 卡片样式
436
+ if (props.useCardTheme) {
437
+ className += " ".concat(resolveClassName('collapse-card'));
438
+ }
439
+ // 图标位置
440
+ if (props.headerIconAlign === 'left') {
441
+ className += " ".concat(resolveClassName('collapse-icon-left'));
442
+ } else {
443
+ className += " ".concat(resolveClassName('collapse-icon-right'));
444
+ }
445
+ if (!Array.isArray(props.list) || !props.list.length) {
446
+ return function () {
447
+ return (0,external_vue_namespaceObject.createVNode)('div', {
448
+ "class": className
449
+ }, [(0,external_vue_namespaceObject.renderSlot)(slots, 'default', {
450
+ props: {
451
+ isList: true
452
+ }
453
+ })]);
454
+ };
455
+ }
456
+ // 统一格式化传入数据格式为标准渲染格式
457
+ var collapseData = (0,external_vue_namespaceObject.computed)(function () {
458
+ return (props.list || []).map(function (item, index) {
459
+ if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
460
+ return {
461
+ $index: index,
462
+ name: item
463
+ };
464
+ }
465
+ return Object.assign({
466
+ $index: index
467
+ }, item);
468
+ });
469
+ });
470
+ // 判定当前Item是否为激活状态
471
+ var renderItems = function renderItems() {
472
+ return collapseData.value.map(function (item, index) {
473
+ var _a, _b, _c;
474
+ var name = item[props.idFiled] || index;
475
+ var title = item[props.titleField];
476
+ var icon = props.headerIcon || 'angle-right';
477
+ if (slots.title) {
478
+ if (typeof slots.title === 'function') {
479
+ title = slots.title(item, index);
480
+ } else {
481
+ title = slots.title;
482
+ }
483
+ }
484
+ if (slots["default"]) {
485
+ title = (_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots, item, index);
486
+ }
487
+ return (0,external_vue_namespaceObject.createVNode)(collapse_panel, {
488
+ "key": index,
489
+ "item-click": handleItemClick,
490
+ "disabled": item.disabled,
491
+ "name": name,
492
+ "icon": icon,
493
+ "isFormList": true,
494
+ "title": title,
495
+ "content": (_c = (_b = slots.content) === null || _b === void 0 ? void 0 : _b.call(slots, item, index)) !== null && _c !== void 0 ? _c : item[props.contentField]
496
+ }, null);
497
+ });
498
+ };
499
+ return function () {
500
+ return (0,external_vue_namespaceObject.createVNode)("div", {
501
+ "class": className
502
+ }, [renderItems()]);
503
+ };
504
+ }
505
+ }));
506
+ ;// CONCATENATED MODULE: ../../packages/collapse/src/index.ts
507
+
508
+
509
+
510
+ var BkCollapse = (0,external_shared_namespaceObject.withInstallProps)(collapse, {
511
+ CollapsePanel: collapse_panel
512
+ });
513
+
514
+ /* harmony default export */ const src = (BkCollapse);
515
+ var __webpack_exports__BkCollapsePanel = __webpack_exports__.AP;
516
+ var __webpack_exports__Collapse = __webpack_exports__.UO;
517
+ var __webpack_exports__default = __webpack_exports__.ZP;
518
+ export { __webpack_exports__BkCollapsePanel as BkCollapsePanel, __webpack_exports__Collapse as Collapse, __webpack_exports__default as default };