@para-ui/core 2.0.9 → 2.0.13
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.
- package/AutoTips/index.js +2 -2
- package/Button/index.js +3 -3
- package/ButtonGroup/index.js +1 -1
- package/ComboSelect/index.js +1 -1
- package/ComboSelect/interface.d.ts +2 -1
- package/DatePicker/index.js +1 -1
- package/Form/index.js +1 -1
- package/FormItem/index.js +1 -1
- package/FunctionModal/index.js +3 -3
- package/Help/index.js +2 -2
- package/InputLang/index.js +3 -3
- package/InputNumber/index.js +3 -3
- package/Modal/index.js +3 -3
- package/MultiBox/index.js +3 -3
- package/PageHeader/index.js +1 -1
- package/Pagination/index.js +1 -1
- package/PopConfirm/index.d.ts +5 -1
- package/PopConfirm/index.js +1 -1
- package/Popper/index.d.ts +13 -0
- package/Popper/index.js +16 -0
- package/Search/index.js +3 -3
- package/Select/index.d.ts +2 -0
- package/Select/index.js +1 -1
- package/SingleBox/index.js +3 -3
- package/Table/index.js +1 -1
- package/Tabs/index.js +3 -3
- package/TextField/index.js +3 -3
- package/TimePicker/index.js +1 -1
- package/ToggleButton/index.js +3 -3
- package/Tooltip/index.js +2 -2
- package/Transfer/index.js +3 -3
- package/Tree/index.js +1 -1
- package/Upload/index.js +3 -3
- package/index.d.ts +1 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/style.css +5 -5
package/InputNumber/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Down"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Up"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Down","@para-ui/icons/LoadingF","@para-ui/icons/Minus","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/Up","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Down"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Up"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Down"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Minus"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/Up"],e["para-lib"],e.react)}(self,(function(e,t,n,r,o,i,a,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Down"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Up"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Down","@para-ui/icons/LoadingF","@para-ui/icons/Minus","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","@para-ui/icons/Up","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Down"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Minus"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("@para-ui/icons/Up"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Down"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Minus"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["@para-ui/icons/Up"],e["para-lib"],e.react)}(self,(function(e,t,n,r,o,i,a,u,l,s){return function(){"use strict";var c,d={4927:function(e,t,n){function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function o(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}n.d(t,{Z:function(){return o}})},4126:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,
|
|
7
|
+
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,l=o(e),s=1;s<arguments.length;s++){for(var c in a=Object(arguments[s]))n.call(a,c)&&(l[c]=a[c]);if(t){u=t(a);for(var d=0;d<u.length;d++)r.call(a,u[d])&&(l[u[d]]=a[u[d]])}}return l}},9524:function(e,t,n){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
n(4126);var r=n(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,c=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(c=t.ref),t)s.call(t,r)&&!u.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:c,props:i,_owner:a.current}}t.jsx=l,t.jsxs=l},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var r=n(7712),o=n(9297),i=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,s=void 0===n?"bottom-start":n,u=e.tips,l=void 0===u?"":u,c=e.className,d=void 0===c?"":c,f=(0,o.useRef)(),p=(0,o.useState)(""),v=p[0],m=p[1];(0,o.useEffect)((function(){m(l)}),[l]);var b;return(0,r.jsx)("div",a({ref:f,className:(b="paraui-auto-tips",d&&(b+=" "+d),b),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?m(v||f.current.innerText):m("")}},{children:(0,r.jsx)(i.default,a({title:v,placement:s},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},601:function(e,t,n){n.r(t),n.d(t,{InputNumber:function(){return b}});var r=n(7712),o=n(9297),i=n(3616),a=n.n(i),s=n(6028),u=n.n(s),l=n(3277),c=n.n(l),d=n(5191),f=n.n(d),p=n(3672),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},m=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var b=function(e){var t=e.className,n=(e.defaultValue,e.value),i=e.size,s=void 0===i?"large":i,l=e.btnMode,d=void 0===l?"tb":l,b=e.disabled,h=void 0!==b&&b,y=e.disabledStr,x=e.disabledAdd,g=void 0!==x&&x,j=e.disabledReduce,w=void 0!==j&&j,O=e.onChange,N=e.step,S=void 0===N?1:N,C=e.onKeydown,k=e.onEnter,P=m(e,["className","defaultValue","value","size","btnMode","disabled","disabledStr","disabledAdd","disabledReduce","onChange","step","onKeydown","onEnter"]),E=(0,o.useState)(),q=E[0],M=E[1];(0,o.useEffect)((function(){void 0!==e.defaultValue&&M(e.defaultValue)}),[]),(0,o.useEffect)((function(){void 0!==n&&M(n)}),[n]);var _,I=function(t){if(!h&&!g){var n=function(e,t){var n,r,o,i;isNaN(e)&&(e=0),isNaN(t)&&(t=0),e=Number(e),t=Number(t);try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}if(i=Math.abs(n-r),o=Math.pow(10,Math.max(n,r)),i>0){var a=Math.pow(10,i);n>r?(e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""))*a):(e=Number(e.toString().replace(".",""))*a,t=Number(t.toString().replace(".","")))}else e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""));return(e+t)/o}(Number(q||""),S);void 0===e.value&&M(n),O&&O(n,t)}},L=function(t){if(!h&&!w){var n=Number(function(e,t){var n,r,o;isNaN(e)&&(e=0),isNaN(t)&&(t=0),e=Number(e),t=Number(t);try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return((e*(o=Math.pow(10,Math.max(n,r)))-t*o)/o).toFixed(n>=r?n:r)}(Number(q||""),S));void 0===e.value&&M(n),O&&O(n,t)}};return(0,r.jsx)("div",v({className:(_="paraui-input-number",t&&(_+=" "+t),s&&(_+=" input-number-"+s),h&&(_+=" input-number-disabled"),g&&(_+=" input-number-disabled-add"),w&&(_+=" input-number-disabled-reduce"),d&&(_+=" input-number-"+d),_)},{children:(0,r.jsx)(p.default,v({},P,{step:S,value:void 0===q?"":q,type:"number",size:s,disabled:h,addonAfter:function(){if(!h)return"tb"===d?(0,r.jsxs)("div",v({className:"tb-btn"},{children:[(0,r.jsx)("span",v({className:"tb-btn-top",onClick:I},{children:(0,r.jsx)(a(),{},void 0)}),void 0),(0,r.jsx)("span",v({className:"tb-btn-bottom",onClick:L},{children:(0,r.jsx)(u(),{},void 0)}),void 0)]}),void 0):"lr"===d?(0,r.jsx)("span",v({className:"reduce-btn",onClick:L},{children:(0,r.jsx)(c(),{},void 0)}),void 0):void 0}(),addonBefore:function(){if(!h&&"tb"!==d)return"lr"===d?(0,r.jsx)("span",v({className:"add-btn",onClick:I},{children:(0,r.jsx)(f(),{},void 0)}),void 0):void 0}(),onChange:function(t){var n=t.target.value;void 0===e.value&&M(n),O&&O(n,t)},onKeyDown:function(e){if(y)for(var t=0,n=y.length;t<n;t++){var r=y[t];e.key===r&&e.preventDefault()}13===e.keyCode&&k&&k(e),C&&C(e)}}),void 0)}),void 0)};t.default=b},9011:function(e,t,n){var r=n(7712),o=n(9297),i=n(1102),a=n.n(i),s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,u=void 0===i?.7:i,l=(0,o.useRef)(null);(0,o.useEffect)((function(){l&&l.current&&l.current.parentNode&&((getComputedStyle(l.current.parentNode)||{}).position||(l.current.parentNode.style.position="relative"))}),[]);var c;return(0,r.jsxs)("div",s({className:(c="paraui-loading",t&&(c+=" "+t),c),style:n,ref:l},{children:[(0,r.jsx)("div",s({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{},void 0)}),void 0),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:u}},void 0)]}),void 0)}},3672:function(e,t,n){var r=n(7712),o=n(9297),i=n(1731),a=n(3094),s=n(9011),u=n(8528),l=n.n(u),c=n(6570),d=n.n(c),f=n(3475),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},v=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};t.default=function(e){var t=e.className,n=e.size,u=void 0===n?"large":n,c=e.labelMode,m=void 0===c?"outside":c,b=e.placeholder,h=void 0===b?"":b,y=e.label,x=void 0===y?"":y,g=e.disabled,j=void 0!==g&&g,w=e.multiline,O=void 0!==w&&w,N=e.required,S=void 0!==N&&N,C=e.labelSign,k=e.rows,P=void 0===k?2:k,E=e.error,q=void 0!==E&&E,M=e.helperText,_=void 0===M?"":M,I=e.addonBefore,L=void 0===I?"":I,F=e.addonAfter,D=void 0===F?"":F,U=(e.defaultValue,e.value),A=e.autoFocus,T=void 0!==A&&A,R=e.type,B=void 0===R?"text":R,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,re=e.onEnter,oe=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,se=v(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),ue=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],le=(0,o.useState)(!0),ce=le[0],de=le[1],fe=(0,o.useState)(""),pe=fe[0],ve=fe[1],me=(0,o.useState)(!1),be=me[0],he=me[1],ye=(0,o.useState)("text"),xe=ye[0],ge=ye[1],je=(0,o.useState)(!1),we=je[0],Oe=je[1],Ne=(0,o.useState)(!1),Se=Ne[0],Ce=Ne[1],ke=(0,o.useState)([]),Pe=ke[0],Ee=ke[1],qe=(0,o.useState)({isCompositions:!0})[0],Me=(0,o.useRef)(null),_e=(0,o.useRef)(null);(0,o.useEffect)((function(){if(void 0!==e.defaultValue){var t=Le(e.defaultValue);ve(t),Fe(t)}}),[]),(0,o.useEffect)((function(){B!==xe&&ge(B)}),[B]),(0,o.useEffect)((function(){if(void 0!==U){var e=Le(U);ve(e),Fe(e)}}),[U]),(0,o.useEffect)((function(){de(""===pe||void 0===pe)}),[pe]),(0,o.useEffect)((function(){J&&Oe(be)}),[be,J]),(0,o.useEffect)((function(){return we?window.addEventListener("keydown",Te):window.removeEventListener("keydown",Te),function(){window.removeEventListener("keydown",Te)}}),[we]);var Ie,Le=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Fe=function(e){Me&&Me.current&&(Me.current.value=e,Me.current.setAttribute("value",e))},De=function(){j||(de(!1),(Me&&Me.current).focus())},Ue=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,o="nextSibling",i=".text-field-select-content-item";38===n&&(o="previousSibling",i=".text-field-select-content-item:last-child"),r?(r=r[o])||(r=t.querySelector(i)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),Ae(r,t))},Ae=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},Te=function(e){var t=document.querySelector("."+ue),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var o=r.dataset.val;Ge(JSON.parse(o))(e),(Me&&Me.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ue({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Ue({selectDom:t,keyCode:e.keyCode,currentDom:n})},Re=function(e){he(!1),""===e.target.value&&de(!0),Q&&Q(e)},Be=function(e){Ce(!0),J&&J(e,(function(e){Ee(e||[]),Ce(!1)}))},Ke=function(e){he(!0),X&&X(e),Be(e.target.value)},Ve=function(t){var n=Le(t.target.value);n&&de(!1),n!==pe?(void 0===e.value&&(ve(n),Fe(n)),ee&&ee(t),Be(t.target.value)):Fe(n)},ze=function(e){qe.isCompositions&&Ve(e)},We=function(e){qe.isCompositions=!1},He=function(e){qe.isCompositions=!0,Ve(e)},Je=function(e){13===e.keyCode&&re&&re(e),te&&te(e)},Ze=function(e){ne&&ne(e)},$e=function(e){"password"===B&&("text"===xe&&ge("password"),"password"===xe&&ge("text")),K&&K(e)},Ye=function(){Oe(!1)},Ge=function(e){return function(t){ae&&ae(e)}},Qe=(0,o.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:void 0!==H&&(0,r.jsx)("span",p({className:"length-limit"},{children:(pe?pe.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,pe]),Xe=(0,o.useMemo)((function(){var e=V||("password"===B?"password"===xe?(0,r.jsx)(d(),{},void 0):(0,r.jsx)(l(),{},void 0):null);return(0,r.jsx)(r.Fragment,{children:W&&e&&(0,r.jsx)("span",p({className:"right-icon",onClick:$e},{children:e}),void 0)},void 0)}),[W,V,B,xe]),et=(0,o.useMemo)((function(){return(0,r.jsxs)("div",p({className:"text-field-content-within",ref:_e},{children:[(0,r.jsxs)("div",p({className:"text-field-content-within-input"},{children:[O?(0,r.jsx)("textarea",p({ref:Me,rows:P,onCompositionStart:We,onCompositionEnd:He,onBlur:Re,onFocus:Ke,onChange:ze,onKeyDown:Je,onKeyUp:Ze,disabled:j},se),void 0):(0,r.jsx)("input",p({ref:Me,type:xe,onCompositionStart:We,onCompositionEnd:He,onBlur:Re,onFocus:Ke,onChange:ze,onKeyDown:Je,onKeyUp:Ze,disabled:j},se),void 0),ce&&!be&&(0,r.jsx)("span",p({className:"text-field-label-placeholder",onClick:De},{children:"outside"===m?h:(0,r.jsxs)(r.Fragment,{children:[x||h,S&&(0,r.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,r.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Qe,Xe]}),void 0)}),[ce,be,T,xe,pe,Qe,Xe,m,h,x,j,O,P,se,ee,J]),tt=(0,o.useMemo)((function(){var e;return(0,r.jsxs)("div",p({className:(e="text-field-select-content",Se&&(e+=" text-field-select-content-loading"),ue&&(e+=" "+ue),e),style:{width:(_e&&_e.current?_e.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,r.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:Ge(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,r.jsx)(a.default,{children:e[G]},void 0)}),t)})),Se&&(0,r.jsx)(s.default,{},void 0)]}),void 0)}),[_e,we,Pe,$,G,ae,Se,ue]),nt=(0,o.useMemo)((function(){return(0,r.jsx)(i.Tooltip,p({open:we,title:tt,onClose:Ye,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",u&&(e+=" paraui-text-field-select-"+u),Z&&(e+=" "+Z),e)}},{children:et}),void 0);var e}),[ce,be,T,xe,pe,Qe,Xe,m,h,x,j,O,P,se,ee,J,ae,_e,we,Z,u]),rt=(0,o.useMemo)((function(){var e=Boolean(S||C||x);return(0,r.jsx)(r.Fragment,{children:"outside"===m&&e&&(0,r.jsxs)("label",p({className:"text-field-label"},{children:[x,S&&(0,r.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,r.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[m,x,C,S]);return(0,r.jsxs)("div",p({className:(Ie="paraui-text-field",Ie+=" text-field",u&&!O&&(Ie+=" text-field-"+u),t&&(Ie+=" "+t),q&&(Ie+=" text-field-error"),be&&(Ie+=" text-field-focus"),j&&(Ie+=" text-field-disabled"),O&&(Ie+=" text-field-multiline"),Ie)},{children:[rt,(0,r.jsxs)("div",p({className:"text-field-content"},{children:[L&&(0,r.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:L}),void 0),J?nt:et,D&&(0,r.jsx)("div",p({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:D}),void 0)]}),void 0),_&&(0,r.jsx)("p",p({className:"text-field-error-text"},{children:_}),void 0)]}),void 0)}},6885:function(e,t,n){var r=n(7712),o=n(1731),i=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper)});return(0,r.jsx)(o.Tooltip,a({},e,{classes:n},{children:e.children}),void 0)}},1731:function(t){t.exports=e},6028:function(e){e.exports=t},1102:function(e){e.exports=n},3277:function(e){e.exports=r},5191:function(e){e.exports=o},6570:function(e){e.exports=i},8528:function(e){e.exports=a},3616:function(e){e.exports=s},3475:function(e){e.exports=u},9297:function(e){e.exports=l}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return d[e](n,n.exports,p),n.exports}p.m=d,c=[],p.O=function(e,t,n,r){if(!t){var o=1/0;for(s=0;s<c.length;s++){t=c[s][0],n=c[s][1],r=c[s][2];for(var i=!0,a=0;a<t.length;a++)(!1&r||o>=r)&&Object.keys(p.O).every((function(e){return p.O[e](t[a])}))?t.splice(a--,1):(i=!1,r<o&&(o=r));i&&(c.splice(s--,1),e=n())}return e}r=r||0;for(var s=c.length;s>0&&c[s-1][2]>r;s--)c[s]=c[s-1];c[s]=[t,n,r]},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={2832:0,1465:0,5717:0,2996:0,2823:0,9296:0};p.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,i=n[0],a=n[1],s=n[2],u=0;for(r in a)p.o(a,r)&&(p.m[r]=a[r]);if(s)var l=s(p);for(t&&t(n);u<i.length;u++)o=i[u],p.o(e,o)&&e[o]&&e[o][0](),e[i[u]]=0;return p.O(l)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var v=p.O(void 0,[9296],(function(){return p(601)}));return v=p.O(v)}()}));
|
|
16
|
+
n(4126);var r=n(9297),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),t.Fragment=i("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,c=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)u.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:c,props:i,_owner:a.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var r=n(7712),o=n(9297),i=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,u=void 0===n?"bottom-start":n,l=e.tips,s=void 0===l?"":l,c=e.className,d=void 0===c?"":c,f=(0,o.useRef)(),p=(0,o.useState)(""),v=p[0],b=p[1];(0,o.useEffect)((function(){b(s)}),[s]);var m;return(0,r.jsx)("div",a({ref:f,className:(m="paraui-auto-tips",d&&(m+=" "+d),m),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?b(s||f.current.innerText):b("")}},{children:(0,r.jsx)(i.default,a({title:v,placement:u},{children:(0,r.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},601:function(e,t,n){n.r(t),n.d(t,{InputNumber:function(){return m}});var r=n(7712),o=n(9297),i=n(3616),a=n.n(i),u=n(6028),l=n.n(u),s=n(3277),c=n.n(s),d=n(5191),f=n.n(d),p=n(3672),v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},b=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};var m=function(e){var t=e.className,n=(e.defaultValue,e.value),i=e.size,u=void 0===i?"large":i,s=e.btnMode,d=void 0===s?"tb":s,m=e.disabled,h=void 0!==m&&m,y=e.disabledStr,g=e.disabledAdd,x=void 0!==g&&g,j=e.disabledReduce,w=void 0!==j&&j,O=e.onChange,N=e.step,S=void 0===N?1:N,C=e.onKeydown,k=e.onEnter,P=b(e,["className","defaultValue","value","size","btnMode","disabled","disabledStr","disabledAdd","disabledReduce","onChange","step","onKeydown","onEnter"]),q=(0,o.useState)(),E=q[0],M=q[1];(0,o.useEffect)((function(){void 0!==e.defaultValue&&M(e.defaultValue)}),[]),(0,o.useEffect)((function(){void 0!==n&&M(n)}),[n]);var L,_=function(t){if(!h&&!x){var n=function(e,t){var n,r,o,i;isNaN(e)&&(e=0),isNaN(t)&&(t=0),e=Number(e),t=Number(t);try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}if(i=Math.abs(n-r),o=Math.pow(10,Math.max(n,r)),i>0){var a=Math.pow(10,i);n>r?(e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""))*a):(e=Number(e.toString().replace(".",""))*a,t=Number(t.toString().replace(".","")))}else e=Number(e.toString().replace(".","")),t=Number(t.toString().replace(".",""));return(e+t)/o}(Number(E||""),S);void 0===e.value&&M(n),O&&O(n,t)}},I=function(t){if(!h&&!w){var n=Number(function(e,t){var n,r,o;isNaN(e)&&(e=0),isNaN(t)&&(t=0),e=Number(e),t=Number(t);try{n=e.toString().split(".")[1].length}catch(e){n=0}try{r=t.toString().split(".")[1].length}catch(e){r=0}return((e*(o=Math.pow(10,Math.max(n,r)))-t*o)/o).toFixed(n>=r?n:r)}(Number(E||""),S));void 0===e.value&&M(n),O&&O(n,t)}};return(0,r.jsx)("div",v({className:(L="paraui-input-number",t&&(L+=" "+t),u&&(L+=" input-number-"+u),h&&(L+=" input-number-disabled"),x&&(L+=" input-number-disabled-add"),w&&(L+=" input-number-disabled-reduce"),d&&(L+=" input-number-"+d),L)},{children:(0,r.jsx)(p.default,v({},P,{step:S,value:void 0===E?"":E,type:"number",size:u,disabled:h,addonAfter:function(){if(!h)return"tb"===d?(0,r.jsxs)("div",v({className:"tb-btn"},{children:[(0,r.jsx)("span",v({className:"tb-btn-top",onClick:_},{children:(0,r.jsx)(a(),{},void 0)}),void 0),(0,r.jsx)("span",v({className:"tb-btn-bottom",onClick:I},{children:(0,r.jsx)(l(),{},void 0)}),void 0)]}),void 0):"lr"===d?(0,r.jsx)("span",v({className:"reduce-btn",onClick:I},{children:(0,r.jsx)(c(),{},void 0)}),void 0):void 0}(),addonBefore:function(){if(!h&&"tb"!==d)return"lr"===d?(0,r.jsx)("span",v({className:"add-btn",onClick:_},{children:(0,r.jsx)(f(),{},void 0)}),void 0):void 0}(),onChange:function(t){var n=t.target.value;void 0===e.value&&M(n),O&&O(n,t)},onKeyDown:function(e){if(y)for(var t=0,n=y.length;t<n;t++){var r=y[t];e.key===r&&e.preventDefault()}13===e.keyCode&&k&&k(e),C&&C(e)},onBlur:function(e){e.target.value=E}}),void 0)}),void 0)};t.default=m},9011:function(e,t,n){var r=n(7712),o=n(9297),i=n(1102),a=n.n(i),u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,l=void 0===i?.7:i,s=(0,o.useRef)(null);(0,o.useEffect)((function(){s&&s.current&&s.current.parentNode&&((getComputedStyle(s.current.parentNode)||{}).position||(s.current.parentNode.style.position="relative"))}),[]);var c;return(0,r.jsxs)("div",u({className:(c="paraui-loading",t&&(c+=" "+t),c),style:n,ref:s},{children:[(0,r.jsx)("div",u({className:"paraui-loading-box"},{children:(0,r.jsx)(a(),{},void 0)}),void 0),(0,r.jsx)("div",{className:"paraui-loading-mask",style:{opacity:l}},void 0)]}),void 0)}},3672:function(e,t,n){var r=n(7712),o=n(9297),i=n(1731),a=n(3094),u=n(9011),l=n(8528),s=n.n(l),c=n(6570),d=n.n(c),f=n(3475),p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)},v=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};t.default=function(e){var t=e.className,n=e.size,l=void 0===n?"large":n,c=e.labelMode,b=void 0===c?"outside":c,m=e.placeholder,h=void 0===m?"":m,y=e.label,g=void 0===y?"":y,x=e.disabled,j=void 0!==x&&x,w=e.multiline,O=void 0!==w&&w,N=e.required,S=void 0!==N&&N,C=e.labelSign,k=e.rows,P=void 0===k?2:k,q=e.error,E=void 0!==q&&q,M=e.helperText,L=void 0===M?"":M,_=e.addonBefore,I=void 0===_?"":_,F=e.addonAfter,D=void 0===F?"":F,U=(e.defaultValue,e.value),A=e.autoFocus,T=void 0!==A&&A,R=e.type,B=void 0===R?"text":R,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,re=e.onEnter,oe=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,ue=v(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),le=(0,o.useState)("text-field-select-content-"+(0,f.UUID)())[0],se=(0,o.useState)(!0),ce=se[0],de=se[1],fe=(0,o.useState)(""),pe=fe[0],ve=fe[1],be=(0,o.useState)(!1),me=be[0],he=be[1],ye=(0,o.useState)("text"),ge=ye[0],xe=ye[1],je=(0,o.useState)(!1),we=je[0],Oe=je[1],Ne=(0,o.useState)(!1),Se=Ne[0],Ce=Ne[1],ke=(0,o.useState)([]),Pe=ke[0],qe=ke[1],Ee=((0,o.useState)({isCompositions:!0})[0],(0,o.useRef)(null)),Me=(0,o.useRef)(null);(0,o.useEffect)((function(){void 0!==e.defaultValue&&(ve(e.defaultValue),Ie(e.defaultValue))}),[]),(0,o.useEffect)((function(){B!==ge&&xe(B)}),[B]),(0,o.useEffect)((function(){void 0!==U&&(ve(U),Ie(U))}),[U]),(0,o.useEffect)((function(){de(""===pe||void 0===pe)}),[pe]),(0,o.useEffect)((function(){J&&Oe(me)}),[me,J]),(0,o.useEffect)((function(){return we?window.addEventListener("keydown",Ae):window.removeEventListener("keydown",Ae),function(){window.removeEventListener("keydown",Ae)}}),[we]),(0,o.useEffect)((function(){if(!me&&pe){var t=_e(pe);if(t!==pe){var n={};n.target=Ee.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[pe,me]);var Le,_e=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Ie=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},Fe=function(){j||(de(!1),(Ee&&Ee.current).focus())},De=function(e){var t=e.selectDom,n=e.keyCode,r=e.currentDom,o="nextSibling",i=".text-field-select-content-item";38===n&&(o="previousSibling",i=".text-field-select-content-item:last-child"),r?(r=r[o])||(r=t.querySelector(i)):r=t.querySelector(".text-field-select-content-item"),r&&(r.classList.add("text-field-select-content-item-keydown"),Ue(r,t))},Ue=function(e,t){var n=t.clientHeight,r=e.offsetTop+e.clientHeight-n;t.scrollTop=r>0?r:0},Ae=function(e){var t=document.querySelector("."+le),n=null,r=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&r){var o=r.dataset.val;Je(JSON.parse(o))(e),(Ee&&Ee.current).blur()}r&&(n=r,r.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&De({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&De({selectDom:t,keyCode:e.keyCode,currentDom:n})},Te=function(e){he(!1),""===e.target.value&&de(!0),Q&&Q(e)},Re=function(e){Ce(!0),J&&J(e,(function(e){qe(e||[]),Ce(!1)}))},Be=function(e){he(!0),X&&X(e),Re(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(ve(n),Ie(n)),ee&&ee(t),Re(t.target.value)},Ve=function(e){13===e.keyCode&&re&&re(e),te&&te(e)},ze=function(e){ne&&ne(e)},We=function(e){"password"===B&&("text"===ge&&xe("password"),"password"===ge&&xe("text")),K&&K(e)},He=function(){Oe(!1)},Je=function(e){return function(t){ae&&ae(e)}},Ze=(0,o.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:void 0!==H&&(0,r.jsx)("span",p({className:"length-limit"},{children:(pe?pe.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,pe]),$e=(0,o.useMemo)((function(){var e=V||("password"===B?"password"===ge?(0,r.jsx)(d(),{},void 0):(0,r.jsx)(s(),{},void 0):null);return(0,r.jsx)(r.Fragment,{children:W&&e&&(0,r.jsx)("span",p({className:"right-icon",onClick:We},{children:e}),void 0)},void 0)}),[W,V,B,ge]),Ye=(0,o.useMemo)((function(){return(0,r.jsxs)("div",p({className:"text-field-content-within",ref:Me},{children:[(0,r.jsxs)("div",p({className:"text-field-content-within-input"},{children:[O?(0,r.jsx)("textarea",p({ref:Ee,rows:P,onBlur:Te,onFocus:Be,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},ue),void 0):(0,r.jsx)("input",p({ref:Ee,type:ge,onBlur:Te,onFocus:Be,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},ue),void 0),ce&&!me&&(0,r.jsx)("span",p({className:"text-field-label-placeholder",onClick:Fe},{children:"outside"===b?h:(0,r.jsxs)(r.Fragment,{children:[g||h,S&&(0,r.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,r.jsx)("span",{children:C},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[ce,me,T,ge,pe,Ze,$e,b,h,g,j,O,P,ue,ee,J]),Ge=(0,o.useMemo)((function(){var e;return(0,r.jsxs)("div",p({className:(e="text-field-select-content",Se&&(e+=" text-field-select-content-loading"),le&&(e+=" "+le),e),style:{width:(Me&&Me.current?Me.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,r.jsx)("div",p({className:"text-field-select-content-item",onMouseDown:Je(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,r.jsx)(a.default,{children:e[G]},void 0)}),t)})),Se&&(0,r.jsx)(u.default,{},void 0)]}),void 0)}),[Me,we,Pe,$,G,ae,Se,le]),Qe=(0,o.useMemo)((function(){return(0,r.jsx)(i.Tooltip,p({open:we,title:Ge,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",l&&(e+=" paraui-text-field-select-"+l),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[ce,me,T,ge,pe,Ze,$e,b,h,g,j,O,P,ue,ee,J,ae,Me,we,Z,l]),Xe=(0,o.useMemo)((function(){var e=Boolean(S||C||g);return(0,r.jsx)(r.Fragment,{children:"outside"===b&&e&&(0,r.jsxs)("label",p({className:"text-field-label"},{children:[g,S&&(0,r.jsx)("span",p({className:"text-field-required"},{children:"*"}),void 0),C&&(0,r.jsx)("span",{children:C},void 0)]}),void 0)},void 0)}),[b,g,C,S]);return(0,r.jsxs)("div",p({className:(Le="paraui-text-field",Le+=" text-field",l&&!O&&(Le+=" text-field-"+l),t&&(Le+=" "+t),E&&(Le+=" text-field-error"),me&&(Le+=" text-field-focus"),j&&(Le+=" text-field-disabled"),O&&(Le+=" text-field-multiline"),e.limitLength&&pe&&pe.toString().length>e.limitLength&&(Le+=" text-field-limit"),Le)},{children:[Xe,(0,r.jsxs)("div",p({className:"text-field-content"},{children:[I&&(0,r.jsx)("div",p({className:"text-field-content-before",onClick:function(e){oe&&oe(e)}},{children:I}),void 0),J?Qe:Ye,D&&(0,r.jsx)("div",p({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:D}),void 0)]}),void 0),L&&(0,r.jsx)("p",p({className:"text-field-error-text"},{children:L}),void 0)]}),void 0)}},6885:function(e,t,n){var r=n(7712),o=n(1731),i=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,u=void 0===n?"bottom":n,l=a(a({},e.classes),{popper:(0,i.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==u?void 0:u.includes("left"))||(null==u?void 0:u.includes("right")),"paraui-tooltip-top-bottom":(null==u?void 0:u.includes("top"))||(null==u?void 0:u.includes("bottom"))})});return(0,r.jsx)(o.Tooltip,a({},e,{classes:l}),void 0)}},1731:function(t){t.exports=e},6028:function(e){e.exports=t},1102:function(e){e.exports=n},3277:function(e){e.exports=r},5191:function(e){e.exports=o},6570:function(e){e.exports=i},8528:function(e){e.exports=a},3616:function(e){e.exports=u},3475:function(e){e.exports=l},9297:function(e){e.exports=s}},f={};function p(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return d[e](n,n.exports,p),n.exports}p.m=d,c=[],p.O=function(e,t,n,r){if(!t){var o=1/0;for(u=0;u<c.length;u++){t=c[u][0],n=c[u][1],r=c[u][2];for(var i=!0,a=0;a<t.length;a++)(!1&r||o>=r)&&Object.keys(p.O).every((function(e){return p.O[e](t[a])}))?t.splice(a--,1):(i=!1,r<o&&(o=r));i&&(c.splice(u--,1),e=n())}return e}r=r||0;for(var u=c.length;u>0&&c[u-1][2]>r;u--)c[u]=c[u-1];c[u]=[t,n,r]},p.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return p.d(t,{a:t}),t},p.d=function(e,t){for(var n in t)p.o(t,n)&&!p.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},p.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},p.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={2832:0,1465:0,5717:0,2996:0,2823:0,9296:0};p.O.j=function(t){return 0===e[t]};var t=function(t,n){var r,o,i=n[0],a=n[1],u=n[2],l=0;for(r in a)p.o(a,r)&&(p.m[r]=a[r]);if(u)var s=u(p);for(t&&t(n);l<i.length;l++)o=i[l],p.o(e,o)&&e[o]&&e[o][0](),e[i[l]]=0;return p.O(s)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var v=p.O(void 0,[9296],(function(){return p(601)}));return v=p.O(v)}()}));
|
package/Modal/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/WarningCircleF"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["@material-ui/core","@material-ui/core/styles","@para-ui/icons/CheckCircleF","@para-ui/icons/Close","@para-ui/icons/CloseCircleF","@para-ui/icons/Down","@para-ui/icons/Forbid","@para-ui/icons/LoadingF","@para-ui/icons/WarningCircle","@para-ui/icons/WarningCircleF","react","react-dom"],n):"object"==typeof exports?exports.ParaUI=n(require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/WarningCircleF"),require("react"),require("react-dom")):e.ParaUI=n(e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/CheckCircleF"],e["@para-ui/icons/Close"],e["@para-ui/icons/CloseCircleF"],e["@para-ui/icons/Down"],e["@para-ui/icons/Forbid"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/WarningCircle"],e["@para-ui/icons/WarningCircleF"],e.react,e["react-dom"])}(self,(function(e,n,r,
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/WarningCircleF"),require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["@material-ui/core","@material-ui/core/styles","@para-ui/icons/CheckCircleF","@para-ui/icons/Close","@para-ui/icons/CloseCircleF","@para-ui/icons/Down","@para-ui/icons/Forbid","@para-ui/icons/LoadingF","@para-ui/icons/WarningCircle","@para-ui/icons/WarningCircleF","react","react-dom"],n):"object"==typeof exports?exports.ParaUI=n(require("@material-ui/core"),require("@material-ui/core/styles"),require("@para-ui/icons/CheckCircleF"),require("@para-ui/icons/Close"),require("@para-ui/icons/CloseCircleF"),require("@para-ui/icons/Down"),require("@para-ui/icons/Forbid"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/WarningCircle"),require("@para-ui/icons/WarningCircleF"),require("react"),require("react-dom")):e.ParaUI=n(e["@material-ui/core"],e["@material-ui/core/styles"],e["@para-ui/icons/CheckCircleF"],e["@para-ui/icons/Close"],e["@para-ui/icons/CloseCircleF"],e["@para-ui/icons/Down"],e["@para-ui/icons/Forbid"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/WarningCircle"],e["@para-ui/icons/WarningCircleF"],e.react,e["react-dom"])}(self,(function(e,n,i,r,o,t,a,c,l,s,u,d){return function(){"use strict";var p,f={4927:function(e,n,i){function r(e){var n,i,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(i=r(e[n]))&&(o&&(o+=" "),o+=i);else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function o(){for(var e,n,i=0,o="";i<arguments.length;)(e=arguments[i++])&&(n=r(e))&&(o&&(o+=" "),o+=n);return o}i.d(n,{Z:function(){return o}})},4126:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var n=Object.getOwnPropertySymbols,
|
|
7
|
+
var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},i=0;i<10;i++)n["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,c,l=o(e),s=1;s<arguments.length;s++){for(var u in a=Object(arguments[s]))i.call(a,u)&&(l[u]=a[u]);if(n){c=n(a);for(var d=0;d<c.length;d++)r.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l}},9524:function(e,n,i){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
r(4126);var i=r(9297),o=60103;if(n.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;o=t("react.element"),n.Fragment=t("react.fragment")}var a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var i,t={},s=null,u=null;for(i in void 0!==r&&(s=""+r),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(u=n.ref),n)c.call(n,i)&&!l.hasOwnProperty(i)&&(t[i]=n[i]);if(e&&e.defaultProps)for(i in n=e.defaultProps)void 0===t[i]&&(t[i]=n[i]);return{$$typeof:o,type:e,key:s,ref:u,props:t,_owner:a.current}}n.jsx=s,n.jsxs=s},7712:function(e,n,r){e.exports=r(9524)},2990:function(e,n,r){r.d(n,{default:function(){return j}});var i=r(7712),o=r(9297),t=r(1731),a=r(4927),c=r(1102),l=r.n(c),s=r(2749),u=r.n(s),d=r(6885),p=r(6028),f=r.n(p),v=function(){return v=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},v.apply(this,arguments)};var m=function(){return m=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},m.apply(this,arguments)},b=function(e,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)n.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r},h=function(e){var n=e.variant,r=void 0===n?"contained":n,c=e.size,s=void 0===c?"large":c,p=e.className,f=e.disabled,v=void 0!==f&&f,h=e.children,j=e.startIcon,y=e.endIcon,x=e.loading,g=void 0!==x&&x,O=e.toolTipTitle,C=void 0===O?"":O,w=e.danger,P=void 0!==w&&w,k=b(e,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),N=(0,o.useState)(!1),T=N[0],S=N[1],F=function(e){if(!T)return"start"===e&&j?(0,i.jsx)("span",m({className:(0,a.Z)("btn-icon","start-icon")},{children:j}),void 0):"end"===e&&y?(0,i.jsx)("span",m({className:(0,a.Z)("btn-icon","end-icon")},{children:y}),void 0):null;if("object"==typeof g){var n=g.delay||0;setTimeout((function(){return S(!1)}),n)}return"start"===e?(0,i.jsx)("span",m({className:"btn-icon loading-icon"},{children:(0,i.jsx)(l(),{},void 0)}),void 0):null},E=(0,i.jsx)(t.Button,m({},k,{color:"default",variant:"contained",disabled:v,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",p,"paraui-button-".concat(r),"paraui-button-".concat(s),T&&"paraui-button-loading",P&&!v&&"paraui-button-dangerous"),startIcon:F("start"),endIcon:F("end")},{children:h}),void 0);return(0,o.useEffect)((function(){S(!!g)}),[g]),v&&C?(0,i.jsx)(d.default,m({title:function(){if(v&&C){return(0,i.jsxs)("span",{children:[(0,i.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),C]},void 0)}return C}()},{children:(0,i.jsx)("span",m({className:"paraui-button--disabled"},{children:E}),void 0)}),void 0):E};h.IconButton=function(e){var n=e.variant,r=void 0===n?"contained":n,c=e.size,s=void 0===c?"large":c,p=e.toolTipTitle,f=void 0===p?"":p,v=e.children,h=e.className,j=e.disabled,y=void 0!==j&&j,x=e.loading,g=void 0!==x&&x,O=e.TooltipProps,C=e.danger,w=void 0!==C&&C,P=b(e,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),k=(0,o.useState)(!1),N=k[0],T=k[1],S=(0,i.jsx)(t.IconButton,m({},P,{disabled:y,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",h,"paraui-icon-button-".concat(r),"paraui-icon-button-".concat(s),N&&"paraui-icon-button-loading",w&&!y&&"paraui-icon-button-dangerous")},{children:function(){if(!N)return v;if("object"==typeof g){var e=g.delay||0;setTimeout((function(){return T(!1)}),e)}return(0,i.jsx)("span",m({className:"loading-icon"},{children:(0,i.jsx)(l(),{},void 0)}),void 0)}()}),void 0);return(0,o.useEffect)((function(){T(!!g)}),[g]),f?(0,i.jsx)(d.default,m({},O,{title:function(){if(y&&f){return(0,i.jsxs)("span",{children:[(0,i.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),f]},void 0)}return f}()},{children:y?(0,i.jsx)("span",m({className:"paraui-button--disabled"},{children:S}),void 0):S}),void 0):S},h.SplitButton=function(e){var n=e.buttonText,r=e.options,c=void 0===r?[]:r,l=e.className,s=e.disabled,u=void 0!==s&&s,d=e.onClick,p=e.optionRender,m=(0,o.useState)(!1),b=m[0],h=m[1],y=(0,o.useRef)(null),x=(0,o.useRef)(),g=(0,o.useState)(0),O=g[0],C=g[1],w=function(e,n,r){var i;C(n),h(!1),null===(i=x.current)||void 0===i||i.classList.remove("paraui-button-split--active"),null==d||d(e,r)},P=function(e){var n,r;(null===(n=y.current)||void 0===n?void 0:n.contains(e.target))||(h(!1),null===(r=x.current)||void 0===r||r.classList.remove("paraui-button-split--active"))},k=function(){return(0,i.jsx)("div",v({className:"paraui-button-split-list"},{children:(0,i.jsx)("ul",{children:c.map((function(e,n){return Array.isArray(e)?function(e,n){return(0,i.jsx)("li",v({className:"split-li-group"},{children:e.map((function(e,r){var o="".concat(n,"-").concat(r);return(0,i.jsx)("div",v({className:(0,a.Z)("split-li",o===O&&"split-li--active"),onClick:function(n){return w(e,o,n)}},{children:(null==p?void 0:p(e))||e.label}),o)}))}),n)}(e,n):(0,i.jsx)("li",v({className:(0,a.Z)("split-li",n===O&&"split-li--active"),onClick:function(r){return w(e,n,r)}},{children:(null==p?void 0:p(e))||e.label}),n)}))},void 0)}),void 0)};return(0,i.jsxs)("div",v({className:(0,a.Z)("paraui-button-split",l),ref:y,onMouseLeave:function(e){var n;e.stopPropagation(),null===(n=e.currentTarget.firstElementChild)||void 0===n||n.classList.remove("paraui-button-split--active"),h(!1)}},{children:[(0,i.jsx)(j,v({variant:"outlined",onMouseEnter:function(e){e.stopPropagation();var n=e.currentTarget;x.current=n,n.classList.add("paraui-button-split--active"),h(!0)},startIcon:(0,i.jsx)(f(),{},void 0),disabled:u},{children:null!=n?n:"更多操作"}),void 0),(0,i.jsx)(t.Popper,v({open:b,anchorEl:y.current,transition:!0,placement:"bottom-end"},{children:function(e){var n=e.TransitionProps;e.placement;return(0,i.jsx)(t.Grow,v({},n,{children:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(t.ClickAwayListener,v({onClickAway:P},{children:k()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var j=h},3007:function(e,n,r){r.r(n),r.d(n,{Confirm:function(){return P},Modal:function(){return T},default:function(){return S}});var i=r(7712),o=r(9297),t=r(1731),a=r(2990),c=r(19),l=r.n(c),s=r(4927),u=r(2268),d=r.n(u),p=r(3285),f=r.n(p),v=r(20),m=r.n(v),b=r(6897),h=r.n(b),j=r(9248),y=r.n(j),x=r(7297),g=function(){return g=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},g.apply(this,arguments)},O={success:(0,i.jsx)(f(),{},void 0),warn:(0,i.jsx)(y(),{},void 0),warning:(0,i.jsx)(y(),{},void 0),error:(0,i.jsx)(m(),{},void 0),info:(0,i.jsx)(h(),{},void 0)},C=function(e){var n=e.type,r=void 0===n?"warning":n,o=e.open,c=void 0!==o&&o,u=e.title,d=e.content,p=e.icon,f=void 0===p?null:p,v=e.okText,m=e.cancelText,b=e.onOk,h=e.onCancel,j=e.className,y=e.showCancel,x=void 0===y||y,C=e.closable,w=void 0!==C&&C,P=e.disableBackdropClick,k=void 0===P||P,N=e.disableEscapeKeyDown,T=void 0===N||N,S=e.okButtonProps,F=e.cancelButtonProps,E=e.resolveFn,q=e.callback,I=e.destroy,_=function(){null==h||h(),null==E||E(!1),null==I||I()},z=function(){null==b||b(),null==E||E(!0),null==q||q(),null==I||I()};return(0,i.jsx)(t.Modal,g({open:c,onClose:function(e,n){k||_()},closeAfterTransition:!0,BackdropProps:{timeout:500},disableEscapeKeyDown:T,disableAutoFocus:!0,className:(0,s.Z)("paraui-confirm",j)},{children:(0,i.jsx)(t.Fade,g({in:c},{children:(0,i.jsx)("div",g({className:"paraui-confirm-wrapper"},{children:(0,i.jsxs)("div",g({className:"paraui-confirm-content"},{children:[w&&(0,i.jsx)(a.default.IconButton,g({variant:"outlined",size:"small",className:"paraui-confirm-content-close",onClick:_},{children:(0,i.jsx)(l(),{},void 0)}),void 0),(0,i.jsx)("span",g({className:(0,s.Z)("paraui-confirm-content-icon","paraui-confirm-content-icon--".concat(r))},{children:f||O[r]}),void 0),(0,i.jsxs)("div",g({className:"paraui-confirm-content-body"},{children:[u&&(0,i.jsx)("span",g({className:"paraui-confirm-body-title"},{children:u}),void 0),(0,i.jsx)("div",g({className:"paraui-confirm-body-desc"},{children:d}),void 0)]}),void 0),(0,i.jsxs)("div",g({className:"paraui-confirm-content-actions"},{children:[x&&(0,i.jsx)(a.default,g({variant:"outlined",size:"small",onClick:_},F,{children:m||"取消"}),void 0),(0,i.jsx)(a.default,g({variant:"contained",size:"small",onClick:z},S,{children:v||"确定"}),void 0)]}),void 0)]}),void 0)}),void 0)}),void 0)}),void 0)},w=function(e,n,r){var o={type:n};return"string"==typeof e?o.content=e:o=g(g({},e),{type:n}),new Promise((function(e){!function(e,n,r){var o=document.createElement("div");document.body.appendChild(o);var t=function(){d().unmountComponentAtNode(o)&&o.parentNode&&o.parentNode.removeChild(o)};setTimeout((function(){d().render((0,i.jsx)(x.default,{children:(0,i.jsx)(C,g({},e,{open:!0,resolveFn:n,callback:r,destroy:t}),void 0)},void 0),o)}))}(o,e,r)}))},P={info:function(e,n){return w(e,"info",n)},warn:function(e,n){return w(e,"warn",n)},error:function(e,n){return w(e,"error",n)},success:function(e,n){return w(e,"success",n)}},k=function(){return k=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},k.apply(this,arguments)},N=function(e,n){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)n.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(r[i[o]]=e[i[o]])}return r},T=function(e){var n=e.open,r=void 0!==n&&n,c=e.title,u=void 0===c?"":c,d=e.children,p=void 0===d?null:d,f=e.actions,v=void 0===f?null:f,m=e.showActions,b=void 0===m||m,h=e.onOk,j=e.onCancel,y=e.okText,x=e.cancelText,g=e.okButtonProps,O=e.cancelButtonProps,C=e.showCancel,w=void 0===C||C,P=e.className,T=e.size,S=void 0===T?"md":T,F=e.disableBackdropClick,E=void 0===F||F,q=e.disableEscapeKeyDown,I=void 0===q||q,_=e.disableEnforceFocus,z=void 0===_||_,B=e.fullScreen,D=void 0!==B&&B,A=e.customizeSize,L=N(e,["open","title","children","actions","showActions","onOk","onCancel","okText","cancelText","okButtonProps","cancelButtonProps","showCancel","className","size","disableBackdropClick","disableEscapeKeyDown","disableEnforceFocus","fullScreen","customizeSize"]),R=(0,o.useState)(!1),Z=R[0],W=R[1],M=D||"fullScreen"===S,U=function(){W(!1),null==j||j()},K=function(){null==h||h()};(0,o.useEffect)((function(){W(r)}),[r]);return(0,i.jsxs)(t.Dialog,k({className:(0,s.Z)("paraui-modal",P),scroll:"paper",onClose:function(e,n){E||U()},open:Z,maxWidth:!1,disableEscapeKeyDown:I,disableEnforceFocus:z,fullScreen:M},L,{PaperProps:{style:function(){if(A)return A}()},classes:A?{paper:"paraui-modal-paper-customizesize"}:{paper:{sm:"paraui-modal-paper-sm",md:"paraui-modal-paper-md",lg:"paraui-modal-paper-lg",auto:"paraui-modal-paper-auto",fullScreen:"paraui-modal-paper-fullscreen"}[S]}},{children:[(0,i.jsxs)(t.DialogTitle,k({classes:{root:"paraui-modal-title"},disableTypography:!0},{children:[(0,i.jsx)("h3",{children:u},void 0),(0,i.jsx)(a.default.IconButton,k({onClick:U,className:"paraui-modal-title-close",variant:"outlined",size:"small"},{children:(0,i.jsx)(l(),{},void 0)}),void 0)]}),void 0),(0,i.jsx)(t.DialogContent,k({className:"paraui-modal-content"},{children:p}),void 0),b?v?(0,i.jsx)(t.DialogActions,k({className:"paraui-modal-actions"},{children:v}),void 0):(0,i.jsxs)(t.DialogActions,k({className:"paraui-modal-actions"},{children:[w&&(0,i.jsx)(a.default,k({onClick:U,variant:"outlined",size:"small"},O,{children:x||"取消"}),void 0),(0,i.jsx)(a.default,k({variant:"contained",onClick:K},g,{size:"small"},{children:y||"确定"}),void 0)]}),void 0):null]}),void 0)},S=T},7297:function(e,n,r){var i=r(7712),o=r(8604),t=function(){return t=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};n.default=function(e){var n,r=(0,o.createGenerateClassName)({seed:e.seed||"",productionPrefix:e.productionPrefix||"paraui"});return n=e.theme?(0,o.createMuiTheme)(t({},e.theme)):(0,o.createMuiTheme)({}),(0,i.jsx)(o.StylesProvider,t({generateClassName:r,injectFirst:!0},{children:(0,i.jsx)(o.ThemeProvider,t({theme:n},{children:e.children}),void 0)}),void 0)}},6885:function(e,n,r){var i=r(7712),o=r(1731),t=r(4927),a=function(){return a=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},a.apply(this,arguments)};n.default=function(e){var n,r=a(a({},e.classes),{popper:(0,t.Z)("paraui-tooltip",null===(n=e.classes)||void 0===n?void 0:n.popper)});return(0,i.jsx)(o.Tooltip,a({},e,{classes:r},{children:e.children}),void 0)}},1731:function(n){n.exports=e},8604:function(e){e.exports=n},3285:function(e){e.exports=r},19:function(e){e.exports=i},20:function(e){e.exports=o},6028:function(e){e.exports=t},2749:function(e){e.exports=a},1102:function(e){e.exports=c},6897:function(e){e.exports=l},9248:function(e){e.exports=s},9297:function(e){e.exports=u},2268:function(e){e.exports=d}},v={};function m(e){var n=v[e];if(void 0!==n)return n.exports;var r=v[e]={exports:{}};return f[e](r,r.exports,m),r.exports}m.m=f,p=[],m.O=function(e,n,r,i){if(!n){var o=1/0;for(c=0;c<p.length;c++){n=p[c][0],r=p[c][1],i=p[c][2];for(var t=!0,a=0;a<n.length;a++)(!1&i||o>=i)&&Object.keys(m.O).every((function(e){return m.O[e](n[a])}))?n.splice(a--,1):(t=!1,i<o&&(o=i));t&&(p.splice(c--,1),e=r())}return e}i=i||0;for(var c=p.length;c>0&&p[c-1][2]>i;c--)p[c]=p[c-1];p[c]=[n,r,i]},m.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(n,{a:n}),n},m.d=function(e,n){for(var r in n)m.o(n,r)&&!m.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},m.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={951:0,6615:0,4304:0,2823:0,9296:0};m.O.j=function(n){return 0===e[n]};var n=function(n,r){var i,o,t=r[0],a=r[1],c=r[2],l=0;for(i in a)m.o(a,i)&&(m.m[i]=a[i]);if(c)var s=c(m);for(n&&n(r);l<t.length;l++)o=t[l],m.o(e,o)&&e[o]&&e[o][0](),e[t[l]]=0;return m.O(s)},r=self.webpackChunkParaUI=self.webpackChunkParaUI||[];r.forEach(n.bind(null,0)),r.push=n.bind(null,r.push.bind(r))}();var b=m.O(void 0,[9296],(function(){return m(3007)}));return b=m.O(b)}()}));
|
|
16
|
+
i(4126);var r=i(9297),o=60103;if(n.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;o=t("react.element"),n.Fragment=t("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,i){var r,t={},s=null,u=null;for(r in void 0!==i&&(s=""+i),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(u=n.ref),n)c.call(n,r)&&!l.hasOwnProperty(r)&&(t[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===t[r]&&(t[r]=n[r]);return{$$typeof:o,type:e,key:s,ref:u,props:t,_owner:a.current}}n.jsx=s,n.jsxs=s},7712:function(e,n,i){e.exports=i(9524)},2990:function(e,n,i){i.d(n,{default:function(){return j}});var r=i(7712),o=i(9297),t=i(1731),a=i(4927),c=i(1102),l=i.n(c),s=i(2749),u=i.n(s),d=i(6885),p=i(6028),f=i.n(p),v=function(){return v=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++)for(var o in n=arguments[i])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},v.apply(this,arguments)};var m=function(){return m=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++)for(var o in n=arguments[i])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},m.apply(this,arguments)},b=function(e,n){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i},h=function(e){var n=e.variant,i=void 0===n?"contained":n,c=e.size,s=void 0===c?"large":c,p=e.className,f=e.disabled,v=void 0!==f&&f,h=e.children,j=e.startIcon,y=e.endIcon,x=e.loading,g=void 0!==x&&x,O=e.toolTipTitle,C=void 0===O?"":O,w=e.danger,P=void 0!==w&&w,k=b(e,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),N=(0,o.useState)(!1),T=N[0],S=N[1],F=function(e){if(!T)return"start"===e&&j?(0,r.jsx)("span",m({className:(0,a.Z)("btn-icon","start-icon")},{children:j}),void 0):"end"===e&&y?(0,r.jsx)("span",m({className:(0,a.Z)("btn-icon","end-icon")},{children:y}),void 0):null;if("object"==typeof g){var n=g.delay||0;setTimeout((function(){return S(!1)}),n)}return"start"===e?(0,r.jsx)("span",m({className:"btn-icon loading-icon"},{children:(0,r.jsx)(l(),{},void 0)}),void 0):null},E=(0,r.jsx)(t.Button,m({},k,{color:"default",variant:"contained",disabled:v,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",p,"paraui-button-".concat(i),"paraui-button-".concat(s),T&&"paraui-button-loading",P&&!v&&"paraui-button-dangerous"),startIcon:F("start"),endIcon:F("end")},{children:h}),void 0);return(0,o.useEffect)((function(){S(!!g)}),[g]),v&&C?(0,r.jsx)(d.default,m({title:function(){if(v&&C){return(0,r.jsxs)("span",{children:[(0,r.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),C]},void 0)}return C}()},{children:(0,r.jsx)("span",m({className:"paraui-button--disabled"},{children:E}),void 0)}),void 0):E};h.IconButton=function(e){var n=e.variant,i=void 0===n?"contained":n,c=e.size,s=void 0===c?"large":c,p=e.toolTipTitle,f=void 0===p?"":p,v=e.children,h=e.className,j=e.disabled,y=void 0!==j&&j,x=e.loading,g=void 0!==x&&x,O=e.TooltipProps,C=e.danger,w=void 0!==C&&C,P=b(e,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),k=(0,o.useState)(!1),N=k[0],T=k[1],S=(0,r.jsx)(t.IconButton,m({},P,{disabled:y,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",h,"paraui-icon-button-".concat(i),"paraui-icon-button-".concat(s),N&&"paraui-icon-button-loading",w&&!y&&"paraui-icon-button-dangerous")},{children:function(){if(!N)return v;if("object"==typeof g){var e=g.delay||0;setTimeout((function(){return T(!1)}),e)}return(0,r.jsx)("span",m({className:"loading-icon"},{children:(0,r.jsx)(l(),{},void 0)}),void 0)}()}),void 0);return(0,o.useEffect)((function(){T(!!g)}),[g]),f?(0,r.jsx)(d.default,m({},O,{title:function(){if(y&&f){return(0,r.jsxs)("span",{children:[(0,r.jsx)(u(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),f]},void 0)}return f}()},{children:y?(0,r.jsx)("span",m({className:"paraui-button--disabled"},{children:S}),void 0):S}),void 0):S},h.SplitButton=function(e){var n=e.buttonText,i=e.options,c=void 0===i?[]:i,l=e.className,s=e.disabled,u=void 0!==s&&s,d=e.onClick,p=e.optionRender,m=(0,o.useState)(!1),b=m[0],h=m[1],y=(0,o.useRef)(null),x=(0,o.useRef)(),g=(0,o.useState)(0),O=g[0],C=g[1],w=function(e,n,i){var r;C(n),h(!1),null===(r=x.current)||void 0===r||r.classList.remove("paraui-button-split--active"),null==d||d(e,i)},P=function(e){var n,i;(null===(n=y.current)||void 0===n?void 0:n.contains(e.target))||(h(!1),null===(i=x.current)||void 0===i||i.classList.remove("paraui-button-split--active"))},k=function(){return(0,r.jsx)("div",v({className:"paraui-button-split-list"},{children:(0,r.jsx)("ul",{children:c.map((function(e,n){return Array.isArray(e)?function(e,n){return(0,r.jsx)("li",v({className:"split-li-group"},{children:e.map((function(e,i){var o="".concat(n,"-").concat(i);return(0,r.jsx)("div",v({className:(0,a.Z)("split-li",o===O&&"split-li--active"),onClick:function(n){return w(e,o,n)}},{children:(null==p?void 0:p(e))||e.label}),o)}))}),n)}(e,n):(0,r.jsx)("li",v({className:(0,a.Z)("split-li",n===O&&"split-li--active"),onClick:function(i){return w(e,n,i)}},{children:(null==p?void 0:p(e))||e.label}),n)}))},void 0)}),void 0)};return(0,r.jsxs)("div",v({className:(0,a.Z)("paraui-button-split",l),ref:y,onMouseLeave:function(e){var n;e.stopPropagation(),null===(n=e.currentTarget.firstElementChild)||void 0===n||n.classList.remove("paraui-button-split--active"),h(!1)}},{children:[(0,r.jsx)(j,v({variant:"outlined",onMouseEnter:function(e){e.stopPropagation();var n=e.currentTarget;x.current=n,n.classList.add("paraui-button-split--active"),h(!0)},startIcon:(0,r.jsx)(f(),{},void 0),disabled:u},{children:null!=n?n:"更多操作"}),void 0),(0,r.jsx)(t.Popper,v({open:b,anchorEl:y.current,transition:!0,placement:"bottom-end"},{children:function(e){var n=e.TransitionProps;e.placement;return(0,r.jsx)(t.Grow,v({},n,{children:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(t.ClickAwayListener,v({onClickAway:P},{children:k()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var j=h},3007:function(e,n,i){i.r(n),i.d(n,{Confirm:function(){return P},Modal:function(){return T},default:function(){return S}});var r=i(7712),o=i(9297),t=i(1731),a=i(2990),c=i(19),l=i.n(c),s=i(4927),u=i(2268),d=i.n(u),p=i(3285),f=i.n(p),v=i(20),m=i.n(v),b=i(6897),h=i.n(b),j=i(9248),y=i.n(j),x=i(7297),g=function(){return g=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++)for(var o in n=arguments[i])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},g.apply(this,arguments)},O={success:(0,r.jsx)(f(),{},void 0),warn:(0,r.jsx)(y(),{},void 0),warning:(0,r.jsx)(y(),{},void 0),error:(0,r.jsx)(m(),{},void 0),info:(0,r.jsx)(h(),{},void 0)},C=function(e){var n=e.type,i=void 0===n?"warning":n,o=e.open,c=void 0!==o&&o,u=e.title,d=e.content,p=e.icon,f=void 0===p?null:p,v=e.okText,m=e.cancelText,b=e.onOk,h=e.onCancel,j=e.className,y=e.showCancel,x=void 0===y||y,C=e.closable,w=void 0!==C&&C,P=e.disableBackdropClick,k=void 0===P||P,N=e.disableEscapeKeyDown,T=void 0===N||N,S=e.okButtonProps,F=e.cancelButtonProps,E=e.resolveFn,q=e.callback,I=e.destroy,_=function(){null==h||h(),null==E||E(!1),null==I||I()},z=function(){null==b||b(),null==E||E(!0),null==q||q(),null==I||I()};return(0,r.jsx)(t.Modal,g({open:c,onClose:function(e,n){k||_()},closeAfterTransition:!0,BackdropProps:{timeout:500},disableEscapeKeyDown:T,disableAutoFocus:!0,className:(0,s.Z)("paraui-confirm",j)},{children:(0,r.jsx)(t.Fade,g({in:c},{children:(0,r.jsx)("div",g({className:"paraui-confirm-wrapper"},{children:(0,r.jsxs)("div",g({className:"paraui-confirm-content"},{children:[w&&(0,r.jsx)(a.default.IconButton,g({variant:"outlined",size:"small",className:"paraui-confirm-content-close",onClick:_},{children:(0,r.jsx)(l(),{},void 0)}),void 0),(0,r.jsx)("span",g({className:(0,s.Z)("paraui-confirm-content-icon","paraui-confirm-content-icon--".concat(i))},{children:f||O[i]}),void 0),(0,r.jsxs)("div",g({className:"paraui-confirm-content-body"},{children:[u&&(0,r.jsx)("span",g({className:"paraui-confirm-body-title"},{children:u}),void 0),(0,r.jsx)("div",g({className:"paraui-confirm-body-desc"},{children:d}),void 0)]}),void 0),(0,r.jsxs)("div",g({className:"paraui-confirm-content-actions"},{children:[x&&(0,r.jsx)(a.default,g({variant:"outlined",size:"small",onClick:_},F,{children:m||"取消"}),void 0),(0,r.jsx)(a.default,g({variant:"contained",size:"small",onClick:z},S,{children:v||"确定"}),void 0)]}),void 0)]}),void 0)}),void 0)}),void 0)}),void 0)},w=function(e,n,i){var o={type:n};return"string"==typeof e?o.content=e:o=g(g({},e),{type:n}),new Promise((function(e){!function(e,n,i){var o=document.createElement("div");document.body.appendChild(o);var t=function(){d().unmountComponentAtNode(o)&&o.parentNode&&o.parentNode.removeChild(o)};setTimeout((function(){d().render((0,r.jsx)(x.default,{children:(0,r.jsx)(C,g({},e,{open:!0,resolveFn:n,callback:i,destroy:t}),void 0)},void 0),o)}))}(o,e,i)}))},P={info:function(e,n){return w(e,"info",n)},warn:function(e,n){return w(e,"warn",n)},error:function(e,n){return w(e,"error",n)},success:function(e,n){return w(e,"success",n)}},k=function(){return k=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++)for(var o in n=arguments[i])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},k.apply(this,arguments)},N=function(e,n){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(i[r[o]]=e[r[o]])}return i},T=function(e){var n=e.open,i=void 0!==n&&n,c=e.title,u=void 0===c?"":c,d=e.children,p=void 0===d?null:d,f=e.actions,v=void 0===f?null:f,m=e.showActions,b=void 0===m||m,h=e.onOk,j=e.onCancel,y=e.okText,x=e.cancelText,g=e.okButtonProps,O=e.cancelButtonProps,C=e.showCancel,w=void 0===C||C,P=e.className,T=e.size,S=void 0===T?"md":T,F=e.disableBackdropClick,E=void 0===F||F,q=e.disableEscapeKeyDown,I=void 0===q||q,_=e.disableEnforceFocus,z=void 0===_||_,B=e.fullScreen,D=void 0!==B&&B,A=e.customizeSize,L=N(e,["open","title","children","actions","showActions","onOk","onCancel","okText","cancelText","okButtonProps","cancelButtonProps","showCancel","className","size","disableBackdropClick","disableEscapeKeyDown","disableEnforceFocus","fullScreen","customizeSize"]),R=(0,o.useState)(!1),Z=R[0],W=R[1],M=D||"fullScreen"===S,U=function(){W(!1),null==j||j()},K=function(){null==h||h()};(0,o.useEffect)((function(){W(i)}),[i]);return(0,r.jsxs)(t.Dialog,k({className:(0,s.Z)("paraui-modal",P),scroll:"paper",onClose:function(e,n){E||U()},open:Z,maxWidth:!1,disableEscapeKeyDown:I,disableEnforceFocus:z,fullScreen:M},L,{PaperProps:{style:function(){if(A)return A}()},classes:A?{paper:"paraui-modal-paper-customizesize"}:{paper:{sm:"paraui-modal-paper-sm",md:"paraui-modal-paper-md",lg:"paraui-modal-paper-lg",auto:"paraui-modal-paper-auto",fullScreen:"paraui-modal-paper-fullscreen"}[S]}},{children:[(0,r.jsxs)(t.DialogTitle,k({classes:{root:"paraui-modal-title"},disableTypography:!0},{children:[(0,r.jsx)("h3",{children:u},void 0),(0,r.jsx)(a.default.IconButton,k({onClick:U,className:"paraui-modal-title-close",variant:"outlined",size:"small"},{children:(0,r.jsx)(l(),{},void 0)}),void 0)]}),void 0),(0,r.jsx)(t.DialogContent,k({className:"paraui-modal-content"},{children:p}),void 0),b?v?(0,r.jsx)(t.DialogActions,k({className:"paraui-modal-actions"},{children:v}),void 0):(0,r.jsxs)(t.DialogActions,k({className:"paraui-modal-actions"},{children:[w&&(0,r.jsx)(a.default,k({onClick:U,variant:"outlined",size:"small"},O,{children:x||"取消"}),void 0),(0,r.jsx)(a.default,k({variant:"contained",onClick:K},g,{size:"small"},{children:y||"确定"}),void 0)]}),void 0):null]}),void 0)},S=T},7297:function(e,n,i){var r=i(7712),o=i(8604),t=function(){return t=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++)for(var o in n=arguments[i])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};n.default=function(e){var n,i=(0,o.createGenerateClassName)({seed:e.seed||"",productionPrefix:e.productionPrefix||"paraui"});return n=e.theme?(0,o.createMuiTheme)(t({},e.theme)):(0,o.createMuiTheme)({}),(0,r.jsx)(o.StylesProvider,t({generateClassName:i,injectFirst:!0},{children:(0,r.jsx)(o.ThemeProvider,t({theme:n},{children:e.children}),void 0)}),void 0)}},6885:function(e,n,i){var r=i(7712),o=i(1731),t=i(4927),a=function(){return a=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++)for(var o in n=arguments[i])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},a.apply(this,arguments)};n.default=function(e){var n,i=e.placement,c=void 0===i?"bottom":i,l=a(a({},e.classes),{popper:(0,t.Z)("paraui-tooltip",null===(n=e.classes)||void 0===n?void 0:n.popper,{"paraui-tooltip-left-right":(null==c?void 0:c.includes("left"))||(null==c?void 0:c.includes("right")),"paraui-tooltip-top-bottom":(null==c?void 0:c.includes("top"))||(null==c?void 0:c.includes("bottom"))})});return(0,r.jsx)(o.Tooltip,a({},e,{classes:l}),void 0)}},1731:function(n){n.exports=e},8604:function(e){e.exports=n},3285:function(e){e.exports=i},19:function(e){e.exports=r},20:function(e){e.exports=o},6028:function(e){e.exports=t},2749:function(e){e.exports=a},1102:function(e){e.exports=c},6897:function(e){e.exports=l},9248:function(e){e.exports=s},9297:function(e){e.exports=u},2268:function(e){e.exports=d}},v={};function m(e){var n=v[e];if(void 0!==n)return n.exports;var i=v[e]={exports:{}};return f[e](i,i.exports,m),i.exports}m.m=f,p=[],m.O=function(e,n,i,r){if(!n){var o=1/0;for(c=0;c<p.length;c++){n=p[c][0],i=p[c][1],r=p[c][2];for(var t=!0,a=0;a<n.length;a++)(!1&r||o>=r)&&Object.keys(m.O).every((function(e){return m.O[e](n[a])}))?n.splice(a--,1):(t=!1,r<o&&(o=r));t&&(p.splice(c--,1),e=i())}return e}r=r||0;for(var c=p.length;c>0&&p[c-1][2]>r;c--)p[c]=p[c-1];p[c]=[n,i,r]},m.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(n,{a:n}),n},m.d=function(e,n){for(var i in n)m.o(n,i)&&!m.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},m.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={951:0,6615:0,4304:0,2823:0,9296:0};m.O.j=function(n){return 0===e[n]};var n=function(n,i){var r,o,t=i[0],a=i[1],c=i[2],l=0;for(r in a)m.o(a,r)&&(m.m[r]=a[r]);if(c)var s=c(m);for(n&&n(i);l<t.length;l++)o=t[l],m.o(e,o)&&e[o]&&e[o][0](),e[t[l]]=0;return m.O(s)},i=self.webpackChunkParaUI=self.webpackChunkParaUI||[];i.forEach(n.bind(null,0)),i.push=n.bind(null,i.push.bind(i))}();var b=m.O(void 0,[9296],(function(){return m(3007)}));return b=m.O(b)}()}));
|
package/MultiBox/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Delete","@para-ui/icons/LoadingF","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Delete"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["para-lib"],e.react)}(self,(function(e,t,n,o,i,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):"function"==typeof define&&define.amd?define(["@material-ui/core","@para-ui/icons/Delete","@para-ui/icons/LoadingF","@para-ui/icons/Plus","@para-ui/icons/PreviewClose","@para-ui/icons/PreviewOpen","para-lib","react"],t):"object"==typeof exports?exports.ParaUI=t(require("@material-ui/core"),require("@para-ui/icons/Delete"),require("@para-ui/icons/LoadingF"),require("@para-ui/icons/Plus"),require("@para-ui/icons/PreviewClose"),require("@para-ui/icons/PreviewOpen"),require("para-lib"),require("react")):e.ParaUI=t(e["@material-ui/core"],e["@para-ui/icons/Delete"],e["@para-ui/icons/LoadingF"],e["@para-ui/icons/Plus"],e["@para-ui/icons/PreviewClose"],e["@para-ui/icons/PreviewOpen"],e["para-lib"],e.react)}(self,(function(e,t,n,o,r,i,a,l){return function(){"use strict";var u,s={4927:function(e,t,n){function o(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=o(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function r(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=o(e))&&(r&&(r+=" "),r+=t);return r}n.d(t,{Z:function(){return r}})},4126:function(e){
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
5
5
|
@license MIT
|
|
6
6
|
*/
|
|
7
|
-
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function
|
|
7
|
+
var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,l,u=r(e),s=1;s<arguments.length;s++){for(var c in a=Object(arguments[s]))n.call(a,c)&&(u[c]=a[c]);if(t){l=t(a);for(var d=0;d<l.length;d++)o.call(a,l[d])&&(u[l[d]]=a[l[d]])}}return u}},9524:function(e,t,n){
|
|
8
8
|
/** @license React v17.0.2
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
10
10
|
*
|
|
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
n(4126);var o=n(9297),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var r=Symbol.for;i=r("react.element"),t.Fragment=r("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var o,r={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)l.call(t,o)&&!s.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===r[o]&&(r[o]=t[o]);return{$$typeof:i,type:e,key:c,ref:u,props:r,_owner:a.current}}t.jsx=c,t.jsxs=c},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var o=n(7712),i=n(9297),r=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;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,s=e.tips,c=void 0===s?"":s,u=e.className,d=void 0===u?"":u,f=(0,i.useRef)(),v=(0,i.useState)(""),p=v[0],m=v[1];(0,i.useEffect)((function(){m(c)}),[c]);var h;return(0,o.jsx)("div",a({ref:f,className:(h="paraui-auto-tips",d&&(h+=" "+d),h),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?m(p||f.current.innerText):m("")}},{children:(0,o.jsx)(r.default,a({title:p,placement:l},{children:(0,o.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},9011:function(e,t,n){var o=n(7712),i=n(9297),r=n(1102),a=n.n(r),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;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,r=e.opacity,s=void 0===r?.7:r,c=(0,i.useRef)(null);(0,i.useEffect)((function(){c&&c.current&&c.current.parentNode&&((getComputedStyle(c.current.parentNode)||{}).position||(c.current.parentNode.style.position="relative"))}),[]);var u;return(0,o.jsxs)("div",l({className:(u="paraui-loading",t&&(u+=" "+t),u),style:n,ref:c},{children:[(0,o.jsx)("div",l({className:"paraui-loading-box"},{children:(0,o.jsx)(a(),{},void 0)}),void 0),(0,o.jsx)("div",{className:"paraui-loading-mask",style:{opacity:s}},void 0)]}),void 0)}},5268:function(e,t,n){n.r(t),n.d(t,{MultiBox:function(){return f}});var o=n(7712),i=n(9297),r=n(3672),a=n(5191),l=n.n(a),s=n(6243),c=n.n(s),u=function(){return u=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},u.apply(this,arguments)},d=function(e,t,n){if(n||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)!o&&i in t||(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))},f=function(e){var t=e.className,n=e.size,a=void 0===n?"large":n,s=e.placeholderKey,f=void 0===s?"":s,v=e.placeholderValue,p=void 0===v?"":v,m=e.label,h=void 0===m?"":m,x=e.disabled,y=void 0!==x&&x,b=e.required,g=void 0!==b&&b,j=e.error,O=void 0!==j&&j,w=e.helperText,S=void 0===w?"":w,C=e.value,k=e.replaceFields,N=e.onChange,P=e.fetchSuggestionsKey,E=e.fetchSuggestionsValue,q=(0,i.useState)([]),_=q[0],L=q[1],F=(0,i.useState)({key:"label",value:"value"}),I=F[0],D=F[1];(0,i.useEffect)((function(){void 0!==e.defaultValue&&L(d([],e.defaultValue,!0))}),[]),(0,i.useEffect)((function(){void 0!==C&&L(d([],C,!0))}),[C]),(0,i.useEffect)((function(){if(k){var e=u(u({},I),k);D(e)}}),[k]);var T,A=function(t){return function(){y||(_.splice(t,1),void 0===e.value&&L(d([],_,!0)),N&&N(_))}},M=function(t,n){return function(o){_[n][t]=o.target.value,void 0===e.value&&L(d([],_,!0)),N&&N(_)}},U=function(e){return function(t,n){"key"===e?P&&P(t,n):E&&E(t,n)}},B=function(e,t){return function(n){_[t][e]=n.value,L(d([],_,!0)),N&&N(_)}};return(0,o.jsxs)("div",u({className:(T="paraui-multi-box multi-box",t&&(T+=" "+t),a&&(T+=" multi-box-"+a),O&&(T+=" multi-box-error"),y&&(T+=" multi-box-disabled"),T)},{children:[h?(0,o.jsxs)("label",u({className:"multi-box-label"},{children:[h,g&&(0,o.jsx)("span",u({className:"multi-box-label-required"},{children:"*"}),void 0)]}),void 0):null,(0,o.jsx)("div",u({className:"multi-box-content"},{children:_.map((function(e,t){return(0,o.jsxs)("div",u({className:"multi-box-content-item"},{children:[(0,o.jsxs)("div",u({className:"multi-box-content-item-input"},{children:[(0,o.jsx)(r.default,{size:a,disabled:y,placeholder:f,value:e[I.key||""],onChange:M(I.key||"",t),fetchSuggestions:P?U("key"):void 0,onSelect:B(I.key||"",t)},void 0),(0,o.jsx)("span",{children:":"},void 0),(0,o.jsx)(r.default,{size:a,disabled:y,placeholder:p,value:e[I.value||""],onChange:M(I.value||"",t),fetchSuggestions:E?U("value"):void 0,onSelect:B(I.value||"",t)},void 0)]}),void 0),(0,o.jsx)("span",u({className:"single-box-content-item-svg"},{children:(0,o.jsx)(c(),{onClick:A(t)},void 0)}),void 0)]}),t)}))}),void 0),(0,o.jsx)("div",u({className:"multi-box-add",onClick:function(){y||(_.push({}),void 0===e.value&&L(d([],_,!0)),N&&N(_))}},{children:(0,o.jsx)(l(),{},void 0)}),void 0),S&&(0,o.jsx)("p",u({className:"multi-box-error-text"},{children:S}),void 0)]}),void 0)};t.default=f},3672:function(e,t,n){var o=n(7712),i=n(9297),r=n(1731),a=n(3094),l=n(9011),s=n(8528),c=n.n(s),u=n(6570),d=n.n(u),f=n(3475),v=function(){return v=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},v.apply(this,arguments)},p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};t.default=function(e){var t=e.className,n=e.size,s=void 0===n?"large":n,u=e.labelMode,m=void 0===u?"outside":u,h=e.placeholder,x=void 0===h?"":h,y=e.label,b=void 0===y?"":y,g=e.disabled,j=void 0!==g&&g,O=e.multiline,w=void 0!==O&&O,S=e.required,C=void 0!==S&&S,k=e.labelSign,N=e.rows,P=void 0===N?2:N,E=e.error,q=void 0!==E&&E,_=e.helperText,L=void 0===_?"":_,F=e.addonBefore,I=void 0===F?"":F,D=e.addonAfter,T=void 0===D?"":D,A=(e.defaultValue,e.value),M=e.autoFocus,U=void 0!==M&&M,B=e.type,R=void 0===B?"text":B,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,oe=e.onEnter,ie=e.onClickAddonBefore,re=e.onClickAddonAfter,ae=e.onSelect,le=p(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),se=(0,i.useState)("text-field-select-content-"+(0,f.UUID)())[0],ce=(0,i.useState)(!0),ue=ce[0],de=ce[1],fe=(0,i.useState)(""),ve=fe[0],pe=fe[1],me=(0,i.useState)(!1),he=me[0],xe=me[1],ye=(0,i.useState)("text"),be=ye[0],ge=ye[1],je=(0,i.useState)(!1),Oe=je[0],we=je[1],Se=(0,i.useState)(!1),Ce=Se[0],ke=Se[1],Ne=(0,i.useState)([]),Pe=Ne[0],Ee=Ne[1],qe=(0,i.useState)({isCompositions:!0})[0],_e=(0,i.useRef)(null),Le=(0,i.useRef)(null);(0,i.useEffect)((function(){if(void 0!==e.defaultValue){var t=Ie(e.defaultValue);pe(t),De(t)}}),[]),(0,i.useEffect)((function(){R!==be&&ge(R)}),[R]),(0,i.useEffect)((function(){if(void 0!==A){var e=Ie(A);pe(e),De(e)}}),[A]),(0,i.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,i.useEffect)((function(){J&&we(he)}),[he,J]),(0,i.useEffect)((function(){return Oe?window.addEventListener("keydown",Ue):window.removeEventListener("keydown",Ue),function(){window.removeEventListener("keydown",Ue)}}),[Oe]);var Fe,Ie=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},De=function(e){_e&&_e.current&&(_e.current.value=e,_e.current.setAttribute("value",e))},Te=function(){j||(de(!1),(_e&&_e.current).focus())},Ae=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentDom,i="nextSibling",r=".text-field-select-content-item";38===n&&(i="previousSibling",r=".text-field-select-content-item:last-child"),o?(o=o[i])||(o=t.querySelector(r)):o=t.querySelector(".text-field-select-content-item"),o&&(o.classList.add("text-field-select-content-item-keydown"),Me(o,t))},Me=function(e,t){var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;t.scrollTop=o>0?o:0},Ue=function(e){var t=document.querySelector("."+se),n=null,o=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&o){var i=o.dataset.val;Ge(JSON.parse(i))(e),(_e&&_e.current).blur()}o&&(n=o,o.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ae({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Ae({selectDom:t,keyCode:e.keyCode,currentDom:n})},Be=function(e){xe(!1),""===e.target.value&&de(!0),Q&&Q(e)},Re=function(e){ke(!0),J&&J(e,(function(e){Ee(e||[]),ke(!1)}))},Ke=function(e){xe(!0),X&&X(e),Re(e.target.value)},Ve=function(t){var n=Ie(t.target.value);n&&de(!1),n!==ve?(void 0===e.value&&(pe(n),De(n)),ee&&ee(t),Re(t.target.value)):De(n)},ze=function(e){qe.isCompositions&&Ve(e)},We=function(e){qe.isCompositions=!1},He=function(e){qe.isCompositions=!0,Ve(e)},Je=function(e){13===e.keyCode&&oe&&oe(e),te&&te(e)},Ze=function(e){ne&&ne(e)},$e=function(e){"password"===R&&("text"===be&&ge("password"),"password"===be&&ge("text")),K&&K(e)},Ye=function(){we(!1)},Ge=function(e){return function(t){ae&&ae(e)}},Qe=(0,i.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:void 0!==H&&(0,o.jsx)("span",v({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),Xe=(0,i.useMemo)((function(){var e=V||("password"===R?"password"===be?(0,o.jsx)(d(),{},void 0):(0,o.jsx)(c(),{},void 0):null);return(0,o.jsx)(o.Fragment,{children:W&&e&&(0,o.jsx)("span",v({className:"right-icon",onClick:$e},{children:e}),void 0)},void 0)}),[W,V,R,be]),et=(0,i.useMemo)((function(){return(0,o.jsxs)("div",v({className:"text-field-content-within",ref:Le},{children:[(0,o.jsxs)("div",v({className:"text-field-content-within-input"},{children:[w?(0,o.jsx)("textarea",v({ref:_e,rows:P,onCompositionStart:We,onCompositionEnd:He,onBlur:Be,onFocus:Ke,onChange:ze,onKeyDown:Je,onKeyUp:Ze,disabled:j},le),void 0):(0,o.jsx)("input",v({ref:_e,type:be,onCompositionStart:We,onCompositionEnd:He,onBlur:Be,onFocus:Ke,onChange:ze,onKeyDown:Je,onKeyUp:Ze,disabled:j},le),void 0),ue&&!he&&(0,o.jsx)("span",v({className:"text-field-label-placeholder",onClick:Te},{children:"outside"===m?x:(0,o.jsxs)(o.Fragment,{children:[b||x,C&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),k&&(0,o.jsx)("span",{children:k},void 0)]},void 0)}),void 0)]}),void 0),Qe,Xe]}),void 0)}),[ue,he,U,be,ve,Qe,Xe,m,x,b,j,w,P,le,ee,J]),tt=(0,i.useMemo)((function(){var e;return(0,o.jsxs)("div",v({className:(e="text-field-select-content",Ce&&(e+=" text-field-select-content-loading"),se&&(e+=" "+se),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,o.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Ge(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,o.jsx)(a.default,{children:e[G]},void 0)}),t)})),Ce&&(0,o.jsx)(l.default,{},void 0)]}),void 0)}),[Le,Oe,Pe,$,G,ae,Ce,se]),nt=(0,i.useMemo)((function(){return(0,o.jsx)(r.Tooltip,v({open:Oe,title:tt,onClose:Ye,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",s&&(e+=" paraui-text-field-select-"+s),Z&&(e+=" "+Z),e)}},{children:et}),void 0);var e}),[ue,he,U,be,ve,Qe,Xe,m,x,b,j,w,P,le,ee,J,ae,Le,Oe,Z,s]),ot=(0,i.useMemo)((function(){var e=Boolean(C||k||b);return(0,o.jsx)(o.Fragment,{children:"outside"===m&&e&&(0,o.jsxs)("label",v({className:"text-field-label"},{children:[b,C&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),k&&(0,o.jsx)("span",{children:k},void 0)]}),void 0)},void 0)}),[m,b,k,C]);return(0,o.jsxs)("div",v({className:(Fe="paraui-text-field",Fe+=" text-field",s&&!w&&(Fe+=" text-field-"+s),t&&(Fe+=" "+t),q&&(Fe+=" text-field-error"),he&&(Fe+=" text-field-focus"),j&&(Fe+=" text-field-disabled"),w&&(Fe+=" text-field-multiline"),Fe)},{children:[ot,(0,o.jsxs)("div",v({className:"text-field-content"},{children:[I&&(0,o.jsx)("div",v({className:"text-field-content-before",onClick:function(e){ie&&ie(e)}},{children:I}),void 0),J?nt:et,T&&(0,o.jsx)("div",v({className:"text-field-content-after",onClick:function(e){re&&re(e)}},{children:T}),void 0)]}),void 0),L&&(0,o.jsx)("p",v({className:"text-field-error-text"},{children:L}),void 0)]}),void 0)}},6885:function(e,t,n){var o=n(7712),i=n(1731),r=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;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=a(a({},e.classes),{popper:(0,r.Z)("paraui-tooltip",null===(t=e.classes)||void 0===t?void 0:t.popper)});return(0,o.jsx)(i.Tooltip,a({},e,{classes:n},{children:e.children}),void 0)}},1731:function(t){t.exports=e},6243:function(e){e.exports=t},1102:function(e){e.exports=n},5191:function(e){e.exports=o},6570:function(e){e.exports=i},8528:function(e){e.exports=r},3475:function(e){e.exports=a},9297:function(e){e.exports=l}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.m=c,s=[],d.O=function(e,t,n,o){if(!t){var i=1/0;for(l=0;l<s.length;l++){t=s[l][0],n=s[l][1],o=s[l][2];for(var r=!0,a=0;a<t.length;a++)(!1&o||i>=o)&&Object.keys(d.O).every((function(e){return d.O[e](t[a])}))?t.splice(a--,1):(r=!1,o<i&&(i=o));r&&(s.splice(l--,1),e=n())}return e}o=o||0;for(var l=s.length;l>0&&s[l-1][2]>o;l--)s[l]=s[l-1];s[l]=[t,n,o]},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={8766:0,1465:0,5717:0,2996:0,2823:0,9296:0};d.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,r=n[0],a=n[1],l=n[2],s=0;for(o in a)d.o(a,o)&&(d.m[o]=a[o]);if(l)var c=l(d);for(t&&t(n);s<r.length;s++)i=r[s],d.o(e,i)&&e[i]&&e[i][0](),e[r[s]]=0;return d.O(c)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var f=d.O(void 0,[9296],(function(){return d(5268)}));return f=d.O(f)}()}));
|
|
16
|
+
n(4126);var o=n(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;r=i("react.element"),t.Fragment=i("react.fragment")}var a=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var o,i={},s=null,c=null;for(o in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)l.call(t,o)&&!u.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:r,type:e,key:s,ref:c,props:i,_owner:a.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,n){e.exports=n(9524)},3094:function(e,t,n){var o=n(7712),r=n(9297),i=n(6885),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t=e.children,n=e.placement,l=void 0===n?"bottom-start":n,u=e.tips,s=void 0===u?"":u,c=e.className,d=void 0===c?"":c,f=(0,r.useRef)(),v=(0,r.useState)(""),p=v[0],h=v[1];(0,r.useEffect)((function(){h(s)}),[s]);var m;return(0,o.jsx)("div",a({ref:f,className:(m="paraui-auto-tips",d&&(m+=" "+d),m),onMouseOver:function(e){f.current&&f.current.scrollWidth>f.current.offsetWidth?h(s||f.current.innerText):h("")}},{children:(0,o.jsx)(i.default,a({title:p,placement:l},{children:(0,o.jsx)("div",a({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},9011:function(e,t,n){var o=n(7712),r=n(9297),i=n(1102),a=n.n(i),l=function(){return l=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};t.default=function(e){var t=e.className,n=e.style,i=e.opacity,u=void 0===i?.7:i,s=(0,r.useRef)(null);(0,r.useEffect)((function(){s&&s.current&&s.current.parentNode&&((getComputedStyle(s.current.parentNode)||{}).position||(s.current.parentNode.style.position="relative"))}),[]);var c;return(0,o.jsxs)("div",l({className:(c="paraui-loading",t&&(c+=" "+t),c),style:n,ref:s},{children:[(0,o.jsx)("div",l({className:"paraui-loading-box"},{children:(0,o.jsx)(a(),{},void 0)}),void 0),(0,o.jsx)("div",{className:"paraui-loading-mask",style:{opacity:u}},void 0)]}),void 0)}},5268:function(e,t,n){n.r(t),n.d(t,{MultiBox:function(){return f}});var o=n(7712),r=n(9297),i=n(3672),a=n(5191),l=n.n(a),u=n(6243),s=n.n(u),c=function(){return c=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},d=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},f=function(e){var t=e.className,n=e.size,a=void 0===n?"large":n,u=e.placeholderKey,f=void 0===u?"":u,v=e.placeholderValue,p=void 0===v?"":v,h=e.label,m=void 0===h?"":h,x=e.disabled,y=void 0!==x&&x,g=e.required,b=void 0!==g&&g,j=e.error,O=void 0!==j&&j,w=e.helperText,S=void 0===w?"":w,k=e.value,N=e.replaceFields,C=e.onChange,P=e.fetchSuggestionsKey,q=e.fetchSuggestionsValue,E=(0,r.useState)([]),L=E[0],_=E[1],F=(0,r.useState)({key:"label",value:"value"}),I=F[0],D=F[1];(0,r.useEffect)((function(){void 0!==e.defaultValue&&_(d([],e.defaultValue,!0))}),[]),(0,r.useEffect)((function(){void 0!==k&&_(d([],k,!0))}),[k]),(0,r.useEffect)((function(){if(N){var e=c(c({},I),N);D(e)}}),[N]);var T,A=function(t){return function(){y||(L.splice(t,1),void 0===e.value&&_(d([],L,!0)),C&&C(L))}},M=function(t,n){return function(o){L[n][t]=o.target.value,void 0===e.value&&_(d([],L,!0)),C&&C(L)}},U=function(e){return function(t,n){"key"===e?P&&P(t,n):q&&q(t,n)}},B=function(e,t){return function(n){L[t][e]=n.value,_(d([],L,!0)),C&&C(L)}};return(0,o.jsxs)("div",c({className:(T="paraui-multi-box multi-box",t&&(T+=" "+t),a&&(T+=" multi-box-"+a),O&&(T+=" multi-box-error"),y&&(T+=" multi-box-disabled"),T)},{children:[m?(0,o.jsxs)("label",c({className:"multi-box-label"},{children:[m,b&&(0,o.jsx)("span",c({className:"multi-box-label-required"},{children:"*"}),void 0)]}),void 0):null,(0,o.jsx)("div",c({className:"multi-box-content"},{children:L.map((function(e,t){return(0,o.jsxs)("div",c({className:"multi-box-content-item"},{children:[(0,o.jsxs)("div",c({className:"multi-box-content-item-input"},{children:[(0,o.jsx)(i.default,{size:a,disabled:y,placeholder:f,value:e[I.key||""],onChange:M(I.key||"",t),fetchSuggestions:P?U("key"):void 0,onSelect:B(I.key||"",t)},void 0),(0,o.jsx)("span",{children:":"},void 0),(0,o.jsx)(i.default,{size:a,disabled:y,placeholder:p,value:e[I.value||""],onChange:M(I.value||"",t),fetchSuggestions:q?U("value"):void 0,onSelect:B(I.value||"",t)},void 0)]}),void 0),(0,o.jsx)("span",c({className:"single-box-content-item-svg"},{children:(0,o.jsx)(s(),{onClick:A(t)},void 0)}),void 0)]}),t)}))}),void 0),(0,o.jsx)("div",c({className:"multi-box-add",onClick:function(){y||(L.push({}),void 0===e.value&&_(d([],L,!0)),C&&C(L))}},{children:(0,o.jsx)(l(),{},void 0)}),void 0),S&&(0,o.jsx)("p",c({className:"multi-box-error-text"},{children:S}),void 0)]}),void 0)};t.default=f},3672:function(e,t,n){var o=n(7712),r=n(9297),i=n(1731),a=n(3094),l=n(9011),u=n(8528),s=n.n(u),c=n(6570),d=n.n(c),f=n(3475),v=function(){return v=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},p=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};t.default=function(e){var t=e.className,n=e.size,u=void 0===n?"large":n,c=e.labelMode,h=void 0===c?"outside":c,m=e.placeholder,x=void 0===m?"":m,y=e.label,g=void 0===y?"":y,b=e.disabled,j=void 0!==b&&b,O=e.multiline,w=void 0!==O&&O,S=e.required,k=void 0!==S&&S,N=e.labelSign,C=e.rows,P=void 0===C?2:C,q=e.error,E=void 0!==q&&q,L=e.helperText,_=void 0===L?"":L,F=e.addonBefore,I=void 0===F?"":F,D=e.addonAfter,T=void 0===D?"":D,A=(e.defaultValue,e.value),M=e.autoFocus,U=void 0!==M&&M,B=e.type,R=void 0===B?"text":B,K=e.onClickIcon,V=e.rightIcon,z=e.showRightIcon,W=void 0===z||z,H=e.limitLength,J=e.fetchSuggestions,Z=e.selectPopoverClass,$=e.renderSelectItem,Y=e.showSelectName,G=void 0===Y?"value":Y,Q=e.onBlur,X=e.onFocus,ee=e.onChange,te=e.onKeydown,ne=e.onKeyUp,oe=e.onEnter,re=e.onClickAddonBefore,ie=e.onClickAddonAfter,ae=e.onSelect,le=p(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","labelSign","rows","error","helperText","addonBefore","addonAfter","defaultValue","value","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),ue=(0,r.useState)("text-field-select-content-"+(0,f.UUID)())[0],se=(0,r.useState)(!0),ce=se[0],de=se[1],fe=(0,r.useState)(""),ve=fe[0],pe=fe[1],he=(0,r.useState)(!1),me=he[0],xe=he[1],ye=(0,r.useState)("text"),ge=ye[0],be=ye[1],je=(0,r.useState)(!1),Oe=je[0],we=je[1],Se=(0,r.useState)(!1),ke=Se[0],Ne=Se[1],Ce=(0,r.useState)([]),Pe=Ce[0],qe=Ce[1],Ee=((0,r.useState)({isCompositions:!0})[0],(0,r.useRef)(null)),Le=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==e.defaultValue&&(pe(e.defaultValue),Ie(e.defaultValue))}),[]),(0,r.useEffect)((function(){R!==ge&&be(R)}),[R]),(0,r.useEffect)((function(){void 0!==A&&(pe(A),Ie(A))}),[A]),(0,r.useEffect)((function(){de(""===ve||void 0===ve)}),[ve]),(0,r.useEffect)((function(){J&&we(me)}),[me,J]),(0,r.useEffect)((function(){return Oe?window.addEventListener("keydown",Me):window.removeEventListener("keydown",Me),function(){window.removeEventListener("keydown",Me)}}),[Oe]),(0,r.useEffect)((function(){if(!me&&ve){var t=Fe(ve);if(t!==ve){var n={};n.target=Ee.current,n.target.value=t,e.onChange&&e.onChange(n)}}}),[ve,me]);var _e,Fe=function(t){var n=t;return e.limitLength&&t.toString().length>e.limitLength&&(n=n.toString().substr(0,e.limitLength)),n},Ie=function(e){Ee&&Ee.current&&(Ee.current.value=e,Ee.current.setAttribute("value",e))},De=function(){j||(de(!1),(Ee&&Ee.current).focus())},Te=function(e){var t=e.selectDom,n=e.keyCode,o=e.currentDom,r="nextSibling",i=".text-field-select-content-item";38===n&&(r="previousSibling",i=".text-field-select-content-item:last-child"),o?(o=o[r])||(o=t.querySelector(i)):o=t.querySelector(".text-field-select-content-item"),o&&(o.classList.add("text-field-select-content-item-keydown"),Ae(o,t))},Ae=function(e,t){var n=t.clientHeight,o=e.offsetTop+e.clientHeight-n;t.scrollTop=o>0?o:0},Me=function(e){var t=document.querySelector("."+ue),n=null,o=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&o){var r=o.dataset.val;Je(JSON.parse(r))(e),(Ee&&Ee.current).blur()}o&&(n=o,o.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n}),38===e.keyCode&&Te({selectDom:t,keyCode:e.keyCode,currentDom:n})},Ue=function(e){xe(!1),""===e.target.value&&de(!0),Q&&Q(e)},Be=function(e){Ne(!0),J&&J(e,(function(e){qe(e||[]),Ne(!1)}))},Re=function(e){xe(!0),X&&X(e),Be(e.target.value)},Ke=function(t){var n=t.target.value;n&&de(!1),void 0===e.value&&(pe(n),Ie(n)),ee&&ee(t),Be(t.target.value)},Ve=function(e){13===e.keyCode&&oe&&oe(e),te&&te(e)},ze=function(e){ne&&ne(e)},We=function(e){"password"===R&&("text"===ge&&be("password"),"password"===ge&&be("text")),K&&K(e)},He=function(){we(!1)},Je=function(e){return function(t){ae&&ae(e)}},Ze=(0,r.useMemo)((function(){return(0,o.jsx)(o.Fragment,{children:void 0!==H&&(0,o.jsx)("span",v({className:"length-limit"},{children:(ve?ve.toString().length:0)+"/"+H}),void 0)},void 0)}),[H,ve]),$e=(0,r.useMemo)((function(){var e=V||("password"===R?"password"===ge?(0,o.jsx)(d(),{},void 0):(0,o.jsx)(s(),{},void 0):null);return(0,o.jsx)(o.Fragment,{children:W&&e&&(0,o.jsx)("span",v({className:"right-icon",onClick:We},{children:e}),void 0)},void 0)}),[W,V,R,ge]),Ye=(0,r.useMemo)((function(){return(0,o.jsxs)("div",v({className:"text-field-content-within",ref:Le},{children:[(0,o.jsxs)("div",v({className:"text-field-content-within-input"},{children:[w?(0,o.jsx)("textarea",v({ref:Ee,rows:P,onBlur:Ue,onFocus:Re,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0):(0,o.jsx)("input",v({ref:Ee,type:ge,onBlur:Ue,onFocus:Re,onChange:Ke,onKeyDown:Ve,onKeyUp:ze,disabled:j},le),void 0),ce&&!me&&(0,o.jsx)("span",v({className:"text-field-label-placeholder",onClick:De},{children:"outside"===h?x:(0,o.jsxs)(o.Fragment,{children:[g||x,k&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),N&&(0,o.jsx)("span",{children:N},void 0)]},void 0)}),void 0)]}),void 0),Ze,$e]}),void 0)}),[ce,me,U,ge,ve,Ze,$e,h,x,g,j,w,P,le,ee,J]),Ge=(0,r.useMemo)((function(){var e;return(0,o.jsxs)("div",v({className:(e="text-field-select-content",ke&&(e+=" text-field-select-content-loading"),ue&&(e+=" "+ue),e),style:{width:(Le&&Le.current?Le.current.offsetWidth:0)+"px"}},{children:[Pe&&Pe.map((function(e,t){return(0,o.jsx)("div",v({className:"text-field-select-content-item",onMouseDown:Je(e),"data-val":JSON.stringify(e)},{children:$?$(e):(0,o.jsx)(a.default,{children:e[G]},void 0)}),t)})),ke&&(0,o.jsx)(l.default,{},void 0)]}),void 0)}),[Le,Oe,Pe,$,G,ae,ke,ue]),Qe=(0,r.useMemo)((function(){return(0,o.jsx)(i.Tooltip,v({open:Oe,title:Ge,onClose:He,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e="paraui-text-field-select",u&&(e+=" paraui-text-field-select-"+u),Z&&(e+=" "+Z),e)}},{children:Ye}),void 0);var e}),[ce,me,U,ge,ve,Ze,$e,h,x,g,j,w,P,le,ee,J,ae,Le,Oe,Z,u]),Xe=(0,r.useMemo)((function(){var e=Boolean(k||N||g);return(0,o.jsx)(o.Fragment,{children:"outside"===h&&e&&(0,o.jsxs)("label",v({className:"text-field-label"},{children:[g,k&&(0,o.jsx)("span",v({className:"text-field-required"},{children:"*"}),void 0),N&&(0,o.jsx)("span",{children:N},void 0)]}),void 0)},void 0)}),[h,g,N,k]);return(0,o.jsxs)("div",v({className:(_e="paraui-text-field",_e+=" text-field",u&&!w&&(_e+=" text-field-"+u),t&&(_e+=" "+t),E&&(_e+=" text-field-error"),me&&(_e+=" text-field-focus"),j&&(_e+=" text-field-disabled"),w&&(_e+=" text-field-multiline"),e.limitLength&&ve&&ve.toString().length>e.limitLength&&(_e+=" text-field-limit"),_e)},{children:[Xe,(0,o.jsxs)("div",v({className:"text-field-content"},{children:[I&&(0,o.jsx)("div",v({className:"text-field-content-before",onClick:function(e){re&&re(e)}},{children:I}),void 0),J?Qe:Ye,T&&(0,o.jsx)("div",v({className:"text-field-content-after",onClick:function(e){ie&&ie(e)}},{children:T}),void 0)]}),void 0),_&&(0,o.jsx)("p",v({className:"text-field-error-text"},{children:_}),void 0)]}),void 0)}},6885:function(e,t,n){var o=n(7712),r=n(1731),i=n(4927),a=function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};t.default=function(e){var t,n=e.placement,l=void 0===n?"bottom":n,u=a(a({},e.classes),{popper:(0,i.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,o.jsx)(r.Tooltip,a({},e,{classes:u}),void 0)}},1731:function(t){t.exports=e},6243:function(e){e.exports=t},1102:function(e){e.exports=n},5191:function(e){e.exports=o},6570:function(e){e.exports=r},8528:function(e){e.exports=i},3475:function(e){e.exports=a},9297:function(e){e.exports=l}},c={};function d(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return s[e](n,n.exports,d),n.exports}d.m=s,u=[],d.O=function(e,t,n,o){if(!t){var r=1/0;for(l=0;l<u.length;l++){t=u[l][0],n=u[l][1],o=u[l][2];for(var i=!0,a=0;a<t.length;a++)(!1&o||r>=o)&&Object.keys(d.O).every((function(e){return d.O[e](t[a])}))?t.splice(a--,1):(i=!1,o<r&&(r=o));i&&(u.splice(l--,1),e=n())}return e}o=o||0;for(var l=u.length;l>0&&u[l-1][2]>o;l--)u[l]=u[l-1];u[l]=[t,n,o]},d.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(t,{a:t}),t},d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={8766:0,1465:0,5717:0,2996:0,2823:0,9296:0};d.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,r,i=n[0],a=n[1],l=n[2],u=0;for(o in a)d.o(a,o)&&(d.m[o]=a[o]);if(l)var s=l(d);for(t&&t(n);u<i.length;u++)r=i[u],d.o(e,r)&&e[r]&&e[r][0](),e[i[u]]=0;return d.O(s)},n=self.webpackChunkParaUI=self.webpackChunkParaUI||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var f=d.O(void 0,[9296],(function(){return d(5268)}));return f=d.O(f)}()}));
|
package/PageHeader/index.js
CHANGED
|
@@ -13,4 +13,4 @@ var n=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.pr
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
t(4126);var r=t(9297),i=60103;if(n.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),n.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,t){var r,o={},s=null,c=null;for(r in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(c=n.ref),n)l.call(n,r)&&!u.hasOwnProperty(r)&&(o[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===o[r]&&(o[r]=n[r]);return{$$typeof:i,type:e,key:s,ref:c,props:o,_owner:a.current}}n.jsx=s,n.jsxs=s},7712:function(e,n,t){e.exports=t(9524)},2990:function(e,n,t){t.d(n,{default:function(){return g}});var r=t(7712),i=t(9297),o=t(1731),a=t(4927),l=t(1102),u=t.n(l),s=t(2749),c=t.n(s),d=t(6885),v=t(6028),p=t.n(v),f=function(){return f=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},f.apply(this,arguments)};var m=function(){return m=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},m.apply(this,arguments)},h=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t},b=function(e){var n=e.variant,t=void 0===n?"contained":n,l=e.size,s=void 0===l?"large":l,v=e.className,p=e.disabled,f=void 0!==p&&p,b=e.children,g=e.startIcon,j=e.endIcon,x=e.loading,y=void 0!==x&&x,N=e.toolTipTitle,O=void 0===N?"":N,M=e.danger,T=void 0!==M&&M,P=h(e,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),S=(0,i.useState)(!1),E=S[0],w=S[1],k=function(e){if(!E)return"start"===e&&g?(0,r.jsx)("span",m({className:(0,a.Z)("btn-icon","start-icon")},{children:g}),void 0):"end"===e&&j?(0,r.jsx)("span",m({className:(0,a.Z)("btn-icon","end-icon")},{children:j}),void 0):null;if("object"==typeof y){var n=y.delay||0;setTimeout((function(){return w(!1)}),n)}return"start"===e?(0,r.jsx)("span",m({className:"btn-icon loading-icon"},{children:(0,r.jsx)(u(),{},void 0)}),void 0):null},C=(0,r.jsx)(o.Button,m({},P,{color:"default",variant:"contained",disabled:f,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",v,"paraui-button-".concat(t),"paraui-button-".concat(s),E&&"paraui-button-loading",T&&!f&&"paraui-button-dangerous"),startIcon:k("start"),endIcon:k("end")},{children:b}),void 0);return(0,i.useEffect)((function(){w(!!y)}),[y]),f&&O?(0,r.jsx)(d.default,m({title:function(){if(f&&O){return(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),O]},void 0)}return O}()},{children:(0,r.jsx)("span",m({className:"paraui-button--disabled"},{children:C}),void 0)}),void 0):C};b.IconButton=function(e){var n=e.variant,t=void 0===n?"contained":n,l=e.size,s=void 0===l?"large":l,v=e.toolTipTitle,p=void 0===v?"":v,f=e.children,b=e.className,g=e.disabled,j=void 0!==g&&g,x=e.loading,y=void 0!==x&&x,N=e.TooltipProps,O=e.danger,M=void 0!==O&&O,T=h(e,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),P=(0,i.useState)(!1),S=P[0],E=P[1],w=(0,r.jsx)(o.IconButton,m({},T,{disabled:j,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",b,"paraui-icon-button-".concat(t),"paraui-icon-button-".concat(s),S&&"paraui-icon-button-loading",M&&!j&&"paraui-icon-button-dangerous")},{children:function(){if(!S)return f;if("object"==typeof y){var e=y.delay||0;setTimeout((function(){return E(!1)}),e)}return(0,r.jsx)("span",m({className:"loading-icon"},{children:(0,r.jsx)(u(),{},void 0)}),void 0)}()}),void 0);return(0,i.useEffect)((function(){E(!!y)}),[y]),p?(0,r.jsx)(d.default,m({},N,{title:function(){if(j&&p){return(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),p]},void 0)}return p}()},{children:j?(0,r.jsx)("span",m({className:"paraui-button--disabled"},{children:w}),void 0):w}),void 0):w},b.SplitButton=function(e){var n=e.buttonText,t=e.options,l=void 0===t?[]:t,u=e.className,s=e.disabled,c=void 0!==s&&s,d=e.onClick,v=e.optionRender,m=(0,i.useState)(!1),h=m[0],b=m[1],j=(0,i.useRef)(null),x=(0,i.useRef)(),y=(0,i.useState)(0),N=y[0],O=y[1],M=function(e,n,t){var r;O(n),b(!1),null===(r=x.current)||void 0===r||r.classList.remove("paraui-button-split--active"),null==d||d(e,t)},T=function(e){var n,t;(null===(n=j.current)||void 0===n?void 0:n.contains(e.target))||(b(!1),null===(t=x.current)||void 0===t||t.classList.remove("paraui-button-split--active"))},P=function(){return(0,r.jsx)("div",f({className:"paraui-button-split-list"},{children:(0,r.jsx)("ul",{children:l.map((function(e,n){return Array.isArray(e)?function(e,n){return(0,r.jsx)("li",f({className:"split-li-group"},{children:e.map((function(e,t){var i="".concat(n,"-").concat(t);return(0,r.jsx)("div",f({className:(0,a.Z)("split-li",i===N&&"split-li--active"),onClick:function(n){return M(e,i,n)}},{children:(null==v?void 0:v(e))||e.label}),i)}))}),n)}(e,n):(0,r.jsx)("li",f({className:(0,a.Z)("split-li",n===N&&"split-li--active"),onClick:function(t){return M(e,n,t)}},{children:(null==v?void 0:v(e))||e.label}),n)}))},void 0)}),void 0)};return(0,r.jsxs)("div",f({className:(0,a.Z)("paraui-button-split",u),ref:j,onMouseLeave:function(e){var n;e.stopPropagation(),null===(n=e.currentTarget.firstElementChild)||void 0===n||n.classList.remove("paraui-button-split--active"),b(!1)}},{children:[(0,r.jsx)(g,f({variant:"outlined",onMouseEnter:function(e){e.stopPropagation();var n=e.currentTarget;x.current=n,n.classList.add("paraui-button-split--active"),b(!0)},startIcon:(0,r.jsx)(p(),{},void 0),disabled:c},{children:null!=n?n:"更多操作"}),void 0),(0,r.jsx)(o.Popper,f({open:h,anchorEl:j.current,transition:!0,placement:"bottom-end"},{children:function(e){var n=e.TransitionProps;e.placement;return(0,r.jsx)(o.Grow,f({},n,{children:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.ClickAwayListener,f({onClickAway:T},{children:P()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var g=b},7456:function(e,n,t){t.r(n),t.d(n,{PageHeader:function(){return T},default:function(){return P}});var r=t(7712),i=t(9297),o=t(2268),a=t(1731),l=t(6028),u=t.n(l),s=t(1609),c=t(6090),d=t.n(c),v=t(3475),p=function(){return p=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},p.apply(this,arguments)},f=function(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))},m=function(e){var n=e.open,t=void 0!==n&&n,l=e.anchorEl,c=e.idMenuLast,d=e.selectMenu,v=void 0===d?"":d,f=e.onClickMenu,h=e.list,b=void 0===h?[]:h,g=e.onMouseEnter,j=e.onMouseLeave,x=e.level,y=void 0===x?1:x,N=e.className,O=(0,i.useState)(null),M=O[0],T=O[1],P=(0,i.useState)(null),S=P[0],E=P[1],w=(0,i.useState)([]),k=w[0],C=w[1],L=(0,i.useState)({})[0],z=function(e,n){return function(t){var r;r=t,clearTimeout(L.leaveTimer),L.leaveTimer=setTimeout((function(){1===y&&g&&g();var t=[e];e.children&&e.children.length>0&&(t=e.children);var i=r.target;E(i),C(t),T(n)}),50)}},F=function(e){return function(n){e.children&&e.children.length>0||(f&&f(e),j&&j())}},q=function(e){var n="menu-item-popper-content-item",t=c&&c[v];return t&&-1!==t.indexOf(e.path)&&(n+=" menu-item-popper-content-item-select"),n},_=function(){var e="menu-item-popper";return N&&(e+=" "+N),e},I=(0,i.useCallback)((function(e,n){return(0,r.jsx)(r.Fragment,{children:e.children&&e.children.length>0&&M===n&&(0,r.jsx)(m,{open:M===n,anchorEl:S,list:k,idMenuLast:c,selectMenu:v,onClickMenu:f,onMouseEnter:g,onMouseLeave:j,level:y+1},void 0)},void 0)}),[M,S,k,c,v,f,g,j,y]),R=(0,i.useMemo)((function(){return(0,r.jsx)("div",p({className:"menu-item-popper-content"},{children:b.map((function(e,n){var t=function(e){var n=e.icon;if(n){var t=s[n];return t?t():n}}(e),i=function(e){var n=e.children;if(n&&n.length>0)return(0,r.jsx)(u(),{},void 0)}(e);return(0,r.jsx)("div",p({className:q(e),onMouseLeave:function(e){clearTimeout(L.leaveTimer),L.leaveTimer=setTimeout((function(){1===y&&j&&j(),T(null),E(null),C([])}))},onMouseEnter:z(e,n)},{children:(0,r.jsxs)("div",p({className:"menu-item-popper-content-item-content",onClick:F(e)},{children:[t&&(0,r.jsx)("span",p({className:"menu-item-icon"},{children:t}),void 0),(0,r.jsx)("span",p({className:"menu-item-label"},{children:e.label}),void 0),i&&(0,r.jsx)("span",p({className:"menu-item-arrow"},{children:i}),void 0),I(e,n)]}),void 0)}),n)}))}),void 0)}),[b,f,M,S,k,c,v,f,g,j,y]),A=function(){return 1!==y?(0,r.jsx)("div",p({className:_()},{children:R}),void 0):(0,r.jsx)(a.Popper,p({open:t,anchorEl:l,disablePortal:!0,placement:"bottom-start",className:_()},{children:R}),void 0)};return(0,r.jsx)(r.Fragment,{children:1===y?(0,o.createPortal)((0,r.jsx)(A,{},void 0),document.getElementsByTagName("body")[0]):(0,r.jsx)(A,{},void 0)},void 0)},h=function(e){var n=e.list,t=void 0===n?[]:n,o=e.selectMenu,a=void 0===o?"":o,l=e.onClickMenu,c=e.className,h=e.moreCustomize,b=(0,i.useState)(!1),g=b[0],j=b[1],x=(0,i.useState)(null),y=x[0],N=x[1],O=(0,i.useState)(null),M=O[0],T=O[1],P=(0,i.useState)([]),S=P[0],E=P[1],w=(0,i.useState)(""),k=w[0],C=w[1],L=(0,i.useState)({}),z=L[0],F=L[1],q=(0,i.useState)({}),_=q[0],I=q[1],R=(0,i.useState)("horizontal-menu-list-"+(0,v.UUID)())[0],A=(0,i.useState)(null),B=A[0],Z=A[1],D=(0,i.useState)({})[0];(0,i.useEffect)((function(){a!==k&&C(a)}),[a]),(0,i.useEffect)((function(){return V(t),H(),window.addEventListener("resize",H),function(){window.removeEventListener("resize",H)}}),[t]);var U,H=function(){clearTimeout(D.timerResize),G(),D.timerResize=setTimeout((function(){Z(t.length),$()}),100)},$=function(e){if(null!==e&&0!==e){void 0===e&&(e=t.length);var n=document.querySelector("."+R);if(n)if(n.scrollHeight>n.clientHeight){var r=Number(e)-1;Z(r),$(r)}else t.length<=e&&G()}},G=function(){},V=function(e){var n={},t={},r={},i={},o=function(e,a,l){for(var u=0,s=e.length;u<s;u++){var c=e[u],d=c.path;n[d]=c;var p=void 0===l?u:l;if(a){var m=(0,v.DeepClone)(t[a.path]||[]);m.push(d),t[d]=f([],m,!0)}else t[d]=[d];c.children&&c.children.length>0?o(c.children,c,p):(r[d]=t[d],i[d]=p)}};o(e),I(i),F(r)},W=function(e,n){return function(t){clearTimeout(D.leaveTimer);var r=[];e.children&&e.children.length>0&&(r=e.children),N(n),T(t.target),E(r),j(!0)}},Y=function(){j(!1),T(null),E([]),N(null)},J=function(){clearTimeout(D.leaveTimer)},K=function(){Y()},Q=function(e){l&&l(e)},X=function(e,n){var t=" horizontal-menu-list-item",r=z[k];return r&&-1!==r.indexOf(e.path)&&(t+=" horizontal-menu-list-item-select"),y===n&&(t+=" horizontal-menu-list-item-hover"),t},ee=(0,i.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:g&&(0,r.jsx)(m,{open:g,anchorEl:M,list:S,idMenuLast:z,selectMenu:k,onClickMenu:Q,onMouseEnter:J,onMouseLeave:K,className:"paraui-horizontal-menu-popper",level:1},void 0)},void 0)}),[g,M,S,z,k,l,D]),ne=function(e){clearTimeout(D.leaveTimer);for(var n=[],r=Number(B),i=t.length;r<i;r++)n.push(t[r]);N(B),T(e.target),E(n),j(!0)},te=function(){clearTimeout(D.leaveTimer),D.leaveTimer=setTimeout((function(){Y()}),100)},re=function(){var e=" horizontal-menu-list-item",n=_[k];return null!==B&&B<=n&&(e+=" horizontal-menu-list-item-select"),y===B&&(e+=" horizontal-menu-list-item-hover"),e};return(0,r.jsxs)("div",p({className:(U="horizontal-menu-list",c&&(U+=" "+c),R&&(U+=" "+R),U)},{children:[t.map((function(e,n){if(null!==B&&B<=n)return null;var t=function(e){var n=e.icon;if(n){var t=s[n];return t?t():n}}(e),i=function(e){var n=e.children;if(n&&n.length>0)return(0,r.jsx)(u(),{},void 0)}(e);return(0,r.jsxs)("div",p({onClick:function(){Q(e)},onMouseEnter:W(e,n),onMouseLeave:function(e){clearTimeout(D.leaveTimer),D.leaveTimer=setTimeout((function(){Y()}),100)},className:X(e,n)},{children:[t&&(0,r.jsx)("span",p({className:"menu-item-icon"},{children:t}),void 0),(0,r.jsx)("span",p({className:"menu-item-label"},{children:e.label}),void 0),i&&(0,r.jsx)("span",p({className:"menu-item-arrow"},{children:i}),void 0)]}),n)})),function(){if(null!==B&&t.length>B)return(0,r.jsx)("div",p({onMouseEnter:ne,onMouseLeave:te,className:re()},{children:h||(0,r.jsx)("span",p({className:"menu-item-icon"},{children:(0,r.jsx)(d(),{},void 0)}),void 0)}),void 0)}(),ee]}),void 0)},b=t(2990),g=function(){return g=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},g.apply(this,arguments)},j=function(e){var n,t=e.icon,i=e.label,o=e.render,a=e.onClick,l=e.className,u=function(e){a&&a(e)};return(0,r.jsx)(r.Fragment,{children:o||(0,r.jsx)("div",g({className:(n="back-btn",l&&(n+=" "+l),n)},{children:(0,r.jsx)(b.default,g({startIcon:t,variant:"contained",onClick:u},{children:i}),void 0)}),void 0)},void 0)},x=function(e){var n=e.language,t=void 0===n?[]:n,l=e.selectLang,u=void 0===l?"":l,s=e.onClick,c=e.className,d=e.render,v=(0,i.useState)({}),p=v[0],f=v[1],m=(0,i.useState)({}),h=m[0],b=m[1],j=(0,i.useState)(!1),x=j[0],y=j[1],N=(0,i.useState)(null),O=N[0],M=N[1],T=(0,i.useState)({})[0];(0,i.useEffect)((function(){var e=p[u]||{};b(e)}),[u,p]),(0,i.useEffect)((function(){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];i.value&&(e[i.value]=i)}f(e)}),[t]);var P,S=function(e){return function(){s&&s(e.value,e),y(!1)}},E=function(e){T.timer=setTimeout((function(){y(!1),M(null)}),100)},w=function(e){return function(n){clearTimeout(T.timer),y(!0),e&&M(n.target)}},k=(0,i.useMemo)((function(){return(0,r.jsx)("div",g({className:"language-item",onMouseLeave:E,onMouseEnter:w(!0)},{children:(0,r.jsxs)(r.Fragment,{children:[h.icon&&(0,r.jsx)("span",g({className:"language-item-icon"},{children:h.icon}),void 0),h.label&&(0,r.jsx)("span",g({className:"language-item-label"},{children:h.label}),void 0)]},void 0)}),void 0)}),[h,t,T]),C=(0,i.useMemo)((function(){var e=function(e){var n="menu-popover-item";return e.value===h.value&&(n+=" menu-popover-item-select"),n};return(0,o.createPortal)((0,r.jsx)((function(){return(0,r.jsx)(a.Popper,g({open:x,anchorEl:O,disablePortal:!0,placement:"bottom-end",onMouseLeave:E,onMouseEnter:w(!1),className:"paraui-horizontal-meun-right-popover menu-popover"},{children:(0,r.jsx)("div",g({className:"menu-popover-box"},{children:t.map((function(n,t){return(0,r.jsxs)("div",g({className:e(n),onClick:S(n)},{children:[n.icon&&(0,r.jsx)("span",g({className:"icon"},{children:n.icon}),void 0),n.label&&(0,r.jsx)("span",g({className:"label",style:{marginLeft:"5px"}},{children:n.label}),void 0)]}),t)}))}),void 0)}),void 0)}),{},void 0),document.getElementsByTagName("body")[0])}),[t,h,x,O,T,s]);return(0,r.jsx)(r.Fragment,{children:d||(0,r.jsxs)("div",g({className:(P="language",c&&(P+=" "+c),x&&(P+=" language-select"),P)},{children:[k,x&&C]}),void 0)},void 0)},y=function(e){var n,t=e.list,o=void 0===t?[]:t,a=e.render,l=e.className,u=e.onClick,s=function(e){return function(n){u&&u(e,n)}},c=(0,i.useMemo)((function(){var e=function(e){return(0,r.jsxs)(r.Fragment,{children:[e.icon&&(0,r.jsx)("span",g({className:"btn-list-item-icon"},{children:e.icon}),void 0),e.label&&(0,r.jsx)("span",g({className:"btn-list-item-label"},{children:e.label}),void 0)]},void 0)};return(0,r.jsx)(r.Fragment,{children:o.map((function(n,t){var i="btn-list-item";return n.sign&&(i+=" btn-list-item-sign"),(0,r.jsx)("div",g({className:i,onClick:s(n)},{children:e(n)}),t)}))},void 0)}),[o]);return(0,r.jsx)(r.Fragment,{children:a||(0,r.jsx)("div",g({className:(n="btn-list",l&&(n+=" "+l),n)},{children:c}),void 0)},void 0)},N=function(e){var n,t=e.img,l=e.imgRender,s=e.label,c=e.render,d=e.className,v=e.list,p=e.onClick,f=e.onClickMenu,m=e.selectValue,h=(0,i.useState)(!1),b=h[0],j=h[1],x=(0,i.useState)(null),y=x[0],N=x[1],O=(0,i.useState)({})[0],M=(0,i.useRef)(),T=function(e){return function(){f&&f(e.value,e),j(!1)}},P=function(e){O.timer=setTimeout((function(){j(!1),N(null)}),100)},S=function(e){return function(n){clearTimeout(O.timer),j(!0),e&&N(M.current)}},E=(0,i.useMemo)((function(){var e=function(e){var n="menu-popover-item";return e.value===m&&(n+=" menu-popover-item-select"),n};return(0,o.createPortal)((0,r.jsx)((function(){var n;return(0,r.jsx)(a.Popper,g({open:b,anchorEl:y,disablePortal:!0,placement:"bottom-end",onMouseLeave:P,onMouseEnter:S(!1),className:"paraui-horizontal-meun-right-popover menu-popover"},{children:(0,r.jsx)("div",g({className:"menu-popover-box",style:(n={},y&&(n.width=y.getBoundingClientRect().width+"px"),n)},{children:v&&v.map((function(n,t){return(0,r.jsxs)("div",g({className:e(n),onClick:T(n)},{children:[n.icon&&(0,r.jsx)("span",g({className:"icon",style:{marginRight:"5px"}},{children:n.icon}),void 0),n.label&&(0,r.jsx)("span",g({className:"label"},{children:n.label}),void 0)]}),t)}))}),void 0)}),void 0)}),{},void 0),document.getElementsByTagName("body")[0])}),[v,m,b,y,O]);return(0,r.jsxs)("div",g({className:(n="logo",d&&(n+=" "+d),b&&(n+=" logo-show-dialog"),n),onClick:function(e){p&&p(e)},onMouseLeave:P,onMouseEnter:S(!0),ref:M},{children:[c||(0,r.jsxs)(r.Fragment,{children:[l||t&&(0,r.jsx)("img",{src:t,alt:""},void 0),s&&(0,r.jsx)("span",g({className:"label"},{children:s}),void 0),v&&v.length>0&&(0,r.jsx)("span",g({className:"arrow"},{children:(0,r.jsx)(u(),{},void 0)}),void 0)]},void 0),b&&E]}),void 0)},O=function(e){var n,t=e.className,o=void 0===t?"":t,a=e.backSelfcareProps,l=e.languageProps,u=e.btnListProps,s=e.userProps,c=e.render,d=(0,i.useMemo)((function(){return a&&(0,r.jsx)(j,g({},a),void 0)}),[a]),v=(0,i.useMemo)((function(){return l&&(0,r.jsx)(x,g({},l),void 0)}),[l]),p=(0,i.useMemo)((function(){return u&&(0,r.jsx)(y,g({},u),void 0)}),[u]),f=(0,i.useMemo)((function(){return s&&(0,r.jsx)(N,g({},s),void 0)}),[s]);return(0,r.jsx)(r.Fragment,{children:c||(0,r.jsxs)("div",g({className:(n="paraui-horizontal-meun-right",o&&(n+=" "+o),n)},{children:[d,v,p,f]}),void 0)},void 0)},M=function(){return M=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},M.apply(this,arguments)},T=function(e){var n,t=e.leftRender,o=e.menuListProps,a=e.footerProps,l=e.selectMenu,u=e.onClickMenu,s=e.className,c=(0,i.useMemo)((function(){return t&&(0,r.jsx)("div",M({className:"paraui-page-header-left"},{children:t}),void 0)}),[t]),d=(0,i.useMemo)((function(){return e.menuListProps&&(0,r.jsx)("div",M({className:"menu-box"},{children:(0,r.jsx)(h,M({},o,{selectMenu:l,onClickMenu:u}),void 0)}),void 0)}),[o,l,u]),v=(0,i.useMemo)((function(){return e.footerProps&&(0,r.jsx)(O,M({},a),void 0)}),[a]);return(0,r.jsxs)("div",M({className:(n="paraui-page-header",s&&(n+=" "+s),n)},{children:[c,d,v]}),void 0)},P=T},6885:function(e,n,t){var r=t(7712),i=t(1731),o=t(4927),a=function(){return a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},a.apply(this,arguments)};n.default=function(e){var n,t=a(a({},e.classes),{popper:(0,o.Z)("paraui-tooltip",null===(n=e.classes)||void 0===n?void 0:n.popper)});return(0,r.jsx)(i.Tooltip,a({},e,{classes:t},{children:e.children}),void 0)}},1731:function(n){n.exports=e},1609:function(e){e.exports=n},6028:function(e){e.exports=t},2749:function(e){e.exports=r},1102:function(e){e.exports=i},6090:function(e){e.exports=o},3475:function(e){e.exports=a},9297:function(e){e.exports=l},2268:function(e){e.exports=u}},d={};function v(e){var n=d[e];if(void 0!==n)return n.exports;var t=d[e]={exports:{}};return c[e](t,t.exports,v),t.exports}v.m=c,s=[],v.O=function(e,n,t,r){if(!n){var i=1/0;for(l=0;l<s.length;l++){n=s[l][0],t=s[l][1],r=s[l][2];for(var o=!0,a=0;a<n.length;a++)(!1&r||i>=r)&&Object.keys(v.O).every((function(e){return v.O[e](n[a])}))?n.splice(a--,1):(o=!1,r<i&&(i=r));o&&(s.splice(l--,1),e=t())}return e}r=r||0;for(var l=s.length;l>0&&s[l-1][2]>r;l--)s[l]=s[l-1];s[l]=[n,t,r]},v.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(n,{a:n}),n},v.d=function(e,n){for(var t in n)v.o(n,t)&&!v.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},v.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},v.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={3462:0,6615:0,2823:0,9296:0};v.O.j=function(n){return 0===e[n]};var n=function(n,t){var r,i,o=t[0],a=t[1],l=t[2],u=0;for(r in a)v.o(a,r)&&(v.m[r]=a[r]);if(l)var s=l(v);for(n&&n(t);u<o.length;u++)i=o[u],v.o(e,i)&&e[i]&&e[i][0](),e[o[u]]=0;return v.O(s)},t=self.webpackChunkParaUI=self.webpackChunkParaUI||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var p=v.O(void 0,[9296],(function(){return v(7456)}));return p=v.O(p)}()}));
|
|
16
|
+
t(4126);var r=t(9297),i=60103;if(n.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),n.Fragment=o("react.fragment")}var a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,t){var r,o={},s=null,c=null;for(r in void 0!==t&&(s=""+t),void 0!==n.key&&(s=""+n.key),void 0!==n.ref&&(c=n.ref),n)l.call(n,r)&&!u.hasOwnProperty(r)&&(o[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps)void 0===o[r]&&(o[r]=n[r]);return{$$typeof:i,type:e,key:s,ref:c,props:o,_owner:a.current}}n.jsx=s,n.jsxs=s},7712:function(e,n,t){e.exports=t(9524)},2990:function(e,n,t){t.d(n,{default:function(){return g}});var r=t(7712),i=t(9297),o=t(1731),a=t(4927),l=t(1102),u=t.n(l),s=t(2749),c=t.n(s),d=t(6885),v=t(6028),p=t.n(v),f=function(){return f=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},f.apply(this,arguments)};var m=function(){return m=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},m.apply(this,arguments)},h=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)n.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]])}return t},b=function(e){var n=e.variant,t=void 0===n?"contained":n,l=e.size,s=void 0===l?"large":l,v=e.className,p=e.disabled,f=void 0!==p&&p,b=e.children,g=e.startIcon,j=e.endIcon,x=e.loading,y=void 0!==x&&x,N=e.toolTipTitle,O=void 0===N?"":N,M=e.danger,T=void 0!==M&&M,P=h(e,["variant","size","className","disabled","children","startIcon","endIcon","loading","toolTipTitle","danger"]),S=(0,i.useState)(!1),E=S[0],w=S[1],k=function(e){if(!E)return"start"===e&&g?(0,r.jsx)("span",m({className:(0,a.Z)("btn-icon","start-icon")},{children:g}),void 0):"end"===e&&j?(0,r.jsx)("span",m({className:(0,a.Z)("btn-icon","end-icon")},{children:j}),void 0):null;if("object"==typeof y){var n=y.delay||0;setTimeout((function(){return w(!1)}),n)}return"start"===e?(0,r.jsx)("span",m({className:"btn-icon loading-icon"},{children:(0,r.jsx)(u(),{},void 0)}),void 0):null},C=(0,r.jsx)(o.Button,m({},P,{color:"default",variant:"contained",disabled:f,disableRipple:!0,disableElevation:!0,className:(0,a.Z)("paraui-button",v,"paraui-button-".concat(t),"paraui-button-".concat(s),E&&"paraui-button-loading",T&&!f&&"paraui-button-dangerous"),startIcon:k("start"),endIcon:k("end")},{children:b}),void 0);return(0,i.useEffect)((function(){w(!!y)}),[y]),f&&O?(0,r.jsx)(d.default,m({title:function(){if(f&&O){return(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),O]},void 0)}return O}()},{children:(0,r.jsx)("span",m({className:"paraui-button--disabled"},{children:C}),void 0)}),void 0):C};b.IconButton=function(e){var n=e.variant,t=void 0===n?"contained":n,l=e.size,s=void 0===l?"large":l,v=e.toolTipTitle,p=void 0===v?"":v,f=e.children,b=e.className,g=e.disabled,j=void 0!==g&&g,x=e.loading,y=void 0!==x&&x,N=e.TooltipProps,O=e.danger,M=void 0!==O&&O,T=h(e,["variant","size","toolTipTitle","children","className","disabled","loading","TooltipProps","danger"]),P=(0,i.useState)(!1),S=P[0],E=P[1],w=(0,r.jsx)(o.IconButton,m({},T,{disabled:j,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",b,"paraui-icon-button-".concat(t),"paraui-icon-button-".concat(s),S&&"paraui-icon-button-loading",M&&!j&&"paraui-icon-button-dangerous")},{children:function(){if(!S)return f;if("object"==typeof y){var e=y.delay||0;setTimeout((function(){return E(!1)}),e)}return(0,r.jsx)("span",m({className:"loading-icon"},{children:(0,r.jsx)(u(),{},void 0)}),void 0)}()}),void 0);return(0,i.useEffect)((function(){E(!!y)}),[y]),p?(0,r.jsx)(d.default,m({},N,{title:function(){if(j&&p){return(0,r.jsxs)("span",{children:[(0,r.jsx)(c(),{style:{marginRight:"4px",fontSize:"11px",color:"inherit"}},void 0),p]},void 0)}return p}()},{children:j?(0,r.jsx)("span",m({className:"paraui-button--disabled"},{children:w}),void 0):w}),void 0):w},b.SplitButton=function(e){var n=e.buttonText,t=e.options,l=void 0===t?[]:t,u=e.className,s=e.disabled,c=void 0!==s&&s,d=e.onClick,v=e.optionRender,m=(0,i.useState)(!1),h=m[0],b=m[1],j=(0,i.useRef)(null),x=(0,i.useRef)(),y=(0,i.useState)(0),N=y[0],O=y[1],M=function(e,n,t){var r;O(n),b(!1),null===(r=x.current)||void 0===r||r.classList.remove("paraui-button-split--active"),null==d||d(e,t)},T=function(e){var n,t;(null===(n=j.current)||void 0===n?void 0:n.contains(e.target))||(b(!1),null===(t=x.current)||void 0===t||t.classList.remove("paraui-button-split--active"))},P=function(){return(0,r.jsx)("div",f({className:"paraui-button-split-list"},{children:(0,r.jsx)("ul",{children:l.map((function(e,n){return Array.isArray(e)?function(e,n){return(0,r.jsx)("li",f({className:"split-li-group"},{children:e.map((function(e,t){var i="".concat(n,"-").concat(t);return(0,r.jsx)("div",f({className:(0,a.Z)("split-li",i===N&&"split-li--active"),onClick:function(n){return M(e,i,n)}},{children:(null==v?void 0:v(e))||e.label}),i)}))}),n)}(e,n):(0,r.jsx)("li",f({className:(0,a.Z)("split-li",n===N&&"split-li--active"),onClick:function(t){return M(e,n,t)}},{children:(null==v?void 0:v(e))||e.label}),n)}))},void 0)}),void 0)};return(0,r.jsxs)("div",f({className:(0,a.Z)("paraui-button-split",u),ref:j,onMouseLeave:function(e){var n;e.stopPropagation(),null===(n=e.currentTarget.firstElementChild)||void 0===n||n.classList.remove("paraui-button-split--active"),b(!1)}},{children:[(0,r.jsx)(g,f({variant:"outlined",onMouseEnter:function(e){e.stopPropagation();var n=e.currentTarget;x.current=n,n.classList.add("paraui-button-split--active"),b(!0)},startIcon:(0,r.jsx)(p(),{},void 0),disabled:c},{children:null!=n?n:"更多操作"}),void 0),(0,r.jsx)(o.Popper,f({open:h,anchorEl:j.current,transition:!0,placement:"bottom-end"},{children:function(e){var n=e.TransitionProps;e.placement;return(0,r.jsx)(o.Grow,f({},n,{children:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o.ClickAwayListener,f({onClickAway:T},{children:P()}),void 0)},void 0)}),void 0)}}),void 0)]}),void 0)};var g=b},7456:function(e,n,t){t.r(n),t.d(n,{PageHeader:function(){return T},default:function(){return P}});var r=t(7712),i=t(9297),o=t(2268),a=t(1731),l=t(6028),u=t.n(l),s=t(1609),c=t(6090),d=t.n(c),v=t(3475),p=function(){return p=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},p.apply(this,arguments)},f=function(e,n,t){if(t||2===arguments.length)for(var r,i=0,o=n.length;i<o;i++)!r&&i in n||(r||(r=Array.prototype.slice.call(n,0,i)),r[i]=n[i]);return e.concat(r||Array.prototype.slice.call(n))},m=function(e){var n=e.open,t=void 0!==n&&n,l=e.anchorEl,c=e.idMenuLast,d=e.selectMenu,v=void 0===d?"":d,f=e.onClickMenu,h=e.list,b=void 0===h?[]:h,g=e.onMouseEnter,j=e.onMouseLeave,x=e.level,y=void 0===x?1:x,N=e.className,O=(0,i.useState)(null),M=O[0],T=O[1],P=(0,i.useState)(null),S=P[0],E=P[1],w=(0,i.useState)([]),k=w[0],C=w[1],L=(0,i.useState)({})[0],z=function(e,n){return function(t){var r;r=t,clearTimeout(L.leaveTimer),L.leaveTimer=setTimeout((function(){1===y&&g&&g();var t=[e];e.children&&e.children.length>0&&(t=e.children);var i=r.target;E(i),C(t),T(n)}),50)}},F=function(e){return function(n){e.children&&e.children.length>0||(f&&f(e),j&&j())}},q=function(e){var n="menu-item-popper-content-item",t=c&&c[v];return t&&-1!==t.indexOf(e.path)&&(n+=" menu-item-popper-content-item-select"),n},_=function(){var e="menu-item-popper";return N&&(e+=" "+N),e},I=(0,i.useCallback)((function(e,n){return(0,r.jsx)(r.Fragment,{children:e.children&&e.children.length>0&&M===n&&(0,r.jsx)(m,{open:M===n,anchorEl:S,list:k,idMenuLast:c,selectMenu:v,onClickMenu:f,onMouseEnter:g,onMouseLeave:j,level:y+1},void 0)},void 0)}),[M,S,k,c,v,f,g,j,y]),R=(0,i.useMemo)((function(){return(0,r.jsx)("div",p({className:"menu-item-popper-content"},{children:b.map((function(e,n){var t=function(e){var n=e.icon;if(n){var t=s[n];return t?t():n}}(e),i=function(e){var n=e.children;if(n&&n.length>0)return(0,r.jsx)(u(),{},void 0)}(e);return(0,r.jsx)("div",p({className:q(e),onMouseLeave:function(e){clearTimeout(L.leaveTimer),L.leaveTimer=setTimeout((function(){1===y&&j&&j(),T(null),E(null),C([])}))},onMouseEnter:z(e,n)},{children:(0,r.jsxs)("div",p({className:"menu-item-popper-content-item-content",onClick:F(e)},{children:[t&&(0,r.jsx)("span",p({className:"menu-item-icon"},{children:t}),void 0),(0,r.jsx)("span",p({className:"menu-item-label"},{children:e.label}),void 0),i&&(0,r.jsx)("span",p({className:"menu-item-arrow"},{children:i}),void 0),I(e,n)]}),void 0)}),n)}))}),void 0)}),[b,f,M,S,k,c,v,f,g,j,y]),A=function(){return 1!==y?(0,r.jsx)("div",p({className:_()},{children:R}),void 0):(0,r.jsx)(a.Popper,p({open:t,anchorEl:l,disablePortal:!0,placement:"bottom-start",className:_()},{children:R}),void 0)};return(0,r.jsx)(r.Fragment,{children:1===y?(0,o.createPortal)((0,r.jsx)(A,{},void 0),document.getElementsByTagName("body")[0]):(0,r.jsx)(A,{},void 0)},void 0)},h=function(e){var n=e.list,t=void 0===n?[]:n,o=e.selectMenu,a=void 0===o?"":o,l=e.onClickMenu,c=e.className,h=e.moreCustomize,b=(0,i.useState)(!1),g=b[0],j=b[1],x=(0,i.useState)(null),y=x[0],N=x[1],O=(0,i.useState)(null),M=O[0],T=O[1],P=(0,i.useState)([]),S=P[0],E=P[1],w=(0,i.useState)(""),k=w[0],C=w[1],L=(0,i.useState)({}),z=L[0],F=L[1],q=(0,i.useState)({}),_=q[0],I=q[1],R=(0,i.useState)("horizontal-menu-list-"+(0,v.UUID)())[0],A=(0,i.useState)(null),B=A[0],Z=A[1],D=(0,i.useState)({})[0];(0,i.useEffect)((function(){a!==k&&C(a)}),[a]),(0,i.useEffect)((function(){return V(t),H(),window.addEventListener("resize",H),function(){window.removeEventListener("resize",H)}}),[t]);var U,H=function(){clearTimeout(D.timerResize),G(),D.timerResize=setTimeout((function(){Z(t.length),$()}),100)},$=function(e){if(null!==e&&0!==e){void 0===e&&(e=t.length);var n=document.querySelector("."+R);if(n)if(n.scrollHeight>n.clientHeight){var r=Number(e)-1;Z(r),$(r)}else t.length<=e&&G()}},G=function(){},V=function(e){var n={},t={},r={},i={},o=function(e,a,l){for(var u=0,s=e.length;u<s;u++){var c=e[u],d=c.path;n[d]=c;var p=void 0===l?u:l;if(a){var m=(0,v.DeepClone)(t[a.path]||[]);m.push(d),t[d]=f([],m,!0)}else t[d]=[d];c.children&&c.children.length>0?o(c.children,c,p):(r[d]=t[d],i[d]=p)}};o(e),I(i),F(r)},W=function(e,n){return function(t){clearTimeout(D.leaveTimer);var r=[];e.children&&e.children.length>0&&(r=e.children),N(n),T(t.target),E(r),j(!0)}},Y=function(){j(!1),T(null),E([]),N(null)},J=function(){clearTimeout(D.leaveTimer)},K=function(){Y()},Q=function(e){l&&l(e)},X=function(e,n){var t=" horizontal-menu-list-item",r=z[k];return r&&-1!==r.indexOf(e.path)&&(t+=" horizontal-menu-list-item-select"),y===n&&(t+=" horizontal-menu-list-item-hover"),t},ee=(0,i.useMemo)((function(){return(0,r.jsx)(r.Fragment,{children:g&&(0,r.jsx)(m,{open:g,anchorEl:M,list:S,idMenuLast:z,selectMenu:k,onClickMenu:Q,onMouseEnter:J,onMouseLeave:K,className:"paraui-horizontal-menu-popper",level:1},void 0)},void 0)}),[g,M,S,z,k,l,D]),ne=function(e){clearTimeout(D.leaveTimer);for(var n=[],r=Number(B),i=t.length;r<i;r++)n.push(t[r]);N(B),T(e.target),E(n),j(!0)},te=function(){clearTimeout(D.leaveTimer),D.leaveTimer=setTimeout((function(){Y()}),100)},re=function(){var e=" horizontal-menu-list-item",n=_[k];return null!==B&&B<=n&&(e+=" horizontal-menu-list-item-select"),y===B&&(e+=" horizontal-menu-list-item-hover"),e};return(0,r.jsxs)("div",p({className:(U="horizontal-menu-list",c&&(U+=" "+c),R&&(U+=" "+R),U)},{children:[t.map((function(e,n){if(null!==B&&B<=n)return null;var t=function(e){var n=e.icon;if(n){var t=s[n];return t?t():n}}(e),i=function(e){var n=e.children;if(n&&n.length>0)return(0,r.jsx)(u(),{},void 0)}(e);return(0,r.jsxs)("div",p({onClick:function(){Q(e)},onMouseEnter:W(e,n),onMouseLeave:function(e){clearTimeout(D.leaveTimer),D.leaveTimer=setTimeout((function(){Y()}),100)},className:X(e,n)},{children:[t&&(0,r.jsx)("span",p({className:"menu-item-icon"},{children:t}),void 0),(0,r.jsx)("span",p({className:"menu-item-label"},{children:e.label}),void 0),i&&(0,r.jsx)("span",p({className:"menu-item-arrow"},{children:i}),void 0)]}),n)})),function(){if(null!==B&&t.length>B)return(0,r.jsx)("div",p({onMouseEnter:ne,onMouseLeave:te,className:re()},{children:h||(0,r.jsx)("span",p({className:"menu-item-icon"},{children:(0,r.jsx)(d(),{},void 0)}),void 0)}),void 0)}(),ee]}),void 0)},b=t(2990),g=function(){return g=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},g.apply(this,arguments)},j=function(e){var n,t=e.icon,i=e.label,o=e.render,a=e.onClick,l=e.className,u=function(e){a&&a(e)};return(0,r.jsx)(r.Fragment,{children:o||(0,r.jsx)("div",g({className:(n="back-btn",l&&(n+=" "+l),n)},{children:(0,r.jsx)(b.default,g({startIcon:t,variant:"contained",onClick:u},{children:i}),void 0)}),void 0)},void 0)},x=function(e){var n=e.language,t=void 0===n?[]:n,l=e.selectLang,u=void 0===l?"":l,s=e.onClick,c=e.className,d=e.render,v=(0,i.useState)({}),p=v[0],f=v[1],m=(0,i.useState)({}),h=m[0],b=m[1],j=(0,i.useState)(!1),x=j[0],y=j[1],N=(0,i.useState)(null),O=N[0],M=N[1],T=(0,i.useState)({})[0];(0,i.useEffect)((function(){var e=p[u]||{};b(e)}),[u,p]),(0,i.useEffect)((function(){for(var e={},n=0,r=t.length;n<r;n++){var i=t[n];i.value&&(e[i.value]=i)}f(e)}),[t]);var P,S=function(e){return function(){s&&s(e.value,e),y(!1)}},E=function(e){T.timer=setTimeout((function(){y(!1),M(null)}),100)},w=function(e){return function(n){clearTimeout(T.timer),y(!0),e&&M(n.target)}},k=(0,i.useMemo)((function(){return(0,r.jsx)("div",g({className:"language-item",onMouseLeave:E,onMouseEnter:w(!0)},{children:(0,r.jsxs)(r.Fragment,{children:[h.icon&&(0,r.jsx)("span",g({className:"language-item-icon"},{children:h.icon}),void 0),h.label&&(0,r.jsx)("span",g({className:"language-item-label"},{children:h.label}),void 0)]},void 0)}),void 0)}),[h,t,T]),C=(0,i.useMemo)((function(){var e=function(e){var n="menu-popover-item";return e.value===h.value&&(n+=" menu-popover-item-select"),n};return(0,o.createPortal)((0,r.jsx)((function(){return(0,r.jsx)(a.Popper,g({open:x,anchorEl:O,disablePortal:!0,placement:"bottom-end",onMouseLeave:E,onMouseEnter:w(!1),className:"paraui-horizontal-meun-right-popover menu-popover"},{children:(0,r.jsx)("div",g({className:"menu-popover-box"},{children:t.map((function(n,t){return(0,r.jsxs)("div",g({className:e(n),onClick:S(n)},{children:[n.icon&&(0,r.jsx)("span",g({className:"icon"},{children:n.icon}),void 0),n.label&&(0,r.jsx)("span",g({className:"label",style:{marginLeft:"5px"}},{children:n.label}),void 0)]}),t)}))}),void 0)}),void 0)}),{},void 0),document.getElementsByTagName("body")[0])}),[t,h,x,O,T,s]);return(0,r.jsx)(r.Fragment,{children:d||(0,r.jsxs)("div",g({className:(P="language",c&&(P+=" "+c),x&&(P+=" language-select"),P)},{children:[k,x&&C]}),void 0)},void 0)},y=function(e){var n,t=e.list,o=void 0===t?[]:t,a=e.render,l=e.className,u=e.onClick,s=function(e){return function(n){u&&u(e,n)}},c=(0,i.useMemo)((function(){var e=function(e){return(0,r.jsxs)(r.Fragment,{children:[e.icon&&(0,r.jsx)("span",g({className:"btn-list-item-icon"},{children:e.icon}),void 0),e.label&&(0,r.jsx)("span",g({className:"btn-list-item-label"},{children:e.label}),void 0)]},void 0)};return(0,r.jsx)(r.Fragment,{children:o.map((function(n,t){var i="btn-list-item";return n.sign&&(i+=" btn-list-item-sign"),(0,r.jsx)("div",g({className:i,onClick:s(n)},{children:e(n)}),t)}))},void 0)}),[o]);return(0,r.jsx)(r.Fragment,{children:a||(0,r.jsx)("div",g({className:(n="btn-list",l&&(n+=" "+l),n)},{children:c}),void 0)},void 0)},N=function(e){var n,t=e.img,l=e.imgRender,s=e.label,c=e.render,d=e.className,v=e.list,p=e.onClick,f=e.onClickMenu,m=e.selectValue,h=(0,i.useState)(!1),b=h[0],j=h[1],x=(0,i.useState)(null),y=x[0],N=x[1],O=(0,i.useState)({})[0],M=(0,i.useRef)(),T=function(e){return function(){f&&f(e.value,e),j(!1)}},P=function(e){O.timer=setTimeout((function(){j(!1),N(null)}),100)},S=function(e){return function(n){clearTimeout(O.timer),j(!0),e&&N(M.current)}},E=(0,i.useMemo)((function(){var e=function(e){var n="menu-popover-item";return e.value===m&&(n+=" menu-popover-item-select"),n};return(0,o.createPortal)((0,r.jsx)((function(){var n;return(0,r.jsx)(a.Popper,g({open:b,anchorEl:y,disablePortal:!0,placement:"bottom-end",onMouseLeave:P,onMouseEnter:S(!1),className:"paraui-horizontal-meun-right-popover menu-popover"},{children:(0,r.jsx)("div",g({className:"menu-popover-box",style:(n={},y&&(n.width=y.getBoundingClientRect().width+"px"),n)},{children:v&&v.map((function(n,t){return(0,r.jsxs)("div",g({className:e(n),onClick:T(n)},{children:[n.icon&&(0,r.jsx)("span",g({className:"icon",style:{marginRight:"5px"}},{children:n.icon}),void 0),n.label&&(0,r.jsx)("span",g({className:"label"},{children:n.label}),void 0)]}),t)}))}),void 0)}),void 0)}),{},void 0),document.getElementsByTagName("body")[0])}),[v,m,b,y,O]);return(0,r.jsxs)("div",g({className:(n="logo",d&&(n+=" "+d),b&&(n+=" logo-show-dialog"),n),onClick:function(e){p&&p(e)},onMouseLeave:P,onMouseEnter:S(!0),ref:M},{children:[c||(0,r.jsxs)(r.Fragment,{children:[l||t&&(0,r.jsx)("img",{src:t,alt:""},void 0),s&&(0,r.jsx)("span",g({className:"label"},{children:s}),void 0),v&&v.length>0&&(0,r.jsx)("span",g({className:"arrow"},{children:(0,r.jsx)(u(),{},void 0)}),void 0)]},void 0),b&&E]}),void 0)},O=function(e){var n,t=e.className,o=void 0===t?"":t,a=e.backSelfcareProps,l=e.languageProps,u=e.btnListProps,s=e.userProps,c=e.render,d=(0,i.useMemo)((function(){return a&&(0,r.jsx)(j,g({},a),void 0)}),[a]),v=(0,i.useMemo)((function(){return l&&(0,r.jsx)(x,g({},l),void 0)}),[l]),p=(0,i.useMemo)((function(){return u&&(0,r.jsx)(y,g({},u),void 0)}),[u]),f=(0,i.useMemo)((function(){return s&&(0,r.jsx)(N,g({},s),void 0)}),[s]);return(0,r.jsx)(r.Fragment,{children:c||(0,r.jsxs)("div",g({className:(n="paraui-horizontal-meun-right",o&&(n+=" "+o),n)},{children:[d,v,p,f]}),void 0)},void 0)},M=function(){return M=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},M.apply(this,arguments)},T=function(e){var n,t=e.leftRender,o=e.menuListProps,a=e.footerProps,l=e.selectMenu,u=e.onClickMenu,s=e.className,c=(0,i.useMemo)((function(){return t&&(0,r.jsx)("div",M({className:"paraui-page-header-left"},{children:t}),void 0)}),[t]),d=(0,i.useMemo)((function(){return e.menuListProps&&(0,r.jsx)("div",M({className:"menu-box"},{children:(0,r.jsx)(h,M({},o,{selectMenu:l,onClickMenu:u}),void 0)}),void 0)}),[o,l,u]),v=(0,i.useMemo)((function(){return e.footerProps&&(0,r.jsx)(O,M({},a),void 0)}),[a]);return(0,r.jsxs)("div",M({className:(n="paraui-page-header",s&&(n+=" "+s),n)},{children:[c,d,v]}),void 0)},P=T},6885:function(e,n,t){var r=t(7712),i=t(1731),o=t(4927),a=function(){return a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},a.apply(this,arguments)};n.default=function(e){var n,t=e.placement,l=void 0===t?"bottom":t,u=a(a({},e.classes),{popper:(0,o.Z)("paraui-tooltip",null===(n=e.classes)||void 0===n?void 0:n.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:u}),void 0)}},1731:function(n){n.exports=e},1609:function(e){e.exports=n},6028:function(e){e.exports=t},2749:function(e){e.exports=r},1102:function(e){e.exports=i},6090:function(e){e.exports=o},3475:function(e){e.exports=a},9297:function(e){e.exports=l},2268:function(e){e.exports=u}},d={};function v(e){var n=d[e];if(void 0!==n)return n.exports;var t=d[e]={exports:{}};return c[e](t,t.exports,v),t.exports}v.m=c,s=[],v.O=function(e,n,t,r){if(!n){var i=1/0;for(l=0;l<s.length;l++){n=s[l][0],t=s[l][1],r=s[l][2];for(var o=!0,a=0;a<n.length;a++)(!1&r||i>=r)&&Object.keys(v.O).every((function(e){return v.O[e](n[a])}))?n.splice(a--,1):(o=!1,r<i&&(i=r));o&&(s.splice(l--,1),e=t())}return e}r=r||0;for(var l=s.length;l>0&&s[l-1][2]>r;l--)s[l]=s[l-1];s[l]=[n,t,r]},v.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(n,{a:n}),n},v.d=function(e,n){for(var t in n)v.o(n,t)&&!v.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},v.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},v.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={3462:0,6615:0,2823:0,9296:0};v.O.j=function(n){return 0===e[n]};var n=function(n,t){var r,i,o=t[0],a=t[1],l=t[2],u=0;for(r in a)v.o(a,r)&&(v.m[r]=a[r]);if(l)var s=l(v);for(n&&n(t);u<o.length;u++)i=o[u],v.o(e,i)&&e[i]&&e[i][0](),e[o[u]]=0;return v.O(s)},t=self.webpackChunkParaUI=self.webpackChunkParaUI||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var p=v.O(void 0,[9296],(function(){return v(7456)}));return p=v.O(p)}()}));
|