@perses-dev/components 0.0.0-snapshot-scatter-chart-embed-8efdfab → 0.0.0-snapshot-explorer-plugin-c4a7621
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignSelector/AlignSelector.d.ts +9 -0
- package/dist/AlignSelector/AlignSelector.d.ts.map +1 -0
- package/dist/AlignSelector/AlignSelector.js +42 -0
- package/dist/AlignSelector/AlignSelector.js.map +1 -0
- package/dist/AlignSelector/index.d.ts +2 -0
- package/dist/AlignSelector/index.d.ts.map +1 -0
- package/dist/AlignSelector/index.js +15 -0
- package/dist/AlignSelector/index.js.map +1 -0
- package/dist/BarChart/BarChart.d.ts +2 -2
- package/dist/BarChart/BarChart.d.ts.map +1 -1
- package/dist/BarChart/BarChart.js +13 -8
- package/dist/BarChart/BarChart.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +3 -2
- package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/ColorPicker/ColorPicker.js +28 -13
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.d.ts +9 -0
- package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -0
- package/dist/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +18 -15
- package/dist/ColorPicker/OptionsColorPicker.js.map +1 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.d.ts.map +1 -1
- package/dist/ColorPicker/index.js +1 -0
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -2
- package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +10 -7
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts +2 -2
- package/dist/ContentWithLegend/model/content-with-legend-model.d.ts.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +4 -5
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DensitySelector/DensitySelector.d.ts +8 -0
- package/dist/DensitySelector/DensitySelector.d.ts.map +1 -0
- package/dist/DensitySelector/DensitySelector.js +46 -0
- package/dist/DensitySelector/DensitySelector.js.map +1 -0
- package/dist/DensitySelector/index.d.ts +2 -0
- package/dist/DensitySelector/index.d.ts.map +1 -0
- package/dist/DensitySelector/index.js +15 -0
- package/dist/DensitySelector/index.js.map +1 -0
- package/dist/Dialog/Dialog.d.ts +10 -15
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +11 -7
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +2 -2
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js +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 -2
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +2 -2
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/EChart/EChart.d.ts +8 -8
- package/dist/EChart/EChart.d.ts.map +1 -1
- package/dist/EChart/EChart.js +5 -6
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/ErrorAlert.d.ts +2 -2
- package/dist/ErrorAlert.d.ts.map +1 -1
- package/dist/ErrorAlert.js +1 -1
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.d.ts +3 -3
- package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js +2 -2
- 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 -2
- package/dist/FormatControls/FormatControls.d.ts.map +1 -1
- package/dist/FormatControls/FormatControls.js +3 -3
- package/dist/FormatControls/FormatControls.js.map +1 -1
- package/dist/GaugeChart/GaugeChart.d.ts +4 -4
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +5 -8
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.d.ts +4 -4
- package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +7 -8
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/JSONEditor.d.ts +3 -3
- package/dist/JSONEditor.d.ts.map +1 -1
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +2 -2
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +2 -2
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +9 -5
- 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 -2
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +6 -6
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +11 -19
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +2 -2
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +3 -2
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/Legend/legend-model.d.ts +2 -2
- 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 +12 -17
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LinksEditor/LinksEditor.d.ts +8 -0
- package/dist/LinksEditor/LinksEditor.d.ts.map +1 -0
- package/dist/LinksEditor/LinksEditor.js +161 -0
- package/dist/LinksEditor/LinksEditor.js.map +1 -0
- package/dist/LinksEditor/index.d.ts +2 -0
- package/dist/LinksEditor/index.d.ts.map +1 -0
- package/dist/LinksEditor/index.js +15 -0
- package/dist/LinksEditor/index.js.map +1 -0
- package/dist/ModeSelector/ModeSelector.d.ts +3 -3
- package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
- package/dist/ModeSelector/ModeSelector.js +2 -2
- package/dist/ModeSelector/ModeSelector.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +3 -3
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +3 -3
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +3 -3
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +3 -3
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
- package/dist/Overlay/Overlay.d.ts +16 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -0
- package/dist/Overlay/Overlay.js +52 -0
- package/dist/Overlay/Overlay.js.map +1 -0
- package/dist/Overlay/index.d.ts +2 -0
- package/dist/Overlay/index.d.ts.map +1 -0
- package/dist/Overlay/index.js +15 -0
- package/dist/Overlay/index.js.map +1 -0
- package/dist/PieChart/PieChart.d.ts +14 -0
- package/dist/PieChart/PieChart.d.ts.map +1 -0
- package/dist/PieChart/PieChart.js +92 -0
- package/dist/PieChart/PieChart.js.map +1 -0
- package/dist/PieChart/index.d.ts +2 -0
- package/dist/PieChart/index.d.ts.map +1 -0
- package/dist/PieChart/index.js +15 -0
- package/dist/PieChart/index.js.map +1 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +2 -2
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +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 +8 -7
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SortSelector/SortSelector.d.ts +3 -3
- package/dist/SortSelector/SortSelector.d.ts.map +1 -1
- package/dist/SortSelector/SortSelector.js +2 -2
- package/dist/SortSelector/SortSelector.js.map +1 -1
- package/dist/SortSelector/SortSelectorButtons.d.ts +9 -0
- package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -0
- package/dist/SortSelector/SortSelectorButtons.js +42 -0
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -0
- package/dist/SortSelector/index.d.ts +1 -0
- package/dist/SortSelector/index.d.ts.map +1 -1
- package/dist/SortSelector/index.js +2 -1
- package/dist/SortSelector/index.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts +6 -6
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +12 -18
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
- package/dist/StatChart/calculateFontSize.js +4 -6
- package/dist/StatChart/calculateFontSize.js.map +1 -1
- package/dist/StatChart/utils/formatStatChartValue.d.ts +3 -0
- package/dist/StatChart/utils/formatStatChartValue.d.ts.map +1 -0
- package/dist/StatChart/utils/formatStatChartValue.js +26 -0
- package/dist/StatChart/utils/formatStatChartValue.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +27 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js +132 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +13 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.js +47 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +1 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +2 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +1 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.js +41 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +1 -0
- package/dist/StatusHistoryChart/index.d.ts +3 -0
- package/dist/StatusHistoryChart/index.d.ts.map +1 -0
- package/dist/StatusHistoryChart/index.js +16 -0
- package/dist/StatusHistoryChart/index.js.map +1 -0
- package/dist/StatusHistoryChart/utils/get-color.d.ts +6 -0
- package/dist/StatusHistoryChart/utils/get-color.d.ts.map +1 -0
- package/dist/StatusHistoryChart/utils/get-color.js +100 -0
- package/dist/StatusHistoryChart/utils/get-color.js.map +1 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +3 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +1 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.js +27 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +1 -0
- package/dist/Table/InnerTable.d.ts +2 -2
- package/dist/Table/InnerTable.d.ts.map +1 -1
- package/dist/Table/InnerTable.js +4 -3
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +2 -2
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +12 -10
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.d.ts +2 -2
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableCell.d.ts +4 -2
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +29 -7
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.d.ts +2 -2
- package/dist/Table/TableCheckbox.d.ts.map +1 -1
- package/dist/Table/TableCheckbox.js +1 -1
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableHead.d.ts +2 -2
- package/dist/Table/TableHead.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.d.ts +3 -3
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +1 -1
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/TableRow.d.ts +1 -1
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts +5 -4
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +18 -15
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/VirtualizedTableContainer.d.ts +2 -2
- package/dist/Table/VirtualizedTableContainer.d.ts.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.d.ts +3 -3
- package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.js +2 -2
- 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 +8 -14
- 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 +27 -7
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +29 -23
- 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 +3 -3
- package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -2
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js +20 -27
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/TimeChart/TimeChart.d.ts.map +1 -1
- package/dist/TimeChart/TimeChart.js +12 -15
- package/dist/TimeChart/TimeChart.js.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +19 -0
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +44 -29
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +36 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.js +119 -0
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -0
- package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.d.ts +1 -2
- package/dist/TimeRangeSelector/index.d.ts.map +1 -0
- package/dist/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
- package/dist/TimeRangeSelector/index.js.map +1 -0
- package/dist/TimeRangeSelector/utils.d.ts +25 -0
- package/dist/TimeRangeSelector/utils.d.ts.map +1 -0
- package/dist/{DateTimeRangePicker → TimeRangeSelector}/utils.js +23 -2
- package/dist/TimeRangeSelector/utils.js.map +1 -0
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts +2 -2
- package/dist/TimeSeriesTooltip/LineChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/LineChartTooltip.js +8 -13
- package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +2 -2
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +2 -3
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +2 -2
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -2
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js +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 +4 -5
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -2
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js +2 -2
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js +7 -15
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +19 -29
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +10 -3
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +13 -2
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts +1 -21
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +2 -4
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.d.ts +6 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.d.ts.map +1 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.js +32 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -0
- package/dist/ToolbarIconButton/index.d.ts +2 -0
- package/dist/ToolbarIconButton/index.d.ts.map +1 -0
- package/dist/ToolbarIconButton/index.js +15 -0
- package/dist/ToolbarIconButton/index.js.map +1 -0
- package/dist/TransformsEditor/TransformEditor.d.ts +9 -0
- package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformEditor.js +289 -0
- package/dist/TransformsEditor/TransformEditor.js.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.d.ts +10 -0
- package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.js +118 -0
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.d.ts +9 -0
- package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.js +90 -0
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
- package/dist/TransformsEditor/index.d.ts +2 -0
- package/dist/TransformsEditor/index.d.ts.map +1 -0
- package/dist/TransformsEditor/index.js +15 -0
- package/dist/TransformsEditor/index.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +10 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.js +374 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +8 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js +118 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
- package/dist/ValueMappingEditor/index.d.ts +2 -0
- package/dist/ValueMappingEditor/index.d.ts.map +1 -0
- package/dist/ValueMappingEditor/index.js +15 -0
- package/dist/ValueMappingEditor/index.js.map +1 -0
- package/dist/YAxisLabel.d.ts +2 -2
- package/dist/YAxisLabel.d.ts.map +1 -1
- package/dist/YAxisLabel.js +5 -3
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/AlignSelector/AlignSelector.js +50 -0
- package/dist/cjs/AlignSelector/index.js +30 -0
- package/dist/cjs/BarChart/BarChart.js +14 -9
- package/dist/cjs/ColorPicker/ColorPicker.js +28 -52
- package/dist/cjs/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +19 -16
- package/dist/cjs/ColorPicker/index.js +1 -0
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +10 -12
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +4 -5
- package/dist/cjs/DensitySelector/DensitySelector.js +54 -0
- package/dist/cjs/DensitySelector/index.js +30 -0
- package/dist/cjs/Dialog/Dialog.js +11 -7
- package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -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/Drawer/Drawer.js +2 -2
- package/dist/cjs/EChart/EChart.js +5 -45
- package/dist/cjs/ErrorAlert.js +1 -1
- package/dist/cjs/FontSizeSelector/FontSizeSelector.js +2 -2
- package/dist/cjs/FormEditor/FormActions.js +83 -0
- package/dist/cjs/FormEditor/index.js +30 -0
- package/dist/cjs/FormatControls/FormatControls.js +3 -3
- package/dist/cjs/GaugeChart/GaugeChart.js +6 -9
- package/dist/cjs/InfoTooltip/InfoTooltip.js +7 -13
- package/dist/cjs/Legend/CompactLegend.js +1 -1
- package/dist/cjs/Legend/Legend.js +9 -5
- package/dist/cjs/Legend/LegendColorBadge.js +2 -7
- package/dist/cjs/Legend/ListLegend.js +1 -1
- package/dist/cjs/Legend/ListLegendItem.js +9 -55
- package/dist/cjs/Legend/TableLegend.js +3 -2
- package/dist/cjs/LineChart/LineChart.js +13 -18
- package/dist/cjs/LinksEditor/LinksEditor.js +174 -0
- package/dist/cjs/LinksEditor/index.js +30 -0
- package/dist/cjs/ModeSelector/ModeSelector.js +2 -2
- package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/cjs/Overlay/Overlay.js +71 -0
- package/dist/cjs/Overlay/index.js +30 -0
- package/dist/cjs/PieChart/PieChart.js +100 -0
- package/dist/cjs/PieChart/index.js +30 -0
- package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +8 -7
- package/dist/cjs/SortSelector/SortSelector.js +2 -2
- package/dist/cjs/SortSelector/SortSelectorButtons.js +50 -0
- package/dist/cjs/SortSelector/index.js +2 -1
- package/dist/cjs/StatChart/StatChart.js +15 -21
- package/dist/cjs/StatChart/calculateFontSize.js +4 -6
- package/dist/cjs/StatChart/utils/formatStatChartValue.js +34 -0
- package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +140 -0
- package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +55 -0
- package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +48 -0
- package/dist/cjs/StatusHistoryChart/index.js +31 -0
- package/dist/cjs/StatusHistoryChart/utils/get-color.js +125 -0
- package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +35 -0
- package/dist/cjs/Table/InnerTable.js +4 -3
- package/dist/cjs/Table/Table.js +11 -9
- package/dist/cjs/Table/TableCell.js +29 -7
- package/dist/cjs/Table/TableCheckbox.js +1 -1
- package/dist/cjs/Table/TableHeaderCell.js +1 -1
- package/dist/cjs/Table/VirtualizedTable.js +18 -15
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +2 -2
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +8 -14
- package/dist/cjs/Table/index.js +1 -7
- package/dist/cjs/Table/model/table-model.js +32 -23
- package/dist/cjs/ThresholdsEditor/ThresholdInput.js +3 -3
- package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +23 -28
- package/dist/cjs/TimeChart/TimeChart.js +12 -15
- package/dist/cjs/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +37 -30
- package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +127 -0
- package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
- package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/utils.js +26 -3
- package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +8 -13
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +2 -3
- package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +4 -5
- package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +2 -2
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +7 -15
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +29 -39
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +49 -29
- package/dist/cjs/TimeSeriesTooltip/utils.js +2 -4
- package/dist/cjs/ToolbarIconButton/ToolbarIconButton.js +40 -0
- package/dist/cjs/ToolbarIconButton/index.js +30 -0
- package/dist/cjs/TransformsEditor/TransformEditor.js +297 -0
- package/dist/cjs/TransformsEditor/TransformEditorContainer.js +131 -0
- package/dist/cjs/TransformsEditor/TransformsEditor.js +103 -0
- package/dist/cjs/TransformsEditor/index.js +30 -0
- package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +387 -0
- package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +131 -0
- package/dist/cjs/ValueMappingEditor/index.js +30 -0
- package/dist/cjs/YAxisLabel.js +5 -3
- package/dist/cjs/context/ChartsProvider.js +4 -2
- package/dist/cjs/context/SnackbarProvider.js +1 -1
- package/dist/cjs/context/TimeZoneProvider.js +5 -3
- package/dist/cjs/controls/TextField.js +54 -0
- package/dist/cjs/controls/index.js +30 -0
- package/dist/cjs/index.js +13 -1
- package/dist/cjs/model/graph.js +3 -3
- package/dist/cjs/model/timeOption.js +19 -1
- package/dist/cjs/test-utils/theme.js +3 -3
- package/dist/cjs/theme/component-overrides/alert.js +4 -4
- package/dist/cjs/theme/component-overrides/paper.js +1 -1
- package/dist/cjs/theme/index.js +1 -0
- package/dist/cjs/theme/palette/background.js +2 -0
- package/dist/cjs/theme/palette/colors/common.js +3 -3
- package/dist/cjs/theme/theme.js +7 -7
- package/dist/cjs/utils/axis.js +3 -3
- package/dist/cjs/utils/chart-actions.js +14 -15
- package/dist/cjs/utils/format.js +21 -3
- package/dist/cjs/utils/mathjs.js +1 -1
- package/dist/cjs/utils/theme-gen.js +5 -7
- package/dist/context/ChartsProvider.d.ts +2 -2
- package/dist/context/ChartsProvider.d.ts.map +1 -1
- package/dist/context/ChartsProvider.js +1 -1
- package/dist/context/ChartsProvider.js.map +1 -1
- package/dist/context/SnackbarProvider.d.ts +2 -2
- package/dist/context/SnackbarProvider.d.ts.map +1 -1
- package/dist/context/SnackbarProvider.js +1 -1
- package/dist/context/SnackbarProvider.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 +2 -2
- 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 +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/model/graph.d.ts +8 -8
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/theme.d.ts +1 -1
- package/dist/model/theme.d.ts.map +1 -1
- package/dist/model/theme.js.map +1 -1
- package/dist/model/timeOption.d.ts +2 -1
- package/dist/model/timeOption.d.ts.map +1 -1
- package/dist/model/timeOption.js +13 -2
- package/dist/model/timeOption.js.map +1 -1
- package/dist/test/render.d.ts +3 -3
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/theme/component-overrides/alert.js +4 -4
- package/dist/theme/component-overrides/alert.js.map +1 -1
- package/dist/theme/component-overrides/paper.js +1 -1
- package/dist/theme/component-overrides/paper.js.map +1 -1
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette/background.d.ts.map +1 -1
- package/dist/theme/palette/background.js +2 -0
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/palette/colors/types.d.ts +1 -1
- package/dist/theme/palette/colors/types.d.ts.map +1 -1
- package/dist/theme/palette/colors/types.js.map +1 -1
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +6 -6
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/types/ThemeExtension.d.js.map +1 -1
- package/dist/utils/axis.d.ts +1 -7
- package/dist/utils/axis.d.ts.map +1 -1
- package/dist/utils/axis.js.map +1 -1
- package/dist/utils/chart-actions.d.ts.map +1 -1
- package/dist/utils/chart-actions.js +2 -3
- package/dist/utils/chart-actions.js.map +1 -1
- package/dist/utils/combine-sx.js.map +1 -1
- package/dist/utils/component-ids.d.ts.map +1 -1
- package/dist/utils/component-ids.js.map +1 -1
- package/dist/utils/format.d.ts +10 -4
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +16 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/mathjs.js +1 -1
- package/dist/utils/mathjs.js.map +1 -1
- package/dist/utils/theme-gen.d.ts +1 -1
- package/dist/utils/theme-gen.d.ts.map +1 -1
- package/dist/utils/theme-gen.js +5 -7
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +13 -9
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +0 -10
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +0 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +0 -12
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +0 -80
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +0 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +0 -14
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js +0 -67
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +0 -1
- package/dist/DateTimeRangePicker/index.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/index.js.map +0 -1
- package/dist/DateTimeRangePicker/utils.d.ts +0 -7
- package/dist/DateTimeRangePicker/utils.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/utils.js.map +0 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +0 -4
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +0 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +0 -1
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +0 -88
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +0 -80
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
DragAndDropElement: function() {
|
|
25
|
+
return DragAndDropElement;
|
|
26
|
+
},
|
|
27
|
+
useDragAndDropMonitor: function() {
|
|
28
|
+
return useDragAndDropMonitor;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
32
|
+
const _react = require("react");
|
|
33
|
+
const _reorderwithedge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge");
|
|
34
|
+
const _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
|
|
35
|
+
const _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
36
|
+
const _closestedge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
37
|
+
const _material = require("@mui/material");
|
|
38
|
+
const _model = require("./model");
|
|
39
|
+
const _DropIndicator = require("./DropIndicator");
|
|
40
|
+
function useDragAndDropMonitor({ elements, accessKey, axis = 'vertical', onChange }) {
|
|
41
|
+
return (0, _react.useEffect)(()=>{
|
|
42
|
+
return (0, _adapter.monitorForElements)({
|
|
43
|
+
onDrop ({ location, source }) {
|
|
44
|
+
const target = location.current.dropTargets[0];
|
|
45
|
+
if (!target) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const sourceData = source.data;
|
|
49
|
+
const targetData = target.data;
|
|
50
|
+
const indexOfSource = elements.findIndex((column)=>column[accessKey] === sourceData[accessKey]);
|
|
51
|
+
const indexOfTarget = elements.findIndex((column)=>column[accessKey] === targetData[accessKey]);
|
|
52
|
+
if (indexOfTarget < 0 || indexOfSource < 0) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const closestEdgeOfTarget = (0, _closestedge.extractClosestEdge)(targetData);
|
|
56
|
+
onChange((0, _reorderwithedge.reorderWithEdge)({
|
|
57
|
+
list: elements,
|
|
58
|
+
startIndex: indexOfSource,
|
|
59
|
+
indexOfTarget,
|
|
60
|
+
closestEdgeOfTarget,
|
|
61
|
+
axis: axis
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}, [
|
|
66
|
+
accessKey,
|
|
67
|
+
axis,
|
|
68
|
+
elements,
|
|
69
|
+
onChange
|
|
70
|
+
]);
|
|
71
|
+
}
|
|
72
|
+
function DragAndDropElement({ children, data }) {
|
|
73
|
+
const ref = (0, _react.useRef)(null);
|
|
74
|
+
const [state, setState] = (0, _react.useState)(_model.idle);
|
|
75
|
+
(0, _react.useEffect)(()=>{
|
|
76
|
+
const element = ref.current;
|
|
77
|
+
if (!element) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
return (0, _combine.combine)((0, _adapter.draggable)({
|
|
81
|
+
element,
|
|
82
|
+
getInitialData () {
|
|
83
|
+
return data;
|
|
84
|
+
},
|
|
85
|
+
onDragStart () {
|
|
86
|
+
setState({
|
|
87
|
+
type: 'is-dragging'
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
onDrop () {
|
|
91
|
+
setState(_model.idle);
|
|
92
|
+
}
|
|
93
|
+
}), (0, _adapter.dropTargetForElements)({
|
|
94
|
+
element,
|
|
95
|
+
canDrop ({ source }) {
|
|
96
|
+
// not allowing dropping on yourself
|
|
97
|
+
if (source.element === element) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
// only allowing tasks to be dropped on me
|
|
101
|
+
return true;
|
|
102
|
+
},
|
|
103
|
+
getData ({ input }) {
|
|
104
|
+
return (0, _closestedge.attachClosestEdge)(data, {
|
|
105
|
+
element,
|
|
106
|
+
input,
|
|
107
|
+
allowedEdges: [
|
|
108
|
+
'top',
|
|
109
|
+
'bottom'
|
|
110
|
+
]
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
getIsSticky () {
|
|
114
|
+
return true;
|
|
115
|
+
},
|
|
116
|
+
onDragEnter ({ self }) {
|
|
117
|
+
const closestEdge = (0, _closestedge.extractClosestEdge)(self.data);
|
|
118
|
+
setState({
|
|
119
|
+
type: 'is-dragging-over',
|
|
120
|
+
closestEdge
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
onDrag ({ self }) {
|
|
124
|
+
const closestEdge = (0, _closestedge.extractClosestEdge)(self.data);
|
|
125
|
+
// Only need to update react state if nothing has changed.
|
|
126
|
+
// Prevents re-rendering.
|
|
127
|
+
setState((current)=>{
|
|
128
|
+
if (current.type === 'is-dragging-over' && current.closestEdge === closestEdge) {
|
|
129
|
+
return current;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
type: 'is-dragging-over',
|
|
133
|
+
closestEdge
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
onDragLeave () {
|
|
138
|
+
setState(_model.idle);
|
|
139
|
+
},
|
|
140
|
+
onDrop () {
|
|
141
|
+
setState(_model.idle);
|
|
142
|
+
}
|
|
143
|
+
}));
|
|
144
|
+
}, [
|
|
145
|
+
data
|
|
146
|
+
]);
|
|
147
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
148
|
+
ref: ref,
|
|
149
|
+
spacing: 1,
|
|
150
|
+
style: {
|
|
151
|
+
opacity: state.type === 'is-dragging' ? 0.5 : 'unset'
|
|
152
|
+
},
|
|
153
|
+
children: [
|
|
154
|
+
state.type === 'is-dragging-over' && state.closestEdge === 'top' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_DropIndicator.DropIndicator, {}) : null,
|
|
155
|
+
children,
|
|
156
|
+
state.type === 'is-dragging-over' && state.closestEdge === 'bottom' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_DropIndicator.DropIndicator, {}) : null
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
DragButton: function() {
|
|
25
|
+
return DragButton;
|
|
26
|
+
},
|
|
27
|
+
handleMoveDown: function() {
|
|
28
|
+
return handleMoveDown;
|
|
29
|
+
},
|
|
30
|
+
handleMoveUp: function() {
|
|
31
|
+
return handleMoveUp;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
35
|
+
const _material = require("@mui/material");
|
|
36
|
+
const _Drag = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Drag"));
|
|
37
|
+
const _react = require("react");
|
|
38
|
+
function _interop_require_default(obj) {
|
|
39
|
+
return obj && obj.__esModule ? obj : {
|
|
40
|
+
default: obj
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function handleMoveUp(element, elements) {
|
|
44
|
+
const index = elements.indexOf(element);
|
|
45
|
+
if (index === 0) {
|
|
46
|
+
return elements;
|
|
47
|
+
}
|
|
48
|
+
const newElements = [
|
|
49
|
+
...elements
|
|
50
|
+
];
|
|
51
|
+
newElements.splice(index, 1);
|
|
52
|
+
newElements.splice(index - 1, 0, element);
|
|
53
|
+
return newElements;
|
|
54
|
+
}
|
|
55
|
+
function handleMoveDown(element, elements) {
|
|
56
|
+
const index = elements.indexOf(element);
|
|
57
|
+
if (index === elements.length - 1) {
|
|
58
|
+
return elements;
|
|
59
|
+
}
|
|
60
|
+
const newElements = [
|
|
61
|
+
...elements
|
|
62
|
+
];
|
|
63
|
+
newElements.splice(index, 1);
|
|
64
|
+
newElements.splice(index + 1, 0, element);
|
|
65
|
+
return newElements;
|
|
66
|
+
}
|
|
67
|
+
function DragButton({ onMoveUp, onMoveDown, onMoveLeft, onMoveRight, menuSx }) {
|
|
68
|
+
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
69
|
+
const open = Boolean(anchorEl);
|
|
70
|
+
function handleClick(event) {
|
|
71
|
+
setAnchorEl(event.currentTarget);
|
|
72
|
+
}
|
|
73
|
+
function handleMove(callback) {
|
|
74
|
+
setAnchorEl(null);
|
|
75
|
+
callback?.();
|
|
76
|
+
}
|
|
77
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
|
|
80
|
+
"aria-label": "move",
|
|
81
|
+
"aria-haspopup": true,
|
|
82
|
+
"aria-expanded": open,
|
|
83
|
+
size: "small",
|
|
84
|
+
onClick: handleClick,
|
|
85
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Drag.default, {})
|
|
86
|
+
}),
|
|
87
|
+
(onMoveUp || onMoveDown || onMoveLeft || onMoveRight) && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Menu, {
|
|
88
|
+
id: "drag-button-menu",
|
|
89
|
+
MenuListProps: {
|
|
90
|
+
'aria-labelledby': 'drag-button-menu'
|
|
91
|
+
},
|
|
92
|
+
anchorEl: anchorEl,
|
|
93
|
+
open: open,
|
|
94
|
+
onClose: ()=>handleMove(undefined),
|
|
95
|
+
sx: menuSx,
|
|
96
|
+
children: [
|
|
97
|
+
onMoveUp && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
98
|
+
onClick: ()=>handleMove(onMoveUp),
|
|
99
|
+
children: "Move Up"
|
|
100
|
+
}),
|
|
101
|
+
onMoveDown && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
102
|
+
onClick: ()=>handleMove(onMoveDown),
|
|
103
|
+
children: "Move Down"
|
|
104
|
+
}),
|
|
105
|
+
onMoveLeft && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
106
|
+
onClick: ()=>handleMove(onMoveLeft),
|
|
107
|
+
children: "Move Left"
|
|
108
|
+
}),
|
|
109
|
+
onMoveRight && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
110
|
+
onClick: ()=>handleMove(onMoveRight),
|
|
111
|
+
children: "Move Right"
|
|
112
|
+
}),
|
|
113
|
+
onMoveRight && /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.MenuItem, {
|
|
114
|
+
onClick: ()=>handleMove(onMoveRight),
|
|
115
|
+
children: "Move Right"
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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, "DropIndicator", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return DropIndicator;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
function DropIndicator() {
|
|
26
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
27
|
+
direction: "row",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
children: [
|
|
30
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
31
|
+
sx: {
|
|
32
|
+
content: '""',
|
|
33
|
+
width: 8,
|
|
34
|
+
height: 8,
|
|
35
|
+
boxSizing: 'border-box',
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
backgroundColor: (theme)=>theme.palette.background.default,
|
|
38
|
+
border: (theme)=>`2px solid ${theme.palette.info.main}`,
|
|
39
|
+
borderRadius: '50%'
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
43
|
+
sx: {
|
|
44
|
+
content: '""',
|
|
45
|
+
height: 2,
|
|
46
|
+
background: (theme)=>theme.palette.info.main,
|
|
47
|
+
width: '100%'
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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("./DropIndicator"), exports);
|
|
18
|
+
_export_star(require("./DragAndDropList"), exports);
|
|
19
|
+
_export_star(require("./DragButton"), exports);
|
|
20
|
+
function _export_star(from, to) {
|
|
21
|
+
Object.keys(from).forEach(function(k) {
|
|
22
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
23
|
+
Object.defineProperty(to, k, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return from[k];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return from;
|
|
32
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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, "idle", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return idle;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const idle = {
|
|
24
|
+
type: 'idle'
|
|
25
|
+
};
|
|
@@ -24,7 +24,7 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _utils = require("../utils");
|
|
26
26
|
const DRAWER_DEFAULT_WIDTH = 1080;
|
|
27
|
-
const Drawer = ({ anchor ='right'
|
|
27
|
+
const Drawer = ({ anchor = 'right', isOpen, onClose, PaperProps, children, ...rest })=>{
|
|
28
28
|
const isSmaller = (0, _material.useMediaQuery)(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);
|
|
29
29
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Drawer, {
|
|
30
30
|
...rest,
|
|
@@ -36,7 +36,7 @@ const Drawer = ({ anchor ='right' , isOpen , onClose , PaperProps , children , .
|
|
|
36
36
|
sx: (0, _utils.combineSx)({
|
|
37
37
|
width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,
|
|
38
38
|
overflow: 'hidden'
|
|
39
|
-
}, PaperProps
|
|
39
|
+
}, PaperProps?.sx)
|
|
40
40
|
},
|
|
41
41
|
children: children
|
|
42
42
|
});
|
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "EChart", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _react =
|
|
24
|
+
const _react = require("react");
|
|
25
25
|
const _core = require("echarts/core");
|
|
26
26
|
const _material = require("@mui/material");
|
|
27
27
|
const _isEqual = /*#__PURE__*/ _interop_require_default(require("lodash/isEqual"));
|
|
@@ -31,45 +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
|
-
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
57
|
-
for(var key in obj){
|
|
58
|
-
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
59
|
-
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
60
|
-
if (desc && (desc.get || desc.set)) {
|
|
61
|
-
Object.defineProperty(newObj, key, desc);
|
|
62
|
-
} else {
|
|
63
|
-
newObj[key] = obj[key];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
newObj.default = obj;
|
|
68
|
-
if (cache) {
|
|
69
|
-
cache.set(obj, newObj);
|
|
70
|
-
}
|
|
71
|
-
return newObj;
|
|
72
|
-
}
|
|
73
34
|
const mouseEvents = [
|
|
74
35
|
'click',
|
|
75
36
|
'dblclick',
|
|
@@ -86,7 +47,7 @@ const batchEvents = [
|
|
|
86
47
|
'downplay',
|
|
87
48
|
'highlight'
|
|
88
49
|
];
|
|
89
|
-
const EChart = /*#__PURE__*/ _react.
|
|
50
|
+
const EChart = /*#__PURE__*/ (0, _react.memo)(function EChart({ option, theme, renderer, sx, onEvents, _instance, syncGroup, onChartInitialized }) {
|
|
90
51
|
const initialOption = (0, _react.useRef)(option);
|
|
91
52
|
const prevOption = (0, _react.useRef)(option);
|
|
92
53
|
const containerRef = (0, _react.useRef)(null);
|
|
@@ -95,11 +56,11 @@ const EChart = /*#__PURE__*/ _react.default.memo(function EChart({ option , them
|
|
|
95
56
|
(0, _react.useLayoutEffect)(()=>{
|
|
96
57
|
if (containerRef.current === null || chartElement.current !== null) return;
|
|
97
58
|
chartElement.current = (0, _core.init)(containerRef.current, theme, {
|
|
98
|
-
renderer: renderer
|
|
59
|
+
renderer: renderer ?? 'canvas'
|
|
99
60
|
});
|
|
100
61
|
if (chartElement.current === undefined) return;
|
|
101
62
|
chartElement.current.setOption(initialOption.current, true);
|
|
102
|
-
onChartInitialized
|
|
63
|
+
onChartInitialized?.(chartElement.current);
|
|
103
64
|
if (_instance !== undefined) {
|
|
104
65
|
_instance.current = chartElement.current;
|
|
105
66
|
}
|
|
@@ -199,8 +160,7 @@ function bindEvents(instance, events) {
|
|
|
199
160
|
}
|
|
200
161
|
for(const eventName in events){
|
|
201
162
|
if (Object.prototype.hasOwnProperty.call(events, eventName)) {
|
|
202
|
-
|
|
203
|
-
const customEvent = (_events_eventName = events[eventName]) !== null && _events_eventName !== void 0 ? _events_eventName : null;
|
|
163
|
+
const customEvent = events[eventName] ?? null;
|
|
204
164
|
if (customEvent) {
|
|
205
165
|
bindEvent(eventName, customEvent);
|
|
206
166
|
}
|
package/dist/cjs/ErrorAlert.js
CHANGED
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "ErrorAlert", {
|
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
function ErrorAlert(props) {
|
|
26
|
-
const { error
|
|
26
|
+
const { error } = props;
|
|
27
27
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Alert, {
|
|
28
28
|
severity: "error",
|
|
29
29
|
children: error.message
|
|
@@ -115,8 +115,8 @@ const FONT_SIZE_OPTIONS = [
|
|
|
115
115
|
value: 192
|
|
116
116
|
}
|
|
117
117
|
];
|
|
118
|
-
function FontSizeSelector({ value
|
|
119
|
-
const handleFontSizeChange = (_, { value
|
|
118
|
+
function FontSizeSelector({ value, onChange }) {
|
|
119
|
+
const handleFontSizeChange = (_, { value })=>{
|
|
120
120
|
onChange(value);
|
|
121
121
|
};
|
|
122
122
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_OptionsEditorLayout.OptionsEditorControl, {
|
|
@@ -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
|
+
}
|
|
@@ -66,7 +66,7 @@ const DECIMAL_PLACES_OPTIONS = [
|
|
|
66
66
|
function getOptionByDecimalPlaces(decimalPlaces) {
|
|
67
67
|
return DECIMAL_PLACES_OPTIONS.find((o)=>o.decimalPlaces === decimalPlaces);
|
|
68
68
|
}
|
|
69
|
-
function FormatControls({ value
|
|
69
|
+
function FormatControls({ value, onChange, disabled = false }) {
|
|
70
70
|
const hasDecimalPlaces = (0, _core.isUnitWithDecimalPlaces)(value);
|
|
71
71
|
const hasShortValues = (0, _core.isUnitWithShortValues)(value);
|
|
72
72
|
const handleKindChange = (_, newValue)=>{
|
|
@@ -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
|
})
|