diff --git a/src/platform/packages/private/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx b/src/platform/packages/private/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx index ff763b840f718..2610f75e0886f 100644 --- a/src/platform/packages/private/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx +++ b/src/platform/packages/private/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx @@ -9,13 +9,7 @@ import { firstValueFrom, Observable } from 'rxjs'; -import { - AnalyticsServiceStart, - CoreSetup, - CoreStart, - I18nStart, - NotificationsSetup, -} from '@kbn/core/public'; +import { CoreSetup, CoreStart, NotificationsSetup } from '@kbn/core/public'; import { DataPublicPluginStart, type SerializedSearchSourceFields } from '@kbn/data-plugin/public'; import { loadSharingDataHelpers, @@ -64,10 +58,7 @@ type StartServices = [ Pick< CoreStart, // required for modules that render React - | 'analytics' - | 'i18n' - | 'theme' - | 'userProfile' + | 'rendering' // used extensively in Reporting share panel action | 'application' | 'uiSettings' @@ -88,15 +79,11 @@ interface ExecutionParamsOld { searchSource: SerializedSearchSourceFields; columns: string[] | undefined; title: string; - analytics: AnalyticsServiceStart; - i18nStart: I18nStart; } interface ExecutionParams { searchModeParams: CsvSearchModeParams; title: string; - analytics: AnalyticsServiceStart; - i18nStart: I18nStart; } type GetCsvActionApi = HasType & @@ -191,7 +178,7 @@ export class ReportingCsvPanelAction implements ActionDefinition { // Deprecated and does not support ES|QL mode - const [startServices] = await firstValueFrom(this.startServices$); + const [{ rendering }] = await firstValueFrom(this.startServices$); const { searchSource, columns, title } = params; const immediateJobParams = this.apiClient.getDecoratedJobParams({ searchSource, @@ -204,7 +191,7 @@ export class ReportingCsvPanelAction implements ActionDefinition { - const [startServices] = await firstValueFrom(this.startServices$); + const [{ rendering }] = await firstValueFrom(this.startServices$); const { searchModeParams, title } = params; const { reportType, decoratedJobParams } = getSearchCsvJobParams({ apiClient: this.apiClient, @@ -262,7 +249,7 @@ export class ReportingCsvPanelAction implements ActionDefinition, diff --git a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx index 725cd290eab5b..2491476135494 100644 --- a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx +++ b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx @@ -26,7 +26,7 @@ export const reportingCsvShareProvider = ({ usesUiCapabilities, startServices$, }: ExportModalShareOpts) => { - const getShareMenuItems = ({ objectType, sharingData, toasts }: ShareContext) => { + const getShareMenuItems = ({ objectType, sharingData }: ShareContext) => { if ('search' !== objectType) { return []; } @@ -80,50 +80,55 @@ export const reportingCsvShareProvider = ({ title: sharingData.title as string, }); - return apiClient - .createReportingShareJob(reportType, decoratedJobParams) - .then(() => firstValueFrom(startServices$)) - .then(([startServices]) => { - toasts.addSuccess({ - title: intl.formatMessage( - { - id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle', - defaultMessage: 'Queued report for {objectType}', - }, - { objectType } - ), - text: toMountPoint( - - - - ), - }} - />, - startServices - ), - 'data-test-subj': 'queueReportSuccess', + return firstValueFrom(startServices$).then(([startServices]) => { + const { + notifications: { toasts }, + rendering, + } = startServices; + return apiClient + .createReportingShareJob(reportType, decoratedJobParams) + .then(() => { + toasts.addSuccess({ + title: intl.formatMessage( + { + id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle', + defaultMessage: 'Queued report for {objectType}', + }, + { objectType } + ), + text: toMountPoint( + + + + ), + }} + />, + rendering + ), + 'data-test-subj': 'queueReportSuccess', + }); + }) + .catch((error) => { + toasts.addError(error, { + title: intl.formatMessage({ + id: 'reporting.share.modalContent.notification.reportingErrorTitle', + defaultMessage: 'Unable to create report', + }), + toastMessage: ( + // eslint-disable-next-line react/no-danger + + ) as unknown as string, + }); }); - }) - .catch((error) => { - toasts.addError(error, { - title: intl.formatMessage({ - id: 'reporting.share.modalContent.notification.reportingErrorTitle', - defaultMessage: 'Unable to create report', - }), - toastMessage: ( - // eslint-disable-next-line react/no-danger - - ) as unknown as string, - }); - }); + }); }; if (licenseHasCsvReporting && capabilityHasCsvReporting) { diff --git a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx index 54ced9511d103..c2df246572867 100644 --- a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx +++ b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx @@ -56,7 +56,6 @@ export const reportingExportModalProvider = ({ onClose, shareableUrl, shareableUrlForSavedObject, - toasts, ...shareOpts }: ShareContext) => { const { enableLinks, showLinks, message } = checkLicense(license.check('reporting', 'gold')); @@ -115,47 +114,53 @@ export const reportingExportModalProvider = ({ ...getJobParams({ ...jobProviderOptions, optimizedForPrinting }, 'printablePdfV2')(), }); - return apiClient - .createReportingJob('printablePdfV2', decoratedJobParams) - .then(() => firstValueFrom(startServices$)) - .then(([startServices]) => { - toasts.addSuccess({ - title: intl.formatMessage( - { - id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle', - defaultMessage: 'Queued report for {objectType}', - }, - { objectType } - ), - text: toMountPoint( - - - - ), - }} - />, - startServices - ), - 'data-test-subj': 'queueReportSuccess', - }); - }) - .catch((error: any) => { - toasts.addError(error, { - title: intl.formatMessage({ - id: 'reporting.share.modalContent.notification.reportingErrorTitle', - defaultMessage: 'Unable to create report', - }), - toastMessage: error.body?.message, + return firstValueFrom(startServices$).then(([startServices]) => { + const { + notifications: { toasts }, + rendering, + } = startServices; + + return apiClient + .createReportingJob('printablePdfV2', decoratedJobParams) + .then(() => { + toasts.addSuccess({ + title: intl.formatMessage( + { + id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle', + defaultMessage: 'Queued report for {objectType}', + }, + { objectType } + ), + text: toMountPoint( + + + + ), + }} + />, + rendering + ), + 'data-test-subj': 'queueReportSuccess', + }); + }) + .catch((error: any) => { + toasts.addError(error, { + title: intl.formatMessage({ + id: 'reporting.share.modalContent.notification.reportingErrorTitle', + defaultMessage: 'Unable to create report', + }), + toastMessage: error.body?.message, + }); }); - }); + }); }; const generateExportUrlPDF = ({ optimizedForPrinting }: ScreenshotExportOpts) => { @@ -180,47 +185,54 @@ export const reportingExportModalProvider = ({ const decoratedJobParams = apiClient.getDecoratedJobParams({ ...getJobParams(jobProviderOptions, 'pngV2')(), }); - return apiClient - .createReportingJob('pngV2', decoratedJobParams) - .then(() => firstValueFrom(startServices$)) - .then(([startServices]) => { - toasts.addSuccess({ - title: intl.formatMessage( - { - id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle', - defaultMessage: 'Queued report for {objectType}', - }, - { objectType } - ), - text: toMountPoint( - - - - ), - }} - />, - startServices - ), - 'data-test-subj': 'queueReportSuccess', - }); - }) - .catch((error: any) => { - toasts.addError(error, { - title: intl.formatMessage({ - id: 'reporting.share.modalContent.notification.reportingErrorTitle', - defaultMessage: 'Unable to create report', - }), - toastMessage: error.body?.message, + + return firstValueFrom(startServices$).then(([startServices]) => { + const { + notifications: { toasts }, + rendering, + } = startServices; + + return apiClient + .createReportingJob('pngV2', decoratedJobParams) + .then(() => { + toasts.addSuccess({ + title: intl.formatMessage( + { + id: 'reporting.share.modalContent.successfullyQueuedReportNotificationTitle', + defaultMessage: 'Queued report for {objectType}', + }, + { objectType } + ), + text: toMountPoint( + + + + ), + }} + />, + rendering + ), + 'data-test-subj': 'queueReportSuccess', + }); + }) + .catch((error: any) => { + toasts.addError(error, { + title: intl.formatMessage({ + id: 'reporting.share.modalContent.notification.reportingErrorTitle', + defaultMessage: 'Unable to create report', + }), + toastMessage: error.body?.message, + }); }); - }); + }); }; shareActions.push({ diff --git a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx index 361a1040db2a2..9ffced1703b99 100644 --- a/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx +++ b/src/platform/packages/private/kbn-reporting/public/share/share_context_menu/reporting_panel_content/reporting_panel_content.tsx @@ -283,9 +283,12 @@ class ReportingPanelContentUi extends Component { private createReportingJob = async () => { const { startServices$, apiClient, intl } = this.props; const [coreStart] = await Rx.firstValueFrom(startServices$); - const decoratedJobParams = apiClient.getDecoratedJobParams(this.props.getJobParams()); - const { toasts } = coreStart.notifications; + const { + rendering, + notifications: { toasts }, + } = coreStart; + const decoratedJobParams = apiClient.getDecoratedJobParams(this.props.getJobParams()); this.setState({ isCreatingReportJob: true }); try { @@ -313,7 +316,7 @@ class ReportingPanelContentUi extends Component { ), }} />, - coreStart + rendering ), 'data-test-subj': 'queueReportSuccess', }); diff --git a/src/platform/plugins/shared/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx b/src/platform/plugins/shared/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx index d78e36b5cfb5a..b8c871126f8cc 100644 --- a/src/platform/plugins/shared/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx +++ b/src/platform/plugins/shared/dashboard/public/dashboard_app/top_nav/share/show_share_modal.tsx @@ -24,7 +24,7 @@ import { DashboardLocatorParams } from '../../../../common'; import { convertPanelSectionMapsToPanelsArray } from '../../../../common/lib/dashboard_panel_converters'; import { SharedDashboardState } from '../../../../common/types'; import { getDashboardBackupService } from '../../../services/dashboard_backup_service'; -import { coreServices, dataService, shareService } from '../../../services/kibana_services'; +import { dataService, shareService } from '../../../services/kibana_services'; import { getDashboardCapabilities } from '../../../utils/get_dashboard_capabilities'; import { DASHBOARD_STATE_STORAGE_KEY } from '../../../utils/urls'; import { shareModalStrings } from '../../_dashboard_app_strings'; @@ -229,7 +229,6 @@ export function ShowShareModal({ }, ], snapshotShareWarning: hasPanelChanges ? shareModalStrings.getSnapshotShareWarning() : undefined, - toasts: coreServices.notifications.toasts, shareableUrlLocatorParams: { locator: shareService.url.locators.get( DASHBOARD_APP_LOCATOR diff --git a/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx b/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx index 68830bb5619dc..d2fb8e9e2dd2e 100644 --- a/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx +++ b/src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx @@ -54,7 +54,7 @@ export const getShareAppMenuItem = ({ isEsqlMode ); - const { locator, notifications } = services; + const { locator } = services; const appState = stateContainer.appState.getState(); const { timefilter } = services.data.query.timefilter; const timeRange = timefilter.getTime(); @@ -138,7 +138,6 @@ export const getShareAppMenuItem = ({ onClose: () => { anchorElement?.focus(); }, - toasts: notifications.toasts, }); }, }, diff --git a/src/platform/plugins/shared/share/public/components/context/index.tsx b/src/platform/plugins/shared/share/public/components/context/index.tsx index 0f18a46c8e399..9d79581050495 100644 --- a/src/platform/plugins/shared/share/public/components/context/index.tsx +++ b/src/platform/plugins/shared/share/public/components/context/index.tsx @@ -7,8 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { ThemeServiceSetup } from '@kbn/core-theme-browser'; -import { I18nStart } from '@kbn/core/public'; import React, { type PropsWithChildren, createContext, useContext } from 'react'; import { AnonymousAccessServiceContract } from '../../../common'; @@ -29,8 +27,6 @@ export interface IShareContext extends ShareContext { anonymousAccess?: AnonymousAccessServiceContract; urlService: BrowserUrlService; snapshotShareWarning?: string; - theme: ThemeServiceSetup; - i18n: I18nStart; publicAPIEnabled?: boolean; anchorElement?: HTMLElement; } diff --git a/src/platform/plugins/shared/share/public/components/share_tabs.test.tsx b/src/platform/plugins/shared/share/public/components/share_tabs.test.tsx index a2f3e51687fe0..d0f30174e5e64 100644 --- a/src/platform/plugins/shared/share/public/components/share_tabs.test.tsx +++ b/src/platform/plugins/shared/share/public/components/share_tabs.test.tsx @@ -20,9 +20,6 @@ import { BrowserShortUrlClientFactoryCreateParams, BrowserShortUrlClientFactory, } from '../url_service/short_urls/short_url_client_factory'; -import { themeServiceMock } from '@kbn/core-theme-browser-mocks'; -import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks'; -import { toastsServiceMock } from '@kbn/core-notifications-browser-mocks/src/toasts_service.mock'; const navigate = jest.fn(async () => {}); const getUrl = jest.fn( async (location: KibanaLocation, params: LocatorGetUrlParams): Promise => { @@ -55,14 +52,11 @@ const mockShareContext: IShareContext = { allowShortUrl: true, anonymousAccess: { getCapabilities: jest.fn(), getState: jest.fn() }, urlService: service, - theme: themeServiceMock.createStartContract(), objectTypeMeta: { title: 'title' }, objectType: 'type', sharingData: { title: 'title', url: 'url' }, isDirty: false, onClose: jest.fn(), - toasts: toastsServiceMock.createStartContract(), - i18n: i18nServiceMock.createStartContract(), }; const mockGenerateExport = jest.fn(); diff --git a/src/platform/plugins/shared/share/public/services/share_menu_manager.tsx b/src/platform/plugins/shared/share/public/services/share_menu_manager.tsx index 14644d7664bfd..d6ebc11377190 100644 --- a/src/platform/plugins/shared/share/public/services/share_menu_manager.tsx +++ b/src/platform/plugins/shared/share/public/services/share_menu_manager.tsx @@ -10,10 +10,11 @@ import React from 'react'; import ReactDOM from 'react-dom'; import { toMountPoint } from '@kbn/react-kibana-mount'; -import { CoreStart, ThemeServiceStart, ToastsSetup, UserProfileService } from '@kbn/core/public'; -import { ShowShareMenuOptions } from '../types'; -import { ShareMenuRegistryStart } from './share_menu_registry'; -import { AnonymousAccessServiceContract } from '../../common/anonymous_access'; +import type { CoreStart } from '@kbn/core/public'; +import type { RenderingService } from '@kbn/core-rendering-browser'; +import type { ShowShareMenuOptions } from '../types'; +import type { ShareMenuRegistryStart } from './share_menu_registry'; +import type { AnonymousAccessServiceContract } from '../../common/anonymous_access'; import type { BrowserUrlService, ShareMenuItemV2 } from '../types'; import { ShareMenu } from '../components/share_tabs'; @@ -42,17 +43,18 @@ export class ShareMenuManager { }; const menuItems = shareRegistry.getShareMenuItems({ ...options, onClose }); const anonymousAccess = anonymousAccessServiceProvider?.(); - this.toggleShareContextMenu({ - ...options, - allowEmbed: disableEmbed ? false : options.allowEmbed, - onClose, - menuItems, - urlService, - anonymousAccess, - toasts: core.notifications.toasts, - publicAPIEnabled: !disableEmbed, - ...core, - }); + this.toggleShareContextMenu( + { + ...options, + allowEmbed: disableEmbed ? false : options.allowEmbed, + onClose, + menuItems, + urlService, + anonymousAccess, + publicAPIEnabled: !disableEmbed, + }, + core.rendering + ); }, }; } @@ -62,41 +64,38 @@ export class ShareMenuManager { this.isOpen = false; }; - private toggleShareContextMenu({ - anchorElement, - allowEmbed, - allowShortUrl, - objectId, - objectType, - objectTypeMeta, - sharingData, - menuItems, - shareableUrl, - shareableUrlLocatorParams, - embedUrlParamExtensions, - showPublicUrlSwitch, - urlService, - anonymousAccess, - snapshotShareWarning, - onClose, - disabledShareUrl, - isDirty, - toasts, - delegatedShareUrlHandler, - publicAPIEnabled, - ...startServices - }: ShowShareMenuOptions & { - anchorElement: HTMLElement; - menuItems: ShareMenuItemV2[]; - urlService: BrowserUrlService; - anonymousAccess: AnonymousAccessServiceContract | undefined; - onClose: () => void; - isDirty: boolean; - toasts: ToastsSetup; - userProfile: UserProfileService; - theme: ThemeServiceStart; - i18n: CoreStart['i18n']; - }) { + private toggleShareContextMenu( + { + anchorElement, + allowEmbed, + allowShortUrl, + objectId, + objectType, + objectTypeMeta, + sharingData, + menuItems, + shareableUrl, + shareableUrlLocatorParams, + embedUrlParamExtensions, + showPublicUrlSwitch, + urlService, + anonymousAccess, + snapshotShareWarning, + onClose, + disabledShareUrl, + isDirty, + delegatedShareUrlHandler, + publicAPIEnabled, + }: ShowShareMenuOptions & { + anchorElement: HTMLElement; + menuItems: ShareMenuItemV2[]; + urlService: BrowserUrlService; + anonymousAccess: AnonymousAccessServiceContract | undefined; + onClose: () => void; + isDirty: boolean; + }, + rendering: RenderingService + ) { if (this.isOpen) { onClose(); return; @@ -129,15 +128,13 @@ export class ShareMenuManager { disabledShareUrl, isDirty, shareMenuItems: menuItems, - toasts, onClose: () => { onClose(); unmount(); }, - ...startServices, }} />, - startServices + rendering ); const openModal = () => { diff --git a/src/platform/plugins/shared/share/public/types.ts b/src/platform/plugins/shared/share/public/types.ts index 904339219a1e2..9153e4129595c 100644 --- a/src/platform/plugins/shared/share/public/types.ts +++ b/src/platform/plugins/shared/share/public/types.ts @@ -11,7 +11,7 @@ import type { ComponentType, ReactElement, ReactNode } from 'react'; import type { InjectedIntl } from '@kbn/i18n-react'; import { EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiContextMenuPanelItemDescriptorEntry } from '@elastic/eui/src/components/context_menu/context_menu'; -import type { Capabilities, ThemeServiceSetup, ToastsSetup } from '@kbn/core/public'; +import type { Capabilities, ThemeServiceSetup } from '@kbn/core/public'; import type { UrlService, LocatorPublic } from '../common/url_service'; import type { BrowserShortUrlClientFactoryCreateParams } from './url_service/short_urls/short_url_client_factory'; import type { BrowserShortUrlClient } from './url_service/short_urls/short_url_client'; @@ -77,7 +77,6 @@ export interface ShareContext { */ showPublicUrlSwitch?: (anonymousUserCapabilities: Capabilities) => boolean; disabledShareUrl?: boolean; - toasts: ToastsSetup; } /** diff --git a/src/platform/plugins/shared/share/tsconfig.json b/src/platform/plugins/shared/share/tsconfig.json index 839a25b846a3a..5304feedd116c 100644 --- a/src/platform/plugins/shared/share/tsconfig.json +++ b/src/platform/plugins/shared/share/tsconfig.json @@ -20,13 +20,10 @@ "@kbn/shared-ux-prompt-not-found", "@kbn/react-kibana-mount", "@kbn/shared-ux-tabbed-modal", - "@kbn/core-theme-browser", "@kbn/test-jest-helpers", - "@kbn/core-theme-browser-mocks", - "@kbn/core-i18n-browser-mocks", - "@kbn/core-notifications-browser-mocks", "@kbn/core-user-profile-browser", "@kbn/datemath", + "@kbn/core-rendering-browser", ], "exclude": [ "target/**/*", diff --git a/src/platform/plugins/shared/visualizations/public/visualize_app/utils/get_top_nav_config.tsx b/src/platform/plugins/shared/visualizations/public/visualize_app/utils/get_top_nav_config.tsx index 312d558e578fa..c451d70189ccc 100644 --- a/src/platform/plugins/shared/visualizations/public/visualize_app/utils/get_top_nav_config.tsx +++ b/src/platform/plugins/shared/visualizations/public/visualize_app/utils/get_top_nav_config.tsx @@ -429,7 +429,6 @@ export const getTopNavConfig = ( }, }, isDirty: hasUnappliedChanges || hasUnsavedChanges, - toasts: toastNotifications, }); } }, diff --git a/x-pack/platform/plugins/private/reporting/public/plugin.ts b/x-pack/platform/plugins/private/reporting/public/plugin.ts index 8d5c093df4240..3514f56b49091 100644 --- a/x-pack/platform/plugins/private/reporting/public/plugin.ts +++ b/x-pack/platform/plugins/private/reporting/public/plugin.ts @@ -115,11 +115,8 @@ export class ReportingPublicPlugin return [ { application: start.application, - analytics: start.analytics, - i18n: start.i18n, - theme: start.theme, - userProfile: start.userProfile, notifications: start.notifications, + rendering: start.rendering, uiSettings: start.uiSettings, }, ...rest, diff --git a/x-pack/platform/plugins/private/reporting/public/types.ts b/x-pack/platform/plugins/private/reporting/public/types.ts index c4b9b5e931c53..986cbcdab06fa 100644 --- a/x-pack/platform/plugins/private/reporting/public/types.ts +++ b/x-pack/platform/plugins/private/reporting/public/types.ts @@ -17,10 +17,7 @@ export type StartServices = [ Pick< CoreStart, // required for modules that render React - | 'analytics' - | 'i18n' - | 'theme' - | 'userProfile' + | 'rendering' // used extensively in Reporting plugin | 'application' | 'notifications' diff --git a/x-pack/platform/plugins/shared/lens/public/app_plugin/lens_top_nav.tsx b/x-pack/platform/plugins/shared/lens/public/app_plugin/lens_top_nav.tsx index 32f6d85717dc9..6ab6ead17cff6 100644 --- a/x-pack/platform/plugins/shared/lens/public/app_plugin/lens_top_nav.tsx +++ b/x-pack/platform/plugins/shared/lens/public/app_plugin/lens_top_nav.tsx @@ -317,7 +317,6 @@ export const LensTopNavMenu = ({ dataViewFieldEditor, dataViewEditor, dataViews: dataViewsService, - notifications, } = useKibana().services; const { @@ -692,7 +691,6 @@ export const LensTopNavMenu = ({ onClose: () => { anchorElement?.focus(); }, - toasts: notifications.toasts, }); }, }, @@ -844,7 +842,6 @@ export const LensTopNavMenu = ({ uiSettings, isOnTextBasedMode, lensStore, - notifications.toasts, startServices, ]);