@perses-dev/components 0.53.0-rc.0 → 0.53.0-rc.2
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.js +1 -1
- package/dist/AlignSelector/AlignSelector.js.map +1 -1
- package/dist/AlignSelector/index.js +1 -1
- package/dist/AlignSelector/index.js.map +1 -1
- package/dist/ColorPicker/ColorPicker.js +1 -1
- package/dist/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/ColorPicker/OptionsColorPicker.js +1 -1
- package/dist/ColorPicker/OptionsColorPicker.js.map +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.js.map +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js +1 -1
- package/dist/ContentWithLegend/ContentWithLegend.js.map +1 -1
- package/dist/ContentWithLegend/index.js +1 -1
- package/dist/ContentWithLegend/index.js.map +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js +1 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +1 -1
- package/dist/DensitySelector/DensitySelector.js +1 -1
- package/dist/DensitySelector/DensitySelector.js.map +1 -1
- package/dist/DensitySelector/index.js +1 -1
- package/dist/DensitySelector/index.js.map +1 -1
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/Dialog/Dialog.js.map +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js +1 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/Dialog/index.js +1 -1
- package/dist/Dialog/index.js.map +1 -1
- package/dist/DragAndDrop/DragAndDropList.js +1 -1
- package/dist/DragAndDrop/DragAndDropList.js.map +1 -1
- package/dist/DragAndDrop/DragButton.js +1 -1
- package/dist/DragAndDrop/DragButton.js.map +1 -1
- package/dist/DragAndDrop/DropIndicator.js +1 -1
- package/dist/DragAndDrop/DropIndicator.js.map +1 -1
- package/dist/DragAndDrop/index.js +1 -1
- package/dist/DragAndDrop/index.js.map +1 -1
- package/dist/DragAndDrop/model.js +1 -1
- package/dist/DragAndDrop/model.js.map +1 -1
- package/dist/Drawer/Drawer.js +1 -1
- package/dist/Drawer/Drawer.js.map +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/Drawer/index.js.map +1 -1
- package/dist/EChart/EChart.js +1 -1
- package/dist/EChart/EChart.js.map +1 -1
- package/dist/EChart/index.js +1 -1
- package/dist/EChart/index.js.map +1 -1
- package/dist/ErrorAlert.js +1 -1
- package/dist/ErrorAlert.js.map +1 -1
- package/dist/ErrorBoundary.js +1 -1
- package/dist/ErrorBoundary.js.map +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js +1 -1
- package/dist/FontSizeSelector/FontSizeSelector.js.map +1 -1
- package/dist/FontSizeSelector/index.js +1 -1
- package/dist/FontSizeSelector/index.js.map +1 -1
- package/dist/FormEditor/FormActions.js +1 -1
- package/dist/FormEditor/FormActions.js.map +1 -1
- package/dist/FormEditor/index.js +1 -1
- package/dist/FormEditor/index.js.map +1 -1
- package/dist/FormatControls/FormatControls.d.ts.map +1 -1
- package/dist/FormatControls/FormatControls.js +10 -23
- package/dist/FormatControls/FormatControls.js.map +1 -1
- package/dist/FormatControls/UnitSelector.d.ts +9 -0
- package/dist/FormatControls/UnitSelector.d.ts.map +1 -0
- package/dist/FormatControls/UnitSelector.js +47 -0
- package/dist/FormatControls/UnitSelector.js.map +1 -0
- package/dist/FormatControls/index.d.ts +1 -0
- package/dist/FormatControls/index.d.ts.map +1 -1
- package/dist/FormatControls/index.js +2 -1
- package/dist/FormatControls/index.js.map +1 -1
- package/dist/InfoTooltip/InfoTooltip.js +1 -1
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/InfoTooltip/index.js +1 -1
- package/dist/InfoTooltip/index.js.map +1 -1
- package/dist/JSONEditor.js +1 -1
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.js +1 -1
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/Legend.js +1 -1
- package/dist/Legend/Legend.js.map +1 -1
- package/dist/Legend/LegendColorBadge.js +1 -1
- package/dist/Legend/LegendColorBadge.js.map +1 -1
- package/dist/Legend/ListLegend.js +1 -1
- package/dist/Legend/ListLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.js +1 -1
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/Legend/TableLegend.js +1 -1
- package/dist/Legend/TableLegend.js.map +1 -1
- package/dist/Legend/index.js +1 -1
- package/dist/Legend/index.js.map +1 -1
- package/dist/Legend/legend-model.js +1 -1
- package/dist/Legend/legend-model.js.map +1 -1
- package/dist/LinksEditor/LinkEditorForm.js +1 -1
- package/dist/LinksEditor/LinkEditorForm.js.map +1 -1
- package/dist/LinksEditor/LinksEditor.js +1 -1
- package/dist/LinksEditor/LinksEditor.js.map +1 -1
- package/dist/LinksEditor/index.js +1 -1
- package/dist/LinksEditor/index.js.map +1 -1
- package/dist/ModeSelector/ModeSelector.js +1 -1
- package/dist/ModeSelector/ModeSelector.js.map +1 -1
- package/dist/ModeSelector/index.js +1 -1
- package/dist/ModeSelector/index.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.d.ts.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js +5 -2
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -1
- package/dist/OptionsEditorLayout/index.js +1 -1
- package/dist/OptionsEditorLayout/index.js.map +1 -1
- package/dist/Overlay/Overlay.js +1 -1
- package/dist/Overlay/Overlay.js.map +1 -1
- package/dist/Overlay/index.js +1 -1
- package/dist/Overlay/index.js.map +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -1
- package/dist/RefreshIntervalPicker/index.js +1 -1
- package/dist/RefreshIntervalPicker/index.js.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.d.ts.map +1 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js +16 -3
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -1
- package/dist/SettingsAutocomplete/index.js +1 -1
- package/dist/SettingsAutocomplete/index.js.map +1 -1
- package/dist/SortSelector/SortSelector.js +1 -1
- package/dist/SortSelector/SortSelector.js.map +1 -1
- package/dist/SortSelector/SortSelectorButtons.js +1 -1
- package/dist/SortSelector/SortSelectorButtons.js.map +1 -1
- package/dist/SortSelector/index.js +1 -1
- package/dist/SortSelector/index.js.map +1 -1
- package/dist/Table/InnerTable.js +1 -1
- package/dist/Table/InnerTable.js.map +1 -1
- package/dist/Table/Table.d.ts +1 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +31 -7
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.js +1 -1
- package/dist/Table/TableBody.js.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 +27 -5
- package/dist/Table/TableCell.js.map +1 -1
- package/dist/Table/TableCheckbox.js +1 -1
- package/dist/Table/TableCheckbox.js.map +1 -1
- package/dist/Table/TableFoot.js +1 -1
- package/dist/Table/TableFoot.js.map +1 -1
- package/dist/Table/TableHead.js +1 -1
- package/dist/Table/TableHead.js.map +1 -1
- package/dist/Table/TableHeaderCell.js +1 -1
- package/dist/Table/TableHeaderCell.js.map +1 -1
- package/dist/Table/TableRow.js +1 -1
- package/dist/Table/TableRow.js.map +1 -1
- package/dist/Table/VirtualizedTable.d.ts.map +1 -1
- package/dist/Table/VirtualizedTable.js +19 -3
- package/dist/Table/VirtualizedTable.js.map +1 -1
- package/dist/Table/VirtualizedTableContainer.js +1 -1
- package/dist/Table/VirtualizedTableContainer.js.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.js +1 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.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 +16 -6
- package/dist/Table/model/table-model.d.ts.map +1 -1
- package/dist/Table/model/table-model.js +4 -3
- package/dist/Table/model/table-model.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.js +1 -1
- package/dist/ThresholdsEditor/ThresholdInput.js.map +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js +1 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +1 -1
- package/dist/ThresholdsEditor/index.js +1 -1
- package/dist/ThresholdsEditor/index.js.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts +2 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.d.ts.map +1 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.js +21 -33
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +1 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts +6 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.d.ts.map +1 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.js +140 -19
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +1 -1
- package/dist/TimeRangeSelector/index.js +1 -1
- package/dist/TimeRangeSelector/index.js.map +1 -1
- package/dist/TimeRangeSelector/utils.js +1 -1
- package/dist/TimeRangeSelector/utils.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js +1 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts +4 -0
- package/dist/TimeSeriesTooltip/TimeChartTooltip.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js +3 -2
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js +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 -3
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +1 -1
- package/dist/TimeSeriesTooltip/index.js +1 -1
- package/dist/TimeSeriesTooltip/index.js.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.d.ts +3 -14
- package/dist/TimeSeriesTooltip/nearby-series.d.ts.map +1 -1
- package/dist/TimeSeriesTooltip/nearby-series.js +80 -58
- package/dist/TimeSeriesTooltip/nearby-series.js.map +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js +1 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +1 -1
- package/dist/TimeSeriesTooltip/utils.js +1 -1
- package/dist/TimeSeriesTooltip/utils.js.map +1 -1
- package/dist/TimeZoneSelector.d.ts +16 -0
- package/dist/TimeZoneSelector.d.ts.map +1 -0
- package/dist/TimeZoneSelector.js +58 -0
- package/dist/TimeZoneSelector.js.map +1 -0
- package/dist/ToolbarIconButton/ToolbarIconButton.js +1 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +1 -1
- package/dist/ToolbarIconButton/index.js +1 -1
- package/dist/ToolbarIconButton/index.js.map +1 -1
- package/dist/TransformsEditor/TransformEditor.js +1 -1
- package/dist/TransformsEditor/TransformEditor.js.map +1 -1
- package/dist/TransformsEditor/TransformEditorContainer.js +1 -1
- package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -1
- package/dist/TransformsEditor/TransformsEditor.js +1 -1
- package/dist/TransformsEditor/TransformsEditor.js.map +1 -1
- package/dist/TransformsEditor/index.js +1 -1
- package/dist/TransformsEditor/index.js.map +1 -1
- package/dist/ValueMappingEditor/ValueMappingEditor.js +1 -1
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +1 -1
- package/dist/ValueMappingEditor/ValueMappingsEditor.js +1 -1
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +1 -1
- package/dist/ValueMappingEditor/index.js +1 -1
- package/dist/ValueMappingEditor/index.js.map +1 -1
- package/dist/YAxisLabel.js +1 -1
- package/dist/YAxisLabel.js.map +1 -1
- package/dist/cjs/AlignSelector/AlignSelector.js +1 -1
- package/dist/cjs/AlignSelector/index.js +1 -1
- package/dist/cjs/ColorPicker/ColorPicker.js +1 -1
- package/dist/cjs/ColorPicker/OptionsColorPicker.js +1 -1
- package/dist/cjs/ColorPicker/index.js +1 -1
- package/dist/cjs/ContentWithLegend/ContentWithLegend.js +1 -1
- package/dist/cjs/ContentWithLegend/index.js +1 -1
- package/dist/cjs/ContentWithLegend/model/content-with-legend-model.js +1 -1
- package/dist/cjs/DensitySelector/DensitySelector.js +1 -1
- package/dist/cjs/DensitySelector/index.js +1 -1
- package/dist/cjs/Dialog/Dialog.js +1 -1
- package/dist/cjs/Dialog/DiscardChangesConfirmationDialog.js +1 -1
- package/dist/cjs/Dialog/index.js +1 -1
- package/dist/cjs/DragAndDrop/DragAndDropList.js +1 -1
- package/dist/cjs/DragAndDrop/DragButton.js +1 -1
- package/dist/cjs/DragAndDrop/DropIndicator.js +1 -1
- package/dist/cjs/DragAndDrop/index.js +1 -1
- package/dist/cjs/DragAndDrop/model.js +1 -1
- package/dist/cjs/Drawer/Drawer.js +1 -1
- package/dist/cjs/Drawer/index.js +1 -1
- package/dist/cjs/EChart/EChart.js +1 -1
- package/dist/cjs/EChart/index.js +1 -1
- package/dist/cjs/ErrorAlert.js +1 -1
- package/dist/cjs/ErrorBoundary.js +1 -1
- package/dist/cjs/FontSizeSelector/FontSizeSelector.js +1 -1
- package/dist/cjs/FontSizeSelector/index.js +1 -1
- package/dist/cjs/FormEditor/FormActions.js +1 -1
- package/dist/cjs/FormEditor/index.js +1 -1
- package/dist/cjs/FormatControls/FormatControls.js +9 -22
- package/dist/cjs/FormatControls/UnitSelector.js +55 -0
- package/dist/cjs/FormatControls/index.js +2 -1
- package/dist/cjs/InfoTooltip/InfoTooltip.js +1 -1
- package/dist/cjs/InfoTooltip/index.js +1 -1
- package/dist/cjs/JSONEditor.js +1 -1
- package/dist/cjs/Legend/CompactLegend.js +1 -1
- package/dist/cjs/Legend/Legend.js +1 -1
- package/dist/cjs/Legend/LegendColorBadge.js +1 -1
- package/dist/cjs/Legend/ListLegend.js +1 -1
- package/dist/cjs/Legend/ListLegendItem.js +1 -1
- package/dist/cjs/Legend/TableLegend.js +1 -1
- package/dist/cjs/Legend/index.js +1 -1
- package/dist/cjs/Legend/legend-model.js +1 -1
- package/dist/cjs/LinksEditor/LinkEditorForm.js +1 -1
- package/dist/cjs/LinksEditor/LinksEditor.js +1 -1
- package/dist/cjs/LinksEditor/index.js +1 -1
- package/dist/cjs/ModeSelector/ModeSelector.js +1 -1
- package/dist/cjs/ModeSelector/index.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorColumn.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorControl.js +5 -2
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGrid.js +1 -1
- package/dist/cjs/OptionsEditorLayout/OptionsEditorGroup.js +1 -1
- package/dist/cjs/OptionsEditorLayout/index.js +1 -1
- package/dist/cjs/Overlay/Overlay.js +1 -1
- package/dist/cjs/Overlay/index.js +1 -1
- package/dist/cjs/RefreshIntervalPicker/RefreshIntervalPicker.js +1 -1
- package/dist/cjs/RefreshIntervalPicker/index.js +1 -1
- package/dist/cjs/SettingsAutocomplete/SettingsAutocomplete.js +16 -3
- package/dist/cjs/SettingsAutocomplete/index.js +1 -1
- package/dist/cjs/SortSelector/SortSelector.js +1 -1
- package/dist/cjs/SortSelector/SortSelectorButtons.js +1 -1
- package/dist/cjs/SortSelector/index.js +1 -1
- package/dist/cjs/Table/InnerTable.js +1 -1
- package/dist/cjs/Table/Table.js +29 -5
- package/dist/cjs/Table/TableBody.js +1 -1
- package/dist/cjs/Table/TableCell.js +25 -3
- package/dist/cjs/Table/TableCheckbox.js +1 -1
- package/dist/cjs/Table/TableFoot.js +1 -1
- package/dist/cjs/Table/TableHead.js +1 -1
- package/dist/cjs/Table/TableHeaderCell.js +1 -1
- package/dist/cjs/Table/TableRow.js +1 -1
- package/dist/cjs/Table/VirtualizedTable.js +19 -3
- package/dist/cjs/Table/VirtualizedTableContainer.js +1 -1
- package/dist/cjs/Table/hooks/useTableKeyboardNav.js +1 -1
- package/dist/cjs/Table/hooks/useVirtualizedTableKeyboardNav.js +1 -1
- package/dist/cjs/Table/index.js +1 -1
- package/dist/cjs/Table/model/table-model.js +4 -3
- package/dist/cjs/ThresholdsEditor/ThresholdInput.js +1 -1
- package/dist/cjs/ThresholdsEditor/ThresholdsEditor.js +1 -1
- package/dist/cjs/ThresholdsEditor/index.js +1 -1
- package/dist/cjs/TimeRangeSelector/DateTimeRangePicker.js +20 -32
- package/dist/cjs/TimeRangeSelector/TimeRangeSelector.js +139 -18
- package/dist/cjs/TimeRangeSelector/index.js +1 -1
- package/dist/cjs/TimeRangeSelector/utils.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesInfo.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesLabelsStack.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/SeriesMarker.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/TimeChartTooltip.js +3 -2
- package/dist/cjs/TimeSeriesTooltip/TooltipContent.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/TooltipHeader.js +6 -3
- package/dist/cjs/TimeSeriesTooltip/index.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/nearby-series.js +80 -58
- package/dist/cjs/TimeSeriesTooltip/tooltip-model.js +1 -1
- package/dist/cjs/TimeSeriesTooltip/utils.js +1 -1
- package/dist/cjs/TimeZoneSelector.js +63 -0
- package/dist/cjs/ToolbarIconButton/ToolbarIconButton.js +1 -1
- package/dist/cjs/ToolbarIconButton/index.js +1 -1
- package/dist/cjs/TransformsEditor/TransformEditor.js +1 -1
- package/dist/cjs/TransformsEditor/TransformEditorContainer.js +1 -1
- package/dist/cjs/TransformsEditor/TransformsEditor.js +1 -1
- package/dist/cjs/TransformsEditor/index.js +1 -1
- package/dist/cjs/ValueMappingEditor/ValueMappingEditor.js +1 -1
- package/dist/cjs/ValueMappingEditor/ValueMappingsEditor.js +1 -1
- package/dist/cjs/ValueMappingEditor/index.js +1 -1
- package/dist/cjs/YAxisLabel.js +1 -1
- package/dist/cjs/context/ChartsProvider.js +1 -1
- package/dist/cjs/context/ItemActionsProvider.js +111 -0
- package/dist/cjs/context/SelectionProvider.js +128 -0
- package/dist/cjs/context/SnackbarProvider.js +1 -1
- package/dist/cjs/context/TimeZoneProvider.js +1 -1
- package/dist/cjs/context/index.js +3 -1
- package/dist/cjs/controls/TextField.js +1 -1
- package/dist/cjs/controls/index.js +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/model/graph.js +1 -1
- package/dist/cjs/model/index.js +2 -1
- package/dist/cjs/model/theme.js +1 -1
- package/dist/cjs/model/timeOption.js +1 -1
- package/dist/cjs/model/timeZoneOption.js +34 -0
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/test/render.js +1 -1
- package/dist/cjs/test/setup-tests.js +1 -1
- package/dist/cjs/test-utils/index.js +1 -1
- package/dist/cjs/test-utils/theme.js +1 -1
- package/dist/cjs/theme/component-overrides/alert.js +1 -1
- package/dist/cjs/theme/component-overrides/paper.js +1 -1
- package/dist/cjs/theme/index.js +1 -1
- package/dist/cjs/theme/palette/background.js +1 -1
- package/dist/cjs/theme/palette/colors/blue.js +1 -1
- package/dist/cjs/theme/palette/colors/common.js +1 -1
- package/dist/cjs/theme/palette/colors/green.js +1 -1
- package/dist/cjs/theme/palette/colors/grey.js +1 -1
- package/dist/cjs/theme/palette/colors/index.js +1 -1
- package/dist/cjs/theme/palette/colors/orange.js +1 -1
- package/dist/cjs/theme/palette/colors/purple.js +1 -1
- package/dist/cjs/theme/palette/colors/red.js +1 -1
- package/dist/cjs/theme/palette/colors/types.js +1 -1
- package/dist/cjs/theme/palette/error.js +1 -1
- package/dist/cjs/theme/palette/grey.js +1 -1
- package/dist/cjs/theme/palette/index.js +1 -1
- package/dist/cjs/theme/palette/palette-options.js +1 -1
- package/dist/cjs/theme/palette/primary.js +1 -1
- package/dist/cjs/theme/palette/secondary.js +1 -1
- package/dist/cjs/theme/palette/success.js +1 -1
- package/dist/cjs/theme/palette/text.js +1 -1
- package/dist/cjs/theme/palette/warning.js +1 -1
- package/dist/cjs/theme/theme.js +1 -1
- package/dist/cjs/theme/types/ThemeExtension.d.js +1 -1
- package/dist/cjs/theme/typography.js +1 -1
- package/dist/cjs/utils/axis.js +80 -5
- package/dist/cjs/utils/browser-storage.js +1 -1
- package/dist/cjs/utils/chart-actions.js +1 -1
- package/dist/cjs/utils/combine-sx.js +1 -1
- package/dist/cjs/utils/component-ids.js +1 -1
- package/dist/cjs/utils/data-field-interpolation.js +230 -0
- package/dist/cjs/utils/format.js +1 -1
- package/dist/cjs/utils/index.js +5 -2
- package/dist/cjs/utils/mathjs.js +1 -1
- package/dist/cjs/utils/memo.js +1 -1
- package/dist/cjs/utils/selection-interpolation.js +69 -0
- package/dist/cjs/utils/theme-gen.js +1 -1
- package/dist/cjs/utils/variable-interpolation.js +192 -0
- package/dist/context/ChartsProvider.js +1 -1
- package/dist/context/ChartsProvider.js.map +1 -1
- package/dist/context/ItemActionsProvider.d.ts +25 -0
- package/dist/context/ItemActionsProvider.d.ts.map +1 -0
- package/dist/context/ItemActionsProvider.js +95 -0
- package/dist/context/ItemActionsProvider.js.map +1 -0
- package/dist/context/SelectionProvider.d.ts +34 -0
- package/dist/context/SelectionProvider.d.ts.map +1 -0
- package/dist/context/SelectionProvider.js +120 -0
- package/dist/context/SelectionProvider.js.map +1 -0
- package/dist/context/SnackbarProvider.js +1 -1
- package/dist/context/SnackbarProvider.js.map +1 -1
- package/dist/context/TimeZoneProvider.js +1 -1
- package/dist/context/TimeZoneProvider.js.map +1 -1
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +3 -1
- package/dist/context/index.js.map +1 -1
- package/dist/controls/TextField.js +1 -1
- package/dist/controls/TextField.js.map +1 -1
- package/dist/controls/index.js +1 -1
- package/dist/controls/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/model/graph.js +1 -1
- package/dist/model/graph.js.map +1 -1
- package/dist/model/index.d.ts +1 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +2 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/theme.d.ts +1 -0
- package/dist/model/theme.d.ts.map +1 -1
- package/dist/model/theme.js +1 -1
- package/dist/model/theme.js.map +1 -1
- package/dist/model/timeOption.js +1 -1
- package/dist/model/timeOption.js.map +1 -1
- package/dist/model/timeZoneOption.d.ts +10 -0
- package/dist/model/timeZoneOption.d.ts.map +1 -0
- package/dist/model/timeZoneOption.js +29 -0
- package/dist/model/timeZoneOption.js.map +1 -0
- package/dist/test/index.js +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/render.js +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/theme.js +1 -1
- package/dist/test-utils/theme.js.map +1 -1
- package/dist/theme/component-overrides/alert.js +1 -1
- 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.js +1 -1
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette/background.js +1 -1
- package/dist/theme/palette/background.js.map +1 -1
- package/dist/theme/palette/colors/blue.js +1 -1
- package/dist/theme/palette/colors/blue.js.map +1 -1
- package/dist/theme/palette/colors/common.js +1 -1
- package/dist/theme/palette/colors/common.js.map +1 -1
- package/dist/theme/palette/colors/green.js +1 -1
- package/dist/theme/palette/colors/green.js.map +1 -1
- package/dist/theme/palette/colors/grey.js +1 -1
- package/dist/theme/palette/colors/grey.js.map +1 -1
- package/dist/theme/palette/colors/index.js +1 -1
- package/dist/theme/palette/colors/index.js.map +1 -1
- package/dist/theme/palette/colors/orange.js +1 -1
- package/dist/theme/palette/colors/orange.js.map +1 -1
- package/dist/theme/palette/colors/purple.js +1 -1
- package/dist/theme/palette/colors/purple.js.map +1 -1
- package/dist/theme/palette/colors/red.js +1 -1
- package/dist/theme/palette/colors/red.js.map +1 -1
- package/dist/theme/palette/colors/types.js +1 -1
- package/dist/theme/palette/colors/types.js.map +1 -1
- package/dist/theme/palette/error.js +1 -1
- package/dist/theme/palette/error.js.map +1 -1
- package/dist/theme/palette/grey.js +1 -1
- package/dist/theme/palette/grey.js.map +1 -1
- package/dist/theme/palette/index.js +1 -1
- package/dist/theme/palette/index.js.map +1 -1
- package/dist/theme/palette/palette-options.js +1 -1
- package/dist/theme/palette/palette-options.js.map +1 -1
- package/dist/theme/palette/primary.js +1 -1
- package/dist/theme/palette/primary.js.map +1 -1
- package/dist/theme/palette/secondary.js +1 -1
- package/dist/theme/palette/secondary.js.map +1 -1
- package/dist/theme/palette/success.js +1 -1
- package/dist/theme/palette/success.js.map +1 -1
- package/dist/theme/palette/text.js +1 -1
- package/dist/theme/palette/text.js.map +1 -1
- package/dist/theme/palette/warning.js +1 -1
- package/dist/theme/palette/warning.js.map +1 -1
- package/dist/theme/theme.js +1 -1
- package/dist/theme/theme.js.map +1 -1
- package/dist/theme/types/ThemeExtension.d.js +1 -1
- package/dist/theme/types/ThemeExtension.d.js.map +1 -1
- package/dist/theme/typography.js +1 -1
- package/dist/theme/typography.js.map +1 -1
- package/dist/utils/axis.d.ts +18 -0
- package/dist/utils/axis.d.ts.map +1 -1
- package/dist/utils/axis.js +79 -3
- package/dist/utils/axis.js.map +1 -1
- package/dist/utils/browser-storage.js +1 -1
- package/dist/utils/browser-storage.js.map +1 -1
- package/dist/utils/chart-actions.js +1 -1
- package/dist/utils/chart-actions.js.map +1 -1
- package/dist/utils/combine-sx.js +1 -1
- package/dist/utils/combine-sx.js.map +1 -1
- package/dist/utils/component-ids.js +1 -1
- package/dist/utils/component-ids.js.map +1 -1
- package/dist/utils/data-field-interpolation.d.ts +84 -0
- package/dist/utils/data-field-interpolation.d.ts.map +1 -0
- package/dist/utils/data-field-interpolation.js +239 -0
- package/dist/utils/data-field-interpolation.js.map +1 -0
- package/dist/utils/format.js +1 -1
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +5 -2
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/mathjs.js +1 -1
- package/dist/utils/mathjs.js.map +1 -1
- package/dist/utils/memo.js +1 -1
- package/dist/utils/memo.js.map +1 -1
- package/dist/utils/selection-interpolation.d.ts +32 -0
- package/dist/utils/selection-interpolation.d.ts.map +1 -0
- package/dist/utils/selection-interpolation.js +77 -0
- package/dist/utils/selection-interpolation.js.map +1 -0
- package/dist/utils/theme-gen.js +1 -1
- package/dist/utils/theme-gen.js.map +1 -1
- package/dist/utils/variable-interpolation.d.ts +71 -0
- package/dist/utils/variable-interpolation.d.ts.map +1 -0
- package/dist/utils/variable-interpolation.js +176 -0
- package/dist/utils/variable-interpolation.js.map +1 -0
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -36,8 +36,10 @@ const OptionsEditorControl = ({ label, control, description })=>{
|
|
|
36
36
|
// controls for a11y.
|
|
37
37
|
const generatedControlId = (0, _utils.useId)('EditorSectionControl');
|
|
38
38
|
const controlId = `${generatedControlId}-control`;
|
|
39
|
+
const labelId = `${generatedControlId}-label`;
|
|
39
40
|
const controlProps = {
|
|
40
|
-
id: controlId
|
|
41
|
+
id: controlId,
|
|
42
|
+
'aria-labelledby': labelId
|
|
41
43
|
};
|
|
42
44
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormControl, {
|
|
43
45
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
|
|
@@ -51,6 +53,7 @@ const OptionsEditorControl = ({ label, control, description })=>{
|
|
|
51
53
|
justifyContent: "center",
|
|
52
54
|
children: [
|
|
53
55
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.FormLabel, {
|
|
56
|
+
id: labelId,
|
|
54
57
|
htmlFor: controlId,
|
|
55
58
|
children: label
|
|
56
59
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -24,10 +24,23 @@ const _jsxruntime = require("react/jsx-runtime");
|
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_material.TextField, {
|
|
26
26
|
...params
|
|
27
|
-
}), ...otherProps }) {
|
|
27
|
+
}), id, 'aria-labelledby': ariaLabelledby, ...otherProps }) {
|
|
28
28
|
const getOptionLabel = (option)=>{
|
|
29
29
|
return option.label ?? option.id;
|
|
30
30
|
};
|
|
31
|
+
// Merge id and aria-labelledby props into the input element for proper accessibility
|
|
32
|
+
// and form association, while still allowing custom renderInput implementations.
|
|
33
|
+
const handleRenderInput = (params)=>{
|
|
34
|
+
const mergedParams = {
|
|
35
|
+
...params,
|
|
36
|
+
inputProps: {
|
|
37
|
+
...params.inputProps,
|
|
38
|
+
id,
|
|
39
|
+
'aria-labelledby': ariaLabelledby
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return renderInput(mergedParams);
|
|
43
|
+
};
|
|
31
44
|
// Note: this component currently is not virtualized because it is specific
|
|
32
45
|
// to being used for settings, which generally have a pretty small list of
|
|
33
46
|
// options. If this changes to include values with many options, virtualization
|
|
@@ -37,7 +50,7 @@ function SettingsAutocomplete({ options, renderInput = (params)=>/*#__PURE__*/ (
|
|
|
37
50
|
getOptionDisabled: (option)=>!!option.disabled,
|
|
38
51
|
getOptionLabel: getOptionLabel,
|
|
39
52
|
options: options,
|
|
40
|
-
renderInput:
|
|
53
|
+
renderInput: handleRenderInput,
|
|
41
54
|
renderOption: ({ key, ...props }, option)=>{
|
|
42
55
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)("li", {
|
|
43
56
|
...props,
|
package/dist/cjs/Table/Table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -21,11 +21,11 @@ Object.defineProperty(exports, "Table", {
|
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
|
-
const _reacttable = require("@tanstack/react-table");
|
|
25
24
|
const _material = require("@mui/material");
|
|
25
|
+
const _reacttable = require("@tanstack/react-table");
|
|
26
26
|
const _react = require("react");
|
|
27
|
-
const _VirtualizedTable = require("./VirtualizedTable");
|
|
28
27
|
const _TableCheckbox = require("./TableCheckbox");
|
|
28
|
+
const _VirtualizedTable = require("./VirtualizedTable");
|
|
29
29
|
const _tablemodel = require("./model/table-model");
|
|
30
30
|
const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
31
31
|
return `${index}`;
|
|
@@ -35,7 +35,7 @@ const DEFAULT_GET_ROW_ID = (data, index)=>{
|
|
|
35
35
|
// does not do deep equality checking for objects and arrays.
|
|
36
36
|
const DEFAULT_ROW_SELECTION = {};
|
|
37
37
|
const DEFAULT_SORTING = [];
|
|
38
|
-
function Table({ data, columns, cellConfigs, density = 'standard', 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 }) {
|
|
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, getItemActions, hasItemActions, 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;
|
|
@@ -73,6 +73,25 @@ function Table({ data, columns, cellConfigs, density = 'standard', defaultColumn
|
|
|
73
73
|
const newSorting = typeof sortingUpdater === 'function' ? sortingUpdater(sorting) : sortingUpdater;
|
|
74
74
|
onSortingChange?.(newSorting);
|
|
75
75
|
};
|
|
76
|
+
const actionsColumn = (0, _react.useMemo)(()=>{
|
|
77
|
+
return {
|
|
78
|
+
id: 'itemActions',
|
|
79
|
+
header: 'Actions',
|
|
80
|
+
cell: ({ row })=>{
|
|
81
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Stack, {
|
|
82
|
+
direction: "row",
|
|
83
|
+
alignItems: "center",
|
|
84
|
+
children: getItemActions?.({
|
|
85
|
+
id: row.id,
|
|
86
|
+
data: row.original
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
enableSorting: false
|
|
91
|
+
};
|
|
92
|
+
}, [
|
|
93
|
+
getItemActions
|
|
94
|
+
]);
|
|
76
95
|
const checkboxColumn = (0, _react.useMemo)(()=>{
|
|
77
96
|
return {
|
|
78
97
|
id: 'checkboxRowSelect',
|
|
@@ -107,6 +126,9 @@ function Table({ data, columns, cellConfigs, density = 'standard', defaultColumn
|
|
|
107
126
|
]);
|
|
108
127
|
const tableColumns = (0, _react.useMemo)(()=>{
|
|
109
128
|
const initTableColumns = (0, _tablemodel.persesColumnsToTanstackColumns)(columns);
|
|
129
|
+
if (hasItemActions) {
|
|
130
|
+
initTableColumns.unshift(actionsColumn);
|
|
131
|
+
}
|
|
110
132
|
if (checkboxSelection) {
|
|
111
133
|
initTableColumns.unshift(checkboxColumn);
|
|
112
134
|
}
|
|
@@ -114,7 +136,9 @@ function Table({ data, columns, cellConfigs, density = 'standard', defaultColumn
|
|
|
114
136
|
}, [
|
|
115
137
|
checkboxColumn,
|
|
116
138
|
checkboxSelection,
|
|
117
|
-
columns
|
|
139
|
+
columns,
|
|
140
|
+
hasItemActions,
|
|
141
|
+
actionsColumn
|
|
118
142
|
]);
|
|
119
143
|
const table = (0, _reacttable.useReactTable)({
|
|
120
144
|
data,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "TableCell", {
|
|
|
23
23
|
const _jsxruntime = require("react/jsx-runtime");
|
|
24
24
|
const _material = require("@mui/material");
|
|
25
25
|
const _react = require("react");
|
|
26
|
+
const _datafieldinterpolation = require("../utils/data-field-interpolation");
|
|
26
27
|
const _tablemodel = require("./model/table-model");
|
|
27
28
|
const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme })=>({
|
|
28
29
|
padding: 0,
|
|
@@ -39,7 +40,7 @@ const StyledMuiTableCell = (0, _material.styled)(_material.TableCell)(({ theme }
|
|
|
39
40
|
borderRadius: 0
|
|
40
41
|
}
|
|
41
42
|
}));
|
|
42
|
-
function TableCell({ children, density, variant, width, defaultColumnHeight, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, align, color, backgroundColor, ...otherProps }) {
|
|
43
|
+
function TableCell({ children, density, variant, width, defaultColumnHeight, focusState = 'none', onFocusTrigger, isFirstColumn, isLastColumn, description, align, color, backgroundColor, dataLink, adjacentCellsValuesMap, ...otherProps }) {
|
|
43
44
|
const theme = (0, _material.useTheme)();
|
|
44
45
|
const elRef = (0, _react.useRef)();
|
|
45
46
|
const isHeader = variant === 'head';
|
|
@@ -67,6 +68,22 @@ function TableCell({ children, density, variant, width, defaultColumnHeight, foc
|
|
|
67
68
|
// tabindex and focuses to the right cell.
|
|
68
69
|
onFocusTrigger?.(e);
|
|
69
70
|
};
|
|
71
|
+
const modifiedDataLink = (0, _react.useMemo)(()=>{
|
|
72
|
+
if (!dataLink) return undefined;
|
|
73
|
+
if (adjacentCellsValuesMap && (0, _datafieldinterpolation.hasDataFieldPatterns)(dataLink.url)) {
|
|
74
|
+
const { text } = (0, _datafieldinterpolation.replaceDataFields)(dataLink.url, adjacentCellsValuesMap, {
|
|
75
|
+
urlEncode: true
|
|
76
|
+
});
|
|
77
|
+
return {
|
|
78
|
+
...dataLink,
|
|
79
|
+
url: text
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return dataLink;
|
|
83
|
+
}, [
|
|
84
|
+
dataLink,
|
|
85
|
+
adjacentCellsValuesMap
|
|
86
|
+
]);
|
|
70
87
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(StyledMuiTableCell, {
|
|
71
88
|
...otherProps,
|
|
72
89
|
// Modify the tab index based on the currently focused cell. It's important
|
|
@@ -125,7 +142,12 @@ function TableCell({ children, density, variant, width, defaultColumnHeight, foc
|
|
|
125
142
|
title: description,
|
|
126
143
|
"aria-label": description,
|
|
127
144
|
textAlign: align,
|
|
128
|
-
children:
|
|
145
|
+
children: modifiedDataLink ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Link, {
|
|
146
|
+
href: modifiedDataLink.url,
|
|
147
|
+
target: modifiedDataLink.targetBlank ? '_blank' : '_self',
|
|
148
|
+
rel: modifiedDataLink.targetBlank ? 'noopener noreferrer' : undefined,
|
|
149
|
+
children: children
|
|
150
|
+
}) : children
|
|
129
151
|
})
|
|
130
152
|
});
|
|
131
153
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -188,7 +188,6 @@ function VirtualizedTable({ width, height, density, defaultColumnWidth, defaultC
|
|
|
188
188
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
189
189
|
children: row.getVisibleCells().map((cell, i, cells)=>{
|
|
190
190
|
const position = {
|
|
191
|
-
// Add 1 to the row index because the header is row 0
|
|
192
191
|
row: index + 1,
|
|
193
192
|
column: i
|
|
194
193
|
};
|
|
@@ -196,7 +195,13 @@ function VirtualizedTable({ width, height, density, defaultColumnWidth, defaultC
|
|
|
196
195
|
const cellConfig = cellConfigs?.[cellContext.cell.id];
|
|
197
196
|
const cellRenderFn = cell.column.columnDef.cell;
|
|
198
197
|
const cellContent = typeof cellRenderFn === 'function' ? cellRenderFn(cellContext) : null;
|
|
199
|
-
|
|
198
|
+
/*
|
|
199
|
+
IMPORTANT:
|
|
200
|
+
If Variables exist in the link, they should have been translated by the plugin already. (Being developed at the moment)
|
|
201
|
+
Components have no access to any context (Which is intentional and correct)
|
|
202
|
+
We may want to add parameters to a link from neighboring cells in the future as well.
|
|
203
|
+
If this is the case, the value of the neighboring cells should be read from here and be replaced. (Bing discussed at the moment, not decided yet)
|
|
204
|
+
*/ const cellDescriptionDef = cell.column.columnDef.meta?.cellDescription;
|
|
200
205
|
let description = undefined;
|
|
201
206
|
if (typeof cellDescriptionDef === 'function') {
|
|
202
207
|
// If the cell description is a function, set the value using
|
|
@@ -208,6 +213,15 @@ function VirtualizedTable({ width, height, density, defaultColumnWidth, defaultC
|
|
|
208
213
|
// cell content.
|
|
209
214
|
description = cellContent;
|
|
210
215
|
}
|
|
216
|
+
/* this has been specifically added for the data link,
|
|
217
|
+
therefore, non string and numeric values should be excluded
|
|
218
|
+
*/ const adjacentCellsValuesMap = Object.entries(row.original)?.filter(([_, value])=>[
|
|
219
|
+
'string',
|
|
220
|
+
'number'
|
|
221
|
+
].includes(typeof value)).reduce((acc, [key, value])=>({
|
|
222
|
+
...acc,
|
|
223
|
+
[key]: String(value)
|
|
224
|
+
}), {});
|
|
211
225
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TableCell.TableCell, {
|
|
212
226
|
"data-testid": cell.id,
|
|
213
227
|
title: description || cellConfig?.text || cellContent,
|
|
@@ -222,6 +236,8 @@ function VirtualizedTable({ width, height, density, defaultColumnWidth, defaultC
|
|
|
222
236
|
description: description,
|
|
223
237
|
color: cellConfig?.textColor ?? undefined,
|
|
224
238
|
backgroundColor: cellConfig?.backgroundColor ?? undefined,
|
|
239
|
+
dataLink: cell.column.columnDef.meta?.dataLink,
|
|
240
|
+
adjacentCellsValuesMap: adjacentCellsValuesMap,
|
|
225
241
|
children: cellConfig?.text || cellContent
|
|
226
242
|
}, cell.id);
|
|
227
243
|
})
|
package/dist/cjs/Table/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -79,7 +79,7 @@ function getTableCellLayout(theme, density, { isHeader, isLastColumn, isFirstCol
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
function persesColumnsToTanstackColumns(columns) {
|
|
82
|
-
const tableCols = columns.map(({ width, align, headerDescription, cellDescription, enableSorting, ...otherProps })=>{
|
|
82
|
+
const tableCols = columns.map(({ width, align, headerDescription, cellDescription, enableSorting, dataLink, ...otherProps })=>{
|
|
83
83
|
// Tanstack Table does not support an "auto" value to naturally size to fit
|
|
84
84
|
// the space in a table. We translate our custom "auto" setting to 0 size
|
|
85
85
|
// for these columns, so it is easy to fall back to auto when rendering.
|
|
@@ -104,7 +104,8 @@ function persesColumnsToTanstackColumns(columns) {
|
|
|
104
104
|
meta: {
|
|
105
105
|
align,
|
|
106
106
|
headerDescription,
|
|
107
|
-
cellDescription
|
|
107
|
+
cellDescription,
|
|
108
|
+
dataLink
|
|
108
109
|
}
|
|
109
110
|
};
|
|
110
111
|
return result;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright The Perses Authors
|
|
2
2
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
3
|
// you may not use this file except in compliance with the License.
|
|
4
4
|
// You may obtain a copy of the License at
|
|
@@ -25,42 +25,31 @@ const _react = require("react");
|
|
|
25
25
|
const _material = require("@mui/material");
|
|
26
26
|
const _xdatepickers = require("@mui/x-date-pickers");
|
|
27
27
|
const _AdapterDateFnsV3 = require("@mui/x-date-pickers/AdapterDateFnsV3");
|
|
28
|
-
const _context = require("../context");
|
|
29
28
|
const _ErrorBoundary = require("../ErrorBoundary");
|
|
30
29
|
const _ErrorAlert = require("../ErrorAlert");
|
|
30
|
+
const _format = require("../utils/format");
|
|
31
31
|
const _utils = require("./utils");
|
|
32
|
-
const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
33
|
-
const { formatWithUserTimeZone } = (0, _context.useTimeZone)();
|
|
32
|
+
const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel, timeZone })=>{
|
|
34
33
|
// Time range values as dates that can be used as a time range.
|
|
35
34
|
const [timeRange, setTimeRange] = (0, _react.useState)(initialTimeRange);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
35
|
+
const timeRangeInputs = (0, _react.useMemo)(()=>{
|
|
36
|
+
return {
|
|
37
|
+
start: (0, _format.formatWithTimeZone)(timeRange.start, _utils.DATE_TIME_FORMAT, timeZone),
|
|
38
|
+
end: (0, _format.formatWithTimeZone)(timeRange.end, _utils.DATE_TIME_FORMAT, timeZone)
|
|
39
|
+
};
|
|
40
|
+
}, [
|
|
41
|
+
timeRange.start,
|
|
42
|
+
timeRange.end,
|
|
43
|
+
timeZone
|
|
44
|
+
]);
|
|
42
45
|
const [showStartCalendar, setShowStartCalendar] = (0, _react.useState)(true);
|
|
43
46
|
const changeTimeRange = (newTime, segment)=>{
|
|
44
|
-
|
|
45
|
-
const newInputTime = isInputChange ? newTime : formatWithUserTimeZone(newTime, _utils.DATE_TIME_FORMAT);
|
|
46
|
-
setTimeRangeInputs((prevTimeRangeInputs)=>{
|
|
47
|
+
setTimeRange((prevTimeRange)=>{
|
|
47
48
|
return {
|
|
48
|
-
...
|
|
49
|
-
[segment]:
|
|
49
|
+
...prevTimeRange,
|
|
50
|
+
[segment]: newTime
|
|
50
51
|
};
|
|
51
52
|
});
|
|
52
|
-
// When the change is a string from an input, do not try to convert it to
|
|
53
|
-
// a date because there are likely to be interim stages of editing where it
|
|
54
|
-
// is not valid as a date. When the change is a Date from the calendar/clock
|
|
55
|
-
// interface, we can be sure it is a date.
|
|
56
|
-
if (!isInputChange) {
|
|
57
|
-
setTimeRange((prevTimeRange)=>{
|
|
58
|
-
return {
|
|
59
|
-
...prevTimeRange,
|
|
60
|
-
[segment]: newTime
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
53
|
};
|
|
65
54
|
const onChangeStartTime = (newStartTime)=>{
|
|
66
55
|
changeTimeRange(newStartTime, 'start');
|
|
@@ -70,12 +59,11 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
|
70
59
|
};
|
|
71
60
|
const updateDateRange = ()=>{
|
|
72
61
|
const newDates = {
|
|
73
|
-
start:
|
|
74
|
-
end:
|
|
62
|
+
start: timeRange.start,
|
|
63
|
+
end: timeRange.end
|
|
75
64
|
};
|
|
76
65
|
const isValidDateRange = (0, _utils.validateDateRange)(newDates.start, newDates.end);
|
|
77
66
|
if (isValidDateRange) {
|
|
78
|
-
setTimeRange(newDates);
|
|
79
67
|
return newDates;
|
|
80
68
|
}
|
|
81
69
|
};
|
|
@@ -111,7 +99,7 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
|
111
99
|
displayStaticWrapperAs: "desktop",
|
|
112
100
|
openTo: "day",
|
|
113
101
|
disableHighlightToday: true,
|
|
114
|
-
value:
|
|
102
|
+
value: timeRange.start,
|
|
115
103
|
onChange: (newValue)=>{
|
|
116
104
|
if (newValue === null) return;
|
|
117
105
|
onChangeStartTime(newValue);
|
|
@@ -139,7 +127,7 @@ const DateTimeRangePicker = ({ initialTimeRange, onChange, onCancel })=>{
|
|
|
139
127
|
displayStaticWrapperAs: "desktop",
|
|
140
128
|
openTo: "day",
|
|
141
129
|
disableHighlightToday: true,
|
|
142
|
-
value:
|
|
130
|
+
value: timeRange.end,
|
|
143
131
|
minDateTime: timeRange.start,
|
|
144
132
|
onChange: (newValue)=>{
|
|
145
133
|
if (newValue === null) return;
|