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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/lib/affix/index.js +391 -1
  2. package/lib/alert/index.js +287 -1
  3. package/lib/animate-number/index.js +219 -1
  4. package/lib/backtop/index.js +264 -1
  5. package/lib/badge/index.js +304 -1
  6. package/lib/breadcrumb/index.js +379 -1
  7. package/lib/button/index.js +403 -1
  8. package/lib/card/index.js +369 -1
  9. package/lib/cascader/index.js +2095 -2
  10. package/lib/checkbox/index.js +602 -1
  11. package/lib/code-diff/index.js +5548 -1
  12. package/lib/collapse/index.js +605 -1
  13. package/lib/collapse-transition/index.js +237 -1
  14. package/lib/color-picker/index.js +2735 -1
  15. package/lib/components.js +770 -1
  16. package/lib/config-provider/index.js +377 -1
  17. package/lib/container/index.js +408 -1
  18. package/lib/date-picker/index.js +5576 -1
  19. package/lib/dialog/index.js +1324 -2
  20. package/lib/directives/index.js +1386 -2
  21. package/lib/dist.index.js +179 -1
  22. package/lib/divider/index.js +237 -1
  23. package/lib/dropdown/index.js +455 -1
  24. package/lib/exception/index.js +435 -1
  25. package/lib/fixed-navbar/index.js +222 -1
  26. package/lib/form/index.js +1004 -1
  27. package/lib/hooks.js +133 -1
  28. package/lib/icon/angle-double-down-line.js +541 -1
  29. package/lib/icon/angle-double-left-line.js +541 -1
  30. package/lib/icon/angle-double-left.js +541 -1
  31. package/lib/icon/angle-double-right-line.js +541 -1
  32. package/lib/icon/angle-double-right.js +541 -1
  33. package/lib/icon/angle-double-up-line.js +541 -1
  34. package/lib/icon/angle-down-fill.js +541 -1
  35. package/lib/icon/angle-down-line.js +541 -1
  36. package/lib/icon/angle-down.js +541 -1
  37. package/lib/icon/angle-left.js +541 -1
  38. package/lib/icon/angle-right.js +541 -1
  39. package/lib/icon/angle-up-fill.js +541 -1
  40. package/lib/icon/angle-up.js +541 -1
  41. package/lib/icon/archive-fill.js +541 -1
  42. package/lib/icon/arrows-left.js +541 -1
  43. package/lib/icon/arrows-right.js +541 -1
  44. package/lib/icon/assistant.js +541 -1
  45. package/lib/icon/audio-fill.js +541 -1
  46. package/lib/icon/bk.js +541 -1
  47. package/lib/icon/circle.js +541 -1
  48. package/lib/icon/close-line.js +541 -1
  49. package/lib/icon/close.js +541 -1
  50. package/lib/icon/code.js +541 -1
  51. package/lib/icon/cog-shape.js +541 -1
  52. package/lib/icon/collapse-left.js +541 -1
  53. package/lib/icon/copy-shape.js +541 -1
  54. package/lib/icon/copy.js +541 -1
  55. package/lib/icon/data-shape.js +541 -1
  56. package/lib/icon/del.js +541 -1
  57. package/lib/icon/doc-fill.js +541 -1
  58. package/lib/icon/done.js +541 -1
  59. package/lib/icon/down-shape.js +541 -1
  60. package/lib/icon/down-small.js +541 -1
  61. package/lib/icon/edit-line.js +541 -1
  62. package/lib/icon/ellipsis.js +541 -1
  63. package/lib/icon/enlarge-line.js +541 -1
  64. package/lib/icon/error.js +541 -1
  65. package/lib/icon/excel-fill.js +541 -1
  66. package/lib/icon/exclamation-circle-shape.js +541 -1
  67. package/lib/icon/eye.js +541 -1
  68. package/lib/icon/filliscreen-line.js +541 -1
  69. package/lib/icon/fix-line.js +541 -1
  70. package/lib/icon/fix-shape.js +541 -1
  71. package/lib/icon/folder-open.js +541 -1
  72. package/lib/icon/folder-shape-open.js +541 -1
  73. package/lib/icon/folder-shape.js +541 -1
  74. package/lib/icon/folder.js +541 -1
  75. package/lib/icon/funnel.js +541 -1
  76. package/lib/icon/help-document-fill.js +541 -1
  77. package/lib/icon/help-fill.js +541 -1
  78. package/lib/icon/help.js +541 -1
  79. package/lib/icon/image-fill.js +563 -1
  80. package/lib/icon/img-error.js +563 -1
  81. package/lib/icon/img-placehoulder.js +563 -1
  82. package/lib/icon/index.js +2353 -1
  83. package/lib/icon/info-line.js +563 -1
  84. package/lib/icon/info.js +563 -1
  85. package/lib/icon/left-shape.js +563 -1
  86. package/lib/icon/left-turn-line.js +563 -1
  87. package/lib/icon/narrow-line.js +563 -1
  88. package/lib/icon/original.js +563 -1
  89. package/lib/icon/pdf-fill.js +563 -1
  90. package/lib/icon/play-shape.js +563 -1
  91. package/lib/icon/plus.js +563 -1
  92. package/lib/icon/ppt-fill.js +563 -1
  93. package/lib/icon/qq.js +563 -1
  94. package/lib/icon/right-shape.js +563 -1
  95. package/lib/icon/right-turn-line.js +563 -1
  96. package/lib/icon/search.js +563 -1
  97. package/lib/icon/share.js +563 -1
  98. package/lib/icon/spinner.js +563 -1
  99. package/lib/icon/success.js +563 -1
  100. package/lib/icon/switcher-loading.js +563 -1
  101. package/lib/icon/text-file.js +563 -1
  102. package/lib/icon/text-fill.js +563 -1
  103. package/lib/icon/transfer.js +563 -1
  104. package/lib/icon/tree-application-shape.js +563 -1
  105. package/lib/icon/unfull-screen.js +563 -1
  106. package/lib/icon/unvisible.js +563 -1
  107. package/lib/icon/up-shape.js +563 -1
  108. package/lib/icon/upload.js +563 -1
  109. package/lib/icon/video-fill.js +563 -1
  110. package/lib/icon/warn.js +563 -1
  111. package/lib/icon/weixin-pro.js +563 -1
  112. package/lib/icon/weixin.js +563 -1
  113. package/lib/image/index.js +681 -1
  114. package/lib/index.js +195 -1
  115. package/lib/info-box/index.js +1514 -2
  116. package/lib/input/index.js +1038 -1
  117. package/lib/link/index.js +232 -1
  118. package/lib/loading/index.js +443 -1
  119. package/lib/locale/index.js +489 -1
  120. package/lib/menu/index.js +793 -1
  121. package/lib/message/index.js +1842 -2
  122. package/lib/modal/index.js +407 -1
  123. package/lib/navigation/index.js +439 -1
  124. package/lib/notify/index.js +470 -1
  125. package/lib/overflow-title/index.js +547 -1
  126. package/lib/pagination/index.js +974 -1
  127. package/lib/plugin-popover/index.js +4121 -1
  128. package/lib/plugins/index.js +130 -1
  129. package/lib/pop-confirm/index.js +367 -1
  130. package/lib/popover/index.js +4127 -1
  131. package/lib/popover2/index.js +171 -1
  132. package/lib/preset.js +164 -1
  133. package/lib/process/index.js +1146 -2
  134. package/lib/progress/index.js +495 -1
  135. package/lib/radio/index.js +693 -1
  136. package/lib/rate/index.js +406 -1
  137. package/lib/resize-layout/index.js +499 -1
  138. package/lib/search-select/index.js +3024 -2
  139. package/lib/select/index.js +2599 -2
  140. package/lib/shared/index.js +2832 -1
  141. package/lib/sideslider/index.js +1056 -2
  142. package/lib/slider/index.js +1683 -2
  143. package/lib/steps/index.js +1215 -2
  144. package/lib/swiper/index.js +404 -1
  145. package/lib/switcher/index.js +335 -1
  146. package/lib/tab/index.js +935 -1
  147. package/lib/table/index.js +6588 -1
  148. package/lib/table-column/index.js +768 -1
  149. package/lib/tag/index.js +309 -1
  150. package/lib/tag-input/index.js +1758 -1
  151. package/lib/time-picker/index.js +142 -1
  152. package/lib/timeline/index.js +310 -1
  153. package/lib/transfer/index.js +767 -1
  154. package/lib/tree/index.js +2664 -1
  155. package/lib/upload/index.js +3257 -2
  156. package/lib/virtual-render/index.js +806 -1
  157. package/package.json +1 -1
  158. package/lib/cascader/index.js.LICENSE.txt +0 -1
  159. package/lib/dialog/index.js.LICENSE.txt +0 -1
  160. package/lib/directives/index.js.LICENSE.txt +0 -14
  161. package/lib/info-box/index.js.LICENSE.txt +0 -1
  162. package/lib/message/index.js.LICENSE.txt +0 -6
  163. package/lib/process/index.js.LICENSE.txt +0 -1
  164. package/lib/search-select/index.js.LICENSE.txt +0 -1
  165. package/lib/select/index.js.LICENSE.txt +0 -1
  166. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  167. package/lib/slider/index.js.LICENSE.txt +0 -1
  168. package/lib/steps/index.js.LICENSE.txt +0 -1
  169. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,1758 @@
