-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-case-flyout-z-index
- Loading branch information
Showing
212 changed files
with
4,932 additions
and
1,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/core/chrome/core-chrome-browser-internal/src/project_navigation/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export { ProjectNavigationService } from './project_navigation_service'; |
49 changes: 49 additions & 0 deletions
49
.../chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* 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 { InternalApplicationStart } from '@kbn/core-application-browser-internal'; | ||
import { | ||
ChromeNavLinks, | ||
ChromeProjectNavigation, | ||
SideNavComponent, | ||
} from '@kbn/core-chrome-browser'; | ||
import { BehaviorSubject } from 'rxjs'; | ||
|
||
interface StartDeps { | ||
application: InternalApplicationStart; | ||
navLinks: ChromeNavLinks; | ||
} | ||
|
||
export class ProjectNavigationService { | ||
private customProjectSideNavComponent$ = new BehaviorSubject<{ | ||
current: SideNavComponent | null; | ||
}>({ current: null }); | ||
private projectNavigation$ = new BehaviorSubject<ChromeProjectNavigation | undefined>(undefined); | ||
|
||
public start({ application, navLinks }: StartDeps) { | ||
// TODO: use application, navLink and projectNavigation$ to: | ||
// 1. validate projectNavigation$ against navLinks, | ||
// 2. filter disabled/missing links from projectNavigation | ||
// 3. keep track of currently active link / path (path will be used to highlight the link in the sidenav and display part of the breadcrumbs) | ||
|
||
return { | ||
setProjectNavigation: (projectNavigation: ChromeProjectNavigation) => { | ||
this.projectNavigation$.next(projectNavigation); | ||
}, | ||
getProjectNavigation$: () => { | ||
return this.projectNavigation$.asObservable(); | ||
}, | ||
setProjectSideNavComponent: (component: SideNavComponent | null) => { | ||
this.customProjectSideNavComponent$.next({ current: component }); | ||
}, | ||
getProjectSideNavComponent$: () => { | ||
return this.customProjectSideNavComponent$.asObservable(); | ||
}, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
*/ | ||
|
||
export { ProjectHeader } from './header'; | ||
export { SideNavigation } from './side_navigation'; |
Oops, something went wrong.