@sprucelabs/heartwood-view-controllers 128.0.9 → 128.1.0
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Card, SkillViewController, StickyToolPosition, ViewController } from '../../types/heartwood.types';
|
|
1
|
+
import { AppController, Card, SkillViewController, StickyToolPosition, ViewController } from '../../types/heartwood.types';
|
|
2
2
|
import ToolBeltViewController, { OpenToolBeltOptions } from '../../viewControllers/ToolBelt.vc';
|
|
3
3
|
declare const toolBeltAssert: {
|
|
4
|
-
actionFocusesTool(svcOrToolBelt:
|
|
5
|
-
actionOpensToolBelt(svcOrToolBelt:
|
|
6
|
-
actionDoesNotOpenToolBelt(svcOrToolBelt:
|
|
7
|
-
actionClosesToolBelt(svcOrToolBelt:
|
|
8
|
-
actionDoesNotCloseToolBelt(svcOrToolBelt:
|
|
9
|
-
rendersToolBelt(svcOrToolBelt:
|
|
4
|
+
actionFocusesTool(svcOrToolBelt: Controller | ToolBeltViewController, toolId: string, action: () => Promise<any> | any): Promise<void>;
|
|
5
|
+
actionOpensToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any, options?: OpenToolBeltOptions): Promise<void>;
|
|
6
|
+
actionDoesNotOpenToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any): Promise<void>;
|
|
7
|
+
actionClosesToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any): Promise<void>;
|
|
8
|
+
actionDoesNotCloseToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any): Promise<void>;
|
|
9
|
+
rendersToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, assertHasAtLeast1Tool?: boolean): ToolBeltViewController;
|
|
10
10
|
toolBeltDoesNotRenderStickyTools(svcOrToolBelt: SkillViewController | ToolBeltViewController): void;
|
|
11
11
|
toolInstanceOf(svcOrToolBelt: SkillViewController | ToolBeltViewController, toolId: string, Class: any): ViewController<any>;
|
|
12
12
|
toolBeltDoesNotRenderTool(svc: SkillViewController | ToolBeltViewController, toolId: string): void;
|
|
@@ -15,7 +15,9 @@ declare const toolBeltAssert: {
|
|
|
15
15
|
position: StickyToolPosition;
|
|
16
16
|
Class: any;
|
|
17
17
|
}): ViewController<any>;
|
|
18
|
-
toolBeltRendersTool(svcOrToolBelt:
|
|
19
|
-
doesNotRenderToolBelt(svc:
|
|
18
|
+
toolBeltRendersTool(svcOrToolBelt: Controller | ToolBeltViewController, toolId: string): ViewController<Card>;
|
|
19
|
+
doesNotRenderToolBelt(svc: Controller): void;
|
|
20
|
+
hidesToolBelt(svc: Controller): void;
|
|
20
21
|
};
|
|
21
22
|
export default toolBeltAssert;
|
|
23
|
+
type Controller = SkillViewController | AppController;
|
|
@@ -139,5 +139,10 @@ const toolBeltAssert = {
|
|
|
139
139
|
}
|
|
140
140
|
assert.fail(`Your skill view should not be rendering a toolbelt with tools`);
|
|
141
141
|
},
|
|
142
|
+
hidesToolBelt(svc) {
|
|
143
|
+
var _a;
|
|
144
|
+
const toolBelt = (_a = svc.renderToolBelt) === null || _a === void 0 ? void 0 : _a.call(svc);
|
|
145
|
+
assert.isNull(toolBelt, `I expected renderToolbelt() to return null, but it did not.`);
|
|
146
|
+
},
|
|
142
147
|
};
|
|
143
148
|
export default toolBeltAssert;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Card, SkillViewController, StickyToolPosition, ViewController } from '../../types/heartwood.types';
|
|
1
|
+
import { AppController, Card, SkillViewController, StickyToolPosition, ViewController } from '../../types/heartwood.types';
|
|
2
2
|
import ToolBeltViewController, { OpenToolBeltOptions } from '../../viewControllers/ToolBelt.vc';
|
|
3
3
|
declare const toolBeltAssert: {
|
|
4
|
-
actionFocusesTool(svcOrToolBelt:
|
|
5
|
-
actionOpensToolBelt(svcOrToolBelt:
|
|
6
|
-
actionDoesNotOpenToolBelt(svcOrToolBelt:
|
|
7
|
-
actionClosesToolBelt(svcOrToolBelt:
|
|
8
|
-
actionDoesNotCloseToolBelt(svcOrToolBelt:
|
|
9
|
-
rendersToolBelt(svcOrToolBelt:
|
|
4
|
+
actionFocusesTool(svcOrToolBelt: Controller | ToolBeltViewController, toolId: string, action: () => Promise<any> | any): Promise<void>;
|
|
5
|
+
actionOpensToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any, options?: OpenToolBeltOptions): Promise<void>;
|
|
6
|
+
actionDoesNotOpenToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any): Promise<void>;
|
|
7
|
+
actionClosesToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any): Promise<void>;
|
|
8
|
+
actionDoesNotCloseToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, action: () => Promise<any> | any): Promise<void>;
|
|
9
|
+
rendersToolBelt(svcOrToolBelt: Controller | ToolBeltViewController, assertHasAtLeast1Tool?: boolean): ToolBeltViewController;
|
|
10
10
|
toolBeltDoesNotRenderStickyTools(svcOrToolBelt: SkillViewController | ToolBeltViewController): void;
|
|
11
11
|
toolInstanceOf(svcOrToolBelt: SkillViewController | ToolBeltViewController, toolId: string, Class: any): ViewController<any>;
|
|
12
12
|
toolBeltDoesNotRenderTool(svc: SkillViewController | ToolBeltViewController, toolId: string): void;
|
|
@@ -15,7 +15,9 @@ declare const toolBeltAssert: {
|
|
|
15
15
|
position: StickyToolPosition;
|
|
16
16
|
Class: any;
|
|
17
17
|
}): ViewController<any>;
|
|
18
|
-
toolBeltRendersTool(svcOrToolBelt:
|
|
19
|
-
doesNotRenderToolBelt(svc:
|
|
18
|
+
toolBeltRendersTool(svcOrToolBelt: Controller | ToolBeltViewController, toolId: string): ViewController<Card>;
|
|
19
|
+
doesNotRenderToolBelt(svc: Controller): void;
|
|
20
|
+
hidesToolBelt(svc: Controller): void;
|
|
20
21
|
};
|
|
21
22
|
export default toolBeltAssert;
|
|
23
|
+
type Controller = SkillViewController | AppController;
|
|
@@ -123,5 +123,9 @@ const toolBeltAssert = {
|
|
|
123
123
|
}
|
|
124
124
|
test_utils_1.assert.fail(`Your skill view should not be rendering a toolbelt with tools`);
|
|
125
125
|
},
|
|
126
|
+
hidesToolBelt(svc) {
|
|
127
|
+
const toolBelt = svc.renderToolBelt?.();
|
|
128
|
+
test_utils_1.assert.isNull(toolBelt, `I expected renderToolbelt() to return null, but it did not.`);
|
|
129
|
+
},
|
|
126
130
|
};
|
|
127
131
|
exports.default = toolBeltAssert;
|
package/package.json
CHANGED