@perses-dev/heatmap-chart-plugin 0.4.0 → 0.5.0-beta.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 (159) hide show
  1. package/__mf/css/async/985.85c2cbf6.css +1 -0
  2. package/__mf/font/inter-cyrillic-300-normal.432f2b21.woff +0 -0
  3. package/__mf/font/inter-cyrillic-300-normal.9da91009.woff2 +0 -0
  4. package/__mf/font/inter-cyrillic-400-normal.372704ff.woff2 +0 -0
  5. package/__mf/font/inter-cyrillic-400-normal.a6b6ef6f.woff +0 -0
  6. package/__mf/font/inter-cyrillic-500-normal.7c15bba8.woff2 +0 -0
  7. package/__mf/font/inter-cyrillic-500-normal.b9f8c929.woff +0 -0
  8. package/__mf/font/inter-cyrillic-600-normal.2f42892a.woff2 +0 -0
  9. package/__mf/font/inter-cyrillic-600-normal.c3987adc.woff +0 -0
  10. package/__mf/font/inter-cyrillic-700-normal.93eba3c3.woff +0 -0
  11. package/__mf/font/inter-cyrillic-700-normal.e9e5b2dc.woff2 +0 -0
  12. package/__mf/font/inter-cyrillic-900-normal.f285bd7a.woff2 +0 -0
  13. package/__mf/font/inter-cyrillic-900-normal.ffbd8a3a.woff +0 -0
  14. package/__mf/font/inter-cyrillic-ext-300-normal.95bb9038.woff2 +0 -0
  15. package/__mf/font/inter-cyrillic-ext-300-normal.cfc143a9.woff +0 -0
  16. package/__mf/font/inter-cyrillic-ext-400-normal.2a31c04b.woff +0 -0
  17. package/__mf/font/inter-cyrillic-ext-400-normal.f572b170.woff2 +0 -0
  18. package/__mf/font/inter-cyrillic-ext-500-normal.5a6bb1da.woff +0 -0
  19. package/__mf/font/inter-cyrillic-ext-500-normal.fe0d9b14.woff2 +0 -0
  20. package/__mf/font/inter-cyrillic-ext-600-normal.ecbdecad.woff +0 -0
  21. package/__mf/font/inter-cyrillic-ext-600-normal.f7b3c15b.woff2 +0 -0
  22. package/__mf/font/inter-cyrillic-ext-700-normal.4b4022a6.woff +0 -0
  23. package/__mf/font/inter-cyrillic-ext-700-normal.74b516d2.woff2 +0 -0
  24. package/__mf/font/inter-cyrillic-ext-900-normal.9970ddb5.woff +0 -0
  25. package/__mf/font/inter-cyrillic-ext-900-normal.a0d59adc.woff2 +0 -0
  26. package/__mf/font/inter-greek-300-normal.0d7be683.woff2 +0 -0
  27. package/__mf/font/inter-greek-300-normal.8f0b988e.woff +0 -0
  28. package/__mf/font/inter-greek-400-normal.cc58c11b.woff +0 -0
  29. package/__mf/font/inter-greek-400-normal.d7020e3c.woff2 +0 -0
  30. package/__mf/font/inter-greek-500-normal.d9a33207.woff +0 -0
  31. package/__mf/font/inter-greek-500-normal.f41f43db.woff2 +0 -0
  32. package/__mf/font/inter-greek-600-normal.4ec0c1c1.woff +0 -0
  33. package/__mf/font/inter-greek-600-normal.cc532937.woff2 +0 -0
  34. package/__mf/font/inter-greek-700-normal.5ec6c758.woff +0 -0
  35. package/__mf/font/inter-greek-700-normal.97f0eeeb.woff2 +0 -0
  36. package/__mf/font/inter-greek-900-normal.46b66369.woff2 +0 -0
  37. package/__mf/font/inter-greek-900-normal.9ae3a3c5.woff +0 -0
  38. package/__mf/font/inter-greek-ext-300-normal.10247a66.woff2 +0 -0
  39. package/__mf/font/inter-greek-ext-300-normal.4668e5cb.woff +0 -0
  40. package/__mf/font/inter-greek-ext-400-normal.4ce1df5d.woff2 +0 -0
  41. package/__mf/font/inter-greek-ext-400-normal.88ede1ea.woff +0 -0
  42. package/__mf/font/inter-greek-ext-500-normal.7a4aa726.woff +0 -0
  43. package/__mf/font/inter-greek-ext-500-normal.cbd51e2d.woff2 +0 -0
  44. package/__mf/font/inter-greek-ext-600-normal.089a95ee.woff +0 -0
  45. package/__mf/font/inter-greek-ext-600-normal.1f33d317.woff2 +0 -0
  46. package/__mf/font/inter-greek-ext-700-normal.31f1075d.woff +0 -0
  47. package/__mf/font/inter-greek-ext-700-normal.827cd618.woff2 +0 -0
  48. package/__mf/font/inter-greek-ext-900-normal.531bcee7.woff +0 -0
  49. package/__mf/font/inter-greek-ext-900-normal.8a9b36b9.woff2 +0 -0
  50. package/__mf/font/inter-latin-300-normal.15fb600d.woff2 +0 -0
  51. package/__mf/font/inter-latin-300-normal.6f95f590.woff +0 -0
  52. package/__mf/font/inter-latin-400-normal.2c7a775c.woff +0 -0
  53. package/__mf/font/inter-latin-400-normal.ef6d3f52.woff2 +0 -0
  54. package/__mf/font/inter-latin-500-normal.b7b43ace.woff2 +0 -0
  55. package/__mf/font/inter-latin-500-normal.cb4c8ceb.woff +0 -0
  56. package/__mf/font/inter-latin-600-normal.8fb1a964.woff2 +0 -0
  57. package/__mf/font/inter-latin-600-normal.ce0f5f43.woff +0 -0
  58. package/__mf/font/inter-latin-700-normal.953b7aa5.woff2 +0 -0
  59. package/__mf/font/inter-latin-700-normal.9c21d4dc.woff +0 -0
  60. package/__mf/font/inter-latin-900-normal.2a8028ec.woff2 +0 -0
  61. package/__mf/font/inter-latin-900-normal.fa252135.woff +0 -0
  62. package/__mf/font/inter-latin-ext-300-normal.167cc8c9.woff2 +0 -0
  63. package/__mf/font/inter-latin-ext-300-normal.f695be66.woff +0 -0
  64. package/__mf/font/inter-latin-ext-400-normal.32a25442.woff2 +0 -0
  65. package/__mf/font/inter-latin-ext-400-normal.4edcaace.woff +0 -0
  66. package/__mf/font/inter-latin-ext-500-normal.a19a84a6.woff +0 -0
  67. package/__mf/font/inter-latin-ext-500-normal.d9b491de.woff2 +0 -0
  68. package/__mf/font/inter-latin-ext-600-normal.38b075d8.woff2 +0 -0
  69. package/__mf/font/inter-latin-ext-600-normal.49faa47a.woff +0 -0
  70. package/__mf/font/inter-latin-ext-700-normal.93534b50.woff +0 -0
  71. package/__mf/font/inter-latin-ext-700-normal.b63daa1a.woff2 +0 -0
  72. package/__mf/font/inter-latin-ext-900-normal.0efdb307.woff +0 -0
  73. package/__mf/font/inter-latin-ext-900-normal.9c0fc2c7.woff2 +0 -0
  74. package/__mf/font/inter-vietnamese-300-normal.aad496d8.woff +0 -0
  75. package/__mf/font/inter-vietnamese-300-normal.ad9ef503.woff2 +0 -0
  76. package/__mf/font/inter-vietnamese-400-normal.a9dd2faf.woff +0 -0
  77. package/__mf/font/inter-vietnamese-400-normal.de4fc44f.woff2 +0 -0
  78. package/__mf/font/inter-vietnamese-500-normal.7c0a695f.woff2 +0 -0
  79. package/__mf/font/inter-vietnamese-500-normal.a3a73b95.woff +0 -0
  80. package/__mf/font/inter-vietnamese-600-normal.9d518599.woff2 +0 -0
  81. package/__mf/font/inter-vietnamese-600-normal.c5ce3fcb.woff +0 -0
  82. package/__mf/font/inter-vietnamese-700-normal.bc68b199.woff +0 -0
  83. package/__mf/font/inter-vietnamese-700-normal.faf12809.woff2 +0 -0
  84. package/__mf/font/inter-vietnamese-900-normal.2b782045.woff +0 -0
  85. package/__mf/font/inter-vietnamese-900-normal.e639b65a.woff2 +0 -0
  86. package/__mf/js/HeatMapChart.4fa11415.js +7 -0
  87. package/__mf/js/async/{121.8ac14a6e.js → 121.b18ceb80.js} +2 -2
  88. package/__mf/js/async/39.d342865a.js +1 -0
  89. package/__mf/js/async/392.0f59f214.js +2 -0
  90. package/__mf/js/async/470.399d3ba9.js +2 -0
  91. package/__mf/js/async/888.1c9d2db3.js +1 -0
  92. package/__mf/js/async/941.a8fee60a.js +2 -0
  93. package/__mf/js/async/963.f3d8b714.js +1 -0
  94. package/__mf/js/async/980.2f9fb38d.js +83 -0
  95. package/__mf/js/async/{980.092bc51a.js.LICENSE.txt → 980.2f9fb38d.js.LICENSE.txt} +1 -1
  96. package/__mf/js/async/985.b6f73a36.js +71 -0
  97. package/__mf/js/async/{12.4ae967ba.js.LICENSE.txt → 985.b6f73a36.js.LICENSE.txt} +42 -2
  98. package/__mf/js/async/__federation_expose_HeatMapChart.47fd43fd.js +23 -0
  99. package/__mf/js/main.547a87d5.js +7 -0
  100. package/lib/cjs/components/HeatMapChart.js +3 -4
  101. package/lib/cjs/components/HeatMapChartPanel.js +1 -1
  102. package/lib/cjs/components/HeatMapTooltip.js +2 -3
  103. package/lib/cjs/utils/data-transform.js +2 -2
  104. package/lib/components/HeatMapChart.d.ts +2 -1
  105. package/lib/components/HeatMapChart.d.ts.map +1 -1
  106. package/lib/components/HeatMapChart.js +1 -2
  107. package/lib/components/HeatMapChart.js.map +1 -1
  108. package/lib/components/HeatMapChartPanel.d.ts +1 -1
  109. package/lib/components/HeatMapChartPanel.d.ts.map +1 -1
  110. package/lib/components/HeatMapChartPanel.js +1 -1
  111. package/lib/components/HeatMapChartPanel.js.map +1 -1
  112. package/lib/components/HeatMapTooltip.d.ts +1 -1
  113. package/lib/components/HeatMapTooltip.d.ts.map +1 -1
  114. package/lib/components/HeatMapTooltip.js +1 -2
  115. package/lib/components/HeatMapTooltip.js.map +1 -1
  116. package/lib/heat-map-chart-model.d.ts +2 -1
  117. package/lib/heat-map-chart-model.d.ts.map +1 -1
  118. package/lib/heat-map-chart-model.js.map +1 -1
  119. package/lib/utils/data-transform.d.ts +1 -1
  120. package/lib/utils/data-transform.d.ts.map +1 -1
  121. package/lib/utils/data-transform.js +1 -1
  122. package/lib/utils/data-transform.js.map +1 -1
  123. package/lib/utils/thresholds.d.ts +1 -2
  124. package/lib/utils/thresholds.d.ts.map +1 -1
  125. package/lib/utils/thresholds.js.map +1 -1
  126. package/mf-manifest.json +38 -33
  127. package/mf-stats.json +45 -37
  128. package/package.json +4 -4
  129. package/__mf/css/async/442.d3010b86.css +0 -1
  130. package/__mf/css/async/61.d3010b86.css +0 -1
  131. package/__mf/font/lato-all-300-normal.322bdf14.woff +0 -0
  132. package/__mf/font/lato-all-400-normal.63513b00.woff +0 -0
  133. package/__mf/font/lato-all-700-normal.bb27db94.woff +0 -0
  134. package/__mf/font/lato-all-900-normal.a27049a3.woff +0 -0
  135. package/__mf/font/lato-latin-300-normal.c5195215.woff2 +0 -0
  136. package/__mf/font/lato-latin-400-normal.b7ffde23.woff2 +0 -0
  137. package/__mf/font/lato-latin-700-normal.d5eb20bc.woff2 +0 -0
  138. package/__mf/font/lato-latin-900-normal.d884a71c.woff2 +0 -0
  139. package/__mf/font/lato-latin-ext-300-normal.abcc64a9.woff2 +0 -0
  140. package/__mf/font/lato-latin-ext-400-normal.6ebed106.woff2 +0 -0
  141. package/__mf/font/lato-latin-ext-700-normal.8697d1d5.woff2 +0 -0
  142. package/__mf/font/lato-latin-ext-900-normal.20a2b415.woff2 +0 -0
  143. package/__mf/js/HeatMapChart.a5f52cc0.js +0 -6
  144. package/__mf/js/async/12.4ae967ba.js +0 -2
  145. package/__mf/js/async/180.c67f24c4.js +0 -71
  146. package/__mf/js/async/180.c67f24c4.js.LICENSE.txt +0 -21
  147. package/__mf/js/async/392.81aab132.js +0 -2
  148. package/__mf/js/async/470.6889fffa.js +0 -2
  149. package/__mf/js/async/65.b8155b50.js +0 -1
  150. package/__mf/js/async/888.944e0384.js +0 -1
  151. package/__mf/js/async/941.05360f3e.js +0 -2
  152. package/__mf/js/async/963.6eed3d33.js +0 -1
  153. package/__mf/js/async/980.092bc51a.js +0 -83
  154. package/__mf/js/async/__federation_expose_HeatMapChart.c74c73d1.js +0 -23
  155. package/__mf/js/main.69b7f04b.js +0 -6
  156. /package/__mf/js/async/{121.8ac14a6e.js.LICENSE.txt → 121.b18ceb80.js.LICENSE.txt} +0 -0
  157. /package/__mf/js/async/{392.81aab132.js.LICENSE.txt → 392.0f59f214.js.LICENSE.txt} +0 -0
  158. /package/__mf/js/async/{470.6889fffa.js.LICENSE.txt → 470.399d3ba9.js.LICENSE.txt} +0 -0
  159. /package/__mf/js/async/{941.05360f3e.js.LICENSE.txt → 941.a8fee60a.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/HeatMapChartPanel.tsx"],"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 { Stack, Typography } from '@mui/material';\nimport { TimeScale, TimeSeries, TimeSeriesData } from '@perses-dev/core';\nimport { PanelProps } from '@perses-dev/plugin-system';\nimport merge from 'lodash/merge';\nimport { ReactElement, useMemo } from 'react';\nimport { DEFAULT_FORMAT, HeatMapChartOptions, LOG_BASE } from '../heat-map-chart-model';\nimport { generateCompleteTimestamps, getCommonTimeScaleForQueries } from '../utils';\nimport { HeatMapChart, HeatMapDataItem } from './HeatMapChart';\n\n/**\n * Helper function to get the effective lower bound for log scale.\n * For values <= 0, we use a small fraction of the upper bound.\n */\nconst getEffectiveLowerBound = (lowerBound: number, upperBound: number, logBase: LOG_BASE): number => {\n if (logBase === undefined || lowerBound > 0) {\n return lowerBound;\n }\n // For log scales with non-positive lower bounds, use a small fraction of upper bound\n // This ensures the bucket is still visible on the log scale\n return upperBound * 0.001;\n};\n\nexport type HeatMapChartPanelProps = PanelProps<HeatMapChartOptions, TimeSeriesData>;\n\nexport function HeatMapChartPanel(props: HeatMapChartPanelProps): ReactElement | null {\n const { spec: pluginSpec, contentDimensions, queryResults } = props;\n\n // ensures all default format properties set if undef\n const yAxisFormat = merge({}, DEFAULT_FORMAT, pluginSpec.yAxisFormat);\n const countFormat = merge({}, DEFAULT_FORMAT, pluginSpec.countFormat);\n\n const {\n data,\n xAxisCategories,\n min,\n max,\n countMin,\n countMax,\n timeScale,\n }: {\n data: HeatMapDataItem[];\n xAxisCategories: number[];\n min?: number;\n max?: number;\n countMin: number;\n countMax: number;\n timeScale?: TimeScale;\n } = useMemo(() => {\n if (!queryResults || queryResults.length === 0) {\n return {\n data: [],\n xAxisCategories: [],\n min: 0,\n max: 0,\n countMin: 0,\n countMax: 0,\n timeScale: undefined,\n };\n }\n\n if (\n queryResults.length != 1 ||\n queryResults[0]!.data.series.length != 1 ||\n queryResults[0]!.data.series[0]!.histograms === undefined\n ) {\n return {\n data: [],\n xAxisCategories: [],\n min: 0,\n max: 0,\n countMin: 0,\n countMax: 0,\n timeScale: undefined,\n };\n }\n\n const series: TimeSeries = queryResults[0]!.data.series[0]!;\n\n const timeScale = getCommonTimeScaleForQueries(queryResults);\n const xAxisCategories: number[] = generateCompleteTimestamps(timeScale);\n\n const logBase = pluginSpec.logBase;\n\n // Dummy value that will be replaced at the first iteration\n let lowestBound = Infinity;\n let highestBound = -Infinity;\n let countMin = Infinity;\n let countMax = -Infinity;\n\n for (const [, histogram] of series?.histograms ?? []) {\n for (const bucket of histogram?.buckets ?? []) {\n const [, lowerBound, upperBound, count] = bucket;\n let lowerBoundFloat = parseFloat(lowerBound);\n const upperBoundFloat = parseFloat(upperBound);\n const countFloat = parseFloat(count);\n\n // For logarithmic scales, skip buckets that would be entirely non-positive\n if (logBase !== undefined && upperBoundFloat <= 0) {\n continue;\n }\n\n // For log scales, adjust non-positive lower bounds\n if (logBase !== undefined) {\n lowerBoundFloat = getEffectiveLowerBound(lowerBoundFloat, upperBoundFloat, logBase);\n }\n\n if (lowerBoundFloat < lowestBound) {\n lowestBound = lowerBoundFloat;\n }\n if (upperBoundFloat > highestBound) {\n highestBound = upperBoundFloat;\n }\n if (countFloat < countMin) {\n countMin = countFloat;\n }\n if (countFloat > countMax) {\n countMax = countFloat;\n }\n }\n }\n\n const data: HeatMapDataItem[] = [];\n // Each bucket becomes a rectangle spanning [lowerBound, upperBound] at the given x index\n for (const [time, histogram] of series?.histograms ?? []) {\n const itemIndexOnXaxis = xAxisCategories.findIndex((v) => v === time * 1000);\n\n for (const bucket of histogram?.buckets ?? []) {\n const [, lowerBound, upperBound, count] = bucket;\n let lowerBoundFloat = parseFloat(lowerBound);\n const upperBoundFloat = parseFloat(upperBound);\n\n // For logarithmic scales, skip buckets that would be entirely non-positive\n if (logBase !== undefined && upperBoundFloat <= 0) {\n continue;\n }\n\n // For log scales, adjust non-positive lower bounds\n if (logBase !== undefined) {\n lowerBoundFloat = getEffectiveLowerBound(lowerBoundFloat, upperBoundFloat, logBase);\n }\n\n data.push({\n value: [itemIndexOnXaxis, lowerBoundFloat, upperBoundFloat, parseFloat(count)],\n label: count,\n });\n }\n }\n return {\n data,\n xAxisCategories,\n min: lowestBound === Infinity ? undefined : lowestBound,\n max: highestBound === -Infinity ? undefined : highestBound,\n countMin,\n countMax,\n timeScale,\n };\n }, [pluginSpec.logBase, queryResults]);\n\n // Use configured min/max if provided, otherwise use calculated values\n // For logarithmic scales, ignore user-provided min if it's <= 0 (log of non-positive is undefined)\n // and let ECharts auto-calculate the range to avoid rendering issues\n const finalMin = useMemo(() => {\n if (pluginSpec.logBase !== undefined) {\n // For log scale, ignore min if it's <= 0 or let ECharts auto-calculate\n if (pluginSpec.min !== undefined && pluginSpec.min <= 0) {\n return undefined; // Let ECharts auto-calculate\n }\n return pluginSpec.min ?? min;\n }\n return pluginSpec.min ?? min;\n }, [pluginSpec.logBase, pluginSpec.min, min]);\n\n const finalMax = useMemo(() => {\n if (pluginSpec.logBase !== undefined) {\n // For log scale, ignore max if it's <= 0\n if (pluginSpec.max !== undefined && pluginSpec.max <= 0) {\n return undefined; // Let ECharts auto-calculate\n }\n return pluginSpec.max ?? max;\n }\n return pluginSpec.max ?? max;\n }, [pluginSpec.logBase, pluginSpec.max, max]);\n\n // TODO: add support for multiple queries\n if (queryResults.length > 1) {\n return (\n <Stack justifyContent=\"center\" height=\"100%\">\n <Typography variant=\"body2\" textAlign=\"center\">\n Only one query at a time is supported for now\n </Typography>\n </Stack>\n );\n }\n\n // Mo data message handled inside chart component\n if (data.length === 0) {\n return (\n <Stack justifyContent=\"center\" height=\"100%\">\n <Typography variant=\"body2\" textAlign=\"center\">\n No data available (only native histograms are supported for now)\n </Typography>\n </Stack>\n );\n }\n\n if (contentDimensions === undefined) return null;\n\n return (\n <Stack direction=\"row\" justifyContent=\"center\" alignItems=\"center\">\n <HeatMapChart\n width={contentDimensions.width}\n height={contentDimensions.height}\n data={data}\n xAxisCategories={xAxisCategories}\n yAxisFormat={yAxisFormat}\n countFormat={countFormat}\n countMin={countMin}\n countMax={countMax}\n timeScale={timeScale}\n showVisualMap={pluginSpec.showVisualMap}\n min={finalMin}\n max={finalMax}\n logBase={pluginSpec.logBase}\n />\n </Stack>\n );\n}\n"],"names":["Stack","Typography","merge","useMemo","DEFAULT_FORMAT","generateCompleteTimestamps","getCommonTimeScaleForQueries","HeatMapChart","getEffectiveLowerBound","lowerBound","upperBound","logBase","undefined","HeatMapChartPanel","props","spec","pluginSpec","contentDimensions","queryResults","yAxisFormat","countFormat","data","xAxisCategories","min","max","countMin","countMax","timeScale","length","series","histograms","lowestBound","Infinity","highestBound","histogram","bucket","buckets","count","lowerBoundFloat","parseFloat","upperBoundFloat","countFloat","time","itemIndexOnXaxis","findIndex","v","push","value","label","finalMin","finalMax","justifyContent","height","variant","textAlign","direction","alignItems","width","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;AAEjC,SAASA,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AAGlD,OAAOC,WAAW,eAAe;AACjC,SAAuBC,OAAO,QAAQ,QAAQ;AAC9C,SAASC,cAAc,QAAuC,0BAA0B;AACxF,SAASC,0BAA0B,EAAEC,4BAA4B,QAAQ,WAAW;AACpF,SAASC,YAAY,QAAyB,iBAAiB;AAE/D;;;CAGC,GACD,MAAMC,yBAAyB,CAACC,YAAoBC,YAAoBC;IACtE,IAAIA,YAAYC,aAAaH,aAAa,GAAG;QAC3C,OAAOA;IACT;IACA,qFAAqF;IACrF,4DAA4D;IAC5D,OAAOC,aAAa;AACtB;AAIA,OAAO,SAASG,kBAAkBC,KAA6B;IAC7D,MAAM,EAAEC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AAO;IAE5C,qBACE,KAACZ;QAAMuD,WAAU;QAAMJ,gBAAe;QAASK,YAAW;kBACxD,cAAA,KAACjD;YACCkD,OAAOxC,kBAAkBwC,KAAK;YAC9BL,QAAQnC,kBAAkBmC,MAAM;YAChC/B,MAAMA;YACNC,iBAAiBA;YACjBH,aAAaA;YACbC,aAAaA;YACbK,UAAUA;YACVC,UAAUA;YACVC,WAAWA;YACX+B,eAAe1C,WAAW0C,aAAa;YACvCnC,KAAK0B;YACLzB,KAAK0B;YACLvC,SAASK,WAAWL,OAAO;;;AAInC"}
1
+ {"version":3,"sources":["../../../src/components/HeatMapChartPanel.tsx"],"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 { Stack, Typography } from '@mui/material';\nimport { PanelProps } from '@perses-dev/plugin-system';\nimport merge from 'lodash/merge';\nimport { ReactElement, useMemo } from 'react';\nimport { TimeScale, TimeSeries, TimeSeriesData } from '@perses-dev/spec';\nimport { DEFAULT_FORMAT, HeatMapChartOptions, LOG_BASE } from '../heat-map-chart-model';\nimport { generateCompleteTimestamps, getCommonTimeScaleForQueries } from '../utils';\nimport { HeatMapChart, HeatMapDataItem } from './HeatMapChart';\n\n/**\n * Helper function to get the effective lower bound for log scale.\n * For values <= 0, we use a small fraction of the upper bound.\n */\nconst getEffectiveLowerBound = (lowerBound: number, upperBound: number, logBase: LOG_BASE): number => {\n if (logBase === undefined || lowerBound > 0) {\n return lowerBound;\n }\n // For log scales with non-positive lower bounds, use a small fraction of upper bound\n // This ensures the bucket is still visible on the log scale\n return upperBound * 0.001;\n};\n\nexport type HeatMapChartPanelProps = PanelProps<HeatMapChartOptions, TimeSeriesData>;\n\nexport function HeatMapChartPanel(props: HeatMapChartPanelProps): ReactElement | null {\n const { spec: pluginSpec, contentDimensions, queryResults } = props;\n\n // ensures all default format properties set if undef\n const yAxisFormat = merge({}, DEFAULT_FORMAT, pluginSpec.yAxisFormat);\n const countFormat = merge({}, DEFAULT_FORMAT, pluginSpec.countFormat);\n\n const {\n data,\n xAxisCategories,\n min,\n max,\n countMin,\n countMax,\n timeScale,\n }: {\n data: HeatMapDataItem[];\n xAxisCategories: number[];\n min?: number;\n max?: number;\n countMin: number;\n countMax: number;\n timeScale?: TimeScale;\n } = useMemo(() => {\n if (!queryResults || queryResults.length === 0) {\n return {\n data: [],\n xAxisCategories: [],\n min: 0,\n max: 0,\n countMin: 0,\n countMax: 0,\n timeScale: undefined,\n };\n }\n\n if (\n queryResults.length !== 1 ||\n queryResults[0]!.data.series.length !== 1 ||\n queryResults[0]!.data.series[0]!.histograms === undefined\n ) {\n return {\n data: [],\n xAxisCategories: [],\n min: 0,\n max: 0,\n countMin: 0,\n countMax: 0,\n timeScale: undefined,\n };\n }\n\n const series: TimeSeries = queryResults[0]!.data.series[0]!;\n\n const timeScale = getCommonTimeScaleForQueries(queryResults);\n const xAxisCategories: number[] = generateCompleteTimestamps(timeScale);\n\n const logBase = pluginSpec.logBase;\n\n // Dummy value that will be replaced at the first iteration\n let lowestBound = Infinity;\n let highestBound = -Infinity;\n let countMin = Infinity;\n let countMax = -Infinity;\n\n for (const [, histogram] of series?.histograms ?? []) {\n for (const bucket of histogram?.buckets ?? []) {\n const [, lowerBound, upperBound, count] = bucket;\n let lowerBoundFloat = parseFloat(lowerBound);\n const upperBoundFloat = parseFloat(upperBound);\n const countFloat = parseFloat(count);\n\n // For logarithmic scales, skip buckets that would be entirely non-positive\n if (logBase !== undefined && upperBoundFloat <= 0) {\n continue;\n }\n\n // For log scales, adjust non-positive lower bounds\n if (logBase !== undefined) {\n lowerBoundFloat = getEffectiveLowerBound(lowerBoundFloat, upperBoundFloat, logBase);\n }\n\n if (lowerBoundFloat < lowestBound) {\n lowestBound = lowerBoundFloat;\n }\n if (upperBoundFloat > highestBound) {\n highestBound = upperBoundFloat;\n }\n if (countFloat < countMin) {\n countMin = countFloat;\n }\n if (countFloat > countMax) {\n countMax = countFloat;\n }\n }\n }\n\n const data: HeatMapDataItem[] = [];\n // Each bucket becomes a rectangle spanning [lowerBound, upperBound] at the given x index\n for (const [time, histogram] of series?.histograms ?? []) {\n const itemIndexOnXaxis = xAxisCategories.findIndex((v) => v === time * 1000);\n\n for (const bucket of histogram?.buckets ?? []) {\n const [, lowerBound, upperBound, count] = bucket;\n let lowerBoundFloat = parseFloat(lowerBound);\n const upperBoundFloat = parseFloat(upperBound);\n\n // For logarithmic scales, skip buckets that would be entirely non-positive\n if (logBase !== undefined && upperBoundFloat <= 0) {\n continue;\n }\n\n // For log scales, adjust non-positive lower bounds\n if (logBase !== undefined) {\n lowerBoundFloat = getEffectiveLowerBound(lowerBoundFloat, upperBoundFloat, logBase);\n }\n\n data.push({\n value: [itemIndexOnXaxis, lowerBoundFloat, upperBoundFloat, parseFloat(count)],\n label: count,\n });\n }\n }\n return {\n data,\n xAxisCategories,\n min: lowestBound === Infinity ? undefined : lowestBound,\n max: highestBound === -Infinity ? undefined : highestBound,\n countMin,\n countMax,\n timeScale,\n };\n }, [pluginSpec.logBase, queryResults]);\n\n // Use configured min/max if provided, otherwise use calculated values\n // For logarithmic scales, ignore user-provided min if it's <= 0 (log of non-positive is undefined)\n // and let ECharts auto-calculate the range to avoid rendering issues\n const finalMin = useMemo(() => {\n if (pluginSpec.logBase !== undefined) {\n // For log scale, ignore min if it's <= 0 or let ECharts auto-calculate\n if (pluginSpec.min !== undefined && pluginSpec.min <= 0) {\n return undefined; // Let ECharts auto-calculate\n }\n return pluginSpec.min ?? min;\n }\n return pluginSpec.min ?? min;\n }, [pluginSpec.logBase, pluginSpec.min, min]);\n\n const finalMax = useMemo(() => {\n if (pluginSpec.logBase !== undefined) {\n // For log scale, ignore max if it's <= 0\n if (pluginSpec.max !== undefined && pluginSpec.max <= 0) {\n return undefined; // Let ECharts auto-calculate\n }\n return pluginSpec.max ?? max;\n }\n return pluginSpec.max ?? max;\n }, [pluginSpec.logBase, pluginSpec.max, max]);\n\n // TODO: add support for multiple queries\n if (queryResults.length > 1) {\n return (\n <Stack justifyContent=\"center\" height=\"100%\">\n <Typography variant=\"body2\" textAlign=\"center\">\n Only one query at a time is supported for now\n </Typography>\n </Stack>\n );\n }\n\n // Mo data message handled inside chart component\n if (data.length === 0) {\n return (\n <Stack justifyContent=\"center\" height=\"100%\">\n <Typography variant=\"body2\" textAlign=\"center\">\n No data available (only native histograms are supported for now)\n </Typography>\n </Stack>\n );\n }\n\n if (contentDimensions === undefined) return null;\n\n return (\n <Stack direction=\"row\" justifyContent=\"center\" alignItems=\"center\">\n <HeatMapChart\n width={contentDimensions.width}\n height={contentDimensions.height}\n data={data}\n xAxisCategories={xAxisCategories}\n yAxisFormat={yAxisFormat}\n countFormat={countFormat}\n countMin={countMin}\n countMax={countMax}\n timeScale={timeScale}\n showVisualMap={pluginSpec.showVisualMap}\n min={finalMin}\n max={finalMax}\n logBase={pluginSpec.logBase}\n />\n </Stack>\n );\n}\n"],"names":["Stack","Typography","merge","useMemo","DEFAULT_FORMAT","generateCompleteTimestamps","getCommonTimeScaleForQueries","HeatMapChart","getEffectiveLowerBound","lowerBound","upperBound","logBase","undefined","HeatMapChartPanel","props","spec","pluginSpec","contentDimensions","queryResults","yAxisFormat","countFormat","data","xAxisCategories","min","max","countMin","countMax","timeScale","length","series","histograms","lowestBound","Infinity","highestBound","histogram","bucket","buckets","count","lowerBoundFloat","parseFloat","upperBoundFloat","countFloat","time","itemIndexOnXaxis","findIndex","v","push","value","label","finalMin","finalMax","justifyContent","height","variant","textAlign","direction","alignItems","width","showVisualMap"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE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gBACvD,OAAOZ,WAAW,6BAA6B;YACjD;YACA,OAAOI,WAAWQ,GAAG,IAAIA;QAC3B;QACA,OAAOR,WAAWQ,GAAG,IAAIA;IAC3B,GAAG;QAACR,WAAWL,OAAO;QAAEK,WAAWQ,GAAG;QAAEA;KAAI;IAE5C,yCAAyC;IACzC,IAAIN,aAAaU,MAAM,GAAG,GAAG;QAC3B,qBACE,KAAC5B;YAAMmD,gBAAe;YAASC,QAAO;sBACpC,cAAA,KAACnD;gBAAWoD,SAAQ;gBAAQC,WAAU;0BAAS;;;IAKrD;IAEA,iDAAiD;IACjD,IAAIjC,KAAKO,MAAM,KAAK,GAAG;QACrB,qBACE,KAAC5B;YAAMmD,gBAAe;YAASC,QAAO;sBACpC,cAAA,KAACnD;gBAAWoD,SAAQ;gBAAQC,WAAU;0BAAS;;;IAKrD;IAEA,IAAIrC,sBAAsBL,WAAW,OAAO;IAE5C,qBACE,KAACZ;QAAMuD,WAAU;QAAMJ,gBAAe;QAASK,YAAW;kBACxD,cAAA,KAACjD;YACCkD,OAAOxC,kBAAkBwC,KAAK;YAC9BL,QAAQnC,kBAAkBmC,MAAM;YAChC/B,MAAMA;YACNC,iBAAiBA;YACjBH,aAAaA;YACbC,aAAaA;YACbK,UAAUA;YACVC,UAAUA;YACVC,WAAWA;YACX+B,eAAe1C,WAAW0C,aAAa;YACvCnC,KAAK0B;YACLzB,KAAK0B;YACLvC,SAASK,WAAWL,OAAO;;;AAInC"}
@@ -1,5 +1,5 @@
1
1
  import { Theme } from '@mui/material';
2
- import { FormatOptions } from '@perses-dev/core';
2
+ import { FormatOptions } from '@perses-dev/components';
3
3
  import { HeatMapData } from './HeatMapChart';
4
4
  interface CustomTooltipProps {
5
5
  data: HeatMapData;
@@ -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,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"}
1
+ {"version":3,"file":"HeatMapTooltip.d.ts","sourceRoot":"","sources":["../../../src/components/HeatMapTooltip.ts"],"names":[],"mappings":"AAaA,OAAO,EAAO,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAA+B,MAAM,wBAAwB,CAAC;AACpF,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"}
@@ -11,8 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  import { css } from '@mui/material';
14
- import { getDateAndTime } from '@perses-dev/components';
15
- import { formatValue } from '@perses-dev/core';
14
+ import { formatValue, getDateAndTime } from '@perses-dev/components';
16
15
  export function generateTooltipHTML({ data, label, marker, xAxisCategories, theme, yAxisFormat, countFormat }) {
17
16
  const [xIndex, yLower, yUpper] = data;
18
17
  const xAxisLabel = xAxisCategories[xIndex];
@@ -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 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"}
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 { FormatOptions, formatValue, getDateAndTime } from '@perses-dev/components';\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","formatValue","getDateAndTime","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,SAAwBC,WAAW,EAAEC,cAAc,QAAQ,yBAAyB;AAapF,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,GAAGd,eAAeY;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,EAAEL,YAAYqB,YAAYb,aAAa,GAAG,EAAER,YAAYsB,YAAYd,aAAa;;;UAGzF,EAAER,YAAYwB,WAAWpB,QAAQK,aAAa;;;;EAItD,CAAC;AACH"}
@@ -1,5 +1,6 @@
1
- import { Definition, FormatOptions } from '@perses-dev/core';
1
+ import { FormatOptions } from '@perses-dev/components';
2
2
  import { OptionsEditorProps } from '@perses-dev/plugin-system';
3
+ import { Definition } from '@perses-dev/spec';
3
4
  export declare const DEFAULT_FORMAT: FormatOptions;
4
5
  export declare const DEFAULT_MIN_PERCENT = 0;
5
6
  export declare const DEFAULT_MAX_PERCENT = 100;
@@ -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,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,WA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AAQ,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"}
@@ -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\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"}
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 { FormatOptions } from '@perses-dev/components';\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { Definition } from '@perses-dev/spec';\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;AAMjC,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"}
@@ -1,5 +1,5 @@
1
- import { TimeScale, TimeSeriesData } from '@perses-dev/core';
2
1
  import { PanelData } from '@perses-dev/plugin-system';
2
+ import { TimeScale, TimeSeriesData } from '@perses-dev/spec';
3
3
  export declare function getCommonTimeScaleForQueries(queries: Array<PanelData<TimeSeriesData>>): TimeScale | undefined;
4
4
  export declare function generateCompleteTimestamps(timescale?: TimeScale): number[];
5
5
  //# sourceMappingURL=data-transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-transform.d.ts","sourceRoot":"","sources":["../../../src/utils/data-transform.ts"],"names":[],"mappings":"AAaA,OAAO,EAAsB,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAG7G;AAED,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,MAAM,EAAE,CAU1E"}
1
+ {"version":3,"file":"data-transform.d.ts","sourceRoot":"","sources":["../../../src/utils/data-transform.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,GAAG,SAAS,GAAG,SAAS,CAG7G;AAED,wBAAgB,0BAA0B,CAAC,SAAS,CAAC,EAAE,SAAS,GAAG,MAAM,EAAE,CAU1E"}
@@ -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 { getCommonTimeScale } from '@perses-dev/core';
13
+ import { getCommonTimeScale } from '@perses-dev/components';
14
14
  export function getCommonTimeScaleForQueries(queries) {
15
15
  const seriesData = queries.map((query)=>query.data);
16
16
  return getCommonTimeScale(seriesData);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/data-transform.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 { getCommonTimeScale, TimeScale, TimeSeriesData } from '@perses-dev/core';\nimport { PanelData } from '@perses-dev/plugin-system';\n\nexport function getCommonTimeScaleForQueries(queries: Array<PanelData<TimeSeriesData>>): TimeScale | undefined {\n const seriesData = queries.map((query) => query.data);\n return getCommonTimeScale(seriesData);\n}\n\nexport function generateCompleteTimestamps(timescale?: TimeScale): number[] {\n if (!timescale) {\n return [];\n }\n const { startMs, endMs, stepMs } = timescale;\n const timestamps: number[] = [];\n for (let time = startMs; time <= endMs; time += stepMs) {\n timestamps.push(time);\n }\n return timestamps;\n}\n"],"names":["getCommonTimeScale","getCommonTimeScaleForQueries","queries","seriesData","map","query","data","generateCompleteTimestamps","timescale","startMs","endMs","stepMs","timestamps","time","push"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,kBAAkB,QAAmC,mBAAmB;AAGjF,OAAO,SAASC,6BAA6BC,OAAyC;IACpF,MAAMC,aAAaD,QAAQE,GAAG,CAAC,CAACC,QAAUA,MAAMC,IAAI;IACpD,OAAON,mBAAmBG;AAC5B;AAEA,OAAO,SAASI,2BAA2BC,SAAqB;IAC9D,IAAI,CAACA,WAAW;QACd,OAAO,EAAE;IACX;IACA,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGH;IACnC,MAAMI,aAAuB,EAAE;IAC/B,IAAK,IAAIC,OAAOJ,SAASI,QAAQH,OAAOG,QAAQF,OAAQ;QACtDC,WAAWE,IAAI,CAACD;IAClB;IACA,OAAOD;AACT"}
1
+ {"version":3,"sources":["../../../src/utils/data-transform.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 { getCommonTimeScale } from '@perses-dev/components';\nimport { PanelData } from '@perses-dev/plugin-system';\nimport { TimeScale, TimeSeriesData } from '@perses-dev/spec';\n\nexport function getCommonTimeScaleForQueries(queries: Array<PanelData<TimeSeriesData>>): TimeScale | undefined {\n const seriesData = queries.map((query) => query.data);\n return getCommonTimeScale(seriesData);\n}\n\nexport function generateCompleteTimestamps(timescale?: TimeScale): number[] {\n if (!timescale) {\n return [];\n }\n const { startMs, endMs, stepMs } = timescale;\n const timestamps: number[] = [];\n for (let time = startMs; time <= endMs; time += stepMs) {\n timestamps.push(time);\n }\n return timestamps;\n}\n"],"names":["getCommonTimeScale","getCommonTimeScaleForQueries","queries","seriesData","map","query","data","generateCompleteTimestamps","timescale","startMs","endMs","stepMs","timestamps","time","push"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,kBAAkB,QAAQ,yBAAyB;AAI5D,OAAO,SAASC,6BAA6BC,OAAyC;IACpF,MAAMC,aAAaD,QAAQE,GAAG,CAAC,CAACC,QAAUA,MAAMC,IAAI;IACpD,OAAON,mBAAmBG;AAC5B;AAEA,OAAO,SAASI,2BAA2BC,SAAqB;IAC9D,IAAI,CAACA,WAAW;QACd,OAAO,EAAE;IACX;IACA,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGH;IACnC,MAAMI,aAAuB,EAAE;IAC/B,IAAK,IAAIC,OAAOJ,SAASI,QAAQH,OAAOG,QAAQF,OAAQ;QACtDC,WAAWE,IAAI,CAACD;IAClB;IACA,OAAOD;AACT"}
@@ -1,4 +1,3 @@
1
- import { ThresholdOptions } from '@perses-dev/core';
2
- import { PersesChartsTheme } from '@perses-dev/components';
1
+ import { PersesChartsTheme, ThresholdOptions } from '@perses-dev/components';
3
2
  export declare function getColorFromThresholds(value: number, thresholds: ThresholdOptions | undefined, chartsTheme: PersesChartsTheme, defaultColor: string): string | null;
4
3
  //# sourceMappingURL=thresholds.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"thresholds.d.ts","sourceRoot":"","sources":["../../../src/utils/thresholds.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gBAAgB,GAAG,SAAS,EACxC,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,IAAI,CAcf"}
1
+ {"version":3,"file":"thresholds.d.ts","sourceRoot":"","sources":["../../../src/utils/thresholds.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE7E,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,gBAAgB,GAAG,SAAS,EACxC,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,MAAM,GACnB,MAAM,GAAG,IAAI,CAcf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/thresholds.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 { ThresholdOptions } from '@perses-dev/core';\nimport { PersesChartsTheme } from '@perses-dev/components';\n\nexport function getColorFromThresholds(\n value: number,\n thresholds: ThresholdOptions | undefined,\n chartsTheme: PersesChartsTheme,\n defaultColor: string\n): string | null {\n if (thresholds?.steps) {\n const matchingColors = thresholds.steps\n .map((step, index) => {\n if (value >= step.value) {\n return step.color ?? chartsTheme.thresholds.palette[index] ?? thresholds.defaultColor ?? defaultColor;\n }\n return null;\n })\n .filter((color): color is string => color !== null);\n\n return matchingColors[matchingColors.length - 1] ?? thresholds.defaultColor ?? defaultColor;\n }\n return thresholds?.defaultColor ?? defaultColor;\n}\n"],"names":["getColorFromThresholds","value","thresholds","chartsTheme","defaultColor","steps","matchingColors","map","step","index","color","palette","filter","length"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,OAAO,SAASA,uBACdC,KAAa,EACbC,UAAwC,EACxCC,WAA8B,EAC9BC,YAAoB;IAEpB,IAAIF,YAAYG,OAAO;QACrB,MAAMC,iBAAiBJ,WAAWG,KAAK,CACpCE,GAAG,CAAC,CAACC,MAAMC;YACV,IAAIR,SAASO,KAAKP,KAAK,EAAE;gBACvB,OAAOO,KAAKE,KAAK,IAAIP,YAAYD,UAAU,CAACS,OAAO,CAACF,MAAM,IAAIP,WAAWE,YAAY,IAAIA;YAC3F;YACA,OAAO;QACT,GACCQ,MAAM,CAAC,CAACF,QAA2BA,UAAU;QAEhD,OAAOJ,cAAc,CAACA,eAAeO,MAAM,GAAG,EAAE,IAAIX,WAAWE,YAAY,IAAIA;IACjF;IACA,OAAOF,YAAYE,gBAAgBA;AACrC"}
1
+ {"version":3,"sources":["../../../src/utils/thresholds.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 { PersesChartsTheme, ThresholdOptions } from '@perses-dev/components';\n\nexport function getColorFromThresholds(\n value: number,\n thresholds: ThresholdOptions | undefined,\n chartsTheme: PersesChartsTheme,\n defaultColor: string\n): string | null {\n if (thresholds?.steps) {\n const matchingColors = thresholds.steps\n .map((step, index) => {\n if (value >= step.value) {\n return step.color ?? chartsTheme.thresholds.palette[index] ?? thresholds.defaultColor ?? defaultColor;\n }\n return null;\n })\n .filter((color): color is string => color !== null);\n\n return matchingColors[matchingColors.length - 1] ?? thresholds.defaultColor ?? defaultColor;\n }\n return thresholds?.defaultColor ?? defaultColor;\n}\n"],"names":["getColorFromThresholds","value","thresholds","chartsTheme","defaultColor","steps","matchingColors","map","step","index","color","palette","filter","length"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,OAAO,SAASA,uBACdC,KAAa,EACbC,UAAwC,EACxCC,WAA8B,EAC9BC,YAAoB;IAEpB,IAAIF,YAAYG,OAAO;QACrB,MAAMC,iBAAiBJ,WAAWG,KAAK,CACpCE,GAAG,CAAC,CAACC,MAAMC;YACV,IAAIR,SAASO,KAAKP,KAAK,EAAE;gBACvB,OAAOO,KAAKE,KAAK,IAAIP,YAAYD,UAAU,CAACS,OAAO,CAACF,MAAM,IAAIP,WAAWE,YAAY,IAAIA;YAC3F;YACA,OAAO;QACT,GACCQ,MAAM,CAAC,CAACF,QAA2BA,UAAU;QAEhD,OAAOJ,cAAc,CAACA,eAAeO,MAAM,GAAG,EAAE,IAAIX,WAAWE,YAAY,IAAIA;IACjF;IACA,OAAOF,YAAYE,gBAAgBA;AACrC"}
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",
8
+ "buildVersion": "0.5.0-beta.0",
9
9
  "buildName": "@perses-dev/heatmap-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/HeatMapChart.a5f52cc0.js",
12
+ "name": "__mf/js/HeatMapChart.4fa11415.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -20,86 +20,91 @@
20
20
  "api": ""
21
21
  },
22
22
  "globalName": "HeatMapChart",
23
- "pluginVersion": "0.21.6",
24
- "prefetchInterface": false,
23
+ "pluginVersion": "2.4.0",
25
24
  "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/HeatMapChart/\"; }"
26
25
  },
27
26
  "shared": [
28
27
  {
29
28
  "id": "HeatMapChart:@perses-dev/components",
30
29
  "name": "@perses-dev/components",
31
- "version": "0.53.0",
30
+ "version": "0.54.0-beta.3",
32
31
  "singleton": true,
33
- "requiredVersion": "^0.53.0",
32
+ "requiredVersion": "^0.54.0-beta.3",
34
33
  "assets": {
35
34
  "js": {
36
35
  "async": [],
37
36
  "sync": [
38
- "__mf/js/async/180.c67f24c4.js"
37
+ "__mf/js/async/985.b6f73a36.js"
39
38
  ]
40
39
  },
41
40
  "css": {
42
41
  "async": [],
43
- "sync": []
42
+ "sync": [
43
+ "__mf/css/async/985.85c2cbf6.css"
44
+ ]
44
45
  }
45
- }
46
+ },
47
+ "fallback": ""
46
48
  },
47
49
  {
48
- "id": "HeatMapChart:@perses-dev/core",
49
- "name": "@perses-dev/core",
50
- "version": "0.53.0-rc.2",
50
+ "id": "HeatMapChart:@perses-dev/spec",
51
+ "name": "@perses-dev/spec",
52
+ "version": "0.2.0-beta.0",
51
53
  "singleton": true,
52
- "requiredVersion": "^0.53.0-rc.2",
54
+ "requiredVersion": "^0.2.0-beta.2",
53
55
  "assets": {
54
56
  "js": {
55
57
  "async": [],
56
58
  "sync": [
57
- "__mf/js/async/12.4ae967ba.js"
59
+ "__mf/js/async/39.d342865a.js"
58
60
  ]
59
61
  },
60
62
  "css": {
61
63
  "async": [],
62
64
  "sync": []
63
65
  }
64
- }
66
+ },
67
+ "fallback": ""
65
68
  },
66
69
  {
67
70
  "id": "HeatMapChart:immer",
68
71
  "name": "immer",
69
- "version": "10.1.1",
72
+ "version": "10.2.0",
70
73
  "singleton": true,
71
- "requiredVersion": "^10.1.1",
74
+ "requiredVersion": "^10.2.0",
72
75
  "assets": {
73
76
  "js": {
74
77
  "async": [],
75
78
  "sync": [
76
- "__mf/js/async/963.6eed3d33.js"
79
+ "__mf/js/async/963.f3d8b714.js"
77
80
  ]
78
81
  },
79
82
  "css": {
80
83
  "async": [],
81
84
  "sync": []
82
85
  }
83
- }
86
+ },
87
+ "fallback": ""
84
88
  },
85
89
  {
86
90
  "id": "HeatMapChart:lodash",
87
91
  "name": "lodash",
88
- "version": "4.17.23",
92
+ "version": "4.18.1",
89
93
  "singleton": true,
90
- "requiredVersion": "^4.17.23",
94
+ "requiredVersion": "^4.18.1",
91
95
  "assets": {
92
96
  "js": {
93
97
  "async": [],
94
98
  "sync": [
95
- "__mf/js/async/392.81aab132.js"
99
+ "__mf/js/async/392.0f59f214.js"
96
100
  ]
97
101
  },
98
102
  "css": {
99
103
  "async": [],
100
104
  "sync": []
101
105
  }
102
- }
106
+ },
107
+ "fallback": ""
103
108
  },
104
109
  {
105
110
  "id": "HeatMapChart:react-dom",
@@ -111,14 +116,15 @@
111
116
  "js": {
112
117
  "async": [],
113
118
  "sync": [
114
- "__mf/js/async/470.6889fffa.js"
119
+ "__mf/js/async/470.399d3ba9.js"
115
120
  ]
116
121
  },
117
122
  "css": {
118
123
  "async": [],
119
124
  "sync": []
120
125
  }
121
- }
126
+ },
127
+ "fallback": ""
122
128
  },
123
129
  {
124
130
  "id": "HeatMapChart:react",
@@ -130,14 +136,15 @@
130
136
  "js": {
131
137
  "async": [],
132
138
  "sync": [
133
- "__mf/js/async/121.8ac14a6e.js"
139
+ "__mf/js/async/121.b18ceb80.js"
134
140
  ]
135
141
  },
136
142
  "css": {
137
143
  "async": [],
138
144
  "sync": []
139
145
  }
140
- }
146
+ },
147
+ "fallback": ""
141
148
  }
142
149
  ],
143
150
  "remotes": [],
@@ -148,17 +155,15 @@
148
155
  "assets": {
149
156
  "js": {
150
157
  "sync": [
151
- "__mf/js/async/980.092bc51a.js",
152
- "__mf/js/async/__federation_expose_HeatMapChart.c74c73d1.js"
158
+ "__mf/js/async/980.2f9fb38d.js",
159
+ "__mf/js/async/__federation_expose_HeatMapChart.47fd43fd.js"
153
160
  ],
154
- "async": [
155
- "__mf/js/async/888.944e0384.js"
156
- ]
161
+ "async": []
157
162
  },
158
163
  "css": {
159
164
  "sync": [],
160
165
  "async": [
161
- "__mf/css/async/61.d3010b86.css"
166
+ "__mf/css/async/985.85c2cbf6.css"
162
167
  ]
163
168
  }
164
169
  },
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",
8
+ "buildVersion": "0.5.0-beta.0",
9
9
  "buildName": "@perses-dev/heatmap-chart-plugin"
10
10
  },
11
11
  "remoteEntry": {
12
- "name": "__mf/js/HeatMapChart.a5f52cc0.js",
12
+ "name": "__mf/js/HeatMapChart.4fa11415.js",
13
13
  "path": "",
14
14
  "type": "global"
15
15
  },
@@ -20,48 +20,51 @@
20
20
  "api": ""
21
21
  },
22
22
  "globalName": "HeatMapChart",
23
- "pluginVersion": "0.21.6",
24
- "prefetchInterface": false,
23
+ "pluginVersion": "2.4.0",
25
24
  "getPublicPath": "function() { const prefix = window.PERSES_PLUGIN_ASSETS_PATH || window.PERSES_APP_CONFIG?.api_prefix || \"\"; return prefix + \"/plugins/HeatMapChart/\"; }"
26
25
  },
27
26
  "shared": [
28
27
  {
29
28
  "singleton": true,
30
- "requiredVersion": "^0.53.0",
29
+ "requiredVersion": "^0.54.0-beta.3",
31
30
  "shareScope": "default",
32
31
  "name": "@perses-dev/components",
33
- "version": "0.53.0",
32
+ "version": "0.54.0-beta.3",
34
33
  "eager": false,
35
34
  "id": "HeatMapChart:@perses-dev/components",
36
35
  "assets": {
37
36
  "js": {
38
37
  "async": [],
39
38
  "sync": [
40
- "__mf/js/async/180.c67f24c4.js"
39
+ "__mf/js/async/985.b6f73a36.js"
41
40
  ]
42
41
  },
43
42
  "css": {
44
43
  "async": [],
45
- "sync": []
44
+ "sync": [
45
+ "__mf/css/async/985.85c2cbf6.css"
46
+ ]
46
47
  }
47
48
  },
48
49
  "usedIn": [
49
50
  "./HeatMapChart"
50
- ]
51
+ ],
52
+ "usedExports": [],
53
+ "fallback": ""
51
54
  },
