@perses-dev/components 0.0.0-snapshot-panel-extra-content-3-17f9c42 → 0.0.0-snapshot-scatterplot-fix-imports-95e1b59
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 +3 -4
- package/dist/BarChart/BarChart.d.ts.map +1 -1
- package/dist/BarChart/BarChart.js +17 -11
- package/dist/BarChart/BarChart.js.map +1 -1
- package/dist/BarChart/index.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/ColorPicker/index.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/index.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +3 -3
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +21 -21
- 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 +8 -24
- 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/index.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/Dialog/index.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 +4 -3
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/Drawer/index.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 +3 -3
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/EChart/index.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/ErrorBoundary.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/FontSizeSelector/index.js.map +1 -1
- package/dist/FormatControls/FormatControls.d.ts +8 -0
- package/dist/FormatControls/FormatControls.d.ts.map +1 -0
- package/dist/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +26 -26
- package/dist/FormatControls/FormatControls.js.map +1 -0
- package/dist/FormatControls/index.d.ts +2 -0
- package/dist/FormatControls/index.d.ts.map +1 -0
- package/dist/{UnitSelector → FormatControls}/index.js +1 -1
- package/dist/FormatControls/index.js.map +1 -0
- package/dist/GaugeChart/GaugeChart.d.ts +6 -7
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +12 -12
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/GaugeChart/index.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/InfoTooltip/index.js.map +1 -1
- package/dist/JSONEditor.d.ts +4 -4
- package/dist/JSONEditor.d.ts.map +1 -1
- package/dist/JSONEditor.js +9 -8
- 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 +4 -4
- 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 +7 -11
- 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/index.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.d.ts +2 -2
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +22 -24
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LineChart/index.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/ModeSelector/index.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/OptionsEditorLayout/index.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 +23 -7
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
- package/dist/RefreshIntervalPicker/index.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 +4 -4
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SettingsAutocomplete/index.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/SortSelector/index.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts +3 -4
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +10 -10
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.js +8 -8
- package/dist/StatChart/calculateFontSize.js.map +1 -1
- package/dist/StatChart/index.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/TableBody.js.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 +4 -4
- 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/TableHead.js.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 +8 -8
- 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/VirtualizedTableContainer.js.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 +21 -21
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
- package/dist/Table/index.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 +11 -11
- 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 +4 -4
- 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 +2 -2
- 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 +23 -21
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/ThresholdsEditor/index.js.map +1 -1
- package/dist/TimeChart/TimeChart.d.ts +3 -3
- package/dist/TimeChart/TimeChart.d.ts.map +1 -1
- package/dist/TimeChart/TimeChart.js +110 -67
- package/dist/TimeChart/TimeChart.js.map +1 -1
- package/dist/TimeChart/index.js.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.js +11 -10
- 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 +3 -3
- 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.d.ts +2 -2
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js +6 -6
- 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 +7 -7
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/index.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +8 -8
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +44 -45
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +13 -26
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +5 -11
- 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 +5 -4
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.d.ts +6 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.d.ts.map +1 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.js +32 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -0
- package/dist/ToolbarIconButton/index.d.ts +2 -0
- package/dist/ToolbarIconButton/index.d.ts.map +1 -0
- package/dist/ToolbarIconButton/index.js +15 -0
- package/dist/ToolbarIconButton/index.js.map +1 -0
- 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 +25 -17
- package/dist/cjs/BarChart/index.js +10 -8
- package/dist/cjs/ColorPicker/ColorPicker.js +19 -15
- package/dist/cjs/ColorPicker/index.js +10 -8
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +13 -11
- package/dist/cjs/ContentWithLegend/index.js +10 -8
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +29 -25
- package/dist/cjs/DateTimeRangePicker/AbsoluteTimePicker.js +30 -44
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +13 -11
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +14 -12
- package/dist/cjs/DateTimeRangePicker/index.js +12 -10
- package/dist/cjs/DateTimeRangePicker/utils.js +9 -5
- package/dist/cjs/Dialog/Dialog.js +16 -14
- package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +12 -10
- package/dist/cjs/Dialog/index.js +11 -9
- package/dist/cjs/Drawer/Drawer.js +8 -5
- package/dist/cjs/Drawer/index.js +10 -8
- package/dist/cjs/EChart/EChart.js +16 -12
- package/dist/cjs/EChart/index.js +10 -8
- package/dist/cjs/ErrorAlert.js +6 -4
- package/dist/cjs/ErrorBoundary.js +4 -2
- package/dist/cjs/FontSizeSelector/FontSizeSelector.js +10 -8
- package/dist/cjs/FontSizeSelector/index.js +10 -8
- package/dist/cjs/{UnitSelector/UnitSelector.js → FormatControls/FormatControls.js} +38 -36
- package/dist/cjs/{UnitSelector → FormatControls}/index.js +10 -8
- package/dist/cjs/GaugeChart/GaugeChart.js +22 -18
- package/dist/cjs/GaugeChart/index.js +10 -8
- package/dist/cjs/InfoTooltip/InfoTooltip.js +16 -14
- package/dist/cjs/InfoTooltip/index.js +10 -8
- package/dist/cjs/JSONEditor.js +19 -16
- package/dist/cjs/Legend/CompactLegend.js +10 -8
- package/dist/cjs/Legend/Legend.js +16 -14
- package/dist/cjs/Legend/LegendColorBadge.js +8 -6
- package/dist/cjs/Legend/ListLegend.js +11 -9
- package/dist/cjs/Legend/ListLegendItem.js +20 -20
- package/dist/cjs/Legend/TableLegend.js +8 -6
- package/dist/cjs/Legend/index.js +11 -9
- package/dist/cjs/Legend/legend-model.js +3 -1
- package/dist/cjs/LineChart/LineChart.js +31 -31
- package/dist/cjs/LineChart/index.js +10 -8
- package/dist/cjs/ModeSelector/ModeSelector.js +10 -8
- package/dist/cjs/ModeSelector/index.js +10 -8
- package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +7 -5
- package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +17 -15
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +6 -4
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +12 -10
- package/dist/cjs/OptionsEditorLayout/index.js +13 -11
- package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +28 -10
- package/dist/cjs/RefreshIntervalPicker/index.js +10 -8
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +13 -11
- package/dist/cjs/SettingsAutocomplete/index.js +10 -8
- package/dist/cjs/SortSelector/SortSelector.js +10 -8
- package/dist/cjs/SortSelector/index.js +10 -8
- package/dist/cjs/StatChart/StatChart.js +22 -20
- package/dist/cjs/StatChart/calculateFontSize.js +11 -9
- package/dist/cjs/StatChart/index.js +10 -8
- package/dist/cjs/Table/InnerTable.js +7 -5
- package/dist/cjs/Table/Table.js +18 -16
- package/dist/cjs/Table/TableBody.js +5 -3
- package/dist/cjs/Table/TableCell.js +12 -10
- package/dist/cjs/Table/TableCheckbox.js +6 -4
- package/dist/cjs/Table/TableHead.js +5 -3
- package/dist/cjs/Table/TableHeaderCell.js +9 -7
- package/dist/cjs/Table/TableRow.js +5 -3
- package/dist/cjs/Table/VirtualizedTable.js +34 -32
- package/dist/cjs/Table/VirtualizedTableContainer.js +5 -3
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +4 -2
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +24 -22
- package/dist/cjs/Table/index.js +14 -10
- package/dist/cjs/Table/model/table-model.js +17 -13
- package/dist/cjs/ThresholdsEditor/ThresholdColorPicker.js +17 -15
- package/dist/cjs/ThresholdsEditor/ThresholdInput.js +15 -13
- package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +50 -44
- package/dist/cjs/ThresholdsEditor/index.js +10 -8
- package/dist/cjs/TimeChart/TimeChart.js +123 -78
- package/dist/cjs/TimeChart/index.js +10 -8
- package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +31 -28
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +18 -16
- package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +16 -14
- package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +6 -4
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +23 -21
- package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +9 -7
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +35 -33
- package/dist/cjs/TimeSeriesTooltip/index.js +19 -17
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +70 -53
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +56 -28
- package/dist/cjs/TimeSeriesTooltip/utils.js +19 -14
- package/dist/cjs/ToolbarIconButton/ToolbarIconButton.js +40 -0
- package/dist/cjs/ToolbarIconButton/index.js +30 -0
- package/dist/cjs/YAxisLabel.js +7 -5
- package/dist/cjs/context/{ChartsThemeProvider.js → ChartsProvider.js} +41 -12
- package/dist/cjs/context/SnackbarProvider.js +7 -3
- package/dist/cjs/context/TimeZoneProvider.js +17 -9
- package/dist/cjs/context/index.js +32 -0
- package/dist/cjs/index.js +42 -41
- package/dist/cjs/model/graph.js +9 -3
- package/dist/cjs/model/index.js +12 -10
- package/dist/cjs/test/index.js +10 -8
- package/dist/cjs/test/render.js +7 -5
- package/dist/cjs/test-utils/index.js +10 -8
- package/dist/cjs/test-utils/theme.js +38 -19
- package/dist/cjs/theme/component-overrides/alert.js +7 -5
- package/dist/cjs/theme/component-overrides/paper.js +4 -2
- package/dist/cjs/theme/index.js +10 -8
- package/dist/cjs/theme/palette/background.js +6 -2
- package/dist/cjs/theme/palette/colors/blue.js +3 -1
- package/dist/cjs/theme/palette/colors/common.js +6 -2
- package/dist/cjs/theme/palette/colors/green.js +3 -1
- package/dist/cjs/theme/palette/colors/grey.js +3 -1
- package/dist/cjs/theme/palette/colors/index.js +17 -15
- package/dist/cjs/theme/palette/colors/orange.js +3 -1
- package/dist/cjs/theme/palette/colors/purple.js +3 -1
- package/dist/cjs/theme/palette/colors/red.js +3 -1
- package/dist/cjs/theme/palette/error.js +3 -1
- package/dist/cjs/theme/palette/grey.js +3 -1
- package/dist/cjs/theme/palette/index.js +10 -8
- package/dist/cjs/theme/palette/palette-options.js +3 -1
- package/dist/cjs/theme/palette/primary.js +3 -1
- package/dist/cjs/theme/palette/secondary.js +3 -1
- package/dist/cjs/theme/palette/success.js +3 -1
- package/dist/cjs/theme/palette/text.js +3 -1
- package/dist/cjs/theme/palette/warning.js +3 -1
- package/dist/cjs/theme/theme.js +6 -4
- package/dist/cjs/theme/typography.js +3 -1
- package/dist/cjs/utils/axis.js +11 -7
- package/dist/cjs/utils/chart-actions.js +68 -12
- package/dist/cjs/utils/combine-sx.js +3 -1
- package/dist/cjs/utils/component-ids.js +3 -1
- package/dist/cjs/utils/format.js +16 -8
- package/dist/cjs/utils/index.js +15 -13
- package/dist/cjs/utils/mathjs.js +4 -2
- package/dist/cjs/utils/theme-gen.js +16 -18
- package/dist/context/ChartsProvider.d.ts +19 -0
- package/dist/context/ChartsProvider.d.ts.map +1 -0
- package/dist/context/{ChartsThemeProvider.js → ChartsProvider.js} +24 -6
- package/dist/context/ChartsProvider.js.map +1 -0
- 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/context/index.d.ts +4 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +17 -0
- package/dist/context/index.js.map +1 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/model/graph.d.ts +8 -8
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/graph.js.map +1 -1
- package/dist/model/index.js.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/index.js.map +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/theme.d.ts +2 -0
- package/dist/test-utils/theme.d.ts.map +1 -1
- package/dist/test-utils/theme.js +25 -16
- package/dist/test-utils/theme.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/index.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette/background.d.ts.map +1 -1
- package/dist/theme/palette/background.js +3 -1
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/palette/colors/blue.js.map +1 -1
- package/dist/theme/palette/colors/common.js.map +1 -1
- package/dist/theme/palette/colors/green.js.map +1 -1
- package/dist/theme/palette/colors/grey.js.map +1 -1
- package/dist/theme/palette/colors/index.js.map +1 -1
- package/dist/theme/palette/colors/orange.js.map +1 -1
- package/dist/theme/palette/colors/purple.js.map +1 -1
- package/dist/theme/palette/colors/red.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/palette/error.js.map +1 -1
- package/dist/theme/palette/grey.js.map +1 -1
- package/dist/theme/palette/index.js.map +1 -1
- package/dist/theme/palette/palette-options.js.map +1 -1
- package/dist/theme/palette/primary.js.map +1 -1
- package/dist/theme/palette/secondary.js.map +1 -1
- package/dist/theme/palette/success.js.map +1 -1
- package/dist/theme/palette/text.js.map +1 -1
- package/dist/theme/palette/warning.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/theme/typography.js.map +1 -1
- package/dist/utils/axis.d.ts +4 -4
- package/dist/utils/axis.d.ts.map +1 -1
- package/dist/utils/axis.js +4 -4
- package/dist/utils/axis.js.map +1 -1
- package/dist/utils/chart-actions.d.ts +6 -2
- package/dist/utils/chart-actions.d.ts.map +1 -1
- package/dist/utils/chart-actions.js +51 -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/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 +3 -8
- package/dist/utils/theme-gen.d.ts.map +1 -1
- package/dist/utils/theme-gen.js +11 -15
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +8 -7
- package/dist/UnitSelector/UnitSelector.d.ts +0 -9
- package/dist/UnitSelector/UnitSelector.d.ts.map +0 -1
- package/dist/UnitSelector/UnitSelector.js.map +0 -1
- package/dist/UnitSelector/index.d.ts +0 -2
- package/dist/UnitSelector/index.d.ts.map +0 -1
- package/dist/UnitSelector/index.js.map +0 -1
- package/dist/context/ChartsThemeProvider.d.ts +0 -10
- package/dist/context/ChartsThemeProvider.d.ts.map +0 -1
- package/dist/context/ChartsThemeProvider.js.map +0 -1
|
@@ -21,28 +21,48 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
DYNAMIC_NEARBY_SERIES_MULTIPLIER: function() {
|
|
25
|
+
return DYNAMIC_NEARBY_SERIES_MULTIPLIER;
|
|
26
|
+
},
|
|
27
|
+
INCREASE_NEARBY_SERIES_MULTIPLIER: function() {
|
|
28
|
+
return INCREASE_NEARBY_SERIES_MULTIPLIER;
|
|
29
|
+
},
|
|
30
|
+
SHOW_FEWER_SERIES_LIMIT: function() {
|
|
31
|
+
return SHOW_FEWER_SERIES_LIMIT;
|
|
32
|
+
},
|
|
33
|
+
checkforNearbyTimeSeries: function() {
|
|
34
|
+
return checkforNearbyTimeSeries;
|
|
35
|
+
},
|
|
36
|
+
getNearbySeriesData: function() {
|
|
37
|
+
return getNearbySeriesData;
|
|
38
|
+
},
|
|
39
|
+
getYBuffer: function() {
|
|
40
|
+
return getYBuffer;
|
|
41
|
+
},
|
|
42
|
+
isWithinPercentageRange: function() {
|
|
43
|
+
return isWithinPercentageRange;
|
|
44
|
+
},
|
|
45
|
+
legacyCheckforNearbySeries: function() {
|
|
46
|
+
return legacyCheckforNearbySeries;
|
|
47
|
+
},
|
|
48
|
+
legacyGetNearbySeriesData: function() {
|
|
49
|
+
return legacyGetNearbySeriesData;
|
|
50
|
+
}
|
|
33
51
|
});
|
|
34
52
|
const _core = require("@perses-dev/core");
|
|
35
53
|
const _model = require("../model");
|
|
36
54
|
const _utils = require("../utils");
|
|
55
|
+
const _tooltipmodel = require("./tooltip-model");
|
|
37
56
|
const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show in tooltip (higher == more series shown)
|
|
38
57
|
const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor
|
|
39
58
|
const SHOW_FEWER_SERIES_LIMIT = 5;
|
|
40
|
-
function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart,
|
|
59
|
+
function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, format) {
|
|
60
|
+
var _data_;
|
|
41
61
|
const currentNearbySeriesData = [];
|
|
42
|
-
var
|
|
43
|
-
const cursorX = (
|
|
44
|
-
var
|
|
45
|
-
const cursorY = (
|
|
62
|
+
var _pointInGrid_;
|
|
63
|
+
const cursorX = (_pointInGrid_ = pointInGrid[0]) !== null && _pointInGrid_ !== void 0 ? _pointInGrid_ : null;
|
|
64
|
+
var _pointInGrid_1;
|
|
65
|
+
const cursorY = (_pointInGrid_1 = pointInGrid[1]) !== null && _pointInGrid_1 !== void 0 ? _pointInGrid_1 : null;
|
|
46
66
|
if (cursorX === null || cursorY === null) return currentNearbySeriesData;
|
|
47
67
|
if (chart.dispatchAction === undefined) return currentNearbySeriesData;
|
|
48
68
|
if (!Array.isArray(data)) return currentNearbySeriesData;
|
|
@@ -53,8 +73,12 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
53
73
|
const duplicateDatapoints = [];
|
|
54
74
|
const totalSeries = data.length;
|
|
55
75
|
const yValueCounts = new Map();
|
|
56
|
-
|
|
57
|
-
|
|
76
|
+
// Only need to loop through first dataset source since getCommonTimeScale ensures xAxis timestamps are consistent
|
|
77
|
+
const firstTimeSeriesValues = (_data_ = data[0]) === null || _data_ === void 0 ? void 0 : _data_.values;
|
|
78
|
+
const closestTimestamp = (0, _utils.getClosestTimestamp)(firstTimeSeriesValues, cursorX);
|
|
79
|
+
if (closestTimestamp === null) {
|
|
80
|
+
return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
81
|
+
}
|
|
58
82
|
// find the timestamp with data that is closest to cursorX
|
|
59
83
|
for(let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++){
|
|
60
84
|
const currentSeries = seriesMapping[seriesIdx];
|
|
@@ -62,20 +86,11 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
62
86
|
const currentDataset = totalSeries > 0 ? data[seriesIdx] : null;
|
|
63
87
|
if (currentDataset == null) break;
|
|
64
88
|
const currentDatasetValues = currentDataset.values;
|
|
65
|
-
// Determine closestTimestamp before checking whether it is equal to xValue. Consolidating
|
|
66
|
-
// with second currentDatasetValues loop below would result in duplicate nearby series
|
|
67
|
-
for (const [timestamp] of currentDatasetValues){
|
|
68
|
-
const distance = Math.abs(timestamp - cursorX);
|
|
69
|
-
if (distance < closestDistance) {
|
|
70
|
-
closestTimestamp = timestamp;
|
|
71
|
-
closestDistance = distance;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
89
|
if (currentDatasetValues === undefined || !Array.isArray(currentDatasetValues)) break;
|
|
75
90
|
const lineSeries = currentSeries;
|
|
76
91
|
const currentSeriesName = lineSeries.name ? lineSeries.name.toString() : '';
|
|
77
|
-
var
|
|
78
|
-
const markerColor = (
|
|
92
|
+
var _lineSeries_color;
|
|
93
|
+
const markerColor = (_lineSeries_color = lineSeries.color) !== null && _lineSeries_color !== void 0 ? _lineSeries_color : '#000';
|
|
79
94
|
if (Array.isArray(data)) {
|
|
80
95
|
for(let datumIdx = 0; datumIdx < currentDatasetValues.length; datumIdx++){
|
|
81
96
|
const nearbyTimeSeries = currentDatasetValues[datumIdx];
|
|
@@ -97,10 +112,10 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
97
112
|
if (isClosestToCursor) {
|
|
98
113
|
// shows as bold in tooltip, customize 'emphasis' options in getTimeSeries util
|
|
99
114
|
emphasizedSeriesIndexes.push(seriesIdx);
|
|
100
|
-
var
|
|
115
|
+
var _yValueCounts_get;
|
|
101
116
|
// Used to determine which datapoint to apply select styles to.
|
|
102
117
|
// Accounts for cases where lines may be rendered directly on top of eachother.
|
|
103
|
-
const duplicateValuesCount = (
|
|
118
|
+
const duplicateValuesCount = (_yValueCounts_get = yValueCounts.get(yValue)) !== null && _yValueCounts_get !== void 0 ? _yValueCounts_get : 0;
|
|
104
119
|
yValueCounts.set(yValue, duplicateValuesCount + 1);
|
|
105
120
|
if (duplicateValuesCount > 0) {
|
|
106
121
|
duplicateDatapoints.push({
|
|
@@ -125,7 +140,7 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
125
140
|
seriesIndex: seriesIdx
|
|
126
141
|
});
|
|
127
142
|
}
|
|
128
|
-
const formattedY = (0, _core.formatValue)(yValue,
|
|
143
|
+
const formattedY = (0, _core.formatValue)(yValue, format);
|
|
129
144
|
currentNearbySeriesData.push({
|
|
130
145
|
seriesIdx: seriesIdx,
|
|
131
146
|
datumIdx: datumIdx,
|
|
@@ -147,12 +162,12 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
147
162
|
(0, _utils.batchDispatchNearbySeriesActions)(chart, nearbySeriesIndexes, emphasizedSeriesIndexes, nonEmphasizedSeriesIndexes, emphasizedDatapoints, duplicateDatapoints);
|
|
148
163
|
return currentNearbySeriesData;
|
|
149
164
|
}
|
|
150
|
-
function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart,
|
|
165
|
+
function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
|
|
151
166
|
const currentNearbySeriesData = [];
|
|
152
|
-
var
|
|
153
|
-
const cursorX = (
|
|
154
|
-
var
|
|
155
|
-
const cursorY = (
|
|
167
|
+
var _pointInGrid_;
|
|
168
|
+
const cursorX = (_pointInGrid_ = pointInGrid[0]) !== null && _pointInGrid_ !== void 0 ? _pointInGrid_ : null;
|
|
169
|
+
var _pointInGrid_1;
|
|
170
|
+
const cursorY = (_pointInGrid_1 = pointInGrid[1]) !== null && _pointInGrid_1 !== void 0 ? _pointInGrid_1 : null;
|
|
156
171
|
if (cursorX === null || cursorY === null) {
|
|
157
172
|
return currentNearbySeriesData;
|
|
158
173
|
}
|
|
@@ -166,12 +181,12 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
|
|
|
166
181
|
if (currentSeries === undefined) break;
|
|
167
182
|
if (currentNearbySeriesData.length >= _model.OPTIMIZED_MODE_SERIES_LIMIT) break;
|
|
168
183
|
const currentSeriesName = currentSeries.name ? currentSeries.name.toString() : '';
|
|
169
|
-
var
|
|
170
|
-
const markerColor = (
|
|
184
|
+
var _currentSeries_color;
|
|
185
|
+
const markerColor = (_currentSeries_color = currentSeries.color) !== null && _currentSeries_color !== void 0 ? _currentSeries_color : '#000';
|
|
171
186
|
if (Array.isArray(currentSeries.data)) {
|
|
172
187
|
for(let datumIdx = 0; datumIdx < currentSeries.data.length; datumIdx++){
|
|
173
|
-
var
|
|
174
|
-
const xValue = (
|
|
188
|
+
var _data_xAxis_datumIdx;
|
|
189
|
+
const xValue = (_data_xAxis_datumIdx = data.xAxis[datumIdx]) !== null && _data_xAxis_datumIdx !== void 0 ? _data_xAxis_datumIdx : 0;
|
|
175
190
|
const yValue = currentSeries.data[datumIdx];
|
|
176
191
|
// ensure null values not displayed in tooltip
|
|
177
192
|
if (yValue !== undefined && yValue !== null && cursorX === datumIdx) {
|
|
@@ -198,7 +213,7 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
|
|
|
198
213
|
}
|
|
199
214
|
// determine whether to convert timestamp to ms, see: https://stackoverflow.com/a/23982005/17575201
|
|
200
215
|
const xValueMilliSeconds = xValue > 99999999999 ? xValue : xValue * 1000;
|
|
201
|
-
const formattedY = (0, _core.formatValue)(yValue,
|
|
216
|
+
const formattedY = (0, _core.formatValue)(yValue, format);
|
|
202
217
|
currentNearbySeriesData.push({
|
|
203
218
|
seriesIdx: seriesIdx,
|
|
204
219
|
datumIdx: datumIdx,
|
|
@@ -245,8 +260,8 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, unit) {
|
|
|
245
260
|
}
|
|
246
261
|
return currentNearbySeriesData;
|
|
247
262
|
}
|
|
248
|
-
function getNearbySeriesData({ mousePos
|
|
249
|
-
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;
|
|
250
265
|
// prevents multiple tooltips showing from adjacent charts unless tooltip is pinned
|
|
251
266
|
let cursorTargetMatchesChart = false;
|
|
252
267
|
if (mousePos.target !== null) {
|
|
@@ -266,8 +281,9 @@ function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , cha
|
|
|
266
281
|
mousePos = pinnedPos;
|
|
267
282
|
cursorTargetMatchesChart = true;
|
|
268
283
|
}
|
|
269
|
-
if (cursorTargetMatchesChart === false) return
|
|
270
|
-
|
|
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;
|
|
271
287
|
const pointInGrid = (0, _utils.getPointInGrid)(mousePos.plotCanvas.x, mousePos.plotCanvas.y, chart);
|
|
272
288
|
if (pointInGrid !== null) {
|
|
273
289
|
const chartModel = chart['_model'];
|
|
@@ -278,11 +294,12 @@ function getNearbySeriesData({ mousePos , pinnedPos , data , seriesMapping , cha
|
|
|
278
294
|
totalSeries,
|
|
279
295
|
showAllSeries
|
|
280
296
|
});
|
|
281
|
-
return checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart,
|
|
297
|
+
return checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, format);
|
|
282
298
|
}
|
|
283
|
-
|
|
299
|
+
// no nearby series found
|
|
300
|
+
return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
284
301
|
}
|
|
285
|
-
function legacyGetNearbySeriesData({ mousePos
|
|
302
|
+
function legacyGetNearbySeriesData({ mousePos, pinnedPos, chartData, chart, format, showAllSeries = false }) {
|
|
286
303
|
if (chart === undefined || mousePos === null) return [];
|
|
287
304
|
// prevents multiple tooltips showing from adjacent charts unless tooltip is pinned
|
|
288
305
|
let cursorTargetMatchesChart = false;
|
|
@@ -313,26 +330,26 @@ function legacyGetNearbySeriesData({ mousePos , pinnedPos , chartData , chart ,
|
|
|
313
330
|
totalSeries,
|
|
314
331
|
showAllSeries
|
|
315
332
|
});
|
|
316
|
-
var
|
|
333
|
+
var _mousePos_plotCanvas_x, _mousePos_plotCanvas_y;
|
|
317
334
|
const pointInPixel = [
|
|
318
|
-
(
|
|
319
|
-
(
|
|
335
|
+
(_mousePos_plotCanvas_x = mousePos.plotCanvas.x) !== null && _mousePos_plotCanvas_x !== void 0 ? _mousePos_plotCanvas_x : 0,
|
|
336
|
+
(_mousePos_plotCanvas_y = mousePos.plotCanvas.y) !== null && _mousePos_plotCanvas_y !== void 0 ? _mousePos_plotCanvas_y : 0
|
|
320
337
|
];
|
|
321
338
|
if (chart.containPixel('grid', pointInPixel)) {
|
|
322
339
|
const pointInGrid = chart.convertFromPixel('grid', pointInPixel);
|
|
323
340
|
if (pointInGrid[0] !== undefined && pointInGrid[1] !== undefined) {
|
|
324
|
-
return legacyCheckforNearbySeries(chartData, pointInGrid, yBuffer, chart,
|
|
341
|
+
return legacyCheckforNearbySeries(chartData, pointInGrid, yBuffer, chart, format);
|
|
325
342
|
}
|
|
326
343
|
}
|
|
327
344
|
return [];
|
|
328
345
|
}
|
|
329
|
-
function isWithinPercentageRange({ valueToCheck
|
|
346
|
+
function isWithinPercentageRange({ valueToCheck, baseValue, percentage }) {
|
|
330
347
|
const range = percentage / 100 * baseValue;
|
|
331
348
|
const lowerBound = baseValue - range;
|
|
332
349
|
const upperBound = baseValue + range;
|
|
333
350
|
return valueToCheck >= lowerBound && valueToCheck <= upperBound;
|
|
334
351
|
}
|
|
335
|
-
function getYBuffer({ yInterval
|
|
352
|
+
function getYBuffer({ yInterval, totalSeries, showAllSeries = false }) {
|
|
336
353
|
if (showAllSeries) {
|
|
337
354
|
return yInterval * 10; // roughly correlates with grid so entire canvas is searched
|
|
338
355
|
}
|
|
@@ -21,23 +21,57 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
PIN_TOOLTIP_HELP_TEXT: ()
|
|
40
|
-
|
|
24
|
+
DEFAULT_TOOLTIP_CONFIG: function() {
|
|
25
|
+
return DEFAULT_TOOLTIP_CONFIG;
|
|
26
|
+
},
|
|
27
|
+
EMPHASIZED_SERIES_DESCRIPTION: function() {
|
|
28
|
+
return EMPHASIZED_SERIES_DESCRIPTION;
|
|
29
|
+
},
|
|
30
|
+
EMPTY_TOOLTIP_DATA: function() {
|
|
31
|
+
return EMPTY_TOOLTIP_DATA;
|
|
32
|
+
},
|
|
33
|
+
FALLBACK_CHART_WIDTH: function() {
|
|
34
|
+
return FALLBACK_CHART_WIDTH;
|
|
35
|
+
},
|
|
36
|
+
NEARBY_SERIES_DESCRIPTION: function() {
|
|
37
|
+
return NEARBY_SERIES_DESCRIPTION;
|
|
38
|
+
},
|
|
39
|
+
PIN_TOOLTIP_HELP_TEXT: function() {
|
|
40
|
+
return PIN_TOOLTIP_HELP_TEXT;
|
|
41
|
+
},
|
|
42
|
+
TOOLTIP_ADJUST_Y_POS_MULTIPLIER: function() {
|
|
43
|
+
return TOOLTIP_ADJUST_Y_POS_MULTIPLIER;
|
|
44
|
+
},
|
|
45
|
+
TOOLTIP_BG_COLOR_FALLBACK: function() {
|
|
46
|
+
return TOOLTIP_BG_COLOR_FALLBACK;
|
|
47
|
+
},
|
|
48
|
+
TOOLTIP_DATE_FORMAT: function() {
|
|
49
|
+
return TOOLTIP_DATE_FORMAT;
|
|
50
|
+
},
|
|
51
|
+
TOOLTIP_LABELS_MAX_WIDTH: function() {
|
|
52
|
+
return TOOLTIP_LABELS_MAX_WIDTH;
|
|
53
|
+
},
|
|
54
|
+
TOOLTIP_MAX_HEIGHT: function() {
|
|
55
|
+
return TOOLTIP_MAX_HEIGHT;
|
|
56
|
+
},
|
|
57
|
+
TOOLTIP_MAX_WIDTH: function() {
|
|
58
|
+
return TOOLTIP_MAX_WIDTH;
|
|
59
|
+
},
|
|
60
|
+
TOOLTIP_MIN_WIDTH: function() {
|
|
61
|
+
return TOOLTIP_MIN_WIDTH;
|
|
62
|
+
},
|
|
63
|
+
TOOLTIP_PADDING: function() {
|
|
64
|
+
return TOOLTIP_PADDING;
|
|
65
|
+
},
|
|
66
|
+
UNPIN_TOOLTIP_HELP_TEXT: function() {
|
|
67
|
+
return UNPIN_TOOLTIP_HELP_TEXT;
|
|
68
|
+
},
|
|
69
|
+
defaultCursorData: function() {
|
|
70
|
+
return defaultCursorData;
|
|
71
|
+
},
|
|
72
|
+
useMousePosition: function() {
|
|
73
|
+
return useMousePosition;
|
|
74
|
+
}
|
|
41
75
|
});
|
|
42
76
|
const _react = require("react");
|
|
43
77
|
const TOOLTIP_MIN_WIDTH = 375;
|
|
@@ -73,10 +107,7 @@ const defaultCursorData = {
|
|
|
73
107
|
},
|
|
74
108
|
chartWidth: 0
|
|
75
109
|
};
|
|
76
|
-
const
|
|
77
|
-
cursor: defaultCursorData,
|
|
78
|
-
focusedSeries: null
|
|
79
|
-
};
|
|
110
|
+
const EMPTY_TOOLTIP_DATA = [];
|
|
80
111
|
const useMousePosition = ()=>{
|
|
81
112
|
const [coords, setCoords] = (0, _react.useState)(null);
|
|
82
113
|
(0, _react.useEffect)(()=>{
|
|
@@ -91,12 +122,9 @@ const useMousePosition = ()=>{
|
|
|
91
122
|
y: e.clientY
|
|
92
123
|
},
|
|
93
124
|
plotCanvas: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
zrender: {
|
|
98
|
-
// echarts canvas coordinates added automatically by zrender
|
|
99
|
-
// zrX and zrY are similar to offsetX and offsetY but they return undefined when not hovering over a chart canvas
|
|
125
|
+
// Always use zrender mousemove coords since they handle browser inconsistencies for us
|
|
126
|
+
// ex: Firefox and Chrome have slightly different implementations of offsetX and offsetY
|
|
127
|
+
// more info: https://github.com/ecomfe/zrender/blob/5.5.0/src/core/event.ts#L46-L120
|
|
100
128
|
x: e.zrX,
|
|
101
129
|
y: e.zrY
|
|
102
130
|
},
|
|
@@ -116,4 +144,4 @@ const DEFAULT_TOOLTIP_CONFIG = {
|
|
|
116
144
|
enablePinning: true
|
|
117
145
|
};
|
|
118
146
|
const PIN_TOOLTIP_HELP_TEXT = 'Click chart to pin';
|
|
119
|
-
const UNPIN_TOOLTIP_HELP_TEXT = 'Click to unpin';
|
|
147
|
+
const UNPIN_TOOLTIP_HELP_TEXT = 'Click chart to unpin';
|
|
@@ -21,19 +21,24 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
assembleTransform: ()
|
|
25
|
-
|
|
24
|
+
assembleTransform: function() {
|
|
25
|
+
return assembleTransform;
|
|
26
|
+
},
|
|
27
|
+
getTooltipStyles: function() {
|
|
28
|
+
return getTooltipStyles;
|
|
29
|
+
}
|
|
26
30
|
});
|
|
27
|
-
const
|
|
31
|
+
const _tooltipmodel = require("./tooltip-model");
|
|
28
32
|
function assembleTransform(mousePos, chartWidth, pinnedPos, tooltipHeight, tooltipWidth, containerElement) {
|
|
29
33
|
if (mousePos === null) {
|
|
30
|
-
return
|
|
34
|
+
return undefined;
|
|
31
35
|
}
|
|
32
36
|
const cursorPaddingX = 32;
|
|
33
37
|
const cursorPaddingY = 16;
|
|
34
38
|
if (pinnedPos !== null) {
|
|
35
39
|
mousePos = pinnedPos;
|
|
36
40
|
}
|
|
41
|
+
if (mousePos.plotCanvas.x === undefined) return undefined;
|
|
37
42
|
// By default, tooltip is located in a Portal attached to the body.
|
|
38
43
|
// Using page coordinates instead of viewport ensures the tooltip is
|
|
39
44
|
// absolutely positioned correctly as the user scrolls
|
|
@@ -51,30 +56,30 @@ function assembleTransform(mousePos, chartWidth, pinnedPos, tooltipHeight, toolt
|
|
|
51
56
|
if (mousePos.client.y + tooltipHeight + cursorPaddingY > window.innerHeight) {
|
|
52
57
|
// adjust so tooltip does not get cut off at bottom of chart
|
|
53
58
|
// multiplier ensures tooltip isn't overly adjusted and gets cut off at the top of the viewport
|
|
54
|
-
y = y - tooltipHeight *
|
|
59
|
+
y = y - tooltipHeight * _tooltipmodel.TOOLTIP_ADJUST_Y_POS_MULTIPLIER;
|
|
55
60
|
// If y is now above of the top of containerElement, set y close to 0 so tooltip does not get cut off
|
|
56
61
|
if (containerRect && y < containerRect.top) {
|
|
57
|
-
y =
|
|
62
|
+
y = _tooltipmodel.TOOLTIP_PADDING / 2; // leaves room for some padding around tooltip
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
// use tooltip width to determine when to repos from right to left
|
|
61
66
|
const xPosAdjustThreshold = chartWidth - tooltipWidth * 0.9;
|
|
62
67
|
// reposition so tooltip is never too close to right side of chart or left side of browser window
|
|
63
|
-
return mousePos.plotCanvas.x > xPosAdjustThreshold && x >
|
|
68
|
+
return mousePos.plotCanvas.x > xPosAdjustThreshold && x > _tooltipmodel.TOOLTIP_MAX_WIDTH ? `translate3d(${x - cursorPaddingX}px, ${y}px, 0) translateX(-100%)` : `translate3d(${x + cursorPaddingX}px, ${y}px, 0)`;
|
|
64
69
|
}
|
|
65
70
|
function getTooltipStyles(theme, pinnedPos, maxHeight) {
|
|
66
|
-
var
|
|
67
|
-
const adjustedMaxHeight = maxHeight ? maxHeight -
|
|
68
|
-
var
|
|
71
|
+
var _theme_palette_designSystem;
|
|
72
|
+
const adjustedMaxHeight = maxHeight ? maxHeight - _tooltipmodel.TOOLTIP_PADDING : undefined;
|
|
73
|
+
var _theme_palette_designSystem_grey_;
|
|
69
74
|
return {
|
|
70
|
-
minWidth:
|
|
71
|
-
maxWidth:
|
|
72
|
-
maxHeight: adjustedMaxHeight !== null && adjustedMaxHeight !== void 0 ? adjustedMaxHeight :
|
|
75
|
+
minWidth: _tooltipmodel.TOOLTIP_MIN_WIDTH,
|
|
76
|
+
maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
|
|
77
|
+
maxHeight: adjustedMaxHeight !== null && adjustedMaxHeight !== void 0 ? adjustedMaxHeight : _tooltipmodel.TOOLTIP_MAX_HEIGHT,
|
|
73
78
|
padding: 0,
|
|
74
79
|
position: 'absolute',
|
|
75
80
|
top: 0,
|
|
76
81
|
left: 0,
|
|
77
|
-
backgroundColor: (
|
|
82
|
+
backgroundColor: (_theme_palette_designSystem_grey_ = (_theme_palette_designSystem = theme.palette.designSystem) === null || _theme_palette_designSystem === void 0 ? void 0 : _theme_palette_designSystem.grey[800]) !== null && _theme_palette_designSystem_grey_ !== void 0 ? _theme_palette_designSystem_grey_ : _tooltipmodel.TOOLTIP_BG_COLOR_FALLBACK,
|
|
78
83
|
borderRadius: '6px',
|
|
79
84
|
color: '#fff',
|
|
80
85
|
fontSize: '11px',
|
|
@@ -0,0 +1,40 @@
|
|
|
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, "ToolbarIconButton", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return ToolbarIconButton;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _react = require("react");
|
|
25
|
+
const _material = require("@mui/material");
|
|
26
|
+
function IconButton(props, ref) {
|
|
27
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledIconButton, {
|
|
28
|
+
ref: ref,
|
|
29
|
+
variant: "outlined",
|
|
30
|
+
color: "secondary",
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const StyledIconButton = (0, _material.styled)(_material.Button)(({ theme })=>({
|
|
35
|
+
// Using a button with some adjusted styles because it is easier to inherit
|
|
36
|
+
// styling and variants from themes than with an IconButton.
|
|
37
|
+
padding: theme.spacing(0.5),
|
|
38
|
+
minWidth: 'auto'
|
|
39
|
+
}));
|
|
40
|
+
const ToolbarIconButton = /*#__PURE__*/ (0, _react.forwardRef)(IconButton);
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
_export_star(require("./ToolbarIconButton"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return from;
|
|
30
|
+
}
|
package/dist/cjs/YAxisLabel.js
CHANGED
|
@@ -16,12 +16,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "YAxisLabel", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: ()
|
|
19
|
+
get: function() {
|
|
20
|
+
return YAxisLabel;
|
|
21
|
+
}
|
|
20
22
|
});
|
|
21
|
-
const
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
22
24
|
const _material = require("@mui/material");
|
|
23
|
-
function YAxisLabel({ name
|
|
24
|
-
return /*#__PURE__*/ (0,
|
|
25
|
+
function YAxisLabel({ name, height }) {
|
|
26
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
25
27
|
sx: {
|
|
26
28
|
display: 'inline-block',
|
|
27
29
|
maxWidth: height,
|
|
@@ -32,7 +34,7 @@ function YAxisLabel({ name , height }) {
|
|
|
32
34
|
textAlign: 'center',
|
|
33
35
|
zIndex: 1
|
|
34
36
|
},
|
|
35
|
-
children: /*#__PURE__*/ (0,
|
|
37
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
36
38
|
variant: "body1",
|
|
37
39
|
"aria-label": "y axis label",
|
|
38
40
|
sx: {
|
|
@@ -21,12 +21,21 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
ChartsProvider: function() {
|
|
25
|
+
return ChartsProvider;
|
|
26
|
+
},
|
|
27
|
+
ChartsThemeContext: function() {
|
|
28
|
+
return ChartsThemeContext;
|
|
29
|
+
},
|
|
30
|
+
useChartsContext: function() {
|
|
31
|
+
return useChartsContext;
|
|
32
|
+
},
|
|
33
|
+
useChartsTheme: function() {
|
|
34
|
+
return useChartsTheme;
|
|
35
|
+
}
|
|
27
36
|
});
|
|
28
|
-
const
|
|
29
|
-
const _react = /*#__PURE__*/
|
|
37
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
38
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
30
39
|
function _getRequireWildcardCache(nodeInterop) {
|
|
31
40
|
if (typeof WeakMap !== "function") return null;
|
|
32
41
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -35,7 +44,7 @@ function _getRequireWildcardCache(nodeInterop) {
|
|
|
35
44
|
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
36
45
|
})(nodeInterop);
|
|
37
46
|
}
|
|
38
|
-
function
|
|
47
|
+
function _interop_require_wildcard(obj, nodeInterop) {
|
|
39
48
|
if (!nodeInterop && obj && obj.__esModule) {
|
|
40
49
|
return obj;
|
|
41
50
|
}
|
|
@@ -48,7 +57,9 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
48
57
|
if (cache && cache.has(obj)) {
|
|
49
58
|
return cache.get(obj);
|
|
50
59
|
}
|
|
51
|
-
var newObj = {
|
|
60
|
+
var newObj = {
|
|
61
|
+
__proto__: null
|
|
62
|
+
};
|
|
52
63
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
64
|
for(var key in obj){
|
|
54
65
|
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
@@ -66,18 +77,36 @@ function _interopRequireWildcard(obj, nodeInterop) {
|
|
|
66
77
|
}
|
|
67
78
|
return newObj;
|
|
68
79
|
}
|
|
69
|
-
function
|
|
70
|
-
const { children ,
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
function ChartsProvider(props) {
|
|
81
|
+
const { children, chartsTheme, enablePinning = false } = props;
|
|
82
|
+
const [lastTooltipPinnedCoords, setLastTooltipPinnedCoords] = (0, _react.useState)(null);
|
|
83
|
+
const ctx = (0, _react.useMemo)(()=>{
|
|
84
|
+
return {
|
|
85
|
+
chartsTheme,
|
|
86
|
+
enablePinning,
|
|
87
|
+
lastTooltipPinnedCoords,
|
|
88
|
+
setLastTooltipPinnedCoords
|
|
89
|
+
};
|
|
90
|
+
}, [
|
|
91
|
+
chartsTheme,
|
|
92
|
+
enablePinning,
|
|
93
|
+
lastTooltipPinnedCoords,
|
|
94
|
+
setLastTooltipPinnedCoords
|
|
95
|
+
]);
|
|
96
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(ChartsThemeContext.Provider, {
|
|
97
|
+
value: ctx,
|
|
73
98
|
children: children
|
|
74
99
|
});
|
|
75
100
|
}
|
|
76
101
|
const ChartsThemeContext = /*#__PURE__*/ (0, _react.createContext)(undefined);
|
|
77
|
-
function
|
|
102
|
+
function useChartsContext() {
|
|
78
103
|
const ctx = (0, _react.useContext)(ChartsThemeContext);
|
|
79
104
|
if (ctx === undefined) {
|
|
80
105
|
throw new Error('No ChartsThemeContext found. Did you forget a Provider?');
|
|
81
106
|
}
|
|
82
107
|
return ctx;
|
|
83
108
|
}
|
|
109
|
+
function useChartsTheme() {
|
|
110
|
+
const ctx = useChartsContext();
|
|
111
|
+
return ctx.chartsTheme;
|
|
112
|
+
}
|
|
@@ -21,13 +21,17 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
-
SnackbarProvider: ()
|
|
25
|
-
|
|
24
|
+
SnackbarProvider: function() {
|
|
25
|
+
return _notistack.SnackbarProvider;
|
|
26
|
+
},
|
|
27
|
+
useSnackbar: function() {
|
|
28
|
+
return useSnackbar;
|
|
29
|
+
}
|
|
26
30
|
});
|
|
27
31
|
const _react = require("react");
|
|
28
32
|
const _notistack = require("notistack");
|
|
29
33
|
function useSnackbar() {
|
|
30
|
-
const { enqueueSnackbar
|
|
34
|
+
const { enqueueSnackbar, closeSnackbar } = (0, _notistack.useSnackbar)();
|
|
31
35
|
// Create variant-specific callbacks
|
|
32
36
|
const errorSnackbar = useEnqueueFunction(enqueueSnackbar, 'error');
|
|
33
37
|
const infoSnackbar = useEnqueueFunction(enqueueSnackbar, 'info');
|