@perses-dev/pie-chart-plugin 0.13.1 → 0.14.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.
- package/__mf/css/async/285.85c2cbf6.css +1 -0
- package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
- package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
- package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
- package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
- package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
- package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
- package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
- package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
- package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
- package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
- package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
- package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
- package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
- package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
- package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
- package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
- package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
- package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
- package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
- package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
- package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
- package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
- package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
- package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
- package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
- package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
- package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
- package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
- package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
- package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
- package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
- package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
- package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
- package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
- package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
- package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
- package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
- package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
- package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
- package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
- package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
- package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
- package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
- package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
- package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
- package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
- package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
- package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
- package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
- package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
- package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
- package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
- package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
- package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
- package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
- package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
- package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
- package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
- package/__mf/js/PieChart.8a08ba39.js +7 -0
- package/__mf/js/async/121.77d8ca8d.js +2 -0
- package/__mf/js/async/177.5b05acb8.js +1 -0
- package/__mf/js/async/192.8567667d.js +1 -0
- package/__mf/js/async/2.1fd70a85.js +1 -0
- package/__mf/js/async/204.0b9b3971.js +1 -0
- package/__mf/js/async/235.47f639e4.js +1 -0
- package/__mf/js/async/274.a688b81f.js +2 -0
- package/__mf/js/async/285.438eecb3.js +7 -0
- package/__mf/js/async/{901.b80f4764.js.LICENSE.txt → 285.438eecb3.js.LICENSE.txt} +19 -1
- package/__mf/js/async/356.f9173bd6.js +1 -0
- package/__mf/js/async/376.9566e7f3.js +110 -0
- package/__mf/js/async/376.9566e7f3.js.LICENSE.txt +27 -0
- package/__mf/js/async/392.fd732e61.js +2 -0
- package/__mf/js/async/469.3c02be86.js +1 -0
- package/__mf/js/async/470.f4861d15.js +2 -0
- package/__mf/js/async/554.97159342.js +2 -0
- package/__mf/js/async/558.38ed78e0.js +1 -0
- package/__mf/js/async/587.cb45262d.js +1 -0
- package/__mf/js/async/616.b87a9b8b.js +1 -0
- package/__mf/js/async/663.69a57e79.js +1 -0
- package/__mf/js/async/721.6e66d127.js +1 -0
- package/__mf/js/async/873.10a8cf00.js +1 -0
- package/__mf/js/async/90.9a81d69e.js +24 -0
- package/__mf/js/async/{253.4239fca0.js.LICENSE.txt → 90.9a81d69e.js.LICENSE.txt} +0 -16
- package/__mf/js/async/941.8d9ea74e.js +2 -0
- package/__mf/js/async/944.cfa573dc.js +39 -0
- package/__mf/js/async/{67.5bf7fff1.js.LICENSE.txt → 944.cfa573dc.js.LICENSE.txt} +11 -23
- package/__mf/js/async/968.1b0e9683.js +1 -0
- package/__mf/js/async/__federation_expose_PieChart.7177fa08.js +4 -0
- package/__mf/js/async/lib-router.9b4805e4.js +2 -0
- package/__mf/js/async/{lib-router.48213c49.js.LICENSE.txt → lib-router.9b4805e4.js.LICENSE.txt} +3 -3
- package/__mf/js/main.c8888e55.js +7 -0
- package/lib/PieChartBase.d.ts +1 -2
- package/lib/PieChartBase.d.ts.map +1 -1
- package/lib/PieChartBase.js.map +1 -1
- package/lib/PieChartOptionsEditorSettings.d.ts.map +1 -1
- package/lib/PieChartOptionsEditorSettings.js +1 -2
- package/lib/PieChartOptionsEditorSettings.js.map +1 -1
- package/lib/PieChartPanel.d.ts +1 -1
- package/lib/PieChartPanel.d.ts.map +1 -1
- package/lib/PieChartPanel.js +2 -3
- package/lib/PieChartPanel.js.map +1 -1
- package/lib/cjs/PieChartOptionsEditorSettings.js +1 -2
- package/lib/cjs/PieChartPanel.js +2 -3
- package/lib/cjs/pie-chart-model.js +2 -2
- package/lib/cjs/utils.js +5 -5
- package/lib/pie-chart-model.d.ts +3 -3
- package/lib/pie-chart-model.d.ts.map +1 -1
- package/lib/pie-chart-model.js +1 -1
- package/lib/pie-chart-model.js.map +1 -1
- package/lib/utils.d.ts +1 -2
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -1
- package/lib/utils.js.map +1 -1
- package/mf-manifest.json +56 -46
- package/mf-stats.json +66 -46
- package/package.json +5 -4
- package/__mf/css/async/442.d3010b86.css +0 -1
- package/__mf/css/async/61.d3010b86.css +0 -1
- package/__mf/css/async/823.d3010b86.css +0 -1
- package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
- package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
- package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
- package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
- package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
- package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
- package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
- package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
- package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
- package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
- package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
- package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
- package/__mf/js/PieChart.1d9ff92c.js +0 -6
- package/__mf/js/async/121.281eb287.js +0 -2
- package/__mf/js/async/177.c83badab.js +0 -1
- package/__mf/js/async/192.b0eb01c2.js +0 -1
- package/__mf/js/async/2.ba8aa6eb.js +0 -1
- package/__mf/js/async/235.88141957.js +0 -1
- package/__mf/js/async/253.4239fca0.js +0 -24
- package/__mf/js/async/274.78035147.js +0 -2
- package/__mf/js/async/337.13482c5c.js +0 -1
- package/__mf/js/async/350.7f227cc5.js +0 -1
- package/__mf/js/async/356.75a8af4c.js +0 -1
- package/__mf/js/async/392.2780a75e.js +0 -2
- package/__mf/js/async/469.e52e96c4.js +0 -1
- package/__mf/js/async/470.844ea64f.js +0 -2
- package/__mf/js/async/554.2692322c.js +0 -2
- package/__mf/js/async/587.6f746ff5.js +0 -1
- package/__mf/js/async/616.b6650249.js +0 -1
- package/__mf/js/async/634.282182cd.js +0 -38
- package/__mf/js/async/663.c0629798.js +0 -1
- package/__mf/js/async/67.5bf7fff1.js +0 -110
- package/__mf/js/async/721.8dc45583.js +0 -1
- package/__mf/js/async/873.8b5831f0.js +0 -1
- package/__mf/js/async/901.b80f4764.js +0 -7
- package/__mf/js/async/941.4ea66ef3.js +0 -2
- package/__mf/js/async/968.a62ee0f7.js +0 -1
- package/__mf/js/async/__federation_expose_PieChart.d3aa3268.js +0 -4
- package/__mf/js/async/lib-router.48213c49.js +0 -2
- package/__mf/js/main.09fdb510.js +0 -6
- /package/__mf/js/async/{121.281eb287.js.LICENSE.txt → 121.77d8ca8d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{274.78035147.js.LICENSE.txt → 274.a688b81f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{392.2780a75e.js.LICENSE.txt → 392.fd732e61.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{470.844ea64f.js.LICENSE.txt → 470.f4861d15.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{554.2692322c.js.LICENSE.txt → 554.97159342.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{941.4ea66ef3.js.LICENSE.txt → 941.8d9ea74e.js.LICENSE.txt} +0 -0
|
@@ -34,7 +34,7 @@ _export(exports, {
|
|
|
34
34
|
return createInitialPieChartOptions;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
const
|
|
37
|
+
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
38
38
|
const DEFAULT_FORMAT = {
|
|
39
39
|
unit: 'decimal',
|
|
40
40
|
shortValues: true
|
|
@@ -43,7 +43,7 @@ const DEFAULT_SORT = 'desc';
|
|
|
43
43
|
const DEFAULT_MODE = 'value';
|
|
44
44
|
function createInitialPieChartOptions() {
|
|
45
45
|
return {
|
|
46
|
-
calculation:
|
|
46
|
+
calculation: _pluginsystem.DEFAULT_CALCULATION,
|
|
47
47
|
format: DEFAULT_FORMAT,
|
|
48
48
|
mode: DEFAULT_MODE,
|
|
49
49
|
radius: 50,
|
package/lib/cjs/utils.js
CHANGED
|
@@ -37,7 +37,7 @@ _export(exports, {
|
|
|
37
37
|
return sortSeriesData;
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const
|
|
40
|
+
const _components = require("@perses-dev/components");
|
|
41
41
|
const _echarts = require("echarts");
|
|
42
42
|
const _pluginsystem = require("@perses-dev/plugin-system");
|
|
43
43
|
const _piechartmodel = require("./pie-chart-model");
|
|
@@ -59,7 +59,7 @@ const getTooltipFormatter = (formatOptions)=>{
|
|
|
59
59
|
};
|
|
60
60
|
return ({ name, value, percent })=>{
|
|
61
61
|
if (typeof value === 'number') {
|
|
62
|
-
return `${_echarts.format.encodeHTML(name)}: ${(0,
|
|
62
|
+
return `${_echarts.format.encodeHTML(name)}: ${(0, _components.formatValue)(value, formatOptions)} (${(0, _components.formatValue)(percent, relativeFormatOptions)})`;
|
|
63
63
|
}
|
|
64
64
|
return `${_echarts.format.encodeHTML(name)}: ${_echarts.format.encodeHTML(value.toString())}`;
|
|
65
65
|
};
|
|
@@ -73,7 +73,7 @@ const getLabelFormatter = (mode, formatOptions)=>{
|
|
|
73
73
|
const labelFormatter = (formatOptions)=>{
|
|
74
74
|
return ({ name, value })=>{
|
|
75
75
|
if (typeof value === 'number') {
|
|
76
|
-
return `${name}:\n${(0,
|
|
76
|
+
return `${name}:\n${(0, _components.formatValue)(value, formatOptions)}`;
|
|
77
77
|
}
|
|
78
78
|
return `${name}:\n${_echarts.format.encodeHTML(value.toString())}`;
|
|
79
79
|
};
|
|
@@ -84,7 +84,7 @@ const percentageLabelFormatter = (formatOptions)=>{
|
|
|
84
84
|
decimalPlaces: formatOptions?.decimalPlaces
|
|
85
85
|
};
|
|
86
86
|
return ({ name, percent })=>{
|
|
87
|
-
return `${name}:\n${(0,
|
|
87
|
+
return `${name}:\n${(0, _components.formatValue)(percent, relativeFormatOptions)}`;
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
class PieChartListLegendMapper {
|
|
@@ -141,7 +141,7 @@ class PieChartTableLegendMapper {
|
|
|
141
141
|
enableSorting: true,
|
|
142
142
|
cell: ({ getValue })=>{
|
|
143
143
|
const cellValue = getValue();
|
|
144
|
-
return typeof cellValue === 'number' && formatOptions ? (0,
|
|
144
|
+
return typeof cellValue === 'number' && formatOptions ? (0, _components.formatValue)(cellValue, v === 'relative' ? relativeFormatOptions : formatOptions) : cellValue;
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
}) ?? [];
|
package/lib/pie-chart-model.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ModeOption, SortOption } from '@perses-dev/components';
|
|
2
|
-
import { CalculationType,
|
|
3
|
-
import {
|
|
1
|
+
import { FormatOptions, ModeOption, SortOption } from '@perses-dev/components';
|
|
2
|
+
import { CalculationType, LegendSpecOptions, OptionsEditorProps } from '@perses-dev/plugin-system';
|
|
3
|
+
import { Definition } from '@perses-dev/spec';
|
|
4
4
|
export declare const DEFAULT_FORMAT: FormatOptions;
|
|
5
5
|
export declare const DEFAULT_SORT: SortOption;
|
|
6
6
|
export declare const DEFAULT_MODE: ModeOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pie-chart-model.d.ts","sourceRoot":"","sources":["../../src/pie-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"pie-chart-model.d.ts","sourceRoot":"","sources":["../../src/pie-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAuB,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,cAAc,EAAE,aAAsD,CAAC;AACpF,eAAO,MAAM,YAAY,EAAE,UAAmB,CAAC;AAC/C,eAAO,MAAM,YAAY,EAAE,UAAoB,CAAC;AAEhD,MAAM,WAAW,kBAAmB,SAAQ,UAAU,CAAC,eAAe,CAAC;IACrE,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;AAE7E,wBAAgB,4BAA4B,IAAI,eAAe,CAS9D"}
|
package/lib/pie-chart-model.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
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 { DEFAULT_CALCULATION } from '@perses-dev/
|
|
13
|
+
import { DEFAULT_CALCULATION } from '@perses-dev/plugin-system';
|
|
14
14
|
export const DEFAULT_FORMAT = {
|
|
15
15
|
unit: 'decimal',
|
|
16
16
|
shortValues: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/pie-chart-model.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 { ModeOption, SortOption } from '@perses-dev/components';\nimport { CalculationType, DEFAULT_CALCULATION,
|
|
1
|
+
{"version":3,"sources":["../../src/pie-chart-model.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 { FormatOptions, ModeOption, SortOption } from '@perses-dev/components';\nimport { CalculationType, DEFAULT_CALCULATION, LegendSpecOptions, OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Definition } from '@perses-dev/spec';\n\nexport const DEFAULT_FORMAT: FormatOptions = { unit: 'decimal', shortValues: true };\nexport const DEFAULT_SORT: SortOption = 'desc';\nexport const DEFAULT_MODE: ModeOption = 'value';\n\nexport interface BarChartDefinition extends Definition<PieChartOptions> {\n kind: 'PieChart';\n}\n\nexport interface PieChartOptions {\n calculation: CalculationType;\n format?: FormatOptions;\n colorPalette?: string[];\n legend?: LegendSpecOptions;\n mode?: ModeOption;\n radius: number;\n showLabels?: boolean;\n sort?: SortOption;\n}\n\nexport type PieChartOptionsEditorProps = OptionsEditorProps<PieChartOptions>;\n\nexport function createInitialPieChartOptions(): PieChartOptions {\n return {\n calculation: DEFAULT_CALCULATION,\n format: DEFAULT_FORMAT,\n mode: DEFAULT_MODE,\n radius: 50,\n showLabels: false,\n sort: DEFAULT_SORT,\n };\n}\n"],"names":["DEFAULT_CALCULATION","DEFAULT_FORMAT","unit","shortValues","DEFAULT_SORT","DEFAULT_MODE","createInitialPieChartOptions","calculation","format","mode","radius","showLabels","sort"],"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,SAA0BA,mBAAmB,QAA+C,4BAA4B;AAGxH,OAAO,MAAMC,iBAAgC;IAAEC,MAAM;IAAWC,aAAa;AAAK,EAAE;AACpF,OAAO,MAAMC,eAA2B,OAAO;AAC/C,OAAO,MAAMC,eAA2B,QAAQ;AAmBhD,OAAO,SAASC;IACd,OAAO;QACLC,aAAaP;QACbQ,QAAQP;QACRQ,MAAMJ;QACNK,QAAQ;QACRC,YAAY;QACZC,MAAMR;IACR;AACF"}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { LegendItem, ModeOption, SortOption, TableColumnConfig } from '@perses-dev/components';
|
|
2
|
-
import { FormatOptions } from '@perses-dev/core';
|
|
1
|
+
import { FormatOptions, LegendItem, ModeOption, SortOption, TableColumnConfig } from '@perses-dev/components';
|
|
3
2
|
import { ComparisonValues, LegendValue } from '@perses-dev/plugin-system';
|
|
4
3
|
import { PieChartData } from './PieChartBase';
|
|
5
4
|
export declare function sortSeriesData<T extends PieChartData>(data: T[], sortOrder?: SortOption): T[];
|
package/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,aAAa,EAEb,UAAU,EACV,UAAU,EACV,UAAU,EACV,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAqB,gBAAgB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,wBAAgB,cAAc,CAAC,CAAC,SAAS,YAAY,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,GAAE,UAAyB,GAAG,CAAC,EAAE,CAW3G;AAED,KAAK,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;IAAC,OAAO,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@ -10,7 +10,7 @@
|
|
|
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/
|
|
13
|
+
import { formatValue } from '@perses-dev/components';
|
|
14
14
|
import { format } from 'echarts';
|
|
15
15
|
import { comparisonLegends } from '@perses-dev/plugin-system';
|
|
16
16
|
import { DEFAULT_SORT } from './pie-chart-model';
|
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 { 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,YAAY,QAAQ,oBAAoB;AAEjD,OAAO,SAASC,eAAuCC,IAAS,EAAEC,YAAwBH,YAAY;IACpG,OAAOE,KAAKE,IAAI,CAAC,CAACC,GAAGC;QACnB,qEAAqE;QACrE,IAAID,EAAEE,KAAK,KAAK,QAAQD,EAAEC,KAAK,KAAK,MAAM,OAAO;QACjD,IAAIF,EAAEE,KAAK,KAAK,MAAM,OAAO;QAC7B,IAAID,EAAEC,KAAK,KAAK,MAAM,OAAO,CAAC;QAE9B,gBAAgB;QAChB,MAAMC,OAAO,AAACH,CAAAA,EAAEE,KAAK,IAAI,CAAA,IAAMD,CAAAA,EAAEC,KAAK,IAAI,CAAA;QAC1C,OAAOJ,cAAc,QAAQK,OAAO,CAACA;IACvC;AACF;AAGA,OAAO,MAAMC,sBAAsB,CAACC;IAClC,MAAMC,wBAAwB;QAAEC,MAAM;QAAWC,eAAeH,eAAeG;IAAc;I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9C,gBACpCb,YAAY2D,WAAWd,MAAM,aAAa/B,wBAAwBD,iBAClE8C;gBACN;YACF;QACF,MAAM,EAAE;IAEZ;AACF;AAEA,SAAStB,qBAA6ChC,IAAS;IAC7D,MAAMuD,MAAMvD,KAAKwD,MAAM,CAAC,CAACC,aAAa,EAAEpD,KAAK,EAAE,GAAKoD,cAAepD,CAAAA,SAAS,CAAA,GAAI;IAChF,OAAOL,KAAKuB,GAAG,CAAC,CAACmC;QACf,MAAMC,aAAa,AAAED,CAAAA,WAAWrD,KAAK,IAAI,CAAA,IAAKkD,MAAO;QACrD,OAAO;YACL,GAAGG,UAAU;YACbrD,OAAOuD,OAAOD,WAAWE,OAAO,CAAC;QACnC;IACF;AACF;AAEA,MAAMC,wBAAwBC,OAAOC,IAAI,CAACnE;AAC1C,SAAS6C,kBAAkBrC,KAAyB;IAClD,OAAO,OAAOA,UAAU,YAAYyD,sBAAsB5B,QAAQ,CAAC7B;AACrE"}
|
|
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 {\n FormatOptions,\n formatValue,\n LegendItem,\n ModeOption,\n SortOption,\n TableColumnConfig,\n} from '@perses-dev/components';\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;AAEjC,SAEEA,WAAW,QAKN,yBAAyB;AAChC,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,iBAAiB,QAAuC,4BAA4B;AAE7F,SAASC,YAAY,QAAQ,oBAAoB;AAEjD,OAAO,SAASC,eAAuCC,IAAS,EAAEC,YAAwBH,YAAY;IACpG,OAAOE,KAAKE,IAAI,CAAC,CAACC,GAAGC;QACnB,qEAAqE;QACrE,IAAID,EAAEE,KAAK,KAAK,QAAQD,EAAEC,KAAK,KAAK,MAAM,OAAO;QACjD,IAAIF,EAAEE,KAAK,KAAK,MAAM,OAAO;QAC7B,IAAID,EAAEC,KAAK,KAAK,MAAM,OAAO,CAAC;QAE9B,gBAAgB;QAChB,MAAM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KAAK,GAAGc;gBACvDK,mBAAmBJ,kBAAkB5C,iBAAiB,CAAC2C,EAAE,CAACM,WAAW,GAAGC;gBACxEC,OAAO;gBACPC,OAAO;gBACPC,iBAAiB;gBACjBC,eAAe;gBACfC,MAAM,CAAC,EAAEC,QAAQ,EAAE;oBACjB,MAAMC,YAAYD;oBAClB,OAAO,OAAOC,cAAc,YAAY9C,gBACpCb,YAAY2D,WAAWd,MAAM,aAAa/B,wBAAwBD,iBAClE8C;gBACN;YACF;QACF,MAAM,EAAE;IAEZ;AACF;AAEA,SAAStB,qBAA6ChC,IAAS;IAC7D,MAAMuD,MAAMvD,KAAKwD,MAAM,CAAC,CAACC,aAAa,EAAEpD,KAAK,EAAE,GAAKoD,cAAepD,CAAAA,SAAS,CAAA,GAAI;IAChF,OAAOL,KAAKuB,GAAG,CAAC,CAACmC;QACf,MAAMC,aAAa,AAAED,CAAAA,WAAWrD,KAAK,IAAI,CAAA,IAAKkD,MAAO;QACrD,OAAO;YACL,GAAGG,UAAU;YACbrD,OAAOuD,OAAOD,WAAWE,OAAO,CAAC;QACnC;IACF;AACF;AAEA,MAAMC,wBAAwBC,OAAOC,IAAI,CAACnE;AAC1C,SAAS6C,kBAAkBrC,KAAyB;IAClD,OAAO,OAAOA,UAAU,YAAYyD,sBAAsB5B,QAAQ,CAAC7B;AACrE"}
|
package/mf-manifest.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"name": "PieChart",
|
|
6
6
|
"type": "app",
|
|
7
7
|
"buildInfo": {
|
|
8
|
-
"buildVersion": "0.
|
|
8
|
+
"buildVersion": "0.14.0-beta.1",
|
|
9
9
|
"buildName": "@perses-dev/pie-chart-plugin"
|
|
10
10
|
},
|
|
11
11
|
"remoteEntry": {
|
|
12
|
-
"name": "__mf/js/PieChart.
|
|
12
|
+
"name": "__mf/js/PieChart.8a08ba39.js",
|
|
13
13
|
"path": "",
|
|
14
14
|
"type": "global"
|
|
15
15
|
},
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"api": ""
|
|
21
21
|
},
|
|
22
22
|
"globalName": "PieChart",
|
|
23
|
-
"pluginVersion": "
|
|
24
|
-
"prefetchInterface": false,
|
|
23
|
+
"pluginVersion": "2.5.1",
|
|
25
24
|
"getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/PieChart/\"; }"
|
|
26
25
|
},
|
|
27
26
|
"shared": [
|
|
@@ -35,34 +34,36 @@
|
|
|
35
34
|
"js": {
|
|
36
35
|
"async": [],
|
|
37
36
|
"sync": [
|
|
38
|
-
"__mf/js/async/274.
|
|
37
|
+
"__mf/js/async/274.a688b81f.js"
|
|
39
38
|
]
|
|
40
39
|
},
|
|
41
40
|
"css": {
|
|
42
41
|
"async": [],
|
|
43
42
|
"sync": []
|
|
44
43
|
}
|
|
45
|
-
}
|
|
44
|
+
},
|
|
45
|
+
"fallback": ""
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"id": "PieChart:@emotion/styled",
|
|
49
49
|
"name": "@emotion/styled",
|
|
50
|
-
"version": "11.14.
|
|
50
|
+
"version": "11.14.1",
|
|
51
51
|
"singleton": true,
|
|
52
52
|
"requiredVersion": "^11.6.0",
|
|
53
53
|
"assets": {
|
|
54
54
|
"js": {
|
|
55
55
|
"async": [],
|
|
56
56
|
"sync": [
|
|
57
|
-
"__mf/js/async/235.
|
|
58
|
-
"__mf/js/async/616.
|
|
57
|
+
"__mf/js/async/235.47f639e4.js",
|
|
58
|
+
"__mf/js/async/616.b87a9b8b.js"
|
|
59
59
|
]
|
|
60
60
|
},
|
|
61
61
|
"css": {
|
|
62
62
|
"async": [],
|
|
63
63
|
"sync": []
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
},
|
|
66
|
+
"fallback": ""
|
|
66
67
|
},
|
|
67
68
|
{
|
|
68
69
|
"id": "PieChart:@hookform/resolvers",
|
|
@@ -74,53 +75,58 @@
|
|
|
74
75
|
"js": {
|
|
75
76
|
"async": [],
|
|
76
77
|
"sync": [
|
|
77
|
-
"__mf/js/async/587.
|
|
78
|
-
"__mf/js/async/968.
|
|
78
|
+
"__mf/js/async/587.cb45262d.js",
|
|
79
|
+
"__mf/js/async/968.1b0e9683.js"
|
|
79
80
|
]
|
|
80
81
|
},
|
|
81
82
|
"css": {
|
|
82
83
|
"async": [],
|
|
83
84
|
"sync": []
|
|
84
85
|
}
|
|
85
|
-
}
|
|
86
|
+
},
|
|
87
|
+
"fallback": ""
|
|
86
88
|
},
|
|
87
89
|
{
|
|
88
90
|
"id": "PieChart:@perses-dev/components",
|
|
89
91
|
"name": "@perses-dev/components",
|
|
90
|
-
"version": "0.
|
|
92
|
+
"version": "0.54.0-beta.8",
|
|
91
93
|
"singleton": true,
|
|
92
|
-
"requiredVersion": "^0.
|
|
94
|
+
"requiredVersion": "^0.54.0-beta.8",
|
|
93
95
|
"assets": {
|
|
94
96
|
"js": {
|
|
95
97
|
"async": [],
|
|
96
98
|
"sync": [
|
|
97
|
-
"__mf/js/async/
|
|
99
|
+
"__mf/js/async/285.438eecb3.js"
|
|
98
100
|
]
|
|
99
101
|
},
|
|
100
102
|
"css": {
|
|
101
103
|
"async": [],
|
|
102
|
-
"sync": [
|
|
104
|
+
"sync": [
|
|
105
|
+
"__mf/css/async/285.85c2cbf6.css"
|
|
106
|
+
]
|
|
103
107
|
}
|
|
104
|
-
}
|
|
108
|
+
},
|
|
109
|
+
"fallback": ""
|
|
105
110
|
},
|
|
106
111
|
{
|
|
107
112
|
"id": "PieChart:@perses-dev/plugin-system",
|
|
108
113
|
"name": "@perses-dev/plugin-system",
|
|
109
|
-
"version": "0.
|
|
114
|
+
"version": "0.54.0-beta.8",
|
|
110
115
|
"singleton": true,
|
|
111
|
-
"requiredVersion": "^0.
|
|
116
|
+
"requiredVersion": "^0.54.0-beta.8",
|
|
112
117
|
"assets": {
|
|
113
118
|
"js": {
|
|
114
119
|
"async": [],
|
|
115
120
|
"sync": [
|
|
116
|
-
"__mf/js/async/
|
|
121
|
+
"__mf/js/async/90.9a81d69e.js"
|
|
117
122
|
]
|
|
118
123
|
},
|
|
119
124
|
"css": {
|
|
120
125
|
"async": [],
|
|
121
126
|
"sync": []
|
|
122
127
|
}
|
|
123
|
-
}
|
|
128
|
+
},
|
|
129
|
+
"fallback": ""
|
|
124
130
|
},
|
|
125
131
|
{
|
|
126
132
|
"id": "PieChart:date-fns",
|
|
@@ -132,14 +138,15 @@
|
|
|
132
138
|
"js": {
|
|
133
139
|
"async": [],
|
|
134
140
|
"sync": [
|
|
135
|
-
"__mf/js/async/192.
|
|
141
|
+
"__mf/js/async/192.8567667d.js"
|
|
136
142
|
]
|
|
137
143
|
},
|
|
138
144
|
"css": {
|
|
139
145
|
"async": [],
|
|
140
146
|
"sync": []
|
|
141
147
|
}
|
|
142
|
-
}
|
|
148
|
+
},
|
|
149
|
+
"fallback": ""
|
|
143
150
|
},
|
|
144
151
|
{
|
|
145
152
|
"id": "PieChart:echarts",
|
|
@@ -151,33 +158,35 @@
|
|
|
151
158
|
"js": {
|
|
152
159
|
"async": [],
|
|
153
160
|
"sync": [
|
|
154
|
-
"__mf/js/async/873.
|
|
161
|
+
"__mf/js/async/873.10a8cf00.js"
|
|
155
162
|
]
|
|
156
163
|
},
|
|
157
164
|
"css": {
|
|
158
165
|
"async": [],
|
|
159
166
|
"sync": []
|
|
160
167
|
}
|
|
161
|
-
}
|
|
168
|
+
},
|
|
169
|
+
"fallback": ""
|
|
162
170
|
},
|
|
163
171
|
{
|
|
164
172
|
"id": "PieChart:lodash",
|
|
165
173
|
"name": "lodash",
|
|
166
|
-
"version": "4.
|
|
174
|
+
"version": "4.18.1",
|
|
167
175
|
"singleton": true,
|
|
168
176
|
"requiredVersion": "^4.17.21",
|
|
169
177
|
"assets": {
|
|
170
178
|
"js": {
|
|
171
179
|
"async": [],
|
|
172
180
|
"sync": [
|
|
173
|
-
"__mf/js/async/392.
|
|
181
|
+
"__mf/js/async/392.fd732e61.js"
|
|
174
182
|
]
|
|
175
183
|
},
|
|
176
184
|
"css": {
|
|
177
185
|
"async": [],
|
|
178
186
|
"sync": []
|
|
179
187
|
}
|
|
180
|
-
}
|
|
188
|
+
},
|
|
189
|
+
"fallback": ""
|
|
181
190
|
},
|
|
182
191
|
{
|
|
183
192
|
"id": "PieChart:react-dom",
|
|
@@ -189,14 +198,15 @@
|
|
|
189
198
|
"js": {
|
|
190
199
|
"async": [],
|
|
191
200
|
"sync": [
|
|
192
|
-
"__mf/js/async/470.
|
|
201
|
+
"__mf/js/async/470.f4861d15.js"
|
|
193
202
|
]
|
|
194
203
|
},
|
|
195
204
|
"css": {
|
|
196
205
|
"async": [],
|
|
197
206
|
"sync": []
|
|
198
207
|
}
|
|
199
|
-
}
|
|
208
|
+
},
|
|
209
|
+
"fallback": ""
|
|
200
210
|
},
|
|
201
211
|
{
|
|
202
212
|
"id": "PieChart:react",
|
|
@@ -208,14 +218,15 @@
|
|
|
208
218
|
"js": {
|
|
209
219
|
"async": [],
|
|
210
220
|
"sync": [
|
|
211
|
-
"__mf/js/async/121.
|
|
221
|
+
"__mf/js/async/121.77d8ca8d.js"
|
|
212
222
|
]
|
|
213
223
|
},
|
|
214
224
|
"css": {
|
|
215
225
|
"async": [],
|
|
216
226
|
"sync": []
|
|
217
227
|
}
|
|
218
|
-
}
|
|
228
|
+
},
|
|
229
|
+
"fallback": ""
|
|
219
230
|
}
|
|
220
231
|
],
|
|
221
232
|
"remotes": [],
|
|
@@ -226,26 +237,25 @@
|
|
|
226
237
|
"assets": {
|
|
227
238
|
"js": {
|
|
228
239
|
"sync": [
|
|
229
|
-
"__mf/js/async/554.
|
|
230
|
-
"__mf/js/async/
|
|
231
|
-
"__mf/js/async/721.
|
|
232
|
-
"__mf/js/async/
|
|
233
|
-
"__mf/js/async/__federation_expose_PieChart.
|
|
240
|
+
"__mf/js/async/554.97159342.js",
|
|
241
|
+
"__mf/js/async/376.9566e7f3.js",
|
|
242
|
+
"__mf/js/async/721.6e66d127.js",
|
|
243
|
+
"__mf/js/async/204.0b9b3971.js",
|
|
244
|
+
"__mf/js/async/__federation_expose_PieChart.7177fa08.js"
|
|
234
245
|
],
|
|
235
246
|
"async": [
|
|
236
|
-
"__mf/js/async/469.
|
|
237
|
-
"__mf/js/async/lib-router.
|
|
238
|
-
"__mf/js/async/356.
|
|
239
|
-
"__mf/js/async/
|
|
240
|
-
"__mf/js/async/177.
|
|
241
|
-
"__mf/js/async/663.
|
|
247
|
+
"__mf/js/async/469.3c02be86.js",
|
|
248
|
+
"__mf/js/async/lib-router.9b4805e4.js",
|
|
249
|
+
"__mf/js/async/356.f9173bd6.js",
|
|
250
|
+
"__mf/js/async/944.cfa573dc.js",
|
|
251
|
+
"__mf/js/async/177.5b05acb8.js",
|
|
252
|
+
"__mf/js/async/663.69a57e79.js"
|
|
242
253
|
]
|
|
243
254
|
},
|
|
244
255
|
"css": {
|
|
245
256
|
"sync": [],
|
|
246
257
|
"async": [
|
|
247
|
-
"__mf/css/async/
|
|
248
|
-
"__mf/css/async/61.d3010b86.css"
|
|
258
|
+
"__mf/css/async/285.85c2cbf6.css"
|
|
249
259
|
]
|
|
250
260
|
}
|
|
251
261
|
},
|