|
|
@@ -9,22 +9,10 @@ export interface LayoutNode {
|
|
9
|
9
|
children: LayoutNode[];
|
|
10
|
10
|
}
|
|
11
|
11
|
|
|
12
|
|
-interface IdProvider {
|
|
13
|
|
- generate: (str: string) => string;
|
|
14
|
|
-}
|
|
15
|
|
-
|
|
16
|
|
-interface Store {
|
|
17
|
|
- setPropsForComponentId: (str: string, props: object) => void;
|
|
18
|
|
- getOriginalComponentClassForName: (str: string) => any;
|
|
19
|
|
-}
|
|
20
|
|
-
|
|
21
|
12
|
export class LayoutTreeCrawler {
|
|
22
|
|
- private uniqueIdProvider: IdProvider;
|
|
23
|
|
- private store: Store;
|
|
24
|
|
-
|
|
25
|
|
- constructor(uniqueIdProvider: IdProvider, store: Store) {
|
|
26
|
|
- this.uniqueIdProvider = uniqueIdProvider;
|
|
27
|
|
- this.store = store;
|
|
|
13
|
+ constructor(
|
|
|
14
|
+ private readonly uniqueIdProvider: any,
|
|
|
15
|
+ private readonly store: any) {
|
|
28
|
16
|
this.crawl = this.crawl.bind(this);
|
|
29
|
17
|
}
|
|
30
|
18
|
|