1
+ import { animate , state , style , transition , trigger } from '@angular/animations' ;
2
+ import { CdkAccordionModule } from '@angular/cdk/accordion' ;
3
+ import { BreakpointObserver } from '@angular/cdk/layout' ;
4
+ import { CommonModule } from '@angular/common' ;
5
+ import { HttpClientModule } from '@angular/common/http' ;
1
6
import {
2
7
Component ,
3
8
Input ,
@@ -8,38 +13,42 @@ import {
8
13
ViewChild ,
9
14
ViewEncapsulation
10
15
} from '@angular/core' ;
11
- import { DocumentationItems } from '../../shared/documentation-items/documentation-items ' ;
16
+ import { FormsModule } from '@angular/forms ' ;
12
17
import { MatIconModule } from '@angular/material/icon' ;
18
+ import { MatListModule } from '@angular/material/list' ;
13
19
import { MatSidenav , MatSidenavModule } from '@angular/material/sidenav' ;
20
+ import { MatDrawerToggleResult } from '@angular/material/sidenav/drawer' ;
14
21
import { ActivatedRoute , Params , RouterModule , Routes } from '@angular/router' ;
15
- import { CommonModule } from '@angular/common' ;
16
- import { ComponentHeaderModule } from '../component-page-header/component-page-header' ;
17
- import { FooterModule } from '../../shared/footer/footer' ;
18
22
import { combineLatest , Observable , Subscription } from 'rxjs' ;
19
23
import { map } from 'rxjs/operators' ;
20
- import { animate , state , style , transition , trigger } from '@angular/animations' ;
21
- import { CdkAccordionModule } from '@angular/cdk/accordion' ;
22
- import { BreakpointObserver } from '@angular/cdk/layout' ;
24
+
25
+ import { DocViewerModule } from '../../shared/doc-viewer/doc-viewer-module' ;
26
+ import {
27
+ DocumentationItems
28
+ } from '../../shared/documentation-items/documentation-items' ;
29
+ import { FooterModule } from '../../shared/footer/footer' ;
30
+ import {
31
+ NavigationFocusModule
32
+ } from '../../shared/navigation-focus/navigation-focus' ;
33
+ import {
34
+ NavigationFocusService
35
+ } from '../../shared/navigation-focus/navigation-focus.service' ;
36
+ import { StackBlitzButtonModule } from '../../shared/stack-blitz' ;
37
+ import { SvgViewerModule } from '../../shared/svg-viewer/svg-viewer' ;
23
38
import {
24
39
ComponentCategoryList ,
25
40
ComponentCategoryListModule
26
41
} from '../component-category-list/component-category-list' ;
42
+ import {
43
+ ComponentHeaderModule
44
+ } from '../component-page-header/component-page-header' ;
27
45
import {
28
46
ComponentApi ,
29
47
ComponentExamples ,
30
48
ComponentOverview ,
31
49
ComponentViewer ,
32
50
ComponentViewerModule
33
51
} from '../component-viewer/component-viewer' ;
34
- import { DocViewerModule } from '../../shared/doc-viewer/doc-viewer-module' ;
35
- import { FormsModule } from '@angular/forms' ;
36
- import { HttpClientModule } from '@angular/common/http' ;
37
- import { StackBlitzButtonModule } from '../../shared/stack-blitz' ;
38
- import { SvgViewerModule } from '../../shared/svg-viewer/svg-viewer' ;
39
- import { MatDrawerToggleResult } from '@angular/material/sidenav/drawer' ;
40
- import { MatListModule } from '@angular/material/list' ;
41
- import { NavigationFocusModule } from '../../shared/navigation-focus/navigation-focus' ;
42
- import { NavigationFocusService } from '../../shared/navigation-focus/navigation-focus.service' ;
43
52
44
53
// These constants are used by the ComponentSidenav for orchestrating the MatSidenav in a responsive
45
54
// way. This includes hiding the sidenav, defaulting it to open, changing the mode from over to
@@ -58,8 +67,8 @@ const SMALL_WIDTH_BREAKPOINT = 939;
58
67
encapsulation : ViewEncapsulation . None ,
59
68
} )
60
69
export class ComponentSidenav implements OnInit , OnDestroy {
61
- @ViewChild ( MatSidenav ) sidenav : MatSidenav ;
62
- params : Observable < Params > ;
70
+ @ViewChild ( MatSidenav ) sidenav ! : MatSidenav ;
71
+ params : Observable < Params > | undefined ;
63
72
isExtraScreenSmall : Observable < boolean > ;
64
73
isScreenSmall : Observable < boolean > ;
65
74
private subscriptions = new Subscription ( ) ;
@@ -112,8 +121,8 @@ export class ComponentSidenav implements OnInit, OnDestroy {
112
121
] ,
113
122
} )
114
123
export class ComponentNav {
115
- @Input ( ) params : Observable < Params > ;
116
- currentItemId : string ;
124
+ @Input ( ) params : Observable < Params > | undefined ;
125
+ currentItemId : string | undefined ;
117
126
118
127
constructor ( public docItems : DocumentationItems ) { }
119
128
}
0 commit comments