@vived/app 4.22.0 → 4.23.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.
Files changed (92) hide show
  1. package/lib/Components/App/Adapters/index.d.ts +4 -0
  2. package/lib/Components/{KeyboardInput/Mocks → App/Adapters}/index.js +4 -1
  3. package/lib/Components/App/Adapters/isAuthoringAdapter.d.ts +2 -0
  4. package/lib/Components/App/Adapters/isAuthoringAdapter.js +23 -0
  5. package/lib/Components/App/Adapters/isReviewingAdapter.d.ts +2 -0
  6. package/lib/Components/App/Adapters/isReviewingAdapter.js +23 -0
  7. package/lib/Components/App/Adapters/slideNavigationAdapter.d.ts +3 -0
  8. package/lib/Components/App/Adapters/slideNavigationAdapter.js +23 -0
  9. package/lib/Components/App/Adapters/slideTextAdapter.d.ts +2 -0
  10. package/lib/Components/App/Adapters/slideTextAdapter.js +23 -0
  11. package/lib/Components/App/Entity/BaseAppState.d.ts +2 -0
  12. package/lib/Components/App/Entity/BaseAppState.js +7 -0
  13. package/lib/Components/App/Mocks/IsAuthoringMock.d.ts +8 -0
  14. package/lib/Components/App/Mocks/IsAuthoringMock.js +15 -0
  15. package/lib/Components/App/Mocks/IsReviewingMock.d.ts +8 -0
  16. package/lib/Components/App/Mocks/IsReviewingMock.js +15 -0
  17. package/lib/Components/App/Mocks/SlideNavigationMock.d.ts +8 -0
  18. package/lib/Components/App/Mocks/SlideNavigationMock.js +15 -0
  19. package/lib/Components/App/Mocks/SlideTextMock.d.ts +8 -0
  20. package/lib/Components/App/Mocks/SlideTextMock.js +15 -0
  21. package/lib/Components/App/Mocks/index.d.ts +4 -0
  22. package/lib/Components/App/Mocks/index.js +4 -0
  23. package/lib/Components/App/PM/IsAuthoringPM.d.ts +2 -6
  24. package/lib/Components/App/PM/IsAuthoringPM.js +16 -10
  25. package/lib/Components/App/PM/IsReviewingPM.d.ts +2 -6
  26. package/lib/Components/App/PM/IsReviewingPM.js +16 -10
  27. package/lib/Components/App/PM/SlideNavigationPM.d.ts +12 -0
  28. package/lib/Components/App/PM/SlideNavigationPM.js +49 -0
  29. package/lib/Components/App/PM/SlideTextPM.d.ts +2 -5
  30. package/lib/Components/App/PM/SlideTextPM.js +17 -10
  31. package/lib/Components/App/PM/index.d.ts +1 -1
  32. package/lib/Components/App/PM/index.js +1 -1
  33. package/lib/Components/App/index.d.ts +1 -0
  34. package/lib/Components/App/index.js +1 -0
  35. package/lib/Components/RequestHandler/UC/SetAppStateUC.d.ts +9 -2
  36. package/lib/Components/RequestHandler/UC/SetAppStateUC.js +35 -27
  37. package/package.json +1 -1
  38. package/lib/Components/App/PM/HasNextPreviousStatePM.d.ts +0 -15
  39. package/lib/Components/App/PM/HasNextPreviousStatePM.js +0 -44
  40. package/lib/Components/ChannelModel/Mocks/ProcessChannelModelUCMock.d.ts +0 -8
  41. package/lib/Components/ChannelModel/Mocks/ProcessChannelModelUCMock.js +0 -15
  42. package/lib/Components/ChannelModel/UC/InitializeChannelModelFromGLB.d.ts +0 -0
  43. package/lib/Components/ChannelModel/UC/InitializeChannelModelFromGLB.js +0 -1
  44. package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.d.ts +0 -6
  45. package/lib/Components/ChannelModel/UC/ProcessChannelModelUC.js +0 -9
  46. package/lib/Components/ChannelModel/UC/SetupChannelModelUC.d.ts +0 -9
  47. package/lib/Components/ChannelModel/UC/SetupChannelModelUC.js +0 -11
  48. package/lib/Components/HoverLabel/Mocks/index.d.ts +0 -1
  49. package/lib/Components/HoverLabel/Mocks/index.js +0 -13
  50. package/lib/Components/HoverLabel/PM/HoverLabelPM.d.ts +0 -19
  51. package/lib/Components/HoverLabel/PM/HoverLabelPM.js +0 -65
  52. package/lib/Components/KeyboardInput/Mocks/index.d.ts +0 -1
  53. package/lib/Components/Landmarks/Mocks/index.d.ts +0 -1
  54. package/lib/Components/Landmarks/Mocks/index.js +0 -13
  55. package/lib/Components/MouseInput/Mocks/index.d.ts +0 -1
  56. package/lib/Components/MouseInput/Mocks/index.js +0 -13
  57. package/lib/Components/Question/Mocks/index.d.ts +0 -2
  58. package/lib/Components/Question/Mocks/index.js +0 -14
  59. package/lib/Components/RequestHandler/Mocks/index.d.ts +0 -1
  60. package/lib/Components/RequestHandler/Mocks/index.js +0 -13
  61. package/lib/Components/SceneRoot/Controllers/StylusMove.d.ts +0 -14
  62. package/lib/Components/SceneRoot/Controllers/StylusMove.js +0 -56
  63. package/lib/Components/SceneRoot/Controllers/StylusScale.d.ts +0 -14
  64. package/lib/Components/SceneRoot/Controllers/StylusScale.js +0 -58
  65. package/lib/Components/Selection/Controller/StylusHoverOnAppObject.d.ts +0 -11
  66. package/lib/Components/Selection/Controller/StylusHoverOnAppObject.js +0 -42
  67. package/lib/Components/Selection/Controller/StylusPressOnAppObject.d.ts +0 -18
  68. package/lib/Components/Selection/Controller/StylusPressOnAppObject.js +0 -77
  69. package/lib/Components/Selection/Controller/StylusSelectAppObject.d.ts +0 -11
  70. package/lib/Components/Selection/Controller/StylusSelectAppObject.js +0 -44
  71. package/lib/Components/TouchController/Mock/index.d.ts +0 -2
  72. package/lib/Components/TouchController/Mock/index.js +0 -14
  73. package/lib/Components/UndoRedo/Mocks/index.d.ts +0 -1
  74. package/lib/Components/UndoRedo/Mocks/index.js +0 -13
  75. package/lib/Components/XR/Mocks/index.d.ts +0 -2
  76. package/lib/Components/XR/Mocks/index.js +0 -14
  77. package/lib/Components/zSpace/Controllers/EmulateStylus.d.ts +0 -10
  78. package/lib/Components/zSpace/Controllers/EmulateStylus.js +0 -113
  79. package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.d.ts +0 -14
  80. package/lib/Components/zSpace/Controllers/ZSpaceScaleRoot.js +0 -57
  81. package/lib/Components/zSpace/Controllers/index.d.ts +0 -1
  82. package/lib/Components/zSpace/Controllers/index.js +0 -13
  83. package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.d.ts +0 -29
  84. package/lib/Components/zSpace/Entities/ZSpaceStylusEntity.js +0 -115
  85. package/lib/Components/zSpace/Mocks/index.d.ts +0 -1
  86. package/lib/Components/zSpace/Mocks/index.js +0 -13
  87. package/lib/Components/zSpace/PM/StylusColorLengthPM.d.ts +0 -13
  88. package/lib/Components/zSpace/PM/StylusColorLengthPM.js +0 -77
  89. package/lib/Components/zSpace/PM/StylusIsInUsePM.d.ts +0 -6
  90. package/lib/Components/zSpace/PM/StylusIsInUsePM.js +0 -42
  91. package/lib/Types/ChannelModelData.d.ts +0 -67
  92. package/lib/Types/ChannelModelData.js +0 -21
