@perses-dev/components 0.0.0-snapshot-scatterplot-fix-imports-95e1b59 → 0.0.0-snapshot-histogram-types-78c5104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlignSelector/AlignSelector.d.ts +9 -0
- package/dist/AlignSelector/AlignSelector.d.ts.map +1 -0
- package/dist/AlignSelector/AlignSelector.js +42 -0
- package/dist/AlignSelector/AlignSelector.js.map +1 -0
- package/dist/AlignSelector/index.d.ts +2 -0
- package/dist/AlignSelector/index.d.ts.map +1 -0
- package/dist/AlignSelector/index.js +15 -0
- package/dist/AlignSelector/index.js.map +1 -0
- package/dist/BarChart/BarChart.d.ts +2 -1
- package/dist/BarChart/BarChart.d.ts.map +1 -1
- package/dist/BarChart/BarChart.js +11 -6
- package/dist/BarChart/BarChart.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.d.ts +3 -1
- package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/ColorPicker/ColorPicker.js +28 -13
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.d.ts +9 -0
- package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -0
- package/dist/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +16 -13
- package/dist/ColorPicker/OptionsColorPicker.js.map +1 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.d.ts.map +1 -1
- package/dist/ColorPicker/index.js +1 -0
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts +2 -1
- package/dist/ContentWithLegend/ContentWithLegend.d.ts.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +8 -5
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +2 -3
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DensitySelector/DensitySelector.d.ts +8 -0
- package/dist/DensitySelector/DensitySelector.d.ts.map +1 -0
- package/dist/DensitySelector/DensitySelector.js +46 -0
- package/dist/DensitySelector/DensitySelector.js.map +1 -0
- package/dist/DensitySelector/index.d.ts +2 -0
- package/dist/DensitySelector/index.d.ts.map +1 -0
- package/dist/DensitySelector/index.js +15 -0
- package/dist/DensitySelector/index.js.map +1 -0
- package/dist/Dialog/Dialog.d.ts +9 -14
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +7 -3
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts +2 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.d.ts.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/DragAndDrop/DragAndDropList.d.ts +24 -0
- package/dist/DragAndDrop/DragAndDropList.d.ts.map +1 -0
- package/dist/DragAndDrop/DragAndDropList.js +153 -0
- package/dist/DragAndDrop/DragAndDropList.js.map +1 -0
- package/dist/DragAndDrop/DragButton.d.ts +13 -0
- package/dist/DragAndDrop/DragButton.d.ts.map +1 -0
- package/dist/DragAndDrop/DragButton.js +99 -0
- package/dist/DragAndDrop/DragButton.js.map +1 -0
- package/dist/DragAndDrop/DropIndicator.d.ts +3 -0
- package/dist/DragAndDrop/DropIndicator.d.ts.map +1 -0
- package/dist/DragAndDrop/DropIndicator.js +44 -0
- package/dist/DragAndDrop/DropIndicator.js.map +1 -0
- package/dist/DragAndDrop/index.d.ts +4 -0
- package/dist/DragAndDrop/index.d.ts.map +1 -0
- package/dist/DragAndDrop/index.js +17 -0
- package/dist/DragAndDrop/index.js.map +1 -0
- package/dist/DragAndDrop/model.d.ts +11 -0
- package/dist/DragAndDrop/model.d.ts.map +1 -0
- package/dist/DragAndDrop/model.js +17 -0
- package/dist/DragAndDrop/model.js.map +1 -0
- package/dist/Drawer/Drawer.d.ts +2 -1
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/EChart/EChart.d.ts +3 -2
- package/dist/EChart/EChart.d.ts.map +1 -1
- package/dist/EChart/EChart.js +26 -9
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/ErrorAlert.d.ts +2 -1
- package/dist/ErrorAlert.d.ts.map +1 -1
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.d.ts +2 -1
- package/dist/FontSizeSelector/FontSizeSelector.d.ts.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
- package/dist/FormEditor/FormActions.d.ts +16 -0
- package/dist/FormEditor/FormActions.d.ts.map +1 -0
- package/dist/FormEditor/FormActions.js +75 -0
- package/dist/FormEditor/FormActions.js.map +1 -0
- package/dist/FormEditor/index.d.ts +2 -0
- package/dist/FormEditor/index.d.ts.map +1 -0
- package/dist/FormEditor/index.js +15 -0
- package/dist/FormEditor/index.js.map +1 -0
- package/dist/FormatControls/FormatControls.d.ts +2 -1
- package/dist/FormatControls/FormatControls.d.ts.map +1 -1
- package/dist/FormatControls/FormatControls.js +2 -2
- package/dist/FormatControls/FormatControls.js.map +1 -1
- package/dist/GaugeChart/GaugeChart.d.ts +2 -1
- package/dist/GaugeChart/GaugeChart.d.ts.map +1 -1
- package/dist/GaugeChart/GaugeChart.js +4 -7
- package/dist/GaugeChart/GaugeChart.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.d.ts +3 -3
- package/dist/InfoTooltip/InfoTooltip.d.ts.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +5 -5
- 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 +5 -6
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.d.ts +2 -1
- package/dist/Legend/CompactLegend.d.ts.map +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.d.ts +2 -1
- package/dist/Legend/Legend.d.ts.map +1 -1
- package/dist/Legend/Legend.js +8 -4
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/LegendColorBadge.d.ts +2 -2
- package/dist/Legend/LegendColorBadge.d.ts.map +1 -1
- package/dist/Legend/LegendColorBadge.js +2 -2
- package/dist/Legend/LegendColorBadge.js.map +1 -1
- package/dist/Legend/ListLegend.d.ts +2 -1
- package/dist/Legend/ListLegend.d.ts.map +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts +5 -5
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +8 -12
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.d.ts +2 -1
- package/dist/Legend/TableLegend.d.ts.map +1 -1
- package/dist/Legend/TableLegend.js +1 -0
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/Legend/legend-model.d.ts.map +1 -1
- package/dist/Legend/legend-model.js.map +1 -1
- package/dist/LineChart/LineChart.d.ts +1 -1
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +6 -11
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/LinksEditor/LinksEditor.d.ts +8 -0
- package/dist/LinksEditor/LinksEditor.d.ts.map +1 -0
- package/dist/LinksEditor/LinksEditor.js +161 -0
- package/dist/LinksEditor/LinksEditor.js.map +1 -0
- package/dist/LinksEditor/index.d.ts +2 -0
- package/dist/LinksEditor/index.d.ts.map +1 -0
- package/dist/LinksEditor/index.js +15 -0
- package/dist/LinksEditor/index.js.map +1 -0
- package/dist/ModeSelector/ModeSelector.d.ts +2 -1
- package/dist/ModeSelector/ModeSelector.d.ts.map +1 -1
- package/dist/ModeSelector/ModeSelector.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts +2 -2
- package/dist/OptionsEditorLayout/OptionsEditorColumn.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts +2 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts +2 -2
- package/dist/OptionsEditorLayout/OptionsEditorGrid.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts +2 -2
- package/dist/OptionsEditorLayout/OptionsEditorGroup.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
- package/dist/Overlay/Overlay.d.ts +16 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -0
- package/dist/Overlay/Overlay.js +52 -0
- package/dist/Overlay/Overlay.js.map +1 -0
- package/dist/Overlay/index.d.ts +2 -0
- package/dist/Overlay/index.d.ts.map +1 -0
- package/dist/Overlay/index.js +15 -0
- package/dist/Overlay/index.js.map +1 -0
- package/dist/PieChart/PieChart.d.ts +14 -0
- package/dist/PieChart/PieChart.d.ts.map +1 -0
- package/dist/PieChart/PieChart.js +92 -0
- package/dist/PieChart/PieChart.js.map +1 -0
- package/dist/PieChart/index.d.ts +2 -0
- package/dist/PieChart/index.d.ts.map +1 -0
- package/dist/PieChart/index.js +15 -0
- package/dist/PieChart/index.js.map +1 -0
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts +2 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.d.ts.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +2 -2
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js +6 -5
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SortSelector/SortSelector.d.ts +2 -1
- package/dist/SortSelector/SortSelector.d.ts.map +1 -1
- package/dist/SortSelector/SortSelector.js.map +1 -1
- package/dist/SortSelector/SortSelectorButtons.d.ts +9 -0
- package/dist/SortSelector/SortSelectorButtons.d.ts.map +1 -0
- package/dist/SortSelector/SortSelectorButtons.js +42 -0
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -0
- package/dist/SortSelector/index.d.ts +1 -0
- package/dist/SortSelector/index.d.ts.map +1 -1
- package/dist/SortSelector/index.js +2 -1
- package/dist/SortSelector/index.js.map +1 -1
- package/dist/StatChart/StatChart.d.ts +6 -5
- package/dist/StatChart/StatChart.d.ts.map +1 -1
- package/dist/StatChart/StatChart.js +16 -18
- package/dist/StatChart/StatChart.js.map +1 -1
- package/dist/StatChart/calculateFontSize.d.ts.map +1 -1
- package/dist/StatChart/calculateFontSize.js +2 -4
- package/dist/StatChart/calculateFontSize.js.map +1 -1
- package/dist/StatChart/utils/formatStatChartValue.d.ts +3 -0
- package/dist/StatChart/utils/formatStatChartValue.d.ts.map +1 -0
- package/dist/StatChart/utils/formatStatChartValue.js +26 -0
- package/dist/StatChart/utils/formatStatChartValue.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts +27 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js +132 -0
- package/dist/StatusHistoryChart/StatusHistoryChart.js.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts +13 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.d.ts.map +1 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.js +47 -0
- package/dist/StatusHistoryChart/StatusHistoryTooltip.js.map +1 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts +2 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.d.ts.map +1 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.js +41 -0
- package/dist/StatusHistoryChart/get-formatted-axis-label.js.map +1 -0
- package/dist/StatusHistoryChart/index.d.ts +3 -0
- package/dist/StatusHistoryChart/index.d.ts.map +1 -0
- package/dist/StatusHistoryChart/index.js +16 -0
- package/dist/StatusHistoryChart/index.js.map +1 -0
- package/dist/StatusHistoryChart/utils/get-color.d.ts +6 -0
- package/dist/StatusHistoryChart/utils/get-color.d.ts.map +1 -0
- package/dist/StatusHistoryChart/utils/get-color.js +100 -0
- package/dist/StatusHistoryChart/utils/get-color.js.map +1 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts +3 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.d.ts.map +1 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.js +27 -0
- package/dist/StatusHistoryChart/utils/get-tooltip-position.js.map +1 -0
- package/dist/Table/InnerTable.d.ts.map +1 -1
- package/dist/Table/InnerTable.js +2 -1
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +2 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +23 -10
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableCell.d.ts +5 -2
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +31 -7
- 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/TableFoot.d.ts +4 -0
- package/dist/Table/TableFoot.d.ts.map +1 -0
- package/dist/Table/TableFoot.js +23 -0
- package/dist/Table/TableFoot.js.map +1 -0
- package/dist/Table/TableHeaderCell.d.ts +3 -2
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts +6 -4
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +49 -15
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.d.ts +2 -2
- package/dist/Table/hooks/useTableKeyboardNav.d.ts.map +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.js +1 -1
- package/dist/Table/hooks/useTableKeyboardNav.js.map +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts +10 -12
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.d.ts.map +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js +7 -13
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -1
- package/dist/Table/index.d.ts +1 -2
- package/dist/Table/index.d.ts.map +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/model/table-model.d.ts +40 -4
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +31 -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 +2 -2
- package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts +2 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.d.ts.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js +19 -27
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/TimeChart/TimeChart.d.ts.map +1 -1
- package/dist/TimeChart/TimeChart.js +9 -12
- 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 +6 -14
- package/dist/TimeSeriesTooltip/LineChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -2
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts +2 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +2 -2
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js +2 -6
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts +2 -1
- package/dist/TimeSeriesTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js +6 -14
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +15 -25
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts +8 -1
- package/dist/TimeSeriesTooltip/tooltip-model.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +13 -2
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.d.ts +2 -22
- package/dist/TimeSeriesTooltip/utils.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +29 -27
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/TransformsEditor/TransformEditor.d.ts +9 -0
- package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformEditor.js +289 -0
- package/dist/TransformsEditor/TransformEditor.js.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.d.ts +10 -0
- package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformEditorContainer.js +118 -0
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.d.ts +9 -0
- package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -0
- package/dist/TransformsEditor/TransformsEditor.js +90 -0
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
- package/dist/TransformsEditor/index.d.ts +2 -0
- package/dist/TransformsEditor/index.d.ts.map +1 -0
- package/dist/TransformsEditor/index.js +15 -0
- package/dist/TransformsEditor/index.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.d.ts +10 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.d.ts.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.js +374 -0
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts +8 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.d.ts.map +1 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js +118 -0
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
- package/dist/ValueMappingEditor/index.d.ts +2 -0
- package/dist/ValueMappingEditor/index.d.ts.map +1 -0
- package/dist/ValueMappingEditor/index.js +15 -0
- package/dist/ValueMappingEditor/index.js.map +1 -0
- package/dist/YAxisLabel.d.ts +2 -1
- package/dist/YAxisLabel.d.ts.map +1 -1
- package/dist/YAxisLabel.js +4 -2
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/AlignSelector/AlignSelector.js +50 -0
- package/dist/cjs/AlignSelector/index.js +30 -0
- package/dist/cjs/BarChart/BarChart.js +12 -7
- package/dist/cjs/ColorPicker/ColorPicker.js +28 -54
- package/dist/cjs/{ThresholdsEditor/ThresholdColorPicker.js → ColorPicker/OptionsColorPicker.js} +18 -15
- package/dist/cjs/ColorPicker/index.js +1 -0
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +8 -10
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +2 -3
- package/dist/cjs/DensitySelector/DensitySelector.js +54 -0
- package/dist/cjs/DensitySelector/index.js +30 -0
- package/dist/cjs/Dialog/Dialog.js +7 -3
- package/dist/cjs/DragAndDrop/DragAndDropList.js +159 -0
- package/dist/cjs/DragAndDrop/DragButton.js +123 -0
- package/dist/cjs/DragAndDrop/DropIndicator.js +52 -0
- package/dist/cjs/DragAndDrop/index.js +32 -0
- package/dist/cjs/DragAndDrop/model.js +25 -0
- package/dist/cjs/Drawer/Drawer.js +1 -1
- package/dist/cjs/EChart/EChart.js +25 -49
- package/dist/cjs/FormEditor/FormActions.js +83 -0
- package/dist/cjs/FormEditor/index.js +30 -0
- package/dist/cjs/FormatControls/FormatControls.js +2 -2
- package/dist/cjs/GaugeChart/GaugeChart.js +5 -8
- package/dist/cjs/InfoTooltip/InfoTooltip.js +5 -10
- package/dist/cjs/JSONEditor.js +4 -5
- package/dist/cjs/Legend/Legend.js +8 -4
- package/dist/cjs/Legend/LegendColorBadge.js +2 -7
- package/dist/cjs/Legend/ListLegendItem.js +6 -50
- package/dist/cjs/Legend/TableLegend.js +1 -0
- package/dist/cjs/LineChart/LineChart.js +8 -13
- package/dist/cjs/LinksEditor/LinksEditor.js +174 -0
- package/dist/cjs/LinksEditor/index.js +30 -0
- package/dist/cjs/Overlay/Overlay.js +71 -0
- package/dist/cjs/Overlay/index.js +30 -0
- package/dist/cjs/PieChart/PieChart.js +100 -0
- package/dist/cjs/PieChart/index.js +30 -0
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +6 -5
- package/dist/cjs/SortSelector/SortSelectorButtons.js +50 -0
- package/dist/cjs/SortSelector/index.js +2 -1
- package/dist/cjs/StatChart/StatChart.js +19 -21
- package/dist/cjs/StatChart/calculateFontSize.js +2 -4
- package/dist/cjs/StatChart/utils/formatStatChartValue.js +34 -0
- package/dist/cjs/StatusHistoryChart/StatusHistoryChart.js +140 -0
- package/dist/cjs/StatusHistoryChart/StatusHistoryTooltip.js +55 -0
- package/dist/cjs/StatusHistoryChart/get-formatted-axis-label.js +48 -0
- package/dist/cjs/StatusHistoryChart/index.js +31 -0
- package/dist/cjs/StatusHistoryChart/utils/get-color.js +125 -0
- package/dist/cjs/StatusHistoryChart/utils/get-tooltip-position.js +35 -0
- package/dist/cjs/Table/InnerTable.js +2 -1
- package/dist/cjs/Table/Table.js +21 -8
- package/dist/cjs/Table/TableCell.js +31 -7
- package/dist/cjs/Table/TableFoot.js +31 -0
- package/dist/cjs/Table/VirtualizedTable.js +48 -14
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +7 -13
- package/dist/cjs/Table/index.js +1 -7
- package/dist/cjs/Table/model/table-model.js +37 -23
- package/dist/cjs/ThresholdsEditor/ThresholdInput.js +2 -2
- package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +27 -35
- package/dist/cjs/TimeChart/TimeChart.js +8 -11
- package/dist/cjs/{DateTimeRangePicker/AbsoluteTimePicker.js → TimeRangeSelector/DateTimeRangePicker.js} +39 -32
- package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +127 -0
- package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/index.js +2 -3
- package/dist/cjs/{DateTimeRangePicker → TimeRangeSelector}/utils.js +24 -1
- package/dist/cjs/TimeSeriesTooltip/LineChartTooltip.js +5 -13
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -2
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +1 -5
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +6 -14
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +15 -25
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +22 -2
- package/dist/cjs/TimeSeriesTooltip/utils.js +28 -26
- package/dist/cjs/TransformsEditor/TransformEditor.js +297 -0
- package/dist/cjs/TransformsEditor/TransformEditorContainer.js +131 -0
- package/dist/cjs/TransformsEditor/TransformsEditor.js +103 -0
- package/dist/cjs/TransformsEditor/index.js +30 -0
- package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +387 -0
- package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +131 -0
- package/dist/cjs/ValueMappingEditor/index.js +30 -0
- package/dist/cjs/YAxisLabel.js +4 -2
- package/dist/cjs/context/TimeZoneProvider.js +1 -1
- package/dist/cjs/controls/TextField.js +54 -0
- package/dist/cjs/controls/index.js +30 -0
- package/dist/cjs/index.js +12 -1
- package/dist/cjs/model/timeOption.js +19 -1
- package/dist/cjs/theme/index.js +1 -0
- package/dist/cjs/theme/palette/background.js +2 -0
- package/dist/cjs/theme/theme.js +6 -6
- package/dist/cjs/utils/chart-actions.js +2 -3
- package/dist/cjs/utils/format.js +19 -1
- package/dist/cjs/utils/theme-gen.js +5 -7
- package/dist/context/ChartsProvider.d.ts +2 -2
- package/dist/context/ChartsProvider.d.ts.map +1 -1
- package/dist/context/ChartsProvider.js.map +1 -1
- package/dist/context/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 +1 -1
- package/dist/context/TimeZoneProvider.js.map +1 -1
- package/dist/controls/TextField.d.ts +9 -0
- package/dist/controls/TextField.d.ts.map +1 -0
- package/dist/controls/TextField.js +41 -0
- package/dist/controls/TextField.js.map +1 -0
- package/dist/controls/index.d.ts +2 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +15 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/model/timeOption.d.ts +2 -1
- package/dist/model/timeOption.d.ts.map +1 -1
- package/dist/model/timeOption.js +13 -2
- package/dist/model/timeOption.js.map +1 -1
- package/dist/test/render.d.ts +3 -3
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/theme/component-overrides/alert.js.map +1 -1
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette/background.d.ts.map +1 -1
- package/dist/theme/palette/background.js +2 -0
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/theme.d.ts.map +1 -1
- package/dist/theme/theme.js +5 -5
- package/dist/theme/theme.js.map +1 -1
- package/dist/utils/axis.d.ts +1 -7
- package/dist/utils/axis.d.ts.map +1 -1
- package/dist/utils/axis.js.map +1 -1
- package/dist/utils/chart-actions.d.ts.map +1 -1
- package/dist/utils/chart-actions.js +2 -3
- package/dist/utils/chart-actions.js.map +1 -1
- package/dist/utils/component-ids.d.ts.map +1 -1
- package/dist/utils/component-ids.js.map +1 -1
- package/dist/utils/format.d.ts +10 -4
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +16 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/theme-gen.js +5 -7
- package/dist/utils/theme-gen.js.map +1 -1
- package/package.json +14 -13
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts +0 -9
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/AbsoluteTimePicker.js.map +0 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +0 -11
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +0 -80
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js.map +0 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts +0 -13
- package/dist/DateTimeRangePicker/TimeRangeSelector.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/TimeRangeSelector.js +0 -67
- package/dist/DateTimeRangePicker/TimeRangeSelector.js.map +0 -1
- package/dist/DateTimeRangePicker/index.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/index.js.map +0 -1
- package/dist/DateTimeRangePicker/utils.d.ts +0 -7
- package/dist/DateTimeRangePicker/utils.d.ts.map +0 -1
- package/dist/DateTimeRangePicker/utils.js.map +0 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts +0 -3
- package/dist/ThresholdsEditor/ThresholdColorPicker.d.ts.map +0 -1
- package/dist/ThresholdsEditor/ThresholdColorPicker.js.map +0 -1
- package/dist/cjs/DateTimeRangePicker/DateTimeRangePicker.js +0 -88
- package/dist/cjs/DateTimeRangePicker/TimeRangeSelector.js +0 -80
|
@@ -0,0 +1,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
|
+
FALLBACK_COLOR: function() {
|
|
25
|
+
return FALLBACK_COLOR;
|
|
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 FALLBACK_COLOR = '#1f77b4';
|
|
41
|
+
function getColorForValue(value, baseColor) {
|
|
42
|
+
// Validate base color
|
|
43
|
+
if (!baseColor.match(/^#[0-9A-Fa-f]{6}$/)) {
|
|
44
|
+
baseColor = FALLBACK_COLOR;
|
|
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 FALLBACK_COLOR;
|
|
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] || FALLBACK_COLOR;
|
|
81
|
+
}
|
|
82
|
+
return getColorForValue(value, themeColors[0] || FALLBACK_COLOR);
|
|
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
|
+
};
|
|
@@ -31,7 +31,8 @@ const StyledMuiTable = (0, _material.styled)(_material.Table)(({ theme })=>({
|
|
|
31
31
|
}));
|
|
32
32
|
const TABLE_DENSITY_CONFIG = {
|
|
33
33
|
compact: 'small',
|
|
34
|
-
standard: 'medium'
|
|
34
|
+
standard: 'medium',
|
|
35
|
+
comfortable: 'medium'
|
|
35
36
|
};
|
|
36
37
|
const InnerTable = /*#__PURE__*/ (0, _react.forwardRef)(function InnerTable({ density, ...otherProps }, ref) {
|
|
37
38
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledMuiTable, {
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -35,11 +35,11 @@ const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
|
35
35
|
// does not do deep equality checking for objects and arrays.
|
|
36
36
|
const DEFAULT_ROW_SELECTION = {};
|
|
37
37
|
const DEFAULT_SORTING = [];
|
|
38
|
-
function Table({ data, columns, density = 'standard', checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, rowSelectionVariant = 'standard', ...otherProps }) {
|
|
38
|
+
function Table({ data, columns, cellConfigs, density = 'standard', defaultColumnWidth = _tablemodel.DEFAULT_COLUMN_WIDTH, defaultColumnHeight = 'auto', checkboxSelection, onRowSelectionChange, onSortingChange, getCheckboxColor, getRowId = DEFAULT_GET_ROW_ID, rowSelection = DEFAULT_ROW_SELECTION, sorting = DEFAULT_SORTING, pagination, onPaginationChange, rowSelectionVariant = 'standard', ...otherProps }) {
|
|
39
39
|
const theme = (0, _material.useTheme)();
|
|
40
40
|
const handleRowSelectionChange = (rowSelectionUpdater)=>{
|
|
41
41
|
const newRowSelection = typeof rowSelectionUpdater === 'function' ? rowSelectionUpdater(rowSelection) : rowSelectionUpdater;
|
|
42
|
-
onRowSelectionChange
|
|
42
|
+
onRowSelectionChange?.(newRowSelection);
|
|
43
43
|
};
|
|
44
44
|
const handleRowSelectionEvent = (0, _react.useCallback)((table, row, isModified)=>{
|
|
45
45
|
if (rowSelectionVariant === 'standard' || isModified) {
|
|
@@ -53,7 +53,7 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
53
53
|
table.toggleAllRowsSelected();
|
|
54
54
|
} else {
|
|
55
55
|
// Focus the selected row.
|
|
56
|
-
onRowSelectionChange
|
|
56
|
+
onRowSelectionChange?.({
|
|
57
57
|
[row.id]: true
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -64,14 +64,14 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
64
64
|
]);
|
|
65
65
|
const handleCheckboxChange = (0, _react.useCallback)((e, table, row)=>{
|
|
66
66
|
const nativePointerEvent = e.nativeEvent && (e.nativeEvent instanceof MouseEvent || e.nativeEvent instanceof KeyboardEvent) ? e.nativeEvent : undefined;
|
|
67
|
-
const isModifed = !!
|
|
67
|
+
const isModifed = !!nativePointerEvent?.metaKey || !!nativePointerEvent?.shiftKey;
|
|
68
68
|
handleRowSelectionEvent(table, row, isModifed);
|
|
69
69
|
}, [
|
|
70
70
|
handleRowSelectionEvent
|
|
71
71
|
]);
|
|
72
72
|
const handleSortingChange = (sortingUpdater)=>{
|
|
73
73
|
const newSorting = typeof sortingUpdater === 'function' ? sortingUpdater(sorting) : sortingUpdater;
|
|
74
|
-
onSortingChange
|
|
74
|
+
onSortingChange?.(newSorting);
|
|
75
75
|
};
|
|
76
76
|
const checkboxColumn = (0, _react.useMemo)(()=>{
|
|
77
77
|
return {
|
|
@@ -93,7 +93,7 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
93
93
|
onChange: (e)=>{
|
|
94
94
|
handleCheckboxChange(e, table, row);
|
|
95
95
|
},
|
|
96
|
-
color: getCheckboxColor
|
|
96
|
+
color: getCheckboxColor?.(row.original),
|
|
97
97
|
density: density
|
|
98
98
|
});
|
|
99
99
|
},
|
|
@@ -122,6 +122,10 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
122
122
|
getRowId,
|
|
123
123
|
getCoreRowModel: (0, _reacttable.getCoreRowModel)(),
|
|
124
124
|
getSortedRowModel: (0, _reacttable.getSortedRowModel)(),
|
|
125
|
+
getPaginationRowModel: pagination ? (0, _reacttable.getPaginationRowModel)() : undefined,
|
|
126
|
+
// without this setting, the getPaginationRowModel setting persists and it is not possible to switch from paginated to unpaginated
|
|
127
|
+
// can be removed once https://github.com/TanStack/table/pull/5974 is merged
|
|
128
|
+
manualPagination: !pagination,
|
|
125
129
|
enableRowSelection: !!checkboxSelection,
|
|
126
130
|
onRowSelectionChange: handleRowSelectionChange,
|
|
127
131
|
onSortingChange: handleSortingChange,
|
|
@@ -130,7 +134,10 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
130
134
|
sortDescFirst: true,
|
|
131
135
|
state: {
|
|
132
136
|
rowSelection,
|
|
133
|
-
sorting
|
|
137
|
+
sorting,
|
|
138
|
+
...pagination ? {
|
|
139
|
+
pagination
|
|
140
|
+
} : {}
|
|
134
141
|
}
|
|
135
142
|
});
|
|
136
143
|
const handleRowClick = (0, _react.useCallback)((e, rowId)=>{
|
|
@@ -144,9 +151,15 @@ function Table({ data, columns, density = 'standard', checkboxSelection, onRowSe
|
|
|
144
151
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_VirtualizedTable.VirtualizedTable, {
|
|
145
152
|
...otherProps,
|
|
146
153
|
density: density,
|
|
154
|
+
defaultColumnWidth: defaultColumnWidth,
|
|
155
|
+
defaultColumnHeight: defaultColumnHeight,
|
|
147
156
|
onRowClick: handleRowClick,
|
|
148
157
|
rows: table.getRowModel().rows,
|
|
149
158
|
columns: table.getAllFlatColumns(),
|
|
150
|
-
headers: table.getHeaderGroups()
|
|
159
|
+
headers: table.getHeaderGroups(),
|
|
160
|
+
cellConfigs: cellConfigs,
|
|
161
|
+
pagination: pagination,
|
|
162
|
+
onPaginationChange: onPaginationChange,
|
|
163
|
+
rowCount: table.getRowCount()
|
|
151
164
|
});
|
|
152
165
|
}
|
|
@@ -39,7 +39,7 @@ const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme }
|
|
|
39
39
|
borderRadius: 0
|
|
40
40
|
}
|
|
41
41
|
}));
|
|
42
|
-
function TableCell({ children, density, variant, width, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, ...otherProps }) {
|
|
42
|
+
function TableCell({ children, density, variant, width, defaultColumnHeight, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, align, color, backgroundColor, ...otherProps }) {
|
|
43
43
|
const theme = (0, _material.useTheme)();
|
|
44
44
|
const elRef = (0, _react.useRef)();
|
|
45
45
|
const isHeader = variant === 'head';
|
|
@@ -51,9 +51,8 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
51
51
|
focusState
|
|
52
52
|
]);
|
|
53
53
|
const handleFocus = (e)=>{
|
|
54
|
-
var _e_currentTarget;
|
|
55
54
|
// From https://zellwk.com/blog/keyboard-focusable-elements/
|
|
56
|
-
const nestedFocusTarget =
|
|
55
|
+
const nestedFocusTarget = e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');
|
|
57
56
|
if (nestedFocusTarget) {
|
|
58
57
|
// If the cell has a focusable child, focus it instead. Mostly used for
|
|
59
58
|
// checkbox cells, but could have other uses.
|
|
@@ -66,7 +65,7 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
66
65
|
// plays with the triggering of focus with keyboard interactions.
|
|
67
66
|
// These report that a focus event happened, so we can adjust the current
|
|
68
67
|
// tabindex and focuses to the right cell.
|
|
69
|
-
onFocusTrigger
|
|
68
|
+
onFocusTrigger?.(e);
|
|
70
69
|
};
|
|
71
70
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledMuiTableCell, {
|
|
72
71
|
...otherProps,
|
|
@@ -78,16 +77,35 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
78
77
|
onFocus: handleFocus,
|
|
79
78
|
onClick: handleInteractionFocusTrigger,
|
|
80
79
|
onKeyUp: handleInteractionFocusTrigger,
|
|
80
|
+
style: {
|
|
81
|
+
width: width
|
|
82
|
+
},
|
|
81
83
|
sx: {
|
|
82
|
-
|
|
83
|
-
borderBottom: isHeader ?
|
|
84
|
+
position: 'relative',
|
|
85
|
+
borderBottom: isHeader ? `solid 1px ${theme.palette.grey[100]}` : `solid 1px ${theme.palette.grey[50]}`,
|
|
86
|
+
'&:hover #original-cell': {
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
top: 0,
|
|
89
|
+
left: 0,
|
|
90
|
+
zIndex: 10,
|
|
91
|
+
width: 'fit-content',
|
|
92
|
+
minWidth: '100%',
|
|
93
|
+
whiteSpace: 'nowrap',
|
|
94
|
+
overflow: 'visible',
|
|
95
|
+
backgroundColor: `${backgroundColor ?? theme.palette.background.default} !important`,
|
|
96
|
+
outline: `solid 1px ${theme.palette.info.main}`,
|
|
97
|
+
outlineOffset: '-1px'
|
|
98
|
+
}
|
|
84
99
|
},
|
|
85
100
|
ref: elRef,
|
|
86
101
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
102
|
+
id: "original-cell",
|
|
87
103
|
sx: {
|
|
88
104
|
...(0, _tablemodel.getTableCellLayout)(theme, density, {
|
|
105
|
+
isHeader,
|
|
89
106
|
isLastColumn,
|
|
90
|
-
isFirstColumn
|
|
107
|
+
isFirstColumn,
|
|
108
|
+
defaultColumnHeight
|
|
91
109
|
}),
|
|
92
110
|
position: 'relative',
|
|
93
111
|
// Text truncation. Currently enforced on all cells. We may control
|
|
@@ -100,7 +118,13 @@ function TableCell({ children, density, variant, width, focusState = 'none', onF
|
|
|
100
118
|
// in headers.
|
|
101
119
|
flexDirection: 'inherit'
|
|
102
120
|
},
|
|
121
|
+
style: {
|
|
122
|
+
backgroundColor: backgroundColor ?? 'inherit',
|
|
123
|
+
color: color ?? 'inherit'
|
|
124
|
+
},
|
|
103
125
|
title: description,
|
|
126
|
+
"aria-label": description,
|
|
127
|
+
textAlign: align,
|
|
104
128
|
children: children
|
|
105
129
|
})
|
|
106
130
|
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright 2025 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, "TableFoot", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return TableFoot;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
+
const _material = require("@mui/material");
|
|
25
|
+
const _react = require("react");
|
|
26
|
+
const TableFoot = /*#__PURE__*/ (0, _react.forwardRef)(function TableFoot(props, ref) {
|
|
27
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableFooter, {
|
|
28
|
+
...props,
|
|
29
|
+
ref: ref
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -33,7 +33,8 @@ const _TableHeaderCell = require("./TableHeaderCell");
|
|
|
33
33
|
const _TableCell = require("./TableCell");
|
|
34
34
|
const _VirtualizedTableContainer = require("./VirtualizedTableContainer");
|
|
35
35
|
const _useVirtualizedTableKeyboardNav = require("./hooks/useVirtualizedTableKeyboardNav");
|
|
36
|
-
|
|
36
|
+
const _TableFoot = require("./TableFoot");
|
|
37
|
+
function VirtualizedTable({ width, height, density, defaultColumnWidth, defaultColumnHeight, onRowClick, onRowMouseOver, onRowMouseOut, rows, columns, headers, cellConfigs, pagination, onPaginationChange, rowCount }) {
|
|
37
38
|
const virtuosoRef = (0, _react.useRef)(null);
|
|
38
39
|
// Use a ref for these values because they are only needed for keyboard
|
|
39
40
|
// focus interactions and setting them on state will lead to a significant
|
|
@@ -70,6 +71,7 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
70
71
|
});
|
|
71
72
|
},
|
|
72
73
|
TableHead: _TableHead.TableHead,
|
|
74
|
+
TableFoot: _TableFoot.TableFoot,
|
|
73
75
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
74
76
|
TableRow: ({ item, ...props })=>{
|
|
75
77
|
const index = props['data-index'];
|
|
@@ -86,10 +88,10 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
86
88
|
onClick: (e)=>onRowClick(e, row.id),
|
|
87
89
|
density: density,
|
|
88
90
|
onMouseOver: (e)=>{
|
|
89
|
-
onRowMouseOver
|
|
91
|
+
onRowMouseOver?.(e, rowEventOpts);
|
|
90
92
|
},
|
|
91
93
|
onMouseOut: (e)=>{
|
|
92
|
-
onRowMouseOut
|
|
94
|
+
onRowMouseOut?.(e, rowEventOpts);
|
|
93
95
|
}
|
|
94
96
|
});
|
|
95
97
|
},
|
|
@@ -104,8 +106,22 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
104
106
|
rows,
|
|
105
107
|
width
|
|
106
108
|
]);
|
|
109
|
+
const handleChangePage = (_event, newPage)=>{
|
|
110
|
+
if (!pagination || !onPaginationChange) return;
|
|
111
|
+
onPaginationChange({
|
|
112
|
+
...pagination,
|
|
113
|
+
pageIndex: newPage
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const handleChangeRowsPerPage = (event)=>{
|
|
117
|
+
if (!pagination || !onPaginationChange) return;
|
|
118
|
+
onPaginationChange({
|
|
119
|
+
pageIndex: 0,
|
|
120
|
+
pageSize: parseInt(event.target.value, 10)
|
|
121
|
+
});
|
|
122
|
+
};
|
|
107
123
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Box, {
|
|
108
|
-
|
|
124
|
+
style: {
|
|
109
125
|
width,
|
|
110
126
|
height
|
|
111
127
|
},
|
|
@@ -123,7 +139,6 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
123
139
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableRow.TableRow, {
|
|
124
140
|
density: density,
|
|
125
141
|
children: headerGroup.headers.map((header, i, headers)=>{
|
|
126
|
-
var _column_columnDef_meta, _column_columnDef_meta1;
|
|
127
142
|
const column = header.column;
|
|
128
143
|
const position = {
|
|
129
144
|
row: 0,
|
|
@@ -135,11 +150,12 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
135
150
|
onSort: column.getCanSort() ? column.getToggleSortingHandler() : undefined,
|
|
136
151
|
sortDirection: typeof isSorted === 'string' ? isSorted : undefined,
|
|
137
152
|
nextSortDirection: typeof nextSorting === 'string' ? nextSorting : undefined,
|
|
138
|
-
width: column.getSize() ||
|
|
139
|
-
|
|
153
|
+
width: column.getSize() || defaultColumnWidth,
|
|
154
|
+
defaultColumnHeight: defaultColumnHeight,
|
|
155
|
+
align: column.columnDef.meta?.align,
|
|
140
156
|
variant: "head",
|
|
141
157
|
density: density,
|
|
142
|
-
description:
|
|
158
|
+
description: column.columnDef.meta?.headerDescription,
|
|
143
159
|
focusState: getFocusState(position),
|
|
144
160
|
onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
|
|
145
161
|
isFirstColumn: i === 0,
|
|
@@ -151,6 +167,19 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
151
167
|
})
|
|
152
168
|
});
|
|
153
169
|
},
|
|
170
|
+
fixedFooterContent: pagination ? ()=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TableRow, {
|
|
171
|
+
sx: {
|
|
172
|
+
backgroundColor: (theme)=>theme.palette.background.default
|
|
173
|
+
},
|
|
174
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TablePagination, {
|
|
175
|
+
colSpan: columns.length,
|
|
176
|
+
count: rowCount,
|
|
177
|
+
page: pagination.pageIndex,
|
|
178
|
+
rowsPerPage: pagination.pageSize,
|
|
179
|
+
onPageChange: handleChangePage,
|
|
180
|
+
onRowsPerPageChange: handleChangeRowsPerPage
|
|
181
|
+
})
|
|
182
|
+
}) : undefined,
|
|
154
183
|
itemContent: (index)=>{
|
|
155
184
|
const row = rows[index];
|
|
156
185
|
if (!row) {
|
|
@@ -158,16 +187,16 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
158
187
|
}
|
|
159
188
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
160
189
|
children: row.getVisibleCells().map((cell, i, cells)=>{
|
|
161
|
-
var _cell_column_columnDef_meta, _cell_column_columnDef_meta1;
|
|
162
190
|
const position = {
|
|
163
191
|
// Add 1 to the row index because the header is row 0
|
|
164
192
|
row: index + 1,
|
|
165
193
|
column: i
|
|
166
194
|
};
|
|
167
195
|
const cellContext = cell.getContext();
|
|
196
|
+
const cellConfig = cellConfigs?.[cellContext.cell.id];
|
|
168
197
|
const cellRenderFn = cell.column.columnDef.cell;
|
|
169
|
-
const cellContent = typeof cellRenderFn
|
|
170
|
-
const cellDescriptionDef =
|
|
198
|
+
const cellContent = typeof cellRenderFn === 'function' ? cellRenderFn(cellContext) : null;
|
|
199
|
+
const cellDescriptionDef = cell.column.columnDef.meta?.cellDescription;
|
|
171
200
|
let description = undefined;
|
|
172
201
|
if (typeof cellDescriptionDef === 'function') {
|
|
173
202
|
// If the cell description is a function, set the value using
|
|
@@ -180,15 +209,20 @@ function VirtualizedTable({ width, height, density, onRowClick, onRowMouseOver,
|
|
|
180
209
|
description = cellContent;
|
|
181
210
|
}
|
|
182
211
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCell.TableCell, {
|
|
183
|
-
|
|
184
|
-
|
|
212
|
+
"data-testid": cell.id,
|
|
213
|
+
title: description || cellConfig?.text || cellContent,
|
|
214
|
+
width: cell.column.getSize() || defaultColumnWidth,
|
|
215
|
+
defaultColumnHeight: defaultColumnHeight,
|
|
216
|
+
align: cell.column.columnDef.meta?.align,
|
|
185
217
|
density: density,
|
|
186
218
|
focusState: getFocusState(position),
|
|
187
219
|
onFocusTrigger: ()=>keyboardNav.onCellFocus(position),
|
|
188
220
|
isFirstColumn: i === 0,
|
|
189
221
|
isLastColumn: i === cells.length - 1,
|
|
190
222
|
description: description,
|
|
191
|
-
|
|
223
|
+
color: cellConfig?.textColor ?? undefined,
|
|
224
|
+
backgroundColor: cellConfig?.backgroundColor ?? undefined,
|
|
225
|
+
children: cellConfig?.text || cellContent
|
|
192
226
|
}, cell.id);
|
|
193
227
|
})
|
|
194
228
|
});
|
|
@@ -78,7 +78,7 @@ function useTableKeyboardNav({ maxRows, maxColumns, onActiveCellChange }) {
|
|
|
78
78
|
column: nextColumn,
|
|
79
79
|
row: nextRow
|
|
80
80
|
};
|
|
81
|
-
const newPosition =
|
|
81
|
+
const newPosition = onActiveCellChange?.(e, curActiveCell, defaultNewPosition) || defaultNewPosition;
|
|
82
82
|
if (newPosition.row === curActiveCell.row && newPosition.column === curActiveCell.column) {
|
|
83
83
|
// Return original to avoid creating a new object if nothing
|
|
84
84
|
// changed.
|
|
@@ -28,14 +28,12 @@ function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, m
|
|
|
28
28
|
onActiveCellChange: (e, currentPosition, defaultNewPosition)=>{
|
|
29
29
|
const key = e.key;
|
|
30
30
|
const defaultValueChanged = defaultNewPosition && (currentPosition.column !== defaultNewPosition.column || currentPosition.row !== defaultNewPosition.row);
|
|
31
|
-
|
|
32
|
-
const nextRow = (_defaultNewPosition_row = defaultNewPosition === null || defaultNewPosition === void 0 ? void 0 : defaultNewPosition.row) !== null && _defaultNewPosition_row !== void 0 ? _defaultNewPosition_row : currentPosition.row;
|
|
31
|
+
const nextRow = defaultNewPosition?.row ?? currentPosition.row;
|
|
33
32
|
if (key === 'ArrowDown' && defaultValueChanged) {
|
|
34
33
|
// Use default cell position. Shift the virtual table scroll position
|
|
35
34
|
// when needed to make the active cell visible.
|
|
36
35
|
if (nextRow - 1 < visibleRange.current.startIndex || nextRow - 1 > visibleRange.current.endIndex) {
|
|
37
|
-
|
|
38
|
-
(_virtualTable_current = virtualTable.current) === null || _virtualTable_current === void 0 ? void 0 : _virtualTable_current.scrollToIndex({
|
|
36
|
+
virtualTable.current?.scrollToIndex({
|
|
39
37
|
index: nextRow - 1,
|
|
40
38
|
align: 'end'
|
|
41
39
|
});
|
|
@@ -44,28 +42,25 @@ function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, m
|
|
|
44
42
|
// Use default cell position. Shift the virtual table scroll position
|
|
45
43
|
// when needed to make the active cell visible.
|
|
46
44
|
if (nextRow - 1 < visibleRange.current.startIndex || nextRow - 1 > visibleRange.current.endIndex) {
|
|
47
|
-
|
|
48
|
-
(_virtualTable_current1 = virtualTable.current) === null || _virtualTable_current1 === void 0 ? void 0 : _virtualTable_current1.scrollToIndex({
|
|
45
|
+
virtualTable.current?.scrollToIndex({
|
|
49
46
|
index: nextRow - 1,
|
|
50
47
|
align: 'start'
|
|
51
48
|
});
|
|
52
49
|
}
|
|
53
50
|
} else if (defaultValueChanged && (key === 'Home' || key === 'End')) {
|
|
54
|
-
|
|
51
|
+
// Use default cell position. Shift the virtual table scroll position
|
|
55
52
|
// when needed to make the active cell visible.
|
|
56
|
-
|
|
57
|
-
(_virtualTable_current2 = virtualTable.current) === null || _virtualTable_current2 === void 0 ? void 0 : _virtualTable_current2.scrollToIndex({
|
|
53
|
+
virtualTable.current?.scrollToIndex({
|
|
58
54
|
index: Math.max(nextRow - 1, 0),
|
|
59
55
|
align: 'start'
|
|
60
56
|
});
|
|
61
57
|
} else if (key === 'PageDown') {
|
|
62
|
-
var _virtualTable_current3;
|
|
63
58
|
// Full handling of logic for `PageDown` because there is no default.
|
|
64
59
|
e.preventDefault();
|
|
65
60
|
let nextRow = currentPosition.row;
|
|
66
61
|
// Add 1 to account for header
|
|
67
62
|
nextRow = Math.min(maxRows - 1, visibleRange.current.endIndex + 1);
|
|
68
|
-
|
|
63
|
+
virtualTable.current?.scrollToIndex({
|
|
69
64
|
index: nextRow - 1,
|
|
70
65
|
align: 'start'
|
|
71
66
|
});
|
|
@@ -74,12 +69,11 @@ function useVirtualizedTableKeyboardNav({ visibleRange, virtualTable, maxRows, m
|
|
|
74
69
|
column: currentPosition.column
|
|
75
70
|
};
|
|
76
71
|
} else if (key === 'PageUp') {
|
|
77
|
-
var _virtualTable_current4;
|
|
78
72
|
// Full handling of logic for `PageUp` because there is no default.
|
|
79
73
|
let nextRow = currentPosition.row;
|
|
80
74
|
// Minus 1 to account for header
|
|
81
75
|
nextRow = Math.max(0, visibleRange.current.startIndex - 1);
|
|
82
|
-
|
|
76
|
+
virtualTable.current?.scrollToIndex({
|
|
83
77
|
index: nextRow - 1,
|
|
84
78
|
align: 'end'
|
|
85
79
|
});
|
package/dist/cjs/Table/index.js
CHANGED
|
@@ -14,14 +14,8 @@
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", {
|
|
15
15
|
value: true
|
|
16
16
|
});
|
|
17
|
-
Object.defineProperty(exports, "getTableCellLayout", {
|
|
18
|
-
enumerable: true,
|
|
19
|
-
get: function() {
|
|
20
|
-
return _tablemodel.getTableCellLayout;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
17
|
_export_star(require("./Table"), exports);
|
|
24
|
-
|
|
18
|
+
_export_star(require("./model/table-model"), exports);
|
|
25
19
|
function _export_star(from, to) {
|
|
26
20
|
Object.keys(from).forEach(function(k) {
|
|
27
21
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|