@perses-dev/components 0.0.0-snapshot-scatterplot-fix-imports-95e1b59 → 0.0.0-snapshot-explorer-plugin-c4a7621
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/AlignSelector/AlignSelector.d.ts +9 -0
- package/dist/AlignSelector/AlignSelector.d.ts.map +1 -0
- package/dist/AlignSelector/AlignSelector.js +42 -0
- package/dist/AlignSelector/AlignSelector.js.map +1 -0
- package/dist/AlignSelector/index.d.ts +2 -0
- package/dist/AlignSelector/index.d.ts.map +1 -0
- package/dist/AlignSelector/index.js +15 -0
- package/dist/AlignSelector/index.js.map +1 -0
- package/dist/BarChart/BarChart.d.ts +2 -1
- package/dist/BarChart/BarChart.d.ts.map +1 -1
- package/dist/BarChart/BarChart.js +11 -6
- package/dist/BarChart/BarChart.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +3 -1
- package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/ColorPicker/ColorPicker.js +28 -13
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.d.ts +9 -0
- package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -0
- package/dist/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +16 -13
- package/dist/ColorPicker/OptionsColorPicker.js.map +1 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.d.ts.map +1 -1
- package/dist/ColorPicker/index.js +1 -0
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +8 -5
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -3
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DensitySelector/DensitySelector.d.ts +8 -0
- package/dist/DensitySelector/DensitySelector.d.ts.map +1 -0
- package/dist/DensitySelector/DensitySelector.js +46 -0
- package/dist/DensitySelector/DensitySelector.js.map +1 -0
- package/dist/DensitySelector/index.d.ts +2 -0
- package/dist/DensitySelector/index.d.ts.map +1 -0
- package/dist/DensitySelector/index.js +15 -0
- package/dist/DensitySelector/index.js.map +1 -0
- package/dist/Dialog/Dialog.d.ts +9 -14
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +7 -3
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +2 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/DragAndDrop/DragAndDropList.d.ts +24 -0
- package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -0
- package/dist/DragAndDrop/DragAndDropList.js +153 -0
- package/dist/DragAndDrop/DragAndDropList.js.map +1 -0
- package/dist/DragAndDrop/DragButton.d.ts +13 -0
- package/dist/DragAndDrop/DragButton.d.ts.map +1 -0
- package/dist/DragAndDrop/DragButton.js +97 -0
- package/dist/DragAndDrop/DragButton.js.map +1 -0
- package/dist/DragAndDrop/DropIndicator.d.ts +3 -0
- package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -0
- package/dist/DragAndDrop/DropIndicator.js +44 -0
- package/dist/DragAndDrop/DropIndicator.js.map +1 -0
- package/dist/DragAndDrop/index.d.ts +4 -0
- package/dist/DragAndDrop/index.d.ts.map +1 -0
- package/dist/DragAndDrop/index.js +17 -0
- package/dist/DragAndDrop/index.js.map +1 -0
- package/dist/DragAndDrop/model.d.ts +11 -0
- package/dist/DragAndDrop/model.d.ts.map +1 -0
- package/dist/DragAndDrop/model.js +17 -0
- package/dist/DragAndDrop/model.js.map +1 -0
- package/dist/Drawer/Drawer.d.ts +2 -1
- 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 +2 -2
- package/dist/EChart/EChart.d.ts.map +1 -1
- package/dist/EChart/EChart.js +5 -6
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/ErrorAlert.d.ts +2 -1
- package/dist/ErrorAlert.d.ts.map +1 -1
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -1
- package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
- package/dist/FormEditor/FormActions.d.ts +16 -0
- package/dist/FormEditor/FormActions.d.ts.map +1 -0
- package/dist/FormEditor/FormActions.js +75 -0
- package/dist/FormEditor/FormActions.js.map +1 -0
- package/dist/FormEditor/index.d.ts +2 -0
- package/dist/FormEditor/index.d.ts.map +1 -0
- package/dist/FormEditor/index.js +15 -0
- package/dist/FormEditor/index.js.map +1 -0
- package/dist/FormatControls/FormatControls.d.ts +2 -1
- 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 +2 -1
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +4 -7
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.d.ts +3 -3
- package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +3 -4
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/JSONEditor.d.ts +2 -1
- package/dist/JSONEditor.d.ts.map +1 -1
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +2 -1
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +2 -1
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +8 -4
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/LegendColorBadge.d.ts +2 -2
- package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
- package/dist/Legend/LegendColorBadge.js +2 -2
- package/dist/Legend/LegendColorBadge.js.map +1 -1
- package/dist/Legend/ListLegend.d.ts +2 -1
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +5 -5
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +8 -12
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +2 -1
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +1 -0
- package/dist/Legend/TableLegend.js.map +1 -1
- 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 +1 -1
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +6 -11
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LinksEditor/LinksEditor.d.ts +8 -0
- package/dist/LinksEditor/LinksEditor.d.ts.map +1 -0
- package/dist/LinksEditor/LinksEditor.js +161 -0
- package/dist/LinksEditor/LinksEditor.js.map +1 -0
- package/dist/LinksEditor/index.d.ts +2 -0
- package/dist/LinksEditor/index.d.ts.map +1 -0
- package/dist/LinksEditor/index.js +15 -0
- package/dist/LinksEditor/index.js.map +1 -0
- package/dist/ModeSelector/ModeSelector.d.ts +2 -1
- package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +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.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.map +1 -1
- package/dist/Overlay/Overlay.d.ts +16 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -0
- package/dist/Overlay/Overlay.js +52 -0
- package/dist/Overlay/Overlay.js.map +1 -0
- package/dist/Overlay/index.d.ts +2 -0
- package/dist/Overlay/index.d.ts.map +1 -0
- package/dist/Overlay/index.js +15 -0
- package/dist/Overlay/index.js.map +1 -0
- package/dist/PieChart/PieChart.d.ts +14 -0
- package/dist/PieChart/PieChart.d.ts.map +1 -0
- package/dist/PieChart/PieChart.js +92 -0
- package/dist/PieChart/PieChart.js.map +1 -0
- package/dist/PieChart/index.d.ts +2 -0
- package/dist/PieChart/index.d.ts.map +1 -0
- package/dist/PieChart/index.js +15 -0
- package/dist/PieChart/index.js.map +1 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +2 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js +6 -5
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SortSelector/SortSelector.d.ts +2 -1
- package/dist/SortSelector/SortSelector.d.ts.map +1 -1
- package/dist/SortSelector/SortSelector.js.map +1 -1
- package/dist/SortSelector/SortSelectorButtons.d.ts +9 -0
- package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -0
- package/dist/SortSelector/SortSelectorButtons.js +42 -0
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -0
- package/dist/SortSelector/index.d.ts +1 -0
- package/dist/SortSelector/index.d.ts.map +1 -1
- package/dist/SortSelector/index.js +2 -1
- package/dist/SortSelector/index.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts +6 -5
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +10 -16
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
- package/dist/StatChart/calculateFontSize.js +2 -4
- package/dist/StatChart/calculateFontSize.js.map +1 -1
- package/dist/StatChart/utils/formatStatChartValue.d.ts +3 -0
- package/dist/StatChart/utils/formatStatChartValue.d.ts.map +1 -0
- package/dist/StatChart/utils/formatStatChartValue.js +26 -0
- package/dist/StatChart/utils/formatStatChartValue.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +27 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js +132 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +13 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.js +47 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +1 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +2 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +1 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.js +41 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +1 -0
- package/dist/StatusHistoryChart/index.d.ts +3 -0
- package/dist/StatusHistoryChart/index.d.ts.map +1 -0
- package/dist/StatusHistoryChart/index.js +16 -0
- package/dist/StatusHistoryChart/index.js.map +1 -0
- package/dist/StatusHistoryChart/utils/get-color.d.ts +6 -0
- package/dist/StatusHistoryChart/utils/get-color.d.ts.map +1 -0
- package/dist/StatusHistoryChart/utils/get-color.js +100 -0
- package/dist/StatusHistoryChart/utils/get-color.js.map +1 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +3 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +1 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.js +27 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +1 -0
- package/dist/Table/InnerTable.d.ts.map +1 -1
- package/dist/Table/InnerTable.js +2 -1
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +2 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +10 -8
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableCell.d.ts +4 -2
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +28 -6
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.d.ts +2 -1
- package/dist/Table/TableCheckbox.d.ts.map +1 -1
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableHeaderCell.d.ts +3 -2
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts +5 -4
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +17 -14
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.d.ts +2 -2
- 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.d.ts +10 -12
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +7 -13
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
- package/dist/Table/index.d.ts +1 -2
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +22 -2
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +27 -21
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.d.ts +2 -2
- 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 +2 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js +18 -26
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/TimeChart/TimeChart.d.ts.map +1 -1
- package/dist/TimeChart/TimeChart.js +5 -8
- package/dist/TimeChart/TimeChart.js.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +19 -0
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +43 -28
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +36 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.js +119 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -0
- package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.d.ts +1 -2
- package/dist/TimeRangeSelector/index.d.ts.map +1 -0
- package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
- package/dist/TimeRangeSelector/index.js.map +1 -0
- package/dist/TimeRangeSelector/utils.d.ts +25 -0
- package/dist/TimeRangeSelector/utils.d.ts.map +1 -0
- package/dist/{DateTimeRangePicker → TimeRangeSelector}/utils.js +23 -2
- package/dist/TimeRangeSelector/utils.js.map +1 -0
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.js +6 -11
- package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -2
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +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 +2 -3
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -14
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +15 -25
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +8 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +13 -2
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts +1 -21
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +2 -4
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/TransformsEditor/TransformEditor.d.ts +9 -0
- package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformEditor.js +289 -0
- package/dist/TransformsEditor/TransformEditor.js.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.d.ts +10 -0
- package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.js +118 -0
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.d.ts +9 -0
- package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.js +90 -0
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
- package/dist/TransformsEditor/index.d.ts +2 -0
- package/dist/TransformsEditor/index.d.ts.map +1 -0
- package/dist/TransformsEditor/index.js +15 -0
- package/dist/TransformsEditor/index.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +10 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.js +374 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +8 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js +118 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
- package/dist/ValueMappingEditor/index.d.ts +2 -0
- package/dist/ValueMappingEditor/index.d.ts.map +1 -0
- package/dist/ValueMappingEditor/index.js +15 -0
- package/dist/ValueMappingEditor/index.js.map +1 -0
- package/dist/YAxisLabel.d.ts +2 -1
- package/dist/YAxisLabel.d.ts.map +1 -1
- package/dist/YAxisLabel.js +4 -2
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/AlignSelector/AlignSelector.js +50 -0
- package/dist/cjs/AlignSelector/index.js +30 -0
- package/dist/cjs/BarChart/BarChart.js +12 -7
- package/dist/cjs/ColorPicker/ColorPicker.js +28 -54
- package/dist/cjs/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +18 -15
- package/dist/cjs/ColorPicker/index.js +1 -0
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +8 -10
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -3
- package/dist/cjs/DensitySelector/DensitySelector.js +54 -0
- package/dist/cjs/DensitySelector/index.js +30 -0
- package/dist/cjs/Dialog/Dialog.js +7 -3
- package/dist/cjs/DragAndDrop/DragAndDropList.js +159 -0
- package/dist/cjs/DragAndDrop/DragButton.js +121 -0
- package/dist/cjs/DragAndDrop/DropIndicator.js +52 -0
- package/dist/cjs/DragAndDrop/index.js +32 -0
- package/dist/cjs/DragAndDrop/model.js +25 -0
- package/dist/cjs/Drawer/Drawer.js +1 -1
- package/dist/cjs/EChart/EChart.js +5 -47
- package/dist/cjs/FormEditor/FormActions.js +83 -0
- package/dist/cjs/FormEditor/index.js +30 -0
- package/dist/cjs/FormatControls/FormatControls.js +2 -2
- package/dist/cjs/GaugeChart/GaugeChart.js +5 -8
- package/dist/cjs/InfoTooltip/InfoTooltip.js +3 -9
- package/dist/cjs/Legend/Legend.js +8 -4
- package/dist/cjs/Legend/LegendColorBadge.js +2 -7
- package/dist/cjs/Legend/ListLegendItem.js +6 -50
- package/dist/cjs/Legend/TableLegend.js +1 -0
- package/dist/cjs/LineChart/LineChart.js +8 -13
- package/dist/cjs/LinksEditor/LinksEditor.js +174 -0
- package/dist/cjs/LinksEditor/index.js +30 -0
- package/dist/cjs/Overlay/Overlay.js +71 -0
- package/dist/cjs/Overlay/index.js +30 -0
- package/dist/cjs/PieChart/PieChart.js +100 -0
- package/dist/cjs/PieChart/index.js +30 -0
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +6 -5
- package/dist/cjs/SortSelector/SortSelectorButtons.js +50 -0
- package/dist/cjs/SortSelector/index.js +2 -1
- package/dist/cjs/StatChart/StatChart.js +13 -19
- package/dist/cjs/StatChart/calculateFontSize.js +2 -4
- package/dist/cjs/StatChart/utils/formatStatChartValue.js +34 -0
- package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +140 -0
- package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +55 -0
- package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +48 -0
- package/dist/cjs/StatusHistoryChart/index.js +31 -0
- package/dist/cjs/StatusHistoryChart/utils/get-color.js +125 -0
- package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +35 -0
- package/dist/cjs/Table/InnerTable.js +2 -1
- package/dist/cjs/Table/Table.js +9 -7
- package/dist/cjs/Table/TableCell.js +28 -6
- package/dist/cjs/Table/VirtualizedTable.js +17 -14
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +7 -13
- package/dist/cjs/Table/index.js +1 -7
- package/dist/cjs/Table/model/table-model.js +30 -21
- package/dist/cjs/ThresholdsEditor/ThresholdInput.js +2 -2
- package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +18 -26
- package/dist/cjs/TimeChart/TimeChart.js +5 -8
- package/dist/cjs/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +37 -30
- package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +127 -0
- package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
- package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/utils.js +24 -1
- package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +6 -11
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -2
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +2 -3
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +6 -14
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +15 -25
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +22 -2
- package/dist/cjs/TimeSeriesTooltip/utils.js +2 -4
- package/dist/cjs/TransformsEditor/TransformEditor.js +297 -0
- package/dist/cjs/TransformsEditor/TransformEditorContainer.js +131 -0
- package/dist/cjs/TransformsEditor/TransformsEditor.js +103 -0
- package/dist/cjs/TransformsEditor/index.js +30 -0
- package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +387 -0
- package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +131 -0
- package/dist/cjs/ValueMappingEditor/index.js +30 -0
- package/dist/cjs/YAxisLabel.js +4 -2
- package/dist/cjs/context/TimeZoneProvider.js +1 -1
- package/dist/cjs/controls/TextField.js +54 -0
- package/dist/cjs/controls/index.js +30 -0
- package/dist/cjs/index.js +12 -1
- package/dist/cjs/model/timeOption.js +19 -1
- package/dist/cjs/theme/index.js +1 -0
- package/dist/cjs/theme/palette/background.js +2 -0
- package/dist/cjs/theme/theme.js +6 -6
- package/dist/cjs/utils/chart-actions.js +2 -3
- package/dist/cjs/utils/format.js +19 -1
- package/dist/cjs/utils/theme-gen.js +5 -7
- package/dist/context/ChartsProvider.d.ts +2 -2
- package/dist/context/ChartsProvider.d.ts.map +1 -1
- package/dist/context/ChartsProvider.js.map +1 -1
- package/dist/context/TimeZoneProvider.d.ts +4 -4
- 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/controls/TextField.d.ts +9 -0
- package/dist/controls/TextField.d.ts.map +1 -0
- package/dist/controls/TextField.js +41 -0
- package/dist/controls/TextField.js.map +1 -0
- package/dist/controls/index.d.ts +2 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +15 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/model/timeOption.d.ts +2 -1
- package/dist/model/timeOption.d.ts.map +1 -1
- package/dist/model/timeOption.js +13 -2
- package/dist/model/timeOption.js.map +1 -1
- package/dist/test/render.d.ts +3 -3
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette/background.d.ts.map +1 -1
- package/dist/theme/palette/background.js +2 -0
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +5 -5
- package/dist/theme/theme.js.map +1 -1
- package/dist/utils/axis.d.ts +1 -7
- package/dist/utils/axis.d.ts.map +1 -1
- package/dist/utils/axis.js.map +1 -1
- package/dist/utils/chart-actions.d.ts.map +1 -1
- package/dist/utils/chart-actions.js +2 -3
- package/dist/utils/chart-actions.js.map +1 -1
- package/dist/utils/component-ids.d.ts.map +1 -1
- package/dist/utils/component-ids.js.map +1 -1
- package/dist/utils/format.d.ts +10 -4
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +16 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/theme-gen.js +5 -7
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +12 -8
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +0 -9
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +0 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +0 -11
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +0 -80
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +0 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +0 -13
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js +0 -67
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +0 -1
- package/dist/DateTimeRangePicker/index.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/index.js.map +0 -1
- package/dist/DateTimeRangePicker/utils.d.ts +0 -7
- package/dist/DateTimeRangePicker/utils.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/utils.js.map +0 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +0 -3
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +0 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +0 -1
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +0 -88
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +0 -80
|
@@ -57,7 +57,6 @@ function _interop_require_default(obj) {
|
|
|
57
57
|
_renderers.CanvasRenderer
|
|
58
58
|
]);
|
|
59
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
|
-
var _option_tooltip;
|
|
61
60
|
const { chartsTheme, enablePinning, lastTooltipPinnedCoords, setLastTooltipPinnedCoords } = (0, _ChartsProvider.useChartsContext)();
|
|
62
61
|
const isPinningEnabled = tooltipConfig.enablePinning && enablePinning;
|
|
63
62
|
const chartRef = (0, _react.useRef)();
|
|
@@ -172,7 +171,6 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
172
171
|
...seriesMapping,
|
|
173
172
|
pinnedCrosshair
|
|
174
173
|
] : seriesMapping;
|
|
175
|
-
var _timeScale_rangeMs;
|
|
176
174
|
const option = {
|
|
177
175
|
dataset: dataset,
|
|
178
176
|
series: updatedSeriesMapping,
|
|
@@ -182,7 +180,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
182
180
|
max: isLocalTimeZone ? timeScale.endMs : (0, _datefnstz.utcToZonedTime)(timeScale.endMs, timeZone),
|
|
183
181
|
axisLabel: {
|
|
184
182
|
hideOverlap: true,
|
|
185
|
-
formatter: (0, _utils.getFormattedAxisLabel)(
|
|
183
|
+
formatter: (0, _utils.getFormattedAxisLabel)(timeScale.rangeMs ?? 0)
|
|
186
184
|
},
|
|
187
185
|
axisPointer: {
|
|
188
186
|
snap: false
|
|
@@ -196,7 +194,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
196
194
|
// Stacked bar uses ECharts tooltip so subgroup data shows correctly.
|
|
197
195
|
showContent: isStackedBar,
|
|
198
196
|
trigger: isStackedBar ? 'item' : 'axis',
|
|
199
|
-
appendToBody:
|
|
197
|
+
appendToBody: isStackedBar
|
|
200
198
|
},
|
|
201
199
|
// https://echarts.apache.org/en/option.html#axisPointer
|
|
202
200
|
axisPointer: {
|
|
@@ -255,7 +253,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
255
253
|
seriesMapping
|
|
256
254
|
]);
|
|
257
255
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
258
|
-
|
|
256
|
+
style: {
|
|
259
257
|
height
|
|
260
258
|
},
|
|
261
259
|
// onContextMenu={(e) => {
|
|
@@ -302,10 +300,9 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
302
300
|
setPinnedCrosshair((current)=>{
|
|
303
301
|
// Only add pinned crosshair line series when there is not one already in seriesMapping.
|
|
304
302
|
if (current === null) {
|
|
305
|
-
var _data_;
|
|
306
303
|
const cursorX = pointInGrid[0];
|
|
307
304
|
// Only need to loop through first dataset source since getCommonTimeScale ensures xAxis timestamps are consistent
|
|
308
|
-
const firstTimeSeriesValues =
|
|
305
|
+
const firstTimeSeriesValues = data[0]?.values;
|
|
309
306
|
const closestTimestamp = (0, _utils.getClosestTimestamp)(firstTimeSeriesValues, cursorX);
|
|
310
307
|
// Crosshair snaps to nearest timestamp since cursor may be slightly to left or right
|
|
311
308
|
const pinnedCrosshair = (0, _merge.default)({}, _model.DEFAULT_PINNED_CROSSHAIR, {
|
|
@@ -378,7 +375,7 @@ const TimeChart = /*#__PURE__*/ (0, _react.forwardRef)(function TimeChart({ heig
|
|
|
378
375
|
}
|
|
379
376
|
},
|
|
380
377
|
children: [
|
|
381
|
-
showTooltip === true &&
|
|
378
|
+
showTooltip === true && option.tooltip?.showContent === false && tooltipConfig.hidden !== true && /*#__PURE__*/ (0, _jsxruntime.jsx)(_TimeSeriesTooltip.TimeChartTooltip, {
|
|
382
379
|
containerId: chartsTheme.tooltipPortalContainerId,
|
|
383
380
|
chartRef: chartRef,
|
|
384
381
|
data: data,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
Object.defineProperty(exports, "
|
|
17
|
+
Object.defineProperty(exports, "DateTimeRangePicker", {
|
|
18
18
|
enumerable: true,
|
|
19
19
|
get: function() {
|
|
20
|
-
return
|
|
20
|
+
return DateTimeRangePicker;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -25,23 +25,24 @@ const _react = require("react");
|
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _xdatepickers = require("@mui/x-date-pickers");
|
|
27
27
|
const _AdapterDateFns = require("@mui/x-date-pickers/AdapterDateFns");
|
|
28
|
-
const
|
|
28
|
+
const _context = require("../context");
|
|
29
|
+
const _ErrorBoundary = require("../ErrorBoundary");
|
|
30
|
+
const _ErrorAlert = require("../ErrorAlert");
|
|
29
31
|
const _utils = require("./utils");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const { formatWithUserTimeZone } = (0, _TimeZoneProvider.useTimeZone)();
|
|
32
|
+
const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
33
|
+
const { formatWithUserTimeZone } = (0, _context.useTimeZone)();
|
|
33
34
|
// Time range values as dates that can be used as a time range.
|
|
34
35
|
const [timeRange, setTimeRange] = (0, _react.useState)(initialTimeRange);
|
|
35
36
|
// Time range values as strings used to populate the text inputs. May not
|
|
36
37
|
// be valid as dates when the user is typing.
|
|
37
38
|
const [timeRangeInputs, setTimeRangeInputs] = (0, _react.useState)({
|
|
38
|
-
start: formatWithUserTimeZone(initialTimeRange.start, DATE_TIME_FORMAT),
|
|
39
|
-
end: formatWithUserTimeZone(initialTimeRange.end, DATE_TIME_FORMAT)
|
|
39
|
+
start: formatWithUserTimeZone(initialTimeRange.start, _utils.DATE_TIME_FORMAT),
|
|
40
|
+
end: formatWithUserTimeZone(initialTimeRange.end, _utils.DATE_TIME_FORMAT)
|
|
40
41
|
});
|
|
41
42
|
const [showStartCalendar, setShowStartCalendar] = (0, _react.useState)(true);
|
|
42
43
|
const changeTimeRange = (newTime, segment)=>{
|
|
43
44
|
const isInputChange = typeof newTime === 'string';
|
|
44
|
-
const newInputTime = isInputChange ? newTime : formatWithUserTimeZone(newTime, DATE_TIME_FORMAT);
|
|
45
|
+
const newInputTime = isInputChange ? newTime : formatWithUserTimeZone(newTime, _utils.DATE_TIME_FORMAT);
|
|
45
46
|
setTimeRangeInputs((prevTimeRangeInputs)=>{
|
|
46
47
|
return {
|
|
47
48
|
...prevTimeRangeInputs,
|
|
@@ -159,27 +160,33 @@ const AbsoluteTimePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
|
159
160
|
pl: 1,
|
|
160
161
|
pr: 1,
|
|
161
162
|
children: [
|
|
162
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
163
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
164
|
+
FallbackComponent: _ErrorAlert.ErrorAlert,
|
|
165
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatepickers.DateTimeField, {
|
|
166
|
+
label: "Start Time",
|
|
167
|
+
value: new Date(timeRangeInputs.start),
|
|
168
|
+
onChange: (event)=>{
|
|
169
|
+
if (event) {
|
|
170
|
+
onChangeStartTime(event);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
onBlur: ()=>updateDateRange(),
|
|
174
|
+
format: _utils.DATE_TIME_FORMAT
|
|
175
|
+
})
|
|
173
176
|
}),
|
|
174
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
178
|
+
FallbackComponent: _ErrorAlert.ErrorAlert,
|
|
179
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatepickers.DateTimeField, {
|
|
180
|
+
label: "End Time",
|
|
181
|
+
value: new Date(timeRangeInputs.end),
|
|
182
|
+
onChange: (event)=>{
|
|
183
|
+
if (event) {
|
|
184
|
+
onChangeEndTime(event);
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
onBlur: ()=>updateDateRange(),
|
|
188
|
+
format: _utils.DATE_TIME_FORMAT
|
|
189
|
+
})
|
|
183
190
|
})
|
|
184
191
|
]
|
|
185
192
|
}),
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Copyright 2024 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, "TimeRangeSelector", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return TimeRangeSelector;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _Calendar = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Calendar"));
|
|
26
|
+
const _core = require("@perses-dev/core");
|
|
27
|
+
const _react = require("react");
|
|
28
|
+
const _context = require("../context");
|
|
29
|
+
const _DateTimeRangePicker = require("./DateTimeRangePicker");
|
|
30
|
+
const _utils = require("./utils");
|
|
31
|
+
function _interop_require_default(obj) {
|
|
32
|
+
return obj && obj.__esModule ? obj : {
|
|
33
|
+
default: obj
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function TimeRangeSelector({ value, timeOptions, onChange, height, showCustomTimeRange = true }) {
|
|
37
|
+
const { timeZone } = (0, _context.useTimeZone)();
|
|
38
|
+
const anchorEl = (0, _react.useRef)(); // Used to position the absolute time range picker
|
|
39
|
+
// Control the open state of the absolute time range picker
|
|
40
|
+
const [showCustomDateSelector, setShowCustomDateSelector] = (0, _react.useState)(false);
|
|
41
|
+
// Build the initial value of the absolute time range picker
|
|
42
|
+
const convertedTimeRange = (0, _react.useMemo)(()=>{
|
|
43
|
+
return (0, _core.isRelativeTimeRange)(value) ? (0, _core.toAbsoluteTimeRange)(value) : value;
|
|
44
|
+
}, [
|
|
45
|
+
value
|
|
46
|
+
]);
|
|
47
|
+
// Last option is the absolute time range option (custom)
|
|
48
|
+
// If the value is an absolute time range, we display this time range
|
|
49
|
+
// If the value is a relative time range, we make a default CustomTimeOption built from undefined value
|
|
50
|
+
const lastOption = (0, _react.useMemo)(()=>(0, _utils.buildCustomTimeOption)((0, _core.isRelativeTimeRange)(value) ? undefined : value, timeZone), [
|
|
51
|
+
value,
|
|
52
|
+
timeZone
|
|
53
|
+
]);
|
|
54
|
+
// Control the open state of the select component to prevent the menu from closing when the custom date picker is
|
|
55
|
+
// opened.
|
|
56
|
+
//
|
|
57
|
+
// Note that the value state of the select is here for display only. The real value (the one from props) is managed
|
|
58
|
+
// by click events on each menu item.
|
|
59
|
+
// This is a trick to get around the limitation of select with menu item that doesn't support objects as value...
|
|
60
|
+
const [open, setOpen] = (0, _react.useState)(false);
|
|
61
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
62
|
+
children: [
|
|
63
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Popover, {
|
|
64
|
+
anchorEl: anchorEl.current,
|
|
65
|
+
anchorOrigin: {
|
|
66
|
+
vertical: 'bottom',
|
|
67
|
+
horizontal: 'center'
|
|
68
|
+
},
|
|
69
|
+
open: showCustomDateSelector,
|
|
70
|
+
onClose: ()=>setShowCustomDateSelector(false),
|
|
71
|
+
sx: (theme)=>({
|
|
72
|
+
padding: theme.spacing(2)
|
|
73
|
+
}),
|
|
74
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DateTimeRangePicker.DateTimeRangePicker, {
|
|
75
|
+
initialTimeRange: convertedTimeRange,
|
|
76
|
+
onChange: (value)=>{
|
|
77
|
+
onChange(value);
|
|
78
|
+
setShowCustomDateSelector(false);
|
|
79
|
+
setOpen(false);
|
|
80
|
+
},
|
|
81
|
+
onCancel: ()=>setShowCustomDateSelector(false)
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
85
|
+
ref: anchorEl,
|
|
86
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Select, {
|
|
87
|
+
open: open,
|
|
88
|
+
value: (0, _utils.formatTimeRange)(value, timeZone),
|
|
89
|
+
onClick: ()=>setOpen(!open),
|
|
90
|
+
IconComponent: _Calendar.default,
|
|
91
|
+
inputProps: {
|
|
92
|
+
'aria-label': `Select time range. Currently set to ${value}`
|
|
93
|
+
},
|
|
94
|
+
sx: {
|
|
95
|
+
// `transform: none` prevents calendar icon from flipping over when menu is open
|
|
96
|
+
'.MuiSelect-icon': {
|
|
97
|
+
marginTop: '1px',
|
|
98
|
+
transform: 'none'
|
|
99
|
+
},
|
|
100
|
+
// paddingRight creates more space for the calendar icon (it's a bigger icon)
|
|
101
|
+
'.MuiSelect-select.MuiSelect-outlined.MuiInputBase-input': {
|
|
102
|
+
paddingRight: '36px'
|
|
103
|
+
},
|
|
104
|
+
'.MuiSelect-select': height ? {
|
|
105
|
+
lineHeight: height,
|
|
106
|
+
paddingY: 0
|
|
107
|
+
} : {}
|
|
108
|
+
},
|
|
109
|
+
children: [
|
|
110
|
+
timeOptions.map((item, idx)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
111
|
+
value: (0, _utils.formatTimeRange)(item.value, timeZone),
|
|
112
|
+
onClick: ()=>{
|
|
113
|
+
onChange(item.value);
|
|
114
|
+
},
|
|
115
|
+
children: item.display
|
|
116
|
+
}, idx)),
|
|
117
|
+
showCustomTimeRange && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
118
|
+
value: (0, _utils.formatTimeRange)(lastOption.value, timeZone),
|
|
119
|
+
onClick: ()=>setShowCustomDateSelector(true),
|
|
120
|
+
children: lastOption.display
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
});
|
|
127
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
_export_star(require("./DateTimeRangePicker"), exports);
|
|
18
17
|
_export_star(require("./TimeRangeSelector"), exports);
|
|
19
|
-
_export_star(require("./
|
|
18
|
+
_export_star(require("./DateTimeRangePicker"), exports);
|
|
20
19
|
function _export_star(from, to) {
|
|
21
20
|
Object.keys(from).forEach(function(k) {
|
|
22
21
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2024 The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -21,15 +21,32 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
+
DATE_TIME_FORMAT: function() {
|
|
25
|
+
return DATE_TIME_FORMAT;
|
|
26
|
+
},
|
|
27
|
+
buildCustomTimeOption: function() {
|
|
28
|
+
return buildCustomTimeOption;
|
|
29
|
+
},
|
|
24
30
|
formatAbsoluteRange: function() {
|
|
25
31
|
return formatAbsoluteRange;
|
|
26
32
|
},
|
|
33
|
+
formatTimeRange: function() {
|
|
34
|
+
return formatTimeRange;
|
|
35
|
+
},
|
|
27
36
|
validateDateRange: function() {
|
|
28
37
|
return validateDateRange;
|
|
29
38
|
}
|
|
30
39
|
});
|
|
31
40
|
const _datefns = require("date-fns");
|
|
41
|
+
const _core = require("@perses-dev/core");
|
|
32
42
|
const _utils = require("../utils");
|
|
43
|
+
const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
|
|
44
|
+
function buildCustomTimeOption(value, timeZone) {
|
|
45
|
+
return {
|
|
46
|
+
value,
|
|
47
|
+
display: formatTimeRange(value, timeZone)
|
|
48
|
+
};
|
|
49
|
+
}
|
|
33
50
|
function validateDateRange(startDate, endDate) {
|
|
34
51
|
// TODO: display error as helperText
|
|
35
52
|
if (!(0, _datefns.isValid)(startDate) || !(0, _datefns.isValid)(endDate)) {
|
|
@@ -47,3 +64,9 @@ function formatAbsoluteRange(timeRange, dateFormat, timeZone) {
|
|
|
47
64
|
const formattedEnd = (0, _utils.formatWithTimeZone)(timeRange.end, dateFormat, timeZone);
|
|
48
65
|
return `${formattedStart} - ${formattedEnd}`;
|
|
49
66
|
}
|
|
67
|
+
function formatTimeRange(value, timeZone) {
|
|
68
|
+
if (!value) {
|
|
69
|
+
return 'Custom Time Range';
|
|
70
|
+
}
|
|
71
|
+
return !(0, _core.isRelativeTimeRange)(value) ? formatAbsoluteRange(value, DATE_TIME_FORMAT, timeZone) : value.pastDuration;
|
|
72
|
+
}
|
|
@@ -44,8 +44,7 @@ const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartToolti
|
|
|
44
44
|
// Ensure user is hovering over a chart before checking for nearby series.
|
|
45
45
|
if (pinnedPos === null && mousePos.target.tagName !== 'CANVAS') return null;
|
|
46
46
|
const chart = chartRef.current;
|
|
47
|
-
|
|
48
|
-
const chartWidth = (_chart_getWidth = chart === null || chart === void 0 ? void 0 : chart.getWidth()) !== null && _chart_getWidth !== void 0 ? _chart_getWidth : _tooltipmodel.FALLBACK_CHART_WIDTH; // Fallback width not likely to ever be needed.
|
|
47
|
+
const chartWidth = chart?.getWidth() ?? _tooltipmodel.FALLBACK_CHART_WIDTH; // Fallback width not likely to ever be needed.
|
|
49
48
|
// Get series nearby the cursor and pass into tooltip content children.
|
|
50
49
|
const nearbySeries = (0, _nearbyseries.legacyGetNearbySeriesData)({
|
|
51
50
|
mousePos,
|
|
@@ -63,24 +62,21 @@ const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartToolti
|
|
|
63
62
|
// if tooltip is attached to a container, set max height to the height of the container so tooltip does not get cut off
|
|
64
63
|
const maxHeight = containerElement ? containerElement.getBoundingClientRect().height : undefined;
|
|
65
64
|
if (!isTooltipPinned) {
|
|
66
|
-
transform.current = (0, _utils.assembleTransform)(mousePos, chartWidth, pinnedPos, height
|
|
65
|
+
transform.current = (0, _utils.assembleTransform)(mousePos, chartWidth, pinnedPos, height ?? 0, width ?? 0, containerElement);
|
|
67
66
|
}
|
|
68
67
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Portal, {
|
|
69
68
|
container: containerElement,
|
|
70
69
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
71
70
|
ref: tooltipRef,
|
|
72
|
-
sx: (theme)=>{
|
|
73
|
-
var _theme_palette_designSystem;
|
|
74
|
-
var _theme_palette_designSystem_grey_;
|
|
75
|
-
return {
|
|
71
|
+
sx: (theme)=>({
|
|
76
72
|
minWidth: _tooltipmodel.TOOLTIP_MIN_WIDTH,
|
|
77
73
|
maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
|
|
78
|
-
maxHeight: maxHeight
|
|
74
|
+
maxHeight: maxHeight ?? _tooltipmodel.TOOLTIP_MAX_HEIGHT,
|
|
79
75
|
padding: 0,
|
|
80
76
|
position: 'absolute',
|
|
81
77
|
top: 0,
|
|
82
78
|
left: 0,
|
|
83
|
-
backgroundColor:
|
|
79
|
+
backgroundColor: theme.palette.designSystem?.grey[800] ?? _tooltipmodel.TOOLTIP_BG_COLOR_FALLBACK,
|
|
84
80
|
borderRadius: '6px',
|
|
85
81
|
color: '#fff',
|
|
86
82
|
fontSize: '11px',
|
|
@@ -93,8 +89,7 @@ const LineChartTooltip = /*#__PURE__*/ (0, _react.memo)(function LineChartToolti
|
|
|
93
89
|
'&:hover': {
|
|
94
90
|
overflowY: 'auto'
|
|
95
91
|
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
92
|
+
}),
|
|
98
93
|
style: {
|
|
99
94
|
transform: transform.current,
|
|
100
95
|
display: transform.current ? 'block' : 'none'
|
|
@@ -31,8 +31,7 @@ function SeriesInfo(props) {
|
|
|
31
31
|
// ex with metric name: node_load15{env="demo",job="node"}
|
|
32
32
|
// ex without metric name: {env="demo",job="node"}
|
|
33
33
|
const splitName = seriesName.split('{');
|
|
34
|
-
|
|
35
|
-
const seriesLabels = (_splitName_ = splitName[1]) !== null && _splitName_ !== void 0 ? _splitName_ : seriesName;
|
|
34
|
+
const seriesLabels = splitName[1] ?? seriesName;
|
|
36
35
|
// remove curly braces that wrap labels
|
|
37
36
|
const formattedSeriesLabels = seriesLabels.replace(/[{}]/g, '');
|
|
38
37
|
// determine whether to show labels on separate lines
|
|
@@ -44,13 +44,12 @@ const TimeChartTooltip = /*#__PURE__*/ (0, _react.memo)(function TimeChartToolti
|
|
|
44
44
|
// Ensure user is hovering over a chart before checking for nearby series.
|
|
45
45
|
if (pinnedPos === null && mousePos.target.tagName !== 'CANVAS') return null;
|
|
46
46
|
const chart = chartRef.current;
|
|
47
|
-
|
|
48
|
-
const chartWidth = (_chart_getWidth = chart === null || chart === void 0 ? void 0 : chart.getWidth()) !== null && _chart_getWidth !== void 0 ? _chart_getWidth : _tooltipmodel.FALLBACK_CHART_WIDTH; // Fallback width not likely to ever be needed.
|
|
47
|
+
const chartWidth = chart?.getWidth() ?? _tooltipmodel.FALLBACK_CHART_WIDTH; // Fallback width not likely to ever be needed.
|
|
49
48
|
const containerElement = containerId ? document.querySelector(containerId) : undefined;
|
|
50
49
|
// if tooltip is attached to a container, set max height to the height of the container so tooltip does not get cut off
|
|
51
50
|
const maxHeight = containerElement ? containerElement.getBoundingClientRect().height : undefined;
|
|
52
51
|
if (!isTooltipPinned) {
|
|
53
|
-
transform.current = (0, _utils.assembleTransform)(mousePos, chartWidth, pinnedPos, height
|
|
52
|
+
transform.current = (0, _utils.assembleTransform)(mousePos, chartWidth, pinnedPos, height ?? 0, width ?? 0, containerElement);
|
|
54
53
|
}
|
|
55
54
|
// Get series nearby the cursor and pass into tooltip content children.
|
|
56
55
|
const nearbySeries = (0, _nearbyseries.getNearbySeriesData)({
|
|
@@ -25,7 +25,7 @@ const _material = require("@mui/material");
|
|
|
25
25
|
const _Pin = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Pin"));
|
|
26
26
|
const _PinOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/PinOutline"));
|
|
27
27
|
const _react = require("react");
|
|
28
|
-
const
|
|
28
|
+
const _utils = require("../utils");
|
|
29
29
|
const _tooltipmodel = require("./tooltip-model");
|
|
30
30
|
function _interop_require_default(obj) {
|
|
31
31
|
return obj && obj.__esModule ? obj : {
|
|
@@ -33,16 +33,12 @@ function _interop_require_default(obj) {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ nearbySeries, totalSeries, isTooltipPinned, showAllSeries, enablePinning = true, onShowAllClick, onUnpinClick }) {
|
|
36
|
-
|
|
37
|
-
var _nearbySeries__date;
|
|
38
|
-
const seriesTimeMs = (_nearbySeries__date = (_nearbySeries_ = nearbySeries[0]) === null || _nearbySeries_ === void 0 ? void 0 : _nearbySeries_.date) !== null && _nearbySeries__date !== void 0 ? _nearbySeries__date : null;
|
|
36
|
+
const seriesTimeMs = nearbySeries[0]?.date ?? null;
|
|
39
37
|
if (seriesTimeMs === null) {
|
|
40
38
|
return null;
|
|
41
39
|
}
|
|
42
40
|
const formatTimeSeriesHeader = (timeMs)=>{
|
|
43
|
-
const
|
|
44
|
-
const formattedDate = (0, _datefns.format)(date, 'MMM dd, yyyy - ');
|
|
45
|
-
const formattedTime = (0, _datefns.format)(date, 'HH:mm:ss');
|
|
41
|
+
const { formattedTime, formattedDate } = (0, _utils.getDateAndTime)(timeMs);
|
|
46
42
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
47
43
|
children: [
|
|
48
44
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
@@ -65,19 +61,15 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
|
|
|
65
61
|
const showAllSeriesToggle = enablePinning && totalSeries > 5;
|
|
66
62
|
const pinTooltipHelpText = isTooltipPinned ? _tooltipmodel.UNPIN_TOOLTIP_HELP_TEXT : _tooltipmodel.PIN_TOOLTIP_HELP_TEXT;
|
|
67
63
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
68
|
-
sx: (theme)=>{
|
|
69
|
-
var _theme_palette_designSystem;
|
|
70
|
-
var _theme_palette_designSystem_grey_;
|
|
71
|
-
return {
|
|
64
|
+
sx: (theme)=>({
|
|
72
65
|
width: '100%',
|
|
73
66
|
maxWidth: _tooltipmodel.TOOLTIP_MAX_WIDTH,
|
|
74
67
|
padding: theme.spacing(1.5, 2, 0.5, 2),
|
|
75
|
-
backgroundColor:
|
|
68
|
+
backgroundColor: theme.palette.designSystem?.grey[800] ?? _tooltipmodel.TOOLTIP_BG_COLOR_FALLBACK,
|
|
76
69
|
position: 'sticky',
|
|
77
70
|
top: 0,
|
|
78
71
|
left: 0
|
|
79
|
-
}
|
|
80
|
-
},
|
|
72
|
+
}),
|
|
81
73
|
children: [
|
|
82
74
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
83
75
|
sx: {
|
|
@@ -57,12 +57,9 @@ const INCREASE_NEARBY_SERIES_MULTIPLIER = 5.5; // adjusts how many series show i
|
|
|
57
57
|
const DYNAMIC_NEARBY_SERIES_MULTIPLIER = 30; // used for adjustment after series number divisor
|
|
58
58
|
const SHOW_FEWER_SERIES_LIMIT = 5;
|
|
59
59
|
function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, chart, format) {
|
|
60
|
-
var _data_;
|
|
61
60
|
const currentNearbySeriesData = [];
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
var _pointInGrid_1;
|
|
65
|
-
const cursorY = (_pointInGrid_1 = pointInGrid[1]) !== null && _pointInGrid_1 !== void 0 ? _pointInGrid_1 : null;
|
|
61
|
+
const cursorX = pointInGrid[0] ?? null;
|
|
62
|
+
const cursorY = pointInGrid[1] ?? null;
|
|
66
63
|
if (cursorX === null || cursorY === null) return currentNearbySeriesData;
|
|
67
64
|
if (chart.dispatchAction === undefined) return currentNearbySeriesData;
|
|
68
65
|
if (!Array.isArray(data)) return currentNearbySeriesData;
|
|
@@ -74,7 +71,7 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
74
71
|
const totalSeries = data.length;
|
|
75
72
|
const yValueCounts = new Map();
|
|
76
73
|
// Only need to loop through first dataset source since getCommonTimeScale ensures xAxis timestamps are consistent
|
|
77
|
-
const firstTimeSeriesValues =
|
|
74
|
+
const firstTimeSeriesValues = data[0]?.values;
|
|
78
75
|
const closestTimestamp = (0, _utils.getClosestTimestamp)(firstTimeSeriesValues, cursorX);
|
|
79
76
|
if (closestTimestamp === null) {
|
|
80
77
|
return _tooltipmodel.EMPTY_TOOLTIP_DATA;
|
|
@@ -82,15 +79,14 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
82
79
|
// find the timestamp with data that is closest to cursorX
|
|
83
80
|
for(let seriesIdx = 0; seriesIdx < totalSeries; seriesIdx++){
|
|
84
81
|
const currentSeries = seriesMapping[seriesIdx];
|
|
85
|
-
if (currentSeries
|
|
82
|
+
if (!currentSeries) break;
|
|
86
83
|
const currentDataset = totalSeries > 0 ? data[seriesIdx] : null;
|
|
87
|
-
if (currentDataset
|
|
84
|
+
if (!currentDataset) break;
|
|
88
85
|
const currentDatasetValues = currentDataset.values;
|
|
89
86
|
if (currentDatasetValues === undefined || !Array.isArray(currentDatasetValues)) break;
|
|
90
87
|
const lineSeries = currentSeries;
|
|
91
88
|
const currentSeriesName = lineSeries.name ? lineSeries.name.toString() : '';
|
|
92
|
-
|
|
93
|
-
const markerColor = (_lineSeries_color = lineSeries.color) !== null && _lineSeries_color !== void 0 ? _lineSeries_color : '#000';
|
|
89
|
+
const markerColor = lineSeries.color ?? '#000';
|
|
94
90
|
if (Array.isArray(data)) {
|
|
95
91
|
for(let datumIdx = 0; datumIdx < currentDatasetValues.length; datumIdx++){
|
|
96
92
|
const nearbyTimeSeries = currentDatasetValues[datumIdx];
|
|
@@ -112,10 +108,9 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
112
108
|
if (isClosestToCursor) {
|
|
113
109
|
// shows as bold in tooltip, customize 'emphasis' options in getTimeSeries util
|
|
114
110
|
emphasizedSeriesIndexes.push(seriesIdx);
|
|
115
|
-
var _yValueCounts_get;
|
|
116
111
|
// Used to determine which datapoint to apply select styles to.
|
|
117
112
|
// Accounts for cases where lines may be rendered directly on top of eachother.
|
|
118
|
-
const duplicateValuesCount =
|
|
113
|
+
const duplicateValuesCount = yValueCounts.get(yValue) ?? 0;
|
|
119
114
|
yValueCounts.set(yValue, duplicateValuesCount + 1);
|
|
120
115
|
if (duplicateValuesCount > 0) {
|
|
121
116
|
duplicateDatapoints.push({
|
|
@@ -164,10 +159,8 @@ function checkforNearbyTimeSeries(data, seriesMapping, pointInGrid, yBuffer, cha
|
|
|
164
159
|
}
|
|
165
160
|
function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
|
|
166
161
|
const currentNearbySeriesData = [];
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
var _pointInGrid_1;
|
|
170
|
-
const cursorY = (_pointInGrid_1 = pointInGrid[1]) !== null && _pointInGrid_1 !== void 0 ? _pointInGrid_1 : null;
|
|
162
|
+
const cursorX = pointInGrid[0] ?? null;
|
|
163
|
+
const cursorY = pointInGrid[1] ?? null;
|
|
171
164
|
if (cursorX === null || cursorY === null) {
|
|
172
165
|
return currentNearbySeriesData;
|
|
173
166
|
}
|
|
@@ -181,12 +174,10 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
|
|
|
181
174
|
if (currentSeries === undefined) break;
|
|
182
175
|
if (currentNearbySeriesData.length >= _model.OPTIMIZED_MODE_SERIES_LIMIT) break;
|
|
183
176
|
const currentSeriesName = currentSeries.name ? currentSeries.name.toString() : '';
|
|
184
|
-
|
|
185
|
-
const markerColor = (_currentSeries_color = currentSeries.color) !== null && _currentSeries_color !== void 0 ? _currentSeries_color : '#000';
|
|
177
|
+
const markerColor = currentSeries.color ?? '#000';
|
|
186
178
|
if (Array.isArray(currentSeries.data)) {
|
|
187
179
|
for(let datumIdx = 0; datumIdx < currentSeries.data.length; datumIdx++){
|
|
188
|
-
|
|
189
|
-
const xValue = (_data_xAxis_datumIdx = data.xAxis[datumIdx]) !== null && _data_xAxis_datumIdx !== void 0 ? _data_xAxis_datumIdx : 0;
|
|
180
|
+
const xValue = data.xAxis[datumIdx] ?? 0;
|
|
190
181
|
const yValue = currentSeries.data[datumIdx];
|
|
191
182
|
// ensure null values not displayed in tooltip
|
|
192
183
|
if (yValue !== undefined && yValue !== null && cursorX === datumIdx) {
|
|
@@ -204,7 +195,7 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
|
|
|
204
195
|
} else {
|
|
205
196
|
nonEmphasizedSeriesIndexes.push(seriesIdx);
|
|
206
197
|
// ensure series not close to cursor are not highlighted
|
|
207
|
-
if (
|
|
198
|
+
if (chart?.dispatchAction !== undefined) {
|
|
208
199
|
chart.dispatchAction({
|
|
209
200
|
type: 'downplay',
|
|
210
201
|
seriesIndex: seriesIdx
|
|
@@ -232,7 +223,7 @@ function legacyCheckforNearbySeries(data, pointInGrid, yBuffer, chart, format) {
|
|
|
232
223
|
}
|
|
233
224
|
}
|
|
234
225
|
}
|
|
235
|
-
if (
|
|
226
|
+
if (chart?.dispatchAction !== undefined) {
|
|
236
227
|
// Clears emphasis state of all lines that are not emphasized.
|
|
237
228
|
// Emphasized is a subset of just the nearby series that are closest to cursor.
|
|
238
229
|
chart.dispatchAction({
|
|
@@ -330,10 +321,9 @@ function legacyGetNearbySeriesData({ mousePos, pinnedPos, chartData, chart, form
|
|
|
330
321
|
totalSeries,
|
|
331
322
|
showAllSeries
|
|
332
323
|
});
|
|
333
|
-
var _mousePos_plotCanvas_x, _mousePos_plotCanvas_y;
|
|
334
324
|
const pointInPixel = [
|
|
335
|
-
|
|
336
|
-
|
|
325
|
+
mousePos.plotCanvas.x ?? 0,
|
|
326
|
+
mousePos.plotCanvas.y ?? 0
|
|
337
327
|
];
|
|
338
328
|
if (chart.containPixel('grid', pointInPixel)) {
|
|
339
329
|
const pointInGrid = chart.convertFromPixel('grid', pointInPixel);
|