@vived/app 6.6.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseApp/UC/RenderCanvasUC.js +17 -36
- package/dist/cjs/BaseApp/UC/RenderCanvasUC.js.map +1 -1
- package/dist/cjs/BaseApp/UC/RenderCanvasUC.test.js +18 -18
- package/dist/cjs/BaseApp/UC/RenderCanvasUC.test.js.map +1 -1
- package/dist/cjs/Challenge/Factories/ChallengeFeatureFactory.js +9 -28
- package/dist/cjs/Challenge/Factories/ChallengeFeatureFactory.js.map +1 -1
- package/dist/cjs/Challenge/Factories/ChallengeFeatureFactory.test.js +51 -0
- package/dist/cjs/Challenge/Factories/ChallengeFeatureFactory.test.js.map +1 -0
- package/dist/cjs/EventSystem/Entities/EventEntity.js +12 -2
- package/dist/cjs/EventSystem/Entities/EventEntity.js.map +1 -1
- package/dist/cjs/EventSystem/Entities/EventEntity.test.js +45 -0
- package/dist/cjs/EventSystem/Entities/EventEntity.test.js.map +1 -1
- package/dist/cjs/EventSystem/Mocks/MockEventEntity.js +7 -2
- package/dist/cjs/EventSystem/Mocks/MockEventEntity.js.map +1 -1
- package/dist/cjs/EventSystem/types.js.map +1 -1
- package/dist/cjs/ObjectPick/Factories/setupObjectPick.js +18 -1
- package/dist/cjs/ObjectPick/Factories/setupObjectPick.js.map +1 -1
- package/dist/cjs/ObjectPick/Factories/setupObjectPick.test.js +55 -0
- package/dist/cjs/ObjectPick/Factories/setupObjectPick.test.js.map +1 -0
- package/dist/cjs/Procedure/Adapters/procedureAdapter.js +1 -0
- package/dist/cjs/Procedure/Adapters/procedureAdapter.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureAdapter.test.js +1 -0
- package/dist/cjs/Procedure/Adapters/procedureAdapter.test.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureAuthoringAdapter.js +2 -0
- package/dist/cjs/Procedure/Adapters/procedureAuthoringAdapter.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureAuthoringAdapter.test.js +3 -0
- package/dist/cjs/Procedure/Adapters/procedureAuthoringAdapter.test.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureHintAdapter.test.js +1 -0
- package/dist/cjs/Procedure/Adapters/procedureHintAdapter.test.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureProgressAdapter.js +2 -0
- package/dist/cjs/Procedure/Adapters/procedureProgressAdapter.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureProgressAdapter.test.js +3 -0
- package/dist/cjs/Procedure/Adapters/procedureProgressAdapter.test.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureQuizResultAdapter.js +2 -0
- package/dist/cjs/Procedure/Adapters/procedureQuizResultAdapter.js.map +1 -1
- package/dist/cjs/Procedure/Adapters/procedureQuizResultAdapter.test.js +3 -0
- package/dist/cjs/Procedure/Adapters/procedureQuizResultAdapter.test.js.map +1 -1
- package/dist/cjs/Procedure/Entities/ProcedureEntity.js +163 -24
- package/dist/cjs/Procedure/Entities/ProcedureEntity.js.map +1 -1
- package/dist/cjs/Procedure/Entities/ProcedureEntity.test.js +240 -0
- package/dist/cjs/Procedure/Entities/ProcedureEntity.test.js.map +1 -1
- package/dist/cjs/Procedure/Factories/ProcedureFeatureFactory.js +20 -0
- package/dist/cjs/Procedure/Factories/ProcedureFeatureFactory.js.map +1 -1
- package/dist/cjs/Procedure/Factories/ProcedureFeatureFactory.test.js +25 -0
- package/dist/cjs/Procedure/Factories/ProcedureFeatureFactory.test.js.map +1 -1
- package/dist/cjs/Procedure/Mocks/MockProcedureEntity.js +2 -0
- package/dist/cjs/Procedure/Mocks/MockProcedureEntity.js.map +1 -1
- package/dist/cjs/Procedure/PM/ProcedurePM.js +13 -1
- package/dist/cjs/Procedure/PM/ProcedurePM.js.map +1 -1
- package/dist/cjs/Procedure/PM/ProcedurePM.test.js +34 -0
- package/dist/cjs/Procedure/PM/ProcedurePM.test.js.map +1 -1
- package/dist/cjs/Procedure/UCs/UpdateProcedureEventsUCHook.test.js +3 -0
- package/dist/cjs/Procedure/UCs/UpdateProcedureEventsUCHook.test.js.map +1 -1
- package/dist/cjs/Procedure/types.js.map +1 -1
- package/dist/cjs/TouchController/UC/UpdateTouchInoutBound.test.js +37 -0
- package/dist/cjs/TouchController/UC/UpdateTouchInoutBound.test.js.map +1 -1
- package/dist/cjs/TouchController/UC/UpdateTouchInputBound.js +17 -4
- package/dist/cjs/TouchController/UC/UpdateTouchInputBound.js.map +1 -1
- package/dist/esm/BaseApp/UC/RenderCanvasUC.js +17 -36
- package/dist/esm/BaseApp/UC/RenderCanvasUC.js.map +1 -1
- package/dist/esm/BaseApp/UC/RenderCanvasUC.test.js +18 -18
- package/dist/esm/BaseApp/UC/RenderCanvasUC.test.js.map +1 -1
- package/dist/esm/Challenge/Factories/ChallengeFeatureFactory.js +9 -28
- package/dist/esm/Challenge/Factories/ChallengeFeatureFactory.js.map +1 -1
- package/dist/esm/Challenge/Factories/ChallengeFeatureFactory.test.js +49 -0
- package/dist/esm/Challenge/Factories/ChallengeFeatureFactory.test.js.map +1 -0
- package/dist/esm/EventSystem/Entities/EventEntity.js +12 -2
- package/dist/esm/EventSystem/Entities/EventEntity.js.map +1 -1
- package/dist/esm/EventSystem/Entities/EventEntity.test.js +45 -0
- package/dist/esm/EventSystem/Entities/EventEntity.test.js.map +1 -1
- package/dist/esm/EventSystem/Mocks/MockEventEntity.js +7 -2
- package/dist/esm/EventSystem/Mocks/MockEventEntity.js.map +1 -1
- package/dist/esm/EventSystem/types.js.map +1 -1
- package/dist/esm/ObjectPick/Factories/setupObjectPick.js +18 -1
- package/dist/esm/ObjectPick/Factories/setupObjectPick.js.map +1 -1
- package/dist/esm/ObjectPick/Factories/setupObjectPick.test.js +53 -0
- package/dist/esm/ObjectPick/Factories/setupObjectPick.test.js.map +1 -0
- package/dist/esm/Procedure/Adapters/procedureAdapter.js +1 -0
- package/dist/esm/Procedure/Adapters/procedureAdapter.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureAdapter.test.js +1 -0
- package/dist/esm/Procedure/Adapters/procedureAdapter.test.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureAuthoringAdapter.js +2 -0
- package/dist/esm/Procedure/Adapters/procedureAuthoringAdapter.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureAuthoringAdapter.test.js +3 -0
- package/dist/esm/Procedure/Adapters/procedureAuthoringAdapter.test.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureHintAdapter.test.js +1 -0
- package/dist/esm/Procedure/Adapters/procedureHintAdapter.test.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureProgressAdapter.js +2 -0
- package/dist/esm/Procedure/Adapters/procedureProgressAdapter.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureProgressAdapter.test.js +3 -0
- package/dist/esm/Procedure/Adapters/procedureProgressAdapter.test.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureQuizResultAdapter.js +2 -0
- package/dist/esm/Procedure/Adapters/procedureQuizResultAdapter.js.map +1 -1
- package/dist/esm/Procedure/Adapters/procedureQuizResultAdapter.test.js +3 -0
- package/dist/esm/Procedure/Adapters/procedureQuizResultAdapter.test.js.map +1 -1
- package/dist/esm/Procedure/Entities/ProcedureEntity.js +163 -24
- package/dist/esm/Procedure/Entities/ProcedureEntity.js.map +1 -1
- package/dist/esm/Procedure/Entities/ProcedureEntity.test.js +240 -0
- package/dist/esm/Procedure/Entities/ProcedureEntity.test.js.map +1 -1
- package/dist/esm/Procedure/Factories/ProcedureFeatureFactory.js +20 -0
- package/dist/esm/Procedure/Factories/ProcedureFeatureFactory.js.map +1 -1
- package/dist/esm/Procedure/Factories/ProcedureFeatureFactory.test.js +26 -1
- package/dist/esm/Procedure/Factories/ProcedureFeatureFactory.test.js.map +1 -1
- package/dist/esm/Procedure/Mocks/MockProcedureEntity.js +2 -0
- package/dist/esm/Procedure/Mocks/MockProcedureEntity.js.map +1 -1
- package/dist/esm/Procedure/PM/ProcedurePM.js +13 -1
- package/dist/esm/Procedure/PM/ProcedurePM.js.map +1 -1
- package/dist/esm/Procedure/PM/ProcedurePM.test.js +34 -0
- package/dist/esm/Procedure/PM/ProcedurePM.test.js.map +1 -1
- package/dist/esm/Procedure/UCs/UpdateProcedureEventsUCHook.test.js +3 -0
- package/dist/esm/Procedure/UCs/UpdateProcedureEventsUCHook.test.js.map +1 -1
- package/dist/esm/Procedure/types.js.map +1 -1
- package/dist/esm/TouchController/UC/UpdateTouchInoutBound.test.js +37 -0
- package/dist/esm/TouchController/UC/UpdateTouchInoutBound.test.js.map +1 -1
- package/dist/esm/TouchController/UC/UpdateTouchInputBound.js +17 -4
- package/dist/esm/TouchController/UC/UpdateTouchInputBound.js.map +1 -1
- package/dist/types/Challenge/Factories/ChallengeFeatureFactory.d.ts +7 -16
- package/dist/types/Challenge/Factories/ChallengeFeatureFactory.d.ts.map +1 -1
- package/dist/types/Challenge/Factories/ChallengeFeatureFactory.test.d.ts +2 -0
- package/dist/types/Challenge/Factories/ChallengeFeatureFactory.test.d.ts.map +1 -0
- package/dist/types/EventSystem/Entities/EventEntity.d.ts +13 -2
- package/dist/types/EventSystem/Entities/EventEntity.d.ts.map +1 -1
- package/dist/types/EventSystem/Mocks/MockEventEntity.d.ts +3 -2
- package/dist/types/EventSystem/Mocks/MockEventEntity.d.ts.map +1 -1
- package/dist/types/EventSystem/types.d.ts +23 -0
- package/dist/types/EventSystem/types.d.ts.map +1 -1
- package/dist/types/ObjectPick/Factories/setupObjectPick.d.ts +10 -0
- package/dist/types/ObjectPick/Factories/setupObjectPick.d.ts.map +1 -1
- package/dist/types/ObjectPick/Factories/setupObjectPick.test.d.ts +2 -0
- package/dist/types/ObjectPick/Factories/setupObjectPick.test.d.ts.map +1 -0
- package/dist/types/Procedure/Adapters/procedureAdapter.d.ts.map +1 -1
- package/dist/types/Procedure/Adapters/procedureAuthoringAdapter.d.ts.map +1 -1
- package/dist/types/Procedure/Adapters/procedureProgressAdapter.d.ts.map +1 -1
- package/dist/types/Procedure/Adapters/procedureQuizResultAdapter.d.ts.map +1 -1
- package/dist/types/Procedure/Entities/ProcedureEntity.d.ts +10 -0
- package/dist/types/Procedure/Entities/ProcedureEntity.d.ts.map +1 -1
- package/dist/types/Procedure/Factories/ProcedureFeatureFactory.d.ts +6 -0
- package/dist/types/Procedure/Factories/ProcedureFeatureFactory.d.ts.map +1 -1
- package/dist/types/Procedure/Mocks/MockProcedureEntity.d.ts +3 -0
- package/dist/types/Procedure/Mocks/MockProcedureEntity.d.ts.map +1 -1
- package/dist/types/Procedure/types.d.ts +17 -1
- package/dist/types/Procedure/types.d.ts.map +1 -1
- package/dist/types/TouchController/UC/UpdateTouchInputBound.d.ts +11 -0
- package/dist/types/TouchController/UC/UpdateTouchInputBound.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/EventSystem/CONTEXT.md +29 -17
- package/dist/cjs/FramedScreen/Factories/setupStandardFramedScreen.test.js +0 -31
- package/dist/cjs/FramedScreen/Factories/setupStandardFramedScreen.test.js.map +0 -1
- package/dist/cjs/StateMachine/Controller/clickRestoreScene.js +0 -14
- package/dist/cjs/StateMachine/Controller/clickRestoreScene.js.map +0 -1
- package/dist/cjs/StateMachine/Controller/clickRestoreScene.test.js +0 -26
- package/dist/cjs/StateMachine/Controller/clickRestoreScene.test.js.map +0 -1
- package/dist/cjs/TestUtils/index.js +0 -18
- package/dist/cjs/TestUtils/index.js.map +0 -1
- package/dist/cjs/TestUtils/setupFeatureForTesting.js +0 -60
- package/dist/cjs/TestUtils/setupFeatureForTesting.js.map +0 -1
- package/dist/esm/FramedScreen/Factories/setupStandardFramedScreen.test.js +0 -29
- package/dist/esm/FramedScreen/Factories/setupStandardFramedScreen.test.js.map +0 -1
- package/dist/esm/StateMachine/Controller/clickRestoreScene.js +0 -11
- package/dist/esm/StateMachine/Controller/clickRestoreScene.js.map +0 -1
- package/dist/esm/StateMachine/Controller/clickRestoreScene.test.js +0 -24
- package/dist/esm/StateMachine/Controller/clickRestoreScene.test.js.map +0 -1
- package/dist/esm/TestUtils/index.js +0 -2
- package/dist/esm/TestUtils/index.js.map +0 -1
- package/dist/esm/TestUtils/setupFeatureForTesting.js +0 -57
- package/dist/esm/TestUtils/setupFeatureForTesting.js.map +0 -1
- package/dist/types/FramedScreen/Factories/setupStandardFramedScreen.test.d.ts +0 -2
- package/dist/types/FramedScreen/Factories/setupStandardFramedScreen.test.d.ts.map +0 -1
- package/dist/types/StateMachine/Controller/clickRestoreScene.d.ts +0 -3
- package/dist/types/StateMachine/Controller/clickRestoreScene.d.ts.map +0 -1
- package/dist/types/StateMachine/Controller/clickRestoreScene.test.d.ts +0 -2
- package/dist/types/StateMachine/Controller/clickRestoreScene.test.d.ts.map +0 -1
- package/dist/types/TestUtils/index.d.ts +0 -2
- package/dist/types/TestUtils/index.d.ts.map +0 -1
- package/dist/types/TestUtils/setupFeatureForTesting.d.ts +0 -48
- package/dist/types/TestUtils/setupFeatureForTesting.d.ts.map +0 -1
|
@@ -13,17 +13,14 @@ import { DomainFactory, AppObjectRepo } from "@vived/core";
|
|
|
13
13
|
* - 3 Presentation Models: makeChallengeAuthorHelpPM, makeChallengeConsumerHelpPM,
|
|
14
14
|
* makeSelectedChallengePM
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* This factory provides equivalent functionality to the setupChallenge function
|
|
20
|
-
* while maintaining backwards compatibility.
|
|
16
|
+
* Challenge kinds are not registered here. Each kind self-registers with the
|
|
17
|
+
* Challenge entity from its own feature factory, so a composition that declines
|
|
18
|
+
* a kind simply never registers it.
|
|
21
19
|
*
|
|
22
20
|
* @extends DomainFactory
|
|
23
21
|
*/
|
|
24
22
|
export declare class ChallengeFeatureFactory extends DomainFactory {
|
|
25
23
|
factoryName: string;
|
|
26
|
-
private challengeEntity?;
|
|
27
24
|
/**
|
|
28
25
|
* Sets up all entities required for the Challenge Feature.
|
|
29
26
|
*
|
|
@@ -52,13 +49,9 @@ export declare class ChallengeFeatureFactory extends DomainFactory {
|
|
|
52
49
|
/**
|
|
53
50
|
* Performs final setup operations after all components are initialized.
|
|
54
51
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* This method replicates the exact challenge registration logic and error
|
|
60
|
-
* handling patterns from the setupChallenge function to ensure functional
|
|
61
|
-
* equivalence.
|
|
52
|
+
* Nothing to do. Challenge kinds register themselves with the Challenge
|
|
53
|
+
* entity from their own feature factories, so this factory has no external
|
|
54
|
+
* wiring left to perform. Required by DomainFactory.
|
|
62
55
|
*/
|
|
63
56
|
finalSetup(): void;
|
|
64
57
|
}
|
|
@@ -66,9 +59,7 @@ export declare class ChallengeFeatureFactory extends DomainFactory {
|
|
|
66
59
|
* Factory function to create a new ChallengeFeatureFactory
|
|
67
60
|
*
|
|
68
61
|
* Creates and returns a new instance of ChallengeFeatureFactory that can be
|
|
69
|
-
* used to set up all Challenge Feature domain components.
|
|
70
|
-
* alternative to the legacy setupChallenge function while maintaining the
|
|
71
|
-
* same functionality and external challenge registration behavior.
|
|
62
|
+
* used to set up all Challenge Feature domain components.
|
|
72
63
|
*
|
|
73
64
|
* @param appObjectRepo The AppObjectRepo to create the Challenge AppObject from
|
|
74
65
|
* @returns A new ChallengeFeatureFactory instance
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChallengeFeatureFactory.d.ts","sourceRoot":"","sources":["../../../../src/Challenge/Factories/ChallengeFeatureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ChallengeFeatureFactory.d.ts","sourceRoot":"","sources":["../../../../src/Challenge/Factories/ChallengeFeatureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAa,aAAa,EAAE,MAAM,aAAa,CAAC;AActE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,WAAW,SAA6B;IAExC;;;;;OAKG;IACH,aAAa,IAAI,IAAI;IAIrB;;;;;;;;OAQG;IACH,QAAQ,IAAI,IAAI;IAQhB;;;;;;OAMG;IACH,QAAQ,IAAI,IAAI;IAOhB;;;;;;OAMG;IACH,UAAU,IAAI,IAAI;CAGnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,aAAa,GAC3B,uBAAuB,CAGzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChallengeFeatureFactory.test.d.ts","sourceRoot":"","sources":["../../../../src/Challenge/Factories/ChallengeFeatureFactory.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { AppObject, AppObjectEntity, AppObjectRepo } from "@vived/core";
|
|
2
|
-
import { EventDefinition } from "../types";
|
|
2
|
+
import { EventCategory, EventDefinition, EventRegistrationOptions } from "../types";
|
|
3
3
|
/**
|
|
4
4
|
* EventEntity represents a global singleton for event registration and logging.
|
|
5
5
|
* Only one instance exists in the application.
|
|
6
6
|
*/
|
|
7
7
|
export declare abstract class EventEntity extends AppObjectEntity {
|
|
8
8
|
static readonly type = "EventEntity";
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Register an event. `options.category` classifies it for scoring
|
|
11
|
+
* (`"assessed"` by default, or `"instructional"` for quiz-neutral guidance);
|
|
12
|
+
* see `EventCategory`. The two-argument form is unchanged.
|
|
13
|
+
*/
|
|
14
|
+
abstract register(id: string, name: string, options?: EventRegistrationOptions): void;
|
|
10
15
|
abstract emit(id: string): void;
|
|
11
16
|
abstract reset(): void;
|
|
12
17
|
abstract getRegisteredEvents(): EventDefinition[];
|
|
13
18
|
abstract getEmittedEvents(): string[];
|
|
14
19
|
abstract getLastEmittedId(): string | null;
|
|
20
|
+
/**
|
|
21
|
+
* The category an event was registered with. Unregistered ids and
|
|
22
|
+
* registrations that omitted the option are `"assessed"`, so every legacy
|
|
23
|
+
* consumer is classified exactly as before categories existed.
|
|
24
|
+
*/
|
|
25
|
+
abstract getEventCategory(id: string): EventCategory;
|
|
15
26
|
/**
|
|
16
27
|
* Register a callback that is invoked on every emission, with the emitted
|
|
17
28
|
* event ID. Unlike addChangeObserver, this fires for every emit() call —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventEntity.d.ts","sourceRoot":"","sources":["../../../../src/EventSystem/Entities/EventEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAGd,MAAM,aAAa,CAAC;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"EventEntity.d.ts","sourceRoot":"","sources":["../../../../src/EventSystem/Entities/EventEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAGd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,aAAa,EACb,eAAe,EACf,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,8BAAsB,WAAY,SAAQ,eAAe;IACvD,MAAM,CAAC,QAAQ,CAAC,IAAI,iBAAiB;IAErC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CACf,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,wBAAwB,GACjC,IAAI;IACP,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAC/B,QAAQ,CAAC,KAAK,IAAI,IAAI;IACtB,QAAQ,CAAC,mBAAmB,IAAI,eAAe,EAAE;IACjD,QAAQ,CAAC,gBAAgB,IAAI,MAAM,EAAE;IACrC,QAAQ,CAAC,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa;IAEpD;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAEvE,wDAAwD;IACxD,QAAQ,CAAC,sBAAsB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAE1E,MAAM,CAAC,GAAG,GAAI,YAAY,aAAa,KAAG,WAAW,GAAG,SAAS,CACX;CACvD;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAEjE"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AppObject, AppObjectRepo } from "@vived/core";
|
|
2
|
-
import { EventDefinition } from "../types";
|
|
2
|
+
import { EventCategory, EventDefinition, EventRegistrationOptions } from "../types";
|
|
3
3
|
import { EventEntity } from "../Entities/EventEntity";
|
|
4
4
|
export declare class MockEventEntity extends EventEntity {
|
|
5
5
|
private _registeredEvents;
|
|
6
6
|
private _emittedEvents;
|
|
7
7
|
private _lastEmittedId;
|
|
8
|
-
register: jest.Mock<void, [id: string, name: string], any>;
|
|
8
|
+
register: jest.Mock<void, [id: string, name: string, options?: EventRegistrationOptions | undefined], any>;
|
|
9
|
+
getEventCategory: jest.Mock<EventCategory, [id: string], any>;
|
|
9
10
|
emit: jest.Mock<void, [id: string], any>;
|
|
10
11
|
reset: jest.Mock<void, [], any>;
|
|
11
12
|
getRegisteredEvents: jest.Mock<EventDefinition[], [], any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockEventEntity.d.ts","sourceRoot":"","sources":["../../../../src/EventSystem/Mocks/MockEventEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"MockEventEntity.d.ts","sourceRoot":"","sources":["../../../../src/EventSystem/Mocks/MockEventEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,aAAa,EACb,eAAe,EACf,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,OAAO,CAAC,iBAAiB,CAAyB;IAClD,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,cAAc,CAAuB;IAE7C,QAAQ,mGAQN;IAEF,gBAAgB,8CAGd;IAEF,IAAI,qCAGD;IAEH,KAAK,2BAGF;IAEH,mBAAmB,wCAA8C;IACjE,gBAAgB,+BAA2C;IAC3D,gBAAgB,oCAAsC;IACtD,mBAAmB,2BAAa;IAChC,sBAAsB,2BAAa;gBAEvB,SAAS,EAAE,SAAS;CAGjC;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,mBAE5D"}
|
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
* TypeScript type definitions for the EventSystem feature.
|
|
3
3
|
* Defines interfaces for event definitions and factory-related types.
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* The scoring semantics of an event, named by what the event means for a quiz —
|
|
7
|
+
* not by where it comes from (the consuming app decides, this package only knows
|
|
8
|
+
* the rule):
|
|
9
|
+
* - `"assessed"` — the event represents a task outcome; scored, counted toward
|
|
10
|
+
* progress and shown in a quiz.
|
|
11
|
+
* - `"instructional"` — guidance (e.g. arriving at a viewpoint); an ordinary step
|
|
12
|
+
* in training, but quiz-neutral: hidden and excluded from score and progress.
|
|
13
|
+
*/
|
|
14
|
+
export type EventCategory = "assessed" | "instructional";
|
|
15
|
+
/**
|
|
16
|
+
* Optional settings accepted by `EventEntity.register(id, name, options)`.
|
|
17
|
+
*/
|
|
18
|
+
export interface EventRegistrationOptions {
|
|
19
|
+
/** Defaults to `"assessed"` when omitted. */
|
|
20
|
+
category?: EventCategory;
|
|
21
|
+
}
|
|
5
22
|
/**
|
|
6
23
|
* Represents a registered event definition with unique ID and human-readable name
|
|
7
24
|
*/
|
|
@@ -10,5 +27,11 @@ export interface EventDefinition {
|
|
|
10
27
|
id: string;
|
|
11
28
|
/** Human-readable name for the event */
|
|
12
29
|
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Present only when the registration passed a category. Absent means
|
|
32
|
+
* `"assessed"` — read it through `EventEntity.getEventCategory(id)`, which
|
|
33
|
+
* normalizes the default, rather than from this field.
|
|
34
|
+
*/
|
|
35
|
+
category?: EventCategory;
|
|
13
36
|
}
|
|
14
37
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/EventSystem/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/EventSystem/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,eAAe,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { AppObjectRepo } from "@vived/core";
|
|
2
|
+
/**
|
|
3
|
+
* Legacy setup for the ObjectPick Feature. Prefer ObjectPickFeatureFactory.
|
|
4
|
+
*
|
|
5
|
+
* ORDERING: wire the Challenge Feature *before* calling this. ObjectPick
|
|
6
|
+
* registers itself as a Challenge kind, and it can only do so if the
|
|
7
|
+
* ChallengeEntity already exists - ChallengeFeatureFactory no longer registers
|
|
8
|
+
* kinds on their behalf. Called with no Challenge Feature present, the
|
|
9
|
+
* registration is skipped silently, which is the supported state for a
|
|
10
|
+
* composition that has declined the Challenge Feature.
|
|
11
|
+
*/
|
|
2
12
|
export declare function setupObjectPick(appObjects: AppObjectRepo): void;
|
|
3
13
|
//# sourceMappingURL=setupObjectPick.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupObjectPick.d.ts","sourceRoot":"","sources":["../../../../src/ObjectPick/Factories/setupObjectPick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"setupObjectPick.d.ts","sourceRoot":"","sources":["../../../../src/ObjectPick/Factories/setupObjectPick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAmB5C;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,aAAa,QA4BxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupObjectPick.test.d.ts","sourceRoot":"","sources":["../../../../src/ObjectPick/Factories/setupObjectPick.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedureAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,cAAM,gBAAiB,YAAW,kBAAkB,CAAC,WAAW,CAAC;IAC/D,SAAS,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"procedureAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,cAAM,gBAAiB,YAAW,kBAAkB,CAAC,WAAW,CAAC;IAC/D,SAAS,EAAE,WAAW,CAkBpB;IAEF,SAAS,CAAC,UAAU,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI;IAQ5E,WAAW,CACT,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,GAC/B,IAAI;CAMR;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedureAuthoringAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureAuthoringAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"procedureAuthoringAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureAuthoringAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAe,MAAM,UAAU,CAAC;AAc7D,cAAM,yBACJ,YAAW,kBAAkB,CAAC,oBAAoB,CAAC;IAEnD,SAAS,EAAE,oBAAoB,CAS7B;IAEF,OAAO,CAAC,QAAQ,CAGZ;IAEJ,SAAS,CACP,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,oBAAoB,KAAK,IAAI,GACxC,IAAI;IASP,WAAW,CACT,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,oBAAoB,KAAK,IAAI,GACxC,IAAI;CASR;AAED,eAAO,MAAM,yBAAyB,2BAAkC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedureProgressAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureProgressAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"procedureProgressAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureProgressAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAe,MAAM,UAAU,CAAC;AAiB5D,cAAM,wBACJ,YAAW,kBAAkB,CAAC,mBAAmB,CAAC;IAElD,SAAS,EAAE,mBAAmB,CAW5B;IAEF,OAAO,CAAC,QAAQ,CAGZ;IAEJ,SAAS,CACP,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,IAAI,GACvC,IAAI;IASP,WAAW,CACT,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,IAAI,GACvC,IAAI;CASR;AAED,eAAO,MAAM,wBAAwB,0BAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedureQuizResultAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureQuizResultAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAe,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"procedureQuizResultAdapter.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Adapters/procedureQuizResultAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAe,MAAM,UAAU,CAAC;AAiB9D,cAAM,0BACJ,YAAW,kBAAkB,CAAC,qBAAqB,CAAC;IAEpD,SAAS,EAAE,qBAAqB,CAW9B;IAEF,OAAO,CAAC,QAAQ,CAGZ;IAEJ,SAAS,CACP,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,qBAAqB,KAAK,IAAI,GACzC,IAAI;IASP,WAAW,CACT,UAAU,EAAE,aAAa,EACzB,KAAK,EAAE,CAAC,EAAE,EAAE,qBAAqB,KAAK,IAAI,GACzC,IAAI;CASR;AAED,eAAO,MAAM,0BAA0B,4BAAmC,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AppObject, AppObjectEntity, AppObjectRepo } from "@vived/core";
|
|
2
2
|
import { Challenge } from "../../Challenge";
|
|
3
|
+
import { EventCategory } from "../../EventSystem/types";
|
|
4
|
+
import { EventCategoryLookup } from "../types";
|
|
3
5
|
export declare abstract class ProcedureEntity extends AppObjectEntity implements Challenge {
|
|
4
6
|
static readonly type = "ProcedureEntity";
|
|
5
7
|
readonly challengeID = "PROCEDURE";
|
|
@@ -40,6 +42,14 @@ export declare abstract class ProcedureEntity extends AppObjectEntity implements
|
|
|
40
42
|
abstract setIsQuiz(isQuiz: boolean): void;
|
|
41
43
|
abstract get isRecording(): boolean;
|
|
42
44
|
abstract setIsRecording(value: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* Inject the Registry lookup used to classify steps (#53). Wired by the
|
|
47
|
+
* FeatureFactory; evaluated at call time so late registrations are seen.
|
|
48
|
+
* With no lookup injected every step is "assessed".
|
|
49
|
+
*/
|
|
50
|
+
abstract setEventCategoryLookup(lookup: EventCategoryLookup): void;
|
|
51
|
+
/** The category of an authored (or any) event id, via the injected lookup. */
|
|
52
|
+
abstract getEventCategory(eventId: string): EventCategory;
|
|
43
53
|
abstract getProgressPercentage(): number;
|
|
44
54
|
abstract calculateScore(): {
|
|
45
55
|
percentage: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcedureEntity.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Entities/ProcedureEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAGd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProcedureEntity.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Entities/ProcedureEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EAGd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,8BAAsB,eACpB,SAAQ,eACR,YAAW,SAAS;IAEpB,MAAM,CAAC,QAAQ,CAAC,IAAI,qBAAqB;IAEzC,QAAQ,CAAC,WAAW,eAAe;IACnC,IAAI,SAAe;IACnB,QAAQ,KAAK,WAAW,IAAI,MAAM,CAAC;IACnC,QAAQ,KAAK,gBAAgB,IAAI,MAAM,CAAC;IACxC,cAAc,SAC+D;IAE7E,QAAQ,KAAK,QAAQ,IAAI,MAAM,EAAE,CAAC;IAClC,QAAQ,KAAK,YAAY,IAAI,OAAO,CAAC;IACrC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC;IAClC,QAAQ,KAAK,MAAM,IAAI,OAAO,CAAC;IAC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WAAW,IAAI,OAAO,CAAC;IACpC,QAAQ,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAE7C;;;;OAIG;IACH,QAAQ,CAAC,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAClE,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa;IAEzD,QAAQ,CAAC,qBAAqB,IAAI,MAAM;IACxC,QAAQ,CAAC,cAAc,IAAI;QACzB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,MAAM,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAC,EAAE,CAAC;KACvF;IACD,QAAQ,CAAC,MAAM,IAAI,IAAI;IAEvB,MAAM,CAAC,GAAG,GAAI,YAAY,aAAa,KAAG,eAAe,GAAG,SAAS,CACX;CAC3D;AAED,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,eAAe,CAEzE"}
|
|
@@ -7,6 +7,12 @@ export declare class ProcedureFeatureFactory extends DomainFactory {
|
|
|
7
7
|
setupUCs(): void;
|
|
8
8
|
setupPMs(): void;
|
|
9
9
|
finalSetup(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Classification is derived at evaluation time from the EventSystem Registry
|
|
12
|
+
* (#53): hand the entity a lookup rather than copying categories into it, so
|
|
13
|
+
* events registered later (and slides authored earlier) are classified too.
|
|
14
|
+
*/
|
|
15
|
+
private wireEventCategoryLookup;
|
|
10
16
|
private registerProcedureChallenge;
|
|
11
17
|
getProcedureEntity(): ProcedureEntity | undefined;
|
|
12
18
|
getProcedurePM(): ProcedurePM | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcedureFeatureFactory.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Factories/ProcedureFeatureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ProcedureFeatureFactory.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Factories/ProcedureFeatureFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG3D,OAAO,EAEL,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAerC,OAAO,EAAmB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEjE,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,WAAW,SAA6B;IAExC,aAAa,IAAI,IAAI;IAKrB,QAAQ,IAAI,IAAI;IAgBhB,QAAQ,IAAI,IAAI;IAIhB,UAAU,IAAI,IAAI;IAKlB;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAoB/B,OAAO,CAAC,0BAA0B;IAuBlC,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD,cAAc,IAAI,WAAW,GAAG,SAAS;CAG1C;AAED,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,aAAa,GACxB,uBAAuB,CAGzB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppObject, AppObjectRepo } from "@vived/core";
|
|
2
|
+
import { EventCategory } from "../../EventSystem/types";
|
|
2
3
|
import { ProcedureEntity } from "../Entities/ProcedureEntity";
|
|
3
4
|
export declare class MockProcedureEntity extends ProcedureEntity {
|
|
4
5
|
private _eventIds;
|
|
@@ -47,6 +48,8 @@ export declare class MockProcedureEntity extends ProcedureEntity {
|
|
|
47
48
|
setShowHints: jest.Mock<void, [v: boolean], any>;
|
|
48
49
|
setIsQuiz: jest.Mock<void, [v: boolean], any>;
|
|
49
50
|
setIsRecording: jest.Mock<void, [v: boolean], any>;
|
|
51
|
+
setEventCategoryLookup: jest.Mock<any, any, any>;
|
|
52
|
+
getEventCategory: jest.Mock<EventCategory, [], any>;
|
|
50
53
|
getProgressPercentage: jest.Mock<number, [], any>;
|
|
51
54
|
calculateScore: jest.Mock<{
|
|
52
55
|
percentage: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockProcedureEntity.d.ts","sourceRoot":"","sources":["../../../../src/Procedure/Mocks/MockProcedureEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,qBAAa,mBAAoB,SAAQ,eAAe;IACtD,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,kBAAkB,CAAuB;IACjD,OAAO,CAAC,MAAM,CAGE;IAChB,OAAO,CAAC,YAAY,CAAS;IAE7B,IAAI,WAAW,IAAI,MAAM,CAExB;IACD,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IACD,IAAI,QAAQ,aAEX;IACD,IAAI,YAAY,YAEf;IACD,IAAI,SAAS,YAEZ;IACD,IAAI,MAAM,YAET;IACD,IAAI,WAAW,YAEd;IACD,IAAI,YAAY,aAEf;IACD,IAAI,gBAAgB,WAEnB;IACD,IAAI,UAAU,YAEb;IACD,IAAI,iBAAiB,kBAEpB;IACD,IAAI,KAAK;oBAtCK,MAAM;oBACN;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,MAAM,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAC,EAAE;aAuCtF;IACD,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,SAAS,YAEZ;IACD,IAAI,MAAM,YAET;IACD,IAAI,WAAW,YAEd;IACD,IAAI,YAAY,aAEf;IACD,IAAI,gBAAgB,WAEnB;IACD,IAAI,UAAU,YAEb;IACD,IAAI,iBAAiB,kBAEpB;IACD,IAAI,KAAK;oBAtCK,MAAM;oBACN;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,MAAM,EAAE,OAAO,CAAC;YAAC,OAAO,EAAE,OAAO,CAAA;SAAC,EAAE;aAuCtF;IACD,IAAI,WAAW,YAEd;IAED,UAAU,qCAEP;IACH,aAAa,2BAAa;IAC1B,aAAa,2BAEV;IACH,eAAe,2BAAa;IAC5B,gBAAgB,2BAAuB;IACvC,oBAAoB,2BAAuB;IAC3C,KAAK,2BAGF;IACH,WAAW,2BAAa;IACxB,aAAa,2BAAa;IAC1B,6BAA6B,2BAAuB;IACpD,eAAe,qCAEZ;IACH,YAAY,qCAET;IACH,SAAS,qCAEN;IACH,cAAc,qCAEX;IACH,sBAAsB,2BAAa;IACnC,gBAAgB,oCAA4C;IAC5D,qBAAqB,6BAAoB;IACzC,cAAc;;;gBAAsD;IACpE,MAAM,2BAAa;gBAEP,SAAS,EAAE,SAAS;CAGjC;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,aAAa,uBAIhE"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { EventDefinition } from "../EventSystem/types";
|
|
1
|
+
import { EventCategory, EventDefinition } from "../EventSystem/types";
|
|
2
2
|
export declare const PROCEDURE_SYSTEM_NAME = "procedure";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves an authored step's `EventCategory` at evaluation time. Injected into
|
|
5
|
+
* the `ProcedureEntity` by `ProcedureFeatureFactory` from the EventSystem
|
|
6
|
+
* Registry; never serialized. Unknown ids must resolve to `"assessed"`.
|
|
7
|
+
*/
|
|
8
|
+
export type EventCategoryLookup = (eventId: string) => EventCategory;
|
|
3
9
|
/**
|
|
4
10
|
* Serialization format for Procedure state persistence (Version 1)
|
|
5
11
|
*/
|
|
@@ -36,6 +42,13 @@ export interface ProcedureVM {
|
|
|
36
42
|
}[];
|
|
37
43
|
} | null;
|
|
38
44
|
isSubmitted: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Each authored step's category, keyed by event id (#53). A view hides a row
|
|
47
|
+
* when `isQuiz && stepCategories[id] === "instructional"`; the authoring
|
|
48
|
+
* inspector shows a "guidance" badge on the same rows. `eventIds` itself is
|
|
49
|
+
* never filtered.
|
|
50
|
+
*/
|
|
51
|
+
stepCategories: Record<string, EventCategory>;
|
|
39
52
|
}
|
|
40
53
|
/** Fields needed by the Babylon hint view */
|
|
41
54
|
export interface ProcedureHintVM {
|
|
@@ -53,6 +66,7 @@ export interface ProcedureProgressVM {
|
|
|
53
66
|
progressPercentage: number;
|
|
54
67
|
isQuiz: boolean;
|
|
55
68
|
isSubmitted: boolean;
|
|
69
|
+
stepCategories: Record<string, EventCategory>;
|
|
56
70
|
}
|
|
57
71
|
/** Fields needed by the quiz review / score screen */
|
|
58
72
|
export interface ProcedureQuizResultVM {
|
|
@@ -73,6 +87,7 @@ export interface ProcedureQuizResultVM {
|
|
|
73
87
|
}[];
|
|
74
88
|
} | null;
|
|
75
89
|
isSubmitted: boolean;
|
|
90
|
+
stepCategories: Record<string, EventCategory>;
|
|
76
91
|
}
|
|
77
92
|
/** Fields needed by the authoring inspector UI */
|
|
78
93
|
export interface ProcedureAuthoringVM {
|
|
@@ -82,5 +97,6 @@ export interface ProcedureAuthoringVM {
|
|
|
82
97
|
orderMatters: boolean;
|
|
83
98
|
showHints: boolean;
|
|
84
99
|
isQuiz: boolean;
|
|
100
|
+
stepCategories: Record<string, EventCategory>;
|
|
85
101
|
}
|
|
86
102
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Procedure/types.ts"],"names":[],"mappings":"AA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kD;AAClD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CAC/C"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { AppObject, AppObjectUC } from "@vived/core";
|
|
2
2
|
export declare class UpdateTouchInputBoundUC extends AppObjectUC {
|
|
3
3
|
static type: string;
|
|
4
|
+
/**
|
|
5
|
+
* The container is optional - this UC is only useful on an AppObject that
|
|
6
|
+
* has one. hasComponent is checked first because getCachedLocalComponent
|
|
7
|
+
* throws when the component is absent, which would defeat the constructor's
|
|
8
|
+
* guard rather than let it skip.
|
|
9
|
+
*/
|
|
4
10
|
private get container();
|
|
11
|
+
/**
|
|
12
|
+
* TouchInputEntity is optional - a composition may decline touch input.
|
|
13
|
+
* hasSingleton is checked first because both the repo lookup and
|
|
14
|
+
* getCachedSingleton complain when the type is absent (the latter throws).
|
|
15
|
+
*/
|
|
5
16
|
private get touchInput();
|
|
6
17
|
onContainerChange: () => void;
|
|
7
18
|
constructor(appObject: AppObject);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateTouchInputBound.d.ts","sourceRoot":"","sources":["../../../../src/TouchController/UC/UpdateTouchInputBound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIrD,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,MAAM,CAAC,IAAI,SAA6B;IAExC,OAAO,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"UpdateTouchInputBound.d.ts","sourceRoot":"","sources":["../../../../src/TouchController/UC/UpdateTouchInputBound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIrD,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,MAAM,CAAC,IAAI,SAA6B;IAExC;;;;;OAKG;IACH,OAAO,KAAK,SAAS,GAQpB;IAED;;;;OAIG;IACH,OAAO,KAAK,UAAU,GAMrB;IAED,iBAAiB,aAEf;gBAEU,SAAS,EAAE,SAAS;CAUjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vived/app",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.1",
|
|
4
4
|
"description": "Public package of VIVED App Components",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -28,14 +28,17 @@
|
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
|
-
"url": "git+https://
|
|
31
|
+
"url": "git+https://github.com/vivedlearning/vived_app.git"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"VIVED"
|
|
35
35
|
],
|
|
36
36
|
"author": "Amos Patrick",
|
|
37
37
|
"license": "ISC",
|
|
38
|
-
"homepage": "https://
|
|
38
|
+
"homepage": "https://github.com/vivedlearning/vived_app#readme",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/vivedlearning/vived_app/issues"
|
|
41
|
+
},
|
|
39
42
|
"files": [
|
|
40
43
|
"dist",
|
|
41
44
|
"src/**/*.md"
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
# EventSystem
|
|
2
|
-
|
|
3
|
-
The app-wide registry of named actions that things in the scene can emit at runtime. Other Features (e.g. Procedure) build on top of it; this Feature owns the vocabulary of Events.
|
|
4
|
-
|
|
5
|
-
## Language
|
|
6
|
-
|
|
7
|
-
**Event**:
|
|
8
|
-
A named, registered action — an `EventDefinition` of `{ id, name }` (unique id + human-readable name) — that something in the scene can emit. The canonical home of this term; consumers like Procedure sequence Events by id.
|
|
9
|
-
_Avoid_: Action, signal, message
|
|
10
|
-
|
|
11
|
-
**Emit**:
|
|
12
|
-
Firing a registered Event by id at runtime (`emit(id)`). The EventSystem records emissions and notifies emission listeners.
|
|
13
|
-
_Avoid_: Fire, trigger, dispatch (Dispatch is the Host-boundary term), raise
|
|
14
|
-
|
|
15
|
-
**Registry**:
|
|
16
|
-
The singleton `EventEntity`'s store of registered `EventDefinition`s. New Events are added with `register(id, name)
|
|
17
|
-
_Avoid_: Catalog, table, map
|
|
1
|
+
# EventSystem
|
|
2
|
+
|
|
3
|
+
The app-wide registry of named actions that things in the scene can emit at runtime. Other Features (e.g. Procedure) build on top of it; this Feature owns the vocabulary of Events.
|
|
4
|
+
|
|
5
|
+
## Language
|
|
6
|
+
|
|
7
|
+
**Event**:
|
|
8
|
+
A named, registered action — an `EventDefinition` of `{ id, name }` (unique id + human-readable name) — that something in the scene can emit. The canonical home of this term; consumers like Procedure sequence Events by id.
|
|
9
|
+
_Avoid_: Action, signal, message
|
|
10
|
+
|
|
11
|
+
**Emit**:
|
|
12
|
+
Firing a registered Event by id at runtime (`emit(id)`). The EventSystem records emissions and notifies emission listeners.
|
|
13
|
+
_Avoid_: Fire, trigger, dispatch (Dispatch is the Host-boundary term), raise
|
|
14
|
+
|
|
15
|
+
**Registry**:
|
|
16
|
+
The singleton `EventEntity`'s store of registered `EventDefinition`s. New Events are added with `register(id, name, options?)`; the Registry is also where an Event's Category is looked up (`getEventCategory(id)`).
|
|
17
|
+
_Avoid_: Catalog, table, map
|
|
18
|
+
|
|
19
|
+
**Category**:
|
|
20
|
+
An Event's scoring semantics, chosen by the consuming Slide App at registration: **Assessed** or **Instructional**. Named by what the Event means for a quiz, never by its domain source, so this package stays ignorant of app concepts like navigation. Omitted or unregistered means Assessed.
|
|
21
|
+
_Avoid_: Type, kind, class, tag
|
|
22
|
+
|
|
23
|
+
**Assessed**:
|
|
24
|
+
The default Category — the Event represents a task outcome (pull a lever, engage a lockout). Scored, counted toward progress, and shown in both training and quiz mode.
|
|
25
|
+
_Avoid_: Scored (as the name), real, required
|
|
26
|
+
|
|
27
|
+
**Instructional**:
|
|
28
|
+
The opt-in Category — the Event is guidance (e.g. arriving at a viewpoint). An ordinary step in training; in quiz mode it is quiz-neutral: hidden from the checklist and excluded from score, progress and completion.
|
|
29
|
+
_Avoid_: Navigation (a consumer's example, not the concept), optional, hint, guidance (as the term; it is the badge label in the authoring inspector)
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("@vived/core");
|
|
4
|
-
const setupStandardFramedScreen_1 = require("./setupStandardFramedScreen");
|
|
5
|
-
describe("setupStandardFramedScreen", () => {
|
|
6
|
-
it("Defaults to adding the StandardLayoutUC", () => {
|
|
7
|
-
const appObjects = (0, core_1.makeAppObjectRepo)();
|
|
8
|
-
const ao = (0, setupStandardFramedScreen_1.setupStandardFramedScreen)(appObjects);
|
|
9
|
-
expect(ao.hasComponent("StandardLayoutUC")).toBe(true);
|
|
10
|
-
});
|
|
11
|
-
it("Does not add the StandardLayoutUC if the option is set to true", () => {
|
|
12
|
-
const appObjects = (0, core_1.makeAppObjectRepo)();
|
|
13
|
-
const ao = (0, setupStandardFramedScreen_1.setupStandardFramedScreen)(appObjects, {
|
|
14
|
-
dontSetupLayoutHook: true,
|
|
15
|
-
});
|
|
16
|
-
expect(ao.hasComponent("StandardLayoutUC")).toBe(false);
|
|
17
|
-
});
|
|
18
|
-
it("Adds the StandardLayoutUC if the option is set to false", () => {
|
|
19
|
-
const appObjects = (0, core_1.makeAppObjectRepo)();
|
|
20
|
-
const ao = (0, setupStandardFramedScreen_1.setupStandardFramedScreen)(appObjects, {
|
|
21
|
-
dontSetupLayoutHook: false,
|
|
22
|
-
});
|
|
23
|
-
expect(ao.hasComponent("StandardLayoutUC")).toBe(true);
|
|
24
|
-
});
|
|
25
|
-
it("Adds the StandardLayoutUC if the option is not set", () => {
|
|
26
|
-
const appObjects = (0, core_1.makeAppObjectRepo)();
|
|
27
|
-
const ao = (0, setupStandardFramedScreen_1.setupStandardFramedScreen)(appObjects, {});
|
|
28
|
-
expect(ao.hasComponent("StandardLayoutUC")).toBe(true);
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=setupStandardFramedScreen.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupStandardFramedScreen.test.js","sourceRoot":"","sources":["../../../../src/FramedScreen/Factories/setupStandardFramedScreen.test.ts"],"names":[],"mappings":";;AAAA,sCAAgD;AAChD,2EAAwE;AAExE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,UAAU,GAAG,IAAA,wBAAiB,GAAE,CAAC;QAEvC,MAAM,EAAE,GAAG,IAAA,qDAAyB,EAAC,UAAU,CAAC,CAAC;QAEjD,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,UAAU,GAAG,IAAA,wBAAiB,GAAE,CAAC;QAEvC,MAAM,EAAE,GAAG,IAAA,qDAAyB,EAAC,UAAU,EAAE;YAC/C,mBAAmB,EAAE,IAAI;SAC1B,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,UAAU,GAAG,IAAA,wBAAiB,GAAE,CAAC;QAEvC,MAAM,EAAE,GAAG,IAAA,qDAAyB,EAAC,UAAU,EAAE;YAC/C,mBAAmB,EAAE,KAAK;SAC3B,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,UAAU,GAAG,IAAA,wBAAiB,GAAE,CAAC;QAEvC,MAAM,EAAE,GAAG,IAAA,qDAAyB,EAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAErD,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { makeAppObjectRepo } from \"@vived/core\";\r\nimport { setupStandardFramedScreen } from \"./setupStandardFramedScreen\";\r\n\r\ndescribe(\"setupStandardFramedScreen\", () => {\r\n it(\"Defaults to adding the StandardLayoutUC\", () => {\r\n const appObjects = makeAppObjectRepo();\r\n\r\n const ao = setupStandardFramedScreen(appObjects);\r\n\r\n expect(ao.hasComponent(\"StandardLayoutUC\")).toBe(true);\r\n });\r\n\r\n it(\"Does not add the StandardLayoutUC if the option is set to true\", () => {\r\n const appObjects = makeAppObjectRepo();\r\n\r\n const ao = setupStandardFramedScreen(appObjects, {\r\n dontSetupLayoutHook: true,\r\n });\r\n\r\n expect(ao.hasComponent(\"StandardLayoutUC\")).toBe(false);\r\n });\r\n\r\n it(\"Adds the StandardLayoutUC if the option is set to false\", () => {\r\n const appObjects = makeAppObjectRepo();\r\n\r\n const ao = setupStandardFramedScreen(appObjects, {\r\n dontSetupLayoutHook: false,\r\n });\r\n\r\n expect(ao.hasComponent(\"StandardLayoutUC\")).toBe(true);\r\n });\r\n\r\n it(\"Adds the StandardLayoutUC if the option is not set\", () => {\r\n const appObjects = makeAppObjectRepo();\r\n\r\n const ao = setupStandardFramedScreen(appObjects, {});\r\n\r\n expect(ao.hasComponent(\"StandardLayoutUC\")).toBe(true);\r\n });\r\n});\r\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.clickRestoreScene = clickRestoreScene;
|
|
4
|
-
const Entities_1 = require("../Entities");
|
|
5
|
-
function clickRestoreScene(appObjects) {
|
|
6
|
-
const entity = Entities_1.StateMachineEntity.get(appObjects);
|
|
7
|
-
if (entity) {
|
|
8
|
-
entity.restoreLastState();
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
appObjects.submitError("clickRestoreScene", "Unable to find StateMachineEntity");
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=clickRestoreScene.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clickRestoreScene.js","sourceRoot":"","sources":["../../../../src/StateMachine/Controller/clickRestoreScene.ts"],"names":[],"mappings":";;AAGA,8CAUC;AAZD,0CAAiD;AAEjD,SAAgB,iBAAiB,CAAC,UAAyB;IACzD,MAAM,MAAM,GAAG,6BAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAClD,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,CAAC,gBAAgB,EAAE,CAAC;IAC5B,CAAC;SAAM,CAAC;QACN,UAAU,CAAC,WAAW,CACpB,mBAAmB,EACnB,mCAAmC,CACpC,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { AppObjectRepo } from \"@vived/core\";\nimport { StateMachineEntity } from \"../Entities\";\n\nexport function clickRestoreScene(appObjects: AppObjectRepo) {\n const entity = StateMachineEntity.get(appObjects);\n if (entity) {\n entity.restoreLastState();\n } else {\n appObjects.submitError(\n \"clickRestoreScene\",\n \"Unable to find StateMachineEntity\",\n );\n }\n}\n"]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const core_1 = require("@vived/core");
|
|
4
|
-
const Mocks_1 = require("../Mocks");
|
|
5
|
-
const clickRestoreScene_1 = require("./clickRestoreScene");
|
|
6
|
-
function makeTestRig() {
|
|
7
|
-
const appObjects = (0, core_1.makeAppObjectRepo)();
|
|
8
|
-
const stateMachine = (0, Mocks_1.makeMockStateMachine)(appObjects);
|
|
9
|
-
return { appObjects, stateMachine };
|
|
10
|
-
}
|
|
11
|
-
describe("Click Restore Scene", () => {
|
|
12
|
-
it("Calls restore on the entity", () => {
|
|
13
|
-
const { appObjects, stateMachine } = makeTestRig();
|
|
14
|
-
stateMachine.restoreLastState = jest.fn();
|
|
15
|
-
(0, clickRestoreScene_1.clickRestoreScene)(appObjects);
|
|
16
|
-
expect(stateMachine.restoreLastState).toHaveBeenCalled();
|
|
17
|
-
});
|
|
18
|
-
it("Logs an error if the state machine cannot be found", () => {
|
|
19
|
-
const appObjects = (0, core_1.makeAppObjectRepo)();
|
|
20
|
-
appObjects.submitWarning = jest.fn();
|
|
21
|
-
appObjects.submitError = jest.fn();
|
|
22
|
-
(0, clickRestoreScene_1.clickRestoreScene)(appObjects);
|
|
23
|
-
expect(appObjects.submitError).toHaveBeenCalled();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=clickRestoreScene.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clickRestoreScene.test.js","sourceRoot":"","sources":["../../../../src/StateMachine/Controller/clickRestoreScene.test.ts"],"names":[],"mappings":";;AAAA,sCAAgD;AAChD,oCAAgD;AAChD,2DAAwD;AAExD,SAAS,WAAW;IAClB,MAAM,UAAU,GAAG,IAAA,wBAAiB,GAAE,CAAC;IACvC,MAAM,YAAY,GAAG,IAAA,4BAAoB,EAAC,UAAU,CAAC,CAAC;IAEtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACtC,CAAC;AAED,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,WAAW,EAAE,CAAC;QAEnD,YAAY,CAAC,gBAAgB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAC1C,IAAA,qCAAiB,EAAC,UAAU,CAAC,CAAC;QAE9B,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC5D,MAAM,UAAU,GAAG,IAAA,wBAAiB,GAAE,CAAC;QAEvC,UAAU,CAAC,aAAa,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QACrC,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;QAEnC,IAAA,qCAAiB,EAAC,UAAU,CAAC,CAAC;QAC9B,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { makeAppObjectRepo } from \"@vived/core\";\nimport { makeMockStateMachine } from \"../Mocks\";\nimport { clickRestoreScene } from \"./clickRestoreScene\";\n\nfunction makeTestRig() {\n const appObjects = makeAppObjectRepo();\n const stateMachine = makeMockStateMachine(appObjects);\n\n return { appObjects, stateMachine };\n}\n\ndescribe(\"Click Restore Scene\", () => {\n it(\"Calls restore on the entity\", () => {\n const { appObjects, stateMachine } = makeTestRig();\n\n stateMachine.restoreLastState = jest.fn();\n clickRestoreScene(appObjects);\n\n expect(stateMachine.restoreLastState).toHaveBeenCalled();\n });\n\n it(\"Logs an error if the state machine cannot be found\", () => {\n const appObjects = makeAppObjectRepo();\n\n appObjects.submitWarning = jest.fn();\n appObjects.submitError = jest.fn();\n\n clickRestoreScene(appObjects);\n expect(appObjects.submitError).toHaveBeenCalled();\n });\n});\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./setupFeatureForTesting"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/TestUtils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC","sourcesContent":["export * from \"./setupFeatureForTesting\";\r\n"]}
|