diff --git a/src/core/public/chrome/chrome_service.mock.ts b/src/core/public/chrome/chrome_service.mock.ts index 4994fdb0edda..74ee7474bbf7 100644 --- a/src/core/public/chrome/chrome_service.mock.ts +++ b/src/core/public/chrome/chrome_service.mock.ts @@ -44,7 +44,6 @@ const createStartContractMock = () => { getHeaderComponent: jest.fn(), navLinks: { getNavLinks$: jest.fn(), - getLinkUpdaters$: jest.fn(), has: jest.fn(), get: jest.fn(), getAll: jest.fn(), diff --git a/src/core/public/chrome/index.ts b/src/core/public/chrome/index.ts index 6790e1678f9c..4004c2c323f9 100644 --- a/src/core/public/chrome/index.ts +++ b/src/core/public/chrome/index.ts @@ -45,12 +45,7 @@ export { ChromeHelpExtensionMenuGitHubLink, } from './ui/header/header_help_menu'; export { NavType } from './ui'; -export { - ChromeNavLink, - ChromeNavLinks, - ChromeNavLinkUpdateableFields, - LinksUpdater, -} from './nav_links'; +export { ChromeNavLink, ChromeNavLinks, ChromeNavLinkUpdateableFields } from './nav_links'; export { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem } from './recently_accessed'; export { ChromeNavControl, ChromeNavControls } from './nav_controls'; export { ChromeDocTitle } from './doc_title'; diff --git a/src/core/public/chrome/nav_links/index.ts b/src/core/public/chrome/nav_links/index.ts index f0fad9fa28c2..4be7e0be49b8 100644 --- a/src/core/public/chrome/nav_links/index.ts +++ b/src/core/public/chrome/nav_links/index.ts @@ -29,4 +29,4 @@ */ export { ChromeNavLink, ChromeNavLinkUpdateableFields } from './nav_link'; -export { ChromeNavLinks, NavLinksService, LinksUpdater } from './nav_links_service'; +export { ChromeNavLinks, NavLinksService } from './nav_links_service'; diff --git a/src/core/public/chrome/nav_links/nav_links_service.ts b/src/core/public/chrome/nav_links/nav_links_service.ts index 58adb653527b..7e6249ef28b7 100644 --- a/src/core/public/chrome/nav_links/nav_links_service.ts +++ b/src/core/public/chrome/nav_links/nav_links_service.ts @@ -53,13 +53,6 @@ export interface ChromeNavLinks { */ getNavLinks$(): Observable>>; - /** - * Get an observable for the current link updaters. Link updater is used to modify the - * nav links, for example, filter the nav links or update a specific nav link's properties. - * {@link LinksUpdater} - */ - getLinkUpdaters$(): BehaviorSubject; - /** * Get the state of a navlink at this point in time. * @param id @@ -119,7 +112,7 @@ export interface ChromeNavLinks { getForceAppSwitcherNavigation$(): Observable; } -export type LinksUpdater = (navLinks: Map) => Map; +type LinksUpdater = (navLinks: Map) => Map; export class NavLinksService { private readonly stop$ = new ReplaySubject(1); @@ -158,10 +151,6 @@ export class NavLinksService { return navLinks$.pipe(map(sortNavLinks), takeUntil(this.stop$)); }, - getLinkUpdaters$: () => { - return linkUpdaters$; - }, - get(id: string) { const link = navLinks$.value.get(id); return link && link.properties; diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 9d23545c20fe..262b5025f4ff 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -67,7 +67,6 @@ import { ChromeStart, ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem, - LinksUpdater, NavType, } from './chrome'; import { FatalErrorsSetup, FatalErrorsStart, FatalErrorInfo } from './fatal_errors'; @@ -326,7 +325,6 @@ export { ChromeRecentlyAccessed, ChromeRecentlyAccessedHistoryItem, ChromeStart, - LinksUpdater, IContextContainer, HandlerFunction, HandlerContextType, diff --git a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap index a8a2dd826836..16916b9a41ad 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_listing/__snapshots__/dashboard_listing.test.tsx.snap @@ -224,7 +224,6 @@ exports[`dashboard listing hideWriteControls 1`] = ` "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -1360,7 +1359,6 @@ exports[`dashboard listing render table listing with initial filters from URL 1` "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -2557,7 +2555,6 @@ exports[`dashboard listing renders call to action when no dashboards exist 1`] = "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -3754,7 +3751,6 @@ exports[`dashboard listing renders table rows 1`] = ` "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -4951,7 +4947,6 @@ exports[`dashboard listing renders warning when listingLimit is exceeded 1`] = ` "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], diff --git a/src/plugins/dashboard/public/application/components/dashboard_top_nav/__snapshots__/dashboard_top_nav.test.tsx.snap b/src/plugins/dashboard/public/application/components/dashboard_top_nav/__snapshots__/dashboard_top_nav.test.tsx.snap index a445a0f34a5c..5a6af05750c4 100644 --- a/src/plugins/dashboard/public/application/components/dashboard_top_nav/__snapshots__/dashboard_top_nav.test.tsx.snap +++ b/src/plugins/dashboard/public/application/components/dashboard_top_nav/__snapshots__/dashboard_top_nav.test.tsx.snap @@ -212,7 +212,6 @@ exports[`Dashboard top nav render in embed mode 1`] = ` "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -1173,7 +1172,6 @@ exports[`Dashboard top nav render in embed mode, and force hide filter bar 1`] = "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -2134,7 +2132,6 @@ exports[`Dashboard top nav render in embed mode, components can be forced show b "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -3095,7 +3092,6 @@ exports[`Dashboard top nav render in full screen mode with appended URL param bu "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -4056,7 +4052,6 @@ exports[`Dashboard top nav render in full screen mode, no componenets should be "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction], @@ -5017,7 +5012,6 @@ exports[`Dashboard top nav render with all components 1`] = ` "get": [MockFunction], "getAll": [MockFunction], "getForceAppSwitcherNavigation$": [MockFunction], - "getLinkUpdaters$": [MockFunction], "getNavLinks$": [MockFunction], "has": [MockFunction], "showOnly": [MockFunction],