From 1ca9910736475cf8f6a0660d2b523bb02ff26103 Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Tue, 25 Mar 2025 10:48:36 +0100 Subject: [PATCH] Grafana Data: Use package.json exports for internal code (#102696) * refactor(frontend): rename all @grafana/data/src imports to @grafana/data * feat(grafana-data): introduce internal entrypoint for sharing code only with grafana * feat(grafana-data): add test entrypoint for data test utils usage in core * refactor(frontend): update import paths to use grafana/data exports entrypoints * docs(grafana-data): update comment in internal/index.ts * refactor(frontend): prefer public namespaced exports over re-exporting via internal * chore(frontend): fix a couple more weird paths that typescript complains about --- .betterer.results | 467 +++++------------- packages/grafana-data/package.json | 20 + packages/grafana-data/src/internal/index.ts | 100 ++++ .../panel/getPanelOptionsWithDefaults.test.ts | 3 +- .../{__mocks__ => helpers}/pluginMocks.ts | 0 packages/grafana-data/test/index.ts | 2 + .../src/querybuilder/operationUtils.ts | 2 +- public/app/core/components/GraphNG/utils.ts | 6 +- .../core/components/OptionsUI/registry.tsx | 2 +- .../core/components/TimelineChart/timeline.ts | 5 +- .../core/components/TimelineChart/utils.ts | 6 +- .../GrafanaJavascriptAgentBackend.test.ts | 2 +- public/app/core/services/theme.ts | 2 +- public/app/core/utils/explore.test.ts | 11 +- public/app/core/utils/richHistory.ts | 10 +- .../DashboardsListModalButton.tsx | 2 +- .../DeleteUserModalButton.tsx | 2 +- .../unified/GrafanaRuleQueryViewer.tsx | 5 +- .../GrafanaAlertmanagerDeliveryWarning.tsx | 2 +- .../rule-editor/CloudAlertPreview.tsx | 2 +- .../rule-editor/DashboardPicker.tsx | 2 +- .../components/rule-editor/QueryOptions.tsx | 5 +- .../rule-editor/rule-types/RuleTypePicker.tsx | 2 +- .../rules/AlertInstanceStateFilter.tsx | 2 +- .../components/rules/RuleConfigStatus.tsx | 2 +- .../rules/central-state-history/utils.ts | 2 +- .../state-history/useRuleHistoryRecords.tsx | 2 +- .../unified/home/PluginIntegrations.tsx | 2 +- .../alerting/unified/styles/pagination.ts | 2 +- .../features/alerting/unified/utils/misc.ts | 2 +- .../alerting/unified/utils/routeTree.ts | 6 +- .../features/alerting/unified/utils/time.ts | 4 +- .../StandardAnnotationQueryEditor.test.tsx | 2 +- .../auth-config/AuthProvidersListPage.tsx | 2 +- public/app/features/canvas/element.ts | 2 +- .../app/features/canvas/elements/button.tsx | 3 +- public/app/features/canvas/types.ts | 2 +- .../inspect/HelpWizard/HelpWizard.test.tsx | 2 +- .../inspect/InspectJsonTab.test.tsx | 2 +- .../pages/DashboardScenePage.test.tsx | 2 +- .../pages/PublicDashboardScenePage.test.tsx | 2 +- .../PanelDataQueriesTab.test.tsx | 2 +- .../panel-edit/PanelEditor.test.ts | 2 +- .../panel-edit/PanelOptions.test.tsx | 2 +- .../DashboardDatasourceBehaviour.test.tsx | 2 +- .../scene/DashboardLinksControls.tsx | 2 +- .../scene/DashboardSceneRenderer.test.tsx | 2 +- .../scene/LibraryPanelBehavior.test.tsx | 2 +- .../scene/PanelMenuBehavior.test.tsx | 2 +- .../layout-default/DashboardGridItem.test.tsx | 2 +- .../RowRepeaterBehavior.test.tsx | 2 +- .../RowItemRepeaterBehavior.test.tsx | 2 +- .../serialization/angularMigration.test.ts | 2 +- .../transformSaveModelToScene.test.ts | 2 +- .../transformSceneToSaveModel.test.ts | 2 +- .../settings/VariablesEditView.test.tsx | 2 +- .../share-externally/ShareExternally.test.tsx | 2 +- .../sharing/ShareDrawer/ShareDrawer.test.tsx | 2 +- .../sharing/ShareLinkTab.test.tsx | 2 +- .../panel-share/SharePanelInternally.test.tsx | 2 +- .../DashboardPrompt/DashboardPrompt.test.tsx | 2 +- .../components/HelpWizard/HelpWizard.test.tsx | 2 +- .../PanelEditor/OptionsPaneOptions.test.tsx | 2 +- .../PanelEditor/PanelHeaderCorner.tsx | 3 +- .../PanelEditor/getVisualizationOptions.tsx | 8 +- .../PanelEditor/state/actions.test.ts | 2 +- .../PublicDashboardNotAvailable.tsx | 2 +- .../ConfigPublicDashboard.tsx | 2 +- .../ConfigPublicDashboard/Configuration.tsx | 2 +- .../AcknowledgeCheckboxes.tsx | 2 +- .../UnsupportedDataSourcesAlert.tsx | 2 +- .../SharePublicDashboard.test.tsx | 2 +- .../SharePublicDashboard.tsx | 2 +- .../SharePublicDashboardUtils.test.tsx | 3 +- .../components/SubMenu/DashboardLinks.tsx | 2 +- .../SubMenu/DashboardLinksDashboard.tsx | 2 +- .../dashboard/state/DashboardMigrator.test.ts | 2 +- .../dashboard/state/DashboardMigrator.ts | 3 +- .../dashboard/state/PanelModel.test.ts | 3 +- .../features/dashboard/utils/panel.test.ts | 2 +- .../app/features/dashboard/utils/timeRange.ts | 3 +- .../datasources/components/CloudInfoBox.tsx | 2 +- .../datasources/state/buildCategories.test.ts | 2 +- public/app/features/dimensions/context.ts | 2 +- public/app/features/dimensions/scale.ts | 3 +- .../app/features/explore/Logs/Logs.test.tsx | 2 +- .../explore/Logs/LogsColumnSearch.tsx | 2 +- .../explore/Logs/LogsMetaRow.test.tsx | 2 +- .../app/features/explore/Logs/LogsMetaRow.tsx | 2 +- .../features/explore/Logs/LogsTable.test.tsx | 2 +- .../explore/Logs/LogsTableActiveFields.tsx | 2 +- .../explore/Logs/LogsTableMultiSelect.tsx | 2 +- .../explore/Logs/LogsTableWrap.test.tsx | 10 +- .../explore/Logs/utils/testMocks.test.ts | 4 +- public/app/features/explore/NoData.tsx | 2 +- .../explore/PrometheusListView/ItemLabels.tsx | 2 +- .../explore/PrometheusListView/ItemValues.tsx | 2 +- .../RawListContainer.test.tsx | 2 +- .../PrometheusListView/RawListContainer.tsx | 2 +- .../PrometheusListView/RawListItem.tsx | 2 +- .../RawListItemAttributes.tsx | 2 +- .../app/features/explore/state/main.test.ts | 3 +- .../live/centrifuge/LiveDataStream.ts | 2 +- .../logs/components/InfiniteScroll.test.tsx | 5 +- .../logs/components/InfiniteScroll.tsx | 12 +- .../logs/components/LogDetailsRow.test.tsx | 3 +- public/app/features/logs/logsModel.ts | 2 +- .../DeletePublicDashboardModal.tsx | 2 +- .../app/features/panel/state/actions.test.ts | 3 +- .../plugins/components/AppRootPage.test.tsx | 2 +- .../extensions/registry/AddedLinksRegistry.ts | 2 +- .../features/plugins/extensions/validators.ts | 19 +- .../plugins/loader/sharedDependencies.ts | 2 +- .../app/features/plugins/pluginPreloader.ts | 7 +- .../features/scopes/tests/utils/render.tsx | 2 +- .../app/features/trails/DataTrailsHistory.tsx | 5 +- .../logs/lokiRecordingRules.test.ts | 2 +- .../FilterByValueFilterEditor.tsx | 2 +- .../FilterByValueTransformerEditor.test.tsx | 2 +- .../FilterByValueTransformerEditor.tsx | 2 +- .../calculateHeatmap/heatmap.test.ts | 3 +- .../transformers/calculateHeatmap/heatmap.ts | 2 +- .../BinaryOperationOptionsEditor.tsx | 2 +- .../CalculateFieldTransformerEditor.tsx | 2 +- .../CumulativeOptionsEditor.tsx | 6 +- .../IndexOptionsEditor.tsx | 2 +- .../ReduceRowOptionsEditor.tsx | 5 +- .../UnaryOperationEditor.tsx | 6 +- .../WindowOptionsEditor.tsx | 2 +- .../editors/ConcatenateTransformerEditor.tsx | 5 +- .../ConvertFieldTypeTransformerEditor.tsx | 5 +- .../editors/EnumMappingEditor.tsx | 2 +- .../editors/FilterByNameTransformerEditor.tsx | 2 +- .../FilterByRefIdTransformerEditor.tsx | 2 +- .../editors/FormatStringTransformerEditor.tsx | 5 +- .../editors/FormatTimeTransformerEditor.tsx | 2 +- .../editors/GroupByTransformerEditor.tsx | 6 +- .../GroupToNestedTableTransformerEditor.tsx | 4 +- .../editors/HistogramTransformerEditor.tsx | 5 +- .../editors/JoinByFieldTransformerEditor.tsx | 2 +- .../LabelsToFieldsTransformerEditor.tsx | 5 +- .../editors/LimitTransformerEditor.tsx | 2 +- .../editors/MergeTransformerEditor.tsx | 2 +- .../OrganizeFieldsTransformerEditor.tsx | 3 +- .../editors/ReduceTransformerEditor.tsx | 2 +- .../editors/RenameByRegexTransformer.tsx | 2 +- .../editors/SeriesToRowsTransformerEditor.tsx | 2 +- .../editors/SortByTransformerEditor.tsx | 2 +- .../editors/TransposeTransformerEditor.tsx | 2 +- .../extractFields/extractFields.test.ts | 5 +- .../lookupGazetteer/fieldLookup.test.ts | 4 +- .../partitionByValues/partitionByValues.ts | 3 +- .../transformers/spatial/optionsHelper.tsx | 3 +- .../spatial/spatialTransformer.test.ts | 5 +- .../variables/datasource/actions.test.ts | 2 +- .../variables/datasource/reducer.test.ts | 2 +- .../state/initVariableTransaction.test.ts | 2 +- ...igrateVariablesDatasourceNameToRef.test.ts | 2 +- .../azuremonitor/__mocks__/utils.ts | 3 +- .../components/LogsQueryEditor/RawQuery.tsx | 2 +- .../CloudWatchMetricsQueryRunner.test.ts | 3 +- .../datasource/dashboard/datasource.test.ts | 2 +- .../elasticsearch/ElasticResponse.ts | 2 +- .../editor/annotation/AnnotationEditor.tsx | 2 +- .../influxdb/components/editor/constants.ts | 2 +- .../components/editor/query/QueryEditor.tsx | 2 +- .../editor/query/flux/FluxQueryEditor.tsx | 2 +- .../editor/query/fsql/FSQLEditor.tsx | 2 +- .../utils/getTemplateVariableOptions.ts | 2 +- .../utils/withTemplateVariableOptions.ts | 2 +- .../editor/query/influxql/utils/wrapper.ts | 2 +- .../influxdb/influxql_metadata_query.ts | 2 +- .../datasources/prometheus/RawQuery.tsx | 2 +- public/app/plugins/datasource/tempo/types.ts | 2 +- public/app/plugins/panel/barchart/bars.ts | 6 +- public/app/plugins/panel/barchart/utils.ts | 2 +- .../plugins/panel/bargauge/BarGaugeLegend.tsx | 3 +- .../app/plugins/panel/candlestick/fields.ts | 2 +- .../panel/canvas/components/CanvasTooltip.tsx | 4 +- .../panel/canvas/editor/connectionEditor.tsx | 2 +- .../editor/element/QuickPositioning.tsx | 2 +- .../canvas/editor/element/elementEditor.tsx | 2 +- .../canvas/editor/inline/InlineEditBody.tsx | 3 +- .../panel/canvas/editor/layer/layerEditor.tsx | 2 +- .../plugins/panel/canvas/editor/options.ts | 2 +- public/app/plugins/panel/canvas/utils.ts | 3 +- .../components/DatagridContextMenu.tsx | 2 +- .../panel/geomap/components/MarkersLegend.tsx | 9 +- .../panel/geomap/editor/layerEditor.tsx | 2 +- .../panel/geomap/layers/data/routeLayer.tsx | 6 +- .../utils/checkFeatureMatchesStyleRule.ts | 2 +- .../app/plugins/panel/geomap/utils/tooltip.ts | 2 +- .../app/plugins/panel/geomap/utils/utils.ts | 3 +- .../app/plugins/panel/graph/data_processor.ts | 2 +- .../app/plugins/panel/histogram/Histogram.tsx | 4 +- .../panel/histogram/HistogramPanel.tsx | 11 +- public/app/plugins/panel/histogram/module.tsx | 2 +- public/app/plugins/panel/histogram/utils.ts | 5 +- public/app/plugins/panel/logs/LogsPanel.tsx | 4 +- .../app/plugins/panel/nodeGraph/Node.test.tsx | 2 +- public/app/plugins/panel/stat/StatPanel.tsx | 2 +- .../app/plugins/panel/status-history/utils.ts | 3 +- public/app/plugins/panel/table/migrations.ts | 2 +- public/app/plugins/panel/timeseries/utils.ts | 6 +- public/app/plugins/panel/trend/TrendPanel.tsx | 11 +- .../plugins/panel/xychart/XYChartPanel.tsx | 5 +- .../plugins/panel/xychart/XYChartTooltip.tsx | 5 +- public/app/plugins/panel/xychart/scatter.ts | 14 +- public/app/plugins/panel/xychart/utils.ts | 2 +- public/app/routes/RoutesWrapper.tsx | 2 +- 210 files changed, 531 insertions(+), 688 deletions(-) create mode 100644 packages/grafana-data/src/internal/index.ts rename packages/grafana-data/test/{__mocks__ => helpers}/pluginMocks.ts (100%) create mode 100644 packages/grafana-data/test/index.ts diff --git a/.betterer.results b/.betterer.results index e83dff234b4..be6ec2229c5 100644 --- a/.betterer.results +++ b/.betterer.results @@ -392,8 +392,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"] ], - "packages/grafana-data/test/__mocks__/pluginMocks.ts:5381": [ - [0, 0, 0, "Unexpected any. Specify a different type.", "0"] + "packages/grafana-data/test/helpers/pluginMocks.ts:5381": [ + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], "packages/grafana-e2e-selectors/src/resolver.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -882,11 +883,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], - "public/app/core/components/GraphNG/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToUndefThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], "public/app/core/components/Layers/LayerDragDropList.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -912,9 +908,6 @@ exports[`better eslint`] = { "public/app/core/components/OptionsUI/fieldColor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], - "public/app/core/components/OptionsUI/registry.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/overrides/processors\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/core/components/OptionsUI/units.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -996,14 +989,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/core/components/TimelineChart/timeline.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/core/components/TimelineChart/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToValue\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], "public/app/core/config.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`Settings\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`config\`)", "1"] @@ -1052,12 +1037,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], - "public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/core/services/theme.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/registry\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/core/specs/backend_srv.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -1097,9 +1076,6 @@ exports[`better eslint`] = { "public/app/core/utils/deferred.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/core/utils/explore.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/core/utils/fetch.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -1121,10 +1097,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/core/utils/richHistory.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "1"], - [0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "2"], - [0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "3"] + [0, 0, 0, "Do not re-export imported variable (\`RichHistorySearchFilters\`)", "0"], + [0, 0, 0, "Do not re-export imported variable (\`RichHistorySettings\`)", "1"], + [0, 0, 0, "Do not re-export imported variable (\`SortOrder\`)", "2"] ], "public/app/core/utils/ticks.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -1209,9 +1184,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], "public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], @@ -1224,8 +1199,7 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "12"], [0, 0, 0, "No untranslated strings. Wrap text with ", "13"], [0, 0, 0, "No untranslated strings. Wrap text with ", "14"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "15"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "16"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "15"] ], "public/app/features/alerting/unified/NotificationPoliciesPage.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -1871,11 +1845,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], "public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/alerting/unified/components/rule-editor/QueryRows.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -2227,9 +2200,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], - "public/app/features/alerting/unified/components/rules/central-state-history/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldComparers\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/components/rules/state-history/LogRecordViewer.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] @@ -2251,9 +2221,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], - "public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldComparers\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/components/settings/AlertmanagerCard.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -2475,9 +2442,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/features/alerting/unified/utils/misc.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/utils/receiver-form.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -2494,9 +2458,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"] ], - "public/app/features/alerting/unified/utils/routeTree.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/arrayUtils\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/alerting/unified/utils/rule-form.ts:5381": [ [0, 0, 0, "\'@grafana/runtime/src/utils/DataSourceWithBackend\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], @@ -2506,9 +2467,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], - "public/app/features/alerting/unified/utils/time.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/annotations/components/AnnotationResultMapper.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], @@ -2550,8 +2508,7 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/auth-config/AuthProvidersListPage.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/auth-config/ProviderConfigForm.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2602,9 +2559,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "2"] ], - "public/app/features/canvas/element.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/canvas/elements/notFound.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], @@ -2850,9 +2804,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], - "public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/dashboard-scene/scene/PanelLinks.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -3333,10 +3284,8 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] ], "public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Unexpected any. Specify a different type.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], "public/app/features/dashboard/components/PanelEditor/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -3448,20 +3397,13 @@ exports[`better eslint`] = { "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], - "public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/query\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/dashboard/components/ShareModal/ViewJsonModal.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], - "public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/text/sanitize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "public/app/features/dashboard/components/SubMenu/SubMenu.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] @@ -3574,12 +3516,12 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "11"] ], "public/app/features/dashboard/state/DashboardMigrator.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/labelsToFields\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/merge\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], - [0, 0, 0, "Do not use any type assertions.", "4"], - [0, 0, 0, "Do not use any type assertions.", "5"], + [0, 0, 0, "Unexpected any. Specify a different type.", "4"], + [0, 0, 0, "Unexpected any. Specify a different type.", "5"], [0, 0, 0, "Unexpected any. Specify a different type.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"], @@ -3601,9 +3543,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "24"], [0, 0, 0, "Unexpected any. Specify a different type.", "25"], [0, 0, 0, "Unexpected any. Specify a different type.", "26"], - [0, 0, 0, "Unexpected any. Specify a different type.", "27"], - [0, 0, 0, "Unexpected any. Specify a different type.", "28"], - [0, 0, 0, "Unexpected any. Specify a different type.", "29"] + [0, 0, 0, "Unexpected any. Specify a different type.", "27"] ], "public/app/features/dashboard/state/DashboardModel.repeat.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -3716,10 +3656,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/datasources/components/CloudInfoBox.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/config\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/datasources/components/DashboardsTable.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -3900,8 +3839,7 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"] ], "public/app/features/dimensions/scale.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/scale\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/dimensions/types.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -3933,9 +3871,6 @@ exports[`better eslint`] = { "public/app/features/explore/Logs/LiveLogs.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], - "public/app/features/explore/Logs/Logs.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/Logs.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], @@ -3948,15 +3883,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] ], - "public/app/features/explore/Logs/LogsMetaRow.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/LogsSamplePanel.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], - "public/app/features/explore/Logs/LogsTable.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/LogsTableAvailableFields.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -3966,9 +3895,6 @@ exports[`better eslint`] = { "public/app/features/explore/Logs/LogsTableNavField.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], - "public/app/features/explore/Logs/LogsTableWrap.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/Logs/LogsTableWrap.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], @@ -4149,9 +4075,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/features/explore/state/main.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/url\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/explore/state/time.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -4319,10 +4242,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/live/centrifuge/LiveDataStream.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/StreamingDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/runtime/src/services/live\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/runtime/src/utils/toDataQueryError\' import is restricted from being used by a pattern. Import from the public export instead.", "2"], - [0, 0, 0, "Do not use any type assertions.", "3"] + [0, 0, 0, "\'@grafana/runtime/src/services/live\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "\'@grafana/runtime/src/utils/toDataQueryError\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "2"] ], "public/app/features/live/centrifuge/channel.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4344,12 +4266,8 @@ exports[`better eslint`] = { "public/app/features/live/live.ts:5381": [ [0, 0, 0, "\'@grafana/runtime/src/utils/DataSourceWithBackend\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] ], - "public/app/features/logs/components/InfiniteScroll.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/logs/components/InfiniteScroll.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/logs/components/LogDetails.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4397,9 +4315,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] ], - "public/app/features/logs/logsModel.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/valueFormats/symbolFormatters\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/logs/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -4713,24 +4628,15 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/plugins/extensions/usePluginComponents.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/features/plugins/extensions/usePluginFunctions.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/plugins/extensions/validators.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/plugins/loader/sharedDependencies.ts:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], - "public/app/features/plugins/pluginPreloader.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/pluginExtensions\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/plugins/sandbox/distortion_map.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -5382,8 +5288,7 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/trails/DataTrailsHistory.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/trails/MetricScene.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5417,21 +5322,16 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] - ], - "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByValue\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/transformers/FilterByValueTransformer/ValueMatchers/BasicMatcherEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5467,13 +5367,9 @@ exports[`better eslint`] = { "public/app/features/transformers/calculateHeatmap/editor/helper.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/features/transformers/calculateHeatmap/heatmap.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/features/transformers/calculateHeatmap/heatmap.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"] + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/features/transformers/configFromQuery/ConfigFromQueryTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5481,66 +5377,58 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/calculateField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/index.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`CalculateFieldTransformerEditor\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`calculateFieldTransformRegistryItem\`)", "1"] ], "public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/concat\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], @@ -5555,15 +5443,13 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "13"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "14"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "15"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "17"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"] ], "public/app/features/transformers/editors/EnumMappingEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], - [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], + [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "1"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] ], "public/app/features/transformers/editors/EnumMappingRow.tsx:5381": [ [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], @@ -5571,48 +5457,39 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByName\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "\'@grafana/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] - ], - "public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByRefId\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] ], "public/app/features/transformers/editors/FormatStringTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/formatString\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/formatTime\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "5"] ], "public/app/features/transformers/editors/GroupByTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/groupToNestedTable\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/editors/GroupingToMatrixTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5621,73 +5498,59 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/HistogramTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinByField\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], "public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/labelsToFields\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/editors/LimitTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/limit\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"] ], "public/app/features/transformers/editors/MergeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/merge\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/order\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/organize\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/transformers/editors/ReduceTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/reduce\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] ], "public/app/features/transformers/editors/RenameByRegexTransformer.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/renameByRegex\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] - ], - "public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/seriesToRows\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/SortByTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/sortBy\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/TransposeTransformerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/transpose\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"], - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"] ], "public/app/features/transformers/extractFields/ExtractFieldsTransformerEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -5714,11 +5577,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], - "public/app/features/transformers/extractFields/extractFields.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/sortBy\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/utils/tests/mockTransformationsRegistry\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], "public/app/features/transformers/extractFields/extractFields.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -5761,10 +5619,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"] ], - "public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/ids\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] - ], "public/app/features/transformers/lookupGazetteer/fieldLookup.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -5778,10 +5632,6 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"], [0, 0, 0, "No untranslated strings. Wrap text with ", "7"] ], - "public/app/features/transformers/partitionByValues/partitionByValues.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/filterByName\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/noop\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] - ], "public/app/features/transformers/prepareTimeSeries/PrepareTimeSeriesEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -5816,18 +5666,12 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"] ], "public/app/features/transformers/spatial/optionsHelper.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], + [0, 0, 0, "Do not use any type assertions.", "0"], + [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "Do not use any type assertions.", "3"], - [0, 0, 0, "Do not use any type assertions.", "4"], - [0, 0, 0, "Unexpected any. Specify a different type.", "5"], - [0, 0, 0, "Unexpected any. Specify a different type.", "6"], - [0, 0, 0, "Unexpected any. Specify a different type.", "7"] - ], - "public/app/features/transformers/spatial/spatialTransformer.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/dataframe/processDataFrame\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/ids\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] + [0, 0, 0, "Unexpected any. Specify a different type.", "3"], + [0, 0, 0, "Unexpected any. Specify a different type.", "4"], + [0, 0, 0, "Unexpected any. Specify a different type.", "5"] ], "public/app/features/transformers/suggestionsInput/SuggestionsInput.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -6110,9 +5954,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/data\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/datasource/azuremonitor/azureMetadata/index.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"] @@ -6283,9 +6124,6 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], - "public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/moment_wrapper\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/datasource/cloudwatch/types.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], @@ -6308,9 +6146,9 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "1"] ], "public/app/plugins/datasource/elasticsearch/ElasticResponse.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"], [0, 0, 0, "Unexpected any. Specify a different type.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"], @@ -6339,8 +6177,7 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "28"], [0, 0, 0, "Unexpected any. Specify a different type.", "29"], [0, 0, 0, "Unexpected any. Specify a different type.", "30"], - [0, 0, 0, "Unexpected any. Specify a different type.", "31"], - [0, 0, 0, "Unexpected any. Specify a different type.", "32"] + [0, 0, 0, "Unexpected any. Specify a different type.", "31"] ], "public/app/plugins/datasource/elasticsearch/LanguageProvider.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6712,22 +6549,15 @@ exports[`better eslint`] = { [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], "public/app/plugins/panel/barchart/bars.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/barchart/quadtree.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/plugins/panel/barchart/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldState\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/candlestick/CandlestickPanel.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/plugins/panel/candlestick/fields.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/candlestick/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`CandleStyle\`)", "0"], [0, 0, 0, "Do not re-export imported variable (\`CandlestickColors\`)", "1"], @@ -6738,28 +6568,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not re-export imported variable (\`VizDisplayMode\`)", "6"], [0, 0, 0, "Do not re-export imported variable (\`defaultCandlestickColors\`)", "7"] ], - "public/app/plugins/panel/canvas/components/CanvasTooltip.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/types/action\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/connectionEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/element/elementEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "1"] - ], - "public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/canvas/editor/options.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/panel/PanelPlugin\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/debug/CursorView.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -6772,10 +6580,9 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/plugins/panel/geomap/components/MarkersLegend.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/scale\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], - [0, 0, 0, "Do not use any type assertions.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"] + [0, 0, 0, "Unexpected any. Specify a different type.", "2"] ], "public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -6801,9 +6608,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/plugins/panel/geomap/editor/layerEditor.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/utils/OptionsUIBuilders\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/geomap/layers/basemaps/esri.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], @@ -6811,8 +6615,7 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/geomap/layers/data/routeLayer.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/geomap/layers/registry.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6825,9 +6628,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/geomap/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"] ], - "public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/matchers/compareValues\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/geomap/utils/layers.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], @@ -6868,18 +6668,6 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "15"], [0, 0, 0, "Do not use any type assertions.", "16"] ], - "public/app/plugins/panel/histogram/Histogram.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/histogram/HistogramPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/histogram/module.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/histogram/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/histogram\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/live/LiveChannelEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -6891,9 +6679,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/logs/LogsPanel.test.tsx:5381": [ [0, 0, 0, "* import is invalid because \'Layout,HorizontalGroup,VerticalGroup\' from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], - "public/app/plugins/panel/logs/LogsPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/datetime/rangeutil\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/logs/types.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`./panelcfg.gen\`)", "0"] ], @@ -6927,9 +6712,6 @@ exports[`better eslint`] = { "public/app/plugins/panel/stat/StatMigrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], - "public/app/plugins/panel/stat/StatPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldOverrides\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/state-timeline/migrations.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] @@ -6938,11 +6720,10 @@ exports[`better eslint`] = { [0, 0, 0, "\'VerticalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"] ], "public/app/plugins/panel/table/migrations.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/reduce\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Unexpected any. Specify a different type.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"], [0, 0, 0, "Unexpected any. Specify a different type.", "2"], - [0, 0, 0, "Unexpected any. Specify a different type.", "3"], - [0, 0, 0, "Unexpected any. Specify a different type.", "4"] + [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "public/app/plugins/panel/text/textPanelMigrationHandler.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -6981,31 +6762,17 @@ exports[`better eslint`] = { [0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"], [0, 0, 0, "Unexpected any. Specify a different type.", "1"] ], - "public/app/plugins/panel/timeseries/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/convertFieldType\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold\' import is restricted from being used by a pattern. Import from the public export instead.", "1"], - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/nulls/nullToValue\' import is restricted from being used by a pattern. Import from the public export instead.", "2"] - ], - "public/app/plugins/panel/trend/TrendPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/transformations/transformers/joinDataFrames\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/xychart/SeriesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"] ], - "public/app/plugins/panel/xychart/XYChartPanel.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], - "public/app/plugins/panel/xychart/XYChartTooltip.tsx:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] - ], "public/app/plugins/panel/xychart/migrations.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "public/app/plugins/panel/xychart/scatter.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/themes/colorManipulator\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], [0, 0, 0, "Do not use any type assertions.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], @@ -7019,14 +6786,10 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use any type assertions.", "11"], [0, 0, 0, "Do not use any type assertions.", "12"], [0, 0, 0, "Do not use any type assertions.", "13"], - [0, 0, 0, "Do not use any type assertions.", "14"], + [0, 0, 0, "Unexpected any. Specify a different type.", "14"], [0, 0, 0, "Unexpected any. Specify a different type.", "15"], [0, 0, 0, "Unexpected any. Specify a different type.", "16"], - [0, 0, 0, "Unexpected any. Specify a different type.", "17"], - [0, 0, 0, "Unexpected any. Specify a different type.", "18"] - ], - "public/app/plugins/panel/xychart/utils.ts:5381": [ - [0, 0, 0, "\'@grafana/data/src/field/fieldState\' import is restricted from being used by a pattern. Import from the public export instead.", "0"] + [0, 0, 0, "Unexpected any. Specify a different type.", "17"] ], "public/app/plugins/sdk.ts:5381": [ [0, 0, 0, "Do not re-export imported variable (\`loadPluginCss\`)", "0"] diff --git a/packages/grafana-data/package.json b/packages/grafana-data/package.json index 82a8a8c46f9..5c1c72c6947 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -15,6 +15,26 @@ }, "main": "src/index.ts", "types": "src/index.ts", + "module": "src/index.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": "./src/index.ts", + "require": "./src/index.ts" + }, + "./internal": { + "import": "./src/internal/index.ts", + "require": "./src/internal/index.ts" + }, + "./unstable": { + "import": "./src/unstable.ts", + "require": "./src/unstable.ts" + }, + "./test": { + "import": "./test/index.ts", + "require": "./test/index.ts" + } + }, "publishConfig": { "main": "./dist/cjs/index.cjs", "module": "./dist/esm/index.mjs", diff --git a/packages/grafana-data/src/internal/index.ts b/packages/grafana-data/src/internal/index.ts new file mode 100644 index 00000000000..c0e52d01c67 --- /dev/null +++ b/packages/grafana-data/src/internal/index.ts @@ -0,0 +1,100 @@ +/** + * This file is used to share internal grafana/data code with Grafana core. + * Note that these exports are also used within Enterprise. + * + * Through the exports declared in package.json we can import this code in core Grafana and the grafana/data + * package will continue to be able to access all code when it's published to npm as it's private to the package. + * + * During the yarn pack lifecycle the exports[./internal] property is deleted from the package.json + * preventing the code from being importable by plugins or other npm packages making it truly "internal". + * + */ + +export { actionsOverrideProcessor } from '../field/overrides/processors'; +export { nullToUndefThreshold } from '../transformations/transformers/nulls/nullToUndefThreshold'; +export { applyNullInsertThreshold } from '../transformations/transformers/nulls/nullInsertThreshold'; +export { + NULL_EXPAND, + NULL_REMOVE, + NULL_RETAIN, + isLikelyAscendingVector, + maybeSortFrame, +} from '../transformations/transformers/joinDataFrames'; +export { ConcatenateFrameNameMode, type ConcatenateTransformerOptions } from '../transformations/transformers/concat'; +export { + type ConvertFieldTypeOptions, + type ConvertFieldTypeTransformerOptions, + convertFieldType, +} from '../transformations/transformers/convertFieldType'; +export { type FilterFieldsByNameTransformerOptions } from '../transformations/transformers/filterByName'; +export { type FilterFramesByRefIdTransformerOptions } from '../transformations/transformers/filterByRefId'; +export { FormatStringOutput, type FormatStringTransformerOptions } from '../transformations/transformers/formatString'; +export { organizeFieldsTransformer } from '../transformations/transformers/organize'; +export { labelsToFieldsTransformer } from '../transformations/transformers/labelsToFields'; +export { type FormatTimeTransformerOptions } from '../transformations/transformers/formatTime'; +export { + type GroupByFieldOptions, + GroupByOperationID, + type GroupByTransformerOptions, +} from '../transformations/transformers/groupBy'; +export { + type GroupToNestedTableTransformerOptions, + SHOW_NESTED_HEADERS_DEFAULT, +} from '../transformations/transformers/groupToNestedTable'; +export { + type BinaryValue, + type BinaryOptions, + CalculateFieldMode, + type CalculateFieldTransformerOptions, + getNameFromOptions, + defaultWindowOptions, + checkBinaryValueType, + type CumulativeOptions, + type ReduceOptions, + type UnaryOptions, + WindowAlignment, + type WindowOptions, + WindowSizeMode, +} from '../transformations/transformers/calculateField'; +export { type SeriesToRowsTransformerOptions } from '../transformations/transformers/seriesToRows'; +export { histogramFieldInfo, type HistogramTransformerInputs } from '../transformations/transformers/histogram'; +export { type JoinByFieldOptions, JoinMode } from '../transformations/transformers/joinByField'; +export { LabelsToFieldsMode, type LabelsToFieldsOptions } from '../transformations/transformers/labelsToFields'; +export { type LimitTransformerOptions } from '../transformations/transformers/limit'; +export { type MergeTransformerOptions } from '../transformations/transformers/merge'; +export { ReduceTransformerMode, type ReduceTransformerOptions } from '../transformations/transformers/reduce'; +export { createOrderFieldsComparer } from '../transformations/transformers/order'; +export { type RenameByRegexTransformerOptions } from '../transformations/transformers/renameByRegex'; +export { type OrganizeFieldsTransformerOptions } from '../transformations/transformers/organize'; +export { compareValues } from '../transformations/matchers/compareValues'; +export { + type SortByField, + type SortByTransformerOptions, + sortByTransformer, +} from '../transformations/transformers/sortBy'; +export { type TransposeTransformerOptions } from '../transformations/transformers/transpose'; +export { + type FilterByValueTransformerOptions, + FilterByValueMatch, + FilterByValueType, + type FilterByValueFilter, +} from '../transformations/transformers/filterByValue'; +export { getMatcherConfig } from '../transformations/transformers/filterByName'; +export { mockTransformationsRegistry } from '../utils/tests/mockTransformationsRegistry'; +export { noopTransformer } from '../transformations/transformers/noop'; +export { DataTransformerID } from '../transformations/transformers/ids'; + +export { mergeTransformer } from '../transformations/transformers/merge'; +export { getThemeById } from '../themes/registry'; +export { GrafanaEdition } from '../types/config'; +export { SIPrefix } from '../valueFormats/symbolFormatters'; + +export { type PluginAddedLinksConfigureFunc, type PluginExtensionEventHelpers } from '../types/pluginExtensions'; + +export { getStreamingFrameOptions } from '../dataframe/StreamingDataFrame'; +export { fieldIndexComparer } from '../field/fieldComparers'; +export { decoupleHideFromState } from '../field/fieldState'; +export { findNumericFieldMinMax } from '../field/fieldOverrides'; +export { type PanelOptionsSupplier } from '../panel/PanelPlugin'; +export { sanitize, sanitizeUrl } from '../text/sanitize'; +export { type NestedValueAccess, type NestedPanelOptions, isNestedPanelOptions } from '../utils/OptionsUIBuilders'; diff --git a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts index 01b42612f1d..f155696053d 100644 --- a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts +++ b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts @@ -11,8 +11,7 @@ import { ThresholdsMode, } from '@grafana/data'; -import { getPanelPlugin } from '../../test/__mocks__/pluginMocks'; -import { mockStandardFieldConfigOptions } from '../../test/helpers/fieldConfig'; +import { getPanelPlugin, mockStandardFieldConfigOptions } from '../../test'; import { getPanelOptionsWithDefaults, restoreCustomOverrideRules } from './getPanelOptionsWithDefaults'; diff --git a/packages/grafana-data/test/__mocks__/pluginMocks.ts b/packages/grafana-data/test/helpers/pluginMocks.ts similarity index 100% rename from packages/grafana-data/test/__mocks__/pluginMocks.ts rename to packages/grafana-data/test/helpers/pluginMocks.ts diff --git a/packages/grafana-data/test/index.ts b/packages/grafana-data/test/index.ts new file mode 100644 index 00000000000..c6f6494b213 --- /dev/null +++ b/packages/grafana-data/test/index.ts @@ -0,0 +1,2 @@ +export { getMockPlugin, getMockPlugins, getPanelPlugin } from './helpers/pluginMocks'; +export { mockStandardFieldConfigOptions } from './helpers/fieldConfig'; diff --git a/packages/grafana-prometheus/src/querybuilder/operationUtils.ts b/packages/grafana-prometheus/src/querybuilder/operationUtils.ts index bf5bc98c0ad..36b9a3f6bd8 100644 --- a/packages/grafana-prometheus/src/querybuilder/operationUtils.ts +++ b/packages/grafana-prometheus/src/querybuilder/operationUtils.ts @@ -2,7 +2,7 @@ import { capitalize } from 'lodash'; import pluralize from 'pluralize'; -import { SelectableValue } from '@grafana/data/src'; +import { SelectableValue } from '@grafana/data'; import { LabelParamEditor } from './components/LabelParamEditor'; import { diff --git a/public/app/core/components/GraphNG/utils.ts b/public/app/core/components/GraphNG/utils.ts index b0c4368f3bb..34757b4d81a 100644 --- a/public/app/core/components/GraphNG/utils.ts +++ b/public/app/core/components/GraphNG/utils.ts @@ -1,7 +1,5 @@ -import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange } from '@grafana/data'; -import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN } from '@grafana/data/src/transformations/transformers/joinDataFrames'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; -import { nullToUndefThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullToUndefThreshold'; +import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange, applyNullInsertThreshold } from '@grafana/data'; +import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN, nullToUndefThreshold } from '@grafana/data/internal'; import { GraphDrawStyle } from '@grafana/schema'; import { XYFieldMatchers } from './types'; diff --git a/public/app/core/components/OptionsUI/registry.tsx b/public/app/core/components/OptionsUI/registry.tsx index da20681e556..d1c51c96de8 100644 --- a/public/app/core/components/OptionsUI/registry.tsx +++ b/public/app/core/components/OptionsUI/registry.tsx @@ -29,7 +29,7 @@ import { Action, DataLinksFieldConfigSettings, } from '@grafana/data'; -import { actionsOverrideProcessor } from '@grafana/data/src/field/overrides/processors'; +import { actionsOverrideProcessor } from '@grafana/data/internal'; import { FieldConfig } from '@grafana/schema'; import { RadioButtonGroup, TimeZonePicker, Switch } from '@grafana/ui'; import { FieldNamePicker } from '@grafana/ui/internal'; diff --git a/public/app/core/components/TimelineChart/timeline.ts b/public/app/core/components/TimelineChart/timeline.ts index 68acea164f6..8fa0a8faef1 100644 --- a/public/app/core/components/TimelineChart/timeline.ts +++ b/public/app/core/components/TimelineChart/timeline.ts @@ -1,7 +1,6 @@ import uPlot, { Series } from 'uplot'; -import { GrafanaTheme2, TimeRange } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { GrafanaTheme2, TimeRange, colorManipulator } from '@grafana/data'; import { TimelineValueAlignment, VisibilityMode } from '@grafana/schema'; import { FIXED_UNIT } from '@grafana/ui'; import { distribute, SPACE_BETWEEN } from 'app/plugins/panel/barchart/distribute'; @@ -533,5 +532,5 @@ function getFillColor(fieldConfig: { fillOpacity?: number; lineWidth?: number }, } const opacityPercent = (fieldConfig.fillOpacity ?? 100) / 100; - return alpha(color, opacityPercent); + return colorManipulator.alpha(color, opacityPercent); } diff --git a/public/app/core/components/TimelineChart/utils.ts b/public/app/core/components/TimelineChart/utils.ts index bf38c4bc5c5..a9af674a839 100644 --- a/public/app/core/components/TimelineChart/utils.ts +++ b/public/app/core/components/TimelineChart/utils.ts @@ -18,10 +18,10 @@ import { outerJoinDataFrames, ValueMapping, ThresholdsConfig, + applyNullInsertThreshold, + nullToValue, } from '@grafana/data'; -import { maybeSortFrame, NULL_RETAIN } from '@grafana/data/src/transformations/transformers/joinDataFrames'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; -import { nullToValue } from '@grafana/data/src/transformations/transformers/nulls/nullToValue'; +import { maybeSortFrame, NULL_RETAIN } from '@grafana/data/internal'; import { VizLegendOptions, AxisPlacement, diff --git a/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts b/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts index 5ee5b184736..ca92345ccac 100644 --- a/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts +++ b/public/app/core/services/echo/backends/grafana-javascript-agent/GrafanaJavascriptAgentBackend.test.ts @@ -1,5 +1,5 @@ import { BuildInfo } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { Faro, Instrumentation } from '@grafana/faro-core'; import * as faroWebSdkModule from '@grafana/faro-web-sdk'; import { BrowserConfig, FetchTransport } from '@grafana/faro-web-sdk'; diff --git a/public/app/core/services/theme.ts b/public/app/core/services/theme.ts index b244b95e012..30d63375f6b 100644 --- a/public/app/core/services/theme.ts +++ b/public/app/core/services/theme.ts @@ -1,4 +1,4 @@ -import { getThemeById } from '@grafana/data/src/themes/registry'; +import { getThemeById } from '@grafana/data/internal'; import { ThemeChangedEvent } from '@grafana/runtime'; import appEvents from '../app_events'; diff --git a/public/app/core/utils/explore.test.ts b/public/app/core/utils/explore.test.ts index 76da92421a9..011380fed79 100644 --- a/public/app/core/utils/explore.test.ts +++ b/public/app/core/utils/explore.test.ts @@ -1,5 +1,12 @@ -import { DataSourceApi, dateTime, ExploreUrlState, GrafanaConfig, locationUtil, LogsSortOrder } from '@grafana/data'; -import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; +import { + DataSourceApi, + dateTime, + ExploreUrlState, + GrafanaConfig, + locationUtil, + LogsSortOrder, + serializeStateToUrlParam, +} from '@grafana/data'; import { config } from '@grafana/runtime'; import { DataQuery } from '@grafana/schema'; import { RefreshPicker } from '@grafana/ui'; diff --git a/public/app/core/utils/richHistory.ts b/public/app/core/utils/richHistory.ts index b99a16f5ceb..8816613a51b 100644 --- a/public/app/core/utils/richHistory.ts +++ b/public/app/core/utils/richHistory.ts @@ -1,7 +1,13 @@ import { omit } from 'lodash'; -import { DataQuery, DataSourceApi, dateTimeFormat, ExploreUrlState, urlUtil } from '@grafana/data'; -import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; +import { + DataQuery, + DataSourceApi, + dateTimeFormat, + ExploreUrlState, + urlUtil, + serializeStateToUrlParam, +} from '@grafana/data'; import { getDataSourceSrv } from '@grafana/runtime'; import { notifyApp } from 'app/core/actions'; import { createErrorNotification, createWarningNotification } from 'app/core/copy/appNotification'; diff --git a/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx b/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx index cc0284d753d..87d3b1fe591 100644 --- a/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx +++ b/public/app/features/admin/UserListPublicDashboardPage/DashboardsListModalButton.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { config } from '@grafana/runtime'; import { Button, LoadingPlaceholder, Modal, ModalsController, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx b/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx index 1ca1f8d6656..fa33265f205 100644 --- a/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx +++ b/public/app/features/admin/UserListPublicDashboardPage/DeleteUserModalButton.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime'; import { Button, Modal, ModalsController, useStyles2 } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; diff --git a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx index b591ece380d..b7946517a41 100644 --- a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx +++ b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx @@ -2,8 +2,7 @@ import { css, cx } from '@emotion/css'; import { keyBy, startCase, uniqueId } from 'lodash'; import * as React from 'react'; -import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, urlUtil } from '@grafana/data'; -import { secondsToHms } from '@grafana/data/src/datetime/rangeutil'; +import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, rangeUtil, urlUtil } from '@grafana/data'; import { config } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { Preview } from '@grafana/sql/src/components/visual-query-builder/Preview'; @@ -123,7 +122,7 @@ export function QueryPreview({ if (relativeTimeRange) { headerItems.push( - {secondsToHms(relativeTimeRange.from)} to now + {rangeUtil.secondsToHms(relativeTimeRange.from)} to now ); } diff --git a/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx b/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx index 239de85bd2d..b16c50bbb44 100644 --- a/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx +++ b/public/app/features/alerting/unified/components/GrafanaAlertmanagerDeliveryWarning.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Alert, useStyles2 } from '@grafana/ui'; import { AlertmanagerChoice } from '../../../../plugins/datasource/alertmanager/types'; diff --git a/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx b/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx index a9d67203d14..b2fa4fa8297 100644 --- a/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; +import { DataFrame, GrafanaTheme2 } from '@grafana/data'; import { Icon, TagList, Tooltip, useStyles2 } from '@grafana/ui'; import { labelsToTags } from '../../utils/labels'; diff --git a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx index 14eea33da9d..4428ba2e1a9 100644 --- a/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/DashboardPicker.tsx @@ -5,7 +5,7 @@ import { useDebounce } from 'react-use'; import AutoSizer from 'react-virtualized-auto-sizer'; import { FixedSizeList } from 'react-window'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Alert, Button, diff --git a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx index 1a046f8e2a3..215ae1d3646 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx @@ -1,8 +1,7 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange } from '@grafana/data'; -import { relativeToTimeRange } from '@grafana/data/src/datetime/rangeutil'; +import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange, rangeUtil } from '@grafana/data'; import { Icon, InlineField, RelativeTimeRangePicker, Toggletip, clearButtonStyles, useStyles2 } from '@grafana/ui'; import { AlertQuery } from 'app/types/unified-alerting-dto'; @@ -27,7 +26,7 @@ export const QueryOptions = ({ const [showOptions, setShowOptions] = useState(false); - const timeRange = query.relativeTimeRange ? relativeToTimeRange(query.relativeTimeRange) : undefined; + const timeRange = query.relativeTimeRange ? rangeUtil.relativeToTimeRange(query.relativeTimeRange) : undefined; return ( <> diff --git a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx index ab41cd3121f..17cbdcfcd6e 100644 --- a/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/rule-types/RuleTypePicker.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { isEmpty } from 'lodash'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Stack, useStyles2 } from '@grafana/ui'; import { useRulesSourcesWithRuler } from '../../../hooks/useRuleSourcesWithRuler'; diff --git a/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx b/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx index 97cf310a478..29afb21fa2c 100644 --- a/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx +++ b/public/app/features/alerting/unified/components/rules/AlertInstanceStateFilter.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { capitalize } from 'lodash'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Label, RadioButtonGroup, Tag, useStyles2 } from '@grafana/ui'; import { GrafanaAlertState, PromAlertingRuleState } from 'app/types/unified-alerting-dto'; diff --git a/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx b/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx index 8b10c1388bf..ed3f96dc960 100644 --- a/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx +++ b/public/app/features/alerting/unified/components/rules/RuleConfigStatus.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime/src'; import { Icon, Tooltip, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts b/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts index 21b2548dac9..d78688c1ab8 100644 --- a/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts +++ b/public/app/features/alerting/unified/components/rules/central-state-history/utils.ts @@ -11,7 +11,7 @@ import { ThresholdsMode, getDisplayProcessor, } from '@grafana/data'; -import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; +import { fieldIndexComparer } from '@grafana/data/internal'; import { mapStateWithReasonToBaseState } from 'app/types/unified-alerting-dto'; import { labelsMatchMatchers } from '../../../utils/alertmanager'; diff --git a/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx b/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx index 9f18e9bea2c..613938eebb5 100644 --- a/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx +++ b/public/app/features/alerting/unified/components/rules/state-history/useRuleHistoryRecords.tsx @@ -9,7 +9,7 @@ import { GrafanaTheme2, getDisplayProcessor, } from '@grafana/data'; -import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; +import { fieldIndexComparer } from '@grafana/data/internal'; import { MappingType, ThresholdsMode } from '@grafana/schema'; import { useTheme2 } from '@grafana/ui'; diff --git a/public/app/features/alerting/unified/home/PluginIntegrations.tsx b/public/app/features/alerting/unified/home/PluginIntegrations.tsx index f07a0738934..4a7d560da38 100644 --- a/public/app/features/alerting/unified/home/PluginIntegrations.tsx +++ b/public/app/features/alerting/unified/home/PluginIntegrations.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { Stack, Text, useStyles2 } from '@grafana/ui'; import { useAlertingHomePageExtensions } from '../plugins/useAlertingHomePageExtensions'; diff --git a/public/app/features/alerting/unified/styles/pagination.ts b/public/app/features/alerting/unified/styles/pagination.ts index f3d92f70662..0a16b5ce7ee 100644 --- a/public/app/features/alerting/unified/styles/pagination.ts +++ b/public/app/features/alerting/unified/styles/pagination.ts @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; export const getPaginationStyles = (theme: GrafanaTheme2) => { return css({ diff --git a/public/app/features/alerting/unified/utils/misc.ts b/public/app/features/alerting/unified/utils/misc.ts index c136c2aa883..686194d24c6 100644 --- a/public/app/features/alerting/unified/utils/misc.ts +++ b/public/app/features/alerting/unified/utils/misc.ts @@ -1,7 +1,7 @@ import { sortBy } from 'lodash'; import { Labels, UrlQueryMap } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { config, isFetchError } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/alerting/unified/utils/routeTree.ts b/public/app/features/alerting/unified/utils/routeTree.ts index 6aa80dcb030..ba08bfd7526 100644 --- a/public/app/features/alerting/unified/utils/routeTree.ts +++ b/public/app/features/alerting/unified/utils/routeTree.ts @@ -5,7 +5,7 @@ import { produce } from 'immer'; import { omit } from 'lodash'; -import { insertAfterImmutably, insertBeforeImmutably } from '@grafana/data/src/utils/arrayUtils'; +import { arrayUtils } from '@grafana/data'; import { ROUTES_META_SYMBOL, Route, RouteWithID } from 'app/plugins/datasource/alertmanager/types'; import { @@ -109,12 +109,12 @@ export const addRouteToReferenceRoute = ( // insert new policy before / above the referenceRoute if (position === 'above') { - parentRoute.routes = insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = arrayUtils.insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } // insert new policy after / below the referenceRoute if (position === 'below') { - parentRoute.routes = insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = arrayUtils.insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } }); }; diff --git a/public/app/features/alerting/unified/utils/time.ts b/public/app/features/alerting/unified/utils/time.ts index a34dc0ffdad..51da3a10e71 100644 --- a/public/app/features/alerting/unified/utils/time.ts +++ b/public/app/features/alerting/unified/utils/time.ts @@ -1,4 +1,4 @@ -import { describeInterval } from '@grafana/data/src/datetime/rangeutil'; +import { rangeUtil } from '@grafana/data'; import { TimeOptions } from '../types/time'; @@ -18,7 +18,7 @@ export function parseInterval(value: string): [number, string] { } export function intervalToSeconds(interval: string): number { - const { sec, count } = describeInterval(interval); + const { sec, count } = rangeUtil.describeInterval(interval); return sec * count; } diff --git a/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx b/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx index c347a069369..c4126cb6aa1 100644 --- a/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx +++ b/public/app/features/annotations/components/StandardAnnotationQueryEditor.test.tsx @@ -1,6 +1,6 @@ import { render } from '@testing-library/react'; -import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data/src'; +import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data'; import StandardAnnotationQueryEditor, { Props as EditorProps } from './StandardAnnotationQueryEditor'; diff --git a/public/app/features/auth-config/AuthProvidersListPage.tsx b/public/app/features/auth-config/AuthProvidersListPage.tsx index 46909ed9397..7318db7441c 100644 --- a/public/app/features/auth-config/AuthProvidersListPage.tsx +++ b/public/app/features/auth-config/AuthProvidersListPage.tsx @@ -1,7 +1,7 @@ import { JSX, useEffect, useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { reportInteraction } from '@grafana/runtime'; import { Grid, TextLink, ToolbarButton } from '@grafana/ui'; import { Page } from 'app/core/components/Page/Page'; diff --git a/public/app/features/canvas/element.ts b/public/app/features/canvas/element.ts index 1d6c39dba0d..7f987fed873 100644 --- a/public/app/features/canvas/element.ts +++ b/public/app/features/canvas/element.ts @@ -1,7 +1,7 @@ import { ComponentType } from 'react'; import { DataLink, RegistryItem, Action } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { PanelOptionsSupplier } from '@grafana/data/internal'; import { ColorDimensionConfig, ScaleDimensionConfig } from '@grafana/schema'; import { config } from 'app/core/config'; import { BackgroundConfig, Constraint, LineConfig, Placement } from 'app/plugins/panel/canvas/panelcfg.gen'; diff --git a/public/app/features/canvas/elements/button.tsx b/public/app/features/canvas/elements/button.tsx index eb926056ace..2b70fa66e3a 100644 --- a/public/app/features/canvas/elements/button.tsx +++ b/public/app/features/canvas/elements/button.tsx @@ -1,8 +1,7 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2 } from '@grafana/data'; -import { PluginState } from '@grafana/data/src'; +import { GrafanaTheme2, PluginState } from '@grafana/data'; import { TextDimensionMode } from '@grafana/schema'; import { Button, Spinner, useStyles2 } from '@grafana/ui'; import { DimensionContext } from 'app/features/dimensions/context'; diff --git a/public/app/features/canvas/types.ts b/public/app/features/canvas/types.ts index 1dd3f298e7a..50b926779a6 100644 --- a/public/app/features/canvas/types.ts +++ b/public/app/features/canvas/types.ts @@ -1,4 +1,4 @@ -import { LinkModel } from '@grafana/data/src'; +import { LinkModel } from '@grafana/data'; import { ColorDimensionConfig, ResourceDimensionConfig, TextDimensionConfig } from '@grafana/schema'; import { BackgroundImageSize } from 'app/plugins/panel/canvas/panelcfg.gen'; diff --git a/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx b/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx index 276c71f61dd..be4fbbb8692 100644 --- a/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx +++ b/public/app/features/dashboard-scene/inspect/HelpWizard/HelpWizard.test.tsx @@ -2,7 +2,7 @@ import userEvent from '@testing-library/user-event'; import { render, screen } from 'test/test-utils'; import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config } from '@grafana/runtime'; import { SceneQueryRunner, SceneTimeRange, VizPanel, VizPanelMenu } from '@grafana/scenes'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx b/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx index 582e0855008..b49a61cd1b8 100644 --- a/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx +++ b/public/app/features/dashboard-scene/inspect/InspectJsonTab.test.tsx @@ -10,7 +10,7 @@ import { standardTransformersRegistry, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneCanvasText, SceneDataTransformer, SceneQueryRunner, VizPanel } from '@grafana/scenes'; import * as libpanels from 'app/features/library-panels/state/api'; diff --git a/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx b/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx index c9a3cd6937f..8a58e5c8917 100644 --- a/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx +++ b/public/app/features/dashboard-scene/pages/DashboardScenePage.test.tsx @@ -6,7 +6,7 @@ import { TestProvider } from 'test/helpers/TestProvider'; import { getGrafanaContextMock } from 'test/mocks/getGrafanaContextMock'; import { PanelProps } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { LocationServiceProvider, diff --git a/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx b/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx index a8c109d261b..b5c05c830b8 100644 --- a/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx +++ b/public/app/features/dashboard-scene/pages/PublicDashboardScenePage.test.tsx @@ -4,7 +4,7 @@ import { of } from 'rxjs'; import { render } from 'test/test-utils'; import { getDefaultTimeRange, LoadingState, PanelData, PanelProps } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, getPluginLinkExtensions, setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { Dashboard } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx index f3c58622b27..ba6f6f48461 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelDataPane/PanelDataQueriesTab.test.tsx @@ -16,7 +16,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { config, locationService, setPluginExtensionsHook } from '@grafana/runtime'; import { PANEL_EDIT_LAST_USED_DATASOURCE } from 'app/features/dashboard/utils/dashboard'; diff --git a/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts b/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts index fe263ee3bde..ee2bda935fd 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts +++ b/public/app/features/dashboard-scene/panel-edit/PanelEditor.test.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { DataQueryRequest, DataSourceApi, LoadingState, PanelPlugin } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { CancelActivationHandler, CustomVariable, diff --git a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx index 3f54a519b70..afc761b080b 100644 --- a/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx +++ b/public/app/features/dashboard-scene/panel-edit/PanelOptions.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { render } from 'test/test-utils'; import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { VizPanel } from '@grafana/scenes'; import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry'; diff --git a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx index 59a27eacaad..55aac56789a 100644 --- a/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardDatasourceBehaviour.test.tsx @@ -10,7 +10,7 @@ import { LoadingState, PanelData, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneDataTransformer, SceneFlexLayout, SceneQueryRunner, VizPanel } from '@grafana/scenes'; import { SHARED_DASHBOARD_QUERY, DASHBOARD_DATASOURCE_PLUGIN_ID } from 'app/plugins/datasource/dashboard/constants'; diff --git a/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx b/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx index 72a046fc6e5..db7fb59dad7 100644 --- a/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardLinksControls.tsx @@ -1,4 +1,4 @@ -import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; +import { sanitizeUrl } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { sceneGraph } from '@grafana/scenes'; import { DashboardLink } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx index 3f456078a7e..74c91e3037e 100644 --- a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.test.tsx @@ -1,7 +1,7 @@ import { screen } from '@testing-library/react'; import { render } from 'test/test-utils'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { transformSaveModelToScene } from '../serialization/transformSaveModelToScene'; diff --git a/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx b/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx index b6eb6872566..5d95b292cb4 100644 --- a/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/LibraryPanelBehavior.test.tsx @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import { FieldType, LoadingState, PanelData, getDefaultTimeRange, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneCanvasText, sceneGraph, SceneGridLayout, VizPanel } from '@grafana/scenes'; import { LibraryPanel } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx b/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx index d0aa2f56b9f..182ebac330f 100644 --- a/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/PanelMenuBehavior.test.tsx @@ -8,7 +8,7 @@ import { toDataFrame, urlUtil, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config, getPluginLinkExtensions, locationService } from '@grafana/runtime'; import { LocalValueVariable, diff --git a/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx b/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx index ec13a7992c8..00458d505a9 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/DashboardGridItem.test.tsx @@ -1,4 +1,4 @@ -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneGridLayout, SceneVariableSet, TestVariable, VizPanel } from '@grafana/scenes'; import { ALL_VARIABLE_TEXT, ALL_VARIABLE_VALUE } from 'app/features/variables/constants'; diff --git a/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx b/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx index 843f58b5640..28effcf18b5 100644 --- a/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-default/RowRepeaterBehavior.test.tsx @@ -1,5 +1,5 @@ import { VariableRefresh } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneCanvasText, diff --git a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx index ec5b4710089..ca967ce3d06 100644 --- a/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx +++ b/public/app/features/dashboard-scene/scene/layout-rows/RowItemRepeaterBehavior.test.tsx @@ -1,5 +1,5 @@ import { VariableRefresh } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SceneGridRow, diff --git a/public/app/features/dashboard-scene/serialization/angularMigration.test.ts b/public/app/features/dashboard-scene/serialization/angularMigration.test.ts index cda96b97e9c..a9f63b34cf0 100644 --- a/public/app/features/dashboard-scene/serialization/angularMigration.test.ts +++ b/public/app/features/dashboard-scene/serialization/angularMigration.test.ts @@ -1,5 +1,5 @@ import { PanelTypeChangedHandler } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { getAngularPanelMigrationHandler } from './angularMigration'; diff --git a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts index e74c3f21664..546c8e95038 100644 --- a/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSaveModelToScene.test.ts @@ -1,5 +1,5 @@ import { LoadingState } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config } from '@grafana/runtime'; import { AdHocFiltersVariable, diff --git a/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts b/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts index 9d6061e3c6f..f1ed038dfb5 100644 --- a/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts +++ b/public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.test.ts @@ -13,7 +13,7 @@ import { toDataFrame, VariableSupportType, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { getPluginLinkExtensions, setPluginImportUtils } from '@grafana/runtime'; import { MultiValueVariable, sceneGraph, SceneGridRow, VizPanel } from '@grafana/scenes'; import { Dashboard, LoadingState, Panel, RowPanel, VariableRefresh } from '@grafana/schema'; diff --git a/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx b/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx index f3d93596d03..8c5f690518e 100644 --- a/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx +++ b/public/app/features/dashboard-scene/settings/VariablesEditView.test.tsx @@ -8,7 +8,7 @@ import { getDefaultTimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils, setRunRequest } from '@grafana/runtime'; import { SceneVariableSet, diff --git a/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx b/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx index 07fdec6b6a1..b3c7a22a257 100644 --- a/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareButton/share-externally/ShareExternally.test.tsx @@ -2,7 +2,7 @@ import { screen, waitForElementToBeRemoved } from '@testing-library/react'; import { render } from 'test/test-utils'; import { getDefaultTimeRange, LoadingState } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { diff --git a/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx b/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx index 5e7e71ee6b3..35eaec800d1 100644 --- a/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareDrawer/ShareDrawer.test.tsx @@ -1,7 +1,7 @@ import { act, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { locationService, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, UrlSyncContextProvider } from '@grafana/scenes'; diff --git a/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx b/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx index cded7ef3abe..d149d075e02 100644 --- a/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx +++ b/public/app/features/dashboard-scene/sharing/ShareLinkTab.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { advanceTo, clear } from 'jest-date-mock'; import { dateTime } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { config, locationService, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, VizPanel } from '@grafana/scenes'; diff --git a/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx b/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx index ac5daf5eac4..d2cbfaa14f7 100644 --- a/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx +++ b/public/app/features/dashboard-scene/sharing/panel-share/SharePanelInternally.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { SceneTimeRange, VizPanel } from '@grafana/scenes'; diff --git a/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx b/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx index 021060699b4..8da1d2bb549 100644 --- a/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx +++ b/public/app/features/dashboard/components/DashboardPrompt/DashboardPrompt.test.tsx @@ -1,4 +1,4 @@ -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { ContextSrv, setContextSrv } from '../../../../core/services/context_srv'; import { PanelModel } from '../../state/PanelModel'; diff --git a/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx b/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx index 8fdc82a5dd8..2eb805aa87e 100644 --- a/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx +++ b/public/app/features/dashboard/components/HelpWizard/HelpWizard.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from '@testing-library/react'; import { FieldType, getDefaultTimeRange, LoadingState, toDataFrame } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { PanelModel } from '../../state/PanelModel'; diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx index 6387aac97a8..91351c87a85 100644 --- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx +++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneOptions.test.tsx @@ -13,7 +13,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { selectors } from '@grafana/e2e-selectors'; import { getAllOptionEditors, getAllStandardFieldConfigs } from 'app/core/components/OptionsUI/registry'; diff --git a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx index 07936f463b8..7e0edec648b 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx @@ -1,8 +1,7 @@ import { css, cx } from '@emotion/css'; import { Component } from 'react'; -import { renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2, renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; import { selectors } from '@grafana/e2e-selectors'; import { locationService, getTemplateSrv } from '@grafana/runtime'; import { Tooltip, PopoverContent, Icon, Themeable2, withTheme2, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx index b62d0493c2e..4b003d91c84 100644 --- a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx @@ -7,13 +7,9 @@ import { PanelPlugin, StandardEditorContext, VariableSuggestionsScope, -} from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; -import { - NestedValueAccess, PanelOptionsEditorBuilder, - isNestedPanelOptions, -} from '@grafana/data/src/utils/OptionsUIBuilders'; +} from '@grafana/data'; +import { NestedValueAccess, isNestedPanelOptions, PanelOptionsSupplier } from '@grafana/data/internal'; import { VizPanel } from '@grafana/scenes'; import { Input } from '@grafana/ui'; import { LibraryVizPanelInfo } from 'app/features/dashboard-scene/panel-edit/LibraryVizPanelInfo'; diff --git a/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts b/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts index b661ef017b8..ab46604bb92 100644 --- a/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts +++ b/public/app/features/dashboard/components/PanelEditor/state/actions.test.ts @@ -1,5 +1,5 @@ import { PanelPlugin } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { LibraryElementDTOMeta } from '@grafana/schema'; import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures'; import { panelModelAndPluginReady, removePanel } from 'app/features/panel/state/reducers'; diff --git a/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx b/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx index 4bf24218d60..e413a750181 100644 --- a/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx +++ b/public/app/features/dashboard/components/PublicDashboardNotAvailable/PublicDashboardNotAvailable.tsx @@ -1,6 +1,6 @@ import { css, cx } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx index b83161aa968..5cf08218411 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useForm } from 'react-hook-form'; -import { GrafanaTheme2, TimeRange } from '@grafana/data/src'; +import { GrafanaTheme2, TimeRange } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { Button, diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx index eb9a3d8a34f..5156356f470 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/Configuration.tsx @@ -1,6 +1,6 @@ import { UseFormRegister } from 'react-hook-form'; -import { TimeRange } from '@grafana/data/src'; +import { TimeRange } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { FieldSet, Label, Switch, TimeRangeInput, Stack, VerticalGroup } from '@grafana/ui'; import { Trans, t } from 'app/core/internationalization'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx index 574e289609a..d1913aa3b9f 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/CreatePublicDashboard/AcknowledgeCheckboxes.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { UseFormRegister } from 'react-hook-form'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { Checkbox, FieldSet, HorizontalGroup, LinkButton, useStyles2, VerticalGroup } from '@grafana/ui'; import { t, Trans } from 'app/core/internationalization'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx index 3850c5e8b17..1df2bbeac48 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ModalAlerts/UnsupportedDataSourcesAlert.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import cx from 'classnames'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { config } from '@grafana/runtime'; import { Alert, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx index 12d213f8501..9a0357f0626 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.test.tsx @@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; -import { BootData, DataQuery } from '@grafana/data/src'; +import { BootData, DataQuery } from '@grafana/data'; import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src'; import { reportInteraction, setEchoSrv } from '@grafana/runtime'; import { Panel } from '@grafana/schema'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx index 8cbfdd8bd57..329e0d5ef08 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboard.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Spinner, useStyles2 } from '@grafana/ui'; import { useGetPublicDashboardQuery } from 'app/features/dashboard/api/publicDashboardApi'; import { publicDashboardPersisted } from 'app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils'; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx index 7a14d0a4e45..6ca108fc542 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx @@ -1,5 +1,4 @@ -import { TypedVariableModel } from '@grafana/data'; -import { DataSourceRef, DataQuery } from '@grafana/data/src/types/query'; +import { DataSourceRef, DataQuery, TypedVariableModel } from '@grafana/data'; import { DataSourceWithBackend } from '@grafana/runtime'; import { updateConfig } from 'app/core/config'; import { mockDataSource } from 'app/features/alerting/unified/mocks'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx index 1fa176900eb..65a7c39b335 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinks.tsx @@ -1,6 +1,6 @@ import { useEffectOnce } from 'react-use'; -import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; +import { sanitizeUrl } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { TimeRangeUpdatedEvent } from '@grafana/runtime'; import { DashboardLink } from '@grafana/schema'; diff --git a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx index f36232b7b2b..7beb284f28b 100644 --- a/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx +++ b/public/app/features/dashboard/components/SubMenu/DashboardLinksDashboard.tsx @@ -3,7 +3,7 @@ import { forwardRef } from 'react'; import { useAsync } from 'react-use'; import { GrafanaTheme2, ScopedVars } from '@grafana/data'; -import { sanitize, sanitizeUrl } from '@grafana/data/src/text/sanitize'; +import { sanitize, sanitizeUrl } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { DashboardLink } from '@grafana/schema'; import { Dropdown, Icon, LinkButton, Button, Menu, ScrollContainer, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/dashboard/state/DashboardMigrator.test.ts b/public/app/features/dashboard/state/DashboardMigrator.test.ts index d2b6715e4a6..b184b5d0922 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.test.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.test.ts @@ -1,7 +1,7 @@ import { each, map } from 'lodash'; import { DataLinkBuiltInVars, MappingType, VariableHide } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { FieldConfigSource } from '@grafana/schema'; import { config } from 'app/core/config'; import { GRID_CELL_HEIGHT, GRID_CELL_VMARGIN } from 'app/core/constants'; diff --git a/public/app/features/dashboard/state/DashboardMigrator.ts b/public/app/features/dashboard/state/DashboardMigrator.ts index e1f6b0a85fa..b595fa3a685 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.ts @@ -27,8 +27,7 @@ import { ValueMapping, VariableHide, } from '@grafana/data'; -import { labelsToFieldsTransformer } from '@grafana/data/src/transformations/transformers/labelsToFields'; -import { mergeTransformer } from '@grafana/data/src/transformations/transformers/merge'; +import { labelsToFieldsTransformer, mergeTransformer } from '@grafana/data/internal'; import { getDataSourceSrv, setDataSourceSrv } from '@grafana/runtime'; import { DataTransformerConfig } from '@grafana/schema'; import { AxisPlacement, GraphFieldConfig } from '@grafana/ui'; diff --git a/public/app/features/dashboard/state/PanelModel.test.ts b/public/app/features/dashboard/state/PanelModel.test.ts index a8a7aaae420..092ec0e0947 100644 --- a/public/app/features/dashboard/state/PanelModel.test.ts +++ b/public/app/features/dashboard/state/PanelModel.test.ts @@ -11,8 +11,7 @@ import { PanelMigrationHandler, PanelTypeChangedHandler, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; -import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; +import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; import { setTemplateSrv } from '@grafana/runtime'; import { queryBuilder } from 'app/features/variables/shared/testing/builders'; diff --git a/public/app/features/dashboard/utils/panel.test.ts b/public/app/features/dashboard/utils/panel.test.ts index a739dcedab4..0a444a7726a 100644 --- a/public/app/features/dashboard/utils/panel.test.ts +++ b/public/app/features/dashboard/utils/panel.test.ts @@ -2,7 +2,7 @@ import { advanceTo, clear } from 'jest-date-mock'; import { ComponentClass } from 'react'; import { dateTime, DateTime, PanelProps, TimeRange } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { applyPanelTimeOverrides, calculateInnerPanelHeight } from 'app/features/dashboard/utils/panel'; import { PanelModel } from '../state/PanelModel'; diff --git a/public/app/features/dashboard/utils/timeRange.ts b/public/app/features/dashboard/utils/timeRange.ts index 79cf1f10244..da144cf427c 100644 --- a/public/app/features/dashboard/utils/timeRange.ts +++ b/public/app/features/dashboard/utils/timeRange.ts @@ -1,5 +1,4 @@ -import { DateTime, TimeRange } from '@grafana/data'; -import { dateMath, dateTime, isDateTime } from '@grafana/data/src'; +import { dateMath, dateTime, isDateTime, DateTime, TimeRange } from '@grafana/data'; import { TimeModel } from 'app/features/dashboard/state/TimeModel'; export const getTimeRange = ( diff --git a/public/app/features/datasources/components/CloudInfoBox.tsx b/public/app/features/datasources/components/CloudInfoBox.tsx index c34c44ce810..17e6b6d26b8 100644 --- a/public/app/features/datasources/components/CloudInfoBox.tsx +++ b/public/app/features/datasources/components/CloudInfoBox.tsx @@ -1,5 +1,5 @@ import { DataSourceSettings } from '@grafana/data'; -import { GrafanaEdition } from '@grafana/data/src/types/config'; +import { GrafanaEdition } from '@grafana/data/internal'; import { Alert } from '@grafana/ui'; import { LocalStorageValueProvider } from 'app/core/components/LocalStorageValueProvider'; import { config } from 'app/core/config'; diff --git a/public/app/features/datasources/state/buildCategories.test.ts b/public/app/features/datasources/state/buildCategories.test.ts index 5370c5a5789..297c413073d 100644 --- a/public/app/features/datasources/state/buildCategories.test.ts +++ b/public/app/features/datasources/state/buildCategories.test.ts @@ -1,5 +1,5 @@ import { DataSourcePluginMeta } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import { buildCategories } from './buildCategories'; diff --git a/public/app/features/dimensions/context.ts b/public/app/features/dimensions/context.ts index a4693ada2a9..bd0755de986 100644 --- a/public/app/features/dimensions/context.ts +++ b/public/app/features/dimensions/context.ts @@ -1,4 +1,4 @@ -import { PanelData } from '@grafana/data/src'; +import { PanelData } from '@grafana/data'; import { ColorDimensionConfig, ResourceDimensionConfig, diff --git a/public/app/features/dimensions/scale.ts b/public/app/features/dimensions/scale.ts index 06f3be04dee..7c82df3c29d 100644 --- a/public/app/features/dimensions/scale.ts +++ b/public/app/features/dimensions/scale.ts @@ -1,5 +1,4 @@ -import { DataFrame, Field } from '@grafana/data'; -import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; +import { getMinMaxAndDelta, DataFrame, Field } from '@grafana/data'; import { ScaleDimensionConfig, ScaleDimensionMode } from '@grafana/schema'; import { DimensionSupplier, ScaleDimensionOptions } from './types'; diff --git a/public/app/features/explore/Logs/Logs.test.tsx b/public/app/features/explore/Logs/Logs.test.tsx index 958bad54ad4..85b5906eef6 100644 --- a/public/app/features/explore/Logs/Logs.test.tsx +++ b/public/app/features/explore/Logs/Logs.test.tsx @@ -16,7 +16,7 @@ import { ExploreLogsPanelState, DataQuery, } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from 'app/features/transformers/extractFields/extractFields'; import { LokiQueryDirection } from 'app/plugins/datasource/loki/dataquery.gen'; diff --git a/public/app/features/explore/Logs/LogsColumnSearch.tsx b/public/app/features/explore/Logs/LogsColumnSearch.tsx index 16e24d48954..6919e9e3fcf 100644 --- a/public/app/features/explore/Logs/LogsColumnSearch.tsx +++ b/public/app/features/explore/Logs/LogsColumnSearch.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import * as React from 'react'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { Field, Input, useTheme2 } from '@grafana/ui'; function getStyles(theme: GrafanaTheme2) { diff --git a/public/app/features/explore/Logs/LogsMetaRow.test.tsx b/public/app/features/explore/Logs/LogsMetaRow.test.tsx index ce63d19b4d0..e66a3d1bd77 100644 --- a/public/app/features/explore/Logs/LogsMetaRow.test.tsx +++ b/public/app/features/explore/Logs/LogsMetaRow.test.tsx @@ -4,7 +4,7 @@ import saveAs from 'file-saver'; import { ComponentProps } from 'react'; import { FieldType, LogLevel, LogsDedupStrategy, standardTransformersRegistry, toDataFrame } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { MAX_CHARACTERS } from '../../logs/components/LogRowMessage'; diff --git a/public/app/features/explore/Logs/LogsMetaRow.tsx b/public/app/features/explore/Logs/LogsMetaRow.tsx index f69b84b6dd5..8be56cca1cc 100644 --- a/public/app/features/explore/Logs/LogsMetaRow.tsx +++ b/public/app/features/explore/Logs/LogsMetaRow.tsx @@ -14,8 +14,8 @@ import { DataTransformerConfig, CustomTransformOperator, Labels, + DataFrame, } from '@grafana/data'; -import { DataFrame } from '@grafana/data/'; import { config, reportInteraction } from '@grafana/runtime'; import { Button, Dropdown, Menu, ToolbarButton, Tooltip, useStyles2 } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; diff --git a/public/app/features/explore/Logs/LogsTable.test.tsx b/public/app/features/explore/Logs/LogsTable.test.tsx index 6dff92ec2c5..a8fa211431e 100644 --- a/public/app/features/explore/Logs/LogsTable.test.tsx +++ b/public/app/features/explore/Logs/LogsTable.test.tsx @@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; import { DataFrame, FieldType, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from 'app/features/transformers/extractFields/extractFields'; diff --git a/public/app/features/explore/Logs/LogsTableActiveFields.tsx b/public/app/features/explore/Logs/LogsTableActiveFields.tsx index eb833030106..c228c7aaf7b 100644 --- a/public/app/features/explore/Logs/LogsTableActiveFields.tsx +++ b/public/app/features/explore/Logs/LogsTableActiveFields.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { DragDropContext, Draggable, DraggableProvided, Droppable, DropResult } from '@hello-pangea/dnd'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; import { LogsTableEmptyFields } from './LogsTableEmptyFields'; diff --git a/public/app/features/explore/Logs/LogsTableMultiSelect.tsx b/public/app/features/explore/Logs/LogsTableMultiSelect.tsx index ad0b2dec903..d50057aeaa7 100644 --- a/public/app/features/explore/Logs/LogsTableMultiSelect.tsx +++ b/public/app/features/explore/Logs/LogsTableMultiSelect.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; import { Trans } from 'app/core/internationalization'; diff --git a/public/app/features/explore/Logs/LogsTableWrap.test.tsx b/public/app/features/explore/Logs/LogsTableWrap.test.tsx index a862b326065..3fd2add101f 100644 --- a/public/app/features/explore/Logs/LogsTableWrap.test.tsx +++ b/public/app/features/explore/Logs/LogsTableWrap.test.tsx @@ -1,14 +1,8 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { - createTheme, - ExploreLogsPanelState, - LogsSortOrder, - standardTransformersRegistry, - toUtc, -} from '@grafana/data/src'; -import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; +import { createTheme, ExploreLogsPanelState, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; +import { organizeFieldsTransformer } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { extractFieldsTransformer } from '../../transformers/extractFields/extractFields'; diff --git a/public/app/features/explore/Logs/utils/testMocks.test.ts b/public/app/features/explore/Logs/utils/testMocks.test.ts index 55a19433b20..93ddc7b2eeb 100644 --- a/public/app/features/explore/Logs/utils/testMocks.test.ts +++ b/public/app/features/explore/Logs/utils/testMocks.test.ts @@ -1,6 +1,4 @@ -import { DataFrame, Field, FieldType } from '@grafana/data/src'; - -import { DataFrameType } from '../../../../../../packages/grafana-data'; +import { DataFrame, DataFrameType, Field, FieldType } from '@grafana/data'; export const getMockLokiFrame = (override?: Partial) => { const testDataFrame: DataFrame = { diff --git a/public/app/features/explore/NoData.tsx b/public/app/features/explore/NoData.tsx index 130f38750ef..38384793050 100644 --- a/public/app/features/explore/NoData.tsx +++ b/public/app/features/explore/NoData.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2, PanelContainer } from '@grafana/ui'; export const NoData = () => { diff --git a/public/app/features/explore/PrometheusListView/ItemLabels.tsx b/public/app/features/explore/PrometheusListView/ItemLabels.tsx index 4f0884ab71b..4fb465818cc 100644 --- a/public/app/features/explore/PrometheusListView/ItemLabels.tsx +++ b/public/app/features/explore/PrometheusListView/ItemLabels.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { Field, GrafanaTheme2 } from '@grafana/data/'; +import { Field, GrafanaTheme2 } from '@grafana/data'; import { InstantQueryRefIdIndex } from '@grafana/prometheus'; import { useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/ItemValues.tsx b/public/app/features/explore/PrometheusListView/ItemValues.tsx index 2cb61be35c0..ab46049a540 100644 --- a/public/app/features/explore/PrometheusListView/ItemValues.tsx +++ b/public/app/features/explore/PrometheusListView/ItemValues.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; import { rawListItemColumnWidth, rawListPaddingToHoldSpaceForCopyIcon, RawListValue } from './RawListItem'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx index 8f3d27dbac8..896b5dd7ba8 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.test.tsx @@ -1,6 +1,6 @@ import { render, screen, within } from '@testing-library/react'; -import { FieldType, FormattedValue, toDataFrame } from '@grafana/data/src'; +import { FieldType, FormattedValue, toDataFrame } from '@grafana/data'; import RawListContainer, { RawListContainerProps } from './RawListContainer'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.tsx index ee8dedfd5ab..eb0717b6c43 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.tsx @@ -4,7 +4,7 @@ import { useEffect, useId, useRef, useState } from 'react'; import { useWindowSize } from 'react-use'; import { VariableSizeList as List } from 'react-window'; -import { DataFrame, Field as DataFrameField } from '@grafana/data/'; +import { DataFrame, Field as DataFrameField } from '@grafana/data'; import { reportInteraction } from '@grafana/runtime/src'; import { Field, Switch } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/RawListItem.tsx b/public/app/features/explore/PrometheusListView/RawListItem.tsx index ae4790090fd..9a5e84e318c 100644 --- a/public/app/features/explore/PrometheusListView/RawListItem.tsx +++ b/public/app/features/explore/PrometheusListView/RawListItem.tsx @@ -1,7 +1,7 @@ import { css } from '@emotion/css'; import { useCopyToClipboard } from 'react-use'; -import { Field, GrafanaTheme2 } from '@grafana/data/'; +import { Field, GrafanaTheme2 } from '@grafana/data'; import { isValidLegacyName, utf8Support } from '@grafana/prometheus/src/utf8_support'; import { reportInteraction } from '@grafana/runtime/src'; import { IconButton, useStyles2 } from '@grafana/ui'; diff --git a/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx b/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx index bbc7962c918..8d9ecb28fe2 100644 --- a/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx +++ b/public/app/features/explore/PrometheusListView/RawListItemAttributes.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { useStyles2 } from '@grafana/ui'; import { RawListValue } from './RawListItem'; diff --git a/public/app/features/explore/state/main.test.ts b/public/app/features/explore/state/main.test.ts index 28fe5009234..d52a1be7211 100644 --- a/public/app/features/explore/state/main.test.ts +++ b/public/app/features/explore/state/main.test.ts @@ -1,7 +1,6 @@ import { thunkTester } from 'test/core/thunk/thunkTester'; -import { dateTime, ExploreUrlState } from '@grafana/data'; -import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; +import { dateTime, ExploreUrlState, serializeStateToUrlParam } from '@grafana/data'; import { locationService } from '@grafana/runtime'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; diff --git a/public/app/features/live/centrifuge/LiveDataStream.ts b/public/app/features/live/centrifuge/LiveDataStream.ts index a4b6eb80255..6d0787c205f 100644 --- a/public/app/features/live/centrifuge/LiveDataStream.ts +++ b/public/app/features/live/centrifuge/LiveDataStream.ts @@ -12,7 +12,7 @@ import { LoadingState, StreamingDataFrame, } from '@grafana/data'; -import { getStreamingFrameOptions } from '@grafana/data/src/dataframe/StreamingDataFrame'; +import { getStreamingFrameOptions } from '@grafana/data/internal'; import { LiveDataStreamOptions, StreamingFrameAction, StreamingFrameOptions } from '@grafana/runtime/src/services/live'; import { toDataQueryError } from '@grafana/runtime/src/utils/toDataQueryError'; diff --git a/public/app/features/logs/components/InfiniteScroll.test.tsx b/public/app/features/logs/components/InfiniteScroll.test.tsx index 9b9792c2849..90b10988e73 100644 --- a/public/app/features/logs/components/InfiniteScroll.test.tsx +++ b/public/app/features/logs/components/InfiniteScroll.test.tsx @@ -2,8 +2,7 @@ import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { useEffect, useRef, useState } from 'react'; -import { CoreApp, LogRowModel, dateTimeForTimeZone } from '@grafana/data'; -import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; +import { CoreApp, LogRowModel, dateTimeForTimeZone, rangeUtil } from '@grafana/data'; import { config } from '@grafana/runtime'; import { LogsSortOrder } from '@grafana/schema'; @@ -16,7 +15,7 @@ const absoluteRange = { from: 1702578600000, to: 1702578900000, }; -const defaultRange = convertRawToRange({ +const defaultRange = rangeUtil.convertRawToRange({ from: dateTimeForTimeZone(defaultTz, absoluteRange.from), to: dateTimeForTimeZone(defaultTz, absoluteRange.to), }); diff --git a/public/app/features/logs/components/InfiniteScroll.tsx b/public/app/features/logs/components/InfiniteScroll.tsx index 5ebe5516332..d75327e0a2e 100644 --- a/public/app/features/logs/components/InfiniteScroll.tsx +++ b/public/app/features/logs/components/InfiniteScroll.tsx @@ -1,8 +1,8 @@ import { css } from '@emotion/css'; import { ReactNode, MutableRefObject, useCallback, useEffect, useRef, useState } from 'react'; -import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange } from '@grafana/data'; -import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/src/datetime/rangeutil'; +import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange, rangeUtil } from '@grafana/data'; +// import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/internal'; import { config, reportInteraction } from '@grafana/runtime'; import { LogsSortOrder, TimeZone } from '@grafana/schema'; import { Button, Icon } from '@grafana/ui'; @@ -141,8 +141,8 @@ export const InfiniteScroll = ({ }, [loadMoreLogs, loading, range, rows, scrollElement, sortOrder, timeZone, topScrollEnabled]); // We allow "now" to move when using relative time, so we hide the message so it doesn't flash. - const hideTopMessage = sortOrder === LogsSortOrder.Descending && isRelativeTime(range.raw.to); - const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && isRelativeTime(range.raw.to); + const hideTopMessage = sortOrder === LogsSortOrder.Descending && rangeUtil.isRelativeTime(range.raw.to); + const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && rangeUtil.isRelativeTime(range.raw.to); const loadOlderLogs = useCallback(() => { //If we are not on the last page, use next page's range @@ -345,5 +345,7 @@ export function canScrollBottom( // Given a TimeRange, returns a new instance if using relative time, or else the same. function updateCurrentRange(timeRange: TimeRange, timeZone: TimeZone) { - return isRelativeTimeRange(timeRange.raw) ? convertRawToRange(timeRange.raw, timeZone) : timeRange; + return rangeUtil.isRelativeTimeRange(timeRange.raw) + ? rangeUtil.convertRawToRange(timeRange.raw, timeZone) + : timeRange; } diff --git a/public/app/features/logs/components/LogDetailsRow.test.tsx b/public/app/features/logs/components/LogDetailsRow.test.tsx index 5f3229255b3..4463adde1f7 100644 --- a/public/app/features/logs/components/LogDetailsRow.test.tsx +++ b/public/app/features/logs/components/LogDetailsRow.test.tsx @@ -1,8 +1,7 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { CoreApp, FieldType, LinkModel } from '@grafana/data'; -import { Field } from '@grafana/data/'; +import { Field, CoreApp, FieldType, LinkModel } from '@grafana/data'; import { LogDetailsRow } from './LogDetailsRow'; import { createLogRow } from './__mocks__/logRow'; diff --git a/public/app/features/logs/logsModel.ts b/public/app/features/logs/logsModel.ts index 60aef4364bd..a63e464c62f 100644 --- a/public/app/features/logs/logsModel.ts +++ b/public/app/features/logs/logsModel.ts @@ -39,7 +39,7 @@ import { toDataFrame, toUtc, } from '@grafana/data'; -import { SIPrefix } from '@grafana/data/src/valueFormats/symbolFormatters'; +import { SIPrefix } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { BarAlignment, GraphDrawStyle, StackingMode } from '@grafana/schema'; import { colors } from '@grafana/ui'; diff --git a/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx b/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx index 8e3766ce457..dabaa6d3473 100644 --- a/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx +++ b/public/app/features/manage-dashboards/components/PublicDashboardListTable/DeletePublicDashboardModal.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime'; import { ConfirmModal, useStyles2 } from '@grafana/ui'; import { t } from 'app/core/internationalization'; diff --git a/public/app/features/panel/state/actions.test.ts b/public/app/features/panel/state/actions.test.ts index 0f6dc41284d..98c0105f848 100644 --- a/public/app/features/panel/state/actions.test.ts +++ b/public/app/features/panel/state/actions.test.ts @@ -1,6 +1,5 @@ import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; -import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; +import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; import { PanelModel } from 'app/features/dashboard/state/PanelModel'; import { panelPluginLoaded } from 'app/features/plugins/admin/state/actions'; diff --git a/public/app/features/plugins/components/AppRootPage.test.tsx b/public/app/features/plugins/components/AppRootPage.test.tsx index 594028bcebf..bef9ed62306 100644 --- a/public/app/features/plugins/components/AppRootPage.test.tsx +++ b/public/app/features/plugins/components/AppRootPage.test.tsx @@ -4,7 +4,7 @@ import { Routes, Route, Link } from 'react-router-dom-v5-compat'; import { render } from 'test/test-utils'; import { AppPlugin, PluginType, AppRootProps, NavModelItem, PluginIncludeType, OrgRole } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import { setEchoSrv } from '@grafana/runtime'; import { GrafanaRouteWrapper } from 'app/core/navigation/GrafanaRoute'; import { contextSrv } from 'app/core/services/context_srv'; diff --git a/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts b/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts index 52a1ad9a96c..12024fd0863 100644 --- a/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts +++ b/public/app/features/plugins/extensions/registry/AddedLinksRegistry.ts @@ -1,7 +1,7 @@ import { ReplaySubject } from 'rxjs'; import { IconName, PluginExtensionAddedLinkConfig } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/src/types/pluginExtensions'; +import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/internal'; import * as errors from '../errors'; import { isGrafanaDevMode } from '../utils'; diff --git a/public/app/features/plugins/extensions/validators.ts b/public/app/features/plugins/extensions/validators.ts index cbdaf81e935..4106544567f 100644 --- a/public/app/features/plugins/extensions/validators.ts +++ b/public/app/features/plugins/extensions/validators.ts @@ -1,13 +1,14 @@ -import type { - PluginExtensionAddedLinkConfig, - PluginExtension, - PluginExtensionLink, - PluginContextType, - PluginExtensionAddedComponentConfig, - PluginExtensionExposedComponentConfig, - PluginExtensionAddedFunctionConfig, +import { + type PluginExtensionAddedLinkConfig, + type PluginExtension, + type PluginExtensionLink, + type PluginContextType, + type PluginExtensionAddedComponentConfig, + type PluginExtensionExposedComponentConfig, + type PluginExtensionAddedFunctionConfig, + PluginExtensionPoints, } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc, PluginExtensionPoints } from '@grafana/data/src/types/pluginExtensions'; +import { PluginAddedLinksConfigureFunc } from '@grafana/data/internal'; import { config, isPluginExtensionLink } from '@grafana/runtime'; import * as errors from './errors'; diff --git a/public/app/features/plugins/loader/sharedDependencies.ts b/public/app/features/plugins/loader/sharedDependencies.ts index dc88d5a292c..0551cd8d170 100644 --- a/public/app/features/plugins/loader/sharedDependencies.ts +++ b/public/app/features/plugins/loader/sharedDependencies.ts @@ -49,7 +49,7 @@ export const sharedDependenciesMap = { '@emotion/css': () => import('@emotion/css'), '@emotion/react': () => import('@emotion/react'), '@grafana/data': grafanaData, - '@grafana/data/unstable': () => import('@grafana/data/src/unstable'), + '@grafana/data/unstable': () => import('@grafana/data/unstable'), '@grafana/runtime': grafanaRuntime, '@grafana/runtime/unstable': () => import('@grafana/runtime/src/unstable'), '@grafana/slate-react': () => import('slate-react'), diff --git a/public/app/features/plugins/pluginPreloader.ts b/public/app/features/plugins/pluginPreloader.ts index 8b7a85759be..43b58f2d08e 100644 --- a/public/app/features/plugins/pluginPreloader.ts +++ b/public/app/features/plugins/pluginPreloader.ts @@ -1,5 +1,8 @@ -import type { PluginExtensionAddedLinkConfig, PluginExtensionExposedComponentConfig } from '@grafana/data'; -import { PluginExtensionAddedComponentConfig } from '@grafana/data/src/types/pluginExtensions'; +import type { + PluginExtensionAddedLinkConfig, + PluginExtensionExposedComponentConfig, + PluginExtensionAddedComponentConfig, +} from '@grafana/data'; import type { AppPluginConfig } from '@grafana/runtime'; import { getPluginSettings } from 'app/features/plugins/pluginSettings'; diff --git a/public/app/features/scopes/tests/utils/render.tsx b/public/app/features/scopes/tests/utils/render.tsx index 3fa447d952b..391331eb5f1 100644 --- a/public/app/features/scopes/tests/utils/render.tsx +++ b/public/app/features/scopes/tests/utils/render.tsx @@ -2,7 +2,7 @@ import { cleanup, waitFor } from '@testing-library/react'; import { KBarProvider } from 'kbar'; import { render } from 'test/test-utils'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { config, setPluginImportUtils } from '@grafana/runtime'; import { sceneGraph } from '@grafana/scenes'; import { defaultDashboard } from '@grafana/schema'; diff --git a/public/app/features/trails/DataTrailsHistory.tsx b/public/app/features/trails/DataTrailsHistory.tsx index bfd7af07344..81e20a8b29c 100644 --- a/public/app/features/trails/DataTrailsHistory.tsx +++ b/public/app/features/trails/DataTrailsHistory.tsx @@ -1,8 +1,7 @@ import { css, cx } from '@emotion/css'; import { useMemo } from 'react'; -import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT } from '@grafana/data'; -import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; +import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT, rangeUtil } from '@grafana/data'; import { config } from '@grafana/runtime'; import { SceneComponentProps, @@ -349,7 +348,7 @@ export function parseTimeTooltip(urlValues: SceneObjectUrlValues): string { return ''; } - const range = convertRawToRange({ + const range = rangeUtil.convertRawToRange({ from: urlValues.from, to: urlValues.to, }); diff --git a/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts b/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts index 673cb2d5348..8d7e5418b3a 100644 --- a/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts +++ b/public/app/features/trails/Integrations/logs/lokiRecordingRules.test.ts @@ -1,7 +1,7 @@ import { of } from 'rxjs'; import type { DataSourceInstanceSettings, DataSourceJsonData } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import * as runtime from '@grafana/runtime'; import { MetricsLogsConnector } from './base'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx index f896c2a5759..1b2f85c51da 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueFilterEditor.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react'; import { Field, SelectableValue, valueMatchers } from '@grafana/data'; -import { FilterByValueFilter } from '@grafana/data/src/transformations/transformers/filterByValue'; +import { FilterByValueFilter } from '@grafana/data/internal'; import { Button, Select, InlineField, InlineFieldRow, Box } from '@grafana/ui'; import { valueMatchersUI } from './ValueMatchers/valueMatchersUI'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx index e9cf39d1497..6c064b2ad0c 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.test.tsx @@ -1,7 +1,7 @@ import { render, fireEvent } from '@testing-library/react'; import { DataFrame, FieldType, ValueMatcherID, valueMatchers } from '@grafana/data'; -import { FilterByValueMatch, FilterByValueType } from '@grafana/data/src/transformations/transformers/filterByValue'; +import { FilterByValueMatch, FilterByValueType } from '@grafana/data/internal'; import { FilterByValueTransformerEditor } from './FilterByValueTransformerEditor'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx index 683350d47b1..57b42e72d32 100644 --- a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx +++ b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx @@ -19,7 +19,7 @@ import { FilterByValueMatch, FilterByValueTransformerOptions, FilterByValueType, -} from '@grafana/data/src/transformations/transformers/filterByValue'; +} from '@grafana/data/internal'; import { Button, RadioButtonGroup, InlineField, Box } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts index 0087b9fe22f..256cd576ebe 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts @@ -1,5 +1,4 @@ -import { FieldType } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; +import { FieldType, toDataFrame } from '@grafana/data'; import { HeatmapCalculationOptions } from '@grafana/schema'; import { rowsToCellsHeatmap, calculateHeatmapFromData } from './heatmap'; diff --git a/public/app/features/transformers/calculateHeatmap/heatmap.ts b/public/app/features/transformers/calculateHeatmap/heatmap.ts index 6a7a29ce69c..ed37d76651e 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.ts @@ -15,7 +15,7 @@ import { TransformationApplicabilityLevels, TimeRange, } from '@grafana/data'; -import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { isLikelyAscendingVector } from '@grafana/data/internal'; import { ScaleDistribution, HeatmapCellLayout, diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx index 0dd7cc033cb..e0439cf7126 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx @@ -5,7 +5,7 @@ import { CalculateFieldMode, CalculateFieldTransformerOptions, checkBinaryValueType, -} from '@grafana/data/src/transformations/transformers/calculateField'; +} from '@grafana/data/internal'; import { getFieldTypeIconName, InlineField, InlineFieldRow, Select } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx index bc39a4e2c62..bd0e589dd88 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx @@ -21,7 +21,7 @@ import { CalculateFieldTransformerOptions, getNameFromOptions, defaultWindowOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +} from '@grafana/data/internal'; import { getTemplateSrv, config as cfg } from '@grafana/runtime'; import { InlineField, InlineSwitch, Input, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx index 1194514bcf4..5d8eb17ea1d 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx @@ -1,9 +1,5 @@ import { ReducerID, SelectableValue } from '@grafana/data'; -import { - CalculateFieldMode, - CalculateFieldTransformerOptions, - CumulativeOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +import { CalculateFieldMode, CalculateFieldTransformerOptions, CumulativeOptions } from '@grafana/data/internal'; import { InlineField, Select, StatsPicker } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx index c660ac21317..e812dfafb0e 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { CalculateFieldTransformerOptions } from '@grafana/data/src/transformations/transformers/calculateField'; +import { CalculateFieldTransformerOptions } from '@grafana/data/internal'; import { InlineField, InlineSwitch } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx index c48870fc36b..e3e50a475ef 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx @@ -1,8 +1,5 @@ import { ReducerID } from '@grafana/data'; -import { - CalculateFieldTransformerOptions, - ReduceOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +import { CalculateFieldTransformerOptions, ReduceOptions } from '@grafana/data/internal'; import { FilterPill, HorizontalGroup, InlineField, StatsPicker } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx index 3b38248b705..4c57fca1b9b 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx @@ -1,9 +1,5 @@ import { unaryOperators, SelectableValue, UnaryOperationID } from '@grafana/data'; -import { - UnaryOptions, - CalculateFieldMode, - CalculateFieldTransformerOptions, -} from '@grafana/data/src/transformations/transformers/calculateField'; +import { UnaryOptions, CalculateFieldMode, CalculateFieldTransformerOptions } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, InlineLabel, Select } from '@grafana/ui'; import { LABEL_WIDTH } from './constants'; diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx index b025c705c12..34fee4b264d 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx @@ -5,7 +5,7 @@ import { CalculateFieldTransformerOptions, WindowOptions, WindowSizeMode, -} from '@grafana/data/src/transformations/transformers/calculateField'; +} from '@grafana/data/internal'; import { InlineField, RadioButtonGroup, Select, StatsPicker } from '@grafana/ui'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; diff --git a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx index 8c548fb2f38..91a0b251d74 100644 --- a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx @@ -8,10 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { - ConcatenateFrameNameMode, - ConcatenateTransformerOptions, -} from '@grafana/data/src/transformations/transformers/concat'; +import { ConcatenateFrameNameMode, ConcatenateTransformerOptions } from '@grafana/data/internal'; import { InlineField, Input, Select } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx index c7d0f4f2f39..e331388cb3e 100644 --- a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx @@ -12,10 +12,7 @@ import { TransformerCategory, getTimeZones, } from '@grafana/data'; -import { - ConvertFieldTypeOptions, - ConvertFieldTypeTransformerOptions, -} from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { ConvertFieldTypeOptions, ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; import { Button, InlineField, InlineFieldRow, Input, Select } from '@grafana/ui'; import { allFieldTypeIconOptions, FieldNamePicker } from '@grafana/ui/internal'; import { findField } from 'app/features/dimensions'; diff --git a/public/app/features/transformers/editors/EnumMappingEditor.tsx b/public/app/features/transformers/editors/EnumMappingEditor.tsx index 09f1822302c..ed1947a7181 100644 --- a/public/app/features/transformers/editors/EnumMappingEditor.tsx +++ b/public/app/features/transformers/editors/EnumMappingEditor.tsx @@ -4,7 +4,7 @@ import { isEqual } from 'lodash'; import { useEffect, useState } from 'react'; import { DataFrame, EnumFieldConfig, GrafanaTheme2 } from '@grafana/data'; -import { ConvertFieldTypeTransformerOptions } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; import { Button, HorizontalGroup, InlineFieldRow, useStyles2, VerticalGroup } from '@grafana/ui'; import EnumMappingRow from './EnumMappingRow'; diff --git a/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx b/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx index 8ac19f37e7f..f8035a86f0b 100644 --- a/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FilterByNameTransformerEditor.tsx @@ -11,7 +11,7 @@ import { TransformerCategory, SelectableValue, } from '@grafana/data'; -import { FilterFieldsByNameTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByName'; +import { FilterFieldsByNameTransformerOptions } from '@grafana/data/internal'; import { getTemplateSrv } from '@grafana/runtime/src/services'; import { Input, FilterPill, InlineFieldRow, InlineField, InlineSwitch, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx b/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx index f67a7cb2b95..05b9e196b83 100644 --- a/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FilterByRefIdTransformerEditor.tsx @@ -6,7 +6,7 @@ import { TransformerCategory, FrameMatcherID, } from '@grafana/data'; -import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByRefId'; +import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/internal'; import { FrameMultiSelectionEditor } from 'app/plugins/panel/geomap/editor/FrameSelectionEditor'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx index e208d67976e..cf14f69a044 100644 --- a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx @@ -12,10 +12,7 @@ import { FieldNamePickerConfigSettings, TransformerCategory, } from '@grafana/data'; -import { - FormatStringOutput, - FormatStringTransformerOptions, -} from '@grafana/data/src/transformations/transformers/formatString'; +import { FormatStringOutput, FormatStringTransformerOptions } from '@grafana/data/internal'; import { Select, InlineFieldRow, InlineField } from '@grafana/ui'; import { FieldNamePicker } from '@grafana/ui/internal'; import { NumberInput } from 'app/core/components/OptionsUI/NumberInput'; diff --git a/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx b/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx index 4c2a646d93f..3f30a79d1a5 100644 --- a/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatTimeTransformerEditor.tsx @@ -9,7 +9,7 @@ import { getFieldDisplayName, PluginState, } from '@grafana/data'; -import { FormatTimeTransformerOptions } from '@grafana/data/src/transformations/transformers/formatTime'; +import { FormatTimeTransformerOptions } from '@grafana/data/internal'; import { Select, InlineFieldRow, InlineField, Input } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx index ca4386f541f..5dc4636bf59 100644 --- a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx @@ -11,11 +11,7 @@ import { TransformerCategory, GrafanaTheme2, } from '@grafana/data'; -import { - GroupByFieldOptions, - GroupByOperationID, - GroupByTransformerOptions, -} from '@grafana/data/src/transformations/transformers/groupBy'; +import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions } from '@grafana/data/internal'; import { useTheme2, Select, StatsPicker, InlineField, Stack, Alert } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx index 17170be06cc..9b874bf5c64 100644 --- a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx @@ -16,11 +16,9 @@ import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions, -} from '@grafana/data/src/transformations/transformers/groupBy'; -import { GroupToNestedTableTransformerOptions, SHOW_NESTED_HEADERS_DEFAULT, -} from '@grafana/data/src/transformations/transformers/groupToNestedTable'; +} from '@grafana/data/internal'; import { useTheme2, Select, StatsPicker, InlineField, Field, Switch, Alert, Stack } from '@grafana/ui'; import { useAllFieldNamesFromDataFrames } from '../utils'; diff --git a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx index a257f02b0af..e9fa82aec13 100644 --- a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx +++ b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx @@ -7,10 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { - histogramFieldInfo, - HistogramTransformerInputs, -} from '@grafana/data/src/transformations/transformers/histogram'; +import { histogramFieldInfo, HistogramTransformerInputs } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, InlineSwitch } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx b/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx index cccf062d843..a28c8548780 100644 --- a/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx +++ b/public/app/features/transformers/editors/JoinByFieldTransformerEditor.tsx @@ -8,7 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { JoinByFieldOptions, JoinMode } from '@grafana/data/src/transformations/transformers/joinByField'; +import { JoinByFieldOptions, JoinMode } from '@grafana/data/internal'; import { getTemplateSrv } from '@grafana/runtime'; import { Select, InlineFieldRow, InlineField } from '@grafana/ui'; import { useFieldDisplayNames, useSelectOptions } from '@grafana/ui/internal'; diff --git a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx index e41017a51a2..263aff71a36 100644 --- a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx @@ -8,10 +8,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { - LabelsToFieldsMode, - LabelsToFieldsOptions, -} from '@grafana/data/src/transformations/transformers/labelsToFields'; +import { LabelsToFieldsMode, LabelsToFieldsOptions } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, RadioButtonGroup, Select, FilterPill, Stack } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/LimitTransformerEditor.tsx b/public/app/features/transformers/editors/LimitTransformerEditor.tsx index c55cb9bbfd3..fd10293e2ce 100644 --- a/public/app/features/transformers/editors/LimitTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LimitTransformerEditor.tsx @@ -7,7 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { LimitTransformerOptions } from '@grafana/data/src/transformations/transformers/limit'; +import { LimitTransformerOptions } from '@grafana/data/internal'; import { InlineFieldRow } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/MergeTransformerEditor.tsx b/public/app/features/transformers/editors/MergeTransformerEditor.tsx index cd55fbd5543..c81f59bcf9b 100644 --- a/public/app/features/transformers/editors/MergeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/MergeTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { MergeTransformerOptions } from '@grafana/data/src/transformations/transformers/merge'; +import { MergeTransformerOptions } from '@grafana/data/internal'; import { FieldValidationMessage } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx index ef640a79dad..b253066abbf 100644 --- a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx @@ -10,8 +10,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { createOrderFieldsComparer } from '@grafana/data/src/transformations/transformers/order'; -import { OrganizeFieldsTransformerOptions } from '@grafana/data/src/transformations/transformers/organize'; +import { createOrderFieldsComparer, OrganizeFieldsTransformerOptions } from '@grafana/data/internal'; import { Input, IconButton, diff --git a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx index fc8e10c6b7e..3131e85be1d 100644 --- a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx @@ -9,7 +9,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; +import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/internal'; import { selectors } from '@grafana/e2e-selectors'; import { InlineField, Select, StatsPicker, InlineSwitch } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/RenameByRegexTransformer.tsx b/public/app/features/transformers/editors/RenameByRegexTransformer.tsx index d192c4a9ee0..4530ad8b84a 100644 --- a/public/app/features/transformers/editors/RenameByRegexTransformer.tsx +++ b/public/app/features/transformers/editors/RenameByRegexTransformer.tsx @@ -8,7 +8,7 @@ import { stringToJsRegex, TransformerCategory, } from '@grafana/data'; -import { RenameByRegexTransformerOptions } from '@grafana/data/src/transformations/transformers/renameByRegex'; +import { RenameByRegexTransformerOptions } from '@grafana/data/internal'; import { InlineField, Input } from '@grafana/ui'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx b/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx index 606d0cdb417..8b3b66e64ed 100644 --- a/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/SeriesToRowsTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { SeriesToRowsTransformerOptions } from '@grafana/data/src/transformations/transformers/seriesToRows'; +import { SeriesToRowsTransformerOptions } from '@grafana/data/internal'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SortByTransformerEditor.tsx b/public/app/features/transformers/editors/SortByTransformerEditor.tsx index 3faa19ebf8f..4247e1c4f66 100644 --- a/public/app/features/transformers/editors/SortByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/SortByTransformerEditor.tsx @@ -7,7 +7,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { SortByField, SortByTransformerOptions } from '@grafana/data/src/transformations/transformers/sortBy'; +import { SortByField, SortByTransformerOptions } from '@grafana/data/internal'; import { getTemplateSrv } from '@grafana/runtime'; import { InlineField, InlineSwitch, InlineFieldRow, Select } from '@grafana/ui'; diff --git a/public/app/features/transformers/editors/TransposeTransformerEditor.tsx b/public/app/features/transformers/editors/TransposeTransformerEditor.tsx index 4190d385e48..9ba613fe78c 100644 --- a/public/app/features/transformers/editors/TransposeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/TransposeTransformerEditor.tsx @@ -5,7 +5,7 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { TransposeTransformerOptions } from '@grafana/data/src/transformations/transformers/transpose'; +import { TransposeTransformerOptions } from '@grafana/data/internal'; import { InlineField, InlineFieldRow, Input } from '@grafana/ui'; export const TransposeTransfomerEditor = ({ options, onChange }: TransformerUIProps) => { diff --git a/public/app/features/transformers/extractFields/extractFields.test.ts b/public/app/features/transformers/extractFields/extractFields.test.ts index a6617aecea9..863b89163ca 100644 --- a/public/app/features/transformers/extractFields/extractFields.test.ts +++ b/public/app/features/transformers/extractFields/extractFields.test.ts @@ -5,10 +5,9 @@ import { Field, FieldType, transformDataFrame, + toDataFrame, } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; -import { SortByTransformerOptions, sortByTransformer } from '@grafana/data/src/transformations/transformers/sortBy'; -import { mockTransformationsRegistry } from '@grafana/data/src/utils/tests/mockTransformationsRegistry'; +import { mockTransformationsRegistry, SortByTransformerOptions, sortByTransformer } from '@grafana/data/internal'; import { extractFieldsTransformer } from './extractFields'; import { ExtractFieldsOptions, FieldExtractorID } from './types'; diff --git a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts index 7f0072dd4d7..bc0ef8c8b82 100644 --- a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts +++ b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts @@ -1,6 +1,4 @@ -import { FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; -import { DataTransformerID } from '@grafana/data/src/transformations/transformers/ids'; +import { DataTransformerID, toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; import { frameAsGazetter } from 'app/features/geo/gazetteer/gazetteer'; import { addFieldsFromGazetteer } from './fieldLookup'; diff --git a/public/app/features/transformers/partitionByValues/partitionByValues.ts b/public/app/features/transformers/partitionByValues/partitionByValues.ts index 80c349fe762..4ab8d360cbe 100644 --- a/public/app/features/transformers/partitionByValues/partitionByValues.ts +++ b/public/app/features/transformers/partitionByValues/partitionByValues.ts @@ -8,8 +8,7 @@ import { DataTransformContext, FieldMatcher, } from '@grafana/data'; -import { getMatcherConfig } from '@grafana/data/src/transformations/transformers/filterByName'; -import { noopTransformer } from '@grafana/data/src/transformations/transformers/noop'; +import { getMatcherConfig, noopTransformer } from '@grafana/data/internal'; import { partition } from './partition'; diff --git a/public/app/features/transformers/spatial/optionsHelper.tsx b/public/app/features/transformers/spatial/optionsHelper.tsx index 49f77cf7927..e493dfc7d0c 100644 --- a/public/app/features/transformers/spatial/optionsHelper.tsx +++ b/public/app/features/transformers/spatial/optionsHelper.tsx @@ -1,8 +1,7 @@ import { set, get as lodashGet } from 'lodash'; import { StandardEditorContext, TransformerUIProps, PanelOptionsEditorBuilder } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; -import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; import { OptionsPaneCategoryDescriptor } from 'app/features/dashboard/components/PanelEditor/OptionsPaneCategoryDescriptor'; import { fillOptionsPaneItems } from 'app/features/dashboard/components/PanelEditor/getVisualizationOptions'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; diff --git a/public/app/features/transformers/spatial/spatialTransformer.test.ts b/public/app/features/transformers/spatial/spatialTransformer.test.ts index b36315fefe5..196a6b3680d 100644 --- a/public/app/features/transformers/spatial/spatialTransformer.test.ts +++ b/public/app/features/transformers/spatial/spatialTransformer.test.ts @@ -1,6 +1,5 @@ -import { FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; -import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; -import { DataTransformerID } from '@grafana/data/src/transformations/transformers/ids'; +import { toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; +import { DataTransformerID } from '@grafana/data/internal'; import { frameAsGazetter } from 'app/features/geo/gazetteer/gazetteer'; describe('spatial transformer', () => { diff --git a/public/app/features/variables/datasource/actions.test.ts b/public/app/features/variables/datasource/actions.test.ts index 4d3a5ca8e94..2a0b42b30ff 100644 --- a/public/app/features/variables/datasource/actions.test.ts +++ b/public/app/features/variables/datasource/actions.test.ts @@ -1,5 +1,5 @@ import { DataSourceInstanceSettings } from '@grafana/data'; -import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugin } from '@grafana/data/test'; import { reduxTester } from '../../../../test/core/redux/reduxTester'; import { variableAdapters } from '../adapters'; diff --git a/public/app/features/variables/datasource/reducer.test.ts b/public/app/features/variables/datasource/reducer.test.ts index 2acb6e96346..6a3abaa27cb 100644 --- a/public/app/features/variables/datasource/reducer.test.ts +++ b/public/app/features/variables/datasource/reducer.test.ts @@ -1,7 +1,7 @@ import { cloneDeep } from 'lodash'; import { DataSourceInstanceSettings, DataSourceVariableModel } from '@grafana/data'; -import { getMockPlugins } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getMockPlugins } from '@grafana/data/test'; import { reducerTester } from '../../../../test/core/redux/reducerTester'; import { getDataSourceInstanceSetting } from '../shared/testing/helpers'; diff --git a/public/app/features/variables/state/initVariableTransaction.test.ts b/public/app/features/variables/state/initVariableTransaction.test.ts index ba9939b8442..0e9c0070023 100644 --- a/public/app/features/variables/state/initVariableTransaction.test.ts +++ b/public/app/features/variables/state/initVariableTransaction.test.ts @@ -1,4 +1,4 @@ -import { DataSourceRef, LoadingState } from '@grafana/data/src'; +import { DataSourceRef, LoadingState } from '@grafana/data'; import { setDataSourceSrv } from '@grafana/runtime/src'; import { DashboardModel } from 'app/features/dashboard/state/DashboardModel'; diff --git a/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts b/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts index aea1a31a10b..7673e9bf8d5 100644 --- a/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts +++ b/public/app/features/variables/state/migrateVariablesDatasourceNameToRef.test.ts @@ -1,4 +1,4 @@ -import { DataSourceRef } from '@grafana/data/src'; +import { DataSourceRef } from '@grafana/data'; import { adHocBuilder, queryBuilder } from '../shared/testing/builders'; import { toVariablePayload } from '../utils'; diff --git a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts index 921573b797e..3e0204fdd6e 100644 --- a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts +++ b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts @@ -1,5 +1,4 @@ -import { VariableType, VariableWithOptions } from '@grafana/data'; -import { LoadingState } from '@grafana/data/src/types/data'; +import { LoadingState, VariableType, VariableWithOptions } from '@grafana/data'; interface TemplateableValue { variableName: string; diff --git a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx index 742b12b9d50..bbf7c27cc5c 100644 --- a/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx +++ b/public/app/plugins/datasource/azuremonitor/components/LogsQueryEditor/RawQuery.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import Prism, { Grammar } from 'prismjs'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; export interface Props { diff --git a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts index 637328f022a..7654c6228cd 100644 --- a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts +++ b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts @@ -1,7 +1,6 @@ import { of } from 'rxjs'; -import { CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; -import { dateTime } from '@grafana/data/src/datetime/moment_wrapper'; +import { dateTime, CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; import { toDataQueryResponse } from '@grafana/runtime'; import { diff --git a/public/app/plugins/datasource/dashboard/datasource.test.ts b/public/app/plugins/datasource/dashboard/datasource.test.ts index 114bb966941..a543c5037d4 100644 --- a/public/app/plugins/datasource/dashboard/datasource.test.ts +++ b/public/app/plugins/datasource/dashboard/datasource.test.ts @@ -8,7 +8,7 @@ import { LoadingState, standardTransformersRegistry, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { getPanelPlugin } from '@grafana/data/test'; import { setPluginImportUtils } from '@grafana/runtime'; import { SafeSerializableSceneObject, diff --git a/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts b/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts index 5b46beee758..103a571b8a6 100644 --- a/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts +++ b/public/app/plugins/datasource/elasticsearch/ElasticResponse.ts @@ -8,7 +8,7 @@ import { MutableDataFrame, PreferredVisualisationType, } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { convertFieldType } from '@grafana/data/internal'; import TableModel from 'app/core/TableModel'; import { isMetricAggregationWithField } from './components/QueryEditor/MetricAggregationsEditor/aggregations'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx index a0feea2669b..71418a7904e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/annotation/AnnotationEditor.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; -import { QueryEditorProps } from '@grafana/data/src'; +import { QueryEditorProps } from '@grafana/data'; import { InlineFormLabel, Input, Stack } from '@grafana/ui'; import InfluxDatasource from '../../../datasource'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/constants.ts b/public/app/plugins/datasource/influxdb/components/editor/constants.ts index e234d7652ea..f9f0c4850a5 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/constants.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/constants.ts @@ -1,4 +1,4 @@ -import { SelectableValue } from '@grafana/data/src'; +import { SelectableValue } from '@grafana/data'; import { ResultFormat } from '../../types'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx index acb8d949f4c..079bb5ba02e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/QueryEditor.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { QueryEditorProps } from '@grafana/data/src'; +import { QueryEditorProps } from '@grafana/data'; import InfluxDatasource from '../../../datasource'; import { buildRawQuery } from '../../../queryUtils'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx index b5b594f3445..daedc65855e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/flux/FluxQueryEditor.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { PureComponent } from 'react'; -import { GrafanaTheme2, SelectableValue } from '@grafana/data/src'; +import { GrafanaTheme2, SelectableValue } from '@grafana/data'; import { getTemplateSrv } from '@grafana/runtime/src'; import { CodeEditor, diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx b/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx index 4858da88623..e25e951c25d 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/editor/query/fsql/FSQLEditor.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import { PureComponent } from 'react'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { SQLQuery, SqlQueryEditorLazy, applyQueryDefaults } from '@grafana/sql'; import { InlineFormLabel, LinkButton, Themeable2, withTheme2 } from '@grafana/ui'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts index 51db862e4d9..b3e9860798e 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/getTemplateVariableOptions.ts @@ -1,4 +1,4 @@ -import { TypedVariableModel } from '@grafana/data/src'; +import { TypedVariableModel } from '@grafana/data'; import { getTemplateSrv } from '@grafana/runtime/src'; export function getTemplateVariableOptions(wrapper: (v: TypedVariableModel) => string) { diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts index 89bd1372bcd..c346946dbfc 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/withTemplateVariableOptions.ts @@ -1,5 +1,5 @@ // helper function to make it easy to call this from the widget-render-code -import { TypedVariableModel } from '@grafana/data/src'; +import { TypedVariableModel } from '@grafana/data'; import { getTemplateVariableOptions } from './getTemplateVariableOptions'; diff --git a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts index 769a9a435a4..745ada1dd39 100644 --- a/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts +++ b/public/app/plugins/datasource/influxdb/components/editor/query/influxql/utils/wrapper.ts @@ -1,4 +1,4 @@ -import { TypedVariableModel } from '@grafana/data/src'; +import { TypedVariableModel } from '@grafana/data'; export function wrapRegex(v: TypedVariableModel): string { return `/^$${v.name}$/`; diff --git a/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts b/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts index b343f668018..314b70c2d15 100644 --- a/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts +++ b/public/app/plugins/datasource/influxdb/influxql_metadata_query.ts @@ -1,4 +1,4 @@ -import { ScopedVars } from '@grafana/data/src'; +import { ScopedVars } from '@grafana/data'; import config from 'app/core/config'; import InfluxDatasource from './datasource'; diff --git a/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx b/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx index 742b12b9d50..bbf7c27cc5c 100644 --- a/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx +++ b/public/app/plugins/datasource/tempo/_importedDependencies/datasources/prometheus/RawQuery.tsx @@ -1,7 +1,7 @@ import { css, cx } from '@emotion/css'; import Prism, { Grammar } from 'prismjs'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { useTheme2 } from '@grafana/ui'; export interface Props { diff --git a/public/app/plugins/datasource/tempo/types.ts b/public/app/plugins/datasource/tempo/types.ts index de6c050fb6c..02dbe712969 100644 --- a/public/app/plugins/datasource/tempo/types.ts +++ b/public/app/plugins/datasource/tempo/types.ts @@ -1,4 +1,4 @@ -import { DataSourceJsonData } from '@grafana/data/src'; +import { DataSourceJsonData } from '@grafana/data'; import { NodeGraphOptions, TraceToLogsOptions } from '@grafana/o11y-ds-frontend'; import { TempoQuery as TempoBase, TempoQueryType, TraceqlFilter } from './dataquery.gen'; diff --git a/public/app/plugins/panel/barchart/bars.ts b/public/app/plugins/panel/barchart/bars.ts index 7d3e318eea3..40a3c62f73d 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -1,7 +1,6 @@ import uPlot, { Axis, AlignedData, Scale } from 'uplot'; -import { DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { colorManipulator, DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; import { StackingMode, VisibilityMode, @@ -545,7 +544,8 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { }); barsColors.push({ - fill: fillOpacity < 1 ? colors.map((c) => (c != null ? alpha(c, fillOpacity) : null)) : colors, + fill: + fillOpacity < 1 ? colors.map((c) => (c != null ? colorManipulator.alpha(c, fillOpacity) : null)) : colors, stroke: colors, }); } diff --git a/public/app/plugins/panel/barchart/utils.ts b/public/app/plugins/panel/barchart/utils.ts index 79d9629b11b..fba262b7abe 100644 --- a/public/app/plugins/panel/barchart/utils.ts +++ b/public/app/plugins/panel/barchart/utils.ts @@ -13,7 +13,7 @@ import { getFieldSeriesColor, outerJoinDataFrames, } from '@grafana/data'; -import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; +import { decoupleHideFromState } from '@grafana/data/internal'; import { AxisColorMode, AxisPlacement, diff --git a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx index 0ddecee36f6..5364552267a 100644 --- a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx +++ b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx @@ -1,7 +1,6 @@ import { memo } from 'react'; -import { cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; -import { Field } from '@grafana/data/'; +import { Field, cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; import { AxisPlacement, VizLegendOptions } from '@grafana/schema'; import { useTheme2, VizLayout, VizLayoutLegendProps, VizLegend, VizLegendItem } from '@grafana/ui'; import { getDisplayValuesForCalcs } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/candlestick/fields.ts b/public/app/plugins/panel/candlestick/fields.ts index c370b953a72..5019dfe06d0 100644 --- a/public/app/plugins/panel/candlestick/fields.ts +++ b/public/app/plugins/panel/candlestick/fields.ts @@ -7,7 +7,7 @@ import { outerJoinDataFrames, TimeRange, } from '@grafana/data'; -import { maybeSortFrame } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { maybeSortFrame } from '@grafana/data/internal'; import { findField } from 'app/features/dimensions'; import { prepareGraphableFields } from '../timeseries/utils'; diff --git a/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx b/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx index aa756baa9c8..ceb17a8ce7d 100644 --- a/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx +++ b/public/app/plugins/panel/canvas/components/CanvasTooltip.tsx @@ -12,8 +12,8 @@ import { getFieldDisplayName, ScopedVars, ValueLinkConfig, -} from '@grafana/data/src'; -import { ActionModel } from '@grafana/data/src/types/action'; + ActionModel, +} from '@grafana/data'; import { Portal, useStyles2, VizTooltipContainer } from '@grafana/ui'; import { VizTooltipContent, diff --git a/public/app/plugins/panel/canvas/editor/connectionEditor.tsx b/public/app/plugins/panel/canvas/editor/connectionEditor.tsx index 96e8a21b331..869bcec4adb 100644 --- a/public/app/plugins/panel/canvas/editor/connectionEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/connectionEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { Scene } from 'app/features/canvas/runtime/scene'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; diff --git a/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx b/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx index acfe2f3b755..c63a14aabc6 100644 --- a/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx +++ b/public/app/plugins/panel/canvas/editor/element/QuickPositioning.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; -import { GrafanaTheme2 } from '@grafana/data/src'; +import { GrafanaTheme2 } from '@grafana/data'; import { IconButton, useStyles2 } from '@grafana/ui'; import { ElementState } from 'app/features/canvas/runtime/element'; import { QuickPlacement } from 'app/features/canvas/types'; diff --git a/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx b/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx index bdad1130a50..4e0164319ea 100644 --- a/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/element/elementEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { CanvasElementOptions } from 'app/features/canvas/element'; import { canvasElementRegistry, diff --git a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx index 5b13b982eb8..8c6a2764035 100644 --- a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx +++ b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx @@ -4,8 +4,7 @@ import { useMemo, useState } from 'react'; import { useObservable } from 'react-use'; import { DataFrame, GrafanaTheme2, PanelOptionsEditorBuilder, StandardEditorContext } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; -import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; import { useStyles2 } from '@grafana/ui'; import { AddLayerButton } from 'app/core/components/Layers/AddLayerButton'; import { FrameState } from 'app/features/canvas/runtime/frame'; diff --git a/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx b/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx index 59c9b40fd46..69a0e9aa29e 100644 --- a/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx +++ b/public/app/plugins/panel/canvas/editor/layer/layerEditor.tsx @@ -1,6 +1,6 @@ import { get as lodashGet } from 'lodash'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { ElementState } from 'app/features/canvas/runtime/element'; import { FrameState } from 'app/features/canvas/runtime/frame'; import { Scene } from 'app/features/canvas/runtime/scene'; diff --git a/public/app/plugins/panel/canvas/editor/options.ts b/public/app/plugins/panel/canvas/editor/options.ts index 221ab5f7979..48640dfddb0 100644 --- a/public/app/plugins/panel/canvas/editor/options.ts +++ b/public/app/plugins/panel/canvas/editor/options.ts @@ -1,7 +1,7 @@ import { capitalize } from 'lodash'; import { FieldType } from '@grafana/data'; -import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { PanelOptionsSupplier } from '@grafana/data/internal'; import { ConnectionDirection } from 'app/features/canvas/element'; import { SVGElements } from 'app/features/canvas/runtime/element'; import { ColorDimensionEditor, ResourceDimensionEditor, ScaleDimensionEditor } from 'app/features/dimensions/editors'; diff --git a/public/app/plugins/panel/canvas/utils.ts b/public/app/plugins/panel/canvas/utils.ts index bf5fb30b15f..386466d3378 100644 --- a/public/app/plugins/panel/canvas/utils.ts +++ b/public/app/plugins/panel/canvas/utils.ts @@ -1,7 +1,6 @@ import { isNumber, isString } from 'lodash'; -import { AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; -import { DataFrame, Field } from '@grafana/data/'; +import { DataFrame, Field, AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; import appEvents from 'app/core/app_events'; import { hasAlphaPanels, config } from 'app/core/config'; import { diff --git a/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx b/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx index f9629ce7053..1e06330c88d 100644 --- a/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx +++ b/public/app/plugins/panel/datagrid/components/DatagridContextMenu.tsx @@ -3,7 +3,7 @@ import { capitalize } from 'lodash'; import * as React from 'react'; import { DataFrame, FieldType } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; +import { convertFieldType } from '@grafana/data/internal'; import { reportInteraction } from '@grafana/runtime'; import { ContextMenu, MenuGroup, MenuItem } from '@grafana/ui'; import { MenuDivider } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx index 2d6cdabfc5d..34eda649940 100644 --- a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx +++ b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx @@ -4,8 +4,13 @@ import { useMemo } from 'react'; import { useObservable } from 'react-use'; import { of } from 'rxjs'; -import { DataFrame, formattedValueToString, getFieldColorModeForField, GrafanaTheme2 } from '@grafana/data'; -import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; +import { + getMinMaxAndDelta, + DataFrame, + formattedValueToString, + getFieldColorModeForField, + GrafanaTheme2, +} from '@grafana/data'; import { useStyles2, VizLegendItem } from '@grafana/ui'; import { ColorScale } from 'app/core/components/ColorScale/ColorScale'; import { SanitizedSVG } from 'app/core/components/SVG/SanitizedSVG'; diff --git a/public/app/plugins/panel/geomap/editor/layerEditor.tsx b/public/app/plugins/panel/geomap/editor/layerEditor.tsx index e0676fab740..064e6189cf7 100644 --- a/public/app/plugins/panel/geomap/editor/layerEditor.tsx +++ b/public/app/plugins/panel/geomap/editor/layerEditor.tsx @@ -1,7 +1,7 @@ import { get as lodashGet, isEqual } from 'lodash'; import { FrameGeometrySourceMode, getFrameMatchers, MapLayerOptions } from '@grafana/data'; -import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/internal'; import { setOptionImmutably } from 'app/features/dashboard/components/PanelEditor/utils'; import { addLocationFields } from 'app/features/geo/editor/locationEditor'; diff --git a/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx b/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx index 43e9500ad0c..366b687c5aa 100644 --- a/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx +++ b/public/app/plugins/panel/geomap/layers/data/routeLayer.tsx @@ -20,8 +20,8 @@ import { DataHoverClearEvent, DataFrame, FieldType, + colorManipulator } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { MapLayerOptions, FrameGeometrySourceMode } from '@grafana/schema'; import { FrameVectorSource } from 'app/features/geo/utils/frameVectorSource'; import { getGeometryField, getLocationMatchers } from 'app/features/geo/utils/location'; @@ -207,10 +207,10 @@ export const routeLayer: MapLayerRegistryItem = { image: new Circle({ radius: crosshairRadius, stroke: new Stroke({ - color: alpha(crosshairColor, 1), + color: colorManipulator.alpha(crosshairColor, 1), width: 1, }), - fill: new Fill({ color: alpha(crosshairColor, 0.4) }), + fill: new Fill({ color: colorManipulator.alpha(crosshairColor, 0.4) }), }), }); const lineStyle = new Style({ diff --git a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts index 569bbdf7c7b..cc0558c4e44 100644 --- a/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts +++ b/public/app/plugins/panel/geomap/utils/checkFeatureMatchesStyleRule.ts @@ -1,6 +1,6 @@ import { FeatureLike } from 'ol/Feature'; -import { compareValues } from '@grafana/data/src/transformations/matchers/compareValues'; +import { compareValues } from '@grafana/data/internal'; import { FeatureRuleConfig } from '../types'; diff --git a/public/app/plugins/panel/geomap/utils/tooltip.ts b/public/app/plugins/panel/geomap/utils/tooltip.ts index 74fc3d6a8ba..547ef6e498b 100644 --- a/public/app/plugins/panel/geomap/utils/tooltip.ts +++ b/public/app/plugins/panel/geomap/utils/tooltip.ts @@ -2,7 +2,7 @@ import { debounce } from 'lodash'; import { MapBrowserEvent } from 'ol'; import { toLonLat } from 'ol/proj'; -import { DataFrame, DataHoverClearEvent } from '@grafana/data/src'; +import { DataFrame, DataHoverClearEvent } from '@grafana/data'; import { GeomapPanel } from '../GeomapPanel'; import { GeomapHoverPayload, GeomapLayerHover } from '../event'; diff --git a/public/app/plugins/panel/geomap/utils/utils.ts b/public/app/plugins/panel/geomap/utils/utils.ts index 6587dda7ee2..44bb31c0876 100644 --- a/public/app/plugins/panel/geomap/utils/utils.ts +++ b/public/app/plugins/panel/geomap/utils/utils.ts @@ -1,8 +1,7 @@ import { Map as OpenLayersMap } from 'ol'; import { defaults as interactionDefaults } from 'ol/interaction'; -import { SelectableValue } from '@grafana/data'; -import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; +import { DataFrame, GrafanaTheme2, SelectableValue } from '@grafana/data'; import { getColorDimension, getScalarDimension, getScaledDimension, getTextDimension } from 'app/features/dimensions'; import { getGrafanaDatasource } from 'app/plugins/datasource/grafana/datasource'; diff --git a/public/app/plugins/panel/graph/data_processor.ts b/public/app/plugins/panel/graph/data_processor.ts index 21afccf65d3..0b97dd6efbd 100644 --- a/public/app/plugins/panel/graph/data_processor.ts +++ b/public/app/plugins/panel/graph/data_processor.ts @@ -1,7 +1,7 @@ import { find } from 'lodash'; import { DataFrame, dateTime, Field, FieldType, getFieldDisplayName, getTimeField, TimeRange } from '@grafana/data'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; +import { applyNullInsertThreshold } from '@grafana/data/internal'; import { colors } from '@grafana/ui'; import config from 'app/core/config'; import TimeSeries from 'app/core/time_series2'; diff --git a/public/app/plugins/panel/histogram/Histogram.tsx b/public/app/plugins/panel/histogram/Histogram.tsx index 024d3105a51..3225018263a 100644 --- a/public/app/plugins/panel/histogram/Histogram.tsx +++ b/public/app/plugins/panel/histogram/Histogram.tsx @@ -9,11 +9,9 @@ import { getFieldSeriesColor, GrafanaTheme2, roundDecimals, -} from '@grafana/data'; -import { histogramBucketSizes, histogramFrameBucketMaxFieldName, -} from '@grafana/data/src/transformations/transformers/histogram'; +} from '@grafana/data'; import { VizLegendOptions, ScaleDistribution, AxisPlacement, ScaleDirection, ScaleOrientation } from '@grafana/schema'; import { Themeable2, diff --git a/public/app/plugins/panel/histogram/HistogramPanel.tsx b/public/app/plugins/panel/histogram/HistogramPanel.tsx index 082b0be63c4..6ec723bd766 100644 --- a/public/app/plugins/panel/histogram/HistogramPanel.tsx +++ b/public/app/plugins/panel/histogram/HistogramPanel.tsx @@ -1,7 +1,14 @@ import { useMemo } from 'react'; -import { DataFrameType, PanelProps, buildHistogram, cacheFieldDisplayNames, getHistogramFields } from '@grafana/data'; -import { histogramFieldsToFrame, joinHistograms } from '@grafana/data/src/transformations/transformers/histogram'; +import { + histogramFieldsToFrame, + joinHistograms, + DataFrameType, + PanelProps, + buildHistogram, + cacheFieldDisplayNames, + getHistogramFields, +} from '@grafana/data'; import { TooltipDisplayMode, TooltipPlugin2, useTheme2 } from '@grafana/ui'; import { TooltipHoverMode } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/histogram/module.tsx b/public/app/plugins/panel/histogram/module.tsx index cf95bbc463d..2584b008737 100644 --- a/public/app/plugins/panel/histogram/module.tsx +++ b/public/app/plugins/panel/histogram/module.tsx @@ -4,8 +4,8 @@ import { FieldType, identityOverrideProcessor, PanelPlugin, + histogramFieldInfo, } from '@grafana/data'; -import { histogramFieldInfo } from '@grafana/data/src/transformations/transformers/histogram'; import { commonOptionsBuilder, graphFieldOptions } from '@grafana/ui'; import { StackingEditor } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/histogram/utils.ts b/public/app/plugins/panel/histogram/utils.ts index 51d041050bf..25e1f33c4bd 100644 --- a/public/app/plugins/panel/histogram/utils.ts +++ b/public/app/plugins/panel/histogram/utils.ts @@ -1,8 +1,9 @@ -import { DataFrame, FieldType } from '@grafana/data'; import { isHistogramFrameBucketMinFieldName, isHistogramFrameBucketMaxFieldName, -} from '@grafana/data/src/transformations/transformers/histogram'; + DataFrame, + FieldType, +} from '@grafana/data'; export function originalDataHasHistogram(frames?: DataFrame[]): boolean { if (frames?.length !== 1) { diff --git a/public/app/plugins/panel/logs/LogsPanel.tsx b/public/app/plugins/panel/logs/LogsPanel.tsx index 088f4fd2b14..145fad771a3 100644 --- a/public/app/plugins/panel/logs/LogsPanel.tsx +++ b/public/app/plugins/panel/logs/LogsPanel.tsx @@ -29,8 +29,8 @@ import { urlUtil, LogSortOrderChangeEvent, LoadingState, + rangeUtil, } from '@grafana/data'; -import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config, getAppEvents } from '@grafana/runtime'; import { ScrollContainer, usePanelContext, useStyles2 } from '@grafana/ui'; import { getFieldLinksForExplore } from 'app/features/explore/utils/links'; @@ -599,7 +599,7 @@ export async function requestMoreLogs( return []; } - const range: TimeRange = convertRawToRange({ + const range: TimeRange = rangeUtil.convertRawToRange({ from: dateTimeForTimeZone(timeZone, timeRange.from), to: dateTimeForTimeZone(timeZone, timeRange.to), }); diff --git a/public/app/plugins/panel/nodeGraph/Node.test.tsx b/public/app/plugins/panel/nodeGraph/Node.test.tsx index a73f0b8334e..2c9bf841394 100644 --- a/public/app/plugins/panel/nodeGraph/Node.test.tsx +++ b/public/app/plugins/panel/nodeGraph/Node.test.tsx @@ -1,6 +1,6 @@ import { render, screen } from '@testing-library/react'; -import { FieldType } from '@grafana/data/src'; +import { FieldType } from '@grafana/data'; import { Node } from './Node'; diff --git a/public/app/plugins/panel/stat/StatPanel.tsx b/public/app/plugins/panel/stat/StatPanel.tsx index 2411ab49943..6d1c35cc63a 100644 --- a/public/app/plugins/panel/stat/StatPanel.tsx +++ b/public/app/plugins/panel/stat/StatPanel.tsx @@ -10,7 +10,7 @@ import { NumericRange, PanelProps, } from '@grafana/data'; -import { findNumericFieldMinMax } from '@grafana/data/src/field/fieldOverrides'; +import { findNumericFieldMinMax } from '@grafana/data/internal'; import { BigValueTextMode, BigValueGraphMode } from '@grafana/schema'; import { BigValue, DataLinksContextMenu, VizRepeater, VizRepeaterRenderValueProps } from '@grafana/ui'; import { DataLinksContextMenuApi } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/status-history/utils.ts b/public/app/plugins/panel/status-history/utils.ts index cd683b7129c..d077a54a959 100644 --- a/public/app/plugins/panel/status-history/utils.ts +++ b/public/app/plugins/panel/status-history/utils.ts @@ -1,5 +1,4 @@ -import { ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; -import { DataFrame } from '@grafana/data/'; +import { DataFrame, ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; import { getActions } from 'app/features/actions/utils'; export const getDataLinks = (field: Field, rowIdx: number) => { diff --git a/public/app/plugins/panel/table/migrations.ts b/public/app/plugins/panel/table/migrations.ts index 734376e18be..aa4c635682c 100644 --- a/public/app/plugins/panel/table/migrations.ts +++ b/public/app/plugins/panel/table/migrations.ts @@ -10,7 +10,7 @@ import { DataFrame, FieldType, } from '@grafana/data'; -import { ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; +import { ReduceTransformerOptions } from '@grafana/data/internal'; import { Options } from './panelcfg.gen'; diff --git a/public/app/plugins/panel/timeseries/utils.ts b/public/app/plugins/panel/timeseries/utils.ts index 02fc7ea3b34..8b974ac38fa 100644 --- a/public/app/plugins/panel/timeseries/utils.ts +++ b/public/app/plugins/panel/timeseries/utils.ts @@ -7,10 +7,10 @@ import { isBooleanUnit, TimeRange, cacheFieldDisplayNames, + applyNullInsertThreshold, + nullToValue, } from '@grafana/data'; -import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; -import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; -import { nullToValue } from '@grafana/data/src/transformations/transformers/nulls/nullToValue'; +import { convertFieldType } from '@grafana/data/internal'; import { GraphFieldConfig, LineInterpolation, TooltipDisplayMode, VizTooltipOptions } from '@grafana/schema'; import { buildScaleKey } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/trend/TrendPanel.tsx b/public/app/plugins/panel/trend/TrendPanel.tsx index f043c113b1f..ff54529bbe4 100644 --- a/public/app/plugins/panel/trend/TrendPanel.tsx +++ b/public/app/plugins/panel/trend/TrendPanel.tsx @@ -1,7 +1,14 @@ import { useMemo } from 'react'; -import { DataFrame, FieldMatcherID, fieldMatchers, FieldType, PanelProps, TimeRange } from '@grafana/data'; -import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; +import { + isLikelyAscendingVector, + DataFrame, + FieldMatcherID, + fieldMatchers, + FieldType, + PanelProps, + TimeRange, +} from '@grafana/data'; import { config, PanelDataErrorView } from '@grafana/runtime'; import { KeyboardPlugin, TooltipDisplayMode, usePanelContext, TooltipPlugin2 } from '@grafana/ui'; import { TooltipHoverMode } from '@grafana/ui/internal'; diff --git a/public/app/plugins/panel/xychart/XYChartPanel.tsx b/public/app/plugins/panel/xychart/XYChartPanel.tsx index 31d4784a7aa..e3e667730c2 100644 --- a/public/app/plugins/panel/xychart/XYChartPanel.tsx +++ b/public/app/plugins/panel/xychart/XYChartPanel.tsx @@ -1,8 +1,7 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { FALLBACK_COLOR, PanelProps } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { colorManipulator, FALLBACK_COLOR, PanelProps } from '@grafana/data'; import { config } from '@grafana/runtime'; import { TooltipDisplayMode, @@ -72,7 +71,7 @@ export const XYChartPanel2 = (props: Props2) => { items.push({ yAxis: 1, // TODO: pull from y field label: s.name.value, - color: alpha(s.color.fixed ?? FALLBACK_COLOR, 1), + color: colorManipulator.alpha(s.color.fixed ?? FALLBACK_COLOR, 1), getItemKey: () => `${idx}-${s.name.value}`, fieldName: yField.state?.displayName ?? yField.name, disabled: yField.state?.hideFrom?.viz ?? false, diff --git a/public/app/plugins/panel/xychart/XYChartTooltip.tsx b/public/app/plugins/panel/xychart/XYChartTooltip.tsx index f9b0d588d31..f72a67b7b5e 100644 --- a/public/app/plugins/panel/xychart/XYChartTooltip.tsx +++ b/public/app/plugins/panel/xychart/XYChartTooltip.tsx @@ -1,7 +1,6 @@ import { ReactNode } from 'react'; -import { DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; +import { colorManipulator, DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; import { VizTooltipContent, VizTooltipFooter, @@ -67,7 +66,7 @@ export const XYChartTooltip = ({ const headerItem: VizTooltipItem = { label, value: '', - color: alpha(seriesColor ?? '#fff', 0.5), + color: colorManipulator.alpha(seriesColor ?? '#fff', 0.5), colorIndicator: ColorIndicator.marker_md, }; diff --git a/public/app/plugins/panel/xychart/scatter.ts b/public/app/plugins/panel/xychart/scatter.ts index b2d9156ffbb..d7bb53a3838 100644 --- a/public/app/plugins/panel/xychart/scatter.ts +++ b/public/app/plugins/panel/xychart/scatter.ts @@ -11,8 +11,8 @@ import { MappingType, SpecialValueMatch, ThresholdsMode, + colorManipulator, } from '@grafana/data'; -import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { AxisPlacement, FieldColorModeId, ScaleDirection, ScaleOrientation, VisibilityMode } from '@grafana/schema'; import { UPlotConfigBuilder } from '@grafana/ui'; import { FacetedData, FacetSeries } from '@grafana/ui/internal'; @@ -86,8 +86,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { let pointAlpha = scatterInfo.fillOpacity / 100; - u.ctx.fillStyle = alpha((series.fill as any)(), pointAlpha); - u.ctx.strokeStyle = alpha((series.stroke as any)(), 1); + u.ctx.fillStyle = colorManipulator.alpha((series.fill as any)(), pointAlpha); + u.ctx.strokeStyle = colorManipulator.alpha((series.stroke as any)(), 1); u.ctx.lineWidth = strokeWidth; let deg360 = 2 * Math.PI; @@ -138,8 +138,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { if (pointColors[i] !== curColorIdx) { curColorIdx = pointColors[i]; let c = curColorIdx === -1 ? FALLBACK_COLOR : pointPalette[curColorIdx]; - u.ctx.fillStyle = paletteHasAlpha ? c : alpha(c as string, pointAlpha); - u.ctx.strokeStyle = alpha(c as string, 1); + u.ctx.fillStyle = paletteHasAlpha ? c : colorManipulator.alpha(c as string, pointAlpha); + u.ctx.strokeStyle = colorManipulator.alpha(c as string, 1); } } @@ -421,8 +421,8 @@ export const prepConfig = (xySeries: XYSeries[], theme: GrafanaTheme2) => { pathBuilder: drawBubbles, // drawBubbles({disp: {size: {values: () => }}}) theme, scaleKey: '', // facets' scales used (above) - lineColor: alpha(lineColor ?? '#ffff', 1), - fillColor: alpha(pointColor ?? '#ffff', 0.5), + lineColor: colorManipulator.alpha(lineColor ?? '#ffff', 1), + fillColor: colorManipulator.alpha(pointColor ?? '#ffff', 0.5), show: !field.state?.hideFrom?.viz, }); }); diff --git a/public/app/plugins/panel/xychart/utils.ts b/public/app/plugins/panel/xychart/utils.ts index 47884a7540b..4425666fe0b 100644 --- a/public/app/plugins/panel/xychart/utils.ts +++ b/public/app/plugins/panel/xychart/utils.ts @@ -12,7 +12,7 @@ import { FieldMatcherID, FieldConfigSource, } from '@grafana/data'; -import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; +import { decoupleHideFromState } from '@grafana/data/internal'; import { config } from '@grafana/runtime'; import { VisibilityMode } from '@grafana/schema'; diff --git a/public/app/routes/RoutesWrapper.tsx b/public/app/routes/RoutesWrapper.tsx index 7e4701f040e..ee0318cb7a7 100644 --- a/public/app/routes/RoutesWrapper.tsx +++ b/public/app/routes/RoutesWrapper.tsx @@ -4,7 +4,7 @@ import { ComponentType, ReactNode } from 'react'; import { Router } from 'react-router-dom'; import { CompatRouter } from 'react-router-dom-v5-compat'; -import { GrafanaTheme2 } from '@grafana/data/'; +import { GrafanaTheme2 } from '@grafana/data'; import { config, locationService,