@vived/app 4.28.0 → 4.28.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.
- package/lib/Components/Babylon/Factories/index.d.ts +1 -0
- package/lib/Components/Babylon/Factories/index.js +13 -0
- package/lib/Components/Babylon/Factories/setupBabylon.d.ts +2 -0
- package/lib/Components/Babylon/Factories/setupBabylon.js +11 -0
- package/lib/Components/Babylon/index.d.ts +2 -0
- package/lib/Components/Babylon/index.js +2 -0
- package/lib/Components/BaseApp/Factories/index.d.ts +1 -0
- package/lib/Components/BaseApp/Factories/index.js +13 -0
- package/lib/Components/BaseApp/Factories/setupBaseApp.d.ts +2 -0
- package/lib/Components/BaseApp/Factories/setupBaseApp.js +22 -0
- package/lib/Components/BaseApp/index.d.ts +1 -0
- package/lib/Components/BaseApp/index.js +1 -0
- package/lib/Components/Callouts/Factories/calloutFactory.d.ts +3 -0
- package/lib/Components/Callouts/Factories/calloutFactory.js +42 -0
- package/lib/Components/Callouts/Factories/calloutRepoFactory.d.ts +3 -0
- package/lib/Components/Callouts/Factories/calloutRepoFactory.js +19 -0
- package/lib/Components/Callouts/Factories/index.d.ts +3 -0
- package/lib/Components/Callouts/Factories/index.js +15 -0
- package/lib/Components/Callouts/Factories/setupCallouts.d.ts +2 -0
- package/lib/Components/Callouts/Factories/setupCallouts.js +24 -0
- package/lib/Components/Callouts/index.d.ts +1 -0
- package/lib/Components/Callouts/index.js +1 -0
- package/lib/Components/Camera/Factories/index.d.ts +1 -0
- package/lib/Components/Camera/Factories/index.js +13 -0
- package/lib/Components/Camera/Factories/setupCamera.d.ts +2 -0
- package/lib/Components/Camera/Factories/setupCamera.js +15 -0
- package/lib/Components/Camera/index.d.ts +1 -0
- package/lib/Components/Camera/index.js +1 -0
- package/lib/Components/Challenge/Factories/index.d.ts +1 -0
- package/lib/Components/Challenge/Factories/index.js +13 -0
- package/lib/Components/Challenge/Factories/setupChallenge.d.ts +2 -0
- package/lib/Components/Challenge/Factories/setupChallenge.js +46 -0
- package/lib/Components/Challenge/UCs/SetChallengeUC.d.ts +1 -1
- package/lib/Components/Challenge/index.d.ts +1 -0
- package/lib/Components/Challenge/index.js +1 -0
- package/lib/Components/ChannelModel/Factories/channelModelFactory.d.ts +3 -0
- package/lib/Components/ChannelModel/Factories/channelModelFactory.js +14 -0
- package/lib/Components/ChannelModel/Factories/channelObjectFactory.d.ts +3 -0
- package/lib/Components/ChannelModel/Factories/channelObjectFactory.js +19 -0
- package/lib/Components/ChannelModel/Factories/index.d.ts +3 -0
- package/lib/Components/ChannelModel/Factories/index.js +15 -0
- package/lib/Components/ChannelModel/Factories/setupChannelModels.d.ts +2 -0
- package/lib/Components/ChannelModel/Factories/setupChannelModels.js +25 -0
- package/lib/Components/ChannelModel/index.d.ts +1 -0
- package/lib/Components/ChannelModel/index.js +1 -0
- package/lib/Components/Dispatcher/Factories/index.d.ts +1 -0
- package/lib/Components/Dispatcher/Factories/index.js +13 -0
- package/lib/Components/Dispatcher/Factories/setupDispatchers.d.ts +3 -0
- package/lib/Components/Dispatcher/Factories/setupDispatchers.js +35 -0
- package/lib/Components/Dispatcher/index.d.ts +1 -0
- package/lib/Components/Dispatcher/index.js +1 -0
- package/lib/Components/GLBModel/Factories/glbModelFactory.d.ts +3 -0
- package/lib/Components/GLBModel/Factories/glbModelFactory.js +12 -0
- package/lib/Components/GLBModel/Factories/index.d.ts +2 -0
- package/lib/Components/GLBModel/Factories/index.js +14 -0
- package/lib/Components/GLBModel/Factories/setupGLBModel.d.ts +2 -0
- package/lib/Components/GLBModel/Factories/setupGLBModel.js +11 -0
- package/lib/Components/GLBModel/index.d.ts +1 -0
- package/lib/Components/GLBModel/index.js +1 -0
- package/lib/Components/KeyboardInput/Factories/index.d.ts +1 -0
- package/lib/Components/KeyboardInput/Factories/index.js +13 -0
- package/lib/Components/KeyboardInput/Factories/setupKeyboard.d.ts +2 -0
- package/lib/Components/KeyboardInput/Factories/setupKeyboard.js +9 -0
- package/lib/Components/KeyboardInput/index.d.ts +1 -0
- package/lib/Components/KeyboardInput/index.js +1 -0
- package/lib/Components/LabelDrop/Factories/index.d.ts +2 -0
- package/lib/Components/LabelDrop/Factories/index.js +14 -0
- package/lib/Components/LabelDrop/Factories/labelDropItemFactory.d.ts +3 -0
- package/lib/Components/LabelDrop/Factories/labelDropItemFactory.js +24 -0
- package/lib/Components/LabelDrop/Factories/setupLabelDrop.d.ts +2 -0
- package/lib/Components/LabelDrop/Factories/setupLabelDrop.js +51 -0
- package/lib/Components/LabelDrop/index.d.ts +1 -0
- package/lib/Components/LabelDrop/index.js +1 -0
- package/lib/Components/Landmarks/Factories/index.d.ts +3 -0
- package/lib/Components/Landmarks/Factories/index.js +15 -0
- package/lib/Components/Landmarks/Factories/landmarkFactory.d.ts +3 -0
- package/lib/Components/Landmarks/Factories/landmarkFactory.js +40 -0
- package/lib/Components/Landmarks/Factories/landmarkRepoFactory.d.ts +3 -0
- package/lib/Components/Landmarks/Factories/landmarkRepoFactory.js +16 -0
- package/lib/Components/Landmarks/Factories/setupLandmarks.d.ts +2 -0
- package/lib/Components/Landmarks/Factories/setupLandmarks.js +32 -0
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.d.ts +2 -2
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +2 -2
- package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.d.ts +2 -2
- package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.js +2 -2
- package/lib/Components/Landmarks/index.d.ts +1 -0
- package/lib/Components/Landmarks/index.js +1 -0
- package/lib/Components/ObjectPick/Factories/index.d.ts +1 -0
- package/lib/Components/ObjectPick/Factories/index.js +13 -0
- package/lib/Components/ObjectPick/Factories/setupObjectPick.d.ts +2 -0
- package/lib/Components/ObjectPick/Factories/setupObjectPick.js +26 -0
- package/lib/Components/ObjectPick/index.d.ts +1 -0
- package/lib/Components/ObjectPick/index.js +1 -0
- package/lib/Components/Question/Adapters/index.d.ts +2 -0
- package/lib/Components/Question/Adapters/index.js +14 -0
- package/lib/Components/Question/Adapters/questionAnswerAdapter.d.ts +3 -0
- package/lib/Components/Question/Adapters/questionAnswerAdapter.js +27 -0
- package/lib/Components/Question/Adapters/questionChallengeAdapter.d.ts +3 -0
- package/lib/Components/Question/Adapters/questionChallengeAdapter.js +23 -0
- package/lib/Components/Question/Factories/index.d.ts +2 -0
- package/lib/Components/Question/Factories/index.js +14 -0
- package/lib/Components/Question/Factories/setupQuestionAnswer.d.ts +3 -0
- package/lib/Components/Question/Factories/setupQuestionAnswer.js +18 -0
- package/lib/Components/Question/Factories/setupQuestionChallenge.d.ts +3 -0
- package/lib/Components/Question/Factories/setupQuestionChallenge.js +20 -0
- package/lib/Components/Question/Mocks/QuestionAnswerPmMock.d.ts +7 -0
- package/lib/Components/Question/Mocks/QuestionAnswerPmMock.js +11 -0
- package/lib/Components/Question/Mocks/QuestionChallengePmMock.d.ts +8 -0
- package/lib/Components/Question/Mocks/QuestionChallengePmMock.js +15 -0
- package/lib/Components/Question/Mocks/index.d.ts +2 -0
- package/lib/Components/Question/Mocks/index.js +2 -0
- package/lib/Components/Question/PM/QuestionAnswerPM.d.ts +4 -6
- package/lib/Components/Question/PM/QuestionAnswerPM.js +20 -7
- package/lib/Components/Question/PM/QuestionChallengePM.d.ts +2 -7
- package/lib/Components/Question/PM/QuestionChallengePM.js +18 -8
- package/lib/Components/Question/index.d.ts +2 -0
- package/lib/Components/Question/index.js +2 -0
- package/lib/Components/RequestHandler/Factories/index.d.ts +1 -0
- package/lib/Components/RequestHandler/Factories/index.js +13 -0
- package/lib/Components/RequestHandler/Factories/setupAppHandlers.d.ts +3 -0
- package/lib/Components/RequestHandler/Factories/setupAppHandlers.js +20 -0
- package/lib/Components/RequestHandler/index.d.ts +1 -0
- package/lib/Components/RequestHandler/index.js +1 -0
- package/lib/Components/StateMachine/Factories/index.d.ts +1 -0
- package/lib/Components/StateMachine/Factories/index.js +13 -0
- package/lib/Components/StateMachine/Factories/setupStateMachine.d.ts +2 -0
- package/lib/Components/StateMachine/Factories/setupStateMachine.js +12 -0
- package/lib/Components/StateMachine/index.d.ts +1 -0
- package/lib/Components/StateMachine/index.js +1 -0
- package/lib/Components/ThemeColors/Factories/index.d.ts +1 -0
- package/lib/Components/ThemeColors/Factories/index.js +13 -0
- package/lib/Components/ThemeColors/Factories/setupTheme.d.ts +2 -0
- package/lib/Components/ThemeColors/Factories/setupTheme.js +12 -0
- package/lib/Components/ThemeColors/index.d.ts +1 -0
- package/lib/Components/ThemeColors/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupQuestionChallenge = void 0;
|
|
4
|
+
const Entities_1 = require("../Entities");
|
|
5
|
+
const PM_1 = require("../PM");
|
|
6
|
+
const UC_1 = require("../UC");
|
|
7
|
+
const setupQuestionAnswer_1 = require("./setupQuestionAnswer");
|
|
8
|
+
function setupQuestionChallenge(appObjects) {
|
|
9
|
+
const ao = appObjects.getOrCreate("QuestionChallenge");
|
|
10
|
+
const questionEntity = Entities_1.makeQuestionEntity(ao);
|
|
11
|
+
UC_1.makeAddQuestionAnswerUC(ao);
|
|
12
|
+
UC_1.makeDeleteQuestionAnswerUC(ao);
|
|
13
|
+
UC_1.makeSubmitQuestionAnswerUC(ao);
|
|
14
|
+
new UC_1.SerializeQuestionChallenge(ao);
|
|
15
|
+
UC_1.makeValidateQuestionChallengeStateUC(ao);
|
|
16
|
+
PM_1.makeQuestionChallengePM(ao);
|
|
17
|
+
questionEntity.answerFactory = (id) => setupQuestionAnswer_1.setupQuestionAnswer(appObjects, id);
|
|
18
|
+
return questionEntity;
|
|
19
|
+
}
|
|
20
|
+
exports.setupQuestionChallenge = setupQuestionChallenge;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { QuestionAnswerPM } from "../PM/QuestionAnswerPM";
|
|
4
|
+
export declare class QuestionAnswerPmMock extends QuestionAnswerPM {
|
|
5
|
+
vmsAreEqual: jest.Mock<any, any>;
|
|
6
|
+
constructor(appObject: AppObject);
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuestionAnswerPmMock = void 0;
|
|
4
|
+
const QuestionAnswerPM_1 = require("../PM/QuestionAnswerPM");
|
|
5
|
+
class QuestionAnswerPmMock extends QuestionAnswerPM_1.QuestionAnswerPM {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, QuestionAnswerPM_1.QuestionAnswerPM.type);
|
|
8
|
+
this.vmsAreEqual = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.QuestionAnswerPmMock = QuestionAnswerPmMock;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
+
import { QuestionChallengePM } from "../PM/QuestionChallengePM";
|
|
4
|
+
export declare class QuestionChallengePmMock extends QuestionChallengePM {
|
|
5
|
+
vmsAreEqual: jest.Mock<any, any>;
|
|
6
|
+
constructor(appObject: AppObject);
|
|
7
|
+
}
|
|
8
|
+
export declare function makeQuestionChallengePmMock(appObjects: AppObjectRepo): QuestionChallengePmMock;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeQuestionChallengePmMock = exports.QuestionChallengePmMock = void 0;
|
|
4
|
+
const QuestionChallengePM_1 = require("../PM/QuestionChallengePM");
|
|
5
|
+
class QuestionChallengePmMock extends QuestionChallengePM_1.QuestionChallengePM {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, QuestionChallengePM_1.QuestionChallengePM.type);
|
|
8
|
+
this.vmsAreEqual = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.QuestionChallengePmMock = QuestionChallengePmMock;
|
|
12
|
+
function makeQuestionChallengePmMock(appObjects) {
|
|
13
|
+
return new QuestionChallengePmMock(appObjects.getOrCreate("QuestionChallengePmMock"));
|
|
14
|
+
}
|
|
15
|
+
exports.makeQuestionChallengePmMock = makeQuestionChallengePmMock;
|
|
@@ -12,3 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./MockQuestionAnswerEntity"), exports);
|
|
14
14
|
__exportStar(require("./MockValidateQuestion"), exports);
|
|
15
|
+
__exportStar(require("./QuestionAnswerPmMock"), exports);
|
|
16
|
+
__exportStar(require("./QuestionChallengePmMock"), exports);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppObjectRepo } from "../../../AppObject";
|
|
1
2
|
import { AppObject } from "../../../AppObject/AppObject";
|
|
2
3
|
import { AppObjectPM } from "../../../AppObject/AppObjectPM";
|
|
3
4
|
export declare const defaultQuestionChallengeAnswerVM: QuestionAnswerVM;
|
|
@@ -8,12 +9,9 @@ export interface QuestionAnswerVM {
|
|
|
8
9
|
textValidation?: string;
|
|
9
10
|
feedbackValidation?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare class QuestionAnswerPM extends AppObjectPM<QuestionAnswerVM> {
|
|
12
|
+
export declare abstract class QuestionAnswerPM extends AppObjectPM<QuestionAnswerVM> {
|
|
12
13
|
static readonly type = "QuestionAnswerPM";
|
|
13
14
|
static get(appObject: AppObject): QuestionAnswerPM | undefined;
|
|
14
|
-
|
|
15
|
-
vmsAreEqual(a: QuestionAnswerVM, b: QuestionAnswerVM): boolean;
|
|
16
|
-
dispose: () => void;
|
|
17
|
-
private onAnswerChange;
|
|
18
|
-
constructor(appObject: AppObject);
|
|
15
|
+
static getByID(id: string, appObjects: AppObjectRepo): QuestionAnswerPM | undefined;
|
|
19
16
|
}
|
|
17
|
+
export declare function makeQuestionAnswerPM(appObject: AppObject): QuestionAnswerPM;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuestionAnswerPM = exports.defaultQuestionChallengeAnswerVM = void 0;
|
|
3
|
+
exports.makeQuestionAnswerPM = exports.QuestionAnswerPM = exports.defaultQuestionChallengeAnswerVM = void 0;
|
|
4
4
|
const AppObjectPM_1 = require("../../../AppObject/AppObjectPM");
|
|
5
5
|
const QuestionAnswerEntity_1 = require("../Entities/QuestionAnswerEntity");
|
|
6
6
|
exports.defaultQuestionChallengeAnswerVM = {
|
|
@@ -9,6 +9,22 @@ exports.defaultQuestionChallengeAnswerVM = {
|
|
|
9
9
|
isCorrect: false,
|
|
10
10
|
};
|
|
11
11
|
class QuestionAnswerPM extends AppObjectPM_1.AppObjectPM {
|
|
12
|
+
static get(appObject) {
|
|
13
|
+
return appObject.getComponent(QuestionAnswerPM.type);
|
|
14
|
+
}
|
|
15
|
+
static getByID(id, appObjects) {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = appObjects
|
|
18
|
+
.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(QuestionAnswerPM.type);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.QuestionAnswerPM = QuestionAnswerPM;
|
|
22
|
+
QuestionAnswerPM.type = "QuestionAnswerPM";
|
|
23
|
+
function makeQuestionAnswerPM(appObject) {
|
|
24
|
+
return new QuestionAnswerPMImp(appObject);
|
|
25
|
+
}
|
|
26
|
+
exports.makeQuestionAnswerPM = makeQuestionAnswerPM;
|
|
27
|
+
class QuestionAnswerPMImp extends QuestionAnswerPM {
|
|
12
28
|
constructor(appObject) {
|
|
13
29
|
super(appObject, QuestionAnswerPM.type);
|
|
14
30
|
this.dispose = () => {
|
|
@@ -29,17 +45,16 @@ class QuestionAnswerPM extends AppObjectPM_1.AppObjectPM {
|
|
|
29
45
|
};
|
|
30
46
|
this.doUpdateView(vm);
|
|
31
47
|
};
|
|
32
|
-
this.answer = appObject.getComponent(QuestionAnswerEntity_1.QuestionAnswerEntity.type);
|
|
33
48
|
if (this.answer) {
|
|
34
49
|
this.answer.addChangeObserver(this.onAnswerChange);
|
|
35
50
|
this.onAnswerChange();
|
|
36
51
|
}
|
|
37
52
|
else {
|
|
38
|
-
this.
|
|
53
|
+
this.error("QuestionAnswerPM has been added to an app object that does not have QuestionAnswerEntity");
|
|
39
54
|
}
|
|
40
55
|
}
|
|
41
|
-
|
|
42
|
-
return
|
|
56
|
+
get answer() {
|
|
57
|
+
return this.getCachedLocalComponent(QuestionAnswerEntity_1.QuestionAnswerEntity.type);
|
|
43
58
|
}
|
|
44
59
|
vmsAreEqual(a, b) {
|
|
45
60
|
if (a.answerText !== b.answerText)
|
|
@@ -55,5 +70,3 @@ class QuestionAnswerPM extends AppObjectPM_1.AppObjectPM {
|
|
|
55
70
|
return true;
|
|
56
71
|
}
|
|
57
72
|
}
|
|
58
|
-
exports.QuestionAnswerPM = QuestionAnswerPM;
|
|
59
|
-
QuestionAnswerPM.type = "QuestionAnswerPM";
|
|
@@ -9,13 +9,8 @@ export interface QuestionChallengeVM {
|
|
|
9
9
|
reviewFeedback: string;
|
|
10
10
|
validationMessage?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare class QuestionChallengePM extends AppObjectPM<QuestionChallengeVM> {
|
|
12
|
+
export declare abstract class QuestionChallengePM extends AppObjectPM<QuestionChallengeVM> {
|
|
13
13
|
static readonly type = "QuestionChallengePM";
|
|
14
14
|
static get: (appObjects: AppObjectRepo) => QuestionChallengePM | undefined;
|
|
15
|
-
private questionEntity?;
|
|
16
|
-
private baseAppState?;
|
|
17
|
-
private onEntityChange;
|
|
18
|
-
vmsAreEqual(a: QuestionChallengeVM, b: QuestionChallengeVM): boolean;
|
|
19
|
-
dispose: () => void;
|
|
20
|
-
constructor(appObject: AppObject);
|
|
21
15
|
}
|
|
16
|
+
export declare function makeQuestionChallengePM(appObject: AppObject): QuestionChallengePM;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuestionChallengePM = exports.defaultQuestionChallengeVM = exports.SLIDE_TEXT_CANNOT_BE_FALSY = void 0;
|
|
3
|
+
exports.makeQuestionChallengePM = exports.QuestionChallengePM = exports.defaultQuestionChallengeVM = exports.SLIDE_TEXT_CANNOT_BE_FALSY = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const AppObjectPM_1 = require("../../../AppObject/AppObjectPM");
|
|
6
6
|
const BaseApp_1 = require("../../BaseApp");
|
|
@@ -12,6 +12,15 @@ exports.defaultQuestionChallengeVM = {
|
|
|
12
12
|
reviewFeedback: "",
|
|
13
13
|
};
|
|
14
14
|
class QuestionChallengePM extends AppObjectPM_1.AppObjectPM {
|
|
15
|
+
}
|
|
16
|
+
exports.QuestionChallengePM = QuestionChallengePM;
|
|
17
|
+
QuestionChallengePM.type = "QuestionChallengePM";
|
|
18
|
+
QuestionChallengePM.get = (appObjects) => AppObject_1.getSingletonComponent(QuestionChallengePM.type, appObjects);
|
|
19
|
+
function makeQuestionChallengePM(appObject) {
|
|
20
|
+
return new QuestionChallengePMImp(appObject);
|
|
21
|
+
}
|
|
22
|
+
exports.makeQuestionChallengePM = makeQuestionChallengePM;
|
|
23
|
+
class QuestionChallengePMImp extends QuestionChallengePM {
|
|
15
24
|
constructor(appObject) {
|
|
16
25
|
super(appObject, QuestionChallengePM.type);
|
|
17
26
|
this.onEntityChange = () => {
|
|
@@ -39,24 +48,28 @@ class QuestionChallengePM extends AppObjectPM_1.AppObjectPM {
|
|
|
39
48
|
(_a = this.questionEntity) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onEntityChange);
|
|
40
49
|
(_b = this.baseAppState) === null || _b === void 0 ? void 0 : _b.removeChangeObserver(this.onEntityChange);
|
|
41
50
|
};
|
|
42
|
-
this.baseAppState = BaseApp_1.BaseAppState.get(this.appObjects);
|
|
43
51
|
if (!this.baseAppState) {
|
|
44
|
-
this.
|
|
52
|
+
this.error("Unable to find BaseAppStateEntity");
|
|
45
53
|
return;
|
|
46
54
|
}
|
|
47
55
|
else {
|
|
48
56
|
this.baseAppState.addChangeObserver(this.onEntityChange);
|
|
49
57
|
this.onEntityChange();
|
|
50
58
|
}
|
|
51
|
-
this.questionEntity = appObject.getComponent(QuestionEntity_1.QuestionEntity.type);
|
|
52
59
|
if (this.questionEntity) {
|
|
53
60
|
this.questionEntity.addChangeObserver(this.onEntityChange);
|
|
54
61
|
this.onEntityChange();
|
|
55
62
|
}
|
|
56
63
|
else {
|
|
57
|
-
this.
|
|
64
|
+
this.error("Unable to find QuestionEntity");
|
|
58
65
|
}
|
|
59
66
|
}
|
|
67
|
+
get questionEntity() {
|
|
68
|
+
return this.getCachedSingleton(QuestionEntity_1.QuestionEntity.type);
|
|
69
|
+
}
|
|
70
|
+
get baseAppState() {
|
|
71
|
+
return this.getCachedSingleton(BaseApp_1.BaseAppState.type);
|
|
72
|
+
}
|
|
60
73
|
vmsAreEqual(a, b) {
|
|
61
74
|
if (a.gotItRight !== b.gotItRight)
|
|
62
75
|
return false;
|
|
@@ -74,6 +87,3 @@ class QuestionChallengePM extends AppObjectPM_1.AppObjectPM {
|
|
|
74
87
|
return idsMatch;
|
|
75
88
|
}
|
|
76
89
|
}
|
|
77
|
-
exports.QuestionChallengePM = QuestionChallengePM;
|
|
78
|
-
QuestionChallengePM.type = "QuestionChallengePM";
|
|
79
|
-
QuestionChallengePM.get = (appObjects) => AppObject_1.getSingletonComponent(QuestionChallengePM.type, appObjects);
|
|
@@ -10,8 +10,10 @@ 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("./Controllers"), exports);
|
|
14
15
|
__exportStar(require("./Entities"), exports);
|
|
16
|
+
__exportStar(require("./Factories"), exports);
|
|
15
17
|
__exportStar(require("./Mocks"), exports);
|
|
16
18
|
__exportStar(require("./PM"), exports);
|
|
17
19
|
__exportStar(require("./UC"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./setupAppHandlers";
|
|
@@ -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("./setupAppHandlers"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupAppHandlers = void 0;
|
|
4
|
+
const Entities_1 = require("../Entities");
|
|
5
|
+
const UC_1 = require("../UC");
|
|
6
|
+
function setupAppHandlers(appObjects) {
|
|
7
|
+
const handlerAO = appObjects.getOrCreate("AppHandlers");
|
|
8
|
+
const appHandler = Entities_1.makeAppHandler(handlerAO);
|
|
9
|
+
UC_1.makeDisposeAppUC(handlerAO);
|
|
10
|
+
UC_1.makeSetAppStateUC(handlerAO);
|
|
11
|
+
UC_1.makeSetIsAuthoringUC(handlerAO);
|
|
12
|
+
UC_1.makeSetThemeColorUC(handlerAO);
|
|
13
|
+
UC_1.makeShowBabylonInspectorUC(handlerAO);
|
|
14
|
+
UC_1.makeStartAppUC(handlerAO);
|
|
15
|
+
UC_1.makeStartZSpaceUC(handlerAO);
|
|
16
|
+
UC_1.makeStopAppUC(handlerAO);
|
|
17
|
+
UC_1.makeStopZSpaceUC(handlerAO);
|
|
18
|
+
return appHandler;
|
|
19
|
+
}
|
|
20
|
+
exports.setupAppHandlers = setupAppHandlers;
|
|
@@ -11,4 +11,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./Entities"), exports);
|
|
14
|
+
__exportStar(require("./Factories"), exports);
|
|
14
15
|
__exportStar(require("./UC"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./setupStateMachine";
|
|
@@ -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("./setupStateMachine"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupStateMachine = void 0;
|
|
4
|
+
const Utilities_1 = require("../../../Utilities");
|
|
5
|
+
const Entities_1 = require("../Entities");
|
|
6
|
+
function setupStateMachine(appObjects) {
|
|
7
|
+
const ao = appObjects.getOrCreate("StateMachine");
|
|
8
|
+
const stateMachine = Entities_1.makeStateMachineEntity(ao);
|
|
9
|
+
// Setup
|
|
10
|
+
stateMachine.transitionEaseFunction = Utilities_1.cubicInOut;
|
|
11
|
+
}
|
|
12
|
+
exports.setupStateMachine = setupStateMachine;
|
|
@@ -12,4 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./Controller"), exports);
|
|
14
14
|
__exportStar(require("./Entities"), exports);
|
|
15
|
+
__exportStar(require("./Factories"), exports);
|
|
15
16
|
__exportStar(require("./Mocks"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./setupTheme";
|
|
@@ -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("./setupTheme"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setupTheme = void 0;
|
|
4
|
+
const Entities_1 = require("../Entities");
|
|
5
|
+
const PM_1 = require("../PM");
|
|
6
|
+
function setupTheme(appObjects) {
|
|
7
|
+
const themeAO = appObjects.getOrCreate("ThemeColors");
|
|
8
|
+
Entities_1.makeThemeColors(themeAO);
|
|
9
|
+
// Setup PMs
|
|
10
|
+
new PM_1.ThemeColorMapPM(themeAO);
|
|
11
|
+
}
|
|
12
|
+
exports.setupTheme = setupTheme;
|
|
@@ -12,4 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./Controllers"), exports);
|
|
14
14
|
__exportStar(require("./Entities"), exports);
|
|
15
|
+
__exportStar(require("./Factories"), exports);
|
|
15
16
|
__exportStar(require("./PM"), exports);
|