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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/index.cjs.js +25 -25
  2. package/dist/index.esm.js +30 -14
  3. package/dist/index.umd.js +44 -44
  4. package/lib/affix/index.js +391 -1
  5. package/lib/alert/index.js +287 -1
  6. package/lib/animate-number/index.js +219 -1
  7. package/lib/backtop/index.js +264 -1
  8. package/lib/badge/index.js +304 -1
  9. package/lib/breadcrumb/index.js +379 -1
  10. package/lib/button/index.js +403 -1
  11. package/lib/card/index.js +369 -1
  12. package/lib/cascader/index.js +2095 -2
  13. package/lib/checkbox/index.js +602 -1
  14. package/lib/code-diff/index.js +5548 -1
  15. package/lib/collapse/index.js +605 -1
  16. package/lib/collapse-transition/index.js +237 -1
  17. package/lib/color-picker/index.js +2735 -1
  18. package/lib/components.js +770 -1
  19. package/lib/config-provider/index.js +377 -1
  20. package/lib/container/index.js +408 -1
  21. package/lib/date-picker/index.js +5576 -1
  22. package/lib/dialog/index.js +1324 -2
  23. package/lib/directives/index.js +1386 -2
  24. package/lib/dist.index.js +179 -1
  25. package/lib/divider/index.js +237 -1
  26. package/lib/dropdown/index.js +455 -1
  27. package/lib/exception/index.js +435 -1
  28. package/lib/fixed-navbar/index.js +222 -1
  29. package/lib/form/index.js +1004 -1
  30. package/lib/hooks.js +133 -1
  31. package/lib/icon/angle-double-down-line.js +541 -1
  32. package/lib/icon/angle-double-left-line.js +541 -1
  33. package/lib/icon/angle-double-left.js +541 -1
  34. package/lib/icon/angle-double-right-line.js +541 -1
  35. package/lib/icon/angle-double-right.js +541 -1
  36. package/lib/icon/angle-double-up-line.js +541 -1
  37. package/lib/icon/angle-down-fill.js +541 -1
  38. package/lib/icon/angle-down-line.js +541 -1
  39. package/lib/icon/angle-down.js +541 -1
  40. package/lib/icon/angle-left.js +541 -1
  41. package/lib/icon/angle-right.js +541 -1
  42. package/lib/icon/angle-up-fill.js +541 -1
  43. package/lib/icon/angle-up.js +541 -1
  44. package/lib/icon/archive-fill.js +541 -1
  45. package/lib/icon/arrows-left.js +541 -1
  46. package/lib/icon/arrows-right.js +541 -1
  47. package/lib/icon/assistant.js +541 -1
  48. package/lib/icon/audio-fill.js +541 -1
  49. package/lib/icon/bk.js +541 -1
  50. package/lib/icon/circle.js +541 -1
  51. package/lib/icon/close-line.js +541 -1
  52. package/lib/icon/close.js +541 -1
  53. package/lib/icon/code.js +541 -1
  54. package/lib/icon/cog-shape.js +541 -1
  55. package/lib/icon/collapse-left.js +541 -1
  56. package/lib/icon/copy-shape.js +541 -1
  57. package/lib/icon/copy.js +541 -1
  58. package/lib/icon/data-shape.js +541 -1
  59. package/lib/icon/del.js +541 -1
  60. package/lib/icon/doc-fill.js +541 -1
  61. package/lib/icon/done.js +541 -1
  62. package/lib/icon/down-shape.js +541 -1
  63. package/lib/icon/down-small.js +541 -1
  64. package/lib/icon/edit-line.js +541 -1
  65. package/lib/icon/ellipsis.js +541 -1
  66. package/lib/icon/enlarge-line.js +541 -1
  67. package/lib/icon/error.js +541 -1
  68. package/lib/icon/excel-fill.js +541 -1
  69. package/lib/icon/exclamation-circle-shape.js +541 -1
  70. package/lib/icon/eye.js +541 -1
  71. package/lib/icon/filliscreen-line.js +541 -1
  72. package/lib/icon/fix-line.js +541 -1
  73. package/lib/icon/fix-shape.js +541 -1
  74. package/lib/icon/folder-open.js +541 -1
  75. package/lib/icon/folder-shape-open.js +541 -1
  76. package/lib/icon/folder-shape.js +541 -1
  77. package/lib/icon/folder.js +541 -1
  78. package/lib/icon/funnel.js +541 -1
  79. package/lib/icon/help-document-fill.js +541 -1
  80. package/lib/icon/help-fill.js +541 -1
  81. package/lib/icon/help.js +541 -1
  82. package/lib/icon/image-fill.js +563 -1
  83. package/lib/icon/img-error.js +563 -1
  84. package/lib/icon/img-placehoulder.js +563 -1
  85. package/lib/icon/index.js +2353 -1
  86. package/lib/icon/info-line.js +563 -1
  87. package/lib/icon/info.js +563 -1
  88. package/lib/icon/left-shape.js +563 -1
  89. package/lib/icon/left-turn-line.js +563 -1
  90. package/lib/icon/narrow-line.js +563 -1
  91. package/lib/icon/original.js +563 -1
  92. package/lib/icon/pdf-fill.js +563 -1
  93. package/lib/icon/play-shape.js +563 -1
  94. package/lib/icon/plus.js +563 -1
  95. package/lib/icon/ppt-fill.js +563 -1
  96. package/lib/icon/qq.js +563 -1
  97. package/lib/icon/right-shape.js +563 -1
  98. package/lib/icon/right-turn-line.js +563 -1
  99. package/lib/icon/search.js +563 -1
  100. package/lib/icon/share.js +563 -1
  101. package/lib/icon/spinner.js +563 -1
  102. package/lib/icon/success.js +563 -1
  103. package/lib/icon/switcher-loading.js +563 -1
  104. package/lib/icon/text-file.js +563 -1
  105. package/lib/icon/text-fill.js +563 -1
  106. package/lib/icon/transfer.js +563 -1
  107. package/lib/icon/tree-application-shape.js +563 -1
  108. package/lib/icon/unfull-screen.js +563 -1
  109. package/lib/icon/unvisible.js +563 -1
  110. package/lib/icon/up-shape.js +563 -1
  111. package/lib/icon/upload.js +563 -1
  112. package/lib/icon/video-fill.js +563 -1
  113. package/lib/icon/warn.js +563 -1
  114. package/lib/icon/weixin-pro.js +563 -1
  115. package/lib/icon/weixin.js +563 -1
  116. package/lib/image/index.js +681 -1
  117. package/lib/index.js +195 -1
  118. package/lib/info-box/index.js +1514 -2
  119. package/lib/input/index.js +1038 -1
  120. package/lib/link/index.js +232 -1
  121. package/lib/loading/index.js +443 -1
  122. package/lib/locale/index.js +489 -1
  123. package/lib/menu/index.js +793 -1
  124. package/lib/message/index.js +1842 -2
  125. package/lib/message/messageConstructor.d.ts +1 -1
  126. package/lib/modal/index.js +407 -1
  127. package/lib/navigation/index.js +439 -1
  128. package/lib/notify/index.js +470 -1
  129. package/lib/overflow-title/index.js +547 -1
  130. package/lib/pagination/index.js +974 -1
  131. package/lib/plugin-popover/index.js +4121 -1
  132. package/lib/plugins/index.js +130 -1
  133. package/lib/pop-confirm/index.js +367 -1
  134. package/lib/popover/content.d.ts +8 -0
  135. package/lib/popover/index.d.ts +12 -0
  136. package/lib/popover/index.js +4127 -1
  137. package/lib/popover/popover.d.ts +7 -0
  138. package/lib/popover/props.d.ts +3 -0
  139. package/lib/popover2/index.js +171 -1
  140. package/lib/preset.js +164 -1
  141. package/lib/process/index.js +1146 -2
  142. package/lib/progress/index.js +495 -1
  143. package/lib/radio/index.js +693 -1
  144. package/lib/rate/index.js +406 -1
  145. package/lib/resize-layout/index.js +499 -1
  146. package/lib/search-select/index.js +3024 -2
  147. package/lib/select/index.d.ts +25 -3
  148. package/lib/select/index.js +2599 -2
  149. package/lib/select/select.d.ts +11 -1
  150. package/lib/shared/index.js +2832 -1
  151. package/lib/sideslider/index.js +1056 -2
  152. package/lib/slider/index.js +1683 -2
  153. package/lib/steps/index.js +1215 -2
  154. package/lib/swiper/index.js +404 -1
  155. package/lib/switcher/index.js +335 -1
  156. package/lib/tab/index.js +935 -1
  157. package/lib/table/index.js +6588 -1
  158. package/lib/table-column/index.js +768 -1
  159. package/lib/tag/index.js +309 -1
  160. package/lib/tag-input/index.d.ts +9 -0
  161. package/lib/tag-input/index.js +1758 -1
  162. package/lib/tag-input/tag-input.d.ts +20 -0
  163. package/lib/tag-input/tag-props.d.ts +3 -0
  164. package/lib/time-picker/index.js +142 -1
  165. package/lib/timeline/index.js +310 -1
  166. package/lib/transfer/index.js +767 -1
  167. package/lib/tree/index.js +2664 -1
  168. package/lib/upload/index.js +3257 -2
  169. package/lib/virtual-render/index.js +806 -1
  170. package/package.json +1 -1
  171. package/lib/cascader/index.js.LICENSE.txt +0 -1
  172. package/lib/dialog/index.js.LICENSE.txt +0 -1
  173. package/lib/directives/index.js.LICENSE.txt +0 -14
  174. package/lib/info-box/index.js.LICENSE.txt +0 -1
  175. package/lib/message/index.js.LICENSE.txt +0 -6
  176. package/lib/process/index.js.LICENSE.txt +0 -1
  177. package/lib/search-select/index.js.LICENSE.txt +0 -1
  178. package/lib/select/index.js.LICENSE.txt +0 -1
  179. package/lib/sideslider/index.js.LICENSE.txt +0 -1
  180. package/lib/slider/index.js.LICENSE.txt +0 -1
  181. package/lib/steps/index.js.LICENSE.txt +0 -1
  182. package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1,2 +1,3024 @@
