import { ElementRef, OnDestroy, OnInit, Renderer2 } from "@angular/core"; import { BreakpointObserver, BreakpointState } from "@angular/cdk/layout"; import { MatDrawerMode, MatDrawerToggleResult, MatSidenav, MatSidenavContainer } from "@angular/material/sidenav"; import { Subscription } from "rxjs"; import { StarkLoggingService, StarkRoutingService } from "@nationalbankbelgium/stark-core"; import { StarkAppSidebarOpenEvent, StarkAppSidebarService } from "../services"; import { AbstractStarkUiComponent } from "@nationalbankbelgium/stark-ui/src/internal-common"; import * as i0 from "@angular/core"; export type StarkAppSidebarLeftMode = "regular" | "menu" | undefined; /** * Component to display the application's sidebar * Only 2 sidebars are allowed: https://github.com/angular/material2/issues/1514 */ export declare class StarkAppSidebarComponent extends AbstractStarkUiComponent implements OnDestroy, OnInit { logger: StarkLoggingService; sidebarService: StarkAppSidebarService; routingService: StarkRoutingService; breakpointObserver: BreakpointObserver; /** * When on smaller devices (`width < 1280px`) the sidebar is automatically closed after navigating. * Can be set to `false` to prevent this behaviour. * * Default: `true` */ closeOnNavigate: boolean; /** * Reference to the MatSidenavContainer embedded in this component */ appSidenavContainer: MatSidenavContainer; /** * Reference to the left MatSidenav embedded in this component */ appSidenavLeft: MatSidenav; /** * Reference to the right MatSidenav embedded in this component */ appSidenavRight: MatSidenav; /** * Subscription to the close sidebar Observable */ closeSidebarSubscription: Subscription; /** * Boolean that indicates if the left sidebar menu is currently shifting from larger to smaller desktop * In this case, it should wait that the transition is finished before applying the smaller screen styles */ isShiftingToSmaller: boolean; /** * Media query for big screens */ mediaQueryGtLg: string; /** * Subscription to the open sidebar Observable */ openSidebarSubscription: Subscription; /** * Dynamic mode for the menu, should always show on large desktop screen */ sidenavLeftType?: "menu" | "regular"; /** * Dynamic mode for the left sidebar */ sidenavLeftMode: MatDrawerMode; /** * Either the left sidebar is opened or not */ sidenavLeftOpened: boolean; /** * Subscription to the close sidebar Observable */ toggleSidebarSubscription: Subscription; /** * Either the browser is running on iOS or not */ isiOSDevice: boolean; /** * Function to deregister the routing transition hook */ deregisterTransitionHook: Function; /** * Class constructor * @param logger - The `StarkLoggingService` instance of the application. * @param sidebarService - The `StarkAppSidebarService` instance of the application * @param routingService - The `StarkRoutingService` instance of the application. * @param breakpointObserver - Utility for checking the matching state of @media queries * @param renderer - Angular `Renderer2` wrapper for DOM manipulations. * @param elementRef - Reference to the DOM element where this component is attached to. */ constructor(logger: StarkLoggingService, sidebarService: StarkAppSidebarService, routingService: StarkRoutingService, breakpointObserver: BreakpointObserver, renderer: Renderer2, elementRef: ElementRef); /** * Component lifecycle OnInit hook */ ngOnInit(): void; /** * Component lifecycle OnDestroy hook */ ngOnDestroy(): void; /** * Close one of the sidenavs * @param sidenav - The sidebar to close * @param successHandler - Handler function to be called when the sidenav closes */ closeSidenav(sidenav: MatSidenav, successHandler: (value: MatDrawerToggleResult) => void): void; /** * Callback function to be called when the sidenav opens * @param result - MatDrawerToggleResult */ private displaySuccessCallback; /** * Callback function to be called when the sidenav failed to open * @param error - Error */ private displayErrorCallback; /** * Close sidenav handler */ onCloseSidenavs(): void; /** * Open sidenav handler * @param event - The `StarkAppSidebarOpenEvent` object */ onOpenSidenav(event: StarkAppSidebarOpenEvent): void; /** * Breakpoints change handler * @param state - The current state of a layout breakpoint. */ onObserveBreakpoints(state: BreakpointState): void; /** * Navigation handler */ onSuccessfulTransition(): void; /** * Toggle sidenav handler * @param event - The `StarkAppSidebarOpenEvent` object */ onToggleSidenav(event: StarkAppSidebarOpenEvent): void; /** * Open one of the sidenavs * @param sidenav - The sidebar to open * @param successHandler - Handler function to be called when the sidenav closes */ openSidenav(sidenav: MatSidenav, successHandler?: (value: MatDrawerToggleResult) => void): void; /** * Toggle the different classes when the sidenav is open or closed * @param isOpen - Whether the sidebar is open */ toggleClassesOnOpen(isOpen: boolean): void; /** * Set the corresponding class when the sidenav starts to open */ setClassOnOpenStart(): void; /** * Set the corresponding class when the sidenav starts to close */ setClassOnCloseStart(): void; /** * Set the component with the right settings before opening */ setComponentBehaviour(): void; /** * Callback function when the left sidenav needs to shift type * @param result - MatDrawerToggleResult */ shiftLeftSidenavCallback: (result: MatDrawerToggleResult) => void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }