@perses-dev/components 0.0.0-snapshot-embed-import-errors-8906900 → 0.0.0-snapshot-datasource-browser-test-28cbb71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +2 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +88 -51
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +3 -2
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js +4 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
- package/dist/DateTimeRangePicker/index.js +1 -1
- package/dist/DateTimeRangePicker/index.js.map +1 -1
- package/dist/DateTimeRangePicker/utils.js +1 -1
- package/dist/DateTimeRangePicker/utils.js.map +1 -1
- package/dist/Dialog/Dialog.d.ts +24 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -0
- package/dist/Dialog/Dialog.js +74 -0
- package/dist/Dialog/Dialog.js.map +1 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.d.ts.map +1 -0
- package/dist/{Tooltip → Dialog}/index.js +2 -3
- package/dist/{Tooltip → Dialog}/index.js.map +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/Drawer/index.js.map +1 -1
- package/dist/EChart.d.ts.map +1 -1
- package/dist/EChart.js +2 -3
- package/dist/EChart.js.map +1 -1
- package/dist/ErrorAlert.js +1 -1
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/ErrorBoundary.js +1 -1
- package/dist/ErrorBoundary.js.map +1 -1
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +3 -2
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/GaugeChart/index.js +1 -1
- package/dist/GaugeChart/index.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.d.ts +1 -6
- package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +2 -9
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.test.js +1 -1
- package/dist/InfoTooltip/InfoTooltip.test.js.map +1 -1
- package/dist/InfoTooltip/index.js +1 -1
- package/dist/InfoTooltip/index.js.map +1 -1
- package/dist/JSONEditor.js +1 -1
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.js +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +17 -6
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/LegendColorBadge.js +1 -1
- package/dist/Legend/LegendColorBadge.js.map +1 -1
- package/dist/Legend/ListLegend.js +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.js +1 -1
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/index.js +1 -1
- package/dist/Legend/index.js.map +1 -1
- package/dist/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
- package/dist/LegendOptionsEditor/LegendOptionsEditor.js +13 -18
- package/dist/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
- package/dist/LegendOptionsEditor/LegendOptionsEditor.test.js +23 -2
- package/dist/LegendOptionsEditor/LegendOptionsEditor.test.js.map +1 -1
- package/dist/LegendOptionsEditor/index.js +1 -1
- package/dist/LegendOptionsEditor/index.js.map +1 -1
- package/dist/LineChart/LineChart.js +3 -3
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LineChart/index.js +1 -1
- package/dist/LineChart/index.js.map +1 -1
- package/dist/LineChart/utils.js +2 -2
- package/dist/LineChart/utils.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
- package/dist/OptionsEditorLayout/index.js +1 -1
- package/dist/OptionsEditorLayout/index.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +22 -13
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/StatChart.test.js +1 -1
- package/dist/StatChart/StatChart.test.js.map +1 -1
- package/dist/StatChart/index.js +1 -1
- package/dist/StatChart/index.js.map +1 -1
- package/dist/{Tooltip → TimeSeriesTooltip}/SeriesInfo.d.ts +1 -2
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.js +89 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.test.d.ts +2 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.test.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.test.js +52 -0
- package/dist/TimeSeriesTooltip/SeriesInfo.test.js.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +9 -0
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +99 -0
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/SeriesMarker.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/SeriesMarker.js +7 -7
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -0
- package/dist/{Tooltip/Tooltip.d.ts → TimeSeriesTooltip/TimeSeriesTooltip.d.ts} +4 -4
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.d.ts.map +1 -0
- package/dist/{Tooltip/Tooltip.js → TimeSeriesTooltip/TimeSeriesTooltip.js} +3 -4
- package/dist/TimeSeriesTooltip/TimeSeriesTooltip.js.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/TooltipContent.d.ts +1 -2
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/TooltipContent.js +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -0
- package/dist/TimeSeriesTooltip/TooltipContent.test.d.ts +2 -0
- package/dist/TimeSeriesTooltip/TooltipContent.test.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/TooltipContent.test.js +78 -0
- package/dist/TimeSeriesTooltip/TooltipContent.test.js.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/focused-series.d.ts +0 -0
- package/dist/TimeSeriesTooltip/focused-series.d.ts.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/focused-series.js +3 -3
- package/dist/TimeSeriesTooltip/focused-series.js.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/focused-series.test.d.ts +0 -0
- package/dist/TimeSeriesTooltip/focused-series.test.d.ts.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/focused-series.test.js +1 -1
- package/dist/TimeSeriesTooltip/focused-series.test.js.map +1 -0
- package/dist/TimeSeriesTooltip/index.d.ts +9 -0
- package/dist/TimeSeriesTooltip/index.d.ts.map +1 -0
- package/dist/TimeSeriesTooltip/index.js +22 -0
- package/dist/TimeSeriesTooltip/index.js.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/tooltip-model.d.ts +0 -0
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/tooltip-model.js +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/utils.d.ts +0 -0
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -0
- package/dist/{Tooltip → TimeSeriesTooltip}/utils.js +1 -1
- package/dist/TimeSeriesTooltip/utils.js.map +1 -0
- package/dist/UnitSelector/UnitSelector.js +1 -1
- package/dist/UnitSelector/UnitSelector.js.map +1 -1
- package/dist/UnitSelector/UnitSelector.test.js +1 -1
- package/dist/UnitSelector/UnitSelector.test.js.map +1 -1
- package/dist/UnitSelector/index.js +1 -1
- package/dist/UnitSelector/index.js.map +1 -1
- package/dist/YAxisLabel.js +1 -1
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +87 -50
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +3 -2
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +4 -1
- package/dist/cjs/DateTimeRangePicker/index.js +1 -1
- package/dist/cjs/DateTimeRangePicker/utils.js +1 -1
- package/dist/cjs/Dialog/Dialog.js +85 -0
- package/dist/cjs/{Tooltip → Dialog}/index.js +2 -3
- package/dist/cjs/Drawer/Drawer.js +1 -1
- package/dist/cjs/Drawer/index.js +1 -1
- package/dist/cjs/EChart.js +5 -11
- package/dist/cjs/ErrorAlert.js +1 -1
- package/dist/cjs/ErrorBoundary.js +1 -1
- package/dist/cjs/GaugeChart/GaugeChart.js +3 -2
- package/dist/cjs/GaugeChart/index.js +1 -1
- package/dist/cjs/InfoTooltip/InfoTooltip.js +5 -18
- package/dist/cjs/InfoTooltip/InfoTooltip.test.js +1 -1
- package/dist/cjs/InfoTooltip/index.js +1 -1
- package/dist/cjs/JSONEditor.js +1 -1
- package/dist/cjs/Legend/CompactLegend.js +1 -1
- package/dist/cjs/Legend/Legend.js +16 -5
- package/dist/cjs/Legend/LegendColorBadge.js +1 -1
- package/dist/cjs/Legend/ListLegend.js +1 -1
- package/dist/cjs/Legend/ListLegendItem.js +1 -1
- package/dist/cjs/Legend/index.js +1 -1
- package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.js +13 -18
- package/dist/cjs/LegendOptionsEditor/LegendOptionsEditor.test.js +23 -2
- package/dist/cjs/LegendOptionsEditor/index.js +1 -1
- package/dist/cjs/LineChart/LineChart.js +3 -3
- package/dist/cjs/LineChart/index.js +1 -1
- package/dist/cjs/LineChart/utils.js +3 -8
- package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/cjs/OptionsEditorLayout/index.js +1 -1
- package/dist/cjs/StatChart/StatChart.js +23 -19
- package/dist/cjs/StatChart/StatChart.test.js +1 -1
- package/dist/cjs/StatChart/index.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +95 -0
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.test.js +54 -0
- package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +105 -0
- package/dist/cjs/{Tooltip → TimeSeriesTooltip}/SeriesMarker.js +7 -7
- package/dist/cjs/{Tooltip/Tooltip.js → TimeSeriesTooltip/TimeSeriesTooltip.js} +4 -4
- package/dist/cjs/{Tooltip → TimeSeriesTooltip}/TooltipContent.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/TooltipContent.test.js +80 -0
- package/dist/cjs/{Tooltip → TimeSeriesTooltip}/focused-series.js +3 -3
- package/dist/cjs/{Tooltip → TimeSeriesTooltip}/focused-series.test.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/index.js +35 -0
- package/dist/cjs/{Tooltip → TimeSeriesTooltip}/tooltip-model.js +1 -1
- package/dist/cjs/{Tooltip → TimeSeriesTooltip}/utils.js +1 -1
- package/dist/cjs/UnitSelector/UnitSelector.js +1 -1
- package/dist/cjs/UnitSelector/UnitSelector.test.js +1 -1
- package/dist/cjs/UnitSelector/index.js +1 -1
- package/dist/cjs/YAxisLabel.js +1 -1
- package/dist/cjs/context/ChartsThemeProvider.js +1 -1
- package/dist/cjs/context/TimeZoneProvider.js +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/model/graph.js +4 -15
- package/dist/cjs/model/index.js +2 -1
- package/dist/cjs/model/legend.js +67 -0
- package/dist/cjs/model/legend.test.js +29 -0
- package/dist/cjs/model/theme.js +1 -1
- package/dist/cjs/model/units/bytes.js +1 -1
- package/dist/cjs/model/units/constants.js +1 -1
- package/dist/cjs/model/units/decimal.js +5 -2
- package/dist/cjs/model/units/index.js +1 -1
- package/dist/cjs/model/units/percent.js +1 -1
- package/dist/cjs/model/units/time.js +1 -1
- package/dist/cjs/model/units/types.js +1 -1
- package/dist/cjs/model/units/units.js +1 -1
- package/dist/cjs/model/units/units.test.js +59 -6
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/test/render.js +1 -1
- package/dist/cjs/test/setup-tests.js +1 -1
- package/dist/cjs/test-utils/index.js +1 -1
- package/dist/cjs/test-utils/theme.js +6 -1
- package/dist/cjs/theme/index.js +1 -1
- package/dist/cjs/theme/palette/background.js +1 -1
- package/dist/cjs/theme/palette/colors/blue.js +1 -1
- package/dist/cjs/theme/palette/colors/common.js +1 -1
- package/dist/cjs/theme/palette/colors/green.js +1 -1
- package/dist/cjs/theme/palette/colors/grey.js +1 -1
- package/dist/cjs/theme/palette/colors/index.js +1 -1
- package/dist/cjs/theme/palette/colors/orange.js +1 -1
- package/dist/cjs/theme/palette/colors/purple.js +1 -1
- package/dist/cjs/theme/palette/colors/red.js +1 -1
- package/dist/cjs/theme/palette/colors/types.js +1 -1
- package/dist/cjs/theme/palette/error.js +1 -1
- package/dist/cjs/theme/palette/grey.js +1 -1
- package/dist/cjs/theme/palette/index.js +1 -1
- package/dist/cjs/theme/palette/palette-options.js +1 -1
- package/dist/cjs/theme/palette/primary.js +1 -1
- package/dist/cjs/theme/palette/secondary.js +1 -1
- package/dist/cjs/theme/palette/success.js +1 -1
- package/dist/cjs/theme/palette/text.js +1 -1
- package/dist/cjs/theme/palette/warning.js +1 -1
- package/dist/cjs/theme/theme.js +12 -1
- package/dist/cjs/theme/types/ThemeExtension.d.js +1 -1
- package/dist/cjs/theme/typography.js +5 -1
- package/dist/cjs/utils/combine-sx.js +1 -1
- package/dist/cjs/utils/component-ids.js +1 -1
- package/dist/cjs/utils/format.js +1 -1
- package/dist/cjs/utils/format.test.js +1 -1
- package/dist/cjs/utils/index.js +1 -1
- package/dist/cjs/utils/mathjs.js +1 -1
- package/dist/cjs/utils/theme-gen.js +8 -8
- package/dist/cjs/utils/theme-gen.test.js +6 -1
- package/dist/context/ChartsThemeProvider.js +1 -1
- package/dist/context/ChartsThemeProvider.js.map +1 -1
- package/dist/context/TimeZoneProvider.js +1 -1
- package/dist/context/TimeZoneProvider.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/model/graph.d.ts +1 -16
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/graph.js +1 -5
- package/dist/model/graph.js.map +1 -1
- package/dist/model/index.d.ts +1 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +2 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/legend.d.ts +22 -0
- package/dist/model/legend.d.ts.map +1 -0
- package/dist/model/legend.js +51 -0
- package/dist/model/legend.js.map +1 -0
- package/dist/model/legend.test.d.ts +2 -0
- package/dist/model/legend.test.d.ts.map +1 -0
- package/dist/model/legend.test.js +27 -0
- package/dist/model/legend.test.js.map +1 -0
- package/dist/model/theme.d.ts +11 -0
- package/dist/model/theme.d.ts.map +1 -1
- package/dist/model/theme.js +1 -1
- package/dist/model/theme.js.map +1 -1
- package/dist/model/units/bytes.js +1 -1
- package/dist/model/units/bytes.js.map +1 -1
- package/dist/model/units/constants.js +1 -1
- package/dist/model/units/constants.js.map +1 -1
- package/dist/model/units/decimal.d.ts.map +1 -1
- package/dist/model/units/decimal.js +5 -2
- package/dist/model/units/decimal.js.map +1 -1
- package/dist/model/units/index.js +1 -1
- package/dist/model/units/index.js.map +1 -1
- package/dist/model/units/percent.js +1 -1
- package/dist/model/units/percent.js.map +1 -1
- package/dist/model/units/time.js +1 -1
- package/dist/model/units/time.js.map +1 -1
- package/dist/model/units/types.js +1 -1
- package/dist/model/units/types.js.map +1 -1
- package/dist/model/units/units.js +1 -1
- package/dist/model/units/units.js.map +1 -1
- package/dist/model/units/units.test.js +59 -6
- package/dist/model/units/units.test.js.map +1 -1
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/theme.d.ts.map +1 -1
- package/dist/test-utils/theme.js +6 -1
- package/dist/test-utils/theme.js.map +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette/background.js +1 -1
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/palette/colors/blue.js +1 -1
- package/dist/theme/palette/colors/blue.js.map +1 -1
- package/dist/theme/palette/colors/common.js +1 -1
- package/dist/theme/palette/colors/common.js.map +1 -1
- package/dist/theme/palette/colors/green.js +1 -1
- package/dist/theme/palette/colors/green.js.map +1 -1
- package/dist/theme/palette/colors/grey.js +1 -1
- package/dist/theme/palette/colors/grey.js.map +1 -1
- package/dist/theme/palette/colors/index.js +1 -1
- package/dist/theme/palette/colors/index.js.map +1 -1
- package/dist/theme/palette/colors/orange.js +1 -1
- package/dist/theme/palette/colors/orange.js.map +1 -1
- package/dist/theme/palette/colors/purple.js +1 -1
- package/dist/theme/palette/colors/purple.js.map +1 -1
- package/dist/theme/palette/colors/red.js +1 -1
- package/dist/theme/palette/colors/red.js.map +1 -1
- package/dist/theme/palette/colors/types.js +1 -1
- package/dist/theme/palette/colors/types.js.map +1 -1
- package/dist/theme/palette/error.js +1 -1
- package/dist/theme/palette/error.js.map +1 -1
- package/dist/theme/palette/grey.js +1 -1
- package/dist/theme/palette/grey.js.map +1 -1
- package/dist/theme/palette/index.js +1 -1
- package/dist/theme/palette/index.js.map +1 -1
- package/dist/theme/palette/palette-options.js +1 -1
- package/dist/theme/palette/palette-options.js.map +1 -1
- package/dist/theme/palette/primary.js +1 -1
- package/dist/theme/palette/primary.js.map +1 -1
- package/dist/theme/palette/secondary.js +1 -1
- package/dist/theme/palette/secondary.js.map +1 -1
- package/dist/theme/palette/success.js +1 -1
- package/dist/theme/palette/success.js.map +1 -1
- package/dist/theme/palette/text.js +1 -1
- package/dist/theme/palette/text.js.map +1 -1
- package/dist/theme/palette/warning.js +1 -1
- package/dist/theme/palette/warning.js.map +1 -1
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +13 -2
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/types/ThemeExtension.d.js +1 -1
- package/dist/theme/types/ThemeExtension.d.js.map +1 -1
- package/dist/theme/typography.d.ts +4 -0
- package/dist/theme/typography.d.ts.map +1 -1
- package/dist/theme/typography.js +5 -1
- package/dist/theme/typography.js.map +1 -1
- package/dist/utils/combine-sx.js +1 -1
- package/dist/utils/combine-sx.js.map +1 -1
- package/dist/utils/component-ids.js +1 -1
- package/dist/utils/component-ids.js.map +1 -1
- package/dist/utils/format.js +1 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/format.test.js +1 -1
- package/dist/utils/format.test.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/mathjs.js +1 -1
- package/dist/utils/mathjs.js.map +1 -1
- package/dist/utils/theme-gen.d.ts.map +1 -1
- package/dist/utils/theme-gen.js +7 -2
- package/dist/utils/theme-gen.js.map +1 -1
- package/dist/utils/theme-gen.test.js +6 -1
- package/dist/utils/theme-gen.test.js.map +1 -1
- package/package.json +4 -3
- package/dist/Tooltip/SeriesInfo.d.ts.map +0 -1
- package/dist/Tooltip/SeriesInfo.js +0 -143
- package/dist/Tooltip/SeriesInfo.js.map +0 -1
- package/dist/Tooltip/SeriesMarker.d.ts.map +0 -1
- package/dist/Tooltip/SeriesMarker.js.map +0 -1
- package/dist/Tooltip/Tooltip.d.ts.map +0 -1
- package/dist/Tooltip/Tooltip.js.map +0 -1
- package/dist/Tooltip/TooltipContent.d.ts.map +0 -1
- package/dist/Tooltip/TooltipContent.js.map +0 -1
- package/dist/Tooltip/focused-series.d.ts.map +0 -1
- package/dist/Tooltip/focused-series.js.map +0 -1
- package/dist/Tooltip/focused-series.test.d.ts.map +0 -1
- package/dist/Tooltip/focused-series.test.js.map +0 -1
- package/dist/Tooltip/index.d.ts +0 -3
- package/dist/Tooltip/index.d.ts.map +0 -1
- package/dist/Tooltip/tooltip-model.d.ts.map +0 -1
- package/dist/Tooltip/tooltip-model.js.map +0 -1
- package/dist/Tooltip/utils.d.ts.map +0 -1
- package/dist/Tooltip/utils.js.map +0 -1
- package/dist/cjs/Tooltip/SeriesInfo.js +0 -149
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "Dialog", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>Dialog
|
|
20
|
+
});
|
|
21
|
+
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
const _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
|
23
|
+
const _material = require("@mui/material");
|
|
24
|
+
const _close = /*#__PURE__*/ _interopRequireDefault(require("mdi-material-ui/Close"));
|
|
25
|
+
const _utils = require("../utils");
|
|
26
|
+
function _interopRequireDefault(obj) {
|
|
27
|
+
return obj && obj.__esModule ? obj : {
|
|
28
|
+
default: obj
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const Header = ({ children , onClose , ...props })=>{
|
|
32
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.DialogTitle, {
|
|
35
|
+
...props,
|
|
36
|
+
children: children
|
|
37
|
+
}),
|
|
38
|
+
onClose && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
39
|
+
"aria-label": "Close",
|
|
40
|
+
onClick: onClose,
|
|
41
|
+
sx: dialogCloseIconButtonStyle,
|
|
42
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_close.default, {})
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const Content = ({ children , width =500 , sx , ...props })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.DialogContent, {
|
|
48
|
+
dividers: true,
|
|
49
|
+
...props,
|
|
50
|
+
sx: (0, _utils.combineSx)({
|
|
51
|
+
width: `${width}px`
|
|
52
|
+
}, sx),
|
|
53
|
+
children: children
|
|
54
|
+
});
|
|
55
|
+
const PrimaryButton = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
56
|
+
variant: "contained",
|
|
57
|
+
type: "submit",
|
|
58
|
+
...props,
|
|
59
|
+
children: children
|
|
60
|
+
});
|
|
61
|
+
const SecondaryButton = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Button, {
|
|
62
|
+
variant: "outlined",
|
|
63
|
+
color: "secondary",
|
|
64
|
+
...props,
|
|
65
|
+
children: children
|
|
66
|
+
});
|
|
67
|
+
/**
|
|
68
|
+
* Render the CSS of the dialog's close button, according to the given material theme.
|
|
69
|
+
* @param theme material theme
|
|
70
|
+
*/ const dialogCloseIconButtonStyle = (theme)=>{
|
|
71
|
+
return {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
top: theme.spacing(0.5),
|
|
74
|
+
right: theme.spacing(0.5)
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
const Dialog = ({ children , ...props })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Dialog, {
|
|
78
|
+
...props,
|
|
79
|
+
children: children
|
|
80
|
+
});
|
|
81
|
+
Dialog.Header = Header;
|
|
82
|
+
Dialog.Content = Content;
|
|
83
|
+
Dialog.PrimaryButton = PrimaryButton;
|
|
84
|
+
Dialog.SecondaryButton = SecondaryButton;
|
|
85
|
+
Dialog.Actions = _material.DialogActions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
_exportStar(require("./
|
|
18
|
-
_exportStar(require("./SeriesMarker"), exports);
|
|
17
|
+
_exportStar(require("./Dialog"), exports);
|
|
19
18
|
function _exportStar(from, to) {
|
|
20
19
|
Object.keys(from).forEach(function(k) {
|
|
21
20
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
package/dist/cjs/Drawer/index.js
CHANGED
package/dist/cjs/EChart.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -22,13 +22,7 @@ const _jsxRuntime = require("react/jsx-runtime");
|
|
|
22
22
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
23
23
|
const _core = require("echarts/core");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
|
-
const
|
|
26
|
-
const _isEqual = /*#__PURE__*/ _interopRequireDefault(require("lodash/isEqual"));
|
|
27
|
-
function _interopRequireDefault(obj) {
|
|
28
|
-
return obj && obj.__esModule ? obj : {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
|
25
|
+
const _lodashEs = require("lodash-es");
|
|
32
26
|
function _getRequireWildcardCache(nodeInterop) {
|
|
33
27
|
if (typeof WeakMap !== "function") return null;
|
|
34
28
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -114,7 +108,7 @@ const EChart = /*#__PURE__*/ _react.default.memo(function EChart({ option , them
|
|
|
114
108
|
]);
|
|
115
109
|
// Update chart data when option changes
|
|
116
110
|
(0, _react.useEffect)(()=>{
|
|
117
|
-
if (prevOption.current === undefined || (0,
|
|
111
|
+
if (prevOption.current === undefined || (0, _lodashEs.isEqual)(prevOption.current, option)) return;
|
|
118
112
|
if (!chartElement.current) return;
|
|
119
113
|
chartElement.current.setOption(option, true);
|
|
120
114
|
prevOption.current = option;
|
|
@@ -123,7 +117,7 @@ const EChart = /*#__PURE__*/ _react.default.memo(function EChart({ option , them
|
|
|
123
117
|
]);
|
|
124
118
|
// Resize chart, cleanup listener on unmount
|
|
125
119
|
(0, _react.useLayoutEffect)(()=>{
|
|
126
|
-
const updateSize = (0,
|
|
120
|
+
const updateSize = (0, _lodashEs.debounce)(()=>{
|
|
127
121
|
if (!chartElement.current) return;
|
|
128
122
|
chartElement.current.resize();
|
|
129
123
|
}, 200);
|
|
@@ -149,7 +143,7 @@ const EChart = /*#__PURE__*/ _react.default.memo(function EChart({ option , them
|
|
|
149
143
|
onEvents
|
|
150
144
|
]);
|
|
151
145
|
(0, _react.useEffect)(()=>{
|
|
152
|
-
const updateSize = (0,
|
|
146
|
+
const updateSize = (0, _lodashEs.debounce)(()=>{
|
|
153
147
|
if (!chartElement.current) return;
|
|
154
148
|
chartElement.current.resize();
|
|
155
149
|
}, 200);
|
package/dist/cjs/ErrorAlert.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -205,7 +205,8 @@ function GaugeChart(props) {
|
|
|
205
205
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_echart.EChart, {
|
|
206
206
|
sx: {
|
|
207
207
|
width: width,
|
|
208
|
-
height: height
|
|
208
|
+
height: height,
|
|
209
|
+
padding: `${chartsTheme.container.padding.default}px`
|
|
209
210
|
},
|
|
210
211
|
option: option,
|
|
211
212
|
theme: chartsTheme.echartsTheme
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -14,15 +14,9 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
get: all[name]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
_export(exports, {
|
|
24
|
-
TooltipPlacement: ()=>TooltipPlacement,
|
|
25
|
-
InfoTooltip: ()=>InfoTooltip
|
|
17
|
+
Object.defineProperty(exports, "InfoTooltip", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>InfoTooltip
|
|
26
20
|
});
|
|
27
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
28
22
|
const _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
|
|
@@ -32,18 +26,11 @@ function _interopRequireDefault(obj) {
|
|
|
32
26
|
default: obj
|
|
33
27
|
};
|
|
34
28
|
}
|
|
35
|
-
var TooltipPlacement;
|
|
36
|
-
(function(TooltipPlacement) {
|
|
37
|
-
TooltipPlacement["Top"] = 'top';
|
|
38
|
-
TooltipPlacement["Left"] = 'left';
|
|
39
|
-
TooltipPlacement["Right"] = 'right';
|
|
40
|
-
TooltipPlacement["Bottom"] = 'bottom';
|
|
41
|
-
})(TooltipPlacement || (TooltipPlacement = {}));
|
|
42
29
|
const InfoTooltip = ({ id , title , description , placement , children , enterDelay , enterNextDelay })=>{
|
|
43
30
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(StyledTooltip, {
|
|
44
31
|
arrow: true,
|
|
45
32
|
id: id,
|
|
46
|
-
placement: placement !== null && placement !== void 0 ? placement :
|
|
33
|
+
placement: placement !== null && placement !== void 0 ? placement : 'top',
|
|
47
34
|
title: /*#__PURE__*/ (0, _jsxRuntime.jsx)(TooltipContent, {
|
|
48
35
|
title: title,
|
|
49
36
|
description: description
|
package/dist/cjs/JSONEditor.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -23,7 +23,7 @@ const _material = require("@mui/material");
|
|
|
23
23
|
const _listLegend = require("./ListLegend");
|
|
24
24
|
const _compactLegend = require("./CompactLegend");
|
|
25
25
|
function Legend({ width , height , options , data }) {
|
|
26
|
-
if (options.position === '
|
|
26
|
+
if (options.position === 'Right') {
|
|
27
27
|
return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
28
28
|
sx: {
|
|
29
29
|
width: width,
|
|
@@ -39,8 +39,19 @@ function Legend({ width , height , options , data }) {
|
|
|
39
39
|
})
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
return /*#__PURE__*/ (0, _jsxRuntime.
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
43
|
+
sx: {
|
|
44
|
+
width: width,
|
|
45
|
+
height: height,
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
bottom: 0
|
|
48
|
+
},
|
|
49
|
+
children: [
|
|
50
|
+
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_compactLegend.CompactLegend, {
|
|
51
|
+
items: data,
|
|
52
|
+
height: height
|
|
53
|
+
}),
|
|
54
|
+
";"
|
|
55
|
+
]
|
|
45
56
|
});
|
|
46
57
|
}
|
package/dist/cjs/Legend/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -20,21 +20,10 @@ Object.defineProperty(exports, "LegendOptionsEditor", {
|
|
|
20
20
|
});
|
|
21
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _material = require("@mui/material");
|
|
23
|
+
const _errorAlert = require("../ErrorAlert");
|
|
23
24
|
const _model = require("../model");
|
|
24
25
|
const _optionsEditorLayout = require("../OptionsEditorLayout");
|
|
25
|
-
const
|
|
26
|
-
'bottom',
|
|
27
|
-
'right'
|
|
28
|
-
];
|
|
29
|
-
const LEGEND_POSITIONS_CONFIG = {
|
|
30
|
-
bottom: {
|
|
31
|
-
label: 'Bottom'
|
|
32
|
-
},
|
|
33
|
-
right: {
|
|
34
|
-
label: 'Right'
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
const POSITION_OPTIONS = Object.entries(LEGEND_POSITIONS_CONFIG).map(([id, config])=>{
|
|
26
|
+
const POSITION_OPTIONS = Object.entries(_model.LEGEND_POSITIONS_CONFIG).map(([id, config])=>{
|
|
38
27
|
return {
|
|
39
28
|
id: id,
|
|
40
29
|
...config
|
|
@@ -54,11 +43,17 @@ function LegendOptionsEditor({ value , onChange }) {
|
|
|
54
43
|
position: newValue.id
|
|
55
44
|
});
|
|
56
45
|
};
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
46
|
+
const isValidLegend = (0, _model.validateLegendSpec)(value);
|
|
47
|
+
const currentPosition = (0, _model.getLegendPosition)(value === null || value === void 0 ? void 0 : value.position);
|
|
48
|
+
const legendConfig = _model.LEGEND_POSITIONS_CONFIG[currentPosition];
|
|
60
49
|
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
61
50
|
children: [
|
|
51
|
+
!isValidLegend && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_errorAlert.ErrorAlert, {
|
|
52
|
+
error: {
|
|
53
|
+
name: 'invalid-legend',
|
|
54
|
+
message: 'Invalid legend spec'
|
|
55
|
+
}
|
|
56
|
+
}),
|
|
62
57
|
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_optionsEditorLayout.OptionsEditorControl, {
|
|
63
58
|
label: "Show",
|
|
64
59
|
control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Switch, {
|
|
@@ -71,7 +66,7 @@ function LegendOptionsEditor({ value , onChange }) {
|
|
|
71
66
|
control: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Autocomplete, {
|
|
72
67
|
value: {
|
|
73
68
|
...legendConfig,
|
|
74
|
-
id:
|
|
69
|
+
id: currentPosition
|
|
75
70
|
},
|
|
76
71
|
options: POSITION_OPTIONS,
|
|
77
72
|
isOptionEqualToValue: (option, value)=>option.id === value.id,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -37,12 +37,33 @@ describe('LegendOptionsEditor', ()=>{
|
|
|
37
37
|
name: 'Show'
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
+
const getLegendPositionSelector = ()=>{
|
|
41
|
+
return _react.screen.getByRole('combobox', {
|
|
42
|
+
name: 'Position'
|
|
43
|
+
});
|
|
44
|
+
};
|
|
40
45
|
it('can change legend visibility by clicking', ()=>{
|
|
41
46
|
const onChange = jest.fn();
|
|
42
47
|
renderLegendOptionsEditor(undefined, onChange);
|
|
48
|
+
expect(getLegendPositionSelector()).toBeDisabled();
|
|
43
49
|
_userEvent.default.click(getLegendShowSwitch());
|
|
44
50
|
expect(onChange).toHaveBeenCalledWith({
|
|
45
|
-
position: '
|
|
51
|
+
position: 'Bottom'
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
it('should allow changing legend position', ()=>{
|
|
55
|
+
const onChange = jest.fn();
|
|
56
|
+
renderLegendOptionsEditor({
|
|
57
|
+
position: 'Bottom'
|
|
58
|
+
}, onChange);
|
|
59
|
+
expect(getLegendPositionSelector()).toBeEnabled();
|
|
60
|
+
_userEvent.default.click(getLegendPositionSelector());
|
|
61
|
+
const positionRightOption = _react.screen.getByRole('option', {
|
|
62
|
+
name: 'Right'
|
|
63
|
+
});
|
|
64
|
+
_userEvent.default.click(positionRightOption);
|
|
65
|
+
expect(onChange).toHaveBeenCalledWith({
|
|
66
|
+
position: 'Right'
|
|
46
67
|
});
|
|
47
68
|
});
|
|
48
69
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -28,7 +28,7 @@ const _renderers = require("echarts/renderers");
|
|
|
28
28
|
const _echart = require("../EChart");
|
|
29
29
|
const _graph = require("../model/graph");
|
|
30
30
|
const _chartsThemeProvider = require("../context/ChartsThemeProvider");
|
|
31
|
-
const
|
|
31
|
+
const _timeSeriesTooltip = require("../TimeSeriesTooltip");
|
|
32
32
|
const _timeZoneProvider = require("../context/TimeZoneProvider");
|
|
33
33
|
const _utils = require("./utils");
|
|
34
34
|
(0, _core.use)([
|
|
@@ -176,7 +176,7 @@ function LineChart({ height , data , yAxis , unit , grid , legend , onDataZoom ,
|
|
|
176
176
|
},
|
|
177
177
|
onDoubleClick: handleOnDoubleClick,
|
|
178
178
|
children: [
|
|
179
|
-
showTooltip === true && /*#__PURE__*/ (0, _jsxRuntime.jsx)(
|
|
179
|
+
showTooltip === true && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_timeSeriesTooltip.TimeSeriesTooltip, {
|
|
180
180
|
chartRef: chartRef,
|
|
181
181
|
chartData: data,
|
|
182
182
|
wrapLabels: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -27,14 +27,9 @@ _export(exports, {
|
|
|
27
27
|
getFormattedDate: ()=>getFormattedDate,
|
|
28
28
|
getYAxes: ()=>getYAxes
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const _lodashEs = require("lodash-es");
|
|
31
31
|
const _model = require("../model");
|
|
32
32
|
const _utils = require("../utils");
|
|
33
|
-
function _interopRequireDefault(obj) {
|
|
34
|
-
return obj && obj.__esModule ? obj : {
|
|
35
|
-
default: obj
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
33
|
function enableDataZoom(chart) {
|
|
39
34
|
const chartModel = chart['_model'];
|
|
40
35
|
if (chartModel === undefined) return;
|
|
@@ -95,6 +90,6 @@ function getYAxes(yAxis, unit) {
|
|
|
95
90
|
}
|
|
96
91
|
};
|
|
97
92
|
return [
|
|
98
|
-
(0,
|
|
93
|
+
(0, _lodashEs.merge)(Y_AXIS_DEFAULT, yAxis)
|
|
99
94
|
];
|
|
100
95
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "StatChart", {
|
|
|
21
21
|
const _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
23
23
|
const _material = require("@mui/material");
|
|
24
|
-
const
|
|
24
|
+
const _lodashEs = require("lodash-es");
|
|
25
25
|
const _core = require("echarts/core");
|
|
26
26
|
const _charts = require("echarts/charts");
|
|
27
27
|
const _components = require("echarts/components");
|
|
@@ -29,11 +29,6 @@ const _renderers = require("echarts/renderers");
|
|
|
29
29
|
const _chartsThemeProvider = require("../context/ChartsThemeProvider");
|
|
30
30
|
const _units = require("../model/units");
|
|
31
31
|
const _echart = require("../EChart");
|
|
32
|
-
function _interopRequireDefault(obj) {
|
|
33
|
-
return obj && obj.__esModule ? obj : {
|
|
34
|
-
default: obj
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
32
|
function _getRequireWildcardCache(nodeInterop) {
|
|
38
33
|
if (typeof WeakMap !== "function") return null;
|
|
39
34
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -82,7 +77,6 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
82
77
|
_components.TooltipComponent,
|
|
83
78
|
_renderers.CanvasRenderer
|
|
84
79
|
]);
|
|
85
|
-
const PANEL_PADDING = 32;
|
|
86
80
|
const MIN_VALUE_SIZE = 12;
|
|
87
81
|
const MAX_VALUE_SIZE = 36;
|
|
88
82
|
function StatChart(props) {
|
|
@@ -104,7 +98,7 @@ function StatChart(props) {
|
|
|
104
98
|
animation: false,
|
|
105
99
|
silent: true
|
|
106
100
|
};
|
|
107
|
-
const mergedSeries = (0,
|
|
101
|
+
const mergedSeries = (0, _lodashEs.merge)(lineSeries, sparkline);
|
|
108
102
|
statSeries.push(mergedSeries);
|
|
109
103
|
}
|
|
110
104
|
const option = {
|
|
@@ -143,27 +137,37 @@ function StatChart(props) {
|
|
|
143
137
|
// adjusts fontSize depending on number of characters, clamp also used in fontSize attribute
|
|
144
138
|
const charactersAdjust = formattedValue.length;
|
|
145
139
|
const valueSize = isLargePanel === true ? MAX_VALUE_SIZE : Math.min(width, height) / charactersAdjust;
|
|
140
|
+
const containerPadding = `${chartsTheme.container.padding.default}px`;
|
|
146
141
|
return /*#__PURE__*/ (0, _jsxRuntime.jsxs)(_material.Box, {
|
|
142
|
+
sx: {
|
|
143
|
+
height: '100%',
|
|
144
|
+
width: '100%',
|
|
145
|
+
display: 'flex',
|
|
146
|
+
flexDirection: 'column'
|
|
147
|
+
},
|
|
147
148
|
children: [
|
|
148
149
|
/*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
|
|
149
150
|
variant: "h3",
|
|
150
151
|
sx: (theme)=>({
|
|
151
152
|
color: theme.palette.text.primary,
|
|
152
|
-
fontSize: `clamp(${MIN_VALUE_SIZE}px, ${valueSize}px, ${MAX_VALUE_SIZE}px)
|
|
153
|
+
fontSize: `clamp(${MIN_VALUE_SIZE}px, ${valueSize}px, ${MAX_VALUE_SIZE}px)`,
|
|
154
|
+
padding: `${containerPadding} ${containerPadding} 0 ${containerPadding}`
|
|
153
155
|
}),
|
|
154
156
|
children: formattedValue
|
|
155
157
|
}),
|
|
156
|
-
sparkline !== undefined && /*#__PURE__*/ (0, _jsxRuntime.jsx)(
|
|
158
|
+
sparkline !== undefined && /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
|
|
157
159
|
sx: {
|
|
158
|
-
|
|
159
|
-
height: height,
|
|
160
|
-
position: 'absolute',
|
|
161
|
-
bottom: 0,
|
|
162
|
-
left: 0
|
|
160
|
+
flex: 1
|
|
163
161
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_echart.EChart, {
|
|
163
|
+
sx: {
|
|
164
|
+
width: '100%',
|
|
165
|
+
height: '100%'
|
|
166
|
+
},
|
|
167
|
+
option: option,
|
|
168
|
+
theme: chartsTheme.echartsTheme,
|
|
169
|
+
renderer: "svg"
|
|
170
|
+
})
|
|
167
171
|
})
|
|
168
172
|
]
|
|
169
173
|
});
|