diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml
index 2cd543e10cf38..a3bee52c09267 100644
--- a/packages/kbn-optimizer/limits.yml
+++ b/packages/kbn-optimizer/limits.yml
@@ -25,7 +25,7 @@ pageLoadAssetSize:
core: 435325
crossClusterReplication: 65408
customIntegrations: 22034
- dashboard: 136103
+ dashboard: 82025
dashboardEnhanced: 65646
data: 454087
dataViewEditor: 28082
diff --git a/src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav_with_context.tsx b/src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav_with_context.tsx
new file mode 100644
index 0000000000000..ed2a7426697c1
--- /dev/null
+++ b/src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav_with_context.tsx
@@ -0,0 +1,27 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import React from 'react';
+import { DashboardAPIContext } from '../dashboard_app/dashboard_app';
+import { DashboardContainer } from '../dashboard_container';
+import {
+ InternalDashboardTopNav,
+ InternalDashboardTopNavProps,
+} from './internal_dashboard_top_nav';
+export interface DashboardTopNavProps extends InternalDashboardTopNavProps {
+ dashboardContainer: DashboardContainer;
+}
+
+export const DashboardTopNavWithContext = (props: DashboardTopNavProps) => (
+
+
+
+);
+
+// eslint-disable-next-line import/no-default-export
+export default DashboardTopNavWithContext;
diff --git a/src/plugins/dashboard/public/dashboard_top_nav/index.tsx b/src/plugins/dashboard/public/dashboard_top_nav/index.tsx
index 08ba13ca0e099..d0cfc496fcc3f 100644
--- a/src/plugins/dashboard/public/dashboard_top_nav/index.tsx
+++ b/src/plugins/dashboard/public/dashboard_top_nav/index.tsx
@@ -6,33 +6,24 @@
* Side Public License, v 1.
*/
import React, { Suspense } from 'react';
-import { DashboardAPIContext } from '../dashboard_app/dashboard_app';
-import { DashboardContainer } from '../dashboard_container';
import { servicesReady } from '../plugin';
-import { InternalDashboardTopNavProps } from './dashboard_top_nav';
-
-export interface DashboardTopNavProps extends InternalDashboardTopNavProps {
- dashboardContainer: DashboardContainer;
-}
+import { DashboardTopNavProps } from './dashboard_top_nav_with_context';
const LazyDashboardTopNav = React.lazy(() =>
(async () => {
- const modulePromise = import('./dashboard_top_nav');
+ const modulePromise = import('./dashboard_top_nav_with_context');
const [module] = await Promise.all([modulePromise, servicesReady]);
return {
- default: module.InternalDashboardTopNav,
+ default: module.DashboardTopNavWithContext,
};
})().then((module) => module)
);
export const DashboardTopNav = (props: DashboardTopNavProps) => {
- const { dashboardContainer, ...rest } = props;
return (
}>
-
-
-
+
);
};
diff --git a/src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav.tsx b/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx
similarity index 98%
rename from src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav.tsx
rename to src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx
index 68fa0412625f4..a6c70c29dba99 100644
--- a/src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav.tsx
+++ b/src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx
@@ -20,7 +20,7 @@ import { SerializedStyles } from '@emotion/react';
import classNames from 'classnames';
import { TopNavMenuProps } from '@kbn/navigation-plugin/public';
import { EuiHorizontalRule, EuiIcon, EuiToolTipProps } from '@elastic/eui';
-import type { ChromeProjectBreadcrumb } from '@kbn/core-chrome-browser';
+import { EuiBreadcrumbProps } from '@elastic/eui/src/components/breadcrumbs/breadcrumb';
import {
getDashboardTitle,
leaveConfirmStrings,
@@ -39,7 +39,7 @@ import './_dashboard_top_nav.scss';
import { DashboardRedirect } from '../dashboard_container/types';
export interface InternalDashboardTopNavProps {
- customLeadingBreadCrumbs?: ChromeProjectBreadcrumb[];
+ customLeadingBreadCrumbs?: EuiBreadcrumbProps[];
embedSettings?: DashboardEmbedSettings;
redirectTo: DashboardRedirect;
originatingApp?: string;
diff --git a/src/plugins/dashboard/tsconfig.json b/src/plugins/dashboard/tsconfig.json
index 37bf28a5777ba..31cc2b1aab236 100644
--- a/src/plugins/dashboard/tsconfig.json
+++ b/src/plugins/dashboard/tsconfig.json
@@ -65,8 +65,7 @@
"@kbn/shared-ux-prompt-not-found",
"@kbn/content-management-content-editor",
"@kbn/serverless",
- "@kbn/no-data-page-plugin",
- "@kbn/core-chrome-browser"
+ "@kbn/no-data-page-plugin"
],
"exclude": ["target/**/*"]
}