@perses-dev/components 0.49.0 → 0.50.0-rc.0
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.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/YAxisLabel.js +4 -2
- package/dist/cjs/index.js +3 -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/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -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, {
|
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',
|
package/dist/cjs/index.js
CHANGED
|
@@ -20,11 +20,13 @@ _export_star(require("./ColorPicker"), exports);
|
|
|
20
20
|
_export_star(require("./ContentWithLegend"), exports);
|
|
21
21
|
_export_star(require("./Dialog"), exports);
|
|
22
22
|
_export_star(require("./DensitySelector"), exports);
|
|
23
|
+
_export_star(require("./DragAndDrop"), exports);
|
|
23
24
|
_export_star(require("./Drawer"), exports);
|
|
24
25
|
_export_star(require("./EChart"), exports);
|
|
25
26
|
_export_star(require("./ErrorAlert"), exports);
|
|
26
27
|
_export_star(require("./ErrorBoundary"), exports);
|
|
27
28
|
_export_star(require("./FontSizeSelector"), exports);
|
|
29
|
+
_export_star(require("./FormEditor"), exports);
|
|
28
30
|
_export_star(require("./GaugeChart"), exports);
|
|
29
31
|
_export_star(require("./InfoTooltip"), exports);
|
|
30
32
|
_export_star(require("./JSONEditor"), exports);
|
|
@@ -53,6 +55,7 @@ _export_star(require("./theme"), exports);
|
|
|
53
55
|
_export_star(require("./TransformsEditor"), exports);
|
|
54
56
|
_export_star(require("./RefreshIntervalPicker"), exports);
|
|
55
57
|
_export_star(require("./PieChart"), exports);
|
|
58
|
+
_export_star(require("./StatusHistoryChart"), exports);
|
|
56
59
|
function _export_star(from, to) {
|
|
57
60
|
Object.keys(from).forEach(function(k) {
|
|
58
61
|
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 = {
|
package/dist/cjs/utils/format.js
CHANGED
|
@@ -27,6 +27,9 @@ _export(exports, {
|
|
|
27
27
|
formatWithTimeZone: function() {
|
|
28
28
|
return formatWithTimeZone;
|
|
29
29
|
},
|
|
30
|
+
getDateAndTime: function() {
|
|
31
|
+
return getDateAndTime;
|
|
32
|
+
},
|
|
30
33
|
getFormattedAxisLabel: function() {
|
|
31
34
|
return getFormattedAxisLabel;
|
|
32
35
|
},
|
|
@@ -108,3 +111,18 @@ function getFormattedAxisLabel(rangeMs) {
|
|
|
108
111
|
day: '{MM}/{dd}'
|
|
109
112
|
};
|
|
110
113
|
}
|
|
114
|
+
const getDateAndTime = (timeMs)=>{
|
|
115
|
+
if (!timeMs) {
|
|
116
|
+
return {
|
|
117
|
+
formattedDate: '',
|
|
118
|
+
formattedTime: ''
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
const date = new Date(timeMs);
|
|
122
|
+
const formattedDate = (0, _datefns.format)(date, 'MMM dd, yyyy - ');
|
|
123
|
+
const formattedTime = (0, _datefns.format)(date, 'HH:mm:ss');
|
|
124
|
+
return {
|
|
125
|
+
formattedDate,
|
|
126
|
+
formattedTime
|
|
127
|
+
};
|
|
128
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
2
|
import { PersesChartsTheme } from '../model';
|
|
3
3
|
import { CursorCoordinates } from '../TimeSeriesTooltip';
|
|
4
4
|
export interface ChartsProviderProps {
|
|
@@ -12,7 +12,7 @@ export interface SharedChartsState {
|
|
|
12
12
|
lastTooltipPinnedCoords: CursorCoordinates | null;
|
|
13
13
|
setLastTooltipPinnedCoords: (lastTooltipPinnedCoords: CursorCoordinates | null) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare function ChartsProvider(props: ChartsProviderProps):
|
|
15
|
+
export declare function ChartsProvider(props: ChartsProviderProps): ReactElement;
|
|
16
16
|
export declare const ChartsThemeContext: React.Context<SharedChartsState | undefined>;
|
|
17
17
|
export declare function useChartsContext(): SharedChartsState;
|
|
18
18
|
export declare function useChartsTheme(): PersesChartsTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartsProvider.d.ts","sourceRoot":"","sources":["../../src/context/ChartsProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"ChartsProvider.d.ts","sourceRoot":"","sources":["../../src/context/ChartsProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAiB,YAAY,EAAiC,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,uBAAuB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClD,0BAA0B,EAAE,CAAC,uBAAuB,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;CACzF;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAevE;AAED,eAAO,MAAM,kBAAkB,8CAA0D,CAAC;AAE1F,wBAAgB,gBAAgB,IAAI,iBAAiB,CAMpD;AAED,wBAAgB,cAAc,IAAI,iBAAiB,CAGlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/ChartsProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { createContext, useContext, useMemo, useState } from 'react';\nimport { PersesChartsTheme } from '../model';\nimport { CursorCoordinates } from '../TimeSeriesTooltip';\n\nexport interface ChartsProviderProps {\n chartsTheme: PersesChartsTheme;\n enablePinning?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface SharedChartsState {\n chartsTheme: PersesChartsTheme;\n enablePinning: boolean;\n lastTooltipPinnedCoords: CursorCoordinates | null;\n setLastTooltipPinnedCoords: (lastTooltipPinnedCoords: CursorCoordinates | null) => void;\n}\n\nexport function ChartsProvider(props: ChartsProviderProps) {\n const { children, chartsTheme, enablePinning = false } = props;\n\n const [lastTooltipPinnedCoords, setLastTooltipPinnedCoords] = useState<CursorCoordinates | null>(null);\n\n const ctx = useMemo(() => {\n return {\n chartsTheme,\n enablePinning,\n lastTooltipPinnedCoords,\n setLastTooltipPinnedCoords,\n };\n }, [chartsTheme, enablePinning, lastTooltipPinnedCoords, setLastTooltipPinnedCoords]);\n\n return <ChartsThemeContext.Provider value={ctx}>{children}</ChartsThemeContext.Provider>;\n}\n\nexport const ChartsThemeContext = createContext<SharedChartsState | undefined>(undefined);\n\nexport function useChartsContext(): SharedChartsState {\n const ctx = useContext(ChartsThemeContext);\n if (ctx === undefined) {\n throw new Error('No ChartsThemeContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useChartsTheme(): PersesChartsTheme {\n const ctx = useChartsContext();\n return ctx.chartsTheme;\n}\n"],"names":["React","createContext","useContext","useMemo","useState","ChartsProvider","props","children","chartsTheme","enablePinning","lastTooltipPinnedCoords","setLastTooltipPinnedCoords","ctx","ChartsThemeContext","Provider","value","undefined","useChartsContext","Error","useChartsTheme"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../src/context/ChartsProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { createContext, ReactElement, useContext, useMemo, useState } from 'react';\nimport { PersesChartsTheme } from '../model';\nimport { CursorCoordinates } from '../TimeSeriesTooltip';\n\nexport interface ChartsProviderProps {\n chartsTheme: PersesChartsTheme;\n enablePinning?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface SharedChartsState {\n chartsTheme: PersesChartsTheme;\n enablePinning: boolean;\n lastTooltipPinnedCoords: CursorCoordinates | null;\n setLastTooltipPinnedCoords: (lastTooltipPinnedCoords: CursorCoordinates | null) => void;\n}\n\nexport function ChartsProvider(props: ChartsProviderProps): ReactElement {\n const { children, chartsTheme, enablePinning = false } = props;\n\n const [lastTooltipPinnedCoords, setLastTooltipPinnedCoords] = useState<CursorCoordinates | null>(null);\n\n const ctx = useMemo(() => {\n return {\n chartsTheme,\n enablePinning,\n lastTooltipPinnedCoords,\n setLastTooltipPinnedCoords,\n };\n }, [chartsTheme, enablePinning, lastTooltipPinnedCoords, setLastTooltipPinnedCoords]);\n\n return <ChartsThemeContext.Provider value={ctx}>{children}</ChartsThemeContext.Provider>;\n}\n\nexport const ChartsThemeContext = createContext<SharedChartsState | undefined>(undefined);\n\nexport function useChartsContext(): SharedChartsState {\n const ctx = useContext(ChartsThemeContext);\n if (ctx === undefined) {\n throw new Error('No ChartsThemeContext found. Did you forget a Provider?');\n }\n return ctx;\n}\n\nexport function useChartsTheme(): PersesChartsTheme {\n const ctx = useChartsContext();\n return ctx.chartsTheme;\n}\n"],"names":["React","createContext","useContext","useMemo","useState","ChartsProvider","props","children","chartsTheme","enablePinning","lastTooltipPinnedCoords","setLastTooltipPinnedCoords","ctx","ChartsThemeContext","Provider","value","undefined","useChartsContext","Error","useChartsTheme"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,aAAa,EAAgBC,UAAU,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,QAAQ;AAiB1F,OAAO,SAASC,eAAeC,KAA0B;IACvD,MAAM,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,gBAAgB,KAAK,EAAE,GAAGH;IAEzD,MAAM,CAACI,yBAAyBC,2BAA2B,GAAGP,SAAmC;IAEjG,MAAMQ,MAAMT,QAAQ;QAClB,OAAO;YACLK;YACAC;YACAC;YACAC;QACF;IACF,GAAG;QAACH;QAAaC;QAAeC;QAAyBC;KAA2B;IAEpF,qBAAO,KAACE,mBAAmBC,QAAQ;QAACC,OAAOH;kBAAML;;AACnD;AAEA,OAAO,MAAMM,mCAAqBZ,cAA6Ce,WAAW;AAE1F,OAAO,SAASC;IACd,MAAML,MAAMV,WAAWW;IACvB,IAAID,QAAQI,WAAW;QACrB,MAAM,IAAIE,MAAM;IAClB;IACA,OAAON;AACT;AAEA,OAAO,SAASO;IACd,MAAMP,MAAMK;IACZ,OAAOL,IAAIJ,WAAW;AACxB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
2
|
export declare const TimeZoneContext: React.Context<string | undefined>;
|
|
3
3
|
export interface TimeZoneProviderProps {
|
|
4
4
|
timeZone?: string;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare function TimeZoneProvider(props: TimeZoneProviderProps):
|
|
7
|
+
export declare function TimeZoneProvider(props: TimeZoneProviderProps): ReactElement;
|
|
8
8
|
export declare function useTimeZone(): {
|
|
9
9
|
timeZone: string;
|
|
10
|
-
formatWithUserTimeZone(date: Date, formatString: string)
|
|
11
|
-
dateFormatOptionsWithUserTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions)
|
|
10
|
+
formatWithUserTimeZone: (date: Date, formatString: string) => string;
|
|
11
|
+
dateFormatOptionsWithUserTimeZone: (dateFormatOptions: Intl.DateTimeFormatOptions) => Intl.DateTimeFormatOptions;
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=TimeZoneProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeZoneProvider.d.ts","sourceRoot":"","sources":["../../src/context/TimeZoneProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"TimeZoneProvider.d.ts","sourceRoot":"","sources":["../../src/context/TimeZoneProvider.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,EAAiB,YAAY,EAAc,MAAM,OAAO,CAAC;AAGvE,eAAO,MAAM,eAAe,mCAA+C,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAG3E;AAED,wBAAgB,WAAW,IAAI;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACrE,iCAAiC,EAAE,CAAC,iBAAiB,EAAE,IAAI,CAAC,qBAAqB,KAAK,IAAI,CAAC,qBAAqB,CAAC;CAClH,CAYA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/TimeZoneProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { createContext, useContext } from 'react';\nimport { formatWithTimeZone, dateFormatOptionsWithTimeZone } from '../utils';\n\nexport const TimeZoneContext = createContext<string | undefined>(undefined);\n\nexport interface TimeZoneProviderProps {\n timeZone?: string;\n children?: React.ReactNode;\n}\n\nexport function TimeZoneProvider(props: TimeZoneProviderProps) {\n const { children, timeZone } = props;\n return <TimeZoneContext.Provider value={timeZone}>{children}</TimeZoneContext.Provider>;\n}\n\nexport function useTimeZone() {\n const timeZone = useContext(TimeZoneContext);\n return {\n // fallback to \"local\" timezone if TimeZoneProvider is not present in the React tree\n timeZone: timeZone ?? 'local',\n formatWithUserTimeZone(date: Date, formatString: string) {\n return formatWithTimeZone(date, formatString, timeZone);\n },\n dateFormatOptionsWithUserTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions) {\n return dateFormatOptionsWithTimeZone(dateFormatOptions, timeZone);\n },\n };\n}\n"],"names":["React","createContext","useContext","formatWithTimeZone","dateFormatOptionsWithTimeZone","TimeZoneContext","undefined","TimeZoneProvider","props","children","timeZone","Provider","value","useTimeZone","formatWithUserTimeZone","date","formatString","dateFormatOptionsWithUserTimeZone","dateFormatOptions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../src/context/TimeZoneProvider.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { createContext, ReactElement, useContext } from 'react';\nimport { formatWithTimeZone, dateFormatOptionsWithTimeZone } from '../utils';\n\nexport const TimeZoneContext = createContext<string | undefined>(undefined);\n\nexport interface TimeZoneProviderProps {\n timeZone?: string;\n children?: React.ReactNode;\n}\n\nexport function TimeZoneProvider(props: TimeZoneProviderProps): ReactElement {\n const { children, timeZone } = props;\n return <TimeZoneContext.Provider value={timeZone}>{children}</TimeZoneContext.Provider>;\n}\n\nexport function useTimeZone(): {\n timeZone: string;\n formatWithUserTimeZone: (date: Date, formatString: string) => string;\n dateFormatOptionsWithUserTimeZone: (dateFormatOptions: Intl.DateTimeFormatOptions) => Intl.DateTimeFormatOptions;\n} {\n const timeZone = useContext(TimeZoneContext);\n return {\n // fallback to \"local\" timezone if TimeZoneProvider is not present in the React tree\n timeZone: timeZone ?? 'local',\n formatWithUserTimeZone(date: Date, formatString: string): string {\n return formatWithTimeZone(date, formatString, timeZone);\n },\n dateFormatOptionsWithUserTimeZone(dateFormatOptions: Intl.DateTimeFormatOptions): Intl.DateTimeFormatOptions {\n return dateFormatOptionsWithTimeZone(dateFormatOptions, timeZone);\n },\n };\n}\n"],"names":["React","createContext","useContext","formatWithTimeZone","dateFormatOptionsWithTimeZone","TimeZoneContext","undefined","TimeZoneProvider","props","children","timeZone","Provider","value","useTimeZone","formatWithUserTimeZone","date","formatString","dateFormatOptionsWithUserTimeZone","dateFormatOptions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,OAAOA,SAASC,aAAa,EAAgBC,UAAU,QAAQ,QAAQ;AACvE,SAASC,kBAAkB,EAAEC,6BAA6B,QAAQ,WAAW;AAE7E,OAAO,MAAMC,gCAAkBJ,cAAkCK,WAAW;AAO5E,OAAO,SAASC,iBAAiBC,KAA4B;IAC3D,MAAM,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGF;IAC/B,qBAAO,KAACH,gBAAgBM,QAAQ;QAACC,OAAOF;kBAAWD;;AACrD;AAEA,OAAO,SAASI;IAKd,MAAMH,WAAWR,WAAWG;IAC5B,OAAO;QACL,oFAAoF;QACpFK,UAAUA,qBAAAA,sBAAAA,WAAY;QACtBI,wBAAuBC,IAAU,EAAEC,YAAoB;YACrD,OAAOb,mBAAmBY,MAAMC,cAAcN;QAChD;QACAO,mCAAkCC,iBAA6C;YAC7E,OAAOd,8BAA8Bc,mBAAmBR;QAC1D;IACF;AACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,11 +4,13 @@ export * from './ColorPicker';
|
|
|
4
4
|
export * from './ContentWithLegend';
|
|
5
5
|
export * from './Dialog';
|
|
6
6
|
export * from './DensitySelector';
|
|
7
|
+
export * from './DragAndDrop';
|
|
7
8
|
export * from './Drawer';
|
|
8
9
|
export * from './EChart';
|
|
9
10
|
export * from './ErrorAlert';
|
|
10
11
|
export * from './ErrorBoundary';
|
|
11
12
|
export * from './FontSizeSelector';
|
|
13
|
+
export * from './FormEditor';
|
|
12
14
|
export * from './GaugeChart';
|
|
13
15
|
export * from './InfoTooltip';
|
|
14
16
|
export * from './JSONEditor';
|
|
@@ -37,4 +39,5 @@ export * from './theme';
|
|
|
37
39
|
export * from './TransformsEditor';
|
|
38
40
|
export * from './RefreshIntervalPicker';
|
|
39
41
|
export * from './PieChart';
|
|
42
|
+
export * from './StatusHistoryChart';
|
|
40
43
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,11 +16,13 @@ export * from './ColorPicker';
|
|
|
16
16
|
export * from './ContentWithLegend';
|
|
17
17
|
export * from './Dialog';
|
|
18
18
|
export * from './DensitySelector';
|
|
19
|
+
export * from './DragAndDrop';
|
|
19
20
|
export * from './Drawer';
|
|
20
21
|
export * from './EChart';
|
|
21
22
|
export * from './ErrorAlert';
|
|
22
23
|
export * from './ErrorBoundary';
|
|
23
24
|
export * from './FontSizeSelector';
|
|
25
|
+
export * from './FormEditor';
|
|
24
26
|
export * from './GaugeChart';
|
|
25
27
|
export * from './InfoTooltip';
|
|
26
28
|
export * from './JSONEditor';
|
|
@@ -49,5 +51,6 @@ export * from './theme';
|
|
|
49
51
|
export * from './TransformsEditor';
|
|
50
52
|
export * from './RefreshIntervalPicker';
|
|
51
53
|
export * from './PieChart';
|
|
54
|
+
export * from './StatusHistoryChart';
|
|
52
55
|
|
|
53
56
|
//# sourceMappingURL=index.js.map
|