@perses-dev/components 0.52.0-beta.1 → 0.52.0-beta.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/Legend/ListLegend.d.ts.map +1 -1
- package/dist/src/AlignSelector/AlignSelector.js.map +1 -0
- package/dist/{TransformsEditor → src/AlignSelector}/index.js.map +1 -1
- package/dist/src/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/src/ColorPicker/OptionsColorPicker.js.map +1 -0
- package/dist/src/ColorPicker/index.js.map +1 -0
- package/dist/src/ContentWithLegend/ContentWithLegend.js.map +1 -0
- package/dist/{SettingsAutocomplete → src/ContentWithLegend}/index.js.map +1 -1
- package/dist/src/ContentWithLegend/model/content-with-legend-model.js.map +1 -0
- package/dist/src/DensitySelector/DensitySelector.js.map +1 -0
- package/dist/{ValueMappingEditor → src/DensitySelector}/index.js.map +1 -1
- package/dist/src/Dialog/Dialog.js.map +1 -0
- package/dist/src/Dialog/DiscardChangesConfirmationDialog.js.map +1 -0
- package/dist/{test-utils → src/Dialog}/index.js.map +1 -1
- package/dist/src/DragAndDrop/DragAndDropList.js.map +1 -0
- package/dist/src/DragAndDrop/DragButton.js.map +1 -0
- package/dist/src/DragAndDrop/DropIndicator.js.map +1 -0
- package/dist/src/DragAndDrop/index.js.map +1 -0
- package/dist/src/DragAndDrop/model.js.map +1 -0
- package/dist/src/Drawer/Drawer.js.map +1 -0
- package/dist/src/Drawer/index.js.map +1 -0
- package/dist/src/EChart/EChart.js.map +1 -0
- package/dist/src/EChart/index.js.map +1 -0
- package/dist/src/ErrorAlert.js.map +1 -0
- package/dist/{context/index.js.map → src/ErrorBoundary.js.map} +1 -1
- package/dist/src/FontSizeSelector/FontSizeSelector.js.map +1 -0
- package/dist/{OptionsEditorLayout → src/FontSizeSelector}/index.js.map +1 -1
- package/dist/src/FormEditor/FormActions.js.map +1 -0
- package/dist/{AlignSelector → src/FormEditor}/index.js.map +1 -1
- package/dist/src/FormatControls/FormatControls.js.map +1 -0
- package/dist/{ContentWithLegend → src/FormatControls}/index.js.map +1 -1
- package/dist/src/InfoTooltip/InfoTooltip.js.map +1 -0
- package/dist/{FormatControls → src/InfoTooltip}/index.js.map +1 -1
- package/dist/src/JSONEditor.js.map +1 -0
- package/dist/src/Legend/CompactLegend.js.map +1 -0
- package/dist/src/Legend/Legend.js.map +1 -0
- package/dist/src/Legend/LegendColorBadge.js.map +1 -0
- package/dist/src/Legend/ListLegend.js.map +1 -0
- package/dist/src/Legend/ListLegendItem.js.map +1 -0
- package/dist/src/Legend/TableLegend.js.map +1 -0
- package/dist/src/Legend/index.js.map +1 -0
- package/dist/src/Legend/legend-model.js.map +1 -0
- package/dist/src/LinksEditor/LinksEditor.js.map +1 -0
- package/dist/src/LinksEditor/index.js.map +1 -0
- package/dist/src/ModeSelector/ModeSelector.js.map +1 -0
- package/dist/src/ModeSelector/index.js.map +1 -0
- package/dist/src/OptionsEditorLayout/OptionsEditorColumn.js.map +1 -0
- package/dist/src/OptionsEditorLayout/OptionsEditorControl.js.map +1 -0
- package/dist/src/OptionsEditorLayout/OptionsEditorGrid.js.map +1 -0
- package/dist/src/OptionsEditorLayout/OptionsEditorGroup.js.map +1 -0
- package/dist/src/OptionsEditorLayout/index.js.map +1 -0
- package/dist/src/Overlay/Overlay.js.map +1 -0
- package/dist/{FormEditor → src/Overlay}/index.js.map +1 -1
- package/dist/src/RefreshIntervalPicker/RefreshIntervalPicker.js.map +1 -0
- package/dist/src/RefreshIntervalPicker/index.js.map +1 -0
- package/dist/src/SettingsAutocomplete/SettingsAutocomplete.js.map +1 -0
- package/dist/src/SettingsAutocomplete/index.js.map +1 -0
- package/dist/src/SortSelector/SortSelector.js.map +1 -0
- package/dist/src/SortSelector/SortSelectorButtons.js.map +1 -0
- package/dist/{DensitySelector → src/SortSelector}/index.js.map +1 -1
- package/dist/src/Table/InnerTable.js.map +1 -0
- package/dist/src/Table/Table.js.map +1 -0
- package/dist/src/Table/TableBody.js.map +1 -0
- package/dist/src/Table/TableCell.js.map +1 -0
- package/dist/src/Table/TableCheckbox.js.map +1 -0
- package/dist/src/Table/TableFoot.js.map +1 -0
- package/dist/src/Table/TableHead.js.map +1 -0
- package/dist/src/Table/TableHeaderCell.js.map +1 -0
- package/dist/src/Table/TableRow.js.map +1 -0
- package/dist/src/Table/VirtualizedTable.js.map +1 -0
- package/dist/src/Table/VirtualizedTableContainer.js.map +1 -0
- package/dist/src/Table/hooks/useTableKeyboardNav.js.map +1 -0
- package/dist/src/Table/hooks/useVirtualizedTableKeyboardNav.js.map +1 -0
- package/dist/{controls → src/Table}/index.js.map +1 -1
- package/dist/src/Table/model/table-model.js.map +1 -0
- package/dist/src/ThresholdsEditor/ThresholdInput.js.map +1 -0
- package/dist/src/ThresholdsEditor/ThresholdsEditor.js.map +1 -0
- package/dist/src/ThresholdsEditor/index.js.map +1 -0
- package/dist/src/TimeRangeSelector/DateTimeRangePicker.js.map +1 -0
- package/dist/src/TimeRangeSelector/TimeRangeSelector.js.map +1 -0
- package/dist/src/TimeRangeSelector/index.js.map +1 -0
- package/dist/src/TimeRangeSelector/utils.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/SeriesInfo.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/SeriesLabelsStack.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/SeriesMarker.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/TimeChartTooltip.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/TooltipContent.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/TooltipHeader.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/index.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/nearby-series.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/tooltip-model.js.map +1 -0
- package/dist/src/TimeSeriesTooltip/utils.js.map +1 -0
- package/dist/src/ToolbarIconButton/ToolbarIconButton.js.map +1 -0
- package/dist/src/ToolbarIconButton/index.js.map +1 -0
- package/dist/src/TransformsEditor/TransformEditor.js.map +1 -0
- package/dist/src/TransformsEditor/TransformEditorContainer.js.map +1 -0
- package/dist/src/TransformsEditor/TransformsEditor.js.map +1 -0
- package/dist/src/TransformsEditor/index.js.map +1 -0
- package/dist/src/ValueMappingEditor/ValueMappingEditor.js.map +1 -0
- package/dist/src/ValueMappingEditor/ValueMappingsEditor.js.map +1 -0
- package/dist/{RefreshIntervalPicker → src/ValueMappingEditor}/index.js.map +1 -1
- package/dist/src/YAxisLabel.js.map +1 -0
- package/dist/src/context/ChartsProvider.js.map +1 -0
- package/dist/src/context/SnackbarProvider.js.map +1 -0
- package/dist/src/context/TimeZoneProvider.js.map +1 -0
- package/dist/{test/setup-tests.js.map → src/context/index.js.map} +1 -1
- package/dist/src/controls/TextField.js.map +1 -0
- package/dist/{LinksEditor → src/controls}/index.js.map +1 -1
- package/dist/src/index.js.map +1 -0
- package/dist/src/model/graph.js.map +1 -0
- package/dist/src/model/index.js.map +1 -0
- package/dist/src/model/theme.js.map +1 -0
- package/dist/src/model/timeOption.js.map +1 -0
- package/dist/{Dialog → src/test}/index.js.map +1 -1
- package/dist/src/test/render.js.map +1 -0
- package/dist/src/test/setup-tests.js.map +1 -0
- package/dist/src/test-utils/index.js.map +1 -0
- package/dist/src/test-utils/theme.js.map +1 -0
- package/dist/src/theme/component-overrides/alert.js.map +1 -0
- package/dist/src/theme/component-overrides/paper.js.map +1 -0
- package/dist/src/theme/index.js.map +1 -0
- package/dist/src/theme/palette/background.js.map +1 -0
- package/dist/src/theme/palette/colors/blue.js.map +1 -0
- package/dist/src/theme/palette/colors/common.js.map +1 -0
- package/dist/src/theme/palette/colors/green.js.map +1 -0
- package/dist/src/theme/palette/colors/grey.js.map +1 -0
- package/dist/src/theme/palette/colors/index.js.map +1 -0
- package/dist/src/theme/palette/colors/orange.js.map +1 -0
- package/dist/src/theme/palette/colors/purple.js.map +1 -0
- package/dist/src/theme/palette/colors/red.js.map +1 -0
- package/dist/src/theme/palette/colors/types.js.map +1 -0
- package/dist/src/theme/palette/error.js.map +1 -0
- package/dist/src/theme/palette/grey.js.map +1 -0
- package/dist/src/theme/palette/index.js.map +1 -0
- package/dist/src/theme/palette/palette-options.js.map +1 -0
- package/dist/src/theme/palette/primary.js.map +1 -0
- package/dist/src/theme/palette/secondary.js.map +1 -0
- package/dist/src/theme/palette/success.js.map +1 -0
- package/dist/src/theme/palette/text.js.map +1 -0
- package/dist/src/theme/palette/warning.js.map +1 -0
- package/dist/src/theme/theme.js.map +1 -0
- package/dist/src/theme/types/ThemeExtension.d.js.map +1 -0
- package/dist/src/theme/typography.js.map +1 -0
- package/dist/src/utils/axis.js.map +1 -0
- package/dist/src/utils/chart-actions.js.map +1 -0
- package/dist/src/utils/combine-sx.js.map +1 -0
- package/dist/src/utils/component-ids.js.map +1 -0
- package/dist/src/utils/format.js.map +1 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/mathjs.js.map +1 -0
- package/dist/src/utils/theme-gen.js.map +1 -0
- package/package.json +2 -2
- package/dist/AlignSelector/AlignSelector.js.map +0 -1
- package/dist/ColorPicker/ColorPicker.js.map +0 -1
- package/dist/ColorPicker/OptionsColorPicker.js.map +0 -1
- package/dist/ColorPicker/index.js.map +0 -1
- package/dist/ContentWithLegend/ContentWithLegend.js.map +0 -1
- package/dist/ContentWithLegend/model/content-with-legend-model.js.map +0 -1
- package/dist/DensitySelector/DensitySelector.js.map +0 -1
- package/dist/Dialog/Dialog.js.map +0 -1
- package/dist/Dialog/DiscardChangesConfirmationDialog.js.map +0 -1
- package/dist/DragAndDrop/DragAndDropList.js.map +0 -1
- package/dist/DragAndDrop/DragButton.js.map +0 -1
- package/dist/DragAndDrop/DropIndicator.js.map +0 -1
- package/dist/DragAndDrop/index.js.map +0 -1
- package/dist/DragAndDrop/model.js.map +0 -1
- package/dist/Drawer/Drawer.js.map +0 -1
- package/dist/Drawer/index.js.map +0 -1
- package/dist/EChart/EChart.js.map +0 -1
- package/dist/EChart/index.js.map +0 -1
- package/dist/ErrorAlert.js.map +0 -1
- package/dist/ErrorBoundary.js.map +0 -1
- package/dist/FontSizeSelector/FontSizeSelector.js.map +0 -1
- package/dist/FontSizeSelector/index.js.map +0 -1
- package/dist/FormEditor/FormActions.js.map +0 -1
- package/dist/FormatControls/FormatControls.js.map +0 -1
- package/dist/InfoTooltip/InfoTooltip.js.map +0 -1
- package/dist/InfoTooltip/index.js.map +0 -1
- package/dist/JSONEditor.js.map +0 -1
- package/dist/Legend/CompactLegend.js.map +0 -1
- package/dist/Legend/Legend.js.map +0 -1
- package/dist/Legend/LegendColorBadge.js.map +0 -1
- package/dist/Legend/ListLegend.js.map +0 -1
- package/dist/Legend/ListLegendItem.js.map +0 -1
- package/dist/Legend/TableLegend.js.map +0 -1
- package/dist/Legend/index.js.map +0 -1
- package/dist/Legend/legend-model.js.map +0 -1
- package/dist/LinksEditor/LinksEditor.js.map +0 -1
- package/dist/ModeSelector/ModeSelector.js.map +0 -1
- package/dist/ModeSelector/index.js.map +0 -1
- package/dist/OptionsEditorLayout/OptionsEditorColumn.js.map +0 -1
- package/dist/OptionsEditorLayout/OptionsEditorControl.js.map +0 -1
- package/dist/OptionsEditorLayout/OptionsEditorGrid.js.map +0 -1
- package/dist/OptionsEditorLayout/OptionsEditorGroup.js.map +0 -1
- package/dist/Overlay/Overlay.js.map +0 -1
- package/dist/Overlay/index.js.map +0 -1
- package/dist/RefreshIntervalPicker/RefreshIntervalPicker.js.map +0 -1
- package/dist/SettingsAutocomplete/SettingsAutocomplete.js.map +0 -1
- package/dist/SortSelector/SortSelector.js.map +0 -1
- package/dist/SortSelector/SortSelectorButtons.js.map +0 -1
- package/dist/SortSelector/index.js.map +0 -1
- package/dist/Table/InnerTable.js.map +0 -1
- package/dist/Table/Table.js.map +0 -1
- package/dist/Table/TableBody.js.map +0 -1
- package/dist/Table/TableCell.js.map +0 -1
- package/dist/Table/TableCheckbox.js.map +0 -1
- package/dist/Table/TableFoot.js.map +0 -1
- package/dist/Table/TableHead.js.map +0 -1
- package/dist/Table/TableHeaderCell.js.map +0 -1
- package/dist/Table/TableRow.js.map +0 -1
- package/dist/Table/VirtualizedTable.js.map +0 -1
- package/dist/Table/VirtualizedTableContainer.js.map +0 -1
- package/dist/Table/hooks/useTableKeyboardNav.js.map +0 -1
- package/dist/Table/hooks/useVirtualizedTableKeyboardNav.js.map +0 -1
- package/dist/Table/index.js.map +0 -1
- package/dist/Table/model/table-model.js.map +0 -1
- package/dist/ThresholdsEditor/ThresholdInput.js.map +0 -1
- package/dist/ThresholdsEditor/ThresholdsEditor.js.map +0 -1
- package/dist/ThresholdsEditor/index.js.map +0 -1
- package/dist/TimeRangeSelector/DateTimeRangePicker.js.map +0 -1
- package/dist/TimeRangeSelector/TimeRangeSelector.js.map +0 -1
- package/dist/TimeRangeSelector/index.js.map +0 -1
- package/dist/TimeRangeSelector/utils.js.map +0 -1
- package/dist/TimeSeriesTooltip/SeriesInfo.js.map +0 -1
- package/dist/TimeSeriesTooltip/SeriesLabelsStack.js.map +0 -1
- package/dist/TimeSeriesTooltip/SeriesMarker.js.map +0 -1
- package/dist/TimeSeriesTooltip/TimeChartTooltip.js.map +0 -1
- package/dist/TimeSeriesTooltip/TooltipContent.js.map +0 -1
- package/dist/TimeSeriesTooltip/TooltipHeader.js.map +0 -1
- package/dist/TimeSeriesTooltip/index.js.map +0 -1
- package/dist/TimeSeriesTooltip/nearby-series.js.map +0 -1
- package/dist/TimeSeriesTooltip/tooltip-model.js.map +0 -1
- package/dist/TimeSeriesTooltip/utils.js.map +0 -1
- package/dist/ToolbarIconButton/ToolbarIconButton.js.map +0 -1
- package/dist/ToolbarIconButton/index.js.map +0 -1
- package/dist/TransformsEditor/TransformEditor.js.map +0 -1
- package/dist/TransformsEditor/TransformEditorContainer.js.map +0 -1
- package/dist/TransformsEditor/TransformsEditor.js.map +0 -1
- package/dist/ValueMappingEditor/ValueMappingEditor.js.map +0 -1
- package/dist/ValueMappingEditor/ValueMappingsEditor.js.map +0 -1
- package/dist/YAxisLabel.js.map +0 -1
- package/dist/context/ChartsProvider.js.map +0 -1
- package/dist/context/SnackbarProvider.js.map +0 -1
- package/dist/context/TimeZoneProvider.js.map +0 -1
- package/dist/controls/TextField.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/model/graph.js.map +0 -1
- package/dist/model/index.js.map +0 -1
- package/dist/model/theme.js.map +0 -1
- package/dist/model/timeOption.js.map +0 -1
- package/dist/test/index.js.map +0 -1
- package/dist/test/render.js.map +0 -1
- package/dist/test-utils/theme.js.map +0 -1
- package/dist/theme/component-overrides/alert.js.map +0 -1
- package/dist/theme/component-overrides/paper.js.map +0 -1
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/palette/background.js.map +0 -1
- package/dist/theme/palette/colors/blue.js.map +0 -1
- package/dist/theme/palette/colors/common.js.map +0 -1
- package/dist/theme/palette/colors/green.js.map +0 -1
- package/dist/theme/palette/colors/grey.js.map +0 -1
- package/dist/theme/palette/colors/index.js.map +0 -1
- package/dist/theme/palette/colors/orange.js.map +0 -1
- package/dist/theme/palette/colors/purple.js.map +0 -1
- package/dist/theme/palette/colors/red.js.map +0 -1
- package/dist/theme/palette/colors/types.js.map +0 -1
- package/dist/theme/palette/error.js.map +0 -1
- package/dist/theme/palette/grey.js.map +0 -1
- package/dist/theme/palette/index.js.map +0 -1
- package/dist/theme/palette/palette-options.js.map +0 -1
- package/dist/theme/palette/primary.js.map +0 -1
- package/dist/theme/palette/secondary.js.map +0 -1
- package/dist/theme/palette/success.js.map +0 -1
- package/dist/theme/palette/text.js.map +0 -1
- package/dist/theme/palette/warning.js.map +0 -1
- package/dist/theme/theme.js.map +0 -1
- package/dist/theme/types/ThemeExtension.d.js.map +0 -1
- package/dist/theme/typography.js.map +0 -1
- package/dist/utils/axis.js.map +0 -1
- package/dist/utils/chart-actions.js.map +0 -1
- package/dist/utils/combine-sx.js.map +0 -1
- package/dist/utils/component-ids.js.map +0 -1
- package/dist/utils/format.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/mathjs.js.map +0 -1
- package/dist/utils/theme-gen.js.map +0 -1
- /package/dist/cjs/{AlignSelector → src/AlignSelector}/AlignSelector.js +0 -0
- /package/dist/cjs/{AlignSelector → src/AlignSelector}/index.js +0 -0
- /package/dist/cjs/{ColorPicker → src/ColorPicker}/ColorPicker.js +0 -0
- /package/dist/cjs/{ColorPicker → src/ColorPicker}/OptionsColorPicker.js +0 -0
- /package/dist/cjs/{ColorPicker → src/ColorPicker}/index.js +0 -0
- /package/dist/cjs/{ContentWithLegend → src/ContentWithLegend}/ContentWithLegend.js +0 -0
- /package/dist/cjs/{ContentWithLegend → src/ContentWithLegend}/index.js +0 -0
- /package/dist/cjs/{ContentWithLegend → src/ContentWithLegend}/model/content-with-legend-model.js +0 -0
- /package/dist/cjs/{DensitySelector → src/DensitySelector}/DensitySelector.js +0 -0
- /package/dist/cjs/{DensitySelector → src/DensitySelector}/index.js +0 -0
- /package/dist/cjs/{Dialog → src/Dialog}/Dialog.js +0 -0
- /package/dist/cjs/{Dialog → src/Dialog}/DiscardChangesConfirmationDialog.js +0 -0
- /package/dist/cjs/{Dialog → src/Dialog}/index.js +0 -0
- /package/dist/cjs/{DragAndDrop → src/DragAndDrop}/DragAndDropList.js +0 -0
- /package/dist/cjs/{DragAndDrop → src/DragAndDrop}/DragButton.js +0 -0
- /package/dist/cjs/{DragAndDrop → src/DragAndDrop}/DropIndicator.js +0 -0
- /package/dist/cjs/{DragAndDrop → src/DragAndDrop}/index.js +0 -0
- /package/dist/cjs/{DragAndDrop → src/DragAndDrop}/model.js +0 -0
- /package/dist/cjs/{Drawer → src/Drawer}/Drawer.js +0 -0
- /package/dist/cjs/{Drawer → src/Drawer}/index.js +0 -0
- /package/dist/cjs/{EChart → src/EChart}/EChart.js +0 -0
- /package/dist/cjs/{EChart → src/EChart}/index.js +0 -0
- /package/dist/cjs/{ErrorAlert.js → src/ErrorAlert.js} +0 -0
- /package/dist/cjs/{ErrorBoundary.js → src/ErrorBoundary.js} +0 -0
- /package/dist/cjs/{FontSizeSelector → src/FontSizeSelector}/FontSizeSelector.js +0 -0
- /package/dist/cjs/{FontSizeSelector → src/FontSizeSelector}/index.js +0 -0
- /package/dist/cjs/{FormEditor → src/FormEditor}/FormActions.js +0 -0
- /package/dist/cjs/{FormEditor → src/FormEditor}/index.js +0 -0
- /package/dist/cjs/{FormatControls → src/FormatControls}/FormatControls.js +0 -0
- /package/dist/cjs/{FormatControls → src/FormatControls}/index.js +0 -0
- /package/dist/cjs/{InfoTooltip → src/InfoTooltip}/InfoTooltip.js +0 -0
- /package/dist/cjs/{InfoTooltip → src/InfoTooltip}/index.js +0 -0
- /package/dist/cjs/{JSONEditor.js → src/JSONEditor.js} +0 -0
- /package/dist/cjs/{Legend → src/Legend}/CompactLegend.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/Legend.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/LegendColorBadge.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/ListLegend.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/ListLegendItem.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/TableLegend.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/index.js +0 -0
- /package/dist/cjs/{Legend → src/Legend}/legend-model.js +0 -0
- /package/dist/cjs/{LinksEditor → src/LinksEditor}/LinksEditor.js +0 -0
- /package/dist/cjs/{LinksEditor → src/LinksEditor}/index.js +0 -0
- /package/dist/cjs/{ModeSelector → src/ModeSelector}/ModeSelector.js +0 -0
- /package/dist/cjs/{ModeSelector → src/ModeSelector}/index.js +0 -0
- /package/dist/cjs/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorColumn.js +0 -0
- /package/dist/cjs/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorControl.js +0 -0
- /package/dist/cjs/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorGrid.js +0 -0
- /package/dist/cjs/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorGroup.js +0 -0
- /package/dist/cjs/{OptionsEditorLayout → src/OptionsEditorLayout}/index.js +0 -0
- /package/dist/cjs/{Overlay → src/Overlay}/Overlay.js +0 -0
- /package/dist/cjs/{Overlay → src/Overlay}/index.js +0 -0
- /package/dist/cjs/{RefreshIntervalPicker → src/RefreshIntervalPicker}/RefreshIntervalPicker.js +0 -0
- /package/dist/cjs/{RefreshIntervalPicker → src/RefreshIntervalPicker}/index.js +0 -0
- /package/dist/cjs/{SettingsAutocomplete → src/SettingsAutocomplete}/SettingsAutocomplete.js +0 -0
- /package/dist/cjs/{SettingsAutocomplete → src/SettingsAutocomplete}/index.js +0 -0
- /package/dist/cjs/{SortSelector → src/SortSelector}/SortSelector.js +0 -0
- /package/dist/cjs/{SortSelector → src/SortSelector}/SortSelectorButtons.js +0 -0
- /package/dist/cjs/{SortSelector → src/SortSelector}/index.js +0 -0
- /package/dist/cjs/{Table → src/Table}/InnerTable.js +0 -0
- /package/dist/cjs/{Table → src/Table}/Table.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableBody.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableCell.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableCheckbox.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableFoot.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableHead.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableHeaderCell.js +0 -0
- /package/dist/cjs/{Table → src/Table}/TableRow.js +0 -0
- /package/dist/cjs/{Table → src/Table}/VirtualizedTable.js +0 -0
- /package/dist/cjs/{Table → src/Table}/VirtualizedTableContainer.js +0 -0
- /package/dist/cjs/{Table → src/Table}/hooks/useTableKeyboardNav.js +0 -0
- /package/dist/cjs/{Table → src/Table}/hooks/useVirtualizedTableKeyboardNav.js +0 -0
- /package/dist/cjs/{Table → src/Table}/index.js +0 -0
- /package/dist/cjs/{Table → src/Table}/model/table-model.js +0 -0
- /package/dist/cjs/{ThresholdsEditor → src/ThresholdsEditor}/ThresholdInput.js +0 -0
- /package/dist/cjs/{ThresholdsEditor → src/ThresholdsEditor}/ThresholdsEditor.js +0 -0
- /package/dist/cjs/{ThresholdsEditor → src/ThresholdsEditor}/index.js +0 -0
- /package/dist/cjs/{TimeRangeSelector → src/TimeRangeSelector}/DateTimeRangePicker.js +0 -0
- /package/dist/cjs/{TimeRangeSelector → src/TimeRangeSelector}/TimeRangeSelector.js +0 -0
- /package/dist/cjs/{TimeRangeSelector → src/TimeRangeSelector}/index.js +0 -0
- /package/dist/cjs/{TimeRangeSelector → src/TimeRangeSelector}/utils.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/SeriesInfo.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/SeriesLabelsStack.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/SeriesMarker.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/TimeChartTooltip.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/TooltipContent.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/TooltipHeader.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/index.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/nearby-series.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/tooltip-model.js +0 -0
- /package/dist/cjs/{TimeSeriesTooltip → src/TimeSeriesTooltip}/utils.js +0 -0
- /package/dist/cjs/{ToolbarIconButton → src/ToolbarIconButton}/ToolbarIconButton.js +0 -0
- /package/dist/cjs/{ToolbarIconButton → src/ToolbarIconButton}/index.js +0 -0
- /package/dist/cjs/{TransformsEditor → src/TransformsEditor}/TransformEditor.js +0 -0
- /package/dist/cjs/{TransformsEditor → src/TransformsEditor}/TransformEditorContainer.js +0 -0
- /package/dist/cjs/{TransformsEditor → src/TransformsEditor}/TransformsEditor.js +0 -0
- /package/dist/cjs/{TransformsEditor → src/TransformsEditor}/index.js +0 -0
- /package/dist/cjs/{ValueMappingEditor → src/ValueMappingEditor}/ValueMappingEditor.js +0 -0
- /package/dist/cjs/{ValueMappingEditor → src/ValueMappingEditor}/ValueMappingsEditor.js +0 -0
- /package/dist/cjs/{ValueMappingEditor → src/ValueMappingEditor}/index.js +0 -0
- /package/dist/cjs/{YAxisLabel.js → src/YAxisLabel.js} +0 -0
- /package/dist/cjs/{context → src/context}/ChartsProvider.js +0 -0
- /package/dist/cjs/{context → src/context}/SnackbarProvider.js +0 -0
- /package/dist/cjs/{context → src/context}/TimeZoneProvider.js +0 -0
- /package/dist/cjs/{context → src/context}/index.js +0 -0
- /package/dist/cjs/{controls → src/controls}/TextField.js +0 -0
- /package/dist/cjs/{controls → src/controls}/index.js +0 -0
- /package/dist/cjs/{index.js → src/index.js} +0 -0
- /package/dist/cjs/{model → src/model}/graph.js +0 -0
- /package/dist/cjs/{model → src/model}/index.js +0 -0
- /package/dist/cjs/{model → src/model}/theme.js +0 -0
- /package/dist/cjs/{model → src/model}/timeOption.js +0 -0
- /package/dist/cjs/{test → src/test}/index.js +0 -0
- /package/dist/cjs/{test → src/test}/render.js +0 -0
- /package/dist/cjs/{test → src/test}/setup-tests.js +0 -0
- /package/dist/cjs/{test-utils → src/test-utils}/index.js +0 -0
- /package/dist/cjs/{test-utils → src/test-utils}/theme.js +0 -0
- /package/dist/cjs/{theme → src/theme}/component-overrides/alert.js +0 -0
- /package/dist/cjs/{theme → src/theme}/component-overrides/paper.js +0 -0
- /package/dist/cjs/{theme → src/theme}/index.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/background.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/blue.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/common.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/green.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/grey.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/index.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/orange.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/purple.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/red.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/colors/types.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/error.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/grey.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/index.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/palette-options.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/primary.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/secondary.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/success.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/text.js +0 -0
- /package/dist/cjs/{theme → src/theme}/palette/warning.js +0 -0
- /package/dist/cjs/{theme → src/theme}/theme.js +0 -0
- /package/dist/cjs/{theme → src/theme}/types/ThemeExtension.d.js +0 -0
- /package/dist/cjs/{theme → src/theme}/typography.js +0 -0
- /package/dist/cjs/{utils → src/utils}/axis.js +0 -0
- /package/dist/cjs/{utils → src/utils}/chart-actions.js +0 -0
- /package/dist/cjs/{utils → src/utils}/combine-sx.js +0 -0
- /package/dist/cjs/{utils → src/utils}/component-ids.js +0 -0
- /package/dist/cjs/{utils → src/utils}/format.js +0 -0
- /package/dist/cjs/{utils → src/utils}/index.js +0 -0
- /package/dist/cjs/{utils → src/utils}/mathjs.js +0 -0
- /package/dist/cjs/{utils → src/utils}/theme-gen.js +0 -0
- /package/dist/{AlignSelector → src/AlignSelector}/AlignSelector.js +0 -0
- /package/dist/{AlignSelector → src/AlignSelector}/index.js +0 -0
- /package/dist/{ColorPicker → src/ColorPicker}/ColorPicker.js +0 -0
- /package/dist/{ColorPicker → src/ColorPicker}/OptionsColorPicker.js +0 -0
- /package/dist/{ColorPicker → src/ColorPicker}/index.js +0 -0
- /package/dist/{ContentWithLegend → src/ContentWithLegend}/ContentWithLegend.js +0 -0
- /package/dist/{ContentWithLegend → src/ContentWithLegend}/index.js +0 -0
- /package/dist/{ContentWithLegend → src/ContentWithLegend}/model/content-with-legend-model.js +0 -0
- /package/dist/{DensitySelector → src/DensitySelector}/DensitySelector.js +0 -0
- /package/dist/{DensitySelector → src/DensitySelector}/index.js +0 -0
- /package/dist/{Dialog → src/Dialog}/Dialog.js +0 -0
- /package/dist/{Dialog → src/Dialog}/DiscardChangesConfirmationDialog.js +0 -0
- /package/dist/{Dialog → src/Dialog}/index.js +0 -0
- /package/dist/{DragAndDrop → src/DragAndDrop}/DragAndDropList.js +0 -0
- /package/dist/{DragAndDrop → src/DragAndDrop}/DragButton.js +0 -0
- /package/dist/{DragAndDrop → src/DragAndDrop}/DropIndicator.js +0 -0
- /package/dist/{DragAndDrop → src/DragAndDrop}/index.js +0 -0
- /package/dist/{DragAndDrop → src/DragAndDrop}/model.js +0 -0
- /package/dist/{Drawer → src/Drawer}/Drawer.js +0 -0
- /package/dist/{Drawer → src/Drawer}/index.js +0 -0
- /package/dist/{EChart → src/EChart}/EChart.js +0 -0
- /package/dist/{EChart → src/EChart}/index.js +0 -0
- /package/dist/{ErrorAlert.js → src/ErrorAlert.js} +0 -0
- /package/dist/{ErrorBoundary.js → src/ErrorBoundary.js} +0 -0
- /package/dist/{FontSizeSelector → src/FontSizeSelector}/FontSizeSelector.js +0 -0
- /package/dist/{FontSizeSelector → src/FontSizeSelector}/index.js +0 -0
- /package/dist/{FormEditor → src/FormEditor}/FormActions.js +0 -0
- /package/dist/{FormEditor → src/FormEditor}/index.js +0 -0
- /package/dist/{FormatControls → src/FormatControls}/FormatControls.js +0 -0
- /package/dist/{FormatControls → src/FormatControls}/index.js +0 -0
- /package/dist/{InfoTooltip → src/InfoTooltip}/InfoTooltip.js +0 -0
- /package/dist/{InfoTooltip → src/InfoTooltip}/index.js +0 -0
- /package/dist/{JSONEditor.js → src/JSONEditor.js} +0 -0
- /package/dist/{Legend → src/Legend}/CompactLegend.js +0 -0
- /package/dist/{Legend → src/Legend}/Legend.js +0 -0
- /package/dist/{Legend → src/Legend}/LegendColorBadge.js +0 -0
- /package/dist/{Legend → src/Legend}/ListLegend.js +0 -0
- /package/dist/{Legend → src/Legend}/ListLegendItem.js +0 -0
- /package/dist/{Legend → src/Legend}/TableLegend.js +0 -0
- /package/dist/{Legend → src/Legend}/index.js +0 -0
- /package/dist/{Legend → src/Legend}/legend-model.js +0 -0
- /package/dist/{LinksEditor → src/LinksEditor}/LinksEditor.js +0 -0
- /package/dist/{LinksEditor → src/LinksEditor}/index.js +0 -0
- /package/dist/{ModeSelector → src/ModeSelector}/ModeSelector.js +0 -0
- /package/dist/{ModeSelector → src/ModeSelector}/index.js +0 -0
- /package/dist/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorColumn.js +0 -0
- /package/dist/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorControl.js +0 -0
- /package/dist/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorGrid.js +0 -0
- /package/dist/{OptionsEditorLayout → src/OptionsEditorLayout}/OptionsEditorGroup.js +0 -0
- /package/dist/{OptionsEditorLayout → src/OptionsEditorLayout}/index.js +0 -0
- /package/dist/{Overlay → src/Overlay}/Overlay.js +0 -0
- /package/dist/{Overlay → src/Overlay}/index.js +0 -0
- /package/dist/{RefreshIntervalPicker → src/RefreshIntervalPicker}/RefreshIntervalPicker.js +0 -0
- /package/dist/{RefreshIntervalPicker → src/RefreshIntervalPicker}/index.js +0 -0
- /package/dist/{SettingsAutocomplete → src/SettingsAutocomplete}/SettingsAutocomplete.js +0 -0
- /package/dist/{SettingsAutocomplete → src/SettingsAutocomplete}/index.js +0 -0
- /package/dist/{SortSelector → src/SortSelector}/SortSelector.js +0 -0
- /package/dist/{SortSelector → src/SortSelector}/SortSelectorButtons.js +0 -0
- /package/dist/{SortSelector → src/SortSelector}/index.js +0 -0
- /package/dist/{Table → src/Table}/InnerTable.js +0 -0
- /package/dist/{Table → src/Table}/Table.js +0 -0
- /package/dist/{Table → src/Table}/TableBody.js +0 -0
- /package/dist/{Table → src/Table}/TableCell.js +0 -0
- /package/dist/{Table → src/Table}/TableCheckbox.js +0 -0
- /package/dist/{Table → src/Table}/TableFoot.js +0 -0
- /package/dist/{Table → src/Table}/TableHead.js +0 -0
- /package/dist/{Table → src/Table}/TableHeaderCell.js +0 -0
- /package/dist/{Table → src/Table}/TableRow.js +0 -0
- /package/dist/{Table → src/Table}/VirtualizedTable.js +0 -0
- /package/dist/{Table → src/Table}/VirtualizedTableContainer.js +0 -0
- /package/dist/{Table → src/Table}/hooks/useTableKeyboardNav.js +0 -0
- /package/dist/{Table → src/Table}/hooks/useVirtualizedTableKeyboardNav.js +0 -0
- /package/dist/{Table → src/Table}/index.js +0 -0
- /package/dist/{Table → src/Table}/model/table-model.js +0 -0
- /package/dist/{ThresholdsEditor → src/ThresholdsEditor}/ThresholdInput.js +0 -0
- /package/dist/{ThresholdsEditor → src/ThresholdsEditor}/ThresholdsEditor.js +0 -0
- /package/dist/{ThresholdsEditor → src/ThresholdsEditor}/index.js +0 -0
- /package/dist/{TimeRangeSelector → src/TimeRangeSelector}/DateTimeRangePicker.js +0 -0
- /package/dist/{TimeRangeSelector → src/TimeRangeSelector}/TimeRangeSelector.js +0 -0
- /package/dist/{TimeRangeSelector → src/TimeRangeSelector}/index.js +0 -0
- /package/dist/{TimeRangeSelector → src/TimeRangeSelector}/utils.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/SeriesInfo.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/SeriesLabelsStack.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/SeriesMarker.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/TimeChartTooltip.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/TooltipContent.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/TooltipHeader.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/index.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/nearby-series.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/tooltip-model.js +0 -0
- /package/dist/{TimeSeriesTooltip → src/TimeSeriesTooltip}/utils.js +0 -0
- /package/dist/{ToolbarIconButton → src/ToolbarIconButton}/ToolbarIconButton.js +0 -0
- /package/dist/{ToolbarIconButton → src/ToolbarIconButton}/index.js +0 -0
- /package/dist/{TransformsEditor → src/TransformsEditor}/TransformEditor.js +0 -0
- /package/dist/{TransformsEditor → src/TransformsEditor}/TransformEditorContainer.js +0 -0
- /package/dist/{TransformsEditor → src/TransformsEditor}/TransformsEditor.js +0 -0
- /package/dist/{TransformsEditor → src/TransformsEditor}/index.js +0 -0
- /package/dist/{ValueMappingEditor → src/ValueMappingEditor}/ValueMappingEditor.js +0 -0
- /package/dist/{ValueMappingEditor → src/ValueMappingEditor}/ValueMappingsEditor.js +0 -0
- /package/dist/{ValueMappingEditor → src/ValueMappingEditor}/index.js +0 -0
- /package/dist/{YAxisLabel.js → src/YAxisLabel.js} +0 -0
- /package/dist/{context → src/context}/ChartsProvider.js +0 -0
- /package/dist/{context → src/context}/SnackbarProvider.js +0 -0
- /package/dist/{context → src/context}/TimeZoneProvider.js +0 -0
- /package/dist/{context → src/context}/index.js +0 -0
- /package/dist/{controls → src/controls}/TextField.js +0 -0
- /package/dist/{controls → src/controls}/index.js +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{model → src/model}/graph.js +0 -0
- /package/dist/{model → src/model}/index.js +0 -0
- /package/dist/{model → src/model}/theme.js +0 -0
- /package/dist/{model → src/model}/timeOption.js +0 -0
- /package/dist/{test → src/test}/index.js +0 -0
- /package/dist/{test → src/test}/render.js +0 -0
- /package/dist/{test → src/test}/setup-tests.js +0 -0
- /package/dist/{test-utils → src/test-utils}/index.js +0 -0
- /package/dist/{test-utils → src/test-utils}/theme.js +0 -0
- /package/dist/{theme → src/theme}/component-overrides/alert.js +0 -0
- /package/dist/{theme → src/theme}/component-overrides/paper.js +0 -0
- /package/dist/{theme → src/theme}/index.js +0 -0
- /package/dist/{theme → src/theme}/palette/background.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/blue.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/common.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/green.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/grey.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/index.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/orange.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/purple.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/red.js +0 -0
- /package/dist/{theme → src/theme}/palette/colors/types.js +0 -0
- /package/dist/{theme → src/theme}/palette/error.js +0 -0
- /package/dist/{theme → src/theme}/palette/grey.js +0 -0
- /package/dist/{theme → src/theme}/palette/index.js +0 -0
- /package/dist/{theme → src/theme}/palette/palette-options.js +0 -0
- /package/dist/{theme → src/theme}/palette/primary.js +0 -0
- /package/dist/{theme → src/theme}/palette/secondary.js +0 -0
- /package/dist/{theme → src/theme}/palette/success.js +0 -0
- /package/dist/{theme → src/theme}/palette/text.js +0 -0
- /package/dist/{theme → src/theme}/palette/warning.js +0 -0
- /package/dist/{theme → src/theme}/theme.js +0 -0
- /package/dist/{theme → src/theme}/types/ThemeExtension.d.js +0 -0
- /package/dist/{theme → src/theme}/typography.js +0 -0
- /package/dist/{utils → src/utils}/axis.js +0 -0
- /package/dist/{utils → src/utils}/chart-actions.js +0 -0
- /package/dist/{utils → src/utils}/combine-sx.js +0 -0
- /package/dist/{utils → src/utils}/component-ids.js +0 -0
- /package/dist/{utils → src/utils}/format.js +0 -0
- /package/dist/{utils → src/utils}/index.js +0 -0
- /package/dist/{utils → src/utils}/mathjs.js +0 -0
- /package/dist/{utils → src/utils}/theme-gen.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/ListLegend.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAgC,MAAM,gBAAgB,CAAC;AAEnG,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,uBAAuB,CAAC;IACvC,iBAAiB,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,eAAe,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACpD,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,eAAe,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"ListLegend.d.ts","sourceRoot":"","sources":["../../src/Legend/ListLegend.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAkB,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAgC,MAAM,gBAAgB,CAAC;AAEnG,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,uBAAuB,CAAC;IACvC,iBAAiB,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,eAAe,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACpD,cAAc,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,EAAE,eAAe,GAAG,YAAY,CA6BhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/AlignSelector/AlignSelector.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button, ButtonGroup, ButtonGroupProps } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport type AlignOption = 'left' | 'center' | 'right';\n\nexport interface AlignSelectorProps extends Omit<ButtonGroupProps, 'onChange'> {\n onChange: (align: AlignOption) => void;\n value?: AlignOption;\n}\n\nexport function AlignSelector({ onChange, value = 'left', ...props }: AlignSelectorProps): ReactElement {\n const handleSortChange = (option: AlignOption): void => {\n onChange(option);\n };\n\n return (\n <ButtonGroup aria-label=\"Alignement\" {...props}>\n <Button key=\"left\" onClick={() => handleSortChange('left')} variant={value === 'left' ? 'contained' : 'outlined'}>\n Left\n </Button>\n <Button\n key=\"center\"\n onClick={() => handleSortChange('center')}\n variant={value === 'center' ? 'contained' : 'outlined'}\n >\n Center\n </Button>\n <Button\n key=\"right\"\n onClick={() => handleSortChange('right')}\n variant={value === 'right' ? 'contained' : 'outlined'}\n >\n Right\n </Button>\n </ButtonGroup>\n );\n}\n"],"names":["Button","ButtonGroup","AlignSelector","onChange","value","props","handleSortChange","option","aria-label","onClick","variant"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,EAAEC,WAAW,QAA0B,gBAAgB;AAUtE,OAAO,SAASC,cAAc,EAAEC,QAAQ,EAAEC,QAAQ,MAAM,EAAE,GAAGC,OAA2B;IACtF,MAAMC,mBAAmB,CAACC;QACxBJ,SAASI;IACX;IAEA,qBACE,MAACN;QAAYO,cAAW;QAAc,GAAGH,KAAK;;0BAC5C,KAACL;gBAAkBS,SAAS,IAAMH,iBAAiB;gBAASI,SAASN,UAAU,SAAS,cAAc;0BAAY;eAAtG;0BAGZ,KAACJ;gBAECS,SAAS,IAAMH,iBAAiB;gBAChCI,SAASN,UAAU,WAAW,cAAc;0BAC7C;eAHK;0BAMN,KAACJ;gBAECS,SAAS,IAAMH,iBAAiB;gBAChCI,SAASN,UAAU,UAAU,cAAc;0BAC5C;eAHK;;;AAQZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/AlignSelector/index.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './AlignSelector';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ColorPicker/ColorPicker.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, Stack, TextField } from '@mui/material';\nimport { ChangeEvent, ReactElement, useState } from 'react';\nimport { HexColorPicker } from 'react-colorful';\nimport CircleIcon from 'mdi-material-ui/Circle';\nimport DeleteIcon from 'mdi-material-ui/Delete';\n\ninterface ColorPickerProps {\n color: string;\n onChange?: (color: string) => void;\n onClear?: () => void;\n /**\n * Preset color palette\n */\n palette?: string[];\n}\n\nexport const ColorPicker = ({ color, onChange, onClear, palette }: ColorPickerProps): ReactElement => {\n // value is the visible value for the controlled text input\n const [value, setValue] = useState(color);\n\n const handleColorChange = (color: string): void => {\n setValue(color);\n onChange?.(color);\n };\n\n // we should update this if https://github.com/omgovich/react-colorful/issues/157 is resolved\n const handleInputChange = (e: ChangeEvent<HTMLInputElement>): void => {\n const inputValue = e.target.value.replace(/([^0-9A-F]+)/gi, '').substring(0, 8);\n setValue(`#${inputValue}`); // always prefix input value with # to indicate hex format\n // only set color if input value is a valid hex color\n if (isValidHex(e.target.value)) {\n onChange?.(e.target.value);\n }\n };\n\n return (\n <Stack spacing={1}>\n <HexColorPicker color={color} onChange={handleColorChange} style={{ width: '100%' }} />\n <Stack direction=\"row\" flexWrap=\"wrap\" justifyContent=\"space-evenly\" width=\"200px\">\n {palette &&\n palette.map((color, i) => (\n <IconButton\n key={i}\n size=\"small\"\n aria-label={`change color to ${color}`}\n sx={{ color }}\n onClick={() => handleColorChange(color)}\n >\n <CircleIcon />\n </IconButton>\n ))}\n </Stack>\n <Stack direction=\"row\" gap={1} alignItems=\"center\">\n <TextField\n inputProps={{ 'aria-label': 'enter hex color' }}\n fullWidth\n value={value}\n onChange={handleInputChange}\n />\n {onClear && (\n <IconButton onClick={onClear}>\n <DeleteIcon />\n </IconButton>\n )}\n </Stack>\n </Stack>\n );\n};\n\nconst isValidHex = (value: string, alpha?: boolean): boolean => {\n const matcher = /^#?([0-9A-F]{3,8})$/i;\n const match = matcher.exec(value);\n const length = match && match[1] ? match[1].length : 0;\n return (\n length === 3 || // '#rgb' format\n length === 6 || // '#rrggbb' format\n (!!alpha && length === 4) || // '#rgba' format\n (!!alpha && length === 8) // '#rrggbbaa' format\n );\n};\n"],"names":["IconButton","Stack","TextField","useState","HexColorPicker","CircleIcon","DeleteIcon","ColorPicker","color","onChange","onClear","palette","value","setValue","handleColorChange","handleInputChange","e","inputValue","target","replace","substring","isValidHex","spacing","style","width","direction","flexWrap","justifyContent","map","i","size","aria-label","sx","onClick","gap","alignItems","inputProps","fullWidth","alpha","matcher","match","exec","length"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAU,EAAEC,KAAK,EAAEC,SAAS,QAAQ,gBAAgB;AAC7D,SAAoCC,QAAQ,QAAQ,QAAQ;AAC5D,SAASC,cAAc,QAAQ,iBAAiB;AAChD,OAAOC,gBAAgB,yBAAyB;A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;IACjC,MAAMC,UAAU;IAChB,MAAMC,QAAQD,QAAQE,IAAI,CAAC7B;IAC3B,MAAM8B,SAASF,SAASA,KAAK,CAAC,EAAE,GAAGA,KAAK,CAAC,EAAE,CAACE,MAAM,GAAG;IACrD,OACEA,WAAW,KAAK,gBAAgB;IAChCA,WAAW,KAAK,mBAAmB;IAClC,CAAC,CAACJ,SAASI,WAAW,KAAM,iBAAiB;IAC7C,CAAC,CAACJ,SAASI,WAAW,EAAG,qBAAqB;;AAEnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ColorPicker/OptionsColorPicker.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useState, MouseEvent } from 'react';\nimport { styled, IconButton, Popover } from '@mui/material';\nimport CircleIcon from 'mdi-material-ui/Circle';\nimport { useChartsTheme } from '../context';\nimport { ColorPicker } from './ColorPicker';\n\nexport interface OptionsColorPickerProps {\n label: string;\n color: string;\n onColorChange: (color: string) => void;\n onClear?: () => void;\n}\n\nexport function OptionsColorPicker({ label, color, onColorChange, onClear }: OptionsColorPickerProps): ReactElement {\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);\n const isOpen = Boolean(anchorEl);\n\n const openColorPicker = (event: MouseEvent<HTMLButtonElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n const closeColorPicker = (): void => {\n setAnchorEl(null);\n };\n\n const {\n thresholds: { defaultColor, palette },\n } = useChartsTheme();\n\n return (\n <>\n <ColorIconButton\n size=\"small\"\n aria-label={`change ${label} color`}\n isSelected={isOpen}\n iconColor={color}\n onClick={openColorPicker}\n >\n <CircleIcon />\n </ColorIconButton>\n <Popover\n data-testid=\"options color picker\"\n open={isOpen}\n anchorEl={anchorEl}\n onClose={closeColorPicker}\n slotProps={{ paper: { sx: { padding: (theme) => theme.spacing(2) } } }}\n anchorOrigin={{\n vertical: 'top',\n horizontal: 'left',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'right',\n }}\n >\n <ColorPicker color={color} palette={[defaultColor, ...palette]} onChange={onColorChange} onClear={onClear} />\n </Popover>\n </>\n );\n}\n\nconst ColorIconButton = styled(IconButton, {\n shouldForwardProp: (props) => props !== 'isSelected' && props !== 'iconColor',\n})<{\n iconColor?: string;\n isSelected?: boolean;\n}>(({ iconColor, isSelected }) => ({\n backgroundColor: isSelected && iconColor ? `${iconColor}3F` : 'undefined', // 3F represents 25% opacity\n color: iconColor,\n}));\n"],"names":["useState","styled","IconButton","Popover","CircleIcon","useChartsTheme","ColorPicker","OptionsColorPicker","label","color","onColorChange","onClear","anchorEl","setAnchorEl","isOpen","Boolean","openColorPicker","event","currentTarget","closeColorPicker","thresholds","defaultColor","palette","ColorIconButton","size","aria-label","isSelected","iconColor","onClick","data-testid","open","onClose","slotProps","paper","sx","padding","theme","spacing","anchorOrigin","vertical","horizontal","transformOrigin","onChange","shouldForwardProp","props","backgroundColor"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAAuBA,QAAQ,QAAoB,QAAQ;AAC3D,SAASC,MAAM,EAAEC,UAAU,EAAEC,OAAO,QAAQ,gBAAgB;AAC5D,OAAOC,gBAAgB,yBAAyB;AAChD,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,WAAW,QAAQ,gBAAgB;AAS5C,OAAO,SAASC,mBAAmB,EAAEC,KAAK,EAAEC,KAAK,EAAEC,aAAa,EAAEC,OAAO,EAA2B;IAClG,MAAM,CAACC,UAAUC,YAAY,GAAGb,SAAmC;IACnE,MAAMc,SAASC,QAAQH;IAEvB,MAAMI,kBAAkB,CAACC;QACvBJ,YAAYI,MAAMC,aAAa;IACjC;IAEA,MAAMC,mBAAmB;QACvBN,YAAY;IACd;IAEA,MAAM,EACJO,YAAY,EAAEC,YAAY,EAAEC,OAAO,EAAE,EACtC,GAAGjB;IAEJ,qBACE;;0BACE,KAACkB;gBACCC,MAAK;gBACLC,cAAY,CAAC,OAAO,EAAEjB,MAAM,MAAM,CAAC;gBACnCkB,YAAYZ;gBACZa,WAAWlB;gBACXmB,SAASZ;0BAET,cAAA,KAACZ;;0BAEH,KAACD;gBACC0B,eAAY;gBACZC,MAAMhB;gBACNF,UAAUA;gBACVmB,SAASZ;gBACTa,WAAW;oBAAEC,OAAO;wBAAEC,IAAI;4BAAEC,SAAS,CAACC,QAAUA,MAAMC,OAAO,CAAC;wBAAG;oBAAE;gBAAE;gBACrEC,cAAc;oBACZC,UAAU;oBACVC,YAAY;gBACd;gBACAC,iBAAiB;oBACfF,UAAU;oBACVC,YAAY;gBACd;0BAEA,cAAA,KAAClC;oBAAYG,OAAOA;oBAAOa,SAAS;wBAACD;2BAAiBC;qBAAQ;oBAAEoB,UAAUhC;oBAAeC,SAASA;;;;;AAI1G;AAEA,MAAMY,kBAAkBtB,OAAOC,YAAY;IACzCyC,mBAAmB,CAACC,QAAUA,UAAU,gBAAgBA,UAAU;AACpE,GAGG,CAAC,EAAEjB,SAAS,EAAED,UAAU,EAAE,GAAM,CAAA;QACjCmB,iBAAiBnB,cAAcC,YAAY,GAAGA,UAAU,EAAE,CAAC,GAAG;QAC9DlB,OAAOkB;IACT,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ColorPicker/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColorPicker';\nexport * from './OptionsColorPicker';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,gBAAgB;AAC9B,cAAc,uBAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/ContentWithLegend/ContentWithLegend.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement } from 'react';\nimport { Box, useTheme } from '@mui/material';\nimport { getLegendSize } from '@perses-dev/core';\nimport { Legend } from '../Legend';\nimport { ContentWithLegendProps, getContentWithLegendLayout } from './model/content-with-legend-model';\n\n/**\n * Component to help lay out content alongside a `Legend` component based on the\n * configuration of the legend.\n *\n * See the documentation for the `Legend` component for more details about the\n * features and configuration of the legend.\n */\nexport function ContentWithLegend({\n children,\n legendProps,\n width,\n height,\n spacing = 0,\n legendSize,\n minChildrenWidth = 100,\n minChildrenHeight = 100,\n}: ContentWithLegendProps): ReactElement {\n const theme = useTheme();\n const { content, legend, margin } = getContentWithLegendLayout({\n width,\n height,\n legendProps,\n minChildrenHeight,\n minChildrenWidth,\n spacing,\n theme,\n legendSize: getLegendSize(legendSize),\n });\n\n return (\n <Box\n style={{\n width,\n height,\n }}\n sx={{\n position: 'relative',\n overflow: 'hidden',\n }}\n >\n <Box\n style={{\n width: content.width,\n height: content.height,\n }}\n sx={{\n marginRight: `${margin.right}px`,\n marginBottom: `${margin.bottom}px`,\n }}\n >\n {typeof children === 'function' ? children({ width: content.width, height: content.height }) : children}\n </Box>\n {legendProps && legend.show && <Legend {...legendProps} height={legend.height} width={legend.width} />}\n </Box>\n );\n}\n"],"names":["Box","useTheme","getLegendSize","Legend","getContentWithLegendLayout","ContentWithLegend","children","legendProps","width","height","spacing","legendSize","minChildrenWidth","minChildrenHeight","theme","content","legend","margin","style","sx","position","overflow","marginRight","right","marginBottom","bottom","show"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,GAAG,EAAEC,QAAQ,QAAQ,gBAAgB;AAC9C,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,YAAY;AACnC,SAAiCC,0BAA0B,QAAQ,oCAAoC;AAEvG;;;;;;CAMC,GACD,OAAO,SAASC,kBAAkB,EAChCC,QAAQ,EACRC,WAAW,EACXC,KAAK,EACLC,MAAM,EACNC,UAAU,CAAC,EACXC,UAAU,EACVC,mBAAmB,GAAG,EACtBC,oBAAoB,GAAG,EACA;IACvB,MAAMC,QAAQb;IACd,MAAM,EAAEc,OAAO,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGb,2BAA2B;QAC7DI;QACAC;QACAF;QACAM;QACAD;QACAF;QACAI;QACAH,YAAYT,cAAcS;IAC5B;IAEA,qBACE,MAACX;QACCkB,OAAO;YACLV;YACAC;QACF;QACAU,IAAI;YACFC,UAAU;YACVC,UAAU;QACZ;;0BAEA,KAACrB;gBACCkB,OAAO;oBACLV,OAAOO,QAAQP,KAAK;oBACpBC,QAAQM,QAAQN,MAAM;gBACxB;gBACAU,IAAI;oBACFG,aAAa,GAAGL,OAAOM,KAAK,CAAC,EAAE,CAAC;oBAChCC,cAAc,GAAGP,OAAOQ,MAAM,CAAC,EAAE,CAAC;gBACpC;0BAEC,OAAOnB,aAAa,aAAaA,SAAS;oBAAEE,OAAOO,QAAQP,KAAK;oBAAEC,QAAQM,QAAQN,MAAM;gBAAC,KAAKH;;YAEhGC,eAAeS,OAAOU,IAAI,kBAAI,KAACvB;gBAAQ,GAAGI,WAAW;gBAAEE,QAAQO,OAAOP,MAAM;gBAAED,OAAOQ,OAAOR,KAAK;;;;AAGxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/ContentWithLegend/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ContentWithLegend';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,sBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/ContentWithLegend/model/content-with-legend-model.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Theme } from '@mui/material';\nimport { LegendPositions, getLegendMode, LegendSize } from '@perses-dev/core';\nimport { LegendProps } from '../../Legend';\nimport { getTableCellLayout } from '../../Table';\n\ntype Dimensions = {\n width: number;\n height: number;\n};\n\nexport interface ContentWithLegendProps {\n /**\n * Width of the overall component layout in pixels.\n */\n width: number;\n /**\n * Height of overall component layout in pixels.\n */\n height: number;\n /**\n * Child content to render next to the legend. May be a react node or a\n * function that returns a react node. The function provides the expected\n * height and width for the content, which can be useful for passing down\n * to chart components.\n */\n children: React.ReactNode | (({ width, height }: Dimensions) => React.ReactNode);\n\n /**\n * Size used for the legend.\n *\n * @default 'medium'\n */\n legendSize?: LegendSize;\n\n /**\n * Props to configure the legend. If not set, the content is rendered without\n * a legend.\n */\n legendProps?: Omit<LegendProps, 'width' | 'height'>;\n\n /**\n * Space to put between the children and the legend in pixels.\n */\n spacing?: number;\n\n /**\n * Minimum width required for the content specified by the `children` prop.\n * If this width cannot be maintained with a right positioned legend, the\n * legend will not be shown.\n */\n minChildrenWidth?: number;\n\n /**\n * Minimum height required for the content specified by the `children` prop.\n * If this width cannot be maintained with a bottom positioned legend, the\n * legend will not be shown.\n */\n minChildrenHeight?: number;\n}\n\nexport interface ContentWithLegendLayoutOpts\n extends Required<Omit<ContentWithLegendProps, 'children' | 'legendProps'>> {\n legendProps?: ContentWithLegendProps['legendProps'];\n theme: Theme;\n}\n\nexport interface ContentWithLegendLayout {\n legend: Dimensions & {\n show: boolean;\n };\n content: Dimensions;\n margin: {\n right: number;\n bottom: number;\n };\n}\n\ntype LegendSizeConfig = Record<LegendSize, Record<LegendPositions, number>>;\n\nexport const TABLE_LEGEND_SIZE: LegendSizeConfig = {\n medium: {\n // 5 rows plus header. Value to be multiplied by row height in pixels.\n bottom: 6,\n\n // Pixel value\n right: 250,\n },\n small: {\n // 3 rows plus header. Value to be multiplied by row height in pixels.\n bottom: 4,\n\n // Pixel value\n right: 150,\n },\n};\n\nconst PANEL_HEIGHT_LG_BREAKPOINT = 300;\nconst LEGEND_HEIGHT_SM = 40;\nconst LEGEND_HEIGHT_LG = 100;\n\n/**\n * Returns information for laying out content alongside a legend.\n */\nexport function getContentWithLegendLayout({\n width,\n height,\n legendProps,\n legendSize,\n minChildrenHeight,\n minChildrenWidth,\n spacing,\n theme,\n}: ContentWithLegendLayoutOpts): ContentWithLegendLayout {\n const legendOptions = legendProps?.options;\n const hasLegend = !!legendOptions;\n\n const noLegendLayout: ContentWithLegendLayout = {\n legend: {\n show: false,\n width: 0,\n height: 0,\n },\n content: {\n width,\n height,\n },\n margin: {\n right: 0,\n bottom: 0,\n },\n };\n\n if (!hasLegend) {\n return noLegendLayout;\n }\n\n const { position } = legendOptions;\n const mode = getLegendMode(legendOptions.mode);\n\n let legendWidth;\n let legendHeight;\n\n if (mode === 'list') {\n // TODO: normalize list to share similar height options as the table\n // when we add more size options.\n legendWidth = position === 'right' ? 200 : width;\n\n // TODO: account for number of legend items returned when adjusting legend spacing\n legendHeight = LEGEND_HEIGHT_SM;\n if (position === 'right') {\n legendHeight = height;\n } else if (height >= PANEL_HEIGHT_LG_BREAKPOINT) {\n legendHeight = LEGEND_HEIGHT_LG;\n }\n } else {\n // Table mode\n\n const tableLayout = getTableCellLayout(theme, 'compact');\n\n const tableColumns = legendProps?.tableProps?.columns || [];\n const columnsWidth = tableColumns.reduce((total, col) => {\n if (typeof col.width === 'number') {\n total += col.width;\n }\n return total;\n }, 0);\n\n legendWidth = position === 'right' ? TABLE_LEGEND_SIZE[legendSize]['right'] + columnsWidth : width;\n\n // Use the smaller of the size-based row count or the number of legend items + 1 for the header.\n const rowsToShow = Math.min(TABLE_LEGEND_SIZE[legendSize]['bottom'], legendProps.data.length + 1);\n legendHeight = position === 'bottom' ? rowsToShow * tableLayout.height : height;\n }\n\n const contentWidth = position === 'right' ? width - legendWidth - spacing : width;\n const contentHeight = position === 'bottom' ? height - legendHeight - spacing : height;\n\n if (\n (position === 'right' && contentWidth < minChildrenWidth) ||\n (position === 'bottom' && contentHeight < minChildrenHeight)\n ) {\n // Legend does not fit. Just show the content.\n return noLegendLayout;\n }\n\n return {\n legend: {\n width: legendWidth,\n height: legendHeight,\n show: true,\n },\n content: {\n width: contentWidth,\n height: contentHeight,\n },\n margin: {\n right: position === 'right' ? spacing : 0,\n bottom: position === 'bottom' ? spacing : 0,\n },\n };\n}\n"],"names":["getLegendMode","getTableCellLayout","TABLE_LEGEND_SIZE","medium","bottom","right","small","PANEL_HEIGHT_LG_BREAKPOINT","LEGEND_HEIGHT_SM","LEGEND_HEIGHT_LG","getContentWithLegendLayout","width","height","legendProps","legendSize","minChildrenHeight","minChildrenWidth","spacing","theme","legendOptions","options","hasLegend","noLegendLayout","legend","show","content","margin","position","mode","legendWidth","legendHeight","tableLayout","tableColumns","tableProps","columns","columnsWidth","reduce","total","col","rowsToShow","Math","min","data","length","contentWidth","contentHeight"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAA0BA,aAAa,QAAoB,mBAAmB;AAE9E,SAASC,kBAAkB,QAAQ,cAAc;AA4EjD,OAAO,MAAMC,oBAAsC;IACjDC,QAAQ;QACN,sEAAsE;QACtEC,QAAQ;QAER,cAAc;QACdC,OAAO;IACT;IACAC,OAAO;QACL,sEAAsE;QACtE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4B,aAAaC,KAAKC,GAAG,CAACvC,iBAAiB,CAACY,WAAW,CAAC,SAAS,EAAED,YAAY6B,IAAI,CAACC,MAAM,GAAG;QAC/Fb,eAAeH,aAAa,WAAWY,aAAaR,YAAYnB,MAAM,GAAGA;IAC3E;IAEA,MAAMgC,eAAejB,aAAa,UAAUhB,QAAQkB,cAAcZ,UAAUN;IAC5E,MAAMkC,gBAAgBlB,aAAa,WAAWf,SAASkB,eAAeb,UAAUL;IAEhF,IACE,AAACe,aAAa,WAAWiB,eAAe5B,oBACvCW,aAAa,YAAYkB,gBAAgB9B,mBAC1C;QACA,8CAA8C;QAC9C,OAAOO;IACT;IAEA,OAAO;QACLC,QAAQ;YACNZ,OAAOkB;YACPjB,QAAQkB;YACRN,MAAM;QACR;QACAC,SAAS;YACPd,OAAOiC;YACPhC,QAAQiC;QACV;QACAnB,QAAQ;YACNrB,OAAOsB,aAAa,UAAUV,UAAU;YACxCb,QAAQuB,aAAa,WAAWV,UAAU;QAC5C;IACF;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DensitySelector/DensitySelector.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement } from 'react';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst DENSITY_OPTIONS: Array<{ id: DensityOption; label: string }> = [\n { id: 'compact', label: 'Compact' },\n { id: 'standard', label: 'Standard' },\n { id: 'comfortable', label: 'Comfortable' },\n];\n\nexport type DensityOption = 'compact' | 'standard' | 'comfortable';\n\nexport interface DensitySelectorProps {\n onChange: (density: DensityOption) => void;\n value?: DensityOption;\n}\n\nexport function DensitySelector({ onChange, value = 'standard' }: DensitySelectorProps): ReactElement {\n const handleSortChange = (_: unknown, { id }: { id: DensityOption }): void => {\n onChange(id);\n };\n\n return (\n <OptionsEditorControl\n label=\"Density\"\n control={\n <SettingsAutocomplete\n value={DENSITY_OPTIONS.find((o) => o.id === value)}\n options={DENSITY_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleSortChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","DENSITY_OPTIONS","id","label","DensitySelector","onChange","value","handleSortChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAE/D,MAAMC,kBAA+D;IACnE;QAAEC,IAAI;QAAWC,OAAO;IAAU;IAClC;QAAED,IAAI;QAAYC,OAAO;IAAW;IACpC;QAAED,IAAI;QAAeC,OAAO;IAAc;CAC3C;AASD,OAAO,SAASC,gBAAgB,EAAEC,QAAQ,EAAEC,QAAQ,UAAU,EAAwB;IACpF,MAAMC,mBAAmB,CAACC,GAAY,EAAEN,EAAE,EAAyB;QACjEG,SAASH;IACX;IAEA,qBACE,KAACH;QACCI,OAAM;QACNM,uBACE,KAACT;YACCM,OAAOL,gBAAgBS,IAAI,CAAC,CAACC,IAAMA,EAAET,EAAE,KAAKI;YAC5CM,SAASX;YACTY,gBAAgB,CAACF,IAAMA,EAAER,KAAK;YAC9BE,UAAUE;YACVO,gBAAgB;;;AAK1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/DensitySelector/index.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './DensitySelector';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Dialog/Dialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, MouseEvent } from 'react';\nimport {\n Button,\n ButtonProps,\n Dialog as MuiDialog,\n DialogActions,\n DialogContent,\n DialogContentProps as MuiDialogContentProps,\n DialogProps,\n DialogTitle,\n DialogTitleProps,\n IconButton,\n styled,\n Theme,\n} from '@mui/material';\nimport CloseIcon from 'mdi-material-ui/Close';\nimport { combineSx } from '../utils';\n\nexport interface DialogHeaderProps extends DialogTitleProps {\n /**\n * Callback fired when close button is clicked. If undefined, close button will not appear in header.\n */\n onClose?: (e: MouseEvent<HTMLElement>) => void;\n}\n\nexport type DialogButtonProps = Omit<ButtonProps, 'variant' | 'color' | 'type'>;\n\nexport type DialogContentProps = MuiDialogContentProps;\n\nconst Header = ({ children, onClose, ...props }: DialogHeaderProps): ReactElement => {\n return (\n <>\n <DialogTitle style={{ textOverflow: 'ellipsis', overflow: 'hidden' }} {...props}>\n {children}\n </DialogTitle>\n {onClose && (\n <IconButton aria-label=\"Close\" onClick={onClose} sx={dialogCloseIconButtonStyle}>\n <CloseIcon />\n </IconButton>\n )}\n </>\n );\n};\n\nconst Content = ({ children, sx, ...props }: DialogContentProps): ReactElement => (\n <DialogContent dividers {...props} sx={combineSx({ minWidth: `500px`, textWrap: 'balance' }, sx)}>\n {children}\n </DialogContent>\n);\n\nconst PrimaryButton = ({ children, ...props }: DialogButtonProps): ReactElement => (\n <Button variant=\"contained\" type=\"submit\" {...props}>\n {children}\n </Button>\n);\n\nconst SecondaryButton = ({ children, ...props }: DialogButtonProps): ReactElement => (\n <Button variant=\"outlined\" color=\"secondary\" {...props}>\n {children}\n </Button>\n);\n\n/*\n * Material-ui has a prop \"scroll=paper\" that is specifically for dialog header and actions to be sticky and body to scroll,\n * but that doesn't work when dialog content is wrapped in form.\n * https://github.com/mui-org/material-ui/issues/13253\n * This component adds style to get expected behavior & should be used whenever we have a Form inside a Dialog\n */\nconst Form = styled('form')({\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n});\n\n/**\n * Render the CSS of the dialog's close button, according to the given material theme.\n * @param theme material theme\n */\nconst dialogCloseIconButtonStyle = (theme: Theme): Record<string, unknown> => {\n return { position: 'absolute', top: theme.spacing(0.5), right: theme.spacing(0.5) };\n};\n\nexport const Dialog = ({ children, ...props }: DialogProps): ReactElement => (\n <MuiDialog {...props}>{children}</MuiDialog>\n);\n\nDialog.Header = Header;\nDialog.Form = Form;\nDialog.Content = Content;\nDialog.PrimaryButton = PrimaryButton;\nDialog.SecondaryButton = SecondaryButton;\nDialog.Actions = DialogActions;\n"],"names":["Button","Dialog","MuiDialog","DialogActions","DialogContent","DialogTitle","IconButton","styled","CloseIcon","combineSx","Header","children","onClose","props","style","textOverflow","overflow","aria-label","onClick","sx","dialogCloseIconButtonStyle","Content","dividers","minWidth","textWrap","PrimaryButton","variant","type","SecondaryButton","color","Form","overflowY","display","flexDirection","theme","position","top","spacing","right","Actions"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SACEA,MAAM,EAENC,UAAUC,SAAS,EACnBC,aAAa,EACbC,aAAa,EAGbC,WAAW,EAEXC,UAAU,EACVC,MAAM,QAED,gBAAgB;AACvB,OAAOC,eAAe,wBAAwB;AAC9C,SAASC,SAAS,QAAQ,WAAW;AAarC,MAAMC,SAAS,CAAC,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGC,OAA0B;IAChE,qBACE;;0BACE,KAACR;gBAAYS,OAAO;oBAAEC,cAAc;oBAAYC,UAAU;gBAAS;gBAAI,GAAGH,KAAK;0BAC5EF;;YAEFC,yBACC,KAACN;gBAAWW,cAAW;gBAAQC,SAASN;gBAASO,IAAIC;0BACnD,cAAA,KAACZ;;;;AAKX;AAEA,MAAMa,UAAU,CAAC,EAAEV,QAAQ,EAAEQ,EAAE,EAAE,GAAGN,OAA2B,iBAC7D,KAACT;QAAckB,QAAQ;QAAE,GAAGT,KAAK;QAAEM,IAAIV,UAAU;YAAEc,UAAU,CAAC,KAAK,CAAC;YAAEC,UAAU;QAAU,GAAGL;kBAC1FR;;AAIL,MAAMc,gBAAgB,CAAC,EAAEd,QAAQ,EAAE,GAAGE,OAA0B,iBAC9D,KAACb;QAAO0B,SAAQ;QAAYC,MAAK;QAAU,GAAGd,KAAK;kBAChDF;;AAIL,MAAMiB,kBAAkB,CAAC,EAAEjB,QAAQ,EAAE,GAAGE,OAA0B,iBAChE,KAACb;QAAO0B,SAAQ;QAAWG,OAAM;QAAa,GAAGhB,KAAK;kBACnDF;;AAIL;;;;;CAKC,GACD,MAAMmB,OAAOvB,OAAO,QAAQ;IAC1BwB,WAAW;IACXC,SAAS;IACTC,eAAe;AACjB;AAEA;;;CAGC,GACD,MAAMb,6BAA6B,CAACc;IAClC,OAAO;QAAEC,UAAU;QAAYC,KAAKF,MAAMG,OAAO,CAAC;QAAMC,OAAOJ,MAAMG,OAAO,CAAC;IAAK;AACpF;AAEA,OAAO,MAAMpC,SAAS,CAAC,EAAEU,QAAQ,EAAE,GAAGE,OAAoB,iBACxD,KAACX;QAAW,GAAGW,KAAK;kBAAGF;OACvB;AAEFV,OAAOS,MAAM,GAAGA;AAChBT,OAAO6B,IAAI,GAAGA;AACd7B,OAAOoB,OAAO,GAAGA;AACjBpB,OAAOwB,aAAa,GAAGA;AACvBxB,OAAO2B,eAAe,GAAGA;AACzB3B,OAAOsC,OAAO,GAAGpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Dialog/DiscardChangesConfirmationDialog.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { Dialog } from './Dialog';\n\ninterface DiscardChangesConfirmationDialogProps {\n description: string;\n isOpen: boolean;\n onCancel: () => void;\n onDiscardChanges: () => void;\n}\n\nexport const DiscardChangesConfirmationDialog = (props: DiscardChangesConfirmationDialogProps): ReactElement => {\n const { description, isOpen, onCancel, onDiscardChanges } = props;\n\n return (\n <Dialog open={isOpen} aria-labelledby=\"discard-dialog\">\n <Dialog.Header>Discard Changes</Dialog.Header>\n <Dialog.Content>{description}</Dialog.Content>\n <Dialog.Actions>\n <Button variant=\"contained\" onClick={onDiscardChanges}>\n Discard Changes\n </Button>\n <Button variant=\"outlined\" color=\"secondary\" onClick={onCancel}>\n Cancel\n </Button>\n </Dialog.Actions>\n </Dialog>\n );\n};\n"],"names":["Button","Dialog","DiscardChangesConfirmationDialog","props","description","isOpen","onCancel","onDiscardChanges","open","aria-labelledby","Header","Content","Actions","variant","onClick","color"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,QAAQ,gBAAgB;AAEvC,SAASC,MAAM,QAAQ,WAAW;AASlC,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAM,EAAEC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,gBAAgB,EAAE,GAAGJ;IAE5D,qBACE,MAACF;QAAOO,MAAMH;QAAQI,mBAAgB;;0BACpC,KAACR,OAAOS,MAAM;0BAAC;;0BACf,KAACT,OAAOU,OAAO;0BAAEP;;0BACjB,MAACH,OAAOW,OAAO;;kCACb,KAACZ;wBAAOa,SAAQ;wBAAYC,SAASP;kCAAkB;;kCAGvD,KAACP;wBAAOa,SAAQ;wBAAWE,OAAM;wBAAYD,SAASR;kCAAU;;;;;;AAMxE,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/Dialog/index.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './Dialog';\nexport * from './DiscardChangesConfirmationDialog';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW;AACzB,cAAc,qCAAqC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DragAndDrop/DragAndDropList.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, ReactNode, useEffect, useRef, useState } from 'react';\nimport { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge';\nimport {\n monitorForElements,\n draggable,\n dropTargetForElements,\n} from '@atlaskit/pragmatic-drag-and-drop/element/adapter';\nimport { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';\nimport { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\nimport { Stack } from '@mui/material';\nimport { idle, State } from './model';\nimport { DropIndicator } from './DropIndicator';\n\ninterface MonitorElementsProps {\n elements: Array<Record<string, unknown>>;\n accessKey: string;\n axis?: 'vertical' | 'horizontal';\n onChange: (elements: Array<Record<string, unknown>>) => void;\n}\n\n/**\n * This hook is responsible for monitoring the drag and drop of elements.\n * It will call the onChange function with the new order of elements when a drop is detected.\n *\n * @param elements - The list of elements to monitor\n * @param accessKey - The key to use to identify the elements (key of the object)\n * @param axis - The axis to monitor the drag and drop on\n * @param onChange - The function to call when a drop is detected\n */\nexport function useDragAndDropMonitor({\n elements,\n accessKey,\n axis = 'vertical',\n onChange,\n}: MonitorElementsProps): void {\n return useEffect(() => {\n return monitorForElements({\n onDrop({ location, source }) {\n const target = location.current.dropTargets[0];\n if (!target) {\n return;\n }\n\n const sourceData = source.data;\n const targetData = target.data;\n\n const indexOfSource = elements.findIndex((column) => column[accessKey] === sourceData[accessKey]);\n const indexOfTarget = elements.findIndex((column) => column[accessKey] === targetData[accessKey]);\n\n if (indexOfTarget < 0 || indexOfSource < 0) {\n return;\n }\n\n const closestEdgeOfTarget = extractClosestEdge(targetData);\n\n onChange(\n reorderWithEdge({\n list: elements,\n startIndex: indexOfSource,\n indexOfTarget,\n closestEdgeOfTarget,\n axis: axis,\n })\n );\n },\n });\n }, [accessKey, axis, elements, onChange]);\n}\n\nexport interface DragAndDropElementProps {\n children: ReactNode;\n data: Record<string, unknown>;\n}\n\n/*\n * This component wraps the children that should be draggable\n */\nexport function DragAndDropElement({ children, data }: DragAndDropElementProps): ReactElement {\n const ref = useRef<HTMLDivElement>(null);\n const [state, setState] = useState<State>(idle);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) {\n return;\n }\n\n return combine(\n draggable({\n element,\n getInitialData() {\n return data;\n },\n onDragStart() {\n setState({ type: 'is-dragging' });\n },\n onDrop() {\n setState(idle);\n },\n }),\n dropTargetForElements({\n element,\n canDrop({ source }) {\n // not allowing dropping on yourself\n if (source.element === element) {\n return false;\n }\n // only allowing tasks to be dropped on me\n return true;\n },\n getData({ input }) {\n return attachClosestEdge(data, {\n element,\n input,\n allowedEdges: ['top', 'bottom'],\n });\n },\n getIsSticky() {\n return true;\n },\n onDragEnter({ self }) {\n const closestEdge = extractClosestEdge(self.data);\n setState({ type: 'is-dragging-over', closestEdge });\n },\n onDrag({ self }) {\n const closestEdge = extractClosestEdge(self.data);\n\n // Only need to update react state if nothing has changed.\n // Prevents re-rendering.\n setState((current) => {\n if (current.type === 'is-dragging-over' && current.closestEdge === closestEdge) {\n return current;\n }\n return { type: 'is-dragging-over', closestEdge };\n });\n },\n onDragLeave() {\n setState(idle);\n },\n onDrop() {\n setState(idle);\n },\n })\n );\n }, [data]);\n\n return (\n <Stack ref={ref} spacing={1} style={{ opacity: state.type === 'is-dragging' ? 0.5 : 'unset' }}>\n {state.type === 'is-dragging-over' && state.closestEdge === 'top' ? <DropIndicator /> : null}\n {children}\n {state.type === 'is-dragging-over' && state.closestEdge === 'bottom' ? <DropIndicator /> : null}\n </Stack>\n );\n}\n"],"names":["useEffect","useRef","useState","reorderWithEdge","monitorForElements","draggable","dropTargetForElements","combine","attachClosestEdge","extractClosestEdge","Stack","idle","DropIndicator","useDragAndDropMonitor","elements","accessKey","axis","onChange","onDrop","location","source","target","current","dropTargets","sourceData","data","targetData","indexOfSource","findIndex","column","indexOfTarget","closestEdgeOfTarget","list","startIndex","DragAndDropElement","children","ref","state","setState","element","getInitialData","onDragStart","type","canDrop","getData","input","allowedEdges","getIsSticky","onDragEnter","self","closestEdge","onDrag","onDragLeave","spacing","style","opacity"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAAkCA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAQ;AAC7E,SAASC,eAAe,QAAQ,kEAAkE;AAClG,SACEC,kBAAkB,EAClBC,SAAS,EACTC,qBAAqB,QAChB,oDAAoD;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W,KAACtC,qBAAmB;;;AAGjG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DragAndDrop/DragButton.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, IconButtonProps, Menu, MenuItem, MenuProps } from '@mui/material';\nimport DragIcon from 'mdi-material-ui/Drag';\nimport { useState, MouseEvent, ReactElement, forwardRef } from 'react';\n\nexport function handleMoveUp<T>(element: T, elements: T[]): T[] {\n const index = elements.indexOf(element);\n if (index === 0) {\n return elements;\n }\n\n const newElements = [...elements];\n newElements.splice(index, 1);\n newElements.splice(index - 1, 0, element);\n return newElements;\n}\n\nexport function handleMoveDown<T>(element: T, elements: T[]): T[] {\n const index = elements.indexOf(element);\n if (index === elements.length - 1) {\n return elements;\n }\n\n const newElements = [...elements];\n newElements.splice(index, 1);\n newElements.splice(index + 1, 0, element);\n return newElements;\n}\n\nexport interface DragButtonProps extends IconButtonProps {\n onMoveUp?: () => void;\n onMoveDown?: () => void;\n onMoveLeft?: () => void;\n onMoveRight?: () => void;\n menuSx?: MenuProps['sx'];\n}\n\nexport const DragButton = forwardRef<HTMLButtonElement, DragButtonProps>(function DragButton(\n { onMoveUp, onMoveDown, onMoveLeft, onMoveRight, menuSx, ...otherProps }: DragButtonProps,\n ref\n): ReactElement {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);\n const open = Boolean(anchorEl);\n\n function handleClick(event: MouseEvent<HTMLElement>): void {\n setAnchorEl(event.currentTarget);\n }\n\n function handleMove(callback?: () => void): void {\n setAnchorEl(null);\n callback?.();\n }\n\n return (\n <>\n <IconButton\n {...otherProps}\n ref={ref}\n aria-label=\"move\"\n aria-haspopup={true}\n aria-expanded={open}\n size=\"small\"\n onClick={handleClick}\n >\n <DragIcon />\n </IconButton>\n {(onMoveUp || onMoveDown || onMoveLeft || onMoveRight) && (\n <Menu\n id=\"drag-button-menu\"\n MenuListProps={{\n 'aria-labelledby': 'drag-button-menu',\n }}\n anchorEl={anchorEl}\n open={open}\n onClose={() => handleMove(undefined)}\n sx={menuSx}\n >\n {onMoveUp && <MenuItem onClick={() => handleMove(onMoveUp)}>Move Up</MenuItem>}\n {onMoveDown && <MenuItem onClick={() => handleMove(onMoveDown)}>Move Down</MenuItem>}\n {onMoveLeft && <MenuItem onClick={() => handleMove(onMoveLeft)}>Move Left</MenuItem>}\n {onMoveRight && <MenuItem onClick={() => handleMove(onMoveRight)}>Move Right</MenuItem>}\n {onMoveRight && <MenuItem onClick={() => handleMove(onMoveRight)}>Move Right</MenuItem>}\n </Menu>\n )}\n </>\n );\n});\n"],"names":["IconButton","Menu","MenuItem","DragIcon","useState","forwardRef","handleMoveUp","element","elements","index","indexOf","newElements","splice","handleMoveDown","length","DragButton","onMoveUp","onMoveDown","onMoveLeft","onMoveRight","menuSx","otherProps","ref","anchorEl","setAnchorEl","open","Boolean","handleClick","event","currentTarget","handleMove","callback","aria-label","aria-haspopup","aria-expanded","size","onClick","id","MenuListProps","onClose","undefined","sx"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAU,EAAmBC,IAAI,EAAEC,QAAQ,QAAmB,gBAAgB;AACvF,OAAOC,cAAc,uBAAuB;AAC5C,SAASC,QAAQ,EAA4BC,UAAU,QAAQ,QAAQ;AAEvE,OAAO,SAASC,aAAgBC,OAA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AAW;;oBAC3DC,4BAAc,KAACf;wBAASkC,SAAS,IAAMN,WAAWb;kCAAa;;oBAC/DC,4BAAc,KAAChB;wBAASkC,SAAS,IAAMN,WAAWZ;kCAAa;;oBAC/DC,6BAAe,KAACjB;wBAASkC,SAAS,IAAMN,WAAWX;kCAAc;;oBACjEA,6BAAe,KAACjB;wBAASkC,SAAS,IAAMN,WAAWX;kCAAc;;;;;;AAK5E,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DragAndDrop/DropIndicator.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box, Stack } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport function DropIndicator(): ReactElement {\n return (\n <Stack direction=\"row\" alignItems=\"center\">\n <Box\n sx={{\n content: '\"\"',\n width: 8,\n height: 8,\n boxSizing: 'border-box',\n position: 'absolute',\n backgroundColor: (theme) => theme.palette.background.default,\n border: (theme) => `2px solid ${theme.palette.info.main}`,\n borderRadius: '50%',\n }}\n ></Box>\n <Box\n sx={{\n content: '\"\"',\n height: 2,\n background: (theme) => theme.palette.info.main,\n width: '100%',\n }}\n ></Box>\n </Stack>\n );\n}\n"],"names":["Box","Stack","DropIndicator","direction","alignItems","sx","content","width","height","boxSizing","position","backgroundColor","theme","palette","background","default","border","info","main","borderRadius"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,EAAEC,KAAK,QAAQ,gBAAgB;AAG3C,OAAO,SAASC;IACd,qBACE,MAACD;QAAME,WAAU;QAAMC,YAAW;;0BAChC,KAACJ;gBACCK,IAAI;oBACFC,SAAS;oBACTC,OAAO;oBACPC,QAAQ;oBACRC,WAAW;oBACXC,UAAU;oBACVC,iBAAiB,CAACC,QAAUA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO;oBAC5DC,QAAQ,CAACJ,QAAU,CAAC,UAAU,EAAEA,MAAMC,OAAO,CAACI,IAAI,CAACC,IAAI,EAAE;oBACzDC,cAAc;gBAChB;;0BAEF,KAACnB;gBACCK,IAAI;oBACFC,SAAS;oBACTE,QAAQ;oBACRM,YAAY,CAACF,QAAUA,MAAMC,OAAO,CAACI,IAAI,CAACC,IAAI;oBAC9CX,OAAO;gBACT;;;;AAIR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DragAndDrop/index.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './DropIndicator';\nexport * from './DragAndDropList';\nexport * from './DragButton';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,oBAAoB;AAClC,cAAc,eAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/DragAndDrop/model.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';\n\nexport type State =\n | {\n type: 'idle';\n }\n | {\n type: 'is-dragging';\n }\n | {\n type: 'is-dragging-over';\n closestEdge: Edge | null;\n };\n\nexport const idle: State = { type: 'idle' };\n"],"names":["idle","type"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAgBjC,OAAO,MAAMA,OAAc;IAAEC,MAAM;AAAO,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Drawer/Drawer.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Drawer as MuiDrawer, DrawerProps as MuiDrawerProps, useMediaQuery } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { combineSx } from '../utils';\n\nexport interface DrawerProps extends MuiDrawerProps {\n isOpen: boolean;\n onClose: () => void;\n anchor?: 'left' | 'right';\n}\n\nconst DRAWER_DEFAULT_WIDTH = 1080;\n\nexport const Drawer = ({\n anchor = 'right',\n isOpen,\n onClose,\n PaperProps,\n children,\n ...rest\n}: DrawerProps): ReactElement => {\n const isSmaller = useMediaQuery(`(max-width:${DRAWER_DEFAULT_WIDTH}px)`);\n\n return (\n <MuiDrawer\n {...rest}\n open={isOpen}\n onClose={onClose}\n anchor={anchor}\n PaperProps={{\n ...PaperProps,\n sx: combineSx(\n {\n width: isSmaller ? '100%' : `${DRAWER_DEFAULT_WIDTH}px`,\n overflow: 'hidden',\n },\n PaperProps?.sx\n ),\n }}\n >\n {children}\n </MuiDrawer>\n );\n};\n"],"names":["Drawer","MuiDrawer","useMediaQuery","combineSx","DRAWER_DEFAULT_WIDTH","anchor","isOpen","onClose","PaperProps","children","rest","isSmaller","open","sx","width","overflow"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAUC,SAAS,EAAiCC,aAAa,QAAQ,gBAAgB;AAElG,SAASC,SAAS,QAAQ,WAAW;AAQrC,MAAMC,uBAAuB;AAE7B,OAAO,MAAMJ,SAAS,CAAC,EACrBK,SAAS,OAAO,EAChBC,MAAM,EACNC,OAAO,EACPC,UAAU,EACVC,QAAQ,EACR,GAAGC,MACS;IACZ,MAAMC,YAAYT,cAAc,CAAC,WAAW,EAAEE,qBAAqB,GAAG,CAAC;IAEvE,qBACE,KAACH;QACE,GAAGS,IAAI;QACRE,MAAMN;QACNC,SAASA;QACTF,QAAQA;QACRG,YAAY;YACV,GAAGA,UAAU;YACbK,IAAIV,UACF;gBACEW,OAAOH,YAAY,SAAS,GAAGP,qBAAqB,EAAE,CAAC;gBACvDW,UAAU;YACZ,GACAP,YAAYK;QAEhB;kBAECJ;;AAGP,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Drawer/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './Drawer';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/EChart/EChart.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { CSSProperties, memo, useEffect, useLayoutEffect, useRef } from 'react';\nimport { ECharts, EChartsCoreOption, init, connect, use } from 'echarts/core';\nimport { Box, SxProps, Theme } from '@mui/material';\nimport isEqual from 'lodash/isEqual';\nimport debounce from 'lodash/debounce';\n\nimport {\n BarChart as EChartsBarChart,\n LineChart as EChartsLineChart,\n GaugeChart as EChartsGaugeChart,\n PieChart as EChartsPieChart,\n ScatterChart as EChartsScatterChart,\n CustomChart as EChartsCustomChart,\n HeatmapChart as EChartsHeatmapChart,\n} from 'echarts/charts';\nimport {\n DatasetComponent,\n DataZoomComponent,\n LegendComponent,\n GridComponent,\n TitleComponent,\n TooltipComponent,\n VisualMapComponent,\n ToolboxComponent,\n MarkPointComponent,\n MarkAreaComponent,\n MarkLineComponent,\n} from 'echarts/components';\nimport { CanvasRenderer } from 'echarts/renderers';\nimport { EChartsTheme } from '../model';\n\n// Loading the ECharts extensions should happen in the respective plugins.\n// This is a workaround for https://github.com/perses/plugins/issues/83.\nuse([\n DatasetComponent,\n DataZoomComponent,\n LegendComponent,\n EChartsBarChart,\n EChartsLineChart,\n EChartsGaugeChart,\n EChartsPieChart,\n EChartsScatterChart,\n EChartsCustomChart,\n EChartsHeatmapChart,\n GridComponent,\n TitleComponent,\n ToolboxComponent,\n TooltipComponent,\n CanvasRenderer,\n VisualMapComponent,\n MarkAreaComponent,\n MarkLineComponent,\n MarkPointComponent,\n]);\n\n// see docs for info about each property: https://echarts.apache.org/en/api.html#events\nexport interface MouseEventsParameters<T> {\n componentType: string;\n seriesType: string;\n seriesIndex: number;\n seriesName: string;\n name: string;\n dataIndex: number;\n data: Record<string, unknown> & T;\n dataType: string;\n value: number | number[];\n color: string;\n info: Record<string, unknown>;\n}\n\ntype OnEventFunction<T> = (\n params: MouseEventsParameters<T>,\n // This is potentially undefined for testing purposes\n instance?: ECharts\n) => void;\n\nconst mouseEvents = [\n 'click',\n 'dblclick',\n 'mousedown',\n 'mousemove',\n 'mouseup',\n 'mouseover',\n 'mouseout',\n 'globalout',\n 'contextmenu',\n] as const;\n\nexport type MouseEventName = (typeof mouseEvents)[number];\n\n// batch event types\nexport interface DataZoomPayloadBatchItem {\n dataZoomId: string;\n // start and end not returned unless dataZoom is based on percentProp,\n // which is for cases when a dataZoom component controls multiple axes\n start?: number;\n end?: number;\n // startValue and endValue return data index for 'category' axes,\n // for axis types 'value' and 'time', actual values are returned\n startValue?: number;\n endValue?: number;\n}\n\nexport interface HighlightPayloadBatchItem {\n dataIndex: number;\n dataIndexInside: number;\n seriesIndex: number;\n // highlight action can effect multiple connected charts\n escapeConnect?: boolean;\n // whether blur state was triggered\n notBlur?: boolean;\n}\n\nexport interface BatchEventsParameters {\n type: BatchEventName;\n batch: DataZoomPayloadBatchItem[] & HighlightPayloadBatchItem[];\n}\n\ntype OnBatchEventFunction = (params: BatchEventsParameters) => void;\n\nconst batchEvents = ['datazoom', 'downplay', 'highlight'] as const;\n\nexport type BatchEventName = (typeof batchEvents)[number];\n\ntype ChartEventName = 'finished';\n\ntype EventName = MouseEventName | ChartEventName | BatchEventName;\n\nexport type OnEventsType<T> = {\n [mouseEventName in MouseEventName]?: OnEventFunction<T>;\n} & {\n [batchEventName in BatchEventName]?: OnBatchEventFunction;\n} & {\n [eventName in ChartEventName]?: () => void;\n};\n\nexport interface EChartsProps<T> {\n option: EChartsCoreOption;\n theme?: string | EChartsTheme;\n renderer?: 'canvas' | 'svg';\n sx?: SxProps<Theme>;\n style?: CSSProperties;\n onEvents?: OnEventsType<T>;\n _instance?: React.MutableRefObject<ECharts | undefined>;\n syncGroup?: string;\n onChartInitialized?: (instance: ECharts) => void;\n}\n\nexport const EChart = memo(function EChart<T>({\n option,\n theme,\n renderer,\n sx,\n style,\n onEvents,\n _instance,\n syncGroup,\n onChartInitialized,\n}: EChartsProps<T>) {\n const initialOption = useRef<EChartsCoreOption>(option);\n const prevOption = useRef<EChartsCoreOption>(option);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartElement = useRef<ECharts | null>(null);\n\n // Initialize chart, dispose on unmount\n useLayoutEffect(() => {\n if (containerRef.current === null || chartElement.current !== null) return;\n chartElement.current = init(containerRef.current, theme, { renderer: renderer ?? 'canvas' });\n if (chartElement.current === undefined) return;\n chartElement.current.setOption(initialOption.current, true);\n onChartInitialized?.(chartElement.current);\n if (_instance !== undefined) {\n _instance.current = chartElement.current;\n }\n return (): void => {\n if (chartElement.current === null) return;\n chartElement.current.dispose();\n chartElement.current = null;\n };\n }, [_instance, onChartInitialized, theme, renderer]);\n\n // When syncGroup is explicitly set, charts within same group share interactions such as crosshair\n useEffect(() => {\n if (!chartElement.current || !syncGroup) return;\n chartElement.current.group = syncGroup;\n connect([chartElement.current]); // more info: https://echarts.apache.org/en/api.html#echarts.connect\n }, [syncGroup, chartElement]);\n\n // Update chart data when option changes\n useEffect(() => {\n if (prevOption.current === undefined || isEqual(prevOption.current, option)) return;\n if (!chartElement.current) return;\n chartElement.current.setOption(option, true);\n prevOption.current = option;\n }, [option]);\n\n // Resize chart, cleanup listener on unmount\n useLayoutEffect(() => {\n const updateSize = debounce(() => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n }, 200);\n window.addEventListener('resize', updateSize);\n updateSize();\n return (): void => {\n window.removeEventListener('resize', updateSize);\n };\n }, []);\n\n // Bind and unbind chart events passed as prop\n useEffect(() => {\n const chart = chartElement.current;\n if (!chart || onEvents === undefined) return;\n bindEvents(chart, onEvents);\n return (): void => {\n if (chart === undefined) return;\n if (chart.isDisposed() === true) return;\n for (const event in onEvents) {\n chart.off(event);\n }\n };\n }, [onEvents]);\n\n // TODO: re-evaluate how this is triggered. It's technically working right\n // now because the sx prop is an object that gets re-created, but that also\n // means it runs unnecessarily some of the time and theoretically might\n // not run in some other cases. Maybe it should use a resize observer?\n useEffect(() => {\n // TODO: fix this debouncing. This likely isn't working as intended because\n // the debounced function is re-created every time this useEffect is called.\n const updateSize = debounce(\n () => {\n if (!chartElement.current) return;\n chartElement.current.resize();\n },\n 200,\n {\n leading: true,\n }\n );\n updateSize();\n }, [sx, style]);\n\n return <Box ref={containerRef} sx={sx} style={style}></Box>;\n});\n\n// Validate event config and bind custom events\nfunction bindEvents<T>(instance: ECharts, events?: OnEventsType<T>): void {\n if (events === undefined) return;\n\n function bindEvent(eventName: EventName, OnEventFunction: unknown): void {\n if (typeof OnEventFunction === 'function') {\n if (isMouseEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params, instance));\n } else if (isBatchEvent(eventName)) {\n instance.on(eventName, (params) => OnEventFunction(params));\n } else {\n instance.on(eventName, () => OnEventFunction(null, instance));\n }\n }\n }\n\n for (const eventName in events) {\n if (Object.prototype.hasOwnProperty.call(events, eventName)) {\n const customEvent = events[eventName as EventName] ?? null;\n if (customEvent) {\n bindEvent(eventName as EventName, customEvent);\n }\n }\n }\n}\n\nfunction isMouseEvent(eventName: EventName): eventName is MouseEventName {\n return (mouseEvents as readonly string[]).includes(eventName);\n}\n\nfunction isBatchEvent(eventName: EventName): eventName is BatchEventName {\n return (batchEvents as readonly string[]).includes(eventName);\n}\n"],"names":["memo","useEffect","useLayoutEffect","useRef","init","connect","use","Box","isEqual","debounce","BarChart","EChartsBarChart","LineChart","EChartsLineChart","GaugeChart","EChartsGaugeChart","PieChart","EChartsPieChart","ScatterChart","EChartsScatterChart","CustomChart","EChartsCustomChart","HeatmapChart","EChartsHeatmapChart","DatasetComponent","DataZoomComponent","LegendComponent","GridComponent","TitleComponent","TooltipComponent","VisualMapComponent","ToolboxComponent","MarkPointComponent","MarkAreaComponent","MarkLineComponent","CanvasRenderer","mouseEvents","batchEvents","EChart","option","theme","renderer","sx","style","onEvents","_instance","syncGroup","onChartInitialized","initialOption","prevOption","containerRef","chartElement","current","undefined","setOption","dispose","group","updateSize","resize","window","addEventListener","removeEventListener","chart","bindEvents","isDisposed","event","off","leading","ref","instance","events","bindEvent","eventName","OnEventFunction","isMouseEvent","on","params","isBatchEvent","Object","prototype","hasOwnProperty","call","customEvent","includes"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAAwBA,IAAI,EAAEC,SAAS,EAAEC,eAAe,EAAEC,MAAM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AACF;AAEA,SAASR,aAAaF,SAAoB;IACxC,OAAO,AAACpC,YAAkC+C,QAAQ,CAACX;AACrD;AAEA,SAASK,aAAaL,SAAoB;IACxC,OAAO,AAACnC,YAAkC8C,QAAQ,CAACX;AACrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/EChart/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './EChart';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ErrorAlert.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Alert } from '@mui/material';\nimport { ReactElement } from 'react';\n\nexport interface ErrorAlertProps {\n error: Error;\n}\n\n/**\n * Shows an MUI Alert with the `Error.message` as its contents.\n */\nexport function ErrorAlert(props: ErrorAlertProps): ReactElement {\n const { error } = props;\n return <Alert severity=\"error\">{error.message}</Alert>;\n}\n"],"names":["Alert","ErrorAlert","props","error","severity","message"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,KAAK,QAAQ,gBAAgB;AAOtC;;CAEC,GACD,OAAO,SAASC,WAAWC,KAAsB;IAC/C,MAAM,EAAEC,KAAK,EAAE,GAAGD;IAClB,qBAAO,KAACF;QAAMI,UAAS;kBAASD,MAAME,OAAO;;AAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/
|
|
1
|
+
{"version":3,"sources":["../../src/ErrorBoundary.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// Just use react-error-boundary as-is for now\nexport { ErrorBoundary } from 'react-error-boundary';\nexport type { ErrorBoundaryProps } from 'react-error-boundary';\n"],"names":["ErrorBoundary"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,8CAA8C;AAC9C,SAASA,aAAa,QAAQ,uBAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/FontSizeSelector/FontSizeSelector.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License | Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing | software\n// distributed under the License is distributed on an \"AS IS\" BASIS |\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND | either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement } from 'react';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nconst FONT_SIZE_OPTIONS = [\n { id: 'default', label: 'Default', value: undefined },\n { id: '12', label: '12', value: 12 },\n { id: '14', label: '14', value: 14 },\n { id: '16', label: '16', value: 16 },\n { id: '20', label: '20', value: 20 },\n { id: '24', label: '24', value: 24 },\n { id: '28', label: '28', value: 28 },\n { id: '32', label: '32', value: 32 },\n { id: '36', label: '36', value: 36 },\n { id: '40', label: '40', value: 40 },\n { id: '48', label: '48', value: 48 },\n { id: '56', label: '56', value: 56 },\n { id: '64', label: '64', value: 64 },\n { id: '72', label: '72', value: 72 },\n { id: '96', label: '96', value: 96 },\n { id: '128', label: '128', value: 128 },\n { id: '160', label: '160', value: 160 },\n { id: '192', label: '192', value: 192 },\n];\n\nexport type FontSizeOption = number | undefined;\n\nexport interface FontSizeSelectorProps {\n value: FontSizeOption;\n onChange: (fontSize: FontSizeOption) => void;\n}\n\nexport function FontSizeSelector({ value, onChange }: FontSizeSelectorProps): ReactElement {\n const handleFontSizeChange = (_: unknown, { value }: { value: FontSizeOption }): void => {\n onChange(value);\n };\n\n return (\n <OptionsEditorControl\n label=\"Font Size\"\n control={\n <SettingsAutocomplete\n value={FONT_SIZE_OPTIONS.find((o) => o.value === value)}\n options={FONT_SIZE_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={handleFontSizeChange}\n disableClearable\n />\n }\n />\n );\n}\n"],"names":["OptionsEditorControl","SettingsAutocomplete","FONT_SIZE_OPTIONS","id","label","value","undefined","FontSizeSelector","onChange","handleFontSizeChange","_","control","find","o","options","getOptionLabel","disableClearable"],"mappings":"AAAA,oCAAoC;AACpC,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,wEAAwE;AACxE,qEAAqE;AACrE,6EAA6E;AAC7E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,oBAAoB,QAAQ,0BAA0B;AAE/D,MAAMC,oBAAoB;IACxB;QAAEC,IAAI;QAAWC,OAAO;QAAWC,OAAOC;IAAU;IACpD;QAAEH,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAMC,OAAO;QAAMC,OAAO;IAAG;IACnC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;IACtC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;IACtC;QAAEF,IAAI;QAAOC,OAAO;QAAOC,OAAO;IAAI;CACvC;AASD,OAAO,SAASE,iBAAiB,EAAEF,KAAK,EAAEG,QAAQ,EAAyB;IACzE,MAAMC,uBAAuB,CAACC,GAAY,EAAEL,KAAK,EAA6B;QAC5EG,SAASH;IACX;IAEA,qBACE,KAACL;QACCI,OAAM;QACNO,uBACE,KAACV;YACCI,OAAOH,kBAAkBU,IAAI,CAAC,CAACC,IAAMA,EAAER,KAAK,KAAKA;YACjDS,SAASZ;YACTa,gBAAgB,CAACF,IAAMA,EAAET,KAAK;YAC9BI,UAAUC;YACVO,gBAAgB;;;AAK1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/FontSizeSelector/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './FontSizeSelector';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,qBAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/FormEditor/FormActions.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Button, Divider, Stack, StackProps } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { Action } from '@perses-dev/core';\n\nexport interface FormActionsProps extends StackProps {\n action: Action;\n submitText?: string;\n cancelText?: string;\n isReadonly?: boolean;\n isValid?: boolean;\n onActionChange?: (action: Action) => void;\n onSubmit?: () => void;\n onDelete?: () => void;\n onCancel?: () => void;\n}\n\nexport function FormActions({\n action,\n submitText = 'Save',\n cancelText = 'Cancel',\n isReadonly,\n isValid,\n onActionChange,\n onSubmit,\n onDelete,\n onCancel,\n ...props\n}: FormActionsProps): ReactElement {\n return (\n <Stack direction=\"row\" gap={1} sx={{ marginLeft: 'auto' }} {...props}>\n {action === 'read' ? (\n <>\n {onActionChange && (\n <Button disabled={isReadonly} variant=\"contained\" onClick={() => onActionChange('update')}>\n Edit\n </Button>\n )}\n {onDelete && (\n <Button color=\"error\" disabled={isReadonly} variant=\"outlined\" onClick={onDelete}>\n Delete\n </Button>\n )}\n {onCancel && (onSubmit || onDelete) && (\n <Divider\n orientation=\"vertical\"\n flexItem\n sx={{\n borderColor: (theme) => theme.palette.grey['500'],\n '&.MuiDivider-root': {\n marginLeft: 2,\n marginRight: 1,\n },\n }}\n />\n )}\n {onCancel && (\n <Button color=\"secondary\" variant=\"outlined\" onClick={onCancel}>\n {cancelText}\n </Button>\n )}\n </>\n ) : (\n <>\n {onSubmit && (\n <Button variant=\"contained\" disabled={!isValid} onClick={onSubmit}>\n {submitText}\n </Button>\n )}\n {onCancel && (\n <Button color=\"secondary\" variant=\"outlined\" onClick={onCancel}>\n {cancelText}\n </Button>\n )}\n </>\n )}\n </Stack>\n );\n}\n"],"names":["Button","Divider","Stack","FormActions","action","submitText","cancelText","isReadonly","isValid","onActionChange","onSubmit","onDelete","onCancel","props","direction","gap","sx","marginLeft","disabled","variant","onClick","color","orientation","flexItem","borderColor","theme","palette","grey","marginRight"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,MAAM,EAAEC,OAAO,EAAEC,KAAK,QAAoB,gBAAgB;AAgBnE,OAAO,SAASC,YAAY,EAC1BC,MAAM,EACNC,aAAa,MAAM,EACnBC,aAAa,QAAQ,EACrBC,UAAU,EACVC,OAAO,EACPC,cAAc,EACdC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACR,GAAGC,OACc;IACjB,qBACE,KAACX;QAAMY,WAAU;QAAMC,KAAK;QAAGC,IAAI;YAAEC,YAAY;QAAO;QAAI,GAAGJ,KAAK;kBACjET,WAAW,uBACV;;gBACGK,gCACC,KAACT;oBAAOkB,UAAUX;oBAAYY,SAAQ;oBAAYC,SAAS,IAAMX,eAAe;8BAAW;;gBAI5FE,0BACC,KAACX;oBAAOqB,OAAM;oBAAQH,UAAUX;oBAAYY,SAAQ;oBAAWC,SAAST;8BAAU;;gBAInFC,YAAaF,CAAAA,YAAYC,QAAO,mBAC/B,KAACV;oBACCqB,aAAY;oBACZC,QAAQ;oBACRP,IAAI;wBACFQ,aAAa,CAACC,QAAUA,MAAMC,OAAO,CAACC,IAAI,CAAC,MAAM;wBACjD,qBAAqB;4BACnBV,YAAY;4BACZW,aAAa;wBACf;oBACF;;gBAGHhB,0BACC,KAACZ;oBAAOqB,OAAM;oBAAYF,SAAQ;oBAAWC,SAASR;8BACnDN;;;2BAKP;;gBACGI,0BACC,KAACV;oBAAOmB,SAAQ;oBAAYD,UAAU,CAACV;oBAASY,SAASV;8BACtDL;;gBAGJO,0BACC,KAACZ;oBAAOqB,OAAM;oBAAYF,SAAQ;oBAAWC,SAASR;8BACnDN;;;;;AAOf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/FormEditor/index.ts"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './FormActions';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,gBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/FormatControls/FormatControls.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport { Switch, SwitchProps } from '@mui/material';\nimport {\n FormatOptions,\n UNIT_CONFIG,\n UnitConfig,\n isUnitWithDecimalPlaces,\n isUnitWithShortValues,\n shouldShortenValues,\n} from '@perses-dev/core';\nimport { ReactElement } from 'react';\nimport { OptionsEditorControl } from '../OptionsEditorLayout';\nimport { SettingsAutocomplete } from '../SettingsAutocomplete';\n\nexport interface FormatControlsProps {\n value: FormatOptions;\n onChange: (unit: FormatOptions) => void;\n disabled?: boolean;\n}\n\ntype AutocompleteUnitOption = UnitConfig & {\n id: NonNullable<FormatOptions['unit']>;\n};\n\nconst KIND_OPTIONS: readonly AutocompleteUnitOption[] = Object.entries(UNIT_CONFIG)\n .map<AutocompleteUnitOption>(([id, config]) => {\n return {\n ...config,\n id: id as AutocompleteUnitOption['id'],\n group: config.group || 'Decimal',\n };\n })\n .filter((config) => !config.disableSelectorOption);\n\nconst DECIMAL_PLACES_OPTIONS: Array<{ id: string; label: string; decimalPlaces?: number }> = [\n { id: 'default', label: 'Default', decimalPlaces: undefined },\n { id: '0', label: '0', decimalPlaces: 0 },\n { id: '1', label: '1', decimalPlaces: 1 },\n { id: '2', label: '2', decimalPlaces: 2 },\n { id: '3', label: '3', decimalPlaces: 3 },\n { id: '4', label: '4', decimalPlaces: 4 },\n];\n\nfunction getOptionByDecimalPlaces(\n decimalPlaces?: number\n): { id: string; label: string; decimalPlaces?: number } | undefined {\n return DECIMAL_PLACES_OPTIONS.find((o) => o.decimalPlaces === decimalPlaces);\n}\n\nexport function FormatControls({ value, onChange, disabled = false }: FormatControlsProps): ReactElement {\n const hasDecimalPlaces = isUnitWithDecimalPlaces(value);\n const hasShortValues = isUnitWithShortValues(value);\n\n const handleKindChange = (_: unknown, newValue: AutocompleteUnitOption | null): void => {\n onChange({ unit: newValue?.id || 'decimal' } as FormatOptions); // Fallback to 'decimal' if no unit is selected\n };\n\n const handleDecimalPlacesChange = ({\n decimalPlaces,\n }: {\n id: string;\n label: string;\n decimalPlaces?: number;\n }): void => {\n if (hasDecimalPlaces) {\n onChange({\n ...value,\n decimalPlaces: decimalPlaces,\n });\n }\n };\n\n const handleShortValuesChange: SwitchProps['onChange'] = (_: unknown, checked: boolean) => {\n if (hasShortValues) {\n onChange({\n ...value,\n shortValues: checked,\n });\n }\n };\n\n const unitConfig = UNIT_CONFIG[value?.unit || 'decimal'];\n\n return (\n <>\n <OptionsEditorControl\n label=\"Short values\"\n control={\n <Switch\n checked={hasShortValues ? shouldShortenValues(value.shortValues) : false}\n onChange={handleShortValuesChange}\n disabled={!hasShortValues}\n />\n }\n />\n <OptionsEditorControl\n label=\"Unit\"\n control={\n <SettingsAutocomplete<AutocompleteUnitOption, false, true>\n value={{ id: value?.unit || 'decimal', ...unitConfig }}\n options={KIND_OPTIONS}\n groupBy={(option) => option.group ?? 'Decimal'}\n onChange={handleKindChange}\n disableClearable\n disabled={disabled}\n />\n }\n />\n <OptionsEditorControl\n label=\"Decimals\"\n control={\n <SettingsAutocomplete\n value={getOptionByDecimalPlaces(value.decimalPlaces)}\n options={DECIMAL_PLACES_OPTIONS}\n getOptionLabel={(o) => o.label}\n onChange={(_, value) => handleDecimalPlacesChange(value)}\n disabled={!hasDecimalPlaces}\n disableClearable\n />\n }\n />\n </>\n );\n}\n"],"names":["Switch","UNIT_CONFIG","isUnitWithDecimalPlaces","isUnitWithShortValues","shouldShortenValues","OptionsEditorControl","SettingsAutocomplete","KIND_OPTIONS","Object","entries","map","id","config","group","filter","disableSelectorOption","DECIMAL_PLACES_OPTIONS","label","decimalPlaces","undefined","getOptionByDecimalPlaces","find","o","FormatControls","value","onChange","disabled","hasDecimalPlaces","hasShortValues","handleKindChange","_","newValue","unit","handleDecimalPlacesChange","handleShortValuesChange","checked","shortValues","unitConfig","control","options","groupBy","option","disableClearable","getOptionLabel"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AACjC,SAASA,MAAM,QAAqB,gBAAgB;AACpD,SAEEC,WAAW,EAEXC,uBAAuB,EACvBC,qBAAqB,EACrBC,mBAAmB,QACd,mBAAmB;AAE1B,SAASC,oBAAoB,QAAQ,yBAA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C,WAAW,CAACuB,OAAOQ,QAAQ,UAAU;IAExD,qBACE;;0BACE,KAAC3B;gBACCY,OAAM;gBACNqB,uBACE,KAACtC;oBACCmC,SAASP,iBAAiBxB,oBAAoBoB,MAAMY,WAAW,IAAI;oBACnEX,UAAUS;oBACVR,UAAU,CAACE;;;0BAIjB,KAACvB;gBACCY,OAAM;gBACNqB,uBACE,KAAChC;oBACCkB,OAAO;wBAAEb,IAAIa,OAAOQ,QAAQ;wBAAW,GAAGK,UAAU;oBAAC;oBACrDE,SAAShC;oBACTiC,SAAS,CAACC,SAAWA,OAAO5B,KAAK,IAAI;oBACrCY,UAAUI;oBACVa,gBAAgB;oBAChBhB,UAAUA;;;0BAIhB,KAACrB;gBACCY,OAAM;gBACNqB,uBACE,KAAChC;oBACCkB,OAAOJ,yBAAyBI,MAAMN,aAAa;oBACnDqB,SAASvB;oBACT2B,gBAAgB,CAACrB,IAAMA,EAAEL,KAAK;oBAC9BQ,UAAU,CAACK,GAAGN,QAAUS,0BAA0BT;oBAClDE,UAAU,CAACC;oBACXe,gBAAgB;;;;;AAM5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/FormatControls/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './FormatControls';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,mBAAmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/InfoTooltip/InfoTooltip.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, ReactNode } from 'react';\nimport {\n styled,\n TooltipProps as MuiTooltipProps,\n Tooltip as MuiTooltip,\n tooltipClasses,\n Typography,\n} from '@mui/material';\n\nexport type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom';\n\ninterface InfoTooltipProps {\n description: string;\n children: ReactNode;\n id?: string;\n title?: string;\n placement?: TooltipPlacement;\n enterDelay?: number; // default is 500ms\n enterNextDelay?: number; // default is 500ms\n}\n\nexport const InfoTooltip = ({\n id,\n title,\n description,\n placement,\n children,\n enterDelay,\n enterNextDelay,\n}: InfoTooltipProps): ReactElement => {\n // Wrap children in a span to cover the following use cases:\n // - Disabled buttons. MUI console.errors on putting these inside a tooltip.\n // - Non-element tooltip children (e.g. text). The tooltip needs something that\n // can have a ref as a child.\n // We wrap in a `span` and not a `div` to minimize the impact on page layout\n // and styles.\n const wrappedChildren = <span>{children}</span>;\n\n return (\n <StyledTooltip\n arrow\n id={id}\n placement={placement ?? 'top'}\n title={<TooltipContent title={title} description={description} />}\n enterDelay={enterDelay ?? 500}\n enterNextDelay={enterNextDelay ?? 500}\n >\n {wrappedChildren}\n </StyledTooltip>\n );\n};\n\nconst TooltipContent = ({ title, description }: Pick<InfoTooltipProps, 'title' | 'description'>): ReactElement => {\n return (\n <>\n {title && (\n <Typography\n variant=\"body2\"\n sx={(theme) => ({\n color: theme.palette.text.primary,\n fontWeight: theme.typography.fontWeightMedium,\n })}\n >\n {title}\n </Typography>\n )}\n <Typography\n variant=\"caption\"\n sx={(theme) => ({\n color: theme.palette.text.primary,\n whiteSpace: 'pre-line',\n })}\n >\n {description}\n </Typography>\n </>\n );\n};\n\nconst StyledTooltip = styled(({ className, ...props }: MuiTooltipProps) => (\n <MuiTooltip {...props} classes={{ popper: className }} />\n))(({ theme }) => ({\n [`& .${tooltipClasses.tooltip}`]: {\n backgroundColor: theme.palette.background.tooltip,\n color: theme.palette.text.primary,\n maxWidth: '300px',\n padding: theme.spacing(1),\n boxShadow: theme.shadows[1],\n },\n [`& .${tooltipClasses.arrow}`]: {\n color: theme.palette.background.tooltip,\n },\n}));\n"],"names":["styled","Tooltip","MuiTooltip","tooltipClasses","Typography","InfoTooltip","id","title","description","placement","children","enterDelay","enterNextDelay","wrappedChildren","span","StyledTooltip","arrow","TooltipContent","variant","sx","theme","color","palette","text","primary","fontWeight","typography","fontWeightMedium","whiteSpace","className","props","classes","popper","tooltip","backgroundColor","background","maxWidth","padding","spacing","boxShadow","shadows"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SACEA,MAAM,EAENC,WAAWC,UAAU,EACrBC,cAAc,EACdC,UAAU,QACL,gBAAgB;AAcvB,OAAO,MAAMC,cAAc,CAAC,EAC1BC,EAAE,EACFC,KAAK,EACLC,WAAW,EACXC,SAAS,EACTC,QAAQ,EACRC,UAAU,EACVC,cAAc,EACG;IACjB,4DAA4D;IAC5D,6EAA6E;IAC7E,gFAAgF;IAChF,+BAA+B;IAC/B,4EAA4E;IAC5E,cAAc;IACd,MAAMC,gCAAkB,KAACC;kBAAMJ;;IAE/B,qBACE,KAACK;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src/InfoTooltip/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './InfoTooltip';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,gBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/JSONEditor.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useState } from 'react';\nimport CodeMirror from '@uiw/react-codemirror';\nimport { json, jsonParseLinter } from '@codemirror/lang-json';\nimport { linter, lintGutter } from '@codemirror/lint';\nimport { useTheme } from '@mui/material';\nimport { ReactCodeMirrorProps } from '@uiw/react-codemirror/src';\n\ntype JSONEditorProps<T> = Omit<ReactCodeMirrorProps, 'onBlur' | 'theme' | 'extensions' | 'onChange' | 'value'> & {\n value: T;\n placeholder?: string;\n onChange?: (next: string) => void;\n};\n\nexport function JSONEditor<T>(props: JSONEditorProps<T>): ReactElement {\n const theme = useTheme();\n const isDarkMode = theme.palette.mode === 'dark';\n\n const [value, setValue] = useState(() => JSON.stringify(props.value, null, 2));\n const [lastProcessedValue, setLastProcessedValue] = useState<string>(value);\n\n return (\n <CodeMirror\n {...props}\n style={{ border: `1px solid ${theme.palette.divider}` }}\n theme={isDarkMode ? 'dark' : 'light'}\n extensions={[json(), linter(jsonParseLinter()), lintGutter()]}\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n // Trigger the provided onChange callback in real-time\n if (props.onChange) {\n props.onChange(newValue);\n }\n }}\n onBlur={() => {\n // Don't trigger the provided onChange if the last processed value is equal to the current value.\n // This prevents e.g CTRL+F to trigger value refresh downstream, which would cause the embedded\n // find & replace interface to close immediately.\n if (lastProcessedValue !== value && props.onChange !== undefined) {\n props.onChange(value);\n setLastProcessedValue(value);\n }\n }}\n placeholder={props.placeholder}\n />\n );\n}\n"],"names":["useState","CodeMirror","json","jsonParseLinter","linter","lintGutter","useTheme","JSONEditor","props","theme","isDarkMode","palette","mode","value","setValue","JSON","stringify","lastProcessedValue","setLastProcessedValue","style","border","divider","extensions","onChange","newValue","onBlur","undefined","placeholder"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAAuBA,QAAQ,QAAQ,QAAQ;AAC/C,OAAOC,gBAAgB,wBAAwB;AAC/C,SAASC,IAAI,EAAEC,eAAe,QAAQ,wBAAwB;AAC9D,SAASC,MAAM,EAAEC,UAAU,QAAQ,mBAAmB;AACtD,SAASC,QAAQ,QAAQ,gBAAgB;AASzC,OAAO,SAASC,WAAcC,KAAyB;IACrD,MAAMC,QAAQH;IACd,MAAMI,aAAaD,MAAME,OAAO,CAACC,IAAI,KAAK;IAE1C,MAAM,CAACC,OAAOC,SAAS,GAAGd,SAAS,IAAMe,KAAKC,SAAS,CAACR,MAAMK,KAAK,EAAE,MAAM;IAC3E,MAAM,CAACI,oBAAoBC,sBAAsB,GAAGlB,SAAiBa;IAErE,qBACE,KAACZ;QACE,GAAGO,KAAK;QACTW,OAAO;YAAEC,QAAQ,CAAC,UAAU,EAAEX,MAAME,OAAO,CAACU,OAAO,EAAE;QAAC;QACtDZ,OAAOC,aAAa,SAAS;QAC7BY,YAAY;YAACpB;YAAQE,OAAOD;YAAoBE;SAAa;QAC7DQ,OAAOA;QACPU,UAAU,CAACC;YACTV,SAASU;YACT,sDAAsD;YACtD,IAAIhB,MAAMe,QAAQ,EAAE;gBAClBf,MAAMe,QAAQ,CAACC;YACjB;QACF;QACAC,QAAQ;YACN,iGAAiG;YACjG,+FAA+F;YAC/F,iDAAiD;YACjD,IAAIR,uBAAuBJ,SAASL,MAAMe,QAAQ,KAAKG,WAAW;gBAChElB,MAAMe,QAAQ,CAACV;gBACfK,sBAAsBL;YACxB;QACF;QACAc,aAAanB,MAAMmB,WAAW;;AAGpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/CompactLegend.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box } from '@mui/material';\nimport { ReactElement } from 'react';\nimport { ListLegendItem, ListLegendItemProps } from './ListLegendItem';\nimport { LegendItem, SelectedLegendItemState, isLegendItemVisuallySelected } from './legend-model';\n\nexport interface CompactLegendProps {\n height: number;\n items: LegendItem[];\n selectedItems: SelectedLegendItemState;\n onLegendItemClick: ListLegendItemProps['onClick'];\n onItemMouseOver: ListLegendItemProps['onMouseOver'];\n onItemMouseOut: ListLegendItemProps['onMouseOut'];\n}\n\n/**\n * CompactLegend is default and used when legend items need to show side by side\n * which corresponds to when legend.position is `bottom` with a relatively small\n * number of items. The `ListLegend` is used for cases with large numbers of items\n * because it is virtualized.\n */\nexport function CompactLegend({\n height,\n items,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n}: CompactLegendProps): ReactElement {\n return (\n <Box component=\"ul\" sx={{ width: '100%', height, padding: [0, 1, 0, 0], overflowY: 'scroll', margin: 0 }}>\n {items.map((item, index) => (\n <ListLegendItem\n key={item.id}\n item={item}\n index={index}\n isVisuallySelected={isLegendItemVisuallySelected(item, selectedItems)}\n onMouseOver={onItemMouseOver}\n onMouseOut={onItemMouseOut}\n onClick={onLegendItemClick}\n sx={{\n width: 'auto',\n float: 'left',\n paddingRight: 1.5,\n }}\n />\n ))}\n </Box>\n );\n}\n"],"names":["Box","ListLegendItem","isLegendItemVisuallySelected","CompactLegend","height","items","selectedItems","onLegendItemClick","onItemMouseOver","onItemMouseOut","component","sx","width","padding","overflowY","margin","map","item","index","isVisuallySelected","onMouseOver","onMouseOut","onClick","float","paddingRight","id"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AAEpC,SAASC,cAAc,QAA6B,mBAAmB;AACvE,SAA8CC,4BAA4B,QAAQ,iBAAiB;AAWnG;;;;;CAKC,GACD,OAAO,SAASC,cAAc,EAC5BC,MAAM,EACNC,KAAK,EACLC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACK;IACnB,qBACE,KAACT;QAAIU,WAAU;QAAKC,IAAI;YAAEC,OAAO;YAAQR;YAAQS,SAAS;gBAAC;gBAAG;gBAAG;gBAAG;aAAE;YAAEC,WAAW;YAAUC,QAAQ;QAAE;kBACpGV,MAAMW,GAAG,CAAC,CAACC,MAAMC,sBAChB,KAACjB;gBAECgB,MAAMA;gBACNC,OAAOA;gBACPC,oBAAoBjB,6BAA6Be,MAAMX;gBACvDc,aAAaZ;gBACba,YAAYZ;gBACZa,SAASf;gBACTI,IAAI;oBACFC,OAAO;oBACPW,OAAO;oBACPC,cAAc;gBAChB;eAXKP,KAAKQ,EAAE;;AAgBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/Legend.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Box } from '@mui/material';\nimport { produce } from 'immer';\nimport { ReactElement, ReactNode } from 'react';\nimport { getLegendMode } from '@perses-dev/core';\nimport { ListLegend } from './ListLegend';\nimport { CompactLegend } from './CompactLegend';\nimport { TableLegend, TableLegendProps } from './TableLegend';\nimport { LegendItem, LegendComponentOptions, SelectedLegendItemState } from './legend-model';\nimport { ListLegendItemProps } from './ListLegendItem';\n\nexport interface LegendProps {\n width: number;\n height: number;\n data: LegendItem[];\n options: LegendComponentOptions;\n\n /**\n * State of selected items in the legend.\n *\n * Selected legend item state is a controlled value that should be managed using a\n * combination of this prop and `onSelectedChange`.\n */\n selectedItems: SelectedLegendItemState;\n\n /**\n * Callback fired when the selected items in the legend changes.\n */\n onSelectedItemsChange: (newSelected: SelectedLegendItemState) => void;\n\n /**\n * Callback fired when the mouse is moved over a legend item.\n */\n onItemMouseOver?: ListLegendItemProps['onMouseOver'];\n\n /**\n * Callback fired when the mouse is moved out of a legend item.\n */\n onItemMouseOut?: ListLegendItemProps['onMouseOut'];\n\n /**\n * Props specific to legend with `mode` set to `table`.\n */\n tableProps?: Pick<TableLegendProps, 'columns' | 'onSortingChange' | 'sorting'>;\n}\n\n// When the number of items to display is above this number, it is likely to\n// cause performance issues in the browser. The legend will be displayed in a\n// format (list) that allows for virtualization to minimize the performance impact.\n// Set this number based on testing, but it may need to be tuned a bit on the\n// future as people test this out on different machines.\nconst NEED_VIRTUALIZATION_LIMIT = 500;\n\nexport function Legend({\n width,\n height,\n options,\n data,\n selectedItems,\n onSelectedItemsChange,\n onItemMouseOver,\n onItemMouseOut,\n tableProps,\n}: LegendProps): ReactElement {\n const onLegendItemClick = (e: React.MouseEvent<HTMLElement, MouseEvent>, seriesId: string): void => {\n const isModifiedClick = e.metaKey || e.shiftKey;\n\n const newSelected = produce(selectedItems, (draft) => {\n if (draft === 'ALL') {\n return {\n [seriesId]: true,\n };\n }\n\n const isSelected = !!draft[seriesId];\n\n // Clicks with modifier key can select multiple items.\n if (isModifiedClick) {\n if (isSelected) {\n // Modified click on already selected item. Remove that item.\n delete draft[seriesId];\n } else {\n // Modified click on not-selected item. Add it.\n draft[seriesId] = true;\n }\n return draft;\n }\n\n if (isSelected) {\n // Clicked item was already selected. Unselect it and return to\n // ALL state.\n return 'ALL' as const;\n }\n\n // Select clicked item.\n return { [seriesId]: true };\n });\n onSelectedItemsChange(newSelected);\n };\n\n const mode = getLegendMode(options.mode);\n\n // The bottom legend is displayed as a list when the number of items is too\n // large and requires virtualization. Otherwise, it is rendered more compactly.\n // We do not need this check for the right-side legend because it is always\n // a virtualized list.\n const needsVirtualization = data.length >= NEED_VIRTUALIZATION_LIMIT;\n\n const commonLegendProps = {\n height,\n items: data,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n };\n\n let legendContent: ReactNode;\n if (mode === 'table') {\n legendContent = (\n <TableLegend {...commonLegendProps} onSelectedItemsChange={onSelectedItemsChange} width={width} {...tableProps} />\n );\n } else if (options.position === 'right' || needsVirtualization) {\n legendContent = <ListLegend {...commonLegendProps} width={width} onLegendItemClick={onLegendItemClick} />;\n } else {\n legendContent = <CompactLegend {...commonLegendProps} onLegendItemClick={onLegendItemClick} />;\n }\n\n if (options.position === 'right') {\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{\n position: 'absolute',\n top: 0,\n right: 0,\n backgroundColor: (theme) => `${theme.palette.background.default}`,\n }}\n >\n {legendContent}\n </Box>\n );\n }\n\n // Position bottom\n return (\n <Box\n style={{\n width: width,\n height: height,\n }}\n sx={{\n position: 'absolute',\n bottom: 0,\n backgroundColor: (theme) => `${theme.palette.background.default}`,\n }}\n >\n {legendContent}\n </Box>\n );\n}\n"],"names":["Box","produce","getLegendMode","ListLegend","CompactLegend","TableLegend","NEED_VIRTUALIZATION_LIMIT","Legend","width","height","options","data","selectedItems","onSelectedItemsChange","onItemMouseOver","onItemMouseOut","tableProps","onLegendItemClick","e","seriesId","isModifiedClick","metaKey","shiftKey","newSelected","draft","isSelected","mode","needsVirtualization","length","commonLegendProps","items","legendContent","position","style","sx","top","right","backgroundColor","theme","palette","background","default","bottom"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,GAAG,QAAQ,gBAAgB;AACpC,SAASC,OAAO,QAAQ,QAAQ;AAEhC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,WAAW,QAA0B,gBAAgB;AAuC9D,4EAA4E;AAC5E,6EAA6E;AAC7E,mFAAmF;AACnF,6EAA6E;AAC7E,w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AAG0B,iBAAiB;YAAErB,OAAOA;YAAOS,mBAAmBA;;IACtF,OAAO;QACLc,8BAAgB,KAAC3B;YAAe,GAAGyB,iBAAiB;YAAEZ,mBAAmBA;;IAC3E;IAEA,IAAIP,QAAQsB,QAAQ,KAAK,SAAS;QAChC,qBACE,KAAChC;YACCiC,OAAO;gBACLzB,OAAOA;gBACPC,QAAQA;YACV;YACAyB,IAAI;gBACFF,UAAU;gBACVG,KAAK;gBACLC,OAAO;gBACPC,iBAAiB,CAACC,QAAU,GAAGA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO,EAAE;YACnE;sBAECV;;IAGP;IAEA,kBAAkB;IAClB,qBACE,KAAC/B;QACCiC,OAAO;YACLzB,OAAOA;YACPC,QAAQA;QACV;QACAyB,IAAI;YACFF,UAAU;YACVU,QAAQ;YACRL,iBAAiB,CAACC,QAAU,GAAGA,MAAMC,OAAO,CAACC,UAAU,CAACC,OAAO,EAAE;QACnE;kBAECV;;AAGP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/LegendColorBadge.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { memo, ReactElement } from 'react';\nimport { Box, BoxProps } from '@mui/material';\nimport { combineSx } from '../utils';\n\nexport interface LegendColorBadgeProps extends BoxProps<'div'> {\n color: string;\n}\n\nexport const LegendColorBadge = memo(function LegendColorBadge({\n color,\n sx,\n ...others\n}: LegendColorBadgeProps): ReactElement {\n return (\n <Box\n {...others}\n sx={combineSx(\n {\n height: 4,\n width: 16,\n margin: (theme) => theme.spacing(0.5),\n },\n sx\n )}\n style={{ backgroundColor: color }}\n />\n );\n});\n"],"names":["memo","Box","combineSx","LegendColorBadge","color","sx","others","height","width","margin","theme","spacing","style","backgroundColor"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,IAAI,QAAsB,QAAQ;AAC3C,SAASC,GAAG,QAAkB,gBAAgB;AAC9C,SAASC,SAAS,QAAQ,WAAW;AAMrC,OAAO,MAAMC,iCAAmBH,KAAK,SAASG,iBAAiB,EAC7DC,KAAK,EACLC,EAAE,EACF,GAAGC,QACmB;IACtB,qBACE,KAACL;QACE,GAAGK,MAAM;QACVD,IAAIH,UACF;YACEK,QAAQ;YACRC,OAAO;YACPC,QAAQ,CAACC,QAAUA,MAAMC,OAAO,CAAC;QACnC,GACAN;QAEFO,OAAO;YAAEC,iBAAiBT;QAAM;;AAGtC,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/ListLegend.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Virtuoso } from 'react-virtuoso';\nimport { ReactElement } from 'react';\nimport { ListLegendItem, ListLegendItemProps } from './ListLegendItem';\nimport { LegendItem, SelectedLegendItemState, isLegendItemVisuallySelected } from './legend-model';\n\nexport interface ListLegendProps {\n items: LegendItem[];\n height: number;\n width: number;\n selectedItems: SelectedLegendItemState;\n onLegendItemClick: ListLegendItemProps['onClick'];\n onItemMouseOver: ListLegendItemProps['onMouseOver'];\n onItemMouseOut: ListLegendItemProps['onMouseOut'];\n}\n\n/**\n * ListLegend is used when legend.position is 'right' since legend items are\n * stacked. It is also used for `bottom` positioned legends when there are a\n * large number of items because it is virtualized and easier to visually scan\n * large numbers of items when there is a single item per row.\n */\nexport function ListLegend({\n items,\n height,\n width,\n selectedItems,\n onLegendItemClick,\n onItemMouseOver,\n onItemMouseOut,\n}: ListLegendProps): ReactElement {\n // show full labels on hover when there are many total series\n const truncateLabels = items.length > 5;\n return (\n <Virtuoso\n style={{ height, width }}\n data={items}\n itemContent={(index, item) => {\n return (\n <ListLegendItem\n key={item.id}\n item={item}\n index={index}\n truncateLabel={truncateLabels}\n isVisuallySelected={isLegendItemVisuallySelected(item, selectedItems)}\n onClick={onLegendItemClick}\n onMouseOver={onItemMouseOver}\n onMouseOut={onItemMouseOut}\n sx={{\n width: '100%',\n wordBreak: 'break-word',\n overflow: 'hidden',\n }}\n />\n );\n }}\n role=\"list\"\n />\n );\n}\n"],"names":["Virtuoso","ListLegendItem","isLegendItemVisuallySelected","ListLegend","items","height","width","selectedItems","onLegendItemClick","onItemMouseOver","onItemMouseOut","truncateLabels","length","style","data","itemContent","index","item","truncateLabel","isVisuallySelected","onClick","onMouseOver","onMouseOut","sx","wordBreak","overflow","id","role"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,QAAQ,QAAQ,iBAAiB;AAE1C,SAASC,cAAc,QAA6B,mBAAmB;AACvE,SAA8CC,4BAA4B,QAAQ,iBAAiB;AAYnG;;;;;CAKC,GACD,OAAO,SAASC,WAAW,EACzBC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACE;IAChB,6DAA6D;IAC7D,MAAMC,iBAAiBP,MAAMQ,MAAM,GAAG;IACtC,qBACE,KAACZ;QACCa,OAAO;YAAER;YAAQC;QAAM;QACvBQ,MAAMV;QACNW,aAAa,CAACC,OAAOC;YACnB,qBACE,KAAChB;gBAECgB,MAAMA;gBACND,OAAOA;gBACPE,eAAeP;gBACfQ,oBAAoBjB,6BAA6Be,MAAMV;gBACvDa,SAASZ;gBACTa,aAAaZ;gBACba,YAAYZ;gBACZa,IAAI;oBACFjB,OAAO;oBACPkB,WAAW;oBACXC,UAAU;gBACZ;eAZKR,KAAKS,EAAE;QAelB;QACAC,MAAK;;AAGX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/ListLegendItem.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { forwardRef, memo, MouseEvent, MouseEventHandler, ReactElement, useState } from 'react';\nimport { Box, ListItemText, ListItemProps, ListItemButton } from '@mui/material';\nimport { combineSx } from '../utils';\nimport { LegendColorBadge } from './LegendColorBadge';\nimport { LegendItem } from './legend-model';\n\nexport type LegendItemEventOpts = {\n /**\n * Unique identifier for the legend item.\n */\n id: string;\n\n /**\n * Index of the row in the original data.\n */\n index: number;\n};\n\nexport interface ListLegendItemProps extends Omit<ListItemProps<'div'>, 'onClick' | 'onMouseOver' | 'onMouseOut'> {\n item: LegendItem;\n\n index: number;\n\n /**\n * When true, the item is rendered differently to visually communicate it is\n * selected.\n */\n isVisuallySelected?: boolean;\n\n onClick: (e: MouseEvent<HTMLElement>, seriesId: string) => void;\n\n onMouseOver?: (e: MouseEvent, opts: LegendItemEventOpts) => void;\n onMouseOut?: (e: MouseEvent, opts: LegendItemEventOpts) => void;\n\n /**\n * When `true`, will keep labels to a single line with overflow ellipsized. The\n * full content will be shown on hover.\n *\n * When `false` or unset, will show the full label.\n */\n truncateLabel?: boolean;\n}\n\nconst ListLegendItemBase = forwardRef<HTMLDivElement, ListLegendItemProps>(function ListLegendItem(\n { item, sx, truncateLabel, onClick, isVisuallySelected, onMouseOver, onMouseOut, index, ...others },\n ref\n): ReactElement {\n const [noWrap, setNoWrap] = useState(truncateLabel);\n\n function handleTextMouseOver(): void {\n if (truncateLabel) {\n setNoWrap(false);\n }\n }\n\n function handleTextMouseOut(): void {\n if (truncateLabel) {\n setNoWrap(true);\n }\n }\n\n const handleClick: MouseEventHandler<HTMLDivElement> = (e) => {\n onClick(e, item.id);\n item.onClick?.(e);\n };\n\n return (\n <ListItemButton\n {...others}\n role=\"listitem\"\n sx={combineSx(\n {\n padding: 0,\n cursor: 'pointer',\n },\n sx\n )}\n dense={true}\n onClick={handleClick}\n onMouseOver={(e: MouseEvent) => onMouseOver?.(e, { id: item.id, index })}\n onMouseOut={(e: MouseEvent) => onMouseOut?.(e, { id: item.id, index })}\n selected={isVisuallySelected}\n ref={ref}\n >\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <LegendColorBadge color={item.color} />\n </Box>\n <ListItemText\n primary={item.label}\n primaryTypographyProps={{ noWrap: noWrap }}\n onMouseOver={handleTextMouseOver}\n onMouseOut={handleTextMouseOut}\n ></ListItemText>\n </ListItemButton>\n );\n});\n\nexport const ListLegendItem = memo(ListLegendItemBase);\n"],"names":["forwardRef","memo","useState","Box","ListItemText","ListItemButton","combineSx","LegendColorBadge","ListLegendItemBase","ListLegendItem","item","sx","truncateLabel","onClick","isVisuallySelected","onMouseOver","onMouseOut","index","others","ref","noWrap","setNoWrap","handleTextMouseOver","handleTextMouseOut","handleClick","e","id","role","padding","cursor","dense","selected","display","alignItems","color","primary","label","primaryTypographyProps"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,UAAU,EAAEC,IAAI,EAA+CC,QAAQ,QAAQ,QAAQ;AAChG,SAASC,GAAG,EAAEC,YAAY,EAAiBC,cAAc,QAAQ,gBAAgB;AACjF,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,gBAAgB,QAAQ,qBAAqB;AAwCtD,MAAMC,mCAAqBR,WAAgD,SAASS,eAClF,EAAEC,IAAI,EAAEC,EAAE,EAAEC,aAAa,EAAEC,OAAO,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,UAAU,EAAEC,KAAK,EAAE,GAAGC,QAAQ,EACnGC,GAAG;IAEH,MAAM,CAACC,QAAQC,UAAU,GAAGnB,SAASU;IAErC,SAASU;QACP,IAAIV,eAAe;YACjBS,UAAU;QACZ;IACF;IAEA,SAASE;QACP,IAAIX,eAAe;YACjBS,UAAU;QACZ;IACF;IAEA,MAAMG,cAAiD,CAACC;QACtDZ,QAAQY,GAAGf,KAAKgB,EAAE;QAClBhB,KAAKG,OAAO,GAAGY;IACjB;IAEA,qBACE,MAACpB;QACE,GAAGa,MAAM;QACVS,MAAK;QACLhB,IAAIL,UACF;YACEsB,SAAS;YACTC,QAAQ;QACV,GACAlB;QAEFmB,OAAO;QACPjB,SAASW;QACTT,aAAa,CAACU,IAAkBV,cAAcU,GAAG;gBAAEC,IAAIhB,KAAKgB,EAAE;gBAAET;YAAM;QACtED,YAAY,CAACS,IAAkBT,aAAaS,GAAG;gBAAEC,IAAIhB,KAAKgB,EAAE;gBAAET;YAAM;QACpEc,UAAUjB;QACVK,KAAKA;;0BAEL,KAAChB;gBAAIQ,IAAI;oBAAEqB,SAAS;oBAAQC,YAAY;gBAAS;0BAC/C,cAAA,KAAC1B;oBAAiB2B,OAAOxB,KAAKwB,KAAK;;;0BAErC,KAAC9B;gBACC+B,SAASzB,KAAK0B,KAAK;gBACnBC,wBAAwB;oBAAEjB,QAAQA;gBAAO;gBACzCL,aAAaO;gBACbN,YAAYO;;;;AAIpB;AAEA,OAAO,MAAMd,+BAAiBR,KAAKO,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/TableLegend.tsx"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ReactElement, useMemo } from 'react';\nimport { Table, TableProps, TableColumnConfig } from '../Table';\nimport { LegendItem } from './legend-model';\n\nexport interface TableLegendProps extends Pick<TableProps<LegendItem>, 'sorting' | 'onSortingChange'> {\n items: LegendItem[];\n height: number;\n width: number;\n selectedItems: TableProps<LegendItem>['rowSelection'] | 'ALL';\n onSelectedItemsChange: TableProps<LegendItem>['onRowSelectionChange'];\n onItemMouseOver?: TableProps<LegendItem>['onRowMouseOver'];\n onItemMouseOut?: TableProps<LegendItem>['onRowMouseOut'];\n columns?: TableProps<LegendItem>['columns'];\n}\n\nconst COLUMNS: Array<TableColumnConfig<LegendItem>> = [\n {\n accessorKey: 'label',\n header: 'Name',\n enableSorting: true,\n\n // Starting with `title` attr instead of a tooltip because it is easier to\n // implement. We should try adding a tooltip in the future, but we'll need\n // to be very careful about performance when doing so with large tables.\n cell: ({ getValue }) => <span title={getValue()}>{getValue()}</span>,\n },\n];\n\nconst getRowId: NonNullable<TableProps<LegendItem>['getRowId']> = (data) => {\n return data.id;\n};\n\nconst getCheckboxColor: TableProps<LegendItem>['getCheckboxColor'] = (data) => {\n return data.color;\n};\n\nexport function TableLegend({\n items,\n selectedItems: initRowSelection,\n onSelectedItemsChange,\n onItemMouseOver,\n onItemMouseOut,\n height,\n width,\n columns: additionalColumns = [],\n sorting,\n onSortingChange,\n}: TableLegendProps): ReactElement {\n const rowSelection = useMemo(() => {\n return typeof initRowSelection !== 'string'\n ? initRowSelection\n : // Turn \"ALL\" state into a table component friendly map of all of the selected\n // items for checkboxes.\n // TODO: clean this up if we switch to also using checkboxes in list legend.\n items.reduce(\n (allRowSelection, item, index) => {\n allRowSelection[getRowId(item, index)] = true;\n return allRowSelection;\n },\n {} as Record<string, boolean>\n );\n }, [initRowSelection, items]);\n\n const columns = useMemo(() => {\n return [...COLUMNS, ...additionalColumns];\n }, [additionalColumns]);\n\n return (\n <Table\n height={height}\n width={width}\n rowSelection={rowSelection}\n onRowSelectionChange={onSelectedItemsChange}\n onRowMouseOver={onItemMouseOver}\n onRowMouseOut={onItemMouseOut}\n sorting={sorting}\n onSortingChange={onSortingChange}\n data={items}\n columns={columns}\n density=\"compact\"\n defaultColumnWidth=\"auto\"\n getRowId={getRowId}\n getCheckboxColor={getCheckboxColor}\n checkboxSelection\n rowSelectionVariant=\"legend\"\n />\n );\n}\n"],"names":["useMemo","Table","COLUMNS","accessorKey","header","enableSorting","cell","getValue","span","title","getRowId","data","id","getCheckboxColor","color","TableLegend","items","selectedItems","initRowSelection","onSelectedItemsChange","onItemMouseOver","onItemMouseOut","height","width","columns","additionalColumns","sorting","onSortingChange","rowSelection","reduce","allRowSelection","item","index","onRowSelectionChange","onRowMouseOver","onRowMouseOut","density","defaultColumnWidth","checkboxSelection","rowSelectionVariant"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C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iB;QACjBC,qBAAoB;;AAG1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/index.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './Legend';\nexport * from './legend-model';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,WAAW;AACzB,cAAc,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/Legend/legend-model.ts"],"sourcesContent":["// Copyright 2023 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { MouseEventHandler } from 'react';\nimport { LegendOptionsBase } from '@perses-dev/core';\n\n// This file contains legend-related model code specific to the legend component.\n// See the `core` package for common/shared legend model code and the\n// `plugin-system` package for legend model code specific to panel plugin specs.\n\n// Note: explicitly defining different options for the legend component and\n// legend spec that extend from some common options, so we can allow the\n// component and the spec to diverge in some upcoming work.\nexport type LegendComponentOptions = LegendOptionsBase;\n\nexport interface LegendItem {\n id: string;\n label: string;\n color: string;\n\n /**\n * Additional data for the legend item. Useful for laying out additional\n * columns when using a table legend.\n */\n data?: Record<string, unknown>;\n\n onClick?: MouseEventHandler<HTMLElement>;\n}\n\n/**\n * State of selected items in the legend.\n * - When \"ALL\", all legend items are selected, but not visually highlighted.\n * - Otherwise, it is a Record that associates legend item ids with a boolean\n * value. When the associated entry for a legend item is `true`, that item\n * will be treated as selected and visually highlighted.\n */\nexport type SelectedLegendItemState = Record<LegendItem['id'], boolean> | 'ALL';\n\nexport function isLegendItemVisuallySelected(item: LegendItem, selectedItems: SelectedLegendItemState): boolean {\n // In the \"ALL\" case, technically all legend items are selected, but we do\n // not render them differently.\n return selectedItems !== 'ALL' && !!selectedItems[item.id];\n}\n"],"names":["isLegendItemVisuallySelected","item","selectedItems","id"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAqCjC,OAAO,SAASA,6BAA6BC,IAAgB,EAAEC,aAAsC;IACnG,0EAA0E;IAC1E,+BAA+B;IAC/B,OAAOA,kBAAkB,SAAS,CAAC,CAACA,aAAa,CAACD,KAAKE,EAAE,CAAC;AAC5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/LinksEditor/LinksEditor.tsx"],"sourcesContent":["// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { Fragment, HTMLAttributes, ReactElement } from 'react';\nimport { Checkbox, Divider, FormControlLabel, IconButton, Stack, TextField, Typography } from '@mui/material';\nimport { Controller, useFieldArray, Control } from 'react-hook-form';\nimport PlusIcon from 'mdi-material-ui/Plus';\nimport MinusIcon from 'mdi-material-ui/Minus';\nimport { PanelEditorValues } from '@perses-dev/core';\n\nexport interface LinksEditorProps extends HTMLAttributes<HTMLDivElement> {\n control: Control<PanelEditorValues>;\n}\n\nexport function LinksEditor({ control, ...props }: LinksEditorProps): ReactElement {\n const { fields, append, remove } = useFieldArray({\n control: control,\n name: 'panelDefinition.spec.links',\n });\n\n return (\n <Stack {...props} gap={3}>\n {fields && fields.length > 0 ? (\n fields.map((field, index) => (\n <Fragment key={field.id}>\n <Stack direction=\"row\" gap={1} alignItems=\"center\">\n <LinkControl control={control} index={index} />\n <IconButton style={{ width: 'fit-content', height: 'fit-content' }} onClick={() => remove(index)}>\n <MinusIcon />\n </IconButton>\n </Stack>\n <Divider />\n </Fragment>\n ))\n ) : (\n <Typography variant=\"subtitle1\" mb={2} fontStyle=\"italic\">\n No links defined\n </Typography>\n )}\n <IconButton style={{ width: 'fit-content', height: 'fit-content' }} onClick={() => append({ url: '' })}>\n <PlusIcon />\n </IconButton>\n </Stack>\n );\n}\n\nfunction LinkControl({ control, index }: { control: Control<PanelEditorValues>; index: number }): ReactElement {\n return (\n <Stack gap={2} flexGrow={1}>\n <Stack direction=\"row\" gap={2}>\n <Controller\n control={control}\n name={`panelDefinition.spec.links.${index}.url`}\n render={({ field, fieldState }) => (\n <TextField\n {...field}\n required\n fullWidth\n label=\"URL\"\n error={!!fieldState.error}\n helperText={fieldState.error?.message}\n onChange={(event) => {\n field.onChange(event);\n }}\n />\n )}\n />\n <Controller\n control={control}\n name={`panelDefinition.spec.links.${index}.name`}\n render={({ field, fieldState }) => (\n <TextField\n {...field}\n fullWidth\n label=\"Name\"\n defaultValue=\"\"\n error={!!fieldState.error}\n helperText={fieldState.error?.message}\n onChange={(event) => {\n field.onChange(event);\n }}\n />\n )}\n />\n <Controller\n control={control}\n name={`panelDefinition.spec.links.${index}.tooltip`}\n render={({ field, fieldState }) => (\n <TextField\n {...field}\n fullWidth\n label=\"Tooltip\"\n defaultValue=\"\"\n error={!!fieldState.error}\n helperText={fieldState.error?.message}\n onChange={(event) => {\n field.onChange(event);\n }}\n />\n )}\n />\n </Stack>\n <Stack gap={2} direction=\"row\" alignItems=\"center\">\n <Controller\n control={control}\n name={`panelDefinition.spec.links.${index}.renderVariables`}\n render={({ field }) => (\n <FormControlLabel\n label=\"Render Variables\"\n control={<Checkbox {...field} checked={field.value} onChange={(e) => field.onChange(e.target.checked)} />}\n />\n )}\n />\n <Controller\n control={control}\n name={`panelDefinition.spec.links.${index}.targetBlank`}\n render={({ field }) => (\n <FormControlLabel\n label=\"Open in new tab\"\n control={<Checkbox {...field} checked={field.value} onChange={(e) => field.onChange(e.target.checked)} />}\n />\n )}\n />\n </Stack>\n </Stack>\n );\n}\n"],"names":["Fragment","Checkbox","Divider","FormControlLabel","IconButton","Stack","TextField","Typography","Controller","useFieldArray","PlusIcon","MinusIcon","LinksEditor","control","props","fields","append","remove","name","gap","length","map","field","index","direction","alignItems","LinkControl","style","width","height","onClick","id","variant","mb","fontStyle","url","flexGrow","render","fieldState","required","fullWidth","label","error","helperText","message","onChange","event","defaultValue","checked","value","e","target"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAEjC,SAASA,QAAQ,QAAsC,QAAQ;AAC/D,SAASC,QAAQ,EAAEC,OAAO,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,gBAAgB;AAC9G,SAASC,UAAU,EAAEC,aAAa,QAAiB,kBAAkB;AACrE,OA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