@perses-dev/status-history-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.
Files changed (53) hide show
  1. package/__mf/js/{StatusHistoryChart.4f9097dc.js → StatusHistoryChart.5461af43.js} +5 -5
  2. package/__mf/js/async/{121.6c0f4ca5.js → 121.ffbfb1b9.js} +2 -2
  3. package/__mf/js/async/{192.219e4140.js → 192.0b99c147.js} +1 -1
  4. package/__mf/js/async/{2.a9155301.js → 2.15669adf.js} +1 -1
  5. package/__mf/js/async/{235.2b0db213.js → 235.ba76e361.js} +1 -1
  6. package/__mf/js/async/257.721e5fa3.js +2 -0
  7. package/__mf/js/async/{274.0d78df54.js → 274.558990fa.js} +2 -2
  8. package/__mf/js/async/356.89dba898.js +1 -0
  9. package/__mf/js/async/{392.83f0e907.js → 392.7fa99f33.js} +2 -2
  10. package/__mf/js/async/{470.36180d38.js → 470.a695a651.js} +2 -2
  11. package/__mf/js/async/{481.8df44a82.js → 481.f31a05b0.js} +2 -2
  12. package/__mf/js/async/496.eda3a3da.js +1 -0
  13. package/__mf/js/async/525.5bfb7a9d.js +2 -0
  14. package/__mf/js/async/587.8a4d0228.js +1 -0
  15. package/__mf/js/async/588.92798a49.js +1 -0
  16. package/__mf/js/async/{616.0a0f8135.js → 616.cde74ba7.js} +1 -1
  17. package/__mf/js/async/623.c268f774.js +1 -0
  18. package/__mf/js/async/{644.13897f49.js → 644.9f2c8735.js} +9 -9
  19. package/__mf/js/async/71.303d6b1e.js +1 -0
  20. package/__mf/js/async/77.258cccd7.js +1 -0
  21. package/__mf/js/async/788.3b4e12c6.js +43 -0
  22. package/__mf/js/async/873.3f276b63.js +1 -0
  23. package/__mf/js/async/{941.907f6483.js → 941.0ae5f9d4.js} +2 -2
  24. package/__mf/js/async/968.32c6ce6a.js +1 -0
  25. package/__mf/js/async/978.8fef0165.js +1 -0
  26. package/__mf/js/async/985.3eee0b3f.js +52 -0
  27. package/__mf/js/async/__federation_expose_StatusHistoryChart.d4da84e1.js +23 -0
  28. package/__mf/js/async/{lib-router.ad51c239.js → lib-router.2a561e00.js} +2 -2
  29. package/__mf/js/{main.bb1958ea.js → main.8efb3262.js} +5 -5
  30. package/lib/utils/get-formatted-axis-label.d.ts.map +1 -1
  31. package/mf-manifest.json +77 -33
  32. package/mf-stats.json +85 -33
  33. package/package.json +5 -5
  34. package/__mf/js/async/325.12bb1d5e.js +0 -3
  35. package/__mf/js/async/356.70136905.js +0 -1
  36. package/__mf/js/async/544.eff4924f.js +0 -2
  37. package/__mf/js/async/587.d314a521.js +0 -1
  38. package/__mf/js/async/621.10af475a.js +0 -43
  39. package/__mf/js/async/663.863cc821.js +0 -1
  40. package/__mf/js/async/947.5abc1294.js +0 -2
  41. package/__mf/js/async/968.9f7937ae.js +0 -1
  42. package/__mf/js/async/__federation_expose_StatusHistoryChart.b49b4112.js +0 -23
  43. /package/__mf/css/async/{621.85c2cbf6.css → 788.85c2cbf6.css} +0 -0
  44. /package/__mf/js/async/{121.6c0f4ca5.js.LICENSE.txt → 121.ffbfb1b9.js.LICENSE.txt} +0 -0
  45. /package/__mf/js/async/{274.0d78df54.js.LICENSE.txt → 274.558990fa.js.LICENSE.txt} +0 -0
  46. /package/__mf/js/async/{392.83f0e907.js.LICENSE.txt → 392.7fa99f33.js.LICENSE.txt} +0 -0
  47. /package/__mf/js/async/{470.36180d38.js.LICENSE.txt → 470.a695a651.js.LICENSE.txt} +0 -0
  48. /package/__mf/js/async/{481.8df44a82.js.LICENSE.txt → 481.f31a05b0.js.LICENSE.txt} +0 -0
  49. /package/__mf/js/async/{544.eff4924f.js.LICENSE.txt → 525.5bfb7a9d.js.LICENSE.txt} +0 -0
  50. /package/__mf/js/async/{644.13897f49.js.LICENSE.txt → 644.9f2c8735.js.LICENSE.txt} +0 -0
  51. /package/__mf/js/async/{621.10af475a.js.LICENSE.txt → 788.3b4e12c6.js.LICENSE.txt} +0 -0
  52. /package/__mf/js/async/{941.907f6483.js.LICENSE.txt → 941.0ae5f9d4.js.LICENSE.txt} +0 -0
  53. /package/__mf/js/async/{lib-router.ad51c239.js.LICENSE.txt → lib-router.2a561e00.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.chunk_StatusHistoryChart_0_14_0_beta_1=self.chunk_StatusHistoryChart_0_14_0_beta_1||[]).push([["968"],{75150(e,t,s){s.r(t),s.d(t,{toNestErrors:()=>l,validateFieldsNatively:()=>a});var r=s(72694);let i=(e,t,s)=>{if(e&&"reportValidity"in e){let i=(0,r.get)(s,t);e.setCustomValidity(i&&i.message||""),e.reportValidity()}},a=(e,t)=>{for(let s in t.fields){let r=t.fields[s];r&&r.ref&&"reportValidity"in r.ref?i(r.ref,s,e):r.refs&&r.refs.forEach(t=>i(t,s,e))}},l=(e,t)=>{t.shouldUseNativeValidation&&a(e,t);let s={};for(let i in e){let a=(0,r.get)(t.fields,i),l=Object.assign(e[i]||{},{ref:a&&a.ref});if(f(t.names||Object.keys(e),i)){let e=Object.assign({},(0,r.get)(s,i));(0,r.set)(e,"root",l),(0,r.set)(s,i,e)}else(0,r.set)(s,i,l)}return s},f=(e,t)=>e.some(e=>e.startsWith(t+"."))}}]);
