@@ -35,12 +35,9 @@ export type NbSidebarResponsiveState = 'mobile' | 'tablet' | 'pc';
35
35
*/
36
36
@Component ( {
37
37
selector : 'nb-sidebar-header' ,
38
- template : `
39
- <ng-content></ng-content>
40
- ` ,
38
+ template : ` <ng-content></ng-content> ` ,
41
39
} )
42
- export class NbSidebarHeaderComponent {
43
- }
40
+ export class NbSidebarHeaderComponent { }
44
41
45
42
/**
46
43
* Sidebar footer container.
@@ -50,12 +47,9 @@ export class NbSidebarHeaderComponent {
50
47
*/
51
48
@Component ( {
52
49
selector : 'nb-sidebar-footer' ,
53
- template : `
54
- <ng-content></ng-content>
55
- ` ,
50
+ template : ` <ng-content></ng-content> ` ,
56
51
} )
57
- export class NbSidebarFooterComponent {
58
- }
52
+ export class NbSidebarFooterComponent { }
59
53
60
54
/**
61
55
* Layout sidebar component.
@@ -133,8 +127,7 @@ export class NbSidebarFooterComponent {
133
127
selector : 'nb-sidebar' ,
134
128
styleUrls : [ './sidebar.component.scss' ] ,
135
129
template : `
136
- <div class="main-container"
137
- [class.main-container-fixed]="containerFixedValue">
130
+ <div class="main-container" [class.main-container-fixed]="containerFixedValue">
138
131
<ng-content select="nb-sidebar-header"></ng-content>
139
132
<div class="scrollable" (click)="onClick($event)">
140
133
<ng-content></ng-content>
@@ -145,7 +138,6 @@ export class NbSidebarFooterComponent {
145
138
changeDetection : ChangeDetectionStrategy . OnPush ,
146
139
} )
147
140
export class NbSidebarComponent implements OnInit , OnDestroy {
148
-
149
141
protected readonly responsiveValueChange$ : Subject < boolean > = new Subject < boolean > ( ) ;
150
142
protected responsiveState : NbSidebarResponsiveState = 'pc' ;
151
143
@@ -319,28 +311,32 @@ export class NbSidebarComponent implements OnInit, OnDestroy {
319
311
) { }
320
312
321
313
ngOnInit ( ) {
322
- this . sidebarService . onToggle ( )
314
+ this . sidebarService
315
+ . onToggle ( )
323
316
. pipe (
324
317
filter ( ( { tag } ) => ! this . tag || this . tag === tag ) ,
325
318
takeUntil ( this . destroy$ ) ,
326
319
)
327
320
. subscribe ( ( { compact } ) => this . toggle ( compact ) ) ;
328
321
329
- this . sidebarService . onExpand ( )
322
+ this . sidebarService
323
+ . onExpand ( )
330
324
. pipe (
331
325
filter ( ( { tag } ) => ! this . tag || this . tag === tag ) ,
332
326
takeUntil ( this . destroy$ ) ,
333
327
)
334
328
. subscribe ( ( ) => this . expand ( ) ) ;
335
329
336
- this . sidebarService . onCollapse ( )
330
+ this . sidebarService
331
+ . onCollapse ( )
337
332
. pipe (
338
333
filter ( ( { tag } ) => ! this . tag || this . tag === tag ) ,
339
334
takeUntil ( this . destroy$ ) ,
340
335
)
341
336
. subscribe ( ( ) => this . collapse ( ) ) ;
342
337
343
- this . sidebarService . onCompact ( )
338
+ this . sidebarService
339
+ . onCompact ( )
344
340
. pipe (
345
341
filter ( ( { tag } ) => ! this . tag || this . tag === tag ) ,
346
342
takeUntil ( this . destroy$ ) ,
@@ -446,7 +442,6 @@ export class NbSidebarComponent implements OnInit, OnDestroy {
446
442
takeUntil ( this . destroy$ ) ,
447
443
)
448
444
. subscribe ( ( [ prev , current ] : [ NbMediaBreakpoint , NbMediaBreakpoint ] ) => {
449
-
450
445
const isCollapsed = this . collapsedBreakpoints . includes ( current . name ) ;
451
446
const isCompacted = this . compactedBreakpoints . includes ( current . name ) ;
452
447
@@ -495,43 +490,4 @@ export class NbSidebarComponent implements OnInit, OnDestroy {
495
490
this . cd . markForCheck ( ) ;
496
491
}
497
492
}
498
-
499
- /**
500
- * @deprecated Use `responsive` property instead
501
- * @breaking -change Remove @8.0.0
502
- */
503
- toggleResponsive ( enabled : boolean ) {
504
- this . responsive = enabled ;
505
- }
506
- /**
507
- * @deprecated Use NbSidebarState type instead
508
- * @breaking -change Remove @8.0.0
509
- */
510
- static readonly STATE_EXPANDED : string = 'expanded' ;
511
- /**
512
- * @deprecated Use NbSidebarState type instead
513
- * @breaking -change Remove @8.0.0
514
- */
515
- static readonly STATE_COLLAPSED : string = 'collapsed' ;
516
- /**
517
- * @deprecated Use NbSidebarState type instead
518
- * @breaking -change Remove @8.0.0
519
- */
520
- static readonly STATE_COMPACTED : string = 'compacted' ;
521
-
522
- /**
523
- * @deprecated Use NbSidebarResponsiveState type instead
524
- * @breaking -change Remove @8.0.0
525
- */
526
- static readonly RESPONSIVE_STATE_MOBILE : string = 'mobile' ;
527
- /**
528
- * @deprecated Use NbSidebarResponsiveState type instead
529
- * @breaking -change Remove @8.0.0
530
- */
531
- static readonly RESPONSIVE_STATE_TABLET : string = 'tablet' ;
532
- /**
533
- * @deprecated Use NbSidebarResponsiveState type instead
534
- * @breaking -change Remove @8.0.0
535
- */
536
- static readonly RESPONSIVE_STATE_PC : string = 'pc' ;
537
493
}
0 commit comments