@@ -0,0 +1,4 @@
1
+ export * from "./isAuthoringAdapter";
2
+ export * from "./isReviewingAdapter";
3
+ export * from "./slideNavigationAdapter";
4
+ export * from "./slideTextAdapter";
@@ -10,4 +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("./MockKeyboardInput"), exports);
13
+ __exportStar(require("./isAuthoringAdapter"), exports);
14
+ __exportStar(require("./isReviewingAdapter"), exports);
15
+ __exportStar(require("./slideNavigationAdapter"), exports);
16
+ __exportStar(require("./slideTextAdapter"), exports);
@@ -0,0 +1,2 @@
1
+ import { SingletonPmAdapter } from "../../../Types";
2
+ export declare const isAuthoringAdapter: SingletonPmAdapter<boolean>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isAuthoringAdapter = void 0;
4
+ const IsAuthoringPM_1 = require("../PM/IsAuthoringPM");
5
+ exports.isAuthoringAdapter = {
6
+ defaultVM: false,
7
+ subscribe: (appObjects, setVM) => {
8
+ const pm = IsAuthoringPM_1.IsAuthoringPM.get(appObjects);
9
+ if (!pm) {
10
+ appObjects.submitError("isAuthoringAdapter", "Unable to find IsAuthoringPM");
11
+ return;
12
+ }
13
+ pm.addView(setVM);
14
+ },
15
+ unsubscribe: (appObjects, setVM) => {
16
+ const pm = IsAuthoringPM_1.IsAuthoringPM.get(appObjects);
17
+ if (!pm) {
18
+ appObjects.submitError("isAuthoringAdapter", "Unable to find IsAuthoringPM");
19
+ return;
20
+ }
21
+ pm.removeView(setVM);
22
+ },
23
+ };
@@ -0,0 +1,2 @@
1
+ import { SingletonPmAdapter } from "../../../Types";
2
+ export declare const isReviewingAdapter: SingletonPmAdapter<boolean>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isReviewingAdapter = void 0;
4
+ const IsReviewingPM_1 = require("../PM/IsReviewingPM");
5
+ exports.isReviewingAdapter = {
6
+ defaultVM: false,
7
+ subscribe: (appObjects, setVM) => {
8
+ const pm = IsReviewingPM_1.IsReviewingPM.get(appObjects);
9
+ if (!pm) {
10
+ appObjects.submitError("isReviewingAdapter", "Unable to find IsReviewingPM");
11
+ return;
12
+ }
13
+ pm.addView(setVM);
14
+ },
15
+ unsubscribe: (appObjects, setVM) => {
16
+ const pm = IsReviewingPM_1.IsReviewingPM.get(appObjects);
17
+ if (!pm) {
18
+ appObjects.submitError("isReviewingAdapter", "Unable to find IsReviewingPM");
19
+ return;
20
+ }
21
+ pm.removeView(setVM);
22
+ },
23
+ };
@@ -0,0 +1,3 @@
1
+ import { SingletonPmAdapter } from "../../../Types";
2
+ import { SlideNavigationVM } from "../PM/SlideNavigationPM";
3
+ export declare const slideNavigationAdapter: SingletonPmAdapter<SlideNavigationVM>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.slideNavigationAdapter = void 0;
4
+ const SlideNavigationPM_1 = require("../PM/SlideNavigationPM");
5
+ exports.slideNavigationAdapter = {
6
+ defaultVM: SlideNavigationPM_1.defaultSlideNavigationVM,
7
+ subscribe: (appObjects, setVM) => {
8
+ const pm = SlideNavigationPM_1.SlideNavigationPM.get(appObjects);
9
+ if (!pm) {
10
+ appObjects.submitError("slideNavigationAdapter", "Unable to find StateNavigationPM");
11
+ return;
12
+ }
13
+ pm.addView(setVM);
14
+ },
15
+ unsubscribe: (appObjects, setVM) => {
16
+ const pm = SlideNavigationPM_1.SlideNavigationPM.get(appObjects);
17
+ if (!pm) {
18
+ appObjects.submitError("slideNavigationAdapter", "Unable to find StateNavigationPM");
19
+ return;
20
+ }
21
+ pm.removeView(setVM);
22
+ },
23
+ };
@@ -0,0 +1,2 @@
1
+ import { SingletonPmAdapter } from "../../../Types";
2
+ export declare const slideTextAdapter: SingletonPmAdapter<string>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.slideTextAdapter = void 0;
4
+ const SlideTextPM_1 = require("../PM/SlideTextPM");
5
+ exports.slideTextAdapter = {
6
+ defaultVM: "",
7
+ subscribe: (appObjects, setVM) => {
8
+ const pm = SlideTextPM_1.SlideTextPM.get(appObjects);
9
+ if (!pm) {
10
+ appObjects.submitError("slideTextAdapter", "Unable to find SlideTextPM");
11
+ return;
12
+ }
13
+ pm.addView(setVM);
14
+ },
15
+ unsubscribe: (appObjects, setVM) => {
16
+ const pm = SlideTextPM_1.SlideTextPM.get(appObjects);
17
+ if (!pm) {
18
+ appObjects.submitError("slideTextAdapter", "Unable to find SlideTextPM");
19
+ return;
20
+ }
21
+ pm.removeView(setVM);
22
+ },
23
+ };
@@ -11,6 +11,8 @@ export declare abstract class BaseAppState extends AppObjectEntity {
11
11
  abstract get hasNextState(): boolean;
12
12
  abstract set hasPreviousState(state: boolean);
13
13
  abstract get hasPreviousState(): boolean;
14
+ abstract set hideSlideNavigation(state: boolean);
15
+ abstract get hideSlideNavigation(): boolean;
14
16
  static get: (appObjects: AppObjectRepo) => BaseAppState | undefined;
15
17
  }
