@advt-gpt-chart/package 3.0.7 → 3.0.8
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/dist/index.es.js +230 -233
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.gz +0 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.js
CHANGED
|
@@ -10586,7 +10586,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
10586
10586
|
`,HT=({loadingText:i})=>we.jsxs(H3i,{className:"gpt-vis-loading",children:[we.jsx("div",{className:"gpt-vis-loading-icon",children:we.jsxs("div",{className:"loading-svg-ele",children:[we.jsx("svg",{width:"0",height:"0",children:we.jsx("defs",{children:we.jsxs("linearGradient",{id:"loadingCircleStrokeGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[we.jsx("stop",{offset:"0%",stopColor:"#008CD6"}),we.jsx("stop",{offset:"100%",stopColor:"#00CC66"})]})})}),we.jsx("svg",{viewBox:"22 22 44 44",children:we.jsx("circle",{className:"loading-svg-circle",cx:"44",cy:"44",r:"20.2",fill:"none",strokeWidth:"3.6"})})]})}),we.jsx("p",{children:i})]});var Nae=new Map,FL=new WeakMap,MGe=0,$3i;function z3i(i){return i?(FL.has(i)||(MGe+=1,FL.set(i,MGe.toString())),FL.get(i)):"0"}function W3i(i){return Object.keys(i).sort().filter(e=>i[e]!==void 0).map(e=>`${e}_${e==="root"?z3i(i.root):i[e]}`).toString()}function V3i(i){const e=W3i(i);let t=Nae.get(e);if(!t){const n=new Map;let r;const o=new IntersectionObserver(a=>{a.forEach(s=>{var l;const u=s.isIntersecting&&r.some(c=>s.intersectionRatio>=c);i.trackVisibility&&typeof s.isVisible=="undefined"&&(s.isVisible=u),(l=n.get(s.target))==null||l.forEach(c=>{c(u,s)})})},i);r=o.thresholds||(Array.isArray(i.threshold)?i.threshold:[i.threshold||0]),t={id:e,observer:o,elements:n},Nae.set(e,t)}return t}function j3i(i,e,t={},n=$3i){if(typeof window.IntersectionObserver=="undefined"&&n!==void 0){const l=i.getBoundingClientRect();return e(n,{isIntersecting:n,target:i,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:r,observer:o,elements:a}=V3i(t),s=a.get(i)||[];return a.has(i)||a.set(i,s),s.push(e),o.observe(i),function(){s.splice(s.indexOf(e),1),s.length===0&&(a.delete(i),o.unobserve(i)),a.size===0&&(o.disconnect(),Nae.delete(r))}}function U3i({threshold:i,delay:e,trackVisibility:t,rootMargin:n,root:r,triggerOnce:o,skip:a,initialInView:s,fallbackInView:l,onChange:u}={}){var c;const[h,d]=M.useState(null),f=M.useRef(u),g=M.useRef(s),[p,m]=M.useState({inView:!!s,entry:void 0});f.current=u,M.useEffect(()=>{if(g.current===void 0&&(g.current=s),a||!h)return;let _;return _=j3i(h,(S,x)=>{const w=g.current;g.current=S,!(w===void 0&&!S)&&(m({inView:S,entry:x}),f.current&&f.current(S,x),x.isIntersecting&&o&&_&&(_(),_=void 0))},{root:r,rootMargin:n,threshold:i,trackVisibility:t,delay:e},l),()=>{_&&_()}},[Array.isArray(i)?i.toString():i,h,r,n,o,a,t,l,e]);const v=(c=p.entry)==null?void 0:c.target,b=M.useRef(void 0);!h&&v&&!o&&!a&&b.current!==v&&(b.current=v,m({inView:!!s,entry:void 0}),g.current=s);const y=[d,p.inView,p.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}const G3i=Es.div`
|
|
10587
10587
|
height: 100%;
|
|
10588
10588
|
width: 100%;
|
|
10589
|
-
`,Hae=({visible:i,title:e,message:t})=>i?we.jsx(G3i,{className:"error-container",children:we.jsx(QA,{status:"error",title:e,subTitle:t})}):null,kGe=ce.createContext(null);function OGe(){const i=ce.useContext(kGe);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const IGe="3.0.7",$ae=ce.createContext({});function DGe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var r=i.length;for(e=0;e<r;e++)i[e]&&(t=DGe(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function zae(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=DGe(i))&&(n&&(n+=" "),n+=e);return n}const q3i={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ou=Math.round;function Wae(i,e){const t=i.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)n[r]=e(n[r]||0,t[r]||"",r);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const PGe=(i,e,t)=>t===0?i:i/100;function $T(i,e){const t=e||255;return i>t?t:i<0?0:i}class yS{constructor(e){sc(this,"isValid",!0);sc(this,"r",0);sc(this,"g",0);sc(this,"b",0);sc(this,"a",1);sc(this,"_h");sc(this,"_s");sc(this,"_l");sc(this,"_v");sc(this,"_max");sc(this,"_min");sc(this,"_brightness");function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let r=function(o){return n.startsWith(o)};const n=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(r("rgb"))this.fromRgbString(n);else if(r("hsl"))this.fromHslString(n);else if(r("hsv")||r("hsb"))this.fromHsvString(n);else{const o=q3i[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof yS)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=$T(e.r),this.g=$T(e.g),this.b=$T(e.b),this.a=typeof e.a=="number"?$T(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(typeof this._h=="undefined"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=ou(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s=="undefined"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l=="undefined"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v=="undefined"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness=="undefined"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,o=s=>(n[s]-this[s])*r+this[s],a={r:ou(o("r")),g:ou(o("g")),b:ou(o("b")),a:ou(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=o=>ou((this[o]*this.a+t[o]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.b||0).toString(16);if(e+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ou(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=ou(this.getSaturation()*100),n=ou(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=$T(t,n),r}_c(e){return new this.constructor(e)}getMax(){return typeof this._max=="undefined"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min=="undefined"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(r,o){return parseInt(t[r]+t[o||r],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof r=="number"?r:1,t<=0){const d=ou(n*255);this.r=d,this.g=d,this.b=d}let o=0,a=0,s=0;const l=e/60,u=(1-Math.abs(2*n-1))*t,c=u*(1-Math.abs(l%2-1));l>=0&&l<1?(o=u,a=c):l>=1&&l<2?(o=c,a=u):l>=2&&l<3?(a=u,s=c):l>=3&&l<4?(a=c,s=u):l>=4&&l<5?(o=c,s=u):l>=5&&l<6&&(o=u,s=c);const h=n-u/2;this.r=ou((o+h)*255),this.g=ou((a+h)*255),this.b=ou((s+h)*255)}fromHsv({h:e,s:t,v:n,a:r}){this._h=e%360,this._s=t,this._v=n,this.a=typeof r=="number"?r:1;const o=ou(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const a=e/60,s=Math.floor(a),l=a-s,u=ou(n*(1-t)*255),c=ou(n*(1-t*l)*255),h=ou(n*(1-t*(1-l))*255);switch(s){case 0:this.g=h,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=h;break;case 3:this.r=u,this.g=c;break;case 4:this.r=h,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(e){const t=Wae(e,PGe);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Wae(e,PGe);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Wae(e,(n,r)=>r.includes("%")?ou(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const NL=2,LGe=.16,Y3i=.05,X3i=.05,K3i=.15,BGe=5,FGe=4,Z3i=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function NGe(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-NL*e:Math.round(i.h)+NL*e:n=t?Math.round(i.h)+NL*e:Math.round(i.h)-NL*e,n<0?n+=360:n>=360&&(n-=360),n}function HGe(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-LGe*e:e===FGe?n=i.s+LGe:n=i.s+Y3i*e,n>1&&(n=1),t&&e===BGe&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function $Ge(i,e,t){let n;return t?n=i.v+X3i*e:n=i.v-K3i*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Q3i(i,e={}){const t=[],n=new yS(i),r=n.toHsv();for(let o=BGe;o>0;o-=1){const a=new yS({h:NGe(r,o,!0),s:HGe(r,o,!0),v:$Ge(r,o,!0)});t.push(a)}t.push(n);for(let o=1;o<=FGe;o+=1){const a=new yS({h:NGe(r,o),s:HGe(r,o),v:$Ge(r,o)});t.push(a)}return e.theme==="dark"?Z3i.map(({index:o,amount:a})=>new yS(e.backgroundColor||"#141414").mix(t[o],a).toHexString()):t.map(o=>o.toHexString())}const Vae=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Vae.primary=Vae[5];function J3i(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function exi(i,e){if(!i)return!1;if(i.contains)return i.contains(e);let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const zGe="data-rc-order",WGe="data-rc-priority",txi="rc-util-key",jae=new Map;function VGe({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:txi}function Uae(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function ixi(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function Gae(i){return Array.from((jae.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function jGe(i,e={}){if(!J3i())return null;const{csp:t,prepend:n,priority:r=0}=e,o=ixi(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(zGe,o),a&&r&&s.setAttribute(WGe,`${r}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=i;const l=Uae(e),{firstChild:u}=l;if(n){if(a){const c=(e.styles||Gae(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(zGe)))return!1;const d=Number(h.getAttribute(WGe)||0);return r>=d});if(c.length)return l.insertBefore(s,c[c.length-1].nextSibling),s}l.insertBefore(s,u)}else l.appendChild(s);return s}function nxi(i,e={}){let{styles:t}=e;return t||(t=Gae(Uae(e))),t.find(n=>n.getAttribute(VGe(e))===i)}function rxi(i,e){const t=jae.get(i);if(!t||!exi(document,t)){const n=jGe("",e),{parentNode:r}=n;jae.set(i,r),i.removeChild(n)}}function oxi(i,e,t={}){var l,u,c;const n=Uae(t),r=Gae(n),o=Pi(ke({},t),{styles:r});rxi(n,o);const a=nxi(e,o);if(a)return(l=o.csp)!=null&&l.nonce&&a.nonce!==((u=o.csp)==null?void 0:u.nonce)&&(a.nonce=(c=o.csp)==null?void 0:c.nonce),a.innerHTML!==i&&(a.innerHTML=i),a;const s=jGe(i,o);return s.setAttribute(VGe(o),e),s}function UGe(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function axi(i){return UGe(i)instanceof ShadowRoot}function sxi(i){return axi(i)?UGe(i):null}var GGe={};let qae={};const Yae=[],lxi=i=>{Yae.push(i)};function uxi(i,e){if(GGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Yae.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function cxi(i,e){if(GGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Yae.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function hxi(){qae={}}function qGe(i,e,t){!e&&!qae[t]&&(i(!1,t),qae[t]=!0)}function HL(i,e){qGe(uxi,i,e)}function dxi(i,e){qGe(cxi,i,e)}HL.preMessage=lxi,HL.resetWarned=hxi,HL.noteOnce=dxi;function fxi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Xae(i,e){HL(i,`[@ant-design/icons] ${e}`)}function YGe(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function XGe(i={}){return Object.keys(i).reduce((e,t)=>{const n=i[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[fxi(t)]=n}return e},{})}function Kae(i,e,t){return t?ce.createElement(i.tag,ke(ke({key:e},XGe(i.attrs)),t),(i.children||[]).map((n,r)=>Kae(n,`${e}-${i.tag}-${r}`))):ce.createElement(i.tag,ke({key:e},XGe(i.attrs)),(i.children||[]).map((n,r)=>Kae(n,`${e}-${i.tag}-${r}`)))}function KGe(i){return Q3i(i)[0]}function ZGe(i){return i?Array.isArray(i)?i:[i]:[]}const gxi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},pxi=`
|
|
10589
|
+
`,Hae=({visible:i,title:e,message:t})=>i?we.jsx(G3i,{className:"error-container",children:we.jsx(QA,{status:"error",title:e,subTitle:t})}):null,kGe=ce.createContext(null);function OGe(){const i=ce.useContext(kGe);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const IGe="3.0.8",$ae=ce.createContext({});function DGe(i){var e,t,n="";if(typeof i=="string"||typeof i=="number")n+=i;else if(typeof i=="object")if(Array.isArray(i)){var r=i.length;for(e=0;e<r;e++)i[e]&&(t=DGe(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function zae(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=DGe(i))&&(n&&(n+=" "),n+=e);return n}const q3i={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},ou=Math.round;function Wae(i,e){const t=i.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=t.map(r=>parseFloat(r));for(let r=0;r<3;r+=1)n[r]=e(n[r]||0,t[r]||"",r);return t[3]?n[3]=t[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const PGe=(i,e,t)=>t===0?i:i/100;function $T(i,e){const t=e||255;return i>t?t:i<0?0:i}class yS{constructor(e){sc(this,"isValid",!0);sc(this,"r",0);sc(this,"g",0);sc(this,"b",0);sc(this,"a",1);sc(this,"_h");sc(this,"_s");sc(this,"_l");sc(this,"_v");sc(this,"_max");sc(this,"_min");sc(this,"_brightness");function t(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let r=function(o){return n.startsWith(o)};const n=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(r("rgb"))this.fromRgbString(n);else if(r("hsl"))this.fromHslString(n);else if(r("hsv")||r("hsb"))this.fromHsvString(n);else{const o=q3i[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof yS)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(t("rgb"))this.r=$T(e.r),this.g=$T(e.g),this.b=$T(e.b),this.a=typeof e.a=="number"?$T(e.a,1):1;else if(t("hsl"))this.fromHsl(e);else if(t("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const t=this.toHsv();return t.h=e,this._c(t)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const t=e(this.r),n=e(this.g),r=e(this.b);return .2126*t+.7152*n+.0722*r}getHue(){if(typeof this._h=="undefined"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=ou(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s=="undefined"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l=="undefined"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v=="undefined"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness=="undefined"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()-e/100;return r<0&&(r=0),this._c({h:t,s:n,l:r,a:this.a})}lighten(e=10){const t=this.getHue(),n=this.getSaturation();let r=this.getLightness()+e/100;return r>1&&(r=1),this._c({h:t,s:n,l:r,a:this.a})}mix(e,t=50){const n=this._c(e),r=t/100,o=s=>(n[s]-this[s])*r+this[s],a={r:ou(o("r")),g:ou(o("g")),b:ou(o("b")),a:ou(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const t=this._c(e),n=this.a+t.a*(1-this.a),r=o=>ou((this[o]*this.a+t[o]*t.a*(1-this.a))/n);return this._c({r:r("r"),g:r("g"),b:r("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const t=(this.r||0).toString(16);e+=t.length===2?t:"0"+t;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.b||0).toString(16);if(e+=r.length===2?r:"0"+r,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ou(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),t=ou(this.getSaturation()*100),n=ou(this.getLightness()*100);return this.a!==1?`hsla(${e},${t}%,${n}%,${this.a})`:`hsl(${e},${t}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,t,n){const r=this.clone();return r[e]=$T(t,n),r}_c(e){return new this.constructor(e)}getMax(){return typeof this._max=="undefined"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min=="undefined"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const t=e.replace("#","");function n(r,o){return parseInt(t[r]+t[o||r],16)}t.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=t[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=t[6]?n(6,7)/255:1)}fromHsl({h:e,s:t,l:n,a:r}){if(this._h=e%360,this._s=t,this._l=n,this.a=typeof r=="number"?r:1,t<=0){const d=ou(n*255);this.r=d,this.g=d,this.b=d}let o=0,a=0,s=0;const l=e/60,u=(1-Math.abs(2*n-1))*t,c=u*(1-Math.abs(l%2-1));l>=0&&l<1?(o=u,a=c):l>=1&&l<2?(o=c,a=u):l>=2&&l<3?(a=u,s=c):l>=3&&l<4?(a=c,s=u):l>=4&&l<5?(o=c,s=u):l>=5&&l<6&&(o=u,s=c);const h=n-u/2;this.r=ou((o+h)*255),this.g=ou((a+h)*255),this.b=ou((s+h)*255)}fromHsv({h:e,s:t,v:n,a:r}){this._h=e%360,this._s=t,this._v=n,this.a=typeof r=="number"?r:1;const o=ou(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const a=e/60,s=Math.floor(a),l=a-s,u=ou(n*(1-t)*255),c=ou(n*(1-t*l)*255),h=ou(n*(1-t*(1-l))*255);switch(s){case 0:this.g=h,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=h;break;case 3:this.r=u,this.g=c;break;case 4:this.r=h,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(e){const t=Wae(e,PGe);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Wae(e,PGe);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Wae(e,(n,r)=>r.includes("%")?ou(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const NL=2,LGe=.16,Y3i=.05,X3i=.05,K3i=.15,BGe=5,FGe=4,Z3i=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function NGe(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-NL*e:Math.round(i.h)+NL*e:n=t?Math.round(i.h)+NL*e:Math.round(i.h)-NL*e,n<0?n+=360:n>=360&&(n-=360),n}function HGe(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-LGe*e:e===FGe?n=i.s+LGe:n=i.s+Y3i*e,n>1&&(n=1),t&&e===BGe&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function $Ge(i,e,t){let n;return t?n=i.v+X3i*e:n=i.v-K3i*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Q3i(i,e={}){const t=[],n=new yS(i),r=n.toHsv();for(let o=BGe;o>0;o-=1){const a=new yS({h:NGe(r,o,!0),s:HGe(r,o,!0),v:$Ge(r,o,!0)});t.push(a)}t.push(n);for(let o=1;o<=FGe;o+=1){const a=new yS({h:NGe(r,o),s:HGe(r,o),v:$Ge(r,o)});t.push(a)}return e.theme==="dark"?Z3i.map(({index:o,amount:a})=>new yS(e.backgroundColor||"#141414").mix(t[o],a).toHexString()):t.map(o=>o.toHexString())}const Vae=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Vae.primary=Vae[5];function J3i(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function exi(i,e){if(!i)return!1;if(i.contains)return i.contains(e);let t=e;for(;t;){if(t===i)return!0;t=t.parentNode}return!1}const zGe="data-rc-order",WGe="data-rc-priority",txi="rc-util-key",jae=new Map;function VGe({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:txi}function Uae(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function ixi(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function Gae(i){return Array.from((jae.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function jGe(i,e={}){if(!J3i())return null;const{csp:t,prepend:n,priority:r=0}=e,o=ixi(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(zGe,o),a&&r&&s.setAttribute(WGe,`${r}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=i;const l=Uae(e),{firstChild:u}=l;if(n){if(a){const c=(e.styles||Gae(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(zGe)))return!1;const d=Number(h.getAttribute(WGe)||0);return r>=d});if(c.length)return l.insertBefore(s,c[c.length-1].nextSibling),s}l.insertBefore(s,u)}else l.appendChild(s);return s}function nxi(i,e={}){let{styles:t}=e;return t||(t=Gae(Uae(e))),t.find(n=>n.getAttribute(VGe(e))===i)}function rxi(i,e){const t=jae.get(i);if(!t||!exi(document,t)){const n=jGe("",e),{parentNode:r}=n;jae.set(i,r),i.removeChild(n)}}function oxi(i,e,t={}){var l,u,c;const n=Uae(t),r=Gae(n),o=Pi(ke({},t),{styles:r});rxi(n,o);const a=nxi(e,o);if(a)return(l=o.csp)!=null&&l.nonce&&a.nonce!==((u=o.csp)==null?void 0:u.nonce)&&(a.nonce=(c=o.csp)==null?void 0:c.nonce),a.innerHTML!==i&&(a.innerHTML=i),a;const s=jGe(i,o);return s.setAttribute(VGe(o),e),s}function UGe(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function axi(i){return UGe(i)instanceof ShadowRoot}function sxi(i){return axi(i)?UGe(i):null}var GGe={};let qae={};const Yae=[],lxi=i=>{Yae.push(i)};function uxi(i,e){if(GGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Yae.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function cxi(i,e){if(GGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Yae.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function hxi(){qae={}}function qGe(i,e,t){!e&&!qae[t]&&(i(!1,t),qae[t]=!0)}function HL(i,e){qGe(uxi,i,e)}function dxi(i,e){qGe(cxi,i,e)}HL.preMessage=lxi,HL.resetWarned=hxi,HL.noteOnce=dxi;function fxi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Xae(i,e){HL(i,`[@ant-design/icons] ${e}`)}function YGe(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function XGe(i={}){return Object.keys(i).reduce((e,t)=>{const n=i[t];switch(t){case"class":e.className=n,delete e.class;break;default:delete e[t],e[fxi(t)]=n}return e},{})}function Kae(i,e,t){return t?ce.createElement(i.tag,ke(ke({key:e},XGe(i.attrs)),t),(i.children||[]).map((n,r)=>Kae(n,`${e}-${i.tag}-${r}`))):ce.createElement(i.tag,ke({key:e},XGe(i.attrs)),(i.children||[]).map((n,r)=>Kae(n,`${e}-${i.tag}-${r}`)))}function KGe(i){return Q3i(i)[0]}function ZGe(i){return i?Array.isArray(i)?i:[i]:[]}const gxi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},pxi=`
|
|
10590
10590
|
.anticon {
|
|
10591
10591
|
display: inline-flex;
|
|
10592
10592
|
align-items: center;
|
|
@@ -10925,7 +10925,7 @@ ${r}
|
|
|
10925
10925
|
padding: 0;
|
|
10926
10926
|
}
|
|
10927
10927
|
}
|
|
10928
|
-
`,Y8i=({filter:i,onCancel:e,onApply:t})=>{var v;const n=Jh(),[r,o]=ce.useState((i==null?void 0:i.type)||"basic"),[a,s]=ce.useState(!0),[l,u]=ce.useState("WHERE"),[c,h]=ce.useState(""),[d]=No.useForm(),f=No.useWatch(null,d),g=No.useWatch("condition",d),{dataSourceQueryInfo:p}=Qh();ce.useEffect(()=>{o(i.type),i.type==="basic"&&d.setFieldsValue(i.basic),i.type==="customSql"&&(i!=null&&i.sql)&&(u(i.sql.conditionType),h(i.sql.filterCondition))},[i]),ce.useEffect(()=>{if(r==="basic"){const
|
|
10928
|
+
`,Y8i=({filter:i,onCancel:e,onApply:t})=>{var v,b;const n=Jh(),[r,o]=ce.useState((i==null?void 0:i.type)||"basic"),[a,s]=ce.useState(!0),[l,u]=ce.useState("WHERE"),[c,h]=ce.useState(""),[d]=No.useForm(),f=No.useWatch(null,d),g=No.useWatch("condition",d),{dataSourceQueryInfo:p}=Qh();ce.useEffect(()=>{o(i.type),i.type==="basic"&&d.setFieldsValue(i.basic),i.type==="customSql"&&(i!=null&&i.sql)&&(u(i.sql.conditionType),h(i.sql.filterCondition))},[i]),ce.useEffect(()=>{if(r==="basic"){const y=d.getFieldsValue(),_=Object.values(y).every(S=>S!==null&&S!==""&&S!==void 0);s(!_)}else r==="customSql"&&s(!c||!l)},[r,f,c]);const m=()=>{if(r==="basic"){const y={type:"basic",basic:ke({},f)};t(y)}r==="customSql"&&t({type:"customSql",sql:{conditionType:l,filterCondition:c}})};return we.jsxs(G8i,{className:"filter-modal",children:[we.jsxs("div",{className:"modal-content",children:[we.jsx("div",{className:"left-content",children:we.jsx(yp,{selectedKeys:[r],mode:"inline",theme:"light",items:Yd(tSi),onClick:({key:y})=>{o(y)}})}),we.jsx("div",{className:"right-content",children:we.jsxs(No,{layout:"vertical",form:d,children:[r==="basic"&&we.jsxs(dg,{vertical:!0,children:[we.jsx(No.Item,{label:we.jsx(ho,{id:"dimension"}),name:"dimensionId",children:we.jsx(rd,{options:(b=(v=p==null?void 0:p.dimensions)==null?void 0:v.filter(y=>y.value!=="metricTime"))==null?void 0:b.map(y=>Pi(ke({},y),{disabled:!1}))})}),we.jsx(No.Item,{label:we.jsx(ho,{id:"condition"}),name:"condition",children:we.jsx(rd,{options:Yd(hse)})}),!["is null","is not null"].includes(g)&&we.jsx(No.Item,{label:we.jsx(ho,{id:"value"}),name:"value",colon:!1,children:we.jsx(gm,{allowClear:!0})})]}),r==="customSql"&&we.jsxs(dg,{vertical:!0,children:[we.jsx(No.Item,{label:we.jsx(ho,{id:"conditionType"}),children:we.jsx(rd,{options:nSi,value:l,onChange:y=>u(y)})}),we.jsx(No.Item,{label:we.jsx(ho,{id:"filterConditionSQL"}),colon:!1,className:"code-sql",children:we.jsx(yQe,{placeholder:n.formatMessage({id:"filterConditionPlaceholder"}),value:c,height:"276px",extensions:[wTi()],onChange:y=>h(y)})})]})]})})]}),we.jsxs("div",{className:"footer",children:[we.jsx("div",{className:"footer-btn cancel-btn",children:we.jsx(pl,{type:"text",onClick:()=>e(),children:we.jsx(ho,{id:"cancel"})})}),we.jsx("div",{className:"footer-btn apply-btn",children:we.jsx(pl,{type:"text",disabled:a,onClick:()=>m(),children:we.jsx(ho,{id:"modalApply"})})})]})]})},_Qe=({filter:i,filterKey:e,onFilterChange:t,deleteFilter:n})=>{const r=Jh(),[o,a]=ce.useState(""),[s,l]=ce.useState(!1),{dataSourceQueryInfo:u}=Qh();return ce.useEffect(()=>{var h,d;let c="";if(i.type==="basic"){const f=i==null?void 0:i.basic,g=(h=u==null?void 0:u.dimensions)==null?void 0:h.find(v=>v.value===(f==null?void 0:f.dimensionId)),p=(d=hse.find(v=>v.value===(f==null?void 0:f.condition)))==null?void 0:d.key,m=(f==null?void 0:f.value)!==void 0?` ${f==null?void 0:f.value}`:"";c=`${g==null?void 0:g.label} ${r.formatMessage({id:p})} ${m}`}if(i.type==="customSql"){const f=i==null?void 0:i.sql;c=`${f==null?void 0:f.conditionType} ${f==null?void 0:f.filterCondition}`}a(c)},[i]),we.jsxs(UI,{classNames:{root:"advt-chart-popover"},content:we.jsx(Y8i,{filter:i,onCancel:()=>l(!1),onApply:c=>{if(c.type==="basic"&&c.basic.dimensionId){const h=c.basic.dimensionId,d=dse({dimensionId:h},u==null?void 0:u.dimensions);c.basic=ke(ke({},c.basic),d)}t(c),l(!1)}}),trigger:"click",open:s,placement:"bottomLeft",arrow:!1,onOpenChange:c=>l(c),children:[e!=="add-filter"&&we.jsxs(_p.Compact,{className:"filter-item-box",children:[we.jsx(gm,{className:"filter-input",value:o,suffix:we.jsxs(we.Fragment,{children:[s&&we.jsx("div",{className:"suffixIcon",children:we.jsx(rse,{style:{color:"#008CD6",pointerEvents:"none"}})}),!s&&we.jsx("div",{className:"suffixIcon",children:we.jsx(Jae,{style:{color:"#89898a",pointerEvents:"none"}})})]}),onClick:()=>{l(!s)}}),we.jsx(Op,{icon:we.jsx(ase,{}),onClick:c=>{c.stopPropagation(),n&&n()}})]}),e==="add-filter"&&we.jsx(Op,{className:"add-filter-btn",icon:we.jsx(iqe,{}),onClick:()=>{l(!0)}})]},e)},X8i={type:"basic",basic:{dimensionId:"",condition:"equal",value:""},sql:{conditionType:"Where",filterCondition:""}},K8i=({filters:i=[],onChange:e})=>{const t=o=>{i.push(o),e([...i])},n=o=>{i.splice(o,1),e([...i])},r=(o,a)=>{i[a]=o,e([...i])};return we.jsxs(U8i,{children:[i==null?void 0:i.map((o,a)=>{const s=`filter-${a}`;return we.jsx("div",{className:"filter-item",children:we.jsx(_Qe,{filter:o,filterKey:s,deleteFilter:()=>n(a),onFilterChange:l=>r(l,a)})},s)}),we.jsx("div",{className:"filter-item",children:we.jsx(_Qe,{filterKey:"add-filter",filter:ke({},X8i),onFilterChange:o=>t(o)})},"add-filter")]})},Z8i=Es.div`
|
|
10929
10929
|
${()=>bl`
|
|
10930
10930
|
width: 100%;
|
|
10931
10931
|
|
|
@@ -11243,7 +11243,7 @@ ${r}
|
|
|
11243
11243
|
}
|
|
11244
11244
|
}
|
|
11245
11245
|
`}
|
|
11246
|
-
`,xQe=i=>{const[e,t]=ce.useState(null),[n,r]=ce.useState(!1),o=ce.useRef(null);ce.useEffect(()=>{const l=u=>{const c=o.current;c&&!c.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[]);const a=()=>we.jsxs(dg,{className:"actions",justify:"space-between",align:"center",children:[we.jsx(Op,{type:"text",onClick:()=>r(!1),children:we.jsx(ho,{id:"cancel"})}),we.jsx(Op,{type:"text",onClick:()=>{i.onChange&&i.onChange(e==null?void 0:e.dates,e==null?void 0:e.dateStrings),r(!1)},children:we.jsx(ho,{id:"modalApply"})})]}),s=(l,u)=>{t({dates:l,dateStrings:u})};return we.jsxs(Yf,{theme:aRi,children:[we.jsx(lRi,{}),we.jsx("div",{ref:o,children:we.jsx(sRi,ke({suffixIcon:null,renderExtraFooter:a,showNow:!1,needConfirm:!0,onCalendarChange:s,open:n,getPopupContainer:()=>o.current,onClick:()=>r(!n),classNames:{popup:{root:"time-pick-popover"}}},i))})]})},uRi=({customTimeRange:i,onChange:e})=>{var n,r;const t=({from:o,to:a})=>{e({from:o||i.from,to:a||i.to})};return we.jsxs(eRi,{className:"custom-content",children:[we.jsxs("div",{className:"left-content",children:[we.jsx("div",{className:"title",children:we.jsx(ho,{id:"startTime"})}),we.jsx(CQe,{value:i.from,onChange:o=>{t({from:o})}}),we.jsxs("div",{className:"date-time",children:[we.jsx(gm,{value:(n=i.from)==null?void 0:n.format("YYYY/MM/DD")}),we.jsx(xQe,{onChange:o=>{o&&t({from:o})},value:i.from})]})]}),we.jsxs("div",{className:"right-content",children:[we.jsx("div",{className:"title",children:we.jsx(ho,{id:"endTime"})}),we.jsx(CQe,{value:i.to,onChange:o=>{t({to:o})}}),we.jsxs("div",{className:"date-time",children:[we.jsx(gm,{value:(r=i.to)==null?void 0:r.format("YYYY/MM/DD")}),we.jsx(xQe,{onChange:o=>{o&&t({to:o})},value:i.to})]})]})]})},cRi=({type:i,setClose:e,setApply:t,timeRange:n})=>{const[r,o]=ce.useState({from:Ir().subtract(7,"day"),to:Ir()}),[a,s]=ce.useState({type:"lastPeriod",lastPeriod:{range:7,unit:"day"}});ce.useEffect(()=>{var u,c;i==="custom"&&(u=n==null?void 0:n.custom)!=null&&u.from&&(c=n==null?void 0:n.custom)!=null&&c.to&&o({from:Ir(n.custom.from),to:Ir(n.custom.to)}),i==="advanced"&&n!=null&&n.advanced&&s(n.advanced)},[n]);const l=()=>{if(i==="custom"){const u=Ir(r.from).format(Ob),c=Ir(r.to).format(Ob);t({type:"custom",custom:{from:u,to:c}})}i==="advanced"&&t({type:"advanced",advanced:ke({},a)})};return we.jsxs(J8i,{className:"time-popover-container",children:[we.jsxs("div",{className:"time-popover-header",children:[we.jsx(pl,{className:"icon-box",type:"text",onClick:()=>e(!0),children:we.jsx(p0,{component:iRi})}),we.jsx("span",{className:"time-title",children:we.jsx(ho,{id:i})})]}),we.jsxs("div",{className:"time-popover-content",children:[i==="custom"&&we.jsx(uRi,{customTimeRange:r,onChange:u=>o(u)}),i==="advanced"&&we.jsx(rRi,{advancedTimeRange:a,onChange:u=>{s(u)}})]}),we.jsxs("div",{className:"time-footer",children:[we.jsx("div",{className:"time-footer-btn cancel-btn",children:we.jsx(Op,{type:"text",onClick:()=>e(),children:we.jsx(ho,{id:"cancel"})})}),we.jsx("div",{className:"time-footer-btn apply-btn",children:we.jsx(Op,{type:"text",onClick:l,children:we.jsx(ho,{id:"modalApply"})})})]})]})},hRi=({timeRange:i,onChange:e})=>{const{formatMessage:t}=Jh(),[n,r]=ce.useState(!1),[o,a]=ce.useState(!1),s=ce.useRef(null),[l,u]=ce.useState("");ce.useEffect(()=>{const g=p=>{var b,y;const m=(b=s.current)==null?void 0:b.contains(p.target),v=(y=document.querySelector(".advanced-select-dropdown"))==null?void 0:y.contains(p.target);!m&&!v&&a(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),ce.useEffect(()=>{i&&((i.type==="custom"||i.type==="advanced")&&u(i.type),i.type==="basic"&&i.basic&&u(i==null?void 0:i.basic),i.type||u(""))},[i]);const c=g=>{e(g),a(!1)},h=g=>{if(g==="custom"||g==="advanced"){u(g),a(!0);return}o&&a(!1),e({type:g?"basic":"",basic:g||""})},d=({label:g,value:p})=>p==="custom"||p==="advanced"?ASi(g,i,t):g,f=g=>{const p=g.value==="advanced"||g.value==="custom";return we.jsxs(dg,{align:"center",justify:"space-between",onClick:()=>{(g.value==="advanced"||g.value==="custom")&&a(!0)},children:[we.jsx("span",{className:"label",children:g.label}),p&&we.jsx("span",{className:"icon",children:we.jsx(ise,{})})]})};return we.jsxs(Q8i,{ref:s,children:[we.jsx(rd,{className:"time-range-select",prefix:we.jsx(ho,{id:"timeRange"}),value:l,options:Yd(_Si),optionRender:f,labelRender:d,open:n,onChange:h,getPopupContainer:()=>s.current,onOpenChange:g=>{g&&((i==null?void 0:i.type)==="advanced"||(i==null?void 0:i.type)==="custom")&&a(!o),r(g)},allowClear:!0}),o&&we.jsx(cRi,{type:l,timeRange:i,setClose:g=>{a(!1),i&&e(ke({},i)),g&&r(!0)},setApply:c})]})};function dRi({theme:i,dataSource:e}){const t=Jh(),[n,r]=ce.useState([]),[o,a]=ce.useState([]),s={label:t.formatMessage({id:"metricTime"}),value:"metricTime"},{chartJson:l,setDataSourceQueryInfo:u,setLoading:c,setError:h,setControllerConfig:d,setChartDrillBy:f}=Qh(),[g,p]=ce.useState({metrics:[],dimensions:[]}),{queryDimensions:m,queryMql2Params:v,queryMetricId:b}=oqe(e==null?void 0:e.type),{queryChartDataFromDatasource:y}=gse(e),_=L=>{const F={metrics:(L==null?void 0:L.metrics)||[],dimensions:(L==null?void 0:L.dimensions)||[],timeRange:RSi(L==null?void 0:L.timeRange,e)||{},timeGrain:TSi(L==null?void 0:L.timeDimension)||(L==null?void 0:L.timeGrain)||(l==null?void 0:l.timeGrain),filters:rSi(L==null?void 0:L.filters),queryMetricOrgId:L==null?void 0:L.queryMetricOrgId};p(F),r(L==null?void 0:L.metrics),a((L==null?void 0:L.dissionOptions)||[]),u({metrics:(L==null?void 0:L.metrics)||[],dimensions:(L==null?void 0:L.dissionOptions)||[]}),d(F);const W=Pi(ke({},F),{dataFormat:L==null?void 0:L.dataFormat});y(W,!0)},S=L=>ga(null,null,function*(){var W;const F=yield v(L);if(F&&Array.isArray(F)&&F.length>0){const V=F[0],G=mSi(L,V),z=(W=G==null?void 0:G.metricsOptions)==null?void 0:W.flatMap(J=>J==null?void 0:J.atomicMetricIds),X=z?[...new Set(z)]:[];if(!(X!=null&&X.length)){h({visible:!0,title:"Error",message:"metric is missing"}),c(!1);return}const j=yield m(X),H=vSi(V,G,j,s);_(H)}}),x=L=>ga(null,null,function*(){var V,G;if(!((V=L==null?void 0:L.metricIds)!=null&&V.length)){h({visible:!0,title:"Error",message:"metric is missing"}),c(!1);return}const F=yield b((G=L==null?void 0:L.metricIds)==null?void 0:G[0]),W=pSi(F,l,s);_(Pi(ke({},W),{timeGrain:L==null?void 0:L.timeGrain,timeRange:L==null?void 0:L.timeRange,filters:L==null?void 0:L.filters}))});ce.useEffect(()=>{(e==null?void 0:e.type)==="metricInsight"&&(e!=null&&e.mql?S(e.mql):e!=null&&e.params?x(e.params):(c(!1),h({visible:!0,title:"Error",message:"mql or params is missing "})))},[e]);const w=()=>{c(!0),f({visible:!1,config:{},chartState:{}}),d(ke({},g)),y(Pi(ke({},g),{dataFormat:l==null?void 0:l.dataFormat}))},E=()=>{const{metrics:L}=g;return!(L!=null&&L.length)},A=(L,F)=>{p(W=>Pi(ke({},W),{[L]:F}))};if(e!=null&&e.hideControls)return null;const{timeRange:T,metrics:R,dimensions:k,timeGrain:O,filters:P}=g;return we.jsxs(Z8i,{className:"chart-controllers",theme:i,children:[we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(p0,{component:qxi})}),we.jsxs("div",{className:"controllers-content",children:[we.jsxs("div",{className:"row-item",children:[we.jsx(hRi,{timeRange:T,onChange:L=>A("timeRange",L)}),we.jsx(rd,{mode:"multiple",prefix:we.jsx(ho,{id:"metric"}),options:n,value:R,onChange:L=>{if(L.length>0){const F=n.filter(G=>L.includes(G.value));A("metrics",F);const W=F==null?void 0:F.flatMap(G=>G==null?void 0:G.atomicMetricIds),V=W?[...new Set(W)]:[];m(V).then(G=>{const z=uqe(F),X=fse(G,z,s);a(X)})}}})]}),we.jsxs("div",{className:"row-item",children:[we.jsx(rd,{mode:"multiple",
|
|
11246
|
+
`,xQe=i=>{const[e,t]=ce.useState(null),[n,r]=ce.useState(!1),o=ce.useRef(null);ce.useEffect(()=>{const l=u=>{const c=o.current;c&&!c.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[]);const a=()=>we.jsxs(dg,{className:"actions",justify:"space-between",align:"center",children:[we.jsx(Op,{type:"text",onClick:()=>r(!1),children:we.jsx(ho,{id:"cancel"})}),we.jsx(Op,{type:"text",onClick:()=>{i.onChange&&i.onChange(e==null?void 0:e.dates,e==null?void 0:e.dateStrings),r(!1)},children:we.jsx(ho,{id:"modalApply"})})]}),s=(l,u)=>{t({dates:l,dateStrings:u})};return we.jsxs(Yf,{theme:aRi,children:[we.jsx(lRi,{}),we.jsx("div",{ref:o,children:we.jsx(sRi,ke({suffixIcon:null,renderExtraFooter:a,showNow:!1,needConfirm:!0,onCalendarChange:s,open:n,getPopupContainer:()=>o.current,onClick:()=>r(!n),classNames:{popup:{root:"time-pick-popover"}}},i))})]})},uRi=({customTimeRange:i,onChange:e})=>{var n,r;const t=({from:o,to:a})=>{e({from:o||i.from,to:a||i.to})};return we.jsxs(eRi,{className:"custom-content",children:[we.jsxs("div",{className:"left-content",children:[we.jsx("div",{className:"title",children:we.jsx(ho,{id:"startTime"})}),we.jsx(CQe,{value:i.from,onChange:o=>{t({from:o})}}),we.jsxs("div",{className:"date-time",children:[we.jsx(gm,{value:(n=i.from)==null?void 0:n.format("YYYY/MM/DD")}),we.jsx(xQe,{onChange:o=>{o&&t({from:o})},value:i.from})]})]}),we.jsxs("div",{className:"right-content",children:[we.jsx("div",{className:"title",children:we.jsx(ho,{id:"endTime"})}),we.jsx(CQe,{value:i.to,onChange:o=>{t({to:o})}}),we.jsxs("div",{className:"date-time",children:[we.jsx(gm,{value:(r=i.to)==null?void 0:r.format("YYYY/MM/DD")}),we.jsx(xQe,{onChange:o=>{o&&t({to:o})},value:i.to})]})]})]})},cRi=({type:i,setClose:e,setApply:t,timeRange:n})=>{const[r,o]=ce.useState({from:Ir().subtract(7,"day"),to:Ir()}),[a,s]=ce.useState({type:"lastPeriod",lastPeriod:{range:7,unit:"day"}});ce.useEffect(()=>{var u,c;i==="custom"&&(u=n==null?void 0:n.custom)!=null&&u.from&&(c=n==null?void 0:n.custom)!=null&&c.to&&o({from:Ir(n.custom.from),to:Ir(n.custom.to)}),i==="advanced"&&n!=null&&n.advanced&&s(n.advanced)},[n]);const l=()=>{if(i==="custom"){const u=Ir(r.from).format(Ob),c=Ir(r.to).format(Ob);t({type:"custom",custom:{from:u,to:c}})}i==="advanced"&&t({type:"advanced",advanced:ke({},a)})};return we.jsxs(J8i,{className:"time-popover-container",children:[we.jsxs("div",{className:"time-popover-header",children:[we.jsx(pl,{className:"icon-box",type:"text",onClick:()=>e(!0),children:we.jsx(p0,{component:iRi})}),we.jsx("span",{className:"time-title",children:we.jsx(ho,{id:i})})]}),we.jsxs("div",{className:"time-popover-content",children:[i==="custom"&&we.jsx(uRi,{customTimeRange:r,onChange:u=>o(u)}),i==="advanced"&&we.jsx(rRi,{advancedTimeRange:a,onChange:u=>{s(u)}})]}),we.jsxs("div",{className:"time-footer",children:[we.jsx("div",{className:"time-footer-btn cancel-btn",children:we.jsx(Op,{type:"text",onClick:()=>e(),children:we.jsx(ho,{id:"cancel"})})}),we.jsx("div",{className:"time-footer-btn apply-btn",children:we.jsx(Op,{type:"text",onClick:l,children:we.jsx(ho,{id:"modalApply"})})})]})]})},hRi=({timeRange:i,onChange:e})=>{const{formatMessage:t}=Jh(),[n,r]=ce.useState(!1),[o,a]=ce.useState(!1),s=ce.useRef(null),[l,u]=ce.useState("");ce.useEffect(()=>{const g=p=>{var b,y;const m=(b=s.current)==null?void 0:b.contains(p.target),v=(y=document.querySelector(".advanced-select-dropdown"))==null?void 0:y.contains(p.target);!m&&!v&&a(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),ce.useEffect(()=>{i&&((i.type==="custom"||i.type==="advanced")&&u(i.type),i.type==="basic"&&i.basic&&u(i==null?void 0:i.basic),i.type||u(""))},[i]);const c=g=>{e(g),a(!1)},h=g=>{if(g==="custom"||g==="advanced"){u(g),a(!0);return}o&&a(!1),e({type:g?"basic":"",basic:g||""})},d=({label:g,value:p})=>p==="custom"||p==="advanced"?ASi(g,i,t):g,f=g=>{const p=g.value==="advanced"||g.value==="custom";return we.jsxs(dg,{align:"center",justify:"space-between",onClick:()=>{(g.value==="advanced"||g.value==="custom")&&a(!0)},children:[we.jsx("span",{className:"label",children:g.label}),p&&we.jsx("span",{className:"icon",children:we.jsx(ise,{})})]})};return we.jsxs(Q8i,{ref:s,children:[we.jsx(rd,{className:"time-range-select",prefix:we.jsx(ho,{id:"timeRange"}),value:l,options:Yd(_Si),optionRender:f,labelRender:d,open:n,onChange:h,getPopupContainer:()=>s.current,onOpenChange:g=>{g&&((i==null?void 0:i.type)==="advanced"||(i==null?void 0:i.type)==="custom")&&a(!o),r(g)},allowClear:!0}),o&&we.jsx(cRi,{type:l,timeRange:i,setClose:g=>{a(!1),i&&e(ke({},i)),g&&r(!0)},setApply:c})]})};function dRi({theme:i,dataSource:e}){const t=Jh(),[n,r]=ce.useState([]),[o,a]=ce.useState([]),s={label:t.formatMessage({id:"metricTime"}),value:"metricTime"},{chartJson:l,setDataSourceQueryInfo:u,setLoading:c,setError:h,setControllerConfig:d,setChartDrillBy:f}=Qh(),[g,p]=ce.useState({metrics:[],dimensions:[]}),{queryDimensions:m,queryMql2Params:v,queryMetricId:b}=oqe(e==null?void 0:e.type),{queryChartDataFromDatasource:y}=gse(e),_=L=>{const F={metrics:(L==null?void 0:L.metrics)||[],dimensions:(L==null?void 0:L.dimensions)||[],timeRange:RSi(L==null?void 0:L.timeRange,e)||{},timeGrain:TSi(L==null?void 0:L.timeDimension)||(L==null?void 0:L.timeGrain)||(l==null?void 0:l.timeGrain),filters:rSi(L==null?void 0:L.filters),queryMetricOrgId:L==null?void 0:L.queryMetricOrgId};p(F),r(L==null?void 0:L.metrics),a((L==null?void 0:L.dissionOptions)||[]),u({metrics:(L==null?void 0:L.metrics)||[],dimensions:(L==null?void 0:L.dissionOptions)||[]}),d(F);const W=Pi(ke({},F),{dataFormat:L==null?void 0:L.dataFormat});y(W,!0)},S=L=>ga(null,null,function*(){var W;const F=yield v(L);if(F&&Array.isArray(F)&&F.length>0){const V=F[0],G=mSi(L,V),z=(W=G==null?void 0:G.metricsOptions)==null?void 0:W.flatMap(J=>J==null?void 0:J.atomicMetricIds),X=z?[...new Set(z)]:[];if(!(X!=null&&X.length)){h({visible:!0,title:"Error",message:"metric is missing"}),c(!1);return}const j=yield m(X),H=vSi(V,G,j,s);_(H)}}),x=L=>ga(null,null,function*(){var V,G;if(!((V=L==null?void 0:L.metricIds)!=null&&V.length)){h({visible:!0,title:"Error",message:"metric is missing"}),c(!1);return}const F=yield b((G=L==null?void 0:L.metricIds)==null?void 0:G[0]),W=pSi(F,l,s);_(Pi(ke({},W),{timeGrain:L==null?void 0:L.timeGrain,timeRange:L==null?void 0:L.timeRange,filters:L==null?void 0:L.filters}))});ce.useEffect(()=>{(e==null?void 0:e.type)==="metricInsight"&&(e!=null&&e.mql?S(e.mql):e!=null&&e.params?x(e.params):(c(!1),h({visible:!0,title:"Error",message:"mql or params is missing "})))},[e]);const w=()=>{c(!0),f({visible:!1,config:{},chartState:{}}),d(ke({},g)),y(Pi(ke({},g),{dataFormat:l==null?void 0:l.dataFormat}))},E=()=>{const{metrics:L}=g;return!(L!=null&&L.length)},A=(L,F)=>{p(W=>Pi(ke({},W),{[L]:F}))};if(e!=null&&e.hideControls)return null;const{timeRange:T,metrics:R,dimensions:k,timeGrain:O,filters:P}=g;return we.jsxs(Z8i,{className:"chart-controllers",theme:i,children:[we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(p0,{component:qxi})}),we.jsxs("div",{className:"controllers-content",children:[we.jsxs("div",{className:"row-item",children:[we.jsx(hRi,{timeRange:T,onChange:L=>A("timeRange",L)}),we.jsx(rd,{mode:"multiple",prefix:we.jsx(ho,{id:"metric"}),options:n,value:R,onChange:L=>{if(L.length>0){const F=n.filter(G=>L.includes(G.value));A("metrics",F);const W=F==null?void 0:F.flatMap(G=>G==null?void 0:G.atomicMetricIds),V=W?[...new Set(W)]:[];m(V).then(G=>{const z=uqe(F),X=fse(G,z,s);a(X)})}}})]}),we.jsxs("div",{className:"row-item",children:[we.jsx(rd,{mode:"multiple",prefix:we.jsx(ho,{id:"dimension"}),value:k,options:o,onChange:L=>{const F=L.map(G=>o.find(z=>z.value===G)).filter(G=>G!==void 0),W=F==null?void 0:F.some(G=>G.value===s.value);W!==!!O&&A("timeGrain",W?O||"day":""),A("dimensions",F)}}),we.jsx(rd,{prefix:we.jsx(ho,{id:"timeGrain"}),value:O,options:Yd(CS),onChange:L=>A("timeGrain",L),allowClear:!0})]})]})]}),we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(p0,{component:Yxi})}),we.jsx(K8i,{filters:P,onChange:L=>A("filters",L)})]}),we.jsx("div",{className:"apply-btns",children:we.jsx(pl,{disabled:E(),type:"primary",onClick:w,children:we.jsx(ho,{id:"apply"})})})]})}const SQe=i=>M.createElement("svg",ke({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),M.createElement("path",{d:"M8.82166 9.99921L5.28613 13.5347L6.46464 14.7132L10.0002 11.1777L13.5357 14.7133L14.7142 13.5348L11.1787 9.99921L14.7142 6.46367L13.5357 5.28516L10.0002 8.82069L6.46467 5.28519L5.28616 6.4637L8.82166 9.99921Z",fill:"#89898A"})),fRi=Es.div`
|
|
11247
11247
|
${i=>{const{theme:e}=i;return{position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:999,background:e==="dark"?"#333":"#fff",".header":{height:"48px",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",boxSizing:"border-box"},".title":{height:"32px",lineHeight:"32px",fontSize:"14px",fontWeight:"700",color:e==="dark"?"#C8C8C8":"#323233",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginRight:"8px"},".advt-vis-chart-antd-btn-icon>.anticon":{fontSize:"20px"},".detail-data-table":{height:"calc(100% - 48px)"}}}}
|
|
11248
11248
|
`,gRi=({dataSource:i})=>{const{dataDetail:e,setDataDetail:t,controllerConfig:n}=Qh(),{queyDetailTableData:r}=gse(i),[o,a]=ce.useState([]),s=Jh();return ce.useEffect(()=>{e!=null&&e.visible&&(t(Pi(ke({},e),{loading:!0})),r(n).then(l=>{a(l),t(Pi(ke({},e),{error:"",loading:!1}))}).catch(l=>{a([]),t(Pi(ke({},e),{error:l==null?void 0:l.message}))}))},[e==null?void 0:e.visible,n]),we.jsxs(fRi,{children:[we.jsxs("div",{className:"header",children:[we.jsx("div",{className:"title",children:we.jsx(ho,{id:"DetailData"})}),we.jsx("div",{className:"",children:we.jsx(pl,{className:"del-button",type:"text",icon:we.jsx(p0,{component:SQe,style:{fontSize:"20px"}}),onClick:()=>{t({visible:!1,error:"",loading:!1})}})})]}),we.jsxs("div",{className:"detail-data-table",children:[!(e!=null&&e.loading)&&!e.error&&we.jsx(Fae,{data:o}),(e==null?void 0:e.loading)&&we.jsx(HT,{}),e.error&&we.jsx(Hae,{message:e.error,visible:!0,title:s.formatMessage({id:"detailDataError"})})]})]})},pRi=Es.div`
|
|
11249
11249
|
${()=>bl`
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const version = "3.0.
|
|
1
|
+
declare const version = "3.0.8";
|
|
2
2
|
export default version;
|