bkui-vue 0.0.2-beta.35 → 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 (182) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +30 -14
  3. package/dist/index.umd.js +44 -44
  4. package/lib/affix/index.js +391 -1
  5. package/lib/alert/index.js +287 -1
  6. package/lib/animate-number/index.js +219 -1
  7. package/lib/backtop/index.js +264 -1
  8. package/lib/badge/index.js +304 -1
  9. package/lib/breadcrumb/index.js +379 -1
  10. package/lib/button/index.js +403 -1
  11. package/lib/card/index.js +369 -1
  12. package/lib/cascader/index.js +2095 -2
  13. package/lib/checkbox/index.js +602 -1
  14. package/lib/code-diff/index.js +5548 -1
  15. package/lib/collapse/index.js +605 -1
  16. package/lib/collapse-transition/index.js +237 -1
  17. package/lib/color-picker/index.js +2735 -1
  18. package/lib/components.js +770 -1
  19. package/lib/config-provider/index.js +377 -1
  20. package/lib/container/index.js +408 -1
  21. package/lib/date-picker/index.js +5576 -1
  22. package/lib/dialog/index.js +1324 -2
  23. package/lib/directives/index.js +1386 -2
  24. package/lib/dist.index.js +179 -1
  25. package/lib/divider/index.js +237 -1
  26. package/lib/dropdown/index.js +455 -1
  27. package/lib/exception/index.js +435 -1
  28. package/lib/fixed-navbar/index.js +222 -1
  29. package/lib/form/index.js +1004 -1
  30. package/lib/hooks.js +133 -1
  31. package/lib/icon/angle-double-down-line.js +541 -1
  32. package/lib/icon/angle-double-left-line.js +541 -1
  33. package/lib/icon/angle-double-left.js +541 -1
  34. package/lib/icon/angle-double-right-line.js +541 -1
  35. package/lib/icon/angle-double-right.js +541 -1
  36. package/lib/icon/angle-double-up-line.js +541 -1
  37. package/lib/icon/angle-down-fill.js +541 -1
  38. package/lib/icon/angle-down-line.js +541 -1
  39. package/lib/icon/angle-down.js +541 -1
  40. package/lib/icon/angle-left.js +541 -1
  41. package/lib/icon/angle-right.js +541 -1
  42. package/lib/icon/angle-up-fill.js +541 -1
  43. package/lib/icon/angle-up.js +541 -1
  44. package/lib/icon/archive-fill.js +541 -1
  45. package/lib/icon/arrows-left.js +541 -1
  46. package/lib/icon/arrows-right.js +541 -1
  47. package/lib/icon/assistant.js +541 -1
  48. package/lib/icon/audio-fill.js +541 -1
  49. package/lib/icon/bk.js +541 -1
  50. package/lib/icon/circle.js +541 -1
  51. package/lib/icon/close-line.js +541 -1
  52. package/lib/icon/close.js +541 -1
  53. package/lib/icon/code.js +541 -1
  54. package/lib/icon/cog-shape.js +541 -1
  55. package/lib/icon/collapse-left.js +541 -1
  56. package/lib/icon/copy-shape.js +541 -1
  57. package/lib/icon/copy.js +541 -1
  58. package/lib/icon/data-shape.js +541 -1
  59. package/lib/icon/del.js +541 -1
  60. package/lib/icon/doc-fill.js +541 -1
  61. package/lib/icon/done.js +541 -1
  62. package/lib/icon/down-shape.js +541 -1
  63. package/lib/icon/down-small.js +541 -1
  64. package/lib/icon/edit-line.js +541 -1
  65. package/lib/icon/ellipsis.js +541 -1
  66. package/lib/icon/enlarge-line.js +541 -1
  67. package/lib/icon/error.js +541 -1
  68. package/lib/icon/excel-fill.js +541 -1
  69. package/lib/icon/exclamation-circle-shape.js +541 -1
  70. package/lib/icon/eye.js +541 -1
  71. package/lib/icon/filliscreen-line.js +541 -1
  72. package/lib/icon/fix-line.js +541 -1
  73. package/lib/icon/fix-shape.js +541 -1
  74. package/lib/icon/folder-open.js +541 -1
  75. package/lib/icon/folder-shape-open.js +541 -1
  76. package/lib/icon/folder-shape.js +541 -1
  77. package/lib/icon/folder.js +541 -1
  78. package/lib/icon/funnel.js +541 -1
  79. package/lib/icon/help-document-fill.js +541 -1
  80. package/lib/icon/help-fill.js +541 -1
  81. package/lib/icon/help.js +541 -1
  82. package/lib/icon/image-fill.js +563 -1
  83. package/lib/icon/img-error.js +563 -1
  84. package/lib/icon/img-placehoulder.js +563 -1
  85. package/lib/icon/index.js +2353 -1
  86. package/lib/icon/info-line.js +563 -1
  87. package/lib/icon/info.js +563 -1
  88. package/lib/icon/left-shape.js +563 -1
  89. package/lib/icon/left-turn-line.js +563 -1
  90. package/lib/icon/narrow-line.js +563 -1
  91. package/lib/icon/original.js +563 -1
  92. package/lib/icon/pdf-fill.js +563 -1
  93. package/lib/icon/play-shape.js +563 -1
  94. package/lib/icon/plus.js +563 -1
  95. package/lib/icon/ppt-fill.js +563 -1
  96. package/lib/icon/qq.js +563 -1
  97. package/lib/icon/right-shape.js +563 -1
  98. package/lib/icon/right-turn-line.js +563 -1
  99. package/lib/icon/search.js +563 -1
  100. package/lib/icon/share.js +563 -1
  101. package/lib/icon/spinner.js +563 -1
  102. package/lib/icon/success.js +563 -1
  103. package/lib/icon/switcher-loading.js +563 -1
  104. package/lib/icon/text-file.js +563 -1
  105. package/lib/icon/text-fill.js +563 -1
  106. package/lib/icon/transfer.js +563 -1
  107. package/lib/icon/tree-application-shape.js +563 -1
  108. package/lib/icon/unfull-screen.js +563 -1
  109. package/lib/icon/unvisible.js +563 -1
  110. package/lib/icon/up-shape.js +563 -1
  111. package/lib/icon/upload.js +563 -1
  112. package/lib/icon/video-fill.js +563 -1
  113. package/lib/icon/warn.js +563 -1
  114. package/lib/icon/weixin-pro.js +563 -1
  115. package/lib/icon/weixin.js +563 -1
  116. package/lib/image/index.js +681 -1
  117. package/lib/index.js +195 -1
  118. package/lib/info-box/index.js +1514 -2
  119. package/lib/input/index.js +1038 -1
  120. package/lib/link/index.js +232 -1
  121. package/lib/loading/index.js +443 -1
  122. package/lib/locale/index.js +489 -1
  123. package/lib/menu/index.js +793 -1
  124. package/lib/message/index.js +1842 -2
  125. package/lib/message/messageConstructor.d.ts +1 -1
  126. package/lib/modal/index.js +407 -1
  127. package/lib/navigation/index.js +439 -1
  128. package/lib/notify/index.js +470 -1
  129. package/lib/overflow-title/index.js +547 -1
  130. package/lib/pagination/index.js +974 -1
  131. package/lib/plugin-popover/index.js +4121 -1
  132. package/lib/plugins/index.js +130 -1
  133. package/lib/pop-confirm/index.js +367 -1
  134. package/lib/popover/content.d.ts +8 -0
  135. package/lib/popover/index.d.ts +12 -0
  136. package/lib/popover/index.js +4127 -1
  137. package/lib/popover/popover.d.ts +7 -0
  138. package/lib/popover/props.d.ts +3 -0
  139. package/lib/popover2/index.js +171 -1
  140. package/lib/preset.js +164 -1
  141. package/lib/process/index.js +1146 -2
  142. package/lib/progress/index.js +495 -1
  143. package/lib/radio/index.js +693 -1
  144. package/lib/rate/index.js +406 -1
  145. package/lib/resize-layout/index.js +499 -1
  146. package/lib/search-select/index.js +3024 -2
  147. package/lib/select/index.d.ts +25 -3
  148. package/lib/select/index.js +2599 -2
  149. package/lib/select/select.d.ts +11 -1
  150. package/lib/shared/index.js +2832 -1
  151. package/lib/sideslider/index.js +1056 -2
  152. package/lib/slider/index.js +1683 -2
  153. package/lib/steps/index.js +1215 -2
  154. package/lib/swiper/index.js +404 -1
  155. package/lib/switcher/index.js +335 -1
  156. package/lib/tab/index.js +935 -1
  157. package/lib/table/index.js +6588 -1
  158. package/lib/table-column/index.js +768 -1
  159. package/lib/tag/index.js +309 -1
  160. package/lib/tag-input/index.d.ts +9 -0
  161. package/lib/tag-input/index.js +1758 -1
  162. package/lib/tag-input/tag-input.d.ts +20 -0
  163. package/lib/tag-input/tag-props.d.ts +3 -0
  164. package/lib/time-picker/index.js +142 -1
  165. package/lib/timeline/index.js +310 -1
  166. package/lib/transfer/index.js +767 -1
  167. package/lib/tree/index.js +2664 -1
  168. package/lib/upload/index.js +3257 -2
  169. package/lib/virtual-render/index.js +806 -1
  170. package/package.json +1 -1
  171. package/lib/cascader/index.js.LICENSE.txt +0 -1
  172. package/lib/dialog/index.js.LICENSE.txt +0 -1
  173. package/lib/directives/index.js.LICENSE.txt +0 -14
  174. package/lib/info-box/index.js.LICENSE.txt +0 -1
  175. package/lib/message/index.js.LICENSE.txt +0 -6
  176. package/lib/process/index.js.LICENSE.txt +0 -1
  177. package/lib/search-select/index.js.LICENSE.txt +0 -1
  178. package/lib/select/index.js.LICENSE.txt +0 -1
  179. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  180. package/lib/slider/index.js.LICENSE.txt +0 -1
  181. package/lib/steps/index.js.LICENSE.txt +0 -1
  182. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,602 @@
