@sprucelabs/spruce-heartwood-utils 16.4.8 → 16.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__tests__/support/MockRemoteViewControllerFactory.d.ts +4 -1
- package/build/__tests__/support/MockRemoteViewControllerFactory.js +3 -0
- package/build/esm/__tests__/support/MockRemoteViewControllerFactory.d.ts +4 -1
- package/build/esm/__tests__/support/MockRemoteViewControllerFactory.js +3 -0
- package/build/esm/skillViews/RemoteViewControllerFactory.d.ts +3 -0
- package/build/skillViews/RemoteViewControllerFactory.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewControllerMap, ControllerOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { ViewControllerMap, ControllerOptions, ViewController } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { RemoteFactoryOptions, RemoteViewControllerFactory } from '../../skillViews/RemoteViewControllerFactory';
|
|
3
3
|
export default class MockRemoteViewControllerFactory implements RemoteViewControllerFactory {
|
|
4
4
|
private static instance?;
|
|
@@ -6,6 +6,9 @@ export default class MockRemoteViewControllerFactory implements RemoteViewContro
|
|
|
6
6
|
private remoteControllerOptions?;
|
|
7
7
|
private views;
|
|
8
8
|
constructor(options: RemoteFactoryOptions);
|
|
9
|
+
fetchRemoteController(_name: string): Promise<(new () => ViewController<any>) & {
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
9
12
|
Controller<N extends keyof ViewControllerMap, O extends ControllerOptions<N>>(_name: N, _options: O): ViewControllerMap[N];
|
|
10
13
|
static reset(): void;
|
|
11
14
|
static getInstance(): MockRemoteViewControllerFactory;
|
|
@@ -7,6 +7,9 @@ class MockRemoteViewControllerFactory {
|
|
|
7
7
|
MockRemoteViewControllerFactory.instance = this;
|
|
8
8
|
this.views = options.vcFactory;
|
|
9
9
|
}
|
|
10
|
+
fetchRemoteController(_name) {
|
|
11
|
+
throw new Error('Method not implemented.');
|
|
12
|
+
}
|
|
10
13
|
Controller(_name, _options) {
|
|
11
14
|
return {};
|
|
12
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewControllerMap, ControllerOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
1
|
+
import { ViewControllerMap, ControllerOptions, ViewController } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { RemoteFactoryOptions, RemoteViewControllerFactory } from '../../skillViews/RemoteViewControllerFactory';
|
|
3
3
|
export default class MockRemoteViewControllerFactory implements RemoteViewControllerFactory {
|
|
4
4
|
private static instance?;
|
|
@@ -6,6 +6,9 @@ export default class MockRemoteViewControllerFactory implements RemoteViewContro
|
|
|
6
6
|
private remoteControllerOptions?;
|
|
7
7
|
private views;
|
|
8
8
|
constructor(options: RemoteFactoryOptions);
|
|
9
|
+
fetchRemoteController(_name: string): Promise<(new () => ViewController<any>) & {
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
9
12
|
Controller<N extends keyof ViewControllerMap, O extends ControllerOptions<N>>(_name: N, _options: O): ViewControllerMap[N];
|
|
10
13
|
static reset(): void;
|
|
11
14
|
static getInstance(): MockRemoteViewControllerFactory;
|
|
@@ -14,6 +14,9 @@ export default class MockRemoteViewControllerFactory {
|
|
|
14
14
|
MockRemoteViewControllerFactory.instance = this;
|
|
15
15
|
this.views = options.vcFactory;
|
|
16
16
|
}
|
|
17
|
+
fetchRemoteController(_name) {
|
|
18
|
+
throw new Error('Method not implemented.');
|
|
19
|
+
}
|
|
17
20
|
Controller(_name, _options) {
|
|
18
21
|
return {};
|
|
19
22
|
}
|
|
@@ -33,5 +33,8 @@ declare type Factory = Pick<ViewControllerFactory, 'hasController' | 'Controller
|
|
|
33
33
|
export interface RemoteViewControllerFactory extends Factory {
|
|
34
34
|
RemoteController: (name: string, options: Record<string, any>) => Promise<ViewController<Record<string, any>>>;
|
|
35
35
|
getTheme: (namespace?: string) => Theme | undefined;
|
|
36
|
+
fetchRemoteController: (name: string) => Promise<(new () => ViewController<any>) & {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
36
39
|
}
|
|
37
40
|
export {};
|
|
@@ -33,5 +33,8 @@ declare type Factory = Pick<ViewControllerFactory, 'hasController' | 'Controller
|
|
|
33
33
|
export interface RemoteViewControllerFactory extends Factory {
|
|
34
34
|
RemoteController: (name: string, options: Record<string, any>) => Promise<ViewController<Record<string, any>>>;
|
|
35
35
|
getTheme: (namespace?: string) => Theme | undefined;
|
|
36
|
+
fetchRemoteController: (name: string) => Promise<(new () => ViewController<any>) & {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
36
39
|
}
|
|
37
40
|
export {};
|