bkui-vue 0.0.2-beta.71 → 0.0.2-beta.73

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 (208) hide show
  1. package/dist/index.cjs.js +2 -2
  2. package/dist/index.esm.js +10 -7
  3. package/dist/index.umd.js +2 -2
  4. package/dist/style.css +1 -1
  5. package/dist/style.variable.css +1 -1
  6. package/lib/affix/index.js +319 -1
  7. package/lib/alert/index.js +215 -1
  8. package/lib/animate-number/index.js +155 -1
  9. package/lib/backtop/backtop.css +8 -8
  10. package/lib/backtop/backtop.less +3 -1
  11. package/lib/backtop/backtop.variable.css +8 -8
  12. package/lib/backtop/index.js +188 -1
  13. package/lib/badge/index.js +236 -1
  14. package/lib/breadcrumb/breadcrumb.css +4 -4
  15. package/lib/breadcrumb/breadcrumb.variable.css +4 -4
  16. package/lib/breadcrumb/index.js +309 -1
  17. package/lib/button/index.js +321 -1
  18. package/lib/card/card.css +4 -4
  19. package/lib/card/card.variable.css +4 -4
  20. package/lib/card/index.js +274 -1
  21. package/lib/cascader/cascader.css +4 -4
  22. package/lib/cascader/cascader.variable.css +4 -4
  23. package/lib/cascader/index.js +2019 -2
  24. package/lib/checkbox/index.js +542 -1
  25. package/lib/code-diff/index.js +5501 -1
  26. package/lib/collapse/index.js +518 -1
  27. package/lib/collapse-transition/index.js +178 -1
  28. package/lib/color-picker/index.js +2662 -1
  29. package/lib/components.js +530 -1
  30. package/lib/config-provider/index.js +317 -1
  31. package/lib/container/container.css +4 -4
  32. package/lib/container/container.variable.css +4 -4
  33. package/lib/container/index.js +343 -1
  34. package/lib/date-picker/index.js +5481 -1
  35. package/lib/dialog/index.js +1266 -2
  36. package/lib/directives/index.js +1335 -2
  37. package/lib/dist.index.js +87 -1
  38. package/lib/divider/index.js +169 -1
  39. package/lib/dropdown/index.js +369 -1
  40. package/lib/exception/index.js +385 -1
  41. package/lib/fixed-navbar/index.js +154 -1
  42. package/lib/form/index.js +918 -1
  43. package/lib/hooks.js +73 -1
  44. package/lib/icon/angle-double-down-line.js +481 -1
  45. package/lib/icon/angle-double-left-line.js +481 -1
  46. package/lib/icon/angle-double-left.js +481 -1
  47. package/lib/icon/angle-double-right-line.js +481 -1
  48. package/lib/icon/angle-double-right.js +481 -1
  49. package/lib/icon/angle-double-up-line.js +481 -1
  50. package/lib/icon/angle-down-fill.js +481 -1
  51. package/lib/icon/angle-down-line.js +481 -1
  52. package/lib/icon/angle-down.js +481 -1
  53. package/lib/icon/angle-left.js +481 -1
  54. package/lib/icon/angle-right.js +481 -1
  55. package/lib/icon/angle-up-fill.js +481 -1
  56. package/lib/icon/angle-up.js +481 -1
  57. package/lib/icon/archive-fill.js +481 -1
  58. package/lib/icon/arrows-left.js +481 -1
  59. package/lib/icon/arrows-right.js +481 -1
  60. package/lib/icon/assistant.js +481 -1
  61. package/lib/icon/audio-fill.js +481 -1
  62. package/lib/icon/bk.js +481 -1
  63. package/lib/icon/circle.js +481 -1
  64. package/lib/icon/close-line.js +481 -1
  65. package/lib/icon/close.js +481 -1
  66. package/lib/icon/code.js +481 -1
  67. package/lib/icon/cog-shape.js +481 -1
  68. package/lib/icon/collapse-left.js +481 -1
  69. package/lib/icon/copy-shape.js +481 -1
  70. package/lib/icon/copy.js +481 -1
  71. package/lib/icon/data-shape.js +481 -1
  72. package/lib/icon/del.js +481 -1
  73. package/lib/icon/doc-fill.js +481 -1
  74. package/lib/icon/done.js +481 -1
  75. package/lib/icon/down-shape.js +481 -1
  76. package/lib/icon/down-small.js +481 -1
  77. package/lib/icon/edit-line.js +481 -1
  78. package/lib/icon/ellipsis.js +481 -1
  79. package/lib/icon/enlarge-line.js +481 -1
  80. package/lib/icon/error.js +481 -1
  81. package/lib/icon/excel-fill.js +481 -1
  82. package/lib/icon/exclamation-circle-shape.js +481 -1
  83. package/lib/icon/eye.js +481 -1
  84. package/lib/icon/filliscreen-line.js +481 -1
  85. package/lib/icon/fix-line.js +481 -1
  86. package/lib/icon/fix-shape.js +481 -1
  87. package/lib/icon/folder-open.js +481 -1
  88. package/lib/icon/folder-shape-open.js +481 -1
  89. package/lib/icon/folder-shape.js +481 -1
  90. package/lib/icon/folder.js +481 -1
  91. package/lib/icon/funnel.js +481 -1
  92. package/lib/icon/help-document-fill.js +481 -1
  93. package/lib/icon/help-fill.js +481 -1
  94. package/lib/icon/help.js +481 -1
  95. package/lib/icon/image-fill.js +527 -1
  96. package/lib/icon/img-error.js +527 -1
  97. package/lib/icon/img-placehoulder.js +527 -1
  98. package/lib/icon/index.js +2367 -1
  99. package/lib/icon/info-line.js +527 -1
  100. package/lib/icon/info.js +527 -1
  101. package/lib/icon/left-shape.js +527 -1
  102. package/lib/icon/left-turn-line.js +527 -1
  103. package/lib/icon/narrow-line.js +527 -1
  104. package/lib/icon/original.js +527 -1
  105. package/lib/icon/pdf-fill.js +527 -1
  106. package/lib/icon/play-shape.js +527 -1
  107. package/lib/icon/plus.js +527 -1
  108. package/lib/icon/ppt-fill.js +527 -1
  109. package/lib/icon/qq.js +527 -1
  110. package/lib/icon/right-shape.js +527 -1
  111. package/lib/icon/right-turn-line.js +527 -1
  112. package/lib/icon/search.js +527 -1
  113. package/lib/icon/share.js +527 -1
  114. package/lib/icon/spinner.js +527 -1
  115. package/lib/icon/success.js +527 -1
  116. package/lib/icon/switcher-loading.js +527 -1
  117. package/lib/icon/text-file.js +527 -1
  118. package/lib/icon/text-fill.js +527 -1
  119. package/lib/icon/transfer.js +527 -1
  120. package/lib/icon/tree-application-shape.js +527 -1
  121. package/lib/icon/unfull-screen.js +527 -1
  122. package/lib/icon/unvisible.js +527 -1
  123. package/lib/icon/up-shape.js +527 -1
  124. package/lib/icon/upload.js +527 -1
  125. package/lib/icon/video-fill.js +527 -1
  126. package/lib/icon/warn.js +527 -1
  127. package/lib/icon/weixin-pro.js +527 -1
  128. package/lib/icon/weixin.js +527 -1
  129. package/lib/image/index.js +593 -1
  130. package/lib/index.js +97 -1
  131. package/lib/info-box/index.js +1456 -2
  132. package/lib/input/index.js +1528 -2
  133. package/lib/input/input.css +4 -4
  134. package/lib/input/input.variable.css +4 -4
  135. package/lib/link/index.js +160 -1
  136. package/lib/loading/index.js +379 -1
  137. package/lib/loading/loading.css +4 -4
  138. package/lib/loading/loading.variable.css +4 -4
  139. package/lib/locale/index.js +465 -1
  140. package/lib/menu/index.js +725 -1
  141. package/lib/menu/menu.css +4 -4
  142. package/lib/menu/menu.variable.css +4 -4
  143. package/lib/message/index.js +1790 -2
  144. package/lib/modal/index.js +337 -1
  145. package/lib/navigation/index.js +367 -1
  146. package/lib/notify/index.js +394 -1
  147. package/lib/overflow-title/index.js +485 -1
  148. package/lib/pagination/index.js +880 -1
  149. package/lib/plugin-popover/index.js +4067 -1
  150. package/lib/plugins/index.js +63 -1
  151. package/lib/pop-confirm/index.js +273 -1
  152. package/lib/popover/index.js +4075 -1
  153. package/lib/popover2/index.js +107 -1
  154. package/lib/preset.js +93 -1
  155. package/lib/process/index.js +1099 -2
  156. package/lib/progress/index.js +428 -1
  157. package/lib/progress/progress.css +4 -4
  158. package/lib/progress/progress.variable.css +4 -4
  159. package/lib/radio/index.js +627 -1
  160. package/lib/rate/index.js +338 -1
  161. package/lib/resize-layout/index.js +430 -1
  162. package/lib/search-select/index.js +3036 -2
  163. package/lib/search-select/search-select.css +11 -11
  164. package/lib/search-select/search-select.less +13 -9
  165. package/lib/search-select/search-select.variable.css +11 -11
  166. package/lib/select/index.js +2571 -2
  167. package/lib/select/select.css +4 -4
  168. package/lib/select/select.variable.css +4 -4
  169. package/lib/shared/index.js +2865 -1
  170. package/lib/sideslider/index.js +1005 -2
  171. package/lib/slider/index.js +1629 -2
  172. package/lib/steps/index.js +1163 -2
  173. package/lib/styles/mixins/mixins.css +4 -4
  174. package/lib/styles/mixins/mixins.variable.css +4 -4
  175. package/lib/swiper/index.js +336 -1
  176. package/lib/switcher/index.js +277 -1
  177. package/lib/switcher/switcher.css +4 -4
  178. package/lib/switcher/switcher.variable.css +4 -4
  179. package/lib/tab/index.js +859 -1
  180. package/lib/table/index.js +6568 -1
  181. package/lib/table-column/index.js +730 -1
  182. package/lib/tag/index.js +233 -1
  183. package/lib/tag-input/index.js +1652 -1
  184. package/lib/time-picker/index.js +71 -1
  185. package/lib/timeline/index.js +242 -1
  186. package/lib/transfer/index.js +673 -1
  187. package/lib/tree/index.js +2625 -1
  188. package/lib/upload/index.js +3193 -2
  189. package/lib/upload/upload.css +4 -4
  190. package/lib/upload/upload.variable.css +4 -4
  191. package/lib/virtual-render/index.js +748 -1
  192. package/package.json +2 -1
  193. package/lib/cascader/index.js.LICENSE.txt +0 -1
  194. package/lib/dialog/index.js.LICENSE.txt +0 -1
  195. package/lib/directives/index.js.LICENSE.txt +0 -14
  196. package/lib/info-box/index.js.LICENSE.txt +0 -1
  197. package/lib/input/index.js.LICENSE.txt +0 -1
  198. package/lib/message/index.js.LICENSE.txt +0 -6
  199. package/lib/process/index.js.LICENSE.txt +0 -1
  200. package/lib/search-select/index.js.LICENSE.txt +0 -1
  201. package/lib/select/index.js.LICENSE.txt +0 -1
  202. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  203. package/lib/slider/index.js.LICENSE.txt +0 -1
  204. package/lib/steps/index.js.LICENSE.txt +0 -1
  205. package/lib/styles/mixins/animate.css +0 -21
  206. package/lib/styles/mixins/animate.less +0 -27
  207. package/lib/styles/mixins/animate.variable.css +0 -21
  208. package/lib/upload/index.js.LICENSE.txt +0 -1
