@vived/app 4.26.0 → 4.26.2

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.
@@ -14,10 +14,8 @@ exports.isHiddenAdapter = {
14
14
  },
15
15
  unsubscribe: (id, appObjects, setVM) => {
16
16
  const pm = IsHiddenPM_1.IsHiddenPM.get(id, appObjects);
17
- if (!pm) {
18
- appObjects.submitError("isHiddenAdapter", "Unable to find PM");
19
- return;
17
+ if (pm) {
18
+ pm.removeView(setVM);
20
19
  }
21
- pm.removeView(setVM);
22
20
  },
23
21
  };
@@ -14,10 +14,8 @@ exports.labelAdapter = {
14
14
  },
15
15
  unsubscribe: (id, appObjects, setVM) => {
16
16
  const pm = LabelPM_1.LabelPM.getForID(id, appObjects);
17
- if (!pm) {
18
- appObjects.submitError("labelAdapter", "Unable to find LabelPM");
19
- return;
17
+ if (pm) {
18
+ pm.removeView(setVM);
20
19
  }
21
- pm.removeView(setVM);
22
20
  },
23
21
  };
@@ -15,10 +15,8 @@ exports.overlayColorAdapter = {
15
15
  },
16
16
  unsubscribe: (id, appObjects, setVM) => {
17
17
  const pm = OverlayColorPM_1.OverlayColorPM.getForID(id, appObjects);
18
- if (!pm) {
19
- appObjects.submitError("overlayColorAdapter", "Unable to find OverlayColorPM");
20
- return;
18
+ if (pm) {
19
+ pm.removeView(setVM);
21
20
  }
22
- pm.removeView(setVM);
23
21
  },
24
22
  };
@@ -14,10 +14,8 @@ exports.selectableStateAdapter = {
14
14
  },
15
15
  unsubscribe: (id, appObjects, setVM) => {
16
16
  const pm = SelectableStatePM_1.SelectableStatePM.get(id, appObjects);
17
- if (!pm) {
18
- appObjects.submitError("selectableStateAdapter", "Unable to find SelectableStatePM");
19
- return;
17
+ if (pm) {
18
+ pm.removeView(setVM);
20
19
  }
21
- pm.removeView(setVM);
22
20
  },
23
21
  };
@@ -0,0 +1 @@
1
+ export * from "./stylusIsInUseAdapter";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./stylusIsInUseAdapter"), exports);
@@ -0,0 +1,2 @@
1
+ import { SingletonPmAdapter } from "../../../Types";
2
+ export declare const stylusIsInUseAdapter: SingletonPmAdapter<boolean>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stylusIsInUseAdapter = void 0;
4
+ const StylusIsInUsePM_1 = require("../PMs/StylusIsInUsePM");
5
+ exports.stylusIsInUseAdapter = {
6
+ defaultVM: false,
7
+ subscribe: (appObjects, setVM) => {
8
+ const pm = StylusIsInUsePM_1.StylusIsInUsePM.get(appObjects);
9
+ if (!pm) {
10
+ appObjects.submitError("stylusIsInUseAdapter", "Unable to find StylusIsInUsePM");
11
+ return;
12
+ }
13
+ pm.addView(setVM);
14
+ },
15
+ unsubscribe: (appObjects, setVM) => {
16
+ const pm = StylusIsInUsePM_1.StylusIsInUsePM.get(appObjects);
17
+ pm === null || pm === void 0 ? void 0 : pm.removeView(setVM);
18
+ },
19
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { StylusIsInUsePM } from "../PMs/StylusIsInUsePM";
4
+ export declare class StylusIsInUsePMMock extends StylusIsInUsePM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeStylusIsInUsePMMock(appObjects: AppObjectRepo): StylusIsInUsePMMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeStylusIsInUsePMMock = exports.StylusIsInUsePMMock = void 0;
4
+ const StylusIsInUsePM_1 = require("../PMs/StylusIsInUsePM");
5
+ class StylusIsInUsePMMock extends StylusIsInUsePM_1.StylusIsInUsePM {
6
+ constructor(appObject) {
7
+ super(appObject, StylusIsInUsePM_1.StylusIsInUsePM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.StylusIsInUsePMMock = StylusIsInUsePMMock;
12
+ function makeStylusIsInUsePMMock(appObjects) {
13
+ return new StylusIsInUsePMMock(appObjects.getOrCreate("StylusIsInUsePMMock"));
14
+ }
15
+ exports.makeStylusIsInUsePMMock = makeStylusIsInUsePMMock;
@@ -1 +1,2 @@
1
1
  export * from "./MockEmulateStylusUC";
2
+ export * from "./StylusIsInUsePMMock";
@@ -11,3 +11,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./MockEmulateStylusUC"), exports);
14
+ __exportStar(require("./StylusIsInUsePMMock"), exports);
@@ -1,3 +1,4 @@
1
+ export * from "./Adapters";
1
2
  export * from "./Entity";
2
3
  export * from "./Mocks";
3
4
  export * from "./PMs";
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./Adapters"), exports);
13
14
  __exportStar(require("./Entity"), exports);
14
15
  __exportStar(require("./Mocks"), exports);
15
16
  __exportStar(require("./PMs"), exports);
@@ -14,10 +14,8 @@ exports.transform3dAdapter = {
14
14
  },
15
15
  unsubscribe: (id, appObjects, setVM) => {
16
16
  const pm = Transform3DPM_1.Transform3DPM.getForID(id, appObjects);
17
- if (!pm) {
18
- appObjects.submitError("transform3dAdapter", "Unable to find PM");
19
- return;
17
+ if (pm) {
18
+ pm.removeView(setVM);
20
19
  }
21
- pm.removeView(setVM);
22
20
  },
23
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vived/app",
3
- "version": "4.26.0",
3
+ "version": "4.26.2",
4
4
  "description": "Public package for the VIVED Learning App system",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",