@vived/app 4.20.0 → 4.22.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 (80) hide show
  1. package/lib/Components/ChannelModel/Adapters/activeModelAdapter.d.ts +2 -0
  2. package/lib/Components/ChannelModel/Adapters/activeModelAdapter.js +23 -0
  3. package/lib/Components/ChannelModel/Adapters/index.d.ts +1 -0
  4. package/lib/Components/ChannelModel/Adapters/index.js +1 -0
  5. package/lib/Components/ChannelModel/Controllers/clickSelectChannelModel.d.ts +2 -0
  6. package/lib/Components/ChannelModel/Controllers/clickSelectChannelModel.js +13 -0
  7. package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -0
  8. package/lib/Components/ChannelModel/Controllers/index.js +1 -0
  9. package/lib/Components/ChannelModel/Entities/ChannelModelRepo.d.ts +2 -2
  10. package/lib/Components/ChannelModel/Entities/ChannelModelRepo.js +3 -3
  11. package/lib/Components/ChannelModel/Mocks/ActiveModelMock.d.ts +8 -0
  12. package/lib/Components/ChannelModel/Mocks/ActiveModelMock.js +15 -0
  13. package/lib/Components/ChannelModel/Mocks/LoadChannelModelMock.d.ts +9 -0
  14. package/lib/Components/ChannelModel/Mocks/LoadChannelModelMock.js +16 -0
  15. package/lib/Components/ChannelModel/Mocks/SelectChannelModelUCMock.d.ts +8 -0
  16. package/lib/Components/ChannelModel/Mocks/SelectChannelModelUCMock.js +15 -0
  17. package/lib/Components/ChannelModel/Mocks/index.d.ts +3 -0
  18. package/lib/Components/ChannelModel/Mocks/index.js +3 -0
  19. package/lib/Components/ChannelModel/PMs/ActiveModelPM.d.ts +13 -0
  20. package/lib/Components/ChannelModel/PMs/ActiveModelPM.js +36 -0
  21. package/lib/Components/ChannelModel/PMs/index.d.ts +1 -0
  22. package/lib/Components/ChannelModel/PMs/index.js +1 -0
  23. package/lib/Components/ChannelModel/UC/LoadChannelModelUC.d.ts +10 -0
  24. package/lib/Components/ChannelModel/UC/LoadChannelModelUC.js +132 -0
  25. package/lib/Components/ChannelModel/UC/SelectChannelModelUC.js +34 -34
  26. package/lib/Components/ChannelModel/UC/SerializeActiveModel.d.ts +26 -0
  27. package/lib/Components/ChannelModel/UC/SerializeActiveModel.js +80 -0
  28. package/lib/Components/ChannelModel/UC/index.d.ts +3 -0
  29. package/lib/Components/ChannelModel/UC/index.js +3 -0
  30. package/lib/Components/Dispatcher/Mocks/GetAssetBlobURLUCMock.d.ts +8 -0
  31. package/lib/Components/Dispatcher/Mocks/GetAssetBlobURLUCMock.js +15 -0
  32. package/lib/Components/Dispatcher/Mocks/GetLinkedAssetsUCMock.d.ts +8 -0
  33. package/lib/Components/Dispatcher/Mocks/GetLinkedAssetsUCMock.js +15 -0
  34. package/lib/Components/Dispatcher/Mocks/MockGetAssetFolderURL.d.ts +1 -1
  35. package/lib/Components/Dispatcher/Mocks/MockGetAssetFolderURL.js +3 -3
  36. package/lib/Components/Dispatcher/Mocks/MockShowAlert.d.ts +1 -1
  37. package/lib/Components/Dispatcher/Mocks/MockShowAlert.js +3 -3
  38. package/lib/Components/Dispatcher/Mocks/MockShowConfirm.d.ts +1 -1
  39. package/lib/Components/Dispatcher/Mocks/MockShowConfirm.js +3 -3
  40. package/lib/Components/Dispatcher/Mocks/MockShowMarkdown.d.ts +1 -1
  41. package/lib/Components/Dispatcher/Mocks/MockShowMarkdown.js +3 -3
  42. package/lib/Components/Dispatcher/Mocks/MockShowSpinner.d.ts +8 -0
  43. package/lib/Components/Dispatcher/Mocks/MockShowSpinner.js +15 -0
  44. package/lib/Components/Dispatcher/Mocks/MockSubmitResult.d.ts +1 -1
  45. package/lib/Components/Dispatcher/Mocks/MockSubmitResult.js +3 -3
  46. package/lib/Components/Dispatcher/Mocks/ShowSelectModelUCMock.d.ts +8 -0
  47. package/lib/Components/Dispatcher/Mocks/ShowSelectModelUCMock.js +15 -0
  48. package/lib/Components/Dispatcher/Mocks/index.d.ts +6 -1
  49. package/lib/Components/Dispatcher/Mocks/index.js +6 -1
  50. package/lib/Components/Dispatcher/UC/AppIsReadyUC.js +5 -5
  51. package/lib/Components/Dispatcher/UC/DispatchStartZSpaceUC.js +5 -5
  52. package/lib/Components/Dispatcher/UC/DispatchStateChangeUC.js +4 -4
  53. package/lib/Components/Dispatcher/UC/DispatchStopZSpaceUC.js +5 -5
  54. package/lib/Components/Dispatcher/UC/GetAssetBlobURLUC.js +21 -21
  55. package/lib/Components/Dispatcher/UC/GetAssetFolderURLUC.js +20 -20
  56. package/lib/Components/Dispatcher/UC/GetAssetMetaUC.js +21 -21
  57. package/lib/Components/Dispatcher/UC/GetAssetsForOwnerUC.js +21 -21
  58. package/lib/Components/Dispatcher/UC/GetLinkedAssetsUC.js +22 -22
  59. package/lib/Components/Dispatcher/UC/GoToNextStateUC.js +5 -5
  60. package/lib/Components/Dispatcher/UC/GoToPreviousStateUC.js +5 -5
  61. package/lib/Components/Dispatcher/UC/HasNextStateUC.js +15 -15
  62. package/lib/Components/Dispatcher/UC/HasPreviousStateUC.js +15 -15
  63. package/lib/Components/Dispatcher/UC/IsAssetFetchedUC.js +16 -16
  64. package/lib/Components/Dispatcher/UC/IsZSpaceAvailableUC.js +15 -15
  65. package/lib/Components/Dispatcher/UC/LogUC.js +12 -12
  66. package/lib/Components/Dispatcher/UC/RegisterExternalStylesheetsUC.js +7 -7
  67. package/lib/Components/Dispatcher/UC/RestoreCurrentStateUC.js +5 -5
  68. package/lib/Components/Dispatcher/UC/ShowAlertUC.js +11 -11
  69. package/lib/Components/Dispatcher/UC/ShowConfirmUC.js +13 -13
  70. package/lib/Components/Dispatcher/UC/ShowMarkdownEditorUC.js +13 -13
  71. package/lib/Components/Dispatcher/UC/ShowSelectModelUC.js +15 -15
  72. package/lib/Components/Dispatcher/UC/StateIsCompleteUC.js +5 -5
  73. package/lib/Components/Dispatcher/UC/SubmitActivityAssetUC.js +21 -21
  74. package/lib/Components/Dispatcher/UC/SubmitResultResultUC.js +69 -69
  75. package/lib/Components/Dispatcher/index.d.ts +1 -0
  76. package/lib/Components/Dispatcher/index.js +1 -0
  77. package/lib/Components/GLBModel/Mocks/LoadGlbFileUCMock.d.ts +1 -0
  78. package/lib/Components/GLBModel/Mocks/LoadGlbFileUCMock.js +1 -0
  79. package/lib/Components/GLBModel/UCs/LoadGlbFileUC.d.ts +1 -0
  80. package/package.json +1 -1
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { GetLinkedAssetsUC } from "../UC";
4
+ export declare class GetLinkedAssetsUCMock extends GetLinkedAssetsUC {
5
+ doDispatch: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeGetLinkedAssetsUCMock(appObjects: AppObjectRepo): GetLinkedAssetsUCMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeGetLinkedAssetsUCMock = exports.GetLinkedAssetsUCMock = void 0;
4
+ const UC_1 = require("../UC");
5
+ class GetLinkedAssetsUCMock extends UC_1.GetLinkedAssetsUC {
6
+ constructor(appObject) {
7
+ super(appObject, UC_1.GetLinkedAssetsUC.type);
8
+ this.doDispatch = jest.fn();
9
+ }
10
+ }
11
+ exports.GetLinkedAssetsUCMock = GetLinkedAssetsUCMock;
12
+ function makeGetLinkedAssetsUCMock(appObjects) {
13
+ return new GetLinkedAssetsUCMock(appObjects.getOrCreate("GetLinkedAssetsUCMock"));
14
+ }
15
+ exports.makeGetLinkedAssetsUCMock = makeGetLinkedAssetsUCMock;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="jest" />
2
2
  import { AppObjectRepo } from "../../../AppObject";
3
3
  import { AppObject } from "../../../AppObject/AppObject";
4
- import { GetAssetFolderURLUC } from "../UC";
4
+ import { GetAssetFolderURLUC } from "../UC/GetAssetFolderURLUC";
5
5
  export declare class MockGetAssetFolderURL extends GetAssetFolderURLUC {
6
6
  doDispatch: jest.Mock<any, any>;
7
7
  constructor(appObject: AppObject);
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeMockGetAssetFolderURL = exports.MockGetAssetFolderURL = void 0;
4
- const UC_1 = require("../UC");
5
- class MockGetAssetFolderURL extends UC_1.GetAssetFolderURLUC {
4
+ const GetAssetFolderURLUC_1 = require("../UC/GetAssetFolderURLUC");
5
+ class MockGetAssetFolderURL extends GetAssetFolderURLUC_1.GetAssetFolderURLUC {
6
6
  constructor(appObject) {
7
- super(appObject, UC_1.GetAssetFolderURLUC.type);
7
+ super(appObject, GetAssetFolderURLUC_1.GetAssetFolderURLUC.type);
8
8
  this.doDispatch = jest.fn();
9
9
  }
10
10
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
2
  import { AppObject, AppObjectRepo } from "../../../AppObject";
3
- import { ShowAlertUC } from "../UC";
3
+ import { ShowAlertUC } from "../UC/ShowAlertUC";
4
4
  export declare class MockShowAlert extends ShowAlertUC {
5
5
  showAlert: jest.Mock<any, any>;
6
6
  constructor(appObject: AppObject);
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeMockShowAlert = exports.MockShowAlert = void 0;
4
- const UC_1 = require("../UC");
5
- class MockShowAlert extends UC_1.ShowAlertUC {
4
+ const ShowAlertUC_1 = require("../UC/ShowAlertUC");
5
+ class MockShowAlert extends ShowAlertUC_1.ShowAlertUC {
6
6
  constructor(appObject) {
7
- super(appObject, UC_1.ShowAlertUC.type);
7
+ super(appObject, ShowAlertUC_1.ShowAlertUC.type);
8
8
  this.showAlert = jest.fn();
9
9
  }
10
10
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
2
  import { AppObject, AppObjectRepo } from "../../../AppObject";
3
- import { ShowConfirmUC } from "../UC";
3
+ import { ShowConfirmUC } from "../UC/ShowConfirmUC";
4
4
  export declare class MockShowConfirmUC extends ShowConfirmUC {
5
5
  showConfirm: jest.Mock<any, any>;
6
6
  constructor(appObject: AppObject);
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeMockShowConfirmUC = exports.MockShowConfirmUC = void 0;
4
- const UC_1 = require("../UC");
5
- class MockShowConfirmUC extends UC_1.ShowConfirmUC {
4
+ const ShowConfirmUC_1 = require("../UC/ShowConfirmUC");
5
+ class MockShowConfirmUC extends ShowConfirmUC_1.ShowConfirmUC {
6
6
  constructor(appObject) {
7
- super(appObject, UC_1.ShowConfirmUC.type);
7
+ super(appObject, ShowConfirmUC_1.ShowConfirmUC.type);
8
8
  this.showConfirm = jest.fn();
9
9
  }
10
10
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
2
  import { AppObject, AppObjectRepo } from "../../../AppObject";
3
- import { ShowMarkdownEditorUC } from "../UC";
3
+ import { ShowMarkdownEditorUC } from "../UC/ShowMarkdownEditorUC";
4
4
  export declare class MockShowMarkdownEditor extends ShowMarkdownEditorUC {
5
5
  showMarkdownEditor: jest.Mock<any, any>;
6
6
  constructor(appObject: AppObject);
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeMockShowMarkdownEditor = exports.MockShowMarkdownEditor = void 0;
4
- const UC_1 = require("../UC");
5
- class MockShowMarkdownEditor extends UC_1.ShowMarkdownEditorUC {
4
+ const ShowMarkdownEditorUC_1 = require("../UC/ShowMarkdownEditorUC");
5
+ class MockShowMarkdownEditor extends ShowMarkdownEditorUC_1.ShowMarkdownEditorUC {
6
6
  constructor(appObject) {
7
- super(appObject, UC_1.ShowMarkdownEditorUC.type);
7
+ super(appObject, ShowMarkdownEditorUC_1.ShowMarkdownEditorUC.type);
8
8
  this.showMarkdownEditor = jest.fn();
9
9
  }
10
10
  }
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { ShowSpinnerUC } from "../UC";
4
+ export declare class MockShowSpinner extends ShowSpinnerUC {
5
+ showSpinner: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeMockShowSpinner(appObjects: AppObjectRepo): MockShowSpinner;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeMockShowSpinner = exports.MockShowSpinner = void 0;
4
+ const UC_1 = require("../UC");
5
+ class MockShowSpinner extends UC_1.ShowSpinnerUC {
6
+ constructor(appObject) {
7
+ super(appObject, MockShowSpinner.type);
8
+ this.showSpinner = jest.fn();
9
+ }
10
+ }
11
+ exports.MockShowSpinner = MockShowSpinner;
12
+ function makeMockShowSpinner(appObjects) {
13
+ return new MockShowSpinner(appObjects.getOrCreate("MockShowSpinner"));
14
+ }
15
+ exports.makeMockShowSpinner = makeMockShowSpinner;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
2
  import { AppObject, AppObjectRepo } from "../../../AppObject";
3
- import { SubmitResultResultUC } from "../UC";
3
+ import { SubmitResultResultUC } from "../UC/SubmitResultResultUC";
4
4
  export declare class MockSubmitResult extends SubmitResultResultUC {
5
5
  submitHitResult: jest.Mock<any, any>;
6
6
  submitProgressResult: jest.Mock<any, any>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.makeMockSubmitResult = exports.MockSubmitResult = void 0;
4
- const UC_1 = require("../UC");
5
- class MockSubmitResult extends UC_1.SubmitResultResultUC {
4
+ const SubmitResultResultUC_1 = require("../UC/SubmitResultResultUC");
5
+ class MockSubmitResult extends SubmitResultResultUC_1.SubmitResultResultUC {
6
6
  constructor(appObject) {
7
- super(appObject, UC_1.SubmitResultResultUC.type);
7
+ super(appObject, SubmitResultResultUC_1.SubmitResultResultUC.type);
8
8
  this.submitHitResult = jest.fn();
9
9
  this.submitProgressResult = jest.fn();
10
10
  this.submitMultiHitResult = jest.fn();
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { ShowSelectModelUC } from "../UC/ShowSelectModelUC";
4
+ export declare class ShowSelectModelUCMock extends ShowSelectModelUC {
5
+ doDispatch: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeShowSelectModelUCMock(appObjects: AppObjectRepo): ShowSelectModelUCMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeShowSelectModelUCMock = exports.ShowSelectModelUCMock = void 0;
4
+ const ShowSelectModelUC_1 = require("../UC/ShowSelectModelUC");
5
+ class ShowSelectModelUCMock extends ShowSelectModelUC_1.ShowSelectModelUC {
6
+ constructor(appObject) {
7
+ super(appObject, ShowSelectModelUC_1.ShowSelectModelUC.type);
8
+ this.doDispatch = jest.fn();
9
+ }
10
+ }
11
+ exports.ShowSelectModelUCMock = ShowSelectModelUCMock;
12
+ function makeShowSelectModelUCMock(appObjects) {
13
+ return new ShowSelectModelUCMock(appObjects.getOrCreate("ShowSelectModelUCMock"));
14
+ }
15
+ exports.makeShowSelectModelUCMock = makeShowSelectModelUCMock;
@@ -1,6 +1,11 @@
1
- export * from "./MockDispatchStateChange";
1
+ export * from "./GetAssetBlobURLUCMock";
2
+ export * from "./GetLinkedAssetsUCMock";
2
3
  export * from "./MockDispatcher";
4
+ export * from "./MockDispatchStateChange";
5
+ export * from "./MockGetAssetFolderURL";
3
6
  export * from "./MockShowAlert";
4
7
  export * from "./MockShowConfirm";
5
8
  export * from "./MockShowMarkdown";
9
+ export * from "./MockShowSpinner";
6
10
  export * from "./MockSubmitResult";
11
+ export * from "./ShowSelectModelUCMock";
@@ -10,9 +10,14 @@ 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("./MockDispatchStateChange"), exports);
13
+ __exportStar(require("./GetAssetBlobURLUCMock"), exports);
14
+ __exportStar(require("./GetLinkedAssetsUCMock"), exports);
14
15
  __exportStar(require("./MockDispatcher"), exports);
16
+ __exportStar(require("./MockDispatchStateChange"), exports);
17
+ __exportStar(require("./MockGetAssetFolderURL"), exports);
15
18
  __exportStar(require("./MockShowAlert"), exports);
16
19
  __exportStar(require("./MockShowConfirm"), exports);
17
20
  __exportStar(require("./MockShowMarkdown"), exports);
21
+ __exportStar(require("./MockShowSpinner"), exports);
18
22
  __exportStar(require("./MockSubmitResult"), exports);
23
+ __exportStar(require("./ShowSelectModelUCMock"), exports);
@@ -31,15 +31,15 @@ class AppIsReadyUCImp extends AppIsReadyUC {
31
31
  constructor(appObject) {
32
32
  super(appObject, AppIsReadyUC.type);
33
33
  this.requestVersion = 1;
34
+ this.doDispatch = () => {
35
+ if (!this.appDispatcher)
36
+ return;
37
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
38
+ };
34
39
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
35
40
  if (!this.appDispatcher) {
36
41
  this.warn("AppIsReadyUCImp has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
37
42
  this.dispose();
38
43
  }
39
44
  }
40
- doDispatch() {
41
- if (!this.appDispatcher)
42
- return;
43
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
44
- }
45
45
  }
@@ -21,15 +21,15 @@ class DispatchStateChangeUCImp extends DispatchStartZSpaceUC {
21
21
  constructor(appObject) {
22
22
  super(appObject, DispatchStartZSpaceUC.type);
23
23
  this.requestVersion = 1;
24
+ this.doDispatch = () => {
25
+ if (!this.appDispatcher)
26
+ return;
27
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
28
+ };
24
29
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
25
30
  if (!this.appDispatcher) {
26
31
  this.warn("DispatchStartZSpaceUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
27
32
  this.dispose();
28
33
  }
29
34
  }
30
- doDispatch() {
31
- if (!this.appDispatcher)
32
- return;
33
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
34
- }
35
35
  }
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dispatchStateChange = exports.makeDispatchStateChangeUC = exports.DispatchStateChangeUC = void 0;
4
4
  const AppObject_1 = require("../../../AppObject");
5
5
  const AppObjectUC_1 = require("../../../AppObject/AppObjectUC");
6
- const App_1 = require("../../App");
7
- const StateMachine_1 = require("../../StateMachine");
6
+ const BaseAppState_1 = require("../../App/Entity/BaseAppState");
7
+ const Entities_1 = require("../../StateMachine/Entities");
8
8
  const AppDispatcher_1 = require("../Entities/AppDispatcher");
9
9
  class DispatchStateChangeUC extends AppObjectUC_1.AppObjectUC {
10
10
  constructor() {
@@ -41,12 +41,12 @@ class DispatchStateChangeUCImp extends DispatchStateChangeUC {
41
41
  };
42
42
  this.doDispatch = () => {
43
43
  var _a;
44
- const stateMachine = StateMachine_1.StateMachineEntity.get(this.appObject.appObjectRepo);
44
+ const stateMachine = Entities_1.StateMachineEntity.get(this.appObject.appObjectRepo);
45
45
  if (!stateMachine) {
46
46
  this.warn("Could not find StateMachineEntity");
47
47
  return;
48
48
  }
49
- const baseApp = App_1.BaseAppState.get(this.appObject.appObjectRepo);
49
+ const baseApp = BaseAppState_1.BaseAppState.get(this.appObject.appObjectRepo);
50
50
  if (!baseApp) {
51
51
  this.warn("Could not find BaseAppState");
52
52
  return;
@@ -21,15 +21,15 @@ class DispatchStateChangeUCImp extends DispatchStopZSpaceUC {
21
21
  constructor(appObject) {
22
22
  super(appObject, DispatchStopZSpaceUC.type);
23
23
  this.requestVersion = 1;
24
+ this.doDispatch = () => {
25
+ if (!this.appDispatcher)
26
+ return;
27
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
28
+ };
24
29
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
25
30
  if (!this.appDispatcher) {
26
31
  this.warn("DispatchStopZSpaceUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
27
32
  this.dispose();
28
33
  }
29
34
  }
30
- doDispatch() {
31
- if (!this.appDispatcher)
32
- return;
33
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
34
- }
35
35
  }
@@ -32,31 +32,31 @@ class GetAppAssetsURLUCImp extends GetAssetBlobURLUC {
32
32
  constructor(appObject) {
33
33
  super(appObject, GetAssetBlobURLUC.type);
34
34
  this.requestVersion = 1;
35
+ this.doDispatch = (assetID) => {
36
+ return new Promise((resolve, reject) => {
37
+ const callback = (blobURL) => {
38
+ if (blobURL === undefined) {
39
+ reject(new Error("Blob URL is undefined"));
40
+ }
41
+ else {
42
+ resolve(blobURL);
43
+ }
44
+ };
45
+ const payload = {
46
+ assetID,
47
+ callback,
48
+ };
49
+ if (!this.appDispatcher)
50
+ return reject(new Error("No host handler has been registered"));
51
+ else {
52
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
53
+ }
54
+ });
55
+ };
35
56
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
36
57
  if (!this.appDispatcher) {
37
58
  this.warn("GetAssetBlobURLUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
38
59
  this.dispose();
39
60
  }
40
61
  }
41
- doDispatch(assetID) {
42
- return new Promise((resolve, reject) => {
43
- const callback = (blobURL) => {
44
- if (blobURL === undefined) {
45
- reject(new Error("Blob URL is undefined"));
46
- }
47
- else {
48
- resolve(blobURL);
49
- }
50
- };
51
- const payload = {
52
- assetID,
53
- callback,
54
- };
55
- if (!this.appDispatcher)
56
- return reject(new Error("No host handler has been registered"));
57
- else {
58
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
59
- }
60
- });
61
- }
62
62
  }
@@ -32,30 +32,30 @@ class GetAppAssetsURLUCImp extends GetAssetFolderURLUC {
32
32
  constructor(appObject) {
33
33
  super(appObject, GetAssetFolderURLUC.type);
34
34
  this.requestVersion = 1;
35
+ this.doDispatch = () => {
36
+ return new Promise((resolve, reject) => {
37
+ const callback = (url) => {
38
+ if (!url) {
39
+ reject(new Error("URL to asset folder is empty"));
40
+ }
41
+ else {
42
+ resolve(url);
43
+ }
44
+ };
45
+ const payload = {
46
+ callback,
47
+ };
48
+ if (!this.appDispatcher)
49
+ return reject(new Error("No host handler has been registered"));
50
+ else {
51
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
52
+ }
53
+ });
54
+ };
35
55
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
36
56
  if (!this.appDispatcher) {
37
57
  this.warn("GetAssetFolderURLUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
38
58
  this.dispose();
39
59
  }
40
60
  }
41
- doDispatch() {
42
- return new Promise((resolve, reject) => {
43
- const callback = (url) => {
44
- if (!url) {
45
- reject(new Error("URL to asset folder is empty"));
46
- }
47
- else {
48
- resolve(url);
49
- }
50
- };
51
- const payload = {
52
- callback,
53
- };
54
- if (!this.appDispatcher)
55
- return reject(new Error("No host handler has been registered"));
56
- else {
57
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
58
- }
59
- });
60
- }
61
61
  }
@@ -32,31 +32,31 @@ class GetAppAssetsURLUCImp extends GetAssetMetaUC {
32
32
  constructor(appObject) {
33
33
  super(appObject, GetAssetMetaUC.type);
34
34
  this.requestVersion = 1;
35
+ this.doDispatch = (assetID) => {
36
+ return new Promise((resolve, reject) => {
37
+ const callback = (assetMeta) => {
38
+ if (assetMeta === undefined) {
39
+ reject(new Error("Meta is undefined"));
40
+ }
41
+ else {
42
+ resolve(assetMeta);
43
+ }
44
+ };
45
+ const payload = {
46
+ assetID,
47
+ callback,
48
+ };
49
+ if (!this.appDispatcher)
50
+ return reject(new Error("No host handler has been registered"));
51
+ else {
52
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
53
+ }
54
+ });
55
+ };
35
56
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
36
57
  if (!this.appDispatcher) {
37
58
  this.warn("GetAssetMetaUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
38
59
  this.dispose();
39
60
  }
40
61
  }
41
- doDispatch(assetID) {
42
- return new Promise((resolve, reject) => {
43
- const callback = (assetMeta) => {
44
- if (assetMeta === undefined) {
45
- reject(new Error("Meta is undefined"));
46
- }
47
- else {
48
- resolve(assetMeta);
49
- }
50
- };
51
- const payload = {
52
- assetID,
53
- callback,
54
- };
55
- if (!this.appDispatcher)
56
- return reject(new Error("No host handler has been registered"));
57
- else {
58
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
59
- }
60
- });
61
- }
62
62
  }
@@ -32,31 +32,31 @@ class GetLinkedAssetsUCImp extends GetAssetsForOwnerUC {
32
32
  constructor(appObject) {
33
33
  super(appObject, GetAssetsForOwnerUC.type);
34
34
  this.requestVersion = 1;
35
+ this.doDispatch = (assetID) => {
36
+ return new Promise((resolve, reject) => {
37
+ const callback = (ownerAssets) => {
38
+ if (ownerAssets === undefined) {
39
+ reject(new Error("Owner asset list is missing"));
40
+ }
41
+ else {
42
+ resolve(ownerAssets);
43
+ }
44
+ };
45
+ const payload = {
46
+ assetID,
47
+ callback,
48
+ };
49
+ if (!this.appDispatcher)
50
+ return reject(new Error("No host handler has been registered"));
51
+ else {
52
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
53
+ }
54
+ });
55
+ };
35
56
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
36
57
  if (!this.appDispatcher) {
37
58
  this.warn("GetAssetsForOwnerUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
38
59
  this.dispose();
39
60
  }
40
61
  }
41
- doDispatch(assetID) {
42
- return new Promise((resolve, reject) => {
43
- const callback = (ownerAssets) => {
44
- if (ownerAssets === undefined) {
45
- reject(new Error("Owner asset list is missing"));
46
- }
47
- else {
48
- resolve(ownerAssets);
49
- }
50
- };
51
- const payload = {
52
- assetID,
53
- callback,
54
- };
55
- if (!this.appDispatcher)
56
- return reject(new Error("No host handler has been registered"));
57
- else {
58
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
59
- }
60
- });
61
- }
62
62
  }
@@ -32,32 +32,32 @@ class GetLinkedAssetsUCImp extends GetLinkedAssetsUC {
32
32
  constructor(appObject) {
33
33
  super(appObject, GetLinkedAssetsUC.type);
34
34
  this.requestVersion = 1;
35
+ this.doDispatch = (assetID, type) => {
36
+ return new Promise((resolve, reject) => {
37
+ const callback = (linkedAssets) => {
38
+ if (linkedAssets === undefined) {
39
+ reject(new Error("Linked asset list is missing"));
40
+ }
41
+ else {
42
+ resolve(linkedAssets);
43
+ }
44
+ };
45
+ const payload = {
46
+ assetID,
47
+ type,
48
+ callback,
49
+ };
50
+ if (!this.appDispatcher)
51
+ return reject(new Error("No host handler has been registered"));
52
+ else {
53
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
54
+ }
55
+ });
56
+ };
35
57
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
36
58
  if (!this.appDispatcher) {
37
59
  this.warn("GetLinkedAssetsUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
38
60
  this.dispose();
39
61
  }
40
62
  }
41
- doDispatch(assetID, type) {
42
- return new Promise((resolve, reject) => {
43
- const callback = (linkedAssets) => {
44
- if (linkedAssets === undefined) {
45
- reject(new Error("Linked asset list is missing"));
46
- }
47
- else {
48
- resolve(linkedAssets);
49
- }
50
- };
51
- const payload = {
52
- assetID,
53
- type,
54
- callback,
55
- };
56
- if (!this.appDispatcher)
57
- return reject(new Error("No host handler has been registered"));
58
- else {
59
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion, payload);
60
- }
61
- });
62
- }
63
63
  }
@@ -21,15 +21,15 @@ class DispatchStateChangeUCImp extends GoToNextStateUC {
21
21
  constructor(appObject) {
22
22
  super(appObject, GoToNextStateUC.type);
23
23
  this.requestVersion = 1;
24
+ this.doDispatch = () => {
25
+ if (!this.appDispatcher)
26
+ return;
27
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
28
+ };
24
29
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
25
30
  if (!this.appDispatcher) {
26
31
  this.warn("GoToNextStateUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
27
32
  this.dispose();
28
33
  }
29
34
  }
30
- doDispatch() {
31
- if (!this.appDispatcher)
32
- return;
33
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
34
- }
35
35
  }
@@ -21,15 +21,15 @@ class DispatchStateChangeUCImp extends GoToPreviousStateUC {
21
21
  constructor(appObject) {
22
22
  super(appObject, GoToPreviousStateUC.type);
23
23
  this.requestVersion = 1;
24
+ this.doDispatch = () => {
25
+ if (!this.appDispatcher)
26
+ return;
27
+ this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
28
+ };
24
29
  this.appDispatcher = appObject.getComponent(AppDispatcher_1.AppDispatcher.type);
25
30
  if (!this.appDispatcher) {
26
31
  this.warn("GoToPreviousStateUC has been added to an App Object that does not have a AppDispatcher. Add a dispatcher first");
27
32
  this.dispose();
28
33
  }
29
34
  }
30
- doDispatch() {
31
- if (!this.appDispatcher)
32
- return;
33
- this.appDispatcher.formRequestAndDispatch(this.requestType, this.requestVersion);
34
- }
35
35
  }