1- import { Subject , Observable } from 'rxjs' ;
2- import { ComponentType } from 'react' ;
3- import { mergeAll , map , scan } from 'rxjs/operators' ;
4-
5- export interface IStop {
6- name : string ;
7- Component : ComponentType ;
8- isFullScreen ?: boolean ;
9- }
10-
11- type Stack = IStop [ ] ;
12-
13- interface IFullScreenStackProperties {
14- canalId : string ;
15- fullScreenStack : Stack ;
16- }
17-
18- interface IFullScreenStackMap {
19- [ canalId : string ] : Stack ;
20- }
1+ import { FullScreenDelegate } from './FullScreenDelegate' ;
212
223export class Navigation {
234 static getInstance ( ) {
@@ -29,31 +10,5 @@ export class Navigation {
2910 }
3011 private static instance : Navigation ;
3112
32- canalsFullScreenStackProperties$ = new Subject <
33- Observable < IFullScreenStackProperties >
34- > ( ) ;
35-
36- fullSceenStack$ : Observable <
37- Stack
38- > = this . canalsFullScreenStackProperties$ . pipe (
39- mergeAll ( ) ,
40- scan (
41- (
42- fullScreenStackMap : IFullScreenStackMap ,
43- fullScreenStackProperties : IFullScreenStackProperties
44- ) => ( {
45- ...fullScreenStackMap ,
46- [ fullScreenStackProperties . canalId ] :
47- fullScreenStackProperties . fullScreenStack
48- } ) ,
49- { }
50- ) ,
51- map ( ( fullScreenStackMap : IFullScreenStackMap ) =>
52- Object . keys ( fullScreenStackMap ) . reduce (
53- ( fullScreenStack : Stack , canalId : string ) =>
54- fullScreenStack . concat ( fullScreenStackMap [ canalId ] ) ,
55- [ ]
56- )
57- )
58- ) ;
13+ fullScreenDelegate = new FullScreenDelegate ( ) ;
5914}
0 commit comments