(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[86606],{76734:function(h){h.exports={newColorPicker:"newColorPicker___2va38"}},11751:function(h){h.exports={root:"root___2bSDf",colorWeak:"colorWeak___1yU3e","ant-layout":"ant-layout___3lZ8G",globalSpin:"globalSpin___2czPt","ant-table":"ant-table___3ADWe","ant-table-thead":"ant-table-thead___3RrD_","ant-table-tbody":"ant-table-tbody___2cyZG",formBox:"formBox___2w-Ew",menu:"menu___1greV"}},96328:function(h,_,e){"use strict";var r=e(67294),O=e(79941),U=e(53390),W=e(76734),K=e.n(W),d=e(85893);function j(v){var s=v.offsetTop;return v.offsetParent!=null&&(s+=j(v.offsetParent)),s}function R(v){var s=v.offsetLeft;return v.offsetParent!=null&&(s+=R(v.offsetParent)),s}class M extends r.Component{constructor(){super(...arguments);this.state={displayColorPicker:!1,pageX:0,pageY:0},this.handleClick=s=>{var m=this.props.cssData,f=m===void 0?{devX:0,devY:0}:m,P=f.devX,D=f.devY;this.first=!0;var C=root.clientWidth,c=root.clientHeight,x=$(s.target),t=x.offset().left+P,E=x.offset().top+x.outerHeight()+5+D;t+220>C&&(t=C-220),E+333>c&&(E=c-333),this.setState({displayColorPicker:!this.state.displayColorPicker,pageX:t,pageY:E})},this.handleClear=()=>{var s=this.props.onChange,m=s===void 0?f=>{}:s;this.setState({displayColorPicker:!1,scrollTop:0}),m("transparent")},this.handleClose=()=>{this.setState({displayColorPicker:!1,scrollTop:0})}}render(){var s=this.props,m=s.className,f=m===void 0?"colorPicker":m,P=s.onChange,D=P===void 0?i=>{}:P,C=s.value,c=C===void 0?"#000000":C,x=s.style,t=this.state,E=t.pageX,I=t.pageY,A=i=>{i.rgb.a<1&&!(this.first&&i.rgb.a==0)?D("rgba(".concat(i.rgb.r,", ").concat(i.rgb.g,", ").concat(i.rgb.b,", ").concat(i.rgb.a,")")):D(i.hex),this.first=!1},g=(0,O.ZP)({default:{color:{height:"100%",borderRadius:"2px",background:c},colorBox:{height:"100%",borderRadius:"2px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",background:'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")'},swatch:{width:"100%",height:"100%",padding:"2px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px rgba(0,0,0,.1)",display:"inline-block",cursor:"pointer"},popover:{position:"fixed",zIndex:"101",background:"#ccc",top:I,left:E},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"},clearBtn:{position:"absolute",bottom:"10px",height:"18px",lineHeight:"18px",right:"8px",zIndex:1,fontSize:"12px",cursor:"pointer"}}});return(0,d.jsxs)("div",{style:x,className:f+" "+K().newColorPicker,children:[(0,d.jsx)("div",{style:g.swatch,onClick:this.handleClick,children:(0,d.jsx)("div",{style:g.colorBox,children:(0,d.jsx)("div",{style:g.color})})}),this.state.displayColorPicker?(0,d.jsxs)("div",{style:g.popover,children:[(0,d.jsx)("div",{style:g.clearBtn,onClick:this.handleClear,children:"\u6E05\u7A7A"}),(0,d.jsx)("div",{style:g.cover,onClick:this.handleClose}),(0,d.jsx)(U.xS,{color:c,onChange:A})]}):null]})}}_.Z=M},86606:function(h,_,e){"use strict";e.r(_),e.d(_,{default:function(){return g}});var r=e(71194),O=e(50146),U=e(57663),W=e(71577),K=e(13062),d=e(71230),j=e(89032),R=e(15746),M=e(11849),v=e(43358),s=e(34041),m=e(67294),f=e(28216),P=e(11751),D=e.n(P),C=e(41273),c=e(30672),x=e(96328),t=e(85893),E,I,A=s.Z.Option,g=(E=(0,f.$j)(i=>{var a=i.commondesign,n=i.page;return{commondesign:a,page:n}}),E(I=class extends m.PureComponent{constructor(){super(...arguments);this.state={visible:!1,width:520,openstyle:"hover",animation:"fadeIn"},this.show=a=>{this.setState({openstyle:a.attr("data-menuopenstyle")||"hover",animation:a.attr("data-menuanimation")||"fadeIn"})},this.updataDomCallBack=a=>{var n=this,l=n.state,o=l.openstyle,y=l.animation,B=this.props.commondesign,p=B.MenuNav,u=p.element,T=p.callback,k=p.callClose,b=u.find(">.menuBox"),L=b.attr("data-mid")||(0,C.U$)(),Z=u.attr("data-mid");b.length<1&&u.append(''),u.attr("data-menuopenstyle",o),u.attr("data-menuanimation",y)},this.cancelEvent=()=>{var a=this,n=this.props.dispatch;n({type:"commondesign/setState",payload:{MenuNav:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var a=this.props,n=a.visible,l=a.element,o=a.callback,y=a.callClose,B=a.commondesign;this.setState({visible:n,callback:o}),this.show(l)}componentWillUnmount(){}renderMenuCanvas(){var a=this.state,n=a.menuW,l=a.menuH,o=a.bgcolor;return(0,t.jsx)("div",{className:"menuCanvas",children:(0,t.jsx)("div",{className:"shadowModel",children:(0,t.jsx)("div",{className:"canvasMenu",id:"canvasMenu",style:{width:n,height:l,backgroundColor:o}})})})}renderMenuSetting(){var a=this.state,n=a.openstyle,l=a.animation,o=(0,c.lw)((0,c.Kd)()),y={style:{width:180},value:l,onChange:p=>{this.setState({animation:p})}},B={style:{width:180},value:n,onChange:p=>{this.setState({openstyle:p})}};return(0,t.jsx)("div",{className:"menuSetting",children:(0,t.jsxs)(d.Z,{children:[(0,t.jsxs)(R.Z,{children:[(0,t.jsx)("span",{className:"label",children:o.formatMessage({id:"mack.dsl.d"})}),(0,t.jsxs)(s.Z,(0,M.Z)((0,M.Z)({},y),{},{children:[!1,(0,t.jsx)(A,{value:"fadeIn",children:o.formatMessage({id:"mack.dsl.e"})}),(0,t.jsx)(A,{value:"rollUp",children:o.formatMessage({id:"mack.dsl.f"})})]}))]}),(0,t.jsxs)(R.Z,{children:[(0,t.jsx)("span",{className:"label",children:o.formatMessage({id:"mack.dsl.g"})}),(0,t.jsxs)(s.Z,(0,M.Z)((0,M.Z)({},B),{},{style:{width:180},children:[(0,t.jsx)(A,{value:"hover",children:"hover"}),(0,t.jsx)(A,{value:"click",children:o.formatMessage({id:"mack.dsl.h"})})]}))]})]})})}render(){var a=this,n=this.state.width,l=this.props,o=l.commondesign,y=l.element,B=l.dispatch,p=l.visible,u=o.MenuNav.callback,T=(0,c.lw)((0,c.Kd)()),k=()=>{var L={};a.updataDomCallBack(L),u&&u(L),a.cancelEvent()},b=()=>{a.cancelEvent()};return(0,t.jsxs)(O.Z,{title:T.formatMessage({id:"mack.dsl.i"}),visible:p,onOk:k,width:n,onCancel:b,maskClosable:!1,className:D().menu,footer:null,children:[(0,t.jsxs)("div",{className:"main",children:[!1,this.renderMenuSetting()]}),(0,t.jsxs)("div",{className:"footer",style:{width:1175},children:[(0,t.jsx)(W.Z,{onClick:k,type:"primary",children:T.formatMessage({id:"common.ok"})}),(0,t.jsx)(W.Z,{onClick:b,children:T.formatMessage({id:"common.cancel"})})]})]})}})||I)},15746:function(h,_,e){"use strict";var r=e(21584);_.Z=r.Z},89032:function(h,_,e){"use strict";var r=e(38663),O=e.n(r),U=e(6999)},71230:function(h,_,e){"use strict";var r=e(92820);_.Z=r.Z},13062:function(h,_,e){"use strict";var r=e(38663),O=e.n(r),U=e(6999)}}]);