1
- !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"),require("../config-provider"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider"],r);else{var t="object"==typeof exports?r(require("../shared"),require("vue"),require("../config-provider")):r(e["../shared"],e.vue,e["../config-provider"]);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r,t)=>(()=>{"use strict";var o={2717:e=>{e.exports=t},4212:r=>{r.exports=e},748:e=>{e.exports=r}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var t=n[e]={exports:{}};return o[e](t,t.exports,i),t.exports}i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{i.r(a),i.d(a,{BkCheckbox:()=>p,BkCheckboxGroup:()=>f,default:()=>h});var e=i(4212);function r(e){return r="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},r(e)}function t(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}var n=i(748),l=i(2717),u=Symbol("CheckboxGroup"),s={modelValue:e.PropTypes.oneOfType([String,Number,Boolean]),label:e.PropTypes.oneOfType([String,Number,Boolean]),trueLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(!0),falseLabel:e.PropTypes.oneOfType([String,Number,Boolean]).def(!1),disabled:e.PropTypes.bool.def(!1),checked:e.PropTypes.bool.def(!1),indeterminate:e.PropTypes.bool,beforeChange:e.PropTypes.func,size:e.PropTypes.size().def(e.SizeEnum.LARGE),immediateEmitChange:e.PropTypes.bool.def(!0)};const c=(0,n.defineComponent)({name:"Checkbox",props:s,emits:{"update:modelValue":function(e){return void 0!==e},change:function(e){return void 0!==e}},setup:function(r){var t,i,a=function(){var e=(0,n.ref)(!1);return[e,{blur:function(){e.value=!1},focus:function(){e.value=!0}}]}(),s=(i=2,function(e){if(Array.isArray(e))return e}(t=a)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,i,a,l=[],u=!0,s=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(o=i.call(t)).done)&&(l.push(o.value),l.length!==r);u=!0);}catch(e){s=!0,n=e}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw n}}return l}}(t,i)||function(e,r){if(e){if("string"==typeof e)return o(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,r):void 0}}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],d=s[1],f=d.blur,p=d.focus,h=function(){var r=(0,n.getCurrentInstance)(),t=r.props,o=r.emit,i=(0,n.inject)(u,e.EMPTY_OBJ),a=!(0,e.isEmptyObj)(i),l=(0,n.ref)(),s=(0,n.ref)(t.checked),c=(0,n.computed)((function(){return!(!a||!i.props.disabled)||t.disabled})),d=function(){var e=s.value?t.trueLabel:t.falseLabel;o("update:modelValue",e),o("change",e),a&&i.handleChange(),(0,n.nextTick)((function(){l.value.checked!==s.value&&(l.value.checked=s.value)}))};return a?(0,n.watch)((function(){return i.props.modelValue}),(function(e){s.value=e.includes(t.label)}),{deep:!0}):(0,n.watch)((function(){return t.modelValue}),(function(e){""!==e&&(s.value=e===t.trueLabel)}),{immediate:!0}),(0,n.watch)((function(){return t.checked}),(function(){s.value=t.checked,!1!==t.immediateEmitChange&&d()})),(0,n.onMounted)((function(){a&&i.register(r.proxy)})),(0,n.onBeforeUnmount)((function(){a&&i.unregister(r.proxy)})),{inputRef:l,isChecked:s,isDisabled:c,setChecked:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];s.value=e},handleChange:function(e){if(!c.value){var r=e.target;s.value=r.checked,d()}}}}(),b=h.inputRef,v=h.isChecked,m=h.isDisabled,y=h.setChecked,g=h.handleChange,C=(0,l.usePrefix)().resolveClassName;return{inputRef:b,isFocus:c,isChecked:v,isDisabled:m,setChecked:y,handleBlur:f,handleFocus:p,handleChange:g,size:r.size,resolveClassName:C}},render:function(){var r,o=this,i=(0,e.classes)((t(r={},"".concat(this.resolveClassName("checkbox")),!0),t(r,"is-focused",this.isFocus),t(r,"is-checked",this.isChecked),t(r,"is-disabled",this.isDisabled),t(r,"is-indeterminated",this.indeterminate),r));return(0,n.createVNode)("label",{class:i},[(0,n.createVNode)("span",{class:[this.resolveClassName("checkbox-input"),this.size]},[(0,n.createVNode)("input",{ref:"inputRef",role:"checkbox",type:"checkbox",class:"".concat(this.resolveClassName("checkbox-original")),disabled:this.isDisabled,checked:this.isChecked,onChange:this.handleChange},null)]),o.label||o.$slots.default?(0,n.createVNode)("span",{class:"".concat(o.resolveClassName("checkbox-label"))},[o.$slots.default?o.$slots.default():o.label]):null])}});var d={name:e.PropTypes.string.def(""),modelValue:e.PropTypes.array,disabled:e.PropTypes.bool,withValidate:e.PropTypes.bool.def(!0)};const f=(0,n.defineComponent)({name:"CheckboxGroup",props:d,emits:["change","update:modelValue"],setup:function(r,t){var o=(0,e.useFormItem)(),i=[];return(0,n.provide)(u,{name:"CheckboxGroup",props:r,register:function(e){i.push(e)},unregister:function(e){var r=i.indexOf(e);r>-1&&i.splice(r,1)},handleChange:function(){var e=i.reduce((function(e,r){return r.isChecked&&e.push(r.label),e}),[]);t.emit("update:modelValue",e),t.emit("change",e)}}),(0,n.watch)((function(){return r.modelValue}),(function(){var e;r.withValidate&&(null===(e=null==o?void 0:o.validate)||void 0===e||e.call(o,"change"))})),(0,n.onMounted)((function(){var e=r.modelValue||[];i.forEach((function(r){e.includes(r.label)&&r.setChecked(!0)}))})),{resolveClassName:(0,l.usePrefix)().resolveClassName}},render:function(){var e;return(0,n.createVNode)("div",{class:"".concat(this.resolveClassName("checkbox-group"))},[null===(e=this.$slots)||void 0===e?void 0:e.default()])}});var p=(0,e.withInstallProps)(c,{Group:f});const h=p})(),a})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../config-provider"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../config-provider"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../config-provider")) : factory(root["../shared"], root["vue"], root["../config-provider"]);
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__) => {
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
+ /***/ 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
+ BkCheckbox: () => (/* binding */ BkCheckbox),
101
+ BkCheckboxGroup: () => (/* reexport */ checkbox_group),
102
+ "default": () => (/* binding */ src)
103
+ });
104
+
105
+ // EXTERNAL MODULE: external "../shared"
106
+ var external_shared_ = __webpack_require__(4212);
107
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
108
+ function _typeof(obj) {
109
+ "@babel/helpers - typeof";
110
+
111
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
112
+ return typeof obj;
113
+ } : function (obj) {
114
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
115
+ }, _typeof(obj);
116
+ }
117
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
118
+
119
+ function _toPrimitive(input, hint) {
120
+ if (_typeof(input) !== "object" || input === null) return input;
121
+ var prim = input[Symbol.toPrimitive];
122
+ if (prim !== undefined) {
123
+ var res = prim.call(input, hint || "default");
124
+ if (_typeof(res) !== "object") return res;
125
+ throw new TypeError("@@toPrimitive must return a primitive value.");
126
+ }
127
+ return (hint === "string" ? String : Number)(input);
128
+ }
129
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
130
+
131
+
132
+ function _toPropertyKey(arg) {
133
+ var key = _toPrimitive(arg, "string");
134
+ return _typeof(key) === "symbol" ? key : String(key);
135
+ }
136
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
137
+
138
+ function _defineProperty(obj, key, value) {
139
+ key = _toPropertyKey(key);
140
+ if (key in obj) {
141
+ Object.defineProperty(obj, key, {
142
+ value: value,
143
+ enumerable: true,
144
+ configurable: true,
145
+ writable: true
146
+ });
147
+ } else {
148
+ obj[key] = value;
149
+ }
150
+ return obj;
151
+ }
152
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
153
+ function _arrayWithHoles(arr) {
154
+ if (Array.isArray(arr)) return arr;
155
+ }
156
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
157
+ function _iterableToArrayLimit(arr, i) {
158
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
159
+ if (null != _i) {
160
+ var _s,
161
+ _e,
162
+ _x,
163
+ _r,
164
+ _arr = [],
165
+ _n = !0,
166
+ _d = !1;
167
+ try {
168
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
169
+ if (Object(_i) !== _i) return;
170
+ _n = !1;
171
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
172
+ } catch (err) {
173
+ _d = !0, _e = err;
174
+ } finally {
175
+ try {
176
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
177
+ } finally {
178
+ if (_d) throw _e;
179
+ }
180
+ }
181
+ return _arr;
182
+ }
183
+ }
184
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
185
+ function _arrayLikeToArray(arr, len) {
186
+ if (len == null || len > arr.length) len = arr.length;
187
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
188
+ return arr2;
189
+ }
190
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
191
+
192
+ function _unsupportedIterableToArray(o, minLen) {
193
+ if (!o) return;
194
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
195
+ var n = Object.prototype.toString.call(o).slice(8, -1);
196
+ if (n === "Object" && o.constructor) n = o.constructor.name;
197
+ if (n === "Map" || n === "Set") return Array.from(o);
198
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
199
+ }
200
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
201
+ function _nonIterableRest() {
202
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
203
+ }
204
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
205
+
206
+
207
+
208
+
209
+ function _slicedToArray(arr, i) {
210
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
211
+ }
212
+ // EXTERNAL MODULE: external "vue"
213
+ var external_vue_ = __webpack_require__(748);
214
+ // EXTERNAL MODULE: external "../config-provider"
215
+ var external_config_provider_ = __webpack_require__(2717);
216
+ ;// CONCATENATED MODULE: ../../packages/checkbox/src/common.ts
217
+ /*
218
+ * Tencent is pleased to support the open source community by making
219
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
220
+ *
221
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
222
+ *
223
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
224
+ *
225
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
226
+ *
227
+ * ---------------------------------------------------
228
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
229
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
230
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
231
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
232
+ *
233
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
234
+ * the Software.
235
+ *
236
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
237
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
238
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
239
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
240
+ * IN THE SOFTWARE.
241
+ */
242
+
243
+
244
+ var checkboxGroupKey = Symbol('CheckboxGroup');
245
+ function useFocus() {
246
+ var isFocus = (0,external_vue_.ref)(false);
247
+ var blur = function blur() {
248
+ isFocus.value = false;
249
+ };
250
+ var focus = function focus() {
251
+ isFocus.value = true;
252
+ };
253
+ return [isFocus, {
254
+ blur: blur,
255
+ focus: focus
256
+ }];
257
+ }
258
+ ;
259
+ var useCheckbox = function useCheckbox() {
260
+ var currentInstance = (0,external_vue_.getCurrentInstance)();
261
+ var props = currentInstance.props,
262
+ emit = currentInstance.emit;
263
+ var checkboxGroup = (0,external_vue_.inject)(checkboxGroupKey, external_shared_.EMPTY_OBJ);
264
+ var isGroup = !(0,external_shared_.isEmptyObj)(checkboxGroup);
265
+ var inputRef = (0,external_vue_.ref)();
266
+ var isChecked = (0,external_vue_.ref)(props.checked);
267
+ // 禁用状态
268
+ var isDisabled = (0,external_vue_.computed)(function () {
269
+ if (isGroup && checkboxGroup.props.disabled) {
270
+ return true;
271
+ }
272
+ return props.disabled;
273
+ });
274
+ // 触发更新
275
+ var triggerChange = function triggerChange() {
276
+ // 单独使用时状态切换返回 trueLabel、falseLabel
277
+ var nextValue = isChecked.value ? props.trueLabel : props.falseLabel;
278
+ emit('update:modelValue', nextValue);
279
+ emit('change', nextValue);
280
+ // 更新 checkbox-group
281
+ // 配合 checkbox-group 使用时返回 props.label
282
+ if (isGroup) {
283
+ checkboxGroup.handleChange();
284
+ }
285
+ (0,external_vue_.nextTick)(function () {
286
+ // 选中状态保持同步
287
+ if (inputRef.value.checked !== isChecked.value) {
288
+ inputRef.value.checked = isChecked.value;
289
+ }
290
+ });
291
+ };
292
+ // 响应modelValue
293
+ if (isGroup) {
294
+ (0,external_vue_.watch)(function () {
295
+ return checkboxGroup.props.modelValue;
296
+ }, function (modelValue) {
297
+ isChecked.value = modelValue.includes(props.label);
298
+ }, {
299
+ deep: true
300
+ });
301
+ } else {
302
+ (0,external_vue_.watch)(function () {
303
+ return props.modelValue;
304
+ }, function (modelValue) {
305
+ if (modelValue === '') {
306
+ return;
307
+ }
308
+ isChecked.value = modelValue === props.trueLabel;
309
+ }, {
310
+ immediate: true
311
+ });
312
+ }
313
+ (0,external_vue_.watch)(function () {
314
+ return props.checked;
315
+ }, function () {
316
+ isChecked.value = props.checked;
317
+ if (props.immediateEmitChange !== false) {
318
+ triggerChange();
319
+ }
320
+ });
321
+ var setChecked = function setChecked() {
322
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
323
+ isChecked.value = value;
324
+ };
325
+ // 值更新
326
+ var handleChange = function handleChange(event) {
327
+ if (isDisabled.value) {
328
+ return;
329
+ }
330
+ var $targetInput = event.target;
331
+ isChecked.value = $targetInput.checked;
332
+ triggerChange();
333
+ };
334
+ (0,external_vue_.onMounted)(function () {
335
+ if (isGroup) {
336
+ checkboxGroup.register(currentInstance.proxy);
337
+ }
338
+ });
339
+ (0,external_vue_.onBeforeUnmount)(function () {
340
+ if (isGroup) {
341
+ checkboxGroup.unregister(currentInstance.proxy);
342
+ }
343
+ });
344
+ return {
345
+ inputRef: inputRef,
346
+ isChecked: isChecked,
347
+ isDisabled: isDisabled,
348
+ setChecked: setChecked,
349
+ handleChange: handleChange
350
+ };
351
+ };
352
+ ;// CONCATENATED MODULE: ../../packages/checkbox/src/checkbox.tsx
353
+
354
+
355
+
356
+ /*
357
+ * Tencent is pleased to support the open source community by making
358
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
359
+ *
360
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
361
+ *
362
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
363
+ *
364
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
365
+ *
366
+ * ---------------------------------------------------
367
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
368
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
369
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
370
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
371
+ *
372
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
373
+ * the Software.
374
+ *
375
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
376
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
377
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
378
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
379
+ * IN THE SOFTWARE.
380
+ */
381
+
382
+
383
+
384
+
385
+ var checkboxProps = {
386
+ modelValue: external_shared_.PropTypes.oneOfType([String, Number, Boolean]),
387
+ label: external_shared_.PropTypes.oneOfType([String, Number, Boolean]),
388
+ trueLabel: external_shared_.PropTypes.oneOfType([String, Number, Boolean]).def(true),
389
+ falseLabel: external_shared_.PropTypes.oneOfType([String, Number, Boolean]).def(false),
390
+ disabled: external_shared_.PropTypes.bool.def(false),
391
+ checked: external_shared_.PropTypes.bool.def(false),
392
+ indeterminate: external_shared_.PropTypes.bool,
393
+ beforeChange: external_shared_.PropTypes.func,
394
+ size: external_shared_.PropTypes.size().def(external_shared_.SizeEnum.LARGE),
395
+ immediateEmitChange: external_shared_.PropTypes.bool.def(true) // 默认设置checked是否触发change事件
396
+ };
397
+
398
+ /* harmony default export */ const src_checkbox = ((0,external_vue_.defineComponent)({
399
+ name: 'Checkbox',
400
+ props: checkboxProps,
401
+ emits: {
402
+ 'update:modelValue': function updateModelValue(value) {
403
+ return value !== undefined;
404
+ },
405
+ change: function change(value) {
406
+ return value !== undefined;
407
+ }
408
+ },
409
+ setup: function setup(props) {
410
+ var _useFocus = useFocus(),
411
+ _useFocus2 = _slicedToArray(_useFocus, 2),
412
+ isFocus = _useFocus2[0],
413
+ _useFocus2$ = _useFocus2[1],
414
+ handleBlur = _useFocus2$.blur,
415
+ handleFocus = _useFocus2$.focus;
416
+ var _useCheckbox = useCheckbox(),
417
+ inputRef = _useCheckbox.inputRef,
418
+ isChecked = _useCheckbox.isChecked,
419
+ isDisabled = _useCheckbox.isDisabled,
420
+ setChecked = _useCheckbox.setChecked,
421
+ handleChange = _useCheckbox.handleChange;
422
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
423
+ resolveClassName = _usePrefix.resolveClassName;
424
+ return {
425
+ inputRef: inputRef,
426
+ isFocus: isFocus,
427
+ isChecked: isChecked,
428
+ isDisabled: isDisabled,
429
+ setChecked: setChecked,
430
+ handleBlur: handleBlur,
431
+ handleFocus: handleFocus,
432
+ handleChange: handleChange,
433
+ size: props.size,
434
+ resolveClassName: resolveClassName
435
+ };
436
+ },
437
+ render: function render() {
438
+ var _classes,
439
+ _this = this;
440
+ var checkboxClass = (0,external_shared_.classes)((_classes = {}, _defineProperty(_classes, "".concat(this.resolveClassName('checkbox')), true), _defineProperty(_classes, 'is-focused', this.isFocus), _defineProperty(_classes, 'is-checked', this.isChecked), _defineProperty(_classes, 'is-disabled', this.isDisabled), _defineProperty(_classes, 'is-indeterminated', this.indeterminate), _classes));
441
+ var renderLabel = function renderLabel() {
442
+ if (!_this.label && !_this.$slots["default"]) {
443
+ return null;
444
+ }
445
+ return (0,external_vue_.createVNode)("span", {
446
+ "class": "".concat(_this.resolveClassName('checkbox-label'))
447
+ }, [_this.$slots["default"] ? _this.$slots["default"]() : _this.label]);
448
+ };
449
+ return (0,external_vue_.createVNode)("label", {
450
+ "class": checkboxClass
451
+ }, [(0,external_vue_.createVNode)("span", {
452
+ "class": [this.resolveClassName('checkbox-input'), this.size]
453
+ }, [(0,external_vue_.createVNode)("input", {
454
+ "ref": "inputRef",
455
+ "role": "checkbox",
456
+ "type": "checkbox",
457
+ "class": "".concat(this.resolveClassName('checkbox-original')),
458
+ "disabled": this.isDisabled,
459
+ "checked": this.isChecked,
460
+ "onChange": this.handleChange
461
+ }, null)]), renderLabel()]);
462
+ }
463
+ }));
464
+ ;// CONCATENATED MODULE: ../../packages/checkbox/src/checkbox-group.tsx
465
+
466
+ /*
467
+ * Tencent is pleased to support the open source community by making
468
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
469
+ *
470
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
471
+ *
472
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
473
+ *
474
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
475
+ *
476
+ * ---------------------------------------------------
477
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
478
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
479
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
480
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
481
+ *
482
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
483
+ * the Software.
484
+ *
485
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
486
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
487
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
488
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
489
+ * IN THE SOFTWARE.
490
+ */
491
+
492
+
493
+
494
+
495
+ var checkboxGroupProps = {
496
+ name: external_shared_.PropTypes.string.def(''),
497
+ modelValue: external_shared_.PropTypes.array,
498
+ disabled: external_shared_.PropTypes.bool,
499
+ withValidate: external_shared_.PropTypes.bool.def(true)
500
+ };
501
+ /* harmony default export */ const checkbox_group = ((0,external_vue_.defineComponent)({
502
+ name: 'CheckboxGroup',
503
+ props: checkboxGroupProps,
504
+ emits: ['change', 'update:modelValue'],
505
+ setup: function setup(props, context) {
506
+ var formItem = (0,external_shared_.useFormItem)();
507
+ var checkboxInstanceList = [];
508
+ var register = function register(checkboxContext) {
509
+ checkboxInstanceList.push(checkboxContext);
510
+ };
511
+ var unregister = function unregister(checkboxContext) {
512
+ var index = checkboxInstanceList.indexOf(checkboxContext);
513
+ if (index > -1) {
514
+ checkboxInstanceList.splice(index, 1);
515
+ }
516
+ };
517
+ var handleChange = function handleChange() {
518
+ var nextValue = checkboxInstanceList.reduce(function (result, checkboxInstance) {
519
+ if (checkboxInstance.isChecked) {
520
+ result.push(checkboxInstance.label);
521
+ }
522
+ return result;
523
+ }, []);
524
+ context.emit('update:modelValue', nextValue);
525
+ context.emit('change', nextValue);
526
+ };
527
+ (0,external_vue_.provide)(checkboxGroupKey, {
528
+ name: 'CheckboxGroup',
529
+ props: props,
530
+ register: register,
531
+ unregister: unregister,
532
+ handleChange: handleChange
533
+ });
534
+ (0,external_vue_.watch)(function () {
535
+ return props.modelValue;
536
+ }, function () {
537
+ var _a;
538
+ if (props.withValidate) {
539
+ (_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
540
+ }
541
+ });
542
+ (0,external_vue_.onMounted)(function () {
543
+ var modelValue = props.modelValue || [];
544
+ checkboxInstanceList.forEach(function (checkboxInstance) {
545
+ if (modelValue.includes(checkboxInstance.label)) {
546
+ checkboxInstance.setChecked(true);
547
+ }
548
+ });
549
+ });
550
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
551
+ resolveClassName = _usePrefix.resolveClassName;
552
+ return {
553
+ resolveClassName: resolveClassName
554
+ };
555
+ },
556
+ render: function render() {
557
+ var _a;
558
+ return (0,external_vue_.createVNode)("div", {
559
+ "class": "".concat(this.resolveClassName('checkbox-group'))
560
+ }, [(_a = this.$slots) === null || _a === void 0 ? void 0 : _a["default"]()]);
561
+ }
562
+ }));
563
+ ;// CONCATENATED MODULE: ../../packages/checkbox/src/index.ts
564
+ /*
565
+ * Tencent is pleased to support the open source community by making
566
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
567
+ *
568
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
569
+ *
570
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
571
+ *
572
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
573
+ *
574
+ * ---------------------------------------------------
575
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
576
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
577
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
578
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
579
+ *
580
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
581
+ * the Software.
582
+ *
583
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
584
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
585
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
586
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
587
+ * IN THE SOFTWARE.
588
+ */
589
+
590
+
591
+
592
+ var BkCheckbox = (0,external_shared_.withInstallProps)(src_checkbox, {
593
+ Group: checkbox_group
594
+ });
595
+ /* harmony default export */ const src = (BkCheckbox);
596
+
597
+ })();
598
+
599
+ /******/ return __webpack_exports__;
600
+ /******/ })()
601
+ ;
602
+ });