@para-ui/core 2.1.20 → 2.1.21

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 (63) hide show
  1. package/Breadcrumbs/index.js +1 -1
  2. package/ComboSelect/index.js +2 -2
  3. package/ComboSelect/interface.d.ts +3 -0
  4. package/ComboSelect/utils.d.ts +1 -0
  5. package/DatePicker/index.js +2 -2
  6. package/Empty/images/index.d.ts +2 -0
  7. package/Empty/index.d.ts +19 -0
  8. package/Empty/index.js +15 -0
  9. package/Form/index.js +31 -31
  10. package/FormItem/index.js +31 -31
  11. package/FunctionModal/index.js +19 -19
  12. package/InputLang/index.js +1 -1
  13. package/Menu/index.js +1 -1
  14. package/Modal/index.js +19 -19
  15. package/MultiBox/index.js +1 -1
  16. package/Pagination/index.js +13 -13
  17. package/ParauiProvider/index.js +3 -3
  18. package/Querying/images/index.d.ts +2 -0
  19. package/Querying/index.d.ts +17 -0
  20. package/Querying/index.js +15 -0
  21. package/README.md +17 -0
  22. package/Search/index.js +1 -1
  23. package/Select/index.d.ts +3 -0
  24. package/Select/index.js +15 -15
  25. package/SelectInput/index.js +15 -15
  26. package/SingleBox/index.js +1 -1
  27. package/Table/index.js +2 -2
  28. package/Table/interface.d.ts +3 -0
  29. package/Table/tableBodyInterface.d.ts +7 -0
  30. package/TextField/index.js +11 -11
  31. package/TimePicker/index.js +2 -2
  32. package/ToggleButton/index.js +1 -1
  33. package/Transfer/index.js +1 -1
  34. package/Tree/index.js +21 -21
  35. package/Tree/interface.d.ts +5 -2
  36. package/cdn/Breadcrumbs/index.js +1 -1
  37. package/cdn/ComboSelect/index.js +35 -35
  38. package/cdn/DatePicker/index.js +2 -2
  39. package/cdn/Empty/index.js +1 -0
  40. package/cdn/Form/index.js +33 -33
  41. package/cdn/FormItem/index.js +33 -33
  42. package/cdn/FunctionModal/index.js +12 -12
  43. package/cdn/InputLang/index.js +1 -1
  44. package/cdn/Menu/index.js +2 -2
  45. package/cdn/Modal/index.js +20 -20
  46. package/cdn/MultiBox/index.js +1 -1
  47. package/cdn/Pagination/index.js +29 -29
  48. package/cdn/ParauiProvider/index.js +2 -2
  49. package/cdn/Querying/index.js +1 -0
  50. package/cdn/Search/index.js +1 -1
  51. package/cdn/Select/index.js +16 -16
  52. package/cdn/SelectInput/index.js +16 -16
  53. package/cdn/SingleBox/index.js +1 -1
  54. package/cdn/Table/index.js +4 -4
  55. package/cdn/TextField/index.js +1 -1
  56. package/cdn/TimePicker/index.js +2 -2
  57. package/cdn/ToggleButton/index.js +9 -9
  58. package/cdn/Transfer/index.js +1 -1
  59. package/cdn/Tree/index.js +15 -15
  60. package/index.d.ts +4 -0
  61. package/index.js +54 -54
  62. package/package.json +1 -1
  63. package/style.css +12 -8
package/MultiBox/index.js CHANGED
@@ -89,4 +89,4 @@ object-assign
89
89
  *
90
90
  * This source code is licensed under the MIT license found in the
91
91
  * LICENSE file in the root directory of this source tree.
