@perses-dev/bar-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/BarChart.052f6588.js +7 -0
- package/__mf/js/async/{121.4accbf8e.js → 121.ab7c6638.js} +2 -2
- package/__mf/js/async/{192.a124e348.js → 192.8ba66127.js} +1 -1
- package/__mf/js/async/{235.838c8cc3.js → 235.b55eab67.js} +1 -1
- package/__mf/js/async/{274.99be7531.js → 274.5b592ca2.js} +2 -2
- package/__mf/js/async/319.8a718ba8.js +1 -0
- package/__mf/js/async/356.b5437eb0.js +1 -0
- package/__mf/js/async/377.38c6d5bc.js +1 -0
- package/__mf/js/async/{392.8ca69bee.js → 392.672b1b20.js} +2 -2
- package/__mf/js/async/435.9104b8a3.js +1 -0
- package/__mf/js/async/{458.f3986424.js → 458.0f0e8a32.js} +1 -1
- package/__mf/js/async/{470.37aae926.js → 470.b8b32a33.js} +2 -2
- package/__mf/js/async/496.b303e7c9.js +1 -0
- package/__mf/js/async/587.3fddd16d.js +1 -0
- package/__mf/js/async/588.ad26ffa0.js +1 -0
- package/__mf/js/async/603.7772ea79.js +1 -0
- package/__mf/js/async/{616.335036c9.js → 616.46e07ac4.js} +1 -1
- package/__mf/js/async/71.bddc97bc.js +1 -0
- package/__mf/js/async/720.9ecaaa1c.js +101 -0
- package/__mf/js/async/762.f53b2eee.js +2 -0
- package/__mf/js/async/{77.6c4e4558.js → 77.4b55e59f.js} +1 -1
- package/__mf/js/async/788.20405fa9.js +43 -0
- package/__mf/js/async/823.a5ccc58d.js +10 -0
- package/__mf/js/async/854.774c5785.js +1 -0
- package/__mf/js/async/868.173791c1.js +53 -0
- package/__mf/js/async/873.b9af8d36.js +1 -0
- package/__mf/js/async/934.cf6cfa27.js +2 -0
- package/__mf/js/async/{941.96221a4f.js → 941.7b25b350.js} +2 -2
- package/__mf/js/async/{963.55379fe9.js → 963.b8fb1046.js} +1 -1
- package/__mf/js/async/968.0ced5f12.js +1 -0
- package/__mf/js/async/{977.52b40a67.js → 977.96b38df7.js} +1 -1
- package/__mf/js/async/978.4d2f78db.js +1 -0
- package/__mf/js/async/__federation_expose_BarChart.4797ed64.js +1 -0
- package/__mf/js/async/{lib-router.5ddcb9bb.js → lib-router.da9154c6.js} +2 -2
- package/__mf/js/{main.6614b956.js → main.b7cff6e5.js} +5 -5
- package/mf-manifest.json +99 -34
- package/mf-stats.json +111 -34
- package/package.json +5 -5
- package/__mf/js/BarChart.96061263.js +0 -7
- package/__mf/js/async/138.127b391c.js +0 -2
- package/__mf/js/async/2.f2334c05.js +0 -1
- package/__mf/js/async/240.dc4df0d9.js +0 -2
- package/__mf/js/async/319.7658b3d9.js +0 -1
- package/__mf/js/async/354.05669930.js +0 -4
- package/__mf/js/async/356.78964032.js +0 -1
- package/__mf/js/async/587.7c99f561.js +0 -1
- package/__mf/js/async/663.d87cae88.js +0 -1
- package/__mf/js/async/720.e55c1cd1.js +0 -110
- package/__mf/js/async/826.6a3f7587.js +0 -43
- package/__mf/js/async/968.28847a9e.js +0 -1
- package/__mf/js/async/__federation_expose_BarChart.0ccf4bdc.js +0 -1
- /package/__mf/css/async/{826.85c2cbf6.css → 788.85c2cbf6.css} +0 -0
- /package/__mf/js/async/{121.4accbf8e.js.LICENSE.txt → 121.ab7c6638.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{274.99be7531.js.LICENSE.txt → 274.5b592ca2.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.8ca69bee.js.LICENSE.txt → 392.672b1b20.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.37aae926.js.LICENSE.txt → 470.b8b32a33.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{826.6a3f7587.js.LICENSE.txt → 788.20405fa9.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{720.e55c1cd1.js.LICENSE.txt → 823.a5ccc58d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{354.05669930.js.LICENSE.txt → 868.173791c1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{240.dc4df0d9.js.LICENSE.txt → 934.cf6cfa27.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.96221a4f.js.LICENSE.txt → 941.7b25b350.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{lib-router.5ddcb9bb.js.LICENSE.txt → lib-router.da9154c6.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.chunk_BarChart_0_14_0_beta_1=self.chunk_BarChart_0_14_0_beta_1||[]).push([["968"],{75150(e,t,s){s.r(t),s.d(t,{toNestErrors:()=>l,validateFieldsNatively:()=>a});var r=s(79215);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 +0,0 @@
|
|
|
1
|
-
"use strict";(self.chunk_BarChart_0_14_0_beta_1=self.chunk_BarChart_0_14_0_beta_1||[]).push([["746"],{63852(e,t,r){r.r(t),r.d(t,{BarChart:()=>I});var l=r(9222);let a={unit:"decimal",shortValues:!0},o="desc",i="value",n="horizontal",s=[],u={};var d=r(62540),c=r(47095),p=r(56875),h=r(54042),m=r(85967),v=r(61375),g=r(31729),f=r(31271),x=r(47601),b=r(93648),C=r(10740),y=r(68003),j=r(315),A=r(7013),w=r(43945),S=r(25632),O=r.n(S),k=r(24319),E=r.n(k),L=r(86067),T=r(86742);let z="#555";var _=r(74628),M=r(33966),$=r(59738),V=r(90652),B=r(72106),D=r(55875),R=r(50944),U=r(74653),P=r(37573);function F(e,t){if(t){for(let r of t)if(""!==r.regex)try{if(new RegExp(r.regex).test(e))return r.color}catch{}}}function G(e){let{width:t,height:r,data:l,format:a={unit:"decimal"},mode:o="value",groupedData:i,isStacked:n=!1,orientation:s="horizontal",colorOverrides:u}=e,c=(0,p.useChartsTheme)(),h="horizontal"===s,v=(0,m.useMemo)(()=>{if(i){if(!i.series.length||!i.categories.length)return c.noDataOption;let{categories:e,series:r}=i;return{title:{show:!1},legend:{type:"scroll",show:!0,bottom:0},xAxis:h?(0,p.getFormattedAxis)({},a):{type:"category",data:e,splitLine:{show:!1},axisLabel:{overflow:"truncate",width:t/3}},yAxis:h?{type:"category",data:e,splitLine:{show:!1},axisLabel:{overflow:"truncate",width:t/3}}:(0,p.getFormattedAxis)({},a),series:r.map(e=>{let t=F(e.name,u);return{name:e.name,type:"bar",stack:n?"total":void 0,data:e.values,label:{show:!1},itemStyle:{borderRadius:4*!n,...t?{color:t}:{}}}}),tooltip:{trigger:"axis",axisPointer:{type:"shadow"},appendToBody:!0,confine:!0,formatter:e=>{var t;return e.length?`<b>${null==(t=e[0])?void 0:t.name}</b><br/>`+e.filter(e=>null!==e.data).map(e=>`<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:${e.color}"></span>${e.seriesName}: <b>${(0,p.formatValue)(e.data,a)}</b>`).join("<br/>"):""}},grid:{left:"5%",right:"5%",bottom:40}}}if(!l||!l.length)return c.noDataOption;let e=[];return l.map(t=>{e.push([t.label,t.value])}),{title:{show:!1},dataset:[{dimensions:["label","value"],source:e}],xAxis:h?(0,p.getFormattedAxis)({},a):{type:"category",splitLine:{show:!1},axisLabel:{overflow:"truncate",width:t/3}},yAxis:h?{type:"category",splitLine:{show:!1},axisLabel:{overflow:"truncate",width:t/3}}:(0,p.getFormattedAxis)({},a),series:{type:"bar",barMinWidth:14,barCategoryGap:6,label:{show:!0,position:h?"right":"top",formatter:e=>{if(e.data[1])return"percentage"===o?(0,p.formatValue)(e.data[1],{unit:"percent",decimalPlaces:a.decimalPlaces}):(0,p.formatValue)(e.data[1],a)}},itemStyle:{borderRadius:4,color:e=>{let t=F(e.name,u);if(t)return t;let r=c.echartsTheme.color;return(null==r?void 0:r[0])??""}}},tooltip:{appendToBody:!0,confine:!0,formatter:e=>e.data[1]&&`<b>${e.name}</b>   ${(0,p.formatValue)(e.data[1],a)}`},grid:{left:"5%",right:"5%"}}},[l,i,n,c,t,o,a,h,u]),g=0;return i&&(g=i.categories.length,n||(g*=i.series.length)),(0,d.jsx)(_.A,{style:{width:t,height:r},sx:{overflow:"auto"},children:(0,d.jsx)(p.EChart,{style:{minHeight:r,height:i?h?Math.max(r,20*g+40+20):r:l?20*l.length:"100%"},option:v,theme:c.echartsTheme})})}(0,U.Y)([M.a,$.a,V.a,B.a,D.a,R.a,P.a]);let I={PanelComponent:function(e){let{spec:{calculation:t,format:r,sort:a,mode:i,groupBy:n=[],isStacked:s=!1,orientation:u="horizontal",visual:c},contentDimensions:h,queryResults:v}=e,g=(0,p.useChartsTheme)().container.padding.default,f=(0,m.useMemo)(()=>{let e;if(n.length>0)return[];let r=l.CalculationsMap[t],s=[];for(let e of v)for(let t of e.data.series){let e={value:r(t.values)??null,label:t.formattedName??""};s.push(e)}let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;return"asc"===t?e.toSorted((e,t)=>null===e.value?1:null===t.value?-1:e.value===t.value?0:e.value<t.value?1:-1):e.toSorted((e,t)=>null===e.value?-1:null===t.value?1:e.value===t.value?0:e.value<t.value?-1:1)}(s,a);if("percentage"!==i)return u;return e=u.reduce((e,t)=>{let{value:r}=t;return e+(r??0)},0),u.map(t=>{let r=(t.value??0)/e*100;return{...t,value:r}})},[v,a,i,t,n]),x=(0,m.useMemo)(()=>{if(0===n.length)return null;let e=l.CalculationsMap[t],r=new Map,o=[],s=new Set;for(let t of v)for(let l of t.data.series){let t=l.labels??{},a=n.map(e=>t[e]??"").join(" / "),i=Object.entries(t).filter(e=>{let[t]=e;return!n.includes(t)}),u=i.length>0?"{"+i.map(e=>{let[t,r]=e;return`${t}="${r}"`}).join(", ")+"}":l.formattedName??l.name;r.has(a)||r.set(a,new Map);let d=r.get(a);if(!d)continue;let c=e(l.values)??0;d.set(u,(d.get(u)??0)+c),s.has(u)||(s.add(u),o.push(u))}if(0===r.size)return null;let u=e=>{var t;return Array.from((null==(t=r.get(e))?void 0:t.values())??[]).reduce((e,t)=>e+t,0)},d=Array.from(r.keys());"asc"===a?d=d.toSorted((e,t)=>u(e)-u(t)):"desc"===a&&(d=d.toSorted((e,t)=>u(t)-u(e)));let c=o.map(e=>{let t=d.map(t=>{var l;let a=(null==(l=r.get(t))?void 0:l.get(e))??null;if("percentage"===i&&null!==a){let e=u(t);return e>0?a/e*100:0}return a});return{name:e,values:t}});return{categories:d,series:c}},[v,n,a,i,t]);if(void 0===h)return null;let b="percentage"===i?{unit:"percent",decimalPlaces:null==r?void 0:r.decimalPlaces}:r;return(0,d.jsx)(_.A,{sx:{padding:`${g}px`},children:(0,d.jsx)(G,{width:h.width-2*g,height:h.height-2*g,data:f,format:n.length>0?b:r,mode:i,groupedData:x,isStacked:s,orientation:u,colorOverrides:null==c?void 0:c.colorOverrides})})},panelOptionsEditorComponents:[{label:"Settings",content:function(e){var t;let{onChange:r,value:h}=e,S=O()({},!h.format||(0,p.isUnitWithShortValues)(h.format)?a:E()(a,["shortValues"]),h.format),k=h.groupBy??s,_=h.isStacked??!1,M=(null==(t=h.visual)?void 0:t.colorOverrides)??[];return(0,d.jsxs)(p.OptionsEditorGrid,{children:[(0,d.jsxs)(p.OptionsEditorColumn,{children:[(0,d.jsxs)(p.OptionsEditorGroup,{title:"Misc",children:[(0,d.jsx)(p.FormatControls,{value:S,onChange:e=>{r((0,w.produce)(h,t=>{t.format=e}))},disabled:"percentage"===h.mode}),(0,d.jsx)(l.CalculationSelector,{value:h.calculation,onChange:e=>{r((0,w.produce)(h,t=>{t.calculation=e}))}}),(0,d.jsx)(p.SortSelector,{value:h.sort,onChange:e=>{r((0,w.produce)(h,t=>{t.sort=e}))}}),(0,d.jsx)(p.ModeSelector,{value:h.mode,onChange:e=>{r((0,w.produce)(h,t=>{t.mode=e}))},disablePercentageMode:(0,p.isPercentUnit)(S)}),(0,d.jsxs)(v.A,{exclusive:!0,size:"small",value:h.orientation??"horizontal",onChange:(e,t)=>t&&r((0,w.produce)(h,e=>{e.orientation=t})),children:[(0,d.jsx)(g.A,{value:"horizontal",children:"Horizontal"}),(0,d.jsx)(g.A,{value:"vertical",children:"Vertical"})]})]}),(0,d.jsxs)(p.OptionsEditorGroup,{title:"Stacking",children:[(0,d.jsx)(f.A,{multiple:!0,freeSolo:!0,value:k,onChange:(e,t)=>{let l=t.filter(e=>""!==e.trim());r((0,w.produce)(h,e=>{e.groupBy=l,0===l.length&&(e.isStacked=!1)}))},options:[],renderTags:(e,t)=>e.map((e,r)=>(0,m.createElement)(x.A,{size:"small",variant:"outlined",label:e,...t({index:r}),key:e})),renderInput:e=>(0,d.jsx)(b.A,{...e,size:"small",label:"Group By Labels",placeholder:"Type label name + Enter"})}),(0,d.jsx)(C.A,{control:(0,d.jsx)(y.A,{size:"small",checked:_,disabled:0===k.length,onChange:e=>r((0,w.produce)(h,t=>{t.isStacked=e.target.checked}))}),label:"Stack bars"})]})]}),(0,d.jsxs)(p.OptionsEditorColumn,{children:[(0,d.jsxs)(p.OptionsEditorGroup,{title:"Color Overrides",children:[M.map((e,t)=>(0,d.jsxs)(j.A,{direction:"row",alignItems:"center",spacing:1,children:[(0,d.jsx)(b.A,{size:"small",label:"Regex",value:e.regex,onChange:e=>{var l;return l=e.target.value,void r((0,w.produce)(h,e=>{var r,a;let o=null==(a=e.visual)||null==(r=a.colorOverrides)?void 0:r[t];o&&(o.regex=l)}))},sx:{flexGrow:1}}),(0,d.jsx)(p.OptionsColorPicker,{label:e.regex||`Color override n\xb0${t+1}`,color:e.color||z,onColorChange:e=>{r((0,w.produce)(h,r=>{var l,a;let o=null==(a=r.visual)||null==(l=a.colorOverrides)?void 0:l[t];o&&(o.color=e)}))}}),(0,d.jsx)(c.A,{"aria-label":`delete color override n\xb0${t+1}`,onClick:()=>{r((0,w.produce)(h,e=>{var r,l;null==(l=e.visual)||null==(r=l.colorOverrides)||r.splice(t,1)}))},children:(0,d.jsx)(L.default,{})})]},t)),(0,d.jsx)(A.A,{variant:"outlined",startIcon:(0,d.jsx)(T.default,{}),onClick:()=>{r((0,w.produce)(h,e=>{e.visual||(e.visual={}),e.visual.colorOverrides||(e.visual.colorOverrides=[]),e.visual.colorOverrides.push({regex:"",color:z})}))},children:"Add Color Override"})]}),(0,d.jsx)(p.OptionsEditorGroup,{title:"Reset Settings",children:(0,d.jsx)(A.A,{variant:"outlined",color:"secondary",onClick:()=>{r((0,w.produce)(h,e=>{e.calculation=l.DEFAULT_CALCULATION,e.format=a,e.sort=o,e.mode=i,e.groupBy=s,e.isStacked=!1,e.orientation=n,e.visual=u}))},children:"Reset To Defaults"})})]})]})}}],supportedQueryTypes:["TimeSeriesQuery"],createInitialOptions:function(){return{calculation:l.DEFAULT_CALCULATION,format:a,sort:o,mode:i,orientation:n,groupBy:s,isStacked:!1,visual:u}},actions:[{component:e=>{let{queryResults:t,definition:r}=e,a=(0,m.useMemo)(()=>(0,l.extractExportableData)(t),[t]),o=(0,m.useMemo)(()=>(0,l.isExportableData)(a),[a]),i=(0,m.useCallback)(()=>{if(a&&o)try{var e,t;let o=(null==r||null==(t=r.spec)||null==(e=t.display)?void 0:e.name)||"Time Series Data",i=(0,l.exportDataAsCSV)({data:a}),n=(0,l.sanitizeFilename)(o),s=`${n}_data.csv`,u=document.createElement("a");u.href=URL.createObjectURL(i),u.download=s,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(u.href)}catch(e){console.error("Time series export failed:",e)}},[a,o,r]);return o?(0,d.jsx)(p.InfoTooltip,{description:"Export as CSV",children:(0,d.jsx)(c.A,{size:"small",onClick:i,"aria-label":"Export time series data as CSV",children:(0,d.jsx)(h.default,{fontSize:"inherit"})})}):null},location:"header"}]}}}]);
|
|
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.5ddcb9bb.js.LICENSE.txt → lib-router.da9154c6.js.LICENSE.txt}
RENAMED
|
File without changes
|