filesbox/web/dist/70798.da7b39ee.async.js

2 lines
29 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[70798],{2603:function(he,G,a){"use strict";a.d(G,{Z:function(){return j}});var U=a(28991),T=a(67294),te={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"},z=te,ne=a(27029),w=function(Q,C){return T.createElement(ne.Z,(0,U.Z)((0,U.Z)({},Q),{},{ref:C,icon:z}))};w.displayName="LockOutlined";var j=T.forwardRef(w)},76734:function(he){he.exports={newColorPicker:"newColorPicker___2va38"}},44943:function(){},96328:function(he,G,a){"use strict";var U=a(67294),T=a(79941),te=a(53390),z=a(76734),ne=a.n(z),w=a(85893);function j(C){var I=C.offsetTop;return C.offsetParent!=null&&(I+=j(C.offsetParent)),I}function ae(C){var I=C.offsetLeft;return C.offsetParent!=null&&(I+=ae(C.offsetParent)),I}class Q extends U.Component{constructor(){super(...arguments);this.state={displayColorPicker:!1,pageX:0,pageY:0},this.handleClick=I=>{var n=this.props.cssData,o=n===void 0?{devX:0,devY:0}:n,re=o.devX,E=o.devY;this.first=!0;var L=root.clientWidth,M=root.clientHeight,Z=$(I.target),x=Z.offset().left+re,K=Z.offset().top+Z.outerHeight()+5+E;x+220>L&&(x=L-220),K+333>M&&(K=M-333),this.setState({displayColorPicker:!this.state.displayColorPicker,pageX:x,pageY:K})},this.handleClear=()=>{var I=this.props.onChange,n=I===void 0?o=>{}:I;this.setState({displayColorPicker:!1,scrollTop:0}),n("transparent")},this.handleClose=()=>{this.setState({displayColorPicker:!1,scrollTop:0})}}render(){var I=this.props,n=I.className,o=n===void 0?"colorPicker":n,re=I.onChange,E=re===void 0?F=>{}:re,L=I.value,M=L===void 0?"#000000":L,Z=I.style,x=this.state,K=x.pageX,le=x.pageY,J=F=>{F.rgb.a<1&&!(this.first&&F.rgb.a==0)?E("rgba(".concat(F.rgb.r,", ").concat(F.rgb.g,", ").concat(F.rgb.b,", ").concat(F.rgb.a,")")):E(F.hex),this.first=!1},V=(0,T.ZP)({default:{color:{height:"100%",borderRadius:"2px",background:M},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:le,left:K},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,w.jsxs)("div",{style:Z,className:o+" "+ne().newColorPicker,children:[(0,w.jsx)("div",{style:V.swatch,onClick:this.handleClick,children:(0,w.jsx)("div",{style:V.colorBox,children:(0,w.jsx)("div",{style:V.color})})}),this.state.displayColorPicker?(0,w.jsxs)("div",{style:V.popover,children:[(0,w.jsx)("div",{style:V.clearBtn,onClick:this.handleClear,children:"\u6E05\u7A7A"}),(0,w.jsx)("div",{style:V.cover,onClick:this.handleClose}),(0,w.jsx)(te.xS,{color:M,onChange:J})]}):null]})}}G.Z=Q},56678:function(he,G,a){"use strict";a.r(G),a.d(G,{default:function(){return ee}});var U=a(48736),T=a(27049),te=a(20136),z=a(55241),ne=a(47673),w=a(4107),j=a(66126),ae=a(99177),Q=a(13062),C=a(71230),I=a(89032),n=a(15746),o=a(11849),re=a(77883),E=a(85986),L=a(88983),M=a(47933),Z=a(43358),x=a(34041),K=a(67294),le=a(28216),J=a(28991),V={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464H332V240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v68c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-68c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32