@vived/app 4.34.0 → 4.34.1

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,2 +1,6 @@
1
1
  import { AppObject, AppObjectRepo } from "../../../AppObject";
2
- export declare function setupHideable(appObjects: AppObjectRepo): AppObject;
2
+ export interface SetupHideableOptions {
3
+ skipSerializer?: boolean;
4
+ skipSetupTool?: boolean;
5
+ }
6
+ export declare function setupHideable(appObjects: AppObjectRepo, options?: SetupHideableOptions): AppObject;
@@ -4,27 +4,31 @@ exports.setupHideable = void 0;
4
4
  const Tools_1 = require("../../Tools");
5
5
  const Controllers_1 = require("../Controllers");
6
6
  const UCs_1 = require("../UCs");
7
- function setupHideable(appObjects) {
7
+ function setupHideable(appObjects, options) {
8
8
  const ao = appObjects.getOrCreate("Hideable");
9
9
  // UCs
10
10
  UCs_1.makeTryHideWithPickUC(ao);
11
- UCs_1.makeSerializeHideableObjects(ao);
11
+ if ((options === null || options === void 0 ? void 0 : options.skipSerializer) !== true) {
12
+ UCs_1.makeSerializeHideableObjects(ao);
13
+ }
12
14
  // Controllers
13
15
  new Controllers_1.HideMC(ao);
14
16
  new Controllers_1.HideTC(ao);
15
- // Setup Tool
16
- const toolRepo = Tools_1.ToolRepository.get(appObjects);
17
- if (!toolRepo) {
18
- appObjects.submitWarning("setupHideable", "Unable to find tool repo");
19
- return ao;
17
+ if ((options === null || options === void 0 ? void 0 : options.skipSetupTool) !== true) {
18
+ // Setup Tool
19
+ const toolRepo = Tools_1.ToolRepository.get(appObjects);
20
+ if (!toolRepo) {
21
+ appObjects.submitWarning("setupHideable", "Unable to find tool repo");
22
+ return ao;
23
+ }
24
+ toolRepo.makeToolFromData({
25
+ toolType: "HIDE",
26
+ isDefault: false,
27
+ label: "Hide",
28
+ shortcutLabel: "h",
29
+ hotkeys: [{ keyCode: "KeyH" }],
30
+ });
20
31
  }
21
- toolRepo.makeToolFromData({
22
- toolType: "HIDE",
23
- isDefault: false,
24
- label: "Hide",
25
- shortcutLabel: "h",
26
- hotkeys: [{ keyCode: "KeyH" }],
27
- });
28
32
  return ao;
29
33
  }
30
34
  exports.setupHideable = setupHideable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "4.34.0",
3
+ "version": "4.34.1",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",