@perses-dev/gauge-chart-plugin 0.9.1 → 0.11.0

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.
Files changed (40) hide show
  1. package/__mf/css/async/263.d3010b86.css +1 -0
  2. package/__mf/css/async/341.d3010b86.css +1 -0
  3. package/__mf/css/async/759.d3010b86.css +1 -0
  4. package/__mf/js/{GaugeChart.0b56a463.js → GaugeChart.83b324ad.js} +3 -3
  5. package/__mf/js/async/177.651d64b7.js +111 -0
  6. package/__mf/js/async/{238.16f121d4.js → 238.d2cb634f.js} +1 -1
  7. package/__mf/js/async/{116.577ccfb6.js → 292.0f2f97fb.js} +3 -3
  8. package/__mf/js/async/301.7224e983.js +1 -0
  9. package/__mf/js/async/656.e85be6c5.js +1 -0
  10. package/__mf/js/async/711.9605ad11.js +22 -0
  11. package/__mf/js/async/{308.b768a783.js → 740.8d6cccb6.js} +1 -1
  12. package/__mf/js/async/{75.b72fd8c7.js → 75.9648e446.js} +1 -1
  13. package/__mf/js/async/85.9f00bd55.js +7 -0
  14. package/__mf/js/async/{292.149a1005.js → 999.2b4fe1ef.js} +1 -1
  15. package/__mf/js/async/__federation_expose_GaugeChart.0894679a.js +1 -0
  16. package/__mf/js/{main.6a2260a5.js → main.674f4b65.js} +3 -3
  17. package/lib/GaugeChartBase.d.ts +3 -5
  18. package/lib/GaugeChartBase.d.ts.map +1 -1
  19. package/lib/GaugeChartBase.js +50 -74
  20. package/lib/GaugeChartBase.js.map +1 -1
  21. package/lib/GaugeChartPanel.d.ts.map +1 -1
  22. package/lib/GaugeChartPanel.js +58 -10
  23. package/lib/GaugeChartPanel.js.map +1 -1
  24. package/lib/cjs/GaugeChartBase.js +52 -81
  25. package/lib/cjs/GaugeChartPanel.js +57 -9
  26. package/mf-manifest.json +19 -19
  27. package/mf-stats.json +19 -19
  28. package/package.json +5 -5
  29. package/__mf/css/async/263.683bd428.css +0 -1
  30. package/__mf/css/async/341.683bd428.css +0 -1
  31. package/__mf/css/async/759.683bd428.css +0 -1
  32. package/__mf/js/async/109.38fe9d18.js +0 -73
  33. package/__mf/js/async/119.be08efba.js +0 -111
  34. package/__mf/js/async/288.6d46d8e7.js +0 -7
  35. package/__mf/js/async/298.bad26699.js +0 -1
  36. package/__mf/js/async/740.87850b80.js +0 -1
  37. package/__mf/js/async/__federation_expose_GaugeChart.4c068ee6.js +0 -1
  38. /package/__mf/js/async/{119.be08efba.js.LICENSE.txt → 177.651d64b7.js.LICENSE.txt} +0 -0
  39. /package/__mf/js/async/{109.38fe9d18.js.LICENSE.txt → 711.9605ad11.js.LICENSE.txt} +0 -0
  40. /package/__mf/js/async/{288.6d46d8e7.js.LICENSE.txt → 85.9f00bd55.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- (self.chunk_GaugeChart=self.chunk_GaugeChart||[]).push([["298"],{79349:function(n){n.exports=function(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}},73140:function(n,t,r){var o=r(88799),e=r(85638);n.exports=function(n,t,r){(void 0===r||e(n[t],r))&&(void 0!==r||t in n)||o(n,t,r)}},71928:function(n,t,r){var o=r(88799),e=r(85638),u=Object.prototype.hasOwnProperty;n.exports=function(n,t,r){var c=n[t];u.call(n,t)&&e(c,r)&&(void 0!==r||t in n)||o(n,t,r)}},88799:function(n,t,r){var o=r(42630);n.exports=function(n,t,r){"__proto__"==t&&o?o(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}},80158:function(n,t,r){var o=r(11611),e=Object.create;n.exports=function(){function n(){}return function(t){if(!o(t))return{};if(e)return e(t);n.prototype=t;var r=new n;return n.prototype=void 0,r}}()},49819:function(n,t,r){n.exports=r(18911)()},59464:function(n,t,r){var o=r(11611),e=r(56016),u=r(21586),c=Object.prototype.hasOwnProperty;n.exports=function(n){if(!o(n))return u(n);var t=e(n),r=[];for(var i in n)"constructor"==i&&(t||!c.call(n,i))||r.push(i);return r}},40015:function(n,t,r){var o=r(23694),e=r(73140),u=r(49819),c=r(68867),i=r(11611),f=r(53893),a=r(97494);n.exports=function n(t,r,v,p,s){t!==r&&u(r,function(u,f){if(s||(s=new o),i(u))c(t,r,f,v,n,p,s);else{var l=p?p(a(t,f),u,f+"",t,r,s):void 0;void 0===l&&(l=u),e(t,f,l)}},f)}},68867:function(n,t,r){var o=r(73140),e=r(2734),u=r(63428),c=r(37561),i=r(97635),f=r(2900),a=r(19785),v=r(36468),p=r(43854),s=r(28338),l=r(11611),x=r(40861),y=r(48519),h=r(97494),b=r(89328);n.exports=function(n,t,r,d,g,O,w){var j=h(n,r),_=h(t,r),m=w.get(_);if(m)return void o(n,r,m);var P=O?O(j,_,r+"",n,t,w):void 0,k=void 0===P;if(k){var A=a(_),C=!A&&p(_),G=!A&&!C&&y(_);P=_,A||C||G?a(j)?P=j:v(j)?P=c(j):C?(k=!1,P=e(_,!0)):G?(k=!1,P=u(_,!0)):P=[]:x(_)||f(_)?(P=j,f(j)?P=b(j):(!l(j)||s(j))&&(P=i(_))):k=!1}k&&(w.set(_,P),g(P,_,d,O,w),w.delete(_)),o(n,r,P)}},1197:function(n,t,r){var o=r(31137),e=r(11871),u=r(63132);n.exports=function(n,t){return u(e(n,t,o),n+"")}},54459:function(n,t,r){var o=r(551),e=r(42630),u=r(31137);n.exports=e?function(n,t){return e(n,"toString",{configurable:!0,enumerable:!1,value:o(t),writable:!0})}:u},95825:function(n,t,r){var o=r(59942);n.exports=function(n){var t=new n.constructor(n.byteLength);return new o(t).set(new o(n)),t}},2734:function(n,t,r){n=r.nmd(n);var o=r(77400),e=t&&!t.nodeType&&t,u=e&&n&&!n.nodeType&&n,c=u&&u.exports===e?o.Buffer:void 0,i=c?c.allocUnsafe:void 0;n.exports=function(n,t){if(t)return n.slice();var r=n.length,o=i?i(r):new n.constructor(r);return n.copy(o),o}},63428:function(n,t,r){var o=r(95825);n.exports=function(n,t){var r=t?o(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}},37561:function(n){n.exports=function(n,t){var r=-1,o=n.length;for(t||(t=Array(o));++r<o;)t[r]=n[r];return t}},35159:function(n,t,r){var o=r(71928),e=r(88799);n.exports=function(n,t,r,u){var c=!r;r||(r={});for(var i=-1,f=t.length;++i<f;){var a=t[i],v=u?u(r[a],n[a],a,r,n):void 0;void 0===v&&(v=n[a]),c?e(r,a,v):o(r,a,v)}return r}},7270:function(n,t,r){var o=r(1197),e=r(57535);n.exports=function(n){return o(function(t,r){var o=-1,u=r.length,c=u>1?r[u-1]:void 0,i=u>2?r[2]:void 0;for(c=n.length>3&&"function"==typeof c?(u--,c):void 0,i&&e(r[0],r[1],i)&&(c=u<3?void 0:c,u=1),t=Object(t);++o<u;){var f=r[o];f&&n(t,f,o,c)}return t})}},18911:function(n){n.exports=function(n){return function(t,r,o){for(var e=-1,u=Object(t),c=o(t),i=c.length;i--;){var f=c[n?i:++e];if(!1===r(u[f],f,u))break}return t}}},42630:function(n,t,r){var o=r(81822);n.exports=function(){try{var n=o(Object,"defineProperty");return n({},"",{}),n}catch(n){}}()},2173:function(n,t,r){n.exports=r(58023)(Object.getPrototypeOf,Object)},97635:function(n,t,r){var o=r(80158),e=r(2173),u=r(56016);n.exports=function(n){return"function"!=typeof n.constructor||u(n)?{}:o(e(n))}},57535:function(n,t,r){var o=r(85638),e=r(80068),u=r(42383),c=r(11611);n.exports=function(n,t,r){if(!c(r))return!1;var i=typeof t;return("number"==i?!!(e(r)&&u(t,r.length)):"string"==i&&t in r)&&o(r[t],n)}},21586:function(n){n.exports=function(n){var t=[];if(null!=n)for(var r in Object(n))t.push(r);return t}},11871:function(n,t,r){var o=r(79349),e=Math.max;n.exports=function(n,t,r){return t=e(void 0===t?n.length-1:t,0),function(){for(var u=arguments,c=-1,i=e(u.length-t,0),f=Array(i);++c<i;)f[c]=u[t+c];c=-1;for(var a=Array(t+1);++c<t;)a[c]=u[c];return a[t]=r(f),o(n,this,a)}}},97494:function(n){n.exports=function(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}},63132:function(n,t,r){var o=r(54459);n.exports=r(49591)(o)},49591:function(n){var t=Date.now;n.exports=function(n){var r=0,o=0;return function(){var e=t(),u=16-(e-o);if(o=e,u>0){if(++r>=800)return arguments[0]}else r=0;return n.apply(void 0,arguments)}}},551:function(n){n.exports=function(n){return function(){return n}}},31137:function(n){n.exports=function(n){return n}},36468:function(n,t,r){var o=r(80068),e=r(92360);n.exports=function(n){return e(n)&&o(n)}},40861:function(n,t,r){var o=r(99736),e=r(2173),u=r(92360),c=Object.prototype,i=Function.prototype.toString,f=c.hasOwnProperty,a=i.call(Object);n.exports=function(n){if(!u(n)||"[object Object]"!=o(n))return!1;var t=e(n);if(null===t)return!0;var r=f.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&i.call(r)==a}},53893:function(n,t,r){var o=r(98213),e=r(59464),u=r(80068);n.exports=function(n){return u(n)?o(n,!0):e(n)}},15409:function(n,t,r){var o=r(40015);n.exports=r(7270)(function(n,t,r){o(n,t,r)})},89328:function(n,t,r){var o=r(35159),e=r(53893);n.exports=function(n){return o(n,e(n))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.chunk_GaugeChart=self.chunk_GaugeChart||[]).push([["740"],{14046:function(n,e,t){t.d(e,{Dc:()=>a,FB:()=>s,K2:()=>r,c7:()=>u,gO:()=>i});let r="last",u={first:function(n){return s(n,"first")},last:function(n){return s(n,"last")},"first-number":function(n){return s(n,"first-number")},"last-number":function(n){return s(n,"last-number")},mean:function(n){return s(n,"mean")},sum:function(n){return s(n,"sum")},min:function(n){return s(n,"min")},max:function(n){return s(n,"max")}},i={first:{label:"First",description:"First value"},last:{label:"Last",description:"Last value"},"first-number":{label:"First *",description:"First numeric value"},"last-number":{label:"Last *",description:"Last numeric value"},mean:{label:"Avg",description:"Average value excluding nulls"},sum:{label:"Sum",description:"The sum of all values"},min:{label:"Min",description:"Minimum value"},max:{label:"Max",description:"Maximum value"}};function a(n,e){let t=e.reduce((n,e)=>(n[e]=void 0,n),{}),r=0,u=0;return n.forEach((e,i)=>{let a=e[1];0===i&&"first"in t&&(t.first=a),i===n.length-1&&"last"in t&&(t.last=a),"number"==typeof a&&(r+=1,u+=a,"first-number"in t&&void 0===t["first-number"]&&(t["first-number"]=a),"last-number"in t&&(t["last-number"]=a),"min"in t&&("number"!=typeof t.min?t.min=a:t.min=Math.min(t.min,a)),"max"in t&&("number"!=typeof t.max?t.max=a:t.max=Math.max(t.max,a)))}),r>0&&"sum"in t&&(t.sum=u),r>0&&"mean"in t&&(t.mean=u/r),t}function s(n,e){return a(n,[e])[e]}},28900:function(n,e,t){t.d(e,{t:()=>a,v:()=>s});var r=t(54538),u=t(56141),i=t.n(u);function a(n,e){let t=(0,r.useRef)(),u=!0;for(let n=0;n<e.length;n++)if(t.current?.deps[n]!==e[n]){u=!1;break}return(void 0===t.current||!1===u)&&(t.current={value:n(),deps:e}),t.current.value}function s(n,e){let t=(0,r.useRef)();return(void 0===t.current||!1===i()(e,t.current.deps))&&(t.current={value:n(),deps:e}),t.current.value}},56050:function(){}}]);
@@ -1 +0,0 @@
1
- (self.chunk_GaugeChart=self.chunk_GaugeChart||[]).push([["225"],{14046:function(e,t,n){"use strict";n.d(t,{Dc:()=>o,FB:()=>a,K2:()=>r,c7:()=>i,gO:()=>l});let r="last",i={first:function(e){return a(e,"first")},last:function(e){return a(e,"last")},"first-number":function(e){return a(e,"first-number")},"last-number":function(e){return a(e,"last-number")},mean:function(e){return a(e,"mean")},sum:function(e){return a(e,"sum")},min:function(e){return a(e,"min")},max:function(e){return a(e,"max")}},l={first:{label:"First",description:"First value"},last:{label:"Last",description:"Last value"},"first-number":{label:"First *",description:"First numeric value"},"last-number":{label:"Last *",description:"Last numeric value"},mean:{label:"Avg",description:"Average value excluding nulls"},sum:{label:"Sum",description:"The sum of all values"},min:{label:"Min",description:"Minimum value"},max:{label:"Max",description:"Maximum value"}};function o(e,t){let n=t.reduce((e,t)=>(e[t]=void 0,e),{}),r=0,i=0;return e.forEach((t,l)=>{let o=t[1];0===l&&"first"in n&&(n.first=o),l===e.length-1&&"last"in n&&(n.last=o),"number"==typeof o&&(r+=1,i+=o,"first-number"in n&&void 0===n["first-number"]&&(n["first-number"]=o),"last-number"in n&&(n["last-number"]=o),"min"in n&&("number"!=typeof n.min?n.min=o:n.min=Math.min(n.min,o)),"max"in n&&("number"!=typeof n.max?n.max=o:n.max=Math.max(n.max,o)))}),r>0&&"sum"in n&&(n.sum=i),r>0&&"mean"in n&&(n.mean=i/r),n}function a(e,t){return o(e,[t])[t]}},28900:function(e,t,n){"use strict";n.d(t,{t:()=>o,v:()=>a});var r=n(54538),i=n(56141),l=n.n(i);function o(e,t){let n=(0,r.useRef)(),i=!0;for(let e=0;e<t.length;e++)if(n.current?.deps[e]!==t[e]){i=!1;break}return(void 0===n.current||!1===i)&&(n.current={value:e(),deps:t}),n.current.value}function a(e,t){let n=(0,r.useRef)();return(void 0===n.current||!1===l()(t,n.current.deps))&&(n.current={value:e(),deps:t}),n.current.value}},66070:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},50517:function(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},46560:function(e,t,n){var r=n(10263),i=n(66070),l=n(50517),o=n(24701),a=n(36468),u=Math.max;e.exports=function(e){if(!(e&&e.length))return[];var t=0;return e=r(e,function(e){if(a(e))return t=u(e.length,t),!0}),o(t,function(t){return i(e,l(t))})}},75940:function(e,t,n){e.exports=n(1197)(n(46560))},3766:function(e,t,n){"use strict";n.r(t),n.d(t,{GaugeChart:()=>k});let r={unit:"percent-decimal"};var i=n(24246),l=n(8695),o=n(87895),a=n(64010),u=n(87570),s=n(96494),c=n(15409),h=n.n(c),d=n(25283),m=n(36372),f=n(66224),p=n(14046),v=n(54538),g=n(75940),x=n.n(g);let w={steps:[{value:0}]};var b=n(28900),C=n(1148),j=n(36232),y=n(78846),L=n(65201),S=n(23709),M=n(67745),E=n(50378);function O(e){let{width:t,height:n,data:r,format:l,axisLine:o,max:u}=e,s=(0,a.useChartsTheme)(),c=(0,b.v)(()=>{var e;if(void 0===r.value)return s.noDataOption;let i=function(e,t,n,r){let i=Math.min(n,r)/(("number"==typeof e?(0,C.Bw)(e,t):`${e}`).length??2)*.7;return`clamp(3px, ${i}px, 24px)`}(r.value,l,t,n);return{title:{show:!1},tooltip:{show:!1},series:[{type:"gauge",center:["50%","65%"],radius:"86%",startAngle:200,endAngle:-20,min:0,max:u,silent:!0,progress:{show:!0,width:16,itemStyle:{color:"auto"}},pointer:{show:!1},axisLine:{lineStyle:{color:[[1,"rgba(127,127,127,0.35)"]],width:16}},axisTick:{show:!1,distance:0},splitLine:{show:!1},axisLabel:{show:!1,distance:-18,color:"#999",fontSize:12},anchor:{show:!1},title:{show:!1},detail:{show:!1},data:[{value:r.value}]},{type:"gauge",center:["50%","65%"],radius:"100%",startAngle:200,endAngle:-20,min:0,max:u,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:o,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},detail:{show:!0,width:"60%",borderRadius:8,offsetCenter:[0,"-9%"],color:"inherit",fontSize:i,formatter:null===r.value?()=>"null":e=>(0,C.Bw)(e,l)},data:[{value:r.value,name:r.label,title:{show:!0,color:(null==(e=s.echartsTheme.textStyle)?void 0:e.color)??"inherit",offsetCenter:[0,"55%"],overflow:"truncate",fontSize:12,width:.8*t}}]}]}},[r,t,n,s,l,o,u]);return(0,i.jsx)(a.EChart,{sx:{width:t,height:n,padding:`${s.container.padding.default}px`},option:c,theme:s.echartsTheme})}(0,j.D)([y.N,L.N,S.N,M.N,E.N]);let T={label:"",value:void 0},k={PanelComponent:function(e){let{spec:t,contentDimensions:n,queryResults:l}=e,{calculation:o,max:u,legend:s}=t,{thresholds:c}=(0,a.useChartsTheme)(),f=(null==s?void 0:s.show)??!0,g=h()({},r,t.format),b=t.thresholds??w,C=(0,v.useMemo)(()=>{var e,t,n;let r=[];if(!(null==(n=l[0])||null==(t=n.data)||null==(e=t.series)?void 0:e.length))return r;p.c7[o]||console.warn(`Invalid GaugeChart panel calculation ${o}, fallback to ${p.K2}`);let i=p.c7[o]??p.c7[p.K2];for(let e of l[0].data.series)r.push({value:i(e.values),label:f?e.formattedName??"":""});return r},[l,o,f]);if(!n)return null;let j=u;void 0===j&&(j="percent"===g.unit?100:1);let y={show:!0,lineStyle:{width:5,color:function(e,t,n,r){let i=e.defaultColor??r.defaultColor,l=[[0,i]];if(void 0===e.steps)return l;{let t=e.steps.map(t=>"percent"===e.mode?t.value/100:t.value/n);t.push(1);let l=e.steps.map((e,t)=>e.color??r.palette[t]);return l.unshift(i),x()(t,l).map(e=>[e[0]??1,e[1]??i])}}(b,0,j,c)}};if(!C.length)return(0,i.jsx)(O,{width:n.width,height:n.height,data:T,format:g,axisLine:y,max:j});let L=n.width/C.length-20;L<90&&C.length>1&&(L=90);let S=C.length>1;return(0,i.jsx)(d.Z,{direction:"row",spacing:2*!!S,justifyContent:S?"left":"center",alignItems:"center",sx:{overflowX:C.length>1?"scroll":"auto"},children:C.map((e,t)=>(0,i.jsx)(m.Z,{children:(0,i.jsx)(O,{width:L,height:n.height,data:e,format:g,axisLine:y,max:j})},`gauge-series-${t}`))})},LoadingComponent:function(e){let{contentDimensions:t}=e;return t?(0,i.jsx)(f.Z,{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:c}=e,d=(null==c||null==(t=c.legend)?void 0:t.show)??!0,m=h()({},r,c.format),f="Enter value";return"percent"===m.unit?f="100":"percent-decimal"===m.unit&&(f="1"),(0,i.jsxs)(a.OptionsEditorGrid,{children:[(0,i.jsx)(a.OptionsEditorColumn,{children:(0,i.jsxs)(a.OptionsEditorGroup,{title:"Misc",children:[(0,i.jsx)(a.FormatControls,{value:m,onChange:e=>{n((0,s.produce)(c,t=>{t.format=e}))}}),(0,i.jsx)(u.CalculationSelector,{value:c.calculation,onChange:e=>{n((0,s.produce)(c,t=>{t.calculation=e}))}}),(0,i.jsx)(a.OptionsEditorControl,{label:"Max",control:(0,i.jsx)(l.Z,{type:"number",value:c.max??"",onChange:e=>{let t=e.target.value?Number(e.target.value):void 0;n((0,s.produce)(c,e=>{e.max=t}))},placeholder:f})})]})}),(0,i.jsxs)(a.OptionsEditorColumn,{children:[(0,i.jsx)(a.ThresholdsEditor,{thresholds:c.thresholds,onChange:e=>{n((0,s.produce)(c,t=>{t.thresholds=e}))}}),(0,i.jsx)(a.OptionsEditorControl,{label:"Show legend",control:(0,i.jsx)(o.Z,{onChange:()=>{n((0,s.produce)(c,e=>{e.legend={...e.legend,show:!d}}))},checked:d})})]})]})}}],createInitialOptions:function(){return{calculation:"last-number",format:r,thresholds:{steps:[{value:.8},{value:.9}]}}}}}}]);