52
55
  {
53
56
  "singleton": true,
54
- "requiredVersion": "^0.53.0-rc.2",
57
+ "requiredVersion": "^0.2.0-beta.2",
55
58
  "shareScope": "default",
56
- "name": "@perses-dev/core",
57
- "version": "0.53.0-rc.2",
59
+ "name": "@perses-dev/spec",
60
+ "version": "0.2.0-beta.0",
58
61
  "eager": false,
59
- "id": "HeatMapChart:@perses-dev/core",
62
+ "id": "HeatMapChart:@perses-dev/spec",
60
63
  "assets": {
61
64
  "js": {
62
65
  "async": [],
63
66
  "sync": [
64
- "__mf/js/async/12.4ae967ba.js"
67
+ "__mf/js/async/39.d342865a.js"
65
68
  ]
66
69
  },
67
70
  "css": {
@@ -69,23 +72,23 @@
69
72
  "sync": []
70
73
  }
71
74
  },
72
- "usedIn": [
73
- "./HeatMapChart"
74
- ]
75
+ "usedIn": [],
76
+ "usedExports": [],
77
+ "fallback": ""
75
78
  },
76
79
  {
77
80
  "singleton": true,
78
- "requiredVersion": "^10.1.1",
81
+ "requiredVersion": "^10.2.0",
79
82
  "shareScope": "default",
80
83
  "name": "immer",
81
- "version": "10.1.1",
84
+ "version": "10.2.0",
82
85
  "eager": false,
83
86
  "id": "HeatMapChart:immer",
84
87
  "assets": {
85
88
  "js": {
86
89
  "async": [],
87
90
  "sync": [
88
- "__mf/js/async/963.6eed3d33.js"
91
+ "__mf/js/async/963.f3d8b714.js"
89
92
  ]
90
93
  },
91
94
  "css": {
@@ -95,21 +98,23 @@
95
98
  },
96
99
  "usedIn": [
97
100
  "./HeatMapChart"
98
- ]
101
+ ],
102
+ "usedExports": [],
103
+ "fallback": ""
99
104
  },
