@perses-dev/heatmap-chart-plugin 0.4.0-rc.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/__mf/js/{HeatMapChart.3d6939cb.js → HeatMapChart.9e89e9fc.js} +3 -3
  2. package/__mf/js/async/12.4ae967ba.js +2 -0
  3. package/__mf/js/async/392.81aab132.js +2 -0
  4. package/__mf/js/async/631.8bf555e3.js +71 -0
  5. package/__mf/js/async/980.092bc51a.js +83 -0
  6. package/__mf/js/async/__federation_expose_HeatMapChart.142ce29b.js +23 -0
  7. package/__mf/js/{main.b7008596.js → main.d436962b.js} +3 -3
  8. package/lib/cjs/components/HeatMapChart.js +96 -19
  9. package/lib/cjs/components/HeatMapChartOptionsEditorSettings.js +60 -5
  10. package/lib/cjs/components/HeatMapChartPanel.js +87 -38
  11. package/lib/cjs/components/HeatMapTooltip.js +5 -5
  12. package/lib/cjs/heat-map-chart-model.js +24 -0
  13. package/lib/components/HeatMapChart.d.ts +6 -3
  14. package/lib/components/HeatMapChart.d.ts.map +1 -1
  15. package/lib/components/HeatMapChart.js +96 -19
  16. package/lib/components/HeatMapChart.js.map +1 -1
  17. package/lib/components/HeatMapChartOptionsEditorSettings.d.ts.map +1 -1
  18. package/lib/components/HeatMapChartOptionsEditorSettings.js +63 -8
  19. package/lib/components/HeatMapChartOptionsEditorSettings.js.map +1 -1
  20. package/lib/components/HeatMapChartPanel.d.ts.map +1 -1
  21. package/lib/components/HeatMapChartPanel.js +87 -38
  22. package/lib/components/HeatMapChartPanel.js.map +1 -1
  23. package/lib/components/HeatMapTooltip.d.ts +1 -2
  24. package/lib/components/HeatMapTooltip.d.ts.map +1 -1
  25. package/lib/components/HeatMapTooltip.js +5 -5
  26. package/lib/components/HeatMapTooltip.js.map +1 -1
  27. package/lib/heat-map-chart-model.d.ts +13 -0
  28. package/lib/heat-map-chart-model.d.ts.map +1 -1
  29. package/lib/heat-map-chart-model.js +18 -0
  30. package/lib/heat-map-chart-model.js.map +1 -1
  31. package/mf-manifest.json +13 -13
  32. package/mf-stats.json +13 -13
  33. package/package.json +4 -4
  34. package/__mf/js/async/12.6b37fcc7.js +0 -2
  35. package/__mf/js/async/392.de783cd4.js +0 -2
  36. package/__mf/js/async/700.a5530423.js +0 -83
  37. package/__mf/js/async/983.84770ead.js +0 -71
  38. package/__mf/js/async/__federation_expose_HeatMapChart.158cef2e.js +0 -23
  39. /package/__mf/js/async/{12.6b37fcc7.js.LICENSE.txt → 12.4ae967ba.js.LICENSE.txt} +0 -0
  40. /package/__mf/js/async/{392.de783cd4.js.LICENSE.txt → 392.81aab132.js.LICENSE.txt} +0 -0
  41. /package/__mf/js/async/{983.84770ead.js.LICENSE.txt → 631.8bf555e3.js.LICENSE.txt} +0 -0
  42. /package/__mf/js/async/{700.a5530423.js.LICENSE.txt → 980.092bc51a.js.LICENSE.txt} +0 -0
@@ -6,11 +6,10 @@ interface CustomTooltipProps {
6
6
  label: string;
7
7
  marker: string;
8
8
  xAxisCategories: number[];
9
- yAxisCategories: string[];
10
9
  theme: Theme;
11
10
  yAxisFormat?: FormatOptions;
12
11
  countFormat?: FormatOptions;
13
12
  }
