@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,83 @@
|
|
|
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, "FormActions", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return FormActions;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
function FormActions({ action, submitText = 'Save', cancelText = 'Cancel', isReadonly, isValid, onActionChange, onSubmit, onDelete, onCancel, ...props }) {
|
|
26
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
27
|
+
direction: "row",
|
|
28
|
+
gap: 1,
|
|
29
|
+
sx: {
|
|
30
|
+
marginLeft: 'auto'
|
|
31
|
+
},
|
|
32
|
+
...props,
|
|
33
|
+
children: action === 'read' ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
34
|
+
children: [
|
|
35
|
+
onActionChange && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
36
|
+
disabled: isReadonly,
|
|
37
|
+
variant: "contained",
|
|
38
|
+
onClick: ()=>onActionChange('update'),
|
|
39
|
+
children: "Edit"
|
|
40
|
+
}),
|
|
41
|
+
onDelete && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
42
|
+
color: "error",
|
|
43
|
+
disabled: isReadonly,
|
|
44
|
+
variant: "outlined",
|
|
45
|
+
onClick: onDelete,
|
|
46
|
+
children: "Delete"
|
|
47
|
+
}),
|
|
48
|
+
onCancel && (onSubmit || onDelete) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Divider, {
|
|
49
|
+
orientation: "vertical",
|
|
50
|
+
flexItem: true,
|
|
51
|
+
sx: {
|
|
52
|
+
borderColor: (theme)=>theme.palette.grey['500'],
|
|
53
|
+
'&.MuiDivider-root': {
|
|
54
|
+
marginLeft: 2,
|
|
55
|
+
marginRight: 1
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}),
|
|
59
|
+
onCancel && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
60
|
+
color: "secondary",
|
|
61
|
+
variant: "outlined",
|
|
62
|
+
onClick: onCancel,
|
|
63
|
+
children: cancelText
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}) : /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
67
|
+
children: [
|
|
68
|
+
onSubmit && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
69
|
+
variant: "contained",
|
|
70
|
+
disabled: !isValid,
|
|
71
|
+
onClick: onSubmit,
|
|
72
|
+
children: submitText
|
|
73
|
+
}),
|
|
74
|
+
onCancel && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
75
|
+
color: "secondary",
|
|
76
|
+
variant: "outlined",
|
|
77
|
+
onClick: onCancel,
|
|
78
|
+
children: cancelText
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -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("./FormActions"), 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
|
+
}
|
|
@@ -74,7 +74,7 @@ function FormatControls({ value, onChange, disabled = false }) {
|
|
|
74
74
|
unit: newValue.id
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
const handleDecimalPlacesChange = (
|
|
77
|
+
const handleDecimalPlacesChange = ({ decimalPlaces })=>{
|
|
78
78
|
if (hasDecimalPlaces) {
|
|
79
79
|
onChange({
|
|
80
80
|
...value,
|
|
@@ -121,7 +121,7 @@ function FormatControls({ value, onChange, disabled = false }) {
|
|
|
121
121
|
value: getOptionByDecimalPlaces(value.decimalPlaces),
|
|
122
122
|
options: DECIMAL_PLACES_OPTIONS,
|
|
123
123
|
getOptionLabel: (o)=>o.label,
|
|
124
|
-
onChange: handleDecimalPlacesChange,
|
|
124
|
+
onChange: (_, value)=>handleDecimalPlacesChange(value),
|
|
125
125
|
disabled: !hasDecimalPlaces,
|
|
126
126
|
disableClearable: true
|
|
127
127
|
})
|
|
@@ -34,7 +34,7 @@ const _core1 = require("echarts/core");
|
|
|
34
34
|
const _charts = require("echarts/charts");
|
|
35
35
|
const _components = require("echarts/components");
|
|
36
36
|
const _renderers = require("echarts/renderers");
|
|
37
|
-
const
|
|
37
|
+
const _context = require("../context");
|
|
38
38
|
const _EChart = require("../EChart");
|
|
39
39
|
(0, _core1.use)([
|
|
40
40
|
_charts.GaugeChart,
|
|
@@ -48,7 +48,7 @@ const PROGRESS_WIDTH = 16;
|
|
|
48
48
|
const GAUGE_SMALL_BREAKPOINT = 170;
|
|
49
49
|
function GaugeChart(props) {
|
|
50
50
|
const { width, height, data, format, axisLine, max } = props;
|
|
51
|
-
const chartsTheme = (0,
|
|
51
|
+
const chartsTheme = (0, _context.useChartsTheme)();
|
|
52
52
|
// useDeepMemo ensures value size util does not rerun everytime you hover on the chart
|
|
53
53
|
const option = (0, _core.useDeepMemo)(()=>{
|
|
54
54
|
var _chartsTheme_echartsTheme_textStyle;
|
|
@@ -21,13 +21,7 @@ Object.defineProperty(exports, "InfoTooltip", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
25
24
|
const _material = require("@mui/material");
|
|
26
|
-
function _interop_require_default(obj) {
|
|
27
|
-
return obj && obj.__esModule ? obj : {
|
|
28
|
-
default: obj
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
25
|
const InfoTooltip = ({ id, title, description, placement, children, enterDelay, enterNextDelay })=>{
|
|
32
26
|
// Wrap children in a span to cover the following use cases:
|
|
33
27
|
// - Disabled buttons. MUI console.errors on putting these inside a tooltip.
|
|
@@ -102,9 +102,11 @@ function Legend({ width, height, options, data, selectedItems, onSelectedItemsCh
|
|
|
102
102
|
}
|
|
103
103
|
if (options.position === 'right') {
|
|
104
104
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
105
|
-
|
|
105
|
+
style: {
|
|
106
106
|
width: width,
|
|
107
|
-
height: height
|
|
107
|
+
height: height
|
|
108
|
+
},
|
|
109
|
+
sx: {
|
|
108
110
|
position: 'absolute',
|
|
109
111
|
top: 0,
|
|
110
112
|
right: 0
|
|
@@ -114,9 +116,11 @@ function Legend({ width, height, options, data, selectedItems, onSelectedItemsCh
|
|
|
114
116
|
}
|
|
115
117
|
// Position bottom
|
|
116
118
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
117
|
-
|
|
119
|
+
style: {
|
|
118
120
|
width: width,
|
|
119
|
-
height: height
|
|
121
|
+
height: height
|
|
122
|
+
},
|
|
123
|
+
sx: {
|
|
120
124
|
position: 'absolute',
|
|
121
125
|
bottom: 0
|
|
122
126
|
},
|
|
@@ -21,15 +21,10 @@ Object.defineProperty(exports, "LegendColorBadge", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _react =
|
|
24
|
+
const _react = require("react");
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _utils = require("../utils");
|
|
27
|
-
function
|
|
28
|
-
return obj && obj.__esModule ? obj : {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const LegendColorBadge = /*#__PURE__*/ _react.default.memo(function LegendColorBadge({ color, sx, ...others }) {
|
|
27
|
+
const LegendColorBadge = /*#__PURE__*/ (0, _react.memo)(function LegendColorBadge({ color, sx, ...others }) {
|
|
33
28
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
34
29
|
...others,
|
|
35
30
|
sx: (0, _utils.combineSx)({
|
|
@@ -21,51 +21,10 @@ Object.defineProperty(exports, "ListLegendItem", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _react =
|
|
24
|
+
const _react = require("react");
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _utils = require("../utils");
|
|
27
27
|
const _LegendColorBadge = require("./LegendColorBadge");
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
29
|
-
if (typeof WeakMap !== "function") return null;
|
|
30
|
-
var cacheBabelInterop = new WeakMap();
|
|
31
|
-
var cacheNodeInterop = new WeakMap();
|
|
32
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
33
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
34
|
-
})(nodeInterop);
|
|
35
|
-
}
|
|
36
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
37
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
38
|
-
return obj;
|
|
39
|
-
}
|
|
40
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
41
|
-
return {
|
|
42
|
-
default: obj
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
46
|
-
if (cache && cache.has(obj)) {
|
|
47
|
-
return cache.get(obj);
|
|
48
|
-
}
|
|
49
|
-
var newObj = {
|
|
50
|
-
__proto__: null
|
|
51
|
-
};
|
|
52
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
53
|
-
for(var key in obj){
|
|
54
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
55
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
56
|
-
if (desc && (desc.get || desc.set)) {
|
|
57
|
-
Object.defineProperty(newObj, key, desc);
|
|
58
|
-
} else {
|
|
59
|
-
newObj[key] = obj[key];
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
newObj.default = obj;
|
|
64
|
-
if (cache) {
|
|
65
|
-
cache.set(obj, newObj);
|
|
66
|
-
}
|
|
67
|
-
return newObj;
|
|
68
|
-
}
|
|
69
28
|
const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLegendItem({ item, sx, truncateLabel, onClick, isVisuallySelected, onMouseOver, onMouseOut, index, ...others }, ref) {
|
|
70
29
|
const [noWrap, setNoWrap] = (0, _react.useState)(truncateLabel);
|
|
71
30
|
function handleTextMouseOver() {
|
|
@@ -83,16 +42,14 @@ const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLeg
|
|
|
83
42
|
onClick(e, item.id);
|
|
84
43
|
(_item_onClick = item.onClick) === null || _item_onClick === void 0 ? void 0 : _item_onClick.call(item, e);
|
|
85
44
|
};
|
|
86
|
-
return /*#__PURE__*/ (0,
|
|
45
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.ListItemButton, {
|
|
87
46
|
...others,
|
|
88
|
-
component: "div",
|
|
89
47
|
role: "listitem",
|
|
90
48
|
sx: (0, _utils.combineSx)({
|
|
91
49
|
padding: 0,
|
|
92
50
|
cursor: 'pointer'
|
|
93
51
|
}, sx),
|
|
94
52
|
dense: true,
|
|
95
|
-
key: item.id,
|
|
96
53
|
onClick: handleClick,
|
|
97
54
|
onMouseOver: (e)=>onMouseOver === null || onMouseOver === void 0 ? void 0 : onMouseOver(e, {
|
|
98
55
|
id: item.id,
|
|
@@ -125,4 +82,4 @@ const ListLegendItemBase = /*#__PURE__*/ (0, _react.forwardRef)(function ListLeg
|
|
|
125
82
|
]
|
|
126
83
|
});
|
|
127
84
|
});
|
|
128
|
-
const ListLegendItem = /*#__PURE__*/ _react.
|
|
85
|
+
const ListLegendItem = /*#__PURE__*/ (0, _react.memo)(ListLegendItemBase);
|
|
@@ -28,9 +28,8 @@ const _charts = require("echarts/charts");
|
|
|
28
28
|
const _components = require("echarts/components");
|
|
29
29
|
const _renderers = require("echarts/renderers");
|
|
30
30
|
const _EChart = require("../EChart");
|
|
31
|
-
const
|
|
31
|
+
const _context = require("../context");
|
|
32
32
|
const _TimeSeriesTooltip = require("../TimeSeriesTooltip");
|
|
33
|
-
const _TimeZoneProvider = require("../context/TimeZoneProvider");
|
|
34
33
|
const _utils = require("../utils");
|
|
35
34
|
(0, _core.use)([
|
|
36
35
|
_charts.LineChart,
|
|
@@ -47,11 +46,11 @@ const _utils = require("../utils");
|
|
|
47
46
|
]);
|
|
48
47
|
const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ height, data, yAxis, format, grid, legend, tooltipConfig = _TimeSeriesTooltip.DEFAULT_TOOLTIP_CONFIG, noDataVariant = 'message', syncGroup, onDataZoom, onDoubleClick, __experimentalEChartsOptionsOverride }, ref) {
|
|
49
48
|
var _option_tooltip;
|
|
50
|
-
const chartsTheme = (0,
|
|
49
|
+
const chartsTheme = (0, _context.useChartsTheme)();
|
|
51
50
|
const chartRef = (0, _react.useRef)();
|
|
52
51
|
const [showTooltip, setShowTooltip] = (0, _react.useState)(true);
|
|
53
52
|
const [tooltipPinnedCoords, setTooltipPinnedCoords] = (0, _react.useState)(null);
|
|
54
|
-
const { timeZone } = (0,
|
|
53
|
+
const { timeZone } = (0, _context.useTimeZone)();
|
|
55
54
|
const [isDragging, setIsDragging] = (0, _react.useState)(false);
|
|
56
55
|
const [startX, setStartX] = (0, _react.useState)(0);
|
|
57
56
|
(0, _react.useImperativeHandle)(ref, ()=>{
|
|
@@ -172,7 +171,7 @@ const LineChart = /*#__PURE__*/ (0, _react.forwardRef)(function LineChart({ heig
|
|
|
172
171
|
noDataVariant
|
|
173
172
|
]);
|
|
174
173
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
|
|
175
|
-
|
|
174
|
+
style: {
|
|
176
175
|
height
|
|
177
176
|
},
|
|
178
177
|
onClick: (e)=>{
|
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "LinksEditor", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _react =
|
|
24
|
+
const _react = require("react");
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _reacthookform = require("react-hook-form");
|
|
27
27
|
const _Plus = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Plus"));
|
|
@@ -31,47 +31,6 @@ function _interop_require_default(obj) {
|
|
|
31
31
|
default: obj
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) {
|
|
35
|
-
if (typeof WeakMap !== "function") return null;
|
|
36
|
-
var cacheBabelInterop = new WeakMap();
|
|
37
|
-
var cacheNodeInterop = new WeakMap();
|
|
38
|
-
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
39
|
-
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
40
|
-
})(nodeInterop);
|
|
41
|
-
}
|
|
42
|
-
function _interop_require_wildcard(obj, nodeInterop) {
|
|
43
|
-
if (!nodeInterop && obj && obj.__esModule) {
|
|
44
|
-
return obj;
|
|
45
|
-
}
|
|
46
|
-
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
47
|
-
return {
|
|
48
|
-
default: obj
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
var cache = _getRequireWildcardCache(nodeInterop);
|
|
52
|
-
if (cache && cache.has(obj)) {
|
|
53
|
-
return cache.get(obj);
|
|
54
|
-
}
|
|
55
|
-
var newObj = {
|
|
56
|
-
__proto__: null
|
|
57
|
-
};
|
|
58
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
59
|
-
for(var key in obj){
|
|
60
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
61
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
62
|
-
if (desc && (desc.get || desc.set)) {
|
|
63
|
-
Object.defineProperty(newObj, key, desc);
|
|
64
|
-
} else {
|
|
65
|
-
newObj[key] = obj[key];
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
newObj.default = obj;
|
|
70
|
-
if (cache) {
|
|
71
|
-
cache.set(obj, newObj);
|
|
72
|
-
}
|
|
73
|
-
return newObj;
|
|
74
|
-
}
|
|
75
34
|
function LinksEditor({ control, ...props }) {
|
|
76
35
|
const { fields, append, remove } = (0, _reacthookform.useFieldArray)({
|
|
77
36
|
control: control,
|
|
@@ -81,9 +81,11 @@ function PieChart(props) {
|
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
84
|
-
|
|
84
|
+
style: {
|
|
85
85
|
width: width,
|
|
86
|
-
height: height
|
|
86
|
+
height: height
|
|
87
|
+
},
|
|
88
|
+
sx: {
|
|
87
89
|
overflow: 'auto'
|
|
88
90
|
},
|
|
89
91
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_EChart.EChart, {
|
|
@@ -39,7 +39,7 @@ function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (
|
|
|
39
39
|
getOptionLabel: getOptionLabel,
|
|
40
40
|
options: options,
|
|
41
41
|
renderInput: renderInput,
|
|
42
|
-
renderOption: (props, option)=>{
|
|
42
|
+
renderOption: ({ key, ...props }, option)=>{
|
|
43
43
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("li", {
|
|
44
44
|
...props,
|
|
45
45
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
|
|
@@ -52,12 +52,14 @@ function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (
|
|
|
52
52
|
option.description && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
|
|
53
53
|
variant: "body2",
|
|
54
54
|
component: "div",
|
|
55
|
-
|
|
55
|
+
sx: {
|
|
56
|
+
color: (theme)=>theme.palette.text.secondary
|
|
57
|
+
},
|
|
56
58
|
children: option.description
|
|
57
59
|
})
|
|
58
60
|
]
|
|
59
61
|
})
|
|
60
|
-
});
|
|
62
|
+
}, key);
|
|
61
63
|
},
|
|
62
64
|
filterOptions: (0, _material.createFilterOptions)({
|
|
63
65
|
// Include the label and the description in search.
|
|
@@ -28,9 +28,6 @@ function SortSelectorButtons({ onChange, value, ...props }) {
|
|
|
28
28
|
};
|
|
29
29
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.ButtonGroup, {
|
|
30
30
|
"aria-label": "Sort",
|
|
31
|
-
sx: {
|
|
32
|
-
margin: 1
|
|
33
|
-
},
|
|
34
31
|
...props,
|
|
35
32
|
children: [
|
|
36
33
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
@@ -41,12 +38,12 @@ function SortSelectorButtons({ onChange, value, ...props }) {
|
|
|
41
38
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
42
39
|
onClick: ()=>handleSortChange('asc'),
|
|
43
40
|
variant: value === 'asc' ? 'contained' : 'outlined',
|
|
44
|
-
children: "
|
|
41
|
+
children: "Asc"
|
|
45
42
|
}),
|
|
46
43
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
|
|
47
44
|
onClick: ()=>handleSortChange('desc'),
|
|
48
45
|
variant: value === 'desc' ? 'contained' : 'outlined',
|
|
49
|
-
children: "
|
|
46
|
+
children: "Desc"
|
|
50
47
|
})
|
|
51
48
|
]
|
|
52
49
|
});
|
|
@@ -0,0 +1,157 @@
|
|
|
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, "StatusHistoryChart", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return StatusHistoryChart;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _charts = require("echarts/charts");
|
|
26
|
+
const _components = require("echarts/components");
|
|
27
|
+
const _core = require("echarts/core");
|
|
28
|
+
const _renderers = require("echarts/renderers");
|
|
29
|
+
const _react = require("react");
|
|
30
|
+
const _context = require("../context");
|
|
31
|
+
const _EChart = require("../EChart");
|
|
32
|
+
const _getcolor = require("./utils/get-color");
|
|
33
|
+
const _getformattedaxislabel = require("./get-formatted-axis-label");
|
|
34
|
+
const _StatusHistoryTooltip = require("./StatusHistoryTooltip");
|
|
35
|
+
(0, _core.use)([
|
|
36
|
+
_charts.HeatmapChart,
|
|
37
|
+
_components.VisualMapComponent,
|
|
38
|
+
_components.GridComponent,
|
|
39
|
+
_components.DatasetComponent,
|
|
40
|
+
_components.TitleComponent,
|
|
41
|
+
_components.TooltipComponent,
|
|
42
|
+
_renderers.CanvasRenderer
|
|
43
|
+
]);
|
|
44
|
+
function StatusHistoryChart(props) {
|
|
45
|
+
const { height, data, xAxisCategories, yAxisCategories, timeScale } = props;
|
|
46
|
+
const { timeZone } = (0, _context.useTimeZone)();
|
|
47
|
+
const chartsTheme = (0, _context.useChartsTheme)();
|
|
48
|
+
const theme = (0, _material.useTheme)();
|
|
49
|
+
const uniqueValues = (0, _react.useMemo)(()=>[
|
|
50
|
+
...new Set(data.map((item)=>item[2]))
|
|
51
|
+
].filter((value)=>value !== undefined), [
|
|
52
|
+
data
|
|
53
|
+
]);
|
|
54
|
+
// get colors from theme and generate colors if not provided
|
|
55
|
+
const pieces = (0, _react.useMemo)(()=>{
|
|
56
|
+
const themeColors = Array.isArray(chartsTheme.echartsTheme.color) ? chartsTheme.echartsTheme.color.filter((color)=>typeof color === 'string') : [];
|
|
57
|
+
return uniqueValues.map((value, index)=>({
|
|
58
|
+
value,
|
|
59
|
+
color: (0, _getcolor.getColorsForValues)(uniqueValues, themeColors)[index]
|
|
60
|
+
}));
|
|
61
|
+
}, [
|
|
62
|
+
uniqueValues,
|
|
63
|
+
chartsTheme.echartsTheme.color
|
|
64
|
+
]);
|
|
65
|
+
var _timeScale_rangeMs;
|
|
66
|
+
const option = {
|
|
67
|
+
tooltip: {
|
|
68
|
+
appendToBody: true,
|
|
69
|
+
formatter: (params)=>{
|
|
70
|
+
return (0, _StatusHistoryTooltip.generateTooltipHTML)({
|
|
71
|
+
data: params.data,
|
|
72
|
+
marker: params.marker,
|
|
73
|
+
xAxisCategories,
|
|
74
|
+
yAxisCategories,
|
|
75
|
+
theme
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
grid: {
|
|
80
|
+
top: '5%',
|
|
81
|
+
bottom: '5%'
|
|
82
|
+
},
|
|
83
|
+
xAxis: {
|
|
84
|
+
type: 'category',
|
|
85
|
+
data: xAxisCategories,
|
|
86
|
+
axisLine: {
|
|
87
|
+
show: false
|
|
88
|
+
},
|
|
89
|
+
splitArea: {
|
|
90
|
+
show: false
|
|
91
|
+
},
|
|
92
|
+
axisLabel: {
|
|
93
|
+
hideOverlap: true,
|
|
94
|
+
formatter: (0, _getformattedaxislabel.getFormattedStatusHistoryAxisLabel)((_timeScale_rangeMs = timeScale === null || timeScale === void 0 ? void 0 : timeScale.rangeMs) !== null && _timeScale_rangeMs !== void 0 ? _timeScale_rangeMs : 0, timeZone)
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
yAxis: {
|
|
98
|
+
type: 'category',
|
|
99
|
+
data: yAxisCategories,
|
|
100
|
+
axisLine: {
|
|
101
|
+
show: false
|
|
102
|
+
},
|
|
103
|
+
splitArea: {
|
|
104
|
+
show: false,
|
|
105
|
+
interval: 0
|
|
106
|
+
},
|
|
107
|
+
splitLine: {
|
|
108
|
+
show: false
|
|
109
|
+
},
|
|
110
|
+
axisLabel: {
|
|
111
|
+
interval: 0
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
visualMap: {
|
|
115
|
+
show: false,
|
|
116
|
+
type: 'piecewise',
|
|
117
|
+
pieces
|
|
118
|
+
},
|
|
119
|
+
series: [
|
|
120
|
+
{
|
|
121
|
+
name: 'Status history',
|
|
122
|
+
type: 'heatmap',
|
|
123
|
+
coordinateSystem: 'cartesian2d',
|
|
124
|
+
data: data,
|
|
125
|
+
label: {
|
|
126
|
+
show: false
|
|
127
|
+
},
|
|
128
|
+
itemStyle: {
|
|
129
|
+
borderWidth: 1,
|
|
130
|
+
borderType: 'solid',
|
|
131
|
+
borderColor: '#ffffff'
|
|
132
|
+
},
|
|
133
|
+
emphasis: {
|
|
134
|
+
itemStyle: {
|
|
135
|
+
opacity: 0.5
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
142
|
+
style: {
|
|
143
|
+
height: height
|
|
144
|
+
},
|
|
145
|
+
sx: {
|
|
146
|
+
overflow: 'auto'
|
|
147
|
+
},
|
|
148
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_EChart.EChart, {
|
|
149
|
+
sx: {
|
|
150
|
+
width: '100%',
|
|
151
|
+
height: height
|
|
152
|
+
},
|
|
153
|
+
option: option,
|
|
154
|
+
theme: chartsTheme.echartsTheme
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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, "generateTooltipHTML", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return generateTooltipHTML;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _material = require("@mui/material");
|
|
24
|
+
const _utils = require("../utils");
|
|
25
|
+
function generateTooltipHTML({ data, marker, xAxisCategories, yAxisCategories, theme }) {
|
|
26
|
+
const [x, y, value] = data;
|
|
27
|
+
const xAxisLabel = xAxisCategories[x];
|
|
28
|
+
const { formattedDate, formattedTime } = (0, _utils.getDateAndTime)(xAxisLabel);
|
|
29
|
+
const tooltipHeader = (0, _material.css)`
|
|
30
|
+
border-bottom: 1px solid ${theme.palette.grey[500]};
|
|
31
|
+
padding-bottom: 8px;
|
|
32
|
+
`;
|
|
33
|
+
const tooltipContentStyles = (0, _material.css)`
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
padding-top: 8px;
|
|
37
|
+
`;
|
|
38
|
+
const labelStyles = (0, _material.css)`
|
|
39
|
+
margin-right: 16px;
|
|
40
|
+
`;
|
|
41
|
+
return `
|
|
42
|
+
<div>
|
|
43
|
+
<div style="${tooltipHeader.styles}">${formattedDate} ${formattedTime}</div>
|
|
44
|
+
<div style="${tooltipContentStyles.styles}">
|
|
45
|
+
<div style="${labelStyles.styles}">
|
|
46
|
+
${marker}
|
|
47
|
+
<strong>${yAxisCategories[y]}</strong>
|
|
48
|
+
</div>
|
|
49
|
+
<div>
|
|
50
|
+
${value}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
`;
|
|
55
|
+
}
|