@advt-gpt-chart/package 2.0.2 → 2.0.3
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
CHANGED
|
@@ -163481,7 +163481,7 @@ function Rqe() {
|
|
|
163481
163481
|
throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");
|
|
163482
163482
|
return i;
|
|
163483
163483
|
}
|
|
163484
|
-
const m0i = "2.0.
|
|
163484
|
+
const m0i = "2.0.3", Bse = /* @__PURE__ */ Yb({}), v0i = {
|
|
163485
163485
|
aliceblue: "9ehhb",
|
|
163486
163486
|
antiquewhite: "9sgk7",
|
|
163487
163487
|
aqua: "1ekf",
|
|
@@ -164958,7 +164958,7 @@ const Gqe = (i) => {
|
|
|
164958
164958
|
const C = yield t(f).catch((w) => {
|
|
164959
164959
|
l({
|
|
164960
164960
|
visible: !0,
|
|
164961
|
-
title: e.formatMessage({ id: "
|
|
164961
|
+
title: e.formatMessage({ id: "chartDataLoadingFailed" }),
|
|
164962
164962
|
message: w.message
|
|
164963
164963
|
}), a(!1);
|
|
164964
164964
|
});
|
|
@@ -164994,7 +164994,7 @@ const Gqe = (i) => {
|
|
|
164994
164994
|
const S = yield t(f).catch((R) => {
|
|
164995
164995
|
p({
|
|
164996
164996
|
visible: !0,
|
|
164997
|
-
title: e.formatMessage({ id: "
|
|
164997
|
+
title: e.formatMessage({ id: "drillDataLoadingFailed" }),
|
|
164998
164998
|
message: R.message
|
|
164999
164999
|
}), g(!1);
|
|
165000
165000
|
}), w = n(S), E = R1e({
|
|
@@ -184426,7 +184426,7 @@ const z_i = (i) => i ? i == null ? void 0 : i.map((e) => Ae({}, e.subFilter)) :
|
|
|
184426
184426
|
from: a.advanced.custom.from,
|
|
184427
184427
|
to: a.advanced.custom.to || Wr().format("YYYY-MM-DD HH:mm:ss")
|
|
184428
184428
|
}
|
|
184429
|
-
} :
|
|
184429
|
+
} : {};
|
|
184430
184430
|
}
|
|
184431
184431
|
return i;
|
|
184432
184432
|
}, { Text: p4 } = FS, aCi = HS`
|
package/dist/index.es.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.js
CHANGED
|
@@ -10085,7 +10085,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
10085
10085
|
`,Zne=({loadingText:i})=>Se.jsxs(hfi,{className:"gpt-vis-loading",children:[Se.jsx("div",{className:"gpt-vis-loading-icon",children:Se.jsxs("div",{className:"loading-svg-ele",children:[Se.jsx("svg",{width:"0",height:"0",children:Se.jsx("defs",{children:Se.jsxs("linearGradient",{id:"loadingCircleStrokeGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[Se.jsx("stop",{offset:"0%",stopColor:"#008CD6"}),Se.jsx("stop",{offset:"100%",stopColor:"#00CC66"})]})})}),Se.jsx("svg",{viewBox:"22 22 44 44",children:Se.jsx("circle",{className:"loading-svg-circle",cx:"44",cy:"44",r:"20.2",fill:"none",strokeWidth:"3.6"})})]})}),Se.jsx("p",{children:i})]}),dfi=$a.div`
|
|
10086
10086
|
height: 100%;
|
|
10087
10087
|
width: 100%;
|
|
10088
|
-
`,uze=({visible:i,title:e,message:t})=>i?Se.jsx(dfi,{className:"error-container",children:Se.jsx(gE,{status:"error",title:e,subTitle:t})}):null,cze=re.createContext(null);function hze(){const i=re.useContext(cze);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const dze="2.0.2",Qne=re.createContext({}),ffi={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"},Vl=Math.round;function Jne(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 fze=(i,e,t)=>t===0?i:i/100;function tA(i,e){const t=e||255;return i>t?t:i<0?0:i}class q3{constructor(e){Hu(this,"isValid",!0);Hu(this,"r",0);Hu(this,"g",0);Hu(this,"b",0);Hu(this,"a",1);Hu(this,"_h");Hu(this,"_s");Hu(this,"_l");Hu(this,"_v");Hu(this,"_max");Hu(this,"_min");Hu(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=ffi[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof q3)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=tA(e.r),this.g=tA(e.g),this.b=tA(e.b),this.a=typeof e.a=="number"?tA(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 s=o/255;return s<=.03928?s/12.92:Math.pow((s+.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=Vl(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=a=>(n[a]-this[a])*r+this[a],s={r:Vl(o("r")),g:Vl(o("g")),b:Vl(o("b")),a:Vl(o("a")*100)/100};return this._c(s)}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=>Vl((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=Vl(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=Vl(this.getSaturation()*100),n=Vl(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]=tA(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=Vl(n*255);this.r=d,this.g=d,this.b=d}let o=0,s=0,a=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,s=c):l>=1&&l<2?(o=c,s=u):l>=2&&l<3?(s=u,a=c):l>=3&&l<4?(s=c,a=u):l>=4&&l<5?(o=c,a=u):l>=5&&l<6&&(o=u,a=c);const h=n-u/2;this.r=Vl((o+h)*255),this.g=Vl((s+h)*255),this.b=Vl((a+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=Vl(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const s=e/60,a=Math.floor(s),l=s-a,u=Vl(n*(1-t)*255),c=Vl(n*(1-t*l)*255),h=Vl(n*(1-t*(1-l))*255);switch(a){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=Jne(e,fze);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Jne(e,fze);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Jne(e,(n,r)=>r.includes("%")?Vl(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const SD=2,gze=.16,gfi=.05,pfi=.05,mfi=.15,pze=5,mze=4,vfi=[{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 vze(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-SD*e:Math.round(i.h)+SD*e:n=t?Math.round(i.h)+SD*e:Math.round(i.h)-SD*e,n<0?n+=360:n>=360&&(n-=360),n}function bze(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-gze*e:e===mze?n=i.s+gze:n=i.s+gfi*e,n>1&&(n=1),t&&e===pze&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function yze(i,e,t){let n;return t?n=i.v+pfi*e:n=i.v-mfi*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function bfi(i,e={}){const t=[],n=new q3(i),r=n.toHsv();for(let o=pze;o>0;o-=1){const s=new q3({h:vze(r,o,!0),s:bze(r,o,!0),v:yze(r,o,!0)});t.push(s)}t.push(n);for(let o=1;o<=mze;o+=1){const s=new q3({h:vze(r,o),s:bze(r,o),v:yze(r,o)});t.push(s)}return e.theme==="dark"?vfi.map(({index:o,amount:s})=>new q3(e.backgroundColor||"#141414").mix(t[o],s).toHexString()):t.map(o=>o.toHexString())}const ere=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];ere.primary=ere[5];function yfi(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function _fi(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 _ze="data-rc-order",Cze="data-rc-priority",Cfi="rc-util-key",tre=new Map;function Sze({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:Cfi}function ire(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function Sfi(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function nre(i){return Array.from((tre.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function xze(i,e={}){if(!yfi())return null;const{csp:t,prepend:n,priority:r=0}=e,o=Sfi(n),s=o==="prependQueue",a=document.createElement("style");a.setAttribute(_ze,o),s&&r&&a.setAttribute(Cze,`${r}`),t!=null&&t.nonce&&(a.nonce=t==null?void 0:t.nonce),a.innerHTML=i;const l=ire(e),{firstChild:u}=l;if(n){if(s){const c=(e.styles||nre(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(_ze)))return!1;const d=Number(h.getAttribute(Cze)||0);return r>=d});if(c.length)return l.insertBefore(a,c[c.length-1].nextSibling),a}l.insertBefore(a,u)}else l.appendChild(a);return a}function xfi(i,e={}){let{styles:t}=e;return t||(t=nre(ire(e))),t.find(n=>n.getAttribute(Sze(e))===i)}function wfi(i,e){const t=tre.get(i);if(!t||!_fi(document,t)){const n=xze("",e),{parentNode:r}=n;tre.set(i,r),i.removeChild(n)}}function Efi(i,e,t={}){var l,u,c;const n=ire(t),r=nre(n),o=on(Te({},t),{styles:r});wfi(n,o);const s=xfi(e,o);if(s)return(l=o.csp)!=null&&l.nonce&&s.nonce!==((u=o.csp)==null?void 0:u.nonce)&&(s.nonce=(c=o.csp)==null?void 0:c.nonce),s.innerHTML!==i&&(s.innerHTML=i),s;const a=xze(i,o);return a.setAttribute(Sze(o),e),a}function wze(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function Afi(i){return wze(i)instanceof ShadowRoot}function Tfi(i){return Afi(i)?wze(i):null}var Eze={};let rre={};const ore=[],Rfi=i=>{ore.push(i)};function Mfi(i,e){if(Eze.NODE_ENV!=="production"&&!i&&console!==void 0){const t=ore.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function kfi(i,e){if(Eze.NODE_ENV!=="production"&&!i&&console!==void 0){const t=ore.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function Ofi(){rre={}}function Aze(i,e,t){!e&&!rre[t]&&(i(!1,t),rre[t]=!0)}function xD(i,e){Aze(Mfi,i,e)}function Ifi(i,e){Aze(kfi,i,e)}xD.preMessage=Rfi,xD.resetWarned=Ofi,xD.noteOnce=Ifi;function Dfi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function sre(i,e){xD(i,`[@ant-design/icons] ${e}`)}function Tze(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function Rze(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[Dfi(t)]=n}return e},{})}function are(i,e,t){return t?re.createElement(i.tag,Te(Te({key:e},Rze(i.attrs)),t),(i.children||[]).map((n,r)=>are(n,`${e}-${i.tag}-${r}`))):re.createElement(i.tag,Te({key:e},Rze(i.attrs)),(i.children||[]).map((n,r)=>are(n,`${e}-${i.tag}-${r}`)))}function Mze(i){return bfi(i)[0]}function kze(i){return i?Array.isArray(i)?i:[i]:[]}const Pfi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Lfi=`
|
|
10088
|
+
`,uze=({visible:i,title:e,message:t})=>i?Se.jsx(dfi,{className:"error-container",children:Se.jsx(gE,{status:"error",title:e,subTitle:t})}):null,cze=re.createContext(null);function hze(){const i=re.useContext(cze);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const dze="2.0.3",Qne=re.createContext({}),ffi={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"},Vl=Math.round;function Jne(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 fze=(i,e,t)=>t===0?i:i/100;function tA(i,e){const t=e||255;return i>t?t:i<0?0:i}class q3{constructor(e){Hu(this,"isValid",!0);Hu(this,"r",0);Hu(this,"g",0);Hu(this,"b",0);Hu(this,"a",1);Hu(this,"_h");Hu(this,"_s");Hu(this,"_l");Hu(this,"_v");Hu(this,"_max");Hu(this,"_min");Hu(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=ffi[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof q3)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=tA(e.r),this.g=tA(e.g),this.b=tA(e.b),this.a=typeof e.a=="number"?tA(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 s=o/255;return s<=.03928?s/12.92:Math.pow((s+.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=Vl(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=a=>(n[a]-this[a])*r+this[a],s={r:Vl(o("r")),g:Vl(o("g")),b:Vl(o("b")),a:Vl(o("a")*100)/100};return this._c(s)}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=>Vl((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=Vl(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=Vl(this.getSaturation()*100),n=Vl(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]=tA(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=Vl(n*255);this.r=d,this.g=d,this.b=d}let o=0,s=0,a=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,s=c):l>=1&&l<2?(o=c,s=u):l>=2&&l<3?(s=u,a=c):l>=3&&l<4?(s=c,a=u):l>=4&&l<5?(o=c,a=u):l>=5&&l<6&&(o=u,a=c);const h=n-u/2;this.r=Vl((o+h)*255),this.g=Vl((s+h)*255),this.b=Vl((a+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=Vl(n*255);if(this.r=o,this.g=o,this.b=o,t<=0)return;const s=e/60,a=Math.floor(s),l=s-a,u=Vl(n*(1-t)*255),c=Vl(n*(1-t*l)*255),h=Vl(n*(1-t*(1-l))*255);switch(a){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=Jne(e,fze);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Jne(e,fze);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Jne(e,(n,r)=>r.includes("%")?Vl(n/100*255):n);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}}const SD=2,gze=.16,gfi=.05,pfi=.05,mfi=.15,pze=5,mze=4,vfi=[{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 vze(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-SD*e:Math.round(i.h)+SD*e:n=t?Math.round(i.h)+SD*e:Math.round(i.h)-SD*e,n<0?n+=360:n>=360&&(n-=360),n}function bze(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-gze*e:e===mze?n=i.s+gze:n=i.s+gfi*e,n>1&&(n=1),t&&e===pze&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function yze(i,e,t){let n;return t?n=i.v+pfi*e:n=i.v-mfi*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function bfi(i,e={}){const t=[],n=new q3(i),r=n.toHsv();for(let o=pze;o>0;o-=1){const s=new q3({h:vze(r,o,!0),s:bze(r,o,!0),v:yze(r,o,!0)});t.push(s)}t.push(n);for(let o=1;o<=mze;o+=1){const s=new q3({h:vze(r,o),s:bze(r,o),v:yze(r,o)});t.push(s)}return e.theme==="dark"?vfi.map(({index:o,amount:s})=>new q3(e.backgroundColor||"#141414").mix(t[o],s).toHexString()):t.map(o=>o.toHexString())}const ere=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];ere.primary=ere[5];function yfi(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function _fi(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 _ze="data-rc-order",Cze="data-rc-priority",Cfi="rc-util-key",tre=new Map;function Sze({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:Cfi}function ire(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function Sfi(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function nre(i){return Array.from((tre.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function xze(i,e={}){if(!yfi())return null;const{csp:t,prepend:n,priority:r=0}=e,o=Sfi(n),s=o==="prependQueue",a=document.createElement("style");a.setAttribute(_ze,o),s&&r&&a.setAttribute(Cze,`${r}`),t!=null&&t.nonce&&(a.nonce=t==null?void 0:t.nonce),a.innerHTML=i;const l=ire(e),{firstChild:u}=l;if(n){if(s){const c=(e.styles||nre(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(_ze)))return!1;const d=Number(h.getAttribute(Cze)||0);return r>=d});if(c.length)return l.insertBefore(a,c[c.length-1].nextSibling),a}l.insertBefore(a,u)}else l.appendChild(a);return a}function xfi(i,e={}){let{styles:t}=e;return t||(t=nre(ire(e))),t.find(n=>n.getAttribute(Sze(e))===i)}function wfi(i,e){const t=tre.get(i);if(!t||!_fi(document,t)){const n=xze("",e),{parentNode:r}=n;tre.set(i,r),i.removeChild(n)}}function Efi(i,e,t={}){var l,u,c;const n=ire(t),r=nre(n),o=on(Te({},t),{styles:r});wfi(n,o);const s=xfi(e,o);if(s)return(l=o.csp)!=null&&l.nonce&&s.nonce!==((u=o.csp)==null?void 0:u.nonce)&&(s.nonce=(c=o.csp)==null?void 0:c.nonce),s.innerHTML!==i&&(s.innerHTML=i),s;const a=xze(i,o);return a.setAttribute(Sze(o),e),a}function wze(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function Afi(i){return wze(i)instanceof ShadowRoot}function Tfi(i){return Afi(i)?wze(i):null}var Eze={};let rre={};const ore=[],Rfi=i=>{ore.push(i)};function Mfi(i,e){if(Eze.NODE_ENV!=="production"&&!i&&console!==void 0){const t=ore.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function kfi(i,e){if(Eze.NODE_ENV!=="production"&&!i&&console!==void 0){const t=ore.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function Ofi(){rre={}}function Aze(i,e,t){!e&&!rre[t]&&(i(!1,t),rre[t]=!0)}function xD(i,e){Aze(Mfi,i,e)}function Ifi(i,e){Aze(kfi,i,e)}xD.preMessage=Rfi,xD.resetWarned=Ofi,xD.noteOnce=Ifi;function Dfi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function sre(i,e){xD(i,`[@ant-design/icons] ${e}`)}function Tze(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function Rze(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[Dfi(t)]=n}return e},{})}function are(i,e,t){return t?re.createElement(i.tag,Te(Te({key:e},Rze(i.attrs)),t),(i.children||[]).map((n,r)=>are(n,`${e}-${i.tag}-${r}`))):re.createElement(i.tag,Te({key:e},Rze(i.attrs)),(i.children||[]).map((n,r)=>are(n,`${e}-${i.tag}-${r}`)))}function Mze(i){return bfi(i)[0]}function kze(i){return i?Array.isArray(i)?i:[i]:[]}const Pfi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Lfi=`
|
|
10089
10089
|
.anticon {
|
|
10090
10090
|
display: inline-flex;
|
|
10091
10091
|
align-items: center;
|
|
@@ -10225,7 +10225,7 @@ ${r}
|
|
|
10225
10225
|
}
|
|
10226
10226
|
}
|
|
10227
10227
|
`}
|
|
10228
|
-
`,fd=i=>{var a;const s=i,{prefix:e}=s,t=sh(s,["prefix"]),[n,r]=re.useState((a=i==null?void 0:i.open)!=null?a:!1);re.useEffect(()=>{(i==null?void 0:i.open)!==void 0&&r(i==null?void 0:i.open)},[i==null?void 0:i.open]);const o=l=>{if(i!=null&&i.onOpenChange){i==null||i.onOpenChange(l);return}r(l)};return Se.jsxs(uf,{theme:u0i,children:[Se.jsx(h0i,{}),Se.jsx(c0i,{className:n?"open":"",children:Se.jsx(m1,Te({prefix:Se.jsx("span",{className:n?"open":"",children:e}),suffixIcon:Se.jsxs(Se.Fragment,{children:[n&&Se.jsx("div",{className:"suffixIcon",children:Se.jsx(pre,{style:{color:"#008CD6",pointerEvents:"none"}})}),!n&&Se.jsx("div",{className:"suffixIcon",children:Se.jsx(cre,{style:{color:"#89898a",pointerEvents:"none"}})})]}),maxTagCount:"responsive",allowClear:{clearIcon:Se.jsx(vre,{className:"clear-icon"})},onOpenChange:o},t))})]})},d0i="http://localhost";class f0i{constructor({baseURL:e=d0i,host:t,protocol:n,timeout:r=6e5,headers:o}={}){var a,l,u;this.host=t||((a=window.location)==null?void 0:a.host),this.protocol=n||(["http:","https:"].includes((l=window==null?void 0:window.location)==null?void 0:l.protocol)?(u=window==null?void 0:window.location)==null?void 0:u.protocol:void 0);const s=new URL(this.host||this.protocol?`${this.protocol||"https:"}//${this.host||"localhost"}`:e,window.location.href);this.baseURL=s.href.replace(/\/+$/,""),this.host=s.host,this.protocol=s.protocol,this.timeout=r,this.headers=o||{"Content-Type":"application/json"},this.instance=Fa.create({baseURL:this.baseURL,timeout:this.timeout,headers:this.headers})}get(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"GET"}))})}delete(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"DELETE"}))})}put(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"PUT"}))})}post(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"POST"}))})}patch(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"PATCH"}))})}ping(){return this.request({url:"/api/ping",method:"GET",retry:1})}request(e){return vs(this,null,function*(){return this.instance(e).then(t=>{const{status:n,config:r}=t;return(r==null?void 0:r.method)==="delete"&&(n===200||n===201)?{message:"delete success"}:{data:t.data}}).catch(t=>Promise.reject(t))})}}const ED=new f0i,g0i={metricInsight:{query2Params:i=>ED.post({url:"/vizChart/api/v1/mql/params",data:i}).then(t=>(t==null?void 0:t.data)||[]),queryChartData:({timeRange:i,metrics:e,dimensions:t,timeGrain:n,filters:r})=>{var h;const o=(h=e==null?void 0:e[0])==null?void 0:h.value,s=t==null?void 0:t.some(d=>d.value==="metricTime");let a=t,l;s&&(a=t==null?void 0:t.filter(d=>d.value!=="metricTime"),l={dimensionName:"metricTime",dimensionUnit:n});const u={timeRange:i,dimensionIds:a==null?void 0:a.map(d=>d.value)};(i==null?void 0:i.type)==="custom"&&(i!=null&&i.custom)&&(u.timeRange.custom={from:Hr(i.custom.from).format(l7),to:Hr(i.custom.to).format(l7)}),l&&(u.timeDimension=l),r&&r.length>0&&(u.filters=r.map(d=>({conjunction:"AND",subFilter:Te({},d)})));const c=`/vizChart/api/v1/metric/${o}/preview`;return ED.post({url:c,data:u}).then(d=>(d==null?void 0:d.data)||[])},queryMetric:i=>{const e="/vizChart/api/v1/metric/"+i;return ED.get({url:e}).then(t=>t.data||[])},queryDimensions:i=>{const e=`/vizChart/dimensions?orgId=${i}`;return ED.get({url:e}).then(t=>{var n;return((n=t==null?void 0:t.data)==null?void 0:n.items)||[]})},transformData:i=>{const{data:e}=i;if(!e)return[];if(!(e!=null&&e.columns)||!(e!=null&&e.rows))return[];const{columns:t,rows:n}=e,r={};return t.forEach((s,a)=>{r[s.name]=a}),n.map(s=>{const a={};return t.forEach((l,u)=>{if(s.row[u]!==void 0){const c=l.name;a[c]=s.row[u].v}}),a})}},simpleJson:{}},Nze=i=>{const e=bf(),{setError:t,setLoading:n}=m0();return re.useMemo(()=>{const o=g0i[i];return{query2Params:o.query2Params?Sre(o.query2Params,t,n,e):()=>Promise.resolve({}),queryMetric:o.queryMetric?Sre(o.queryMetric,t,n,e):()=>Promise.resolve({}),queryDimensions:o.queryDimensions?Sre(o.queryDimensions,t,n,e):()=>Promise.resolve({}),queryChartData:o.queryChartData?o.queryChartData:()=>Promise.resolve({}),transformData:s=>o.transformData?o.transformData({data:s}):s}},[i])};function Sre(i,e,t,n){return((...r)=>vs(null,null,function*(){try{return yield i(...r)}catch(o){let s=o==null?void 0:o.message;throw typeof o=="string"&&(s=o),t(!1),e({visible:!0,title:n.formatMessage({id:"metricError"}),message:s||"error"}),o}}))}const $ze=i=>{const e=bf(),{queryChartData:t,transformData:n}=Nze(i),{chartJson:r,drillBy:o,setLoading:s,setChartJson:a,setError:l,setDataSourceQueryInfo:u,setChartDrillBy:c}=m0();return{queryChartDataFromDatasource:(f,g)=>vs(null,null,function*(){var b,y;const{metrics:p,dimensions:m,timeGrain:v}=f;if(l({visible:!1,title:"",message:""}),(b=f==null?void 0:f.metrics)!=null&&b[0]){const C=yield t(f).catch(w=>{l({visible:!0,title:e.formatMessage({id:"
|
|
10228
|
+
`,fd=i=>{var a;const s=i,{prefix:e}=s,t=sh(s,["prefix"]),[n,r]=re.useState((a=i==null?void 0:i.open)!=null?a:!1);re.useEffect(()=>{(i==null?void 0:i.open)!==void 0&&r(i==null?void 0:i.open)},[i==null?void 0:i.open]);const o=l=>{if(i!=null&&i.onOpenChange){i==null||i.onOpenChange(l);return}r(l)};return Se.jsxs(uf,{theme:u0i,children:[Se.jsx(h0i,{}),Se.jsx(c0i,{className:n?"open":"",children:Se.jsx(m1,Te({prefix:Se.jsx("span",{className:n?"open":"",children:e}),suffixIcon:Se.jsxs(Se.Fragment,{children:[n&&Se.jsx("div",{className:"suffixIcon",children:Se.jsx(pre,{style:{color:"#008CD6",pointerEvents:"none"}})}),!n&&Se.jsx("div",{className:"suffixIcon",children:Se.jsx(cre,{style:{color:"#89898a",pointerEvents:"none"}})})]}),maxTagCount:"responsive",allowClear:{clearIcon:Se.jsx(vre,{className:"clear-icon"})},onOpenChange:o},t))})]})},d0i="http://localhost";class f0i{constructor({baseURL:e=d0i,host:t,protocol:n,timeout:r=6e5,headers:o}={}){var a,l,u;this.host=t||((a=window.location)==null?void 0:a.host),this.protocol=n||(["http:","https:"].includes((l=window==null?void 0:window.location)==null?void 0:l.protocol)?(u=window==null?void 0:window.location)==null?void 0:u.protocol:void 0);const s=new URL(this.host||this.protocol?`${this.protocol||"https:"}//${this.host||"localhost"}`:e,window.location.href);this.baseURL=s.href.replace(/\/+$/,""),this.host=s.host,this.protocol=s.protocol,this.timeout=r,this.headers=o||{"Content-Type":"application/json"},this.instance=Fa.create({baseURL:this.baseURL,timeout:this.timeout,headers:this.headers})}get(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"GET"}))})}delete(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"DELETE"}))})}put(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"PUT"}))})}post(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"POST"}))})}patch(e){return vs(this,null,function*(){return this.request(on(Te({},e),{method:"PATCH"}))})}ping(){return this.request({url:"/api/ping",method:"GET",retry:1})}request(e){return vs(this,null,function*(){return this.instance(e).then(t=>{const{status:n,config:r}=t;return(r==null?void 0:r.method)==="delete"&&(n===200||n===201)?{message:"delete success"}:{data:t.data}}).catch(t=>Promise.reject(t))})}}const ED=new f0i,g0i={metricInsight:{query2Params:i=>ED.post({url:"/vizChart/api/v1/mql/params",data:i}).then(t=>(t==null?void 0:t.data)||[]),queryChartData:({timeRange:i,metrics:e,dimensions:t,timeGrain:n,filters:r})=>{var h;const o=(h=e==null?void 0:e[0])==null?void 0:h.value,s=t==null?void 0:t.some(d=>d.value==="metricTime");let a=t,l;s&&(a=t==null?void 0:t.filter(d=>d.value!=="metricTime"),l={dimensionName:"metricTime",dimensionUnit:n});const u={timeRange:i,dimensionIds:a==null?void 0:a.map(d=>d.value)};(i==null?void 0:i.type)==="custom"&&(i!=null&&i.custom)&&(u.timeRange.custom={from:Hr(i.custom.from).format(l7),to:Hr(i.custom.to).format(l7)}),l&&(u.timeDimension=l),r&&r.length>0&&(u.filters=r.map(d=>({conjunction:"AND",subFilter:Te({},d)})));const c=`/vizChart/api/v1/metric/${o}/preview`;return ED.post({url:c,data:u}).then(d=>(d==null?void 0:d.data)||[])},queryMetric:i=>{const e="/vizChart/api/v1/metric/"+i;return ED.get({url:e}).then(t=>t.data||[])},queryDimensions:i=>{const e=`/vizChart/dimensions?orgId=${i}`;return ED.get({url:e}).then(t=>{var n;return((n=t==null?void 0:t.data)==null?void 0:n.items)||[]})},transformData:i=>{const{data:e}=i;if(!e)return[];if(!(e!=null&&e.columns)||!(e!=null&&e.rows))return[];const{columns:t,rows:n}=e,r={};return t.forEach((s,a)=>{r[s.name]=a}),n.map(s=>{const a={};return t.forEach((l,u)=>{if(s.row[u]!==void 0){const c=l.name;a[c]=s.row[u].v}}),a})}},simpleJson:{}},Nze=i=>{const e=bf(),{setError:t,setLoading:n}=m0();return re.useMemo(()=>{const o=g0i[i];return{query2Params:o.query2Params?Sre(o.query2Params,t,n,e):()=>Promise.resolve({}),queryMetric:o.queryMetric?Sre(o.queryMetric,t,n,e):()=>Promise.resolve({}),queryDimensions:o.queryDimensions?Sre(o.queryDimensions,t,n,e):()=>Promise.resolve({}),queryChartData:o.queryChartData?o.queryChartData:()=>Promise.resolve({}),transformData:s=>o.transformData?o.transformData({data:s}):s}},[i])};function Sre(i,e,t,n){return((...r)=>vs(null,null,function*(){try{return yield i(...r)}catch(o){let s=o==null?void 0:o.message;throw typeof o=="string"&&(s=o),t(!1),e({visible:!0,title:n.formatMessage({id:"metricError"}),message:s||"error"}),o}}))}const $ze=i=>{const e=bf(),{queryChartData:t,transformData:n}=Nze(i),{chartJson:r,drillBy:o,setLoading:s,setChartJson:a,setError:l,setDataSourceQueryInfo:u,setChartDrillBy:c}=m0();return{queryChartDataFromDatasource:(f,g)=>vs(null,null,function*(){var b,y;const{metrics:p,dimensions:m,timeGrain:v}=f;if(l({visible:!1,title:"",message:""}),(b=f==null?void 0:f.metrics)!=null&&b[0]){const C=yield t(f).catch(w=>{l({visible:!0,title:e.formatMessage({id:"chartDataLoadingFailed"}),message:w.message}),s(!1)});u({fieldInfo:(y=C==null?void 0:C.columns)==null?void 0:y.map(w=>({fieldName:w==null?void 0:w.name,type:w.type}))});const x=n(C),S=Rz({metrics:(p==null?void 0:p.map(w=>w.label))||[],dimensions:(m==null?void 0:m.map(w=>w.value==="metricTime"?"metricTime":w.label))||[],chartJson:r,timeGrain:v,data:x,isInit:g});a(S),s(!1),C&&l({visible:!1,title:"",message:""})}}),queryDrillByChartData:m=>vs(null,[m],function*({queryData:f,setDrillLoading:g,setDrillError:p}){var C,x;const{metrics:v,dimensions:b,timeGrain:y}=f;if((C=f==null?void 0:f.metrics)!=null&&C[0]){const S=yield t(f).catch(R=>{p({visible:!0,title:e.formatMessage({id:"drillDataLoadingFailed"}),message:R.message}),g(!1)}),w=n(S),E=Rz({metrics:(v==null?void 0:v.map(R=>R.label))||[],dimensions:(b==null?void 0:b.map(R=>R.value==="metricTime"?"metricTime":R.label))||[],timeGrain:y,chartJson:r,data:w}),A=rZ(E),T=o;c(on(Te({},T),{chartState:{chartJson:E,dataset:A,history:[...((x=T.chartState)==null?void 0:x.history)||[],{chartJson:E,dataset:A}]}})),g(!1),S&&p({visible:!1,title:"",message:""})}})}},p0i=$a(Au)`
|
|
10229
10229
|
${()=>vl`
|
|
10230
10230
|
&.ant-btn {
|
|
10231
10231
|
color: #89898a;
|
|
@@ -10648,7 +10648,7 @@ ${r}
|
|
|
10648
10648
|
}
|
|
10649
10649
|
}
|
|
10650
10650
|
`}
|
|
10651
|
-
`,Pyi=i=>M.createElement("svg",Te({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),M.createElement("path",{d:"M10.2922 14.9805L6.53982 10.8977L16.6663 10.8977V9.10209L6.53982 9.10209L10.2922 5.01946L9.10769 3.75L3.33301 10L9.10769 16.25L10.2922 14.9805Z",fill:"#89898A"})),Lyi=[{key:"custom",label:"Custom",value:"custom"},{key:"today",label:"Today",value:"today"},{key:"last7Days",label:"Last 7 days",value:"last7Days"},{key:"last30Days",label:"Last 30 days",value:"last30Days"},{key:"last1Year",label:"Last year",value:"last1Year"},{key:"thisWeek",label:"This week",value:"thisWeek"},{key:"thisMonth",label:"This month",value:"thisMonth"},{key:"thisQuarter",label:"This quarter",value:"thisQuarter"},{key:"thisYear",label:"This year",value:"thisYear"},{key:"weekToDate",label:"Week-to-date",value:"weekToDate"},{key:"monthToDate",label:"Month-to-date",value:"monthToDate"},{key:"quarterToDate",label:"Quarter-to-date",value:"quarterToDate"},{key:"yearToDate",label:"Year-to-date",value:"yearToDate"},{key:"advanced",label:"Advanced",value:"advanced"}],Byi=[{key:"lastPeriod",label:"Last N period",value:"lastPeriod"},{key:"periodAgo",label:"N periods ago",value:"periodAgo"},{key:"periodBoundary",label:"Current/previous period boundary",value:"periodBoundary"}],Fyi=[{key:"current",label:"Current",value:"current"},{key:"previous",label:"Previous",value:"previous"}],_S=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"day",label:"Day",value:"day"},{key:"week",label:"Week",value:"week"},{key:"month",label:"Month",value:"month"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"year",label:"Year",value:"year"}],eqe=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"year",label:"Year",value:"year"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"month",label:"Month",value:"month"},{key:"week",label:"Week",value:"week"},{key:"day",label:"Day",value:"day"}],Nyi=[{key:"first",label:"First",value:"first"},{key:"last",label:"Last",value:"last"}],tqe={type:"lastPeriod",lastPeriod:{range:7,unit:"day"},periodAgo:{range:7,unit:"day"},periodBoundary:{periodType:"current",periodUnit:"month",periodRange:void 0,boundaryType:"first",boundaryUnit:"day"}},jA={second:0,minute:1,hour:2,day:3,week:4,month:5,quarter:6,year:7},$yi=i=>{if(i&&Object.prototype.hasOwnProperty.call(jA,i)){const e=jA[i];return _S.filter(t=>jA[t.value]<e)}return _S},Hyi=i=>{const e=jA[i==null?void 0:i.toLowerCase()];return e!==void 0?eqe.filter(t=>jA[t.value]<e):eqe},zyi=(i,e,t)=>{var n,r,o,s,a,l;if((e==null?void 0:e.type)==="custom"&&(n=e==null?void 0:e.custom)!=null&&n.from&&(r=e==null?void 0:e.custom)!=null&&r.to){const u=Hr(e.custom.from).format(Om),c=Hr(e.custom.to).format(Om);return`${u}-${c}`}if((e==null?void 0:e.type)==="advanced"&&e.advanced){const u=e.advanced;let c="";if((u==null?void 0:u.type)==="lastPeriod")return t({id:"lastNUnits"},{range:(o=u==null?void 0:u.lastPeriod)==null?void 0:o.range,unit:t({id:"unit"+((s=u.lastPeriod)==null?void 0:s.unit)})});if((u==null?void 0:u.type)==="periodAgo")return t({id:"periodAgoNUnits"},{range:(a=u.periodAgo)==null?void 0:a.range,unit:t({id:"unit"+((l=u.periodAgo)==null?void 0:l.unit)})});if((u==null?void 0:u.type)==="periodBoundary"){const h=u.periodBoundary;if((h==null?void 0:h.periodType)==="current")return t({id:"currentNUnit"},{periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})});if((h==null?void 0:h.periodType)==="previous")return t({id:"previousNUnits"},{periodRange:h.periodRange,periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})})}return c}return i},Wyi=i=>i==null?void 0:i.dimensionUnit,Vyi=(i,e)=>{var t,n,r;if(!(i!=null&&i.type)){const o=e==null?void 0:e.mql;let s;if(typeof o=="object")s=o==null?void 0:o.timeConstraint;else if(typeof o=="string")try{s=(t=JSON.parse(o))==null?void 0:t.timeConstraint}catch(a){console.error(a),s={}}return(s==null?void 0:s.type)==="advanced"&&((r=(n=s==null?void 0:s.advanced)==null?void 0:n.custom)!=null&&r.from)?{type:"custom",custom:{from:s.advanced.custom.from,to:s.advanced.custom.to||Hr().format("YYYY-MM-DD HH:mm:ss")}}:
|
|
10651
|
+
`,Pyi=i=>M.createElement("svg",Te({width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i),M.createElement("path",{d:"M10.2922 14.9805L6.53982 10.8977L16.6663 10.8977V9.10209L6.53982 9.10209L10.2922 5.01946L9.10769 3.75L3.33301 10L9.10769 16.25L10.2922 14.9805Z",fill:"#89898A"})),Lyi=[{key:"custom",label:"Custom",value:"custom"},{key:"today",label:"Today",value:"today"},{key:"last7Days",label:"Last 7 days",value:"last7Days"},{key:"last30Days",label:"Last 30 days",value:"last30Days"},{key:"last1Year",label:"Last year",value:"last1Year"},{key:"thisWeek",label:"This week",value:"thisWeek"},{key:"thisMonth",label:"This month",value:"thisMonth"},{key:"thisQuarter",label:"This quarter",value:"thisQuarter"},{key:"thisYear",label:"This year",value:"thisYear"},{key:"weekToDate",label:"Week-to-date",value:"weekToDate"},{key:"monthToDate",label:"Month-to-date",value:"monthToDate"},{key:"quarterToDate",label:"Quarter-to-date",value:"quarterToDate"},{key:"yearToDate",label:"Year-to-date",value:"yearToDate"},{key:"advanced",label:"Advanced",value:"advanced"}],Byi=[{key:"lastPeriod",label:"Last N period",value:"lastPeriod"},{key:"periodAgo",label:"N periods ago",value:"periodAgo"},{key:"periodBoundary",label:"Current/previous period boundary",value:"periodBoundary"}],Fyi=[{key:"current",label:"Current",value:"current"},{key:"previous",label:"Previous",value:"previous"}],_S=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"day",label:"Day",value:"day"},{key:"week",label:"Week",value:"week"},{key:"month",label:"Month",value:"month"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"year",label:"Year",value:"year"}],eqe=[{key:"minute",label:"Minute",value:"minute"},{key:"hour",label:"Hour",value:"hour"},{key:"year",label:"Year",value:"year"},{key:"quarter",label:"Quarter",value:"quarter"},{key:"month",label:"Month",value:"month"},{key:"week",label:"Week",value:"week"},{key:"day",label:"Day",value:"day"}],Nyi=[{key:"first",label:"First",value:"first"},{key:"last",label:"Last",value:"last"}],tqe={type:"lastPeriod",lastPeriod:{range:7,unit:"day"},periodAgo:{range:7,unit:"day"},periodBoundary:{periodType:"current",periodUnit:"month",periodRange:void 0,boundaryType:"first",boundaryUnit:"day"}},jA={second:0,minute:1,hour:2,day:3,week:4,month:5,quarter:6,year:7},$yi=i=>{if(i&&Object.prototype.hasOwnProperty.call(jA,i)){const e=jA[i];return _S.filter(t=>jA[t.value]<e)}return _S},Hyi=i=>{const e=jA[i==null?void 0:i.toLowerCase()];return e!==void 0?eqe.filter(t=>jA[t.value]<e):eqe},zyi=(i,e,t)=>{var n,r,o,s,a,l;if((e==null?void 0:e.type)==="custom"&&(n=e==null?void 0:e.custom)!=null&&n.from&&(r=e==null?void 0:e.custom)!=null&&r.to){const u=Hr(e.custom.from).format(Om),c=Hr(e.custom.to).format(Om);return`${u}-${c}`}if((e==null?void 0:e.type)==="advanced"&&e.advanced){const u=e.advanced;let c="";if((u==null?void 0:u.type)==="lastPeriod")return t({id:"lastNUnits"},{range:(o=u==null?void 0:u.lastPeriod)==null?void 0:o.range,unit:t({id:"unit"+((s=u.lastPeriod)==null?void 0:s.unit)})});if((u==null?void 0:u.type)==="periodAgo")return t({id:"periodAgoNUnits"},{range:(a=u.periodAgo)==null?void 0:a.range,unit:t({id:"unit"+((l=u.periodAgo)==null?void 0:l.unit)})});if((u==null?void 0:u.type)==="periodBoundary"){const h=u.periodBoundary;if((h==null?void 0:h.periodType)==="current")return t({id:"currentNUnit"},{periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})});if((h==null?void 0:h.periodType)==="previous")return t({id:"previousNUnits"},{periodRange:h.periodRange,periodUnit:t({id:"unit"+h.periodUnit}),boundaryType:t({id:h.boundaryType}),boundaryUnit:t({id:"unit"+h.boundaryUnit})})}return c}return i},Wyi=i=>i==null?void 0:i.dimensionUnit,Vyi=(i,e)=>{var t,n,r;if(!(i!=null&&i.type)){const o=e==null?void 0:e.mql;let s;if(typeof o=="object")s=o==null?void 0:o.timeConstraint;else if(typeof o=="string")try{s=(t=JSON.parse(o))==null?void 0:t.timeConstraint}catch(a){console.error(a),s={}}return(s==null?void 0:s.type)==="advanced"&&((r=(n=s==null?void 0:s.advanced)==null?void 0:n.custom)!=null&&r.from)?{type:"custom",custom:{from:s.advanced.custom.from,to:s.advanced.custom.to||Hr().format("YYYY-MM-DD HH:mm:ss")}}:{}}return i},{Text:UA}=d3,jyi=C3`
|
|
10652
10652
|
${()=>vl`
|
|
10653
10653
|
.advanced-select-dropdown {
|
|
10654
10654
|
&.ant-select-dropdown {
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const version = "2.0.
|
|
1
|
+
declare const version = "2.0.3";
|
|
2
2
|
export default version;
|