1 | import { Subject, Observable, Observer } from 'rxjs';
|
2 | import { NbSidebarResponsiveState, NbSidebarState } from './sidebar.component';
|
3 | import * as i0 from "@angular/core";
|
4 | export declare const getSidebarState$: Subject<{
|
5 | tag: string;
|
6 | observer: Observer<NbSidebarState>;
|
7 | }>;
|
8 | export declare const getSidebarResponsiveState$: Subject<{
|
9 | tag: string;
|
10 | observer: Observer<NbSidebarResponsiveState>;
|
11 | }>;
|
12 | /**
|
13 | * Sidebar service.
|
14 | *
|
15 | * Root module service to control the sidebar from any part of the app.
|
16 | *
|
17 | * Allows you to change sidebar state dynamically from any part of the app:
|
18 | * @stacked-example(Sidebar State, sidebar/sidebar-toggle.component)
|
19 | */
|
20 | export declare class NbSidebarService {
|
21 | private toggle$;
|
22 | private expand$;
|
23 | private collapse$;
|
24 | private compact$;
|
25 | /**
|
26 | * Subscribe to toggle events
|
27 | *
|
28 | * @returns Observable<{ compact: boolean, tag: string }>
|
29 | */
|
30 | onToggle(): Observable<{
|
31 | compact: boolean;
|
32 | tag: string;
|
33 | }>;
|
34 | /**
|
35 | * Subscribe to expand events
|
36 | * @returns Observable<{ tag: string }>
|
37 | */
|
38 | onExpand(): Observable<{
|
39 | tag: string;
|
40 | }>;
|
41 | /**
|
42 | * Subscribe to collapse evens
|
43 | * @returns Observable<{ tag: string }>
|
44 | */
|
45 | onCollapse(): Observable<{
|
46 | tag: string;
|
47 | }>;
|
48 | /**
|
49 | * Subscribe to compact evens
|
50 | * @returns Observable<{ tag: string }>
|
51 | */
|
52 | onCompact(): Observable<{
|
53 | tag: string;
|
54 | }>;
|
55 | /**
|
56 | * Toggle a sidebar
|
57 | * @param {boolean} compact
|
58 | * @param {string} tag If you have multiple sidebars on the page, mark them with `tag` input property and pass it here
|
59 | * to specify which sidebar you want to control
|
60 | */
|
61 | toggle(compact?: boolean, tag?: string): void;
|
62 | /**
|
63 | * Expands a sidebar
|
64 | * @param {string} tag If you have multiple sidebars on the page, mark them with `tag` input property and pass it here
|
65 | * to specify which sidebar you want to control
|
66 | */
|
67 | expand(tag?: string): void;
|
68 | /**
|
69 | * Collapses a sidebar
|
70 | * @param {string} tag If you have multiple sidebars on the page, mark them with `tag` input property and pass it here
|
71 | * to specify which sidebar you want to control
|
72 | */
|
73 | collapse(tag?: string): void;
|
74 | /**
|
75 | * Makes sidebar compact
|
76 | * @param {string} tag If you have multiple sidebars on the page, mark them with `tag` input property and pass it here
|
77 | * to specify which sidebar you want to control
|
78 | */
|
79 | compact(tag?: string): void;
|
80 | /**
|
81 | * Returns sidebar state observable which emits once
|
82 | * @param {string} tag If you have multiple sidebars on the page, mark them with `tag` input property and pass it here
|
83 | * to specify which sidebar state you need
|
84 | */
|
85 | getSidebarState(tag?: string): Observable<NbSidebarState>;
|
86 | /**
|
87 | * Returns sidebar state observable which emits once
|
88 | * @param {string} tag If you have multiple sidebars on the page, mark them with `tag` input property and pass it here
|
89 | * to specify which sidebar responsive state you need
|
90 | */
|
91 | getSidebarResponsiveState(tag?: string): Observable<NbSidebarResponsiveState>;
|
92 | static ɵfac: i0.ɵɵFactoryDeclaration<NbSidebarService, never>;
|
93 | static ɵprov: i0.ɵɵInjectableDeclaration<NbSidebarService>;
|
94 | }
|