92
- */n(7418);var r=n(8156),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,s=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:s,props:o,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,n){"use strict";e.exports=n(5251)},9271:function(e,t,n){var r=n(3379),i=n(2565);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2113:function(e,t,n){var r=n(3379),i=n(7381);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3936:function(e,t,n){var r=n(3379),i=n(9916);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},9663:function(e,t,n){var r=n(3379),i=n(4928);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3492:function(e,t,n){var r=n(3379),i=n(5714);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},5415:function(e,t,n){var r=n(3379),i=n(7843);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},6202:function(e,t,n){var r=n(3379),i=n(3637);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2310:function(e,t,n){var r=n(3379),i=n(9929);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3379:function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],c=t.base?o[0]+t.base:o[0],u=n[c]||0,s="".concat(c," ").concat(u);n[c]=u+1;var f=l(s),d={css:o[1],media:o[2],sourceMap:o[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:x(d,t),references:1}),r.push(s)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,v=0;function x(e,t){var n,r,i;if(t.singleton){var o=v++;n=h||(h=u(t)),r=d.bind(null,n,o,!1),i=d.bind(null,n,o,!0)}else n=u(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=l(n[r]);a[i].references--}for(var o=c(e,t),u=0;u<n.length;u++){var s=l(n[u]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=o}}}},7839:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(7371),a=(n(9271),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,c=e.tips,u=void 0===c?"":c,s=e.className,f=void 0===s?"":s,d=e.style,p=(0,i.useRef)(),h=(0,i.useState)(""),v=h[0],x=h[1];(0,i.useEffect)((function(){x(u)}),[u]);var m;return(0,r.jsx)("div",a({ref:p,className:(m="paraui-auto-tips",f&&(m+=" "+f),m),onMouseOver:function(e){p.current&&p.current.scrollWidth>p.current.offsetWidth?x(u||p.current.innerText):x("")},style:d},{children:(0,r.jsx)(o.default,a({title:v,placement:l},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}))}))}))}},3566:function(e,t,n){"use strict";var r=n(5893),i=n(7371),o=n(5670),a=n.n(o),l=n(6010),c=(n(2113),function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)}),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t=e.title,n=void 0===t?"":t,o=e.children,s=e.arrow,f=void 0===s||s,d=e.interactive,p=void 0===d||d,h=e.className,v=u(e,["title","children","arrow","interactive","className"]);return(0,r.jsx)(i.default,c({title:n,arrow:f,interactive:p},v,{children:(0,r.jsx)("span",c({className:(0,l.Z)("paraui-help",h)},{children:o||(0,r.jsx)(a(),{})}))}))}},4254:function(e,t,n){"use strict";var r=n(5893),i=(n(3936),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)});t.default=function(e){var t,n=e.className,o=e.style,a=e.error,l=void 0!==a&&a,c=e.helperText;return(0,r.jsx)("p",i({className:(t="paraui-helper-text",n&&(t+=" "+n),l&&(t+=" paraui-helper-text-error"),t),style:o},{children:c}))}},8767:function(e,t,n){"use strict";var r=n(5893),i=n(3566),o=(n(9663),function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,a=e.label,l=e.labelSign,c=e.required,u=void 0!==c&&c,s=e.tooltip,f=e.tooltipType,d=void 0===f?"icon":f,p=e.placement,h=void 0===p?"right-start":p,v=e.arrow,x=void 0!==v&&v,m=e.tooltipIcon,b=function(){var e="paraui-label";return d&&(e+=" paraui-label-"+d),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,r.jsxs)(r.Fragment,{children:["icon"===d&&(0,r.jsxs)("label",o({className:b(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l}),s&&(0,r.jsx)(i.default,o({title:s,placement:h,arrow:x},{children:m}))]})),"line"===d&&(0,r.jsx)(i.default,o({title:s||"",placement:h,arrow:x},{children:(0,r.jsxs)("label",o({className:b(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l})]}))}))]})}},7502:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(1217),a=n.n(o),l=(n(3492),function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,o=e.opacity,c=void 0===o?.7:o,u=(0,i.useRef)(null);(0,i.useEffect)((function(){u&&u.current&&u.current.parentNode&&(u.current.parentNode.style.position||(u.current.parentNode.style.position="relative"))}),[]);var s;return(0,r.jsxs)("div",l({className:(s="paraui-loading",t&&(s+=" "+t),s),style:n,ref:u},{children:[(0,r.jsx)("div",l({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{})})),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7320:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(7371),a=n(7839),l=n(7502),c=n(8767),u=n(4254),s=n(987),f=n.n(s),d=n(8926),p=n.n(d),h=n(8543),v=(n(6202),function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)}),x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t=e.className,n=e.style,s=e.size,d=void 0===s?"large":s,m=e.labelMode,b=void 0===m?"outside":m,g=e.placeholder,y=void 0===g?"":g,j=e.label,w=void 0===j?"":j,O=e.labelTooltip,S=e.disabled,N=void 0!==S&&S,_=e.multiline,C=void 0!==_&&_,P=e.required,k=void 0!==P&&P,M=e.labelSign,E=e.rows,T=void 0===E?2:E,R=e.error,L=void 0!==R&&R,z=e.helperText,I=void 0===z?"":z,F=e.addonBefore,U=void 0===F?"":F,A=e.addonAfter,B=void 0===A?"":A,H=(e.defaultValue,e.value),q=e.autoFocus,D=void 0!==q&&q,J=e.type,Y=void 0===J?"text":J,K=e.onClickIcon,W=e.rightIcon,$=e.showRightIcon,V=void 0===$||$,Q=e.limitLength,Z=e.fetchSuggestions,G=e.selectPopoverClass,X=e.renderSelectItem,ee=e.showSelectName,te=void 0===ee?"value":ee,ne=e.resize,re=void 0===ne||ne,ie=e.onBlur,oe=e.onFocus,ae=e.onChange,le=e.onKeydown,ce=e.onKeyUp,ue=e.onEnter,se=e.onClickAddonBefore,fe=e.onClickAddonAfter,de=e.onSelect,pe=x(e,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),he=(0,i.useState)("text-field-select-content-"+(0,h.UUID)())[0],ve=(0,i.useState)(!0),xe=ve[0],me=ve[1],be=(0,i.useState)(""),ge=be[0],ye=be[1],je=(0,i.useState)(!1),we=je[0],Oe=je[1],Se=(0,i.useState)("text"),Ne=Se[0],_e=Se[1],Ce=(0,i.useState)(!1),Pe=Ce[0],ke=Ce[1],Me=(0,i.useState)(!1),Ee=Me[0],Te=Me[1],Re=(0,i.useState)([]),Le=Re[0],ze=Re[1],Ie=(0,i.useRef)(null),Fe=(0,i.useRef)(null);(0,i.useEffect)((function(){void 0!==e.defaultValue&&ye(e.defaultValue)}),[]),(0,i.useEffect)((function(){Y!==Ne&&_e(Y)}),[Y]),(0,i.useEffect)((function(){void 0!==H&&ye(H)}),[H]),(0,i.useEffect)((function(){me(""===ge||void 0===ge)}),[ge]),(0,i.useEffect)((function(){Z&&ke(we)}),[we,Z]),(0,i.useEffect)((function(){return Pe?window.addEventListener("keydown",De):window.removeEventListener("keydown",De),function(){window.removeEventListener("keydown",De)}}),[Pe]),(0,i.useEffect)((function(){if(!we&&ge){var t=Ae(ge);if(t!==ge){var n={};n.target=Ie.current,n.target.value=t,void 0===e.value&&ye(t),e.onChange&&e.onChange(n)}}}),[ge,we]);var Ue,Ae=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Be=function(){N||(me(!1),(Ie&&Ie.current).focus())},He=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,i="nextSibling",o=".text-field-select-content-item";38===n&&(i="previousSibling",o=".text-field-select-content-item:last-child"),r?(r=r[i])||(r=t.querySelector(o)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),qe(r,t))},qe=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},De=function(e){var t=document.querySelector("."+he),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var i=r.dataset.val;Xe(JSON.parse(i))(e),(Ie&&Ie.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&He({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&He({selectDom:t,keyCode:e.keyCode,currentDom:n})},Je=function(e){Oe(!1),""===e.target.value&&me(!0),ie&&ie(e)},Ye=function(e){Te(!0),Z&&Z(e,(function(e){ze(e||[]),Te(!1)}))},Ke=function(e){Oe(!0),oe&&oe(e),Ye(e.target.value)},We=function(t){var n=t.target.value;n&&me(!1),void 0===e.value&&ye(n),ae&&ae(t),Ye(t.target.value)},$e=function(e){13===e.keyCode&&ue&&ue(e),le&&le(e)},Ve=function(e){ce&&ce(e)},Qe=function(e){"password"===Y&&("text"===Ne&&_e("password"),"password"===Ne&&_e("text")),K&&K(e)},Ze=function(){return void 0===e.value?ge:H},Ge=function(){ke(!1)},Xe=function(e){return function(t){de&&de(e)}},et=(0,i.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:void 0!==Q&&(0,r.jsx)("span",v({className:"length-limit"},{children:(ge?ge.toString().length:0)+"/"+Q}))})}),[Q,ge]),tt=(0,i.useMemo)((function(){var e=W||("password"===Y?"password"===Ne?(0,r.jsx)(p(),{}):(0,r.jsx)(f(),{}):null);return(0,r.jsx)(r.Fragment,{children:V&&e&&(0,r.jsx)("span",v({className:"password"===Y?"right-icon right-icon-password":"right-icon",onClick:Qe},{children:e}))})}),[V,W,Y,Ne,K]),nt=(0,i.useMemo)((function(){return(0,r.jsxs)("div",v({className:"text-field-content-within",ref:Fe},{children:[(0,r.jsxs)("div",v({className:"text-field-content-within-input"},{children:[C?(0,r.jsx)("textarea",v({ref:Ie,rows:T,value:Ze(),onBlur:Je,onFocus:Ke,onChange:We,onKeyDown:$e,onKeyUp:Ve,disabled:N},pe)):(0,r.jsx)("input",v({ref:Ie,type:Ne,value:Ze(),onBlur:Je,onFocus:Ke,onChange:We,onKeyDown:$e,onKeyUp:Ve,disabled:N},pe)),xe&&!we&&(0,r.jsx)("span",v({className:"text-field-label-placeholder",onClick:Be},{children:"outside"===b?y:(0,r.jsxs)(r.Fragment,{children:[w||y,k&&(0,r.jsx)("span",v({className:"text-field-required"},{children:"*"})),M&&(0,r.jsx)("span",{children:M})]})}))]})),et,tt]}))}),[xe,we,D,Ne,ge,et,tt,b,y,w,N,C,T,pe,ae,Z,K]),rt=(0,i.useMemo)((function(){var e,t=function(e){return"object"==typeof e&&null!==e?e[te]:e};return(0,r.jsxs)("div",v({className:(e="text-field-select-content",Ee&&(e+=" text-field-select-content-loading"),he&&(e+=" "+he),e),style:{width:(Fe&&Fe.current?Fe.current.offsetWidth:0)+"px"}},{children:[Le&&Le.map((function(e,n){return(0,r.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Xe(e),"data-val":JSON.stringify(e)},{children:X?X(e):(0,r.jsx)(a.default,{children:t(e)})}),n)})),Ee&&(0,r.jsx)(l.default,{})]}))}),[Fe,Pe,Le,X,te,de,Ee,he]),it=(0,i.useMemo)((function(){return(0,r.jsx)(o.default,v({open:Pe,title:rt,onClose:Ge,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,classes:{popper:(e="paraui-text-field-select",d&&(e+=" paraui-text-field-select-"+d),G&&(e+=" "+G),Le.length>0&&(e+=" paraui-text-field-select-data"),e)}},{children:nt}));var e}),[xe,we,D,Ne,ge,et,tt,b,y,w,N,C,T,pe,ae,Z,de,Fe,Pe,G,d,K,Le]),ot=(0,i.useMemo)((function(){var e,t=Boolean(k||M||w);if("outside"===b&&t){return(0,r.jsx)(c.default,v({label:w,required:k,labelSign:M},O,{className:(e="text-field-label",O&&O.className&&(e+=" "+O.className),e)}))}return null}),[b,w,M,k,O]);return(0,r.jsxs)("div",v({className:(Ue="paraui-text-field",Ue+=" text-field",d&&!C&&(Ue+=" text-field-"+d),t&&(Ue+=" "+t),L&&(Ue+=" text-field-error"),we&&(Ue+=" text-field-focus"),N&&(Ue+=" text-field-disabled"),C&&(Ue+=" text-field-multiline"),e.limitLength&&(Ue+=" text-field-limit-length"),e.limitLength&&ge&&ge.toString().length>e.limitLength&&(Ue+=" text-field-limit"),re&&(Ue+=" text-field-resize"),Ue),style:n},{children:[ot,(0,r.jsxs)("div",v({className:"text-field-content"},{children:[U&&(0,r.jsx)("div",v({className:"text-field-content-before",onClick:function(e){se&&se(e)}},{children:U})),Z?it:nt,B&&(0,r.jsx)("div",v({className:"text-field-content-after",onClick:function(e){fe&&fe(e)}},{children:B}))]})),(0,r.jsx)(u.default,{className:"text-field-error-text",error:L,helperText:I})]}))}},7371:function(e,t,n){"use strict";var r=n(5893),i=n(670),o=n(6010),a=(n(2310),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)});t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,c=a(a({},e.classes),{popper:(0,o.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,r.jsx)(i.Tooltip,a({},e,{classes:c}))}},670:function(e){"use strict";e.exports=t},8543:function(e){"use strict";e.exports=n},8156:function(t){"use strict";t.exports=e}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,exports:{}};return r[e](n,n.exports,o),n.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";o.r(a),o.d(a,{MultiBox:function(){return p}});var e=o(5893),t=o(8156),n=o(7320),r=o(8767),i=o(4254),l=o(4271),c=o.n(l),u=o(8344),s=o.n(u),f=(o(5415),function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)}),d=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},p=function(o){var a=o.className,l=o.style,u=o.size,p=void 0===u?"large":u,h=o.placeholderKey,v=void 0===h?"":h,x=o.placeholderValue,m=void 0===x?"":x,b=o.label,g=void 0===b?"":b,y=o.labelTooltip,j=o.labelSign,w=o.disabled,O=void 0!==w&&w,S=o.required,N=void 0!==S&&S,_=o.error,C=void 0!==_&&_,P=o.helperText,k=void 0===P?"":P,M=o.value,E=o.replaceFields,T=o.onChange,R=o.fetchSuggestionsKey,L=o.fetchSuggestionsValue,z=(0,t.useState)([]),I=z[0],F=z[1],U=(0,t.useState)({key:"label",value:"value"}),A=U[0],B=U[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&F(d([],o.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==M&&F(d([],M,!0))}),[M]),(0,t.useEffect)((function(){if(E){var e=f(f({},A),E);B(e)}}),[E]);var H,q=function(e){return function(){O||(I.splice(e,1),void 0===o.value&&F(d([],I,!0)),T&&T(I))}},D=function(e,t){return function(n){I[t][e]=n.target.value,void 0===o.value&&F(d([],I,!0)),T&&T(I)}},J=function(e){return function(t,n){"key"===e?R&&R(t,n):L&&L(t,n)}},Y=function(e,t){return function(n){I[t][e]=n,"object"==typeof n&&null!==n&&(I[t][e]=n.value),void 0===o.value&&F(d([],I,!0)),T&&T(I)}};return(0,e.jsxs)("div",f({className:(H="paraui-multi-box multi-box",a&&(H+=" "+a),p&&(H+=" multi-box-"+p),C&&(H+=" multi-box-error"),O&&(H+=" multi-box-disabled"),H),style:l},{children:[function(){if(!g&&!j)return null;var t;return(0,e.jsx)(r.default,f({label:g,required:N,labelSign:j},y,{className:(t="multi-box-label",y&&y.className&&(t+=" "+y.className),t)}))}(),(0,e.jsx)("div",f({className:"multi-box-content"},{children:I.map((function(t,r){return(0,e.jsxs)("div",f({className:"multi-box-content-item"},{children:[(0,e.jsxs)("div",f({className:"multi-box-content-item-input"},{children:[(0,e.jsx)(n.default,{size:p,disabled:O,placeholder:v,value:t[A.key||""],onChange:D(A.key||"",r),fetchSuggestions:R?J("key"):void 0,onSelect:Y(A.key||"",r)}),(0,e.jsx)("span",{children:":"}),(0,e.jsx)(n.default,{size:p,disabled:O,placeholder:m,value:t[A.value||""],onChange:D(A.value||"",r),fetchSuggestions:L?J("value"):void 0,onSelect:Y(A.value||"",r)})]})),(0,e.jsx)("span",f({className:"single-box-content-item-svg"},{children:(0,e.jsx)(s(),{onClick:q(r)})}))]}),r)}))})),(0,e.jsx)("div",f({className:"multi-box-add",onClick:function(){O||(I.push({}),void 0===o.value&&F(d([],I,!0)),T&&T(I))}},{children:(0,e.jsx)(c(),{})})),(0,e.jsx)(i.default,{className:"multi-box-error-text",error:C,helperText:k})]}))};a.default=p}(),a}()}));
92
+ */n(7418);var r=n(8156),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,s=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)l.call(t,r)&&!c.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:s,props:o,_owner:a.current}}t.jsx=u,t.jsxs=u},5893:function(e,t,n){"use strict";e.exports=n(5251)},9271:function(e,t,n){var r=n(3379),i=n(2565);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2113:function(e,t,n){var r=n(3379),i=n(7381);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3936:function(e,t,n){var r=n(3379),i=n(9916);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},9663:function(e,t,n){var r=n(3379),i=n(4928);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3492:function(e,t,n){var r=n(3379),i=n(5714);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},5415:function(e,t,n){var r=n(3379),i=n(7843);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},6202:function(e,t,n){var r=n(3379),i=n(3637);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},2310:function(e,t,n){var r=n(3379),i=n(9929);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.id,i,""]]);var o={insert:("body","body"),singleton:!1};r(i,o);e.exports=i.locals||{}},3379:function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function l(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],c=t.base?o[0]+t.base:o[0],u=n[c]||0,s="".concat(c," ").concat(u);n[c]=u+1;var f=l(s),d={css:o[1],media:o[2],sourceMap:o[3]};-1!==f?(a[f].references++,a[f].updater(d)):a.push({identifier:s,updater:x(d,t),references:1}),r.push(s)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var s,f=(s=[],function(e,t){return s[e]=t,s.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,v=0;function x(e,t){var n,r,i;if(t.singleton){var o=v++;n=h||(h=u(t)),r=d.bind(null,n,o,!1),i=d.bind(null,n,o,!0)}else n=u(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=l(n[r]);a[i].references--}for(var o=c(e,t),u=0;u<n.length;u++){var s=l(n[u]);0===a[s].references&&(a[s].updater(),a.splice(s,1))}n=o}}}},7839:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(7371),a=(n(9271),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)});t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,c=e.tips,u=void 0===c?"":c,s=e.className,f=void 0===s?"":s,d=e.style,p=(0,i.useRef)(),h=(0,i.useState)(""),v=h[0],x=h[1];(0,i.useEffect)((function(){x(u)}),[u]);var m;return(0,r.jsx)("div",a({ref:p,className:(m="paraui-auto-tips",f&&(m+=" "+f),m),onMouseOver:function(e){p.current&&p.current.scrollWidth>p.current.offsetWidth?x(u||p.current.innerText):x("")},style:d},{children:(0,r.jsx)(o.default,a({title:v,placement:l},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}))}))}))}},3566:function(e,t,n){"use strict";var r=n(5893),i=n(7371),o=n(5670),a=n.n(o),l=n(6010),c=(n(2113),function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},c.apply(this,arguments)}),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t=e.title,n=void 0===t?"":t,o=e.children,s=e.arrow,f=void 0===s||s,d=e.interactive,p=void 0===d||d,h=e.className,v=u(e,["title","children","arrow","interactive","className"]);return(0,r.jsx)(i.default,c({title:n,arrow:f,interactive:p},v,{children:(0,r.jsx)("span",c({className:(0,l.Z)("paraui-help",h)},{children:o||(0,r.jsx)(a(),{})}))}))}},4254:function(e,t,n){"use strict";var r=n(5893),i=(n(3936),function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)});t.default=function(e){var t,n=e.className,o=e.style,a=e.error,l=void 0!==a&&a,c=e.helperText;return(0,r.jsx)("p",i({className:(t="paraui-helper-text",n&&(t+=" "+n),l&&(t+=" paraui-helper-text-error"),t),style:o},{children:c}))}},8767:function(e,t,n){"use strict";var r=n(5893),i=n(3566),o=(n(9663),function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,a=e.label,l=e.labelSign,c=e.required,u=void 0!==c&&c,s=e.tooltip,f=e.tooltipType,d=void 0===f?"icon":f,p=e.placement,h=void 0===p?"right-start":p,v=e.arrow,x=void 0!==v&&v,m=e.tooltipIcon,b=function(){var e="paraui-label";return d&&(e+=" paraui-label-"+d),s&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,r.jsxs)(r.Fragment,{children:["icon"===d&&(0,r.jsxs)("label",o({className:b(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l}),s&&(0,r.jsx)(i.default,o({title:s,placement:h,arrow:x},{children:m}))]})),"line"===d&&(0,r.jsx)(i.default,o({title:s||"",placement:h,arrow:x},{children:(0,r.jsxs)("label",o({className:b(),style:n},{children:[(0,r.jsx)(r.Fragment,{children:a}),u&&(0,r.jsx)("span",o({className:"paraui-label-required"},{children:"*"})),l&&(0,r.jsx)("span",{children:l})]}))}))]})}},7502:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(1217),a=n.n(o),l=(n(3492),function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l.apply(this,arguments)});t.default=function(e){var t=e.className,n=e.style,o=e.opacity,c=void 0===o?.7:o,u=(0,i.useRef)(null);(0,i.useEffect)((function(){u&&u.current&&u.current.parentNode&&(u.current.parentNode.style.position||(u.current.parentNode.style.position="relative"))}),[]);var s;return(0,r.jsxs)("div",l({className:(s="paraui-loading",t&&(s+=" "+t),s),style:n,ref:u},{children:[(0,r.jsx)("div",l({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{})})),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:c}})]}))}},7320:function(e,t,n){"use strict";var r=n(5893),i=n(8156),o=n(7371),a=n(7839),l=n(7502),c=n(8767),u=n(4254),s=n(987),f=n.n(s),d=n(8926),p=n.n(d),h=n(8543),v=(n(6202),function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)}),x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};t.default=function(e){var t=e.className,n=e.style,s=e.size,d=void 0===s?"large":s,m=e.labelMode,b=void 0===m?"outside":m,g=e.placeholder,y=void 0===g?"":g,j=e.label,w=void 0===j?"":j,O=e.labelTooltip,S=e.disabled,N=void 0!==S&&S,_=e.multiline,C=void 0!==_&&_,P=e.required,k=void 0!==P&&P,M=e.labelSign,E=e.rows,T=void 0===E?2:E,R=e.error,L=void 0!==R&&R,z=e.helperText,I=void 0===z?"":z,F=e.addonBefore,U=void 0===F?"":F,A=e.addonAfter,B=void 0===A?"":A,H=(e.defaultValue,e.value),q=e.autoFocus,D=void 0!==q&&q,J=e.type,Y=void 0===J?"text":J,K=e.onClickIcon,W=e.rightIcon,$=e.showRightIcon,V=void 0===$||$,Q=e.limitLength,Z=e.fetchSuggestions,G=e.selectPopoverClass,X=e.renderSelectItem,ee=e.showSelectName,te=void 0===ee?"value":ee,ne=e.resize,re=void 0===ne||ne,ie=e.onBlur,oe=e.onFocus,ae=e.onChange,le=e.onKeydown,ce=e.onKeyUp,ue=e.onEnter,se=e.onClickAddonBefore,fe=e.onClickAddonAfter,de=e.onSelect,pe=x(e,["className","style","size","labelMode","placeholder","label","labelTooltip","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","resize","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),he=(0,i.useState)("text-field-select-content-"+(0,h.UUID)())[0],ve=(0,i.useState)(!0),xe=ve[0],me=ve[1],be=(0,i.useState)(""),ge=be[0],ye=be[1],je=(0,i.useState)(!1),we=je[0],Oe=je[1],Se=(0,i.useState)("text"),Ne=Se[0],_e=Se[1],Ce=(0,i.useState)(!1),Pe=Ce[0],ke=Ce[1],Me=(0,i.useState)(!1),Ee=Me[0],Te=Me[1],Re=(0,i.useState)([]),Le=Re[0],ze=Re[1],Ie=(0,i.useRef)(null),Fe=(0,i.useRef)(null);(0,i.useEffect)((function(){void 0!==e.defaultValue&&ye(e.defaultValue)}),[]),(0,i.useEffect)((function(){Y!==Ne&&_e(Y)}),[Y]),(0,i.useEffect)((function(){void 0!==H&&ye(H)}),[H]),(0,i.useEffect)((function(){me(""===ge||void 0===ge)}),[ge]),(0,i.useEffect)((function(){Z&&ke(we)}),[we,Z]),(0,i.useEffect)((function(){return Pe?window.addEventListener("keydown",De):window.removeEventListener("keydown",De),function(){window.removeEventListener("keydown",De)}}),[Pe]),(0,i.useEffect)((function(){if(!we&&ge){var t=Ae(ge);if(t!==ge){var n={};n.target=Ie.current,n.target.value=t,void 0===e.value&&ye(t),e.onChange&&e.onChange(n)}}}),[ge,we]);var Ue,Ae=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Be=function(){N||(me(!1),(Ie&&Ie.current).focus())},He=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,i="nextSibling",o=".text-field-select-content-item";38===n&&(i="previousSibling",o=".text-field-select-content-item:last-child"),r?(r=r[i])||(r=t.querySelector(o)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),qe(r,t))},qe=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},De=function(e){var t=document.querySelector("."+he),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var i=r.dataset.val;Xe(JSON.parse(i))(e),(Ie&&Ie.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&He({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&He({selectDom:t,keyCode:e.keyCode,currentDom:n})},Je=function(e){Oe(!1),""===e.target.value&&me(!0),ie&&ie(e)},Ye=function(e){Te(!0),Z&&Z(e,(function(e){ze(e||[]),Te(!1)}))},Ke=function(e){Oe(!0),oe&&oe(e),Ye(e.target.value)},We=function(t){var n=t.target.value;n&&me(!1),void 0===e.value&&ye(n),ae&&ae(t),Ye(t.target.value)},$e=function(e){13===e.keyCode&&ue&&ue(e),le&&le(e)},Ve=function(e){ce&&ce(e)},Qe=function(e){"password"===Y&&("text"===Ne&&_e("password"),"password"===Ne&&_e("text")),K&&K(e)},Ze=function(){return void 0===e.value?ge:H},Ge=function(){ke(!1)},Xe=function(e){return function(t){de&&de(e)}},et=(0,i.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:void 0!==Q&&(0,r.jsx)("span",v({className:"length-limit"},{children:(ge?ge.toString().length:0)+"/"+Q}))})}),[Q,ge]),tt=(0,i.useMemo)((function(){var e=W||("password"===Y?"password"===Ne?(0,r.jsx)(p(),{}):(0,r.jsx)(f(),{}):null);return(0,r.jsx)(r.Fragment,{children:V&&e&&(0,r.jsx)("span",v({className:"password"===Y?"right-icon right-icon-password":"right-icon",onClick:Qe},{children:e}))})}),[V,W,Y,Ne,K]),nt=(0,i.useMemo)((function(){return(0,r.jsxs)("div",v({className:"text-field-content-within",ref:Fe},{children:[(0,r.jsxs)("div",v({className:"text-field-content-within-input"},{children:[C?(0,r.jsx)("textarea",v({ref:Ie,rows:T,value:Ze(),onBlur:Je,onFocus:Ke,onChange:We,onKeyDown:$e,onKeyUp:Ve,disabled:N},pe)):(0,r.jsx)("input",v({ref:Ie,type:Ne,value:Ze(),onBlur:Je,onFocus:Ke,onChange:We,onKeyDown:$e,onKeyUp:Ve,disabled:N},pe)),xe&&!we&&(0,r.jsx)("span",v({className:"text-field-label-placeholder",onClick:Be},{children:"outside"===b?y:(0,r.jsxs)(r.Fragment,{children:[w||y,k&&(0,r.jsx)("span",v({className:"text-field-required"},{children:"*"})),M&&(0,r.jsx)("span",{children:M})]})}))]})),et,tt]}))}),[xe,we,D,Ne,ge,et,tt,b,y,w,N,C,T,pe,ae,Z,K]),rt=(0,i.useMemo)((function(){var e,t=function(e){return"object"==typeof e&&null!==e?e[te]:e};return(0,r.jsxs)("div",v({className:(e="text-field-select-content",Ee&&(e+=" text-field-select-content-loading"),he&&(e+=" "+he),e),style:{width:(Fe&&Fe.current?Fe.current.offsetWidth:0)+"px"}},{children:[Le&&Le.map((function(e,n){return(0,r.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Xe(e),"data-val":JSON.stringify(e)},{children:X?X(e):(0,r.jsx)(a.default,{children:t(e)})}),n)})),Ee&&(0,r.jsx)(l.default,{})]}))}),[Fe,Pe,Le,X,te,de,Ee,he]),it=(0,i.useMemo)((function(){return(0,r.jsx)(o.default,v({open:Pe,title:rt,onClose:Ge,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,classes:{popper:(e="paraui-text-field-select paraui-scrollbar-small",d&&(e+=" paraui-text-field-select-"+d),G&&(e+=" "+G),Le.length>0&&(e+=" paraui-text-field-select-data"),e)}},{children:nt}));var e}),[xe,we,D,Ne,ge,et,tt,b,y,w,N,C,T,pe,ae,Z,de,Fe,Pe,G,d,K,Le]),ot=(0,i.useMemo)((function(){var e,t=Boolean(k||M||w);if("outside"===b&&t){return(0,r.jsx)(c.default,v({label:w,required:k,labelSign:M},O,{className:(e="text-field-label",O&&O.className&&(e+=" "+O.className),e)}))}return null}),[b,w,M,k,O]);return(0,r.jsxs)("div",v({className:(Ue="paraui-text-field",Ue+=" text-field",d&&!C&&(Ue+=" text-field-"+d),t&&(Ue+=" "+t),L&&(Ue+=" text-field-error"),we&&(Ue+=" text-field-focus"),N&&(Ue+=" text-field-disabled"),C&&(Ue+=" text-field-multiline"),e.limitLength&&(Ue+=" text-field-limit-length"),e.limitLength&&ge&&ge.toString().length>e.limitLength&&(Ue+=" text-field-limit"),re&&(Ue+=" text-field-resize"),Ue),style:n},{children:[ot,(0,r.jsxs)("div",v({className:"text-field-content"},{children:[U&&(0,r.jsx)("div",v({className:"text-field-content-before",onClick:function(e){se&&se(e)}},{children:U})),Z?it:nt,B&&(0,r.jsx)("div",v({className:"text-field-content-after",onClick:function(e){fe&&fe(e)}},{children:B}))]})),(0,r.jsx)(u.default,{className:"text-field-error-text",error:L,helperText:I})]}))}},7371:function(e,t,n){"use strict";var r=n(5893),i=n(670),o=n(6010),a=(n(2310),function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)});t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,c=a(a({},e.classes),{popper:(0,o.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==l?void 0:l.includes("left"))||(null==l?void 0:l.includes("right")),"paraui-tooltip-top-bottom":(null==l?void 0:l.includes("top"))||(null==l?void 0:l.includes("bottom"))})});return(0,r.jsx)(i.Tooltip,a({},e,{classes:c}))}},670:function(e){"use strict";e.exports=t},8543:function(e){"use strict";e.exports=n},8156:function(t){"use strict";t.exports=e}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,exports:{}};return r[e](n,n.exports,o),n.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){"use strict";o.r(a),o.d(a,{MultiBox:function(){return p}});var e=o(5893),t=o(8156),n=o(7320),r=o(8767),i=o(4254),l=o(4271),c=o.n(l),u=o(8344),s=o.n(u),f=(o(5415),function(){return f=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},f.apply(this,arguments)}),d=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},p=function(o){var a=o.className,l=o.style,u=o.size,p=void 0===u?"large":u,h=o.placeholderKey,v=void 0===h?"":h,x=o.placeholderValue,m=void 0===x?"":x,b=o.label,g=void 0===b?"":b,y=o.labelTooltip,j=o.labelSign,w=o.disabled,O=void 0!==w&&w,S=o.required,N=void 0!==S&&S,_=o.error,C=void 0!==_&&_,P=o.helperText,k=void 0===P?"":P,M=o.value,E=o.replaceFields,T=o.onChange,R=o.fetchSuggestionsKey,L=o.fetchSuggestionsValue,z=(0,t.useState)([]),I=z[0],F=z[1],U=(0,t.useState)({key:"label",value:"value"}),A=U[0],B=U[1];(0,t.useEffect)((function(){void 0!==o.defaultValue&&F(d([],o.defaultValue,!0))}),[]),(0,t.useEffect)((function(){void 0!==M&&F(d([],M,!0))}),[M]),(0,t.useEffect)((function(){if(E){var e=f(f({},A),E);B(e)}}),[E]);var H,q=function(e){return function(){O||(I.splice(e,1),void 0===o.value&&F(d([],I,!0)),T&&T(I))}},D=function(e,t){return function(n){I[t][e]=n.target.value,void 0===o.value&&F(d([],I,!0)),T&&T(I)}},J=function(e){return function(t,n){"key"===e?R&&R(t,n):L&&L(t,n)}},Y=function(e,t){return function(n){I[t][e]=n,"object"==typeof n&&null!==n&&(I[t][e]=n.value),void 0===o.value&&F(d([],I,!0)),T&&T(I)}};return(0,e.jsxs)("div",f({className:(H="paraui-multi-box multi-box",a&&(H+=" "+a),p&&(H+=" multi-box-"+p),C&&(H+=" multi-box-error"),O&&(H+=" multi-box-disabled"),H),style:l},{children:[function(){if(!g&&!j)return null;var t;return(0,e.jsx)(r.default,f({label:g,required:N,labelSign:j},y,{className:(t="multi-box-label",y&&y.className&&(t+=" "+y.className),t)}))}(),(0,e.jsx)("div",f({className:"multi-box-content"},{children:I.map((function(t,r){return(0,e.jsxs)("div",f({className:"multi-box-content-item"},{children:[(0,e.jsxs)("div",f({className:"multi-box-content-item-input"},{children:[(0,e.jsx)(n.default,{size:p,disabled:O,placeholder:v,value:t[A.key||""],onChange:D(A.key||"",r),fetchSuggestions:R?J("key"):void 0,onSelect:Y(A.key||"",r)}),(0,e.jsx)("span",{children:":"}),(0,e.jsx)(n.default,{size:p,disabled:O,placeholder:m,value:t[A.value||""],onChange:D(A.value||"",r),fetchSuggestions:L?J("value"):void 0,onSelect:Y(A.value||"",r)})]})),(0,e.jsx)("span",f({className:"single-box-content-item-svg"},{children:(0,e.jsx)(s(),{onClick:q(r)})}))]}),r)}))})),(0,e.jsx)("div",f({className:"multi-box-add",onClick:function(){O||(I.push({}),void 0===o.value&&F(d([],I,!0)),T&&T(I))}},{children:(0,e.jsx)(c(),{})})),(0,e.jsx)(i.default,{className:"multi-box-error-text",error:C,helperText:k})]}))};a.default=p}(),a}()}));