@perses-dev/components 0.43.0-rc2 → 0.44.0-rc0
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/dist/BarChart/BarChart.d.ts +1 -2
- package/dist/BarChart/BarChart.d.ts.map +1 -1
- package/dist/BarChart/BarChart.js +2 -2
- package/dist/BarChart/BarChart.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +1 -2
- package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/ColorPicker/ColorPicker.js +1 -1
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts +1 -2
- package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +2 -2
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +2 -2
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -2
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +1 -2
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +1 -2
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +1 -2
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +1 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js +2 -2
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +1 -1
- package/dist/DateTimeRangePicker/utils.js.map +1 -1
- package/dist/Dialog/Dialog.d.ts +6 -6
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +5 -5
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +1 -2
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/Drawer/Drawer.d.ts +1 -2
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/EChart/EChart.d.ts +7 -7
- package/dist/EChart/EChart.d.ts.map +1 -1
- package/dist/EChart/EChart.js +1 -1
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/ErrorAlert.d.ts +1 -2
- package/dist/ErrorAlert.d.ts.map +1 -1
- package/dist/ErrorAlert.js +1 -1
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -3
- package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
- package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
- package/dist/FormatControls/FormatControls.d.ts +1 -2
- package/dist/FormatControls/FormatControls.d.ts.map +1 -1
- package/dist/FormatControls/FormatControls.js +2 -2
- package/dist/FormatControls/FormatControls.js.map +1 -1
- package/dist/GaugeChart/GaugeChart.d.ts +3 -4
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +1 -1
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.d.ts +2 -2
- package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +4 -4
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/JSONEditor.d.ts +2 -3
- package/dist/JSONEditor.d.ts.map +1 -1
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +1 -2
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +1 -2
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +1 -1
- 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.d.ts +1 -2
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +2 -2
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +5 -9
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +1 -2
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +2 -2
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/Legend/legend-model.d.ts +2 -2
- package/dist/Legend/legend-model.d.ts.map +1 -1
- package/dist/Legend/legend-model.js.map +1 -1
- package/dist/LineChart/LineChart.js +9 -11
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/ModeSelector/ModeSelector.d.ts +2 -3
- package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
- package/dist/ModeSelector/ModeSelector.js +2 -2
- package/dist/ModeSelector/ModeSelector.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -3
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +1 -2
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SortSelector/SortSelector.d.ts +2 -3
- package/dist/SortSelector/SortSelector.d.ts.map +1 -1
- package/dist/SortSelector/SortSelector.js +2 -2
- package/dist/SortSelector/SortSelector.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts +1 -2
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +3 -3
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.js +2 -2
- package/dist/StatChart/calculateFontSize.js.map +1 -1
- package/dist/Table/InnerTable.d.ts +2 -2
- package/dist/Table/InnerTable.d.ts.map +1 -1
- package/dist/Table/InnerTable.js +2 -2
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +1 -2
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +3 -3
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.d.ts +2 -2
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableCell.d.ts +1 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +2 -2
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.d.ts +1 -2
- package/dist/Table/TableCheckbox.d.ts.map +1 -1
- package/dist/Table/TableCheckbox.js +1 -1
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableHead.d.ts +2 -2
- package/dist/Table/TableHead.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.d.ts +1 -2
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +1 -1
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/TableRow.d.ts +1 -1
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts +2 -2
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +2 -2
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/VirtualizedTableContainer.d.ts +2 -2
- package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.d.ts +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +6 -6
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +2 -2
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +1 -2
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +1 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.js +3 -3
- package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.d.ts +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.d.ts.map +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +1 -2
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js +6 -5
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/TimeChart/TimeChart.d.ts.map +1 -1
- package/dist/TimeChart/TimeChart.js +10 -14
- package/dist/TimeChart/TimeChart.js.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.js +6 -5
- package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +1 -2
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +1 -2
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +1 -2
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts +1 -2
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js +2 -2
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js +2 -2
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +12 -9
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +12 -25
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +4 -10
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +2 -1
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/YAxisLabel.d.ts +1 -2
- package/dist/YAxisLabel.d.ts.map +1 -1
- package/dist/YAxisLabel.js +1 -1
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/BarChart/BarChart.js +2 -2
- package/dist/cjs/ColorPicker/ColorPicker.js +4 -2
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +2 -2
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -2
- package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +2 -2
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +1 -1
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +2 -2
- package/dist/cjs/DateTimeRangePicker/utils.js +3 -3
- package/dist/cjs/Dialog/Dialog.js +5 -5
- package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -1
- package/dist/cjs/Drawer/Drawer.js +1 -1
- package/dist/cjs/EChart/EChart.js +4 -2
- package/dist/cjs/ErrorAlert.js +1 -1
- package/dist/cjs/FontSizeSelector/FontSizeSelector.js +2 -2
- package/dist/cjs/FormatControls/FormatControls.js +2 -2
- package/dist/cjs/GaugeChart/GaugeChart.js +1 -1
- package/dist/cjs/InfoTooltip/InfoTooltip.js +4 -4
- package/dist/cjs/Legend/CompactLegend.js +1 -1
- package/dist/cjs/Legend/Legend.js +1 -1
- package/dist/cjs/Legend/LegendColorBadge.js +1 -1
- package/dist/cjs/Legend/ListLegend.js +1 -1
- package/dist/cjs/Legend/ListLegendItem.js +8 -10
- package/dist/cjs/Legend/TableLegend.js +2 -2
- package/dist/cjs/LineChart/LineChart.js +9 -11
- package/dist/cjs/ModeSelector/ModeSelector.js +2 -2
- 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/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +2 -2
- package/dist/cjs/SortSelector/SortSelector.js +2 -2
- package/dist/cjs/StatChart/StatChart.js +3 -3
- package/dist/cjs/StatChart/calculateFontSize.js +2 -2
- package/dist/cjs/Table/InnerTable.js +2 -2
- package/dist/cjs/Table/Table.js +3 -3
- package/dist/cjs/Table/TableCell.js +2 -2
- package/dist/cjs/Table/TableCheckbox.js +1 -1
- package/dist/cjs/Table/TableHeaderCell.js +1 -1
- package/dist/cjs/Table/VirtualizedTable.js +2 -2
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
- package/dist/cjs/Table/model/table-model.js +2 -2
- package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +3 -3
- package/dist/cjs/ThresholdsEditor/ThresholdInput.js +1 -1
- package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +9 -6
- package/dist/cjs/TimeChart/TimeChart.js +10 -14
- package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +6 -5
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +3 -3
- package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +2 -2
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +2 -2
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +22 -19
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +31 -37
- package/dist/cjs/TimeSeriesTooltip/utils.js +2 -1
- package/dist/cjs/YAxisLabel.js +1 -1
- package/dist/cjs/context/ChartsProvider.js +4 -2
- package/dist/cjs/context/SnackbarProvider.js +1 -1
- package/dist/cjs/context/TimeZoneProvider.js +4 -2
- package/dist/cjs/model/graph.js +3 -3
- package/dist/cjs/test-utils/theme.js +3 -3
- package/dist/cjs/theme/component-overrides/alert.js +4 -4
- package/dist/cjs/theme/component-overrides/paper.js +1 -1
- package/dist/cjs/theme/palette/colors/common.js +3 -3
- package/dist/cjs/theme/theme.js +1 -1
- package/dist/cjs/utils/axis.js +3 -3
- package/dist/cjs/utils/chart-actions.js +21 -19
- package/dist/cjs/utils/format.js +3 -3
- package/dist/cjs/utils/mathjs.js +1 -1
- package/dist/cjs/utils/theme-gen.js +1 -1
- package/dist/context/ChartsProvider.d.ts +1 -1
- package/dist/context/ChartsProvider.d.ts.map +1 -1
- package/dist/context/ChartsProvider.js +1 -1
- package/dist/context/ChartsProvider.js.map +1 -1
- package/dist/context/SnackbarProvider.d.ts +2 -2
- package/dist/context/SnackbarProvider.d.ts.map +1 -1
- package/dist/context/SnackbarProvider.js +1 -1
- package/dist/context/SnackbarProvider.js.map +1 -1
- package/dist/context/TimeZoneProvider.d.ts +1 -1
- package/dist/context/TimeZoneProvider.d.ts.map +1 -1
- package/dist/context/TimeZoneProvider.js +1 -1
- package/dist/context/TimeZoneProvider.js.map +1 -1
- package/dist/model/graph.d.ts +8 -8
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/theme.d.ts +1 -1
- package/dist/model/theme.d.ts.map +1 -1
- package/dist/model/theme.js.map +1 -1
- package/dist/model/timeOption.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/theme/component-overrides/alert.js +4 -4
- package/dist/theme/component-overrides/alert.js.map +1 -1
- package/dist/theme/component-overrides/paper.js +1 -1
- package/dist/theme/component-overrides/paper.js.map +1 -1
- package/dist/theme/palette/colors/types.d.ts +1 -1
- package/dist/theme/palette/colors/types.d.ts.map +1 -1
- package/dist/theme/palette/colors/types.js.map +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/types/ThemeExtension.d.js.map +1 -1
- package/dist/utils/axis.js.map +1 -1
- package/dist/utils/chart-actions.d.ts +1 -1
- package/dist/utils/chart-actions.d.ts.map +1 -1
- package/dist/utils/chart-actions.js +9 -7
- package/dist/utils/chart-actions.js.map +1 -1
- package/dist/utils/combine-sx.js.map +1 -1
- package/dist/utils/component-ids.js.map +1 -1
- package/dist/utils/format.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 +1 -1
- package/dist/utils/theme-gen.d.ts.map +1 -1
- package/dist/utils/theme-gen.js +1 -1
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +4 -4
|
@@ -28,7 +28,7 @@ function _interop_require_default(obj) {
|
|
|
28
28
|
default: obj
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
const OptionsEditorGroup = ({ title
|
|
31
|
+
const OptionsEditorGroup = ({ title, children, icon })=>{
|
|
32
32
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
33
33
|
children: [
|
|
34
34
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _react = require("react");
|
|
26
26
|
function RefreshIntervalPicker(props) {
|
|
27
|
-
const { value
|
|
27
|
+
const { value, onChange, timeOptions, height } = props;
|
|
28
28
|
const formattedValue = value;
|
|
29
29
|
// If the dashboard refresh interval is not provided in timeOptions, it will create a specific option for the select
|
|
30
30
|
const customInterval = (0, _react.useMemo)(()=>{
|
|
@@ -22,9 +22,9 @@ Object.defineProperty(exports, "SettingsAutocomplete", {
|
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
|
-
function SettingsAutocomplete({ options
|
|
25
|
+
function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
26
26
|
...params
|
|
27
|
-
})
|
|
27
|
+
}), ...otherProps }) {
|
|
28
28
|
const getOptionLabel = (option)=>{
|
|
29
29
|
var _option_label;
|
|
30
30
|
return (_option_label = option.label) !== null && _option_label !== void 0 ? _option_label : option.id;
|
|
@@ -33,8 +33,8 @@ const SORT_OPTIONS = [
|
|
|
33
33
|
label: 'Descending'
|
|
34
34
|
}
|
|
35
35
|
];
|
|
36
|
-
function SortSelector({ onChange
|
|
37
|
-
const handleSortChange = (_, { id
|
|
36
|
+
function SortSelector({ onChange, value = 'desc' }) {
|
|
37
|
+
const handleSortChange = (_, { id })=>{
|
|
38
38
|
onChange(id);
|
|
39
39
|
};
|
|
40
40
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorLayout.OptionsEditorControl, {
|
|
@@ -51,7 +51,7 @@ const SERIES_NAME_FONT_WEIGHT = 400;
|
|
|
51
51
|
const VALUE_FONT_WEIGHT = 700;
|
|
52
52
|
function StatChart(props) {
|
|
53
53
|
var _data_seriesData, _data_seriesData1;
|
|
54
|
-
const { width
|
|
54
|
+
const { width, height, data, format, color, sparkline, showSeriesName, valueFontSize } = props;
|
|
55
55
|
const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
|
|
56
56
|
let formattedValue = '';
|
|
57
57
|
if (data.calculatedValue === null) {
|
|
@@ -185,7 +185,7 @@ function StatChart(props) {
|
|
|
185
185
|
}
|
|
186
186
|
const SeriesName = (0, _material.styled)(_material.Typography, {
|
|
187
187
|
shouldForwardProp: (prop)=>prop !== 'padding' && prop !== 'fontSize'
|
|
188
|
-
})(({ theme
|
|
188
|
+
})(({ theme, padding, fontSize })=>({
|
|
189
189
|
color: theme.palette.text.secondary,
|
|
190
190
|
padding: `${padding}px`,
|
|
191
191
|
fontSize: `${fontSize}px`,
|
|
@@ -195,7 +195,7 @@ const SeriesName = (0, _material.styled)(_material.Typography, {
|
|
|
195
195
|
}));
|
|
196
196
|
const Value = (0, _material.styled)(_material.Typography, {
|
|
197
197
|
shouldForwardProp: (prop)=>prop !== 'color' && prop !== 'padding' && prop !== 'fontSize' && prop !== 'sparkline'
|
|
198
|
-
})(({ theme
|
|
198
|
+
})(({ theme, color, padding, fontSize, sparkline })=>({
|
|
199
199
|
color: color !== null && color !== void 0 ? color : theme.palette.text.primary,
|
|
200
200
|
fontSize: `${fontSize}px`,
|
|
201
201
|
padding: sparkline ? `${padding}px ${padding}px 0 ${padding}px` : ` 0 ${padding}px`,
|
|
@@ -31,9 +31,9 @@ function getGlobalCanvasContext() {
|
|
|
31
31
|
}
|
|
32
32
|
return canvasContext;
|
|
33
33
|
}
|
|
34
|
-
function useOptimalFontSize({ text
|
|
34
|
+
function useOptimalFontSize({ text, fontWeight, width, height, lineHeight, maxSize, fontSizeOverride }) {
|
|
35
35
|
const ctx = getGlobalCanvasContext();
|
|
36
|
-
const { echartsTheme
|
|
36
|
+
const { echartsTheme } = (0, _ChartsProvider.useChartsTheme)();
|
|
37
37
|
// if user has selected a font size in the settings, use it instead of calculating the optimal size
|
|
38
38
|
if (fontSizeOverride !== undefined) {
|
|
39
39
|
return Number(fontSizeOverride);
|
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "InnerTable", {
|
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _react = require("react");
|
|
26
|
-
const StyledMuiTable = (0, _material.styled)(_material.Table)(({ theme
|
|
26
|
+
const StyledMuiTable = (0, _material.styled)(_material.Table)(({ theme })=>({
|
|
27
27
|
// This value is needed to have a consistent table layout when scrolling.
|
|
28
28
|
tableLayout: 'fixed',
|
|
29
29
|
borderCollapse: 'separate',
|
|
@@ -33,7 +33,7 @@ const TABLE_DENSITY_CONFIG = {
|
|
|
33
33
|
compact: 'small',
|
|
34
34
|
standard: 'medium'
|
|
35
35
|
};
|
|
36
|
-
const InnerTable = /*#__PURE__*/ (0, _react.forwardRef)(function InnerTable({ density
|
|
36
|
+
const InnerTable = /*#__PURE__*/ (0, _react.forwardRef)(function InnerTable({ density, ...otherProps }, ref) {
|
|
37
37
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledMuiTable, {
|
|
38
38
|
...otherProps,
|
|
39
39
|
tabIndex: -1,
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -35,7 +35,7 @@ const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
|
35
35
|
// does not do deep equality checking for objects and arrays.
|
|
36
36
|
const DEFAULT_ROW_SELECTION = {};
|
|
37
37
|
const DEFAULT_SORTING = [];
|
|
38
|
-
function Table({ data
|
|
38
|
+
function Table({ data, columns, density = 'standard', checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, rowSelectionVariant = 'standard', ...otherProps }) {
|
|
39
39
|
const theme = (0, _material.useTheme)();
|
|
40
40
|
const handleRowSelectionChange = (rowSelectionUpdater)=>{
|
|
41
41
|
const newRowSelection = typeof rowSelectionUpdater === 'function' ? rowSelectionUpdater(rowSelection) : rowSelectionUpdater;
|
|
@@ -77,7 +77,7 @@ function Table({ data , columns , density ='standard' , checkboxSelection , onRo
|
|
|
77
77
|
return {
|
|
78
78
|
id: 'checkboxRowSelect',
|
|
79
79
|
size: 28,
|
|
80
|
-
header: ({ table
|
|
80
|
+
header: ({ table })=>{
|
|
81
81
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCheckbox.TableCheckbox, {
|
|
82
82
|
checked: table.getIsAllRowsSelected(),
|
|
83
83
|
indeterminate: table.getIsSomeRowsSelected(),
|
|
@@ -86,7 +86,7 @@ function Table({ data , columns , density ='standard' , checkboxSelection , onRo
|
|
|
86
86
|
density: density
|
|
87
87
|
});
|
|
88
88
|
},
|
|
89
|
-
cell: ({ row
|
|
89
|
+
cell: ({ row, table })=>{
|
|
90
90
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCheckbox.TableCheckbox, {
|
|
91
91
|
checked: row.getIsSelected(),
|
|
92
92
|
indeterminate: row.getIsSomeSelected(),
|
|
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _react = require("react");
|
|
26
26
|
const _tablemodel = require("./model/table-model");
|
|
27
|
-
const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme
|
|
27
|
+
const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme })=>({
|
|
28
28
|
padding: 0,
|
|
29
29
|
backgroundColor: 'inherit',
|
|
30
30
|
'&.MuiTableCell-head': {
|
|
@@ -39,7 +39,7 @@ const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme
|
|
|
39
39
|
borderRadius: 0
|
|
40
40
|
}
|
|
41
41
|
}));
|
|
42
|
-
function TableCell({ children
|
|
42
|
+
function TableCell({ children, density, variant, width, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, ...otherProps }) {
|
|
43
43
|
const theme = (0, _material.useTheme)();
|
|
44
44
|
const elRef = (0, _react.useRef)();
|
|
45
45
|
const isHeader = variant === 'head';
|
|
@@ -22,7 +22,7 @@ Object.defineProperty(exports, "TableCheckbox", {
|
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
|
-
function TableCheckbox({ color
|
|
25
|
+
function TableCheckbox({ color, density, ...otherProps }) {
|
|
26
26
|
const isCompact = density === 'compact';
|
|
27
27
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Checkbox, {
|
|
28
28
|
size: isCompact ? 'small' : 'medium',
|
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "TableHeaderCell", {
|
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _TableCell = require("./TableCell");
|
|
26
|
-
function TableHeaderCell({ onSort
|
|
26
|
+
function TableHeaderCell({ onSort, sortDirection, nextSortDirection, children, ...cellProps }) {
|
|
27
27
|
const showSortLabel = !!onSort;
|
|
28
28
|
const headerText = /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
29
29
|
noWrap: true,
|
|
@@ -33,7 +33,7 @@ const _TableHeaderCell = require("./TableHeaderCell");
|
|
|
33
33
|
const _TableCell = require("./TableCell");
|
|
34
34
|
const _VirtualizedTableContainer = require("./VirtualizedTableContainer");
|
|
35
35
|
const _useVirtualizedTableKeyboardNav = require("./hooks/useVirtualizedTableKeyboardNav");
|
|
36
|
-
function VirtualizedTable({ width
|
|
36
|
+
function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver, onRowMouseOut, rows, columns, headers }) {
|
|
37
37
|
const virtuosoRef = (0, _react.useRef)(null);
|
|
38
38
|
// Use a ref for these values because they are only needed for keyboard
|
|
39
39
|
// focus interactions and setting them on state will lead to a significant
|
|
@@ -71,7 +71,7 @@ function VirtualizedTable({ width , height , density , onRowClick , onRowMouseOv
|
|
|
71
71
|
},
|
|
72
72
|
TableHead: _TableHead.TableHead,
|
|
73
73
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
74
|
-
TableRow: ({ item
|
|
74
|
+
TableRow: ({ item, ...props })=>{
|
|
75
75
|
const index = props['data-index'];
|
|
76
76
|
const row = rows[index];
|
|
77
77
|
if (!row) {
|
|
@@ -34,7 +34,7 @@ const ARROW_KEYS = [
|
|
|
34
34
|
function isArrowKey(key) {
|
|
35
35
|
return ARROW_KEYS.includes(key);
|
|
36
36
|
}
|
|
37
|
-
function useTableKeyboardNav({ maxRows
|
|
37
|
+
function useTableKeyboardNav({ maxRows, maxColumns, onActiveCellChange }) {
|
|
38
38
|
const [activeCell, setActiveCell] = (0, _react.useState)(DEFAULT_ACTIVE_CELL);
|
|
39
39
|
const [isActive, setIsActive] = (0, _react.useState)(false);
|
|
40
40
|
const handleCellFocus = (cellPosition)=>{
|
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "useVirtualizedTableKeyboardNav", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _useTableKeyboardNav = require("./useTableKeyboardNav");
|
|
24
|
-
function useVirtualizedTableKeyboardNav({ visibleRange
|
|
24
|
+
function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, maxColumns }) {
|
|
25
25
|
const baseKeyboard = (0, _useTableKeyboardNav.useTableKeyboardNav)({
|
|
26
26
|
maxRows,
|
|
27
27
|
maxColumns,
|
|
@@ -35,7 +35,7 @@ function calculateTableCellHeight(lineHeight, paddingY) {
|
|
|
35
35
|
const verticalPaddingNum = typeof paddingY === 'string' ? parseInt(paddingY, 10) : paddingY;
|
|
36
36
|
return lineHeightNum + verticalPaddingNum * 2;
|
|
37
37
|
}
|
|
38
|
-
function getTableCellLayout(theme, density, { isLastColumn
|
|
38
|
+
function getTableCellLayout(theme, density, { isLastColumn, isFirstColumn } = {}) {
|
|
39
39
|
if (density === 'compact') {
|
|
40
40
|
const paddingY = theme.spacing(0.5);
|
|
41
41
|
const basePaddingX = theme.spacing(0.5);
|
|
@@ -65,7 +65,7 @@ function getTableCellLayout(theme, density, { isLastColumn , isFirstColumn } =
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
function persesColumnsToTanstackColumns(columns) {
|
|
68
|
-
const tableCols = columns.map(({ width
|
|
68
|
+
const tableCols = columns.map(({ width, align, headerDescription, cellDescription, enableSorting, ...otherProps })=>{
|
|
69
69
|
// Tanstack Table does not support an "auto" value to naturally size to fit
|
|
70
70
|
// the space in a table. We translate our custom "auto" setting to 0 size
|
|
71
71
|
// for these columns, so it is easy to fall back to auto when rendering.
|
|
@@ -31,7 +31,7 @@ function _interop_require_default(obj) {
|
|
|
31
31
|
default: obj
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function ThresholdColorPicker({ color
|
|
34
|
+
function ThresholdColorPicker({ color, onColorChange, label }) {
|
|
35
35
|
const [anchorEl, setAnchorEl] = _react.default.useState(null);
|
|
36
36
|
const isOpen = Boolean(anchorEl);
|
|
37
37
|
const openColorPicker = (event)=>{
|
|
@@ -40,7 +40,7 @@ function ThresholdColorPicker({ color , onColorChange , label }) {
|
|
|
40
40
|
const closeColorPicker = ()=>{
|
|
41
41
|
setAnchorEl(null);
|
|
42
42
|
};
|
|
43
|
-
const { thresholds: { defaultColor
|
|
43
|
+
const { thresholds: { defaultColor, palette } } = (0, _ChartsProvider.useChartsTheme)();
|
|
44
44
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
45
45
|
children: [
|
|
46
46
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(ColorIconButton, {
|
|
@@ -83,7 +83,7 @@ function ThresholdColorPicker({ color , onColorChange , label }) {
|
|
|
83
83
|
}
|
|
84
84
|
const ColorIconButton = (0, _material.styled)(_material.IconButton, {
|
|
85
85
|
shouldForwardProp: (props)=>props !== 'isSelected' && props !== 'iconColor'
|
|
86
|
-
})(({ iconColor
|
|
86
|
+
})(({ iconColor, isSelected })=>({
|
|
87
87
|
backgroundColor: isSelected && iconColor ? `${iconColor}3F` : 'undefined',
|
|
88
88
|
color: iconColor
|
|
89
89
|
}));
|
|
@@ -30,7 +30,7 @@ function _interop_require_default(obj) {
|
|
|
30
30
|
default: obj
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function ThresholdInput({ inputRef
|
|
33
|
+
function ThresholdInput({ inputRef, label, color, value, mode, onChange, onColorChange, onBlur, onDelete }) {
|
|
34
34
|
const [key, setKey] = (0, _react.useState)(0); // use key to cause input to lose focus when pressing enter
|
|
35
35
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
36
36
|
flex: 1,
|
|
@@ -57,7 +57,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
57
57
|
if (cache && cache.has(obj)) {
|
|
58
58
|
return cache.get(obj);
|
|
59
59
|
}
|
|
60
|
-
var newObj = {
|
|
60
|
+
var newObj = {
|
|
61
|
+
__proto__: null
|
|
62
|
+
};
|
|
61
63
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
62
64
|
for(var key in obj){
|
|
63
65
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -76,9 +78,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
76
78
|
return newObj;
|
|
77
79
|
}
|
|
78
80
|
const DEFAULT_STEP = 10;
|
|
79
|
-
function ThresholdsEditor({ thresholds
|
|
81
|
+
function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMode }) {
|
|
80
82
|
const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
|
|
81
|
-
const { thresholds: { defaultColor
|
|
83
|
+
const { thresholds: { defaultColor, palette } } = chartsTheme;
|
|
82
84
|
var _thresholds_defaultColor;
|
|
83
85
|
const defaultThresholdColor = (_thresholds_defaultColor = thresholds === null || thresholds === void 0 ? void 0 : thresholds.defaultColor) !== null && _thresholds_defaultColor !== void 0 ? _thresholds_defaultColor : defaultColor;
|
|
84
86
|
const [steps, setSteps] = (0, _react.useState)(thresholds === null || thresholds === void 0 ? void 0 : thresholds.steps);
|
|
@@ -203,7 +205,7 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
|
|
|
203
205
|
});
|
|
204
206
|
}
|
|
205
207
|
};
|
|
206
|
-
var _thresholds_mode
|
|
208
|
+
var _thresholds_mode;
|
|
207
209
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_OptionsEditorLayout.OptionsEditorGroup, {
|
|
208
210
|
title: "Thresholds",
|
|
209
211
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoTooltip.InfoTooltip, {
|
|
@@ -248,8 +250,9 @@ function ThresholdsEditor({ thresholds , onChange , hideDefault , disablePercent
|
|
|
248
250
|
]
|
|
249
251
|
})
|
|
250
252
|
}),
|
|
251
|
-
steps && steps.map((step, i)
|
|
252
|
-
|
|
253
|
+
steps && steps.map((step, i)=>/*#__PURE__*/ {
|
|
254
|
+
var _step_color, _ref;
|
|
255
|
+
return (0, _jsxruntime.jsx)(_ThresholdInput.ThresholdInput, {
|
|
253
256
|
inputRef: i === steps.length - 1 ? recentlyAddedInputRef : undefined,
|
|
254
257
|
label: `T${i + 1}`,
|
|
255
258
|
color: (_ref = (_step_color = step.color) !== null && _step_color !== void 0 ? _step_color : palette[i]) !== null && _ref !== void 0 ? _ref : defaultThresholdColor,
|
|
@@ -56,9 +56,9 @@ function _interop_require_default(obj) {
|
|
|
56
56
|
_components.TooltipComponent,
|
|
57
57
|
_renderers.CanvasRenderer
|
|
58
58
|
]);
|
|
59
|
-
const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ height
|
|
59
|
+
const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ height, data, seriesMapping, timeScale: timeScaleProp, yAxis, format, grid, isStackedBar = false, tooltipConfig = _TimeSeriesTooltip.DEFAULT_TOOLTIP_CONFIG, noDataVariant = 'message', syncGroup, onDataZoom, onDoubleClick, __experimentalEChartsOptionsOverride }, ref) {
|
|
60
60
|
var _option_tooltip;
|
|
61
|
-
const { chartsTheme
|
|
61
|
+
const { chartsTheme, enablePinning, lastTooltipPinnedCoords, setLastTooltipPinnedCoords } = (0, _ChartsProvider.useChartsContext)();
|
|
62
62
|
const isPinningEnabled = tooltipConfig.enablePinning && enablePinning;
|
|
63
63
|
const chartRef = (0, _react.useRef)();
|
|
64
64
|
const [showTooltip, setShowTooltip] = (0, _react.useState)(true);
|
|
@@ -66,9 +66,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
66
66
|
const [pinnedCrosshair, setPinnedCrosshair] = (0, _react.useState)(null);
|
|
67
67
|
const [isDragging, setIsDragging] = (0, _react.useState)(false);
|
|
68
68
|
const [startX, setStartX] = (0, _react.useState)(0);
|
|
69
|
-
const { timeZone
|
|
70
|
-
var _data_length;
|
|
71
|
-
const totalSeries = (_data_length = data === null || data === void 0 ? void 0 : data.length) !== null && _data_length !== void 0 ? _data_length : 0;
|
|
69
|
+
const { timeZone } = (0, _TimeZoneProvider.useTimeZone)();
|
|
72
70
|
let timeScale;
|
|
73
71
|
if (timeScaleProp === undefined) {
|
|
74
72
|
const commonTimeScale = (0, _core.getCommonTimeScale)(data);
|
|
@@ -93,7 +91,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
93
91
|
}
|
|
94
92
|
(0, _react.useImperativeHandle)(ref, ()=>{
|
|
95
93
|
return {
|
|
96
|
-
highlightSeries ({ name
|
|
94
|
+
highlightSeries ({ name }) {
|
|
97
95
|
if (!chartRef.current) {
|
|
98
96
|
// when chart undef, do not highlight series when hovering over legend
|
|
99
97
|
return;
|
|
@@ -108,12 +106,10 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
108
106
|
// when chart undef, do not clear highlight series
|
|
109
107
|
return;
|
|
110
108
|
}
|
|
111
|
-
(0, _utils.clearHighlightedSeries)(chartRef.current
|
|
109
|
+
(0, _utils.clearHighlightedSeries)(chartRef.current);
|
|
112
110
|
}
|
|
113
111
|
};
|
|
114
|
-
}, [
|
|
115
|
-
totalSeries
|
|
116
|
-
]);
|
|
112
|
+
}, []);
|
|
117
113
|
const handleEvents = (0, _react.useMemo)(()=>{
|
|
118
114
|
return {
|
|
119
115
|
datazoom: (params)=>{
|
|
@@ -144,7 +140,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
144
140
|
onDataZoom,
|
|
145
141
|
setTooltipPinnedCoords
|
|
146
142
|
]);
|
|
147
|
-
const { noDataOption
|
|
143
|
+
const { noDataOption } = chartsTheme;
|
|
148
144
|
const option = (0, _react.useMemo)(()=>{
|
|
149
145
|
// The "chart" `noDataVariant` is only used when the `timeSeries` is an
|
|
150
146
|
// empty array because a `null` value will throw an error.
|
|
@@ -333,7 +329,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
333
329
|
}
|
|
334
330
|
},
|
|
335
331
|
onMouseDown: (e)=>{
|
|
336
|
-
const { clientX
|
|
332
|
+
const { clientX } = e;
|
|
337
333
|
setIsDragging(true);
|
|
338
334
|
setStartX(clientX);
|
|
339
335
|
},
|
|
@@ -342,7 +338,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
342
338
|
if (!(e.target instanceof HTMLCanvasElement)) {
|
|
343
339
|
return;
|
|
344
340
|
}
|
|
345
|
-
const { clientX
|
|
341
|
+
const { clientX } = e;
|
|
346
342
|
if (isDragging) {
|
|
347
343
|
const deltaX = clientX - startX;
|
|
348
344
|
if (deltaX > 0) {
|
|
@@ -361,7 +357,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
361
357
|
setShowTooltip(false);
|
|
362
358
|
}
|
|
363
359
|
if (chartRef.current !== undefined) {
|
|
364
|
-
(0, _utils.clearHighlightedSeries)(chartRef.current
|
|
360
|
+
(0, _utils.clearHighlightedSeries)(chartRef.current);
|
|
365
361
|
}
|
|
366
362
|
},
|
|
367
363
|
onMouseEnter: ()=>{
|
|
@@ -34,11 +34,11 @@ function _interop_require_default(obj) {
|
|
|
34
34
|
default: obj
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartTooltip({ chartRef
|
|
37
|
+
const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartTooltip({ chartRef, chartData, enablePinning = true, wrapLabels, format, onUnpinClick, pinnedPos, containerId }) {
|
|
38
38
|
const [showAllSeries, setShowAllSeries] = (0, _react.useState)(false);
|
|
39
39
|
const mousePos = (0, _tooltipmodel.useMousePosition)();
|
|
40
|
-
const { height
|
|
41
|
-
const transform = (0, _react.useRef)(
|
|
40
|
+
const { height, width, ref: tooltipRef } = (0, _useresizeobserver.default)();
|
|
41
|
+
const transform = (0, _react.useRef)();
|
|
42
42
|
const isTooltipPinned = pinnedPos !== null && enablePinning;
|
|
43
43
|
if (mousePos === null || mousePos.target === null) return null;
|
|
44
44
|
// Ensure user is hovering over a chart before checking for nearby series.
|
|
@@ -65,13 +65,13 @@ const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartToolti
|
|
|
65
65
|
if (!isTooltipPinned) {
|
|
66
66
|
transform.current = (0, _utils.assembleTransform)(mousePos, chartWidth, pinnedPos, height !== null && height !== void 0 ? height : 0, width !== null && width !== void 0 ? width : 0, containerElement);
|
|
67
67
|
}
|
|
68
|
-
var _theme_palette_designSystem_grey_;
|
|
69
68
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Portal, {
|
|
70
69
|
container: containerElement,
|
|
71
70
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
72
71
|
ref: tooltipRef,
|
|
73
72
|
sx: (theme)=>{
|
|
74
73
|
var _theme_palette_designSystem;
|
|
74
|
+
var _theme_palette_designSystem_grey_;
|
|
75
75
|
return {
|
|
76
76
|
minWidth: _tooltipmodel.TOOLTIP_MIN_WIDTH,
|
|
77
77
|
maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
|
|
@@ -96,7 +96,8 @@ const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartToolti
|
|
|
96
96
|
};
|
|
97
97
|
},
|
|
98
98
|
style: {
|
|
99
|
-
transform: transform.current
|
|
99
|
+
transform: transform.current,
|
|
100
|
+
display: transform.current ? 'block' : 'none'
|
|
100
101
|
},
|
|
101
102
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
102
103
|
spacing: 0.5,
|
|
@@ -26,7 +26,7 @@ const _SeriesMarker = require("./SeriesMarker");
|
|
|
26
26
|
const _SeriesLabelsStack = require("./SeriesLabelsStack");
|
|
27
27
|
const _tooltipmodel = require("./tooltip-model");
|
|
28
28
|
function SeriesInfo(props) {
|
|
29
|
-
const { seriesName
|
|
29
|
+
const { seriesName, formattedY, markerColor, totalSeries, emphasizeText = false, wrapLabels = true } = props;
|
|
30
30
|
// metric __name__ comes before opening curly brace, ignore if not populated
|
|
31
31
|
// ex with metric name: node_load15{env="demo",job="node"}
|
|
32
32
|
// ex without metric name: {env="demo",job="node"}
|
|
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _SeriesMarker = require("./SeriesMarker");
|
|
26
26
|
function SeriesLabelsStack(props) {
|
|
27
|
-
const { formattedY
|
|
27
|
+
const { formattedY, markerColor, metricName, metricLabels } = props;
|
|
28
28
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
29
29
|
spacing: 0.5,
|
|
30
30
|
children: [
|
|
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _utils = require("../utils");
|
|
26
26
|
function SeriesMarker(props) {
|
|
27
|
-
const { markerColor
|
|
27
|
+
const { markerColor, sx } = props;
|
|
28
28
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
29
29
|
sx: (0, _utils.combineSx)({
|
|
30
30
|
display: 'inline-block',
|
|
@@ -34,11 +34,11 @@ function _interop_require_default(obj) {
|
|
|
34
34
|
default: obj
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const TimeChartTooltip = /*#__PURE__*/ (0, _react.memo)(function TimeChartTooltip({ containerId
|
|
37
|
+
const TimeChartTooltip = /*#__PURE__*/ (0, _react.memo)(function TimeChartTooltip({ containerId, chartRef, data, seriesMapping, enablePinning = true, wrapLabels, format, onUnpinClick, pinnedPos }) {
|
|
38
38
|
const [showAllSeries, setShowAllSeries] = (0, _react.useState)(false);
|
|
39
|
-
const transform = (0, _react.useRef)(
|
|
39
|
+
const transform = (0, _react.useRef)();
|
|
40
40
|
const mousePos = (0, _tooltipmodel.useMousePosition)();
|
|
41
|
-
const { height
|
|
41
|
+
const { height, width, ref: tooltipRef } = (0, _useresizeobserver.default)();
|
|
42
42
|
const isTooltipPinned = pinnedPos !== null && enablePinning;
|
|
43
43
|
if (mousePos === null || mousePos.target === null || data === null) return null;
|
|
44
44
|
// Ensure user is hovering over a chart before checking for nearby series.
|
|
@@ -25,7 +25,7 @@ const _react = require("react");
|
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _SeriesInfo = require("./SeriesInfo");
|
|
27
27
|
function TooltipContent(props) {
|
|
28
|
-
const { series
|
|
28
|
+
const { series, wrapLabels } = props;
|
|
29
29
|
const sortedFocusedSeries = (0, _react.useMemo)(()=>{
|
|
30
30
|
if (series === null) return null;
|
|
31
31
|
return series.sort((a, b)=>a.y > b.y ? -1 : 1);
|
|
@@ -41,7 +41,7 @@ function TooltipContent(props) {
|
|
|
41
41
|
display: 'table',
|
|
42
42
|
padding: theme.spacing(0.5, 2)
|
|
43
43
|
}),
|
|
44
|
-
children: sortedFocusedSeries.map(({ datumIdx
|
|
44
|
+
children: sortedFocusedSeries.map(({ datumIdx, seriesIdx, seriesName, y, formattedY, markerColor, isClosestToCursor })=>{
|
|
45
45
|
if (datumIdx === null || seriesIdx === null) return null;
|
|
46
46
|
const key = seriesIdx.toString() + datumIdx.toString();
|
|
47
47
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_SeriesInfo.SeriesInfo, {
|
|
@@ -32,7 +32,7 @@ function _interop_require_default(obj) {
|
|
|
32
32
|
default: obj
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ nearbySeries
|
|
35
|
+
const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ nearbySeries, totalSeries, isTooltipPinned, showAllSeries, enablePinning = true, onShowAllClick, onUnpinClick }) {
|
|
36
36
|
var _nearbySeries_;
|
|
37
37
|
var _nearbySeries__date;
|
|
38
38
|
const seriesTimeMs = (_nearbySeries__date = (_nearbySeries_ = nearbySeries[0]) === null || _nearbySeries_ === void 0 ? void 0 : _nearbySeries_.date) !== null && _nearbySeries__date !== void 0 ? _nearbySeries__date : null;
|
|
@@ -64,10 +64,10 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
|
|
|
64
64
|
// TODO: accurately calc whether more series are outside scrollable region using yBuffer, avg series name length, TOOLTIP_MAX_HEIGHT
|
|
65
65
|
const showAllSeriesToggle = enablePinning && totalSeries > 5;
|
|
66
66
|
const pinTooltipHelpText = isTooltipPinned ? _tooltipmodel.UNPIN_TOOLTIP_HELP_TEXT : _tooltipmodel.PIN_TOOLTIP_HELP_TEXT;
|
|
67
|
-
var _theme_palette_designSystem_grey_;
|
|
68
67
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
69
68
|
sx: (theme)=>{
|
|
70
69
|
var _theme_palette_designSystem;
|
|
70
|
+
var _theme_palette_designSystem_grey_;
|
|
71
71
|
return {
|
|
72
72
|
width: '100%',
|
|
73
73
|
maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
|
|
@@ -21,37 +21,38 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
INCREASE_NEARBY_SERIES_MULTIPLIER: function() {
|
|
25
|
-
return INCREASE_NEARBY_SERIES_MULTIPLIER;
|
|
26
|
-
},
|
|
27
24
|
DYNAMIC_NEARBY_SERIES_MULTIPLIER: function() {
|
|
28
25
|
return DYNAMIC_NEARBY_SERIES_MULTIPLIER;
|
|
29
26
|
},
|
|
27
|
+
INCREASE_NEARBY_SERIES_MULTIPLIER: function() {
|
|
28
|
+
return INCREASE_NEARBY_SERIES_MULTIPLIER;
|
|
29
|
+
},
|
|
30
30
|
SHOW_FEWER_SERIES_LIMIT: function() {
|
|
31
31
|
return SHOW_FEWER_SERIES_LIMIT;
|
|
32
32
|
},
|
|
33
33
|
checkforNearbyTimeSeries: function() {
|
|
34
34
|
return checkforNearbyTimeSeries;
|
|
35
35
|
},
|
|
36
|
-
legacyCheckforNearbySeries: function() {
|
|
37
|
-
return legacyCheckforNearbySeries;
|
|
38
|
-
},
|
|
39
36
|
getNearbySeriesData: function() {
|
|
40
37
|
return getNearbySeriesData;
|
|
41
38
|
},
|
|
42
|
-
|
|
43
|
-
return
|
|
39
|
+
getYBuffer: function() {
|
|
40
|
+
return getYBuffer;
|
|
44
41
|
},
|
|
45
42
|
isWithinPercentageRange: function() {
|
|
46
43
|
return isWithinPercentageRange;
|
|
47
44
|
},
|
|
48
|
-
|
|
49
|
-
return
|
|
45
|
+
legacyCheckforNearbySeries: function() {
|
|
46
|
+
return legacyCheckforNearbySeries;
|
|
47
|
+
},
|
|
48
|
+
legacyGetNearbySeriesData: function() {
|
|
49
|
+
return legacyGetNearbySeriesData;
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
const _core = require("@perses-dev/core");
|
|
53
53
|
const _model = require("../model");
|
|
54
54
|
const _utils = require("../utils");
|
|
55
|
+
const _tooltipmodel = require("./tooltip-model");
|
|
55
56
|
const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show in tooltip (higher == more series shown)
|
|
56
57
|
const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor
|
|
57
58
|
const SHOW_FEWER_SERIES_LIMIT = 5;
|
|
@@ -76,7 +77,7 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
76
77
|
const firstTimeSeriesValues = (_data_ = data[0]) === null || _data_ === void 0 ? void 0 : _data_.values;
|
|
77
78
|
const closestTimestamp = (0, _utils.getClosestTimestamp)(firstTimeSeriesValues, cursorX);
|
|
78
79
|
if (closestTimestamp === null) {
|
|
79
|
-
return
|
|
80
|
+
return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
80
81
|
}
|
|
81
82
|
// find the timestamp with data that is closest to cursorX
|
|
82
83
|
for(let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++){
|
|
@@ -259,8 +260,8 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
|
|
|
259
260
|
}
|
|
260
261
|
return currentNearbySeriesData;
|
|
261
262
|
}
|
|
262
|
-
function getNearbySeriesData({ mousePos
|
|
263
|
-
if (chart === undefined || mousePos === null) return
|
|
263
|
+
function getNearbySeriesData({ mousePos, pinnedPos, data, seriesMapping, chart, format, showAllSeries = false }) {
|
|
264
|
+
if (chart === undefined || mousePos === null) return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
264
265
|
// prevents multiple tooltips showing from adjacent charts unless tooltip is pinned
|
|
265
266
|
let cursorTargetMatchesChart = false;
|
|
266
267
|
if (mousePos.target !== null) {
|
|
@@ -280,8 +281,9 @@ function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , cha
|
|
|
280
281
|
mousePos = pinnedPos;
|
|
281
282
|
cursorTargetMatchesChart = true;
|
|
282
283
|
}
|
|
283
|
-
if (cursorTargetMatchesChart === false) return
|
|
284
|
-
|
|
284
|
+
if (cursorTargetMatchesChart === false || data === null || chart['_model'] === undefined) return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
285
|
+
// mousemove position undefined when not hovering over chart canvas
|
|
286
|
+
if (mousePos.plotCanvas.x === undefined || mousePos.plotCanvas.y === undefined) return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
285
287
|
const pointInGrid = (0, _utils.getPointInGrid)(mousePos.plotCanvas.x, mousePos.plotCanvas.y, chart);
|
|
286
288
|
if (pointInGrid !== null) {
|
|
287
289
|
const chartModel = chart['_model'];
|
|
@@ -294,9 +296,10 @@ function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , cha
|
|
|
294
296
|
});
|
|
295
297
|
return checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, format);
|
|
296
298
|
}
|
|
297
|
-
|
|
299
|
+
// no nearby series found
|
|
300
|
+
return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
298
301
|
}
|
|
299
|
-
function legacyGetNearbySeriesData({ mousePos
|
|
302
|
+
function legacyGetNearbySeriesData({ mousePos, pinnedPos, chartData, chart, format, showAllSeries = false }) {
|
|
300
303
|
if (chart === undefined || mousePos === null) return [];
|
|
301
304
|
// prevents multiple tooltips showing from adjacent charts unless tooltip is pinned
|
|
302
305
|
let cursorTargetMatchesChart = false;
|
|
@@ -340,13 +343,13 @@ function legacyGetNearbySeriesData({ mousePos , pinnedPos , chartData , chart ,
|
|
|
340
343
|
}
|
|
341
344
|
return [];
|
|
342
345
|
}
|
|
343
|
-
function isWithinPercentageRange({ valueToCheck
|
|
346
|
+
function isWithinPercentageRange({ valueToCheck, baseValue, percentage }) {
|
|
344
347
|
const range = percentage / 100 * baseValue;
|
|
345
348
|
const lowerBound = baseValue - range;
|
|
346
349
|
const upperBound = baseValue + range;
|
|
347
350
|
return valueToCheck >= lowerBound && valueToCheck <= upperBound;
|
|
348
351
|
}
|
|
349
|
-
function getYBuffer({ yInterval
|
|
352
|
+
function getYBuffer({ yInterval, totalSeries, showAllSeries = false }) {
|
|
350
353
|
if (showAllSeries) {
|
|
351
354
|
return yInterval * 10; // roughly correlates with grid so entire canvas is searched
|
|
352
355
|
}
|