@perses-dev/pie-chart-plugin 0.13.0-rc.1 → 0.13.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.
- package/__mf/js/{PieChart.2d322ee8.js → PieChart.1d9ff92c.js} +3 -3
- package/__mf/js/async/253.4239fca0.js +24 -0
- package/__mf/js/async/392.2780a75e.js +2 -0
- package/__mf/js/async/{634.3952d370.js → 634.282182cd.js} +1 -1
- package/__mf/js/async/901.b80f4764.js +7 -0
- package/__mf/js/async/__federation_expose_PieChart.d3aa3268.js +4 -0
- package/__mf/js/{main.fa5b840e.js → main.09fdb510.js} +3 -3
- package/lib/PieChartBase.d.ts +7 -0
- package/lib/PieChartBase.d.ts.map +1 -1
- package/lib/PieChartBase.js +5 -4
- package/lib/PieChartBase.js.map +1 -1
- package/lib/PieChartOptionsEditorSettings.js.map +1 -1
- package/lib/PieChartPanel.d.ts.map +1 -1
- package/lib/PieChartPanel.js +24 -68
- package/lib/PieChartPanel.js.map +1 -1
- package/lib/cjs/PieChartBase.js +4 -3
- package/lib/cjs/PieChartPanel.js +22 -66
- package/lib/cjs/utils.js +123 -12
- package/lib/utils.d.ts +23 -6
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +112 -10
- package/lib/utils.js.map +1 -1
- package/mf-manifest.json +13 -13
- package/mf-stats.json +18 -15
- package/package.json +4 -4
- package/__mf/js/async/390.c46e492c.js +0 -7
- package/__mf/js/async/392.4e64389c.js +0 -2
- package/__mf/js/async/648.c849fcac.js +0 -22
- package/__mf/js/async/__federation_expose_PieChart.febb995f.js +0 -1
- /package/__mf/js/async/{648.c849fcac.js.LICENSE.txt → 253.4239fca0.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.4e64389c.js.LICENSE.txt → 392.2780a75e.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{390.c46e492c.js.LICENSE.txt → 901.b80f4764.js.LICENSE.txt} +0 -0
package/lib/utils.js
CHANGED
|
@@ -10,17 +10,10 @@
|
|
|
10
10
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
|
+
import { formatValue } from '@perses-dev/core';
|
|
14
|
+
import { format } from 'echarts';
|
|
15
|
+
import { comparisonLegends } from '@perses-dev/plugin-system';
|
|
13
16
|
import { DEFAULT_SORT } from './pie-chart-model';
|
|
14
|
-
export function calculatePercentages(data) {
|
|
15
|
-
const sum = data.reduce((accumulator, { value })=>accumulator + (value ?? 0), 0);
|
|
16
|
-
return data.map((seriesData)=>{
|
|
17
|
-
const percentage = (seriesData.value ?? 0) / sum * 100;
|
|
18
|
-
return {
|
|
19
|
-
...seriesData,
|
|
20
|
-
value: Number(percentage.toFixed(2))
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
17
|
export function sortSeriesData(data, sortOrder = DEFAULT_SORT) {
|
|
25
18
|
return data.sort((a, b)=>{
|
|
26
19
|
// Handle null values - push them to the end regardless of sort order
|
|
@@ -32,5 +25,114 @@ export function sortSeriesData(data, sortOrder = DEFAULT_SORT) {
|
|
|
32
25
|
return sortOrder === 'asc' ? diff : -diff;
|
|
33
26
|
});
|
|
34
27
|
}
|
|
28
|
+
export const getTooltipFormatter = (formatOptions)=>{
|
|
29
|
+
const relativeFormatOptions = {
|
|
30
|
+
unit: 'percent',
|
|
31
|
+
decimalPlaces: formatOptions?.decimalPlaces
|
|
32
|
+
};
|
|
33
|
+
return ({ name, value, percent })=>{
|
|
34
|
+
if (typeof value === 'number') {
|
|
35
|
+
return `${format.encodeHTML(name)}: ${formatValue(value, formatOptions)} (${formatValue(percent, relativeFormatOptions)})`;
|
|
36
|
+
}
|
|
37
|
+
return `${format.encodeHTML(name)}: ${format.encodeHTML(value.toString())}`;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export const getLabelFormatter = (mode, formatOptions)=>{
|
|
41
|
+
if (mode === 'percentage') {
|
|
42
|
+
return percentageLabelFormatter(formatOptions);
|
|
43
|
+
}
|
|
44
|
+
return labelFormatter(formatOptions);
|
|
45
|
+
};
|
|
46
|
+
const labelFormatter = (formatOptions)=>{
|
|
47
|
+
return ({ name, value })=>{
|
|
48
|
+
if (typeof value === 'number') {
|
|
49
|
+
return `${name}:\n${formatValue(value, formatOptions)}`;
|
|
50
|
+
}
|
|
51
|
+
return `${name}:\n${format.encodeHTML(value.toString())}`;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
const percentageLabelFormatter = (formatOptions)=>{
|
|
55
|
+
const relativeFormatOptions = {
|
|
56
|
+
unit: 'percent',
|
|
57
|
+
decimalPlaces: formatOptions?.decimalPlaces
|
|
58
|
+
};
|
|
59
|
+
return ({ name, percent })=>{
|
|
60
|
+
return `${name}:\n${formatValue(percent, relativeFormatOptions)}`;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export class PieChartListLegendMapper {
|
|
64
|
+
mapToLegendItems(pieChartData) {
|
|
65
|
+
return pieChartData.map(({ id, name, itemStyle })=>({
|
|
66
|
+
id: id,
|
|
67
|
+
label: name,
|
|
68
|
+
color: itemStyle.color,
|
|
69
|
+
data: {}
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
mapToLegendColumns() {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export class PieChartTableLegendMapper {
|
|
77
|
+
mapToLegendItems(pieChartData, selectedValues) {
|
|
78
|
+
const relativePieChartData = calculatePercentages(pieChartData);
|
|
79
|
+
const absoluteValueSelected = selectedValues?.includes('abs');
|
|
80
|
+
const relativeValueSelected = selectedValues?.includes('relative');
|
|
81
|
+
return pieChartData.map(({ id, name, itemStyle, value })=>{
|
|
82
|
+
const data = {};
|
|
83
|
+
if (absoluteValueSelected && typeof value === 'number') {
|
|
84
|
+
data['abs'] = value;
|
|
85
|
+
}
|
|
86
|
+
if (relativeValueSelected) {
|
|
87
|
+
const itemPercentageValue = relativePieChartData.find((rpd)=>rpd.id === id)?.value;
|
|
88
|
+
if (typeof itemPercentageValue === 'number') {
|
|
89
|
+
data['relative'] = itemPercentageValue;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
id: id,
|
|
94
|
+
label: name,
|
|
95
|
+
color: itemStyle.color,
|
|
96
|
+
data: data
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
mapToLegendColumns(selectedValues, formatOptions) {
|
|
101
|
+
const relativeFormatOptions = {
|
|
102
|
+
unit: 'percent',
|
|
103
|
+
decimalPlaces: formatOptions?.decimalPlaces
|
|
104
|
+
};
|
|
105
|
+
return selectedValues?.toSorted().map((v)=>{
|
|
106
|
+
const comparisonValue = isComparisonValue(v);
|
|
107
|
+
return {
|
|
108
|
+
accessorKey: `data.${v}`,
|
|
109
|
+
header: comparisonValue ? comparisonLegends[v].label : v,
|
|
110
|
+
headerDescription: comparisonValue ? comparisonLegends[v].description : undefined,
|
|
111
|
+
width: 90,
|
|
112
|
+
align: 'right',
|
|
113
|
+
cellDescription: true,
|
|
114
|
+
enableSorting: true,
|
|
115
|
+
cell: ({ getValue })=>{
|
|
116
|
+
const cellValue = getValue();
|
|
117
|
+
return typeof cellValue === 'number' && formatOptions ? formatValue(cellValue, v === 'relative' ? relativeFormatOptions : formatOptions) : cellValue;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}) ?? [];
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function calculatePercentages(data) {
|
|
124
|
+
const sum = data.reduce((accumulator, { value })=>accumulator + (value ?? 0), 0);
|
|
125
|
+
return data.map((seriesData)=>{
|
|
126
|
+
const percentage = (seriesData.value ?? 0) / sum * 100;
|
|
127
|
+
return {
|
|
128
|
+
...seriesData,
|
|
129
|
+
value: Number(percentage.toFixed(4))
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
const comparisonValuesArray = Object.keys(comparisonLegends);
|
|
134
|
+
function isComparisonValue(value) {
|
|
135
|
+
return typeof value === 'string' && comparisonValuesArray.includes(value);
|
|
136
|
+
}
|
|
35
137
|
|
|
36
138
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { SortOption } from '@perses-dev/components';\nimport { DEFAULT_SORT } from './pie-chart-model';\nimport { PieChartData } from './PieChartBase';\n\nexport function calculatePercentages(data: PieChartData[]): Array<{ id?: string; name: string; value: number }> {\n const sum = data.reduce((accumulator, { value }) => accumulator + (value ?? 0), 0);\n return data.map((seriesData) => {\n const percentage = ((seriesData.value ?? 0) / sum) * 100;\n return {\n ...seriesData,\n value: Number(percentage.toFixed(2)),\n };\n });\n}\n\nexport function sortSeriesData(data: PieChartData[], sortOrder: SortOption = DEFAULT_SORT): PieChartData[] {\n return data.sort((a, b) => {\n // Handle null values - push them to the end regardless of sort order\n if (a.value === null && b.value === null) return 0;\n if (a.value === null) return 1;\n if (b.value === null) return -1;\n\n // Sort by value\n const diff = (a.value ?? 0) - (b.value ?? 0);\n return sortOrder === 'asc' ? diff : -diff;\n });\n}\n"],"names":["DEFAULT_SORT","calculatePercentages","data","sum","reduce","accumulator","value","map","seriesData","percentage","Number","toFixed","sortSeriesData","sortOrder","sort","a","b","diff"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,YAAY,QAAQ,oBAAoB;AAGjD,OAAO,SAASC,qBAAqBC,IAAoB;IACvD,MAAMC,MAAMD,KAAKE,MAAM,CAAC,CAACC,aAAa,EAAEC,KAAK,EAAE,GAAKD,cAAeC,CAAAA,SAAS,CAAA,GAAI;IAChF,OAAOJ,KAAKK,GAAG,CAAC,CAACC;QACf,MAAMC,aAAa,AAAED,CAAAA,WAAWF,KAAK,IAAI,CAAA,IAAKH,MAAO;QACrD,OAAO;YACL,GAAGK,UAAU;YACbF,OAAOI,OAAOD,WAAWE,OAAO,CAAC;QACnC;IACF;AACF;AAEA,OAAO,SAASC,eAAeV,IAAoB,EAAEW,YAAwBb,YAAY;IACvF,OAAOE,KAAKY,IAAI,CAAC,CAACC,GAAGC;QACnB,qEAAqE;QACrE,IAAID,EAAET,KAAK,KAAK,QAAQU,EAAEV,KAAK,KAAK,MAAM,OAAO;QACjD,IAAIS,EAAET,KAAK,KAAK,MAAM,OAAO;QAC7B,IAAIU,EAAEV,KAAK,KAAK,MAAM,OAAO,CAAC;QAE9B,gBAAgB;QAChB,MAAMW,OAAO,AAACF,CAAAA,EAAET,KAAK,IAAI,CAAA,IAAMU,CAAAA,EAAEV,KAAK,IAAI,CAAA;QAC1C,OAAOO,cAAc,QAAQI,OAAO,CAACA;IACvC;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { LegendItem, ModeOption, SortOption, TableColumnConfig } from '@perses-dev/components';\nimport { FormatOptions, formatValue } from '@perses-dev/core';\nimport { format } from 'echarts';\nimport { comparisonLegends, ComparisonValues, LegendValue } from '@perses-dev/plugin-system';\nimport { PieChartData } from './PieChartBase';\nimport { DEFAULT_SORT } from './pie-chart-model';\n\nexport function sortSeriesData<T extends PieChartData>(data: T[], sortOrder: SortOption = DEFAULT_SORT): T[] {\n return data.sort((a, b) => {\n // Handle null values - push them to the end regardless of sort order\n if (a.value === null && b.value === null) return 0;\n if (a.value === null) return 1;\n if (b.value === null) return -1;\n\n // Sort by value\n const diff = (a.value ?? 0) - (b.value ?? 0);\n return sortOrder === 'asc' ? diff : -diff;\n });\n}\n\ntype formatterProps = { name: string; value: number | unknown[] | object; percent: number };\nexport const getTooltipFormatter = (formatOptions?: FormatOptions): ((props: formatterProps) => string) => {\n const relativeFormatOptions = { unit: 'percent', decimalPlaces: formatOptions?.decimalPlaces } as const;\n return ({ name, value, percent }: formatterProps): string => {\n if (typeof value === 'number') {\n return `${format.encodeHTML(name)}: ${formatValue(value, formatOptions)} (${formatValue(percent, relativeFormatOptions)})`;\n }\n return `${format.encodeHTML(name)}: ${format.encodeHTML(value.toString())}`;\n };\n};\nexport const getLabelFormatter = (\n mode?: ModeOption,\n formatOptions?: FormatOptions\n): ((props: formatterProps) => string) => {\n if (mode === 'percentage') {\n return percentageLabelFormatter(formatOptions);\n }\n return labelFormatter(formatOptions);\n};\n\nconst labelFormatter = (formatOptions?: FormatOptions) => {\n return ({ name, value }: formatterProps): string => {\n if (typeof value === 'number') {\n return `${name}:\\n${formatValue(value, formatOptions)}`;\n }\n return `${name}:\\n${format.encodeHTML(value.toString())}`;\n };\n};\n\nconst percentageLabelFormatter = (formatOptions?: FormatOptions) => {\n const relativeFormatOptions = { unit: 'percent', decimalPlaces: formatOptions?.decimalPlaces } as const;\n return ({ name, percent }: formatterProps): string => {\n return `${name}:\\n${formatValue(percent, relativeFormatOptions)}`;\n };\n};\n\nexport interface PieChartLegendMapper {\n mapToLegendItems: (\n pieChartData: Array<Required<PieChartData>>,\n selectedValues?: Array<LegendValue | ComparisonValues>\n ) => LegendItem[];\n mapToLegendColumns: (\n selectedValues?: Array<LegendValue | ComparisonValues>,\n formatOptions?: FormatOptions\n ) => Array<TableColumnConfig<LegendItem>>;\n}\n\nexport class PieChartListLegendMapper implements PieChartLegendMapper {\n mapToLegendItems(pieChartData: Array<Required<PieChartData>>): LegendItem[] {\n return pieChartData.map(({ id, name, itemStyle }) => ({ id: id, label: name, color: itemStyle.color, data: {} }));\n }\n mapToLegendColumns(): Array<TableColumnConfig<LegendItem>> {\n return [];\n }\n}\n\nexport class PieChartTableLegendMapper implements PieChartLegendMapper {\n mapToLegendItems(\n pieChartData: Array<Required<PieChartData>>,\n selectedValues?: Array<LegendValue | ComparisonValues>\n ): LegendItem[] {\n const relativePieChartData = calculatePercentages(pieChartData);\n const absoluteValueSelected = selectedValues?.includes('abs');\n const relativeValueSelected = selectedValues?.includes('relative');\n return pieChartData.map(({ id, name, itemStyle, value }) => {\n const data: { [k in ComparisonValues]?: number } = {};\n if (absoluteValueSelected && typeof value === 'number') {\n data['abs'] = value;\n }\n if (relativeValueSelected) {\n const itemPercentageValue = relativePieChartData.find((rpd) => rpd.id === id)?.value;\n if (typeof itemPercentageValue === 'number') {\n data['relative'] = itemPercentageValue;\n }\n }\n return {\n id: id,\n label: name,\n color: itemStyle.color,\n data: data,\n };\n });\n }\n\n mapToLegendColumns(\n selectedValues?: Array<LegendValue | ComparisonValues>,\n formatOptions?: FormatOptions\n ): Array<TableColumnConfig<LegendItem>> {\n const relativeFormatOptions = { unit: 'percent', decimalPlaces: formatOptions?.decimalPlaces } as const;\n return (\n selectedValues?.toSorted().map((v) => {\n const comparisonValue = isComparisonValue(v);\n return {\n accessorKey: `data.${v}`,\n header: comparisonValue ? comparisonLegends[v].label : v,\n headerDescription: comparisonValue ? comparisonLegends[v].description : undefined,\n width: 90,\n align: 'right',\n cellDescription: true,\n enableSorting: true,\n cell: ({ getValue }): string => {\n const cellValue = getValue();\n return typeof cellValue === 'number' && formatOptions\n ? formatValue(cellValue, v === 'relative' ? relativeFormatOptions : formatOptions)\n : cellValue;\n },\n };\n }) ?? []\n );\n }\n}\n\nfunction calculatePercentages<T extends PieChartData>(data: T[]): T[] {\n const sum = data.reduce((accumulator, { value }) => accumulator + (value ?? 0), 0);\n return data.map((seriesData) => {\n const percentage = ((seriesData.value ?? 0) / sum) * 100;\n return {\n ...seriesData,\n value: Number(percentage.toFixed(4)),\n };\n });\n}\n\nconst comparisonValuesArray = Object.keys(comparisonLegends);\nfunction isComparisonValue(value: string | undefined): value is ComparisonValues {\n return typeof value === 'string' && comparisonValuesArray.includes(value);\n}\n"],"names":["formatValue","format","comparisonLegends","DEFAULT_SORT","sortSeriesData","data","sortOrder","sort","a","b","value","diff","getTooltipFormatter","formatOptions","relativeFormatOptions","unit","decimalPlaces","name","percent","encodeHTML","toString","getLabelFormatter","mode","percentageLabelFormatter","labelFormatter","PieChartListLegendMapper","mapToLegendItems","pieChartData","map","id","itemStyle","label","color","mapToLegendColumns","PieChartTableLegendMapper","selectedValues","relativePieChartData","calculatePercentages","absoluteValueSelected","includes","relativeValueSelected","itemPercentageValue","find","rpd","toSorted","v","comparisonValue","isComparisonValue","accessorKey","header","headerDescription","description","undefined","width","align","cellDescription","enableSorting","cell","getValue","cellValue","sum","reduce","accumulator","seriesData","percentage","Number","toFixed","comparisonValuesArray","Object","keys"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAAwBA,WAAW,QAAQ,mBAAmB;AAC9D,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,iBAAiB,QAAuC,4BAA4B;AAE7F,SAASC,Y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|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.13.
|
|
8
|
+
"buildVersion": "0.13.1",
|
|
9
9
|
"buildName": "@perses-dev/pie-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/PieChart.
|
|
12
|
+
"name": "__mf/js/PieChart.1d9ff92c.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
{
|
|
88
88
|
"id": "PieChart:@perses-dev/components",
|
|
89
89
|
"name": "@perses-dev/components",
|
|
90
|
-
"version": "0.53.
|
|
90
|
+
"version": "0.53.1",
|
|
91
91
|
"singleton": true,
|
|
92
|
-
"requiredVersion": "^0.53.
|
|
92
|
+
"requiredVersion": "^0.53.1",
|
|
93
93
|
"assets": {
|
|
94
94
|
"js": {
|
|
95
95
|
"async": [],
|
|
96
96
|
"sync": [
|
|
97
|
-
"__mf/js/async/
|
|
97
|
+
"__mf/js/async/901.b80f4764.js"
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
100
|
"css": {
|
|
@@ -106,14 +106,14 @@
|
|
|
106
106
|
{
|
|
107
107
|
"id": "PieChart:@perses-dev/plugin-system",
|
|
108
108
|
"name": "@perses-dev/plugin-system",
|
|
109
|
-
"version": "0.53.
|
|
109
|
+
"version": "0.53.1",
|
|
110
110
|
"singleton": true,
|
|
111
|
-
"requiredVersion": "^0.53.
|
|
111
|
+
"requiredVersion": "^0.53.1",
|
|
112
112
|
"assets": {
|
|
113
113
|
"js": {
|
|
114
114
|
"async": [],
|
|
115
115
|
"sync": [
|
|
116
|
-
"__mf/js/async/
|
|
116
|
+
"__mf/js/async/253.4239fca0.js"
|
|
117
117
|
]
|
|
118
118
|
},
|
|
119
119
|
"css": {
|
|
@@ -163,14 +163,14 @@
|
|
|
163
163
|
{
|
|
164
164
|
"id": "PieChart:lodash",
|
|
165
165
|
"name": "lodash",
|
|
166
|
-
"version": "4.17.
|
|
166
|
+
"version": "4.17.23",
|
|
167
167
|
"singleton": true,
|
|
168
168
|
"requiredVersion": "^4.17.21",
|
|
169
169
|
"assets": {
|
|
170
170
|
"js": {
|
|
171
171
|
"async": [],
|
|
172
172
|
"sync": [
|
|
173
|
-
"__mf/js/async/392.
|
|
173
|
+
"__mf/js/async/392.2780a75e.js"
|
|
174
174
|
]
|
|
175
175
|
},
|
|
176
176
|
"css": {
|
|
@@ -230,14 +230,14 @@
|
|
|
230
230
|
"__mf/js/async/67.5bf7fff1.js",
|
|
231
231
|
"__mf/js/async/721.8dc45583.js",
|
|
232
232
|
"__mf/js/async/337.13482c5c.js",
|
|
233
|
-
"__mf/js/async/__federation_expose_PieChart.
|
|
233
|
+
"__mf/js/async/__federation_expose_PieChart.d3aa3268.js"
|
|
234
234
|
],
|
|
235
235
|
"async": [
|
|
236
|
+
"__mf/js/async/469.e52e96c4.js",
|
|
236
237
|
"__mf/js/async/lib-router.48213c49.js",
|
|
237
238
|
"__mf/js/async/356.75a8af4c.js",
|
|
238
|
-
"__mf/js/async/634.
|
|
239
|
+
"__mf/js/async/634.282182cd.js",
|
|
239
240
|
"__mf/js/async/177.c83badab.js",
|
|
240
|
-
"__mf/js/async/469.e52e96c4.js",
|
|
241
241
|
"__mf/js/async/663.c0629798.js"
|
|
242
242
|
]
|
|
243
243
|
},
|
package/mf-stats.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "PieChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.13.
|
|
8
|
+
"buildVersion": "0.13.1",
|
|
9
9
|
"buildName": "@perses-dev/pie-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/PieChart.
|
|
12
|
+
"name": "__mf/js/PieChart.1d9ff92c.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
"singleton": true,
|
|
98
|
-
"requiredVersion": "^0.53.
|
|
98
|
+
"requiredVersion": "^0.53.1",
|
|
99
99
|
"shareScope": "default",
|
|
100
100
|
"name": "@perses-dev/components",
|
|
101
|
-
"version": "0.53.
|
|
101
|
+
"version": "0.53.1",
|
|
102
102
|
"eager": false,
|
|
103
103
|
"id": "PieChart:@perses-dev/components",
|
|
104
104
|
"assets": {
|
|
105
105
|
"js": {
|
|
106
106
|
"async": [],
|
|
107
107
|
"sync": [
|
|
108
|
-
"__mf/js/async/
|
|
108
|
+
"__mf/js/async/901.b80f4764.js"
|
|
109
109
|
]
|
|
110
110
|
},
|
|
111
111
|
"css": {
|
|
@@ -119,17 +119,17 @@
|
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"singleton": true,
|
|
122
|
-
"requiredVersion": "^0.53.
|
|
122
|
+
"requiredVersion": "^0.53.1",
|
|
123
123
|
"shareScope": "default",
|
|
124
124
|
"name": "@perses-dev/plugin-system",
|
|
125
|
-
"version": "0.53.
|
|
125
|
+
"version": "0.53.1",
|
|
126
126
|
"eager": false,
|
|
127
127
|
"id": "PieChart:@perses-dev/plugin-system",
|
|
128
128
|
"assets": {
|
|
129
129
|
"js": {
|
|
130
130
|
"async": [],
|
|
131
131
|
"sync": [
|
|
132
|
-
"__mf/js/async/
|
|
132
|
+
"__mf/js/async/253.4239fca0.js"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
135
|
"css": {
|
|
@@ -183,21 +183,23 @@
|
|
|
183
183
|
"sync": []
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
|
-
"usedIn": [
|
|
186
|
+
"usedIn": [
|
|
187
|
+
"./PieChart"
|
|
188
|
+
]
|
|
187
189
|
},
|
|
188
190
|
{
|
|
189
191
|
"singleton": true,
|
|
190
192
|
"requiredVersion": "^4.17.21",
|
|
191
193
|
"shareScope": "default",
|
|
192
194
|
"name": "lodash",
|
|
193
|
-
"version": "4.17.
|
|
195
|
+
"version": "4.17.23",
|
|
194
196
|
"eager": false,
|
|
195
197
|
"id": "PieChart:lodash",
|
|
196
198
|
"assets": {
|
|
197
199
|
"js": {
|
|
198
200
|
"async": [],
|
|
199
201
|
"sync": [
|
|
200
|
-
"__mf/js/async/392.
|
|
202
|
+
"__mf/js/async/392.2780a75e.js"
|
|
201
203
|
]
|
|
202
204
|
},
|
|
203
205
|
"css": {
|
|
@@ -263,7 +265,8 @@
|
|
|
263
265
|
"requires": [
|
|
264
266
|
"react",
|
|
265
267
|
"@perses-dev/plugin-system",
|
|
266
|
-
"@perses-dev/components"
|
|
268
|
+
"@perses-dev/components",
|
|
269
|
+
"echarts"
|
|
267
270
|
],
|
|
268
271
|
"file": "src/PieChart.ts",
|
|
269
272
|
"assets": {
|
|
@@ -273,14 +276,14 @@
|
|
|
273
276
|
"__mf/js/async/67.5bf7fff1.js",
|
|
274
277
|
"__mf/js/async/721.8dc45583.js",
|
|
275
278
|
"__mf/js/async/337.13482c5c.js",
|
|
276
|
-
"__mf/js/async/__federation_expose_PieChart.
|
|
279
|
+
"__mf/js/async/__federation_expose_PieChart.d3aa3268.js"
|
|
277
280
|
],
|
|
278
281
|
"async": [
|
|
282
|
+
"__mf/js/async/469.e52e96c4.js",
|
|
279
283
|
"__mf/js/async/lib-router.48213c49.js",
|
|
280
284
|
"__mf/js/async/356.75a8af4c.js",
|
|
281
|
-
"__mf/js/async/634.
|
|
285
|
+
"__mf/js/async/634.282182cd.js",
|
|
282
286
|
"__mf/js/async/177.c83badab.js",
|
|
283
|
-
"__mf/js/async/469.e52e96c4.js",
|
|
284
287
|
"__mf/js/async/663.c0629798.js"
|
|
285
288
|
]
|
|
286
289
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/pie-chart-plugin",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"homepage": "https://github.com/perses/plugins/blob/main/README.md",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"@emotion/react": "^11.7.1",
|
|
28
28
|
"@emotion/styled": "^11.6.0",
|
|
29
29
|
"@hookform/resolvers": "^3.2.0",
|
|
30
|
-
"@perses-dev/components": "^0.53.
|
|
31
|
-
"@perses-dev/core": "^0.53.0
|
|
32
|
-
"@perses-dev/plugin-system": "^0.53.
|
|
30
|
+
"@perses-dev/components": "^0.53.1",
|
|
31
|
+
"@perses-dev/core": "^0.53.0",
|
|
32
|
+
"@perses-dev/plugin-system": "^0.53.1",
|
|
33
33
|
"date-fns": "^4.1.0",
|
|
34
34
|
"date-fns-tz": "^3.2.0",
|
|
35
35
|
"echarts": "5.5.0",
|