@perses-dev/gauge-chart-plugin 0.14.0-beta.1 → 0.14.0-beta.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/__mf/js/GaugeChart.04ea4c25.js +7 -0
- package/__mf/js/async/{121.a37557d3.js → 121.f74500b6.js} +2 -2
- package/__mf/js/async/{192.1bece79a.js → 192.bf48c4d3.js} +1 -1
- package/__mf/js/async/208.89d62809.js +74 -0
- package/__mf/js/async/{235.25414f3a.js → 235.5138fe4d.js} +1 -1
- package/__mf/js/async/{893.a44ef766.js → 274.399785ca.js} +2 -2
- package/__mf/js/async/356.87842240.js +1 -0
- package/__mf/js/async/377.f267226a.js +1 -0
- package/__mf/js/async/{392.605cca25.js → 392.156ea9ba.js} +2 -2
- package/__mf/js/async/403.40b59212.js +2 -0
- package/__mf/js/async/410.df2ea576.js +1 -0
- package/__mf/js/async/{458.501ed0da.js → 458.48a11b45.js} +1 -1
- package/__mf/js/async/463.562ddfd8.js +7 -0
- package/__mf/js/async/{470.a2c22a78.js → 470.ff27e6ad.js} +2 -2
- package/__mf/js/async/496.2724ab87.js +1 -0
- package/__mf/js/async/587.5c0f3202.js +1 -0
- package/__mf/js/async/588.5667535c.js +1 -0
- package/__mf/js/async/{616.cecf44f8.js → 616.ce8a11c6.js} +1 -1
- package/__mf/js/async/71.415ba237.js +1 -0
- package/__mf/js/async/750.ce952d80.js +29 -0
- package/__mf/js/async/{77.c33fcfb5.js → 77.14e20a7a.js} +1 -1
- package/__mf/js/async/823.eddd2367.js +10 -0
- package/__mf/js/async/844.16a20c02.js +37 -0
- package/__mf/js/async/854.2db30a80.js +1 -0
- package/__mf/js/async/868.1c835f67.js +53 -0
- package/__mf/js/async/873.abcbd6eb.js +1 -0
- package/__mf/js/async/{941.e909e334.js → 941.50baa732.js} +2 -2
- package/__mf/js/async/{963.caed232d.js → 963.4dd8fd92.js} +1 -1
- package/__mf/js/async/968.e98d087b.js +1 -0
- package/__mf/js/async/978.d4707799.js +1 -0
- package/__mf/js/async/__federation_expose_GaugeChart.76e991f2.js +1 -0
- package/__mf/js/async/{lib-router.005da842.js → lib-router.70e6341d.js} +2 -2
- package/__mf/js/{main.9a8ce910.js → main.53a8ccee.js} +5 -5
- package/mf-manifest.json +98 -33
- package/mf-stats.json +110 -33
- package/package.json +5 -5
- package/__mf/js/GaugeChart.666448e5.js +0 -7
- package/__mf/js/async/2.e1c5abe4.js +0 -1
- package/__mf/js/async/208.a09e3946.js +0 -83
- package/__mf/js/async/244.f21ad375.js +0 -7
- package/__mf/js/async/354.c398a3bf.js +0 -4
- package/__mf/js/async/356.d85a4e2e.js +0 -1
- package/__mf/js/async/373.0403e3b1.js +0 -38
- package/__mf/js/async/587.6f130e41.js +0 -1
- package/__mf/js/async/663.97d3fd12.js +0 -1
- package/__mf/js/async/710.23542577.js +0 -29
- package/__mf/js/async/968.7d1ce389.js +0 -1
- package/__mf/js/async/__federation_expose_GaugeChart.1812e964.js +0 -1
- /package/__mf/css/async/{244.85c2cbf6.css → 463.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{121.a37557d3.js.LICENSE.txt → 121.f74500b6.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{893.a44ef766.js.LICENSE.txt → 274.399785ca.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.605cca25.js.LICENSE.txt → 392.156ea9ba.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{373.0403e3b1.js.LICENSE.txt → 403.40b59212.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{244.f21ad375.js.LICENSE.txt → 463.562ddfd8.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.a2c22a78.js.LICENSE.txt → 470.ff27e6ad.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{208.a09e3946.js.LICENSE.txt → 823.eddd2367.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{354.c398a3bf.js.LICENSE.txt → 868.1c835f67.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.e909e334.js.LICENSE.txt → 941.50baa732.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.005da842.js.LICENSE.txt → lib-router.70e6341d.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.chunk_GaugeChart_0_14_0_beta_1=self.chunk_GaugeChart_0_14_0_beta_1||[]).push([["204"],{44272(e){e.exports=function(e,t){for(var n=-1,l=null==e?0:e.length,o=Array(l);++n<l;)o[n]=t(e[n],n,e);return o}},93305(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},25814(e,t,n){var l=n(61414),o=n(44272),r=n(93305),a=n(36204),i=n(75569),h=Math.max;e.exports=function(e){if(!(e&&e.length))return[];var t=0;return e=l(e,function(e){if(i(e))return t=h(e.length,t),!0}),a(t,function(t){return o(e,r(t))})}},10007(e,t,n){e.exports=n(71506)(n(25814))},23470(e,t,n){"use strict";n.r(t),n.d(t,{GaugeChart:()=>T});let l={unit:"percent-decimal"};var o=n(62540),r=n(93648),a=n(68003),i=n(56875),h=n(9222),s=n(43945),u=n(25632),d=n.n(u),c=n(315),p=n(74628),g=n(33313),m=n(70451),f=n(49828),x=n(59738),v=n(72106),w=n(55875),C=n(74653),M=n(37573);function j(e){let{width:t,height:n,data:l,format:r,axisLine:a,max:h,valueFontSize:s,progressWidth:u,titleFontSize:d}=e,c=(0,i.useChartsTheme)(),p=(0,i.useDeepMemo)(()=>{var e;if(void 0===l.value)return c.noDataOption;let n={type:"gauge",center:["50%","65%"],startAngle:200,endAngle:-20,min:0,max:h,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},data:[{value:l.value}]};return{title:{show:!1},tooltip:{show:!1},series:[{...n,radius:"90%",silent:!0,progress:{show:!0,width:u,itemStyle:{color:"auto"}},axisLine:{lineStyle:{color:[[1,"rgba(127,127,127,0.35)"]],width:u}},pointer:{show:!1},anchor:{show:!1},title:{show:!1},detail:{show:!1}},{...n,radius:"100%",pointer:{show:!0,icon:t>170?"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z":"none",length:10,width:5,offsetCenter:[0,"-49%"],itemStyle:{color:"auto"}},axisLine:a,detail:{show:!0,width:"60%",borderRadius:8,offsetCenter:[0,"-9%"],color:"inherit",fontSize:s,formatter:null===l.value?()=>"null":e=>(0,i.formatValue)(e,r)},data:[{value:l.value,name:l.label,title:{show:!0,color:(null==(e=c.echartsTheme.textStyle)?void 0:e.color)??"inherit",offsetCenter:[0,"55%"],overflow:"truncate",fontSize:d,width:.8*t}}]}]}},[l,t,n,c,r,a,h,s,u,d]);return(0,o.jsx)(i.EChart,{style:{width:t,height:n},sx:{padding:`${c.container.padding.default}px`},option:p,theme:c.echartsTheme})}(0,C.Y)([f.a,x.a,v.a,w.a,M.a]);var b=n(10007),S=n.n(b);let y={steps:[{value:0}]},A={label:"",value:void 0};function L(e,t){return Math.max(10,Math.min(48,Math.round(.1*Math.min(e,t))))}function _(e,t,n,l){let o=Math.max(("number"==typeof e?(0,i.formatValue)(e,t):`${e}`).length,6),r=Math.min(n,l);return`clamp(8px, ${r/o}px, 64px)`}function E(e,t){return Math.max(10,Math.min(16,Math.round(.06*Math.min(e,t))))}let T={PanelComponent:function(e){let{spec:t,contentDimensions:n,queryResults:r}=e,{calculation:a,max:s,legend:u}=t,{thresholds:g}=(0,i.useChartsTheme)(),f=(null==u?void 0:u.show)??!0,x=d()({},l,t.format),v=t.thresholds??y,w=(0,m.useMemo)(()=>{let e=[];h.CalculationsMap[a]||console.warn(`Invalid GaugeChart panel calculation ${a}, fallback to ${h.DEFAULT_CALCULATION}`);let t=h.CalculationsMap[a]??h.CalculationsMap[h.DEFAULT_CALCULATION];for(let n of r)for(let l of n.data.series)e.push({value:t(l.values),label:f?l.formattedName??"":""});return e},[r,a,f]);if(!n)return null;let C=s;void 0===C&&(C="percent"===x.unit?100:1);let M=function(e,t,n){let l=e.defaultColor??n.defaultColor,o=[[0,l]];if(void 0===e.steps)return o;{let o=e.steps.map(n=>"percent"===e.mode?n.value/100:n.value/t);o.push(1);let r=e.steps.map((e,t)=>e.color??n.palette[t]);return r.unshift(l),S()(o,r).map(e=>[e[0]??1,e[1]??l])}}(v,C,g),b=n.width/w.length-20;b<90&&w.length>1&&(b=90);let T=L(b,n.height),O=Math.round(.2*T),z=E(b,n.height),F={show:!0,lineStyle:{width:O,color:M}};if(!w.length){let e=_(null,x,n.width,n.height),t=L(n.width,n.height),l=E(n.width,n.height);return(0,o.jsx)(j,{width:n.width,height:n.height,data:A,format:x,axisLine:F,max:C,valueFontSize:e,progressWidth:t,titleFontSize:l})}let G=w.length>1;return(0,o.jsx)(c.A,{direction:"row",spacing:2*!!G,justifyContent:G?"left":"center",alignItems:"center",sx:{overflowX:w.length>1?"scroll":"auto"},children:w.map((e,t)=>{let l=_(e.value??null,x,b,n.height);return(0,o.jsx)(p.A,{children:(0,o.jsx)(j,{width:b,height:n.height,data:e,format:x,axisLine:F,max:C,valueFontSize:l,progressWidth:T,titleFontSize:z})},`gauge-series-${t}`)})})},LoadingComponent:function(e){let{contentDimensions:t}=e;return t?(0,o.jsx)(g.A,{sx:{margin:"0 auto"},variant:"circular",width:t.width>t.height?t.height:t.width,height:t.height}):null},supportedQueryTypes:["TimeSeriesQuery"],panelOptionsEditorComponents:[{label:"Settings",content:function(e){var t;let{onChange:n,value:u}=e,c=(null==u||null==(t=u.legend)?void 0:t.show)??!0,p=d()({},l,u.format),g="Enter value";return"percent"===p.unit?g="100":"percent-decimal"===p.unit&&(g="1"),(0,o.jsxs)(i.OptionsEditorGrid,{children:[(0,o.jsx)(i.OptionsEditorColumn,{children:(0,o.jsxs)(i.OptionsEditorGroup,{title:"Misc",children:[(0,o.jsx)(i.FormatControls,{value:p,onChange:e=>{n((0,s.produce)(u,t=>{t.format=e}))}}),(0,o.jsx)(h.CalculationSelector,{value:u.calculation,onChange:e=>{n((0,s.produce)(u,t=>{t.calculation=e}))}}),(0,o.jsx)(i.OptionsEditorControl,{label:"Max",control:(0,o.jsx)(r.A,{type:"number",value:u.max??"",onChange:e=>{let t=e.target.value?Number(e.target.value):void 0;n((0,s.produce)(u,e=>{e.max=t}))},placeholder:g})})]})}),(0,o.jsxs)(i.OptionsEditorColumn,{children:[(0,o.jsx)(i.ThresholdsEditor,{thresholds:u.thresholds,onChange:e=>{n((0,s.produce)(u,t=>{t.thresholds=e}))}}),(0,o.jsx)(i.OptionsEditorControl,{label:"Show legend",control:(0,o.jsx)(a.A,{onChange:()=>{n((0,s.produce)(u,e=>{e.legend={...e.legend,show:!c}}))},checked:c})})]})]})}}],createInitialOptions:function(){return{calculation:"last-number",format:l,thresholds:{steps:[{value:.8},{value:.9}]}}}}}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/__mf/js/async/{lib-router.005da842.js.LICENSE.txt → lib-router.70e6341d.js.LICENSE.txt}
RENAMED
|
File without changes
|