@para-ui/core 1.1.31 → 1.1.32
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/Form/index.js +1 -1
- package/FormItem/index.js +1 -1
- package/InputLang/index.js +1 -1
- package/MultiBox/index.js +1 -1
- package/Search/index.js +3 -3
- package/Select/index.js +1 -1
- package/SingleBox/index.js +1 -1
- package/TextField/index.js +1 -1
- package/Upload/index.d.ts +1 -1
- package/index.js +2 -2
- package/package.json +1 -1
package/Form/index.js
CHANGED
|
@@ -13,4 +13,4 @@ var t=Object.getOwnPropertySymbols,o=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
|
-
o(4126);var i=o(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;r=n("react.element"),t.Fragment=n("react.fragment")}var l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,o){var i,n={},s=null,d=null;for(i in void 0!==o&&(s=""+o),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,i)&&!c.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:r,type:e,key:s,ref:d,props:n,_owner:l.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,o){e.exports=o(9524)},3094:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s=((0,a.Z)(),(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})})));t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,a=e.tips,d=void 0===a?"":a,p=e.className,u=void 0===p?"":p,h=(0,r.useRef)(),f=s(),v=(0,r.useState)(""),m=v[0],x=v[1];(0,r.useEffect)((function(){x(d)}),[d]);var g;return(0,i.jsx)("div",c({ref:function(e){e&&(h.current=e)},className:(g=f["auto-tips"],g+=" paraui-auto-tips",u&&(g+=" "+u),g),onMouseOver:function(){h.current.scrollWidth>h.current.offsetWidth?x(m||h.current.innerText):x("")}},{children:(0,i.jsx)(n.Tooltip,c({title:m,placement:l},{children:(0,i.jsx)("div",c({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},36:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(4927),c=o(1102),s=o.n(c),d=o(5415),p=function(){return p=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},u=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},h=(0,d.Z)(),f=(0,l.makeStyles)((function(e){return(0,l.createStyles)({"@keyframes loadingCircle":{"100%":{transform:"rotate(1turn)"}},radius:{borderRadius:15},btnIcon:{"& .btn-icon":{display:"inline-flex",alignItems:"center"},"& .btn-icon svg":{color:"currentColor"}},outlinedBtn:{"& .btn-icon svg":{color:h.thmemColor.primary},"&:disabled":{"& .btn-icon svg":{color:"currentColor"}}},iconButtonToolTip:{display:"inline-block",cursor:"not-allowed","& .iconButton-disabled":{cursor:"not-allowed",pointerEvents:"none"}},loadingBtn:{position:"relative",pointerEvents:"none","&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,transition:"opacity .2s",pointerEvents:"none"},"& .loading-icon":{animation:"$loadingCircle 1s infinite linear"}}})})),v=(0,l.withStyles)((function(e){return{tooltip:{margin:"6px 0",backgroundColor:h.bgBorderColor.bg4}}}))(n.Tooltip),m=function(e){var t=f(),o=e.radius,l=e.className,c=e.disabled,d=void 0!==c&&c,h=e.children,v=e.startIcon,m=e.endIcon,x=e.loading,g=void 0!==x&&x,b=u(e,["radius","className","disabled","children","startIcon","endIcon","loading"]);"text"===b.variant&&(b.disableRipple=!0);var y=(0,r.useState)(!1),C=y[0],w=y[1];return(0,r.useEffect)((function(){w(!!g)}),[g]),(0,i.jsx)(n.Button,p({disabled:d,className:(0,a.Z)("paraui-button",l,t.btnIcon,o&&t.radius,"outlined"===b.variant&&t.outlinedBtn,C&&t.loadingBtn),startIcon:function(){if(!C)return(0,i.jsx)("span",p({className:"btn-icon"},{children:v}),void 0);if("object"==typeof g){var e=g.delay||0;setTimeout((function(){return w(!1)}),e)}return(0,i.jsx)("span",p({className:"btn-icon loading-icon"},{children:(0,i.jsx)(s(),{},void 0)}),void 0)}(),endIcon:(0,i.jsx)("span",p({className:"btn-icon"},{children:m}),void 0)},b,{children:h}),void 0)};m.IconButton=function(e){var t=f(),o=e.showToolTip,l=void 0===o||o,c=e.toolTipTitle,d=void 0===c?"":c,h=e.children,m=e.className,x=e.disabled,g=void 0!==x&&x,b=e.loading,y=void 0!==b&&b,C=e.TooltipProps,w=u(e,["showToolTip","toolTipTitle","children","className","disabled","loading","TooltipProps"]),j=(0,r.useState)(!1),k=j[0],S=j[1],O=(0,i.jsx)(n.IconButton,p({},w,{disabled:g,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",m,l&&g&&"iconButton-disabled",k&&t.loadingBtn)},{children:function(){if(!k)return h;if("object"==typeof y){var e=y.delay||0;setTimeout((function(){return S(!1)}),e)}return(0,i.jsx)("span",p({className:"loading-icon"},{children:(0,i.jsx)(s(),{},void 0)}),void 0)}()}),void 0);return(0,r.useEffect)((function(){S(!!y)}),[y]),l?(0,i.jsx)(v,p({title:d},C,{children:(0,i.jsx)("span",p({className:(0,a.Z)(g&&t.iconButtonToolTip)},{children:O}),void 0)}),void 0):O},t.default=m},4726:function(e,t,o){o.d(t,{default:function(){return f}});var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s={icon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",fill:"#FFFFFF"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",fill:"currentColor",className:"fill-bg"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0)]}),void 0)},checkedIcon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M0 0m196.923077 0l630.153846 0q196.923077 0 196.923077 196.923077l0 630.153846q0 196.923077-196.923077 196.923077l-630.153846 0q-196.923077 0-196.923077-196.923077l0-630.153846q0-196.923077 196.923077-196.923077Z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M852.834462 284.356923a46.710154 46.710154 0 0 0-66.008616 0L430.710154 640.472615 237.331692 447.172923a46.710154 46.710154 0 0 0-66.087384 66.087385l226.382769 226.304a46.710154 46.710154 0 0 0 66.087385 0c0.472615-0.551385 0.708923-1.260308 1.181538-1.811693s1.260308-0.708923 1.811692-1.181538l385.969231-385.969231a46.710154 46.710154 0 0 0 0-66.244923z",fill:"#FFFFFF"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{className:"fill-bg",d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M852.834462 284.356923a46.710154 46.710154 0 0 0-66.008616 0L430.710154 640.472615 237.331692 447.172923a46.710154 46.710154 0 0 0-66.087384 66.087385l226.382769 226.304a46.710154 46.710154 0 0 0 66.087385 0c0.472615-0.551385 0.708923-1.260308 1.181538-1.811693s1.260308-0.708923 1.811692-1.181538l385.969231-385.969231a46.710154 46.710154 0 0 0 0-66.244923z",className:"char-path",fill:"currentColor"},void 0)]}),void 0)},indeterminateIcon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M0 0m196.923077 0l630.153846 0q196.923077 0 196.923077 196.923077l0 630.153846q0 196.923077-196.923077 196.923077l-630.153846 0q-196.923077 0-196.923077-196.923077l0-630.153846q0-196.923077 196.923077-196.923077Z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M785.171692 564.224h-546.422154a52.696615 52.696615 0 0 1 0-104.448h546.422154a52.696615 52.696615 0 0 1 0 104.448z",fill:"#FFFFFF"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",className:"fill-bg",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M785.171692 564.224H238.749538a52.696615 52.696615 0 0 1 0-104.448h546.422154a52.696615 52.696615 0 0 1 0 104.448z",className:"char-path",fill:"currentColor"},void 0)]}),void 0)}},d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},p=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},u=(0,a.Z)(),h=(0,l.makeStyles)((function(){return(0,l.createStyles)({"check-box":{margin:"0","&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary,"& > .line-rect":{color:u.thmemColor.primary}}}},"& > span:last-child":{color:u.thmemColor.primary}},"& > span:first-child":{padding:"8px","& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.primary},"&.check-box-checked":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.check-box-indeterminate":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.check-box-disabled":{"&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.thirdary}},cursor:"not-allowed","& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.textColor.thirdary+" !important","& > .fill-bg":{color:u.bgBorderColor.bg1},"& > .char-path":{color:u.bgBorderColor.bg4}}}},"& > span:last-child":{color:u.textColor.secondary+" !important"}},"&.check-box-small":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"12px"}}},"& > span:last-child":{fontSize:"12px",lineHeight:"12px"}},"&.check-box-medium":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"14px"}}},"& > span:last-child":{fontSize:"14px",lineHeight:"14px"}},"&.check-box-large":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"16px"}}},"& > span:last-child":{fontSize:"16px",lineHeight:"16px"}}}})})),f=function(e){var t=e.className,o=void 0===t?"":t,l=e.color,a=void 0===l?"primary":l,c=e.size,u=void 0===c?"small":c,f=e.label,v=void 0===f?"":f,m=e.labelPlacement,x=void 0===m?"end":m,g=(e.checkedIcon,e.indeterminateIcon,e.icon,e.disabled),b=void 0!==g&&g,y=e.checked,C=void 0!==y&&y,w=e.indeterminate,j=void 0!==w&&w,k=e.onChange,S=p(e,["className","color","size","label","labelPlacement","checkedIcon","indeterminateIcon","icon","disabled","checked","indeterminate","onChange"]),O=h(e),F=(0,r.useState)(!1),N=F[0],z=F[1];(0,r.useEffect)((function(){C!==N&&z(C)}),[C]);var E,T=function(e){return b?s[e].iconDisabled:s[e].icon},B=function(t,o){void 0===e.checked&&void 0===e.indeterminate&&z(t.target.checked),k&&k(t,o)};return(0,i.jsx)(n.FormControlLabel,{className:(E=O["check-box"]+" paraui-check-box",o&&(E+=" "+o),u&&(E+=" check-box-"+u),b&&(E+=" check-box-disabled"),j?E+=" check-box-indeterminate":N&&(E+=" check-box-checked"),E),control:(0,i.jsx)(n.Checkbox,d({size:"small",color:a,disabled:b,icon:T("icon"),checkedIcon:T("checkedIcon"),indeterminateIcon:T("indeterminateIcon"),onChange:B,checked:N,indeterminate:j},S),void 0),label:v,labelPlacement:x},void 0)}},7661:function(e,t,o){var i=o(9297),r=o(7712),n=o(1731),l=o(4726),a=o(8604),c=o(5415),s=o(3475),d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},p=(0,c.Z)(),u=(0,a.makeStyles)((function(){return(0,a.createStyles)({"check-box-group":{"& > label":{fontSize:"12px",color:p.textColor.secondary,"& > .required-char":{marginLeft:"3px",color:p.thmemColor.primary}},"& > div":{margin:"5px 0"},"& > p":{fontSize:"12px",lineHeight:"12px",margin:"0",color:p.stateColor.error},"&.check-box-group-disabled":{},"&.check-box-group-small":{},"&.check-box-group-medium":{},"&.check-box-group-large":{}}})}));t.default=function(e){var t,o=e.label,a=void 0===o?"":o,c=e.size,p=void 0===c?"small":c,h=e.row,f=void 0===h||h,v=e.disabled,m=void 0!==v&&v,x=e.required,g=void 0!==x&&x,b=e.error,y=void 0!==b&&b,C=e.helperText,w=void 0===C?"":C,j=e.id,k=void 0===j?"name":j,S=e.value,O=void 0===S?[]:S,F=e.list,N=e.className,z=void 0===N?"":N,E=e.onChange,T=u(e),B=function(e){return function(t,o){var i=e[k],r=(0,s.DeepClone)(O);if(o)r.push(i);else{var n=r.indexOf(i);r.splice(n,1)}E&&E(r)}};return(0,r.jsxs)(n.FormControl,d({className:(t=T["check-box-group"]+" paraui-check-box-group",z&&(t+=" "+z),p&&(t+=" check-box-group-"+p),y&&(t+=" check-box-group-error"),m&&(t+=" check-box-group-disabled"),t)},{children:[(0,r.jsxs)(n.FormLabel,{children:[a,g&&(0,r.jsx)("span",d({className:"required-char"},{children:"(必填)"}),void 0)]},void 0),(0,r.jsx)(n.FormGroup,d({row:f},{children:F.map((function(e,t){return(0,i.createElement)(l.default,d({},e,{checked:-1!==O.indexOf(e[k]),size:p,disabled:Boolean(m||e.disabled),key:t,onChange:B(e)}))}))}),void 0),w&&(0,r.jsx)(n.FormHelperText,{children:w},void 0)]}),void 0)}},7178:function(e,t,o){o.d(t,{default:function(){return R}});var i=o(7712),r=o(9297),n=o.n(r),l=o(6897),a=o.n(l),c=o(8604),s=o(1731),d=o(3672),p=o(1383),u=function(){return u=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},u.apply(this,arguments)},h=function(e){var t=e.defaultValue,o=e.change,r=n().useState(t||""),l=r[0],a=r[1];return(0,i.jsx)(p.default,u({value:l,onChange:function(e){a(e),o&&o(e)}},e),void 0)},f=o(370),v=function(){return v=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},m=function(e){var t=e.defaultValue,o=void 0===t?"":t,r=e.change,l=e.value,a=n().useState(void 0!==l?l:o),c=a[0],s=a[1];return n().useEffect((function(){s(l)}),[l]),(0,i.jsx)(f.default,v({labelMode:"inside",onChange:function(e){s(e),r&&r(e)}},e,{value:c}),void 0)},x=o(7661),g=function(){return g=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},g.apply(this,arguments)},b=function(e){var t=e.defaultValue,o=e.change,r=n().useState(t||[]),l=r[0],a=r[1];return(0,i.jsx)(x.default,g({value:l,onChange:function(e){a(e),o&&o(e)}},e),void 0)},y=o(3053),C=o(5962),w=o(6243),j=o.n(w),k=o(9973),S=o.n(k),O=o(3094),F=o(36),N=o(5415),z=function(){return z=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},z.apply(this,arguments)},E=(0,N.Z)(),T=(0,c.makeStyles)((function(e){return(0,c.createStyles)({"para-file-box":{padding:"6px","& .para-file-tips":{"&-disabled":{"& .file-tips-context,& .svg-icon-primary":{color:"".concat(E.textColor.thirdary," !important")}},minHeight:"20px",position:"relative",padding:"6px","& .file-tips-item":{position:"relative",height:"20px",lineHeight:"16px",paddingRight:"20px",'&>[data-name="LinkGroup"]':{verticalAlign:"middle",marginRight:"9px"},"& .file-tips-context":{display:"inline-block",verticalAlign:"middle",width:"calc(100% - 45px)",color:E.thmemColor.primary},'&>[data-name="Delete"]':{display:"none",verticalAlign:"middle",cursor:"pointer",position:"absolute",right:"3px",top:"2px","&:hover":{opacity:"0.8"}},"&:hover":{backgroundColor:"#f5f5f5",'&>[data-name="Delete"]':{display:"inline-block"}}}}}})})),B=function(e){var t=e.fileType,o=void 0===t?"":t,r=e.defaultValue,l=e.onChange,a=e.disabled,c=e.buttonLabel,s=e.inputProps,d=e.buttonProps,p=T(),u=n().useRef(null),h=function(e){var t=void 0!==e?e:u.current.files;m(t),l&&l(t),null===e&&(u.current.value=null)},f=n().useState(),v=f[0],m=f[1];return n().useEffect((function(){r&&m(r)}),[r]),(0,i.jsxs)("div",z({className:p["para-file-box"]},{children:[!a&&(0,i.jsx)(F.default,z({variant:"outlined"},d,{onClick:function(){var e;console.log("inputFileClick",u.current),null===(e=u.current)||void 0===e||e.click()}},{children:c||"选择文件"}),void 0),(0,i.jsx)("input",z({},s,{ref:u,type:"file",onInput:function(){return h()},hidden:!0,accept:"string"==typeof o?o:o.join(",")}),void 0),v&&v[0]&&(0,i.jsx)("div",z({className:"para-file-tips ".concat(a?"para-file-tips-disabled":"")},{children:(0,i.jsxs)("div",z({className:"file-tips-item"},{children:[(0,i.jsx)(S(),{},void 0),(0,i.jsx)("span",z({className:"file-tips-context"},{children:(0,i.jsx)(O.default,{children:"string"==typeof v?v:v[0].name},void 0)}),void 0),!a&&(0,i.jsx)(j(),{onClick:function(){return h(null)}},void 0)]}),void 0)}),void 0)]}),void 0)},q=function(){return q=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},q.apply(this,arguments)},L=function(e){var t=e.ItemType,o=e.error,r=e.placeholder,l=e.label,a=e.inputProps,c=e.name,s=e.rules,p=e.setValue,u=e.setError,f=e.backData,v=e.disabled,x=e.change,g=r||"".concat(l),w=n().useState(!!o),j=w[0],k=w[1],S=function(t){if(p&&p(c,"value",t),x&&x(t),s){var o=(0,y.Z)(e,t)||"";O(o)}},O=n().useCallback((function(e){u&&u(e),k(!!e),p&&p(c,"message",e)}),[c,u,p]);n().useEffect((function(){var t=q(q({},e),{setErrorMsg:O});p&&p(c,"item",t)}),[c,e,O,p]);return function(){if(t&&"string"!=typeof t){var o=q(q({},e),{setErrorMsg:O});return t(o)}switch(t){case"file":return(0,i.jsx)(B,q({},e,{defaultValue:f[c],disabled:v,onChange:function(e){S(e)}}),void 0);case"switch":return void 0===f[c]&&p&&p(c,"initValue",!!f[c]),(0,i.jsx)(C.default,q({type:"compact",size:"small",defaultChecked:!!f[c],onChange:function(e){S(e.target.checked)}},q(q({},a),{disabled:v})),void 0);case"checkGroup":return(0,i.jsx)(b,q({error:j,defaultValue:f[c],size:"small",change:function(e){S(e)},list:e.list},q(q({},a),{disabled:v})),void 0);case"select":return(0,i.jsx)(m,q({placeholder:g,defaultValue:f[c],error:j,size:"medium",change:function(e){S(e)},list:e.list},q({disabled:v},a)),void 0);case"radioGroup":return(0,i.jsx)(h,q({error:j,defaultValue:f[c],size:"small",change:function(e){S(e)},list:e.list},q({disabled:v},a)),void 0);case"textarea":return(0,i.jsx)(d.default,q({error:j,placeholder:g,value:f[c],disabled:v,multiline:!0,rows:3,size:"medium",name:c,onChange:function(e){S(e.target.value)}},a),void 0);default:return(0,i.jsx)(d.default,q({value:f[c],error:j,placeholder:g,onChange:function(e){S(e.target.value)},name:c,size:"medium",disabled:v},a),void 0)}}()},P=function(e){var t=e.getSetError,o=e.errorMessage,r=n().useState(o||""),l=r[0],a=r[1];return n().useEffect((function(){a(o||"")}),[o]),n().useEffect((function(){t&&t(a)}),[t]),(0,i.jsxs)(O.default,{children:[l," "]},void 0)},M=o(4927),A=function(){return A=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},A.apply(this,arguments)},D=(0,N.Z)(),I=(0,c.makeStyles)((function(e){return(0,c.createStyles)({"para-form-item":{"& .para-form-label":{height:"20px",lineHeight:"20px",fontSize:"12px",textAlign:"left",fontWeight:"400",display:"inline-block",marginBottom:"8px",verticalAlign:"top",width:"100%","&-vertical":{marginTop:"6px",textAlign:"right",paddingRight:"3px",position:"relative","& .para-form-labe-tips":{position:"absolute",left:"0px",top:"1px"}},"& .para-form-labe-text":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",maxWidth:"100%",verticalAlign:"middle","&-hastips":{maxWidth:"calc(100% - 25px)"}},"& .para-form-labe-tips":{height:"20px",cursor:"pointer",display:"inline-block",verticalAlign:"middle",lineHeight:"27px",marginLeft:"5px"}},"& .para-form-edit":{minHeight:"34px","&>div":{padding:"0px"},"& .MuiSwitch-root":{marginTop:"12px"}},"& .para-form-error":{height:"17px",lineHeight:"17px",color:D.stateColor.error},"& .para-form-content-vertical":{display:"inline-block",width:"100%"}}})})),R=function(e){var t=e.type,o=void 0===t?"horizontal":t,r=e.labelWidth,l=void 0===r?60:r,c=e.tips,d=e.label,p=e.InputType,u=e.setValue,h=e.errorMessage,f=(e.rules,e.backData),v=void 0===f?{}:f,m=I(),x=n().useRef();return(0,i.jsxs)("div",A({className:m["para-form-item"]},{children:[(0,i.jsxs)("div",A({className:(0,M.Z)("para-form-label","vertical"===o&&"para-form-label-vertical"),style:{width:"vertical"===o?"".concat(l,"px"):""}},{children:[(0,i.jsx)("span",A({className:(0,M.Z)("para-form-labe-text",c&&"para-form-labe-text-hastips")},{children:d}),void 0),c&&(0,i.jsx)(s.Tooltip,A({title:c,placement:"top"},{children:(0,i.jsx)("span",A({className:"para-form-labe-tips"},{children:(0,i.jsx)(a(),{},void 0)}),void 0)}),void 0)]}),void 0),(0,i.jsxs)((function(e){return"vertical"===o?(0,i.jsx)("div",A({className:"para-form-content-vertical",style:{width:"calc(100% - ".concat(l,"px)")}},{children:e.children}),void 0):e.children}),{children:[(0,i.jsx)("div",A({className:"para-form-edit"},{children:e.children?e.children:(0,i.jsx)(L,A({setError:function(e){x.current&&x.current(e)},error:!!h,ItemType:p,backData:v},e,{setValue:u}),void 0)}),void 0),(0,i.jsx)("div",A({className:"para-form-error"},{children:(0,i.jsx)(P,{getSetError:function(e){return x.current=e},errorMessage:h},void 0)}),void 0)]},void 0)]}),void 0)}},3053:function(e,t){var o={required:function(e,t){var o,i,r=typeof t,n=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.required)||"".concat(e.label,"不能为空"),l=!1;switch(r){case"string":default:l=!!t;break;case"number":l=t+1>t;break;case"object":var a=JSON.stringify(t);l="null"!==a&&"[]"!==a&&"{}"!==a;break;case"boolean":l=void 0!==t}return l||n},maxlength:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.maxlength)||"最大长度不能超过".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.maxlength);return("string"===c||"number"===c&&t+1>t?!("".concat(t).length>((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.maxlength)||NaN)):!t)||s},minLength:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.minLength)||"最小长度为".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.minLength);return("string"===c||"number"===c&&t+1>t?"".concat(t).length>=((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.minLength)||-1):!t)||s},pattern:function(e,t){var o,i,r,n,l=null===(i=null===(o=e.rules)||void 0===o?void 0:o.validate)||void 0===i?void 0:i.pattern,a=(null===(n=null===(r=e.rules)||void 0===r?void 0:r.message)||void 0===n?void 0:n.pattern)||"参数不符合校验规则: ".concat(l),c=!t;return l&&t&&"function"!=typeof l&&(c=l.test(t)),c||a},min:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.min)||"最小值为".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.min),d=!t;return"string"!==c&&"number"!==c||(d=t>((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.min)||-1/0)),d||s},max:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.max)||"最大值为".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.max),d=!t;return"string"!==c&&"number"!==c||(d=t<((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.max)||1/0)),d||s}};t.Z=function(e,t){var i,r,n=null===(i=e.rules)||void 0===i?void 0:i.validate;if(n){var l=null===(r=e.rules)||void 0===r?void 0:r.message;for(var a in console.log("validateObj"),n){var c=n[a],s="";if("function"==typeof c?!1===(s=c(e,t))&&l&&(s=l[a]):o[a]?s=o[a](e,t):(console.log("项目: ".concat(e.label,", 自定义校验规则: ").concat(a,", 方法未定义")),s=!0),!0!==s)return s||""}}return!1}},5415:function(e,t){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return o}},7628:function(e,t,o){o.d(t,{default:function(){return f}});var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s={icon:{icon:(0,i.jsx)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:(0,i.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",fill:"currentColor"},void 0)}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M512.213333 128.128a384 384 0 1 0 384 384 384 384 0 0 0-384-384z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)},checkedIcon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",fill:"currentColor"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M512 128.170667a384 384 0 1 0 384 384 384.384 384.384 0 0 0-384-384z m0 617.728a233.728 233.728 0 1 1 233.728-233.728A233.770667 233.770667 0 0 1 512 745.728z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",className:"line-round",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)}},d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},p=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},u=(0,a.Z)(),h=(0,l.makeStyles)((function(){return(0,l.createStyles)({radio:{margin:"0","&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"& > span:first-child":{padding:"8px","& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.primary},"&.radio-checked":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.radio-disabled":{"&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1,"& > .line-round":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.thirdary}},cursor:"not-allowed","& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1+" !important","& > .line-round":{color:u.textColor.thirdary+" !important"}}}},"& > span:last-child":{color:u.textColor.secondary+" !important"}},"&.radio-small":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"12px"}}},"& > span:last-child":{fontSize:"12px",lineHeight:"12px"}},"&.radio-medium":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"14px"}}},"& > span:last-child":{fontSize:"14px",lineHeight:"14px"}},"&.radio-large":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"16px"}}},"& > span:last-child":{fontSize:"16px",lineHeight:"16px"}}}})})),f=function(e){var t=e.color,o=void 0===t?"primary":t,l=e.size,a=void 0===l?"small":l,c=e.label,u=void 0===c?"":c,f=e.labelPlacement,v=void 0===f?"end":f,m=(e.checkedIcon,e.icon,e.disabled),x=void 0!==m&&m,g=e.checked,b=void 0!==g&&g,y=e.onChange,C=e.className,w=void 0===C?"":C,j=p(e,["color","size","label","labelPlacement","checkedIcon","icon","disabled","checked","onChange","className"]),k=h(e),S=(0,r.useState)(!1),O=S[0],F=S[1];(0,r.useEffect)((function(){b!==O&&F(b)}),[b]);var N,z=function(e){return x?s[e].iconDisabled:s[e].icon},E=function(t,o){void 0===e.checked&&F(t.target.checked),y&&y(t,o)};return(0,i.jsx)(n.FormControlLabel,{className:(N=k.radio+" paraui-radio",w&&(N+=" "+w),a&&(N+=" radio-"+a),x&&(N+=" radio-disabled"),O&&(N+=" radio-checked"),N),control:(0,i.jsx)(n.Radio,d({size:"small",color:o,disabled:x,icon:z("icon"),checkedIcon:z("checkedIcon"),onChange:E,checked:O},j),void 0),label:u,labelPlacement:v},void 0)}},1383:function(e,t,o){var i=o(9297),r=o(7712),n=o(1731),l=o(7628),a=o(8604),c=o(5415),s=function(){return s=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},d=(0,c.Z)(),p=(0,a.makeStyles)((function(){return(0,a.createStyles)({"radio-group":{"& > label":{fontSize:"12px",color:d.textColor.secondary,"& > .required-char":{marginLeft:"3px",color:d.thmemColor.primary}},"& > div":{margin:"5px 0"},"& > p":{fontSize:"12px",lineHeight:"12px",margin:"0",color:d.stateColor.error},"&.radio-group-disabled":{},"&.radio-group-small":{},"&.radio-group-medium":{},"&.radio-group-large":{}}})}));t.default=function(e){var t,o=e.className,a=void 0===o?"":o,c=e.label,d=void 0===c?"":c,u=e.size,h=void 0===u?"small":u,f=e.row,v=void 0===f||f,m=e.disabled,x=void 0!==m&&m,g=e.required,b=void 0!==g&&g,y=e.error,C=void 0!==y&&y,w=e.helperText,j=void 0===w?"":w,k=e.id,S=void 0===k?"name":k,O=e.value,F=e.list,N=e.onChange,z=p(e),E=function(e){return function(){var t=e[S];N&&N(t)}};return(0,r.jsxs)(n.FormControl,s({className:(t=z["radio-group"]+" paraui-radio-group",a&&(t+=" "+a),h&&(t+=" radio-group-"+h),C&&(t+=" radio-group-error"),x&&(t+=" radio-group-disabled"),t)},{children:[(0,r.jsxs)(n.FormLabel,{children:[d,b&&(0,r.jsx)("span",s({className:"required-char"},{children:"(必填)"}),void 0)]},void 0),(0,r.jsx)(n.FormGroup,s({row:v},{children:F.map((function(e,t){var o={};return e&&Object.keys(e).forEach((function(t){o[t]=String(e[t])})),(0,i.createElement)(l.default,s({},o,{checked:O===e[S],size:h,disabled:Boolean(x||e.disabled),key:t,onChange:E(e)}))}))}),void 0),j&&(0,r.jsx)(n.FormHelperText,{children:j},void 0)]}),void 0)}},370:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(6028),a=o.n(l),c=o(4115),s=o.n(c),d=o(6110),p=o.n(d),u=o(19),h=o.n(u),f=o(3094),v=o(8604),m=o(5415),x=o(3475),g=function(){return g=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},g.apply(this,arguments)},b=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},y=(0,m.Z)(),C=(0,v.makeStyles)((function(){return(0,v.createStyles)({select:{"& *":{boxSizing:"border-box"},fontFamily:y.fontFamily.zh,display:"inline-block",fontSize:y.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& > .select-label":{color:y.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .select-content":{lineHeight:"0",border:"1px solid",borderColor:y.textColor.thirdary,borderRadius:y.borderRadius,paddingRight:"30px",position:"relative",cursor:"pointer","&:hover":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{color:y.thmemColor.primary}}},"& > .select-label-placeholder":{width:"100%",height:"100%",padding:"0 10px",boxSizing:"border-box",color:y.textColor.thirdary,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",position:"absolute",left:"0",top:"0"},"& > .select-svg":{position:"absolute",right:"8px",top:"0","& > svg":{fontSize:"16px",transition:"all .3s",color:y.textColor.secondary}},"& > .radio-select-content":{paddingLeft:"10px",color:y.textColor.primary,fontSize:"12px",lineHeight:"16px"},"& > .radio-search-outside":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",padding:"0 30px 0 10px",fontSize:"12px",cursor:"pointer","& > div":{height:"100%",cursor:"pointer","& > input":{height:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}},"& > .check-select-content":{paddingLeft:"10px",height:"100%",overflow:"hidden","& > .check-select-content-item":{display:"inline-block",backgroundColor:y.bgBorderColor.bg2,borderRadius:y.borderRadius,padding:"0 10px",color:y.textColor.primary,fontSize:"12px",marginRight:"10px",verticalAlign:"top",maxWidth:"100%",whiteSpace:"nowrap","&.check-select-content-item-more":{color:y.thmemColor.primary,cursor:"pointer","& > span":{maxWidth:"none"}},"& > span":{display:"inline-block",hieght:"100%",verticalAlign:"top",maxWidth:"calc(100% - 20px)",overflow:"hidden",textOverflow:"ellipsis"},"& > svg":{cursor:"pointer",marginLeft:"8px",color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"2px","&:hover":{color:y.thmemColor.primary}},"&.check-select-content-item-noclose":{"& > span":{maxWidth:"none"}}},"& > .check-search-outside":{width:"10px",maxWidth:"100% !important",display:"none","& > div":{width:"100%","& > input":{width:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}}}},"& > .select-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.select-disabled":{"& > .select-content":{backgroundColor:y.bgBorderColor.bg2,cursor:"not-allowed","&:hover":{borderColor:y.textColor.thirdary,"& > .select-svg":{"& > svg":{color:y.textColor.secondary}}},"& > .check-select-content":{"& > .check-select-content-item":{backgroundColor:y.bgBorderColor.bg3,"& > span":{maxWidth:"none"}}}}},"&.select-error":{"& > .select-content":{borderColor:y.stateColor.error+"!important"},"& > .select-error-text":{color:y.stateColor.error+"!important"}},"&.select-multiple":{},"&.select-open":{"& > .select-content":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{transform:"rotate(180deg)",color:y.thmemColor.primary}},"& > .check-select-content":{"& > .check-search-outside":{display:"inline-block"}}}},"&.select-small":{"& > .select-content":{height:"28px","& > .select-label-placeholder":{lineHeight:"26px"},"& > .select-svg":{top:"5px"},"& > .radio-select-content":{paddingTop:"5px",paddingBottom:"5px"},"& > .radio-search-outside":{"& > div":{paddingTop:"5px",paddingBottom:"5px"}},"& > .check-select-content":{paddingBottom:"3px","& > .check-select-content-item":{marginTop:"3px",height:"20px",lineHeight:"20px"},"& > .check-search-outside":{marginTop:"3px","& input":{height:"20px"}}}}},"&.select-medium":{"& > .select-content":{height:"34px","& > .select-label-placeholder":{lineHeight:"32px"},"& > .select-svg":{top:"8px"},"& > .radio-select-content":{paddingTop:"8px",paddingBottom:"8px"},"& > .radio-search-outside":{"& > div":{paddingTop:"8px",paddingBottom:"8px"}},"& > .check-select-content":{paddingBottom:"4px","& > .check-select-content-item":{marginTop:"4px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"4px","& input":{height:"24px"}}}}},"&.select-large":{"& > .select-content":{height:"40px","& > .select-label-placeholder":{lineHeight:"38px"},"& > .select-svg":{top:"11px"},"& > .radio-select-content":{paddingTop:"11px",paddingBottom:"11px"},"& > .radio-search-outside":{"& > div":{paddingTop:"11px",paddingBottom:"11px"}},"& > .check-select-content":{paddingBottom:"7px","& > .check-select-content-item":{marginTop:"7px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"7px","& input":{height:"24px"}}}}},"&.select-over-line":{"&.select-small":{"& > .select-content":{height:"inherit",minHeight:"28px","& > .radio-select-content":{}}},"&.select-medium":{"& > .select-content":{height:"inherit",minHeight:"34px","& > .radio-select-content":{}}},"&.select-large":{"& > .select-content":{height:"inherit",minHeight:"40px","& > .radio-select-content":{}}}}},"select-popover":{"& *":{boxSizing:"border-box"},"& > div":{maxWidth:"none",padding:"0",backgroundColor:y.textColor.white,boxShadow:y.boxShadow,borderRadius:y.borderRadius,"& > span":{color:y.textColor.white},"& .select-popover-content":{maxHeight:"300px",overflow:"auto","& > .select-popover-search":{height:"30px",borderBottom:"1px solid "+y.bgBorderColor.bg3,padding:"0 10px",display:"flex","& > div":{width:"100%","& input":{padding:"0",height:"28px",fontSize:"12px",color:y.textColor.primary,"&::placeholder":{fontSize:"12px",color:y.textColor.thirdary,opacity:1}},"& fieldset":{display:"none"}},"& > svg":{color:y.thmemColor.primary,fontSize:"16px",marginTop:"7px",cursor:"pointer"}},"& > .select-popover-list":{"& .select-popover-list-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px","& > .select-popover-list-item-label":{width:"calc(100% - 25px)",color:y.textColor.secondary,fontSize:"12px"},"& > .select-popover-list-item-svg":{lineHeight:"0",display:"none","& > svg":{fontSize:"16px",color:y.thmemColor.primary}},"&.select-popover-list-item-select":{"& > .select-popover-list-item-label":{color:y.thmemColor.primary},"& > .select-popover-list-item-svg":{display:"inline-block"}},"&.select-popover-list-item-disabled":{backgroundColor:y.bgBorderColor.bg3+" !important",cursor:"not-allowed","&:hover":{backgroundColor:y.bgBorderColor.bg3+" !important"},"& > .select-popover-list-item-label":{color:y.textColor.secondary+" !important"},"& > .select-popover-list-item-svg":{"& > svg":{color:y.textColor.secondary+" !important"}}},"&.select-popover-list-item-hover":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}},"&.select-popover-list-item-keydown":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}}},"& > .select-popover-list-group":{"& .select-popover-list-group-label":{display:"inline-block",width:"100%",padding:"7px 10px",color:y.textColor.thirdary,fontSize:"12px"},"& .select-popover-list-item":{padding:"7px 10px 7px 20px"}},"& > .select-nodata":{textAlign:"center",fontSize:"12px",color:y.textColor.primary,padding:"10px"}}}}},"select-more-popover":{"& *":{boxSizing:"border-box"},"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginLeft:"10px"},"& .select-more":{width:"200px",maxHeight:"300px",overflow:"auto","& > .select-more-title":{height:"30px",padding:"0 10px",color:y.textColor.secondary,borderBottom:"1px solid "+y.bgBorderColor.bg2,lineHeight:"30px",fontSize:"12px",display:"flex",justifyContent:"space-between"},"& > .select-more-content":{"& > .select-more-content-item":{padding:"7px 7px 7px 10px",display:"flex",justifyContent:"space-between","& > span":{width:"calc(100% - 25px)",display:"inline-block",fontSize:"12px"},"& > svg":{color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"1px",cursor:"pointer","&:hover":{color:y.thmemColor.primary}}}}}}})}));t.default=function(e){var t=e.className,o=e.size,l=void 0===o?"small":o,c=e.labelMode,d=void 0===c?"outside":c,u=e.placeholder,v=void 0===u?"":u,m=e.label,y=void 0===m?"":m,w=e.disabled,j=void 0!==w&&w,k=e.multiple,S=void 0!==k&&k,O=e.required,F=void 0!==O&&O,N=e.showLabelSign,z=void 0===N||N,E=e.labelSign,T=e.error,B=void 0!==T&&T,q=e.helperText,L=void 0===q?"":q,P=e.list,M=e.showName,A=void 0===M?"label":M,D=e.showValue,I=void 0===D?"value":D,R=e.childrenName,H=void 0===R?"children":R,W=e.value,Z=e.onChange,V=e.overLine,_=void 0!==V&&V,U=e.search,G=void 0!==U&&U,K=e.searchModel,$=void 0===K?"inside":K,Y=e.selectPopoverClassName,J=e.morePopoverClassName,X=e.onEnter,Q=C(e),ee=(0,r.useRef)(null),te=(0,r.useState)("select-"+(0,x.UUID)())[0],oe=(0,r.useState)("select-popover-"+(0,x.UUID)())[0],ie=(0,r.useState)(!1),re=ie[0],ne=ie[1],le=(0,r.useState)(!1),ae=le[0],ce=le[1],se=(0,r.useState)([]),de=se[0],pe=se[1],ue=(0,r.useState)([]),he=ue[0],fe=ue[1],ve=(0,r.useState)({}),me=ve[0],xe=ve[1],ge=(0,r.useState)(null),be=ge[0],ye=ge[1],Ce=(0,r.useState)({})[0],we=(0,r.useState)(!1),je=we[0],ke=we[1],Se=(0,r.useState)(""),Oe=Se[0],Fe=Se[1],Ne=(0,r.useState)(!1),ze=Ne[0],Ee=Ne[1],Te=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==W&&pe(S?(0,x.DeepClone)(W||[]):""===W?[]:[W])}),[W,S]),(0,r.useEffect)((function(){if(G&&"outside"===$)return Ee(!!S);Ee(_)}),[_,G,$,S]),(0,r.useEffect)((function(){for(var e={},t=0,o=P.length;t<o;t++){var i=P[t];if(i[H]&&i[H].length>0)for(var r=i[H],n=0,l=r.length;n<l;n++){var a=r[n];e[a[I]]=a}else e[i[I]]=i}xe(e)}),[P]),(0,r.useEffect)((function(){S&&(ze||ye(de.length))}),[ze,S,de]),(0,r.useEffect)((function(){return ze?ye(de.length):(setTimeout((function(){Ae(de.length)})),window.addEventListener("resize",De)),function(){window.removeEventListener("resize",De)}}),[de,ze]),(0,r.useEffect)((function(){de&&de.length>0?ce(!0):(ce(!1),G&&"outside"===$&&ce(""!==Oe))}),[G,Oe,$,de]),(0,r.useEffect)((function(){clearTimeout(Ce.searchTimer),G&&""!==Oe.trim()?Ce.searchTimer=setTimeout((function(){for(var e=[],t=(0,x.DeepClone)(P),o=0,i=t.length;o<i;o++){var r=t[o];if(r[H]&&r[H].length>0){for(var n=r[H],l=[],a=0,c=n.length;a<c;a++){var s=n[a];Me(s)&&l.push(s)}l.length>0&&(r[H]=l,e.push(r))}else{Me(r)&&e.push(r)}}fe(e)}),100):fe((0,x.DeepClone)(P))}),[G,Oe,P]),(0,r.useEffect)((function(){return re?setTimeout((function(){qe(),window.addEventListener("click",Pe),window.addEventListener("keydown",$e)})):(Fe(""),window.removeEventListener("click",Pe),window.removeEventListener("keydown",$e)),function(){window.removeEventListener("click",Pe),window.removeEventListener("keydown",$e)}}),[re]),(0,r.useEffect)((function(){Oe&&ne(!0)}),[Oe]),(0,r.useEffect)((function(){S&&"outside"===$&&!0!==j&&Ue(Oe)}),[Oe,S,j,$]);var Be,qe=function(){var e=Te&&Te.current,t=e&&e.querySelector("input");t&&t.focus()},Le=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Pe=function(e){Le(e.target,"."+oe)||ne(!1)},Me=function(e){var t=!1;return-1!==e[A].indexOf(Oe)&&(t=!0),t},Ae=function(e){if(null!==e&&0!==e){void 0===e&&(e=de.length);var t=document.querySelector("."+te+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;ye(o),Ae(o)}else de.length<=e&&We()}},De=function(){clearTimeout(Ce.timer),Ce.timer=setTimeout((function(){ye(de.length),Ae()}),100)},Ie=function(){!0!==j&&ne(!0)},Re=function(){ne(!1)},He=function(e){ke(!0),ne(!1),e.stopPropagation()},We=function(){ke(!1)},Ze=function(e,t){return function(o){var i=e[I];if("object"!=typeof j||-1===j.indexOf(i))if(S){var r=de.indexOf(i);-1!==r?de.splice(r,1):de.push(i),Z&&Z(b([],de,!0),o),t&&X&&X(b([],de,!0)),qe()}else Z&&Z(i,o),t&&X&&X(i),Re(),Fe("")}},Ve=function(e,t){return function(o){var i;e||((i={})[I]=t,e=i),Ze(e)(o),o.stopPropagation()}},_e=function(e){Fe(e.target.value)},Ue=function(e){var t=Te&&Te.current,o=t&&t.querySelector("input");if(!o)return null;var i=window.getComputedStyle(o),r=i.fontFamily,n=function(e,t,o){var i=document.createElement("span");i.id="referenceSpan";var r={};r.width=i.offsetWidth,r.height=i.offsetHeight,i.style.visibility="hidden",i.style.fontSize=e,i.style.fontFamily=t,i.style.display="inline-block";var n=document.getElementById("referenceSpan");return n&&document.body.removeChild(n),document.body.appendChild(i),void 0!==i.textContent?i.textContent=o:i.innerText=o,r.width=parseFloat(window.getComputedStyle(i).width)-r.width,r.height=parseFloat(window.getComputedStyle(i).height)-r.height,document.body.removeChild(i),r}(i.fontSize,r,e),l=n.width;l<10&&(l=10),t.style.width=l+"px"},Ge=function(e){var t=e.selectDom,o=e.keyCode,i=e.currentKeydownDom,r=null,n="nextSibling",l=".select-popover-list > div",a=".select-popover-list-item";if(38===o&&(n="previousSibling",l=".select-popover-list > div:last-child",a=".select-popover-list-item:last-child"),i)if(r=i[n])-1!==r.className.indexOf("select-popover-list-group-label")&&((r=(r=i.parentNode)[n])||(r=t.querySelector(l)));else{var c=i.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(r=(r=i.parentNode)[n])||(r=t.querySelector(l))}else r=t.querySelector(l);if(r)if(-1!==r.className.indexOf("select-popover-list-group")){var s=r.querySelector(a);s&&(s.classList.add("select-popover-list-item-keydown"),Ke(s,t))}else r.classList.add("select-popover-list-item-keydown"),Ke(r,t)},Ke=function(e,t){clearTimeout(Ce.scrollTimer);var o=t.clientHeight,i=e.offsetTop+e.clientHeight-o;Ce.scroll=!0,t.scrollTop=i>0?i:0,Ce.scrollTimer=setTimeout((function(){Ce.scroll=!1}),100)},$e=function(e){var t=document.querySelector("."+oe);if(t){var o=t.querySelector(".select-popover-list-item-select"),i=t.querySelector(".select-popover-list-item-hover"),r=t.querySelector(".select-popover-list-item-keydown"),n=o;if(i&&(n=i),13===e.keyCode){var l=r||i;if(l){var a=l.dataset.val;Ze(me[a],!0)({target:r})}else X&&X(W)}r&&(n=r,r.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Ge({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n}),38===e.keyCode&&Ge({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n})}},Ye=function(e){if(!Ce.scroll){var t=Le(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+oe).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Je=function(e){var t=Le(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Xe=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:"outside"===d&&(0,i.jsxs)("label",g({className:"select-label"},{children:[y,z&&(0,i.jsx)("span",g({className:"identification-label"},{children:E||(0,i.jsx)(i.Fragment,{children:F?"(必填)":""},void 0)}),void 0)]}),void 0)},void 0)}),[d,y,z,E,F]),Qe=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:!ae&&(0,i.jsx)("span",g({className:"select-label-placeholder"},{children:"outside"===d?v:(0,i.jsxs)(i.Fragment,{children:[y||v,z&&(0,i.jsx)("span",g({className:"identification-label"},{children:E||(0,i.jsx)(i.Fragment,{children:F?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)},void 0)}),[ae,d,v,y,z,E,F]),et=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:!S&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",g({className:"radio-select-content"},{children:function(){if(""!==Oe)return null;var e=me[de[0]]&&me[de[0]][A]||de[0];return ze?e:(0,i.jsx)(f.default,{children:e},void 0)}()}),void 0),G&&"outside"===$&&!0!==j&&(0,i.jsx)(n.TextField,{variant:"outlined",className:"radio-search-outside",value:Oe,onChange:_e,ref:Te},void 0)]},void 0)},void 0)}),[S,ae,ze,me,de,A,G,$,Oe,j]),tt=(0,r.useMemo)((function(){var e=function(e){return me[de[e]]&&me[de[e]][A]||de[e]};return(0,i.jsx)(i.Fragment,{children:S&&(0,i.jsxs)("div",g({className:"check-select-content"},{children:[de&&de.map((function(t,o){if(null!==be&&be<=o)return null;var r=!0;return(!0===j||"object"==typeof j&&-1!==j.indexOf(de[o]))&&(r=!1),(0,i.jsxs)("div",g({className:r?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,i.jsx)("span",{children:e(o)},void 0),r&&(0,i.jsx)(h(),{onClick:Ve(me[de[o]],de[o])},void 0)]}),o)})),function(){if(null!==be&&de.length>be)return(0,i.jsx)("div",g({className:"check-select-content-item check-select-content-item-more",onClick:He},{children:(0,i.jsxs)("span",{children:["+",de.length-be]},void 0)}),void 0)}(),G&&"outside"===$&&!0!==j&&(0,i.jsx)(n.TextField,{variant:"outlined",className:"check-search-outside",value:Oe,onChange:_e,ref:Te},void 0)]}),void 0)},void 0)}),[S,ae,de,be,me,j,Z,Oe,G,$]),ot=(0,r.useMemo)((function(){return(0,i.jsxs)("div",g({className:"select-content",onClick:Ie,ref:ee},{children:[Qe,(0,i.jsx)("span",g({className:"select-svg"},{children:(0,i.jsx)(a(),{},void 0)}),void 0),et,tt]}),void 0)}),[ee,ae,d,v,y,z,E,F,ze,me,de,A,S,be,j,Z,Oe,$]),it=(0,r.useMemo)((function(){return(0,i.jsx)("div",g({className:"select-popover-list"},{children:he&&he.length>0?(0,i.jsx)(i.Fragment,{children:he.map((function(e,t){if(e[H]&&e[H].length>0){var o=e[H];return(0,i.jsxs)("div",g({className:"select-popover-list-group"},{children:[(0,i.jsx)("span",g({className:"select-popover-list-group-label"},{children:e[A]}),void 0),o.map((function(e,t){var o=e[I],r="select-popover-list-item";return-1!==de.indexOf(o)&&(r+=" select-popover-list-item-select"),"object"==typeof j&&-1!==j.indexOf(o)&&(r+=" select-popover-list-item-disabled"),(0,i.jsxs)("div",g({onClick:Ze(e),className:r,onMouseEnter:Ye,onMouseLeave:Je,"data-val":o},{children:[(0,i.jsx)("span",g({className:"select-popover-list-item-label"},{children:(0,i.jsx)(f.default,{children:e[A]},void 0)}),void 0),(0,i.jsx)("span",g({className:"select-popover-list-item-svg"},{children:(0,i.jsx)(p(),{},void 0)}),void 0)]}),t)}))]}),t)}var r=e[I],n="select-popover-list-item";return-1!==de.indexOf(r)&&(n+=" select-popover-list-item-select"),"object"==typeof j&&-1!==j.indexOf(r)&&(n+=" select-popover-list-item-disabled"),(0,i.jsxs)("div",g({onClick:Ze(e),className:n,onMouseEnter:Ye,onMouseLeave:Je,"data-val":r},{children:[(0,i.jsx)("span",g({className:"select-popover-list-item-label"},{children:(0,i.jsx)(f.default,{children:e[A]},void 0)}),void 0),(0,i.jsx)("span",g({className:"select-popover-list-item-svg"},{children:(0,i.jsx)(p(),{},void 0)}),void 0)]}),t)}))},void 0):(0,i.jsx)("div",g({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[he,A,I,de,Z]),rt=(0,r.useMemo)((function(){var e="select-popover-content "+oe;return(0,i.jsxs)("div",g({style:{width:(ee&&ee.current?ee.current.offsetWidth:0)+"px"},className:e},{children:[G&&"inside"===$&&(0,i.jsxs)("div",g({className:"select-popover-search"},{children:[(0,i.jsx)(n.TextField,{variant:"outlined",placeholder:"请输入搜索名",value:Oe,onChange:_e,ref:Te},void 0),(0,i.jsx)(s(),{},void 0)]}),void 0),it]}),void 0)}),[re,ee,he,H,I,A,de,Oe,G,oe,$]),nt=(0,r.useMemo)((function(){var e,t=function(e){return me[de[e]]&&me[de[e]][A]||de[e]};return(0,i.jsx)(n.Popover,g({open:je,anchorEl:ee&&ee.current,onClose:We,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(e=Q["select-more-popover"],J&&(e+=" "+J),e)},{children:(0,i.jsxs)("div",g({className:"select-more"},{children:[(0,i.jsxs)("div",g({className:"select-more-title"},{children:[(0,i.jsx)("span",{children:"已选中"},void 0),(0,i.jsx)("span",{children:de.length-Number(be)},void 0)]}),void 0),(0,i.jsx)("div",g({className:"select-more-content"},{children:de&&de.map((function(e,o){if(null!==be&&be>o)return null;var r=!0;return(!0===j||"object"==typeof j&&-1!==j.indexOf(de[o]))&&(r=!1),(0,i.jsxs)("div",g({className:"select-more-content-item"},{children:[(0,i.jsx)("span",{children:(0,i.jsx)(f.default,{children:t(o)},void 0)},void 0),r&&(0,i.jsx)(h(),{onClick:Ve(me[de[o]],de[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[je,de,be,me,j,A,J]);return(0,i.jsxs)("div",g({className:(Be=Q.select,Be+=" select",S&&!ze&&(Be+=" "+te),t&&(Be+=" "+t),l&&(Be+=" select-"+l),B&&(Be+=" select-error"),!0===j&&(Be+=" select-disabled"),re&&(Be+=" select-open"),S&&(Be+=" select-multiple"),ze&&(Be+=" select-over-line"),Be)},{children:[Xe,(0,i.jsx)(n.Tooltip,g({open:re,title:rt,onClose:Re,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e=Q["select-popover"];return Y&&(e+=" "+Y),e}()},placement:"bottom-start"},{children:ot}),void 0),L&&(0,i.jsx)("p",g({className:"select-error-text"},{children:L}),void 0),nt]}),void 0)}},5962:function(e,t,o){var i=o(7712),r=o(1731),n=o(8604),l=o(5415),a=o(4927),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},d=(0,l.Z)(),p=(0,n.withStyles)((function(e){return(0,n.createStyles)({root:{width:"auto",height:"20px",padding:0,alignItems:"center"},switchBase:{top:"50%",transform:"translateY(-50%)",padding:0,color:d.bgBorderColor.bg4,"&$checked":{transform:"translate(14px,-50%)",color:d.thmemColor.primary},"&$checked + $track":{backgroundColor:d.thmemColor.thirdary,opacity:1}},checked:{},thumb:{width:18,height:18},track:{width:32,height:14,borderRadius:7,backgroundColor:d.bgBorderColor.bg1,opacity:1}})}),{name:"SwitchCompact"})(r.Switch),u=(0,n.withStyles)((function(e){return(0,n.createStyles)({root:{width:"auto",height:"auto",padding:0},switchBase:{padding:2,color:d.textColor.white,"&$checked":{transform:"translateX(14px)",color:d.textColor.white,"& + $track":{backgroundColor:d.thmemColor.primary,opacity:1}}},thumb:{width:14,height:14},track:{width:32,height:18,borderRadius:9,backgroundColor:d.bgBorderColor.bg4,opacity:1},checked:{}})}),{name:"SwitchNormal"})(r.Switch),h=(0,n.makeStyles)((function(){return(0,n.createStyles)({smallThumb:function(e){return"compact"===e.type?{width:16,height:16,borderRadius:8}:{width:12,height:12,borderRadius:6}},smallTrack:function(e){return"compact"===e.type?{width:30,height:12,borderRadius:6}:{width:30,height:16,borderRadius:8}},largeThumb:function(e){return"compact"===e.type?{width:20,height:20,borderRadius:10}:{width:16,height:16,borderRadius:8}},largeTrack:function(e){return"compact"===e.type?{width:34,height:16,borderRadius:8}:{width:34,height:20,borderRadius:10}},compactLargeRoot:{height:22}})}));t.default=function(e){var t=e.type,o=void 0===t?"normal":t,r=e.size,n=void 0===r?"medium":r,l=e.className,d=s(e,["type","size","className"]),f=h({type:o});return(0,i.jsx)(i.Fragment,{children:function(){if("compact"===o){var e="medium"===n?{}:{thumb:f["".concat(n,"Thumb")],track:f["".concat(n,"Track")]};return(0,i.jsx)(p,c({},d,{classes:e,className:(0,a.Z)("paraui-switch",l,"large"===n&&f.compactLargeRoot)}),void 0)}var t="medium"===n?{}:{thumb:f["".concat(n,"Thumb")],track:f["".concat(n,"Track")]};return(0,i.jsx)(u,c({},d,{classes:t,className:(0,a.Z)("paraui-switch",l)}),void 0)}()},void 0)}},3672:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(3094),a=o(8528),c=o.n(a),s=o(6570),d=o.n(s),p=o(1102),u=o.n(p),h=o(8604),f=o(5415),v=o(3475),m=function(){return m=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},m.apply(this,arguments)},x=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},g=(0,f.Z)(),b=(0,h.makeStyles)((function(){return(0,h.createStyles)({"@keyframes rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"text-field":{fontFamily:g.fontFamily.zh,display:"inline-block",fontSize:g.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& fieldset":{border:0},"& .text-field-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"& .text-field-label":{color:g.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& .text-field-content":{border:"1px solid",borderColor:g.textColor.thirdary,borderRadius:g.borderRadius,position:"relative",display:"table",width:"100%",boxSizing:"border-box","&:hover":{borderColor:g.thmemColor.primary},"& > div":{display:"table-cell",height:"100%",verticalAlign:"top"},"& .text-field-content-before":{color:g.textColor.primary,padding:"0 10px",borderRight:"1px solid "+g.textColor.thirdary,backgroundColor:g.bgBorderColor.bg2,borderBottomLeftRadius:g.borderRadius,borderTopLeftRadius:g.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}},"& .text-field-content-within":{position:"relative",width:"100%","& > *":{display:"table-cell",verticalAlign:"top"},"& svg":{fontSize:"20px",color:g.textColor.secondary,cursor:"pointer"},"& .right-icon":{zIndex:"1",position:"relative",whiteSpace:"nowrap","& > svg":{marginRight:"10px"}},"& .length-limit":{zIndex:"1",position:"relative",paddingRight:"10px",color:g.textColor.secondary},"& .text-field-content-within-input":{width:"100vw","& > div":{width:"100%"},"& input":{height:"100%"},"& input,textarea":{fontSize:g.standardFont.standardFont1.fontSize,color:g.textColor.primary,"&:-ms-clear":{display:"none"},"&:-ms-reveal":{display:"none"}},"& .text-field-label-placeholder":{width:"100%",position:"absolute",left:"0",height:"100%",padding:"0 10px",boxSizing:"border-box",color:g.textColor.thirdary,cursor:"text",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},"& .text-field-content-after":{color:g.textColor.primary,padding:"0 10px",borderLeft:"1px solid",borderColor:g.textColor.thirdary,backgroundColor:g.bgBorderColor.bg2,borderBottomRightRadius:g.borderRadius,borderTopRightRadius:g.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}}},"& .identification-label":{marginLeft:"3px"},"&.text-field-multiline":{"& .text-field-content":{"& .text-field-content-within":{"& > *":{display:"inline-block"},"& .length-limit":{width:"100%",boxSizing:"border-box",textAlign:"right",paddingBottom:"5px"},"& .text-field-content-within-input":{width:"100%","& > div:first-child":{width:"100%","& > div:first-child":{padding:"10px"}},"& .text-field-label-placeholder":{paddingTop:"10px"}}}}},"&.text-field-disabled":{"& .text-field-content":{backgroundColor:g.bgBorderColor.bg3,"&:hover":{borderColor:g.textColor.thirdary},"& .text-field-content-within":{"& .text-field-content-within-input":{"& .text-field-label-placeholder":{cursor:"not-allowed"},"& input":{cursor:"not-allowed",color:g.textColor.thirdary}}}}},"&.text-field-error":{"& .text-field-error-text":{color:g.stateColor.error},"& .text-field-content":{borderColor:g.stateColor.error,"&:hover":{borderColor:g.stateColor.error},"& .text-field-content-before":{borderColor:g.stateColor.error},"& .text-field-content-after":{borderColor:g.stateColor.error}}},"&.text-field-focus":{"& .text-field-content":{borderColor:g.thmemColor.primary,"& .text-field-content-before":{borderColor:g.thmemColor.primary},"& .text-field-content-after":{borderColor:g.thmemColor.primary}}},"&.text-field-small":{"& .text-field-content":{height:"28px","& .text-field-content-before":{lineHeight:"26px","& svg":{top:"3px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"26px","& > div":{height:"100%"}}},"& input":{padding:"5px 10px"},"& .text-field-label-placeholder":{lineHeight:"26px"},"& .right-icon":{paddingTop:"3px"},"& .length-limit":{lineHeight:"26px"}},"& .text-field-content-after":{lineHeight:"26px","& svg":{top:"3px"}}}},"&.text-field-medium":{"& .text-field-content":{height:"34px","& .text-field-content-before":{lineHeight:"32px","& svg":{top:"6px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"32px","& > div":{height:"100%"}}},"& input":{padding:"8px 10px"},"& .text-field-label-placeholder":{lineHeight:"32px"},"& .right-icon":{paddingTop:"7px"},"& .length-limit":{lineHeight:"32px","& svg":{top:"6px"}}},"& .text-field-content-after":{lineHeight:"32px","& svg":{top:"6px"}}}},"&.text-field-large":{"& .text-field-content":{height:"40px","& .text-field-content-before":{lineHeight:"38px","& svg":{top:"9px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"38px","& > div":{height:"100%"}}},"& input":{padding:"11px 10px"},"& .text-field-label-placeholder":{lineHeight:"38px"},"& .right-icon":{paddingTop:"10px"},"& .length-limit":{lineHeight:"38px"}},"& .text-field-content-after":{lineHeight:"38px","& svg":{top:"9px"}}}}},"text-field-select":{"& > div":{maxWidth:"none",padding:"0",backgroundColor:g.textColor.white,boxShadow:g.boxShadow,borderRadius:g.borderRadius,"& > span":{color:g.textColor.white},"& .text-field-select-content":{maxHeight:"300px",overflow:"auto","& > .text-field-select-content-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px",color:g.textColor.secondary,"&:hover":{backgroundColor:g.bgBorderColor.bg2,color:g.thmemColor.primary},"&.text-field-select-content-item-keydown":{backgroundColor:g.bgBorderColor.bg2,color:g.thmemColor.primary}},"&.text-field-select-content-loading":{height:"100px",position:"relative",overflow:"hidden","& > .loading-box":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",backgroundColor:"white",display:"flex",justifyContent:"center",alignItems:"center","& > svg":{transition:"all .3s ease-in-out",animation:"$rotate 1s infinite linear",fontSzie:"20px"}}}}}}})}));t.default=function(e){var t=e.className,o=e.size,a=void 0===o?"small":o,s=e.labelMode,p=void 0===s?"outside":s,h=e.placeholder,f=void 0===h?"":h,g=e.label,y=void 0===g?"":g,C=e.disabled,w=void 0!==C&&C,j=e.multiline,k=void 0!==j&&j,S=e.required,O=void 0!==S&&S,F=e.showLabelSign,N=void 0===F||F,z=e.labelSign,E=e.rows,T=void 0===E?2:E,B=e.error,q=void 0!==B&&B,L=e.helperText,P=void 0===L?"":L,M=e.addonBefore,A=void 0===M?"":M,D=e.addonAfter,I=void 0===D?"":D,R=e.value,H=e.controlled,W=void 0!==H&&H,Z=e.autoFocus,V=void 0!==Z&&Z,_=e.type,U=void 0===_?"text":_,G=e.onClickIcon,K=e.rightIcon,$=e.showRightIcon,Y=void 0===$||$,J=e.limitLength,X=e.fetchSuggestions,Q=e.selectPopoverClass,ee=e.renderSelectItem,te=e.showSelectName,oe=void 0===te?"value":te,ie=e.onBlur,re=e.onFocus,ne=e.onChange,le=e.onKeydown,ae=e.onKeyUp,ce=e.onEnter,se=e.onClickAddonBefore,de=e.onClickAddonAfter,pe=e.onSelect,ue=x(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","showLabelSign","labelSign","rows","error","helperText","addonBefore","addonAfter","value","controlled","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),he=b(e),fe=(0,r.useState)("text-field-select-content-"+(0,v.UUID)())[0],ve=(0,r.useState)(!0),me=ve[0],xe=ve[1],ge=(0,r.useState)(),be=ge[0],ye=ge[1],Ce=(0,r.useState)(!1),we=Ce[0],je=Ce[1],ke=(0,r.useState)(0),Se=ke[0],Oe=ke[1],Fe=(0,r.useState)("text"),Ne=Fe[0],ze=Fe[1],Ee=(0,r.useState)(!1),Te=Ee[0],Be=Ee[1],qe=(0,r.useState)(!1),Le=qe[0],Pe=qe[1],Me=(0,r.useState)([]),Ae=Me[0],De=Me[1],Ie=((0,r.useState)({})[0],(0,r.useRef)(null)),Re=(0,r.useRef)(null),He=(0,r.useRef)(null);(0,r.useEffect)((function(){Ie&&Ie.current&&Oe(Ie.current.offsetWidth)}),[]),(0,r.useEffect)((function(){U!==Ne&&ze(U)}),[U]),(0,r.useEffect)((function(){ye(R)}),[R]),(0,r.useEffect)((function(){xe(""===be||void 0===be)}),[be]),(0,r.useEffect)((function(){X&&Be(we)}),[we,X]),(0,r.useEffect)((function(){return Te?window.addEventListener("keydown",Ue):window.removeEventListener("keydown",Ue),function(){window.removeEventListener("keydown",Ue)}}),[Te]);var We,Ze=function(){w||(xe(!1),(Re&&Re.current&&Re.current.querySelector(k?"textarea":"input")).focus())},Ve=function(e){var t=e.selectDom,o=e.keyCode,i=e.currentDom,r="nextSibling",n=".text-field-select-content-item";38===o&&(r="previousSibling",n=".text-field-select-content-item:last-child"),i?(i=i[r])||(i=t.querySelector(n)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),_e(i,t))},_e=function(e,t){var o=t.clientHeight,i=e.offsetTop+e.clientHeight-o;t.scrollTop=i>0?i:0},Ue=function(e){var t=document.querySelector("."+fe),o=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var r=i.dataset.val;tt(JSON.parse(r))(e),(Re&&Re.current&&Re.current.querySelector(k?"textarea":"input")).blur()}i&&(o=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&Ve({selectDom:t,keyCode:e.keyCode,currentDom:o}),38===e.keyCode&&Ve({selectDom:t,keyCode:e.keyCode,currentDom:o})},Ge=function(e){je(!1),""===e.target.value&&xe(!0),ie&&ie(e)},Ke=function(e){Pe(!0),X&&X(e,(function(e){De(e||[]),Pe(!1)}))},$e=function(e){je(!0),re&&re(e),Ke(e.target.value)},Ye=function(e){var t=e.target.value;J&&void 0!==t&&""!==t&&t.toString().length>J||(W||ye(t),ne&&ne(e),Ke(e.target.value))},Je=function(e){13===e.keyCode&&ce&&ce(e),le&&le(e)},Xe=function(e){ae&&ae(e)},Qe=function(e){"password"===U&&("text"===Ne&&ze("password"),"password"===Ne&&ze("text")),G&&G(e)},et=function(){Be(!1)},tt=function(e){return function(t){pe&&pe(e)}},ot=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==J&&(0,i.jsx)("span",m({className:"length-limit"},{children:(be?be.toString().length:0)+"/"+J}),void 0)},void 0)}),[J,be]),it=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:Y&&(0,i.jsx)("span",m({className:"right-icon",onClick:Qe},{children:K||("password"===U?"password"===Ne?(0,i.jsx)(d(),{},void 0):(0,i.jsx)(c(),{},void 0):null)}),void 0)},void 0)}),[Y,K,U,Ne]),rt=(0,r.useMemo)((function(){return(0,i.jsxs)("div",m({className:"text-field-content-within",ref:He},{children:[(0,i.jsxs)("div",m({className:"text-field-content-within-input"},{children:[(0,i.jsx)(n.TextField,m({size:"small",variant:"outlined",autoFocus:V,ref:Re,type:Ne,value:be||"",disabled:w,multiline:k,rows:T,onBlur:Ge,onFocus:$e,onChange:Ye,onKeyDown:Je,onKeyUp:Xe},ue),void 0),me&&(0,i.jsx)("span",m({className:"text-field-label-placeholder",onClick:Ze},{children:"outside"===p?f:(0,i.jsxs)(i.Fragment,{children:[y||f,N&&(0,i.jsx)("span",m({className:"identification-label"},{children:z||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)]}),void 0),ot,it]}),void 0)}),[me,V,Ne,be,ot,it,p,f,y,w,k,T,ue,ne,X]),nt=(0,r.useMemo)((function(){var e;return(0,i.jsxs)("div",m({className:(e="text-field-select-content",Le&&(e+=" text-field-select-content-loading"),fe&&(e+=" "+fe),e),style:{width:(He&&He.current?He.current.offsetWidth:0)+"px"}},{children:[Ae&&Ae.map((function(e,t){return(0,i.jsx)("div",m({className:"text-field-select-content-item",onMouseDown:tt(e),"data-val":JSON.stringify(e)},{children:ee?ee(e):(0,i.jsx)(l.default,{children:e[oe]},void 0)}),t)})),Le&&(0,i.jsx)("div",m({className:"loading-box"},{children:(0,i.jsx)(u(),{},void 0)}),void 0)]}),void 0)}),[He,Te,Ae,ee,oe,pe,Le,fe]),lt=(0,r.useMemo)((function(){return(0,i.jsx)(n.Tooltip,m({open:Te,title:nt,onClose:et,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e=he["text-field-select"],Q&&(e+=" "+Q),e)}},{children:rt}),void 0);var e}),[me,V,Ne,be,ot,it,p,f,y,w,k,T,ue,ne,X,pe,He,Te,Q]),at=(0,r.useMemo)((function(){var e=Boolean(N&&(z||O));if("outside"===p&&(y||e))return(0,i.jsxs)("label",m({className:"text-field-label"},{children:[y,N&&(0,i.jsx)("span",m({className:"identification-label"},{children:z||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]}),void 0)}),[p,y,N,z,O]);return(0,i.jsxs)("div",m({className:(We=he["text-field"],We+=" text-field",a&&!k&&(We+=" text-field-"+a),t&&(We+=" "+t),q&&(We+=" text-field-error"),we&&(We+=" text-field-focus"),w&&(We+=" text-field-disabled"),k&&(We+=" text-field-multiline"),We)},{children:[at,(0,i.jsxs)("div",m({className:"text-field-content"},{children:[A&&(0,i.jsx)("div",m({className:"text-field-content-before",ref:Ie,onClick:function(e){se&&se(e)}},{children:A}),void 0),X?lt:rt,I&&(0,i.jsx)("div",m({className:"text-field-content-after",onClick:function(e){de&&de(e)}},{children:I}),void 0)]}),void 0),P&&(0,i.jsx)("p",m({className:"text-field-error-text",style:{marginLeft:Se+"px"}},{children:P}),void 0)]}),void 0)}},1731:function(e){e.exports=i},8604:function(e){e.exports=o},6110:function(e){e.exports=d},19:function(e){e.exports=p},6243:function(e){e.exports=u},6028:function(e){e.exports=c},9973:function(e){e.exports=h},1102:function(e){e.exports=l},6570:function(e){e.exports=n},8528:function(e){e.exports=r},4115:function(e){e.exports=s},6897:function(e){e.exports=t},3475:function(e){e.exports=a},9297:function(t){t.exports=e}},v={};function m(e){var t=v[e];if(void 0!==t)return t.exports;var o=v[e]={exports:{}};return f[e](o,o.exports,m),o.exports}m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var o in t)m.o(t,o)&&!m.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};return function(){m.r(x);var e=m(7712),t=m(9297),o=m.n(t),i=m(7178),r=m(3053),n=function(){return n=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},l=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};x.default=function(t){var a=t.FormProps,c=t.configList,s=t.type,d=t.getCheckForm,p=t.backData,u=void 0===p?{}:p,h=t.disabled,f=t.onChange,v=t.getForcedRefresh,m=t.form,x=o().useState(c),g=x[0],b=x[1],y=o().useRef({allItems:{},itemsCheckStatus:{},itemsCheckMessage:{},allValues:u}),C=function(e,t){if(t)for(var o in t)y.current.allValues[o]=t[o];b(e||g&&l([],g,!0))},w=function(e,t,o){switch(t){case"status":y.current.itemsCheckStatus[e]=o;break;case"message":y.current.itemsCheckMessage[e]=o;break;case"item":y.current.allItems[e]=o;break;case"initValue":y.current.allValues[e]=o;break;default:y.current.allValues[e]=o,f&&f(e,o)}},j=function(){var e=0;for(var t in y.current.allItems){var o=y.current.allItems[t];if(!o.disabled&&!o.hide&&!0!==y.current.itemsCheckStatus[t])if(!1!==y.current.itemsCheckStatus[t]){var i=(0,r.Z)(o,y.current.allValues[t]);i&&(e++,"string"==typeof i&&(y.current.itemsCheckMessage[t]=i),o.setErrorMsg&&o.setErrorMsg(i))}else e++}return console.log("checkFrom",e),!e&&y.current.allValues};return o().useEffect((function(){d&&d(j),v&&v(C)}),[d,v]),o().useEffect((function(){for(var e in u)y.current.allValues[e]=u[e]}),[u]),o().useEffect((function(){b(c)}),[c]),o().useEffect((function(){m&&(m.current={get refreshForm(){return C},get check(){return j},get items(){return y.current.allItems},get values(){return y.current.allValues},get refData(){return y.current}})}),[m]),(0,e.jsx)("form",n({},a,{children:(0,e.jsx)("div",n({className:"para-form-content"},{children:g&&g.length>0&&g.map((function(t,o){return t.hide&&w(t.name,"item",t),!t.hide&&(0,e.jsx)(i.default,n({type:s,disabled:h,errorMessage:y.current.itemsCheckMessage[t.name]},t,{backData:y.current.allValues,setValue:w}),"para-form-item-".concat(o))}))}),void 0)}),void 0)}}(),x}()}));
|
|
16
|
+
o(4126);var i=o(9297),r=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;r=n("react.element"),t.Fragment=n("react.fragment")}var l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,o){var i,n={},s=null,d=null;for(i in void 0!==o&&(s=""+o),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,i)&&!c.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:r,type:e,key:s,ref:d,props:n,_owner:l.current}}t.jsx=s,t.jsxs=s},7712:function(e,t,o){e.exports=o(9524)},3094:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s=((0,a.Z)(),(0,l.makeStyles)((function(e){return(0,l.createStyles)({"auto-tips":{maxWidth:"100%",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > .auto-tips-content":{display:"inline",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})})));t.default=function(e){var t=e.children,o=e.placement,l=void 0===o?"bottom-start":o,a=e.tips,d=void 0===a?"":a,p=e.className,u=void 0===p?"":p,h=(0,r.useRef)(),f=s(),v=(0,r.useState)(""),m=v[0],x=v[1];(0,r.useEffect)((function(){x(d)}),[d]);var g;return(0,i.jsx)("div",c({ref:function(e){e&&(h.current=e)},className:(g=f["auto-tips"],g+=" paraui-auto-tips",u&&(g+=" "+u),g),onMouseOver:function(){h.current.scrollWidth>h.current.offsetWidth?x(m||h.current.innerText):x("")}},{children:(0,i.jsx)(n.Tooltip,c({title:m,placement:l},{children:(0,i.jsx)("div",c({className:"auto-tips-content"},{children:t}),void 0)}),void 0)}),void 0)}},36:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(4927),c=o(1102),s=o.n(c),d=o(5415),p=function(){return p=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},p.apply(this,arguments)},u=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},h=(0,d.Z)(),f=(0,l.makeStyles)((function(e){return(0,l.createStyles)({"@keyframes loadingCircle":{"100%":{transform:"rotate(1turn)"}},radius:{borderRadius:15},btnIcon:{"& .btn-icon":{display:"inline-flex",alignItems:"center"},"& .btn-icon svg":{color:"currentColor"}},outlinedBtn:{"& .btn-icon svg":{color:h.thmemColor.primary},"&:disabled":{"& .btn-icon svg":{color:"currentColor"}}},iconButtonToolTip:{display:"inline-block",cursor:"not-allowed","& .iconButton-disabled":{cursor:"not-allowed",pointerEvents:"none"}},loadingBtn:{position:"relative",pointerEvents:"none","&:before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:1,transition:"opacity .2s",pointerEvents:"none"},"& .loading-icon":{animation:"$loadingCircle 1s infinite linear"}}})})),v=(0,l.withStyles)((function(e){return{tooltip:{margin:"6px 0",backgroundColor:h.bgBorderColor.bg4}}}))(n.Tooltip),m=function(e){var t=f(),o=e.radius,l=e.className,c=e.disabled,d=void 0!==c&&c,h=e.children,v=e.startIcon,m=e.endIcon,x=e.loading,g=void 0!==x&&x,b=u(e,["radius","className","disabled","children","startIcon","endIcon","loading"]);"text"===b.variant&&(b.disableRipple=!0);var y=(0,r.useState)(!1),C=y[0],w=y[1];return(0,r.useEffect)((function(){w(!!g)}),[g]),(0,i.jsx)(n.Button,p({disabled:d,className:(0,a.Z)("paraui-button",l,t.btnIcon,o&&t.radius,"outlined"===b.variant&&t.outlinedBtn,C&&t.loadingBtn),startIcon:function(){if(!C)return(0,i.jsx)("span",p({className:"btn-icon"},{children:v}),void 0);if("object"==typeof g){var e=g.delay||0;setTimeout((function(){return w(!1)}),e)}return(0,i.jsx)("span",p({className:"btn-icon loading-icon"},{children:(0,i.jsx)(s(),{},void 0)}),void 0)}(),endIcon:(0,i.jsx)("span",p({className:"btn-icon"},{children:m}),void 0)},b,{children:h}),void 0)};m.IconButton=function(e){var t=f(),o=e.showToolTip,l=void 0===o||o,c=e.toolTipTitle,d=void 0===c?"":c,h=e.children,m=e.className,x=e.disabled,g=void 0!==x&&x,b=e.loading,y=void 0!==b&&b,C=e.TooltipProps,w=u(e,["showToolTip","toolTipTitle","children","className","disabled","loading","TooltipProps"]),j=(0,r.useState)(!1),k=j[0],S=j[1],O=(0,i.jsx)(n.IconButton,p({},w,{disabled:g,disableRipple:!0,className:(0,a.Z)("paraui-icon-button",m,l&&g&&"iconButton-disabled",k&&t.loadingBtn)},{children:function(){if(!k)return h;if("object"==typeof y){var e=y.delay||0;setTimeout((function(){return S(!1)}),e)}return(0,i.jsx)("span",p({className:"loading-icon"},{children:(0,i.jsx)(s(),{},void 0)}),void 0)}()}),void 0);return(0,r.useEffect)((function(){S(!!y)}),[y]),l?(0,i.jsx)(v,p({title:d},C,{children:(0,i.jsx)("span",p({className:(0,a.Z)(g&&t.iconButtonToolTip)},{children:O}),void 0)}),void 0):O},t.default=m},4726:function(e,t,o){o.d(t,{default:function(){return f}});var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s={icon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",fill:"#FFFFFF"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",fill:"currentColor",className:"fill-bg"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0)]}),void 0)},checkedIcon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M0 0m196.923077 0l630.153846 0q196.923077 0 196.923077 196.923077l0 630.153846q0 196.923077-196.923077 196.923077l-630.153846 0q-196.923077 0-196.923077-196.923077l0-630.153846q0-196.923077 196.923077-196.923077Z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M852.834462 284.356923a46.710154 46.710154 0 0 0-66.008616 0L430.710154 640.472615 237.331692 447.172923a46.710154 46.710154 0 0 0-66.087384 66.087385l226.382769 226.304a46.710154 46.710154 0 0 0 66.087385 0c0.472615-0.551385 0.708923-1.260308 1.181538-1.811693s1.260308-0.708923 1.811692-1.181538l385.969231-385.969231a46.710154 46.710154 0 0 0 0-66.244923z",fill:"#FFFFFF"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{className:"fill-bg",d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M852.834462 284.356923a46.710154 46.710154 0 0 0-66.008616 0L430.710154 640.472615 237.331692 447.172923a46.710154 46.710154 0 0 0-66.087384 66.087385l226.382769 226.304a46.710154 46.710154 0 0 0 66.087385 0c0.472615-0.551385 0.708923-1.260308 1.181538-1.811693s1.260308-0.708923 1.811692-1.181538l385.969231-385.969231a46.710154 46.710154 0 0 0 0-66.244923z",className:"char-path",fill:"currentColor"},void 0)]}),void 0)},indeterminateIcon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M0 0m196.923077 0l630.153846 0q196.923077 0 196.923077 196.923077l0 630.153846q0 196.923077-196.923077 196.923077l-630.153846 0q-196.923077 0-196.923077-196.923077l0-630.153846q0-196.923077 196.923077-196.923077Z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M785.171692 564.224h-546.422154a52.696615 52.696615 0 0 1 0-104.448h546.422154a52.696615 52.696615 0 0 1 0 104.448z",fill:"#FFFFFF"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M78.769231 78.769231m118.153846 0l630.153846 0q118.153846 0 118.153846 118.153846l0 630.153846q0 118.153846-118.153846 118.153846l-630.153846 0q-118.153846 0-118.153846-118.153846l0-630.153846q0-118.153846 118.153846-118.153846Z",className:"fill-bg",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M827.076923 0h-630.153846A196.923077 196.923077 0 0 0 0 196.923077v630.153846A196.923077 196.923077 0 0 0 196.923077 1024h630.153846a196.923077 196.923077 0 0 0 196.923077-196.923077v-630.153846A196.923077 196.923077 0 0 0 827.076923 0zM945.230769 827.076923a118.153846 118.153846 0 0 1-118.153846 118.153846h-630.153846A118.153846 118.153846 0 0 1 78.769231 827.076923v-630.153846A118.153846 118.153846 0 0 1 196.923077 78.769231h630.153846A118.153846 118.153846 0 0 1 945.230769 196.923077z",className:"line-rect",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M785.171692 564.224H238.749538a52.696615 52.696615 0 0 1 0-104.448h546.422154a52.696615 52.696615 0 0 1 0 104.448z",className:"char-path",fill:"currentColor"},void 0)]}),void 0)}},d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},p=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},u=(0,a.Z)(),h=(0,l.makeStyles)((function(){return(0,l.createStyles)({"check-box":{margin:"0","&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary,"& > .line-rect":{color:u.thmemColor.primary}}}},"& > span:last-child":{color:u.thmemColor.primary}},"& > span:first-child":{padding:"8px","& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.primary},"&.check-box-checked":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.check-box-indeterminate":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.check-box-disabled":{"&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.thirdary}},cursor:"not-allowed","& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.textColor.thirdary+" !important","& > .fill-bg":{color:u.bgBorderColor.bg1},"& > .char-path":{color:u.bgBorderColor.bg4}}}},"& > span:last-child":{color:u.textColor.secondary+" !important"}},"&.check-box-small":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"12px"}}},"& > span:last-child":{fontSize:"12px",lineHeight:"12px"}},"&.check-box-medium":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"14px"}}},"& > span:last-child":{fontSize:"14px",lineHeight:"14px"}},"&.check-box-large":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"16px"}}},"& > span:last-child":{fontSize:"16px",lineHeight:"16px"}}}})})),f=function(e){var t=e.className,o=void 0===t?"":t,l=e.color,a=void 0===l?"primary":l,c=e.size,u=void 0===c?"small":c,f=e.label,v=void 0===f?"":f,m=e.labelPlacement,x=void 0===m?"end":m,g=(e.checkedIcon,e.indeterminateIcon,e.icon,e.disabled),b=void 0!==g&&g,y=e.checked,C=void 0!==y&&y,w=e.indeterminate,j=void 0!==w&&w,k=e.onChange,S=p(e,["className","color","size","label","labelPlacement","checkedIcon","indeterminateIcon","icon","disabled","checked","indeterminate","onChange"]),O=h(e),F=(0,r.useState)(!1),N=F[0],z=F[1];(0,r.useEffect)((function(){C!==N&&z(C)}),[C]);var E,T=function(e){return b?s[e].iconDisabled:s[e].icon},B=function(t,o){void 0===e.checked&&void 0===e.indeterminate&&z(t.target.checked),k&&k(t,o)};return(0,i.jsx)(n.FormControlLabel,{className:(E=O["check-box"]+" paraui-check-box",o&&(E+=" "+o),u&&(E+=" check-box-"+u),b&&(E+=" check-box-disabled"),j?E+=" check-box-indeterminate":N&&(E+=" check-box-checked"),E),control:(0,i.jsx)(n.Checkbox,d({size:"small",color:a,disabled:b,icon:T("icon"),checkedIcon:T("checkedIcon"),indeterminateIcon:T("indeterminateIcon"),onChange:B,checked:N,indeterminate:j},S),void 0),label:v,labelPlacement:x},void 0)}},7661:function(e,t,o){var i=o(9297),r=o(7712),n=o(1731),l=o(4726),a=o(8604),c=o(5415),s=o(3475),d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},p=(0,c.Z)(),u=(0,a.makeStyles)((function(){return(0,a.createStyles)({"check-box-group":{"& > label":{fontSize:"12px",color:p.textColor.secondary,"& > .required-char":{marginLeft:"3px",color:p.thmemColor.primary}},"& > div":{margin:"5px 0"},"& > p":{fontSize:"12px",lineHeight:"12px",margin:"0",color:p.stateColor.error},"&.check-box-group-disabled":{},"&.check-box-group-small":{},"&.check-box-group-medium":{},"&.check-box-group-large":{}}})}));t.default=function(e){var t,o=e.label,a=void 0===o?"":o,c=e.size,p=void 0===c?"small":c,h=e.row,f=void 0===h||h,v=e.disabled,m=void 0!==v&&v,x=e.required,g=void 0!==x&&x,b=e.error,y=void 0!==b&&b,C=e.helperText,w=void 0===C?"":C,j=e.id,k=void 0===j?"name":j,S=e.value,O=void 0===S?[]:S,F=e.list,N=e.className,z=void 0===N?"":N,E=e.onChange,T=u(e),B=function(e){return function(t,o){var i=e[k],r=(0,s.DeepClone)(O);if(o)r.push(i);else{var n=r.indexOf(i);r.splice(n,1)}E&&E(r)}};return(0,r.jsxs)(n.FormControl,d({className:(t=T["check-box-group"]+" paraui-check-box-group",z&&(t+=" "+z),p&&(t+=" check-box-group-"+p),y&&(t+=" check-box-group-error"),m&&(t+=" check-box-group-disabled"),t)},{children:[(0,r.jsxs)(n.FormLabel,{children:[a,g&&(0,r.jsx)("span",d({className:"required-char"},{children:"(必填)"}),void 0)]},void 0),(0,r.jsx)(n.FormGroup,d({row:f},{children:F.map((function(e,t){return(0,i.createElement)(l.default,d({},e,{checked:-1!==O.indexOf(e[k]),size:p,disabled:Boolean(m||e.disabled),key:t,onChange:B(e)}))}))}),void 0),w&&(0,r.jsx)(n.FormHelperText,{children:w},void 0)]}),void 0)}},7178:function(e,t,o){o.d(t,{default:function(){return R}});var i=o(7712),r=o(9297),n=o.n(r),l=o(6897),a=o.n(l),c=o(8604),s=o(1731),d=o(3672),p=o(1383),u=function(){return u=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},u.apply(this,arguments)},h=function(e){var t=e.defaultValue,o=e.change,r=n().useState(t||""),l=r[0],a=r[1];return(0,i.jsx)(p.default,u({value:l,onChange:function(e){a(e),o&&o(e)}},e),void 0)},f=o(370),v=function(){return v=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},v.apply(this,arguments)},m=function(e){var t=e.defaultValue,o=void 0===t?"":t,r=e.change,l=e.value,a=n().useState(void 0!==l?l:o),c=a[0],s=a[1];return n().useEffect((function(){s(l)}),[l]),(0,i.jsx)(f.default,v({labelMode:"inside",onChange:function(e){s(e),r&&r(e)}},e,{value:c}),void 0)},x=o(7661),g=function(){return g=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},g.apply(this,arguments)},b=function(e){var t=e.defaultValue,o=e.change,r=n().useState(t||[]),l=r[0],a=r[1];return(0,i.jsx)(x.default,g({value:l,onChange:function(e){a(e),o&&o(e)}},e),void 0)},y=o(3053),C=o(5962),w=o(6243),j=o.n(w),k=o(9973),S=o.n(k),O=o(3094),F=o(36),N=o(5415),z=function(){return z=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},z.apply(this,arguments)},E=(0,N.Z)(),T=(0,c.makeStyles)((function(e){return(0,c.createStyles)({"para-file-box":{padding:"6px","& .para-file-tips":{"&-disabled":{"& .file-tips-context,& .svg-icon-primary":{color:"".concat(E.textColor.thirdary," !important")}},minHeight:"20px",position:"relative",padding:"6px","& .file-tips-item":{position:"relative",height:"20px",lineHeight:"16px",paddingRight:"20px",'&>[data-name="LinkGroup"]':{verticalAlign:"middle",marginRight:"9px"},"& .file-tips-context":{display:"inline-block",verticalAlign:"middle",width:"calc(100% - 45px)",color:E.thmemColor.primary},'&>[data-name="Delete"]':{display:"none",verticalAlign:"middle",cursor:"pointer",position:"absolute",right:"3px",top:"2px","&:hover":{opacity:"0.8"}},"&:hover":{backgroundColor:"#f5f5f5",'&>[data-name="Delete"]':{display:"inline-block"}}}}}})})),B=function(e){var t=e.fileType,o=void 0===t?"":t,r=e.defaultValue,l=e.onChange,a=e.disabled,c=e.buttonLabel,s=e.inputProps,d=e.buttonProps,p=T(),u=n().useRef(null),h=function(e){var t=void 0!==e?e:u.current.files;m(t),l&&l(t),null===e&&(u.current.value=null)},f=n().useState(),v=f[0],m=f[1];return n().useEffect((function(){r&&m(r)}),[r]),(0,i.jsxs)("div",z({className:p["para-file-box"]},{children:[!a&&(0,i.jsx)(F.default,z({variant:"outlined"},d,{onClick:function(){var e;console.log("inputFileClick",u.current),null===(e=u.current)||void 0===e||e.click()}},{children:c||"选择文件"}),void 0),(0,i.jsx)("input",z({},s,{ref:u,type:"file",onInput:function(){return h()},hidden:!0,accept:"string"==typeof o?o:o.join(",")}),void 0),v&&v[0]&&(0,i.jsx)("div",z({className:"para-file-tips ".concat(a?"para-file-tips-disabled":"")},{children:(0,i.jsxs)("div",z({className:"file-tips-item"},{children:[(0,i.jsx)(S(),{},void 0),(0,i.jsx)("span",z({className:"file-tips-context"},{children:(0,i.jsx)(O.default,{children:"string"==typeof v?v:v[0].name},void 0)}),void 0),!a&&(0,i.jsx)(j(),{onClick:function(){return h(null)}},void 0)]}),void 0)}),void 0)]}),void 0)},q=function(){return q=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},q.apply(this,arguments)},L=function(e){var t=e.ItemType,o=e.error,r=e.placeholder,l=e.label,a=e.inputProps,c=e.name,s=e.rules,p=e.setValue,u=e.setError,f=e.backData,v=e.disabled,x=e.change,g=r||"".concat(l),w=n().useState(!!o),j=w[0],k=w[1],S=function(t){if(p&&p(c,"value",t),x&&x(t),s){var o=(0,y.Z)(e,t)||"";O(o)}},O=n().useCallback((function(e){u&&u(e),k(!!e),p&&p(c,"message",e)}),[c,u,p]);n().useEffect((function(){var t=q(q({},e),{setErrorMsg:O});p&&p(c,"item",t)}),[c,e,O,p]);return function(){if(t&&"string"!=typeof t){var o=q(q({},e),{setErrorMsg:O});return t(o)}switch(t){case"file":return(0,i.jsx)(B,q({},e,{defaultValue:f[c],disabled:v,onChange:function(e){S(e)}}),void 0);case"switch":return void 0===f[c]&&p&&p(c,"initValue",!!f[c]),(0,i.jsx)(C.default,q({type:"compact",size:"small",defaultChecked:!!f[c],onChange:function(e){S(e.target.checked)}},q(q({},a),{disabled:v})),void 0);case"checkGroup":return(0,i.jsx)(b,q({error:j,defaultValue:f[c],size:"small",change:function(e){S(e)},list:e.list},q(q({},a),{disabled:v})),void 0);case"select":return(0,i.jsx)(m,q({placeholder:g,defaultValue:f[c],error:j,size:"medium",change:function(e){S(e)},list:e.list},q({disabled:v},a)),void 0);case"radioGroup":return(0,i.jsx)(h,q({error:j,defaultValue:f[c],size:"small",change:function(e){S(e)},list:e.list},q({disabled:v},a)),void 0);case"textarea":return(0,i.jsx)(d.default,q({error:j,placeholder:g,value:f[c],disabled:v,multiline:!0,rows:3,size:"medium",name:c,onChange:function(e){S(e.target.value)}},a),void 0);default:return(0,i.jsx)(d.default,q({value:f[c],error:j,placeholder:g,onChange:function(e){S(e.target.value)},name:c,size:"medium",disabled:v},a),void 0)}}()},P=function(e){var t=e.getSetError,o=e.errorMessage,r=n().useState(o||""),l=r[0],a=r[1];return n().useEffect((function(){a(o||"")}),[o]),n().useEffect((function(){t&&t(a)}),[t]),(0,i.jsxs)(O.default,{children:[l," "]},void 0)},M=o(4927),A=function(){return A=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},A.apply(this,arguments)},D=(0,N.Z)(),I=(0,c.makeStyles)((function(e){return(0,c.createStyles)({"para-form-item":{"& .para-form-label":{height:"20px",lineHeight:"20px",fontSize:"12px",textAlign:"left",fontWeight:"400",display:"inline-block",marginBottom:"8px",verticalAlign:"top",width:"100%","&-vertical":{marginTop:"6px",textAlign:"right",paddingRight:"3px",position:"relative","& .para-form-labe-tips":{position:"absolute",left:"0px",top:"1px"}},"& .para-form-labe-text":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",maxWidth:"100%",verticalAlign:"middle","&-hastips":{maxWidth:"calc(100% - 25px)"}},"& .para-form-labe-tips":{height:"20px",cursor:"pointer",display:"inline-block",verticalAlign:"middle",lineHeight:"27px",marginLeft:"5px"}},"& .para-form-edit":{minHeight:"34px","&>div":{padding:"0px"},"& .MuiSwitch-root":{marginTop:"12px"}},"& .para-form-error":{height:"17px",lineHeight:"17px",color:D.stateColor.error},"& .para-form-content-vertical":{display:"inline-block",width:"100%"}}})})),R=function(e){var t=e.type,o=void 0===t?"horizontal":t,r=e.labelWidth,l=void 0===r?60:r,c=e.tips,d=e.label,p=e.InputType,u=e.setValue,h=e.errorMessage,f=(e.rules,e.backData),v=void 0===f?{}:f,m=I(),x=n().useRef();return(0,i.jsxs)("div",A({className:m["para-form-item"]},{children:[(0,i.jsxs)("div",A({className:(0,M.Z)("para-form-label","vertical"===o&&"para-form-label-vertical"),style:{width:"vertical"===o?"".concat(l,"px"):""}},{children:[(0,i.jsx)("span",A({className:(0,M.Z)("para-form-labe-text",c&&"para-form-labe-text-hastips")},{children:d}),void 0),c&&(0,i.jsx)(s.Tooltip,A({title:c,placement:"top"},{children:(0,i.jsx)("span",A({className:"para-form-labe-tips"},{children:(0,i.jsx)(a(),{},void 0)}),void 0)}),void 0)]}),void 0),(0,i.jsxs)((function(e){return"vertical"===o?(0,i.jsx)("div",A({className:"para-form-content-vertical",style:{width:"calc(100% - ".concat(l,"px)")}},{children:e.children}),void 0):e.children}),{children:[(0,i.jsx)("div",A({className:"para-form-edit"},{children:e.children?e.children:(0,i.jsx)(L,A({setError:function(e){x.current&&x.current(e)},error:!!h,ItemType:p,backData:v},e,{setValue:u}),void 0)}),void 0),(0,i.jsx)("div",A({className:"para-form-error"},{children:(0,i.jsx)(P,{getSetError:function(e){return x.current=e},errorMessage:h},void 0)}),void 0)]},void 0)]}),void 0)}},3053:function(e,t){var o={required:function(e,t){var o,i,r=typeof t,n=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.required)||"".concat(e.label,"不能为空"),l=!1;switch(r){case"string":default:l=!!t;break;case"number":l=t+1>t;break;case"object":var a=JSON.stringify(t);l="null"!==a&&"[]"!==a&&"{}"!==a;break;case"boolean":l=void 0!==t}return l||n},maxlength:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.maxlength)||"最大长度不能超过".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.maxlength);return("string"===c||"number"===c&&t+1>t?!("".concat(t).length>((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.maxlength)||NaN)):!t)||s},minLength:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.minLength)||"最小长度为".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.minLength);return("string"===c||"number"===c&&t+1>t?"".concat(t).length>=((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.minLength)||-1):!t)||s},pattern:function(e,t){var o,i,r,n,l=null===(i=null===(o=e.rules)||void 0===o?void 0:o.validate)||void 0===i?void 0:i.pattern,a=(null===(n=null===(r=e.rules)||void 0===r?void 0:r.message)||void 0===n?void 0:n.pattern)||"参数不符合校验规则: ".concat(l),c=!t;return l&&t&&"function"!=typeof l&&(c=l.test(t)),c||a},min:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.min)||"最小值为".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.min),d=!t;return"string"!==c&&"number"!==c||(d=t>((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.min)||-1/0)),d||s},max:function(e,t){var o,i,r,n,l,a,c=typeof t,s=(null===(i=null===(o=e.rules)||void 0===o?void 0:o.message)||void 0===i?void 0:i.max)||"最大值为".concat(null===(n=null===(r=e.rules)||void 0===r?void 0:r.validate)||void 0===n?void 0:n.max),d=!t;return"string"!==c&&"number"!==c||(d=t<((null===(a=null===(l=e.rules)||void 0===l?void 0:l.validate)||void 0===a?void 0:a.max)||1/0)),d||s}};t.Z=function(e,t){var i,r,n=null===(i=e.rules)||void 0===i?void 0:i.validate;if(n){var l=null===(r=e.rules)||void 0===r?void 0:r.message;for(var a in console.log("validateObj"),n){var c=n[a],s="";if("function"==typeof c?!1===(s=c(e,t))&&l&&(s=l[a]):o[a]?s=o[a](e,t):(console.log("项目: ".concat(e.label,", 自定义校验规则: ").concat(a,", 方法未定义")),s=!0),!0!==s)return s||""}}return!1}},5415:function(e,t){var o={thmemColor:{primary:"#3D66F8",secondary:"#7E98F5",thirdary:"#D6DFFD"},textColor:{primary:"#191919",secondary:"#6E7488",thirdary:"#BBBECB",white:"#FFFFFF"},bgBorderColor:{bg1:"#DCDDE3",bg2:"#F5F5F5",bg3:"#EDEDED",bg4:"#6E7488",line1:"#E5E9EF",universal:"#FFFFFF"},stateColor:{info:"#3D66F8",success:"#41D658",warning:"#FFA150",error:"#F46B53"},gradientColor:{gradient1:"linear-gradient(#3D66F8, #4F93F0)",gradient2:"linear-gradient(#0093FF, #4EB4FF)",gradient3:"linear-gradient(#844EFF, #A796FF)",gradient4:"linear-gradient(#FD7300, #FFBF69)",gradient5:"linear-gradient(#3D66F8, #D8DFFA)"},fontFamily:{zh:"Microsoft Yahei, Helvetica, sans-serif",en:"Microsoft Yahei, Helvetica, sans-serif"},fontSize:12,borderRadius:4,boxShadow:"4px 4px 6px rgba(70,75,105,0.2), -4px -4px 6px rgba(0,0,0,0.06)",buttonShadow:"4px 4px 6px rgba(70,75,105,0.1), -4px -4px 6px rgba(0,0,0,0.03)",standardFont:{standardFont1:{fontSize:"12px",fontWeight:"400"},standardFont2:{fontSize:"12px",fontWeight:"700"}},titleFont:{titleFont1:{fontSize:"14px",fontWeight:"400"},titleFont2:{fontSize:"14px",fontWeight:"700"}},visualLargeFont:{visualLargeFont1:{fontSize:"40px",fontWeight:"700"},visualLargeFont2:{fontSize:"40px",fontWeight:"700"}}};t.Z=function(){return o}},7628:function(e,t,o){o.d(t,{default:function(){return f}});var i=o(7712),r=o(9297),n=o(1731),l=o(8604),a=o(5415),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s={icon:{icon:(0,i.jsx)("svg",c({viewBox:"0 0 1024 1024",version:"1.1",width:"1em",height:"1em"},{children:(0,i.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",fill:"currentColor"},void 0)}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M512.213333 128.128a384 384 0 1 0 384 384 384 384 0 0 0-384-384z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 981.333333A469.333333 469.333333 0 1 0 42.666667 512a469.845333 469.845333 0 0 0 469.333333 469.333333z m0-853.333333a384 384 0 1 1-384 384 384.426667 384.426667 0 0 1 384-384z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)},checkedIcon:{icon:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",fill:"currentColor"},void 0)]}),void 0),iconDisabled:(0,i.jsxs)("svg",c({viewBox:"0 0 1024 1024",width:"1em",height:"1em"},{children:[(0,i.jsx)("path",{d:"M512 128.170667a384 384 0 1 0 384 384 384.384 384.384 0 0 0-384-384z m0 617.728a233.728 233.728 0 1 1 233.728-233.728A233.770667 233.770667 0 0 1 512 745.728z",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 42.837333a469.333333 469.333333 0 1 0 469.333333 469.333334 469.802667 469.802667 0 0 0-469.333333-469.333334z m0 853.333334a384 384 0 1 1 384-384 384.426667 384.426667 0 0 1-384 384z",className:"line-round",fill:"currentColor"},void 0),(0,i.jsx)("path",{d:"M512 278.272A233.728 233.728 0 1 0 745.728 512 233.728 233.728 0 0 0 512 278.272z",className:"line-round",fill:"currentColor"},void 0)]}),void 0)}},d=function(){return d=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},p=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},u=(0,a.Z)(),h=(0,l.makeStyles)((function(){return(0,l.createStyles)({radio:{margin:"0","&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"& > span:first-child":{padding:"8px","& > span:first-child":{"& > svg":{color:u.textColor.thirdary,"& > .line-rect":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.primary},"&.radio-checked":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.thmemColor.primary}}},"& > span:last-child":{color:u.thmemColor.primary}},"&.radio-disabled":{"&:hover":{"& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1,"& > .line-round":{color:u.textColor.thirdary}}}},"& > span:last-child":{color:u.textColor.thirdary}},cursor:"not-allowed","& > span:first-child":{"& > span:first-child":{"& > svg":{color:u.bgBorderColor.bg1+" !important","& > .line-round":{color:u.textColor.thirdary+" !important"}}}},"& > span:last-child":{color:u.textColor.secondary+" !important"}},"&.radio-small":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"12px"}}},"& > span:last-child":{fontSize:"12px",lineHeight:"12px"}},"&.radio-medium":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"14px"}}},"& > span:last-child":{fontSize:"14px",lineHeight:"14px"}},"&.radio-large":{"& > span:first-child":{"& > span:first-child":{"& > svg":{fontSize:"16px"}}},"& > span:last-child":{fontSize:"16px",lineHeight:"16px"}}}})})),f=function(e){var t=e.color,o=void 0===t?"primary":t,l=e.size,a=void 0===l?"small":l,c=e.label,u=void 0===c?"":c,f=e.labelPlacement,v=void 0===f?"end":f,m=(e.checkedIcon,e.icon,e.disabled),x=void 0!==m&&m,g=e.checked,b=void 0!==g&&g,y=e.onChange,C=e.className,w=void 0===C?"":C,j=p(e,["color","size","label","labelPlacement","checkedIcon","icon","disabled","checked","onChange","className"]),k=h(e),S=(0,r.useState)(!1),O=S[0],F=S[1];(0,r.useEffect)((function(){b!==O&&F(b)}),[b]);var N,z=function(e){return x?s[e].iconDisabled:s[e].icon},E=function(t,o){void 0===e.checked&&F(t.target.checked),y&&y(t,o)};return(0,i.jsx)(n.FormControlLabel,{className:(N=k.radio+" paraui-radio",w&&(N+=" "+w),a&&(N+=" radio-"+a),x&&(N+=" radio-disabled"),O&&(N+=" radio-checked"),N),control:(0,i.jsx)(n.Radio,d({size:"small",color:o,disabled:x,icon:z("icon"),checkedIcon:z("checkedIcon"),onChange:E,checked:O},j),void 0),label:u,labelPlacement:v},void 0)}},1383:function(e,t,o){var i=o(9297),r=o(7712),n=o(1731),l=o(7628),a=o(8604),c=o(5415),s=function(){return s=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},d=(0,c.Z)(),p=(0,a.makeStyles)((function(){return(0,a.createStyles)({"radio-group":{"& > label":{fontSize:"12px",color:d.textColor.secondary,"& > .required-char":{marginLeft:"3px",color:d.thmemColor.primary}},"& > div":{margin:"5px 0"},"& > p":{fontSize:"12px",lineHeight:"12px",margin:"0",color:d.stateColor.error},"&.radio-group-disabled":{},"&.radio-group-small":{},"&.radio-group-medium":{},"&.radio-group-large":{}}})}));t.default=function(e){var t,o=e.className,a=void 0===o?"":o,c=e.label,d=void 0===c?"":c,u=e.size,h=void 0===u?"small":u,f=e.row,v=void 0===f||f,m=e.disabled,x=void 0!==m&&m,g=e.required,b=void 0!==g&&g,y=e.error,C=void 0!==y&&y,w=e.helperText,j=void 0===w?"":w,k=e.id,S=void 0===k?"name":k,O=e.value,F=e.list,N=e.onChange,z=p(e),E=function(e){return function(){var t=e[S];N&&N(t)}};return(0,r.jsxs)(n.FormControl,s({className:(t=z["radio-group"]+" paraui-radio-group",a&&(t+=" "+a),h&&(t+=" radio-group-"+h),C&&(t+=" radio-group-error"),x&&(t+=" radio-group-disabled"),t)},{children:[(0,r.jsxs)(n.FormLabel,{children:[d,b&&(0,r.jsx)("span",s({className:"required-char"},{children:"(必填)"}),void 0)]},void 0),(0,r.jsx)(n.FormGroup,s({row:v},{children:F.map((function(e,t){var o={};return e&&Object.keys(e).forEach((function(t){o[t]=String(e[t])})),(0,i.createElement)(l.default,s({},o,{checked:O===e[S],size:h,disabled:Boolean(x||e.disabled),key:t,onChange:E(e)}))}))}),void 0),j&&(0,r.jsx)(n.FormHelperText,{children:j},void 0)]}),void 0)}},370:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(6028),a=o.n(l),c=o(4115),s=o.n(c),d=o(6110),p=o.n(d),u=o(19),h=o.n(u),f=o(3094),v=o(8604),m=o(5415),x=o(3475),g=function(){return g=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},g.apply(this,arguments)},b=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},y=(0,m.Z)(),C=(0,v.makeStyles)((function(){return(0,v.createStyles)({select:{"& *":{boxSizing:"border-box"},fontFamily:y.fontFamily.zh,display:"inline-block",fontSize:y.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& > .select-label":{color:y.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& > .select-content":{lineHeight:"0",border:"1px solid",borderColor:y.textColor.thirdary,borderRadius:y.borderRadius,paddingRight:"30px",position:"relative",cursor:"pointer","&:hover":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{color:y.thmemColor.primary}}},"& > .select-label-placeholder":{width:"100%",height:"100%",padding:"0 10px",boxSizing:"border-box",color:y.textColor.thirdary,display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",position:"absolute",left:"0",top:"0"},"& > .select-svg":{position:"absolute",right:"8px",top:"0","& > svg":{fontSize:"16px",transition:"all .3s",color:y.textColor.secondary}},"& > .radio-select-content":{paddingLeft:"10px",color:y.textColor.primary,fontSize:"12px",lineHeight:"16px"},"& > .radio-search-outside":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",padding:"0 30px 0 10px",fontSize:"12px",cursor:"pointer","& > div":{height:"100%",cursor:"pointer","& > input":{height:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}},"& > .check-select-content":{paddingLeft:"10px",height:"100%",overflow:"hidden","& > .check-select-content-item":{display:"inline-block",backgroundColor:y.bgBorderColor.bg2,borderRadius:y.borderRadius,padding:"0 10px",color:y.textColor.primary,fontSize:"12px",marginRight:"10px",verticalAlign:"top",maxWidth:"100%",whiteSpace:"nowrap","&.check-select-content-item-more":{color:y.thmemColor.primary,cursor:"pointer","& > span":{maxWidth:"none"}},"& > span":{display:"inline-block",hieght:"100%",verticalAlign:"top",maxWidth:"calc(100% - 20px)",overflow:"hidden",textOverflow:"ellipsis"},"& > svg":{cursor:"pointer",marginLeft:"8px",color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"2px","&:hover":{color:y.thmemColor.primary}},"&.check-select-content-item-noclose":{"& > span":{maxWidth:"none"}}},"& > .check-search-outside":{width:"10px",maxWidth:"100% !important",display:"none","& > div":{width:"100%","& > input":{width:"100%",padding:"0",color:y.textColor.primary,fontSize:"12px",cursor:"pointer"},"& fieldset":{display:"none"}}}}},"& > .select-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"&.select-disabled":{"& > .select-content":{backgroundColor:y.bgBorderColor.bg2,cursor:"not-allowed","&:hover":{borderColor:y.textColor.thirdary,"& > .select-svg":{"& > svg":{color:y.textColor.secondary}}},"& > .check-select-content":{"& > .check-select-content-item":{backgroundColor:y.bgBorderColor.bg3,"& > span":{maxWidth:"none"}}}}},"&.select-error":{"& > .select-content":{borderColor:y.stateColor.error+"!important"},"& > .select-error-text":{color:y.stateColor.error+"!important"}},"&.select-multiple":{},"&.select-open":{"& > .select-content":{borderColor:y.thmemColor.primary,"& > .select-svg":{"& > svg":{transform:"rotate(180deg)",color:y.thmemColor.primary}},"& > .check-select-content":{"& > .check-search-outside":{display:"inline-block"}}}},"&.select-small":{"& > .select-content":{height:"28px","& > .select-label-placeholder":{lineHeight:"26px"},"& > .select-svg":{top:"5px"},"& > .radio-select-content":{paddingTop:"5px",paddingBottom:"5px"},"& > .radio-search-outside":{"& > div":{paddingTop:"5px",paddingBottom:"5px"}},"& > .check-select-content":{paddingBottom:"3px","& > .check-select-content-item":{marginTop:"3px",height:"20px",lineHeight:"20px"},"& > .check-search-outside":{marginTop:"3px","& input":{height:"20px"}}}}},"&.select-medium":{"& > .select-content":{height:"34px","& > .select-label-placeholder":{lineHeight:"32px"},"& > .select-svg":{top:"8px"},"& > .radio-select-content":{paddingTop:"8px",paddingBottom:"8px"},"& > .radio-search-outside":{"& > div":{paddingTop:"8px",paddingBottom:"8px"}},"& > .check-select-content":{paddingBottom:"4px","& > .check-select-content-item":{marginTop:"4px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"4px","& input":{height:"24px"}}}}},"&.select-large":{"& > .select-content":{height:"40px","& > .select-label-placeholder":{lineHeight:"38px"},"& > .select-svg":{top:"11px"},"& > .radio-select-content":{paddingTop:"11px",paddingBottom:"11px"},"& > .radio-search-outside":{"& > div":{paddingTop:"11px",paddingBottom:"11px"}},"& > .check-select-content":{paddingBottom:"7px","& > .check-select-content-item":{marginTop:"7px",height:"24px",lineHeight:"24px"},"& > .check-search-outside":{marginTop:"7px","& input":{height:"24px"}}}}},"&.select-over-line":{"&.select-small":{"& > .select-content":{height:"inherit",minHeight:"28px","& > .radio-select-content":{}}},"&.select-medium":{"& > .select-content":{height:"inherit",minHeight:"34px","& > .radio-select-content":{}}},"&.select-large":{"& > .select-content":{height:"inherit",minHeight:"40px","& > .radio-select-content":{}}}}},"select-popover":{"& *":{boxSizing:"border-box"},"& > div":{maxWidth:"none",padding:"0",backgroundColor:y.textColor.white,boxShadow:y.boxShadow,borderRadius:y.borderRadius,"& > span":{color:y.textColor.white},"& .select-popover-content":{maxHeight:"300px",overflow:"auto","& > .select-popover-search":{height:"30px",borderBottom:"1px solid "+y.bgBorderColor.bg3,padding:"0 10px",display:"flex","& > div":{width:"100%","& input":{padding:"0",height:"28px",fontSize:"12px",color:y.textColor.primary,"&::placeholder":{fontSize:"12px",color:y.textColor.thirdary,opacity:1}},"& fieldset":{display:"none"}},"& > svg":{color:y.thmemColor.primary,fontSize:"16px",marginTop:"7px",cursor:"pointer"}},"& > .select-popover-list":{"& .select-popover-list-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px","& > .select-popover-list-item-label":{width:"calc(100% - 25px)",color:y.textColor.secondary,fontSize:"12px"},"& > .select-popover-list-item-svg":{lineHeight:"0",display:"none","& > svg":{fontSize:"16px",color:y.thmemColor.primary}},"&.select-popover-list-item-select":{"& > .select-popover-list-item-label":{color:y.thmemColor.primary},"& > .select-popover-list-item-svg":{display:"inline-block"}},"&.select-popover-list-item-disabled":{backgroundColor:y.bgBorderColor.bg3+" !important",cursor:"not-allowed","&:hover":{backgroundColor:y.bgBorderColor.bg3+" !important"},"& > .select-popover-list-item-label":{color:y.textColor.secondary+" !important"},"& > .select-popover-list-item-svg":{"& > svg":{color:y.textColor.secondary+" !important"}}},"&.select-popover-list-item-hover":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}},"&.select-popover-list-item-keydown":{backgroundColor:y.bgBorderColor.bg2,"& > .select-popover-list-item-label":{color:y.thmemColor.primary}}},"& > .select-popover-list-group":{"& .select-popover-list-group-label":{display:"inline-block",width:"100%",padding:"7px 10px",color:y.textColor.thirdary,fontSize:"12px"},"& .select-popover-list-item":{padding:"7px 10px 7px 20px"}},"& > .select-nodata":{textAlign:"center",fontSize:"12px",color:y.textColor.primary,padding:"10px"}}}}},"select-more-popover":{"& *":{boxSizing:"border-box"},"& > div:nth-of-type(3),& > div:nth-of-type(2)":{marginLeft:"10px"},"& .select-more":{width:"200px",maxHeight:"300px",overflow:"auto","& > .select-more-title":{height:"30px",padding:"0 10px",color:y.textColor.secondary,borderBottom:"1px solid "+y.bgBorderColor.bg2,lineHeight:"30px",fontSize:"12px",display:"flex",justifyContent:"space-between"},"& > .select-more-content":{"& > .select-more-content-item":{padding:"7px 7px 7px 10px",display:"flex",justifyContent:"space-between","& > span":{width:"calc(100% - 25px)",display:"inline-block",fontSize:"12px"},"& > svg":{color:y.textColor.secondary,fontSize:"16px",position:"relative",top:"1px",cursor:"pointer","&:hover":{color:y.thmemColor.primary}}}}}}})}));t.default=function(e){var t=e.className,o=e.size,l=void 0===o?"small":o,c=e.labelMode,d=void 0===c?"outside":c,u=e.placeholder,v=void 0===u?"":u,m=e.label,y=void 0===m?"":m,w=e.disabled,j=void 0!==w&&w,k=e.multiple,S=void 0!==k&&k,O=e.required,F=void 0!==O&&O,N=e.showLabelSign,z=void 0===N||N,E=e.labelSign,T=e.error,B=void 0!==T&&T,q=e.helperText,L=void 0===q?"":q,P=e.list,M=e.showName,A=void 0===M?"label":M,D=e.showValue,I=void 0===D?"value":D,R=e.childrenName,H=void 0===R?"children":R,W=e.value,Z=e.onChange,V=e.overLine,_=void 0!==V&&V,U=e.search,G=void 0!==U&&U,K=e.searchModel,$=void 0===K?"inside":K,Y=e.selectPopoverClassName,J=e.morePopoverClassName,X=e.onEnter,Q=C(e),ee=(0,r.useRef)(null),te=(0,r.useState)("select-"+(0,x.UUID)())[0],oe=(0,r.useState)("select-popover-"+(0,x.UUID)())[0],ie=(0,r.useState)(!1),re=ie[0],ne=ie[1],le=(0,r.useState)(!1),ae=le[0],ce=le[1],se=(0,r.useState)([]),de=se[0],pe=se[1],ue=(0,r.useState)([]),he=ue[0],fe=ue[1],ve=(0,r.useState)({}),me=ve[0],xe=ve[1],ge=(0,r.useState)(null),be=ge[0],ye=ge[1],Ce=(0,r.useState)({})[0],we=(0,r.useState)(!1),je=we[0],ke=we[1],Se=(0,r.useState)(""),Oe=Se[0],Fe=Se[1],Ne=(0,r.useState)(!1),ze=Ne[0],Ee=Ne[1],Te=(0,r.useRef)(null);(0,r.useEffect)((function(){void 0!==W&&pe(S?(0,x.DeepClone)(W||[]):""===W?[]:[W])}),[W,S]),(0,r.useEffect)((function(){if(G&&"outside"===$)return Ee(!!S);Ee(_)}),[_,G,$,S]),(0,r.useEffect)((function(){for(var e={},t=0,o=P.length;t<o;t++){var i=P[t];if(i[H]&&i[H].length>0)for(var r=i[H],n=0,l=r.length;n<l;n++){var a=r[n];e[a[I]]=a}else e[i[I]]=i}xe(e)}),[P]),(0,r.useEffect)((function(){S&&(ze||ye(de.length))}),[ze,S,de]),(0,r.useEffect)((function(){return ze?ye(de.length):(setTimeout((function(){Ae(de.length)})),window.addEventListener("resize",De)),function(){window.removeEventListener("resize",De)}}),[de,ze]),(0,r.useEffect)((function(){de&&de.length>0?ce(!0):(ce(!1),G&&"outside"===$&&ce(""!==Oe))}),[G,Oe,$,de]),(0,r.useEffect)((function(){clearTimeout(Ce.searchTimer),G&&""!==Oe.trim()?Ce.searchTimer=setTimeout((function(){for(var e=[],t=(0,x.DeepClone)(P),o=0,i=t.length;o<i;o++){var r=t[o];if(r[H]&&r[H].length>0){for(var n=r[H],l=[],a=0,c=n.length;a<c;a++){var s=n[a];Me(s)&&l.push(s)}l.length>0&&(r[H]=l,e.push(r))}else{Me(r)&&e.push(r)}}fe(e)}),100):fe((0,x.DeepClone)(P))}),[G,Oe,P]),(0,r.useEffect)((function(){return re?setTimeout((function(){qe(),window.addEventListener("click",Pe),window.addEventListener("keydown",$e)})):(Fe(""),window.removeEventListener("click",Pe),window.removeEventListener("keydown",$e)),function(){window.removeEventListener("click",Pe),window.removeEventListener("keydown",$e)}}),[re]),(0,r.useEffect)((function(){Oe&&ne(!0)}),[Oe]),(0,r.useEffect)((function(){S&&"outside"===$&&!0!==j&&Ue(Oe)}),[Oe,S,j,$]);var Be,qe=function(){var e=Te&&Te.current,t=e&&e.querySelector("input");t&&t.focus()},Le=function(e,t){for(var o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!o.call(e,t);)e=e.parentElement;return e},Pe=function(e){Le(e.target,"."+oe)||ne(!1)},Me=function(e){var t=!0,o=e[A];return o&&"string"==typeof o&&-1===o.indexOf(Oe)&&(t=!1),t},Ae=function(e){if(null!==e&&0!==e){void 0===e&&(e=de.length);var t=document.querySelector("."+te+" > .select-content > .check-select-content");if(t)if(t.scrollHeight>t.clientHeight){var o=Number(e)-1;ye(o),Ae(o)}else de.length<=e&&We()}},De=function(){clearTimeout(Ce.timer),Ce.timer=setTimeout((function(){ye(de.length),Ae()}),100)},Ie=function(){!0!==j&&ne(!0)},Re=function(){ne(!1)},He=function(e){ke(!0),ne(!1),e.stopPropagation()},We=function(){ke(!1)},Ze=function(e,t){return function(o){var i=e[I];if("object"!=typeof j||-1===j.indexOf(i))if(S){var r=de.indexOf(i);-1!==r?de.splice(r,1):de.push(i),Z&&Z(b([],de,!0),o),t&&X&&X(b([],de,!0)),qe()}else Z&&Z(i,o),t&&X&&X(i),Re(),Fe("")}},Ve=function(e,t){return function(o){var i;e||((i={})[I]=t,e=i),Ze(e)(o),o.stopPropagation()}},_e=function(e){Fe(e.target.value)},Ue=function(e){var t=Te&&Te.current,o=t&&t.querySelector("input");if(!o)return null;var i=window.getComputedStyle(o),r=i.fontFamily,n=function(e,t,o){var i=document.createElement("span");i.id="referenceSpan";var r={};r.width=i.offsetWidth,r.height=i.offsetHeight,i.style.visibility="hidden",i.style.fontSize=e,i.style.fontFamily=t,i.style.display="inline-block";var n=document.getElementById("referenceSpan");return n&&document.body.removeChild(n),document.body.appendChild(i),void 0!==i.textContent?i.textContent=o:i.innerText=o,r.width=parseFloat(window.getComputedStyle(i).width)-r.width,r.height=parseFloat(window.getComputedStyle(i).height)-r.height,document.body.removeChild(i),r}(i.fontSize,r,e),l=n.width;l<10&&(l=10),t.style.width=l+"px"},Ge=function(e){var t=e.selectDom,o=e.keyCode,i=e.currentKeydownDom,r=null,n="nextSibling",l=".select-popover-list > div",a=".select-popover-list-item";if(38===o&&(n="previousSibling",l=".select-popover-list > div:last-child",a=".select-popover-list-item:last-child"),i)if(r=i[n])-1!==r.className.indexOf("select-popover-list-group-label")&&((r=(r=i.parentNode)[n])||(r=t.querySelector(l)));else{var c=i.parentNode;c&&c.className&&-1!==c.className.indexOf("select-popover-list-group")&&(r=(r=i.parentNode)[n])||(r=t.querySelector(l))}else r=t.querySelector(l);if(r)if(-1!==r.className.indexOf("select-popover-list-group")){var s=r.querySelector(a);s&&(s.classList.add("select-popover-list-item-keydown"),Ke(s,t))}else r.classList.add("select-popover-list-item-keydown"),Ke(r,t)},Ke=function(e,t){clearTimeout(Ce.scrollTimer);var o=t.clientHeight,i=e.offsetTop+e.clientHeight-o;Ce.scroll=!0,t.scrollTop=i>0?i:0,Ce.scrollTimer=setTimeout((function(){Ce.scroll=!1}),100)},$e=function(e){var t=document.querySelector("."+oe);if(t){var o=t.querySelector(".select-popover-list-item-select"),i=t.querySelector(".select-popover-list-item-hover"),r=t.querySelector(".select-popover-list-item-keydown"),n=o;if(i&&(n=i),13===e.keyCode){var l=r||i;if(l){var a=l.dataset.val;Ze(me[a],!0)({target:r})}else X&&X(W)}r&&(n=r,r.classList.remove("select-popover-list-item-keydown")),40===e.keyCode&&Ge({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n}),38===e.keyCode&&Ge({selectDom:t,keyCode:e.keyCode,currentKeydownDom:n})}},Ye=function(e){if(!Ce.scroll){var t=Le(e.target,".select-popover-list-item");if(t){t.classList.add("select-popover-list-item-hover");var o=document.querySelector("."+oe).querySelector(".select-popover-list-item-keydown");o&&o.classList.remove("select-popover-list-item-keydown")}}},Je=function(e){var t=Le(e.target,".select-popover-list-item");t&&t.classList.remove("select-popover-list-item-hover")},Xe=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:"outside"===d&&(0,i.jsxs)("label",g({className:"select-label"},{children:[y,z&&(0,i.jsx)("span",g({className:"identification-label"},{children:E||(0,i.jsx)(i.Fragment,{children:F?"(必填)":""},void 0)}),void 0)]}),void 0)},void 0)}),[d,y,z,E,F]),Qe=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:!ae&&(0,i.jsx)("span",g({className:"select-label-placeholder"},{children:"outside"===d?v:(0,i.jsxs)(i.Fragment,{children:[y||v,z&&(0,i.jsx)("span",g({className:"identification-label"},{children:E||(0,i.jsx)(i.Fragment,{children:F?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)},void 0)}),[ae,d,v,y,z,E,F]),et=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:!S&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",g({className:"radio-select-content"},{children:function(){if(""!==Oe)return null;var e=me[de[0]]&&me[de[0]][A]||de[0];return ze?e:(0,i.jsx)(f.default,{children:e},void 0)}()}),void 0),G&&"outside"===$&&!0!==j&&(0,i.jsx)(n.TextField,{variant:"outlined",className:"radio-search-outside",value:Oe,onChange:_e,ref:Te},void 0)]},void 0)},void 0)}),[S,ae,ze,me,de,A,G,$,Oe,j]),tt=(0,r.useMemo)((function(){var e=function(e){return me[de[e]]&&me[de[e]][A]||de[e]};return(0,i.jsx)(i.Fragment,{children:S&&(0,i.jsxs)("div",g({className:"check-select-content"},{children:[de&&de.map((function(t,o){if(null!==be&&be<=o)return null;var r=!0;return(!0===j||"object"==typeof j&&-1!==j.indexOf(de[o]))&&(r=!1),(0,i.jsxs)("div",g({className:r?"check-select-content-item":"check-select-content-item check-select-content-item-noclose"},{children:[(0,i.jsx)("span",{children:e(o)},void 0),r&&(0,i.jsx)(h(),{onClick:Ve(me[de[o]],de[o])},void 0)]}),o)})),function(){if(null!==be&&de.length>be)return(0,i.jsx)("div",g({className:"check-select-content-item check-select-content-item-more",onClick:He},{children:(0,i.jsxs)("span",{children:["+",de.length-be]},void 0)}),void 0)}(),G&&"outside"===$&&!0!==j&&(0,i.jsx)(n.TextField,{variant:"outlined",className:"check-search-outside",value:Oe,onChange:_e,ref:Te},void 0)]}),void 0)},void 0)}),[S,ae,de,be,me,j,Z,Oe,G,$]),ot=(0,r.useMemo)((function(){return(0,i.jsxs)("div",g({className:"select-content",onClick:Ie,ref:ee},{children:[Qe,(0,i.jsx)("span",g({className:"select-svg"},{children:(0,i.jsx)(a(),{},void 0)}),void 0),et,tt]}),void 0)}),[ee,ae,d,v,y,z,E,F,ze,me,de,A,S,be,j,Z,Oe,$]),it=(0,r.useMemo)((function(){return(0,i.jsx)("div",g({className:"select-popover-list"},{children:he&&he.length>0?(0,i.jsx)(i.Fragment,{children:he.map((function(e,t){if(e[H]&&e[H].length>0){var o=e[H];return(0,i.jsxs)("div",g({className:"select-popover-list-group"},{children:[(0,i.jsx)("span",g({className:"select-popover-list-group-label"},{children:e[A]||e[I]}),void 0),o.map((function(e,t){var o=e[I],r="select-popover-list-item";return-1!==de.indexOf(o)&&(r+=" select-popover-list-item-select"),"object"==typeof j&&-1!==j.indexOf(o)&&(r+=" select-popover-list-item-disabled"),(0,i.jsxs)("div",g({onClick:Ze(e),className:r,onMouseEnter:Ye,onMouseLeave:Je,"data-val":o},{children:[(0,i.jsx)("span",g({className:"select-popover-list-item-label"},{children:(0,i.jsx)(f.default,{children:e[A]||e[I]},void 0)}),void 0),(0,i.jsx)("span",g({className:"select-popover-list-item-svg"},{children:(0,i.jsx)(p(),{},void 0)}),void 0)]}),t)}))]}),t)}var r=e[I],n="select-popover-list-item";return-1!==de.indexOf(r)&&(n+=" select-popover-list-item-select"),"object"==typeof j&&-1!==j.indexOf(r)&&(n+=" select-popover-list-item-disabled"),(0,i.jsxs)("div",g({onClick:Ze(e),className:n,onMouseEnter:Ye,onMouseLeave:Je,"data-val":r},{children:[(0,i.jsx)("span",g({className:"select-popover-list-item-label"},{children:(0,i.jsx)(f.default,{children:e[A]||e[I]},void 0)}),void 0),(0,i.jsx)("span",g({className:"select-popover-list-item-svg"},{children:(0,i.jsx)(p(),{},void 0)}),void 0)]}),t)}))},void 0):(0,i.jsx)("div",g({className:"select-nodata"},{children:"暂无选项"}),void 0)}),void 0)}),[he,A,I,de,Z]),rt=(0,r.useMemo)((function(){var e="select-popover-content "+oe;return(0,i.jsxs)("div",g({style:{width:(ee&&ee.current?ee.current.offsetWidth:0)+"px"},className:e},{children:[G&&"inside"===$&&(0,i.jsxs)("div",g({className:"select-popover-search"},{children:[(0,i.jsx)(n.TextField,{variant:"outlined",placeholder:"请输入搜索名",value:Oe,onChange:_e,ref:Te},void 0),(0,i.jsx)(s(),{},void 0)]}),void 0),it]}),void 0)}),[re,ee,he,H,I,A,de,Oe,G,oe,$]),nt=(0,r.useMemo)((function(){var e,t=function(e){return me[de[e]]&&me[de[e]][A]||de[e]};return(0,i.jsx)(n.Popover,g({open:je,anchorEl:ee&&ee.current,onClose:We,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},className:(e=Q["select-more-popover"],J&&(e+=" "+J),e)},{children:(0,i.jsxs)("div",g({className:"select-more"},{children:[(0,i.jsxs)("div",g({className:"select-more-title"},{children:[(0,i.jsx)("span",{children:"已选中"},void 0),(0,i.jsx)("span",{children:de.length-Number(be)},void 0)]}),void 0),(0,i.jsx)("div",g({className:"select-more-content"},{children:de&&de.map((function(e,o){if(null!==be&&be>o)return null;var r=!0;return(!0===j||"object"==typeof j&&-1!==j.indexOf(de[o]))&&(r=!1),(0,i.jsxs)("div",g({className:"select-more-content-item"},{children:[(0,i.jsx)("span",{children:(0,i.jsx)(f.default,{children:t(o)},void 0)},void 0),r&&(0,i.jsx)(h(),{onClick:Ve(me[de[o]],de[o])},void 0)]}),o)}))}),void 0)]}),void 0)}),void 0)}),[je,de,be,me,j,A,J]);return(0,i.jsxs)("div",g({className:(Be=Q.select,Be+=" select",S&&!ze&&(Be+=" "+te),t&&(Be+=" "+t),l&&(Be+=" select-"+l),B&&(Be+=" select-error"),!0===j&&(Be+=" select-disabled"),re&&(Be+=" select-open"),S&&(Be+=" select-multiple"),ze&&(Be+=" select-over-line"),Be)},{children:[Xe,(0,i.jsx)(n.Tooltip,g({open:re,title:rt,onClose:Re,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:function(){var e=Q["select-popover"];return Y&&(e+=" "+Y),e}()},placement:"bottom-start"},{children:ot}),void 0),L&&(0,i.jsx)("p",g({className:"select-error-text"},{children:L}),void 0),nt]}),void 0)}},5962:function(e,t,o){var i=o(7712),r=o(1731),n=o(8604),l=o(5415),a=o(4927),c=function(){return c=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},s=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},d=(0,l.Z)(),p=(0,n.withStyles)((function(e){return(0,n.createStyles)({root:{width:"auto",height:"20px",padding:0,alignItems:"center"},switchBase:{top:"50%",transform:"translateY(-50%)",padding:0,color:d.bgBorderColor.bg4,"&$checked":{transform:"translate(14px,-50%)",color:d.thmemColor.primary},"&$checked + $track":{backgroundColor:d.thmemColor.thirdary,opacity:1}},checked:{},thumb:{width:18,height:18},track:{width:32,height:14,borderRadius:7,backgroundColor:d.bgBorderColor.bg1,opacity:1}})}),{name:"SwitchCompact"})(r.Switch),u=(0,n.withStyles)((function(e){return(0,n.createStyles)({root:{width:"auto",height:"auto",padding:0},switchBase:{padding:2,color:d.textColor.white,"&$checked":{transform:"translateX(14px)",color:d.textColor.white,"& + $track":{backgroundColor:d.thmemColor.primary,opacity:1}}},thumb:{width:14,height:14},track:{width:32,height:18,borderRadius:9,backgroundColor:d.bgBorderColor.bg4,opacity:1},checked:{}})}),{name:"SwitchNormal"})(r.Switch),h=(0,n.makeStyles)((function(){return(0,n.createStyles)({smallThumb:function(e){return"compact"===e.type?{width:16,height:16,borderRadius:8}:{width:12,height:12,borderRadius:6}},smallTrack:function(e){return"compact"===e.type?{width:30,height:12,borderRadius:6}:{width:30,height:16,borderRadius:8}},largeThumb:function(e){return"compact"===e.type?{width:20,height:20,borderRadius:10}:{width:16,height:16,borderRadius:8}},largeTrack:function(e){return"compact"===e.type?{width:34,height:16,borderRadius:8}:{width:34,height:20,borderRadius:10}},compactLargeRoot:{height:22}})}));t.default=function(e){var t=e.type,o=void 0===t?"normal":t,r=e.size,n=void 0===r?"medium":r,l=e.className,d=s(e,["type","size","className"]),f=h({type:o});return(0,i.jsx)(i.Fragment,{children:function(){if("compact"===o){var e="medium"===n?{}:{thumb:f["".concat(n,"Thumb")],track:f["".concat(n,"Track")]};return(0,i.jsx)(p,c({},d,{classes:e,className:(0,a.Z)("paraui-switch",l,"large"===n&&f.compactLargeRoot)}),void 0)}var t="medium"===n?{}:{thumb:f["".concat(n,"Thumb")],track:f["".concat(n,"Track")]};return(0,i.jsx)(u,c({},d,{classes:t,className:(0,a.Z)("paraui-switch",l)}),void 0)}()},void 0)}},3672:function(e,t,o){var i=o(7712),r=o(9297),n=o(1731),l=o(3094),a=o(8528),c=o.n(a),s=o(6570),d=o.n(s),p=o(1102),u=o.n(p),h=o(8604),f=o(5415),v=o(3475),m=function(){return m=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},m.apply(this,arguments)},x=function(e,t){var o={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(o[i[r]]=e[i[r]])}return o},g=(0,f.Z)(),b=(0,h.makeStyles)((function(){return(0,h.createStyles)({"@keyframes rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"text-field":{fontFamily:g.fontFamily.zh,display:"inline-block",fontSize:g.standardFont.standardFont1.fontSize,width:"100%",paddingBottom:"20px","& fieldset":{border:0},"& .text-field-error-text":{margin:0,paddingLeft:"10px",height:"20px",lineHeight:"20px"},"& .text-field-label":{color:g.textColor.secondary,marginBottom:"9px",display:"inline-block"},"& .text-field-content":{border:"1px solid",borderColor:g.textColor.thirdary,borderRadius:g.borderRadius,position:"relative",display:"table",width:"100%",boxSizing:"border-box","&:hover":{borderColor:g.thmemColor.primary},"& > div":{display:"table-cell",height:"100%",verticalAlign:"top"},"& .text-field-content-before":{color:g.textColor.primary,padding:"0 10px",borderRight:"1px solid "+g.textColor.thirdary,backgroundColor:g.bgBorderColor.bg2,borderBottomLeftRadius:g.borderRadius,borderTopLeftRadius:g.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}},"& .text-field-content-within":{position:"relative",width:"100%","& > *":{display:"table-cell",verticalAlign:"top"},"& svg":{fontSize:"20px",color:g.textColor.secondary,cursor:"pointer"},"& .right-icon":{zIndex:"1",position:"relative",whiteSpace:"nowrap","& > svg":{marginRight:"10px"}},"& .length-limit":{zIndex:"1",position:"relative",paddingRight:"10px",color:g.textColor.secondary},"& .text-field-content-within-input":{width:"100vw","& > div":{width:"100%"},"& input":{height:"100%"},"& input,textarea":{fontSize:g.standardFont.standardFont1.fontSize,color:g.textColor.primary,"&:-ms-clear":{display:"none"},"&:-ms-reveal":{display:"none"}},"& .text-field-label-placeholder":{width:"100%",position:"absolute",left:"0",height:"100%",padding:"0 10px",boxSizing:"border-box",color:g.textColor.thirdary,cursor:"text",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},"& .text-field-content-after":{color:g.textColor.primary,padding:"0 10px",borderLeft:"1px solid",borderColor:g.textColor.thirdary,backgroundColor:g.bgBorderColor.bg2,borderBottomRightRadius:g.borderRadius,borderTopRightRadius:g.borderRadius,whiteSpace:"nowrap","& svg":{fontSize:"20px",verticalAlign:"top",position:"relative"}}},"& .identification-label":{marginLeft:"3px"},"&.text-field-multiline":{"& .text-field-content":{"& .text-field-content-within":{"& > *":{display:"inline-block"},"& .length-limit":{width:"100%",boxSizing:"border-box",textAlign:"right",paddingBottom:"5px"},"& .text-field-content-within-input":{width:"100%","& > div:first-child":{width:"100%","& > div:first-child":{padding:"10px"}},"& .text-field-label-placeholder":{paddingTop:"10px"}}}}},"&.text-field-disabled":{"& .text-field-content":{backgroundColor:g.bgBorderColor.bg3,"&:hover":{borderColor:g.textColor.thirdary},"& .text-field-content-within":{"& .text-field-content-within-input":{"& .text-field-label-placeholder":{cursor:"not-allowed"},"& input":{cursor:"not-allowed",color:g.textColor.thirdary}}}}},"&.text-field-error":{"& .text-field-error-text":{color:g.stateColor.error},"& .text-field-content":{borderColor:g.stateColor.error,"&:hover":{borderColor:g.stateColor.error},"& .text-field-content-before":{borderColor:g.stateColor.error},"& .text-field-content-after":{borderColor:g.stateColor.error}}},"&.text-field-focus":{"& .text-field-content":{borderColor:g.thmemColor.primary,"& .text-field-content-before":{borderColor:g.thmemColor.primary},"& .text-field-content-after":{borderColor:g.thmemColor.primary}}},"&.text-field-small":{"& .text-field-content":{height:"28px","& .text-field-content-before":{lineHeight:"26px","& svg":{top:"3px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"26px","& > div":{height:"100%"}}},"& input":{padding:"5px 10px"},"& .text-field-label-placeholder":{lineHeight:"26px"},"& .right-icon":{paddingTop:"3px"},"& .length-limit":{lineHeight:"26px"}},"& .text-field-content-after":{lineHeight:"26px","& svg":{top:"3px"}}}},"&.text-field-medium":{"& .text-field-content":{height:"34px","& .text-field-content-before":{lineHeight:"32px","& svg":{top:"6px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"32px","& > div":{height:"100%"}}},"& input":{padding:"8px 10px"},"& .text-field-label-placeholder":{lineHeight:"32px"},"& .right-icon":{paddingTop:"7px"},"& .length-limit":{lineHeight:"32px","& svg":{top:"6px"}}},"& .text-field-content-after":{lineHeight:"32px","& svg":{top:"6px"}}}},"&.text-field-large":{"& .text-field-content":{height:"40px","& .text-field-content-before":{lineHeight:"38px","& svg":{top:"9px"}},"& .text-field-content-within":{"& .text-field-content-within-input":{"& > div":{height:"38px","& > div":{height:"100%"}}},"& input":{padding:"11px 10px"},"& .text-field-label-placeholder":{lineHeight:"38px"},"& .right-icon":{paddingTop:"10px"},"& .length-limit":{lineHeight:"38px"}},"& .text-field-content-after":{lineHeight:"38px","& svg":{top:"9px"}}}}},"text-field-select":{"& > div":{maxWidth:"none",padding:"0",backgroundColor:g.textColor.white,boxShadow:g.boxShadow,borderRadius:g.borderRadius,"& > span":{color:g.textColor.white},"& .text-field-select-content":{maxHeight:"300px",overflow:"auto","& > .text-field-select-content-item":{display:"flex",padding:"7px 10px",cursor:"pointer",lineHeight:"16px",color:g.textColor.secondary,"&:hover":{backgroundColor:g.bgBorderColor.bg2,color:g.thmemColor.primary},"&.text-field-select-content-item-keydown":{backgroundColor:g.bgBorderColor.bg2,color:g.thmemColor.primary}},"&.text-field-select-content-loading":{height:"100px",position:"relative",overflow:"hidden","& > .loading-box":{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",backgroundColor:"white",display:"flex",justifyContent:"center",alignItems:"center","& > svg":{transition:"all .3s ease-in-out",animation:"$rotate 1s infinite linear",fontSzie:"20px"}}}}}}})}));t.default=function(e){var t=e.className,o=e.size,a=void 0===o?"small":o,s=e.labelMode,p=void 0===s?"outside":s,h=e.placeholder,f=void 0===h?"":h,g=e.label,y=void 0===g?"":g,C=e.disabled,w=void 0!==C&&C,j=e.multiline,k=void 0!==j&&j,S=e.required,O=void 0!==S&&S,F=e.showLabelSign,N=void 0===F||F,z=e.labelSign,E=e.rows,T=void 0===E?2:E,B=e.error,q=void 0!==B&&B,L=e.helperText,P=void 0===L?"":L,M=e.addonBefore,A=void 0===M?"":M,D=e.addonAfter,I=void 0===D?"":D,R=e.value,H=e.controlled,W=void 0!==H&&H,Z=e.autoFocus,V=void 0!==Z&&Z,_=e.type,U=void 0===_?"text":_,G=e.onClickIcon,K=e.rightIcon,$=e.showRightIcon,Y=void 0===$||$,J=e.limitLength,X=e.fetchSuggestions,Q=e.selectPopoverClass,ee=e.renderSelectItem,te=e.showSelectName,oe=void 0===te?"value":te,ie=e.onBlur,re=e.onFocus,ne=e.onChange,le=e.onKeydown,ae=e.onKeyUp,ce=e.onEnter,se=e.onClickAddonBefore,de=e.onClickAddonAfter,pe=e.onSelect,ue=x(e,["className","size","labelMode","placeholder","label","disabled","multiline","required","showLabelSign","labelSign","rows","error","helperText","addonBefore","addonAfter","value","controlled","autoFocus","type","onClickIcon","rightIcon","showRightIcon","limitLength","fetchSuggestions","selectPopoverClass","renderSelectItem","showSelectName","onBlur","onFocus","onChange","onKeydown","onKeyUp","onEnter","onClickAddonBefore","onClickAddonAfter","onSelect"]),he=b(e),fe=(0,r.useState)("text-field-select-content-"+(0,v.UUID)())[0],ve=(0,r.useState)(!0),me=ve[0],xe=ve[1],ge=(0,r.useState)(),be=ge[0],ye=ge[1],Ce=(0,r.useState)(!1),we=Ce[0],je=Ce[1],ke=(0,r.useState)(0),Se=ke[0],Oe=ke[1],Fe=(0,r.useState)("text"),Ne=Fe[0],ze=Fe[1],Ee=(0,r.useState)(!1),Te=Ee[0],Be=Ee[1],qe=(0,r.useState)(!1),Le=qe[0],Pe=qe[1],Me=(0,r.useState)([]),Ae=Me[0],De=Me[1],Ie=((0,r.useState)({})[0],(0,r.useRef)(null)),Re=(0,r.useRef)(null),He=(0,r.useRef)(null);(0,r.useEffect)((function(){Ie&&Ie.current&&Oe(Ie.current.offsetWidth)}),[]),(0,r.useEffect)((function(){U!==Ne&&ze(U)}),[U]),(0,r.useEffect)((function(){var e=Ze(R);ye(e)}),[R]),(0,r.useEffect)((function(){xe(""===be||void 0===be)}),[be]),(0,r.useEffect)((function(){X&&Be(we)}),[we,X]),(0,r.useEffect)((function(){return Te?window.addEventListener("keydown",Ge):window.removeEventListener("keydown",Ge),function(){window.removeEventListener("keydown",Ge)}}),[Te]);var We,Ze=function(t){var o=t;return t&&e.limitLength&&t.toString().length>e.limitLength&&(o=o.toString().substr(0,e.limitLength)),o},Ve=function(){w||(xe(!1),(Re&&Re.current&&Re.current.querySelector(k?"textarea":"input")).focus())},_e=function(e){var t=e.selectDom,o=e.keyCode,i=e.currentDom,r="nextSibling",n=".text-field-select-content-item";38===o&&(r="previousSibling",n=".text-field-select-content-item:last-child"),i?(i=i[r])||(i=t.querySelector(n)):i=t.querySelector(".text-field-select-content-item"),i&&(i.classList.add("text-field-select-content-item-keydown"),Ue(i,t))},Ue=function(e,t){var o=t.clientHeight,i=e.offsetTop+e.clientHeight-o;t.scrollTop=i>0?i:0},Ge=function(e){var t=document.querySelector("."+fe),o=null,i=t.querySelector(".text-field-select-content-item-keydown");if(13===e.keyCode&&i){var r=i.dataset.val;ot(JSON.parse(r))(e),(Re&&Re.current&&Re.current.querySelector(k?"textarea":"input")).blur()}i&&(o=i,i.classList.remove("text-field-select-content-item-keydown")),40===e.keyCode&&_e({selectDom:t,keyCode:e.keyCode,currentDom:o}),38===e.keyCode&&_e({selectDom:t,keyCode:e.keyCode,currentDom:o})},Ke=function(e){je(!1),""===e.target.value&&xe(!0),ie&&ie(e)},$e=function(e){Pe(!0),X&&X(e,(function(e){De(e||[]),Pe(!1)}))},Ye=function(e){je(!0),re&&re(e),$e(e.target.value)},Je=function(e){var t=e.target.value;J&&void 0!==t&&""!==t&&t.toString().length>J||(W||ye(t),ne&&ne(e),$e(e.target.value))},Xe=function(e){13===e.keyCode&&ce&&ce(e),le&&le(e)},Qe=function(e){ae&&ae(e)},et=function(e){"password"===U&&("text"===Ne&&ze("password"),"password"===Ne&&ze("text")),G&&G(e)},tt=function(){Be(!1)},ot=function(e){return function(t){pe&&pe(e)}},it=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:void 0!==J&&(0,i.jsx)("span",m({className:"length-limit"},{children:(be?be.toString().length:0)+"/"+J}),void 0)},void 0)}),[J,be]),rt=(0,r.useMemo)((function(){return(0,i.jsx)(i.Fragment,{children:Y&&(0,i.jsx)("span",m({className:"right-icon",onClick:et},{children:K||("password"===U?"password"===Ne?(0,i.jsx)(d(),{},void 0):(0,i.jsx)(c(),{},void 0):null)}),void 0)},void 0)}),[Y,K,U,Ne]),nt=(0,r.useMemo)((function(){return(0,i.jsxs)("div",m({className:"text-field-content-within",ref:He},{children:[(0,i.jsxs)("div",m({className:"text-field-content-within-input"},{children:[(0,i.jsx)(n.TextField,m({size:"small",variant:"outlined",autoFocus:V,ref:Re,type:Ne,value:be||"",disabled:w,multiline:k,rows:T,onBlur:Ke,onFocus:Ye,onChange:Je,onKeyDown:Xe,onKeyUp:Qe},ue),void 0),me&&(0,i.jsx)("span",m({className:"text-field-label-placeholder",onClick:Ve},{children:"outside"===p?f:(0,i.jsxs)(i.Fragment,{children:[y||f,N&&(0,i.jsx)("span",m({className:"identification-label"},{children:z||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]},void 0)}),void 0)]}),void 0),it,rt]}),void 0)}),[me,V,Ne,be,it,rt,p,f,y,w,k,T,ue,ne,X]),lt=(0,r.useMemo)((function(){var e;return(0,i.jsxs)("div",m({className:(e="text-field-select-content",Le&&(e+=" text-field-select-content-loading"),fe&&(e+=" "+fe),e),style:{width:(He&&He.current?He.current.offsetWidth:0)+"px"}},{children:[Ae&&Ae.map((function(e,t){return(0,i.jsx)("div",m({className:"text-field-select-content-item",onMouseDown:ot(e),"data-val":JSON.stringify(e)},{children:ee?ee(e):(0,i.jsx)(l.default,{children:e[oe]},void 0)}),t)})),Le&&(0,i.jsx)("div",m({className:"loading-box"},{children:(0,i.jsx)(u(),{},void 0)}),void 0)]}),void 0)}),[He,Te,Ae,ee,oe,pe,Le,fe]),at=(0,r.useMemo)((function(){return(0,i.jsx)(n.Tooltip,m({open:Te,title:lt,onClose:tt,interactive:!0,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,classes:{popper:(e=he["text-field-select"],Q&&(e+=" "+Q),e)}},{children:nt}),void 0);var e}),[me,V,Ne,be,it,rt,p,f,y,w,k,T,ue,ne,X,pe,He,Te,Q]),ct=(0,r.useMemo)((function(){var e=Boolean(N&&(z||O));if("outside"===p&&(y||e))return(0,i.jsxs)("label",m({className:"text-field-label"},{children:[y,N&&(0,i.jsx)("span",m({className:"identification-label"},{children:z||(0,i.jsx)(i.Fragment,{children:O?"(必填)":""},void 0)}),void 0)]}),void 0)}),[p,y,N,z,O]);return(0,i.jsxs)("div",m({className:(We=he["text-field"],We+=" text-field",a&&!k&&(We+=" text-field-"+a),t&&(We+=" "+t),q&&(We+=" text-field-error"),we&&(We+=" text-field-focus"),w&&(We+=" text-field-disabled"),k&&(We+=" text-field-multiline"),We)},{children:[ct,(0,i.jsxs)("div",m({className:"text-field-content"},{children:[A&&(0,i.jsx)("div",m({className:"text-field-content-before",ref:Ie,onClick:function(e){se&&se(e)}},{children:A}),void 0),X?at:nt,I&&(0,i.jsx)("div",m({className:"text-field-content-after",onClick:function(e){de&&de(e)}},{children:I}),void 0)]}),void 0),P&&(0,i.jsx)("p",m({className:"text-field-error-text",style:{marginLeft:Se+"px"}},{children:P}),void 0)]}),void 0)}},1731:function(e){e.exports=i},8604:function(e){e.exports=o},6110:function(e){e.exports=d},19:function(e){e.exports=p},6243:function(e){e.exports=u},6028:function(e){e.exports=c},9973:function(e){e.exports=h},1102:function(e){e.exports=l},6570:function(e){e.exports=n},8528:function(e){e.exports=r},4115:function(e){e.exports=s},6897:function(e){e.exports=t},3475:function(e){e.exports=a},9297:function(t){t.exports=e}},v={};function m(e){var t=v[e];if(void 0!==t)return t.exports;var o=v[e]={exports:{}};return f[e](o,o.exports,m),o.exports}m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var o in t)m.o(t,o)&&!m.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var x={};return function(){m.r(x);var e=m(7712),t=m(9297),o=m.n(t),i=m(7178),r=m(3053),n=function(){return n=Object.assign||function(e){for(var t,o=1,i=arguments.length;o<i;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)},l=function(e,t,o){if(o||2===arguments.length)for(var i,r=0,n=t.length;r<n;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};x.default=function(t){var a=t.FormProps,c=t.configList,s=t.type,d=t.getCheckForm,p=t.backData,u=void 0===p?{}:p,h=t.disabled,f=t.onChange,v=t.getForcedRefresh,m=t.form,x=o().useState(c),g=x[0],b=x[1],y=o().useRef({allItems:{},itemsCheckStatus:{},itemsCheckMessage:{},allValues:u}),C=function(e,t){if(t)for(var o in t)y.current.allValues[o]=t[o];b(e||g&&l([],g,!0))},w=function(e,t,o){switch(t){case"status":y.current.itemsCheckStatus[e]=o;break;case"message":y.current.itemsCheckMessage[e]=o;break;case"item":y.current.allItems[e]=o;break;case"initValue":y.current.allValues[e]=o;break;default:y.current.allValues[e]=o,f&&f(e,o)}},j=function(){var e=0;for(var t in y.current.allItems){var o=y.current.allItems[t];if(!o.disabled&&!o.hide&&!0!==y.current.itemsCheckStatus[t])if(!1!==y.current.itemsCheckStatus[t]){var i=(0,r.Z)(o,y.current.allValues[t]);i&&(e++,"string"==typeof i&&(y.current.itemsCheckMessage[t]=i),o.setErrorMsg&&o.setErrorMsg(i))}else e++}return console.log("checkFrom",e),!e&&y.current.allValues};return o().useEffect((function(){d&&d(j),v&&v(C)}),[d,v]),o().useEffect((function(){for(var e in u)y.current.allValues[e]=u[e]}),[u]),o().useEffect((function(){b(c)}),[c]),o().useEffect((function(){m&&(m.current={get refreshForm(){return C},get check(){return j},get items(){return y.current.allItems},get values(){return y.current.allValues},get refData(){return y.current}})}),[m]),(0,e.jsx)("form",n({},a,{children:(0,e.jsx)("div",n({className:"para-form-content"},{children:g&&g.length>0&&g.map((function(t,o){return t.hide&&w(t.name,"item",t),!t.hide&&(0,e.jsx)(i.default,n({type:s,disabled:h,errorMessage:y.current.itemsCheckMessage[t.name]},t,{backData:y.current.allValues,setValue:w}),"para-form-item-".concat(o))}))}),void 0)}),void 0)}}(),x}()}));
|