14
- export declare function generateTooltipHTML({ data, label, marker, xAxisCategories, yAxisCategories, theme, yAxisFormat, countFormat, }: CustomTooltipProps): string;
13
+ export declare function generateTooltipHTML({ data, label, marker, xAxisCategories, theme, yAxisFormat, countFormat, }: CustomTooltipProps): string;
15
14
  export {};
16
15
  //# sourceMappingURL=HeatMapTooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeatMapTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/HeatMapTooltip.ts"],"names":[],"mappings":"AAaA,OAAO,EAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,UAAU,kBAAkB;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,eAAe,EACf,eAAe,EACf,KAAK,EACL,WAAW,EACX,WAAW,GACZ,EAAE,kBAAkB,GAAG,MAAM,CAwC7B"}
1
+ {"version":3,"file":"HeatMapTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/HeatMapTooltip.ts"],"names":[],"mappings":"AAaA,OAAO,EAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAe,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,UAAU,kBAAkB;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,eAAe,EACf,KAAK,EACL,WAAW,EACX,WAAW,GACZ,EAAE,kBAAkB,GAAG,MAAM,CAsC7B"}
@@ -13,9 +13,9 @@
13
13
  import { css } from '@mui/material';
14
14
  import { getDateAndTime } from '@perses-dev/components';
15
15
  import { formatValue } from '@perses-dev/core';