@@ -1,23 +0,0 @@
1
- "use strict";(self.chunk_StatusHistoryChart_0_14_0_beta_1=self.chunk_StatusHistoryChart_0_14_0_beta_1||[]).push([["543"],{68485(e,t,a){a.r(t),a.d(t,{StatusHistoryChart:()=>j});var i=a(62540),n=a(7013),r=a(56875),s=a(9222),l=a(38662),o=a(74628),d=a(40224),h=a(70451),p=a(56599),u=a(88091),m=a(9356),c=a(37333),g=a(59738),f=a(90652),y=a(72106),x=a(55875),v=a(74653),M=a(37573),C=a(69402);(0,v.Y)([m.a,c.a,g.a,f.a,y.a,x.a,M.a]);let S=e=>{var t;let{height:a,data:n,xAxisCategories:s,yAxisCategories:l,timeScale:d,colors:h}=e,{timeZone:m}=(0,r.useTimeZone)(),c=(0,r.useChartsTheme)(),g=(0,p.A)(),f=c.noDataOption.title.textStyle,y={tooltip:{appendToBody:!0,formatter:e=>(function(e){let{data:t,label:a,marker:i,xAxisCategories:n,yAxisCategories:s,theme:l}=e,[o,d]=t,h=n[o],{formattedDate:p,formattedTime:u}=(0,r.getDateAndTime)(h),m=(0,C.css)`
2
- border-bottom: 1px solid ${l.palette.grey[500]};
3
- padding-bottom: 8px;
4
- `,c=(0,C.css)`
5
- display: flex;
6
- justify-content: space-between;
7
- padding-top: 8px;
8
- `,g=(0,C.css)`
9
- margin-right: 16px;
10
- `;return`
11
- <div>
12
- <div style="${m.styles}">${p} - ${u}</div>
13
- <div style="${c.styles}">
14
- <div style="${g.styles}">
15
- ${i}
16
- <strong>${s[d]}</strong>
17
- </div>
18
- <div>
19
- ${a}
20
- </div>
21
- </div>
22
- </div>
23
- `})({data:e.data.value,label:e.data.label,marker:e.marker,xAxisCategories:s,yAxisCategories:l,theme:g})},grid:{top:"5%",bottom:"5%"},xAxis:{type:"category",data:s,axisLine:{show:!1},splitArea:{show:!1},axisLabel:{hideOverlap:!0,formatter:(t=(null==d?void 0:d.rangeMs)??0,function(e){let a=new Date(Number(e));return t>15768e7?(0,r.formatWithTimeZone)(a,"yyy",m):t>63072e6?(0,r.formatWithTimeZone)(a,"MMM yyy",m):t>864e6&&t<1577664e4?(0,r.formatWithTimeZone)(a,"dd.MM",m):t>1728e5&&t<=864e6?(0,r.formatWithTimeZone)(a,"dd.MM HH:mm",m):(0,r.formatWithTimeZone)(a,"HH:mm",m)})}},yAxis:{type:"category",data:l,axisLine:{show:!1},splitArea:{show:!1,interval:0},splitLine:{show:!1},axisLabel:{interval:0}},visualMap:{show:!1,type:"piecewise",pieces:h},series:[{name:"Status history",type:"heatmap",coordinateSystem:"cartesian2d",data:n,label:{show:!1},itemStyle:{borderWidth:1,borderType:"solid",borderColor:"#ffffff"},emphasis:{itemStyle:{opacity:.5}}}]};return(0,i.jsx)(o.A,{style:{height:a},sx:{overflow:"auto",display:"flex",justifyContent:"center",alignItems:"center"},children:n.length?(0,i.jsx)(r.EChart,{style:{width:"100%",height:a},option:y,theme:c.echartsTheme}):(0,i.jsx)(u.A,{sx:{...f},children:"No data"})})},b="#1f77b4",j={PanelComponent:function(e){var t;let{spec:a,contentDimensions:n,queryResults:l}=e,p=(0,h.useMemo)(()=>a.legend&&(0,s.validateLegendSpec)(a.legend)?(0,d.merge)({},a.legend):void 0,[a.legend]),u=(0,r.useChartsTheme)(),m=u.container.padding.default,{statusHistoryData:c,yAxisCategories:g,xAxisCategories:f,legendItems:y,timeScale:x,colors:v}=(t=u.echartsTheme.color,(0,h.useMemo)(()=>{var e;let i;if(!l||0===l.length)return{legendItems:[],statusHistoryData:[],xAxisCategories:[],yAxisCategories:[],colors:[]};let n=l.reduce((e,t)=>{let{data:a}=t;return a&&a.series&&e.push(...a.series),e},[]);a.sorting&&n.sort((e,t)=>{let i=e.formattedName||"",n=t.formattedName||"";return"asc"===a.sorting?i.localeCompare(i):n.localeCompare(n)});let s=(i=l.map(e=>e.data),(0,r.getCommonTimeScale)(i)),o=[],d=[],h=new Set,p=null==(e=a.mappings)?void 0:e.length,u=function(e){if(!e)return[];let{startMs:t,endMs:a,stepMs:i}=e,n=[];for(let e=t;e<=a;e+=i)n.push(e);return n}(s);n.forEach(e=>{let t=e.formattedName||"";d.push(t);let i=d.length-1;e.values.forEach(e=>{let[t,n]=e,s=u.findIndex(e=>e===t);if(null!==n&&-1!==s){let e=n;p&&(e=(0,r.applyValueMapping)(n,a.mappings).value),h.add(n),o.push({value:[s,i,n],label:String(e)})}})});let m=Array.from(h),c=t.length>=m.length?t.slice(0,m.length):m.map((e,a)=>a<t.length?t[a]||b:function(e,t){t.match(/^#[0-9A-Fa-f]{6}$/)||(t=b);try{var a,i,n;let r,s,[l,o,d]=function(e){let t=parseInt(e.slice(1,3),16)/255,a=parseInt(e.slice(3,5),16)/255,i=parseInt(e.slice(5,7),16)/255,n=Math.max(t,a,i),r=Math.min(t,a,i),s=0,l=0,o=(n+r)/2;if(n!==r){let e=n-r;switch(l=o>.5?e/(2-n-r):e/(n+r),n){case t:s=(a-i)/e+6*(a<i);break;case a:s=(i-t)/e+2;break;case i:s=(t-a)/e+4}s/=6}return[360*s,100*l,100*o]}(t);if(isNaN(l)||isNaN(o)||isNaN(d))throw Error("Invalid HSL values");let h=String(e).split("").reduce((e,t)=>e+t.charCodeAt(0),0),p=Math.min(o+10,90),u=(a=Math.abs((l+h%6*60)%360),i=Math.min(Math.max(p,50),90),n=Math.min(Math.max(d+(h%2?15:-15),30),70),r=i*Math.min(n/=100,1-n)/100,s=e=>{let t=(e+a/30)%12;return Math.round(255*(n-r*Math.max(Math.min(t-3,9-t,1),-1))).toString(16).padStart(2,"0")},`#${s(0)}${s(8)}${s(4)}`);if(!u.match(/^#[0-9A-Fa-f]{6}$/))throw Error("Invalid generated color");return u}catch{return b}}(e,t[0]||b)),g=m.map((e,t)=>{let i=c[t]??b;return p&&(i=(0,r.applyValueMapping)(e,a.mappings).color??i),{value:e,color:i}});return{xAxisCategories:u,yAxisCategories:d,legendItems:m.map((e,t)=>{var i;let n=String(e);p&&(n=String((0,r.applyValueMapping)(e,a.mappings).value));let s=(null==(i=g.find(t=>t.value===e))?void 0:i.color)||b;return{id:`${t}-${e}`,label:n,color:s}}),statusHistoryData:o,timeScale:s,colors:g}},[l,t,a])),M=n?{width:n.width-2*m,height:n.height-2*m}:void 0;return(0,i.jsx)(o.A,{sx:{padding:`${m}px`},children:(0,i.jsx)(r.ContentWithLegend,{width:(null==M?void 0:M.width)??400,height:(null==M?void 0:M.height)??1e3,legendSize:null==p?void 0:p.size,legendProps:p&&{options:p,data:y||[],selectedItems:"ALL",onSelectedItemsChange:()=>null},children:e=>{let{height:t,width:a}=e;return(0,i.jsx)(o.A,{sx:{height:t,width:a},children:(0,i.jsx)(S,{xAxisCategories:f,yAxisCategories:g,data:c??[],timeScale:x,height:t,colors:v})})}})})},supportedQueryTypes:["TimeSeriesQuery"],panelOptionsEditorComponents:[{label:"Settings",content:function(e){let{onChange:t,value:a}=e;return(0,i.jsxs)(r.OptionsEditorGrid,{children:[(0,i.jsxs)(r.OptionsEditorColumn,{children:[(0,i.jsx)(s.LegendOptionsEditor,{calculation:"aggregation",showValuesEditor:!1,value:a.legend,onChange:e=>{t((0,l.jM)(a,t=>{t.legend=e}))}}),(0,i.jsx)(r.OptionsEditorGroup,{title:"Visual",children:(0,i.jsx)(r.SortSelector,{value:a.sorting,onChange:e=>{t((0,l.jM)(a,t=>{t.sorting=e}))}})})]}),(0,i.jsx)(r.OptionsEditorColumn,{children:(0,i.jsx)(r.OptionsEditorGroup,{title:"Reset Settings",children:(0,i.jsx)(n.A,{variant:"outlined",color:"secondary",onClick:()=>{t((0,l.jM)(a,e=>{e.legend=void 0}))},children:"Reset To Defaults"})})})]})}},{label:"Value mapping",content:e=>{let{onChange:t,value:a}=e;return(0,i.jsx)(r.ValueMappingsEditor,{mappings:a.mappings??[],onChange:function(e){t({...a,mappings:e})}})}}],createInitialOptions:function(){return{}}}}}]);