@advt-gpt-chart/package 3.0.0 → 3.0.1
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 +3 -1
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +2 -2
- 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
CHANGED
|
@@ -181551,7 +181551,7 @@ function FQe() {
|
|
|
181551
181551
|
throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");
|
|
181552
181552
|
return i;
|
|
181553
181553
|
}
|
|
181554
|
-
const Nxi = "3.0.
|
|
181554
|
+
const Nxi = "3.0.1", _ce = /* @__PURE__ */ Qy({});
|
|
181555
181555
|
function NQe(i) {
|
|
181556
181556
|
var e, t, n = "";
|
|
181557
181557
|
if (typeof i == "string" || typeof i == "number") n += i;
|
|
@@ -203453,6 +203453,8 @@ function c9i({ theme: i, dataSource: e }) {
|
|
|
203453
203453
|
options: n,
|
|
203454
203454
|
value: R,
|
|
203455
203455
|
onChange: (L) => {
|
|
203456
|
+
if (L.length === 0)
|
|
203457
|
+
return;
|
|
203456
203458
|
const F = n.filter((W) => L.includes(W.value));
|
|
203457
203459
|
A("metrics", F), m([...L]).then((W) => {
|
|
203458
203460
|
const V = uit(F), G = che(W, V, s);
|
package/dist/index.es.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.js
CHANGED
|
@@ -10585,7 +10585,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
10585
10585
|
`,Pae=({loadingText:i})=>we.jsxs(L3i,{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})]}),B3i=Bs.div`
|
|
10586
10586
|
height: 100%;
|
|
10587
10587
|
width: 100%;
|
|
10588
|
-
`,EGe=({visible:i,title:e,message:t})=>i?we.jsx(B3i,{className:"error-container",children:we.jsx(ZA,{status:"error",title:e,subTitle:t})}):null,AGe=ce.createContext(null);function TGe(){const i=ce.useContext(AGe);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const RGe="3.0.0",Lae=ce.createContext({});function MGe(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=MGe(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function Bae(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=MGe(i))&&(n&&(n+=" "),n+=e);return n}const F3i={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 Fae(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 kGe=(i,e,t)=>t===0?i:i/100;function NT(i,e){const t=e||255;return i>t?t:i<0?0:i}class bS{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=F3i[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof bS)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=NT(e.r),this.g=NT(e.g),this.b=NT(e.b),this.a=typeof e.a=="number"?NT(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]=NT(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=Fae(e,kGe);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Fae(e,kGe);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Fae(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 BL=2,OGe=.16,N3i=.05,H3i=.05,$3i=.15,IGe=5,DGe=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 PGe(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-BL*e:Math.round(i.h)+BL*e:n=t?Math.round(i.h)+BL*e:Math.round(i.h)-BL*e,n<0?n+=360:n>=360&&(n-=360),n}function LGe(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-OGe*e:e===DGe?n=i.s+OGe:n=i.s+N3i*e,n>1&&(n=1),t&&e===IGe&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function BGe(i,e,t){let n;return t?n=i.v+H3i*e:n=i.v-$3i*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function W3i(i,e={}){const t=[],n=new bS(i),r=n.toHsv();for(let o=IGe;o>0;o-=1){const a=new bS({h:PGe(r,o,!0),s:LGe(r,o,!0),v:BGe(r,o,!0)});t.push(a)}t.push(n);for(let o=1;o<=DGe;o+=1){const a=new bS({h:PGe(r,o),s:LGe(r,o),v:BGe(r,o)});t.push(a)}return e.theme==="dark"?z3i.map(({index:o,amount:a})=>new bS(e.backgroundColor||"#141414").mix(t[o],a).toHexString()):t.map(o=>o.toHexString())}const Nae=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Nae.primary=Nae[5];function V3i(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function j3i(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 FGe="data-rc-order",NGe="data-rc-priority",U3i="rc-util-key",Hae=new Map;function HGe({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:U3i}function $ae(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function G3i(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function zae(i){return Array.from((Hae.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function $Ge(i,e={}){if(!V3i())return null;const{csp:t,prepend:n,priority:r=0}=e,o=G3i(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(FGe,o),a&&r&&s.setAttribute(NGe,`${r}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=i;const l=$ae(e),{firstChild:u}=l;if(n){if(a){const c=(e.styles||zae(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(FGe)))return!1;const d=Number(h.getAttribute(NGe)||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 q3i(i,e={}){let{styles:t}=e;return t||(t=zae($ae(e))),t.find(n=>n.getAttribute(HGe(e))===i)}function Y3i(i,e){const t=Hae.get(i);if(!t||!j3i(document,t)){const n=$Ge("",e),{parentNode:r}=n;Hae.set(i,r),i.removeChild(n)}}function X3i(i,e,t={}){var l,u,c;const n=$ae(t),r=zae(n),o=Hi(ke({},t),{styles:r});Y3i(n,o);const a=q3i(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=$Ge(i,o);return s.setAttribute(HGe(o),e),s}function zGe(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function K3i(i){return zGe(i)instanceof ShadowRoot}function Z3i(i){return K3i(i)?zGe(i):null}var WGe={};let Wae={};const Vae=[],Q3i=i=>{Vae.push(i)};function J3i(i,e){if(WGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Vae.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function exi(i,e){if(WGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Vae.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function txi(){Wae={}}function VGe(i,e,t){!e&&!Wae[t]&&(i(!1,t),Wae[t]=!0)}function FL(i,e){VGe(J3i,i,e)}function ixi(i,e){VGe(exi,i,e)}FL.preMessage=Q3i,FL.resetWarned=txi,FL.noteOnce=ixi;function nxi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function jae(i,e){FL(i,`[@ant-design/icons] ${e}`)}function jGe(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function UGe(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[nxi(t)]=n}return e},{})}function Uae(i,e,t){return t?ce.createElement(i.tag,ke(ke({key:e},UGe(i.attrs)),t),(i.children||[]).map((n,r)=>Uae(n,`${e}-${i.tag}-${r}`))):ce.createElement(i.tag,ke({key:e},UGe(i.attrs)),(i.children||[]).map((n,r)=>Uae(n,`${e}-${i.tag}-${r}`)))}function GGe(i){return W3i(i)[0]}function qGe(i){return i?Array.isArray(i)?i:[i]:[]}const rxi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},oxi=`
|
|
10588
|
+
`,EGe=({visible:i,title:e,message:t})=>i?we.jsx(B3i,{className:"error-container",children:we.jsx(ZA,{status:"error",title:e,subTitle:t})}):null,AGe=ce.createContext(null);function TGe(){const i=ce.useContext(AGe);if(i===void 0||Object.keys(i).length===0)throw new Error("useGPTVisContext must be used within a GPTVisContext.Provider");return i}const RGe="3.0.1",Lae=ce.createContext({});function MGe(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=MGe(i[e]))&&(n&&(n+=" "),n+=t)}else for(t in i)i[t]&&(n&&(n+=" "),n+=t);return n}function Bae(){for(var i,e,t=0,n="",r=arguments.length;t<r;t++)(i=arguments[t])&&(e=MGe(i))&&(n&&(n+=" "),n+=e);return n}const F3i={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 Fae(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 kGe=(i,e,t)=>t===0?i:i/100;function NT(i,e){const t=e||255;return i>t?t:i<0?0:i}class bS{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=F3i[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(e instanceof bS)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=NT(e.r),this.g=NT(e.g),this.b=NT(e.b),this.a=typeof e.a=="number"?NT(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]=NT(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=Fae(e,kGe);this.fromHsv({h:t[0],s:t[1],v:t[2],a:t[3]})}fromHslString(e){const t=Fae(e,kGe);this.fromHsl({h:t[0],s:t[1],l:t[2],a:t[3]})}fromRgbString(e){const t=Fae(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 BL=2,OGe=.16,N3i=.05,H3i=.05,$3i=.15,IGe=5,DGe=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 PGe(i,e,t){let n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=t?Math.round(i.h)-BL*e:Math.round(i.h)+BL*e:n=t?Math.round(i.h)+BL*e:Math.round(i.h)-BL*e,n<0?n+=360:n>=360&&(n-=360),n}function LGe(i,e,t){if(i.h===0&&i.s===0)return i.s;let n;return t?n=i.s-OGe*e:e===DGe?n=i.s+OGe:n=i.s+N3i*e,n>1&&(n=1),t&&e===IGe&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function BGe(i,e,t){let n;return t?n=i.v+H3i*e:n=i.v-$3i*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function W3i(i,e={}){const t=[],n=new bS(i),r=n.toHsv();for(let o=IGe;o>0;o-=1){const a=new bS({h:PGe(r,o,!0),s:LGe(r,o,!0),v:BGe(r,o,!0)});t.push(a)}t.push(n);for(let o=1;o<=DGe;o+=1){const a=new bS({h:PGe(r,o),s:LGe(r,o),v:BGe(r,o)});t.push(a)}return e.theme==="dark"?z3i.map(({index:o,amount:a})=>new bS(e.backgroundColor||"#141414").mix(t[o],a).toHexString()):t.map(o=>o.toHexString())}const Nae=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Nae.primary=Nae[5];function V3i(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function j3i(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 FGe="data-rc-order",NGe="data-rc-priority",U3i="rc-util-key",Hae=new Map;function HGe({mark:i}={}){return i?i.startsWith("data-")?i:`data-${i}`:U3i}function $ae(i){return i.attachTo?i.attachTo:document.querySelector("head")||document.body}function G3i(i){return i==="queue"?"prependQueue":i?"prepend":"append"}function zae(i){return Array.from((Hae.get(i)||i).children).filter(e=>e.tagName==="STYLE")}function $Ge(i,e={}){if(!V3i())return null;const{csp:t,prepend:n,priority:r=0}=e,o=G3i(n),a=o==="prependQueue",s=document.createElement("style");s.setAttribute(FGe,o),a&&r&&s.setAttribute(NGe,`${r}`),t!=null&&t.nonce&&(s.nonce=t==null?void 0:t.nonce),s.innerHTML=i;const l=$ae(e),{firstChild:u}=l;if(n){if(a){const c=(e.styles||zae(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(FGe)))return!1;const d=Number(h.getAttribute(NGe)||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 q3i(i,e={}){let{styles:t}=e;return t||(t=zae($ae(e))),t.find(n=>n.getAttribute(HGe(e))===i)}function Y3i(i,e){const t=Hae.get(i);if(!t||!j3i(document,t)){const n=$Ge("",e),{parentNode:r}=n;Hae.set(i,r),i.removeChild(n)}}function X3i(i,e,t={}){var l,u,c;const n=$ae(t),r=zae(n),o=Hi(ke({},t),{styles:r});Y3i(n,o);const a=q3i(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=$Ge(i,o);return s.setAttribute(HGe(o),e),s}function zGe(i){var e;return(e=i==null?void 0:i.getRootNode)==null?void 0:e.call(i)}function K3i(i){return zGe(i)instanceof ShadowRoot}function Z3i(i){return K3i(i)?zGe(i):null}var WGe={};let Wae={};const Vae=[],Q3i=i=>{Vae.push(i)};function J3i(i,e){if(WGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Vae.reduce((n,r)=>r(n!=null?n:"","warning"),e);t&&console.error(`Warning: ${t}`)}}function exi(i,e){if(WGe.NODE_ENV!=="production"&&!i&&console!==void 0){const t=Vae.reduce((n,r)=>r(n!=null?n:"","note"),e);t&&console.warn(`Note: ${t}`)}}function txi(){Wae={}}function VGe(i,e,t){!e&&!Wae[t]&&(i(!1,t),Wae[t]=!0)}function FL(i,e){VGe(J3i,i,e)}function ixi(i,e){VGe(exi,i,e)}FL.preMessage=Q3i,FL.resetWarned=txi,FL.noteOnce=ixi;function nxi(i){return i.replace(/-(.)/g,(e,t)=>t.toUpperCase())}function jae(i,e){FL(i,`[@ant-design/icons] ${e}`)}function jGe(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function UGe(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[nxi(t)]=n}return e},{})}function Uae(i,e,t){return t?ce.createElement(i.tag,ke(ke({key:e},UGe(i.attrs)),t),(i.children||[]).map((n,r)=>Uae(n,`${e}-${i.tag}-${r}`))):ce.createElement(i.tag,ke({key:e},UGe(i.attrs)),(i.children||[]).map((n,r)=>Uae(n,`${e}-${i.tag}-${r}`)))}function GGe(i){return W3i(i)[0]}function qGe(i){return i?Array.isArray(i)?i:[i]:[]}const rxi={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},oxi=`
|
|
10589
10589
|
.anticon {
|
|
10590
10590
|
display: inline-flex;
|
|
10591
10591
|
align-items: center;
|
|
@@ -11242,7 +11242,7 @@ ${r}
|
|
|
11242
11242
|
}
|
|
11243
11243
|
}
|
|
11244
11244
|
`}
|
|
11245
|
-
`,bQe=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(hg,{className:"actions",justify:"space-between",align:"center",children:[we.jsx(Op,{type:"text",onClick:()=>r(!1),children:we.jsx(yo,{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(yo,{id:"modalApply"})})]}),s=(l,u)=>{t({dates:l,dateStrings:u})};return we.jsxs(Yf,{theme:X8i,children:[we.jsx(Z8i,{}),we.jsx("div",{ref:o,children:we.jsx(K8i,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))})]})},Q8i=({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(R8i,{className:"custom-content",children:[we.jsxs("div",{className:"left-content",children:[we.jsx("div",{className:"title",children:we.jsx(yo,{id:"startTime"})}),we.jsx(vQe,{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(bQe,{onChange:o=>{o&&t({from:o})},value:i.from})]})]}),we.jsxs("div",{className:"right-content",children:[we.jsx("div",{className:"title",children:we.jsx(yo,{id:"endTime"})}),we.jsx(vQe,{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(bQe,{onChange:o=>{o&&t({to:o})},value:i.to})]})]})]})},J8i=({type:i,setClose:e,setApply:t,timeRange:n})=>{const[r,o]=ce.useState({from:Fr().subtract(7,"day"),to:Fr()}),[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:Fr(n.custom.from),to:Fr(n.custom.to)}),i==="advanced"&&n!=null&&n.advanced&&s(n.advanced)},[n]);const l=()=>{if(i==="custom"){const u=Fr(r.from).format(Ob),c=Fr(r.to).format(Ob);t({type:"custom",custom:{from:u,to:c}})}i==="advanced"&&t({type:"advanced",advanced:ke({},a)})};return we.jsxs(T8i,{className:"time-popover-container",children:[we.jsxs("div",{className:"time-popover-header",children:[we.jsx(kl,{className:"icon-box",type:"text",onClick:()=>e(!0),children:we.jsx(Cg,{component:k8i})}),we.jsx("span",{className:"time-title",children:we.jsx(yo,{id:i})})]}),we.jsxs("div",{className:"time-popover-content",children:[i==="custom"&&we.jsx(Q8i,{customTimeRange:r,onChange:u=>o(u)}),i==="advanced"&&we.jsx(q8i,{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(yo,{id:"cancel"})})}),we.jsx("div",{className:"time-footer-btn apply-btn",children:we.jsx(Op,{type:"text",onClick:l,children:we.jsx(yo,{id:"modalApply"})})})]})]})},eRi=({timeRange:i,onChange:e})=>{const{formatMessage:t}=$d(),[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"?V8i(g,i,t):g,f=g=>{const p=g.value==="advanced"||g.value==="custom";return we.jsxs(hg,{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(Zae,{})})]})};return we.jsxs(A8i,{ref:s,children:[we.jsx(td,{className:"time-range-select",prefix:we.jsx(yo,{id:"timeRange"}),value:l,options:Yd(F8i),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(J8i,{type:l,timeRange:i,setClose:g=>{a(!1),i&&e(ke({},i)),g&&r(!0)},setApply:c})]})};function tRi({theme:i,dataSource:e}){const t=$d(),[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}=Od(),[g,p]=ce.useState({metrics:[],dimensions:[]}),{queryDimensions:m,queryMql2Params:v,queryMetricId:b}=tqe(e==null?void 0:e.type),{queryChartDataFromDatasource:y}=iqe(e),_=L=>{const F={metrics:(L==null?void 0:L.metrics)||[],dimensions:(L==null?void 0:L.dimensions)||[],timeRange:U8i(L==null?void 0:L.timeRange,e)||{},timeGrain:j8i(L==null?void 0:L.timeDimension)||(L==null?void 0:L.timeGrain)||(l==null?void 0:l.timeGrain),filters:Yxi(L==null?void 0:L.filters),queryMetricOrgId:L==null?void 0:L.queryMetricOrgId},W=Hi(ke({},F),{dataFormat:(L==null?void 0:L.dataFormat)||{}});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(ke({},W)),y(W,!0)},S=L=>Sa(null,null,function*(){var W;const F=yield v(L);if(F&&Array.isArray(F)&&F.length>0){const V=F[0],G=D8i(L,V),z=(W=G==null?void 0:G.metricsOptions)==null?void 0:W.flatMap(H=>H==null?void 0:H.atomicMetricIds);if(!(z!=null&&z.length)){h({visible:!0,title:"Error",message:"metric is missing"}),c(!1);return}const X=yield m(z),j=P8i(V,G,X,s);_(j)}}),x=L=>Sa(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=I8i(F,l,s);_(Hi(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(ke({},g))},E=()=>{const{metrics:L}=g;return!(L!=null&&L.length)},A=(L,F)=>{p(W=>Hi(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(E8i,{className:"chart-controllers",theme:i,children:[we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(Cg,{component:Fxi})}),we.jsxs("div",{className:"controllers-content",children:[we.jsxs("div",{className:"row-item",children:[we.jsx(eRi,{timeRange:T,onChange:L=>A("timeRange",L)}),we.jsx(td,{mode:"multiple",prefix:we.jsx(yo,{id:"metric"}),options:n,value:R,onChange:L=>{const F=n.filter(W=>L.includes(W.value));A("metrics",F),m([...L]).then(W=>{const V=fQe(F),G=_ue(W,V,s);a(G)})}})]}),we.jsxs("div",{className:"row-item",children:[we.jsx(td,{mode:"multiple",allowClear:!0,prefix:we.jsx(yo,{id:"dimension"}),value:k,options:o,onChange:L=>{const F=o.filter(G=>L.includes(G.value)),W=F==null?void 0:F.some(G=>G.value===s.value);W!==!!O&&A("timeGrain",W?O||"day":""),A("dimensions",F)}}),we.jsx(td,{prefix:we.jsx(yo,{id:"timeGrain"}),value:O,options:Yd(US),onChange:L=>A("timeGrain",L),allowClear:!0})]})]})]}),we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(Cg,{component:Nxi})}),we.jsx(w8i,{filters:P,onChange:L=>A("filters",L)})]}),we.jsx("div",{className:"apply-btns",children:we.jsx(kl,{disabled:E(),type:"primary",onClick:w,children:we.jsx(yo,{id:"apply"})})})]})}const iRi=Bs.div`
|
|
11245
|
+
`,bQe=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(hg,{className:"actions",justify:"space-between",align:"center",children:[we.jsx(Op,{type:"text",onClick:()=>r(!1),children:we.jsx(yo,{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(yo,{id:"modalApply"})})]}),s=(l,u)=>{t({dates:l,dateStrings:u})};return we.jsxs(Yf,{theme:X8i,children:[we.jsx(Z8i,{}),we.jsx("div",{ref:o,children:we.jsx(K8i,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))})]})},Q8i=({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(R8i,{className:"custom-content",children:[we.jsxs("div",{className:"left-content",children:[we.jsx("div",{className:"title",children:we.jsx(yo,{id:"startTime"})}),we.jsx(vQe,{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(bQe,{onChange:o=>{o&&t({from:o})},value:i.from})]})]}),we.jsxs("div",{className:"right-content",children:[we.jsx("div",{className:"title",children:we.jsx(yo,{id:"endTime"})}),we.jsx(vQe,{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(bQe,{onChange:o=>{o&&t({to:o})},value:i.to})]})]})]})},J8i=({type:i,setClose:e,setApply:t,timeRange:n})=>{const[r,o]=ce.useState({from:Fr().subtract(7,"day"),to:Fr()}),[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:Fr(n.custom.from),to:Fr(n.custom.to)}),i==="advanced"&&n!=null&&n.advanced&&s(n.advanced)},[n]);const l=()=>{if(i==="custom"){const u=Fr(r.from).format(Ob),c=Fr(r.to).format(Ob);t({type:"custom",custom:{from:u,to:c}})}i==="advanced"&&t({type:"advanced",advanced:ke({},a)})};return we.jsxs(T8i,{className:"time-popover-container",children:[we.jsxs("div",{className:"time-popover-header",children:[we.jsx(kl,{className:"icon-box",type:"text",onClick:()=>e(!0),children:we.jsx(Cg,{component:k8i})}),we.jsx("span",{className:"time-title",children:we.jsx(yo,{id:i})})]}),we.jsxs("div",{className:"time-popover-content",children:[i==="custom"&&we.jsx(Q8i,{customTimeRange:r,onChange:u=>o(u)}),i==="advanced"&&we.jsx(q8i,{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(yo,{id:"cancel"})})}),we.jsx("div",{className:"time-footer-btn apply-btn",children:we.jsx(Op,{type:"text",onClick:l,children:we.jsx(yo,{id:"modalApply"})})})]})]})},eRi=({timeRange:i,onChange:e})=>{const{formatMessage:t}=$d(),[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"?V8i(g,i,t):g,f=g=>{const p=g.value==="advanced"||g.value==="custom";return we.jsxs(hg,{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(Zae,{})})]})};return we.jsxs(A8i,{ref:s,children:[we.jsx(td,{className:"time-range-select",prefix:we.jsx(yo,{id:"timeRange"}),value:l,options:Yd(F8i),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(J8i,{type:l,timeRange:i,setClose:g=>{a(!1),i&&e(ke({},i)),g&&r(!0)},setApply:c})]})};function tRi({theme:i,dataSource:e}){const t=$d(),[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}=Od(),[g,p]=ce.useState({metrics:[],dimensions:[]}),{queryDimensions:m,queryMql2Params:v,queryMetricId:b}=tqe(e==null?void 0:e.type),{queryChartDataFromDatasource:y}=iqe(e),_=L=>{const F={metrics:(L==null?void 0:L.metrics)||[],dimensions:(L==null?void 0:L.dimensions)||[],timeRange:U8i(L==null?void 0:L.timeRange,e)||{},timeGrain:j8i(L==null?void 0:L.timeDimension)||(L==null?void 0:L.timeGrain)||(l==null?void 0:l.timeGrain),filters:Yxi(L==null?void 0:L.filters),queryMetricOrgId:L==null?void 0:L.queryMetricOrgId},W=Hi(ke({},F),{dataFormat:(L==null?void 0:L.dataFormat)||{}});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(ke({},W)),y(W,!0)},S=L=>Sa(null,null,function*(){var W;const F=yield v(L);if(F&&Array.isArray(F)&&F.length>0){const V=F[0],G=D8i(L,V),z=(W=G==null?void 0:G.metricsOptions)==null?void 0:W.flatMap(H=>H==null?void 0:H.atomicMetricIds);if(!(z!=null&&z.length)){h({visible:!0,title:"Error",message:"metric is missing"}),c(!1);return}const X=yield m(z),j=P8i(V,G,X,s);_(j)}}),x=L=>Sa(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=I8i(F,l,s);_(Hi(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(ke({},g))},E=()=>{const{metrics:L}=g;return!(L!=null&&L.length)},A=(L,F)=>{p(W=>Hi(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(E8i,{className:"chart-controllers",theme:i,children:[we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(Cg,{component:Fxi})}),we.jsxs("div",{className:"controllers-content",children:[we.jsxs("div",{className:"row-item",children:[we.jsx(eRi,{timeRange:T,onChange:L=>A("timeRange",L)}),we.jsx(td,{mode:"multiple",prefix:we.jsx(yo,{id:"metric"}),options:n,value:R,onChange:L=>{if(L.length===0)return;const F=n.filter(W=>L.includes(W.value));A("metrics",F),m([...L]).then(W=>{const V=fQe(F),G=_ue(W,V,s);a(G)})}})]}),we.jsxs("div",{className:"row-item",children:[we.jsx(td,{mode:"multiple",allowClear:!0,prefix:we.jsx(yo,{id:"dimension"}),value:k,options:o,onChange:L=>{const F=o.filter(G=>L.includes(G.value)),W=F==null?void 0:F.some(G=>G.value===s.value);W!==!!O&&A("timeGrain",W?O||"day":""),A("dimensions",F)}}),we.jsx(td,{prefix:we.jsx(yo,{id:"timeGrain"}),value:O,options:Yd(US),onChange:L=>A("timeGrain",L),allowClear:!0})]})]})]}),we.jsxs("div",{className:"controllers",children:[we.jsx("div",{className:"controllers-icon",children:we.jsx(Cg,{component:Nxi})}),we.jsx(w8i,{filters:P,onChange:L=>A("filters",L)})]}),we.jsx("div",{className:"apply-btns",children:we.jsx(kl,{disabled:E(),type:"primary",onClick:w,children:we.jsx(yo,{id:"apply"})})})]})}const iRi=Bs.div`
|
|
11246
11246
|
${()=>vl`
|
|
11247
11247
|
position: fixed;
|
|
11248
11248
|
background-color: #fff;
|
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.1";
|
|
2
2
|
export default version;
|