From 5cd85471315b7a0455f133a3b72bb064d738c4ea Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Mon, 17 Mar 2025 13:26:59 +0100 Subject: [PATCH] Revert "Grafana Data: Use package.json exports for internal code (#102286) Revert "Grafana Data: Use package.json exports for internal code (#102036)" This reverts commit 91116de790c6c59248abd262721c40f169be6661. --- .betterer.results | 529 +++++++++++++----- packages/grafana-data/package.json | 20 - packages/grafana-data/src/internal/index.ts | 100 ---- .../panel/getPanelOptionsWithDefaults.test.ts | 3 +- .../{helpers => __mocks__}/pluginMocks.ts | 2 +- 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 | 2 +- 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, 718 insertions(+), 563 deletions(-) delete mode 100644 packages/grafana-data/src/internal/index.ts rename packages/grafana-data/test/{helpers => __mocks__}/pluginMocks.ts (98%) delete mode 100644 packages/grafana-data/test/index.ts diff --git a/.betterer.results b/.betterer.results index e56a82ec813..6849eaed996 100644 --- a/.betterer.results +++ b/.betterer.results @@ -392,9 +392,8 @@ 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/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-data/test/__mocks__/pluginMocks.ts:5381": [ + [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "packages/grafana-e2e-selectors/src/resolver.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -971,6 +970,11 @@ 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"], @@ -993,6 +997,9 @@ 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"] ], @@ -1074,6 +1081,14 @@ 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"] @@ -1116,6 +1131,12 @@ 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"] ], @@ -1155,6 +1176,9 @@ 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"], @@ -1176,9 +1200,10 @@ exports[`better eslint`] = { [0, 0, 0, "Unexpected any. Specify a different type.", "0"] ], "public/app/core/utils/richHistory.ts:5381": [ - [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"] + [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"] ], "public/app/core/utils/ticks.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -1365,9 +1390,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, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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. Wrap text with ", "2"], + [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 ", "4"], [0, 0, 0, "No untranslated strings. Wrap text with ", "5"], @@ -1380,7 +1405,8 @@ 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 ", "15"], + [0, 0, 0, "No untranslated strings. Wrap text with ", "16"] ], "public/app/features/alerting/unified/NotificationPoliciesPage.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2026,10 +2052,11 @@ 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, "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, "\'@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. Wrap text with ", "2"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "3"] + [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/rule-editor/QueryRows.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], @@ -2399,6 +2426,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "22"], [0, 0, 0, "No untranslated strings. Wrap text with ", "23"] ], + "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"] @@ -2420,6 +2450,9 @@ 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"], @@ -2641,6 +2674,9 @@ 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"], @@ -2657,6 +2693,9 @@ 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"] ], @@ -2666,6 +2705,9 @@ 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"], @@ -2731,8 +2773,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], "public/app/features/auth-config/AuthProvidersListPage.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "1"] + [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 ", "2"] ], "public/app/features/auth-config/ProviderConfigForm.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -2787,6 +2830,9 @@ 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"] ], @@ -3037,6 +3083,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/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"] ], @@ -3517,8 +3566,10 @@ 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, "Unexpected any. Specify a different type.", "0"], - [0, 0, 0, "Unexpected any. Specify a different type.", "1"] + [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"] ], "public/app/features/dashboard/components/PanelEditor/utils.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -3630,13 +3681,20 @@ 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, "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"] + [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"] ], "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"] @@ -3749,12 +3807,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, "Do not use any type assertions.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [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.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], - [0, 0, 0, "Unexpected any. Specify a different type.", "4"], - [0, 0, 0, "Unexpected any. Specify a different type.", "5"], + [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.", "6"], [0, 0, 0, "Unexpected any. Specify a different type.", "7"], [0, 0, 0, "Unexpected any. Specify a different type.", "8"], @@ -3776,7 +3834,9 @@ 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.", "27"], + [0, 0, 0, "Unexpected any. Specify a different type.", "28"], + [0, 0, 0, "Unexpected any. Specify a different type.", "29"] ], "public/app/features/dashboard/state/DashboardModel.repeat.test.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -3889,9 +3949,10 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], "public/app/features/datasources/components/CloudInfoBox.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [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"] ], "public/app/features/datasources/components/DashboardsTable.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4072,7 +4133,8 @@ exports[`better eslint`] = { [0, 0, 0, "Do not use export all (\`export * from ...\`)", "7"] ], "public/app/features/dimensions/scale.ts:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"] + [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"] ], "public/app/features/dimensions/types.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4150,6 +4212,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] ], + "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 in text props. Wrap text with or use t()", "1"], @@ -4173,6 +4238,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/LogsMetaRow.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"], @@ -4187,6 +4255,9 @@ 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/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"] ], @@ -4202,6 +4273,9 @@ 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. Wrap text with ", "2"] ], + "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"], [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"], @@ -4482,6 +4556,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "2"], [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], + "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"] ], @@ -4671,9 +4748,10 @@ 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/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"] + [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"] ], "public/app/features/live/centrifuge/channel.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -4695,8 +4773,12 @@ 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, "No untranslated strings. Wrap text with ", "0"] + [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"] ], "public/app/features/logs/components/LogDetails.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -4744,6 +4826,9 @@ 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"] ], @@ -5083,15 +5168,24 @@ 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"] ], @@ -5476,7 +5570,8 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] ], "public/app/features/trails/DataTrailsHistory.tsx:5381": [ - [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + [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"] ], "public/app/features/trails/MetricScene.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5510,16 +5605,21 @@ 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, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "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()", "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"] ], "public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [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"] ], "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"], @@ -5555,9 +5655,13 @@ 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, "Do not use any type assertions.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"] + [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"] ], "public/app/features/transformers/configFromQuery/ConfigFromQueryTransformerEditor.tsx:5381": [ [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], @@ -5565,58 +5669,66 @@ 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, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CalculateFieldTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "3"] + ], + "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, "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/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"] ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx:5381": [ - [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"] - ], - "public/app/features/transformers/editors/CalculateFieldTransformerEditor/IndexOptionsEditor.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"] - ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx:5381": [ - [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"] + [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"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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. Wrap text with ", "3"] + [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"] ], "public/app/features/transformers/editors/CalculateFieldTransformerEditor/WindowOptionsEditor.tsx:5381": [ - [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, "\'@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, "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()", "6"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"] ], "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, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "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()", "2"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"] ], "public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx:5381": [ - [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, "\'@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, "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"], @@ -5631,13 +5743,15 @@ 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()", "16"], + [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "17"] ], "public/app/features/transformers/editors/EnumMappingEditor.tsx:5381": [ - [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"] + [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"] ], "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"], @@ -5645,40 +5759,49 @@ 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/runtime/src/services\' import is restricted from being used by a pattern. Import from the public export instead.", "0"], + [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, "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"] + ], + "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()", "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/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()", "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"] - ], - "public/app/features/transformers/editors/FormatStringTransformerEditor.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"], - [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, "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. Wrap text with ", "5"] + [0, 0, 0, "No untranslated strings. Wrap text with ", "6"] ], "public/app/features/transformers/editors/GroupByTransformerEditor.tsx:5381": [ - [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"] - ], - "public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.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"], + [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, "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/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()", "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"] + ], "public/app/features/transformers/editors/GroupingToMatrixTransformerEditor.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"], @@ -5686,60 +5809,74 @@ 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, "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"] - ], - "public/app/features/transformers/editors/JoinByFieldTransformerEditor.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"], - [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, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "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/LimitTransformerEditor.tsx:5381": [ - [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, "No untranslated strings. Wrap text with ", "0"] - ], - "public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + "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()", "1"], - [0, 0, 0, "No untranslated strings. Wrap text with ", "2"] + [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/ReduceTransformerEditor.tsx:5381": [ - [0, 0, 0, "Do not use any type assertions.", "0"], + "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()", "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/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"] + ], + "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"] + ], + "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"] + ], + "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, "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"] + ], "public/app/features/transformers/editors/RenameByRegexTransformer.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"], - [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/SortByTransformerEditor.tsx:5381": [ - [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"] - ], - "public/app/features/transformers/editors/TransposeTransformerEditor.tsx:5381": [ - [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"], + [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()", "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"] + ], + "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, "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/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()", "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/extractFields/ExtractFieldsTransformerEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], [0, 0, 0, "Do not use any type assertions.", "1"], @@ -5765,6 +5902,11 @@ 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"] @@ -5807,6 +5949,10 @@ 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"] ], @@ -5820,6 +5966,10 @@ 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"], @@ -5854,12 +6004,18 @@ 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, "Do not use any type assertions.", "0"], - [0, 0, 0, "Do not use any type assertions.", "1"], + [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.", "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"] + [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"] ], "public/app/features/transformers/suggestionsInput/SuggestionsInput.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"], @@ -6142,6 +6298,9 @@ 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"] @@ -6312,6 +6471,9 @@ 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"], @@ -6334,9 +6496,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, "Do not use any type assertions.", "0"], + [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, "Unexpected any. Specify a different type.", "2"], + [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.", "4"], [0, 0, 0, "Unexpected any. Specify a different type.", "5"], @@ -6365,7 +6527,8 @@ 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.", "31"], + [0, 0, 0, "Unexpected any. Specify a different type.", "32"] ], "public/app/plugins/datasource/elasticsearch/LanguageProvider.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6740,15 +6903,22 @@ 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, "Do not use any type assertions.", "0"] + [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"] ], "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"], @@ -6759,6 +6929,28 @@ 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"] @@ -6771,9 +6963,10 @@ 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, "Do not use any type assertions.", "0"], + [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, "Unexpected any. Specify a different type.", "2"] + [0, 0, 0, "Do not use any type assertions.", "2"], + [0, 0, 0, "Unexpected any. Specify a different type.", "3"] ], "public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] @@ -6799,6 +6992,9 @@ 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"] ], @@ -6806,7 +7002,8 @@ 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, "Do not use any type assertions.", "0"] + [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"] ], "public/app/plugins/panel/geomap/layers/registry.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"], @@ -6819,6 +7016,9 @@ 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"] ], @@ -6859,12 +7059,27 @@ 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/LivePanel.tsx:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], "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"] ], @@ -6898,6 +7113,9 @@ 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"] @@ -6906,10 +7124,11 @@ 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, "Unexpected any. Specify a different type.", "0"], + [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.", "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.", "3"], + [0, 0, 0, "Unexpected any. Specify a different type.", "4"] ], "public/app/plugins/panel/text/textPanelMigrationHandler.ts:5381": [ [0, 0, 0, "Unexpected any. Specify a different type.", "0"] @@ -6948,17 +7167,31 @@ 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, "Do not use any type assertions.", "0"], + [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.", "2"], [0, 0, 0, "Do not use any type assertions.", "3"], @@ -6972,10 +7205,14 @@ 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, "Unexpected any. Specify a different type.", "14"], + [0, 0, 0, "Do not use any type assertions.", "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.", "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"] ], "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 aad57fcef43..c33053087f2 100644 --- a/packages/grafana-data/package.json +++ b/packages/grafana-data/package.json @@ -15,26 +15,6 @@ }, "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 deleted file mode 100644 index c0e52d01c67..00000000000 --- a/packages/grafana-data/src/internal/index.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * 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 f155696053d..01b42612f1d 100644 --- a/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts +++ b/packages/grafana-data/src/panel/getPanelOptionsWithDefaults.test.ts @@ -11,7 +11,8 @@ import { ThresholdsMode, } from '@grafana/data'; -import { getPanelPlugin, mockStandardFieldConfigOptions } from '../../test'; +import { getPanelPlugin } from '../../test/__mocks__/pluginMocks'; +import { mockStandardFieldConfigOptions } from '../../test/helpers/fieldConfig'; import { getPanelOptionsWithDefaults, restoreCustomOverrideRules } from './getPanelOptionsWithDefaults'; diff --git a/packages/grafana-data/test/helpers/pluginMocks.ts b/packages/grafana-data/test/__mocks__/pluginMocks.ts similarity index 98% rename from packages/grafana-data/test/helpers/pluginMocks.ts rename to packages/grafana-data/test/__mocks__/pluginMocks.ts index 1fe23bb46f3..226d6eb87cb 100644 --- a/packages/grafana-data/test/helpers/pluginMocks.ts +++ b/packages/grafana-data/test/__mocks__/pluginMocks.ts @@ -1,7 +1,7 @@ import { defaultsDeep } from 'lodash'; import { ComponentType } from 'react'; -import { PanelPluginMeta, PluginMeta, PluginType, PanelPlugin, PanelProps } from '../../'; +import { PanelPluginMeta, PluginMeta, PluginType, PanelPlugin, PanelProps } from '../../src'; export const getMockPlugins = (amount: number): PluginMeta[] => { const plugins: PluginMeta[] = []; diff --git a/packages/grafana-data/test/index.ts b/packages/grafana-data/test/index.ts deleted file mode 100644 index c6f6494b213..00000000000 --- a/packages/grafana-data/test/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -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 36b9a3f6bd8..bf5bc98c0ad 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'; +import { SelectableValue } from '@grafana/data/src'; 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 34757b4d81a..b0c4368f3bb 100644 --- a/public/app/core/components/GraphNG/utils.ts +++ b/public/app/core/components/GraphNG/utils.ts @@ -1,5 +1,7 @@ -import { DataFrame, Field, FieldType, outerJoinDataFrames, TimeRange, applyNullInsertThreshold } from '@grafana/data'; -import { NULL_EXPAND, NULL_REMOVE, NULL_RETAIN, nullToUndefThreshold } from '@grafana/data/internal'; +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 { 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 d1c51c96de8..da20681e556 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/internal'; +import { actionsOverrideProcessor } from '@grafana/data/src/field/overrides/processors'; 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 8fa0a8faef1..68acea164f6 100644 --- a/public/app/core/components/TimelineChart/timeline.ts +++ b/public/app/core/components/TimelineChart/timeline.ts @@ -1,6 +1,7 @@ import uPlot, { Series } from 'uplot'; -import { GrafanaTheme2, TimeRange, colorManipulator } from '@grafana/data'; +import { GrafanaTheme2, TimeRange } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { TimelineValueAlignment, VisibilityMode } from '@grafana/schema'; import { FIXED_UNIT } from '@grafana/ui'; import { distribute, SPACE_BETWEEN } from 'app/plugins/panel/barchart/distribute'; @@ -532,5 +533,5 @@ function getFillColor(fieldConfig: { fillOpacity?: number; lineWidth?: number }, } const opacityPercent = (fieldConfig.fillOpacity ?? 100) / 100; - return colorManipulator.alpha(color, opacityPercent); + return alpha(color, opacityPercent); } diff --git a/public/app/core/components/TimelineChart/utils.ts b/public/app/core/components/TimelineChart/utils.ts index a9af674a839..bf38c4bc5c5 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/internal'; +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 { 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 ca92345ccac..5ee5b184736 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/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; 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 30d63375f6b..b244b95e012 100644 --- a/public/app/core/services/theme.ts +++ b/public/app/core/services/theme.ts @@ -1,4 +1,4 @@ -import { getThemeById } from '@grafana/data/internal'; +import { getThemeById } from '@grafana/data/src/themes/registry'; 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 011380fed79..76da92421a9 100644 --- a/public/app/core/utils/explore.test.ts +++ b/public/app/core/utils/explore.test.ts @@ -1,12 +1,5 @@ -import { - DataSourceApi, - dateTime, - ExploreUrlState, - GrafanaConfig, - locationUtil, - LogsSortOrder, - serializeStateToUrlParam, -} from '@grafana/data'; +import { DataSourceApi, dateTime, ExploreUrlState, GrafanaConfig, locationUtil, LogsSortOrder } from '@grafana/data'; +import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; 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 8816613a51b..b99a16f5ceb 100644 --- a/public/app/core/utils/richHistory.ts +++ b/public/app/core/utils/richHistory.ts @@ -1,13 +1,7 @@ import { omit } from 'lodash'; -import { - DataQuery, - DataSourceApi, - dateTimeFormat, - ExploreUrlState, - urlUtil, - serializeStateToUrlParam, -} from '@grafana/data'; +import { DataQuery, DataSourceApi, dateTimeFormat, ExploreUrlState, urlUtil } from '@grafana/data'; +import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; 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 87d3b1fe591..cc0284d753d 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 fa33265f205..1ca1f8d6656 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 b7946517a41..b591ece380d 100644 --- a/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx +++ b/public/app/features/alerting/unified/GrafanaRuleQueryViewer.tsx @@ -2,7 +2,8 @@ import { css, cx } from '@emotion/css'; import { keyBy, startCase, uniqueId } from 'lodash'; import * as React from 'react'; -import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, rangeUtil, urlUtil } from '@grafana/data'; +import { DataSourceInstanceSettings, GrafanaTheme2, PanelData, urlUtil } from '@grafana/data'; +import { secondsToHms } from '@grafana/data/src/datetime/rangeutil'; import { config } from '@grafana/runtime'; import { DataSourceRef } from '@grafana/schema'; import { Preview } from '@grafana/sql/src/components/visual-query-builder/Preview'; @@ -122,7 +123,7 @@ export function QueryPreview({ if (relativeTimeRange) { headerItems.push( - {rangeUtil.secondsToHms(relativeTimeRange.from)} to now + {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 b16c50bbb44..239de85bd2d 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 b2fa4fa8297..a9d67203d14 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'; +import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; 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 4428ba2e1a9..14eea33da9d 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 215ae1d3646..1a046f8e2a3 100644 --- a/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/QueryOptions.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange, rangeUtil } from '@grafana/data'; +import { GrafanaTheme2, RelativeTimeRange, dateTime, getDefaultRelativeTimeRange } from '@grafana/data'; +import { relativeToTimeRange } from '@grafana/data/src/datetime/rangeutil'; import { Icon, InlineField, RelativeTimeRangePicker, Toggletip, clearButtonStyles, useStyles2 } from '@grafana/ui'; import { AlertQuery } from 'app/types/unified-alerting-dto'; @@ -26,7 +27,7 @@ export const QueryOptions = ({ const [showOptions, setShowOptions] = useState(false); - const timeRange = query.relativeTimeRange ? rangeUtil.relativeToTimeRange(query.relativeTimeRange) : undefined; + const timeRange = query.relativeTimeRange ? 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 17cbdcfcd6e..ab41cd3121f 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 29afb21fa2c..97cf310a478 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 ed3f96dc960..8b10c1388bf 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 d78688c1ab8..21b2548dac9 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/internal'; +import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; 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 613938eebb5..9f18e9bea2c 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/internal'; +import { fieldIndexComparer } from '@grafana/data/src/field/fieldComparers'; 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 4a7d560da38..f07a0738934 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 0a16b5ce7ee..f3d92f70662 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 686194d24c6..c136c2aa883 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/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; 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 ba08bfd7526..6aa80dcb030 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 { arrayUtils } from '@grafana/data'; +import { insertAfterImmutably, insertBeforeImmutably } from '@grafana/data/src/utils/arrayUtils'; 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 = arrayUtils.insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = insertBeforeImmutably(parentRoute.routes ?? [], newRoute, positionInParent); } // insert new policy after / below the referenceRoute if (position === 'below') { - parentRoute.routes = arrayUtils.insertAfterImmutably(parentRoute.routes ?? [], newRoute, positionInParent); + parentRoute.routes = 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 7e9eeea528a..14a52ab677f 100644 --- a/public/app/features/alerting/unified/utils/time.ts +++ b/public/app/features/alerting/unified/utils/time.ts @@ -1,4 +1,4 @@ -import { rangeUtil } from '@grafana/data'; +import { describeInterval } from '@grafana/data/src/datetime/rangeutil'; 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 } = rangeUtil.describeInterval(interval); + const { sec, count } = 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 c4126cb6aa1..c347a069369 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'; +import { AnnotationQuery, DataSourceApi, DataSourceInstanceSettings } from '@grafana/data/src'; 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 9ae5786703a..717906f0f3a 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/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; 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 7f987fed873..1d6c39dba0d 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/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; 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 2b70fa66e3a..eb926056ace 100644 --- a/public/app/features/canvas/elements/button.tsx +++ b/public/app/features/canvas/elements/button.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { useState } from 'react'; -import { GrafanaTheme2, PluginState } from '@grafana/data'; +import { GrafanaTheme2 } from '@grafana/data'; +import { PluginState } from '@grafana/data/src'; 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 50b926779a6..1dd3f298e7a 100644 --- a/public/app/features/canvas/types.ts +++ b/public/app/features/canvas/types.ts @@ -1,4 +1,4 @@ -import { LinkModel } from '@grafana/data'; +import { LinkModel } from '@grafana/data/src'; 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 be4fbbb8692..276c71f61dd 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 b49a61cd1b8..582e0855008 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 90dc4a7de07..77551f16579 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 b5c05c830b8..a8c109d261b 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 c88d60a527e..c0131b6847d 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 @@ -15,7 +15,7 @@ import { TimeRange, toDataFrame, } from '@grafana/data'; -import { getPanelPlugin } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 ee2bda935fd..fe263ee3bde 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 afc761b080b..3f54a519b70 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 55aac56789a..59a27eacaad 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 db7fb59dad7..72a046fc6e5 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/internal'; +import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; 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 74c91e3037e..3f456078a7e 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 5d95b292cb4..b6eb6872566 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 182ebac330f..d0aa2f56b9f 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 00458d505a9..ec13a7992c8 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 28effcf18b5..843f58b5640 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 ca967ce3d06..ec5b4710089 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 a9f63b34cf0..cda96b97e9c 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 546c8e95038..e74c3f21664 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 f1ed038dfb5..9d6061e3c6f 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 8c5f690518e..f3d93596d03 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 b3c7a22a257..07fdec6b6a1 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 35eaec800d1..5e7e71ee6b3 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 d149d075e02..cded7ef3abe 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 d2cbfaa14f7..ac5daf5eac4 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 8da1d2bb549..021060699b4 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 2eb805aa87e..8fdc82a5dd8 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 91351c87a85..6387aac97a8 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 7e0edec648b..07936f463b8 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelHeaderCorner.tsx @@ -1,7 +1,8 @@ import { css, cx } from '@emotion/css'; import { Component } from 'react'; -import { GrafanaTheme2, renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; +import { renderMarkdown, LinkModelSupplier, ScopedVars, IconName } from '@grafana/data'; +import { GrafanaTheme2 } 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 4b003d91c84..b62d0493c2e 100644 --- a/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx +++ b/public/app/features/dashboard/components/PanelEditor/getVisualizationOptions.tsx @@ -7,9 +7,13 @@ import { PanelPlugin, StandardEditorContext, VariableSuggestionsScope, - PanelOptionsEditorBuilder, } from '@grafana/data'; -import { NestedValueAccess, isNestedPanelOptions, PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { + NestedValueAccess, + PanelOptionsEditorBuilder, + isNestedPanelOptions, +} from '@grafana/data/src/utils/OptionsUIBuilders'; 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 ab46604bb92..b661ef017b8 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 e413a750181..4bf24218d60 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 5cf08218411..b83161aa968 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'; +import { GrafanaTheme2, TimeRange } from '@grafana/data/src'; 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 5156356f470..eb9a3d8a34f 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'; +import { TimeRange } from '@grafana/data/src'; 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 d1913aa3b9f..574e289609a 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 1df2bbeac48..3850c5e8b17 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 9a0357f0626..12d213f8501 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'; +import { BootData, DataQuery } from '@grafana/data/src'; 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 329e0d5ef08..8cbfdd8bd57 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 6ca108fc542..7a14d0a4e45 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/SharePublicDashboardUtils.test.tsx @@ -1,4 +1,5 @@ -import { DataSourceRef, DataQuery, TypedVariableModel } from '@grafana/data'; +import { TypedVariableModel } from '@grafana/data'; +import { DataSourceRef, DataQuery } from '@grafana/data/src/types/query'; 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 65a7c39b335..1fa176900eb 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/internal'; +import { sanitizeUrl } from '@grafana/data/src/text/sanitize'; 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 7beb284f28b..f36232b7b2b 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/internal'; +import { sanitize, sanitizeUrl } from '@grafana/data/src/text/sanitize'; 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 f0ed1f72c82..70a80fb2da1 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 44796c1e6f9..bab206f9792 100644 --- a/public/app/features/dashboard/state/DashboardMigrator.ts +++ b/public/app/features/dashboard/state/DashboardMigrator.ts @@ -27,7 +27,8 @@ import { ValueMapping, VariableHide, } from '@grafana/data'; -import { labelsToFieldsTransformer, mergeTransformer } from '@grafana/data/internal'; +import { labelsToFieldsTransformer } from '@grafana/data/src/transformations/transformers/labelsToFields'; +import { mergeTransformer } from '@grafana/data/src/transformations/transformers/merge'; 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 092ec0e0947..a8a7aaae420 100644 --- a/public/app/features/dashboard/state/PanelModel.test.ts +++ b/public/app/features/dashboard/state/PanelModel.test.ts @@ -11,7 +11,8 @@ import { PanelMigrationHandler, PanelTypeChangedHandler, } from '@grafana/data'; -import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; 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 0a444a7726a..a739dcedab4 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 da144cf427c..79cf1f10244 100644 --- a/public/app/features/dashboard/utils/timeRange.ts +++ b/public/app/features/dashboard/utils/timeRange.ts @@ -1,4 +1,5 @@ -import { dateMath, dateTime, isDateTime, DateTime, TimeRange } from '@grafana/data'; +import { DateTime, TimeRange } from '@grafana/data'; +import { dateMath, dateTime, isDateTime } from '@grafana/data/src'; 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 17e6b6d26b8..c34c44ce810 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/internal'; +import { GrafanaEdition } from '@grafana/data/src/types/config'; 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 297c413073d..5370c5a5789 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'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; import { buildCategories } from './buildCategories'; diff --git a/public/app/features/dimensions/context.ts b/public/app/features/dimensions/context.ts index bd0755de986..a4693ada2a9 100644 --- a/public/app/features/dimensions/context.ts +++ b/public/app/features/dimensions/context.ts @@ -1,4 +1,4 @@ -import { PanelData } from '@grafana/data'; +import { PanelData } from '@grafana/data/src'; import { ColorDimensionConfig, ResourceDimensionConfig, diff --git a/public/app/features/dimensions/scale.ts b/public/app/features/dimensions/scale.ts index 7c82df3c29d..06f3be04dee 100644 --- a/public/app/features/dimensions/scale.ts +++ b/public/app/features/dimensions/scale.ts @@ -1,4 +1,5 @@ -import { getMinMaxAndDelta, DataFrame, Field } from '@grafana/data'; +import { DataFrame, Field } from '@grafana/data'; +import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; 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 85b5906eef6..958bad54ad4 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/internal'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; 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 6919e9e3fcf..16e24d48954 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 e66a3d1bd77..ce63d19b4d0 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/internal'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; 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 ba07fdf71b2..9db3be0ebdd 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'; diff --git a/public/app/features/explore/Logs/LogsTable.test.tsx b/public/app/features/explore/Logs/LogsTable.test.tsx index a8fa211431e..6dff92ec2c5 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/internal'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; 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 c228c7aaf7b..eb833030106 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 19e10e72f4b..10308e761a7 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; import { useTheme2 } from '@grafana/ui'; import { LogsTableActiveFields } from './LogsTableActiveFields'; diff --git a/public/app/features/explore/Logs/LogsTableWrap.test.tsx b/public/app/features/explore/Logs/LogsTableWrap.test.tsx index 3fd2add101f..a862b326065 100644 --- a/public/app/features/explore/Logs/LogsTableWrap.test.tsx +++ b/public/app/features/explore/Logs/LogsTableWrap.test.tsx @@ -1,8 +1,14 @@ import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { createTheme, ExploreLogsPanelState, LogsSortOrder, standardTransformersRegistry, toUtc } from '@grafana/data'; -import { organizeFieldsTransformer } from '@grafana/data/internal'; +import { + createTheme, + ExploreLogsPanelState, + LogsSortOrder, + standardTransformersRegistry, + toUtc, +} from '@grafana/data/src'; +import { organizeFieldsTransformer } from '@grafana/data/src/transformations/transformers/organize'; 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 aadea96a5e7..55a19433b20 100644 --- a/public/app/features/explore/Logs/utils/testMocks.test.ts +++ b/public/app/features/explore/Logs/utils/testMocks.test.ts @@ -1,4 +1,4 @@ -import { DataFrame, Field, FieldType } from '@grafana/data'; +import { DataFrame, Field, FieldType } from '@grafana/data/src'; import { DataFrameType } from '../../../../../../packages/grafana-data'; diff --git a/public/app/features/explore/NoData.tsx b/public/app/features/explore/NoData.tsx index 38384793050..130f38750ef 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 4fb465818cc..4f0884ab71b 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 ab46049a540..2cb61be35c0 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 896b5dd7ba8..8f3d27dbac8 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'; +import { FieldType, FormattedValue, toDataFrame } from '@grafana/data/src'; import RawListContainer, { RawListContainerProps } from './RawListContainer'; diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.tsx index eb0717b6c43..ee8dedfd5ab 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 a396a636a2b..b5a4e5b9433 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 8d9ecb28fe2..bbc7962c918 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 d52a1be7211..28fe5009234 100644 --- a/public/app/features/explore/state/main.test.ts +++ b/public/app/features/explore/state/main.test.ts @@ -1,6 +1,7 @@ import { thunkTester } from 'test/core/thunk/thunkTester'; -import { dateTime, ExploreUrlState, serializeStateToUrlParam } from '@grafana/data'; +import { dateTime, ExploreUrlState } from '@grafana/data'; +import { serializeStateToUrlParam } from '@grafana/data/src/utils/url'; 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 6d0787c205f..a4b6eb80255 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/internal'; +import { getStreamingFrameOptions } from '@grafana/data/src/dataframe/StreamingDataFrame'; 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 dfbb093c17f..c6b92afaef5 100644 --- a/public/app/features/logs/components/InfiniteScroll.test.tsx +++ b/public/app/features/logs/components/InfiniteScroll.test.tsx @@ -2,7 +2,8 @@ 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, rangeUtil } from '@grafana/data'; +import { CoreApp, LogRowModel, dateTimeForTimeZone } from '@grafana/data'; +import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config } from '@grafana/runtime'; import { LogsSortOrder } from '@grafana/schema'; @@ -15,7 +16,7 @@ const absoluteRange = { from: 1702578600000, to: 1702578900000, }; -const defaultRange = rangeUtil.convertRawToRange({ +const defaultRange = 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 df0b3109237..36d748d2db1 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, rangeUtil } from '@grafana/data'; -// import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/internal'; +import { AbsoluteTimeRange, CoreApp, LogRowModel, TimeRange } from '@grafana/data'; +import { convertRawToRange, isRelativeTime, isRelativeTimeRange } from '@grafana/data/src/datetime/rangeutil'; import { config, reportInteraction } from '@grafana/runtime'; import { LogsSortOrder, TimeZone } from '@grafana/schema'; import { Button, Icon } from '@grafana/ui'; @@ -140,8 +140,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 && rangeUtil.isRelativeTime(range.raw.to); - const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && rangeUtil.isRelativeTime(range.raw.to); + const hideTopMessage = sortOrder === LogsSortOrder.Descending && isRelativeTime(range.raw.to); + const hideBottomMessage = sortOrder === LogsSortOrder.Ascending && isRelativeTime(range.raw.to); const loadOlderLogs = useCallback(() => { //If we are not on the last page, use next page's range @@ -344,7 +344,5 @@ 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 rangeUtil.isRelativeTimeRange(timeRange.raw) - ? rangeUtil.convertRawToRange(timeRange.raw, timeZone) - : timeRange; + return isRelativeTimeRange(timeRange.raw) ? 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 4463adde1f7..5f3229255b3 100644 --- a/public/app/features/logs/components/LogDetailsRow.test.tsx +++ b/public/app/features/logs/components/LogDetailsRow.test.tsx @@ -1,7 +1,8 @@ import { fireEvent, render, screen } from '@testing-library/react'; import { ComponentProps } from 'react'; -import { Field, CoreApp, FieldType, LinkModel } from '@grafana/data'; +import { CoreApp, FieldType, LinkModel } from '@grafana/data'; +import { Field } 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 a63e464c62f..60aef4364bd 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/internal'; +import { SIPrefix } from '@grafana/data/src/valueFormats/symbolFormatters'; 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 dabaa6d3473..8e3766ce457 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 98c0105f848..0f6dc41284d 100644 --- a/public/app/features/panel/state/actions.test.ts +++ b/public/app/features/panel/state/actions.test.ts @@ -1,5 +1,6 @@ import { standardEditorsRegistry, standardFieldConfigEditorRegistry } from '@grafana/data'; -import { getPanelPlugin, mockStandardFieldConfigOptions } from '@grafana/data/test'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; +import { mockStandardFieldConfigOptions } from '@grafana/data/test/helpers/fieldConfig'; 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 bef9ed62306..594028bcebf 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'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 12024fd0863..52a1ad9a96c 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/internal'; +import { PluginAddedLinksConfigureFunc, PluginExtensionEventHelpers } from '@grafana/data/src/types/pluginExtensions'; 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 4106544567f..cbdaf81e935 100644 --- a/public/app/features/plugins/extensions/validators.ts +++ b/public/app/features/plugins/extensions/validators.ts @@ -1,14 +1,13 @@ -import { - type PluginExtensionAddedLinkConfig, - type PluginExtension, - type PluginExtensionLink, - type PluginContextType, - type PluginExtensionAddedComponentConfig, - type PluginExtensionExposedComponentConfig, - type PluginExtensionAddedFunctionConfig, - PluginExtensionPoints, +import type { + PluginExtensionAddedLinkConfig, + PluginExtension, + PluginExtensionLink, + PluginContextType, + PluginExtensionAddedComponentConfig, + PluginExtensionExposedComponentConfig, + PluginExtensionAddedFunctionConfig, } from '@grafana/data'; -import { PluginAddedLinksConfigureFunc } from '@grafana/data/internal'; +import { PluginAddedLinksConfigureFunc, PluginExtensionPoints } from '@grafana/data/src/types/pluginExtensions'; 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 0551cd8d170..dc88d5a292c 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/unstable'), + '@grafana/data/unstable': () => import('@grafana/data/src/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 43b58f2d08e..8b7a85759be 100644 --- a/public/app/features/plugins/pluginPreloader.ts +++ b/public/app/features/plugins/pluginPreloader.ts @@ -1,8 +1,5 @@ -import type { - PluginExtensionAddedLinkConfig, - PluginExtensionExposedComponentConfig, - PluginExtensionAddedComponentConfig, -} from '@grafana/data'; +import type { PluginExtensionAddedLinkConfig, PluginExtensionExposedComponentConfig } from '@grafana/data'; +import { PluginExtensionAddedComponentConfig } from '@grafana/data/src/types/pluginExtensions'; 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 391331eb5f1..3fa447d952b 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 81e20a8b29c..bfd7af07344 100644 --- a/public/app/features/trails/DataTrailsHistory.tsx +++ b/public/app/features/trails/DataTrailsHistory.tsx @@ -1,7 +1,8 @@ import { css, cx } from '@emotion/css'; import { useMemo } from 'react'; -import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT, rangeUtil } from '@grafana/data'; +import { getTimeZoneInfo, GrafanaTheme2, InternalTimeZones, TIME_FORMAT } from '@grafana/data'; +import { convertRawToRange } from '@grafana/data/src/datetime/rangeutil'; import { config } from '@grafana/runtime'; import { SceneComponentProps, @@ -348,7 +349,7 @@ export function parseTimeTooltip(urlValues: SceneObjectUrlValues): string { return ''; } - const range = rangeUtil.convertRawToRange({ + const range = 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 8d7e5418b3a..673cb2d5348 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'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 1b2f85c51da..f896c2a5759 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/internal'; +import { FilterByValueFilter } from '@grafana/data/src/transformations/transformers/filterByValue'; 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 6c064b2ad0c..e9cf39d1497 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/internal'; +import { FilterByValueMatch, FilterByValueType } from '@grafana/data/src/transformations/transformers/filterByValue'; import { FilterByValueTransformerEditor } from './FilterByValueTransformerEditor'; diff --git a/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx b/public/app/features/transformers/FilterByValueTransformer/FilterByValueTransformerEditor.tsx index 57b42e72d32..683350d47b1 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/internal'; +} from '@grafana/data/src/transformations/transformers/filterByValue'; 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 256cd576ebe..0087b9fe22f 100644 --- a/public/app/features/transformers/calculateHeatmap/heatmap.test.ts +++ b/public/app/features/transformers/calculateHeatmap/heatmap.test.ts @@ -1,4 +1,5 @@ -import { FieldType, toDataFrame } from '@grafana/data'; +import { FieldType } from '@grafana/data'; +import { toDataFrame } from '@grafana/data/src/dataframe/processDataFrame'; 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 ed37d76651e..6a7a29ce69c 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/internal'; +import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; import { ScaleDistribution, HeatmapCellLayout, diff --git a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/BinaryOperationOptionsEditor.tsx index e0439cf7126..0dd7cc033cb 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/internal'; +} from '@grafana/data/src/transformations/transformers/calculateField'; 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 bd0e589dd88..bc39a4e2c62 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/internal'; +} from '@grafana/data/src/transformations/transformers/calculateField'; 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 5d8eb17ea1d..1194514bcf4 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/CumulativeOptionsEditor.tsx @@ -1,5 +1,9 @@ import { ReducerID, SelectableValue } from '@grafana/data'; -import { CalculateFieldMode, CalculateFieldTransformerOptions, CumulativeOptions } from '@grafana/data/internal'; +import { + CalculateFieldMode, + CalculateFieldTransformerOptions, + CumulativeOptions, +} from '@grafana/data/src/transformations/transformers/calculateField'; 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 e812dfafb0e..c660ac21317 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/internal'; +import { CalculateFieldTransformerOptions } from '@grafana/data/src/transformations/transformers/calculateField'; 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 e3e50a475ef..c48870fc36b 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/ReduceRowOptionsEditor.tsx @@ -1,5 +1,8 @@ import { ReducerID } from '@grafana/data'; -import { CalculateFieldTransformerOptions, ReduceOptions } from '@grafana/data/internal'; +import { + CalculateFieldTransformerOptions, + ReduceOptions, +} from '@grafana/data/src/transformations/transformers/calculateField'; 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 4c57fca1b9b..3b38248b705 100644 --- a/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx +++ b/public/app/features/transformers/editors/CalculateFieldTransformerEditor/UnaryOperationEditor.tsx @@ -1,5 +1,9 @@ import { unaryOperators, SelectableValue, UnaryOperationID } from '@grafana/data'; -import { UnaryOptions, CalculateFieldMode, CalculateFieldTransformerOptions } from '@grafana/data/internal'; +import { + UnaryOptions, + CalculateFieldMode, + CalculateFieldTransformerOptions, +} from '@grafana/data/src/transformations/transformers/calculateField'; 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 34fee4b264d..b025c705c12 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/internal'; +} from '@grafana/data/src/transformations/transformers/calculateField'; 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 91a0b251d74..8c548fb2f38 100644 --- a/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConcatenateTransformerEditor.tsx @@ -8,7 +8,10 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { ConcatenateFrameNameMode, ConcatenateTransformerOptions } from '@grafana/data/internal'; +import { + ConcatenateFrameNameMode, + ConcatenateTransformerOptions, +} from '@grafana/data/src/transformations/transformers/concat'; 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 e331388cb3e..c7d0f4f2f39 100644 --- a/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx +++ b/public/app/features/transformers/editors/ConvertFieldTypeTransformerEditor.tsx @@ -12,7 +12,10 @@ import { TransformerCategory, getTimeZones, } from '@grafana/data'; -import { ConvertFieldTypeOptions, ConvertFieldTypeTransformerOptions } from '@grafana/data/internal'; +import { + ConvertFieldTypeOptions, + ConvertFieldTypeTransformerOptions, +} from '@grafana/data/src/transformations/transformers/convertFieldType'; 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 ed1947a7181..09f1822302c 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/internal'; +import { ConvertFieldTypeTransformerOptions } from '@grafana/data/src/transformations/transformers/convertFieldType'; 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 f8035a86f0b..8ac19f37e7f 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/internal'; +import { FilterFieldsByNameTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByName'; 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 05b9e196b83..f67a7cb2b95 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/internal'; +import { FilterFramesByRefIdTransformerOptions } from '@grafana/data/src/transformations/transformers/filterByRefId'; 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 cf14f69a044..e208d67976e 100644 --- a/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx +++ b/public/app/features/transformers/editors/FormatStringTransformerEditor.tsx @@ -12,7 +12,10 @@ import { FieldNamePickerConfigSettings, TransformerCategory, } from '@grafana/data'; -import { FormatStringOutput, FormatStringTransformerOptions } from '@grafana/data/internal'; +import { + FormatStringOutput, + FormatStringTransformerOptions, +} from '@grafana/data/src/transformations/transformers/formatString'; 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 3f30a79d1a5..4c2a646d93f 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/internal'; +import { FormatTimeTransformerOptions } from '@grafana/data/src/transformations/transformers/formatTime'; 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 5dc4636bf59..ca4386f541f 100644 --- a/public/app/features/transformers/editors/GroupByTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupByTransformerEditor.tsx @@ -11,7 +11,11 @@ import { TransformerCategory, GrafanaTheme2, } from '@grafana/data'; -import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions } from '@grafana/data/internal'; +import { + GroupByFieldOptions, + GroupByOperationID, + GroupByTransformerOptions, +} from '@grafana/data/src/transformations/transformers/groupBy'; 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 9b874bf5c64..17170be06cc 100644 --- a/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx +++ b/public/app/features/transformers/editors/GroupToNestedTableTransformerEditor.tsx @@ -16,9 +16,11 @@ import { GroupByFieldOptions, GroupByOperationID, GroupByTransformerOptions, +} from '@grafana/data/src/transformations/transformers/groupBy'; +import { GroupToNestedTableTransformerOptions, SHOW_NESTED_HEADERS_DEFAULT, -} from '@grafana/data/internal'; +} from '@grafana/data/src/transformations/transformers/groupToNestedTable'; 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 e9fa82aec13..a257f02b0af 100644 --- a/public/app/features/transformers/editors/HistogramTransformerEditor.tsx +++ b/public/app/features/transformers/editors/HistogramTransformerEditor.tsx @@ -7,7 +7,10 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { histogramFieldInfo, HistogramTransformerInputs } from '@grafana/data/internal'; +import { + histogramFieldInfo, + HistogramTransformerInputs, +} from '@grafana/data/src/transformations/transformers/histogram'; 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 a28c8548780..cccf062d843 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/internal'; +import { JoinByFieldOptions, JoinMode } from '@grafana/data/src/transformations/transformers/joinByField'; 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 263aff71a36..e41017a51a2 100644 --- a/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/LabelsToFieldsTransformerEditor.tsx @@ -8,7 +8,10 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { LabelsToFieldsMode, LabelsToFieldsOptions } from '@grafana/data/internal'; +import { + LabelsToFieldsMode, + LabelsToFieldsOptions, +} from '@grafana/data/src/transformations/transformers/labelsToFields'; 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 fd10293e2ce..c55cb9bbfd3 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/internal'; +import { LimitTransformerOptions } from '@grafana/data/src/transformations/transformers/limit'; 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 c81f59bcf9b..cd55fbd5543 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/internal'; +import { MergeTransformerOptions } from '@grafana/data/src/transformations/transformers/merge'; 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 b253066abbf..ef640a79dad 100644 --- a/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx +++ b/public/app/features/transformers/editors/OrganizeFieldsTransformerEditor.tsx @@ -10,7 +10,8 @@ import { TransformerUIProps, TransformerCategory, } from '@grafana/data'; -import { createOrderFieldsComparer, OrganizeFieldsTransformerOptions } from '@grafana/data/internal'; +import { createOrderFieldsComparer } from '@grafana/data/src/transformations/transformers/order'; +import { OrganizeFieldsTransformerOptions } from '@grafana/data/src/transformations/transformers/organize'; import { Input, IconButton, diff --git a/public/app/features/transformers/editors/ReduceTransformerEditor.tsx b/public/app/features/transformers/editors/ReduceTransformerEditor.tsx index 3131e85be1d..fc8e10c6b7e 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/internal'; +import { ReduceTransformerMode, ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; 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 4530ad8b84a..d192c4a9ee0 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/internal'; +import { RenameByRegexTransformerOptions } from '@grafana/data/src/transformations/transformers/renameByRegex'; 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 8b3b66e64ed..606d0cdb417 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/internal'; +import { SeriesToRowsTransformerOptions } from '@grafana/data/src/transformations/transformers/seriesToRows'; import { getTransformationContent } from '../docs/getTransformationContent'; diff --git a/public/app/features/transformers/editors/SortByTransformerEditor.tsx b/public/app/features/transformers/editors/SortByTransformerEditor.tsx index 4247e1c4f66..3faa19ebf8f 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/internal'; +import { SortByField, SortByTransformerOptions } from '@grafana/data/src/transformations/transformers/sortBy'; 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 9ba613fe78c..4190d385e48 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/internal'; +import { TransposeTransformerOptions } from '@grafana/data/src/transformations/transformers/transpose'; 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 863b89163ca..a6617aecea9 100644 --- a/public/app/features/transformers/extractFields/extractFields.test.ts +++ b/public/app/features/transformers/extractFields/extractFields.test.ts @@ -5,9 +5,10 @@ import { Field, FieldType, transformDataFrame, - toDataFrame, } from '@grafana/data'; -import { mockTransformationsRegistry, SortByTransformerOptions, sortByTransformer } from '@grafana/data/internal'; +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 { 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 bc0ef8c8b82..7f0072dd4d7 100644 --- a/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts +++ b/public/app/features/transformers/lookupGazetteer/fieldLookup.test.ts @@ -1,4 +1,6 @@ -import { DataTransformerID, toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; +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 { 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 4ab8d360cbe..80c349fe762 100644 --- a/public/app/features/transformers/partitionByValues/partitionByValues.ts +++ b/public/app/features/transformers/partitionByValues/partitionByValues.ts @@ -8,7 +8,8 @@ import { DataTransformContext, FieldMatcher, } from '@grafana/data'; -import { getMatcherConfig, noopTransformer } from '@grafana/data/internal'; +import { getMatcherConfig } from '@grafana/data/src/transformations/transformers/filterByName'; +import { noopTransformer } from '@grafana/data/src/transformations/transformers/noop'; import { partition } from './partition'; diff --git a/public/app/features/transformers/spatial/optionsHelper.tsx b/public/app/features/transformers/spatial/optionsHelper.tsx index e493dfc7d0c..49f77cf7927 100644 --- a/public/app/features/transformers/spatial/optionsHelper.tsx +++ b/public/app/features/transformers/spatial/optionsHelper.tsx @@ -1,7 +1,8 @@ import { set, get as lodashGet } from 'lodash'; import { StandardEditorContext, TransformerUIProps, PanelOptionsEditorBuilder } from '@grafana/data'; -import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; 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 196a6b3680d..b36315fefe5 100644 --- a/public/app/features/transformers/spatial/spatialTransformer.test.ts +++ b/public/app/features/transformers/spatial/spatialTransformer.test.ts @@ -1,5 +1,6 @@ -import { toDataFrame, FieldMatcherID, fieldMatchers, FieldType } from '@grafana/data'; -import { DataTransformerID } from '@grafana/data/internal'; +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 { 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 2a0b42b30ff..4d3a5ca8e94 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'; +import { getMockPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 6a3abaa27cb..2acb6e96346 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'; +import { getMockPlugins } from '@grafana/data/test/__mocks__/pluginMocks'; 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 0e9c0070023..ba9939b8442 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'; +import { DataSourceRef, LoadingState } from '@grafana/data/src'; 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 7673e9bf8d5..aea1a31a10b 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'; +import { DataSourceRef } from '@grafana/data/src'; 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 3e0204fdd6e..921573b797e 100644 --- a/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts +++ b/public/app/plugins/datasource/azuremonitor/__mocks__/utils.ts @@ -1,4 +1,5 @@ -import { LoadingState, VariableType, VariableWithOptions } from '@grafana/data'; +import { VariableType, VariableWithOptions } from '@grafana/data'; +import { LoadingState } from '@grafana/data/src/types/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 bbf7c27cc5c..742b12b9d50 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 7654c6228cd..637328f022a 100644 --- a/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts +++ b/public/app/plugins/datasource/cloudwatch/query-runner/CloudWatchMetricsQueryRunner.test.ts @@ -1,6 +1,7 @@ import { of } from 'rxjs'; -import { dateTime, CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; +import { CustomVariableModel, getFrameDisplayName, VariableHide } from '@grafana/data'; +import { dateTime } from '@grafana/data/src/datetime/moment_wrapper'; 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 a543c5037d4..114bb966941 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'; +import { getPanelPlugin } from '@grafana/data/test/__mocks__/pluginMocks'; 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 103a571b8a6..5b46beee758 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/internal'; +import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; 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 71418a7904e..a0feea2669b 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'; +import { QueryEditorProps } from '@grafana/data/src'; 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 f9f0c4850a5..e234d7652ea 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'; +import { SelectableValue } from '@grafana/data/src'; 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 079bb5ba02e..acb8d949f4c 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'; +import { QueryEditorProps } from '@grafana/data/src'; 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 daedc65855e..b5b594f3445 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'; +import { GrafanaTheme2, SelectableValue } from '@grafana/data/src'; 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 e25e951c25d..4858da88623 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 b3e9860798e..51db862e4d9 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'; +import { TypedVariableModel } from '@grafana/data/src'; 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 c346946dbfc..89bd1372bcd 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'; +import { TypedVariableModel } from '@grafana/data/src'; 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 745ada1dd39..769a9a435a4 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'; +import { TypedVariableModel } from '@grafana/data/src'; 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 314b70c2d15..b343f668018 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'; +import { ScopedVars } from '@grafana/data/src'; 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 bbf7c27cc5c..742b12b9d50 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 02dbe712969..de6c050fb6c 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'; +import { DataSourceJsonData } from '@grafana/data/src'; 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 40a3c62f73d..7d3e318eea3 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -1,6 +1,7 @@ import uPlot, { Axis, AlignedData, Scale } from 'uplot'; -import { colorManipulator, DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; +import { DataFrame, dateTimeFormat, GrafanaTheme2, systemDateFormats, TimeZone } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { StackingMode, VisibilityMode, @@ -544,8 +545,7 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { }); barsColors.push({ - fill: - fillOpacity < 1 ? colors.map((c) => (c != null ? colorManipulator.alpha(c, fillOpacity) : null)) : colors, + fill: fillOpacity < 1 ? colors.map((c) => (c != null ? 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 ebd8ac300af..9b25e678f1f 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/internal'; +import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; import { AxisColorMode, AxisPlacement, diff --git a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx index 5364552267a..0ddecee36f6 100644 --- a/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx +++ b/public/app/plugins/panel/bargauge/BarGaugeLegend.tsx @@ -1,6 +1,7 @@ import { memo } from 'react'; -import { Field, cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; +import { cacheFieldDisplayNames, DataFrame, FieldType, getFieldSeriesColor } from '@grafana/data'; +import { Field } 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 5019dfe06d0..c370b953a72 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/internal'; +import { maybeSortFrame } from '@grafana/data/src/transformations/transformers/joinDataFrames'; 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 ceb17a8ce7d..aa756baa9c8 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, - ActionModel, -} from '@grafana/data'; +} from '@grafana/data/src'; +import { ActionModel } from '@grafana/data/src/types/action'; 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 869bcec4adb..96e8a21b331 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/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; 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 c63a14aabc6..acfe2f3b755 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'; +import { GrafanaTheme2 } from '@grafana/data/src'; 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 4e0164319ea..bdad1130a50 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/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; 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 8c6a2764035..5b13b982eb8 100644 --- a/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx +++ b/public/app/plugins/panel/canvas/editor/inline/InlineEditBody.tsx @@ -4,7 +4,8 @@ import { useMemo, useState } from 'react'; import { useObservable } from 'react-use'; import { DataFrame, GrafanaTheme2, PanelOptionsEditorBuilder, StandardEditorContext } from '@grafana/data'; -import { NestedValueAccess, PanelOptionsSupplier } from '@grafana/data/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; +import { NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; 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 69a0e9aa29e..59c9b40fd46 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/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; 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 48640dfddb0..221ab5f7979 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/internal'; +import { PanelOptionsSupplier } from '@grafana/data/src/panel/PanelPlugin'; 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 386466d3378..bf5fb30b15f 100644 --- a/public/app/plugins/panel/canvas/utils.ts +++ b/public/app/plugins/panel/canvas/utils.ts @@ -1,6 +1,7 @@ import { isNumber, isString } from 'lodash'; -import { DataFrame, Field, AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; +import { AppEvents, getFieldDisplayName, PluginState, SelectableValue } from '@grafana/data'; +import { DataFrame, Field } 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 1e06330c88d..f9629ce7053 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/internal'; +import { convertFieldType } from '@grafana/data/src/transformations/transformers/convertFieldType'; 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 34eda649940..2d6cdabfc5d 100644 --- a/public/app/plugins/panel/geomap/components/MarkersLegend.tsx +++ b/public/app/plugins/panel/geomap/components/MarkersLegend.tsx @@ -4,13 +4,8 @@ import { useMemo } from 'react'; import { useObservable } from 'react-use'; import { of } from 'rxjs'; -import { - getMinMaxAndDelta, - DataFrame, - formattedValueToString, - getFieldColorModeForField, - GrafanaTheme2, -} from '@grafana/data'; +import { DataFrame, formattedValueToString, getFieldColorModeForField, GrafanaTheme2 } from '@grafana/data'; +import { getMinMaxAndDelta } from '@grafana/data/src/field/scale'; 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 064e6189cf7..e0676fab740 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/internal'; +import { NestedPanelOptions, NestedValueAccess } from '@grafana/data/src/utils/OptionsUIBuilders'; 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 366b687c5aa..43e9500ad0c 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: colorManipulator.alpha(crosshairColor, 1), + color: alpha(crosshairColor, 1), width: 1, }), - fill: new Fill({ color: colorManipulator.alpha(crosshairColor, 0.4) }), + fill: new Fill({ color: 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 cc0558c4e44..569bbdf7c7b 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/internal'; +import { compareValues } from '@grafana/data/src/transformations/matchers/compareValues'; 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 547ef6e498b..74fc3d6a8ba 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'; +import { DataFrame, DataHoverClearEvent } from '@grafana/data/src'; 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 44bb31c0876..6587dda7ee2 100644 --- a/public/app/plugins/panel/geomap/utils/utils.ts +++ b/public/app/plugins/panel/geomap/utils/utils.ts @@ -1,7 +1,8 @@ import { Map as OpenLayersMap } from 'ol'; import { defaults as interactionDefaults } from 'ol/interaction'; -import { DataFrame, GrafanaTheme2, SelectableValue } from '@grafana/data'; +import { SelectableValue } from '@grafana/data'; +import { DataFrame, GrafanaTheme2 } from '@grafana/data/src'; 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 0b97dd6efbd..21afccf65d3 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/internal'; +import { applyNullInsertThreshold } from '@grafana/data/src/transformations/transformers/nulls/nullInsertThreshold'; 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 3225018263a..024d3105a51 100644 --- a/public/app/plugins/panel/histogram/Histogram.tsx +++ b/public/app/plugins/panel/histogram/Histogram.tsx @@ -9,9 +9,11 @@ import { getFieldSeriesColor, GrafanaTheme2, roundDecimals, +} from '@grafana/data'; +import { histogramBucketSizes, histogramFrameBucketMaxFieldName, -} from '@grafana/data'; +} from '@grafana/data/src/transformations/transformers/histogram'; 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 6ec723bd766..082b0be63c4 100644 --- a/public/app/plugins/panel/histogram/HistogramPanel.tsx +++ b/public/app/plugins/panel/histogram/HistogramPanel.tsx @@ -1,14 +1,7 @@ import { useMemo } from 'react'; -import { - histogramFieldsToFrame, - joinHistograms, - DataFrameType, - PanelProps, - buildHistogram, - cacheFieldDisplayNames, - getHistogramFields, -} from '@grafana/data'; +import { DataFrameType, PanelProps, buildHistogram, cacheFieldDisplayNames, getHistogramFields } from '@grafana/data'; +import { histogramFieldsToFrame, joinHistograms } from '@grafana/data/src/transformations/transformers/histogram'; 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 2584b008737..cf95bbc463d 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 25e1f33c4bd..51d041050bf 100644 --- a/public/app/plugins/panel/histogram/utils.ts +++ b/public/app/plugins/panel/histogram/utils.ts @@ -1,9 +1,8 @@ +import { DataFrame, FieldType } from '@grafana/data'; import { isHistogramFrameBucketMinFieldName, isHistogramFrameBucketMaxFieldName, - DataFrame, - FieldType, -} from '@grafana/data'; +} from '@grafana/data/src/transformations/transformers/histogram'; 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 be0b279952a..a335e830aca 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'; @@ -574,7 +574,7 @@ export async function requestMoreLogs( return []; } - const range: TimeRange = rangeUtil.convertRawToRange({ + const range: TimeRange = 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 2c9bf841394..a73f0b8334e 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'; +import { FieldType } from '@grafana/data/src'; import { Node } from './Node'; diff --git a/public/app/plugins/panel/stat/StatPanel.tsx b/public/app/plugins/panel/stat/StatPanel.tsx index 6d1c35cc63a..2411ab49943 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/internal'; +import { findNumericFieldMinMax } from '@grafana/data/src/field/fieldOverrides'; 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 d077a54a959..cd683b7129c 100644 --- a/public/app/plugins/panel/status-history/utils.ts +++ b/public/app/plugins/panel/status-history/utils.ts @@ -1,4 +1,5 @@ -import { DataFrame, ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; +import { ActionModel, Field, InterpolateFunction, LinkModel } from '@grafana/data'; +import { DataFrame } 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 aa4c635682c..734376e18be 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/internal'; +import { ReduceTransformerOptions } from '@grafana/data/src/transformations/transformers/reduce'; import { Options } from './panelcfg.gen'; diff --git a/public/app/plugins/panel/timeseries/utils.ts b/public/app/plugins/panel/timeseries/utils.ts index 8b974ac38fa..02fc7ea3b34 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/internal'; +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 { 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 ff54529bbe4..f043c113b1f 100644 --- a/public/app/plugins/panel/trend/TrendPanel.tsx +++ b/public/app/plugins/panel/trend/TrendPanel.tsx @@ -1,14 +1,7 @@ import { useMemo } from 'react'; -import { - isLikelyAscendingVector, - DataFrame, - FieldMatcherID, - fieldMatchers, - FieldType, - PanelProps, - TimeRange, -} from '@grafana/data'; +import { DataFrame, FieldMatcherID, fieldMatchers, FieldType, PanelProps, TimeRange } from '@grafana/data'; +import { isLikelyAscendingVector } from '@grafana/data/src/transformations/transformers/joinDataFrames'; 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 e3e667730c2..31d4784a7aa 100644 --- a/public/app/plugins/panel/xychart/XYChartPanel.tsx +++ b/public/app/plugins/panel/xychart/XYChartPanel.tsx @@ -1,7 +1,8 @@ import { css } from '@emotion/css'; import { useMemo } from 'react'; -import { colorManipulator, FALLBACK_COLOR, PanelProps } from '@grafana/data'; +import { FALLBACK_COLOR, PanelProps } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { config } from '@grafana/runtime'; import { TooltipDisplayMode, @@ -71,7 +72,7 @@ export const XYChartPanel2 = (props: Props2) => { items.push({ yAxis: 1, // TODO: pull from y field label: s.name.value, - color: colorManipulator.alpha(s.color.fixed ?? FALLBACK_COLOR, 1), + color: 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 f72a67b7b5e..f9b0d588d31 100644 --- a/public/app/plugins/panel/xychart/XYChartTooltip.tsx +++ b/public/app/plugins/panel/xychart/XYChartTooltip.tsx @@ -1,6 +1,7 @@ import { ReactNode } from 'react'; -import { colorManipulator, DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; +import { DataFrame, InterpolateFunction, LinkModel } from '@grafana/data'; +import { alpha } from '@grafana/data/src/themes/colorManipulator'; import { VizTooltipContent, VizTooltipFooter, @@ -66,7 +67,7 @@ export const XYChartTooltip = ({ const headerItem: VizTooltipItem = { label, value: '', - color: colorManipulator.alpha(seriesColor ?? '#fff', 0.5), + color: 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 d7bb53a3838..b2d9156ffbb 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 = colorManipulator.alpha((series.fill as any)(), pointAlpha); - u.ctx.strokeStyle = colorManipulator.alpha((series.stroke as any)(), 1); + u.ctx.fillStyle = alpha((series.fill as any)(), pointAlpha); + u.ctx.strokeStyle = 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 : colorManipulator.alpha(c as string, pointAlpha); - u.ctx.strokeStyle = colorManipulator.alpha(c as string, 1); + u.ctx.fillStyle = paletteHasAlpha ? c : alpha(c as string, pointAlpha); + u.ctx.strokeStyle = 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: colorManipulator.alpha(lineColor ?? '#ffff', 1), - fillColor: colorManipulator.alpha(pointColor ?? '#ffff', 0.5), + lineColor: alpha(lineColor ?? '#ffff', 1), + fillColor: 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 4425666fe0b..47884a7540b 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/internal'; +import { decoupleHideFromState } from '@grafana/data/src/field/fieldState'; 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 ee0318cb7a7..7e4701f040e 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,