-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(daffio): create packages sidebar
- Loading branch information
Showing
25 changed files
with
218 additions
and
164 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
19 changes: 0 additions & 19 deletions
19
apps/daffio/src/app/core/sidebar/containers/sidebar-viewport/sidebar-viewport-theme.scss
This file was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
apps/daffio/src/app/docs/components/doc-viewer/doc-viewer.component.html
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
3 changes: 0 additions & 3 deletions
3
apps/daffio/src/app/docs/containers/sidebar/sidebar.component.html
This file was deleted.
Oops, something went wrong.
Empty file.
70 changes: 0 additions & 70 deletions
70
apps/daffio/src/app/docs/containers/sidebar/sidebar.component.spec.ts
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
apps/daffio/src/app/docs/containers/sidebar/sidebar.component.ts
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
apps/daffio/src/app/docs/containers/sidebar/sidebar.module.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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
6 changes: 6 additions & 0 deletions
6
apps/daffio/src/app/guides/components/packages-sidebar/packages-sidebar.component.html
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,6 @@ | ||
<ng-container *ngrxLet="sidebarKind$; let sidebarKind"> | ||
<daffio-docs-packages-list-container *ngIf="sidebarKind === 'content'"></daffio-docs-packages-list-container> | ||
|
||
<daffio-docs-sidebar-content *ngIf="!sidebarKind"></daffio-docs-sidebar-content> | ||
</ng-container> | ||
|
4 changes: 4 additions & 0 deletions
4
apps/daffio/src/app/guides/components/packages-sidebar/packages-sidebar.component.scss
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,4 @@ | ||
:host { | ||
display: block; | ||
padding: 24px 0; | ||
} |
37 changes: 37 additions & 0 deletions
37
apps/daffio/src/app/guides/components/packages-sidebar/packages-sidebar.component.spec.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,37 @@ | ||
import { | ||
ComponentFixture, | ||
TestBed, | ||
waitForAsync, | ||
} from '@angular/core/testing'; | ||
|
||
import { DaffioDocsPackagesSidebarComponent } from './packages-sidebar.component'; | ||
import { DaffioDocsPackagesListContainerModule } from '../../containers/packages-list/packages-list.module'; | ||
|
||
describe('DaffioDocsPackagesSidebarComponent', () => { | ||
let component: DaffioDocsPackagesSidebarComponent; | ||
let fixture: ComponentFixture<DaffioDocsPackagesSidebarComponent>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
|
||
TestBed.configureTestingModule({ | ||
imports: [ | ||
DaffioDocsPackagesListContainerModule, | ||
], | ||
declarations: [ | ||
DaffioDocsPackagesSidebarComponent, | ||
], | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(DaffioDocsPackagesSidebarComponent); | ||
component = fixture.componentInstance; | ||
|
||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
28 changes: 28 additions & 0 deletions
28
apps/daffio/src/app/guides/components/packages-sidebar/packages-sidebar.component.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,28 @@ | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
OnInit, | ||
} from '@angular/core'; | ||
import { | ||
select, | ||
Store, | ||
} from '@ngrx/store'; | ||
import { Observable } from 'rxjs'; | ||
|
||
import { selectSidebarKind } from '../../../core/sidebar/reducers'; | ||
|
||
@Component({ | ||
selector: 'daffio-docs-packages-sidebar', | ||
templateUrl: './packages-sidebar.component.html', | ||
styleUrls: ['./packages-sidebar.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
}) | ||
export class DaffioDocsPackagesSidebarComponent implements OnInit { | ||
constructor(private store: Store) {} | ||
|
||
sidebarKind$: Observable<string | undefined>; | ||
|
||
ngOnInit() { | ||
this.sidebarKind$ = this.store.pipe(select(selectSidebarKind)); | ||
} | ||
} |
Oops, something went wrong.