package/lib/form/index.js CHANGED
@@ -1 +1,918 @@
1
- !function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("../shared"),require("vue"),require("../config-provider"),require("lodash"),require("../directives"),require("../icon"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","lodash","../directives","../icon"],r);else{var t="object"==typeof exports?r(require("../shared"),require("vue"),require("../config-provider"),require("lodash"),require("../directives"),require("../icon")):r(e["../shared"],e.vue,e["../config-provider"],e.lodash,e["../directives"],e["../icon"]);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}(self,((e,r,t,o,n,i)=>(()=>{"use strict";var s={2717:e=>{e.exports=t},4061:e=>{e.exports=n},6870:e=>{e.exports=i},4212:r=>{r.exports=e},467:e=>{e.exports=o},748:e=>{e.exports=r}},a={};function l(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={exports:{}};return s[e](t,t.exports,l),t.exports}l.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return l.d(r,{a:r}),r},l.d=(e,r)=>{for(var t in r)l.o(r,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{l.r(u),l.d(u,{BkComposeFormItem:()=>n,BkForm:()=>j,BkFormItem:()=>P,default:()=>N,formItemKey:()=>e.formItemKey,formKey:()=>e.formKey,useFormItem:()=>e.useFormItem});var e=l(4212),r=l(748),t=l(2717),o=function(e){return e.__v_isVNode};const n=(0,r.defineComponent)({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},setup:function(){return{resolveClassName:(0,t.usePrefix)().resolveClassName}},render:function(){if(!this.$slots.default)return null;var e=this.$slots.default();if(e.length>1){for(var t=e.length,n=0,i=null;n<t;){if(o(e[n])){i=e[n];break}n+=1}for(var s=t-1,a=null;s>=0&&s>n;){if(o(e[s])){a=e[s];break}s-=1}if(i&&a){i.props||(i.props={});var l="".concat(this.resolveClassName("compose-form-item-head"));i.props.class&&(l+=" ".concat(i.props.class)),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=l,a.props||(a.props={});var u="".concat(this.resolveClassName("compose-form-item-tail"));a.props.class&&(u+=" ".concat(a.props.class)),this.tailBackgroundColor&&(a.props.style=Object.assign(a.props.style||{},{"background-color":this.tailBackgroundColor})),a.props.class=u}}return(0,r.h)("div",{class:"".concat(this.resolveClassName("compose-form-item"))},e)}});function i(e){return i="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},i(e)}function s(e,r,t){return(r=function(e){var r=function(e,r){if("object"!==i(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var a=l(467),c=l.n(a),p={formType:e.PropTypes.oneOf(["default","vertical"]).def("default"),labelWidth:e.PropTypes.oneOfType([Number,String]).def(150),labelPosition:e.PropTypes.oneOf(["left","center","right"]),model:e.PropTypes.object,rules:e.PropTypes.object},m={submit:null,validate:function(e,r,t){return(0,a.isString)(e)&&(0,a.isBoolean)(r)&&(0,a.isString)(t)}};const f=(0,r.defineComponent)({name:"Form",props:p,emits:m,setup:function(o,n){var i=[];return(0,r.provide)(e.formKey,{props:o,emit:n.emit,register:function(e){i.push(e)},unregister:function(e){i=i.reduce((function(r,t){return t!==e&&r.push(t),r}),[])}}),{handleSubmit:function(e){e.preventDefault(),n.emit("submit")},validate:function(e){var r={};return r=e?("string"==typeof e?[e]:e).reduce((function(e,r){return Object.assign(Object.assign({},e),s({},r,!0))}),{}):i.reduce((function(e,r){return r.property?Object.assign(Object.assign({},e),s({},r.property,!0)):e}),{}),Promise.all(i.reduce((function(e,t){return r[t.property]&&e.push(t.validate()),e}),[])).then((function(){return Promise.resolve(o.model)}))},getValidateResult:function(){return Promise.all(i.map((function(e){return e.validate(void 0,!1)}))).then((function(){return!0})).catch((function(){return!1}))},clearValidate:function(e){var r={};r=e?("string"==typeof e?[e]:e).reduce((function(e,r){return Object.assign(Object.assign({},e),s({},r,!0))}),{}):i.reduce((function(e,r){return Object.assign(Object.assign({},e),s({},r.property,!0))}),{}),i.forEach((function(e){return r[e.property]&&e.clearValidate()}))},resolveClassName:(0,t.usePrefix)().resolveClassName}},render:function(){var t,o,n,i=(0,e.classes)((s(t={},"".concat(this.resolveClassName("form")),!0),s(t,"".concat(this.resolveClassName("form--".concat(this.formType))),!0),t));return(0,r.createVNode)("form",{class:i,onSubmit:this.handleSubmit},[null===(n=(o=this.$slots).default)||void 0===n?void 0:n.call(o)])}});function d(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}function v(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return d(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)?d(e,r):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 g=l(4061),y=l(6870);const b={required:function(e){return!("number"!=typeof e&&"boolean"!=typeof e&&!c().isDate(e)&&c().isEmpty(e))},min:function(e,r){return e>=r},max:function(e,r){return r>=e},email:function(e){return/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)},maxlength:function(e,r){return e.length<=r},pattern:function(e,r){return r.test(e)}};var h={label:e.PropTypes.string,labelWidth:e.PropTypes.oneOfType([Number,String]),labelPosition:e.PropTypes.oneOf(["left","center","right"]),property:e.PropTypes.string.def(""),required:e.PropTypes.bool.def(!1),email:e.PropTypes.bool.def(!1),max:e.PropTypes.number,min:e.PropTypes.number,maxlength:e.PropTypes.number,rules:e.PropTypes.array,autoCheck:e.PropTypes.bool.def(!1),description:e.PropTypes.string,errorDisplayType:e.PropTypes.oneOf(["tooltips","normal"]).def("normal")},x=function(e){return void 0!==e};const P=(0,r.defineComponent)({name:"FormItem",directives:{bkTooltips:g.bkTooltips},props:h,setup:function(o,n){var i=(0,t.useLocale)("form"),l=(0,e.useForm)(),u=Boolean(l),c=(0,e.useFormItem)(),p=Boolean(c),m=(0,r.getCurrentInstance)(),f=(0,r.reactive)({isError:!1,errorMessage:""}),d=(0,r.computed)((function(){return!!u&&"vertical"===l.props.formType})),g=(0,r.computed)((function(){return!(!o.label&&!n.slots.label)})),y=(0,r.computed)((function(){var e={width:"",paddingRight:"",textAlign:""},r=o.labelPosition||u&&l.props.labelPosition;if(r&&(e["text-align"]=r),"vertical"===l.props.formType||!o.label&&p)return e;var t=x(o.labelWidth)?o.labelWidth:u&&l.props.labelWidth;return x(t)&&(e.width="".concat(t,"px"),e.paddingRight=t?"":"0px"),e})),h=(0,r.computed)((function(){return s({},"margin-left",y.value.width)})),P=function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!o.property||u&&!l.props.model)return Promise.resolve(!0);var t,n,s=[];u&&l.props.rules&&(t=l.props.rules,n=o.property,Object.prototype.hasOwnProperty.call(t,n))&&(s=l.props.rules[o.property]),o.rules&&(s=o.rules),s=function(e,r){return r.reduce((function(r,t){return t.trigger&&e?((Array.isArray(t.trigger)?t.trigger:[t.trigger]).includes(e)&&r.push(t),r):(r.push(t),r)}),[])}(e,function(e,r,t){var o=!1,n=!1,i=e.reduce((function(e,r){var i;if(r.required)i=(0,a.isFunction)(r.validator)?r.validator:b.required,o=!0;else if(r.email)i=(0,a.isFunction)(r.validator)?r.validator:b.email,n=!0;else if(Number(r.max)>-1)i=function(e){return b.max(e,r.max)};else if(Number(r.min)>-1)i=function(e){return b.min(e,r.max)};else if(Number(r.maxlength)>-1)i=function(e){return b.min(e,r.max)};else if("[object RegExp]"===Object.prototype.toString.call(r.pattern))i=function(e){return b.pattern(e,r.pattern)};else{if(!(0,a.isFunction)(r.validator))return e;i=r.validator}return e.push({validator:i,message:r.message||t.value.verifyError,trigger:r.trigger||"blur"}),e}),[]),s=r.reduce((function(e,r){return r.required&&o||r.email&&n||e.push(r),e}),[]);return[].concat(v(s),v(i))}(s,function(e,r){var t=[],o=e.label||"";return e.required&&t.push({required:!0,validator:b.required,message:"".concat(o).concat(r.value.notBeEmpty),trigger:"change"}),e.email&&t.push({email:!0,validator:b.email,message:"".concat(o).concat(r.value.incorrectFormat),trigger:"change"}),Number(e.max)>-1&&t.push({validator:function(r){return b.max(r,e.max)},message:"".concat(o).concat(r.value.max," ").concat(e.max),trigger:"change"}),Number(e.min)>-1&&t.push({validator:function(r){return b.min(r,e.min)},message:"".concat(o).concat(r.value.min," ").concat(e.min),trigger:"change"}),Number(e.maxlength)>-1&&t.push({validator:function(r){return b.maxlength(r,e.maxlength)},message:"".concat(o).concat(r.value.maxLen," ").concat(e.maxlength),trigger:"change"}),t}(o,i),i)),s.length>0&&r&&(f.isError=!1,f.errorMessage="");var c,p=(0,a.get)(l.props.model,o.property),m=(c=-1,function(){if((c+=1)>=s.length)return l.emit("validate",o.property,!0,""),Promise.resolve(!0);var e=s[c];return Promise.resolve().then((function(){var t=e.validator(p),n=function(e){return"function"==typeof e.message?e.message():e.message}(e);return"boolean"!=typeof t&&"function"==typeof t.then?t.then((function(e){if(!1===e)return Promise.reject(n)})).then((function(){return m()}),(function(){return r&&(f.isError=!0,f.errorMessage=n),l.emit("validate",o.property,!1,n),Promise.reject(f.errorMessage)})):t?m():(r&&(f.isError=!0,f.errorMessage="string"==typeof t?t:n),l.emit("validate",o.property,!1,n),Promise.reject(f.errorMessage))}))});return m()},j=function(){f.isError=!1,f.errorMessage=""};(0,r.provide)(e.formItemKey,Object.assign(Object.assign({},o),{validate:P,clearValidate:j})),(0,r.onMounted)((function(){u&&l.register(m.proxy)})),(0,r.onBeforeUnmount)((function(){u&&l.unregister(m.proxy)}));var N=(0,t.usePrefix)().resolveClassName;return Object.assign(Object.assign({},(0,r.toRefs)(f)),{isShowLabel:g,labelStyles:y,contentStyles:h,isFormTypeVertical:d,validate:P,clearValidate:j,resolveClassName:N})},render:function(){var t,o,n,i,a,l=this,u=(0,e.classes)((s(t={},"".concat(this.resolveClassName("form-item")),!0),s(t,"is-error",this.isError),s(t,"is-required",this.required),t));return(0,r.createVNode)("div",{class:u},[this.isShowLabel&&(0,r.createVNode)("div",{class:"".concat(this.resolveClassName("form-label")),style:this.labelStyles},[l.$slots.label?(0,r.createVNode)("span",null,[l.$slots.label()]):l.description?(0,r.withDirectives)((0,r.createVNode)("span",{class:s({},"".concat(l.resolveClassName("form-label-description")),Boolean(l.description))},[l.label]),[[(0,r.resolveDirective)("bk-tooltips"),l.description]]):(0,r.createVNode)("span",null,[l.label]),this.isFormTypeVertical&&(null===(n=(o=this.$slots).labelAppend)||void 0===n?void 0:n.call(o))]),(0,r.createVNode)("div",{class:"".concat(this.resolveClassName("form-content")),style:this.contentStyles},[null===(a=(i=this.$slots).default)||void 0===a?void 0:a.call(i),l.isError?"tooltips"===l.errorDisplayType?(0,r.withDirectives)((0,r.createVNode)("div",{class:"".concat(l.resolveClassName("form-error-tips"))},[(0,r.createVNode)(y.ExclamationCircleShape,null,null)]),[[(0,r.resolveDirective)("bk-tooltips"),l.errorMessage]]):(0,r.createVNode)("div",{class:"".concat(l.resolveClassName("form-error"))},[l.$slots.error?l.$slots.error(l.errorMessage):l.errorMessage]):null])])}});var j=(0,e.withInstallProps)(f,{FormItem:P,ComposeFormItem:n});const N=j})(),u})()));
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_lodash__ from "lodash";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__directives_9cc9ba10__ from "../directives";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__ from "../icon";
7
+ /******/ // The require scope
8
+ /******/ var __webpack_require__ = {};
9
+ /******/
10
+ /************************************************************************/
11
+ /******/ /* webpack/runtime/define property getters */
12
+ /******/ (() => {
13
+ /******/ // define getter functions for harmony exports
14
+ /******/ __webpack_require__.d = (exports, definition) => {
15
+ /******/ for(var key in definition) {
16
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
17
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
18
+ /******/ }
19
+ /******/ }
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
24
+ /******/ (() => {
25
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
26
+ /******/ })();
27
+ /******/
28
+ /************************************************************************/
29
+ var __webpack_exports__ = {};
30
+
31
+ // EXPORTS
32
+ __webpack_require__.d(__webpack_exports__, {
33
+ kq: () => (/* reexport */ compose_form_item),
34
+ ZD: () => (/* binding */ BkForm),
35
+ a_: () => (/* reexport */ form_item),
36
+ ZP: () => (/* binding */ src),
37
+ xE: () => (/* reexport */ external_shared_namespaceObject.formItemKey),
38
+ vh: () => (/* reexport */ external_shared_namespaceObject.formKey),
39
+ A9: () => (/* reexport */ external_shared_namespaceObject.useFormItem)
40
+ });
41
+
42
+ ;// CONCATENATED MODULE: external "../shared"
43
+ var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
44
+ var y = x => () => x
45
+ const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["formItemKey"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.formItemKey, ["formKey"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.formKey, ["useForm"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.useForm, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.useFormItem, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
46
+ ;// CONCATENATED MODULE: external "vue"
47
+ var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
48
+ var external_vue_y = x => () => x
49
+ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["h"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.h, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
50
+ ;// CONCATENATED MODULE: external "../config-provider"
51
+ var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
52
+ var external_config_provider_y = x => () => x
53
+ const external_config_provider_namespaceObject = external_config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
54
+ ;// CONCATENATED MODULE: ../../packages/form/src/compose-form-item.tsx
55
+ /*
56
+ * Tencent is pleased to support the open source community by making
57
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
58
+ *
59
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
60
+ *
61
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
62
+ *
63
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
64
+ *
65
+ * ---------------------------------------------------
66
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
67
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
68
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
69
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
70
+ *
71
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
72
+ * the Software.
73
+ *
74
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
75
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
76
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
77
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
78
+ * IN THE SOFTWARE.
79
+ */
80
+
81
+
82
+ var isCustomComponent = function isCustomComponent(node) {
83
+ return node.__v_isVNode;
84
+ };
85
+ /* harmony default export */ const compose_form_item = ((0,external_vue_namespaceObject.defineComponent)({
86
+ name: 'ComposeFormItem',
87
+ props: {
88
+ headBackgroundColor: {
89
+ type: String,
90
+ "default": '#FAFBFD'
91
+ },
92
+ tailBackgroundColor: String
93
+ },
94
+ setup: function setup() {
95
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
96
+ resolveClassName = _usePrefix.resolveClassName;
97
+ return {
98
+ resolveClassName: resolveClassName
99
+ };
100
+ },
101
+ render: function render() {
102
+ if (!this.$slots["default"]) {
103
+ return null;
104
+ }
105
+ var childrenArr = this.$slots["default"]();
106
+ if (childrenArr.length > 1) {
107
+ var childrenLength = childrenArr.length;
108
+ var startIndex = 0;
109
+ var headChildren = null;
110
+ while (startIndex < childrenLength) {
111
+ if (isCustomComponent(childrenArr[startIndex])) {
112
+ headChildren = childrenArr[startIndex];
113
+ break;
114
+ }
115
+ startIndex = startIndex + 1;
116
+ }
117
+ var tailIndex = childrenLength - 1;
118
+ var tailChildren = null;
119
+ while (tailIndex >= 0 && tailIndex > startIndex) {
120
+ if (isCustomComponent(childrenArr[tailIndex])) {
121
+ tailChildren = childrenArr[tailIndex];
122
+ break;
123
+ }
124
+ tailIndex = tailIndex - 1;
125
+ }
126
+ if (headChildren && tailChildren) {
127
+ if (!headChildren.props) {
128
+ headChildren.props = {};
129
+ }
130
+ var headChildClass = "".concat(this.resolveClassName('compose-form-item-head'));
131
+ if (headChildren.props["class"]) {
132
+ headChildClass += " ".concat(headChildren.props["class"]);
133
+ }
134
+ if (this.headBackgroundColor) {
135
+ headChildren.props.style = Object.assign(headChildren.props.style || {}, {
136
+ 'background-color': this.headBackgroundColor
137
+ });
138
+ }
139
+ headChildren.props["class"] = headChildClass;
140
+ if (!tailChildren.props) {
141
+ tailChildren.props = {};
142
+ }
143
+ var tailChildStaticClass = "".concat(this.resolveClassName('compose-form-item-tail'));
144
+ if (tailChildren.props["class"]) {
145
+ tailChildStaticClass += " ".concat(tailChildren.props["class"]);
146
+ }
147
+ if (this.tailBackgroundColor) {
148
+ tailChildren.props.style = Object.assign(tailChildren.props.style || {}, {
149
+ 'background-color': this.tailBackgroundColor
150
+ });
151
+ }
152
+ tailChildren.props["class"] = tailChildStaticClass;
153
+ }
154
+ }
155
+ return (0,external_vue_namespaceObject.h)('div', {
156
+ "class": "".concat(this.resolveClassName('compose-form-item'))
157
+ }, childrenArr);
158
+ }
159
+ }));
160
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
161
+ function _typeof(obj) {
162
+ "@babel/helpers - typeof";
163
+
164
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
165
+ return typeof obj;
166
+ } : function (obj) {
167
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
168
+ }, _typeof(obj);
169
+ }
170
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
171
+
172
+ function _toPrimitive(input, hint) {
173
+ if (_typeof(input) !== "object" || input === null) return input;
174
+ var prim = input[Symbol.toPrimitive];
175
+ if (prim !== undefined) {
176
+ var res = prim.call(input, hint || "default");
177
+ if (_typeof(res) !== "object") return res;
178
+ throw new TypeError("@@toPrimitive must return a primitive value.");
179
+ }
180
+ return (hint === "string" ? String : Number)(input);
181
+ }
182
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
183
+
184
+
185
+ function _toPropertyKey(arg) {
186
+ var key = _toPrimitive(arg, "string");
187
+ return _typeof(key) === "symbol" ? key : String(key);
188
+ }
189
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
190
+
191
+ function _defineProperty(obj, key, value) {
192
+ key = _toPropertyKey(key);
193
+ if (key in obj) {
194
+ Object.defineProperty(obj, key, {
195
+ value: value,
196
+ enumerable: true,
197
+ configurable: true,
198
+ writable: true
199
+ });
200
+ } else {
201
+ obj[key] = value;
202
+ }
203
+ return obj;
204
+ }
205
+ ;// CONCATENATED MODULE: external "lodash"
206
+ var external_lodash_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
207
+ var external_lodash_y = x => () => x
208
+ const external_lodash_namespaceObject = external_lodash_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__["default"], ["get"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__.get, ["isBoolean"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__.isBoolean, ["isFunction"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__.isFunction, ["isString"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__.isString });
209
+ ;// CONCATENATED MODULE: ../../packages/form/src/form.tsx
210
+
211
+
212
+ /*
213
+ * Tencent is pleased to support the open source community by making
214
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
215
+ *
216
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
217
+ *
218
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
219
+ *
220
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
221
+ *
222
+ * ---------------------------------------------------
223
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
224
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
225
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
226
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
227
+ *
228
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
229
+ * the Software.
230
+ *
231
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
232
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
233
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
234
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
235
+ * IN THE SOFTWARE.
236
+ */
237
+
238
+
239
+
240
+
241
+ var formProps = {
242
+ formType: external_shared_namespaceObject.PropTypes.oneOf(['default', 'vertical']).def('default'),
243
+ labelWidth: external_shared_namespaceObject.PropTypes.oneOfType([Number, String]).def(150),
244
+ labelPosition: external_shared_namespaceObject.PropTypes.oneOf(['left', 'center', 'right']),
245
+ model: external_shared_namespaceObject.PropTypes.object,
246
+ rules: external_shared_namespaceObject.PropTypes.object
247
+ };
248
+ var formEvents = {
249
+ submit: null,
250
+ validate: function validate(property, result, message) {
251
+ return (0,external_lodash_namespaceObject.isString)(property) && (0,external_lodash_namespaceObject.isBoolean)(result) && (0,external_lodash_namespaceObject.isString)(message);
252
+ }
253
+ };
254
+ /* harmony default export */ const src_form = ((0,external_vue_namespaceObject.defineComponent)({
255
+ // eslint-disable-next-line vue/no-reserved-component-names
256
+ name: 'Form',
257
+ props: formProps,
258
+ emits: formEvents,
259
+ setup: function setup(props, context) {
260
+ // form-item 列表
261
+ var formItemInstanceList = [];
262
+ /**
263
+ * @desc 注册 form-item
264
+ * @param { IFormItemContext } formItemInstance
265
+ */
266
+ var register = function register(formItemInstance) {
267
+ formItemInstanceList.push(formItemInstance);
268
+ };
269
+ /**
270
+ * @desc 卸载 form-item
271
+ * @param { IFormItemContext } formItemInstance
272
+ */
273
+ var unregister = function unregister(formItemInstance) {
274
+ formItemInstanceList = formItemInstanceList.reduce(function (result, item) {
275
+ if (item !== formItemInstance) {
276
+ result.push(item);
277
+ }
278
+ return result;
279
+ }, []);
280
+ };
281
+ (0,external_vue_namespaceObject.provide)(external_shared_namespaceObject.formKey, {
282
+ props: props,
283
+ emit: context.emit,
284
+ register: register,
285
+ unregister: unregister
286
+ });
287
+ var handleSubmit = function handleSubmit(event) {
288
+ event.preventDefault();
289
+ context.emit('submit');
290
+ };
291
+ /**
292
+ * @desc 验证表单
293
+ * @param { string | Array<string> } fields 指定表单字段
294
+ * @returns { Promise<[]> }
295
+ */
296
+ var validate = function validate(fields) {
297
+ var fieldMap = {};
298
+ if (fields) {
299
+ var fieldList = typeof fields === 'string' ? [fields] : fields;
300
+ fieldMap = fieldList.reduce(function (result, item) {
301
+ return Object.assign(Object.assign({}, result), _defineProperty({}, item, true));
302
+ }, {});
303
+ } else {
304
+ fieldMap = formItemInstanceList.reduce(function (result, item) {
305
+ if (item.property) {
306
+ return Object.assign(Object.assign({}, result), _defineProperty({}, item.property, true));
307
+ }
308
+ return result;
309
+ }, {});
310
+ }
311
+ return Promise.all(formItemInstanceList.reduce(function (result, formItem) {
312
+ if (fieldMap[formItem.property]) {
313
+ result.push(formItem.validate());
314
+ }
315
+ return result;
316
+ }, [])).then(function () {
317
+ return Promise.resolve(props.model);
318
+ });
319
+ };
320
+ /**
321
+ * @desc 获取表单的验证的结果(所有表单项验证成功返回 true)
322
+ * @returns { Promise<Boolean> }
323
+ */
324
+ var getValidateResult = function getValidateResult() {
325
+ return Promise.all(formItemInstanceList.map(function (formItem) {
326
+ return formItem.validate(undefined, false);
327
+ })).then(function () {
328
+ return true;
329
+ })["catch"](function () {
330
+ return false;
331
+ });
332
+ };
333
+ /**
334
+ * @desc 清除表单验证错误信息
335
+ * @param { string | Array<string> } fields 指定表单字段
336
+ */
337
+ var clearValidate = function clearValidate(fields) {
338
+ var fieldMap = {};
339
+ if (fields) {
340
+ var fieldList = typeof fields === 'string' ? [fields] : fields;
341
+ fieldMap = fieldList.reduce(function (result, item) {
342
+ return Object.assign(Object.assign({}, result), _defineProperty({}, item, true));
343
+ }, {});
344
+ } else {
345
+ fieldMap = formItemInstanceList.reduce(function (result, item) {
346
+ return Object.assign(Object.assign({}, result), _defineProperty({}, item.property, true));
347
+ }, {});
348
+ }
349
+ formItemInstanceList.forEach(function (formItem) {
350
+ return fieldMap[formItem.property] && formItem.clearValidate();
351
+ });
352
+ };
353
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
354
+ resolveClassName = _usePrefix.resolveClassName;
355
+ return {
356
+ handleSubmit: handleSubmit,
357
+ validate: validate,
358
+ getValidateResult: getValidateResult,
359
+ clearValidate: clearValidate,
360
+ resolveClassName: resolveClassName
361
+ };
362
+ },
363
+ render: function render() {
364
+ var _classes;
365
+ var _a, _b;
366
+ var formClasses = (0,external_shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, "".concat(this.resolveClassName('form')), true), _defineProperty(_classes, "".concat(this.resolveClassName("form--".concat(this.formType))), true), _classes));
367
+ return (0,external_vue_namespaceObject.createVNode)("form", {
368
+ "class": formClasses,
369
+ "onSubmit": this.handleSubmit
370
+ }, [(_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)]);
371
+ }
372
+ }));
373
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
374
+ function _arrayLikeToArray(arr, len) {
375
+ if (len == null || len > arr.length) len = arr.length;
376
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
377
+ return arr2;
378
+ }
379
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
380
+
381
+ function _arrayWithoutHoles(arr) {
382
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
383
+ }
384
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
385
+ function _iterableToArray(iter) {
386
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
387
+ }
388
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
389
+
390
+ function _unsupportedIterableToArray(o, minLen) {
391
+ if (!o) return;
392
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
393
+ var n = Object.prototype.toString.call(o).slice(8, -1);
394
+ if (n === "Object" && o.constructor) n = o.constructor.name;
395
+ if (n === "Map" || n === "Set") return Array.from(o);
396
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
397
+ }
398
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
399
+ function _nonIterableSpread() {
400
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
401
+ }
402
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
403
+
404
+
405
+
406
+
407
+ function _toConsumableArray(arr) {
408
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
409
+ }
410
+ ;// CONCATENATED MODULE: external "../directives"
411
+ var external_directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
412
+ var external_directives_y = x => () => x
413
+ const external_directives_namespaceObject = external_directives_x({ ["bkTooltips"]: () => __WEBPACK_EXTERNAL_MODULE__directives_9cc9ba10__.bkTooltips });
414
+ ;// CONCATENATED MODULE: external "../icon"
415
+ var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
416
+ var external_icon_y = x => () => x
417
+ const external_icon_namespaceObject = external_icon_x({ ["ExclamationCircleShape"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.ExclamationCircleShape });
418
+ ;// CONCATENATED MODULE: ../../packages/form/src/utils.ts
419
+ /*
420
+ * Tencent is pleased to support the open source community by making
421
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
422
+ *
423
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
424
+ *
425
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
426
+ *
427
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
428
+ *
429
+ * ---------------------------------------------------
430
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
431
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
432
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
433
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
434
+ *
435
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
436
+ * the Software.
437
+ *
438
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
439
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
440
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
441
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
442
+ * IN THE SOFTWARE.
443
+ */
444
+ var getRuleMessage = function getRuleMessage(rule) {
445
+ if (typeof rule.message === 'function') {
446
+ return rule.message();
447
+ }
448
+ return rule.message;
449
+ };
450
+ ;// CONCATENATED MODULE: ../../packages/form/src/validator.ts
451
+ /*
452
+ * Tencent is pleased to support the open source community by making
453
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
454
+ *
455
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
456
+ *
457
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
458
+ *
459
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
460
+ *
461
+ * ---------------------------------------------------
462
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
463
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
464
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
465
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
466
+ *
467
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
468
+ * the Software.
469
+ *
470
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
471
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
472
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
473
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
474
+ * IN THE SOFTWARE.
475
+ */
476
+
477
+ /* harmony default export */ const src_validator = ({
478
+ required: function required(value) {
479
+ if (typeof value === 'number' || typeof value === 'boolean' || external_lodash_namespaceObject["default"].isDate(value)) {
480
+ return true;
481
+ }
482
+ return !external_lodash_namespaceObject["default"].isEmpty(value);
483
+ },
484
+ min: function min(value, _min) {
485
+ return value >= _min;
486
+ },
487
+ max: function max(value, _max) {
488
+ return _max >= value;
489
+ },
490
+ email: function email(value) {
491
+ return /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(value);
492
+ },
493
+ maxlength: function maxlength(value, _maxlength) {
494
+ return value.length <= _maxlength;
495
+ },
496
+ pattern: function pattern(value, _pattern) {
497
+ return _pattern.test(value);
498
+ }
499
+ });
500
+ ;// CONCATENATED MODULE: ../../packages/form/src/form-item.tsx
501
+
502
+
503
+
504
+ /*
505
+ * Tencent is pleased to support the open source community by making
506
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
507
+ *
508
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
509
+ *
510
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
511
+ *
512
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
513
+ *
514
+ * ---------------------------------------------------
515
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
516
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
517
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
518
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
519
+ *
520
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
521
+ * the Software.
522
+ *
523
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
524
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
525
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
526
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
527
+ * IN THE SOFTWARE.
528
+ */
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+ var formItemProps = {
538
+ label: external_shared_namespaceObject.PropTypes.string,
539
+ labelWidth: external_shared_namespaceObject.PropTypes.oneOfType([Number, String]),
540
+ labelPosition: external_shared_namespaceObject.PropTypes.oneOf(['left', 'center', 'right']),
541
+ property: external_shared_namespaceObject.PropTypes.string.def(''),
542
+ required: external_shared_namespaceObject.PropTypes.bool.def(false),
543
+ email: external_shared_namespaceObject.PropTypes.bool.def(false),
544
+ max: external_shared_namespaceObject.PropTypes.number,
545
+ min: external_shared_namespaceObject.PropTypes.number,
546
+ maxlength: external_shared_namespaceObject.PropTypes.number,
547
+ rules: external_shared_namespaceObject.PropTypes.array,
548
+ autoCheck: external_shared_namespaceObject.PropTypes.bool.def(false),
549
+ description: external_shared_namespaceObject.PropTypes.string,
550
+ errorDisplayType: external_shared_namespaceObject.PropTypes.oneOf(['tooltips', 'normal']).def('normal')
551
+ };
552
+ var hasOwn = function hasOwn(obj, key) {
553
+ return Object.prototype.hasOwnProperty.call(obj, key);
554
+ };
555
+ var getRulesFromProps = function getRulesFromProps(props, t) {
556
+ var rules = [];
557
+ var label = props.label || '';
558
+ if (props.required) {
559
+ rules.push({
560
+ required: true,
561
+ validator: src_validator.required,
562
+ message: "".concat(label).concat(t.value.notBeEmpty),
563
+ trigger: 'change'
564
+ });
565
+ }
566
+ if (props.email) {
567
+ rules.push({
568
+ email: true,
569
+ validator: src_validator.email,
570
+ message: "".concat(label).concat(t.value.incorrectFormat),
571
+ trigger: 'change'
572
+ });
573
+ }
574
+ if (Number(props.max) > -1) {
575
+ rules.push({
576
+ validator: function validator(value) {
577
+ return src_validator.max(value, props.max);
578
+ },
579
+ message: "".concat(label).concat(t.value.max, " ").concat(props.max),
580
+ trigger: 'change'
581
+ });
582
+ }
583
+ if (Number(props.min) > -1) {
584
+ rules.push({
585
+ validator: function validator(value) {
586
+ return src_validator.min(value, props.min);
587
+ },
588
+ message: "".concat(label).concat(t.value.min, " ").concat(props.min),
589
+ trigger: 'change'
590
+ });
591
+ }
592
+ if (Number(props.maxlength) > -1) {
593
+ rules.push({
594
+ validator: function validator(value) {
595
+ return src_validator.maxlength(value, props.maxlength);
596
+ },
597
+ message: "".concat(label).concat(t.value.maxLen, " ").concat(props.maxlength),
598
+ trigger: 'change'
599
+ });
600
+ }
601
+ return rules;
602
+ };
603
+ var mergeRules = function mergeRules(configRules, propRules, t) {
604
+ var customRequired = false;
605
+ var customEmail = false;
606
+ var formatConfigRules = configRules.reduce(function (result, rule) {
607
+ var rulevalidator;
608
+ if (rule.required) {
609
+ rulevalidator = (0,external_lodash_namespaceObject.isFunction)(rule.validator) ? rule.validator : src_validator.required;
610
+ customRequired = true;
611
+ } else if (rule.email) {
612
+ rulevalidator = (0,external_lodash_namespaceObject.isFunction)(rule.validator) ? rule.validator : src_validator.email;
613
+ customEmail = true;
614
+ } else if (Number(rule.max) > -1) {
615
+ rulevalidator = function rulevalidator(value) {
616
+ return src_validator.max(value, rule.max);
617
+ };
618
+ } else if (Number(rule.min) > -1) {
619
+ rulevalidator = function rulevalidator(value) {
620
+ return src_validator.min(value, rule.max);
621
+ };
622
+ } else if (Number(rule.maxlength) > -1) {
623
+ rulevalidator = function rulevalidator(value) {
624
+ return src_validator.min(value, rule.max);
625
+ };
626
+ } else if (Object.prototype.toString.call(rule.pattern) === '[object RegExp]') {
627
+ rulevalidator = function rulevalidator(value) {
628
+ return src_validator.pattern(value, rule.pattern);
629
+ };
630
+ } else if ((0,external_lodash_namespaceObject.isFunction)(rule.validator)) {
631
+ rulevalidator = rule.validator;
632
+ } else {
633
+ // 不支持的配置规则
634
+ return result;
635
+ }
636
+ result.push({
637
+ validator: rulevalidator,
638
+ message: rule.message || t.value.verifyError,
639
+ trigger: rule.trigger || 'blur'
640
+ });
641
+ return result;
642
+ }, []);
643
+ // 自定义配置验证规则覆盖内置验证规则
644
+ var filterPropRules = propRules.reduce(function (result, ruleItem) {
645
+ if (ruleItem.required && customRequired) {
646
+ return result;
647
+ }
648
+ if (ruleItem.email && customEmail) {
649
+ return result;
650
+ }
651
+ result.push(ruleItem);
652
+ return result;
653
+ }, []);
654
+ return [].concat(_toConsumableArray(filterPropRules), _toConsumableArray(formatConfigRules));
655
+ };
656
+ var getTriggerRules = function getTriggerRules(trigger, rules) {
657
+ return rules.reduce(function (result, rule) {
658
+ if (!rule.trigger || !trigger) {
659
+ result.push(rule);
660
+ return result;
661
+ }
662
+ var ruleTriggerList = Array.isArray(rule.trigger) ? rule.trigger : [rule.trigger];
663
+ if (ruleTriggerList.includes(trigger)) {
664
+ result.push(rule);
665
+ }
666
+ return result;
667
+ }, []);
668
+ };
669
+ var isValid = function isValid(value) {
670
+ return value !== undefined;
671
+ };
672
+ /* harmony default export */ const form_item = ((0,external_vue_namespaceObject.defineComponent)({
673
+ name: 'FormItem',
674
+ directives: {
675
+ bkTooltips: external_directives_namespaceObject.bkTooltips
676
+ },
677
+ props: formItemProps,
678
+ setup: function setup(props, context) {
679
+ var t = (0,external_config_provider_namespaceObject.useLocale)('form');
680
+ var form = (0,external_shared_namespaceObject.useForm)();
681
+ var isForm = Boolean(form);
682
+ var parentFormItem = (0,external_shared_namespaceObject.useFormItem)();
683
+ var isNested = Boolean(parentFormItem);
684
+ var currentInstance = (0,external_vue_namespaceObject.getCurrentInstance)();
685
+ var state = (0,external_vue_namespaceObject.reactive)({
686
+ isError: false,
687
+ errorMessage: ''
688
+ });
689
+ var isFormTypeVertical = (0,external_vue_namespaceObject.computed)(function () {
690
+ if (!isForm) {
691
+ return false;
692
+ }
693
+ return form.props.formType === 'vertical';
694
+ });
695
+ var isShowLabel = (0,external_vue_namespaceObject.computed)(function () {
696
+ if (props.label || context.slots.label) {
697
+ return true;
698
+ }
699
+ return false;
700
+ });
701
+ var labelStyles = (0,external_vue_namespaceObject.computed)(function () {
702
+ var styles = {
703
+ width: '',
704
+ paddingRight: '',
705
+ textAlign: ''
706
+ };
707
+ var labelPosition = props.labelPosition || isForm && form.props.labelPosition;
708
+ if (labelPosition) {
709
+ styles['text-align'] = labelPosition;
710
+ }
711
+ if (form.props.formType === 'vertical' || !props.label && isNested) {
712
+ return styles;
713
+ }
714
+ var labelWidth = isValid(props.labelWidth) ? props.labelWidth : isForm && form.props.labelWidth;
715
+ if (isValid(labelWidth)) {
716
+ styles.width = "".concat(labelWidth, "px");
717
+ styles.paddingRight = labelWidth ? '' : '0px';
718
+ }
719
+ return styles;
720
+ });
721
+ var contentStyles = (0,external_vue_namespaceObject.computed)(function () {
722
+ return _defineProperty({}, 'margin-left', labelStyles.value.width);
723
+ });
724
+ /**
725
+ * @desc 验证字段
726
+ *
727
+ * @param { undefined | string } trigger 验证触发方式
728
+ * @param { boolean } showError 是否展示错误信息
729
+ */
730
+ var validate = function validate(trigger) {
731
+ var showError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
732
+ // 没有设置 property 不进行验证
733
+ if (!props.property || isForm && !form.props.model) {
734
+ return Promise.resolve(true);
735
+ }
736
+ var rules = [];
737
+ // 继承 form 的验证规则
738
+ if (isForm && form.props.rules && hasOwn(form.props.rules, props.property)) {
739
+ rules = form.props.rules[props.property];
740
+ }
741
+ // form-item 自己的 rules 规则优先级更高
742
+ if (props.rules) {
743
+ rules = props.rules;
744
+ }
745
+ // 合并规则属性配置
746
+ rules = getTriggerRules(trigger, mergeRules(rules, getRulesFromProps(props, t), t));
747
+ // 重新触发验证重置上次的验证状态
748
+ if (rules.length > 0 && showError) {
749
+ state.isError = false;
750
+ state.errorMessage = '';
751
+ }
752
+ var value = (0,external_lodash_namespaceObject.get)(form.props.model, props.property);
753
+ var doValidate = function () {
754
+ var stepIndex = -1;
755
+ return function () {
756
+ stepIndex = stepIndex + 1;
757
+ // form-item 验证通过
758
+ if (stepIndex >= rules.length) {
759
+ form.emit('validate', props.property, true, '');
760
+ return Promise.resolve(true);
761
+ }
762
+ var rule = rules[stepIndex];
763
+ return Promise.resolve().then(function () {
764
+ var result = rule.validator(value);
765
+ var errorMessage = getRuleMessage(rule);
766
+ // 异步验证(validator 返回一个 Promise)
767
+ if (typeof result !== 'boolean' && typeof result.then === 'function') {
768
+ return result.then(function (data) {
769
+ // 异步验证结果为 false
770
+ if (data === false) {
771
+ return Promise.reject(errorMessage);
772
+ }
773
+ }).then(function () {
774
+ return doValidate();
775
+ }, function () {
776
+ if (showError) {
777
+ state.isError = true;
778
+ state.errorMessage = errorMessage;
779
+ }
780
+ form.emit('validate', props.property, false, errorMessage);
781
+ return Promise.reject(state.errorMessage);
782
+ });
783
+ }
784
+ // 同步验证失败
785
+ if (!result) {
786
+ if (showError) {
787
+ state.isError = true;
788
+ // 验证结果返回的是 String 表示验证失败,返回结果作为错误信息
789
+ state.errorMessage = typeof result === 'string' ? result : errorMessage;
790
+ }
791
+ form.emit('validate', props.property, false, errorMessage);
792
+ return Promise.reject(state.errorMessage);
793
+ }
794
+ // 下一步
795
+ return doValidate();
796
+ });
797
+ };
798
+ }();
799
+ return doValidate();
800
+ };
801
+ /**
802
+ * @desc 清除验证状态
803
+ */
804
+ var clearValidate = function clearValidate() {
805
+ state.isError = false;
806
+ state.errorMessage = '';
807
+ };
808
+ (0,external_vue_namespaceObject.provide)(external_shared_namespaceObject.formItemKey, Object.assign(Object.assign({}, props), {
809
+ validate: validate,
810
+ clearValidate: clearValidate
811
+ }));
812
+ (0,external_vue_namespaceObject.onMounted)(function () {
813
+ if (isForm) {
814
+ form.register(currentInstance.proxy);
815
+ }
816
+ });
817
+ (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
818
+ if (isForm) {
819
+ form.unregister(currentInstance.proxy);
820
+ }
821
+ });
822
+ var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
823
+ resolveClassName = _usePrefix.resolveClassName;
824
+ return Object.assign(Object.assign({}, (0,external_vue_namespaceObject.toRefs)(state)), {
825
+ isShowLabel: isShowLabel,
826
+ labelStyles: labelStyles,
827
+ contentStyles: contentStyles,
828
+ isFormTypeVertical: isFormTypeVertical,
829
+ validate: validate,
830
+ clearValidate: clearValidate,
831
+ resolveClassName: resolveClassName
832
+ });
833
+ },
834
+ render: function render() {
835
+ var _classes,
836
+ _this = this;
837
+ var _a, _b, _c, _d;
838
+ var itemClassees = (0,external_shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, "".concat(this.resolveClassName('form-item')), true), _defineProperty(_classes, 'is-error', this.isError), _defineProperty(_classes, 'is-required', this.required), _classes));
839
+ var renderLabel = function renderLabel() {
840
+ if (_this.$slots.label) {
841
+ return (0,external_vue_namespaceObject.createVNode)("span", null, [_this.$slots.label()]);
842
+ }
843
+ if (_this.description) {
844
+ return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("span", {
845
+ "class": _defineProperty({}, "".concat(_this.resolveClassName('form-label-description')), Boolean(_this.description))
846
+ }, [_this.label]), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), _this.description]]);
847
+ }
848
+ return (0,external_vue_namespaceObject.createVNode)("span", null, [_this.label]);
849
+ };
850
+ var renderError = function renderError() {
851
+ if (!_this.isError) {
852
+ return null;
853
+ }
854
+ if (_this.errorDisplayType === 'tooltips') {
855
+ return (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("div", {
856
+ "class": "".concat(_this.resolveClassName('form-error-tips'))
857
+ }, [(0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.ExclamationCircleShape, null, null)]), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), _this.errorMessage]]);
858
+ }
859
+ return (0,external_vue_namespaceObject.createVNode)("div", {
860
+ "class": "".concat(_this.resolveClassName('form-error'))
861
+ }, [_this.$slots.error ? _this.$slots.error(_this.errorMessage) : _this.errorMessage]);
862
+ };
863
+ return (0,external_vue_namespaceObject.createVNode)("div", {
864
+ "class": itemClassees
865
+ }, [this.isShowLabel && (0,external_vue_namespaceObject.createVNode)("div", {
866
+ "class": "".concat(this.resolveClassName('form-label')),
867
+ "style": this.labelStyles
868
+ }, [renderLabel(), this.isFormTypeVertical && ((_b = (_a = this.$slots).labelAppend) === null || _b === void 0 ? void 0 : _b.call(_a))]), (0,external_vue_namespaceObject.createVNode)("div", {
869
+ "class": "".concat(this.resolveClassName('form-content')),
870
+ "style": this.contentStyles
871
+ }, [(_d = (_c = this.$slots)["default"]) === null || _d === void 0 ? void 0 : _d.call(_c), renderError()])]);
872
+ }
873
+ }));
874
+ ;// CONCATENATED MODULE: ../../packages/form/src/index.ts
875
+ /*
876
+ * Tencent is pleased to support the open source community by making
877
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
878
+ *
879
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
880
+ *
881
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
882
+ *
883
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
884
+ *
885
+ * ---------------------------------------------------
886
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
887
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
888
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
889
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
890
+ *
891
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
892
+ * the Software.
893
+ *
894
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
895
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
896
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
897
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
898
+ * IN THE SOFTWARE.
899
+ */
900
+
901
+
902
+
903
+
904
+
905
+ var BkForm = (0,external_shared_namespaceObject.withInstallProps)(src_form, {
906
+ FormItem: form_item,
907
+ ComposeFormItem: compose_form_item
908
+ });
909
+ /* harmony default export */ const src = (BkForm);
910
+
911
+ var __webpack_exports__BkComposeFormItem = __webpack_exports__.kq;
912
+ var __webpack_exports__BkForm = __webpack_exports__.ZD;
913
+ var __webpack_exports__BkFormItem = __webpack_exports__.a_;
914
+ var __webpack_exports__default = __webpack_exports__.ZP;
915
+ var __webpack_exports__formItemKey = __webpack_exports__.xE;
916
+ var __webpack_exports__formKey = __webpack_exports__.vh;
917
+ var __webpack_exports__useFormItem = __webpack_exports__.A9;
918
+ export { __webpack_exports__BkComposeFormItem as BkComposeFormItem, __webpack_exports__BkForm as BkForm, __webpack_exports__BkFormItem as BkFormItem, __webpack_exports__default as default, __webpack_exports__formItemKey as formItemKey, __webpack_exports__formKey as formKey, __webpack_exports__useFormItem as useFormItem };