16
18
  export declare function makeBaseAppState(appObject: AppObject): BaseAppState;
@@ -20,6 +20,7 @@ class AppStateImp extends BaseAppState {
20
20
  this.memoizedSlideText = new Entities_1.MemoizedString("", this.notifyOnChange);
21
21
  this.memoizedHasNextState = new Entities_1.MemoizedBoolean(false, this.notifyOnChange);
22
22
  this.memoizedHasPreviousState = new Entities_1.MemoizedBoolean(false, this.notifyOnChange);
23
+ this.memoizedHideSlideNavigation = new Entities_1.MemoizedBoolean(false, this.notifyOnChange);
23
24
  }
24
25
  get isAuthoring() {
25
26
  return this.memoizedIsAuthoring.val;
@@ -51,4 +52,10 @@ class AppStateImp extends BaseAppState {
51
52
  get hasPreviousState() {
52
53
  return this.memoizedHasPreviousState.val;
53
54
  }
55
+ set hideSlideNavigation(state) {
56
+ this.memoizedHideSlideNavigation.val = state;
57
+ }
58
+ get hideSlideNavigation() {
59
+ return this.memoizedHideSlideNavigation.val;
60
+ }
54
61
  }
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { IsAuthoringPM } from "../PM/IsAuthoringPM";
4
+ export declare class IsAuthoringMock extends IsAuthoringPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeIsAuthoringMock(appObjects: AppObjectRepo): IsAuthoringMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeIsAuthoringMock = exports.IsAuthoringMock = void 0;
4
+ const IsAuthoringPM_1 = require("../PM/IsAuthoringPM");
5
+ class IsAuthoringMock extends IsAuthoringPM_1.IsAuthoringPM {
6
+ constructor(appObject) {
7
+ super(appObject, IsAuthoringPM_1.IsAuthoringPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.IsAuthoringMock = IsAuthoringMock;
12
+ function makeIsAuthoringMock(appObjects) {
13
+ return new IsAuthoringMock(appObjects.getOrCreate("IsAuthoringMock"));
14
+ }
15
+ exports.makeIsAuthoringMock = makeIsAuthoringMock;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { IsReviewingPM } from "../PM/IsReviewingPM";
4
+ export declare class IsReviewingMock extends IsReviewingPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeIsReviewingMock(appObjects: AppObjectRepo): IsReviewingMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeIsReviewingMock = exports.IsReviewingMock = void 0;
4
+ const IsReviewingPM_1 = require("../PM/IsReviewingPM");
5
+ class IsReviewingMock extends IsReviewingPM_1.IsReviewingPM {
6
+ constructor(appObject) {
7
+ super(appObject, IsReviewingPM_1.IsReviewingPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.IsReviewingMock = IsReviewingMock;
12
+ function makeIsReviewingMock(appObjects) {
13
+ return new IsReviewingMock(appObjects.getOrCreate("IsReviewingMock"));
14
+ }
15
+ exports.makeIsReviewingMock = makeIsReviewingMock;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { SlideNavigationPM } from "../PM/SlideNavigationPM";
4
+ export declare class SlideNavigationMock extends SlideNavigationPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeSlideNavigationMock(appObjects: AppObjectRepo): SlideNavigationMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSlideNavigationMock = exports.SlideNavigationMock = void 0;
4
+ const SlideNavigationPM_1 = require("../PM/SlideNavigationPM");
5
+ class SlideNavigationMock extends SlideNavigationPM_1.SlideNavigationPM {
6
+ constructor(appObject) {
7
+ super(appObject, SlideNavigationPM_1.SlideNavigationPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.SlideNavigationMock = SlideNavigationMock;
12
+ function makeSlideNavigationMock(appObjects) {
13
+ return new SlideNavigationMock(appObjects.getOrCreate("SlideNavigationMock"));
14
+ }
15
+ exports.makeSlideNavigationMock = makeSlideNavigationMock;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { SlideTextPM } from "../PM/SlideTextPM";
4
+ export declare class SlideTextMock extends SlideTextPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeSlideTextMock(appObjects: AppObjectRepo): SlideTextMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSlideTextMock = exports.SlideTextMock = void 0;
4
+ const SlideTextPM_1 = require("../PM/SlideTextPM");
5
+ class SlideTextMock extends SlideTextPM_1.SlideTextPM {
6
+ constructor(appObject) {
7
+ super(appObject, SlideTextPM_1.SlideTextPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.SlideTextMock = SlideTextMock;
12
+ function makeSlideTextMock(appObjects) {
13
+ return new SlideTextMock(appObjects.getOrCreate("SlideTextMock"));
14
+ }
15
+ exports.makeSlideTextMock = makeSlideTextMock;
@@ -1,2 +1,6 @@
1
+ export * from "./IsAuthoringMock";
2
+ export * from "./IsReviewingMock";
1
3
  export * from "./MockAppRenderingUC";
2
4
  export * from "./MockRenderCanvasUC";
5
+ export * from "./SlideNavigationMock";
6
+ export * from "./SlideTextMock";
@@ -10,5 +10,9 @@ 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("./IsAuthoringMock"), exports);
14
+ __exportStar(require("./IsReviewingMock"), exports);
13
15
  __exportStar(require("./MockAppRenderingUC"), exports);
14
16
  __exportStar(require("./MockRenderCanvasUC"), exports);
17
+ __exportStar(require("./SlideNavigationMock"), exports);
18
+ __exportStar(require("./SlideTextMock"), exports);
@@ -1,10 +1,6 @@
1
1
  import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
- export declare class IsAuthoringPM extends AppObjectPM<boolean> {
2
+ export declare abstract class IsAuthoringPM extends AppObjectPM<boolean> {
3
3
  static readonly type = "IsAuthoringPM";
4
4
  static get: (appObjects: AppObjectRepo) => IsAuthoringPM | undefined;
5
- private baseAppState?;
6
- vmsAreEqual(a: boolean, b: boolean): boolean;
7
- onAppStateChange: () => void;
8
- dispose(): void;
9
- constructor(appObject: AppObject);
10
5
  }
6
+ export declare function makeIsAuthoringPM(appObject: AppObject): IsAuthoringPM;
@@ -1,23 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IsAuthoringPM = void 0;
3
+ exports.makeIsAuthoringPM = exports.IsAuthoringPM = void 0;
4
4
  const AppObject_1 = require("../../../AppObject");
5
5
  const Entity_1 = require("../Entity");
6
6
  class IsAuthoringPM extends AppObject_1.AppObjectPM {
7
+ }
8
+ exports.IsAuthoringPM = IsAuthoringPM;
9
+ IsAuthoringPM.type = "IsAuthoringPM";
10
+ IsAuthoringPM.get = (appObjects) => AppObject_1.getSingletonComponent(IsAuthoringPM.type, appObjects);
11
+ function makeIsAuthoringPM(appObject) {
12
+ return new IsAuthoringPMImp(appObject);
13
+ }
14
+ exports.makeIsAuthoringPM = makeIsAuthoringPM;
15
+ class IsAuthoringPMImp extends IsAuthoringPM {
7
16
  constructor(appObject) {
17
+ var _a;
8
18
  super(appObject, IsAuthoringPM.type);
9
19
  this.onAppStateChange = () => {
10
20
  if (!this.baseAppState)
11
21
  return;
12
22
  this.doUpdateView(this.baseAppState.isAuthoring);
13
23
  };
14
- this.baseAppState = appObject.getComponent(Entity_1.BaseAppState.type);
15
- if (!this.baseAppState) {
16
- this.warn("IsAuthoringPM added to an app object that does not have a BaseAppState Entity. Add one first");
17
- return;
18
- }
19
- this.baseAppState.addChangeObserver(this.onAppStateChange);
24
+ (_a = this.baseAppState) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onAppStateChange);
20
25
  this.onAppStateChange();
26
+ this.appObjects.registerSingleton(this);
27
+ }
28
+ get baseAppState() {
29
+ return this.getCachedSingleton(Entity_1.BaseAppState.type);
21
30
  }
22
31
  vmsAreEqual(a, b) {
23
32
  return a === b;
@@ -28,6 +37,3 @@ class IsAuthoringPM extends AppObject_1.AppObjectPM {
28
37
  (_a = this.baseAppState) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onAppStateChange);
29
38
  }
30
39
  }
31
- exports.IsAuthoringPM = IsAuthoringPM;
32
- IsAuthoringPM.type = "IsAuthoringPM";
33
- IsAuthoringPM.get = (appObjects) => AppObject_1.getSingletonComponent(IsAuthoringPM.type, appObjects);
@@ -1,10 +1,6 @@
1
1
  import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
- export declare class IsReviewingPM extends AppObjectPM<boolean> {
2
+ export declare abstract class IsReviewingPM extends AppObjectPM<boolean> {
3
3
  static readonly type = "IsReviewingPM";
4
4
  static get: (appObjects: AppObjectRepo) => IsReviewingPM | undefined;
5
- private baseAppState?;
6
- vmsAreEqual(a: boolean, b: boolean): boolean;
7
- onAppStateChange: () => void;
8
- dispose(): void;
9
- constructor(appObject: AppObject);
10
5
  }
6
+ export declare function makeIsReviewingPM(appObject: AppObject): IsReviewingPM;
@@ -1,23 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IsReviewingPM = void 0;
3
+ exports.makeIsReviewingPM = exports.IsReviewingPM = void 0;
4
4
  const AppObject_1 = require("../../../AppObject");
5
5
  const Entity_1 = require("../Entity");
6
6
  class IsReviewingPM extends AppObject_1.AppObjectPM {
7
+ }
8
+ exports.IsReviewingPM = IsReviewingPM;
9
+ IsReviewingPM.type = "IsReviewingPM";
10
+ IsReviewingPM.get = (appObjects) => AppObject_1.getSingletonComponent(IsReviewingPM.type, appObjects);
11
+ function makeIsReviewingPM(appObject) {
12
+ return new IsReviewingPMImp(appObject);
13
+ }
14
+ exports.makeIsReviewingPM = makeIsReviewingPM;
15
+ class IsReviewingPMImp extends IsReviewingPM {
7
16
  constructor(appObject) {
17
+ var _a;
8
18
  super(appObject, IsReviewingPM.type);
9
19
  this.onAppStateChange = () => {
10
20
  if (!this.baseAppState)
11
21
  return;
12
22
  this.doUpdateView(this.baseAppState.isReviewing);
13
23
  };
14
- this.baseAppState = appObject.getComponent(Entity_1.BaseAppState.type);
15
- if (!this.baseAppState) {
16
- this.warn("IsReviewingPM added to an app object that does not have a BaseAppState Entity. Add one first");
17
- return;
18
- }
19
- this.baseAppState.addChangeObserver(this.onAppStateChange);
24
+ (_a = this.baseAppState) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onAppStateChange);
20
25
  this.onAppStateChange();
26
+ this.appObjects.registerSingleton(this);
27
+ }
28
+ get baseAppState() {
29
+ return this.getCachedSingleton(Entity_1.BaseAppState.type);
21
30
  }
22
31
  vmsAreEqual(a, b) {
23
32
  return a === b;
@@ -28,6 +37,3 @@ class IsReviewingPM extends AppObject_1.AppObjectPM {
28
37
  (_a = this.baseAppState) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onAppStateChange);
29
38
  }
30
39
  }
31
- exports.IsReviewingPM = IsReviewingPM;
32
- IsReviewingPM.type = "IsReviewingPM";
33
- IsReviewingPM.get = (appObjects) => AppObject_1.getSingletonComponent(IsReviewingPM.type, appObjects);
@@ -0,0 +1,12 @@
1
+ import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
+ export interface SlideNavigationVM {
3
+ hasNextState: boolean;
4
+ hasPreviousState: boolean;
5
+ hideNavigation: boolean;
6
+ }
7
+ export declare abstract class SlideNavigationPM extends AppObjectPM<SlideNavigationVM> {
8
+ static readonly type = "SlideNavigationPM";
9
+ static get: (appObjects: AppObjectRepo) => SlideNavigationPM | undefined;
10
+ }
11
+ export declare const defaultSlideNavigationVM: SlideNavigationVM;
12
+ export declare function makeSlideNavigationPM(appObject: AppObject): SlideNavigationPM;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeSlideNavigationPM = exports.defaultSlideNavigationVM = exports.SlideNavigationPM = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Entity_1 = require("../Entity");
6
+ class SlideNavigationPM extends AppObject_1.AppObjectPM {
7
+ }
8
+ exports.SlideNavigationPM = SlideNavigationPM;
9
+ SlideNavigationPM.type = "SlideNavigationPM";
10
+ SlideNavigationPM.get = (appObjects) => AppObject_1.getSingletonComponent(SlideNavigationPM.type, appObjects);
11
+ exports.defaultSlideNavigationVM = {
12
+ hasNextState: true,
13
+ hasPreviousState: false,
14
+ hideNavigation: false,
15
+ };
16
+ function makeSlideNavigationPM(appObject) {
17
+ return new SlideNavigationPMImp(appObject);
18
+ }
19
+ exports.makeSlideNavigationPM = makeSlideNavigationPM;
20
+ class SlideNavigationPMImp extends SlideNavigationPM {
21
+ constructor(appObject) {
22
+ var _a;
23
+ super(appObject, SlideNavigationPM.type);
24
+ this.onAppStateChange = () => {
25
+ if (!this.baseAppState)
26
+ return;
27
+ const hasNextState = this.baseAppState.hasNextState;
28
+ const hasPreviousState = this.baseAppState.hasPreviousState;
29
+ const hideNavigation = this.baseAppState.hideSlideNavigation;
30
+ const vm = { hasNextState, hasPreviousState, hideNavigation };
31
+ this.doUpdateView(vm);
32
+ };
33
+ (_a = this.baseAppState) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onAppStateChange);
34
+ this.onAppStateChange();
35
+ this.appObjects.registerSingleton(this);
36
+ }
37
+ get baseAppState() {
38
+ return this.getCachedSingleton(Entity_1.BaseAppState.type);
39
+ }
40
+ vmsAreEqual(a, b) {
41
+ if (a.hasNextState !== b.hasNextState)
42
+ return false;
43
+ if (a.hasPreviousState !== b.hasPreviousState)
44
+ return false;
45
+ if (a.hideNavigation !== b.hideNavigation)
46
+ return false;
47
+ return true;
48
+ }
49
+ }
@@ -1,9 +1,6 @@
1
1
  import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
- export declare class SlideTextPM extends AppObjectPM<string> {
2
+ export declare abstract class SlideTextPM extends AppObjectPM<string> {
3
3
  static readonly type = "SlideTextPM";
4
4
  static get: (appObjects: AppObjectRepo) => SlideTextPM | undefined;
5
- private baseAppState?;
6
- vmsAreEqual(a: string, b: string): boolean;
7
- private onAppStateChange;
8
- constructor(appObject: AppObject);
9
5
  }
6
+ export declare function makeSlideTextPM(appObject: AppObject): SlideTextPM;
@@ -1,27 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlideTextPM = void 0;
3
+ exports.makeSlideTextPM = exports.SlideTextPM = void 0;
4
4
  const AppObject_1 = require("../../../AppObject");
5
5
  const Entity_1 = require("../Entity");
6
6
  class SlideTextPM extends AppObject_1.AppObjectPM {
7
+ }
8
+ exports.SlideTextPM = SlideTextPM;
9
+ SlideTextPM.type = "SlideTextPM";
10
+ SlideTextPM.get = (appObjects) => AppObject_1.getSingletonComponent(SlideTextPM.type, appObjects);
11
+ function makeSlideTextPM(appObject) {
12
+ return new SlideTextPMImp(appObject);
13
+ }
14
+ exports.makeSlideTextPM = makeSlideTextPM;
15
+ class SlideTextPMImp extends SlideTextPM {
7
16
  constructor(appObject) {
17
+ var _a;
8
18
  super(appObject, SlideTextPM.type);
9
19
  this.onAppStateChange = () => {
10
20
  if (!this.baseAppState)
11
21
  return;
12
22
  this.doUpdateView(this.baseAppState.slideText);
13
23
  };
14
- this.baseAppState = appObject.getComponent(Entity_1.BaseAppState.type);
15
- if (!this.baseAppState) {
16
- this.warn("IsReviewingPM added to an app object that does not have a BaseAppState Entity. Add one first");
17
- return;
18
- }
19
- this.baseAppState.addChangeObserver(this.onAppStateChange);
24
+ (_a = this.baseAppState) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onAppStateChange);
25
+ this.onAppStateChange();
26
+ this.appObjects.registerSingleton(this);
27
+ }
28
+ get baseAppState() {
29
+ return this.getCachedSingleton(Entity_1.BaseAppState.type);
20
30
  }
21
31
  vmsAreEqual(a, b) {
22
32
  return a === b;
23
33
  }
24
34
  }
25
- exports.SlideTextPM = SlideTextPM;
26
- SlideTextPM.type = "SlideTextPM";
27
- SlideTextPM.get = (appObjects) => AppObject_1.getSingletonComponent(SlideTextPM.type, appObjects);
@@ -1,4 +1,4 @@
1
- export * from "./HasNextPreviousStatePM";
2
1
  export * from "./IsAuthoringPM";
3
2
  export * from "./IsReviewingPM";
3
+ export * from "./SlideNavigationPM";
4
4
  export * from "./SlideTextPM";
@@ -10,7 +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("./HasNextPreviousStatePM"), exports);
14
13
  __exportStar(require("./IsAuthoringPM"), exports);
15
14
  __exportStar(require("./IsReviewingPM"), exports);
15
+ __exportStar(require("./SlideNavigationPM"), exports);
16
16
  __exportStar(require("./SlideTextPM"), exports);
@@ -1,3 +1,4 @@
1
+ export * from "./Adapters";
1
2
  export * from "./Controller";
2
3
  export * from "./Entity";
3
4
  export * from "./Mocks";
@@ -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("./Controller"), exports);
14
15
  __exportStar(require("./Entity"), exports);
15
16
  __exportStar(require("./Mocks"), exports);
@@ -1,12 +1,19 @@
1
1
  import { AppObject } from "../../../AppObject/AppObject";
2
2
  import { AppObjectUC } from "../../../AppObject/AppObjectUC";
3
3
  import { RequestHandler } from "../Entities";
4
- export declare type SetAppStateAction = (finalState: string, duration?: number) => void;
4
+ export declare type SetAppStateAction = (data: StartAppPayload) => void;
5
5
  export declare abstract class SetAppStateBaseUC extends AppObjectUC implements RequestHandler {
6
6
  static readonly type = "SetAppStateBaseUC";
7
7
  readonly requestType = "SET_APP_STATE";
8
- readonly payloadVersion = 2;
8
+ readonly payloadVersion = 3;
9
9
  abstract action: SetAppStateAction;
10
10
  abstract handleRequest: (version: number, payload?: unknown) => void;
11
11
  }
12
12
  export declare function makeSetAppStateUC(appObject: AppObject): SetAppStateBaseUC;
13
+ export declare type StartAppPayload = {
14
+ finalState?: object;
15
+ hideNavigation: boolean;
16
+ hasNextSlide: boolean;
17
+ hasPreviousSlide: boolean;
18
+ duration?: number;
19
+ };