@perses-dev/stat-chart-plugin 0.10.0 → 0.11.0

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 (48) hide show
  1. package/__mf/css/async/263.d3010b86.css +1 -0
  2. package/__mf/css/async/341.d3010b86.css +1 -0
  3. package/__mf/css/async/759.d3010b86.css +1 -0
  4. package/__mf/js/{StatChart.4380d9d9.js → StatChart.7c0ea76c.js} +3 -3
  5. package/__mf/js/async/{238.e184091d.js → 238.5475e796.js} +1 -1
  6. package/__mf/js/async/298.2736d1ac.js +1 -0
  7. package/__mf/js/async/518.d772e916.js +2 -0
  8. package/__mf/js/async/518.d772e916.js.LICENSE.txt +13 -0
  9. package/__mf/js/async/711.30b0444f.js +22 -0
  10. package/__mf/js/async/{75.0e924b9e.js → 75.c51a3e1b.js} +1 -1
  11. package/__mf/js/async/764.c5215ca9.js +83 -0
  12. package/__mf/js/async/85.559c8591.js +7 -0
  13. package/__mf/js/async/966.4cf38e97.js +65 -0
  14. package/__mf/js/async/__federation_expose_StatChart.20659f63.js +1 -0
  15. package/__mf/js/{main.0d096334.js → main.b4991a3c.js} +3 -3
  16. package/lib/StatChartBase.d.ts +2 -0
  17. package/lib/StatChartBase.d.ts.map +1 -1
  18. package/lib/StatChartBase.js +91 -29
  19. package/lib/StatChartBase.js.map +1 -1
  20. package/lib/StatChartOptionsEditorSettings.d.ts.map +1 -1
  21. package/lib/StatChartOptionsEditorSettings.js +30 -2
  22. package/lib/StatChartOptionsEditorSettings.js.map +1 -1
  23. package/lib/StatChartPanel.d.ts.map +1 -1
  24. package/lib/StatChartPanel.js +4 -3
  25. package/lib/StatChartPanel.js.map +1 -1
  26. package/lib/cjs/StatChartBase.js +90 -28
  27. package/lib/cjs/StatChartOptionsEditorSettings.js +29 -1
  28. package/lib/cjs/StatChartPanel.js +4 -3
  29. package/lib/cjs/stat-chart-model.js +25 -3
  30. package/lib/stat-chart-model.d.ts +7 -0
  31. package/lib/stat-chart-model.d.ts.map +1 -1
  32. package/lib/stat-chart-model.js +14 -0
  33. package/lib/stat-chart-model.js.map +1 -1
  34. package/mf-manifest.json +17 -16
  35. package/mf-stats.json +17 -16
  36. package/package.json +12 -6
  37. package/__mf/css/async/263.1ed8bb01.css +0 -1
  38. package/__mf/css/async/341.1ed8bb01.css +0 -1
  39. package/__mf/css/async/759.1ed8bb01.css +0 -1
  40. package/__mf/js/async/109.8841516b.js +0 -73
  41. package/__mf/js/async/181.985d810b.js +0 -83
  42. package/__mf/js/async/288.b314a020.js +0 -7
  43. package/__mf/js/async/298.db4e15c8.js +0 -1
  44. package/__mf/js/async/828.d18e1139.js +0 -65
  45. package/__mf/js/async/__federation_expose_StatChart.20144587.js +0 -1
  46. /package/__mf/js/async/{109.8841516b.js.LICENSE.txt → 711.30b0444f.js.LICENSE.txt} +0 -0
  47. /package/__mf/js/async/{181.985d810b.js.LICENSE.txt → 764.c5215ca9.js.LICENSE.txt} +0 -0
  48. /package/__mf/js/async/{288.b314a020.js.LICENSE.txt → 85.559c8591.js.LICENSE.txt} +0 -0
@@ -26,6 +26,8 @@ const _components = require("@perses-dev/components");
26
26
  const _pluginsystem = require("@perses-dev/plugin-system");
27
27
  const _immer = require("immer");
28
28
  const _merge = /*#__PURE__*/ _interop_require_default(require("lodash/merge"));
