@perses-dev/components 0.49.0 → 0.50.0-rc.1
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 +2 -1
- package/dist/AlignSelector/AlignSelector.d.ts.map +1 -1
- package/dist/AlignSelector/AlignSelector.js +0 -3
- package/dist/AlignSelector/AlignSelector.js.map +1 -1
- package/dist/BarChart/BarChart.d.ts +2 -1
- package/dist/BarChart/BarChart.d.ts.map +1 -1
- package/dist/BarChart/BarChart.js +10 -5
- package/dist/BarChart/BarChart.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +2 -1
- package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/ColorPicker/ColorPicker.js +3 -3
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.d.ts +2 -1
- package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.js +2 -2
- package/dist/ColorPicker/OptionsColorPicker.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/DensitySelector/DensitySelector.d.ts +2 -1
- package/dist/DensitySelector/DensitySelector.d.ts.map +1 -1
- package/dist/DensitySelector/DensitySelector.js.map +1 -1
- package/dist/Dialog/Dialog.d.ts +8 -8
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +0 -1
- 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.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 +2 -2
- 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 +1 -1
- 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 +0 -1
- 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 +5 -8
- 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 +2 -3
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LinksEditor/LinksEditor.d.ts +2 -2
- package/dist/LinksEditor/LinksEditor.d.ts.map +1 -1
- package/dist/LinksEditor/LinksEditor.js +1 -1
- package/dist/LinksEditor/LinksEditor.js.map +1 -1
- 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 +4 -3
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js.map +1 -1
- package/dist/PieChart/PieChart.d.ts +2 -1
- package/dist/PieChart/PieChart.d.ts.map +1 -1
- package/dist/PieChart/PieChart.js +4 -2
- package/dist/PieChart/PieChart.js.map +1 -1
- 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 +5 -3
- 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 +2 -1
- package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -1
- package/dist/SortSelector/SortSelectorButtons.js +2 -5
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts +2 -1
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
- package/dist/StatChart/calculateFontSize.js.map +1 -1
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +14 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js +149 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +12 -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/Table.d.ts +2 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +3 -2
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableCell.d.ts +2 -2
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +19 -2
- 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 +2 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts +3 -3
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +4 -4
- 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.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.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 +7 -1
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +1 -0
- 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.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.map +1 -1
- package/dist/TimeChart/TimeChart.js +1 -1
- package/dist/TimeChart/TimeChart.js.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +2 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.js +0 -2
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +2 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
- package/dist/TimeRangeSelector/utils.d.ts.map +1 -1
- package/dist/TimeRangeSelector/utils.js.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.js.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.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.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 +2 -4
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- 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.map +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/TransformsEditor/TransformEditor.d.ts +2 -1
- package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -1
- package/dist/TransformsEditor/TransformEditor.js +10 -9
- package/dist/TransformsEditor/TransformEditor.js.map +1 -1
- package/dist/TransformsEditor/TransformEditorContainer.d.ts +2 -1
- package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -1
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -1
- package/dist/TransformsEditor/TransformsEditor.d.ts +2 -1
- package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -1
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -1
- 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 +0 -3
- package/dist/cjs/BarChart/BarChart.js +11 -6
- package/dist/cjs/ColorPicker/ColorPicker.js +3 -44
- package/dist/cjs/ColorPicker/OptionsColorPicker.js +2 -2
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +8 -10
- package/dist/cjs/Dialog/Dialog.js +0 -1
- 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/EChart/EChart.js +2 -43
- 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 +2 -2
- package/dist/cjs/InfoTooltip/InfoTooltip.js +0 -6
- package/dist/cjs/Legend/Legend.js +8 -4
- package/dist/cjs/Legend/LegendColorBadge.js +2 -7
- package/dist/cjs/Legend/ListLegendItem.js +3 -46
- package/dist/cjs/Legend/TableLegend.js +1 -0
- package/dist/cjs/LineChart/LineChart.js +4 -5
- package/dist/cjs/LinksEditor/LinksEditor.js +1 -42
- package/dist/cjs/PieChart/PieChart.js +4 -2
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +5 -3
- package/dist/cjs/SortSelector/SortSelectorButtons.js +2 -5
- package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +157 -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/Table.js +2 -1
- package/dist/cjs/Table/TableCell.js +19 -2
- package/dist/cjs/Table/VirtualizedTable.js +4 -4
- package/dist/cjs/Table/index.js +1 -7
- package/dist/cjs/Table/model/table-model.js +4 -0
- package/dist/cjs/TimeChart/TimeChart.js +1 -1
- package/dist/cjs/TimeRangeSelector/DateTimeRangePicker.js +0 -2
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +2 -4
- package/dist/cjs/TransformsEditor/TransformEditor.js +10 -9
- package/dist/cjs/YAxisLabel.js +4 -2
- package/dist/cjs/controls/TextField.js +54 -0
- package/dist/cjs/controls/index.js +30 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/theme/theme.js +3 -4
- package/dist/cjs/utils/format.js +18 -0
- 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.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 +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.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/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +2 -3
- 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.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 +15 -0
- package/dist/utils/format.js.map +1 -1
- package/package.json +10 -8
|
@@ -0,0 +1,48 @@
|
|
|
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, "getFormattedStatusHistoryAxisLabel", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return getFormattedStatusHistoryAxisLabel;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _utils = require("../utils");
|
|
24
|
+
function getFormattedStatusHistoryAxisLabel(rangeMs, timezone) {
|
|
25
|
+
return function(value) {
|
|
26
|
+
const dayMs = 86400000;
|
|
27
|
+
const monthMs = 2629440000;
|
|
28
|
+
const yearMs = 31536000000;
|
|
29
|
+
const timeStamp = new Date(Number(value));
|
|
30
|
+
// more than 5 years
|
|
31
|
+
if (rangeMs > yearMs * 5) {
|
|
32
|
+
return (0, _utils.formatWithTimeZone)(timeStamp, 'yyy', timezone);
|
|
33
|
+
}
|
|
34
|
+
// more than 2 years
|
|
35
|
+
if (rangeMs > yearMs * 2) {
|
|
36
|
+
return (0, _utils.formatWithTimeZone)(timeStamp, 'MMM yyy', timezone);
|
|
37
|
+
}
|
|
38
|
+
// between 5 days to 6 months
|
|
39
|
+
if (rangeMs > dayMs * 10 && rangeMs < monthMs * 6) {
|
|
40
|
+
return (0, _utils.formatWithTimeZone)(timeStamp, 'dd.MM', timezone); // 12-01
|
|
41
|
+
}
|
|
42
|
+
// between 2 and 10 days
|
|
43
|
+
if (rangeMs > dayMs * 2 && rangeMs <= dayMs * 10) {
|
|
44
|
+
return (0, _utils.formatWithTimeZone)(timeStamp, 'dd.MM HH:mm', timezone); // 12-01; // 12-01 12:30
|
|
45
|
+
}
|
|
46
|
+
return (0, _utils.formatWithTimeZone)(timeStamp, 'HH:mm', timezone);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2023 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_export_star(require("./StatusHistoryChart"), exports);
|
|
18
|
+
_export_star(require("./utils/get-color"), exports);
|
|
19
|
+
function _export_star(from, to) {
|
|
20
|
+
Object.keys(from).forEach(function(k) {
|
|
21
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
22
|
+
Object.defineProperty(to, k, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return from[k];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
return from;
|
|
31
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
function _export(target, all) {
|
|
18
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: all[name]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
_export(exports, {
|
|
24
|
+
fallbackColor: function() {
|
|
25
|
+
return fallbackColor;
|
|
26
|
+
},
|
|
27
|
+
getColorForValue: function() {
|
|
28
|
+
return getColorForValue;
|
|
29
|
+
},
|
|
30
|
+
getColorsForValues: function() {
|
|
31
|
+
return getColorsForValues;
|
|
32
|
+
},
|
|
33
|
+
hexToHSL: function() {
|
|
34
|
+
return hexToHSL;
|
|
35
|
+
},
|
|
36
|
+
hslToHex: function() {
|
|
37
|
+
return hslToHex;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const fallbackColor = '#1f77b4';
|
|
41
|
+
function getColorForValue(value, baseColor) {
|
|
42
|
+
// Validate base color
|
|
43
|
+
if (!baseColor.match(/^#[0-9A-Fa-f]{6}$/)) {
|
|
44
|
+
baseColor = fallbackColor;
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const [baseH, baseS, baseL] = hexToHSL(baseColor);
|
|
48
|
+
// Ensure numeric values are valid
|
|
49
|
+
if (isNaN(baseH) || isNaN(baseS) || isNaN(baseL)) {
|
|
50
|
+
throw new Error('Invalid HSL values');
|
|
51
|
+
}
|
|
52
|
+
// Create deterministic hash
|
|
53
|
+
const hash = String(value).split('').reduce((acc, char)=>acc + char.charCodeAt(0), 0);
|
|
54
|
+
const hueStep = 60;
|
|
55
|
+
const lightnessVariation = 15;
|
|
56
|
+
const hueOffset = hash % 6 * hueStep; // 6 segments of 60° each
|
|
57
|
+
const newH = (baseH + hueOffset) % 360;
|
|
58
|
+
const newL = baseL + (hash % 2 ? lightnessVariation : -lightnessVariation);
|
|
59
|
+
// Keep saturation high for better distinction
|
|
60
|
+
const newS = Math.min(baseS + 10, 90);
|
|
61
|
+
const color = hslToHex(Math.abs(newH), Math.min(Math.max(newS, 50), 90), Math.min(Math.max(newL, 30), 70) // Keep lightness 30-70%
|
|
62
|
+
);
|
|
63
|
+
// Validate generated color
|
|
64
|
+
if (!color.match(/^#[0-9A-Fa-f]{6}$/)) {
|
|
65
|
+
throw new Error('Invalid generated color');
|
|
66
|
+
}
|
|
67
|
+
return color;
|
|
68
|
+
} catch (_) {
|
|
69
|
+
return fallbackColor;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function getColorsForValues(uniqueValues, themeColors) {
|
|
73
|
+
// If we have enough theme colors, use them
|
|
74
|
+
if (themeColors.length >= uniqueValues.length) {
|
|
75
|
+
return themeColors.slice(0, uniqueValues.length);
|
|
76
|
+
}
|
|
77
|
+
// Use theme colors first, then generate additional ones
|
|
78
|
+
return uniqueValues.map((value, index)=>{
|
|
79
|
+
if (index < themeColors.length) {
|
|
80
|
+
return themeColors[index] || fallbackColor;
|
|
81
|
+
}
|
|
82
|
+
return getColorForValue(value, themeColors[0] || fallbackColor);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function hexToHSL(hex) {
|
|
86
|
+
const r = parseInt(hex.slice(1, 3), 16) / 255;
|
|
87
|
+
const g = parseInt(hex.slice(3, 5), 16) / 255;
|
|
88
|
+
const b = parseInt(hex.slice(5, 7), 16) / 255;
|
|
89
|
+
const max = Math.max(r, g, b);
|
|
90
|
+
const min = Math.min(r, g, b);
|
|
91
|
+
let h = 0;
|
|
92
|
+
let s = 0;
|
|
93
|
+
const l = (max + min) / 2;
|
|
94
|
+
if (max !== min) {
|
|
95
|
+
const d = max - min;
|
|
96
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
97
|
+
switch(max){
|
|
98
|
+
case r:
|
|
99
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
100
|
+
break;
|
|
101
|
+
case g:
|
|
102
|
+
h = (b - r) / d + 2;
|
|
103
|
+
break;
|
|
104
|
+
case b:
|
|
105
|
+
h = (r - g) / d + 4;
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
h /= 6;
|
|
109
|
+
}
|
|
110
|
+
return [
|
|
111
|
+
h * 360,
|
|
112
|
+
s * 100,
|
|
113
|
+
l * 100
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
function hslToHex(h, s, l) {
|
|
117
|
+
l /= 100;
|
|
118
|
+
const a = s * Math.min(l, 1 - l) / 100;
|
|
119
|
+
const f = (n)=>{
|
|
120
|
+
const k = (n + h / 30) % 12;
|
|
121
|
+
const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
|
122
|
+
return Math.round(255 * color).toString(16).padStart(2, '0');
|
|
123
|
+
};
|
|
124
|
+
return `#${f(0)}${f(8)}${f(4)}`;
|
|
125
|
+
}
|
|
@@ -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
|
+
};
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -35,7 +35,7 @@ const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
|
35
35
|
// does not do deep equality checking for objects and arrays.
|
|
36
36
|
const DEFAULT_ROW_SELECTION = {};
|
|
37
37
|
const DEFAULT_SORTING = [];
|
|
38
|
-
function Table({ data, columns, cellConfigs, 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;
|
|
@@ -144,6 +144,7 @@ function Table({ data, columns, cellConfigs, density = 'standard', checkboxSelec
|
|
|
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(),
|
|
@@ -78,12 +78,29 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
78
78
|
onFocus: handleFocus,
|
|
79
79
|
onClick: handleInteractionFocusTrigger,
|
|
80
80
|
onKeyUp: handleInteractionFocusTrigger,
|
|
81
|
+
style: {
|
|
82
|
+
width: width
|
|
83
|
+
},
|
|
81
84
|
sx: {
|
|
82
|
-
|
|
83
|
-
borderBottom: isHeader ?
|
|
85
|
+
position: 'relative',
|
|
86
|
+
borderBottom: isHeader ? `solid 1px ${theme.palette.grey[100]}` : `solid 1px ${theme.palette.grey[50]}`,
|
|
87
|
+
'&:hover #original-cell': {
|
|
88
|
+
position: 'absolute',
|
|
89
|
+
top: 0,
|
|
90
|
+
left: 0,
|
|
91
|
+
zIndex: 10,
|
|
92
|
+
width: 'fit-content',
|
|
93
|
+
minWidth: '100%',
|
|
94
|
+
whiteSpace: 'nowrap',
|
|
95
|
+
overflow: 'visible',
|
|
96
|
+
backgroundColor: `${backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : theme.palette.background.default} !important`,
|
|
97
|
+
outline: `solid 1px ${theme.palette.info.main}`,
|
|
98
|
+
outlineOffset: '-1px'
|
|
99
|
+
}
|
|
84
100
|
},
|
|
85
101
|
ref: elRef,
|
|
86
102
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
103
|
+
id: "original-cell",
|
|
87
104
|
sx: {
|
|
88
105
|
...(0, _tablemodel.getTableCellLayout)(theme, density, {
|
|
89
106
|
isLastColumn,
|
|
@@ -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, cellConfigs }) {
|
|
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
|
|
@@ -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
|
},
|
|
@@ -135,7 +135,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
135
135
|
onSort: column.getCanSort() ? column.getToggleSortingHandler() : undefined,
|
|
136
136
|
sortDirection: typeof isSorted === 'string' ? isSorted : undefined,
|
|
137
137
|
nextSortDirection: typeof nextSorting === 'string' ? nextSorting : undefined,
|
|
138
|
-
width: column.getSize() ||
|
|
138
|
+
width: column.getSize() || defaultColumnWidth,
|
|
139
139
|
align: (_column_columnDef_meta = column.columnDef.meta) === null || _column_columnDef_meta === void 0 ? void 0 : _column_columnDef_meta.align,
|
|
140
140
|
variant: "head",
|
|
141
141
|
density: density,
|
|
@@ -184,7 +184,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
184
184
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCell.TableCell, {
|
|
185
185
|
"data-testid": cell.id,
|
|
186
186
|
title: description || (cellConfig === null || cellConfig === void 0 ? void 0 : cellConfig.text) || cellContent,
|
|
187
|
-
width: cell.column.getSize() ||
|
|
187
|
+
width: cell.column.getSize() || defaultColumnWidth,
|
|
188
188
|
align: (_cell_column_columnDef_meta1 = cell.column.columnDef.meta) === null || _cell_column_columnDef_meta1 === void 0 ? void 0 : _cell_column_columnDef_meta1.align,
|
|
189
189
|
density: density,
|
|
190
190
|
focusState: getFocusState(position),
|
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,6 +31,7 @@ _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.
|
|
@@ -164,7 +164,6 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
|
164
164
|
FallbackComponent: _ErrorAlert.ErrorAlert,
|
|
165
165
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatepickers.DateTimeField, {
|
|
166
166
|
label: "Start Time",
|
|
167
|
-
// @ts-expect-error: because the value is a Date, but the component expects a string
|
|
168
167
|
value: new Date(timeRangeInputs.start),
|
|
169
168
|
onChange: (event)=>{
|
|
170
169
|
if (event) {
|
|
@@ -179,7 +178,6 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
|
179
178
|
FallbackComponent: _ErrorAlert.ErrorAlert,
|
|
180
179
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_xdatepickers.DateTimeField, {
|
|
181
180
|
label: "End Time",
|
|
182
|
-
// @ts-expect-error: because the value is a Date, but the component expects a string
|
|
183
181
|
value: new Date(timeRangeInputs.end),
|
|
184
182
|
onChange: (event)=>{
|
|
185
183
|
if (event) {
|
|
@@ -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 : {
|
|
@@ -40,9 +40,7 @@ const TooltipHeader = /*#__PURE__*/ (0, _react.memo)(function TooltipHeader({ ne
|
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
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');
|
|
43
|
+
const { formattedTime, formattedDate } = (0, _utils.getDateAndTime)(timeMs);
|
|
46
44
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
47
45
|
children: [
|
|
48
46
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "TransformEditor", {
|
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
|
+
const _controls = require("../controls");
|
|
25
26
|
function JoinByColumnValueTransformEditor({ value, onChange }) {
|
|
26
27
|
var _value_spec_columns;
|
|
27
28
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
@@ -102,7 +103,7 @@ function MergeColumnsTransformEditor({ value, onChange }) {
|
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
}),
|
|
105
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
106
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_controls.TextField, {
|
|
106
107
|
id: "merge-columns-name",
|
|
107
108
|
variant: "outlined",
|
|
108
109
|
label: "Output Name",
|
|
@@ -110,12 +111,12 @@ function MergeColumnsTransformEditor({ value, onChange }) {
|
|
|
110
111
|
sx: {
|
|
111
112
|
width: '100%'
|
|
112
113
|
},
|
|
113
|
-
onChange: (
|
|
114
|
+
onChange: (name)=>{
|
|
114
115
|
onChange({
|
|
115
116
|
...value,
|
|
116
117
|
spec: {
|
|
117
118
|
...value.spec,
|
|
118
|
-
name:
|
|
119
|
+
name: name
|
|
119
120
|
}
|
|
120
121
|
});
|
|
121
122
|
},
|
|
@@ -144,7 +145,7 @@ function MergeIndexedColumnsTransformEditor({ value, onChange }) {
|
|
|
144
145
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
145
146
|
direction: "row",
|
|
146
147
|
children: [
|
|
147
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
148
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_controls.TextField, {
|
|
148
149
|
id: "merge-indexed-columns",
|
|
149
150
|
variant: "outlined",
|
|
150
151
|
label: "Column",
|
|
@@ -153,12 +154,12 @@ function MergeIndexedColumnsTransformEditor({ value, onChange }) {
|
|
|
153
154
|
sx: {
|
|
154
155
|
width: '100%'
|
|
155
156
|
},
|
|
156
|
-
onChange: (
|
|
157
|
+
onChange: (column)=>{
|
|
157
158
|
onChange({
|
|
158
159
|
...value,
|
|
159
160
|
spec: {
|
|
160
161
|
...value.spec,
|
|
161
|
-
column:
|
|
162
|
+
column: column
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
},
|
|
@@ -211,13 +212,13 @@ function TransformEditor({ value, onChange, ...props }) {
|
|
|
211
212
|
mt: 1,
|
|
212
213
|
...props,
|
|
213
214
|
children: [
|
|
214
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(
|
|
215
|
+
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_controls.TextField, {
|
|
215
216
|
select: true,
|
|
216
217
|
label: "Kind",
|
|
217
218
|
value: value.kind,
|
|
218
|
-
onChange: (
|
|
219
|
+
onChange: (kind)=>onChange({
|
|
219
220
|
...value,
|
|
220
|
-
kind:
|
|
221
|
+
kind: kind
|
|
221
222
|
}),
|
|
222
223
|
children: [
|
|
223
224
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
package/dist/cjs/YAxisLabel.js
CHANGED
|
@@ -24,11 +24,13 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
function YAxisLabel({ name, height }) {
|
|
26
26
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
27
|
+
style: {
|
|
28
|
+
maxWidth: height,
|
|
29
|
+
top: `calc(${height}px / 2)`
|
|
30
|
+
},
|
|
27
31
|
sx: {
|
|
28
32
|
display: 'inline-block',
|
|
29
|
-
maxWidth: height,
|
|
30
33
|
position: 'absolute',
|
|
31
|
-
top: `calc(${height}px / 2)`,
|
|
32
34
|
transform: 'translateX(-50%) rotate(-90deg)',
|
|
33
35
|
transformOrigin: 'top',
|
|
34
36
|
textAlign: 'center',
|
|
@@ -0,0 +1,54 @@
|
|
|
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, "TextField", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return TextField;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _react = require("react");
|
|
26
|
+
const _debounce = /*#__PURE__*/ _interop_require_default(require("lodash/debounce"));
|
|
27
|
+
function _interop_require_default(obj) {
|
|
28
|
+
return obj && obj.__esModule ? obj : {
|
|
29
|
+
default: obj
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const TextField = /*#__PURE__*/ (0, _react.forwardRef)(function({ debounceMs = 250, value, onChange, ...props }, ref) {
|
|
33
|
+
const [currentValue, setCurrentValue] = (0, _react.useState)(value);
|
|
34
|
+
function handleChange(event) {
|
|
35
|
+
setCurrentValue(event.target.value);
|
|
36
|
+
debounceFn(event.target.value);
|
|
37
|
+
}
|
|
38
|
+
const handleDebounceFn = (0, _react.useCallback)((inputValue)=>{
|
|
39
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(inputValue);
|
|
40
|
+
}, [
|
|
41
|
+
onChange
|
|
42
|
+
]);
|
|
43
|
+
const debounceFn = (0, _react.useMemo)(()=>(0, _debounce.default)(handleDebounceFn, debounceMs), [
|
|
44
|
+
debounceMs,
|
|
45
|
+
handleDebounceFn
|
|
46
|
+
]);
|
|
47
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
value: currentValue,
|
|
50
|
+
onChange: handleChange,
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
TextField.displayName = 'TextField';
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
_export_star(require("./TextField"), exports);
|
|
18
|
+
function _export_star(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
21
|
+
Object.defineProperty(to, k, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function() {
|
|
24
|
+
return from[k];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
return from;
|
|
30
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,13 +18,16 @@ _export_star(require("./AlignSelector"), exports);
|
|
|
18
18
|
_export_star(require("./BarChart"), exports);
|
|
19
19
|
_export_star(require("./ColorPicker"), exports);
|
|
20
20
|
_export_star(require("./ContentWithLegend"), exports);
|
|
21
|
+
_export_star(require("./controls"), exports);
|
|
21
22
|
_export_star(require("./Dialog"), exports);
|
|
22
23
|
_export_star(require("./DensitySelector"), exports);
|
|
24
|
+
_export_star(require("./DragAndDrop"), exports);
|
|
23
25
|
_export_star(require("./Drawer"), exports);
|
|
24
26
|
_export_star(require("./EChart"), exports);
|
|
25
27
|
_export_star(require("./ErrorAlert"), exports);
|
|
26
28
|
_export_star(require("./ErrorBoundary"), exports);
|
|
27
29
|
_export_star(require("./FontSizeSelector"), exports);
|
|
30
|
+
_export_star(require("./FormEditor"), exports);
|
|
28
31
|
_export_star(require("./GaugeChart"), exports);
|
|
29
32
|
_export_star(require("./InfoTooltip"), exports);
|
|
30
33
|
_export_star(require("./JSONEditor"), exports);
|
|
@@ -53,6 +56,7 @@ _export_star(require("./theme"), exports);
|
|
|
53
56
|
_export_star(require("./TransformsEditor"), exports);
|
|
54
57
|
_export_star(require("./RefreshIntervalPicker"), exports);
|
|
55
58
|
_export_star(require("./PieChart"), exports);
|
|
59
|
+
_export_star(require("./StatusHistoryChart"), exports);
|
|
56
60
|
function _export_star(from, to) {
|
|
57
61
|
Object.keys(from).forEach(function(k) {
|
|
58
62
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
package/dist/cjs/theme/theme.js
CHANGED
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "getTheme", {
|
|
|
23
23
|
const _material = require("@mui/material");
|
|
24
24
|
const _alert = require("./component-overrides/alert");
|
|
25
25
|
const _paper = require("./component-overrides/paper");
|
|
26
|
-
const
|
|
26
|
+
const _palette = require("./palette");
|
|
27
27
|
const _typography = require("./typography");
|
|
28
28
|
const getModalBackgroundStyle = ({ theme })=>{
|
|
29
29
|
const backgroundStyle = theme.palette.mode === 'light' ? {} : {
|
|
@@ -35,14 +35,13 @@ const getModalBackgroundStyle = ({ theme })=>{
|
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
function getTheme(mode, options = {}) {
|
|
38
|
-
|
|
39
|
-
palette: (0,
|
|
38
|
+
return (0, _material.createTheme)({
|
|
39
|
+
palette: (0, _palette.getPaletteOptions)(mode),
|
|
40
40
|
typography: _typography.typography,
|
|
41
41
|
mixins: {},
|
|
42
42
|
components,
|
|
43
43
|
...options
|
|
44
44
|
});
|
|
45
|
-
return theme;
|
|
46
45
|
}
|
|
47
46
|
// Overrides for component default prop values and styles go here
|
|
48
47
|
const components = {
|