@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
|
@@ -0,0 +1,35 @@
|
|
|
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, "getTooltipPosition", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return getTooltipPosition;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const getTooltipPosition = (...data)=>{
|
|
24
|
+
const point = data[0];
|
|
25
|
+
const size = data[4];
|
|
26
|
+
// calculate the position to avoid overflow
|
|
27
|
+
const [x, y] = point;
|
|
28
|
+
const { contentSize, viewSize } = size;
|
|
29
|
+
const posX = x + contentSize[0] > viewSize[0] ? x - contentSize[0] : x;
|
|
30
|
+
const posY = y + contentSize[1] > viewSize[1] ? y - contentSize[1] : y;
|
|
31
|
+
return [
|
|
32
|
+
posX,
|
|
33
|
+
posY
|
|
34
|
+
];
|
|
35
|
+
};
|
|
@@ -31,7 +31,8 @@ const StyledMuiTable = (0, _material.styled)(_material.Table)(({ theme })=>({
|
|
|
31
31
|
}));
|
|
32
32
|
const TABLE_DENSITY_CONFIG = {
|
|
33
33
|
compact: 'small',
|
|
34
|
-
standard: 'medium'
|
|
34
|
+
standard: 'medium',
|
|
35
|
+
comfortable: 'medium'
|
|
35
36
|
};
|
|
36
37
|
const InnerTable = /*#__PURE__*/ (0, _react.forwardRef)(function InnerTable({ density, ...otherProps }, ref) {
|
|
37
38
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledMuiTable, {
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -35,11 +35,11 @@ const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
|
35
35
|
// does not do deep equality checking for objects and arrays.
|
|
36
36
|
const DEFAULT_ROW_SELECTION = {};
|
|
37
37
|
const DEFAULT_SORTING = [];
|
|
38
|
-
function Table({ data, columns, density = 'standard', checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, rowSelectionVariant = 'standard', ...otherProps }) {
|
|
38
|
+
function Table({ data, columns, cellConfigs, density = 'standard', defaultColumnWidth = _tablemodel.DEFAULT_COLUMN_WIDTH, checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, rowSelectionVariant = 'standard', ...otherProps }) {
|
|
39
39
|
const theme = (0, _material.useTheme)();
|
|
40
40
|
const handleRowSelectionChange = (rowSelectionUpdater)=>{
|
|
41
41
|
const newRowSelection = typeof rowSelectionUpdater === 'function' ? rowSelectionUpdater(rowSelection) : rowSelectionUpdater;
|
|
42
|
-
onRowSelectionChange
|
|
42
|
+
onRowSelectionChange?.(newRowSelection);
|
|
43
43
|
};
|
|
44
44
|
const handleRowSelectionEvent = (0, _react.useCallback)((table, row, isModified)=>{
|
|
45
45
|
if (rowSelectionVariant === 'standard' || isModified) {
|
|
@@ -53,7 +53,7 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
53
53
|
table.toggleAllRowsSelected();
|
|
54
54
|
} else {
|
|
55
55
|
// Focus the selected row.
|
|
56
|
-
onRowSelectionChange
|
|
56
|
+
onRowSelectionChange?.({
|
|
57
57
|
[row.id]: true
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -64,14 +64,14 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
64
64
|
]);
|
|
65
65
|
const handleCheckboxChange = (0, _react.useCallback)((e, table, row)=>{
|
|
66
66
|
const nativePointerEvent = e.nativeEvent && (e.nativeEvent instanceof MouseEvent || e.nativeEvent instanceof KeyboardEvent) ? e.nativeEvent : undefined;
|
|
67
|
-
const isModifed = !!
|
|
67
|
+
const isModifed = !!nativePointerEvent?.metaKey || !!nativePointerEvent?.shiftKey;
|
|
68
68
|
handleRowSelectionEvent(table, row, isModifed);
|
|
69
69
|
}, [
|
|
70
70
|
handleRowSelectionEvent
|
|
71
71
|
]);
|
|
72
72
|
const handleSortingChange = (sortingUpdater)=>{
|
|
73
73
|
const newSorting = typeof sortingUpdater === 'function' ? sortingUpdater(sorting) : sortingUpdater;
|
|
74
|
-
onSortingChange
|
|
74
|
+
onSortingChange?.(newSorting);
|
|
75
75
|
};
|
|
76
76
|
const checkboxColumn = (0, _react.useMemo)(()=>{
|
|
77
77
|
return {
|
|
@@ -93,7 +93,7 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
93
93
|
onChange: (e)=>{
|
|
94
94
|
handleCheckboxChange(e, table, row);
|
|
95
95
|
},
|
|
96
|
-
color: getCheckboxColor
|
|
96
|
+
color: getCheckboxColor?.(row.original),
|
|
97
97
|
density: density
|
|
98
98
|
});
|
|
99
99
|
},
|
|
@@ -144,9 +144,11 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
144
144
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_VirtualizedTable.VirtualizedTable, {
|
|
145
145
|
...otherProps,
|
|
146
146
|
density: density,
|
|
147
|
+
defaultColumnWidth: defaultColumnWidth,
|
|
147
148
|
onRowClick: handleRowClick,
|
|
148
149
|
rows: table.getRowModel().rows,
|
|
149
150
|
columns: table.getAllFlatColumns(),
|
|
150
|
-
headers: table.getHeaderGroups()
|
|
151
|
+
headers: table.getHeaderGroups(),
|
|
152
|
+
cellConfigs: cellConfigs
|
|
151
153
|
});
|
|
152
154
|
}
|
|
@@ -39,7 +39,7 @@ const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme }
|
|
|
39
39
|
borderRadius: 0
|
|
40
40
|
}
|
|
41
41
|
}));
|
|
42
|
-
function TableCell({ children, density, variant, width, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, ...otherProps }) {
|
|
42
|
+
function TableCell({ children, density, variant, width, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, align, color, backgroundColor, ...otherProps }) {
|
|
43
43
|
const theme = (0, _material.useTheme)();
|
|
44
44
|
const elRef = (0, _react.useRef)();
|
|
45
45
|
const isHeader = variant === 'head';
|
|
@@ -51,9 +51,8 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
51
51
|
focusState
|
|
52
52
|
]);
|
|
53
53
|
const handleFocus = (e)=>{
|
|
54
|
-
var _e_currentTarget;
|
|
55
54
|
// From https://zellwk.com/blog/keyboard-focusable-elements/
|
|
56
|
-
const nestedFocusTarget =
|
|
55
|
+
const nestedFocusTarget = e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');
|
|
57
56
|
if (nestedFocusTarget) {
|
|
58
57
|
// If the cell has a focusable child, focus it instead. Mostly used for
|
|
59
58
|
// checkbox cells, but could have other uses.
|
|
@@ -66,7 +65,7 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
66
65
|
// plays with the triggering of focus with keyboard interactions.
|
|
67
66
|
// These report that a focus event happened, so we can adjust the current
|
|
68
67
|
// tabindex and focuses to the right cell.
|
|
69
|
-
onFocusTrigger
|
|
68
|
+
onFocusTrigger?.(e);
|
|
70
69
|
};
|
|
71
70
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledMuiTableCell, {
|
|
72
71
|
...otherProps,
|
|
@@ -78,12 +77,29 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
78
77
|
onFocus: handleFocus,
|
|
79
78
|
onClick: handleInteractionFocusTrigger,
|
|
80
79
|
onKeyUp: handleInteractionFocusTrigger,
|
|
80
|
+
style: {
|
|
81
|
+
width: width
|
|
82
|
+
},
|
|
81
83
|
sx: {
|
|
82
|
-
|
|
83
|
-
borderBottom: isHeader ?
|
|
84
|
+
position: 'relative',
|
|
85
|
+
borderBottom: isHeader ? `solid 1px ${theme.palette.grey[100]}` : `solid 1px ${theme.palette.grey[50]}`,
|
|
86
|
+
'&:hover #original-cell': {
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
top: 0,
|
|
89
|
+
left: 0,
|
|
90
|
+
zIndex: 10,
|
|
91
|
+
width: 'fit-content',
|
|
92
|
+
minWidth: '100%',
|
|
93
|
+
whiteSpace: 'nowrap',
|
|
94
|
+
overflow: 'visible',
|
|
95
|
+
backgroundColor: `${backgroundColor ?? theme.palette.background.default} !important`,
|
|
96
|
+
outline: `solid 1px ${theme.palette.info.main}`,
|
|
97
|
+
outlineOffset: '-1px'
|
|
98
|
+
}
|
|
84
99
|
},
|
|
85
100
|
ref: elRef,
|
|
86
101
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
102
|
+
id: "original-cell",
|
|
87
103
|
sx: {
|
|
88
104
|
...(0, _tablemodel.getTableCellLayout)(theme, density, {
|
|
89
105
|
isLastColumn,
|
|
@@ -100,7 +116,13 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
100
116
|
// in headers.
|
|
101
117
|
flexDirection: 'inherit'
|
|
102
118
|
},
|
|
119
|
+
style: {
|
|
120
|
+
backgroundColor: backgroundColor ?? 'inherit',
|
|
121
|
+
color: color ?? 'inherit'
|
|
122
|
+
},
|
|
103
123
|
title: description,
|
|
124
|
+
"aria-label": description,
|
|
125
|
+
textAlign: align,
|
|
104
126
|
children: children
|
|
105
127
|
})
|
|
106
128
|
});
|
|
@@ -33,7 +33,7 @@ const _TableHeaderCell = require("./TableHeaderCell");
|
|
|
33
33
|
const _TableCell = require("./TableCell");
|
|
34
34
|
const _VirtualizedTableContainer = require("./VirtualizedTableContainer");
|
|
35
35
|
const _useVirtualizedTableKeyboardNav = require("./hooks/useVirtualizedTableKeyboardNav");
|
|
36
|
-
function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver, onRowMouseOut, rows, columns, headers }) {
|
|
36
|
+
function VirtualizedTable({ width, height, density, defaultColumnWidth, onRowClick, onRowMouseOver, onRowMouseOut, rows, columns, headers, cellConfigs }) {
|
|
37
37
|
const virtuosoRef = (0, _react.useRef)(null);
|
|
38
38
|
// Use a ref for these values because they are only needed for keyboard
|
|
39
39
|
// focus interactions and setting them on state will lead to a significant
|
|
@@ -86,10 +86,10 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
86
86
|
onClick: (e)=>onRowClick(e, row.id),
|
|
87
87
|
density: density,
|
|
88
88
|
onMouseOver: (e)=>{
|
|
89
|
-
onRowMouseOver
|
|
89
|
+
onRowMouseOver?.(e, rowEventOpts);
|
|
90
90
|
},
|
|
91
91
|
onMouseOut: (e)=>{
|
|
92
|
-
onRowMouseOut
|
|
92
|
+
onRowMouseOut?.(e, rowEventOpts);
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
},
|
|
@@ -105,7 +105,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
105
105
|
width
|
|
106
106
|
]);
|
|
107
107
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
108
|
-
|
|
108
|
+
style: {
|
|
109
109
|
width,
|
|
110
110
|
height
|
|
111
111
|
},
|
|
@@ -123,7 +123,6 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
123
123
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableRow.TableRow, {
|
|
124
124
|
density: density,
|
|
125
125
|
children: headerGroup.headers.map((header, i, headers)=>{
|
|
126
|
-
var _column_columnDef_meta, _column_columnDef_meta1;
|
|
127
126
|
const column = header.column;
|
|
128
127
|
const position = {
|
|
129
128
|
row: 0,
|
|
@@ -135,11 +134,11 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
135
134
|
onSort: column.getCanSort() ? column.getToggleSortingHandler() : undefined,
|
|
136
135
|
sortDirection: typeof isSorted === 'string' ? isSorted : undefined,
|
|
137
136
|
nextSortDirection: typeof nextSorting === 'string' ? nextSorting : undefined,
|
|
138
|
-
width: column.getSize() ||
|
|
139
|
-
align:
|
|
137
|
+
width: column.getSize() || defaultColumnWidth,
|
|
138
|
+
align: column.columnDef.meta?.align,
|
|
140
139
|
variant: "head",
|
|
141
140
|
density: density,
|
|
142
|
-
description:
|
|
141
|
+
description: column.columnDef.meta?.headerDescription,
|
|
143
142
|
focusState: getFocusState(position),
|
|
144
143
|
onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
|
|
145
144
|
isFirstColumn: i === 0,
|
|
@@ -158,16 +157,16 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
158
157
|
}
|
|
159
158
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
160
159
|
children: row.getVisibleCells().map((cell, i, cells)=>{
|
|
161
|
-
var _cell_column_columnDef_meta, _cell_column_columnDef_meta1;
|
|
162
160
|
const position = {
|
|
163
161
|
// Add 1 to the row index because the header is row 0
|
|
164
162
|
row: index + 1,
|
|
165
163
|
column: i
|
|
166
164
|
};
|
|
167
165
|
const cellContext = cell.getContext();
|
|
166
|
+
const cellConfig = cellConfigs?.[cellContext.cell.id];
|
|
168
167
|
const cellRenderFn = cell.column.columnDef.cell;
|
|
169
|
-
const cellContent = typeof cellRenderFn
|
|
170
|
-
const cellDescriptionDef =
|
|
168
|
+
const cellContent = typeof cellRenderFn === 'function' ? cellRenderFn(cellContext) : null;
|
|
169
|
+
const cellDescriptionDef = cell.column.columnDef.meta?.cellDescription;
|
|
171
170
|
let description = undefined;
|
|
172
171
|
if (typeof cellDescriptionDef === 'function') {
|
|
173
172
|
// If the cell description is a function, set the value using
|
|
@@ -180,15 +179,19 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
180
179
|
description = cellContent;
|
|
181
180
|
}
|
|
182
181
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCell.TableCell, {
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
"data-testid": cell.id,
|
|
183
|
+
title: description || cellConfig?.text || cellContent,
|
|
184
|
+
width: cell.column.getSize() || defaultColumnWidth,
|
|
185
|
+
align: cell.column.columnDef.meta?.align,
|
|
185
186
|
density: density,
|
|
186
187
|
focusState: getFocusState(position),
|
|
187
188
|
onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
|
|
188
189
|
isFirstColumn: i === 0,
|
|
189
190
|
isLastColumn: i === cells.length - 1,
|
|
190
191
|
description: description,
|
|
191
|
-
|
|
192
|
+
color: cellConfig?.textColor ?? undefined,
|
|
193
|
+
backgroundColor: cellConfig?.backgroundColor ?? undefined,
|
|
194
|
+
children: cellConfig?.text || cellContent
|
|
192
195
|
}, cell.id);
|
|
193
196
|
})
|
|
194
197
|
});
|
|
@@ -78,7 +78,7 @@ function useTableKeyboardNav({ maxRows, maxColumns, onActiveCellChange }) {
|
|
|
78
78
|
column: nextColumn,
|
|
79
79
|
row: nextRow
|
|
80
80
|
};
|
|
81
|
-
const newPosition =
|
|
81
|
+
const newPosition = onActiveCellChange?.(e, curActiveCell, defaultNewPosition) || defaultNewPosition;
|
|
82
82
|
if (newPosition.row === curActiveCell.row && newPosition.column === curActiveCell.column) {
|
|
83
83
|
// Return original to avoid creating a new object if nothing
|
|
84
84
|
// changed.
|
|
@@ -28,14 +28,12 @@ function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, m
|
|
|
28
28
|
onActiveCellChange: (e, currentPosition, defaultNewPosition)=>{
|
|
29
29
|
const key = e.key;
|
|
30
30
|
const defaultValueChanged = defaultNewPosition && (currentPosition.column !== defaultNewPosition.column || currentPosition.row !== defaultNewPosition.row);
|
|
31
|
-
|
|
32
|
-
const nextRow = (_defaultNewPosition_row = defaultNewPosition === null || defaultNewPosition === void 0 ? void 0 : defaultNewPosition.row) !== null && _defaultNewPosition_row !== void 0 ? _defaultNewPosition_row : currentPosition.row;
|
|
31
|
+
const nextRow = defaultNewPosition?.row ?? currentPosition.row;
|
|
33
32
|
if (key === 'ArrowDown' && defaultValueChanged) {
|
|
34
33
|
// Use default cell position. Shift the virtual table scroll position
|
|
35
34
|
// when needed to make the active cell visible.
|
|
36
35
|
if (nextRow - 1 < visibleRange.current.startIndex || nextRow - 1 > visibleRange.current.endIndex) {
|
|
37
|
-
|
|
38
|
-
(_virtualTable_current = virtualTable.current) === null || _virtualTable_current === void 0 ? void 0 : _virtualTable_current.scrollToIndex({
|
|
36
|
+
virtualTable.current?.scrollToIndex({
|
|
39
37
|
index: nextRow - 1,
|
|
40
38
|
align: 'end'
|
|
41
39
|
});
|
|
@@ -44,28 +42,25 @@ function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, m
|
|
|
44
42
|
// Use default cell position. Shift the virtual table scroll position
|
|
45
43
|
// when needed to make the active cell visible.
|
|
46
44
|
if (nextRow - 1 < visibleRange.current.startIndex || nextRow - 1 > visibleRange.current.endIndex) {
|
|
47
|
-
|
|
48
|
-
(_virtualTable_current1 = virtualTable.current) === null || _virtualTable_current1 === void 0 ? void 0 : _virtualTable_current1.scrollToIndex({
|
|
45
|
+
virtualTable.current?.scrollToIndex({
|
|
49
46
|
index: nextRow - 1,
|
|
50
47
|
align: 'start'
|
|
51
48
|
});
|
|
52
49
|
}
|
|
53
50
|
} else if (defaultValueChanged && (key === 'Home' || key === 'End')) {
|
|
54
|
-
|
|
51
|
+
// Use default cell position. Shift the virtual table scroll position
|
|
55
52
|
// when needed to make the active cell visible.
|
|
56
|
-
|
|
57
|
-
(_virtualTable_current2 = virtualTable.current) === null || _virtualTable_current2 === void 0 ? void 0 : _virtualTable_current2.scrollToIndex({
|
|
53
|
+
virtualTable.current?.scrollToIndex({
|
|
58
54
|
index: Math.max(nextRow - 1, 0),
|
|
59
55
|
align: 'start'
|
|
60
56
|
});
|
|
61
57
|
} else if (key === 'PageDown') {
|
|
62
|
-
var _virtualTable_current3;
|
|
63
58
|
// Full handling of logic for `PageDown` because there is no default.
|
|
64
59
|
e.preventDefault();
|
|
65
60
|
let nextRow = currentPosition.row;
|
|
66
61
|
// Add 1 to account for header
|
|
67
62
|
nextRow = Math.min(maxRows - 1, visibleRange.current.endIndex + 1);
|
|
68
|
-
|
|
63
|
+
virtualTable.current?.scrollToIndex({
|
|
69
64
|
index: nextRow - 1,
|
|
70
65
|
align: 'start'
|
|
71
66
|
});
|
|
@@ -74,12 +69,11 @@ function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, m
|
|
|
74
69
|
column: currentPosition.column
|
|
75
70
|
};
|
|
76
71
|
} else if (key === 'PageUp') {
|
|
77
|
-
var _virtualTable_current4;
|
|
78
72
|
// Full handling of logic for `PageUp` because there is no default.
|
|
79
73
|
let nextRow = currentPosition.row;
|
|
80
74
|
// Minus 1 to account for header
|
|
81
75
|
nextRow = Math.max(0, visibleRange.current.startIndex - 1);
|
|
82
|
-
|
|
76
|
+
virtualTable.current?.scrollToIndex({
|
|
83
77
|
index: nextRow - 1,
|
|
84
78
|
align: 'end'
|
|
85
79
|
});
|
package/dist/cjs/Table/index.js
CHANGED
|
@@ -14,14 +14,8 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
Object.defineProperty(exports, "getTableCellLayout", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return _tablemodel.getTableCellLayout;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
17
|
_export_star(require("./Table"), exports);
|
|
24
|
-
|
|
18
|
+
_export_star(require("./model/table-model"), exports);
|
|
25
19
|
function _export_star(from, to) {
|
|
26
20
|
Object.keys(from).forEach(function(k) {
|
|
27
21
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
@@ -21,6 +21,9 @@ function _export(target, all) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
_export(exports, {
|
|
24
|
+
DEFAULT_COLUMN_WIDTH: function() {
|
|
25
|
+
return DEFAULT_COLUMN_WIDTH;
|
|
26
|
+
},
|
|
24
27
|
getTableCellLayout: function() {
|
|
25
28
|
return getTableCellLayout;
|
|
26
29
|
},
|
|
@@ -28,39 +31,45 @@ _export(exports, {
|
|
|
28
31
|
return persesColumnsToTanstackColumns;
|
|
29
32
|
}
|
|
30
33
|
});
|
|
34
|
+
const DEFAULT_COLUMN_WIDTH = 150;
|
|
31
35
|
function calculateTableCellHeight(lineHeight, paddingY) {
|
|
32
36
|
// Doing a bunch of math to enforce height to avoid weirdness with mismatched
|
|
33
37
|
// heights based on customization of cell contents.
|
|
34
|
-
const lineHeightNum = typeof lineHeight === 'string' ? parseInt(lineHeight, 10) : lineHeight
|
|
38
|
+
const lineHeightNum = typeof lineHeight === 'string' ? parseInt(lineHeight, 10) : lineHeight ?? 0;
|
|
35
39
|
const verticalPaddingNum = typeof paddingY === 'string' ? parseInt(paddingY, 10) : paddingY;
|
|
36
40
|
return lineHeightNum + verticalPaddingNum * 2;
|
|
37
41
|
}
|
|
38
42
|
function getTableCellLayout(theme, density, { isLastColumn, isFirstColumn } = {}) {
|
|
43
|
+
// Density Standard
|
|
44
|
+
let paddingY = theme.spacing(1);
|
|
45
|
+
let basePaddingX = theme.spacing(1.25);
|
|
46
|
+
let edgePaddingX = theme.spacing(2);
|
|
47
|
+
let paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
|
|
48
|
+
let paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
|
|
49
|
+
let lineHeight = theme.typography.body1.lineHeight;
|
|
50
|
+
let fontSize = theme.typography.body1.fontSize;
|
|
39
51
|
if (density === 'compact') {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
paddingY = theme.spacing(0.5);
|
|
53
|
+
basePaddingX = theme.spacing(0.5);
|
|
54
|
+
edgePaddingX = theme.spacing(1);
|
|
55
|
+
paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
|
|
56
|
+
paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
|
|
57
|
+
lineHeight = theme.typography.body2.lineHeight;
|
|
58
|
+
fontSize = theme.typography.body2.fontSize;
|
|
59
|
+
}
|
|
60
|
+
if (density === 'comfortable') {
|
|
61
|
+
paddingY = theme.spacing(2);
|
|
62
|
+
basePaddingX = theme.spacing(1.5);
|
|
63
|
+
edgePaddingX = theme.spacing(2);
|
|
64
|
+
paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
|
|
65
|
+
paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
|
|
66
|
+
lineHeight = theme.typography.body1.lineHeight;
|
|
67
|
+
fontSize = theme.typography.body1.fontSize;
|
|
52
68
|
}
|
|
53
|
-
// standard density
|
|
54
|
-
const paddingY = theme.spacing(1);
|
|
55
|
-
const basePaddingX = theme.spacing(1.25);
|
|
56
|
-
const edgePaddingX = theme.spacing(2);
|
|
57
|
-
const paddingLeft = isFirstColumn ? edgePaddingX : basePaddingX;
|
|
58
|
-
const paddingRight = isLastColumn ? edgePaddingX : basePaddingX;
|
|
59
|
-
const lineHeight = theme.typography.body1.lineHeight;
|
|
60
69
|
return {
|
|
61
70
|
padding: `${paddingY} ${paddingRight} ${paddingY} ${paddingLeft}`,
|
|
62
71
|
height: calculateTableCellHeight(lineHeight, paddingY),
|
|
63
|
-
fontSize:
|
|
72
|
+
fontSize: fontSize,
|
|
64
73
|
lineHeight: lineHeight
|
|
65
74
|
};
|
|
66
75
|
}
|
|
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _react = require("react");
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _DeleteOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/DeleteOutline"));
|
|
27
|
-
const
|
|
27
|
+
const _OptionsColorPicker = require("../ColorPicker/OptionsColorPicker");
|
|
28
28
|
function _interop_require_default(obj) {
|
|
29
29
|
return obj && obj.__esModule ? obj : {
|
|
30
30
|
default: obj
|
|
@@ -39,7 +39,7 @@ function ThresholdInput({ inputRef, label, color, value, mode, onChange, onColor
|
|
|
39
39
|
justifyContent: "space-between",
|
|
40
40
|
spacing: 1,
|
|
41
41
|
children: [
|
|
42
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
42
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsColorPicker.OptionsColorPicker, {
|
|
43
43
|
label: label,
|
|
44
44
|
color: color,
|
|
45
45
|
onColorChange: onColorChange
|
|
@@ -29,7 +29,7 @@ const _system = require("@mui/system");
|
|
|
29
29
|
const _ChartsProvider = require("../context/ChartsProvider");
|
|
30
30
|
const _OptionsEditorLayout = require("../OptionsEditorLayout");
|
|
31
31
|
const _InfoTooltip = require("../InfoTooltip");
|
|
32
|
-
const
|
|
32
|
+
const _OptionsColorPicker = require("../ColorPicker/OptionsColorPicker");
|
|
33
33
|
const _ThresholdInput = require("./ThresholdInput");
|
|
34
34
|
function _interop_require_default(obj) {
|
|
35
35
|
return obj && obj.__esModule ? obj : {
|
|
@@ -81,28 +81,26 @@ const DEFAULT_STEP = 10;
|
|
|
81
81
|
function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMode }) {
|
|
82
82
|
const chartsTheme = (0, _ChartsProvider.useChartsTheme)();
|
|
83
83
|
const { thresholds: { defaultColor, palette } } = chartsTheme;
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
const [steps, setSteps] = (0, _react.useState)(thresholds === null || thresholds === void 0 ? void 0 : thresholds.steps);
|
|
84
|
+
const defaultThresholdColor = thresholds?.defaultColor ?? defaultColor;
|
|
85
|
+
const [steps, setSteps] = (0, _react.useState)(thresholds?.steps);
|
|
87
86
|
(0, _react.useEffect)(()=>{
|
|
88
|
-
setSteps(thresholds
|
|
87
|
+
setSteps(thresholds?.steps);
|
|
89
88
|
}, [
|
|
90
|
-
thresholds
|
|
89
|
+
thresholds?.steps
|
|
91
90
|
]);
|
|
92
91
|
// every time a new threshold is added, we want to focus the recently added input
|
|
93
92
|
const recentlyAddedInputRef = (0, _react.useRef)(null);
|
|
94
93
|
const focusRef = (0, _react.useRef)(false);
|
|
95
94
|
(0, _react.useEffect)(()=>{
|
|
96
|
-
var _recentlyAddedInputRef_current;
|
|
97
95
|
if (!recentlyAddedInputRef.current || !focusRef.current) return;
|
|
98
|
-
|
|
96
|
+
recentlyAddedInputRef.current?.focus();
|
|
99
97
|
focusRef.current = false;
|
|
100
98
|
}, [
|
|
101
|
-
steps
|
|
99
|
+
steps?.length
|
|
102
100
|
]);
|
|
103
101
|
const handleThresholdValueChange = (e, i)=>{
|
|
104
102
|
setSteps((0, _immer.default)(steps, (draft)=>{
|
|
105
|
-
const step = draft
|
|
103
|
+
const step = draft?.[i];
|
|
106
104
|
if (step) {
|
|
107
105
|
step.value = Number(e.target.value);
|
|
108
106
|
}
|
|
@@ -176,14 +174,12 @@ function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMod
|
|
|
176
174
|
} else {
|
|
177
175
|
onChange((0, _immer.default)(thresholds, (draft)=>{
|
|
178
176
|
const steps = draft.steps;
|
|
179
|
-
if (steps
|
|
177
|
+
if (steps?.length) {
|
|
180
178
|
const lastStep = steps[steps.length - 1];
|
|
181
|
-
|
|
182
|
-
const color = (_palette_steps_length = palette[steps.length]) !== null && _palette_steps_length !== void 0 ? _palette_steps_length : getRandomColor(); // we will assign color from the palette first, then generate random color
|
|
183
|
-
var _lastStep_value;
|
|
179
|
+
const color = palette[steps.length] ?? getRandomColor(); // we will assign color from the palette first, then generate random color
|
|
184
180
|
steps.push({
|
|
185
181
|
color,
|
|
186
|
-
value: (
|
|
182
|
+
value: (lastStep?.value ?? 0) + DEFAULT_STEP
|
|
187
183
|
}); // set new threshold value to last step value + 10
|
|
188
184
|
} else if (steps) {
|
|
189
185
|
steps.push({
|
|
@@ -205,11 +201,10 @@ function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMod
|
|
|
205
201
|
});
|
|
206
202
|
}
|
|
207
203
|
};
|
|
208
|
-
var _thresholds_mode;
|
|
209
204
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_OptionsEditorLayout.OptionsEditorGroup, {
|
|
210
205
|
title: "Thresholds",
|
|
211
206
|
icon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_InfoTooltip.InfoTooltip, {
|
|
212
|
-
description:
|
|
207
|
+
description: "Add threshold",
|
|
213
208
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
214
209
|
size: "small",
|
|
215
210
|
"aria-label": "add threshold",
|
|
@@ -224,7 +219,7 @@ function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMod
|
|
|
224
219
|
control: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.ToggleButtonGroup, {
|
|
225
220
|
exclusive: true,
|
|
226
221
|
disabled: disablePercentMode,
|
|
227
|
-
value:
|
|
222
|
+
value: thresholds?.mode ?? 'absolute',
|
|
228
223
|
onChange: handleModeChange,
|
|
229
224
|
sx: {
|
|
230
225
|
height: '36px',
|
|
@@ -250,14 +245,12 @@ function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMod
|
|
|
250
245
|
]
|
|
251
246
|
})
|
|
252
247
|
}),
|
|
253
|
-
steps && steps.map((step, i)=>/*#__PURE__*/ {
|
|
254
|
-
var _step_color, _ref;
|
|
255
|
-
return (0, _jsxruntime.jsx)(_ThresholdInput.ThresholdInput, {
|
|
248
|
+
steps && steps.map((step, i)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_ThresholdInput.ThresholdInput, {
|
|
256
249
|
inputRef: i === steps.length - 1 ? recentlyAddedInputRef : undefined,
|
|
257
250
|
label: `T${i + 1}`,
|
|
258
|
-
color:
|
|
251
|
+
color: step.color ?? palette[i] ?? defaultThresholdColor,
|
|
259
252
|
value: step.value,
|
|
260
|
-
mode: thresholds
|
|
253
|
+
mode: thresholds?.mode,
|
|
261
254
|
onColorChange: (color)=>handleThresholdColorChange(color, i),
|
|
262
255
|
onChange: (e)=>{
|
|
263
256
|
handleThresholdValueChange(e, i);
|
|
@@ -266,15 +259,14 @@ function ThresholdsEditor({ thresholds, onChange, hideDefault, disablePercentMod
|
|
|
266
259
|
deleteThreshold(i);
|
|
267
260
|
},
|
|
268
261
|
onBlur: handleThresholdBlur
|
|
269
|
-
}, i)
|
|
270
|
-
}).reverse(),
|
|
262
|
+
}, i)).reverse(),
|
|
271
263
|
!hideDefault && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_system.Stack, {
|
|
272
264
|
flex: 1,
|
|
273
265
|
direction: "row",
|
|
274
266
|
alignItems: "center",
|
|
275
267
|
spacing: 1,
|
|
276
268
|
children: [
|
|
277
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
269
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsColorPicker.OptionsColorPicker, {
|
|
278
270
|
label: "default",
|
|
279
271
|
color: defaultThresholdColor,
|
|
280
272
|
onColorChange: handleDefaultColorChange
|