29
+ const _react = require("react");
30
+ const _statchartmodel = require("./stat-chart-model");
29
31
  function _interop_require_default(obj) {
30
32
  return obj && obj.__esModule ? obj : {
31
33
  default: obj
@@ -71,6 +73,31 @@ function StatChartOptionsEditorSettings(props) {
71
73
  draft.valueFontSize = fontSize;
72
74
  }));
73
75
  };
76
+ const handleColorModeChange = (0, _react.useCallback)((_, newColorMode)=>{
77
+ onChange((0, _immer.produce)(value, (draft)=>{
78
+ draft.colorMode = newColorMode.id;
79
+ }));
80
+ }, [
81
+ onChange,
82
+ value
83
+ ]);
84
+ const selectColorMode = (0, _react.useMemo)(()=>{
85
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorControl, {
86
+ label: "Color mode",
87
+ control: /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.SettingsAutocomplete, {
88
+ onChange: handleColorModeChange,
89
+ options: _statchartmodel.COLOR_MODE_LABELS.map(({ id, label })=>({
90
+ id,
91
+ label
92
+ })),
93
+ disableClearable: true,
94
+ value: _statchartmodel.COLOR_MODE_LABELS.find((i)=>i.id === value.colorMode) ?? _statchartmodel.COLOR_MODE_LABELS.find((i)=>i.id === 'value')
95
+ })
96
+ });
97
+ }, [
98
+ value.colorMode,
99
+ handleColorModeChange
100
+ ]);
74
101
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_components.OptionsEditorGrid, {
75
102
  children: [
76
103
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.OptionsEditorColumn, {
@@ -99,7 +126,8 @@ function StatChartOptionsEditorSettings(props) {
99
126
  /*#__PURE__*/ (0, _jsxruntime.jsx)(_components.FontSizeSelector, {
100
127
  value: value.valueFontSize,
101
128
  onChange: handleFontSizeChange
102
- })
129
+ }),
130
+ selectColorMode
103
131
  ]
104
132
  })
105
133
  }),
@@ -33,11 +33,11 @@ const MIN_WIDTH = 100;
33
33
  const SPACING = 2;
34
34
  const StatChartPanel = (props)=>{
35
35
  const { spec, contentDimensions, queryResults } = props;
36
- const { format, sparkline, valueFontSize: valueFontSize } = spec;
36
+ const { format, sparkline, valueFontSize: valueFontSize, colorMode } = spec;
37
37
  const chartsTheme = (0, _components.useChartsTheme)();
38
38
  const statChartData = useStatChartData(queryResults, spec, chartsTheme);
39
39
  const isMultiSeries = statChartData.length > 1;
40
- if (contentDimensions === undefined) return null;
40
+ if (!contentDimensions) return null;
41
41
  // Calculates chart width
42
42
  const spacing = SPACING * (statChartData.length - 1);
43
43
  let chartWidth = (contentDimensions.width - spacing) / statChartData.length;
@@ -64,7 +64,8 @@ const StatChartPanel = (props)=>{
64
64
  format: format,
65
65
  sparkline: sparklineConfig,
66
66
  showSeriesName: isMultiSeries,
67
- valueFontSize: valueFontSize
67
+ valueFontSize: valueFontSize,
68
+ colorMode: colorMode
68
69
  }, index);
69
70
  }) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