1
- /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("../shared"),require("vue"),require("../config-provider"),require("../directives"),require("../icon"),require("../popover"));else if("function"==typeof define&&define.amd)define(["../shared","vue","../config-provider","../directives","../icon","../popover"],t);else{var n="object"==typeof exports?t(require("../shared"),require("vue"),require("../config-provider"),require("../directives"),require("../icon"),require("../popover")):t(e["../shared"],e.vue,e["../config-provider"],e["../directives"],e["../icon"],e["../popover"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,((e,t,n,r,i,o)=>(()=>{var a={2717:e=>{"use strict";e.exports=n},4061:e=>{"use strict";e.exports=r},6870:e=>{"use strict";e.exports=i},5537:e=>{"use strict";e.exports=o},4212:t=>{"use strict";t.exports=e},748:e=>{"use strict";e.exports=t},7609:(e,t,n)=>{var r=n(7425).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",s=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function v(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),l=new I(r||[]);return a(o,"_invoke",{value:E(e,n,l)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=v;var h={};function p(){}function m(){}function y(){}var g={};d(g,u,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(N([])));b&&b!==n&&o.call(b,u)&&(g=b);var w=y.prototype=p.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,a,l,u){var s=f(e[i],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,u)}),(function(e){n("throw",e,l,u)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return n("throw",e,l,u)}))}u(s.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var l=S(a,n);if(l){if(l===h)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function N(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:V}}function V(){return{value:void 0,done:!0}}return m.prototype=y,a(w,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:m,configurable:!0}),m.displayName=d(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,d(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(k.prototype),d(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(v(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(w),d(w,c,"Generator"),d(w,u,(function(){return this})),d(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:N(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},7425:e=>{function t(n){return e.exports=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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2841:(e,t,n)=>{var r=n(7609)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},l={};function u(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return a[e](n,n.exports,u),n.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return(()=>{"use strict";u.r(s),u.d(s,{BkSearchSelect:()=>A,default:()=>M});var e=u(4212);function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var n=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,"string");if("object"!==t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===t(n)?n:String(n)}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=u(748),o=null,a=null;function l(e,t){void 0===t&&(t={});var n=document.createElement(e);return Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function c(e,t,n){return(window.getComputedStyle(e,n||null)||{display:"none"})[t]}function d(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if("none"===c(t,"display"))return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var v=0,f=null;function h(e,t){if(e.__resize_mutation_handler__||(e.__resize_mutation_handler__=p.bind(e)),!e.__resize_listeners__)if(e.__resize_listeners__=[],window.ResizeObserver){var n=e.offsetWidth,r=e.offsetHeight,i=new ResizeObserver((function(){(e.__resize_observer_triggered__||(e.__resize_observer_triggered__=!0,e.offsetWidth!==n||e.offsetHeight!==r))&&y(e)})),o=d(e),a=o.detached,u=o.rendered;e.__resize_observer_triggered__=!1===a&&!1===u,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){y(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(v||(f=function(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}('.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}')),function(e){var t=c(e,"position");t&&"static"!==t||(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=l("div",{className:"resize-triggers"}),r=l("div",{className:"resize-expand-trigger"}),i=l("div"),o=l("div",{className:"resize-contract-trigger"});r.appendChild(i),n.appendChild(r),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:i,contract:o},g(e),e.addEventListener("scroll",m,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}(e),e.__resize_rendered__=d(e).rendered,window.MutationObserver){var s=new MutationObserver(e.__resize_mutation_handler__);s.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=s}e.__resize_listeners__.push(t),v++}function p(){var e=d(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(g(this),this.addEventListener("scroll",m,!0)),this.__resize_rendered__=t,y(this))}function m(){var e,t,n=this;g(this),this.__resize_raf__&&(e=this.__resize_raf__,a||(a=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window)),a(e)),this.__resize_raf__=(t=function(){var e,t,r,i,o,a,l=(r=(t=(e=n).__resize_last__).width,i=t.height,o=e.offsetWidth,a=e.offsetHeight,o!==r||a!==i?{width:o,height:a}:null);l&&(n.__resize_last__=l,y(n))},o||(o=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){return setTimeout(e,16)}).bind(window)),o(t))}function y(e){e&&e.__resize_listeners__&&e.__resize_listeners__.forEach((function(t){t.call(e,e)}))}function g(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,i=t.contract,o=i.scrollWidth,a=i.scrollHeight,l=n.offsetWidth,u=n.offsetHeight,s=n.scrollWidth,c=n.scrollHeight;i.scrollLeft=o,i.scrollTop=a,r.style.width=l+1+"px",r.style.height=u+1+"px",n.scrollLeft=s,n.scrollTop=c}var _=u(2717),b=u(4061),w=u(6870),x=u(2841),k=u.n(x);function E(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}u((r=r.apply(e,t||[])).next())}))}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var S=u(5537),L=u.n(S);const C=(0,i.defineComponent)({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:function(){return[]}},conditions:{type:Array},footerBtns:{type:Array,default:function(){return[]}}},emits:["selectItem","selectCondition","footerClick"],setup:function(e,t){var n=t.emit,r=(0,_.useLocale)("searchSelect"),o=(0,_.usePrefix)().resolveClassName,a=(0,i.computed)((function(){return void 0===e.footerBtns||0===e.footerBtns.length?[{id:"confirm",name:r.value.ok},{id:"cancel",name:r.value.cancel,disabled:!1}]:e.footerBtns}));return{handleClick:function(e){n("selectItem",e)},handleClickCondition:function(e){n("selectCondition",e)},handleClickFooterBtn:function(e){n("footerClick",e)},filterList:(0,i.computed)((function(){var t,n;return(null===(t=e.list)||void 0===t?void 0:t.length)?(null===(n=e.keyword)||void 0===n?void 0:n.length)?e.list.filter((function(t){return t.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())})):e.list:[]})),getSearchNode:function(t){var n;return(null===(n=t.value)||void 0===n?void 0:n.name)?[(0,i.createVNode)("span",{class:"menu-name"},[t.name,(0,i.createTextVNode)(":")]),t.value.name]:function(t){if(!t)return t;var n=e.keyword,r=n.length;if(!(null==n?void 0:n.trim().length)||!t.toLocaleLowerCase().includes(n.toLocaleLowerCase()))return t;var o=[],a=-1;return n=n.replace(/([.*/]{1})/gim,"\\$1"),t.replace(new RegExp("".concat(n),"igm"),(function(e,n){return 0===o.length&&0!==n?o.push(t.slice(0,n)):a>=0&&o.push(t.slice(a+e.length,n)),o.push((0,i.createVNode)("span",{class:"is-keyword"},[e])),a=n,e})),a>=0&&o.push(t.slice(a+r)),o.length?o:t}(t.name)},localFooterBtns:a,resolveClassName:o}},render:function(){var e,t,n,r=this;return(0,i.createVNode)("div",{class:this.resolveClassName("search-select-menu")},[!!(null===(e=this.conditions)||void 0===e?void 0:e.length)&&(0,i.createVNode)("ul",{class:"menu-header"},[this.conditions.map((function(e){return(0,i.createVNode)("li",{key:e.id,class:"menu-header-item ".concat(e.disabled?"is-disabled":""),onClick:function(){return!e.disabled&&r.handleClickCondition(e)}},[e.name])}))]),(0,i.createVNode)("ul",{class:"menu-content"},[null===(t=this.list)||void 0===t?void 0:t.map((function(e){return(0,i.createVNode)("li",{class:"menu-item ".concat(e.disabled?"is-disabled":""," ").concat(r.hoverId!==e.id||e.disabled?"":"is-hover"),key:e.id,id:e.id,tabindex:"-1",onClick:function(){return!e.disabled&&r.handleClick(e)}},[r.$slots.default?r.$slots.default({item:e,list:r.list,multiple:!!r.multiple,hoverId:r.hoverId,getSearchNode:r.getSearchNode}):(0,i.createVNode)(i.Fragment,null,[r.getSearchNode(e),r.multiple&&r.selected.includes(e.id)&&(0,i.createVNode)(w.Done,{class:"is-selected"},null)])])}))]),this.multiple&&(null===(n=this.localFooterBtns)||void 0===n?void 0:n.length)&&(0,i.createVNode)("div",{class:"menu-footer"},[this.localFooterBtns.map((function(e){return(0,i.createVNode)("span",{class:"menu-footer-btn ".concat(e.disabled?"is-disabled":""),key:e.id,onClick:function(){return!e.disabled&&r.handleClickFooterBtn(e)}},[e.name])}))])])}});function I(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}var N;!function(e){e.ALL="all",e.NEEDKEY="need-key"}(N||(N={}));var V,O=Symbol("SEARCH_SLECT_PROVIDER_KEY"),z=function(){return(0,i.inject)(O)};!function(e){e.DEFAULT="default",e.EDIT="edit"}(V||(V={}));var T=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"|";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.searchItem=t,this.type=n,this.splitCode=r,this.values=[],this.id=t.id,this.name=t.name}var t,n;return t=e,(n=[{key:"multiple",get:function(){return!!this.searchItem.multiple}},{key:"placeholder",get:function(){return this.searchItem.placeholder||""}},{key:"children",get:function(){return this.searchItem.children||[]}},{key:"validate",get:function(){return!this.searchItem.noValidate}},{key:"inputInnerHtml",get:function(){var e;return this.isSpecialType()?this.name:"".concat(this.keyInnerHtml).concat((null===(e=this.values)||void 0===e?void 0:e.map((function(e){return e.name})).join(this.splitCode))||"")}},{key:"inputInnerText",get:function(){var e;return this.isSpecialType()?this.name:"".concat(this.keyInnerText).concat((null===(e=this.values)||void 0===e?void 0:e.map((function(e){return e.name})).join(this.splitCode))||"")}},{key:"keyInnerHtml",get:function(){return this.isSpecialType()?this.name:this.name?"".concat(this.name,": "):""}},{key:"keyInnerText",get:function(){return this.isSpecialType()?this.name:this.name?"".concat(this.name,": "):""}},{key:"isSpecialType",value:function(){return["text","condition"].includes(this.type)}},{key:"addValue",value:function(e){if(this.multiple){var t=this.values.findIndex((function(t){return t.id===e.id}));return t>-1?void this.values.splice(t,1):void this.values.push(e)}this.values=[e]}},{key:"toValue",value:function(){var e,t={id:this.id,name:this.name};return(null===(e=this.values)||void 0===e?void 0:e.length)&&(t.values=this.values.map((function(e){return{id:e.id,name:e.name}}))),this.type&&"default"!==this.type&&(t.type=this.type),t}},{key:"toValueKey",value:function(){return JSON.stringify(this.toValue())}},{key:"isInValueList",value:function(e){return this.children.some((function(t){return t.id===(null==e?void 0:e.id)}))}}])&&I(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();const j=(0,i.defineComponent)({name:"SearchSelectInput",directives:{clickoutside:b.clickoutside},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:function(){return[]}},defautUsingItem:Object,mode:{type:String,default:V.DEFAULT},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete"],setup:function(t,n){var r=n.emit,o=n.expose,a=(0,_.useLocale)("searchSelect"),l=(0,_.usePrefix)().resolveClassName,u=(0,i.ref)(null),s=(0,i.ref)(null),c=(0,i.ref)(""),d=(0,i.ref)(!1),v=(0,i.ref)(!1),f=(0,i.ref)(!1),h=(0,i.ref)(t.defautUsingItem),p=(0,i.ref)(""),m=(0,i.ref)(!1),y=(0,e.debounce)(300,q),g=!1,b=(0,i.ref)([]),w=(0,i.ref)([]),x=z(),S=x.editKey,L=x.onValidate,C=x.valueSplitCode;function I(e){switch(e.code){case"ArrowDown":case"ArrowUp":O(e);break;case"Enter":case"NumpadEnter":!function(e){if(g){e.preventDefault();var t=w.value.find((function(e){return e.id===p.value}));t&&B(t)}}(e)}}function O(e){var t;e.preventDefault(),null===(t=u.value)||void 0===t||t.blur();for(var n=w.value.length,r=n,i=w.value.findIndex((function(e){return e.id===p.value}));r>=0;){i=(i="ArrowDown"===e.code?i+1:i-1)>n-1?0:i<0?n-1:i;var o=w.value[i];if(o&&!o.disabled){r=-1;var a=document.getElementById(o.id);return null==a||a.focus(),void(p.value=o.id)}r-=1}}function j(e){M(),e&&q()}function F(e){var n;return E(this,void 0,void 0,k().mark((function i(){var o,a,l,u,s;return k().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return null==e||e.preventDefault(),i.next=3,new Promise((function(e){return setTimeout(e,0)}));case 3:if(h.value){i.next=16;break}if(c.value&&t.valueBehavior!==N.NEEDKEY){i.next=6;break}return i.abrupt("return");case 6:return o={id:c.value,name:c.value},i.next=9,D(o);case 9:if(i.sent){i.next=12;break}return i.abrupt("return");case 12:return r("add",new T(o,"text",C.value)),c.value="",q(),i.abrupt("return");case 16:if(null==(a=h.value.values)?void 0:a.length){i.next=43;break}if(!(null===(n=c.value)||void 0===n?void 0:n.length)){i.next=41;break}if(!c.value.includes(C.value)){i.next=29;break}return l=c.value.split(C.value),i.next=23,D({id:c.value,name:c.value});case 23:if(i.sent){i.next=26;break}return i.abrupt("return");case 26:l.forEach((function(e){return h.value.addValue({id:e,name:e})})),i.next=36;break;case 29:return u={id:c.value,name:c.value},i.next=32,D(u);case 32:if(i.sent){i.next=35;break}return i.abrupt("return");case 35:h.value.addValue(u);case 36:return r("add",h.value),c.value="",h.value=null,M(!0),i.abrupt("return");case 41:return d.value=!0,i.abrupt("return");case 43:if(!c.value){i.next=56;break}return s={id:c.value,name:c.value},i.next=47,D(s);case 47:if(i.sent){i.next=50;break}return i.abrupt("return");case 50:return h.value.addValue(s),r("add",h.value),c.value="",h.value=null,M(!0),i.abrupt("return");case 56:return i.next=58,D();case 58:if(i.sent){i.next=61;break}return i.abrupt("return");case 61:K();case 62:case"end":return i.stop()}}),i)})))}function B(e,n){var r,i,o,a,l,s;return E(this,void 0,void 0,k().mark((function d(){var v,m;return k().wrap((function(d){for(;;)switch(d.prev=d.next){case 0:if(!(null===(r=e.value)||void 0===r?void 0:r.id)){d.next=21;break}if((t.valueBehavior!==N.NEEDKEY||!e.value)&&t.validateValues){d.next=8;break}return(v=new T(Object.assign(Object.assign({},e),{id:null!==(i=e.realId)&&void 0!==i?i:e.id}),n,C.value)).addValue(e.value),K(v),t.valueBehavior===N.NEEDKEY&&p.value&&M(!0),p.value="",d.abrupt("return");case 8:return h.value=new T(Object.assign(Object.assign({},e),{id:null!==(o=e.realId)&&void 0!==o?o:e.id}),n,C.value),h.value.addValue(e.value),d.next=12,D(e.value);case 12:if(d.sent){d.next=16;break}return h.value=null,d.abrupt("return");case 16:return K(h.value),p.value="",M(!0),d.abrupt("return");case 21:if(h.value&&(null===(a=null==u?void 0:u.value)||void 0===a?void 0:a.innerText)){d.next=29;break}return h.value=new T(e,n,C.value),c.value="",(m="condition"===n)&&K(),f.value=m||!!h.value.children.length,M(t.valueBehavior===N.NEEDKEY&&!!p.value),d.abrupt("return");case 29:if("condition"!==(null===(l=h.value)||void 0===l?void 0:l.type)){d.next=33;break}return h.value=new T(e,n,C.value),K(),d.abrupt("return");case 33:return h.value.addValue(e),d.next=36,D(e);case 36:if(d.sent){d.next=39;break}return d.abrupt("return");case 39:h.value.multiple||K(),t.valueBehavior===N.NEEDKEY&&(null===(s=h.value)||void 0===s?void 0:s.multiple)&&M();case 41:case"end":return d.stop()}}),d)})))}function D(e){return E(this,void 0,void 0,k().mark((function n(){var r,i,o,a;return k().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(h.value){n.next=4;break}return n.next=3,A(null,[e]);case 3:case 8:return n.abrupt("return",n.sent);case 4:if(r=h.value,i=r.searchItem,o=r.validate,a=r.values,!o||"function"!=typeof t.validateValues){n.next=9;break}return n.next=8,A(i,e?[e]:a);case 9:return L(""),n.abrupt("return",!0);case 11:case"end":return n.stop()}}),n)})))}function A(e,n){var r;return E(this,void 0,void 0,k().mark((function i(){var o;return k().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,null===(r=t.validateValues)||void 0===r?void 0:r.call(t,null!=e?e:null,n).catch((function(){return!1}));case 2:if("string"!=typeof(o=i.sent)&&!1!==o){i.next=6;break}return L(o||"校验错误"),i.abrupt("return",!1);case 6:return L(""),i.abrupt("return",!0);case 8:case"end":return i.stop()}}),i)})))}function M(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(0,i.nextTick)().then((function(){q()})),v.value=!0,f.value=!0,d.value=!1;var e=setTimeout((function(){if(u.value){u.value.focus();var t=window.getSelection();0===t.focusOffset&&(t.selectAllChildren(u.value),t.collapseToEnd())}window.clearTimeout(e)}),0);r("focus",v.value)}function q(){var n,r,i,o,a;return E(this,void 0,void 0,k().mark((function l(){var u,s;return k().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(u=[],"function"!=typeof t.getMenuList||void 0!==(null===(r=null===(n=h.value)||void 0===n?void 0:n.searchItem)||void 0===r?void 0:r.async)&&!0!==h.value.searchItem.async){l.next=9;break}return m.value=!0,l.next=5,t.getMenuList(null===(i=h.value)||void 0===i?void 0:i.searchItem,c.value).catch((function(){return[]}));case 5:u=l.sent,m.value=!1,l.next=10;break;case 9:(null==h?void 0:h.value)?"condition"===h.value.type?u=t.conditions:(null===(a=h.value.values)||void 0===a?void 0:a.length)&&!h.value.multiple&&t.mode!==V.EDIT||(u=h.value.children.filter((function(e){return e.name.toLocaleLowerCase().includes(c.value.toLocaleLowerCase())}))):(null===(o=c.value)||void 0===o?void 0:o.length)?t.data.filter((function(e){return!e.isSelected})).forEach((function(t){var n,r;if(t.name.toLocaleLowerCase().includes(c.value.toLocaleLowerCase())){var i;u.push(t);var o=[];null===(n=t.children)||void 0===n||n.forEach((function(n){o.push(Object.assign(Object.assign({},t),{realId:t.id,id:(0,e.random)(10),value:n}))})),!o.length&&!t.onlyRecommendChildren&&o.push(Object.assign(Object.assign({},t),{realId:t.id,id:(0,e.random)(10),value:{id:c.value,name:c.value}})),(i=u).push.apply(i,o)}else{var a,l=[];null===(r=t.children)||void 0===r||r.forEach((function(n){n.name.toLocaleLowerCase().includes(c.value.toLocaleLowerCase())&&l.push(Object.assign(Object.assign({},t),{realId:t.id,id:(0,e.random)(10),value:n}))})),!l.length&&!t.onlyRecommendChildren&&l.push(Object.assign(Object.assign({},t),{value:{id:c.value,name:c.value}})),(a=u).push.apply(a,l)}})):u=t.data.filter((function(e){return!e.isSelected})).slice();case 10:w.value=u,t.valueBehavior===N.NEEDKEY&&(s=u.find((function(e){return!e.disabled})))&&(!p.value||p.value&&!u.some((function(e){return e.id===p.value})))&&(p.value=s.id);case 12:case"end":return l.stop()}}),l)})))}function K(e){r("add",null!=e?e:h.value),h.value=null,c.value="",M(t.valueBehavior===N.NEEDKEY)}function P(){var e=u.value.innerText;"\n"===e[e.length-1]||"\r"===e[0]?(R(e.slice(0,-1)),P()):"\n"!==e[0]&&"\r"!==e[0]||(R(e.slice(1)),P())}function R(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u.value&&(u.value.innerHTML=t||(null===(e=h.value)||void 0===e?void 0:e.inputInnerHtml)||"")}return(0,i.watch)(S,(function(){t.mode===V.DEFAULT&&S.value&&(f.value=!1)})),(0,i.watchEffect)((function(){c.value||R()}),{flush:"pre"}),(0,i.watch)([w,f],(function(){var e;(null===(e=w.value)||void 0===e?void 0:e.some((function(e){return!e.disabled})))&&f.value?g||(t.valueBehavior===N.NEEDKEY?p.value=w.value.find((function(e){return!e.disabled})).id:p.value="",g=!0,document.addEventListener("keydown",I)):(document.removeEventListener("keydown",I),g=!1,t.valueBehavior!==N.NEEDKEY&&(p.value=""))})),o({handleInputFocus:j,isFocus:v}),{popoverRef:s,inputRef:u,keyword:c,loading:m,remoteMenuList:b,menuList:w,menuHoverId:p,isFocus:v,usingItem:h,showPopover:f,showNoSelectValueError:d,debounceSetMenuList:y,documentArrowEvent:O,handleClickOutside:function(e){var n,i;!(null===(n=s.value)||void 0===n?void 0:n.contains(e.target))&&(null===(i=t.clickOutside)||void 0===i?void 0:i.call(t,e.target,s.value))&&(f.value=!1,v.value=!1,r("focus",v.value))},handleInputFocus:j,handleInputChange:function(e){var t,n,r,i,o,a,l,s,d;P();var v=e.target.innerText;if(/(\r|\n)/gm.test(v)||/\s{2}/gm.test(v))e.preventDefault(),v=v.replace(/(\r|\n)/gm,C.value).replace(/\s{2}/gm,""),u.value.innerText=v,M(),c.value=v.replace((null===(t=h.value)||void 0===t?void 0:t.keyInnerText)||"","").trim(),y();else if(!c.value&&v.length<((null===(r=null===(n=h.value)||void 0===n?void 0:n.inputInnerText)||void 0===r?void 0:r.length)||1)){var f=v.replace(" "," ").replace((null===(i=h.value)||void 0===i?void 0:i.keyInnerText.replace(" "," ").trim())||"","").trim();if(v&&(null===(o=h.value)||void 0===o?void 0:o.keyInnerText)&&v.replace(" "," ").includes(h.value.keyInnerText.replace(" "," ").trim())&&f&&(null===(a=h.value.values)||void 0===a?void 0:a.length))return c.value=f,console.info("outerText",f),void y();!f&&(null==v?void 0:v.length)||(h.value=null),c.value=f?v:"",y()}else(null===(s=null===(l=h.value)||void 0===l?void 0:l.values)||void 0===s?void 0:s.length)||(c.value=v.replace(" "," ").replace((null===(d=h.value)||void 0===d?void 0:d.keyInnerText.replace(" "," "))||"","").trim(),M(),y())},handleInputKeyup:function(e){switch(e.code){case"Enter":case"NumpadEnter":if(t.valueBehavior===N.NEEDKEY&&w.value.some((function(e){return e.id===p.value})))return;F(e);break;case"Backspace":!function(){var e,n;if(!h.value&&!c.value)return r("delete"),void(0,i.nextTick)(q);if(null===(e=h.value)||void 0===e?void 0:e.values.length){if((null===(n=h.value)||void 0===n?void 0:n.multiple)||h.value.isInValueList(h.value.values[0])||t.mode===V.EDIT&&!c.value)return h.value.values.splice(-1,1),c.value="",void M()}else c.value||(h.value=null,c.value="",q());L("")}();default:d.value=!1}},handleSelectItem:B,handleSelectCondtionItem:function(e){B(e,"condition")},handleMenuFooterClick:function(e){var t;switch(e.id){case"confirm":if(!(null===(t=h.value)||void 0===t?void 0:t.values.length))return;c.value="",F();break;case"cancel":h.value.values=[],f.value=!1}},resolveClassName:l,t:a}},render:function(){var e,t,n=this,r=this.usingItem||{},o=r.multiple,a=r.values,l=r.placeholder,u=r.inputInnerHtml,s=!(null===(e=this.keyword)||void 0===e?void 0:e.length)&&!(null==a?void 0:a.length)&&l,c=this.loading||this.showNoSelectValueError||this.showPopover&&!!(null===(t=this.menuList)||void 0===t?void 0:t.length),d=!this.usingItem&&this.showCondition,v=Object.assign({},this.$slots.menu?{default:function(e){var t,r;return null===(r=(t=n.$slots).menu)||void 0===r?void 0:r.call(t,e)}}:{});return(0,i.createVNode)(L(),{trigger:"manual",theme:"light",placement:"bottom-start",arrow:!1,disableOutsideClick:!0,isShow:c},{default:function(){var e;return(0,i.withDirectives)((0,i.createVNode)("div",{ref:"inputRef",class:{"div-input":!0,"input-before":n.showInputBefore&&!(null===(e=n.keyword)||void 0===e?void 0:e.length),"input-after":s},contenteditable:!0,"data-placeholder":u||n.keyword?"":n.placeholder,"data-tips":l||"",spellcheck:"false",onFocus:n.handleInputFocus,onInput:n.handleInputChange,onKeydown:n.handleInputKeyup},null),[[(0,i.resolveDirective)("clickoutside"),n.handleClickOutside]])},content:function(){var e;return n.loading?(0,i.createVNode)("div",null,[n.t.loading]):n.showNoSelectValueError?(0,i.createVNode)("div",null,[n.t.filterQueryMustHasValue]):(null===(e=n.menuList)||void 0===e?void 0:e.length)?(0,i.createVNode)("div",{ref:"popoverRef",class:n.resolveClassName("search-select-popover")},[(0,i.createVNode)(C,{list:n.menuList,keyword:n.keyword,multiple:!!o,hoverId:n.menuHoverId,selected:(null==a?void 0:a.map((function(e){return e.id})))||[],conditions:d?n.conditions:[],onSelectItem:n.handleSelectItem,onSelectCondition:n.handleSelectCondtionItem,onFooterClick:n.handleMenuFooterClick},Object.assign({},v))]):void 0}})}}),F=(0,i.defineComponent)({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},conditions:{type:Array,default:function(){return[]}},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete"],setup:function(e,t){var n=t.emit,r=(0,i.ref)(null),o=z(),a=o.onEditClick,l=o.onEditEnter,u=o.onEditBlur,s=o.editKey,c=o.valueSplitCode;return{inputRef:r,editKey:s,copySeletedItem:function(e){var t=new T(e.searchItem,e.type,c.value);return t.values=e.values.slice(),t},handleDeleteSelected:function(e){n("delete",e)},handleEditSeleted:function(e,t,n){e.preventDefault(),e.stopPropagation(),a(t,n),setTimeout((function(){return r.value.handleInputFocus()}),200)},handleInputOutside:function(){return!0},handleAddSelected:function(e,t){l(e,t)},handleInputFocus:function(e){e||u()}}},render:function(){var e=this,t=function(t,n){return e.editKey==="".concat(t.id,"_").concat(n)?(0,i.createVNode)("div",{class:"selected-input",key:e.editKey.toString()},[(0,i.createVNode)(j,{ref:"inputRef",key:e.editKey.toString(),mode:V.EDIT,data:e.data,showCondition:!1,conditions:e.conditions,defautUsingItem:e.copySeletedItem(t),clickOutside:e.handleInputOutside,getMenuList:e.getMenuList,validateValues:e.validateValues,valueBehavior:e.valueBehavior,onAdd:function(t){return e.handleAddSelected(t,n)},onFocus:e.handleInputFocus},null)]):(0,i.createVNode)("li",{class:"search-container-selected ".concat((e.overflowIndex>=0?n<e.overflowIndex:n>=0)?"":"hidden-selected"),key:"".concat(t.id,"_").concat(n)},[(0,i.createVNode)("span",{class:"selected-name",onClick:function(r){return e.handleEditSeleted(r,t,n)}},[t.inputInnerText]),(0,i.createVNode)(w.Error,{class:"selected-clear",onClick:function(){return e.handleDeleteSelected(n)}},null)])};return(0,i.createVNode)(i.Fragment,null,[this.selectedList.map((function(n,r){return[e.overflowIndex>=0&&r===e.overflowIndex&&(0,i.createVNode)("div",{class:"search-container-selected overflow-selected"},[(0,i.createTextVNode)("+"),e.selectedList.length-e.overflowIndex]),t(n,r)]}))])}});var B={data:{type:Array,default:function(){return[]}},modelValue:{type:Array,default:function(){return[]}},shrink:{type:Boolean,default:!0},maxHeight:{type:Number,default:120},minHeight:{type:Number,default:26},conditions:{type:Array,default:function(){return[]}},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,valueSplitCode:{type:String,default:"|"},uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:N.ALL,validator:function(e){return[N.ALL,N.NEEDKEY].includes(e)}}};const D=(0,i.defineComponent)({name:"SearchSelect",directives:{clickoutside:b.clickoutside},props:B,emits:["update:modelValue","search"],setup:function(t,n){var r,o=n.emit,a=(0,_.useLocale)("searchSelect"),l=(0,_.usePrefix)().resolveClassName,u=(0,i.computed)((function(){return void 0===t.conditions?[{id:"or",name:a.value.or},{id:"and",name:a.value.and}]:t.conditions})),s=(0,i.ref)(null),c=(0,i.ref)(null),d=(0,i.ref)(!1),p=(0,i.ref)([]),y=(0,i.ref)(-1),g=(0,e.debounce)(32,C),b=(0,i.ref)(""),w=(0,i.ref)(""),x=(0,i.computed)((function(){return t.valueSplitCode})),k=(0,i.shallowRef)([]);function E(e,t){b.value="".concat(e.id,"_").concat(t)}function S(e,t){var n=p.value.slice();n.splice(t,1,e),o("update:modelValue",n.map((function(e){return e.toValue()}))),b.value=""}function L(e){w.value=e||""}function C(){if(d.value||p.value.length<1)y.value=-1;else{for(var e=c.value.querySelector(".".concat(l("search-select-container"))),n=c.value.querySelector(".search-container").clientWidth-6-2,r=e.querySelectorAll(".search-container-selected:not(.overflow-selected)"),i=0,o=0,a=0;0===o&&i<=n-40&&a<=r.length-1;){var u=r[a];if(u.clientHeight>t.minHeight)return void(y.value=a);(i+=u?u.clientWidth+6:0)>=n-40&&(o=a),a+=1}o===r.length-1&&i<=n?y.value=-1:y.value=i>=n-40?o:o-1}}return(0,i.watch)((function(){return t.data}),(function(){var e;k.value=JSON.parse(JSON.stringify(t.data)),null===(e=k.value)||void 0===e||e.forEach((function(e){e.isSelected=t.uniqueSelect&&!!t.modelValue.some((function(t){return t.id===e.id}))}))}),{immediate:!0}),(0,i.watch)((function(){return t.modelValue}),(function(e){var n,r;if(!(null==e?void 0:e.length))return p.value=[],void(null===(n=k.value)||void 0===n||n.forEach((function(e){e.isSelected=!1})));var i=[];e.forEach((function(e){var n,r=p.value.find((function(t){return t.id===e.id&&t.name===e.name}));if((null==r?void 0:r.toValueKey())===JSON.stringify(e))r.values=e.values||[],i.push(r);else{var o=t.data.find((function(t){return t.id===e.id})),a="default";o||(o=t.conditions.find((function(t){return t.id===e.id})))&&(a="condition"),o||(null===(n=e.values)||void 0===n?void 0:n.length)||(a="text");var l=new T(o||e,a,x.value);l.values=e.values||[],i.push(l)}})),p.value=i,null===(r=k.value)||void 0===r||r.forEach((function(e){e.isSelected=t.uniqueSelect&&!!i.some((function(t){return t.id===e.id}))}))}),{immediate:!0,deep:!0}),(0,i.onMounted)((function(){h(c.value.querySelector(".".concat(l("search-select-container"))),g)})),(0,i.onBeforeUnmount)((function(){!function(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener)return e.detachEvent("onresize",e.__resize_legacy_resize_handler__),void document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",m),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}! --v&&f&&f.parentNode.removeChild(f)}}(c.value.querySelector(".".concat(l("search-select-container"))),g)})),r={onEditClick:E,onEditEnter:S,onEditBlur:function(){b.value="",L("")},onValidate:L,editKey:b,valueSplitCode:x},(0,i.provide)(O,r),{inputRef:s,wrapRef:c,isFocus:d,copyData:k,selectedList:p,overflowIndex:y,validateStr:w,splitCode:x,onEditClick:E,onEditEnter:S,handleWrapClick:function(){b.value||s.value.handleInputFocus()},handleInputFocus:function(e){var t;e&&(y.value=-1),!1===e&&(null===(t=c.value.querySelector(".".concat(l("search-select-container"))))||void 0===t||t.scrollTo(0,0)),d.value=e},handleResize:C,handleClearAll:function(){p.value=[],y.value=-1,o("update:modelValue",[])},handleInputOutside:function(e){var t;return!(null===(t=c.value)||void 0===t?void 0:t.contains(e))},handleAddSelected:function(e){var t=p.value.slice();t.push(e),L(""),o("update:modelValue",t.map((function(e){return e.toValue()})))},handleDeleteSelected:function(e){var t=p.value.slice();t.splice("number"==typeof e?e:p.value.length-1,1),L(""),o("update:modelValue",t.map((function(e){return e.toValue()})))},handleClickSearch:function(e){o("search",e)},localConditions:u,resolveClassName:l,t:a}},render:function(){var e,t,n,o=this,a="".concat(!this.shrink||this.isFocus?this.maxHeight:this.minHeight,"px"),l=!!this.selectedList.length&&"condition"!==this.selectedList.slice(-1)[0].type,u=Object.assign({},this.$slots.menu?{menu:function(e){var t,n;return null===(n=(t=o.$slots).menu)||void 0===n?void 0:n.call(t,e)}}:{});return(0,i.createVNode)("div",{class:this.resolveClassName("search-select"),ref:"wrapRef"},[(0,i.createVNode)("div",{class:(e={},r(e,this.resolveClassName("search-select-container"),!0),r(e,"is-focus",this.isFocus),e),onClick:this.handleWrapClick},[(0,i.createVNode)("div",{class:"search-prefix"},[null===(n=(t=this.$slots).prepend)||void 0===n?void 0:n.call(t)]),(0,i.createVNode)("div",{class:"search-container",style:{maxHeight:a}},[(0,i.createVNode)(F,{data:this.copyData,conditions:this.localConditions,selectedList:this.selectedList,overflowIndex:this.overflowIndex,getMenuList:this.getMenuList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected},Object.assign({},u)),(0,i.createVNode)("div",{class:"search-container-input"},[(0,i.createVNode)(j,{ref:"inputRef",data:this.copyData,showInputBefore:!this.selectedList.length,showCondition:l,conditions:this.localConditions,placeholder:this.placeholder||this.t.pleaseSelect,clickOutside:this.handleInputOutside,getMenuList:this.getMenuList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus},Object.assign({},u))])]),(0,i.createVNode)("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&(0,i.createVNode)(w.Close,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():(0,i.createVNode)(w.Search,{onClick:this.handleClickSearch,class:"search-nextfix-icon ".concat(this.isFocus?"is-focus":"")},null)])]),!!this.validateStr.length&&(0,i.createVNode)("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():(0,i.createVNode)(i.Fragment,null,[(0,i.createVNode)(w.ExclamationCircleShape,{class:"select-tips"},null),this.validateStr||""])])])}});var A=(0,e.withInstall)(D);const M=A})(),s})()));
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("../shared"), require("vue"), require("../config-provider"), require("../directives"), require("../icon"), require("../popover"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["../shared", "vue", "../config-provider", "../directives", "../icon", "../popover"], factory);
6
+ else {
7
+ var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../config-provider"), require("../directives"), require("../icon"), require("../popover")) : factory(root["../shared"], root["vue"], root["../config-provider"], root["../directives"], root["../icon"], root["../popover"]);
8
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
+ }
10
+ })(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__2717__, __WEBPACK_EXTERNAL_MODULE__4061__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__5537__) => {
11
+ return /******/ (() => { // webpackBootstrap
12
+ /******/ var __webpack_modules__ = ({
13
+
14
+ /***/ 2717:
15
+ /***/ ((module) => {
16
+
17
+ "use strict";
18
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2717__;
19
+
20
+ /***/ }),
21
+
22
+ /***/ 4061:
23
+ /***/ ((module) => {
24
+
25
+ "use strict";
26
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4061__;
27
+
28
+ /***/ }),
29
+
30
+ /***/ 6870:
31
+ /***/ ((module) => {
32
+
33
+ "use strict";
34
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
35
+
36
+ /***/ }),
37
+
38
+ /***/ 5537:
39
+ /***/ ((module) => {
40
+
41
+ "use strict";
42
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
43
+
44
+ /***/ }),
45
+
46
+ /***/ 4212:
47
+ /***/ ((module) => {
48
+
49
+ "use strict";
50
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
51
+
52
+ /***/ }),
53
+
54
+ /***/ 748:
55
+ /***/ ((module) => {
56
+
57
+ "use strict";
58
+ module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
59
+
60
+ /***/ }),
61
+
62
+ /***/ 7609:
63
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
64
+
65
+ var _typeof = (__webpack_require__(7425)["default"]);
66
+ function _regeneratorRuntime() {
67
+ "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
68
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
69
+ return exports;
70
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
71
+ var exports = {},
72
+ Op = Object.prototype,
73
+ hasOwn = Op.hasOwnProperty,
74
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
75
+ obj[key] = desc.value;
76
+ },
77
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
78
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
79
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
80
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
81
+ function define(obj, key, value) {
82
+ return Object.defineProperty(obj, key, {
83
+ value: value,
84
+ enumerable: !0,
85
+ configurable: !0,
86
+ writable: !0
87
+ }), obj[key];
88
+ }
89
+ try {
90
+ define({}, "");
91
+ } catch (err) {
92
+ define = function define(obj, key, value) {
93
+ return obj[key] = value;
94
+ };
95
+ }
96
+ function wrap(innerFn, outerFn, self, tryLocsList) {
97
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
98
+ generator = Object.create(protoGenerator.prototype),
99
+ context = new Context(tryLocsList || []);
100
+ return defineProperty(generator, "_invoke", {
101
+ value: makeInvokeMethod(innerFn, self, context)
102
+ }), generator;
103
+ }
104
+ function tryCatch(fn, obj, arg) {
105
+ try {
106
+ return {
107
+ type: "normal",
108
+ arg: fn.call(obj, arg)
109
+ };
110
+ } catch (err) {
111
+ return {
112
+ type: "throw",
113
+ arg: err
114
+ };
115
+ }
116
+ }
117
+ exports.wrap = wrap;
118
+ var ContinueSentinel = {};
119
+ function Generator() {}
120
+ function GeneratorFunction() {}
121
+ function GeneratorFunctionPrototype() {}
122
+ var IteratorPrototype = {};
123
+ define(IteratorPrototype, iteratorSymbol, function () {
124
+ return this;
125
+ });
126
+ var getProto = Object.getPrototypeOf,
127
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
128
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
129
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
130
+ function defineIteratorMethods(prototype) {
131
+ ["next", "throw", "return"].forEach(function (method) {
132
+ define(prototype, method, function (arg) {
133
+ return this._invoke(method, arg);
134
+ });
135
+ });
136
+ }
137
+ function AsyncIterator(generator, PromiseImpl) {
138
+ function invoke(method, arg, resolve, reject) {
139
+ var record = tryCatch(generator[method], generator, arg);
140
+ if ("throw" !== record.type) {
141
+ var result = record.arg,
142
+ value = result.value;
143
+ return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
144
+ invoke("next", value, resolve, reject);
145
+ }, function (err) {
146
+ invoke("throw", err, resolve, reject);
147
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
148
+ result.value = unwrapped, resolve(result);
149
+ }, function (error) {
150
+ return invoke("throw", error, resolve, reject);
151
+ });
152
+ }
153
+ reject(record.arg);
154
+ }
155
+ var previousPromise;
156
+ defineProperty(this, "_invoke", {
157
+ value: function value(method, arg) {
158
+ function callInvokeWithMethodAndArg() {
159
+ return new PromiseImpl(function (resolve, reject) {
160
+ invoke(method, arg, resolve, reject);
161
+ });
162
+ }
163
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
164
+ }
165
+ });
166
+ }
167
+ function makeInvokeMethod(innerFn, self, context) {
168
+ var state = "suspendedStart";
169
+ return function (method, arg) {
170
+ if ("executing" === state) throw new Error("Generator is already running");
171
+ if ("completed" === state) {
172
+ if ("throw" === method) throw arg;
173
+ return doneResult();
174
+ }
175
+ for (context.method = method, context.arg = arg;;) {
176
+ var delegate = context.delegate;
177
+ if (delegate) {
178
+ var delegateResult = maybeInvokeDelegate(delegate, context);
179
+ if (delegateResult) {
180
+ if (delegateResult === ContinueSentinel) continue;
181
+ return delegateResult;
182
+ }
183
+ }
184
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
185
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
186
+ context.dispatchException(context.arg);
187
+ } else "return" === context.method && context.abrupt("return", context.arg);
188
+ state = "executing";
189
+ var record = tryCatch(innerFn, self, context);
190
+ if ("normal" === record.type) {
191
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
192
+ return {
193
+ value: record.arg,
194
+ done: context.done
195
+ };
196
+ }
197
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
198
+ }
199
+ };
200
+ }
201
+ function maybeInvokeDelegate(delegate, context) {
202
+ var methodName = context.method,
203
+ method = delegate.iterator[methodName];
204
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
205
+ var record = tryCatch(method, delegate.iterator, context.arg);
206
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
207
+ var info = record.arg;
208
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
209
+ }
210
+ function pushTryEntry(locs) {
211
+ var entry = {
212
+ tryLoc: locs[0]
213
+ };
214
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
215
+ }
216
+ function resetTryEntry(entry) {
217
+ var record = entry.completion || {};
218
+ record.type = "normal", delete record.arg, entry.completion = record;
219
+ }
220
+ function Context(tryLocsList) {
221
+ this.tryEntries = [{
222
+ tryLoc: "root"
223
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
224
+ }
225
+ function values(iterable) {
226
+ if (iterable) {
227
+ var iteratorMethod = iterable[iteratorSymbol];
228
+ if (iteratorMethod) return iteratorMethod.call(iterable);
229
+ if ("function" == typeof iterable.next) return iterable;
230
+ if (!isNaN(iterable.length)) {
231
+ var i = -1,
232
+ next = function next() {
233
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
234
+ return next.value = undefined, next.done = !0, next;
235
+ };
236
+ return next.next = next;
237
+ }
238
+ }
239
+ return {
240
+ next: doneResult
241
+ };
242
+ }
243
+ function doneResult() {
244
+ return {
245
+ value: undefined,
246
+ done: !0
247
+ };
248
+ }
249
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
250
+ value: GeneratorFunctionPrototype,
251
+ configurable: !0
252
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
253
+ value: GeneratorFunction,
254
+ configurable: !0
255
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
256
+ var ctor = "function" == typeof genFun && genFun.constructor;
257
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
258
+ }, exports.mark = function (genFun) {
259
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
260
+ }, exports.awrap = function (arg) {
261
+ return {
262
+ __await: arg
263
+ };
264
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
265
+ return this;
266
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
267
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
268
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
269
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
270
+ return result.done ? result.value : iter.next();
271
+ });
272
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
273
+ return this;
274
+ }), define(Gp, "toString", function () {
275
+ return "[object Generator]";
276
+ }), exports.keys = function (val) {
277
+ var object = Object(val),
278
+ keys = [];
279
+ for (var key in object) keys.push(key);
280
+ return keys.reverse(), function next() {
281
+ for (; keys.length;) {
282
+ var key = keys.pop();
283
+ if (key in object) return next.value = key, next.done = !1, next;
284
+ }
285
+ return next.done = !0, next;
286
+ };
287
+ }, exports.values = values, Context.prototype = {
288
+ constructor: Context,
289
+ reset: function reset(skipTempReset) {
290
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
291
+ },
292
+ stop: function stop() {
293
+ this.done = !0;
294
+ var rootRecord = this.tryEntries[0].completion;
295
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
296
+ return this.rval;
297
+ },
298
+ dispatchException: function dispatchException(exception) {
299
+ if (this.done) throw exception;
300
+ var context = this;
301
+ function handle(loc, caught) {
302
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
303
+ }
304
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
305
+ var entry = this.tryEntries[i],
306
+ record = entry.completion;
307
+ if ("root" === entry.tryLoc) return handle("end");
308
+ if (entry.tryLoc <= this.prev) {
309
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
310
+ hasFinally = hasOwn.call(entry, "finallyLoc");
311
+ if (hasCatch && hasFinally) {
312
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
313
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
314
+ } else if (hasCatch) {
315
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
316
+ } else {
317
+ if (!hasFinally) throw new Error("try statement without catch or finally");
318
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
319
+ }
320
+ }
321
+ }
322
+ },
323
+ abrupt: function abrupt(type, arg) {
324
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
325
+ var entry = this.tryEntries[i];
326
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
327
+ var finallyEntry = entry;
328
+ break;
329
+ }
330
+ }
331
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
332
+ var record = finallyEntry ? finallyEntry.completion : {};
333
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
334
+ },
335
+ complete: function complete(record, afterLoc) {
336
+ if ("throw" === record.type) throw record.arg;
337
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
338
+ },
339
+ finish: function finish(finallyLoc) {
340
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
341
+ var entry = this.tryEntries[i];
342
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
343
+ }
344
+ },
345
+ "catch": function _catch(tryLoc) {
346
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
347
+ var entry = this.tryEntries[i];
348
+ if (entry.tryLoc === tryLoc) {
349
+ var record = entry.completion;
350
+ if ("throw" === record.type) {
351
+ var thrown = record.arg;
352
+ resetTryEntry(entry);
353
+ }
354
+ return thrown;
355
+ }
356
+ }
357
+ throw new Error("illegal catch attempt");
358
+ },
359
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
360
+ return this.delegate = {
361
+ iterator: values(iterable),
362
+ resultName: resultName,
363
+ nextLoc: nextLoc
364
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
365
+ }
366
+ }, exports;
367
+ }
368
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
369
+
370
+ /***/ }),
371
+
372
+ /***/ 7425:
373
+ /***/ ((module) => {
374
+
375
+ function _typeof(obj) {
376
+ "@babel/helpers - typeof";
377
+
378
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
379
+ return typeof obj;
380
+ } : function (obj) {
381
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
382
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
383
+ }
384
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
385
+
386
+ /***/ }),
387
+
388
+ /***/ 2841:
389
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
390
+
391
+ // TODO(Babel 8): Remove this file.
392
+
393
+ var runtime = __webpack_require__(7609)();
394
+ module.exports = runtime;
395
+
396
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
397
+ try {
398
+ regeneratorRuntime = runtime;
399
+ } catch (accidentalStrictMode) {
400
+ if (typeof globalThis === "object") {
401
+ globalThis.regeneratorRuntime = runtime;
402
+ } else {
403
+ Function("r", "regeneratorRuntime = r")(runtime);
404
+ }
405
+ }
406
+
407
+
408
+ /***/ })
409
+
410
+ /******/ });
411
+ /************************************************************************/
412
+ /******/ // The module cache
413
+ /******/ var __webpack_module_cache__ = {};
414
+ /******/
415
+ /******/ // The require function
416
+ /******/ function __webpack_require__(moduleId) {
417
+ /******/ // Check if module is in cache
418
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
419
+ /******/ if (cachedModule !== undefined) {
420
+ /******/ return cachedModule.exports;
421
+ /******/ }
422
+ /******/ // Create a new module (and put it into the cache)
423
+ /******/ var module = __webpack_module_cache__[moduleId] = {
424
+ /******/ // no module.id needed
425
+ /******/ // no module.loaded needed
426
+ /******/ exports: {}
427
+ /******/ };
428
+ /******/
429
+ /******/ // Execute the module function
430
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
431
+ /******/
432
+ /******/ // Return the exports of the module
433
+ /******/ return module.exports;
434
+ /******/ }
435
+ /******/
436
+ /************************************************************************/
437
+ /******/ /* webpack/runtime/compat get default export */
438
+ /******/ (() => {
439
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
440
+ /******/ __webpack_require__.n = (module) => {
441
+ /******/ var getter = module && module.__esModule ?
442
+ /******/ () => (module['default']) :
443
+ /******/ () => (module);
444
+ /******/ __webpack_require__.d(getter, { a: getter });
445
+ /******/ return getter;
446
+ /******/ };
447
+ /******/ })();
448
+ /******/
449
+ /******/ /* webpack/runtime/define property getters */
450
+ /******/ (() => {
451
+ /******/ // define getter functions for harmony exports
452
+ /******/ __webpack_require__.d = (exports, definition) => {
453
+ /******/ for(var key in definition) {
454
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
455
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
456
+ /******/ }
457
+ /******/ }
458
+ /******/ };
459
+ /******/ })();
460
+ /******/
461
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
462
+ /******/ (() => {
463
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
464
+ /******/ })();
465
+ /******/
466
+ /******/ /* webpack/runtime/make namespace object */
467
+ /******/ (() => {
468
+ /******/ // define __esModule on exports
469
+ /******/ __webpack_require__.r = (exports) => {
470
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
471
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
472
+ /******/ }
473
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
474
+ /******/ };
475
+ /******/ })();
476
+ /******/
477
+ /************************************************************************/
478
+ var __webpack_exports__ = {};
479
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
480
+ (() => {
481
+ "use strict";
482
+ // ESM COMPAT FLAG
483
+ __webpack_require__.r(__webpack_exports__);
484
+
485
+ // EXPORTS
486
+ __webpack_require__.d(__webpack_exports__, {
487
+ BkSearchSelect: () => (/* binding */ BkSearchSelect),
488
+ "default": () => (/* binding */ src)
489
+ });
490
+
491
+ // EXTERNAL MODULE: external "../shared"
492
+ var external_shared_ = __webpack_require__(4212);
493
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
494
+ function _typeof(obj) {
495
+ "@babel/helpers - typeof";
496
+
497
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
498
+ return typeof obj;
499
+ } : function (obj) {
500
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
501
+ }, _typeof(obj);
502
+ }
503
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
504
+
505
+ function _toPrimitive(input, hint) {
506
+ if (_typeof(input) !== "object" || input === null) return input;
507
+ var prim = input[Symbol.toPrimitive];
508
+ if (prim !== undefined) {
509
+ var res = prim.call(input, hint || "default");
510
+ if (_typeof(res) !== "object") return res;
511
+ throw new TypeError("@@toPrimitive must return a primitive value.");
512
+ }
513
+ return (hint === "string" ? String : Number)(input);
514
+ }
515
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
516
+
517
+
518
+ function _toPropertyKey(arg) {
519
+ var key = _toPrimitive(arg, "string");
520
+ return _typeof(key) === "symbol" ? key : String(key);
521
+ }
522
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
523
+
524
+ function _defineProperty(obj, key, value) {
525
+ key = _toPropertyKey(key);
526
+ if (key in obj) {
527
+ Object.defineProperty(obj, key, {
528
+ value: value,
529
+ enumerable: true,
530
+ configurable: true,
531
+ writable: true
532
+ });
533
+ } else {
534
+ obj[key] = value;
535
+ }
536
+ return obj;
537
+ }
538
+ // EXTERNAL MODULE: external "vue"
539
+ var external_vue_ = __webpack_require__(748);
540
+ ;// CONCATENATED MODULE: ../../node_modules/resize-detector/esm/index.js
541
+ var raf = null;
542
+ function requestAnimationFrame (callback) {
543
+ if (!raf) {
544
+ raf = (
545
+ window.requestAnimationFrame ||
546
+ window.webkitRequestAnimationFrame ||
547
+ window.mozRequestAnimationFrame ||
548
+ function (callback) {
549
+ return setTimeout(callback, 16)
550
+ }
551
+ ).bind(window);
552
+ }
553
+ return raf(callback)
554
+ }
555
+
556
+ var caf = null;
557
+ function cancelAnimationFrame (id) {
558
+ if (!caf) {
559
+ caf = (
560
+ window.cancelAnimationFrame ||
561
+ window.webkitCancelAnimationFrame ||
562
+ window.mozCancelAnimationFrame ||
563
+ function (id) {
564
+ clearTimeout(id);
565
+ }
566
+ ).bind(window);
567
+ }
568
+
569
+ caf(id);
570
+ }
571
+
572
+ function createStyles (styleText) {
573
+ var style = document.createElement('style');
574
+
575
+ if (style.styleSheet) {
576
+ style.styleSheet.cssText = styleText;
577
+ } else {
578
+ style.appendChild(document.createTextNode(styleText));
579
+ }
580
+ (document.querySelector('head') || document.body).appendChild(style);
581
+ return style
582
+ }
583
+
584
+ function createElement (tagName, props) {
585
+ if ( props === void 0 ) props = {};
586
+
587
+ var elem = document.createElement(tagName);
588
+ Object.keys(props).forEach(function (key) {
589
+ elem[key] = props[key];
590
+ });
591
+ return elem
592
+ }
593
+
594
+ function getComputedStyle (elem, prop, pseudo) {
595
+ // for older versions of Firefox, `getComputedStyle` required
596
+ // the second argument and may return `null` for some elements
597
+ // when `display: none`
598
+ var computedStyle = window.getComputedStyle(elem, pseudo || null) || {
599
+ display: 'none'
600
+ };
601
+
602
+ return computedStyle[prop]
603
+ }
604
+
605
+ function getRenderInfo (elem) {
606
+ if (!document.documentElement.contains(elem)) {
607
+ return {
608
+ detached: true,
609
+ rendered: false
610
+ }
611
+ }
612
+
613
+ var current = elem;
614
+ while (current !== document) {
615
+ if (getComputedStyle(current, 'display') === 'none') {
616
+ return {
617
+ detached: false,
618
+ rendered: false
619
+ }
620
+ }
621
+ current = current.parentNode;
622
+ }
623
+
624
+ return {
625
+ detached: false,
626
+ rendered: true
627
+ }
628
+ }
629
+
630
+ var css_248z = ".resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:\"\";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}";
631
+
632
+ var total = 0;
633
+ var style = null;
634
+
635
+ function addListener (elem, callback) {
636
+ if (!elem.__resize_mutation_handler__) {
637
+ elem.__resize_mutation_handler__ = handleMutation.bind(elem);
638
+ }
639
+
640
+ var listeners = elem.__resize_listeners__;
641
+
642
+ if (!listeners) {
643
+ elem.__resize_listeners__ = [];
644
+ if (window.ResizeObserver) {
645
+ var offsetWidth = elem.offsetWidth;
646
+ var offsetHeight = elem.offsetHeight;
647
+ var ro = new ResizeObserver(function () {
648
+ if (!elem.__resize_observer_triggered__) {
649
+ elem.__resize_observer_triggered__ = true;
650
+ if (elem.offsetWidth === offsetWidth && elem.offsetHeight === offsetHeight) {
651
+ return
652
+ }
653
+ }
654
+ runCallbacks(elem);
655
+ });
656
+
657
+ // initially display none won't trigger ResizeObserver callback
658
+ var ref = getRenderInfo(elem);
659
+ var detached = ref.detached;
660
+ var rendered = ref.rendered;
661
+ elem.__resize_observer_triggered__ = detached === false && rendered === false;
662
+ elem.__resize_observer__ = ro;
663
+ ro.observe(elem);
664
+ } else if (elem.attachEvent && elem.addEventListener) {
665
+ // targeting IE9/10
666
+ elem.__resize_legacy_resize_handler__ = function handleLegacyResize () {
667
+ runCallbacks(elem);
668
+ };
669
+ elem.attachEvent('onresize', elem.__resize_legacy_resize_handler__);
670
+ document.addEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
671
+ } else {
672
+ if (!total) {
673
+ style = createStyles(css_248z);
674
+ }
675
+ initTriggers(elem);
676
+
677
+ elem.__resize_rendered__ = getRenderInfo(elem).rendered;
678
+ if (window.MutationObserver) {
679
+ var mo = new MutationObserver(elem.__resize_mutation_handler__);
680
+ mo.observe(document, {
681
+ attributes: true,
682
+ childList: true,
683
+ characterData: true,
684
+ subtree: true
685
+ });
686
+ elem.__resize_mutation_observer__ = mo;
687
+ }
688
+ }
689
+ }
690
+
691
+ elem.__resize_listeners__.push(callback);
692
+ total++;
693
+ }
694
+
695
+ function removeListener (elem, callback) {
696
+ var listeners = elem.__resize_listeners__;
697
+ if (!listeners) {
698
+ return
699
+ }
700
+
701
+ if (callback) {
702
+ listeners.splice(listeners.indexOf(callback), 1);
703
+ }
704
+
705
+ // no listeners exist, or removing all listeners
706
+ if (!listeners.length || !callback) {
707
+ // targeting IE9/10
708
+ if (elem.detachEvent && elem.removeEventListener) {
709
+ elem.detachEvent('onresize', elem.__resize_legacy_resize_handler__);
710
+ document.removeEventListener('DOMSubtreeModified', elem.__resize_mutation_handler__);
711
+ return
712
+ }
713
+
714
+ if (elem.__resize_observer__) {
715
+ elem.__resize_observer__.unobserve(elem);
716
+ elem.__resize_observer__.disconnect();
717
+ elem.__resize_observer__ = null;
718
+ } else {
719
+ if (elem.__resize_mutation_observer__) {
720
+ elem.__resize_mutation_observer__.disconnect();
721
+ elem.__resize_mutation_observer__ = null;
722
+ }
723
+ elem.removeEventListener('scroll', handleScroll);
724
+ elem.removeChild(elem.__resize_triggers__.triggers);
725
+ elem.__resize_triggers__ = null;
726
+ }
727
+ elem.__resize_listeners__ = null;
728
+ }
729
+
730
+ if (!--total && style) {
731
+ style.parentNode.removeChild(style);
732
+ }
733
+ }
734
+
735
+ function getUpdatedSize (elem) {
736
+ var ref = elem.__resize_last__;
737
+ var width = ref.width;
738
+ var height = ref.height;
739
+ var offsetWidth = elem.offsetWidth;
740
+ var offsetHeight = elem.offsetHeight;
741
+ if (offsetWidth !== width || offsetHeight !== height) {
742
+ return {
743
+ width: offsetWidth,
744
+ height: offsetHeight
745
+ }
746
+ }
747
+ return null
748
+ }
749
+
750
+ function handleMutation () {
751
+ // `this` denotes the scrolling element
752
+ var ref = getRenderInfo(this);
753
+ var rendered = ref.rendered;
754
+ var detached = ref.detached;
755
+ if (rendered !== this.__resize_rendered__) {
756
+ if (!detached && this.__resize_triggers__) {
757
+ resetTriggers(this);
758
+ this.addEventListener('scroll', handleScroll, true);
759
+ }
760
+ this.__resize_rendered__ = rendered;
761
+ runCallbacks(this);
762
+ }
763
+ }
764
+
765
+ function handleScroll () {
766
+ var this$1 = this;
767
+
768
+ // `this` denotes the scrolling element
769
+ resetTriggers(this);
770
+ if (this.__resize_raf__) {
771
+ cancelAnimationFrame(this.__resize_raf__);
772
+ }
773
+ this.__resize_raf__ = requestAnimationFrame(function () {
774
+ var updated = getUpdatedSize(this$1);
775
+ if (updated) {
776
+ this$1.__resize_last__ = updated;
777
+ runCallbacks(this$1);
778
+ }
779
+ });
780
+ }
781
+
782
+ function runCallbacks (elem) {
783
+ if (!elem || !elem.__resize_listeners__) {
784
+ return
785
+ }
786
+ elem.__resize_listeners__.forEach(function (callback) {
787
+ callback.call(elem, elem);
788
+ });
789
+ }
790
+
791
+ function initTriggers (elem) {
792
+ var position = getComputedStyle(elem, 'position');
793
+ if (!position || position === 'static') {
794
+ elem.style.position = 'relative';
795
+ }
796
+
797
+ elem.__resize_old_position__ = position;
798
+ elem.__resize_last__ = {};
799
+
800
+ var triggers = createElement('div', {
801
+ className: 'resize-triggers'
802
+ });
803
+ var expand = createElement('div', {
804
+ className: 'resize-expand-trigger'
805
+ });
806
+ var expandChild = createElement('div');
807
+ var contract = createElement('div', {
808
+ className: 'resize-contract-trigger'
809
+ });
810
+ expand.appendChild(expandChild);
811
+ triggers.appendChild(expand);
812
+ triggers.appendChild(contract);
813
+ elem.appendChild(triggers);
814
+
815
+ elem.__resize_triggers__ = {
816
+ triggers: triggers,
817
+ expand: expand,
818
+ expandChild: expandChild,
819
+ contract: contract
820
+ };
821
+
822
+ resetTriggers(elem);
823
+ elem.addEventListener('scroll', handleScroll, true);
824
+
825
+ elem.__resize_last__ = {
826
+ width: elem.offsetWidth,
827
+ height: elem.offsetHeight
828
+ };
829
+ }
830
+
831
+ function resetTriggers (elem) {
832
+ var ref = elem.__resize_triggers__;
833
+ var expand = ref.expand;
834
+ var expandChild = ref.expandChild;
835
+ var contract = ref.contract;
836
+
837
+ // batch read
838
+ var csw = contract.scrollWidth;
839
+ var csh = contract.scrollHeight;
840
+ var eow = expand.offsetWidth;
841
+ var eoh = expand.offsetHeight;
842
+ var esw = expand.scrollWidth;
843
+ var esh = expand.scrollHeight;
844
+
845
+ // batch write
846
+ contract.scrollLeft = csw;
847
+ contract.scrollTop = csh;
848
+ expandChild.style.width = eow + 1 + 'px';
849
+ expandChild.style.height = eoh + 1 + 'px';
850
+ expand.scrollLeft = esw;
851
+ expand.scrollTop = esh;
852
+ }
853
+
854
+
855
+
856
+ // EXTERNAL MODULE: external "../config-provider"
857
+ var external_config_provider_ = __webpack_require__(2717);
858
+ // EXTERNAL MODULE: external "../directives"
859
+ var external_directives_ = __webpack_require__(4061);
860
+ // EXTERNAL MODULE: external "../icon"
861
+ var external_icon_ = __webpack_require__(6870);
862
+ // EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
863
+ var regenerator = __webpack_require__(2841);
864
+ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
865
+ ;// CONCATENATED MODULE: ../../node_modules/tslib/tslib.es6.mjs
866
+ /******************************************************************************
867
+ Copyright (c) Microsoft Corporation.
868
+
869
+ Permission to use, copy, modify, and/or distribute this software for any
870
+ purpose with or without fee is hereby granted.
871
+
872
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
873
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
874
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
875
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
876
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
877
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
878
+ PERFORMANCE OF THIS SOFTWARE.
879
+ ***************************************************************************** */
880
+ /* global Reflect, Promise, SuppressedError, Symbol */
881
+
882
+ var extendStatics = function(d, b) {
883
+ extendStatics = Object.setPrototypeOf ||
884
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
885
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
886
+ return extendStatics(d, b);
887
+ };
888
+
889
+ function __extends(d, b) {
890
+ if (typeof b !== "function" && b !== null)
891
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
892
+ extendStatics(d, b);
893
+ function __() { this.constructor = d; }
894
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
895
+ }
896
+
897
+ var __assign = function() {
898
+ __assign = Object.assign || function __assign(t) {
899
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
900
+ s = arguments[i];
901
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
902
+ }
903
+ return t;
904
+ }
905
+ return __assign.apply(this, arguments);
906
+ }
907
+
908
+ function __rest(s, e) {
909
+ var t = {};
910
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
911
+ t[p] = s[p];
912
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
913
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
914
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
915
+ t[p[i]] = s[p[i]];
916
+ }
917
+ return t;
918
+ }
919
+
920
+ function __decorate(decorators, target, key, desc) {
921
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
922
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
923
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
924
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
925
+ }
926
+
927
+ function __param(paramIndex, decorator) {
928
+ return function (target, key) { decorator(target, key, paramIndex); }
929
+ }
930
+
931
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
932
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
933
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
934
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
935
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
936
+ var _, done = false;
937
+ for (var i = decorators.length - 1; i >= 0; i--) {
938
+ var context = {};
939
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
940
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
941
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
942
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
943
+ if (kind === "accessor") {
944
+ if (result === void 0) continue;
945
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
946
+ if (_ = accept(result.get)) descriptor.get = _;
947
+ if (_ = accept(result.set)) descriptor.set = _;
948
+ if (_ = accept(result.init)) initializers.unshift(_);
949
+ }
950
+ else if (_ = accept(result)) {
951
+ if (kind === "field") initializers.unshift(_);
952
+ else descriptor[key] = _;
953
+ }
954
+ }
955
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
956
+ done = true;
957
+ };
958
+
959
+ function __runInitializers(thisArg, initializers, value) {
960
+ var useValue = arguments.length > 2;
961
+ for (var i = 0; i < initializers.length; i++) {
962
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
963
+ }
964
+ return useValue ? value : void 0;
965
+ };
966
+
967
+ function __propKey(x) {
968
+ return typeof x === "symbol" ? x : "".concat(x);
969
+ };
970
+
971
+ function __setFunctionName(f, name, prefix) {
972
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
973
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
974
+ };
975
+
976
+ function __metadata(metadataKey, metadataValue) {
977
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
978
+ }
979
+
980
+ function __awaiter(thisArg, _arguments, P, generator) {
981
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
982
+ return new (P || (P = Promise))(function (resolve, reject) {
983
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
984
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
985
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
986
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
987
+ });
988
+ }
989
+
990
+ function __generator(thisArg, body) {
991
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
992
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
993
+ function verb(n) { return function (v) { return step([n, v]); }; }
994
+ function step(op) {
995
+ if (f) throw new TypeError("Generator is already executing.");
996
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
997
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
998
+ if (y = 0, t) op = [op[0] & 2, t.value];
999
+ switch (op[0]) {
1000
+ case 0: case 1: t = op; break;
1001
+ case 4: _.label++; return { value: op[1], done: false };
1002
+ case 5: _.label++; y = op[1]; op = [0]; continue;
1003
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
1004
+ default:
1005
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1006
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1007
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1008
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1009
+ if (t[2]) _.ops.pop();
1010
+ _.trys.pop(); continue;
1011
+ }
1012
+ op = body.call(thisArg, _);
1013
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1014
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1015
+ }
1016
+ }
1017
+
1018
+ var __createBinding = Object.create ? (function(o, m, k, k2) {
1019
+ if (k2 === undefined) k2 = k;
1020
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1021
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1022
+ desc = { enumerable: true, get: function() { return m[k]; } };
1023
+ }
1024
+ Object.defineProperty(o, k2, desc);
1025
+ }) : (function(o, m, k, k2) {
1026
+ if (k2 === undefined) k2 = k;
1027
+ o[k2] = m[k];
1028
+ });
1029
+
1030
+ function __exportStar(m, o) {
1031
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
1032
+ }
1033
+
1034
+ function __values(o) {
1035
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
1036
+ if (m) return m.call(o);
1037
+ if (o && typeof o.length === "number") return {
1038
+ next: function () {
1039
+ if (o && i >= o.length) o = void 0;
1040
+ return { value: o && o[i++], done: !o };
1041
+ }
1042
+ };
1043
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
1044
+ }
1045
+
1046
+ function __read(o, n) {
1047
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1048
+ if (!m) return o;
1049
+ var i = m.call(o), r, ar = [], e;
1050
+ try {
1051
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1052
+ }
1053
+ catch (error) { e = { error: error }; }
1054
+ finally {
1055
+ try {
1056
+ if (r && !r.done && (m = i["return"])) m.call(i);
1057
+ }
1058
+ finally { if (e) throw e.error; }
1059
+ }
1060
+ return ar;
1061
+ }
1062
+
1063
+ /** @deprecated */
1064
+ function __spread() {
1065
+ for (var ar = [], i = 0; i < arguments.length; i++)
1066
+ ar = ar.concat(__read(arguments[i]));
1067
+ return ar;
1068
+ }
1069
+
1070
+ /** @deprecated */
1071
+ function __spreadArrays() {
1072
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
1073
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
1074
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
1075
+ r[k] = a[j];
1076
+ return r;
1077
+ }
1078
+
1079
+ function __spreadArray(to, from, pack) {
1080
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1081
+ if (ar || !(i in from)) {
1082
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1083
+ ar[i] = from[i];
1084
+ }
1085
+ }
1086
+ return to.concat(ar || Array.prototype.slice.call(from));
1087
+ }
1088
+
1089
+ function __await(v) {
1090
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
1091
+ }
1092
+
1093
+ function __asyncGenerator(thisArg, _arguments, generator) {
1094
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1095
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
1096
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
1097
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
1098
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
1099
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
1100
+ function fulfill(value) { resume("next", value); }
1101
+ function reject(value) { resume("throw", value); }
1102
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
1103
+ }
1104
+
1105
+ function __asyncDelegator(o) {
1106
+ var i, p;
1107
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
1108
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
1109
+ }
1110
+
1111
+ function __asyncValues(o) {
1112
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
1113
+ var m = o[Symbol.asyncIterator], i;
1114
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
1115
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
1116
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
1117
+ }
1118
+
1119
+ function __makeTemplateObject(cooked, raw) {
1120
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
1121
+ return cooked;
1122
+ };
1123
+
1124
+ var __setModuleDefault = Object.create ? (function(o, v) {
1125
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
1126
+ }) : function(o, v) {
1127
+ o["default"] = v;
1128
+ };
1129
+
1130
+ function __importStar(mod) {
1131
+ if (mod && mod.__esModule) return mod;
1132
+ var result = {};
1133
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
1134
+ __setModuleDefault(result, mod);
1135
+ return result;
1136
+ }
1137
+
1138
+ function __importDefault(mod) {
1139
+ return (mod && mod.__esModule) ? mod : { default: mod };
1140
+ }
1141
+
1142
+ function __classPrivateFieldGet(receiver, state, kind, f) {
1143
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1144
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1145
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1146
+ }
1147
+
1148
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
1149
+ if (kind === "m") throw new TypeError("Private method is not writable");
1150
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1151
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1152
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1153
+ }
1154
+
1155
+ function __classPrivateFieldIn(state, receiver) {
1156
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
1157
+ return typeof state === "function" ? receiver === state : state.has(receiver);
1158
+ }
1159
+
1160
+ function __addDisposableResource(env, value, async) {
1161
+ if (value !== null && value !== void 0) {
1162
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
1163
+ var dispose;
1164
+ if (async) {
1165
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
1166
+ dispose = value[Symbol.asyncDispose];
1167
+ }
1168
+ if (dispose === void 0) {
1169
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
1170
+ dispose = value[Symbol.dispose];
1171
+ }
1172
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
1173
+ env.stack.push({ value: value, dispose: dispose, async: async });
1174
+ }
1175
+ else if (async) {
1176
+ env.stack.push({ async: true });
1177
+ }
1178
+ return value;
1179
+ }
1180
+
1181
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1182
+ var e = new Error(message);
1183
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1184
+ };
1185
+
1186
+ function __disposeResources(env) {
1187
+ function fail(e) {
1188
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
1189
+ env.hasError = true;
1190
+ }
1191
+ function next() {
1192
+ while (env.stack.length) {
1193
+ var rec = env.stack.pop();
1194
+ try {
1195
+ var result = rec.dispose && rec.dispose.call(rec.value);
1196
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
1197
+ }
1198
+ catch (e) {
1199
+ fail(e);
1200
+ }
1201
+ }
1202
+ if (env.hasError) throw env.error;
1203
+ }
1204
+ return next();
1205
+ }
1206
+
1207
+ /* harmony default export */ const tslib_es6 = ({
1208
+ __extends,
1209
+ __assign,
1210
+ __rest,
1211
+ __decorate,
1212
+ __param,
1213
+ __metadata,
1214
+ __awaiter,
1215
+ __generator,
1216
+ __createBinding,
1217
+ __exportStar,
1218
+ __values,
1219
+ __read,
1220
+ __spread,
1221
+ __spreadArrays,
1222
+ __spreadArray,
1223
+ __await,
1224
+ __asyncGenerator,
1225
+ __asyncDelegator,
1226
+ __asyncValues,
1227
+ __makeTemplateObject,
1228
+ __importStar,
1229
+ __importDefault,
1230
+ __classPrivateFieldGet,
1231
+ __classPrivateFieldSet,
1232
+ __classPrivateFieldIn,
1233
+ __addDisposableResource,
1234
+ __disposeResources,
1235
+ });
1236
+
1237
+ // EXTERNAL MODULE: external "../popover"
1238
+ var external_popover_ = __webpack_require__(5537);
1239
+ var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
1240
+ ;// CONCATENATED MODULE: ../../packages/search-select/src/menu.tsx
1241
+
1242
+ /*
1243
+ * Tencent is pleased to support the open source community by making
1244
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1245
+ *
1246
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1247
+ *
1248
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1249
+ *
1250
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1251
+ *
1252
+ * ---------------------------------------------------
1253
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1254
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1255
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1256
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1257
+ *
1258
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1259
+ * the Software.
1260
+ *
1261
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1262
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1263
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1264
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1265
+ * IN THE SOFTWARE.
1266
+ */
1267
+
1268
+
1269
+
1270
+ /* harmony default export */ const menu = ((0,external_vue_.defineComponent)({
1271
+ name: 'SearchSelectMenu',
1272
+ props: {
1273
+ list: {
1274
+ type: Array
1275
+ },
1276
+ hoverId: String,
1277
+ keyword: {
1278
+ type: String,
1279
+ "default": ''
1280
+ },
1281
+ multiple: {
1282
+ type: Boolean,
1283
+ "default": false
1284
+ },
1285
+ selected: {
1286
+ type: Array,
1287
+ "default": function _default() {
1288
+ return [];
1289
+ }
1290
+ },
1291
+ conditions: {
1292
+ type: Array
1293
+ },
1294
+ footerBtns: {
1295
+ type: Array,
1296
+ "default": function _default() {
1297
+ return [];
1298
+ }
1299
+ }
1300
+ },
1301
+ emits: ['selectItem', 'selectCondition', 'footerClick'],
1302
+ setup: function setup(props, _ref) {
1303
+ var emit = _ref.emit;
1304
+ var t = (0,external_config_provider_.useLocale)('searchSelect');
1305
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1306
+ resolveClassName = _usePrefix.resolveClassName;
1307
+ var localFooterBtns = (0,external_vue_.computed)(function () {
1308
+ if (props.footerBtns === undefined || props.footerBtns.length === 0) {
1309
+ return [{
1310
+ id: 'confirm',
1311
+ name: t.value.ok
1312
+ }, {
1313
+ id: 'cancel',
1314
+ name: t.value.cancel,
1315
+ disabled: false
1316
+ }];
1317
+ }
1318
+ return props.footerBtns;
1319
+ });
1320
+ // events
1321
+ function handleClick(item) {
1322
+ emit('selectItem', item);
1323
+ }
1324
+ function handleClickCondition(item) {
1325
+ emit('selectCondition', item);
1326
+ }
1327
+ function handleClickFooterBtn(item) {
1328
+ emit('footerClick', item);
1329
+ }
1330
+ var filterList = (0,external_vue_.computed)(function () {
1331
+ var _a, _b;
1332
+ if (!((_a = props.list) === null || _a === void 0 ? void 0 : _a.length)) return [];
1333
+ if (!((_b = props.keyword) === null || _b === void 0 ? void 0 : _b.length)) return props.list;
1334
+ return props.list.filter(function (item) {
1335
+ return item.name.toLocaleLowerCase().includes(props.keyword.toLocaleLowerCase());
1336
+ });
1337
+ });
1338
+ function transformNode(str) {
1339
+ if (!str) return str;
1340
+ var keyword = props.keyword;
1341
+ var len = keyword.length;
1342
+ if (!(keyword === null || keyword === void 0 ? void 0 : keyword.trim().length) || !str.toLocaleLowerCase().includes(keyword.toLocaleLowerCase())) return str;
1343
+ var list = [];
1344
+ var lastIndex = -1;
1345
+ keyword = keyword.replace(/([.*/]{1})/gmi, '\\$1');
1346
+ str.replace(new RegExp("".concat(keyword), 'igm'), function (key, index) {
1347
+ if (list.length === 0 && index !== 0) {
1348
+ list.push(str.slice(0, index));
1349
+ } else if (lastIndex >= 0) {
1350
+ list.push(str.slice(lastIndex + key.length, index));
1351
+ }
1352
+ list.push((0,external_vue_.createVNode)("span", {
1353
+ "class": "is-keyword"
1354
+ }, [key]));
1355
+ lastIndex = index;
1356
+ return key;
1357
+ });
1358
+ if (lastIndex >= 0) {
1359
+ list.push(str.slice(lastIndex + len));
1360
+ }
1361
+ return list.length ? list : str;
1362
+ }
1363
+ function getSearchNode(item) {
1364
+ var _a;
1365
+ if (!((_a = item.value) === null || _a === void 0 ? void 0 : _a.name)) return transformNode(item.name);
1366
+ return [(0,external_vue_.createVNode)("span", {
1367
+ "class": "menu-name"
1368
+ }, [item.name, (0,external_vue_.createTextVNode)(":")]), item.value.name];
1369
+ }
1370
+ ;
1371
+ return {
1372
+ handleClick: handleClick,
1373
+ handleClickCondition: handleClickCondition,
1374
+ handleClickFooterBtn: handleClickFooterBtn,
1375
+ filterList: filterList,
1376
+ getSearchNode: getSearchNode,
1377
+ localFooterBtns: localFooterBtns,
1378
+ resolveClassName: resolveClassName
1379
+ };
1380
+ },
1381
+ render: function render() {
1382
+ var _this = this;
1383
+ var _a, _b, _c;
1384
+ return (0,external_vue_.createVNode)("div", {
1385
+ "class": this.resolveClassName('search-select-menu')
1386
+ }, [!!((_a = this.conditions) === null || _a === void 0 ? void 0 : _a.length) && (0,external_vue_.createVNode)("ul", {
1387
+ "class": "menu-header"
1388
+ }, [this.conditions.map(function (item) {
1389
+ return (0,external_vue_.createVNode)("li", {
1390
+ "key": item.id,
1391
+ "class": "menu-header-item ".concat(item.disabled ? 'is-disabled' : ''),
1392
+ "onClick": function onClick() {
1393
+ return !item.disabled && _this.handleClickCondition(item);
1394
+ }
1395
+ }, [item.name]);
1396
+ })]), (0,external_vue_.createVNode)("ul", {
1397
+ "class": "menu-content"
1398
+ }, [(_b = this.list) === null || _b === void 0 ? void 0 : _b.map(function (item) {
1399
+ return (0,external_vue_.createVNode)("li", {
1400
+ "class": "menu-item ".concat(item.disabled ? 'is-disabled' : '', " ").concat(_this.hoverId === item.id && !item.disabled ? 'is-hover' : ''),
1401
+ "key": item.id,
1402
+ "id": item.id,
1403
+ "tabindex": "-1",
1404
+ "onClick": function onClick() {
1405
+ return !item.disabled && _this.handleClick(item);
1406
+ }
1407
+ }, [_this.$slots["default"] ? _this.$slots["default"]({
1408
+ item: item,
1409
+ list: _this.list,
1410
+ multiple: !!_this.multiple,
1411
+ hoverId: _this.hoverId,
1412
+ getSearchNode: _this.getSearchNode
1413
+ }) : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [_this.getSearchNode(item), _this.multiple && _this.selected.includes(item.id) && (0,external_vue_.createVNode)(external_icon_.Done, {
1414
+ "class": "is-selected"
1415
+ }, null)])]);
1416
+ })]), this.multiple && ((_c = this.localFooterBtns) === null || _c === void 0 ? void 0 : _c.length) && (0,external_vue_.createVNode)("div", {
1417
+ "class": "menu-footer"
1418
+ }, [this.localFooterBtns.map(function (item) {
1419
+ return (0,external_vue_.createVNode)("span", {
1420
+ "class": "menu-footer-btn ".concat(item.disabled ? 'is-disabled' : ''),
1421
+ "key": item.id,
1422
+ "onClick": function onClick() {
1423
+ return !item.disabled && _this.handleClickFooterBtn(item);
1424
+ }
1425
+ }, [item.name]);
1426
+ })])]);
1427
+ }
1428
+ }));
1429
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/classCallCheck.js
1430
+ function _classCallCheck(instance, Constructor) {
1431
+ if (!(instance instanceof Constructor)) {
1432
+ throw new TypeError("Cannot call a class as a function");
1433
+ }
1434
+ }
1435
+ ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/createClass.js
1436
+
1437
+ function _defineProperties(target, props) {
1438
+ for (var i = 0; i < props.length; i++) {
1439
+ var descriptor = props[i];
1440
+ descriptor.enumerable = descriptor.enumerable || false;
1441
+ descriptor.configurable = true;
1442
+ if ("value" in descriptor) descriptor.writable = true;
1443
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
1444
+ }
1445
+ }
1446
+ function _createClass(Constructor, protoProps, staticProps) {
1447
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
1448
+ if (staticProps) _defineProperties(Constructor, staticProps);
1449
+ Object.defineProperty(Constructor, "prototype", {
1450
+ writable: false
1451
+ });
1452
+ return Constructor;
1453
+ }
1454
+ ;// CONCATENATED MODULE: ../../packages/search-select/src/utils.ts
1455
+
1456
+
1457
+ /*
1458
+ * Tencent is pleased to support the open source community by making
1459
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1460
+ *
1461
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1462
+ *
1463
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1464
+ *
1465
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1466
+ *
1467
+ * ---------------------------------------------------
1468
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1469
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1470
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1471
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1472
+ *
1473
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1474
+ * the Software.
1475
+ *
1476
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1477
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1478
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1479
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1480
+ * IN THE SOFTWARE.
1481
+ */
1482
+
1483
+ /**
1484
+ * @description: 获取menu list方法
1485
+ * @param {ISearchItem} item 已选择的key字段 为空则代表当前并未选择key字段
1486
+ * @param {string} keyword 已输入的文本
1487
+ * @return {*} menu list用于渲染选择弹层列表
1488
+ */
1489
+ var ValueBehavior;
1490
+ (function (ValueBehavior) {
1491
+ ValueBehavior["ALL"] = "all";
1492
+ ValueBehavior["NEEDKEY"] = "need-key";
1493
+ })(ValueBehavior || (ValueBehavior = {}));
1494
+ var SEARCH_SLECT_PROVIDER_KEY = Symbol('SEARCH_SLECT_PROVIDER_KEY');
1495
+ var useSearchSelectProvider = function useSearchSelectProvider(data) {
1496
+ (0,external_vue_.provide)(SEARCH_SLECT_PROVIDER_KEY, data);
1497
+ };
1498
+ var useSearchSelectInject = function useSearchSelectInject() {
1499
+ return (0,external_vue_.inject)(SEARCH_SLECT_PROVIDER_KEY);
1500
+ };
1501
+ var SearchInputMode;
1502
+ (function (SearchInputMode) {
1503
+ SearchInputMode["DEFAULT"] = "default";
1504
+ SearchInputMode["EDIT"] = "edit";
1505
+ })(SearchInputMode || (SearchInputMode = {}));
1506
+ var SelectedItem = /*#__PURE__*/function () {
1507
+ function SelectedItem(searchItem) {
1508
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';
1509
+ var splitCode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '|';
1510
+ _classCallCheck(this, SelectedItem);
1511
+ this.searchItem = searchItem;
1512
+ this.type = type;
1513
+ this.splitCode = splitCode;
1514
+ this.values = [];
1515
+ this.id = searchItem.id;
1516
+ this.name = searchItem.name;
1517
+ }
1518
+ _createClass(SelectedItem, [{
1519
+ key: "multiple",
1520
+ get: function get() {
1521
+ return !!this.searchItem.multiple;
1522
+ }
1523
+ }, {
1524
+ key: "placeholder",
1525
+ get: function get() {
1526
+ return this.searchItem.placeholder || '';
1527
+ }
1528
+ }, {
1529
+ key: "children",
1530
+ get: function get() {
1531
+ return this.searchItem.children || [];
1532
+ }
1533
+ }, {
1534
+ key: "validate",
1535
+ get: function get() {
1536
+ return !this.searchItem.noValidate;
1537
+ }
1538
+ }, {
1539
+ key: "inputInnerHtml",
1540
+ get: function get() {
1541
+ var _a;
1542
+ if (this.isSpecialType()) return this.name;
1543
+ return "".concat(this.keyInnerHtml).concat(((_a = this.values) === null || _a === void 0 ? void 0 : _a.map(function (item) {
1544
+ return item.name;
1545
+ }).join(this.splitCode)) || '');
1546
+ }
1547
+ }, {
1548
+ key: "inputInnerText",
1549
+ get: function get() {
1550
+ var _a;
1551
+ if (this.isSpecialType()) return this.name;
1552
+ return "".concat(this.keyInnerText).concat(((_a = this.values) === null || _a === void 0 ? void 0 : _a.map(function (item) {
1553
+ return item.name;
1554
+ }).join(this.splitCode)) || '');
1555
+ }
1556
+ }, {
1557
+ key: "keyInnerHtml",
1558
+ get: function get() {
1559
+ if (this.isSpecialType()) return this.name;
1560
+ return this.name ? "".concat(this.name, ":\xA0") : '';
1561
+ }
1562
+ }, {
1563
+ key: "keyInnerText",
1564
+ get: function get() {
1565
+ if (this.isSpecialType()) return this.name;
1566
+ return this.name ? "".concat(this.name, ": ") : '';
1567
+ }
1568
+ }, {
1569
+ key: "isSpecialType",
1570
+ value: function isSpecialType() {
1571
+ return ['text', 'condition'].includes(this.type);
1572
+ }
1573
+ }, {
1574
+ key: "addValue",
1575
+ value: function addValue(item) {
1576
+ if (this.multiple) {
1577
+ var index = this.values.findIndex(function (val) {
1578
+ return val.id === item.id;
1579
+ });
1580
+ if (index > -1) {
1581
+ this.values.splice(index, 1);
1582
+ return;
1583
+ }
1584
+ this.values.push(item);
1585
+ return;
1586
+ }
1587
+ this.values = [item];
1588
+ }
1589
+ }, {
1590
+ key: "toValue",
1591
+ value: function toValue() {
1592
+ var _a;
1593
+ var value = {
1594
+ id: this.id,
1595
+ name: this.name
1596
+ };
1597
+ if ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) {
1598
+ value.values = this.values.map(function (item) {
1599
+ return {
1600
+ id: item.id,
1601
+ name: item.name
1602
+ };
1603
+ });
1604
+ }
1605
+ if (this.type && this.type !== 'default') {
1606
+ value.type = this.type;
1607
+ }
1608
+ return value;
1609
+ }
1610
+ }, {
1611
+ key: "toValueKey",
1612
+ value: function toValueKey() {
1613
+ return JSON.stringify(this.toValue());
1614
+ }
1615
+ }, {
1616
+ key: "isInValueList",
1617
+ value: function isInValueList(item) {
1618
+ return this.children.some(function (v) {
1619
+ return v.id === (item === null || item === void 0 ? void 0 : item.id);
1620
+ });
1621
+ }
1622
+ }]);
1623
+ return SelectedItem;
1624
+ }();
1625
+ ;// CONCATENATED MODULE: ../../packages/search-select/src/input.tsx
1626
+
1627
+
1628
+
1629
+ /*
1630
+ * Tencent is pleased to support the open source community by making
1631
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
1632
+ *
1633
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
1634
+ *
1635
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
1636
+ *
1637
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
1638
+ *
1639
+ * ---------------------------------------------------
1640
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
1641
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
1642
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
1643
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1644
+ *
1645
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
1646
+ * the Software.
1647
+ *
1648
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
1649
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1650
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
1651
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1652
+ * IN THE SOFTWARE.
1653
+ */
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+
1660
+
1661
+ /* harmony default export */ const input = ((0,external_vue_.defineComponent)({
1662
+ name: 'SearchSelectInput',
1663
+ directives: {
1664
+ clickoutside: external_directives_.clickoutside
1665
+ },
1666
+ props: {
1667
+ data: {
1668
+ type: Array,
1669
+ required: true
1670
+ },
1671
+ showInputBefore: Boolean,
1672
+ showCondition: Boolean,
1673
+ clickOutside: Function,
1674
+ placeholder: String,
1675
+ conditions: {
1676
+ type: Array,
1677
+ "default": function _default() {
1678
+ return [];
1679
+ }
1680
+ },
1681
+ defautUsingItem: Object,
1682
+ mode: {
1683
+ type: String,
1684
+ "default": SearchInputMode.DEFAULT
1685
+ },
1686
+ getMenuList: Function,
1687
+ validateValues: Function,
1688
+ valueBehavior: String
1689
+ },
1690
+ emits: ['focus', 'add', 'delete'],
1691
+ setup: function setup(props, _ref) {
1692
+ var emit = _ref.emit,
1693
+ expose = _ref.expose;
1694
+ var t = (0,external_config_provider_.useLocale)('searchSelect');
1695
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
1696
+ resolveClassName = _usePrefix.resolveClassName;
1697
+ var inputRef = (0,external_vue_.ref)(null);
1698
+ var popoverRef = (0,external_vue_.ref)(null);
1699
+ var keyword = (0,external_vue_.ref)('');
1700
+ var showNoSelectValueError = (0,external_vue_.ref)(false);
1701
+ var isFocus = (0,external_vue_.ref)(false);
1702
+ var showPopover = (0,external_vue_.ref)(false);
1703
+ var usingItem = (0,external_vue_.ref)(props.defautUsingItem);
1704
+ var menuHoverId = (0,external_vue_.ref)('');
1705
+ var loading = (0,external_vue_.ref)(false);
1706
+ var debounceSetMenuList = (0,external_shared_.debounce)(300, setMenuList);
1707
+ // const selectMenuList = ref<ICommonItem[]>([]);
1708
+ var isBindEvent = false;
1709
+ var remoteMenuList = (0,external_vue_.ref)([]);
1710
+ var menuList = (0,external_vue_.ref)([]);
1711
+ var _useSearchSelectInjec = useSearchSelectInject(),
1712
+ editKey = _useSearchSelectInjec.editKey,
1713
+ onValidate = _useSearchSelectInjec.onValidate,
1714
+ valueSplitCode = _useSearchSelectInjec.valueSplitCode;
1715
+ (0,external_vue_.watch)(editKey, function () {
1716
+ if (props.mode === SearchInputMode.DEFAULT && editKey.value) {
1717
+ showPopover.value = false;
1718
+ }
1719
+ });
1720
+ // effects
1721
+ (0,external_vue_.watchEffect)(function () {
1722
+ if (!keyword.value) {
1723
+ setInputText();
1724
+ }
1725
+ }, {
1726
+ flush: 'pre'
1727
+ });
1728
+ (0,external_vue_.watch)([menuList, showPopover], function () {
1729
+ var _a;
1730
+ if (((_a = menuList.value) === null || _a === void 0 ? void 0 : _a.some(function (item) {
1731
+ return !item.disabled;
1732
+ })) && showPopover.value) {
1733
+ if (!isBindEvent) {
1734
+ if (props.valueBehavior === ValueBehavior.NEEDKEY) {
1735
+ menuHoverId.value = menuList.value.find(function (item) {
1736
+ return !item.disabled;
1737
+ }).id;
1738
+ } else {
1739
+ menuHoverId.value = '';
1740
+ }
1741
+ isBindEvent = true;
1742
+ document.addEventListener('keydown', handleDocumentKeydown);
1743
+ }
1744
+ } else {
1745
+ document.removeEventListener('keydown', handleDocumentKeydown);
1746
+ isBindEvent = false;
1747
+ if (props.valueBehavior !== ValueBehavior.NEEDKEY) {
1748
+ menuHoverId.value = '';
1749
+ }
1750
+ }
1751
+ });
1752
+ // events
1753
+ function handleDocumentKeydown(e) {
1754
+ switch (e.code) {
1755
+ case 'ArrowDown':
1756
+ case 'ArrowUp':
1757
+ documentArrowEvent(e);
1758
+ break;
1759
+ case 'Enter':
1760
+ case 'NumpadEnter':
1761
+ documentEnterEvent(e);
1762
+ break;
1763
+ }
1764
+ }
1765
+ function documentArrowEvent(e) {
1766
+ var _a;
1767
+ e.preventDefault();
1768
+ (_a = inputRef.value) === null || _a === void 0 ? void 0 : _a.blur();
1769
+ var len = menuList.value.length;
1770
+ var i = len;
1771
+ var index = menuList.value.findIndex(function (set) {
1772
+ return set.id === menuHoverId.value;
1773
+ });
1774
+ while (i >= 0) {
1775
+ index = e.code === 'ArrowDown' ? index + 1 : index - 1;
1776
+ // eslint-disable-next-line no-nested-ternary
1777
+ index = index > len - 1 ? 0 : index < 0 ? len - 1 : index;
1778
+ var item = menuList.value[index];
1779
+ if (item && !item.disabled) {
1780
+ i = -1;
1781
+ var dom = document.getElementById(item.id);
1782
+ dom === null || dom === void 0 ? void 0 : dom.focus();
1783
+ menuHoverId.value = item.id;
1784
+ return;
1785
+ }
1786
+ i -= 1;
1787
+ }
1788
+ }
1789
+ function documentEnterEvent(e) {
1790
+ if (isBindEvent) {
1791
+ e.preventDefault();
1792
+ var item = menuList.value.find(function (item) {
1793
+ return item.id === menuHoverId.value;
1794
+ });
1795
+ item && handleSelectItem(item);
1796
+ }
1797
+ }
1798
+ function handleClickOutside(e) {
1799
+ var _a, _b;
1800
+ if (!((_a = popoverRef.value) === null || _a === void 0 ? void 0 : _a.contains(e.target)) && ((_b = props.clickOutside) === null || _b === void 0 ? void 0 : _b.call(props, e.target, popoverRef.value))) {
1801
+ showPopover.value = false;
1802
+ isFocus.value = false;
1803
+ emit('focus', isFocus.value);
1804
+ }
1805
+ }
1806
+ function handleInputFocus(e) {
1807
+ setInputFocus();
1808
+ e && setMenuList();
1809
+ }
1810
+ function handleInputChange(event) {
1811
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1812
+ clearInput();
1813
+ var text = event.target.innerText;
1814
+ if (/(\r|\n)/gm.test(text) || /\s{2}/gm.test(text)) {
1815
+ event.preventDefault();
1816
+ text = text.replace(/(\r|\n)/gm, valueSplitCode.value).replace(/\s{2}/gm, '');
1817
+ inputRef.value.innerText = text;
1818
+ setInputFocus();
1819
+ keyword.value = text.replace(((_a = usingItem.value) === null || _a === void 0 ? void 0 : _a.keyInnerText) || '', '').trim();
1820
+ debounceSetMenuList();
1821
+ } else if (!keyword.value && text.length < (((_c = (_b = usingItem.value) === null || _b === void 0 ? void 0 : _b.inputInnerText) === null || _c === void 0 ? void 0 : _c.length) || 1)) {
1822
+ var outerText = text.replace("\xA0", " ").replace(((_d = usingItem.value) === null || _d === void 0 ? void 0 : _d.keyInnerText.replace("\xA0", " ").trim()) || '', '').trim();
1823
+ var hasKeyword = text && ((_e = usingItem.value) === null || _e === void 0 ? void 0 : _e.keyInnerText) && text.replace("\xA0", " ").includes(usingItem.value.keyInnerText.replace("\xA0", " ").trim());
1824
+ if (hasKeyword && outerText && ((_f = usingItem.value.values) === null || _f === void 0 ? void 0 : _f.length)) {
1825
+ keyword.value = outerText;
1826
+ console.info('outerText', outerText);
1827
+ debounceSetMenuList();
1828
+ return;
1829
+ }
1830
+ if (outerText || !(text === null || text === void 0 ? void 0 : text.length)) {
1831
+ usingItem.value = null;
1832
+ }
1833
+ keyword.value = outerText ? text : '';
1834
+ debounceSetMenuList();
1835
+ } else if (!((_h = (_g = usingItem.value) === null || _g === void 0 ? void 0 : _g.values) === null || _h === void 0 ? void 0 : _h.length)) {
1836
+ keyword.value = text.replace("\xA0", " ").replace(((_j = usingItem.value) === null || _j === void 0 ? void 0 : _j.keyInnerText.replace("\xA0", " ")) || '', '').trim();
1837
+ setInputFocus();
1838
+ debounceSetMenuList();
1839
+ }
1840
+ }
1841
+ function handleInputKeyup(event) {
1842
+ switch (event.code) {
1843
+ case 'Enter':
1844
+ case 'NumpadEnter':
1845
+ if (props.valueBehavior === ValueBehavior.NEEDKEY && menuList.value.some(function (item) {
1846
+ return item.id === menuHoverId.value;
1847
+ })) return;
1848
+ handleKeyEnter(event);
1849
+ break;
1850
+ case 'Backspace':
1851
+ handleKeyBackspace();
1852
+ default:
1853
+ showNoSelectValueError.value = false;
1854
+ break;
1855
+ }
1856
+ }
1857
+ function handleKeyEnter(event) {
1858
+ var _a;
1859
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee() {
1860
+ var value, _res, values, valueList, _res2, _value, _res3, _value2, _res4, res;
1861
+ return regenerator_default().wrap(function _callee$(_context) {
1862
+ while (1) switch (_context.prev = _context.next) {
1863
+ case 0:
1864
+ event === null || event === void 0 ? void 0 : event.preventDefault();
1865
+ // resolve 中文输入时直接按下enter的错误表现
1866
+ _context.next = 3;
1867
+ return new Promise(function (r) {
1868
+ return setTimeout(r, 0);
1869
+ });
1870
+ case 3:
1871
+ if (usingItem.value) {
1872
+ _context.next = 16;
1873
+ break;
1874
+ }
1875
+ if (!(!keyword.value || props.valueBehavior === ValueBehavior.NEEDKEY)) {
1876
+ _context.next = 6;
1877
+ break;
1878
+ }
1879
+ return _context.abrupt("return");
1880
+ case 6:
1881
+ value = {
1882
+ id: keyword.value,
1883
+ name: keyword.value
1884
+ };
1885
+ _context.next = 9;
1886
+ return validateUsingItemValues(value);
1887
+ case 9:
1888
+ _res = _context.sent;
1889
+ if (_res) {
1890
+ _context.next = 12;
1891
+ break;
1892
+ }
1893
+ return _context.abrupt("return");
1894
+ case 12:
1895
+ emit('add', new SelectedItem(value, 'text', valueSplitCode.value));
1896
+ keyword.value = '';
1897
+ setMenuList();
1898
+ return _context.abrupt("return");
1899
+ case 16:
1900
+ values = usingItem.value.values;
1901
+ if (values === null || values === void 0 ? void 0 : values.length) {
1902
+ _context.next = 43;
1903
+ break;
1904
+ }
1905
+ if (!((_a = keyword.value) === null || _a === void 0 ? void 0 : _a.length)) {
1906
+ _context.next = 41;
1907
+ break;
1908
+ }
1909
+ if (!keyword.value.includes(valueSplitCode.value)) {
1910
+ _context.next = 29;
1911
+ break;
1912
+ }
1913
+ valueList = keyword.value.split(valueSplitCode.value);
1914
+ _context.next = 23;
1915
+ return validateUsingItemValues({
1916
+ id: keyword.value,
1917
+ name: keyword.value
1918
+ });
1919
+ case 23:
1920
+ _res2 = _context.sent;
1921
+ if (_res2) {
1922
+ _context.next = 26;
1923
+ break;
1924
+ }
1925
+ return _context.abrupt("return");
1926
+ case 26:
1927
+ valueList.forEach(function (v) {
1928
+ return usingItem.value.addValue({
1929
+ id: v,
1930
+ name: v
1931
+ });
1932
+ });
1933
+ _context.next = 36;
1934
+ break;
1935
+ case 29:
1936
+ _value = {
1937
+ id: keyword.value,
1938
+ name: keyword.value
1939
+ };
1940
+ _context.next = 32;
1941
+ return validateUsingItemValues(_value);
1942
+ case 32:
1943
+ _res3 = _context.sent;
1944
+ if (_res3) {
1945
+ _context.next = 35;
1946
+ break;
1947
+ }
1948
+ return _context.abrupt("return");
1949
+ case 35:
1950
+ usingItem.value.addValue(_value);
1951
+ case 36:
1952
+ emit('add', usingItem.value);
1953
+ keyword.value = '';
1954
+ usingItem.value = null;
1955
+ setInputFocus(true);
1956
+ return _context.abrupt("return");
1957
+ case 41:
1958
+ showNoSelectValueError.value = true;
1959
+ return _context.abrupt("return");
1960
+ case 43:
1961
+ if (!keyword.value) {
1962
+ _context.next = 56;
1963
+ break;
1964
+ }
1965
+ _value2 = {
1966
+ id: keyword.value,
1967
+ name: keyword.value
1968
+ };
1969
+ _context.next = 47;
1970
+ return validateUsingItemValues(_value2);
1971
+ case 47:
1972
+ _res4 = _context.sent;
1973
+ if (_res4) {
1974
+ _context.next = 50;
1975
+ break;
1976
+ }
1977
+ return _context.abrupt("return");
1978
+ case 50:
1979
+ usingItem.value.addValue(_value2);
1980
+ emit('add', usingItem.value);
1981
+ keyword.value = '';
1982
+ usingItem.value = null;
1983
+ setInputFocus(true);
1984
+ return _context.abrupt("return");
1985
+ case 56:
1986
+ _context.next = 58;
1987
+ return validateUsingItemValues();
1988
+ case 58:
1989
+ res = _context.sent;
1990
+ if (res) {
1991
+ _context.next = 61;
1992
+ break;
1993
+ }
1994
+ return _context.abrupt("return");
1995
+ case 61:
1996
+ setSelectedItem();
1997
+ case 62:
1998
+ case "end":
1999
+ return _context.stop();
2000
+ }
2001
+ }, _callee);
2002
+ }));
2003
+ }
2004
+ function handleKeyBackspace() {
2005
+ var _a, _b;
2006
+ // 删除已选择项
2007
+ if (!usingItem.value && !keyword.value) {
2008
+ emit('delete');
2009
+ // eslint-disable-next-line @typescript-eslint/no-misused-promises
2010
+ (0,external_vue_.nextTick)(setMenuList);
2011
+ return;
2012
+ }
2013
+ if ((_a = usingItem.value) === null || _a === void 0 ? void 0 : _a.values.length) {
2014
+ // 删除选项
2015
+ if (((_b = usingItem.value) === null || _b === void 0 ? void 0 : _b.multiple) || usingItem.value.isInValueList(usingItem.value.values[0]) || props.mode === SearchInputMode.EDIT && !keyword.value) {
2016
+ usingItem.value.values.splice(-1, 1);
2017
+ keyword.value = '';
2018
+ setInputFocus();
2019
+ return;
2020
+ }
2021
+ } else if (!keyword.value) {
2022
+ usingItem.value = null;
2023
+ keyword.value = '';
2024
+ setMenuList();
2025
+ }
2026
+ onValidate('');
2027
+ }
2028
+ function handleSelectItem(item, type) {
2029
+ var _a, _b, _c, _d, _e, _f;
2030
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee2() {
2031
+ var seleted, _res5, isCondition, res;
2032
+ return regenerator_default().wrap(function _callee2$(_context2) {
2033
+ while (1) switch (_context2.prev = _context2.next) {
2034
+ case 0:
2035
+ if (!((_a = item.value) === null || _a === void 0 ? void 0 : _a.id)) {
2036
+ _context2.next = 21;
2037
+ break;
2038
+ }
2039
+ if (!(props.valueBehavior === ValueBehavior.NEEDKEY && item.value || !props.validateValues)) {
2040
+ _context2.next = 8;
2041
+ break;
2042
+ }
2043
+ seleted = new SelectedItem(Object.assign(Object.assign({}, item), {
2044
+ id: (_b = item.realId) !== null && _b !== void 0 ? _b : item.id
2045
+ }), type, valueSplitCode.value);
2046
+ seleted.addValue(item.value);
2047
+ setSelectedItem(seleted);
2048
+ if (props.valueBehavior === ValueBehavior.NEEDKEY && menuHoverId.value) {
2049
+ setInputFocus(true);
2050
+ }
2051
+ menuHoverId.value = '';
2052
+ return _context2.abrupt("return");
2053
+ case 8:
2054
+ usingItem.value = new SelectedItem(Object.assign(Object.assign({}, item), {
2055
+ id: (_c = item.realId) !== null && _c !== void 0 ? _c : item.id
2056
+ }), type, valueSplitCode.value);
2057
+ usingItem.value.addValue(item.value);
2058
+ _context2.next = 12;
2059
+ return validateUsingItemValues(item.value);
2060
+ case 12:
2061
+ _res5 = _context2.sent;
2062
+ if (_res5) {
2063
+ _context2.next = 16;
2064
+ break;
2065
+ }
2066
+ usingItem.value = null;
2067
+ return _context2.abrupt("return");
2068
+ case 16:
2069
+ ;
2070
+ setSelectedItem(usingItem.value);
2071
+ menuHoverId.value = '';
2072
+ setInputFocus(true);
2073
+ return _context2.abrupt("return");
2074
+ case 21:
2075
+ if (!(!usingItem.value || !((_d = inputRef === null || inputRef === void 0 ? void 0 : inputRef.value) === null || _d === void 0 ? void 0 : _d.innerText))) {
2076
+ _context2.next = 29;
2077
+ break;
2078
+ }
2079
+ usingItem.value = new SelectedItem(item, type, valueSplitCode.value);
2080
+ keyword.value = '';
2081
+ isCondition = type === 'condition';
2082
+ isCondition && setSelectedItem();
2083
+ showPopover.value = isCondition || !!usingItem.value.children.length;
2084
+ setInputFocus(props.valueBehavior === ValueBehavior.NEEDKEY && !!menuHoverId.value);
2085
+ return _context2.abrupt("return");
2086
+ case 29:
2087
+ if (!(((_e = usingItem.value) === null || _e === void 0 ? void 0 : _e.type) === 'condition')) {
2088
+ _context2.next = 33;
2089
+ break;
2090
+ }
2091
+ usingItem.value = new SelectedItem(item, type, valueSplitCode.value);
2092
+ setSelectedItem();
2093
+ return _context2.abrupt("return");
2094
+ case 33:
2095
+ usingItem.value.addValue(item);
2096
+ _context2.next = 36;
2097
+ return validateUsingItemValues(item);
2098
+ case 36:
2099
+ res = _context2.sent;
2100
+ if (res) {
2101
+ _context2.next = 39;
2102
+ break;
2103
+ }
2104
+ return _context2.abrupt("return");
2105
+ case 39:
2106
+ if (!usingItem.value.multiple) setSelectedItem();
2107
+ if (props.valueBehavior === ValueBehavior.NEEDKEY && ((_f = usingItem.value) === null || _f === void 0 ? void 0 : _f.multiple)) {
2108
+ setInputFocus();
2109
+ }
2110
+ case 41:
2111
+ case "end":
2112
+ return _context2.stop();
2113
+ }
2114
+ }, _callee2);
2115
+ }));
2116
+ }
2117
+ function handleSelectCondtionItem(item) {
2118
+ handleSelectItem(item, 'condition');
2119
+ }
2120
+ function handleMenuFooterClick(item) {
2121
+ var _a;
2122
+ switch (item.id) {
2123
+ case 'confirm':
2124
+ if (!((_a = usingItem.value) === null || _a === void 0 ? void 0 : _a.values.length)) return;
2125
+ keyword.value = '';
2126
+ handleKeyEnter();
2127
+ break;
2128
+ case 'cancel':
2129
+ usingItem.value.values = [];
2130
+ showPopover.value = false;
2131
+ break;
2132
+ }
2133
+ }
2134
+ // functions
2135
+ function validateUsingItemValues(value) {
2136
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee3() {
2137
+ var _usingItem$value, searchItem, validate, values;
2138
+ return regenerator_default().wrap(function _callee3$(_context3) {
2139
+ while (1) switch (_context3.prev = _context3.next) {
2140
+ case 0:
2141
+ if (usingItem.value) {
2142
+ _context3.next = 4;
2143
+ break;
2144
+ }
2145
+ _context3.next = 3;
2146
+ return validateValues(null, [value]);
2147
+ case 3:
2148
+ return _context3.abrupt("return", _context3.sent);
2149
+ case 4:
2150
+ _usingItem$value = usingItem.value, searchItem = _usingItem$value.searchItem, validate = _usingItem$value.validate, values = _usingItem$value.values;
2151
+ if (!(validate && typeof props.validateValues === 'function')) {
2152
+ _context3.next = 9;
2153
+ break;
2154
+ }
2155
+ _context3.next = 8;
2156
+ return validateValues(searchItem, value ? [value] : values);
2157
+ case 8:
2158
+ return _context3.abrupt("return", _context3.sent);
2159
+ case 9:
2160
+ onValidate('');
2161
+ return _context3.abrupt("return", true);
2162
+ case 11:
2163
+ case "end":
2164
+ return _context3.stop();
2165
+ }
2166
+ }, _callee3);
2167
+ }));
2168
+ }
2169
+ function validateValues(searchItem, value) {
2170
+ var _a;
2171
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee4() {
2172
+ var validateStr;
2173
+ return regenerator_default().wrap(function _callee4$(_context4) {
2174
+ while (1) switch (_context4.prev = _context4.next) {
2175
+ case 0:
2176
+ _context4.next = 2;
2177
+ return (_a = props.validateValues) === null || _a === void 0 ? void 0 : _a.call(props, searchItem !== null && searchItem !== void 0 ? searchItem : null, value)["catch"](function () {
2178
+ return false;
2179
+ });
2180
+ case 2:
2181
+ validateStr = _context4.sent;
2182
+ if (!(typeof validateStr === 'string' || validateStr === false)) {
2183
+ _context4.next = 6;
2184
+ break;
2185
+ }
2186
+ onValidate(validateStr || '校验错误');
2187
+ return _context4.abrupt("return", false);
2188
+ case 6:
2189
+ onValidate('');
2190
+ return _context4.abrupt("return", true);
2191
+ case 8:
2192
+ case "end":
2193
+ return _context4.stop();
2194
+ }
2195
+ }, _callee4);
2196
+ }));
2197
+ }
2198
+ function setInputFocus() {
2199
+ var refleshMenuList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
2200
+ if (refleshMenuList) {
2201
+ (0,external_vue_.nextTick)().then(function () {
2202
+ setMenuList();
2203
+ });
2204
+ }
2205
+ isFocus.value = true;
2206
+ showPopover.value = true;
2207
+ showNoSelectValueError.value = false;
2208
+ var timer = setTimeout(function () {
2209
+ if (inputRef.value) {
2210
+ inputRef.value.focus(); // 光标移至最后
2211
+ var selection = window.getSelection();
2212
+ if (selection.focusOffset === 0) {
2213
+ selection.selectAllChildren(inputRef.value);
2214
+ selection.collapseToEnd();
2215
+ }
2216
+ }
2217
+ window.clearTimeout(timer);
2218
+ }, 0);
2219
+ emit('focus', isFocus.value);
2220
+ }
2221
+ function setMenuList() {
2222
+ var _a, _b, _c, _d, _e;
2223
+ return __awaiter(this, void 0, void 0, /*#__PURE__*/regenerator_default().mark(function _callee5() {
2224
+ var list, hoverItem;
2225
+ return regenerator_default().wrap(function _callee5$(_context5) {
2226
+ while (1) switch (_context5.prev = _context5.next) {
2227
+ case 0:
2228
+ list = [];
2229
+ if (!(typeof props.getMenuList === 'function' && (typeof ((_b = (_a = usingItem.value) === null || _a === void 0 ? void 0 : _a.searchItem) === null || _b === void 0 ? void 0 : _b.async) === 'undefined' || usingItem.value.searchItem.async === true))) {
2230
+ _context5.next = 9;
2231
+ break;
2232
+ }
2233
+ loading.value = true;
2234
+ _context5.next = 5;
2235
+ return props.getMenuList((_c = usingItem.value) === null || _c === void 0 ? void 0 : _c.searchItem, keyword.value)["catch"](function () {
2236
+ return [];
2237
+ });
2238
+ case 5:
2239
+ list = _context5.sent;
2240
+ loading.value = false;
2241
+ _context5.next = 10;
2242
+ break;
2243
+ case 9:
2244
+ if (!(usingItem === null || usingItem === void 0 ? void 0 : usingItem.value)) {
2245
+ if (!((_d = keyword.value) === null || _d === void 0 ? void 0 : _d.length)) {
2246
+ list = props.data.filter(function (item) {
2247
+ return !item.isSelected;
2248
+ }).slice();
2249
+ } else props.data.filter(function (item) {
2250
+ return !item.isSelected;
2251
+ }).forEach(function (item) {
2252
+ var _a, _b;
2253
+ var isMatched = item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase());
2254
+ if (isMatched) {
2255
+ var _list;
2256
+ list.push(item);
2257
+ var filterList = [];
2258
+ (_a = item.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
2259
+ filterList.push(Object.assign(Object.assign({}, item), {
2260
+ realId: item.id,
2261
+ id: (0,external_shared_.random)(10),
2262
+ value: child
2263
+ }));
2264
+ });
2265
+ !filterList.length && !item.onlyRecommendChildren && filterList.push(Object.assign(Object.assign({}, item), {
2266
+ realId: item.id,
2267
+ id: (0,external_shared_.random)(10),
2268
+ value: {
2269
+ id: keyword.value,
2270
+ name: keyword.value
2271
+ }
2272
+ }));
2273
+ (_list = list).push.apply(_list, filterList);
2274
+ } else {
2275
+ var _list2;
2276
+ var _filterList = [];
2277
+ (_b = item.children) === null || _b === void 0 ? void 0 : _b.forEach(function (child) {
2278
+ if (child.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase())) {
2279
+ _filterList.push(Object.assign(Object.assign({}, item), {
2280
+ realId: item.id,
2281
+ id: (0,external_shared_.random)(10),
2282
+ value: child
2283
+ }));
2284
+ }
2285
+ });
2286
+ !_filterList.length && !item.onlyRecommendChildren && _filterList.push(Object.assign(Object.assign({}, item), {
2287
+ value: {
2288
+ id: keyword.value,
2289
+ name: keyword.value
2290
+ }
2291
+ }));
2292
+ (_list2 = list).push.apply(_list2, _filterList);
2293
+ }
2294
+ });
2295
+ } else if (usingItem.value.type === 'condition') {
2296
+ list = props.conditions;
2297
+ } else if (!((_e = usingItem.value.values) === null || _e === void 0 ? void 0 : _e.length) || usingItem.value.multiple || props.mode === SearchInputMode.EDIT) {
2298
+ list = usingItem.value.children.filter(function (item) {
2299
+ return item.name.toLocaleLowerCase().includes(keyword.value.toLocaleLowerCase());
2300
+ });
2301
+ }
2302
+ case 10:
2303
+ menuList.value = list;
2304
+ if (props.valueBehavior === ValueBehavior.NEEDKEY) {
2305
+ hoverItem = list.find(function (item) {
2306
+ return !item.disabled;
2307
+ });
2308
+ if (hoverItem && (!menuHoverId.value || menuHoverId.value && !list.some(function (item) {
2309
+ return item.id === menuHoverId.value;
2310
+ }))) {
2311
+ menuHoverId.value = hoverItem.id;
2312
+ }
2313
+ }
2314
+ case 12:
2315
+ case "end":
2316
+ return _context5.stop();
2317
+ }
2318
+ }, _callee5);
2319
+ }));
2320
+ }
2321
+ function setSelectedItem(item) {
2322
+ emit('add', item !== null && item !== void 0 ? item : usingItem.value);
2323
+ usingItem.value = null;
2324
+ keyword.value = '';
2325
+ setInputFocus(props.valueBehavior === ValueBehavior.NEEDKEY);
2326
+ }
2327
+ function clearInput() {
2328
+ var text = inputRef.value.innerText;
2329
+ if (text[text.length - 1] === '\n' || text[0] === '\r') {
2330
+ setInputText(text.slice(0, -1));
2331
+ clearInput();
2332
+ } else if (text[0] === '\n' || text[0] === '\r') {
2333
+ setInputText(text.slice(1));
2334
+ clearInput();
2335
+ }
2336
+ }
2337
+ function setInputText() {
2338
+ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
2339
+ var _a;
2340
+ if (inputRef.value) {
2341
+ inputRef.value.innerHTML = text || ((_a = usingItem.value) === null || _a === void 0 ? void 0 : _a.inputInnerHtml) || '';
2342
+ }
2343
+ }
2344
+ // expose
2345
+ expose({
2346
+ handleInputFocus: handleInputFocus,
2347
+ isFocus: isFocus
2348
+ });
2349
+ return {
2350
+ popoverRef: popoverRef,
2351
+ inputRef: inputRef,
2352
+ keyword: keyword,
2353
+ loading: loading,
2354
+ remoteMenuList: remoteMenuList,
2355
+ menuList: menuList,
2356
+ menuHoverId: menuHoverId,
2357
+ isFocus: isFocus,
2358
+ usingItem: usingItem,
2359
+ showPopover: showPopover,
2360
+ showNoSelectValueError: showNoSelectValueError,
2361
+ debounceSetMenuList: debounceSetMenuList,
2362
+ documentArrowEvent: documentArrowEvent,
2363
+ handleClickOutside: handleClickOutside,
2364
+ handleInputFocus: handleInputFocus,
2365
+ handleInputChange: handleInputChange,
2366
+ handleInputKeyup: handleInputKeyup,
2367
+ handleSelectItem: handleSelectItem,
2368
+ handleSelectCondtionItem: handleSelectCondtionItem,
2369
+ handleMenuFooterClick: handleMenuFooterClick,
2370
+ resolveClassName: resolveClassName,
2371
+ t: t
2372
+ };
2373
+ },
2374
+ render: function render() {
2375
+ var _this = this;
2376
+ var _a, _b;
2377
+ var _ref2 = this.usingItem || {},
2378
+ multiple = _ref2.multiple,
2379
+ values = _ref2.values,
2380
+ placeholder = _ref2.placeholder,
2381
+ inputInnerHtml = _ref2.inputInnerHtml;
2382
+ var showInputAfter = !((_a = this.keyword) === null || _a === void 0 ? void 0 : _a.length) && !(values === null || values === void 0 ? void 0 : values.length) && placeholder;
2383
+ var showPopover = this.loading || this.showNoSelectValueError || this.showPopover && !!((_b = this.menuList) === null || _b === void 0 ? void 0 : _b.length);
2384
+ var showCondition = !this.usingItem && this.showCondition;
2385
+ var menuSlots = Object.assign({}, this.$slots.menu ? {
2386
+ "default": function _default(data) {
2387
+ var _a, _b;
2388
+ return (_b = (_a = _this.$slots).menu) === null || _b === void 0 ? void 0 : _b.call(_a, data);
2389
+ }
2390
+ } : {});
2391
+ var inputContent = function inputContent() {
2392
+ var _a;
2393
+ return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
2394
+ "ref": "inputRef",
2395
+ "class": {
2396
+ 'div-input': true,
2397
+ 'input-before': _this.showInputBefore && !((_a = _this.keyword) === null || _a === void 0 ? void 0 : _a.length),
2398
+ 'input-after': showInputAfter
2399
+ },
2400
+ "contenteditable": true,
2401
+ "data-placeholder": !inputInnerHtml && !_this.keyword ? _this.placeholder : '',
2402
+ "data-tips": placeholder || '',
2403
+ "spellcheck": "false",
2404
+ "onFocus": _this.handleInputFocus,
2405
+ "onInput": _this.handleInputChange,
2406
+ "onKeydown": _this.handleInputKeyup
2407
+ }, null), [[(0,external_vue_.resolveDirective)("clickoutside"), _this.handleClickOutside]]);
2408
+ };
2409
+ var popoverContent = function popoverContent() {
2410
+ var _a;
2411
+ if (_this.loading) {
2412
+ return (0,external_vue_.createVNode)("div", null, [_this.t.loading]);
2413
+ }
2414
+ if (_this.showNoSelectValueError) {
2415
+ return (0,external_vue_.createVNode)("div", null, [_this.t.filterQueryMustHasValue]);
2416
+ }
2417
+ return ((_a = _this.menuList) === null || _a === void 0 ? void 0 : _a.length) ? (0,external_vue_.createVNode)("div", {
2418
+ "ref": "popoverRef",
2419
+ "class": _this.resolveClassName('search-select-popover')
2420
+ }, [(0,external_vue_.createVNode)(menu, {
2421
+ "list": _this.menuList,
2422
+ "keyword": _this.keyword,
2423
+ "multiple": !!multiple,
2424
+ "hoverId": _this.menuHoverId,
2425
+ "selected": (values === null || values === void 0 ? void 0 : values.map(function (item) {
2426
+ return item.id;
2427
+ })) || [],
2428
+ "conditions": showCondition ? _this.conditions : [],
2429
+ "onSelectItem": _this.handleSelectItem,
2430
+ "onSelectCondition": _this.handleSelectCondtionItem,
2431
+ "onFooterClick": _this.handleMenuFooterClick
2432
+ }, Object.assign({}, menuSlots))]) : undefined;
2433
+ };
2434
+ return (0,external_vue_.createVNode)((external_popover_default()), {
2435
+ "trigger": "manual",
2436
+ "theme": "light",
2437
+ "placement": "bottom-start",
2438
+ "arrow": false,
2439
+ "disableOutsideClick": true,
2440
+ "isShow": showPopover
2441
+ }, {
2442
+ "default": inputContent,
2443
+ content: popoverContent
2444
+ });
2445
+ }
2446
+ }));
2447
+ ;// CONCATENATED MODULE: ../../packages/search-select/src/selected.tsx
2448
+
2449
+ /*
2450
+ * Tencent is pleased to support the open source community by making
2451
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2452
+ *
2453
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2454
+ *
2455
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2456
+ *
2457
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2458
+ *
2459
+ * ---------------------------------------------------
2460
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2461
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2462
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2463
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2464
+ *
2465
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2466
+ * the Software.
2467
+ *
2468
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2469
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2470
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2471
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2472
+ * IN THE SOFTWARE.
2473
+ */
2474
+
2475
+
2476
+
2477
+
2478
+ ;
2479
+ /* harmony default export */ const selected = ((0,external_vue_.defineComponent)({
2480
+ name: 'SearchSelected',
2481
+ props: {
2482
+ data: {
2483
+ type: Array,
2484
+ required: true
2485
+ },
2486
+ selectedList: {
2487
+ type: Array,
2488
+ required: true
2489
+ },
2490
+ overflowIndex: {
2491
+ type: Number,
2492
+ "default": -1
2493
+ },
2494
+ conditions: {
2495
+ type: Array,
2496
+ "default": function _default() {
2497
+ return [];
2498
+ }
2499
+ },
2500
+ getMenuList: Function,
2501
+ validateValues: Function,
2502
+ valueBehavior: String
2503
+ },
2504
+ emits: ['delete'],
2505
+ setup: function setup(_props, _ref) {
2506
+ var emit = _ref.emit;
2507
+ var inputRef = (0,external_vue_.ref)(null);
2508
+ var _useSearchSelectInjec = useSearchSelectInject(),
2509
+ onEditClick = _useSearchSelectInjec.onEditClick,
2510
+ onEditEnter = _useSearchSelectInjec.onEditEnter,
2511
+ onEditBlur = _useSearchSelectInjec.onEditBlur,
2512
+ editKey = _useSearchSelectInjec.editKey,
2513
+ valueSplitCode = _useSearchSelectInjec.valueSplitCode;
2514
+ function handleDeleteSelected(index) {
2515
+ emit('delete', index);
2516
+ }
2517
+ function handleEditSeleted(e, item, index) {
2518
+ e.preventDefault();
2519
+ e.stopPropagation();
2520
+ onEditClick(item, index);
2521
+ // magic code
2522
+ setTimeout(function () {
2523
+ return inputRef.value.handleInputFocus();
2524
+ }, 200);
2525
+ }
2526
+ ;
2527
+ function handleAddSelected(item, index) {
2528
+ onEditEnter(item, index);
2529
+ }
2530
+ function handleInputFocus(isFocus) {
2531
+ if (isFocus) return;
2532
+ onEditBlur();
2533
+ }
2534
+ function handleInputOutside() {
2535
+ return true;
2536
+ }
2537
+ function copySeletedItem(item) {
2538
+ var newItem = new SelectedItem(item.searchItem, item.type, valueSplitCode.value);
2539
+ newItem.values = item.values.slice();
2540
+ return newItem;
2541
+ }
2542
+ return {
2543
+ inputRef: inputRef,
2544
+ editKey: editKey,
2545
+ copySeletedItem: copySeletedItem,
2546
+ handleDeleteSelected: handleDeleteSelected,
2547
+ handleEditSeleted: handleEditSeleted,
2548
+ handleInputOutside: handleInputOutside,
2549
+ handleAddSelected: handleAddSelected,
2550
+ handleInputFocus: handleInputFocus
2551
+ };
2552
+ },
2553
+ render: function render() {
2554
+ var _this = this;
2555
+ var contentComponent = function contentComponent(item, index) {
2556
+ return _this.editKey === "".concat(item.id, "_").concat(index) ? (0,external_vue_.createVNode)("div", {
2557
+ "class": "selected-input",
2558
+ "key": _this.editKey.toString()
2559
+ }, [(0,external_vue_.createVNode)(input, {
2560
+ "ref": "inputRef",
2561
+ "key": _this.editKey.toString(),
2562
+ "mode": SearchInputMode.EDIT,
2563
+ "data": _this.data,
2564
+ "showCondition": false,
2565
+ "conditions": _this.conditions,
2566
+ "defautUsingItem": _this.copySeletedItem(item),
2567
+ "clickOutside": _this.handleInputOutside,
2568
+ "getMenuList": _this.getMenuList,
2569
+ "validateValues": _this.validateValues,
2570
+ "valueBehavior": _this.valueBehavior,
2571
+ "onAdd": function onAdd(v) {
2572
+ return _this.handleAddSelected(v, index);
2573
+ },
2574
+ "onFocus": _this.handleInputFocus
2575
+ }, null)]) : (0,external_vue_.createVNode)("li", {
2576
+ "class": "search-container-selected ".concat(!(_this.overflowIndex >= 0 ? index < _this.overflowIndex : index >= 0) ? 'hidden-selected' : ''),
2577
+ "key": "".concat(item.id, "_").concat(index)
2578
+ }, [(0,external_vue_.createVNode)("span", {
2579
+ "class": "selected-name",
2580
+ "onClick": function onClick(e) {
2581
+ return _this.handleEditSeleted(e, item, index);
2582
+ }
2583
+ }, [item.inputInnerText]), (0,external_vue_.createVNode)(external_icon_.Error, {
2584
+ "class": "selected-clear",
2585
+ "onClick": function onClick() {
2586
+ return _this.handleDeleteSelected(index);
2587
+ }
2588
+ }, null)]);
2589
+ };
2590
+ return (0,external_vue_.createVNode)(external_vue_.Fragment, null, [this.selectedList.map(function (item, index) {
2591
+ return [_this.overflowIndex >= 0 && index === _this.overflowIndex && (0,external_vue_.createVNode)("div", {
2592
+ "class": "search-container-selected overflow-selected"
2593
+ }, [(0,external_vue_.createTextVNode)("+"), _this.selectedList.length - _this.overflowIndex]), contentComponent(item, index)];
2594
+ })]);
2595
+ }
2596
+ }));
2597
+ ;// CONCATENATED MODULE: ../../packages/search-select/src/search-select.tsx
2598
+
2599
+
2600
+ /*
2601
+ * Tencent is pleased to support the open source community by making
2602
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2603
+ *
2604
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2605
+ *
2606
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2607
+ *
2608
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2609
+ *
2610
+ * ---------------------------------------------------
2611
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
2612
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
2613
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
2614
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2615
+ *
2616
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
2617
+ * the Software.
2618
+ *
2619
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
2620
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2621
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
2622
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2623
+ * IN THE SOFTWARE.
2624
+ */
2625
+
2626
+
2627
+
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+
2634
+ var INPUT_PADDING_WIDTH = 40;
2635
+ var SELETED_MARGING_RIGHT = 6;
2636
+ var SearchSelectProps = {
2637
+ data: {
2638
+ type: Array,
2639
+ "default": function _default() {
2640
+ return [];
2641
+ }
2642
+ },
2643
+ modelValue: {
2644
+ type: Array,
2645
+ "default": function _default() {
2646
+ return [];
2647
+ }
2648
+ },
2649
+ shrink: {
2650
+ type: Boolean,
2651
+ "default": true
2652
+ },
2653
+ maxHeight: {
2654
+ type: Number,
2655
+ "default": 120
2656
+ },
2657
+ minHeight: {
2658
+ type: Number,
2659
+ "default": 26
2660
+ },
2661
+ conditions: {
2662
+ type: Array,
2663
+ "default": function _default() {
2664
+ return [];
2665
+ }
2666
+ },
2667
+ clearable: {
2668
+ type: Boolean,
2669
+ "default": true
2670
+ },
2671
+ placeholder: String,
2672
+ getMenuList: Function,
2673
+ validateValues: Function,
2674
+ valueSplitCode: {
2675
+ type: String,
2676
+ "default": '|'
2677
+ },
2678
+ uniqueSelect: {
2679
+ type: Boolean,
2680
+ "default": false
2681
+ },
2682
+ valueBehavior: {
2683
+ type: String,
2684
+ "default": ValueBehavior.ALL,
2685
+ validator: function validator(v) {
2686
+ return [ValueBehavior.ALL, ValueBehavior.NEEDKEY].includes(v);
2687
+ }
2688
+ }
2689
+ };
2690
+ /* harmony default export */ const search_select = ((0,external_vue_.defineComponent)({
2691
+ name: 'SearchSelect',
2692
+ directives: {
2693
+ clickoutside: external_directives_.clickoutside
2694
+ },
2695
+ props: SearchSelectProps,
2696
+ emits: ['update:modelValue', 'search'],
2697
+ setup: function setup(props, _ref) {
2698
+ var emit = _ref.emit;
2699
+ var t = (0,external_config_provider_.useLocale)('searchSelect');
2700
+ var _usePrefix = (0,external_config_provider_.usePrefix)(),
2701
+ resolveClassName = _usePrefix.resolveClassName;
2702
+ var localConditions = (0,external_vue_.computed)(function () {
2703
+ if (props.conditions === undefined) {
2704
+ return [{
2705
+ id: 'or',
2706
+ name: t.value.or
2707
+ }, {
2708
+ id: 'and',
2709
+ name: t.value.and
2710
+ }];
2711
+ }
2712
+ return props.conditions;
2713
+ });
2714
+ // refs
2715
+ var inputRef = (0,external_vue_.ref)(null);
2716
+ var wrapRef = (0,external_vue_.ref)(null);
2717
+ // vars
2718
+ var isFocus = (0,external_vue_.ref)(false);
2719
+ var selectedList = (0,external_vue_.ref)([]);
2720
+ var overflowIndex = (0,external_vue_.ref)(-1);
2721
+ var debounceResize = (0,external_shared_.debounce)(32, handleResize);
2722
+ var editKey = (0,external_vue_.ref)('');
2723
+ var validateStr = (0,external_vue_.ref)('');
2724
+ var splitCode = (0,external_vue_.computed)(function () {
2725
+ return props.valueSplitCode;
2726
+ });
2727
+ var copyData = (0,external_vue_.shallowRef)([]);
2728
+ (0,external_vue_.watch)(function () {
2729
+ return props.data;
2730
+ }, function () {
2731
+ var _a;
2732
+ copyData.value = JSON.parse(JSON.stringify(props.data));
2733
+ (_a = copyData.value) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
2734
+ item.isSelected = props.uniqueSelect && !!props.modelValue.some(function (set) {
2735
+ return set.id === item.id;
2736
+ });
2737
+ });
2738
+ }, {
2739
+ immediate: true
2740
+ });
2741
+ // effects
2742
+ (0,external_vue_.watch)(function () {
2743
+ return props.modelValue;
2744
+ }, function (v) {
2745
+ var _a, _b;
2746
+ if (!(v === null || v === void 0 ? void 0 : v.length)) {
2747
+ selectedList.value = [];
2748
+ (_a = copyData.value) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
2749
+ item.isSelected = false;
2750
+ });
2751
+ return;
2752
+ }
2753
+ var list = [];
2754
+ v.forEach(function (item) {
2755
+ var _a;
2756
+ var seleted = selectedList.value.find(function (set) {
2757
+ return set.id === item.id && set.name === item.name;
2758
+ });
2759
+ if ((seleted === null || seleted === void 0 ? void 0 : seleted.toValueKey()) === JSON.stringify(item)) {
2760
+ seleted.values = item.values || [];
2761
+ list.push(seleted);
2762
+ } else {
2763
+ var searchItem = props.data.find(function (set) {
2764
+ return set.id === item.id;
2765
+ });
2766
+ var searchType = 'default';
2767
+ if (!searchItem) {
2768
+ searchItem = props.conditions.find(function (set) {
2769
+ return set.id === item.id;
2770
+ });
2771
+ searchItem && (searchType = 'condition');
2772
+ }
2773
+ if (!searchItem && !((_a = item.values) === null || _a === void 0 ? void 0 : _a.length)) {
2774
+ searchType = 'text';
2775
+ }
2776
+ var newSelected = new SelectedItem(searchItem || item, searchType, splitCode.value);
2777
+ newSelected.values = item.values || [];
2778
+ list.push(newSelected);
2779
+ }
2780
+ });
2781
+ selectedList.value = list;
2782
+ (_b = copyData.value) === null || _b === void 0 ? void 0 : _b.forEach(function (item) {
2783
+ item.isSelected = props.uniqueSelect && !!list.some(function (set) {
2784
+ return set.id === item.id;
2785
+ });
2786
+ });
2787
+ }, {
2788
+ immediate: true,
2789
+ deep: true
2790
+ });
2791
+ // life hooks
2792
+ (0,external_vue_.onMounted)(function () {
2793
+ addListener(wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container'))), debounceResize);
2794
+ });
2795
+ (0,external_vue_.onBeforeUnmount)(function () {
2796
+ removeListener(wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container'))), debounceResize);
2797
+ });
2798
+ // edit item
2799
+ useSearchSelectProvider({
2800
+ onEditClick: onEditClick,
2801
+ onEditEnter: onEditEnter,
2802
+ onEditBlur: onEditBlur,
2803
+ onValidate: onValidate,
2804
+ editKey: editKey,
2805
+ valueSplitCode: splitCode
2806
+ });
2807
+ function onEditClick(item, index) {
2808
+ editKey.value = "".concat(item.id, "_").concat(index);
2809
+ }
2810
+ function onEditEnter(item, index) {
2811
+ var list = selectedList.value.slice();
2812
+ list.splice(index, 1, item);
2813
+ emit('update:modelValue', list.map(function (item) {
2814
+ return item.toValue();
2815
+ }));
2816
+ editKey.value = '';
2817
+ }
2818
+ function onEditBlur() {
2819
+ editKey.value = '';
2820
+ onValidate('');
2821
+ }
2822
+ function onValidate(str) {
2823
+ validateStr.value = str || '';
2824
+ }
2825
+ // events
2826
+ function handleResize() {
2827
+ if (isFocus.value || selectedList.value.length < 1) {
2828
+ overflowIndex.value = -1;
2829
+ return;
2830
+ }
2831
+ var inputEl = wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container')));
2832
+ var maxWidth = wrapRef.value.querySelector('.search-container').clientWidth - SELETED_MARGING_RIGHT - 2;
2833
+ var tagList = inputEl.querySelectorAll('.search-container-selected:not(.overflow-selected)');
2834
+ var width = 0;
2835
+ var index = 0;
2836
+ var i = 0;
2837
+ while (index === 0 && width <= maxWidth - INPUT_PADDING_WIDTH && i <= tagList.length - 1) {
2838
+ var el = tagList[i];
2839
+ if (el.clientHeight > props.minHeight) {
2840
+ overflowIndex.value = i;
2841
+ return;
2842
+ }
2843
+ width += el ? el.clientWidth + SELETED_MARGING_RIGHT : 0;
2844
+ if (width >= maxWidth - INPUT_PADDING_WIDTH) {
2845
+ index = i;
2846
+ }
2847
+ ;
2848
+ i += 1;
2849
+ }
2850
+ if (index === tagList.length - 1 && width <= maxWidth) {
2851
+ overflowIndex.value = -1;
2852
+ return;
2853
+ }
2854
+ overflowIndex.value = width >= maxWidth - INPUT_PADDING_WIDTH ? index : index - 1;
2855
+ }
2856
+ function handleWrapClick() {
2857
+ if (!editKey.value) {
2858
+ inputRef.value.handleInputFocus();
2859
+ }
2860
+ }
2861
+ function handleClearAll() {
2862
+ selectedList.value = [];
2863
+ overflowIndex.value = -1;
2864
+ emit('update:modelValue', []);
2865
+ }
2866
+ function handleInputOutside(target) {
2867
+ var _a;
2868
+ return !((_a = wrapRef.value) === null || _a === void 0 ? void 0 : _a.contains(target));
2869
+ }
2870
+ function handleAddSelected(item) {
2871
+ var list = selectedList.value.slice();
2872
+ list.push(item);
2873
+ onValidate('');
2874
+ emit('update:modelValue', list.map(function (item) {
2875
+ return item.toValue();
2876
+ }));
2877
+ }
2878
+ function handleDeleteSelected(index) {
2879
+ var list = selectedList.value.slice();
2880
+ list.splice(typeof index === 'number' ? index : selectedList.value.length - 1, 1);
2881
+ onValidate('');
2882
+ emit('update:modelValue', list.map(function (item) {
2883
+ return item.toValue();
2884
+ }));
2885
+ }
2886
+ function handleInputFocus(v) {
2887
+ var _a;
2888
+ v && (overflowIndex.value = -1);
2889
+ if (v === false) {
2890
+ (_a = wrapRef.value.querySelector(".".concat(resolveClassName('search-select-container')))) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
2891
+ }
2892
+ isFocus.value = v;
2893
+ }
2894
+ function handleClickSearch(e) {
2895
+ emit('search', e);
2896
+ }
2897
+ return {
2898
+ inputRef: inputRef,
2899
+ wrapRef: wrapRef,
2900
+ isFocus: isFocus,
2901
+ copyData: copyData,
2902
+ selectedList: selectedList,
2903
+ overflowIndex: overflowIndex,
2904
+ validateStr: validateStr,
2905
+ splitCode: splitCode,
2906
+ onEditClick: onEditClick,
2907
+ onEditEnter: onEditEnter,
2908
+ handleWrapClick: handleWrapClick,
2909
+ handleInputFocus: handleInputFocus,
2910
+ handleResize: handleResize,
2911
+ handleClearAll: handleClearAll,
2912
+ handleInputOutside: handleInputOutside,
2913
+ handleAddSelected: handleAddSelected,
2914
+ handleDeleteSelected: handleDeleteSelected,
2915
+ handleClickSearch: handleClickSearch,
2916
+ localConditions: localConditions,
2917
+ resolveClassName: resolveClassName,
2918
+ t: t
2919
+ };
2920
+ },
2921
+ render: function render() {
2922
+ var _this = this,
2923
+ _ref2;
2924
+ var _a, _b;
2925
+ // vars
2926
+ var maxHeight = "".concat(!this.shrink || this.isFocus ? this.maxHeight : this.minHeight, "px");
2927
+ var showCondition = !!this.selectedList.length && this.selectedList.slice(-1)[0].type !== 'condition';
2928
+ var menuSlots = Object.assign({}, this.$slots.menu ? {
2929
+ menu: function menu(data) {
2930
+ var _a, _b;
2931
+ return (_b = (_a = _this.$slots).menu) === null || _b === void 0 ? void 0 : _b.call(_a, data);
2932
+ }
2933
+ } : {});
2934
+ // render
2935
+ return (0,external_vue_.createVNode)("div", {
2936
+ "class": this.resolveClassName('search-select'),
2937
+ "ref": "wrapRef"
2938
+ }, [(0,external_vue_.createVNode)("div", {
2939
+ "class": (_ref2 = {}, _defineProperty(_ref2, this.resolveClassName('search-select-container'), true), _defineProperty(_ref2, 'is-focus', this.isFocus), _ref2),
2940
+ "onClick": this.handleWrapClick
2941
+ }, [(0,external_vue_.createVNode)("div", {
2942
+ "class": "search-prefix"
2943
+ }, [(_b = (_a = this.$slots).prepend) === null || _b === void 0 ? void 0 : _b.call(_a)]), (0,external_vue_.createVNode)("div", {
2944
+ "class": "search-container",
2945
+ "style": {
2946
+ maxHeight: maxHeight
2947
+ }
2948
+ }, [(0,external_vue_.createVNode)(selected, {
2949
+ "data": this.copyData,
2950
+ "conditions": this.localConditions,
2951
+ "selectedList": this.selectedList,
2952
+ "overflowIndex": this.overflowIndex,
2953
+ "getMenuList": this.getMenuList,
2954
+ "validateValues": this.validateValues,
2955
+ "valueBehavior": this.valueBehavior,
2956
+ "onDelete": this.handleDeleteSelected
2957
+ }, Object.assign({}, menuSlots)), (0,external_vue_.createVNode)("div", {
2958
+ "class": "search-container-input"
2959
+ }, [(0,external_vue_.createVNode)(input, {
2960
+ "ref": "inputRef",
2961
+ "data": this.copyData,
2962
+ "showInputBefore": !this.selectedList.length,
2963
+ "showCondition": showCondition,
2964
+ "conditions": this.localConditions,
2965
+ "placeholder": this.placeholder || this.t.pleaseSelect,
2966
+ "clickOutside": this.handleInputOutside,
2967
+ "getMenuList": this.getMenuList,
2968
+ "validateValues": this.validateValues,
2969
+ "valueBehavior": this.valueBehavior,
2970
+ "onAdd": this.handleAddSelected,
2971
+ "onDelete": this.handleDeleteSelected,
2972
+ "onFocus": this.handleInputFocus
2973
+ }, Object.assign({}, menuSlots))])]), (0,external_vue_.createVNode)("div", {
2974
+ "class": "search-nextfix"
2975
+ }, [this.clearable && !!this.selectedList.length && (0,external_vue_.createVNode)(external_icon_.Close, {
2976
+ "class": "search-clear",
2977
+ "onClick": this.handleClearAll
2978
+ }, null), this.$slots.append ? this.$slots.append() : (0,external_vue_.createVNode)(external_icon_.Search, {
2979
+ "onClick": this.handleClickSearch,
2980
+ "class": "search-nextfix-icon ".concat(this.isFocus ? 'is-focus' : '')
2981
+ }, null)])]), !!this.validateStr.length && (0,external_vue_.createVNode)("div", {
2982
+ "class": this.resolveClassName('search-select-tips')
2983
+ }, [this.$slots.validate ? this.$slots.validate() : (0,external_vue_.createVNode)(external_vue_.Fragment, null, [(0,external_vue_.createVNode)(external_icon_.ExclamationCircleShape, {
2984
+ "class": "select-tips"
2985
+ }, null), this.validateStr || ''])])]);
2986
+ }
2987
+ }));
2988
+ ;// CONCATENATED MODULE: ../../packages/search-select/src/index.ts
2989
+ /*
2990
+ * Tencent is pleased to support the open source community by making
2991
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
2992
+ *
2993
+ * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
2994
+ *
2995
+ * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
2996
+ *
2997
+ * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
2998
+ *
2999
+ * ---------------------------------------------------
3000
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
3001
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
3002
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
3003
+ * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3004
+ *
3005
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
3006
+ * the Software.
3007
+ *
3008
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
3009
+ * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3010
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
3011
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3012
+ * IN THE SOFTWARE.
3013
+ */
3014
+
3015
+
3016
+ var BkSearchSelect = (0,external_shared_.withInstall)(search_select);
3017
+ /* harmony default export */ const src = (BkSearchSelect);
3018
+
3019
+ })();
3020
+
3021
+ /******/ return __webpack_exports__;
3022
+ /******/ })()
3023
+ ;
3024
+ });