100
105
  {
101
106
  "singleton": true,
102
- "requiredVersion": "^4.17.23",
107
+ "requiredVersion": "^4.18.1",
103
108
  "shareScope": "default",
104
109
  "name": "lodash",
105
- "version": "4.17.23",
110
+ "version": "4.18.1",
106
111
  "eager": false,
107
112
  "id": "HeatMapChart:lodash",
108
113
  "assets": {
109
114
  "js": {
110
115
  "async": [],
111
116
  "sync": [
112
- "__mf/js/async/392.81aab132.js"
117
+ "__mf/js/async/392.0f59f214.js"
113
118
  ]
114
119
  },
115
120
  "css": {
@@ -117,7 +122,9 @@
117
122
  "sync": []
118
123
  }
119
124
  },
120
- "usedIn": []
125
+ "usedIn": [],
126
+ "usedExports": [],
127
+ "fallback": ""
121
128
  },
122
129
  {
123
130
  "singleton": true,
@@ -131,7 +138,7 @@
131
138
  "js": {
132
139
  "async": [],
133
140
  "sync": [
134
- "__mf/js/async/470.6889fffa.js"
141
+ "__mf/js/async/470.399d3ba9.js"
135
142
  ]
136
143
  },
137
144
  "css": {
@@ -139,7 +146,9 @@
139
146
  "sync": []
140
147
  }
141
148
  },