1
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("lodash"),require("../config-provider"),require("../directives"),require("../icon"),require("../loading"),require("../popover"),require("vue-types"));else if("function"==typeof define&&define.amd)define(["../shared","vue","lodash","../config-provider","../directives","../icon","../loading","../popover","vue-types"],t);else{var r="object"==typeof exports?t(require("../shared"),require("vue"),require("lodash"),require("../config-provider"),require("../directives"),require("../icon"),require("../loading"),require("../popover"),require("vue-types")):t(e["../shared"],e.vue,e.lodash,e["../config-provider"],e["../directives"],e["../icon"],e["../loading"],e["../popover"],e["vue-types"]);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(self,((e,t,r,a,o,n,l,i,s)=>(()=>{"use strict";var c={2717:e=>{e.exports=a},4061:e=>{e.exports=o},6870:e=>{e.exports=n},4870:e=>{e.exports=l},5537:e=>{e.exports=i},4212:t=>{t.exports=e},467:e=>{e.exports=r},748:e=>{e.exports=t},210:e=>{e.exports=s}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={exports:{}};return c[e](r,r.exports,d),r.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};return(()=>{d.r(p),d.d(p,{default:()=>P});var e=d(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(e,t):void 0}}function o(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(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.")}()}function n(e,r,a){return(r=function(e){var r=function(e,r){if("object"!==t(e)||null===e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var o=a.call(e,"string");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(r)?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[r]=a,e}var l=d(748),i=d(467),s=d(2717),c=d(4061),u=d(6870),f=d(4870),v=d.n(f),g=d(5537),h=d.n(g),y=12,m=function(e){for(var t=e.length,r=0,a=0;a<t;a++)0!=(65280&e.charCodeAt(a))&&(r+=1),r+=1;return r};const T=(0,l.defineComponent)({name:"ListTagRender",props:{node:e.PropTypes.object,searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.arrayOf(e.PropTypes.string)]),displayKey:e.PropTypes.string,searchKeyword:e.PropTypes.string,tpl:{type:Function}},render:function(){var e=this,t=(0,s.usePrefix)().resolveClassName,r=function(t){if(e.searchKeyword){var r=new RegExp("(".concat(e.searchKeyword,")"),"i");return t.replace(r,'<strong class="highlight-text">$1</strong>')}return t};if(this.tpl)return this.tpl(this.node,r,l.h,this);var a=this.node[this.displayKey];return(0,l.createVNode)("div",{class:"".concat(t("selector-node"))},[(0,l.createVNode)("span",{class:"text",innerHTML:r(a)},[a])])}});var b,w=d(210);!function(e){e.FOCUS="focus",e.SEARCH="search"}(b||(b={}));const x=(0,l.defineComponent)({name:"TagRender",directives:{bkTooltips:c.bkTooltips},props:{node:e.PropTypes.object,displayKey:e.PropTypes.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:function(){return{}}}},setup:function(t){var r=(0,l.ref)(),a=(0,l.ref)(!1),o=(0,l.computed)((function(){return Object.assign({boundary:"window",theme:"light",distance:12,content:t.node[t.displayKey],disabled:t.hasTips||!a.value},t.tagOverflowTips)}));return(0,l.onMounted)((function(){a.value=(0,e.checkOverflow)(r.value)})),{overflowTips:o,tagRef:r}},render:function(){return this.tpl?this.tpl(this.node,l.h,this):(0,l.withDirectives)((0,l.createVNode)("div",{class:"tag",ref:"tagRef"},[(0,l.createVNode)("span",{class:"text"},[this.node[this.displayKey]])]),[[(0,l.resolveDirective)("bk-tooltips"),this.overflowTips]])}}),L=(0,l.defineComponent)({name:"TagInput",directives:{bkTooltips:c.bkTooltips},props:{modelValue:e.PropTypes.arrayOf(e.PropTypes.string).def([]),placeholder:e.PropTypes.string.def(""),list:e.PropTypes.arrayOf(e.PropTypes.object).def([]),disabled:e.PropTypes.bool.def(!1),tooltipKey:e.PropTypes.string.def(""),saveKey:e.PropTypes.string.def("id"),displayKey:e.PropTypes.string.def("name"),hasDeleteIcon:e.PropTypes.bool.def(!1),clearable:e.PropTypes.bool.def(!0),trigger:(0,w.toType)("treeTriggerType",{}).def(b.SEARCH),searchKey:e.PropTypes.oneOfType([e.PropTypes.string,e.PropTypes.arrayOf(e.PropTypes.string)]).def("name"),useGroup:e.PropTypes.bool.def(!1),allowCreate:e.PropTypes.bool.def(!1),maxData:e.PropTypes.number.def(-1),maxResult:e.PropTypes.number.def(10),contentMaxHeight:e.PropTypes.number.def(300),contentWidth:e.PropTypes.number.def(190),separator:e.PropTypes.string.def(""),allowNextFocus:e.PropTypes.bool.def(!0),allowAutoMatch:e.PropTypes.bool.def(!1),showClearOnlyHover:e.PropTypes.bool.def(!1),isAsyncList:e.PropTypes.bool.def(!1),leftSpace:e.PropTypes.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:function(){return{}}},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:function(){return{}}}},emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup:function(r,c){var u=c.emit,d=(0,e.useFormItem)(),p=(0,s.useLocale)("tagInput"),f=(0,l.reactive)({isEdit:!1,isHover:!1,focusItemIndex:r.allowCreate?-1:0}),v=(0,l.reactive)(Object.assign({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0}},r.popoverProps)),g=(0,s.usePrefix)().resolveClassName,h=function(e){var t=(0,l.reactive)({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:function(){var e,r,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.curPage=1,t.totalSize=a.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;var n=[];if(t.pageSize>0)for(var l=0;l<t.totalSize;l+=t.pageSize)n.push(a.slice(l,l+t.pageSize));(e=t.renderListPaged).splice.apply(e,[0,t.renderListPaged.length].concat(n)),(r=t.curPageList).splice.apply(r,[0,t.curPageList.length].concat(o(t.renderListPaged[t.curPage-1]||[])))},pageChange:function(e){var r;t.curPage=e,(r=t.curPageList).splice.apply(r,[t.curPageList.length,0].concat(o(t.renderListPaged[t.curPage-1]||[]))),t.isPageLoading=!1}}}((0,l.toRefs)(r).maxResult),T=h.pageState,b=h.initPage,w=h.pageChange,x=(0,l.ref)(""),L=(0,l.ref)(null),P=(0,l.ref)(null),I=(0,l.ref)(null),C=(0,l.ref)(null),S=(0,l.ref)(null),N=(0,l.ref)(null),K=(0,l.computed)((function(){return!r.disabled&&r.hasDeleteIcon})),V=(0,l.computed)((function(){return 1===r.maxData})),O=(0,l.computed)((function(){return 0===R.selectedTagList.length&&""===x.value&&!f.isEdit})),A=(0,l.computed)((function(){return r.placeholder||p.value.placeholder})),j=(0,l.computed)((function(){return r.clearable&&!r.disabled&&0!==R.selectedTagList.length&&(!r.showClearOnlyHover||f.isHover)})),k=(0,l.computed)((function(){var e;return n(e={},"".concat(g("tag-input-trigger")),!0),n(e,"active",f.isEdit),n(e,"disabled",r.disabled),e})),R=(0,l.reactive)({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=(0,l.computed)((function(){return R.selectedTagList.map((function(e){return e[r.saveKey]}))})),D=function(e){var t=(0,l.toRefs)(e),r=t.useGroup,a=t.saveKey,o=t.displayKey,n=t.list,i=(0,l.ref)([]),s=(0,l.ref)({});return(0,l.watch)([r,a,o,n],(function(){i.value=[];var e=(0,l.markRaw)(n.value);r.value&&(e=e.reduce((function(e,t){var r=[];return t.children&&(r=t.children.map((function(e){return Object.assign({group:{groupId:t[a.value],groupName:t[o.value]}},e)}))),e.concat(r)}),[])),i.value=e,s.value=e.reduce((function(e,t){return e[t[a.value]]=t,e}),{})}),{immediate:!0,deep:!0}),{flatList:i,saveKeyMap:s}}(r),q=D.flatList,M=D.saveKeyMap,F=(0,l.computed)((function(){if(r.useGroup){var e={};return T.curPageList.forEach((function(t,r){t.__index__=r,e[t.group.groupId]||(e[t.group.groupId]={id:t.group.groupId,name:t.group.groupName,children:[]}),e[t.group.groupId].children.push(t)})),Object.keys(e).map((function(t){return e[t]}))}return T.curPageList}));(0,l.watch)([function(){return q.value}],(function(){(0,l.nextTick)((function(){G()}))}),{deep:!0}),(0,l.watch)((function(){return r.modelValue}),(function(e){var t,a,o;o=e,(a=E.value).length===o.length&&o.every((function(e,t){return a[t]===e}))||((0,l.nextTick)((function(){G()})),r.withValidate&&(null===(t=null==d?void 0:d.validate)||void 0===t||t.call(d,"change")))})),(0,l.watch)(x,(0,i.debounce)((function(){var e=0!==T.curPageList.length,t=x.value;""!==t&&e||""===t&&"focus"===r.trigger&&e?v.isShow=!0:"focus"===r.trigger&&e||(v.isShow=!1)}),150)),(0,l.watch)((function(){return v.isShow}),(function(e){H(),e&&S.value&&((0,l.nextTick)((function(){S.value.scrollTop=0})),S.value.removeEventListener("scroll",_),S.value.addEventListener("scroll",_))})),(0,l.onMounted)((function(){G()}));var H=function(){var e;v.offset.crossAxis=V.value?0:null===(e=C.value)||void 0===e?void 0:e.offsetLeft},_=function(){if(!T.isPageLoading&&0!==S.value.scrollTop){var e=S.value;if(e.scrollTop+e.offsetHeight>=e.scrollHeight){var t=T.curPage+1;t<=T.totalPage&&(T.isPageLoading=!0,setTimeout((function(){w(t)}),500))}}},z=function(){var e;return Array.from((null===(e=I.value)||void 0===e?void 0:e.childNodes)||[]).filter((function(e){return![Node.TEXT_NODE,Node.COMMENT_NODE].includes(e.nodeType)}))},B=function(e){if(!r.disabled){if(null==e?void 0:e.target){var t=e.target.className;(t.indexOf("".concat(g("tag-input-trigger")))>-1||t.indexOf("tag-list")>-1)&&I.value.appendChild(C.value)}clearTimeout(N.value),V.value&&E.value.length&&(R.tagListCache=o(E.value),R.selectedTagListCache=o(R.selectedTagList),x.value=R.selectedTagListCache[0][r.saveKey],re(R.selectedTagList[0],0),X()),f.isEdit=!0,setTimeout((function(){var e;null===(e=L.value)||void 0===e||e.focus(),"focus"===r.trigger&&0!==R.localList.length&&(U(),v.isShow?H():v.isShow=!0)}),200)}},G=function(){var e=r.saveKey,t=r.modelValue,a=r.displayKey,o=r.allowCreate,l=r.trigger,i=r.isAsyncList;if(R.selectedTagList=[],R.localList=q.value,t.length){var s={};R.selectedTagList=t.map((function(t){var r,l=M.value[t];return s[t]=1,!l&&o?(n(r={},e,t),n(r,a,t),r):l})).filter((function(e){return e})),V.value||(R.localList=R.localList.filter((function(t){return!s[t[e]]})))}if(i&&x.value)return U(x.value),void(T.curPageList.length&&(v.isShow=!0));"focus"===l&&U()},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=r.searchKey,a=r.filterCallback,o=e.toLowerCase().trim();if(""!==o){var n;n="function"==typeof a?a(o,t,R.localList)||[]:Array.isArray(t)?R.localList.filter((function(e){return t.some((function(t){return e[t].toLowerCase().indexOf(o)>-1}))})):R.localList.filter((function(e){return e[t].toLowerCase().indexOf(o)>-1})),b(n)}else b(R.localList)},W=function(){x.value=""},$=function(){if(V.value)return 0;var e=z().findIndex((function(e){return"tagInputItem"===e.id}));return e>=0?e:0},Z=function(e,t){if(t&&e){var r=t;arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(r=t.nextElementSibling||null),t.parentNode.insertBefore(e,r)}},X=function(e){var t=r.maxData,a=r.trigger,o=r.allowCreate;if(-1===t||t>E.value.length){var n=((null==e?void 0:e.target)?e.target:x).value,l=m(n);l?(U(n),L.value.style.width="".concat(l*y,"px")):"focus"===a&&U()}else J(),x.value="",v.isShow=!1;f.isEdit=!0,f.focusItemIndex=o?-1:0,u("input",x.value)},J=function(){N.value=setTimeout((function(){var e,t,o,n=x.value;if(W(),f.isEdit=!1,V.value){var l=(t=R.tagListCache,o=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,o,n,l,i=[],s=!0,c=!1;try{if(n=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=n.call(r)).done)&&(i.push(a.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw o}}return i}}(t,o)||a(t,o)||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.")}())[0];n&&n===l&&R.selectedTagListCache.length?te(R.selectedTagListCache[0],"select"):Y("remove")}else if(r.allowAutoMatch&&n){var i=T.curPageList.find((function(e){return Array.isArray(r.searchKey)?r.searchKey.map((function(t){return e[t]})).includes(n):e[r.searchKey]===n}));i?Q(i,"select"):r.allowCreate&&Q(n,"custom")}v.isShow=!1,u("blur",n,E.value),null===(e=null==d?void 0:d.validate)||void 0===e||e.call(d,"blur")}),200)},Q=function(e,t,r){null==r||r.stopPropagation(),e&&!e.disabled&&(V.value&&(R.tagListCache=[],R.selectedTagListCache=[],R.selectedTagList=[]),te(e,t),Y("select"),W(),v.isShow=!1)},Y=function(e,t){u(e,t),u("update:modelValue",E.value),u("change",E.value)},ee=function(){var e=S.value.clientHeight,t=S.value.getBoundingClientRect().y;(0,l.nextTick)((function(){var r=S.value.querySelector(".".concat(g("selector-actived")));if(r){var a=r.clientHeight,o=r.getBoundingClientRect().y;o<t&&(S.value.scrollTop=S.value.scrollTop-(t-o));var n=o+a-t;n>e&&(S.value.scrollTop=S.value.scrollTop+n-e)}}))},te=function(e,a){if(!(R.selectedTagList.length>=r.maxData&&-1!==r.maxData)){var i,s=r.separator,c=r.saveKey,u=r.displayKey,d=r.createTagValidator,p=$(),f=1,v=!1,g=function(e){return"function"!=typeof d||d(e)};if("custom"===a)if(s){var h,m=e.split(s),T=(m=m.filter((function(e){return(null==e?void 0:e.trim())&&!E.value.includes(e)&&g(e)}))).map((function(e){var t;return M.value[e]||(n(t={},c,e),n(t,u,e),t)}));m.length&&((h=R.selectedTagList).splice.apply(h,[p,0].concat(o(T))),f=T.length,v=!0)}else{var b="object"===t(e);if(void 0!==(i=(i=b?e[c]:e.trim()).replace(/\s+/g,""))&&!E.value.includes(i)&&g(i)){var w,x=M.value[i]||(b?e:(n(w={},c,i),n(w,u,i),w));R.selectedTagList.splice(p,0,x),v=!0}}else e&&(void 0===(i=e[c])||E.value.includes(i)||(R.selectedTagList.splice(p,0,e),v=!0));v&&(0,l.nextTick)((function(){for(var e=1;e<=f;e++){var t=z()[p+e];Z(t,C.value)}if(L.value.style.width="".concat(y,"px"),!V.value){r.allowNextFocus&&B();var a=E.value.reduce((function(e,t){return e[t]=1,e}),{});R.localList=R.localList.filter((function(e){return!a[e[c]]}))}}))}},re=function(e,t){R.selectedTagList.splice(t,1);var a=M.value[e[r.saveKey]];(r.allowCreate&&a||!r.allowCreate)&&!V.value&&R.localList.push(e)},ae=(0,l.computed)((function(){return r.collapseTags?r.collapseTags&&!f.isEdit:r.collapseTags})),oe=function(e,t,r){(0,l.watch)([r,t],(function(){o()}),{flush:"post"});var a=(0,l.ref)(null),o=function(){t.value&&(a.value=null,setTimeout((function(){var t=Array.from(e.value.querySelectorAll(".tag-item")),r=t.findIndex((function(e,r){return!!r&&t[r-1].offsetTop!==e.offsetTop}));a.value=r>0?r-1:null})))};return{overflowTagIndex:a}}(P,ae,E),ne=oe.overflowTagIndex;return Object.assign(Object.assign(Object.assign(Object.assign({popoverProps:v},(0,l.toRefs)(f)),(0,l.toRefs)(R)),(0,l.toRefs)(T)),{isShowPlaceholder:O,isShowClear:j,placeholderText:A,curInputValue:x,renderList:F,showTagClose:K,tagInputRef:L,bkTagSelectorRef:P,tagListRef:I,tagInputItemRef:C,selectorListRef:S,triggerClass:k,overflowTagIndex:ne,localCollapseTags:ae,focusInputTrigger:B,activeClass:function(e,t){var a,o=(n(a={},"".concat(g("selector-actived")),!0),n(a,"".concat(g("selector-selected")),E.value.includes(e[r.saveKey])),a);return r.useGroup?o["".concat(g("selector-actived"))]=e.__index__===f.focusItemIndex:o["".concat(g("selector-actived"))]=t===f.focusItemIndex,o},handleInput:X,handleFocus:function(){var e;v.width=V.value?null===(e=P.value)||void 0===e?void 0:e.clientWidth:r.contentWidth,u("focus")},handleBlur:J,handleTagSelected:Q,handleTagRemove:function(e,t,r){null==r||r.stopPropagation(),re(e,t),W(),Y("remove",e),L.value.style.width="".concat(y,"px")},handleClear:function(e){e.stopPropagation();var t=R.selectedTagList;R.selectedTagList=[];var a,n=t.filter((function(e){return M.value[e[r.saveKey]]}));(!r.allowCreate||0===n.length)&&r.allowCreate||V.value||(a=R.localList).push.apply(a,o(n)),Y("removeAll")},tagFocus:function(e){r.disabled||(Z(C.value,e.currentTarget,!0),L.value.style.width="".concat(y,"px"),v.isShow&&H())},handleKeydown:function(e){if(!T.isPageLoading){var t=e.target.value,a=m(t),o=$(),n=z();switch(e.code){case"ArrowUp":if(e.preventDefault(),!v.isShow)return;f.focusItemIndex=f.focusItemIndex-1,f.focusItemIndex=f.focusItemIndex<0?-1:f.focusItemIndex,-1===f.focusItemIndex&&(f.focusItemIndex=T.curPageList.length-1),ee();break;case"ArrowDown":if(e.preventDefault(),!v.isShow)return;f.focusItemIndex=f.focusItemIndex+1,f.focusItemIndex=f.focusItemIndex>T.curPageList.length-1?T.curPageList.length:f.focusItemIndex,f.focusItemIndex===T.curPageList.length&&(f.focusItemIndex=0),ee();break;case"ArrowLeft":if(f.isEdit=!0,!a){if(o<1)return;Z(C.value,n[o-1]),B()}break;case"ArrowRight":if(f.isEdit=!0,!a){if(o===n.length-1)return;Z(n[o+1],C.value),B()}break;case"Enter":case"NumpadEnter":!r.allowCreate&&v.isShow||r.allowCreate&&f.focusItemIndex>=0&&v.isShow?Q(T.curPageList[f.focusItemIndex],"select",e):r.allowCreate&&x.value.trim()&&Q(x.value,"custom",e),e.preventDefault();break;case"Backspace":0===o||x.value||function(e,t){var a=z();Z(C.value,a[e-1]),R.selectedTagList.splice(e-1,1),B();var o=M.value[t[r.saveKey]];(r.allowCreate&&o||!r.allowCreate)&&!V.value&&R.localList.push(t),L.value="".concat(y,"px"),Y("remove")}(o,R.selectedTagList[o-1])}}},handlePaste:function(e){if(e.preventDefault(),V.value)return!1;var t=r.maxData,a=r.saveKey,l=r.displayKey,i=r.pasteFn,s=r.allowCreate,c=e.clipboardData.getData("text"),u=i?i(c):function(e){var t=[],a=e.split(";"),o=/^[a-zA-Z][a-zA-Z_]*/g;return a.forEach((function(e){var a=e.match(o);if(a){var l,i=a.join("");t.push((n(l={},r.saveKey,i),n(l,r.displayKey,i),l))}})),t}(c),d=u.map((function(e){return e[a]}));if(d.length){var p=z(),f=$(),v=R.localList.map((function(e){return e[a]}));if(d=d.filter((function(e){var t=(null==e?void 0:e.trim())&&!E.value.includes(e);return s?t:t&&v.includes(e)})),-1!==t){var g=R.selectedTagList.length;if(g<t){var h=t-g;d.length>h&&(d=o(d.slice(0,h)))}else d=[]}var m,T=s?d.map((function(e){var t,r=R.localList.find((function(t){return t[a]===e}));return null!=r?r:(n(t={},a,e),n(t,l,e),t)})):R.localList.filter((function(e){return d.includes(e[a])}));d.length&&((m=R.selectedTagList).splice.apply(m,[f,0].concat(o(T))),Z(C.value,p[f]),L.value.style.width="".concat(y,"px"),R.localList=R.localList.filter((function(e){return!d.includes(e[a])})),Y("select"),B())}},resolveClassName:g})},render:function(){var e=this;return(0,l.createVNode)("div",{class:"".concat(this.resolveClassName("tag-input")),ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:function(){return e.isHover=!0},onMouseleave:function(){return e.isHover=!1}},[(0,l.createVNode)(h(),(0,l.mergeProps)({theme:"light ".concat(this.resolveClassName("tag-input-popover-content")),trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:function(){var t,r,a;return(0,l.createVNode)("div",{class:e.triggerClass},[(0,l.createVNode)("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:"".concat(e.leftSpace,"px")}},[e.selectedTagList.map((function(t,r){var a={boundary:"window",theme:"light",distance:12,content:t[e.tooltipKey],disabled:!e.tooltipKey},o=e.localCollapseTags&&e.overflowTagIndex&&r>=e.overflowTagIndex;return(0,l.withDirectives)((0,l.createVNode)("li",{class:"tag-item",style:{display:o?"none":""},onClick:e.tagFocus},[(0,l.createVNode)(x,{node:t,tpl:e.tagTpl,displayKey:e.displayKey,hasTips:!!e.tooltipKey,tagOverflowTips:e.tagOverflowTips},null),e.showTagClose?(0,l.createVNode)(u.Error,{class:"remove-tag",onClick:e.handleTagRemove.bind(e,t,r)},null):null]),[[(0,l.resolveDirective)("bk-tooltips"),a]])})),(0,l.withDirectives)((0,l.createVNode)("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[(0,l.withDirectives)((0,l.createVNode)("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":function(t){return e.curInputValue=t},onInput:e.handleInput,onFocus:e.handleFocus,onBlur:e.handleBlur,onKeydown:e.handleKeydown,onPaste:e.handlePaste},null),[[l.vModelText,e.curInputValue]])]),[[l.vShow,e.isEdit]]),!!e.overflowTagIndex&&e.localCollapseTags&&(0,l.createVNode)("li",{class:"tag-item"},[(0,l.createVNode)("div",{class:"tag"},[(0,l.createVNode)("span",{class:"text"},[(0,l.createTextVNode)("+"),e.selectedTagList.length-e.overflowTagIndex])])])]),(0,l.withDirectives)((0,l.createVNode)("p",{class:"placeholder"},[e.placeholderText]),[[l.vShow,e.isShowPlaceholder]]),null!==(a=null===(r=null===(t=e.$slots)||void 0===t?void 0:t.suffix)||void 0===r?void 0:r.call(t))&&void 0!==a?a:e.isShowClear&&(0,l.createVNode)(u.Close,{class:"clear-icon",onClick:e.handleClear},null)])},content:function(){return(0,l.createVNode)("div",{class:"".concat(e.resolveClassName("selector-list"))},[(0,l.createVNode)("ul",{ref:"selectorListRef",style:{"max-height":"".concat(e.contentMaxHeight,"px")},class:"outside-ul"},[e.renderList.map((function(t,r){return e.useGroup?(0,l.createVNode)("li",{class:"".concat(e.resolveClassName("selector-group-item"))},[(0,l.createVNode)("span",{class:"group-name"},[t.name,(0,l.createTextVNode)(" ("),t.children.length,(0,l.createTextVNode)(")")]),(0,l.createVNode)("ul",{class:"".concat(e.resolveClassName("selector-group-list-item"))},[t.children.map((function(t,r){return(0,l.createVNode)("li",{class:["".concat(e.resolveClassName("selector-list-item")),{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,l.createVNode)(T,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])}))])]):(0,l.createVNode)("li",{class:["".concat(e.resolveClassName("selector-list-item")),{disabled:t.disabled},e.activeClass(t,r)],onClick:e.handleTagSelected.bind(e,t,"select")},[(0,l.createVNode)(T,{node:t,displayKey:e.displayKey,tpl:e.tpl,searchKey:e.searchKey,searchKeyword:e.curInputValue},null)])})),e.isPageLoading?(0,l.createVNode)("li",{class:"".concat(e.resolveClassName("selector-list-item")," loading")},[(0,l.createVNode)(v(),{theme:"primary",size:f.BkLoadingSize.Small},null)]):null])])}})])}}),P=(0,e.withInstall)(L)})(),p})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("lodash"), require("../config-provider"), require("../directives"), require("../icon"), require("../loading"), require("../popover"), require("vue-types"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "lodash", "../config-provider", "../directives", "../icon", "../loading", "../popover", "vue-types"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("lodash"), require("../config-provider"), require("../directives"), require("../icon"), require("../loading"), require("../popover"), require("vue-types")) : factory(root["../shared"], root["vue"], root["lodash"], root["../config-provider"], root["../directives"], root["../icon"], root["../loading"], root["../popover"], root["vue-types"]);
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__467__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__4061__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__4870__, __WEBPACK_EXTERNAL_MODULE__5537__, __WEBPACK_EXTERNAL_MODULE__210__) => {
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
+ /***/ 4061:
23
+ /***/ ((module) => {
24
+
25
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4061__;
26
+
27
+ /***/ }),
28
+
29
+ /***/ 6870:
30
+ /***/ ((module) => {
31
+
32
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
33
+
34
+ /***/ }),
35
+
36
+ /***/ 4870:
37
+ /***/ ((module) => {
38
+
39
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4870__;
40
+
41
+ /***/ }),
42
+
43
+ /***/ 5537:
44
+ /***/ ((module) => {
45
+
46
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
47
+
48
+ /***/ }),
49
+
50
+ /***/ 4212:
51
+ /***/ ((module) => {
52
+
53
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
54
+
55
+ /***/ }),
56
+
57
+ /***/ 467:
58
+ /***/ ((module) => {
59
+
60
+ module.exports = __WEBPACK_EXTERNAL_MODULE__467__;
61
+
62
+ /***/ }),
63
+
64
+ /***/ 748:
65
+ /***/ ((module) => {
66
+
67
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
68
+
69
+ /***/ }),
70
+
71
+ /***/ 210:
72
+ /***/ ((module) => {
73
+
74
+ module.exports = __WEBPACK_EXTERNAL_MODULE__210__;
75
+
76
+ /***/ })
77
+
78
+ /******/ });
79
+ /************************************************************************/
80
+ /******/ // The module cache
81
+ /******/ var __webpack_module_cache__ = {};
82
+ /******/
83
+ /******/ // The require function
84
+ /******/ function __webpack_require__(moduleId) {
85
+ /******/ // Check if module is in cache
86
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
87
+ /******/ if (cachedModule !== undefined) {
88
+ /******/ return cachedModule.exports;
89
+ /******/ }
90
+ /******/ // Create a new module (and put it into the cache)
91
+ /******/ var module = __webpack_module_cache__[moduleId] = {
92
+ /******/ // no module.id needed
93
+ /******/ // no module.loaded needed
94
+ /******/ exports: {}
95
+ /******/ };
96
+ /******/
97
+ /******/ // Execute the module function
98
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
99
+ /******/
100
+ /******/ // Return the exports of the module
101
+ /******/ return module.exports;
102
+ /******/ }
103
+ /******/
104
+ /************************************************************************/
105
+ /******/ /* webpack/runtime/compat get default export */
106
+ /******/ (() => {
107
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
108
+ /******/ __webpack_require__.n = (module) => {
109
+ /******/ var getter = module && module.__esModule ?
110
+ /******/ () => (module['default']) :
111
+ /******/ () => (module);
112
+ /******/ __webpack_require__.d(getter, { a: getter });
113
+ /******/ return getter;
114
+ /******/ };
115
+ /******/ })();
116
+ /******/
117
+ /******/ /* webpack/runtime/define property getters */
118
+ /******/ (() => {
119
+ /******/ // define getter functions for harmony exports
120
+ /******/ __webpack_require__.d = (exports, definition) => {
121
+ /******/ for(var key in definition) {
122
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
123
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
124
+ /******/ }
125
+ /******/ }
126
+ /******/ };
127
+ /******/ })();
128
+ /******/
129
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
130
+ /******/ (() => {
131
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
132
+ /******/ })();
133
+ /******/
134
+ /******/ /* webpack/runtime/make namespace object */
135
+ /******/ (() => {
136
+ /******/ // define __esModule on exports
137
+ /******/ __webpack_require__.r = (exports) => {
138
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
139
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
140
+ /******/ }
141
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
142
+ /******/ };
143
+ /******/ })();
144
+ /******/
145
+ /************************************************************************/
146
+ var __webpack_exports__ = {};
147
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
148
+ (() => {
149
+ // ESM COMPAT FLAG
150
+ __webpack_require__.r(__webpack_exports__);
151
+
152
+ // EXPORTS
153
+ __webpack_require__.d(__webpack_exports__, {
154
+ "default": () => (/* binding */ src)
155
+ });
156
+
157
+ // EXTERNAL MODULE: external "../shared"
158
+ var external_shared_ = __webpack_require__(4212);
159
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
160
+ function _typeof(obj) {
161
+ "@babel/helpers - typeof";
162
+
163
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
164
+ return typeof obj;
165
+ } : function (obj) {
166
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
167
+ }, _typeof(obj);
168
+ }
169
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
170
+ function _arrayWithHoles(arr) {
171
+ if (Array.isArray(arr)) return arr;
172
+ }
173
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
174
+ function _iterableToArrayLimit(arr, i) {
175
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
176
+ if (null != _i) {
177
+ var _s,
178
+ _e,
179
+ _x,
180
+ _r,
181
+ _arr = [],
182
+ _n = !0,
183
+ _d = !1;
184
+ try {
185
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
186
+ if (Object(_i) !== _i) return;
187
+ _n = !1;
188
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
189
+ } catch (err) {
190
+ _d = !0, _e = err;
191
+ } finally {
192
+ try {
193
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
194
+ } finally {
195
+ if (_d) throw _e;
196
+ }
197
+ }
198
+ return _arr;
199
+ }
200
+ }
201
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
202
+ function _arrayLikeToArray(arr, len) {
203
+ if (len == null || len > arr.length) len = arr.length;
204
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
205
+ return arr2;
206
+ }
207
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
208
+
209
+ function _unsupportedIterableToArray(o, minLen) {
210
+ if (!o) return;
211
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
212
+ var n = Object.prototype.toString.call(o).slice(8, -1);
213
+ if (n === "Object" && o.constructor) n = o.constructor.name;
214
+ if (n === "Map" || n === "Set") return Array.from(o);
215
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
216
+ }
217
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
218
+ function _nonIterableRest() {
219
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
220
+ }
221
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/slicedToArray.js
222
+
223
+
224
+
225
+
226
+ function _slicedToArray(arr, i) {
227
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
228
+ }
229
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
230
+
231
+ function _arrayWithoutHoles(arr) {
232
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
233
+ }
234
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArray.js
235
+ function _iterableToArray(iter) {
236
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
237
+ }
238
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
239
+ function _nonIterableSpread() {
240
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
241
+ }
242
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
243
+
244
+
245
+
246
+
247
+ function _toConsumableArray(arr) {
248
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
249
+ }
250
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
251
+
252
+ function _toPrimitive(input, hint) {
253
+ if (_typeof(input) !== "object" || input === null) return input;
254
+ var prim = input[Symbol.toPrimitive];
255
+ if (prim !== undefined) {
256
+ var res = prim.call(input, hint || "default");
257
+ if (_typeof(res) !== "object") return res;
258
+ throw new TypeError("@@toPrimitive must return a primitive value.");
259
+ }
260
+ return (hint === "string" ? String : Number)(input);
261
+ }
262
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
263
+
264
+
265
+ function _toPropertyKey(arg) {
266
+ var key = _toPrimitive(arg, "string");
267
+ return _typeof(key) === "symbol" ? key : String(key);
268
+ }
269
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
270
+
271
+ function _defineProperty(obj, key, value) {
272
+ key = _toPropertyKey(key);
273
+ if (key in obj) {
274
+ Object.defineProperty(obj, key, {
275
+ value: value,
276
+ enumerable: true,
277
+ configurable: true,
278
+ writable: true
279
+ });
280
+ } else {
281
+ obj[key] = value;
282
+ }
283
+ return obj;
284
+ }
285
+ // EXTERNAL MODULE: external "vue"
286
+ var external_vue_ = __webpack_require__(748);
287
+ // EXTERNAL MODULE: external "lodash"
288
+ var external_lodash_ = __webpack_require__(467);
289
+ // EXTERNAL MODULE: external "../config-provider"
290
+ var external_config_provider_ = __webpack_require__(2717);
291
+ // EXTERNAL MODULE: external "../directives"
292
+ var external_directives_ = __webpack_require__(4061);
293
+ // EXTERNAL MODULE: external "../icon"
294
+ var external_icon_ = __webpack_require__(6870);
295
+ // EXTERNAL MODULE: external "../loading"
296
+ var external_loading_ = __webpack_require__(4870);
297
+ var external_loading_default = /*#__PURE__*/__webpack_require__.n(external_loading_);
298
+ // EXTERNAL MODULE: external "../popover"
299
+ var external_popover_ = __webpack_require__(5537);
300
+ var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
301
+ ;// CONCATENATED MODULE: ../../packages/tag-input/src/common.ts
302
+
303
+ /*
304
+ * Tencent is pleased to support the open source community by making
305
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
306
+ *
307
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
308
+ *
309
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
310
+ *
311
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
312
+ *
313
+ * ---------------------------------------------------
314
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
315
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
316
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
317
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
318
+ *
319
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
320
+ * the Software.
321
+ *
322
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
323
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
324
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
325
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
326
+ * IN THE SOFTWARE.
327
+ */
328
+
329
+ var INPUT_MIN_WIDTH = 12;
330
+ function useDebouncedRef(value) {
331
+ var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
332
+ var timeout;
333
+ var innerValue = value;
334
+ return customRef(function (track, trigger) {
335
+ return {
336
+ get: function get() {
337
+ track();
338
+ return innerValue;
339
+ },
340
+ set: function set(newValue) {
341
+ clearTimeout(timeout);
342
+ timeout = setTimeout(function () {
343
+ innerValue = newValue;
344
+ trigger();
345
+ }, delay);
346
+ }
347
+ };
348
+ });
349
+ }
350
+ function usePage(pageSize) {
351
+ var state = (0,external_vue_.reactive)({
352
+ curPage: 1,
353
+ totalSize: 0,
354
+ totalPage: 0,
355
+ pageSize: pageSize,
356
+ isPageLoading: false,
357
+ curPageList: [],
358
+ renderListPaged: []
359
+ });
360
+ // 初始化分页信息
361
+ var initPage = function initPage() {
362
+ var _state$renderListPage, _state$curPageList;
363
+ var allList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
364
+ state.curPage = 1;
365
+ state.totalSize = allList.length;
366
+ state.totalPage = Math.ceil(state.totalSize / state.pageSize) || 1;
367
+ var list = [];
368
+ // 小于等于0会无限循环
369
+ if (state.pageSize > 0) {
370
+ for (var i = 0; i < state.totalSize; i += state.pageSize) {
371
+ list.push(allList.slice(i, i + state.pageSize));
372
+ }
373
+ }
374
+ (_state$renderListPage = state.renderListPaged).splice.apply(_state$renderListPage, [0, state.renderListPaged.length].concat(list));
375
+ (_state$curPageList = state.curPageList).splice.apply(_state$curPageList, [0, state.curPageList.length].concat(_toConsumableArray(state.renderListPaged[state.curPage - 1] || [])));
376
+ };
377
+ var pageChange = function pageChange(page) {
378
+ var _state$curPageList2;
379
+ state.curPage = page;
380
+ (_state$curPageList2 = state.curPageList).splice.apply(_state$curPageList2, [state.curPageList.length, 0].concat(_toConsumableArray(state.renderListPaged[state.curPage - 1] || [])));
381
+ state.isPageLoading = false;
382
+ };
383
+ return {
384
+ pageState: state,
385
+ initPage: initPage,
386
+ pageChange: pageChange
387
+ };
388
+ }
389
+ function useFlatList(props) {
390
+ var _toRefs = (0,external_vue_.toRefs)(props),
391
+ useGroup = _toRefs.useGroup,
392
+ saveKey = _toRefs.saveKey,
393
+ displayKey = _toRefs.displayKey,
394
+ list = _toRefs.list;
395
+ var flatList = (0,external_vue_.ref)([]);
396
+ var saveKeyMap = (0,external_vue_.ref)({});
397
+ (0,external_vue_.watch)([useGroup, saveKey, displayKey, list], function () {
398
+ flatList.value = [];
399
+ var formatList = (0,external_vue_.markRaw)(list.value);
400
+ if (useGroup.value) {
401
+ formatList = formatList.reduce(function (formatList, item) {
402
+ var children = [];
403
+ if (item.children) {
404
+ children = item.children.map(function (child) {
405
+ return Object.assign({
406
+ group: {
407
+ groupId: item[saveKey.value],
408
+ groupName: item[displayKey.value]
409
+ }
410
+ }, child);
411
+ });
412
+ }
413
+ return formatList.concat(children);
414
+ }, []);
415
+ }
416
+ flatList.value = formatList;
417
+ saveKeyMap.value = formatList.reduce(function (acc, item) {
418
+ acc[item[saveKey.value]] = item;
419
+ return acc;
420
+ }, {});
421
+ }, {
422
+ immediate: true,
423
+ deep: true
424
+ });
425
+ return {
426
+ flatList: flatList,
427
+ saveKeyMap: saveKeyMap
428
+ };
429
+ }
430
+ /**
431
+ * 获取字符长度,汉字两个字节
432
+ * @param str 需要计算长度的字符
433
+ * @returns 字符长度
434
+ */
435
+ var getCharLength = function getCharLength(str) {
436
+ var len = str.length;
437
+ var bitLen = 0;
438
+ for (var i = 0; i < len; i++) {
439
+ if ((str.charCodeAt(i) & 0xff00) !== 0) {
440
+ bitLen += 1;
441
+ }
442
+ bitLen += 1;
443
+ }
444
+ return bitLen;
445
+ };
446
+ /**
447
+ * 获取隐藏 tag index
448
+ * @param tagInputRef 组件容器 ref
449
+ * @param collapseTags 是否折叠 tags
450
+ * @param selectedTagList 已选择 tags
451
+ */
452
+ var useTagsOverflow = function useTagsOverflow(tagInputRef, collapseTags, selectedTagList) {
453
+ (0,external_vue_.watch)([selectedTagList, collapseTags], function () {
454
+ calcOverflow();
455
+ }, {
456
+ flush: 'post'
457
+ });
458
+ var overflowTagIndex = (0,external_vue_.ref)(null);
459
+ // 计算出现换行的索引
460
+ var calcOverflow = function calcOverflow() {
461
+ if (!collapseTags.value) return;
462
+ overflowTagIndex.value = null;
463
+ setTimeout(function () {
464
+ var tags = Array.from(tagInputRef.value.querySelectorAll('.tag-item'));
465
+ var tagIndexInSecondRow = tags.findIndex(function (currentTag, index) {
466
+ if (!index) {
467
+ return false;
468
+ }
469
+ var previousTag = tags[index - 1];
470
+ return previousTag.offsetTop !== currentTag.offsetTop;
471
+ });
472
+ overflowTagIndex.value = tagIndexInSecondRow > 0 ? tagIndexInSecondRow - 1 : null;
473
+ });
474
+ };
475
+ return {
476
+ overflowTagIndex: overflowTagIndex
477
+ };
478
+ };
479
+ ;// CONCATENATED MODULE: ../../packages/tag-input/src/list-tag-render.tsx
480
+
481
+ /*
482
+ * Tencent is pleased to support the open source community by making
483
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
484
+ *
485
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
486
+ *
487
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
488
+ *
489
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
490
+ *
491
+ * ---------------------------------------------------
492
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
493
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
494
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
495
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
496
+ *
497
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
498
+ * the Software.
499
+ *
500
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
501
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
502
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
503
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
504
+ * IN THE SOFTWARE.
505
+ */
506
+
507
+
508
+
509
+ /* harmony default export */ const list_tag_render = ((0,external_vue_.defineComponent)({
510
+ name: 'ListTagRender',
511
+ props: {
512
+ node: external_shared_.PropTypes.object,
513
+ searchKey: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.string)]),
514
+ displayKey: external_shared_.PropTypes.string,
515
+ searchKeyword: external_shared_.PropTypes.string,
516
+ tpl: {
517
+ type: Function
518
+ }
519
+ },
520
+ render: function render() {
521
+ var _this = this;
522
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
523
+ resolveClassName = _usePrefix.resolveClassName;
524
+ var highlightKeyword = function highlightKeyword(value) {
525
+ if (_this.searchKeyword) {
526
+ var keywordReg = new RegExp("(".concat(_this.searchKeyword, ")"), 'i');
527
+ return value.replace(keywordReg, '<strong class="highlight-text">$1</strong>');
528
+ }
529
+ return value;
530
+ };
531
+ if (this.tpl) {
532
+ return this.tpl(this.node, highlightKeyword, external_vue_.h, this);
533
+ }
534
+ var displayText = this.node[this.displayKey];
535
+ return (0,external_vue_.createVNode)("div", {
536
+ "class": "".concat(resolveClassName('selector-node'))
537
+ }, [(0,external_vue_.createVNode)("span", {
538
+ "class": "text",
539
+ "innerHTML": highlightKeyword(displayText)
540
+ }, [displayText])]);
541
+ }
542
+ }));
543
+ // EXTERNAL MODULE: external "vue-types"
544
+ var external_vue_types_ = __webpack_require__(210);
545
+ ;// CONCATENATED MODULE: ../../packages/tag-input/src/tag-props.ts
546
+ /*
547
+ * Tencent is pleased to support the open source community by making
548
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
549
+ *
550
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
551
+ *
552
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
553
+ *
554
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
555
+ *
556
+ * ---------------------------------------------------
557
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
558
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
559
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
560
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
561
+ *
562
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
563
+ * the Software.
564
+ *
565
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
566
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
567
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
568
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
569
+ * IN THE SOFTWARE.
570
+ */
571
+
572
+
573
+ var TagInputTriggerEnum;
574
+ (function (TagInputTriggerEnum) {
575
+ TagInputTriggerEnum["FOCUS"] = "focus";
576
+ TagInputTriggerEnum["SEARCH"] = "search";
577
+ })(TagInputTriggerEnum || (TagInputTriggerEnum = {}));
578
+ var tagProps = function tagProps() {
579
+ return {
580
+ modelValue: external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.string).def([]),
581
+ placeholder: external_shared_.PropTypes.string.def(''),
582
+ list: external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.object).def([]),
583
+ disabled: external_shared_.PropTypes.bool.def(false),
584
+ tooltipKey: external_shared_.PropTypes.string.def(''),
585
+ saveKey: external_shared_.PropTypes.string.def('id'),
586
+ displayKey: external_shared_.PropTypes.string.def('name'),
587
+ hasDeleteIcon: external_shared_.PropTypes.bool.def(false),
588
+ clearable: external_shared_.PropTypes.bool.def(true),
589
+ trigger: (0,external_vue_types_.toType)('treeTriggerType', {}).def(TagInputTriggerEnum.SEARCH),
590
+ searchKey: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.string)]).def('name'),
591
+ useGroup: external_shared_.PropTypes.bool.def(false),
592
+ allowCreate: external_shared_.PropTypes.bool.def(false),
593
+ maxData: external_shared_.PropTypes.number.def(-1),
594
+ maxResult: external_shared_.PropTypes.number.def(10),
595
+ contentMaxHeight: external_shared_.PropTypes.number.def(300),
596
+ contentWidth: external_shared_.PropTypes.number.def(190),
597
+ separator: external_shared_.PropTypes.string.def(''),
598
+ allowNextFocus: external_shared_.PropTypes.bool.def(true),
599
+ allowAutoMatch: external_shared_.PropTypes.bool.def(false),
600
+ showClearOnlyHover: external_shared_.PropTypes.bool.def(false),
601
+ isAsyncList: external_shared_.PropTypes.bool.def(false),
602
+ leftSpace: external_shared_.PropTypes.number.def(0),
603
+ createTagValidator: {
604
+ type: Function
605
+ },
606
+ filterCallback: {
607
+ type: Function
608
+ },
609
+ tagTpl: {
610
+ type: Function
611
+ },
612
+ tpl: {
613
+ type: Function
614
+ },
615
+ pasteFn: {
616
+ type: Function
617
+ },
618
+ withValidate: {
619
+ type: Boolean,
620
+ "default": true
621
+ },
622
+ popoverProps: {
623
+ type: Object,
624
+ "default": function _default() {
625
+ return {};
626
+ }
627
+ },
628
+ collapseTags: {
629
+ type: Boolean,
630
+ "default": false
631
+ },
632
+ tagOverflowTips: {
633
+ type: Object,
634
+ "default": function _default() {
635
+ return {};
636
+ }
637
+ }
638
+ };
639
+ };
640
+ /* harmony default export */ const tag_props = (tagProps);
641
+ ;// CONCATENATED MODULE: ../../packages/tag-input/src/tag-render.tsx
642
+
643
+ /*
644
+ * Tencent is pleased to support the open source community by making
645
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
646
+ *
647
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
648
+ *
649
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
650
+ *
651
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
652
+ *
653
+ * ---------------------------------------------------
654
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
655
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
656
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
657
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
658
+ *
659
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
660
+ * the Software.
661
+ *
662
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
663
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
664
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
665
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
666
+ * IN THE SOFTWARE.
667
+ */
668
+
669
+
670
+
671
+ /* harmony default export */ const tag_render = ((0,external_vue_.defineComponent)({
672
+ name: 'TagRender',
673
+ directives: {
674
+ bkTooltips: external_directives_.bkTooltips
675
+ },
676
+ props: {
677
+ node: external_shared_.PropTypes.object,
678
+ displayKey: external_shared_.PropTypes.string,
679
+ tpl: {
680
+ type: Function
681
+ },
682
+ hasTips: {
683
+ type: Boolean,
684
+ "default": false
685
+ },
686
+ tagOverflowTips: {
687
+ type: Object,
688
+ "default": function _default() {
689
+ return {};
690
+ }
691
+ }
692
+ },
693
+ setup: function setup(props) {
694
+ var tagRef = (0,external_vue_.ref)();
695
+ var isOverflow = (0,external_vue_.ref)(false);
696
+ var overflowTips = (0,external_vue_.computed)(function () {
697
+ return Object.assign({
698
+ boundary: 'window',
699
+ theme: 'light',
700
+ distance: 12,
701
+ content: props.node[props.displayKey],
702
+ disabled: props.hasTips || !isOverflow.value
703
+ }, props.tagOverflowTips);
704
+ });
705
+ (0,external_vue_.onMounted)(function () {
706
+ isOverflow.value = (0,external_shared_.checkOverflow)(tagRef.value);
707
+ });
708
+ return {
709
+ overflowTips: overflowTips,
710
+ tagRef: tagRef
711
+ };
712
+ },
713
+ render: function render() {
714
+ if (this.tpl) {
715
+ return this.tpl(this.node, external_vue_.h, this);
716
+ }
717
+ return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
718
+ "class": "tag",
719
+ "ref": "tagRef"
720
+ }, [(0,external_vue_.createVNode)("span", {
721
+ "class": "text"
722
+ }, [this.node[this.displayKey]])]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), this.overflowTips]]);
723
+ }
724
+ }));
725
+ ;// CONCATENATED MODULE: ../../packages/tag-input/src/tag-input.tsx
726
+
727
+
728
+
729
+
730
+
731
+ /*
732
+ * Tencent is pleased to support the open source community by making
733
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
734
+ *
735
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
736
+ *
737
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
738
+ *
739
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
740
+ *
741
+ * ---------------------------------------------------
742
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
743
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
744
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
745
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
746
+ *
747
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
748
+ * the Software.
749
+ *
750
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
751
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
752
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
753
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
754
+ * IN THE SOFTWARE.
755
+ */
756
+
757
+
758
+
759
+
760
+
761
+
762
+
763
+
764
+
765
+
766
+
767
+
768
+ /* harmony default export */ const tag_input = ((0,external_vue_.defineComponent)({
769
+ name: 'TagInput',
770
+ directives: {
771
+ bkTooltips: external_directives_.bkTooltips
772
+ },
773
+ props: tag_props(),
774
+ emits: ['update:modelValue', 'change', 'select', 'focus', 'blur', 'remove', 'removeAll', 'input'],
775
+ setup: function setup(props, _ref) {
776
+ var emit = _ref.emit;
777
+ var formItem = (0,external_shared_.useFormItem)();
778
+ var t = (0,external_config_provider_.useLocale)('tagInput');
779
+ var state = (0,external_vue_.reactive)({
780
+ isEdit: false,
781
+ isHover: false,
782
+ focusItemIndex: props.allowCreate ? -1 : 0
783
+ });
784
+ var popoverProps = (0,external_vue_.reactive)(Object.assign({
785
+ isShow: false,
786
+ width: 190,
787
+ offset: {
788
+ mainAxis: 4,
789
+ crossAxis: 0
790
+ // alignmentAxis: 50,
791
+ }
792
+ }, props.popoverProps));
793
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
794
+ resolveClassName = _usePrefix.resolveClassName;
795
+ // 分页处理
796
+ var _toRefs = (0,external_vue_.toRefs)(props),
797
+ maxResult = _toRefs.maxResult;
798
+ var _usePage = usePage(maxResult),
799
+ pageState = _usePage.pageState,
800
+ initPage = _usePage.initPage,
801
+ pageChange = _usePage.pageChange;
802
+ var curInputValue = (0,external_vue_.ref)('');
803
+ var tagInputRef = (0,external_vue_.ref)(null);
804
+ var bkTagSelectorRef = (0,external_vue_.ref)(null);
805
+ var tagListRef = (0,external_vue_.ref)(null);
806
+ var tagInputItemRef = (0,external_vue_.ref)(null);
807
+ var selectorListRef = (0,external_vue_.ref)(null);
808
+ var timer = (0,external_vue_.ref)(null);
809
+ // 是否展示tag close
810
+ var showTagClose = (0,external_vue_.computed)(function () {
811
+ return !props.disabled && props.hasDeleteIcon;
812
+ });
813
+ // 是否单选
814
+ var isSingleSelect = (0,external_vue_.computed)(function () {
815
+ return props.maxData === 1;
816
+ });
817
+ // 是否展示placeholder
818
+ var isShowPlaceholder = (0,external_vue_.computed)(function () {
819
+ return listState.selectedTagList.length === 0 && curInputValue.value === '' && !state.isEdit;
820
+ });
821
+ var placeholderText = (0,external_vue_.computed)(function () {
822
+ return props.placeholder || t.value.placeholder;
823
+ });
824
+ // 是否展示清空Icon
825
+ /**
826
+ * 不显示条件:
827
+ * 1. 设置不可清除
828
+ * 2. 禁用时
829
+ * 3. tag标签为空时
830
+ * 4. 设置了showClearOnlyHover,且没有hover的时候
831
+ */
832
+ var isShowClear = (0,external_vue_.computed)(function () {
833
+ return props.clearable && !props.disabled && listState.selectedTagList.length !== 0 && (props.showClearOnlyHover ? state.isHover : true);
834
+ });
835
+ var triggerClass = (0,external_vue_.computed)(function () {
836
+ var _ref2;
837
+ return _ref2 = {}, _defineProperty(_ref2, "".concat(resolveClassName('tag-input-trigger')), true), _defineProperty(_ref2, "active", state.isEdit), _defineProperty(_ref2, "disabled", props.disabled), _ref2;
838
+ });
839
+ var listState = (0,external_vue_.reactive)({
840
+ localList: [],
841
+ tagListCache: [],
842
+ selectedTagList: [],
843
+ selectedTagListCache: []
844
+ });
845
+ // 选中标签 save key 列表
846
+ var tagList = (0,external_vue_.computed)(function () {
847
+ return listState.selectedTagList.map(function (tag) {
848
+ return tag[props.saveKey];
849
+ });
850
+ });
851
+ // 扁平化 list
852
+ var _useFlatList = useFlatList(props),
853
+ flatList = _useFlatList.flatList,
854
+ saveKeyMap = _useFlatList.saveKeyMap;
855
+ // 下拉框渲染列表
856
+ var renderList = (0,external_vue_.computed)(function () {
857
+ if (props.useGroup) {
858
+ var groupMap = {};
859
+ pageState.curPageList.forEach(function (item, index) {
860
+ item.__index__ = index;
861
+ if (!groupMap[item.group.groupId]) {
862
+ groupMap[item.group.groupId] = {
863
+ id: item.group.groupId,
864
+ name: item.group.groupName,
865
+ children: []
866
+ };
867
+ }
868
+ groupMap[item.group.groupId].children.push(item);
869
+ });
870
+ return Object.keys(groupMap).map(function (key) {
871
+ return groupMap[key];
872
+ });
873
+ }
874
+ return pageState.curPageList;
875
+ });
876
+ (0,external_vue_.watch)([function () {
877
+ return flatList.value;
878
+ }], function () {
879
+ (0,external_vue_.nextTick)(function () {
880
+ initData();
881
+ });
882
+ }, {
883
+ deep: true
884
+ });
885
+ (0,external_vue_.watch)(function () {
886
+ return props.modelValue;
887
+ }, function (val) {
888
+ var _a;
889
+ if (!shallowCompareArray(tagList.value, val)) {
890
+ (0,external_vue_.nextTick)(function () {
891
+ initData();
892
+ });
893
+ if (props.withValidate) {
894
+ (_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
895
+ }
896
+ }
897
+ });
898
+ (0,external_vue_.watch)(curInputValue, (0,external_lodash_.debounce)(function () {
899
+ var hasShowCount = pageState.curPageList.length !== 0;
900
+ var value = curInputValue.value;
901
+ /**
902
+ * 1. value !== '' && hasShowCount => search value list.
903
+ * 2. value === '' && props.trigger === 'focus' && hasShowCount => trigger is focus and show all list.
904
+ */
905
+ if (value !== '' && hasShowCount || value === '' && props.trigger === 'focus' && hasShowCount) {
906
+ popoverProps.isShow = true;
907
+ } else if (props.trigger !== 'focus' || !hasShowCount) {
908
+ popoverProps.isShow = false;
909
+ }
910
+ }, 150));
911
+ (0,external_vue_.watch)(function () {
912
+ return popoverProps.isShow;
913
+ }, function (show) {
914
+ changePopoverOffset();
915
+ if (show) {
916
+ if (selectorListRef.value) {
917
+ (0,external_vue_.nextTick)(function () {
918
+ selectorListRef.value.scrollTop = 0;
919
+ });
920
+ selectorListRef.value.removeEventListener('scroll', scrollHandler);
921
+ selectorListRef.value.addEventListener('scroll', scrollHandler);
922
+ }
923
+ }
924
+ });
925
+ (0,external_vue_.onMounted)(function () {
926
+ initData();
927
+ });
928
+ var changePopoverOffset = function changePopoverOffset() {
929
+ var _a;
930
+ // 修改popover offset
931
+ popoverProps.offset.crossAxis = isSingleSelect.value ? 0 : (_a = tagInputItemRef.value) === null || _a === void 0 ? void 0 : _a.offsetLeft;
932
+ };
933
+ var scrollHandler = function scrollHandler() {
934
+ if (pageState.isPageLoading || selectorListRef.value.scrollTop === 0) {
935
+ return;
936
+ }
937
+ var _selectorListRef$valu = selectorListRef.value,
938
+ scrollTop = _selectorListRef$valu.scrollTop,
939
+ offsetHeight = _selectorListRef$valu.offsetHeight,
940
+ scrollHeight = _selectorListRef$valu.scrollHeight;
941
+ if (scrollTop + offsetHeight >= scrollHeight) {
942
+ var curPage = pageState.curPage + 1;
943
+ if (curPage <= pageState.totalPage) {
944
+ pageState.isPageLoading = true;
945
+ setTimeout(function () {
946
+ pageChange(curPage);
947
+ }, 500);
948
+ }
949
+ }
950
+ };
951
+ // 获取选中元素节点
952
+ var getSelectedTagNodes = function getSelectedTagNodes() {
953
+ var _a;
954
+ var nodes = Array.from(((_a = tagListRef.value) === null || _a === void 0 ? void 0 : _a.childNodes) || []);
955
+ return nodes.filter(function (node) {
956
+ return ![Node.TEXT_NODE, Node.COMMENT_NODE].includes(node.nodeType);
957
+ });
958
+ };
959
+ /**
960
+ * 触发输入框聚焦
961
+ * @param e
962
+ */
963
+ var focusInputTrigger = function focusInputTrigger(e) {
964
+ if (props.disabled) return;
965
+ if (e === null || e === void 0 ? void 0 : e.target) {
966
+ var className = e.target.className;
967
+ if (className.indexOf("".concat(resolveClassName('tag-input-trigger'))) > -1 || className.indexOf('tag-list') > -1) {
968
+ // 如果没点在节点上,重置input位置(在最后插入input)
969
+ tagListRef.value.appendChild(tagInputItemRef.value);
970
+ }
971
+ }
972
+ clearTimeout(timer.value);
973
+ // 如果是单选,在获取焦点时自动定位为当前值
974
+ if (isSingleSelect.value && tagList.value.length) {
975
+ listState.tagListCache = _toConsumableArray(tagList.value);
976
+ listState.selectedTagListCache = _toConsumableArray(listState.selectedTagList);
977
+ curInputValue.value = listState.selectedTagListCache[0][props.saveKey];
978
+ removeTag(listState.selectedTagList[0], 0);
979
+ handleInput();
980
+ }
981
+ state.isEdit = true;
982
+ setTimeout(function () {
983
+ var _a;
984
+ (_a = tagInputRef.value) === null || _a === void 0 ? void 0 : _a.focus();
985
+ if (props.trigger === 'focus' && listState.localList.length !== 0) {
986
+ filterData();
987
+ if (popoverProps.isShow) {
988
+ changePopoverOffset();
989
+ } else {
990
+ popoverProps.isShow = true;
991
+ }
992
+ }
993
+ }, 200);
994
+ };
995
+ /**
996
+ * 初始化列表数据
997
+ */
998
+ var initData = function initData() {
999
+ var saveKey = props.saveKey,
1000
+ modelValue = props.modelValue,
1001
+ displayKey = props.displayKey,
1002
+ allowCreate = props.allowCreate,
1003
+ trigger = props.trigger,
1004
+ isAsyncList = props.isAsyncList;
1005
+ listState.selectedTagList = [];
1006
+ listState.localList = flatList.value;
1007
+ if (modelValue.length) {
1008
+ var modelValueMap = {};
1009
+ listState.selectedTagList = modelValue.map(function (tag) {
1010
+ var item = saveKeyMap.value[tag];
1011
+ modelValueMap[tag] = 1;
1012
+ if (!item && allowCreate) {
1013
+ var _ref3;
1014
+ return _ref3 = {}, _defineProperty(_ref3, saveKey, tag), _defineProperty(_ref3, displayKey, tag), _ref3;
1015
+ }
1016
+ return item;
1017
+ }).filter(function (item) {
1018
+ return item;
1019
+ });
1020
+ // 如果不是单选时,需要将已选的过滤掉
1021
+ if (!isSingleSelect.value) {
1022
+ listState.localList = listState.localList.filter(function (val) {
1023
+ return !modelValueMap[val[saveKey]];
1024
+ });
1025
+ }
1026
+ }
1027
+ if (isAsyncList && curInputValue.value) {
1028
+ filterData(curInputValue.value);
1029
+ if (pageState.curPageList.length) {
1030
+ popoverProps.isShow = true;
1031
+ }
1032
+ return;
1033
+ }
1034
+ // 如果需要首次展示列表,先初始化
1035
+ if (trigger === 'focus') {
1036
+ filterData();
1037
+ }
1038
+ };
1039
+ // 过滤数据
1040
+ var filterData = function filterData() {
1041
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1042
+ var searchKey = props.searchKey,
1043
+ filterCallback = props.filterCallback;
1044
+ var lowerCaseValue = value.toLowerCase().trim();
1045
+ if (lowerCaseValue === '') {
1046
+ initPage(listState.localList);
1047
+ return;
1048
+ }
1049
+ var filterData = [];
1050
+ if (typeof filterCallback === 'function') {
1051
+ filterData = filterCallback(lowerCaseValue, searchKey, listState.localList) || [];
1052
+ } else {
1053
+ // 根据文本框输入的值筛选过来的数据
1054
+ if (Array.isArray(searchKey)) {
1055
+ // 数组,过滤多个关键字
1056
+ filterData = listState.localList.filter(function (item) {
1057
+ return searchKey.some(function (keyword) {
1058
+ return item[keyword].toLowerCase().indexOf(lowerCaseValue) > -1;
1059
+ });
1060
+ });
1061
+ } else {
1062
+ filterData = listState.localList.filter(function (item) {
1063
+ return item[searchKey].toLowerCase().indexOf(lowerCaseValue) > -1;
1064
+ });
1065
+ }
1066
+ }
1067
+ initPage(filterData);
1068
+ };
1069
+ var activeClass = function activeClass(data, index) {
1070
+ var _style;
1071
+ var style = (_style = {}, _defineProperty(_style, "".concat(resolveClassName('selector-actived')), true), _defineProperty(_style, "".concat(resolveClassName('selector-selected')), tagList.value.includes(data[props.saveKey])), _style);
1072
+ if (props.useGroup) {
1073
+ style["".concat(resolveClassName('selector-actived'))] = data.__index__ === state.focusItemIndex;
1074
+ } else {
1075
+ style["".concat(resolveClassName('selector-actived'))] = index === state.focusItemIndex;
1076
+ }
1077
+ return style;
1078
+ };
1079
+ function shallowCompareArray(arr1, arr2) {
1080
+ if (arr1.length !== arr2.length) return false;
1081
+ return arr2.every(function (item, index) {
1082
+ return arr1[index] === item;
1083
+ });
1084
+ }
1085
+ var clearSingleCache = function clearSingleCache() {
1086
+ listState.tagListCache = [];
1087
+ listState.selectedTagListCache = [];
1088
+ listState.selectedTagList = [];
1089
+ };
1090
+ var clearInput = function clearInput() {
1091
+ curInputValue.value = '';
1092
+ };
1093
+ /**
1094
+ * 获取输入框元素位置
1095
+ */
1096
+ var getTagInputItemSite = function getTagInputItemSite() {
1097
+ // 单选时,当前替换位置为第一个元素
1098
+ if (isSingleSelect.value) {
1099
+ return 0;
1100
+ }
1101
+ var childNodes = getSelectedTagNodes();
1102
+ var index = childNodes.findIndex(function (_ref4) {
1103
+ var id = _ref4.id;
1104
+ return id === 'tagInputItem';
1105
+ });
1106
+ return index >= 0 ? index : 0;
1107
+ };
1108
+ /**
1109
+ * 交换元素位置
1110
+ */
1111
+ var swapElementPositions = function swapElementPositions(newNode, referenceNode) {
1112
+ var isNextElementSibling = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
1113
+ if (!referenceNode || !newNode) return;
1114
+ var swap = referenceNode;
1115
+ if (isNextElementSibling) {
1116
+ swap = referenceNode.nextElementSibling || null;
1117
+ }
1118
+ referenceNode.parentNode.insertBefore(newNode, swap);
1119
+ };
1120
+ var handleInput = function handleInput(e) {
1121
+ var maxData = props.maxData,
1122
+ trigger = props.trigger,
1123
+ allowCreate = props.allowCreate;
1124
+ if (maxData === -1 || maxData > tagList.value.length) {
1125
+ var _ref5 = (e === null || e === void 0 ? void 0 : e.target) ? e.target : curInputValue,
1126
+ value = _ref5.value;
1127
+ var charLen = getCharLength(value);
1128
+ if (charLen) {
1129
+ filterData(value);
1130
+ tagInputRef.value.style.width = "".concat(charLen * INPUT_MIN_WIDTH, "px");
1131
+ } else {
1132
+ if (trigger === 'focus') {
1133
+ filterData();
1134
+ }
1135
+ }
1136
+ } else {
1137
+ handleBlur();
1138
+ curInputValue.value = '';
1139
+ popoverProps.isShow = false;
1140
+ }
1141
+ state.isEdit = true;
1142
+ // 重置下拉菜单选中信息
1143
+ state.focusItemIndex = allowCreate ? -1 : 0;
1144
+ emit('input', curInputValue.value);
1145
+ };
1146
+ var handleFocus = function handleFocus() {
1147
+ var _a;
1148
+ // this.dispatch('bk-form-item', 'form-focus')
1149
+ popoverProps.width = isSingleSelect.value ? (_a = bkTagSelectorRef.value) === null || _a === void 0 ? void 0 : _a.clientWidth : props.contentWidth;
1150
+ emit('focus');
1151
+ // e.currentTarget.select();
1152
+ };
1153
+
1154
+ var handleBlur = function handleBlur() {
1155
+ timer.value = setTimeout(function () {
1156
+ var _a;
1157
+ var inputValue = curInputValue.value;
1158
+ clearInput();
1159
+ // 通知表单组件,可用于实时验证
1160
+ // this.dispatch('bk-form-item', 'form-blur')
1161
+ state.isEdit = false;
1162
+ if (isSingleSelect.value) {
1163
+ var _listState$tagListCac = _slicedToArray(listState.tagListCache, 1),
1164
+ oldValue = _listState$tagListCac[0];
1165
+ // 如果是单选,且input不为空,即保留了上次的结果则恢复
1166
+ if (inputValue && inputValue === oldValue && listState.selectedTagListCache.length) {
1167
+ addTag(listState.selectedTagListCache[0], 'select');
1168
+ } else {
1169
+ handleChange('remove');
1170
+ }
1171
+ } else if (props.allowAutoMatch && inputValue) {
1172
+ // 如果匹配,则自动选则
1173
+ var matchItem = pageState.curPageList.find(function (item) {
1174
+ if (Array.isArray(props.searchKey)) {
1175
+ var searchValue = props.searchKey.map(function (key) {
1176
+ return item[key];
1177
+ });
1178
+ return searchValue.includes(inputValue);
1179
+ }
1180
+ return item[props.searchKey] === inputValue;
1181
+ });
1182
+ if (matchItem) {
1183
+ handleTagSelected(matchItem, 'select');
1184
+ } else if (props.allowCreate) {
1185
+ // 支持自定义
1186
+ handleTagSelected(inputValue, 'custom');
1187
+ }
1188
+ }
1189
+ popoverProps.isShow = false;
1190
+ emit('blur', inputValue, tagList.value);
1191
+ (_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'blur');
1192
+ }, 200);
1193
+ };
1194
+ /**
1195
+ * tag selected handler
1196
+ * @param item tag data
1197
+ * @param type emit type
1198
+ */
1199
+ var handleTagSelected = function handleTagSelected(item, type, e) {
1200
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
1201
+ // 如果 item 不存在(备选项中没有包含输入的字母的情况即输入关键字没有备选项出现的情况)或者选中标签所在组是禁用状态,返回
1202
+ if (!item || item.disabled) {
1203
+ return;
1204
+ }
1205
+ // 如果是单选,清空上一次缓存结果
1206
+ if (isSingleSelect.value) {
1207
+ clearSingleCache();
1208
+ }
1209
+ addTag(item, type);
1210
+ handleChange('select');
1211
+ clearInput();
1212
+ popoverProps.isShow = false;
1213
+ };
1214
+ /**
1215
+ * remove selected tag
1216
+ * @param data tag data
1217
+ * @param index tag index
1218
+ * @param e mouse event
1219
+ */
1220
+ var handleTagRemove = function handleTagRemove(data, index, e) {
1221
+ e === null || e === void 0 ? void 0 : e.stopPropagation();
1222
+ removeTag(data, index);
1223
+ clearInput();
1224
+ handleChange('remove', data);
1225
+ tagInputRef.value.style.width = "".concat(INPUT_MIN_WIDTH, "px");
1226
+ };
1227
+ /**
1228
+ * emit trigger
1229
+ * @param type emit type
1230
+ */
1231
+ var handleChange = function handleChange(type, data) {
1232
+ // this.dispatch('bk-form-item', 'form-change')
1233
+ emit(type, data);
1234
+ emit('update:modelValue', tagList.value);
1235
+ emit('change', tagList.value);
1236
+ };
1237
+ /**
1238
+ * clear all selected tags
1239
+ * @param e mouse event
1240
+ */
1241
+ var handleClear = function handleClear(e) {
1242
+ e.stopPropagation();
1243
+ var removeList = listState.selectedTagList;
1244
+ listState.selectedTagList = [];
1245
+ // 将删除的项加入加列表
1246
+ var existList = removeList.filter(function (item) {
1247
+ return saveKeyMap.value[item[props.saveKey]];
1248
+ });
1249
+ if ((props.allowCreate && existList.length !== 0 || !props.allowCreate) && !isSingleSelect.value) {
1250
+ var _listState$localList;
1251
+ (_listState$localList = listState.localList).push.apply(_listState$localList, _toConsumableArray(existList));
1252
+ }
1253
+ handleChange('removeAll');
1254
+ };
1255
+ var updateScrollTop = function updateScrollTop() {
1256
+ // 获取下拉列表容器的位置信息,用于判断上下键选中的元素是否在可视区域,若不在则需滚动至可视区域
1257
+ var panelInfo = {
1258
+ height: selectorListRef.value.clientHeight,
1259
+ yAxis: selectorListRef.value.getBoundingClientRect().y
1260
+ };
1261
+ (0,external_vue_.nextTick)(function () {
1262
+ var activeObj = selectorListRef.value.querySelector(".".concat(resolveClassName('selector-actived')));
1263
+ if (!activeObj) {
1264
+ return;
1265
+ }
1266
+ var activeInfo = {
1267
+ height: activeObj.clientHeight,
1268
+ yAxis: activeObj.getBoundingClientRect().y
1269
+ };
1270
+ // 选中元素顶部坐标大于容器顶部坐标时,则该元素有部分或者全部区域不在可视区域,执行滚动
1271
+ if (activeInfo.yAxis < panelInfo.yAxis) {
1272
+ selectorListRef.value.scrollTop = selectorListRef.value.scrollTop - (panelInfo.yAxis - activeInfo.yAxis);
1273
+ }
1274
+ var distanceToBottom = activeInfo.yAxis + activeInfo.height - panelInfo.yAxis;
1275
+ // 选中元素底部坐标大于容器顶部坐标,且超出容器的实际高度,则该元素有部分或者全部区域不在可视区域,执行滚动
1276
+ if (distanceToBottom > panelInfo.height) {
1277
+ selectorListRef.value.scrollTop = selectorListRef.value.scrollTop + distanceToBottom - panelInfo.height;
1278
+ }
1279
+ });
1280
+ };
1281
+ var backspaceHandler = function backspaceHandler(index, target) {
1282
+ // 先交换输入框与被删除节点位置,再进行删除
1283
+ var nodes = getSelectedTagNodes();
1284
+ swapElementPositions(tagInputItemRef.value, nodes[index - 1]);
1285
+ listState.selectedTagList.splice(index - 1, 1);
1286
+ focusInputTrigger();
1287
+ var isExistInit = saveKeyMap.value[target[props.saveKey]];
1288
+ // 将删除的项加入加列表
1289
+ if ((props.allowCreate && isExistInit || !props.allowCreate) && !isSingleSelect.value) {
1290
+ listState.localList.push(target);
1291
+ }
1292
+ tagInputRef.value = "".concat(INPUT_MIN_WIDTH, "px");
1293
+ handleChange('remove');
1294
+ };
1295
+ var handleKeydown = function handleKeydown(e) {
1296
+ if (pageState.isPageLoading) {
1297
+ return;
1298
+ }
1299
+ var target;
1300
+ var val = e.target.value;
1301
+ var valLen = getCharLength(val);
1302
+ var tagInputItemIndex = getTagInputItemSite();
1303
+ var nodes = getSelectedTagNodes();
1304
+ switch (e.code) {
1305
+ case 'ArrowUp':
1306
+ e.preventDefault();
1307
+ if (!popoverProps.isShow) {
1308
+ return;
1309
+ }
1310
+ state.focusItemIndex = state.focusItemIndex - 1;
1311
+ state.focusItemIndex = state.focusItemIndex < 0 ? -1 : state.focusItemIndex;
1312
+ if (state.focusItemIndex === -1) {
1313
+ state.focusItemIndex = pageState.curPageList.length - 1;
1314
+ }
1315
+ updateScrollTop();
1316
+ break;
1317
+ case 'ArrowDown':
1318
+ e.preventDefault();
1319
+ if (!popoverProps.isShow) {
1320
+ return;
1321
+ }
1322
+ state.focusItemIndex = state.focusItemIndex + 1;
1323
+ state.focusItemIndex = state.focusItemIndex > pageState.curPageList.length - 1 ? pageState.curPageList.length : state.focusItemIndex;
1324
+ if (state.focusItemIndex === pageState.curPageList.length) {
1325
+ state.focusItemIndex = 0;
1326
+ }
1327
+ updateScrollTop();
1328
+ break;
1329
+ case 'ArrowLeft':
1330
+ state.isEdit = true;
1331
+ if (!valLen) {
1332
+ // 输入框已经是第一个节点,无法左移
1333
+ if (tagInputItemIndex < 1) {
1334
+ return;
1335
+ }
1336
+ swapElementPositions(tagInputItemRef.value, nodes[tagInputItemIndex - 1]);
1337
+ focusInputTrigger();
1338
+ }
1339
+ break;
1340
+ case 'ArrowRight':
1341
+ state.isEdit = true;
1342
+ if (!valLen) {
1343
+ // 输入框已经是最后一个节点,无法右移
1344
+ if (tagInputItemIndex === nodes.length - 1) {
1345
+ return;
1346
+ }
1347
+ swapElementPositions(nodes[tagInputItemIndex + 1], tagInputItemRef.value);
1348
+ focusInputTrigger();
1349
+ }
1350
+ break;
1351
+ case 'Enter':
1352
+ case 'NumpadEnter':
1353
+ if (!props.allowCreate && popoverProps.isShow || props.allowCreate && state.focusItemIndex >= 0 && popoverProps.isShow) {
1354
+ handleTagSelected(pageState.curPageList[state.focusItemIndex], 'select', e);
1355
+ } else if (props.allowCreate && curInputValue.value.trim()) {
1356
+ handleTagSelected(curInputValue.value, 'custom', e);
1357
+ }
1358
+ // 如果是enter, 防止触发form submit
1359
+ e.preventDefault();
1360
+ break;
1361
+ case 'Backspace':
1362
+ if (tagInputItemIndex !== 0 && !curInputValue.value) {
1363
+ target = listState.selectedTagList[tagInputItemIndex - 1];
1364
+ backspaceHandler(tagInputItemIndex, target);
1365
+ }
1366
+ break;
1367
+ default:
1368
+ break;
1369
+ }
1370
+ };
1371
+ var defaultPasteFn = function defaultPasteFn(value) {
1372
+ var target = [];
1373
+ var textArr = value.split(';');
1374
+ var regx = /^[a-zA-Z][a-zA-Z_]*/g;
1375
+ textArr.forEach(function (item) {
1376
+ var matchValue = item.match(regx);
1377
+ if (matchValue) {
1378
+ var _target$push;
1379
+ var finalItem = matchValue.join('');
1380
+ target.push((_target$push = {}, _defineProperty(_target$push, props.saveKey, finalItem), _defineProperty(_target$push, props.displayKey, finalItem), _target$push));
1381
+ }
1382
+ });
1383
+ return target;
1384
+ };
1385
+ var handlePaste = function handlePaste(e) {
1386
+ e.preventDefault();
1387
+ // 单选禁止复制粘贴,防止粘贴多个tag
1388
+ if (isSingleSelect.value) {
1389
+ return false;
1390
+ }
1391
+ var maxData = props.maxData,
1392
+ saveKey = props.saveKey,
1393
+ displayKey = props.displayKey,
1394
+ pasteFn = props.pasteFn,
1395
+ allowCreate = props.allowCreate;
1396
+ var value = e.clipboardData.getData('text');
1397
+ var valArr = pasteFn ? pasteFn(value) : defaultPasteFn(value);
1398
+ var tags = valArr.map(function (value) {
1399
+ return value[saveKey];
1400
+ });
1401
+ if (tags.length) {
1402
+ var nodes = getSelectedTagNodes();
1403
+ var index = getTagInputItemSite();
1404
+ var localInitData = listState.localList.map(function (data) {
1405
+ return data[saveKey];
1406
+ });
1407
+ tags = tags.filter(function (tag) {
1408
+ var canSelected = (tag === null || tag === void 0 ? void 0 : tag.trim()) && !tagList.value.includes(tag);
1409
+ return allowCreate ? canSelected : canSelected && localInitData.includes(tag);
1410
+ });
1411
+ // 最大显示限制处理
1412
+ if (maxData !== -1) {
1413
+ var selectedLength = listState.selectedTagList.length;
1414
+ if (selectedLength < maxData) {
1415
+ var differ = maxData - selectedLength;
1416
+ if (tags.length > differ) {
1417
+ tags = _toConsumableArray(tags.slice(0, differ));
1418
+ }
1419
+ } else {
1420
+ tags = [];
1421
+ }
1422
+ }
1423
+ var localTags = allowCreate ? tags.map(function (tag) {
1424
+ var _ref6;
1425
+ var localTag = listState.localList.find(function (localTag) {
1426
+ return localTag[saveKey] === tag;
1427
+ });
1428
+ return localTag !== null && localTag !== void 0 ? localTag : (_ref6 = {}, _defineProperty(_ref6, saveKey, tag), _defineProperty(_ref6, displayKey, tag), _ref6);
1429
+ }) : listState.localList.filter(function (tag) {
1430
+ return tags.includes(tag[saveKey]);
1431
+ });
1432
+ if (tags.length) {
1433
+ var _listState$selectedTa;
1434
+ (_listState$selectedTa = listState.selectedTagList).splice.apply(_listState$selectedTa, [index, 0].concat(_toConsumableArray(localTags)));
1435
+ swapElementPositions(tagInputItemRef.value, nodes[index]);
1436
+ tagInputRef.value.style.width = "".concat(INPUT_MIN_WIDTH, "px");
1437
+ listState.localList = listState.localList.filter(function (val) {
1438
+ return !tags.includes(val[saveKey]);
1439
+ });
1440
+ handleChange('select');
1441
+ focusInputTrigger();
1442
+ }
1443
+ }
1444
+ };
1445
+ /**
1446
+ * 已选中标签点击
1447
+ * @param e mouse event
1448
+ */
1449
+ var tagFocus = function tagFocus(e) {
1450
+ if (props.disabled) {
1451
+ return;
1452
+ }
1453
+ swapElementPositions(tagInputItemRef.value, e.currentTarget, true);
1454
+ tagInputRef.value.style.width = "".concat(INPUT_MIN_WIDTH, "px");
1455
+ popoverProps.isShow && changePopoverOffset();
1456
+ };
1457
+ /**
1458
+ * add tag
1459
+ * @param item current tag data
1460
+ * @param type operation type
1461
+ */
1462
+ var addTag = function addTag(item, type) {
1463
+ // 不允许超过最大可选数量
1464
+ if (listState.selectedTagList.length >= props.maxData && props.maxData !== -1) return;
1465
+ var separator = props.separator,
1466
+ saveKey = props.saveKey,
1467
+ displayKey = props.displayKey,
1468
+ createTagValidator = props.createTagValidator;
1469
+ var targetIndex = getTagInputItemSite();
1470
+ var moveCount = 1;
1471
+ var isSelected = false;
1472
+ var newValue;
1473
+ var validateTag = function validateTag(value) {
1474
+ if (typeof createTagValidator === 'function') {
1475
+ return createTagValidator(value);
1476
+ }
1477
+ return true;
1478
+ };
1479
+ // 自定义
1480
+ if (type === 'custom') {
1481
+ // 自定义时,如果配置分隔符可以一次性输入多个值
1482
+ if (separator) {
1483
+ var tags = item.split(separator);
1484
+ tags = tags.filter(function (tag) {
1485
+ return (tag === null || tag === void 0 ? void 0 : tag.trim()) && !tagList.value.includes(tag) && validateTag(tag);
1486
+ });
1487
+ var localTags = tags.map(function (tag) {
1488
+ var _ref7;
1489
+ return saveKeyMap.value[tag] || (_ref7 = {}, _defineProperty(_ref7, saveKey, tag), _defineProperty(_ref7, displayKey, tag), _ref7);
1490
+ });
1491
+ if (tags.length) {
1492
+ var _listState$selectedTa2;
1493
+ (_listState$selectedTa2 = listState.selectedTagList).splice.apply(_listState$selectedTa2, [targetIndex, 0].concat(_toConsumableArray(localTags)));
1494
+ moveCount = localTags.length;
1495
+ isSelected = true;
1496
+ }
1497
+ } else {
1498
+ var isObject = _typeof(item) === 'object';
1499
+ newValue = isObject ? item[saveKey] : item.trim();
1500
+ newValue = newValue.replace(/\s+/g, '');
1501
+ if (newValue !== undefined && !tagList.value.includes(newValue) && validateTag(newValue)) {
1502
+ var _ref8;
1503
+ var localItem = saveKeyMap.value[newValue] || (isObject ? item : (_ref8 = {}, _defineProperty(_ref8, saveKey, newValue), _defineProperty(_ref8, displayKey, newValue), _ref8));
1504
+ listState.selectedTagList.splice(targetIndex, 0, localItem);
1505
+ isSelected = true;
1506
+ }
1507
+ }
1508
+ } else if (item) {
1509
+ newValue = item[saveKey];
1510
+ if (newValue !== undefined && !tagList.value.includes(newValue)) {
1511
+ listState.selectedTagList.splice(targetIndex, 0, item);
1512
+ isSelected = true;
1513
+ }
1514
+ }
1515
+ if (isSelected) {
1516
+ (0,external_vue_.nextTick)(function () {
1517
+ for (var count = 1; count <= moveCount; count++) {
1518
+ var nodes = getSelectedTagNodes();
1519
+ var site = nodes[targetIndex + count];
1520
+ swapElementPositions(site, tagInputItemRef.value);
1521
+ }
1522
+ tagInputRef.value.style.width = "".concat(INPUT_MIN_WIDTH, "px");
1523
+ // 非单选
1524
+ if (!isSingleSelect.value) {
1525
+ // focus继续让用户进行下一个输入
1526
+ props.allowNextFocus && focusInputTrigger();
1527
+ // 将已经选中的项从数据列表中去除
1528
+ var selectedMap = tagList.value.reduce(function (acc, tag) {
1529
+ acc[tag] = 1;
1530
+ return acc;
1531
+ }, {});
1532
+ listState.localList = listState.localList.filter(function (val) {
1533
+ return !selectedMap[val[saveKey]];
1534
+ });
1535
+ }
1536
+ });
1537
+ }
1538
+ };
1539
+ /**
1540
+ * remove current tag
1541
+ * @param data tag data
1542
+ * @param index tag index
1543
+ */
1544
+ var removeTag = function removeTag(data, index) {
1545
+ listState.selectedTagList.splice(index, 1);
1546
+ var isExistInit = saveKeyMap.value[data[props.saveKey]];
1547
+ // 将删除的项加入加列表
1548
+ if ((props.allowCreate && isExistInit || !props.allowCreate) && !isSingleSelect.value) {
1549
+ listState.localList.push(data);
1550
+ }
1551
+ };
1552
+ // 折叠 tags index
1553
+ var localCollapseTags = (0,external_vue_.computed)(function () {
1554
+ return props.collapseTags ? props.collapseTags && !state.isEdit : props.collapseTags;
1555
+ });
1556
+ var _useTagsOverflow = useTagsOverflow(bkTagSelectorRef, localCollapseTags, tagList),
1557
+ overflowTagIndex = _useTagsOverflow.overflowTagIndex;
1558
+ return Object.assign(Object.assign(Object.assign(Object.assign({
1559
+ popoverProps: popoverProps
1560
+ }, (0,external_vue_.toRefs)(state)), (0,external_vue_.toRefs)(listState)), (0,external_vue_.toRefs)(pageState)), {
1561
+ isShowPlaceholder: isShowPlaceholder,
1562
+ isShowClear: isShowClear,
1563
+ placeholderText: placeholderText,
1564
+ curInputValue: curInputValue,
1565
+ renderList: renderList,
1566
+ showTagClose: showTagClose,
1567
+ tagInputRef: tagInputRef,
1568
+ bkTagSelectorRef: bkTagSelectorRef,
1569
+ tagListRef: tagListRef,
1570
+ tagInputItemRef: tagInputItemRef,
1571
+ selectorListRef: selectorListRef,
1572
+ triggerClass: triggerClass,
1573
+ overflowTagIndex: overflowTagIndex,
1574
+ localCollapseTags: localCollapseTags,
1575
+ focusInputTrigger: focusInputTrigger,
1576
+ activeClass: activeClass,
1577
+ handleInput: handleInput,
1578
+ handleFocus: handleFocus,
1579
+ handleBlur: handleBlur,
1580
+ handleTagSelected: handleTagSelected,
1581
+ handleTagRemove: handleTagRemove,
1582
+ handleClear: handleClear,
1583
+ tagFocus: tagFocus,
1584
+ handleKeydown: handleKeydown,
1585
+ handlePaste: handlePaste,
1586
+ resolveClassName: resolveClassName
1587
+ });
1588
+ },
1589
+ render: function render() {
1590
+ var _this = this;
1591
+ return (0,external_vue_.createVNode)("div", {
1592
+ "class": "".concat(this.resolveClassName('tag-input')),
1593
+ "ref": "bkTagSelectorRef",
1594
+ "onClick": this.focusInputTrigger,
1595
+ "onMouseenter": function onMouseenter() {
1596
+ return _this.isHover = true;
1597
+ },
1598
+ "onMouseleave": function onMouseleave() {
1599
+ return _this.isHover = false;
1600
+ }
1601
+ }, [(0,external_vue_.createVNode)((external_popover_default()), (0,external_vue_.mergeProps)({
1602
+ "theme": "light ".concat(this.resolveClassName('tag-input-popover-content')),
1603
+ "trigger": "manual",
1604
+ "placement": "bottom-start",
1605
+ "arrow": false
1606
+ }, this.popoverProps), {
1607
+ "default": function _default() {
1608
+ var _a, _b, _c;
1609
+ return (0,external_vue_.createVNode)("div", {
1610
+ "class": _this.triggerClass
1611
+ }, [(0,external_vue_.createVNode)("ul", {
1612
+ "class": "tag-list",
1613
+ "ref": "tagListRef",
1614
+ "style": {
1615
+ marginLeft: "".concat(_this.leftSpace, "px")
1616
+ }
1617
+ }, [_this.selectedTagList.map(function (item, index) {
1618
+ var tooltips = {
1619
+ boundary: 'window',
1620
+ theme: 'light',
1621
+ distance: 12,
1622
+ content: item[_this.tooltipKey],
1623
+ disabled: !_this.tooltipKey
1624
+ };
1625
+ var isOverflow = _this.localCollapseTags && _this.overflowTagIndex && index >= _this.overflowTagIndex;
1626
+ return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("li", {
1627
+ "class": "tag-item",
1628
+ "style": {
1629
+ display: isOverflow ? 'none' : ''
1630
+ },
1631
+ "onClick": _this.tagFocus
1632
+ }, [(0,external_vue_.createVNode)(tag_render, {
1633
+ "node": item,
1634
+ "tpl": _this.tagTpl,
1635
+ "displayKey": _this.displayKey,
1636
+ "hasTips": !!_this.tooltipKey,
1637
+ "tagOverflowTips": _this.tagOverflowTips
1638
+ }, null), _this.showTagClose ? (0,external_vue_.createVNode)(external_icon_.Error, {
1639
+ "class": "remove-tag",
1640
+ "onClick": _this.handleTagRemove.bind(_this, item, index)
1641
+ }, null) : null]), [[(0,external_vue_.resolveDirective)("bk-tooltips"), tooltips]]);
1642
+ }), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("li", {
1643
+ "ref": "tagInputItemRef",
1644
+ "id": "tagInputItem",
1645
+ "class": "tag-input-item",
1646
+ "role": "input"
1647
+ }, [(0,external_vue_.withDirectives)((0,external_vue_.createVNode)("input", {
1648
+ "type": "text",
1649
+ "class": "tag-input",
1650
+ "ref": "tagInputRef",
1651
+ "onUpdate:modelValue": function onUpdateModelValue($event) {
1652
+ return _this.curInputValue = $event;
1653
+ },
1654
+ "onInput": _this.handleInput,
1655
+ "onFocus": _this.handleFocus,
1656
+ "onBlur": _this.handleBlur,
1657
+ "onKeydown": _this.handleKeydown,
1658
+ "onPaste": _this.handlePaste
1659
+ }, null), [[external_vue_.vModelText, _this.curInputValue]])]), [[external_vue_.vShow, _this.isEdit]]), !!_this.overflowTagIndex && _this.localCollapseTags && (0,external_vue_.createVNode)("li", {
1660
+ "class": "tag-item"
1661
+ }, [(0,external_vue_.createVNode)("div", {
1662
+ "class": "tag"
1663
+ }, [(0,external_vue_.createVNode)("span", {
1664
+ "class": "text"
1665
+ }, [(0,external_vue_.createTextVNode)("+"), _this.selectedTagList.length - _this.overflowTagIndex])])])]), (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("p", {
1666
+ "class": "placeholder"
1667
+ }, [_this.placeholderText]), [[external_vue_.vShow, _this.isShowPlaceholder]]), (_c = (_b = (_a = _this.$slots) === null || _a === void 0 ? void 0 : _a.suffix) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : _this.isShowClear && (0,external_vue_.createVNode)(external_icon_.Close, {
1668
+ "class": "clear-icon",
1669
+ "onClick": _this.handleClear
1670
+ }, null)]);
1671
+ },
1672
+ content: function content() {
1673
+ return (0,external_vue_.createVNode)("div", {
1674
+ "class": "".concat(_this.resolveClassName('selector-list'))
1675
+ }, [(0,external_vue_.createVNode)("ul", {
1676
+ "ref": "selectorListRef",
1677
+ "style": {
1678
+ 'max-height': "".concat(_this.contentMaxHeight, "px")
1679
+ },
1680
+ "class": "outside-ul"
1681
+ }, [_this.renderList.map(function (group, index) {
1682
+ return _this.useGroup ? (0,external_vue_.createVNode)("li", {
1683
+ "class": "".concat(_this.resolveClassName('selector-group-item'))
1684
+ }, [(0,external_vue_.createVNode)("span", {
1685
+ "class": "group-name"
1686
+ }, [group.name, (0,external_vue_.createTextVNode)(" ("), group.children.length, (0,external_vue_.createTextVNode)(")")]), (0,external_vue_.createVNode)("ul", {
1687
+ "class": "".concat(_this.resolveClassName('selector-group-list-item'))
1688
+ }, [group.children.map(function (item, index) {
1689
+ return (0,external_vue_.createVNode)("li", {
1690
+ "class": ["".concat(_this.resolveClassName('selector-list-item')), {
1691
+ disabled: item.disabled
1692
+ }, _this.activeClass(item, index)],
1693
+ "onClick": _this.handleTagSelected.bind(_this, item, 'select')
1694
+ }, [(0,external_vue_.createVNode)(list_tag_render, {
1695
+ "node": item,
1696
+ "displayKey": _this.displayKey,
1697
+ "tpl": _this.tpl,
1698
+ "searchKey": _this.searchKey,
1699
+ "searchKeyword": _this.curInputValue
1700
+ }, null)]);
1701
+ })])]) : (0,external_vue_.createVNode)("li", {
1702
+ "class": ["".concat(_this.resolveClassName('selector-list-item')), {
1703
+ disabled: group.disabled
1704
+ }, _this.activeClass(group, index)],
1705
+ "onClick": _this.handleTagSelected.bind(_this, group, 'select')
1706
+ }, [(0,external_vue_.createVNode)(list_tag_render, {
1707
+ "node": group,
1708
+ "displayKey": _this.displayKey,
1709
+ "tpl": _this.tpl,
1710
+ "searchKey": _this.searchKey,
1711
+ "searchKeyword": _this.curInputValue
1712
+ }, null)]);
1713
+ }), _this.isPageLoading ? (0,external_vue_.createVNode)("li", {
1714
+ "class": "".concat(_this.resolveClassName('selector-list-item'), " loading")
1715
+ }, [(0,external_vue_.createVNode)((external_loading_default()), {
1716
+ "theme": "primary",
1717
+ "size": external_loading_.BkLoadingSize.Small
1718
+ }, null)]) : null])]);
1719
+ }
1720
+ })]);
1721
+ }
1722
+ }));
1723
+ ;// CONCATENATED MODULE: ../../packages/tag-input/src/index.ts
1724
+ /*
1725
+ * Tencent is pleased to support the open source community by making
1726
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1727
+ *
1728
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1729
+ *
1730
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1731
+ *
1732
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1733
+ *
1734
+ * ---------------------------------------------------
1735
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1736
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1737
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1738
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1739
+ *
1740
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1741
+ * the Software.
1742
+ *
1743
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1744
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1745
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1746
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1747
+ * IN THE SOFTWARE.
1748
+ */
1749
+
1750
+
1751
+ var TagInput = (0,external_shared_.withInstall)(tag_input);
1752
+ /* harmony default export */ const src = (TagInput);
1753
+ })();
1754
+
1755
+ /******/ return __webpack_exports__;
1756
+ /******/ })()
1757
+ ;
1758
+ });