16
- export function generateTooltipHTML({ data, label, marker, xAxisCategories, yAxisCategories, theme, yAxisFormat, countFormat }) {
17
- const [x, y] = data;
18
- const xAxisLabel = xAxisCategories[x];
16
+ export function generateTooltipHTML({ data, label, marker, xAxisCategories, theme, yAxisFormat, countFormat }) {
17
+ const [xIndex, yLower, yUpper] = data;
18
+ const xAxisLabel = xAxisCategories[xIndex];
19
19
  const { formattedDate, formattedTime } = getDateAndTime(xAxisLabel);
20
20
  const tooltipHeader = css`
21
21
  border-bottom: 1px solid ${theme.palette.grey[500]};
@@ -29,8 +29,8 @@ export function generateTooltipHTML({ data, label, marker, xAxisCategories, yAxi
29
29
  const labelStyles = css`
30
30
  margin-right: 16px;
31
31
  `;
32
- const lowerBound = parseFloat(yAxisCategories[y]);
33
- const upperBound = yAxisCategories[y + 1] ? parseFloat(yAxisCategories[y + 1]) : parseFloat(yAxisCategories[y]) + parseFloat(yAxisCategories[y]) - parseFloat(yAxisCategories[y - 1]); // Top cell, upper bound need to be calculated from previous cell
32
+ const lowerBound = yLower;
33
+ const upperBound = yUpper;
34
34
  return `
35
35
  <div>
36
36
  <div style="${tooltipHeader.styles}">${formattedDate} ${formattedTime}</div>
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/HeatMapTooltip.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 { css, Theme } from '@mui/material';\nimport { getDateAndTime } from '@perses-dev/components';\nimport { FormatOptions, formatValue } from '@perses-dev/core';\nimport { HeatMapData } from './HeatMapChart';\n\ninterface CustomTooltipProps {\n data: HeatMapData;\n label: string;\n marker: string;\n xAxisCategories: number[];\n yAxisCategories: string[];\n theme: Theme;\n yAxisFormat?: FormatOptions;\n countFormat?: FormatOptions;\n}\n\nexport function generateTooltipHTML({\n data,\n label,\n marker,\n xAxisCategories,\n yAxisCategories,\n theme,\n yAxisFormat,\n countFormat,\n}: CustomTooltipProps): string {\n const [x, y] = data;\n const xAxisLabel = xAxisCategories[x];\n\n const { formattedDate, formattedTime } = getDateAndTime(xAxisLabel);\n\n const tooltipHeader = css`\n border-bottom: 1px solid ${theme.palette.grey[500]};\n padding-bottom: 8px;\n `;\n\n const tooltipContentStyles = css`\n display: flex;\n justify-content: space-between;\n padding-top: 8px;\n `;\n\n const labelStyles = css`\n margin-right: 16px;\n `;\n\n const lowerBound = parseFloat(yAxisCategories[y]!);\n const upperBound = yAxisCategories[y + 1]\n ? parseFloat(yAxisCategories[y + 1]!)\n : parseFloat(yAxisCategories[y]!) + parseFloat(yAxisCategories[y]!) - parseFloat(yAxisCategories[y - 1]!); // Top cell, upper bound need to be calculated from previous cell\n\n return `\n <div>\n <div style=\"${tooltipHeader.styles}\">${formattedDate} ${formattedTime}</div>\n <div style=\"${tooltipContentStyles.styles}\">\n <div style=\"${labelStyles.styles}\">\n ${marker}\n <strong>${formatValue(lowerBound, yAxisFormat)} - ${formatValue(upperBound, yAxisFormat)}</strong>\n </div>\n <div>\n ${formatValue(parseFloat(label), countFormat)}\n </div>\n </div>\n </div>\n `;\n}\n"],"names":["css","getDateAndTime","formatValue","generateTooltipHTML","data","label","marker","xAxisCategories","yAxisCategories","theme","yAxisFormat","countFormat","x","y","xAxisLabel","formattedDate","formattedTime","tooltipHeader","palette","grey","tooltipContentStyles","labelStyles","lowerBound","parseFloat","upperBound","styles"],"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,SAASA,GAAG,QAAe,gBAAgB;AAC3C,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAAwBC,WAAW,QAAQ,mBAAmB;AAc9D,OAAO,SAASC,oBAAoB,EAClCC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,eAAe,EACfC,eAAe,EACfC,KAAK,EACLC,WAAW,EACXC,WAAW,EACQ;IACnB,MAAM,CAACC,GAAGC,EAAE,GAAGT;IACf,MAAMU,aAAaP,eAAe,CAACK,EAAE;IAErC,MAAM,EAAEG,aAAa,EAAEC,aAAa,EAAE,GAAGf,eAAea;IAExD,MAAMG,gBAAgBjB,GAAG,CAAC;6BACC,EAAES,MAAMS,OAAO,CAACC,IAAI,CAAC,IAAI,CAAC;;EAErD,CAAC;IAED,MAAMC,uBAAuBpB,GAAG,CAAC;;;;EAIjC,CAAC;IAED,MAAMqB,cAAcrB,GAAG,CAAC;;EAExB,CAAC;IAED,MAAMsB,aAAaC,WAAWf,eAAe,CAACK,EAAE;IAChD,MAAMW,aAAahB,eAAe,CAACK,IAAI,EAAE,GACrCU,WAAWf,eAAe,CAACK,IAAI,EAAE,IACjCU,WAAWf,eAAe,CAACK,EAAE,IAAKU,WAAWf,eAAe,CAACK,EAAE,IAAKU,WAAWf,eAAe,CAACK,IAAI,EAAE,GAAI,iEAAiE;IAE9K,OAAO,CAAC;;kBAEQ,EAAEI,cAAcQ,MAAM,CAAC,EAAE,EAAEV,cAAc,CAAC,EAAEC,cAAc;kBAC1D,EAAEI,qBAAqBK,MAAM,CAAC;oBAC5B,EAAEJ,YAAYI,MAAM,CAAC;UAC/B,EAAEnB,OAAO;kBACD,EAAEJ,YAAYoB,YAAYZ,aAAa,GAAG,EAAER,YAAYsB,YAAYd,aAAa;;;UAGzF,EAAER,YAAYqB,WAAWlB,QAAQM,aAAa;;;;EAItD,CAAC;AACH"}
1
+ {"version":3,"sources":["../../../src/components/HeatMapTooltip.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 { css, Theme } from '@mui/material';\nimport { getDateAndTime } from '@perses-dev/components';\nimport { FormatOptions, formatValue } from '@perses-dev/core';\nimport { HeatMapData } from './HeatMapChart';\n\ninterface CustomTooltipProps {\n data: HeatMapData;\n label: string;\n marker: string;\n xAxisCategories: number[];\n theme: Theme;\n yAxisFormat?: FormatOptions;\n countFormat?: FormatOptions;\n}\n\nexport function generateTooltipHTML({\n data,\n label,\n marker,\n xAxisCategories,\n theme,\n yAxisFormat,\n countFormat,\n}: CustomTooltipProps): string {\n const [xIndex, yLower, yUpper] = data;\n const xAxisLabel = xAxisCategories[xIndex];\n\n const { formattedDate, formattedTime } = getDateAndTime(xAxisLabel);\n\n const tooltipHeader = css`\n border-bottom: 1px solid ${theme.palette.grey[500]};\n padding-bottom: 8px;\n `;\n\n const tooltipContentStyles = css`\n display: flex;\n justify-content: space-between;\n padding-top: 8px;\n `;\n\n const labelStyles = css`\n margin-right: 16px;\n `;\n\n const lowerBound = yLower;\n const upperBound = yUpper;\n\n return `\n <div>\n <div style=\"${tooltipHeader.styles}\">${formattedDate} ${formattedTime}</div>\n <div style=\"${tooltipContentStyles.styles}\">\n <div style=\"${labelStyles.styles}\">\n ${marker}\n <strong>${formatValue(lowerBound, yAxisFormat)} - ${formatValue(upperBound, yAxisFormat)}</strong>\n </div>\n <div>\n ${formatValue(parseFloat(label), countFormat)}\n </div>\n </div>\n </div>\n `;\n}\n"],"names":["css","getDateAndTime","formatValue","generateTooltipHTML","data","label","marker","xAxisCategories","theme","yAxisFormat","countFormat","xIndex","yLower","yUpper","xAxisLabel","formattedDate","formattedTime","tooltipHeader","palette","grey","tooltipContentStyles","labelStyles","lowerBound","upperBound","styles","parseFloat"],"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,SAASA,GAAG,QAAe,gBAAgB;AAC3C,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAAwBC,WAAW,QAAQ,mBAAmB;AAa9D,OAAO,SAASC,oBAAoB,EAClCC,IAAI,EACJC,KAAK,EACLC,MAAM,EACNC,eAAe,EACfC,KAAK,EACLC,WAAW,EACXC,WAAW,EACQ;IACnB,MAAM,CAACC,QAAQC,QAAQC,OAAO,GAAGT;IACjC,MAAMU,aAAaP,eAAe,CAACI,OAAO;IAE1C,MAAM,EAAEI,aAAa,EAAEC,aAAa,EAAE,GAAGf,eAAea;IAExD,MAAMG,gBAAgBjB,GAAG,CAAC;6BACC,EAAEQ,MAAMU,OAAO,CAACC,IAAI,CAAC,IAAI,CAAC;;EAErD,CAAC;IAED,MAAMC,uBAAuBpB,GAAG,CAAC;;;;EAIjC,CAAC;IAED,MAAMqB,cAAcrB,GAAG,CAAC;;EAExB,CAAC;IAED,MAAMsB,aAAaV;IACnB,MAAMW,aAAaV;IAEnB,OAAO,CAAC;;kBAEQ,EAAEI,cAAcO,MAAM,CAAC,EAAE,EAAET,cAAc,CAAC,EAAEC,cAAc;kBAC1D,EAAEI,qBAAqBI,MAAM,CAAC;oBAC5B,EAAEH,YAAYG,MAAM,CAAC;UAC/B,EAAElB,OAAO;kBACD,EAAEJ,YAAYoB,YAAYb,aAAa,GAAG,EAAEP,YAAYqB,YAAYd,aAAa;;;UAGzF,EAAEP,YAAYuB,WAAWpB,QAAQK,aAAa;;;;EAItD,CAAC;AACH"}
@@ -5,6 +5,16 @@ export declare const DEFAULT_MIN_PERCENT = 0;
5
5
  export declare const DEFAULT_MAX_PERCENT = 100;
6
6
  export declare const DEFAULT_MIN_PERCENT_DECIMAL = 0;
7
7
  export declare const DEFAULT_MAX_PERCENT_DECIMAL = 1;
8
+ export type LOG_BASE = undefined | 2 | 10;
9
+ export declare const LOG_BASE_CONFIG: Record<string, {
10
+ label: string;
11
+ log: LOG_BASE;
12
+ }>;
13
+ export declare const LOG_BASE_OPTIONS: {
14
+ label: string;
15
+ log: LOG_BASE;
16
+ id: string;
17
+ }[];
8
18
  /**
9
19
  * The schema for a HeatMapChart panel.
10
20
  */
@@ -18,6 +28,9 @@ export interface HeatMapChartOptions {
18
28
  yAxisFormat?: FormatOptions;
19
29
  countFormat?: FormatOptions;
20
30
  showVisualMap?: boolean;
31
+ logBase?: LOG_BASE;
32
+ min?: number;
33
+ max?: number;
21
34
  }
22
35
  export type HeatMapChartOptionsEditorProps = OptionsEditorProps<HeatMapChartOptions>;
23
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"heat-map-chart-model.d.ts","sourceRoot":"","sources":["../../src/heat-map-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,eAAO,MAAM,cAAc,EAAE,aAAmC,CAAC;AACjE,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,UAAU,CAAC,mBAAmB,CAAC;IAC7E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;AAErF;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,mBAAmB,CAMtE"}
1
+ {"version":3,"file":"heat-map-chart-model.d.ts","sourceRoot":"","sources":["../../src/heat-map-chart-model.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,eAAO,MAAM,cAAc,EAAE,aAAmC,CAAC;AACjE,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC;AAE1C,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,QAAQ,CAAA;CAAE,CAI5E,CAAC;AAEF,eAAO,MAAM,gBAAgB;WANyB,MAAM;SAAO,QAAQ;QAO/D,MAAM;GAEf,CAAC;AAEJ;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,UAAU,CAAC,mBAAmB,CAAC;IAC7E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;AAErF;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,mBAAmB,CAMtE"}
@@ -17,6 +17,24 @@ export const DEFAULT_MIN_PERCENT = 0;
17
17
  export const DEFAULT_MAX_PERCENT = 100;
18
18
  export const DEFAULT_MIN_PERCENT_DECIMAL = 0;
19
19
  export const DEFAULT_MAX_PERCENT_DECIMAL = 1;
20
+ export const LOG_BASE_CONFIG = {
21
+ none: {
22
+ label: 'None',
23
+ log: undefined
24
+ },
25
+ '2': {
26
+ label: '2',
27
+ log: 2
28
+ },
29
+ '10': {
30
+ label: '10',
31
+ log: 10
32
+ }
33
+ };
34
+ export const LOG_BASE_OPTIONS = Object.entries(LOG_BASE_CONFIG).map(([id, config])=>({
35
+ id: id,
36
+ ...config
37
+ }));
20
38
  /**
21
39
  * Creates the initial/empty options for a HeatMapChart panel.
22
40
  */ export function createInitialHeatMapChartOptions() {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/heat-map-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 { Definition, FormatOptions } from '@perses-dev/core';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\n\nexport const DEFAULT_FORMAT: FormatOptions = { unit: 'decimal' };\nexport const DEFAULT_MIN_PERCENT = 0;\nexport const DEFAULT_MAX_PERCENT = 100;\nexport const DEFAULT_MIN_PERCENT_DECIMAL = 0;\nexport const DEFAULT_MAX_PERCENT_DECIMAL = 1;\n\n/**\n * The schema for a HeatMapChart panel.\n */\nexport interface HeatMapChartDefinition extends Definition<HeatMapChartOptions> {\n kind: 'HeatMapChart';\n}\n\n/**\n * The Options object type supported by the HeatMapChart panel plugin.\n */\nexport interface HeatMapChartOptions {\n yAxisFormat?: FormatOptions;\n countFormat?: FormatOptions;\n showVisualMap?: boolean;\n}\n\nexport type HeatMapChartOptionsEditorProps = OptionsEditorProps<HeatMapChartOptions>;\n\n/**\n * Creates the initial/empty options for a HeatMapChart panel.\n */\nexport function createInitialHeatMapChartOptions(): HeatMapChartOptions {\n return {\n yAxisFormat: DEFAULT_FORMAT,\n countFormat: DEFAULT_FORMAT,\n showVisualMap: true,\n };\n}\n"],"names":["DEFAULT_FORMAT","unit","DEFAULT_MIN_PERCENT","DEFAULT_MAX_PERCENT","DEFAULT_MIN_PERCENT_DECIMAL","DEFAULT_MAX_PERCENT_DECIMAL","createInitialHeatMapChartOptions","yAxisFormat","countFormat","showVisualMap"],"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;AAKjC,OAAO,MAAMA,iBAAgC;IAAEC,MAAM;AAAU,EAAE;AACjE,OAAO,MAAMC,sBAAsB,EAAE;AACrC,OAAO,MAAMC,sBAAsB,IAAI;AACvC,OAAO,MAAMC,8BAA8B,EAAE;AAC7C,OAAO,MAAMC,8BAA8B,EAAE;AAoB7C;;CAEC,GACD,OAAO,SAASC;IACd,OAAO;QACLC,aAAaP;QACbQ,aAAaR;QACbS,eAAe;IACjB;AACF"}
1
+ {"version":3,"sources":["../../src/heat-map-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 { Definition, FormatOptions } from '@perses-dev/core';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\n\nexport const DEFAULT_FORMAT: FormatOptions = { unit: 'decimal' };\nexport const DEFAULT_MIN_PERCENT = 0;\nexport const DEFAULT_MAX_PERCENT = 100;\nexport const DEFAULT_MIN_PERCENT_DECIMAL = 0;\nexport const DEFAULT_MAX_PERCENT_DECIMAL = 1;\n\nexport type LOG_BASE = undefined | 2 | 10;\n\nexport const LOG_BASE_CONFIG: Record<string, { label: string; log: LOG_BASE }> = {\n none: { label: 'None', log: undefined },\n '2': { label: '2', log: 2 },\n '10': { label: '10', log: 10 },\n};\n\nexport const LOG_BASE_OPTIONS = Object.entries(LOG_BASE_CONFIG).map(([id, config]) => ({\n id: id as string,\n ...config,\n}));\n\n/**\n * The schema for a HeatMapChart panel.\n */\nexport interface HeatMapChartDefinition extends Definition<HeatMapChartOptions> {\n kind: 'HeatMapChart';\n}\n\n/**\n * The Options object type supported by the HeatMapChart panel plugin.\n */\nexport interface HeatMapChartOptions {\n yAxisFormat?: FormatOptions;\n countFormat?: FormatOptions;\n showVisualMap?: boolean;\n logBase?: LOG_BASE;\n min?: number;\n max?: number;\n}\n\nexport type HeatMapChartOptionsEditorProps = OptionsEditorProps<HeatMapChartOptions>;\n\n/**\n * Creates the initial/empty options for a HeatMapChart panel.\n */\nexport function createInitialHeatMapChartOptions(): HeatMapChartOptions {\n return {\n yAxisFormat: DEFAULT_FORMAT,\n countFormat: DEFAULT_FORMAT,\n showVisualMap: true,\n };\n}\n"],"names":["DEFAULT_FORMAT","unit","DEFAULT_MIN_PERCENT","DEFAULT_MAX_PERCENT","DEFAULT_MIN_PERCENT_DECIMAL","DEFAULT_MAX_PERCENT_DECIMAL","LOG_BASE_CONFIG","none","label","log","undefined","LOG_BASE_OPTIONS","Object","entries","map","id","config","createInitialHeatMapChartOptions","yAxisFormat","countFormat","showVisualMap"],"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;AAKjC,OAAO,MAAMA,iBAAgC;IAAEC,MAAM;AAAU,EAAE;AACjE,OAAO,MAAMC,sBAAsB,EAAE;AACrC,OAAO,MAAMC,sBAAsB,IAAI;AACvC,OAAO,MAAMC,8BAA8B,EAAE;AAC7C,OAAO,MAAMC,8BAA8B,EAAE;AAI7C,OAAO,MAAMC,kBAAoE;IAC/EC,MAAM;QAAEC,OAAO;QAAQC,KAAKC;IAAU;IACtC,KAAK;QAAEF,OAAO;QAAKC,KAAK;IAAE;IAC1B,MAAM;QAAED,OAAO;QAAMC,KAAK;IAAG;AAC/B,EAAE;AAEF,OAAO,MAAME,mBAAmBC,OAAOC,OAAO,CAACP,iBAAiBQ,GAAG,CAAC,CAAC,CAACC,IAAIC,OAAO,GAAM,CAAA;QACrFD,IAAIA;QACJ,GAAGC,MAAM;IACX,CAAA,GAAI;AAuBJ;;CAEC,GACD,OAAO,SAASC;IACd,OAAO;QACLC,aAAalB;QACbmB,aAAanB;QACboB,eAAe;IACjB;AACF"}
package/mf-manifest.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "HeatMapChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.4.0-rc.1",
8
+ "buildVersion": "0.4.1",
9
9
  "buildName": "@perses-dev/heatmap-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/HeatMapChart.3d6939cb.js",
12
+ "name": "__mf/js/HeatMapChart.9e89e9fc.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -28,14 +28,14 @@
28
28
  {
29
29
  "id": "HeatMapChart:@perses-dev/components",
30
30
  "name": "@perses-dev/components",
31
- "version": "0.53.0-rc.2",
31
+ "version": "0.53.1",
32
32
  "singleton": true,
33
- "requiredVersion": "^0.53.0-rc.2",
33
+ "requiredVersion": "^0.53.1",
34
34
  "assets": {
35
35
  "js": {
36
36
  "async": [],
37
37
  "sync": [
38
- "__mf/js/async/983.84770ead.js"
38
+ "__mf/js/async/631.8bf555e3.js"
39
39
  ]
40
40
  },
41
41
  "css": {
@@ -47,14 +47,14 @@
47
47
  {
48
48
  "id": "HeatMapChart:@perses-dev/core",
49
49
  "name": "@perses-dev/core",
50
- "version": "0.53.0-rc.0",
50
+ "version": "0.53.0",
51
51
  "singleton": true,
52
- "requiredVersion": "^0.53.0-rc.0",
52
+ "requiredVersion": "^0.53.0",
53
53
  "assets": {
54
54
  "js": {
55
55
  "async": [],
56
56
  "sync": [
57
- "__mf/js/async/12.6b37fcc7.js"
57
+ "__mf/js/async/12.4ae967ba.js"
58
58
  ]
59
59
  },
60
60
  "css": {
@@ -85,14 +85,14 @@
85
85
  {
86
86
  "id": "HeatMapChart:lodash",
87
87
  "name": "lodash",
88
- "version": "4.17.21",
88
+ "version": "4.17.23",
89
89
  "singleton": true,
90
- "requiredVersion": "^4.17.21",
90
+ "requiredVersion": "^4.17.23",
91
91
  "assets": {
92
92
  "js": {
93
93
  "async": [],
94
94
  "sync": [
95
- "__mf/js/async/392.de783cd4.js"
95
+ "__mf/js/async/392.81aab132.js"
96
96
  ]
97
97
  },
98
98
  "css": {
@@ -148,8 +148,8 @@
148
148
  "assets": {
149
149
  "js": {
150
150
  "sync": [
151
- "__mf/js/async/700.a5530423.js",
152
- "__mf/js/async/__federation_expose_HeatMapChart.158cef2e.js"
151
+ "__mf/js/async/980.092bc51a.js",
152
+ "__mf/js/async/__federation_expose_HeatMapChart.142ce29b.js"
153
153
  ],
154
154
  "async": [
155
155
  "__mf/js/async/888.944e0384.js"
package/mf-stats.json CHANGED
@@ -5,11 +5,11 @@
5
5
  "name": "HeatMapChart",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "0.4.0-rc.1",
8
+ "buildVersion": "0.4.1",
9
9
  "buildName": "@perses-dev/heatmap-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/HeatMapChart.3d6939cb.js",
12
+ "name": "__mf/js/HeatMapChart.9e89e9fc.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -27,17 +27,17 @@
27
27
  "shared": [
28
28
  {
29
29
  "singleton": true,
30
- "requiredVersion": "^0.53.0-rc.2",
30
+ "requiredVersion": "^0.53.1",
31
31
  "shareScope": "default",
32
32
  "name": "@perses-dev/components",
33
- "version": "0.53.0-rc.2",
33
+ "version": "0.53.1",
34
34
  "eager": false,
35
35
  "id": "HeatMapChart:@perses-dev/components",
36
36
  "assets": {
37
37
  "js": {
38
38
  "async": [],
39
39
  "sync": [
40
- "__mf/js/async/983.84770ead.js"
40
+ "__mf/js/async/631.8bf555e3.js"
41
41
  ]
42
42
  },
43
43
  "css": {
@@ -51,17 +51,17 @@
51
51
  },
52
52
  {
53
53
  "singleton": true,
54
- "requiredVersion": "^0.53.0-rc.0",
54
+ "requiredVersion": "^0.53.0",
55
55
  "shareScope": "default",
56
56
  "name": "@perses-dev/core",
57
- "version": "0.53.0-rc.0",
57
+ "version": "0.53.0",
58
58
  "eager": false,
59
59
  "id": "HeatMapChart:@perses-dev/core",
60
60
  "assets": {
61
61
  "js": {
62
62
  "async": [],
63
63
  "sync": [
64
- "__mf/js/async/12.6b37fcc7.js"
64
+ "__mf/js/async/12.4ae967ba.js"
65
65
  ]
66
66
  },
67
67
  "css": {
@@ -99,17 +99,17 @@
99
99
  },
100
100
  {
101
101
  "singleton": true,
102
- "requiredVersion": "^4.17.21",
102
+ "requiredVersion": "^4.17.23",
103
103
  "shareScope": "default",
104
104
  "name": "lodash",
105
- "version": "4.17.21",
105
+ "version": "4.17.23",
106
106
  "eager": false,
107
107
  "id": "HeatMapChart:lodash",
108
108
  "assets": {
109
109
  "js": {
110
110
  "async": [],
111
111
  "sync": [
112
- "__mf/js/async/392.de783cd4.js"
112
+ "__mf/js/async/392.81aab132.js"
113
113
  ]
114
114
  },
115
115
  "css": {
@@ -182,8 +182,8 @@
182
182
  "assets": {
183
183
  "js": {
184
184
  "sync": [
185
- "__mf/js/async/700.a5530423.js",
186
- "__mf/js/async/__federation_expose_HeatMapChart.158cef2e.js"
185
+ "__mf/js/async/980.092bc51a.js",
186
+ "__mf/js/async/__federation_expose_HeatMapChart.142ce29b.js"
187
187
  ],
188
188
  "async": [
189
189
  "__mf/js/async/888.944e0384.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/heatmap-chart-plugin",
3
- "version": "0.4.0-rc.1",
3
+ "version": "0.4.1",
4
4
  "homepage": "https://github.com/perses/plugins/blob/main/README.md",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,9 +24,9 @@
24
24
  "module": "lib/index.js",
25
25
  "types": "lib/index.d.ts",
26
26
  "peerDependencies": {
27
- "@perses-dev/components": "^0.53.0-rc.2",
28
- "@perses-dev/core": "^0.53.0-rc.0",
29
- "@perses-dev/plugin-system": "^0.53.0-rc.2",
27
+ "@perses-dev/components": "^0.53.1",
28
+ "@perses-dev/core": "^0.53.0",
29
+ "@perses-dev/plugin-system": "^0.53.1",
30
30
  "echarts": "5.5.0",
31
31
  "lodash": "^4.17.21",
32
32
  "react": "^17.0.2 || ^18.0.0",