70
71
  sx: {
@@ -14,12 +14,34 @@
14
14
  Object.defineProperty(exports, "__esModule", {
15
15
  value: true
16
16
  });
17
- Object.defineProperty(exports, "createInitialStatChartOptions", {
18
- enumerable: true,
19
- get: function() {
17
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: all[name]
21
+ });
22
+ }
23
+ _export(exports, {
24
+ COLOR_MODE_LABELS: function() {
25
+ return COLOR_MODE_LABELS;
26
+ },
27
+ createInitialStatChartOptions: function() {
20
28
  return createInitialStatChartOptions;
21
29
  }
22
30
  });
31
+ const COLOR_MODE_LABELS = [
32
+ {
33
+ id: 'none',
34
+ label: 'None'
35
+ },
36
+ {
37
+ id: 'value',
38
+ label: 'Text'
39
+ },
40
+ {
41
+ id: 'background_solid',
42
+ label: 'Background'
43
+ }
44
+ ];
23
45
  function createInitialStatChartOptions() {
24
46
  return {
25
47
  calculation: 'last-number',
@@ -7,6 +7,12 @@ import { OptionsEditorProps } from '@perses-dev/plugin-system';
7
7
  export interface StatChartDefinition extends Definition<StatChartOptions> {
8
8
  kind: 'StatChart';
9
9
  }
10
+ export type ColorMode = 'none' | 'value' | 'background_solid';
11
+ export type ColorModeLabelItem = {
12
+ id: ColorMode;
13
+ label: string;
14
+ };
15
+ export declare const COLOR_MODE_LABELS: ColorModeLabelItem[];
10
16
  export interface StatChartOptions {
11
17
  calculation: CalculationType;
12
18
  format: FormatOptions;
@@ -15,6 +21,7 @@ export interface StatChartOptions {
15
21
  sparkline?: StatChartSparklineOptions;
16
22
  valueFontSize?: FontSizeOption;
17
23
  mappings?: ValueMapping[];
24
+ colorMode?: ColorMode;
18
25
  }
19
26
  export interface StatChartSparklineOptions {
20
27
  color?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"stat-chart-model.d.ts","sourceRoot":"","sources":["../../src/stat-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,gBAAgB,CAAC;IACvE,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;AAE/E,wBAAgB,6BAA6B,IAAI,gBAAgB,CAQhE"}
1
+ {"version":3,"file":"stat-chart-model.d.ts","sourceRoot":"","sources":["../../src/stat-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,gBAAgB,CAAC;IACvE,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,kBAAkB,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,SAAS,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,kBAAkB,EAIjD,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,2BAA2B,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;AAE/E,wBAAgB,6BAA6B,IAAI,gBAAgB,CAQhE"}
@@ -10,6 +10,20 @@
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
+ export const COLOR_MODE_LABELS = [
14
+ {
15
+ id: 'none',
16
+ label: 'None'
17
+ },
18
+ {
19
+ id: 'value',
20
+ label: 'Text'
21
+ },
22
+ {
23
+ id: 'background_solid',
24
+ label: 'Background'
25
+ }
26
+ ];
13
27
  export function createInitialStatChartOptions() {
14
28
  return {
15
29
  calculation: 'last-number',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/stat-chart-model.ts"],"sourcesContent":["// Copyright 2023 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 { CalculationType, Definition, ThresholdOptions, FormatOptions, ValueMapping } from '@perses-dev/core';\nimport { FontSizeOption } from '@perses-dev/components';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\n\n/**\n * The schema for a StatChart panel.\n */\nexport interface StatChartDefinition extends Definition<StatChartOptions> {\n kind: 'StatChart';\n}\n\nexport interface StatChartOptions {\n calculation: CalculationType;\n format: FormatOptions;\n metricLabel?: string;\n thresholds?: ThresholdOptions;\n sparkline?: StatChartSparklineOptions;\n valueFontSize?: FontSizeOption;\n mappings?: ValueMapping[];\n}\n\nexport interface StatChartSparklineOptions {\n color?: string;\n width?: number;\n}\n\nexport type StatChartOptionsEditorProps = OptionsEditorProps<StatChartOptions>;\n\nexport function createInitialStatChartOptions(): StatChartOptions {\n return {\n calculation: 'last-number',\n format: {\n unit: 'decimal',\n },\n sparkline: {},\n };\n}\n"],"names":["createInitialStatChartOptions","calculation","format","unit","sparkline"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA8BjC,OAAO,SAASA;IACd,OAAO;QACLC,aAAa;QACbC,QAAQ;YACNC,MAAM;QACR;QACAC,WAAW,CAAC;IACd;AACF"}
1
+ {"version":3,"sources":["../../src/stat-chart-model.ts"],"sourcesContent":["// Copyright 2023 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 { CalculationType, Definition, ThresholdOptions, FormatOptions, ValueMapping } from '@perses-dev/core';\nimport { FontSizeOption } from '@perses-dev/components';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\n\n/**\n * The schema for a StatChart panel.\n */\nexport interface StatChartDefinition extends Definition<StatChartOptions> {\n kind: 'StatChart';\n}\n\nexport type ColorMode = 'none' | 'value' | 'background_solid';\n\nexport type ColorModeLabelItem = {\n id: ColorMode;\n label: string;\n};\n\nexport const COLOR_MODE_LABELS: ColorModeLabelItem[] = [\n { id: 'none', label: 'None' },\n { id: 'value', label: 'Text' },\n { id: 'background_solid', label: 'Background' },\n];\n\nexport interface StatChartOptions {\n calculation: CalculationType;\n format: FormatOptions;\n metricLabel?: string;\n thresholds?: ThresholdOptions;\n sparkline?: StatChartSparklineOptions;\n valueFontSize?: FontSizeOption;\n mappings?: ValueMapping[];\n colorMode?: ColorMode;\n}\n\nexport interface StatChartSparklineOptions {\n color?: string;\n width?: number;\n}\n\nexport type StatChartOptionsEditorProps = OptionsEditorProps<StatChartOptions>;\n\nexport function createInitialStatChartOptions(): StatChartOptions {\n return {\n calculation: 'last-number',\n format: {\n unit: 'decimal',\n },\n sparkline: {},\n };\n}\n"],"names":["COLOR_MODE_LABELS","id","label","createInitialStatChartOptions","calculation","format","unit","sparkline"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAoBjC,OAAO,MAAMA,oBAA0C;IACrD;QAAEC,IAAI;QAAQC,OAAO;IAAO;IAC5B;QAAED,IAAI;QAASC,OAAO;IAAO;IAC7B;QAAED,IAAI;QAAoBC,OAAO;IAAa;CAC/C,CAAC;AAoBF,OAAO,SAASC;IACd,OAAO;QACLC,aAAa;QACbC,QAAQ;YACNC,MAAM;QACR;QACAC,WAAW,CAAC;IACd;AACF"}
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "StatChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.10.0",
8
+ "buildVersion": "0.11.0",
9
9
  "buildName": "@perses-dev/stat-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/StatChart.4380d9d9.js",
12
+ "name": "__mf/js/StatChart.7c0ea76c.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -87,14 +87,14 @@
87
87
  {
88
88
  "id": "StatChart:@perses-dev/components",
89
89
  "name": "@perses-dev/components",
90
- "version": "0.52.0",
90
+ "version": "0.53.0-beta.1",
91
91
  "singleton": true,
92
- "requiredVersion": "^0.52.0",
92
+ "requiredVersion": "^0.53.0-beta.1",
93
93
  "assets": {
94
94
  "js": {
95
95
  "async": [],
96
96
  "sync": [
97
- "__mf/js/async/288.b314a020.js"
97
+ "__mf/js/async/85.559c8591.js"
98
98
  ]
99
99
  },
100
100
  "css": {
@@ -106,14 +106,14 @@
106
106
  {
107
107
  "id": "StatChart:@perses-dev/plugin-system",
108
108
  "name": "@perses-dev/plugin-system",
109
- "version": "0.52.0",
109
+ "version": "0.53.0-beta.1",
110
110
  "singleton": true,
111
- "requiredVersion": "^0.52.0",
111
+ "requiredVersion": "^0.53.0-beta.1",
112
112
  "assets": {
113
113
  "js": {
114
114
  "async": [],
115
115
  "sync": [
116
- "__mf/js/async/109.8841516b.js"
116
+ "__mf/js/async/711.30b0444f.js"
117
117
  ]
118
118
  },
119
119
  "css": {
@@ -132,7 +132,7 @@
132
132
  "js": {
133
133
  "async": [],
134
134
  "sync": [
135
- "__mf/js/async/75.0e924b9e.js"
135
+ "__mf/js/async/75.c51a3e1b.js"
136
136
  ]
137
137
  },
138
138
  "css": {
@@ -246,16 +246,17 @@
246
246
  "js": {
247
247
  "sync": [
248
248
  "__mf/js/async/954.8c39b26f.js",
249
- "__mf/js/async/181.985d810b.js",
250
- "__mf/js/async/298.db4e15c8.js",
251
- "__mf/js/async/__federation_expose_StatChart.20144587.js"
249
+ "__mf/js/async/764.c5215ca9.js",
250
+ "__mf/js/async/298.2736d1ac.js",
251
+ "__mf/js/async/518.d772e916.js",
252
+ "__mf/js/async/__federation_expose_StatChart.20659f63.js"
252
253
  ],
253
254
  "async": [
254
- "__mf/js/async/238.e184091d.js",
255
+ "__mf/js/async/238.5475e796.js",
255
256
  "__mf/js/async/224.82f1452f.js",
256
257
  "__mf/js/async/292.a2435289.js",
257
- "__mf/js/async/828.d18e1139.js",
258
258
  "__mf/js/async/804.ee813935.js",
259
+ "__mf/js/async/966.4cf38e97.js",
259
260
  "__mf/js/async/lib-router.5a2b101a.js",
260
261
  "__mf/js/async/488.daa22b59.js"
261
262
  ]
@@ -263,8 +264,8 @@
263
264
  "css": {
264
265
  "sync": [],
265
266
  "async": [
266
- "__mf/css/async/341.1ed8bb01.css",
267
- "__mf/css/async/263.1ed8bb01.css"
267
+ "__mf/css/async/341.d3010b86.css",
268
+ "__mf/css/async/263.d3010b86.css"
268
269
  ]
269
270
  }
270
271
  },
package/mf-stats.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "StatChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.10.0",
8
+ "buildVersion": "0.11.0",
9
9
  "buildName": "@perses-dev/stat-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/StatChart.4380d9d9.js",
12
+ "name": "__mf/js/StatChart.7c0ea76c.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.52.0",
98
+ "requiredVersion": "^0.53.0-beta.1",
99
99
  "shareScope": "default",
100
100
  "name": "@perses-dev/components",
101
- "version": "0.52.0",
101
+ "version": "0.53.0-beta.1",
102
102
  "eager": false,
103
103
  "id": "StatChart:@perses-dev/components",
104
104
  "assets": {
105
105
  "js": {
106
106
  "async": [],
107
107
  "sync": [
108
- "__mf/js/async/288.b314a020.js"
108
+ "__mf/js/async/85.559c8591.js"
109
109
  ]
110
110
  },
111
111
  "css": {
@@ -119,17 +119,17 @@
119
119
  },
120
120
  {
121
121
  "singleton": true,
122
- "requiredVersion": "^0.52.0",
122
+ "requiredVersion": "^0.53.0-beta.1",
123
123
  "shareScope": "default",
124
124
  "name": "@perses-dev/plugin-system",
125
- "version": "0.52.0",
125
+ "version": "0.53.0-beta.1",
126
126
  "eager": false,
127
127
  "id": "StatChart:@perses-dev/plugin-system",
128
128
  "assets": {
129
129
  "js": {
130
130
  "async": [],
131
131
  "sync": [
132
- "__mf/js/async/109.8841516b.js"
132
+ "__mf/js/async/711.30b0444f.js"
133
133
  ]
134
134
  },
135
135
  "css": {
@@ -153,7 +153,7 @@
153
153
  "js": {
154
154
  "async": [],
155
155
  "sync": [
156
- "__mf/js/async/75.0e924b9e.js"
156
+ "__mf/js/async/75.c51a3e1b.js"
157
157
  ]
158
158
  },
159
159
  "css": {
@@ -292,16 +292,17 @@
292
292
  "js": {
293
293
  "sync": [
294
294
  "__mf/js/async/954.8c39b26f.js",
295
- "__mf/js/async/181.985d810b.js",
296
- "__mf/js/async/298.db4e15c8.js",
297
- "__mf/js/async/__federation_expose_StatChart.20144587.js"
295
+ "__mf/js/async/764.c5215ca9.js",
296
+ "__mf/js/async/298.2736d1ac.js",
297
+ "__mf/js/async/518.d772e916.js",
298
+ "__mf/js/async/__federation_expose_StatChart.20659f63.js"
298
299
  ],
299
300
  "async": [
300
- "__mf/js/async/238.e184091d.js",
301
+ "__mf/js/async/238.5475e796.js",
301
302
  "__mf/js/async/224.82f1452f.js",
302
303
  "__mf/js/async/292.a2435289.js",
303
- "__mf/js/async/828.d18e1139.js",
304
304
  "__mf/js/async/804.ee813935.js",
305
+ "__mf/js/async/966.4cf38e97.js",
305
306
  "__mf/js/async/lib-router.5a2b101a.js",
306
307
  "__mf/js/async/488.daa22b59.js"
307
308
  ]
@@ -309,8 +310,8 @@
309
310
  "css": {
310
311
  "sync": [],
311
312
  "async": [
312
- "__mf/css/async/341.1ed8bb01.css",
313
- "__mf/css/async/263.1ed8bb01.css"
313
+ "__mf/css/async/341.d3010b86.css",
314
+ "__mf/css/async/263.d3010b86.css"
314
315
  ]
315
316
  }
316
317
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/stat-chart-plugin",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "homepage": "https://github.com/perses/plugins/blob/main/README.md",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,17 +27,17 @@
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.52.0",
31
- "@perses-dev/core": "^0.52.0",
32
- "@perses-dev/plugin-system": "^0.52.0",
30
+ "@perses-dev/components": "^0.53.0-beta.1",
31
+ "@perses-dev/core": "^0.53.0-beta.1",
32
+ "@perses-dev/plugin-system": "^0.53.0-beta.1",
33
33
  "date-fns": "^4.1.0",
34
34
  "date-fns-tz": "^3.2.0",
35
35
  "echarts": "5.5.0",
36
+ "immer": "^10.1.1",
36
37
  "lodash": "^4.17.21",
37
38
  "react": "^17.0.2 || ^18.0.0",
38
39
  "react-dom": "^17.0.2 || ^18.0.0",
39
- "use-resize-observer": "^9.0.0",
40
- "immer": "^10.1.1"
40
+ "use-resize-observer": "^9.0.0"
41
41
  },
42
42
  "files": [
43
43
  "lib/**/*",
@@ -57,5 +57,11 @@
57
57
  }
58
58
  }
59
59
  ]
60
+ },
61
+ "dependencies": {
62
+ "chroma-js": "^3.1.2"
63
+ },
64
+ "devDependencies": {
65
+ "@types/chroma-js": "^3.1.2"
60
66
  }
61
67
  }
@@ -1 +0,0 @@
1
- @font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-300-normal.322bdf14.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(/plugins/StatChart/__mf/font/lato-latin-300-normal.c5195215.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-300-normal.322bdf14.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-400-normal.63513b00.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(/plugins/StatChart/__mf/font/lato-latin-400-normal.b7ffde23.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-400-normal.63513b00.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-700-normal.bb27db94.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(/plugins/StatChart/__mf/font/lato-latin-700-normal.d5eb20bc.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-700-normal.bb27db94.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:900;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-900-normal.a27049a3.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:900;src:url(/plugins/StatChart/__mf/font/lato-latin-900-normal.d884a71c.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-900-normal.a27049a3.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@@ -1 +0,0 @@
1
- @font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-300-normal.322bdf14.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(/plugins/StatChart/__mf/font/lato-latin-300-normal.c5195215.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-300-normal.322bdf14.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-400-normal.63513b00.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(/plugins/StatChart/__mf/font/lato-latin-400-normal.b7ffde23.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-400-normal.63513b00.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-700-normal.bb27db94.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(/plugins/StatChart/__mf/font/lato-latin-700-normal.d5eb20bc.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-700-normal.bb27db94.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:900;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-900-normal.a27049a3.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:900;src:url(/plugins/StatChart/__mf/font/lato-latin-900-normal.d884a71c.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-900-normal.a27049a3.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@@ -1 +0,0 @@
1
- @font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-300-normal.322bdf14.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:300;src:url(/plugins/StatChart/__mf/font/lato-latin-300-normal.c5195215.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-300-normal.322bdf14.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-400-normal.63513b00.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:400;src:url(/plugins/StatChart/__mf/font/lato-latin-400-normal.b7ffde23.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-400-normal.63513b00.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-700-normal.bb27db94.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:700;src:url(/plugins/StatChart/__mf/font/lato-latin-700-normal.d5eb20bc.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-700-normal.bb27db94.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:900;src:url(/plugins/StatChart/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-900-normal.a27049a3.woff)format("woff");unicode-range:U+100-24F,U+259,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lato;font-style:normal;font-display:swap;font-weight:900;src:url(/plugins/StatChart/__mf/font/lato-latin-900-normal.d884a71c.woff2)format("woff2"),url(/plugins/StatChart/__mf/font/lato-all-900-normal.a27049a3.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}