@perses-dev/scatter-chart-plugin 0.11.0-beta.0 → 0.11.0-beta.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.
Files changed (38) hide show
  1. package/__mf/js/{ScatterChart.7ec4d004.js → ScatterChart.fe45b695.js} +2 -2
  2. package/__mf/js/async/181.c7d3eed2.js +2 -0
  3. package/__mf/js/async/181.c7d3eed2.js.LICENSE.txt +9 -0
  4. package/__mf/js/async/236.56a42fac.js +7 -0
  5. package/__mf/js/async/357.9293af22.js +147 -0
  6. package/__mf/js/async/{301.643f002b.js.LICENSE.txt → 357.9293af22.js.LICENSE.txt} +26 -2
  7. package/__mf/js/async/386.c425d184.js +2 -0
  8. package/__mf/js/async/386.c425d184.js.LICENSE.txt +9 -0
  9. package/__mf/js/async/568.3fc50d63.js +24 -0
  10. package/__mf/js/async/{986.287d4ccd.js.LICENSE.txt → 568.3fc50d63.js.LICENSE.txt} +5 -3
  11. package/__mf/js/async/__federation_expose_ScatterChart.0112e08c.js +2 -0
  12. package/__mf/js/async/__federation_expose_ScatterChart.0112e08c.js.LICENSE.txt +9 -0
  13. package/__mf/js/{main.9cf99f7c.js → main.97fd01ad.js} +2 -2
  14. package/lib/ScatterChartPanel.d.ts +1 -1
  15. package/lib/ScatterChartPanel.d.ts.map +1 -1
  16. package/lib/ScatterChartPanel.js.map +1 -1
  17. package/lib/Scatterplot.d.ts.map +1 -1
  18. package/lib/Scatterplot.js +1 -2
  19. package/lib/Scatterplot.js.map +1 -1
  20. package/lib/cjs/Scatterplot.js +2 -3
  21. package/lib/mock-trace-data.d.ts +1 -1
  22. package/lib/mock-trace-data.js.map +1 -1
  23. package/lib/scatter-chart-model.d.ts +1 -1
  24. package/lib/scatter-chart-model.d.ts.map +1 -1
  25. package/lib/scatter-chart-model.js.map +1 -1
  26. package/mf-manifest.json +12 -14
  27. package/mf-stats.json +12 -14
  28. package/package.json +4 -4
  29. package/__mf/js/async/282.ec0a0600.js +0 -1
  30. package/__mf/js/async/301.643f002b.js +0 -2
  31. package/__mf/js/async/366.421872cb.js +0 -24
  32. package/__mf/js/async/366.421872cb.js.LICENSE.txt +0 -35
  33. package/__mf/js/async/558.54cf316c.js +0 -1
  34. package/__mf/js/async/755.e44e74f9.js +0 -7
  35. package/__mf/js/async/986.287d4ccd.js +0 -147
  36. package/__mf/js/async/__federation_expose_ScatterChart.e6e00868.js +0 -1
  37. /package/__mf/css/async/{755.85c2cbf6.css → 236.85c2cbf6.css} +0 -0
  38. /package/__mf/js/async/{755.e44e74f9.js.LICENSE.txt → 236.56a42fac.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self["chunk_ScatterChart "]=self["chunk_ScatterChart "]||[]).push([["211"],{62547(e,t,r){r.r(t),r.d(t,{ScatterChart:()=>y});var a=r(62540),n=r(70451),o=r(87836),i=r(74653),s=r(32741),l=r(90652),u=r(61305),c=r(50944),d=r(59738),m=r(72106),h=r(55875),p=r(37573),b=r(47465),f=r(47414);(0,i.Y)([l.a,u.a,c.a,s.a,d.a,m.a,h.a,p.a]);let v=new Intl.DateTimeFormat(void 0,{dateStyle:"long",timeStyle:"medium"}).format;function C(e){let{width:t,height:r,options:i,link:s}=e,l=(0,o.useChartsTheme)(),{absoluteTimeRange:u}=(0,f.useTimeRange)(),c=(0,f.useAllVariableValues)(),{navigate:d}=(0,f.useRouterContext)(),m={dataset:i.dataset,series:i.series,dataZoom:i.dataZoom,grid:{top:45,bottom:20,left:30,right:20},xAxis:{type:"time",min:u.start,max:u.end},yAxis:{scale:!0,type:"value",name:"Duration",splitNumber:4,axisLabel:{formatter:e=>(0,b.Fl)(e,{unit:"milliseconds"})}},animation:!1,tooltip:{padding:5,borderWidth:1,trigger:"axis",axisPointer:{type:"cross"},formatter:function(e){let t=e[0].data;return`<b>Service name</b>: ${t.rootServiceName}<br/><b>Span name</b>: ${t.rootTraceName}<br/><b>Time</b>: ${v(t.startTime)}<br/><b>Duration</b>: ${(0,b.Fl)(t.durationMs,{unit:"milliseconds"})}<br/><b>Span count</b>: ${t.spanCount} (${t.errorCount} errors)<br/>`}},legend:{show:!0,type:"scroll",orient:"horizontal",bottom:0}},h=(0,n.useMemo)(()=>{let e={};return d&&s&&(e.click=e=>{let t=e.data.linkVariables;d((0,f.replaceVariablesInString)(s,c,t))}),e},[s,d,c]);return(0,a.jsx)(o.EChart,{style:{width:t,height:r},option:m,theme:l.echartsTheme,onEvents:h})}let S=[6,20],y={PanelComponent:function(e){let{spec:t,contentDimensions:r,queryResults:i}=e,s=(0,o.useChartsTheme)().thresholds.defaultColor||"blue",l=t.sizeRange||S,{dataset:u,minSpanCount:c,maxSpanCount:d}=(0,n.useMemo)(()=>{let e,t,r=[];for(let a of i){if(void 0===a.data.searchResult)continue;let n=a.data.searchResult.map(r=>{var n;let o=0,i=0;for(let e of Object.values(r.serviceStats))o+=e.spanCount,i+=e.errorCount??0;(void 0===e||o<e)&&(e=o),(void 0===t||o>t)&&(t=o);let s=a.definition.spec.plugin.spec;return{...r,linkVariables:{datasourceName:(null==s||null==(n=s.datasource)?void 0:n.name)??"",traceId:r.traceId},name:`${r.rootServiceName}: ${r.rootTraceName}`,startTime:new Date(r.startTimeUnixMs),spanCount:o,errorCount:i}});r.push({source:n})}return{dataset:r,minSpanCount:e??0,maxSpanCount:t??0}},[i]),m=(0,n.useMemo)(()=>{let e={type:"scatter",encode:{x:"startTime",y:"durationMs"},symbolSize:function(e){return function(e,t,r){let[a,n]=r,[o,i]=t;return i-o==0?n:a+(e-o)/(i-o)*(n-a)}(e.spanCount,[c,d],l)},itemStyle:{color:function(e){return e.data.errorCount>0?"red":s}}},t=[];for(let r=0;r<u.length;r++)t.push({...e,datasetIndex:r});return t},[u,s,c,d,l]);return i.some(e=>{var t;return((null==(t=e.data)?void 0:t.searchResult)??[]).length>0})?void 0===r?null:(0,a.jsx)("div",{"data-testid":"ScatterChartPanel_ScatterPlot",children:(0,a.jsx)(C,{width:r.width,height:r.height,options:{dataset:u,series:m},link:t.link})}):(0,a.jsx)(o.NoDataOverlay,{resource:"traces"})},supportedQueryTypes:["TraceQuery"],createInitialOptions:function(){return{}}}}}]);