142
- "usedIn": []
149
+ "usedIn": [],
150
+ "usedExports": [],
151
+ "fallback": ""
143
152
  },
144
153
  {
145
154
  "singleton": true,
@@ -153,7 +162,7 @@
153
162
  "js": {
154
163
  "async": [],
155
164
  "sync": [
156
- "__mf/js/async/121.8ac14a6e.js"
165
+ "__mf/js/async/121.b18ceb80.js"
157
166
  ]
158
167
  },
159
168
  "css": {
@@ -163,7 +172,9 @@
163
172
  },
164
173
  "usedIn": [
165
174
  "./HeatMapChart"
166
- ]
175
+ ],
176
+ "usedExports": [],
177
+ "fallback": ""
167
178
  }
168
179
  ],
169
180
  "remotes": [],
@@ -175,24 +186,21 @@
175
186
  "requires": [
176
187
  "react",
177
188
  "immer",
178
- "@perses-dev/components",
179
- "@perses-dev/core"
189
+ "@perses-dev/components"
180
190
  ],
181
191
  "file": "src/HeatMapChart.ts",
182
192
  "assets": {
183
193
  "js": {
184
194
  "sync": [
185
- "__mf/js/async/980.092bc51a.js",
186
- "__mf/js/async/__federation_expose_HeatMapChart.c74c73d1.js"
195
+ "__mf/js/async/980.2f9fb38d.js",
196
+ "__mf/js/async/__federation_expose_HeatMapChart.47fd43fd.js"
187
197
  ],
188
- "async": [
189
- "__mf/js/async/888.944e0384.js"
190
- ]
198
+ "async": []
191
199
  },
192
200
  "css": {
193
201
  "sync": [],
194
202
  "async": [
195
- "__mf/css/async/61.d3010b86.css"
203
+ "__mf/css/async/985.85c2cbf6.css"
196
204
  ]
197
205
  }
198
206
  }