@vived/app 4.24.0 → 4.26.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.
- package/lib/Components/App/Controller/index.d.ts +1 -0
- package/lib/Components/App/Controller/index.js +1 -0
- package/lib/Components/App/Controller/updateContentSize.d.ts +2 -0
- package/lib/Components/App/Controller/updateContentSize.js +13 -0
- package/lib/Components/App/Entity/BaseAppState.d.ts +2 -0
- package/lib/Components/App/Entity/BaseAppState.js +7 -0
- package/lib/Components/App/Mocks/MockUpdateContentSizeUC.d.ts +9 -0
- package/lib/Components/App/Mocks/MockUpdateContentSizeUC.js +15 -0
- package/lib/Components/App/Mocks/index.d.ts +1 -0
- package/lib/Components/App/Mocks/index.js +1 -0
- package/lib/Components/App/UC/SerializeBaseAppState.d.ts +17 -0
- package/lib/Components/App/UC/SerializeBaseAppState.js +59 -0
- package/lib/Components/App/UC/UpdateContentSizeUC.d.ts +7 -0
- package/lib/Components/App/UC/UpdateContentSizeUC.js +33 -0
- package/lib/Components/App/UC/index.d.ts +2 -0
- package/lib/Components/App/UC/index.js +2 -0
- package/lib/Components/Challenge/Adapters/challengeAuthorHelpHookAdapter.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/challengeAuthorHelpHookAdapter.js +23 -0
- package/lib/Components/Challenge/Adapters/challengeConsumerHelpHookAdapter.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/challengeConsumerHelpHookAdapter.js +23 -0
- package/lib/Components/Challenge/Adapters/index.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/index.js +15 -0
- package/lib/Components/Challenge/Adapters/selectedChallengeHookAdapter.d.ts +3 -0
- package/lib/Components/Challenge/Adapters/selectedChallengeHookAdapter.js +29 -0
- package/lib/Components/Challenge/Controller/clickTryChallengeAgain.d.ts +2 -0
- package/lib/Components/Challenge/Controller/clickTryChallengeAgain.js +13 -0
- package/lib/Components/Challenge/Controller/index.d.ts +1 -0
- package/lib/Components/Challenge/Controller/index.js +1 -0
- package/lib/Components/Challenge/Mocks/TryChallengeAgainUcMock.d.ts +8 -0
- package/lib/Components/Challenge/Mocks/TryChallengeAgainUcMock.js +15 -0
- package/lib/Components/Challenge/Mocks/index.d.ts +1 -0
- package/lib/Components/Challenge/Mocks/index.js +1 -0
- package/lib/Components/Challenge/UCs/TryChallengeAgainUC.d.ts +6 -0
- package/lib/Components/Challenge/UCs/TryChallengeAgainUC.js +11 -0
- package/lib/Components/Challenge/UCs/index.d.ts +1 -0
- package/lib/Components/Challenge/UCs/index.js +1 -0
- package/lib/Components/Challenge/index.d.ts +1 -1
- package/lib/Components/Challenge/index.js +1 -1
- package/lib/Components/ChannelModel/Adapters/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Adapters/index.js +1 -0
- package/lib/Components/ChannelModel/Adapters/modelHasLandmarksAdapter.d.ts +2 -0
- package/lib/Components/ChannelModel/Adapters/modelHasLandmarksAdapter.js +27 -0
- package/lib/Components/ChannelModel/Mocks/ModelHasLandmarksPmMock.d.ts +7 -0
- package/lib/Components/ChannelModel/Mocks/ModelHasLandmarksPmMock.js +11 -0
- package/lib/Components/ChannelModel/Mocks/index.d.ts +1 -0
- package/lib/Components/ChannelModel/Mocks/index.js +1 -0
- package/lib/Components/ChannelModel/PMs/ModelHasLandmarksPM.d.ts +6 -0
- package/lib/Components/ChannelModel/PMs/ModelHasLandmarksPM.js +56 -0
- package/lib/Components/ChannelModel/PMs/index.d.ts +1 -0
- package/lib/Components/ChannelModel/PMs/index.js +1 -0
- package/lib/Components/FramedScreen/Adapters/framedContainerAdapter.d.ts +3 -0
- package/lib/Components/FramedScreen/Adapters/framedContainerAdapter.js +23 -0
- package/lib/Components/FramedScreen/Adapters/framedScreenSizeAdapter.d.ts +3 -0
- package/lib/Components/FramedScreen/Adapters/framedScreenSizeAdapter.js +23 -0
- package/lib/Components/FramedScreen/Adapters/index.d.ts +2 -0
- package/lib/Components/FramedScreen/Adapters/index.js +14 -0
- package/lib/Components/FramedScreen/Mocks/FramedContainerPmMock.d.ts +7 -0
- package/lib/Components/FramedScreen/Mocks/FramedContainerPmMock.js +11 -0
- package/lib/Components/FramedScreen/Mocks/FramedScreenSizePmMock.d.ts +8 -0
- package/lib/Components/FramedScreen/Mocks/FramedScreenSizePmMock.js +15 -0
- package/lib/Components/FramedScreen/Mocks/index.d.ts +2 -0
- package/lib/Components/FramedScreen/Mocks/index.js +14 -0
- package/lib/Components/FramedScreen/PM/FramedContainerPM.d.ts +16 -0
- package/lib/Components/FramedScreen/PM/FramedContainerPM.js +66 -0
- package/lib/Components/FramedScreen/PM/FramedScreenSizePM.d.ts +2 -6
- package/lib/Components/FramedScreen/PM/FramedScreenSizePM.js +16 -14
- package/lib/Components/FramedScreen/PM/index.d.ts +1 -1
- package/lib/Components/FramedScreen/PM/index.js +1 -1
- package/lib/Components/FramedScreen/index.d.ts +2 -0
- package/lib/Components/FramedScreen/index.js +2 -0
- package/lib/Components/Landmarks/Adapters/index.d.ts +2 -0
- package/lib/Components/Landmarks/Adapters/index.js +14 -0
- package/lib/Components/Landmarks/Adapters/landmarkListAdapter.d.ts +2 -0
- package/lib/Components/Landmarks/Adapters/landmarkListAdapter.js +25 -0
- package/lib/Components/Landmarks/Adapters/landmarkSizeAdapter.d.ts +2 -0
- package/lib/Components/Landmarks/Adapters/landmarkSizeAdapter.js +23 -0
- package/lib/Components/Landmarks/Controller/MouseLandmark.d.ts +3 -13
- package/lib/Components/Landmarks/Controller/MouseLandmark.js +8 -16
- package/lib/Components/Landmarks/Controller/SubmitLandmarkSize.d.ts +1 -1
- package/lib/Components/Landmarks/Controller/SubmitLandmarkSize.js +2 -8
- package/lib/Components/Landmarks/Controller/TouchLandmark.d.ts +2 -12
- package/lib/Components/Landmarks/Controller/TouchLandmark.js +12 -19
- package/lib/Components/Landmarks/Controller/UpdateLandmarkSize.d.ts +1 -1
- package/lib/Components/Landmarks/Controller/UpdateLandmarkSize.js +3 -9
- package/lib/Components/Landmarks/Controller/deleteAllLandmarks.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/deleteAllLandmarks.js +13 -0
- package/lib/Components/Landmarks/Controller/deleteLandmark.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/deleteLandmark.js +14 -0
- package/lib/Components/Landmarks/Controller/index.d.ts +2 -1
- package/lib/Components/Landmarks/Controller/index.js +2 -1
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/submitLandmarkSizeX.js +19 -0
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.d.ts +2 -0
- package/lib/Components/Landmarks/Controller/updateLandmarkSizeX.js +19 -0
- package/lib/Components/Landmarks/Entities/LandmarkEntity.d.ts +5 -3
- package/lib/Components/Landmarks/Entities/LandmarkEntity.js +18 -6
- package/lib/Components/Landmarks/Entities/LandmarkGlobals.d.ts +2 -3
- package/lib/Components/Landmarks/Entities/LandmarkGlobals.js +5 -10
- package/lib/Components/Landmarks/Entities/LandmarkRepo.d.ts +7 -1
- package/lib/Components/Landmarks/Entities/LandmarkRepo.js +26 -4
- package/lib/Components/Landmarks/Mocks/DeleteAllLandmarksUcMock.d.ts +8 -0
- package/lib/Components/Landmarks/Mocks/DeleteAllLandmarksUcMock.js +15 -0
- package/lib/Components/Landmarks/Mocks/DeleteLandmarkUcMock.d.ts +7 -0
- package/lib/Components/Landmarks/Mocks/DeleteLandmarkUcMock.js +11 -0
- package/lib/Components/Landmarks/Mocks/LandmarkListPmMock.d.ts +7 -0
- package/lib/Components/Landmarks/Mocks/LandmarkListPmMock.js +11 -0
- package/lib/Components/Landmarks/Mocks/LandmarkSizePmMock.d.ts +7 -0
- package/lib/Components/Landmarks/Mocks/LandmarkSizePmMock.js +11 -0
- package/lib/Components/Landmarks/Mocks/MockLandmark.d.ts +3 -1
- package/lib/Components/Landmarks/Mocks/MockLandmark.js +9 -0
- package/lib/Components/Landmarks/Mocks/MockTryAddNewLandmarkUC.d.ts +10 -0
- package/lib/Components/Landmarks/Mocks/MockTryAddNewLandmarkUC.js +17 -0
- package/lib/Components/Landmarks/Mocks/MockTryPreviewLandmarkUC.d.ts +10 -0
- package/lib/Components/Landmarks/Mocks/MockTryPreviewLandmarkUC.js +17 -0
- package/lib/Components/Landmarks/Mocks/SetLandmarkSizeUcMark.d.ts +8 -0
- package/lib/Components/Landmarks/Mocks/SetLandmarkSizeUcMark.js +12 -0
- package/lib/Components/Landmarks/Mocks/index.d.ts +6 -0
- package/lib/Components/Landmarks/Mocks/index.js +18 -0
- package/lib/Components/Landmarks/Mocks/makeLandmarkDTO.d.ts +2 -0
- package/lib/Components/Landmarks/Mocks/makeLandmarkDTO.js +20 -0
- package/lib/Components/Landmarks/PM/LandmarkListPM.d.ts +4 -8
- package/lib/Components/Landmarks/PM/LandmarkListPM.js +19 -26
- package/lib/Components/Landmarks/PM/LandmarkSizePM.d.ts +4 -8
- package/lib/Components/Landmarks/PM/LandmarkSizePM.js +19 -20
- package/lib/Components/Landmarks/UseCases/AddLandmarkUndoRedo.d.ts +4 -6
- package/lib/Components/Landmarks/UseCases/AddLandmarkUndoRedo.js +14 -27
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUC.d.ts +7 -0
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUC.js +35 -0
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUndoRedo.d.ts +10 -0
- package/lib/Components/Landmarks/UseCases/DeleteAllLandmarksUndoRedo.js +37 -0
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUC.d.ts +5 -6
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUC.js +24 -34
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUndoRedo.d.ts +4 -6
- package/lib/Components/Landmarks/UseCases/DeleteLandmarkUndoRedo.js +14 -27
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.d.ts +2 -0
- package/lib/Components/Landmarks/UseCases/SerializeLandmarks.js +27 -40
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.d.ts +6 -9
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUC.js +33 -27
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUndoRedo.d.ts +10 -6
- package/lib/Components/Landmarks/UseCases/SetLandmarkSizeUndoRedo.js +11 -20
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.d.ts +1 -0
- package/lib/Components/Landmarks/UseCases/TryAddNewLandmarkUC.js +22 -18
- package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.d.ts +3 -8
- package/lib/Components/Landmarks/UseCases/TryPreviewLandmarkUC.js +17 -18
- package/lib/Components/Landmarks/UseCases/index.d.ts +1 -1
- package/lib/Components/Landmarks/UseCases/index.js +1 -1
- package/lib/Components/Landmarks/index.d.ts +2 -0
- package/lib/Components/Landmarks/index.js +2 -0
- package/lib/Components/StateMachine/Entities/StateMachineEntity.d.ts +1 -1
- package/lib/Components/StateMachine/Entities/StateMachineEntity.js +6 -2
- package/lib/Components/zSpace/Adapters/index.d.ts +4 -0
- package/lib/Components/zSpace/Adapters/index.js +16 -0
- package/lib/Components/zSpace/Adapters/zSpaceDisplayAdapter.d.ts +3 -0
- package/lib/Components/zSpace/Adapters/zSpaceDisplayAdapter.js +23 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsEnabledAdapter.d.ts +2 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsEnabledAdapter.js +23 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsSupportedAdapter.d.ts +2 -0
- package/lib/Components/zSpace/Adapters/zSpaceIsSupportedAdapter.js +23 -0
- package/lib/Components/zSpace/Adapters/zSpaceViewerScaleAdapter.d.ts +2 -0
- package/lib/Components/zSpace/Adapters/zSpaceViewerScaleAdapter.js +23 -0
- package/lib/Components/zSpace/Mocks/ZSpaceDisplayPmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceDisplayPmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsEnabledPmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsEnabledPmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsSupportedPmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceIsSupportedPmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/ZSpaceViewerScalePmMock.d.ts +8 -0
- package/lib/Components/zSpace/Mocks/ZSpaceViewerScalePmMock.js +15 -0
- package/lib/Components/zSpace/Mocks/index.d.ts +5 -0
- package/lib/Components/zSpace/Mocks/index.js +17 -0
- package/lib/Components/zSpace/PM/ZSpaceDisplayPM.d.ts +3 -0
- package/lib/Components/zSpace/PM/ZSpaceDisplayPM.js +20 -25
- package/lib/Components/zSpace/PM/ZSpaceIsEnabledPM.d.ts +2 -0
- package/lib/Components/zSpace/PM/ZSpaceIsEnabledPM.js +10 -16
- package/lib/Components/zSpace/PM/ZSpaceIsSupportedPM.js +10 -18
- package/lib/Components/zSpace/PM/ZSpaceViewerScalePM.d.ts +2 -1
- package/lib/Components/zSpace/PM/ZSpaceViewerScalePM.js +9 -16
- package/lib/Components/zSpace/index.d.ts +2 -0
- package/lib/Components/zSpace/index.js +2 -0
- package/lib/Entities/RangedNumber.d.ts +16 -0
- package/lib/Entities/RangedNumber.js +35 -0
- package/lib/Entities/index.d.ts +1 -0
- package/lib/Entities/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteAllLandmarks = void 0;
|
|
4
|
+
const DeleteAllLandmarksUC_1 = require("../UseCases/DeleteAllLandmarksUC");
|
|
5
|
+
function deleteAllLandmarks(appObjects) {
|
|
6
|
+
const deleteAllLandmarksUC = DeleteAllLandmarksUC_1.DeleteAllLandmarksUC.get(appObjects);
|
|
7
|
+
if (!deleteAllLandmarksUC) {
|
|
8
|
+
appObjects.submitWarning("deleteAllLandmarks Controller", "DeleteAllLandmarksUC was not found!");
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
deleteAllLandmarksUC.deleteAllLandmarks();
|
|
12
|
+
}
|
|
13
|
+
exports.deleteAllLandmarks = deleteAllLandmarks;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteLandmark = void 0;
|
|
4
|
+
const UseCases_1 = require("../UseCases");
|
|
5
|
+
function deleteLandmark(id, appObjects) {
|
|
6
|
+
const uc = UseCases_1.DeleteLandmarkUC.getById(id, appObjects);
|
|
7
|
+
if (uc) {
|
|
8
|
+
uc.deleteLandmark();
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
appObjects.submitError("deleteLandmark", "Unable to find DeleteLandmarkUC");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.deleteLandmark = deleteLandmark;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export * from "./deleteAllLandmarks";
|
|
2
|
+
export * from "./deleteLandmark";
|
|
1
3
|
export * from "./MouseLandmark";
|
|
2
|
-
export * from "./SetSelectedLandmarkColor";
|
|
3
4
|
export * from "./SubmitLandmarkSize";
|
|
4
5
|
export * from "./TouchLandmark";
|
|
5
6
|
export * from "./UpdateLandmarkSize";
|
|
@@ -10,8 +10,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./deleteAllLandmarks"), exports);
|
|
14
|
+
__exportStar(require("./deleteLandmark"), exports);
|
|
13
15
|
__exportStar(require("./MouseLandmark"), exports);
|
|
14
|
-
__exportStar(require("./SetSelectedLandmarkColor"), exports);
|
|
15
16
|
__exportStar(require("./SubmitLandmarkSize"), exports);
|
|
16
17
|
__exportStar(require("./TouchLandmark"), exports);
|
|
17
18
|
__exportStar(require("./UpdateLandmarkSize"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.submitLandmarkSize = void 0;
|
|
4
|
+
const LandmarkEntity_1 = require("../Entities/LandmarkEntity");
|
|
5
|
+
const SetLandmarkSizeUC_1 = require("../UseCases/SetLandmarkSizeUC");
|
|
6
|
+
function submitLandmarkSize(size, appObjectId, appObjects) {
|
|
7
|
+
const landmarkEntity = appObjects.getAppObjectComponent(appObjectId, LandmarkEntity_1.LandmarkEntity.type);
|
|
8
|
+
if (!landmarkEntity) {
|
|
9
|
+
appObjects.submitWarning("SubmitLandmarkSizeController", "LandmarkEntity App Object was not added.");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const setLandmarkSizeUC = appObjects.getAppObjectComponent(appObjectId, SetLandmarkSizeUC_1.SetLandmarkSizeUC.type);
|
|
13
|
+
if (!setLandmarkSizeUC) {
|
|
14
|
+
appObjects.submitWarning("SubmitLandmarkSizeController", "SetLandmarkSizeUC App Object was not added.");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
setLandmarkSizeUC.submitSize(size);
|
|
18
|
+
}
|
|
19
|
+
exports.submitLandmarkSize = submitLandmarkSize;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateLandmarkSize = void 0;
|
|
4
|
+
const LandmarkEntity_1 = require("../Entities/LandmarkEntity");
|
|
5
|
+
const SetLandmarkSizeUC_1 = require("../UseCases/SetLandmarkSizeUC");
|
|
6
|
+
function updateLandmarkSize(size, appObjectId, appObjects) {
|
|
7
|
+
const landmarkEntity = appObjects.getAppObjectComponent(appObjectId, LandmarkEntity_1.LandmarkEntity.type);
|
|
8
|
+
if (!landmarkEntity) {
|
|
9
|
+
appObjects.submitWarning("UpdateLandmarkSizeController", "LandmarkEntity App Object was not added.");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const setLandmarkSizeUC = appObjects.getAppObjectComponent(appObjectId, SetLandmarkSizeUC_1.SetLandmarkSizeUC.type);
|
|
13
|
+
if (!setLandmarkSizeUC) {
|
|
14
|
+
appObjects.submitWarning("UpdateLandmarkSizeController", "SetLandmarkSizeUC App Object was not added.");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
setLandmarkSizeUC.updateSize(size);
|
|
18
|
+
}
|
|
19
|
+
exports.updateLandmarkSize = updateLandmarkSize;
|
|
@@ -21,10 +21,12 @@ export interface LandmarkDTO {
|
|
|
21
21
|
export declare abstract class LandmarkEntity extends AppObjectEntity {
|
|
22
22
|
static readonly type = "LANDMARK";
|
|
23
23
|
static get(appObj: AppObject): LandmarkEntity | undefined;
|
|
24
|
-
abstract
|
|
24
|
+
abstract get id(): string;
|
|
25
|
+
abstract get parentID(): string;
|
|
26
|
+
abstract get inRepo(): LandmarkRepo | undefined;
|
|
27
|
+
abstract set inRepo(repo: LandmarkRepo | undefined);
|
|
25
28
|
abstract get size(): number;
|
|
26
29
|
abstract set size(val: number);
|
|
27
|
-
abstract readonly parentID: string;
|
|
28
30
|
abstract get label(): LabelEntity;
|
|
29
31
|
abstract get transform(): Transform3D;
|
|
30
32
|
abstract get hideable(): Hideable;
|
|
@@ -37,4 +39,4 @@ export declare abstract class LandmarkEntity extends AppObjectEntity {
|
|
|
37
39
|
abstract get data(): LandmarkDTO;
|
|
38
40
|
abstract set data(dto: LandmarkDTO);
|
|
39
41
|
}
|
|
40
|
-
export declare function makeLandmarkEntity(appObject: AppObject
|
|
42
|
+
export declare function makeLandmarkEntity(appObject: AppObject): LandmarkEntity;
|
|
@@ -18,16 +18,15 @@ class LandmarkEntity extends AppObject_1.AppObjectEntity {
|
|
|
18
18
|
}
|
|
19
19
|
exports.LandmarkEntity = LandmarkEntity;
|
|
20
20
|
LandmarkEntity.type = "LANDMARK";
|
|
21
|
-
function makeLandmarkEntity(appObject
|
|
22
|
-
const landmark = new LandmarkImp(appObject
|
|
21
|
+
function makeLandmarkEntity(appObject) {
|
|
22
|
+
const landmark = new LandmarkImp(appObject);
|
|
23
23
|
return landmark;
|
|
24
24
|
}
|
|
25
25
|
exports.makeLandmarkEntity = makeLandmarkEntity;
|
|
26
26
|
class LandmarkImp extends LandmarkEntity {
|
|
27
|
-
constructor(appObject
|
|
27
|
+
constructor(appObject) {
|
|
28
28
|
super(appObject, LandmarkEntity.type);
|
|
29
29
|
this.memoizedSize = new Entities_1.MemoizedNumber(1, this.notifyOnChange);
|
|
30
|
-
this.parentID = parentID;
|
|
31
30
|
this._label = Label_1.LabelEntity.addIfMissing(appObject);
|
|
32
31
|
this._label.addChangeObserver(this.notifyOnChange);
|
|
33
32
|
this._transform = Transform3D_1.Transform3D.addIfMissing(appObject);
|
|
@@ -39,6 +38,9 @@ class LandmarkImp extends LandmarkEntity {
|
|
|
39
38
|
this._selectable = Selection_1.makeSelectable(appObject);
|
|
40
39
|
this._selectable.addChangeObserver(this.notifyOnChange);
|
|
41
40
|
}
|
|
41
|
+
get id() {
|
|
42
|
+
return this.appObject.id;
|
|
43
|
+
}
|
|
42
44
|
get label() {
|
|
43
45
|
return this._label;
|
|
44
46
|
}
|
|
@@ -72,6 +74,16 @@ class LandmarkImp extends LandmarkEntity {
|
|
|
72
74
|
set rotation(r) {
|
|
73
75
|
this._transform.localRotation = r;
|
|
74
76
|
}
|
|
77
|
+
set inRepo(val) {
|
|
78
|
+
this._inRepo = val;
|
|
79
|
+
this.transform.parent = val === null || val === void 0 ? void 0 : val.transform;
|
|
80
|
+
}
|
|
81
|
+
get inRepo() {
|
|
82
|
+
return this._inRepo;
|
|
83
|
+
}
|
|
84
|
+
get parentID() {
|
|
85
|
+
return this._inRepo ? this._inRepo.appObject.id : "";
|
|
86
|
+
}
|
|
75
87
|
get data() {
|
|
76
88
|
return {
|
|
77
89
|
id: this.appObject.id,
|
|
@@ -104,8 +116,8 @@ class LandmarkImp extends LandmarkEntity {
|
|
|
104
116
|
this._hideable.dispose();
|
|
105
117
|
this._overlayColor.dispose();
|
|
106
118
|
this._selectable.dispose();
|
|
107
|
-
if (this.
|
|
108
|
-
this.
|
|
119
|
+
if (this._inRepo) {
|
|
120
|
+
this._inRepo.removeForAppObject(this.appObject.id);
|
|
109
121
|
}
|
|
110
122
|
}
|
|
111
123
|
}
|
|
@@ -5,10 +5,9 @@ import { LandmarkRepo } from "./LandmarkRepo";
|
|
|
5
5
|
export declare abstract class LandmarkGlobals extends AppObjectEntity {
|
|
6
6
|
static readonly type = "LandmarkGlobals";
|
|
7
7
|
static get: (appObjects: AppObjectRepo) => LandmarkGlobals | undefined;
|
|
8
|
-
abstract
|
|
9
|
-
abstract landmarkRepoFactory(id: string): LandmarkRepo | undefined;
|
|
8
|
+
abstract landmarkRepoFactory(id: string): LandmarkRepo;
|
|
10
9
|
abstract lastSize: number;
|
|
11
10
|
abstract lastColor: OverlayColorEnums;
|
|
12
|
-
abstract
|
|
11
|
+
abstract previewLandmark?: LandmarkEntity;
|
|
13
12
|
}
|
|
14
13
|
export declare function makeLandmarkGlobals(appObject: AppObject): LandmarkGlobals;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.makeLandmarkGlobals = exports.LandmarkGlobals = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const OverlayColor_1 = require("../../OverlayColor");
|
|
6
|
-
const
|
|
6
|
+
const LandmarkRepo_1 = require("./LandmarkRepo");
|
|
7
7
|
class LandmarkGlobals extends AppObject_1.AppObjectEntity {
|
|
8
8
|
}
|
|
9
9
|
exports.LandmarkGlobals = LandmarkGlobals;
|
|
@@ -16,17 +16,12 @@ exports.makeLandmarkGlobals = makeLandmarkGlobals;
|
|
|
16
16
|
class LandmarkConstantsImp extends LandmarkGlobals {
|
|
17
17
|
constructor(appObject) {
|
|
18
18
|
super(appObject, LandmarkGlobals.type);
|
|
19
|
+
this.landmarkRepoFactory = (id) => {
|
|
20
|
+
const ao = this.appObjects.getOrCreate(id);
|
|
21
|
+
return LandmarkRepo_1.makeLandmarkRepoEntity(ao);
|
|
22
|
+
};
|
|
19
23
|
this.lastSize = 1;
|
|
20
24
|
this.lastColor = OverlayColor_1.OverlayColorEnums.BLUE;
|
|
21
25
|
this.appObjects.registerSingleton(this);
|
|
22
|
-
this.previewLandmark = LandmarkEntity_1.makeLandmarkEntity(appObject, "global");
|
|
23
|
-
}
|
|
24
|
-
landmarkFactory(id) {
|
|
25
|
-
this.error("Landmark Factory was in injected");
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
landmarkRepoFactory(id) {
|
|
29
|
-
this.error("Landmark Repo Factory was in injected");
|
|
30
|
-
return;
|
|
31
26
|
}
|
|
32
27
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { AppObject, AppObjectEntityRepo } from "../../../AppObject";
|
|
1
|
+
import { AppObject, AppObjectEntityRepo, AppObjectRepo } from "../../../AppObject";
|
|
2
|
+
import { Transform3D } from "../../Transform3D";
|
|
2
3
|
import { LandmarkEntity } from "./LandmarkEntity";
|
|
3
4
|
export declare type LandmarkFactory = (id: string) => LandmarkEntity;
|
|
4
5
|
export declare abstract class LandmarkRepo extends AppObjectEntityRepo<LandmarkEntity> {
|
|
5
6
|
static readonly type = "LANDMARK_REPO";
|
|
7
|
+
abstract readonly transform: Transform3D;
|
|
8
|
+
abstract landmarkFactory(id: string): LandmarkEntity;
|
|
9
|
+
abstract createLandmark(id?: string): LandmarkEntity;
|
|
10
|
+
abstract deleteLandmark(id: string): void;
|
|
6
11
|
static get(appObj: AppObject): LandmarkRepo | undefined;
|
|
12
|
+
static getByID(id: string, appObjects: AppObjectRepo): LandmarkRepo | undefined;
|
|
7
13
|
static addIfMissing(appObject: AppObject): LandmarkRepo;
|
|
8
14
|
}
|
|
9
15
|
export declare function makeLandmarkRepoEntity(appObject: AppObject): LandmarkRepo;
|
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeLandmarkRepoEntity = exports.LandmarkRepo = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
|
+
const Utilities_1 = require("../../../Utilities");
|
|
6
|
+
const Transform3D_1 = require("../../Transform3D");
|
|
7
|
+
const LandmarkEntity_1 = require("./LandmarkEntity");
|
|
5
8
|
class LandmarkRepo extends AppObject_1.AppObjectEntityRepo {
|
|
6
9
|
static get(appObj) {
|
|
7
10
|
return appObj.getComponent(this.type);
|
|
8
11
|
}
|
|
12
|
+
static getByID(id, appObjects) {
|
|
13
|
+
var _a;
|
|
14
|
+
return (_a = appObjects.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(this.type);
|
|
15
|
+
}
|
|
9
16
|
static addIfMissing(appObject) {
|
|
10
17
|
const existing = appObject.getComponent(LandmarkRepo.type);
|
|
11
18
|
if (existing) {
|
|
@@ -23,11 +30,26 @@ function makeLandmarkRepoEntity(appObject) {
|
|
|
23
30
|
}
|
|
24
31
|
exports.makeLandmarkRepoEntity = makeLandmarkRepoEntity;
|
|
25
32
|
class LandmarkRepoImp extends LandmarkRepo {
|
|
26
|
-
add(landmark) {
|
|
27
|
-
super.add(landmark);
|
|
28
|
-
landmark.inRepo = this;
|
|
29
|
-
}
|
|
30
33
|
constructor(appObject) {
|
|
31
34
|
super(appObject, LandmarkRepo.type);
|
|
35
|
+
this.createLandmark = (id) => {
|
|
36
|
+
const idToUse = id !== null && id !== void 0 ? id : Utilities_1.generateUniqueID();
|
|
37
|
+
const landmark = this.landmarkFactory(idToUse);
|
|
38
|
+
landmark.inRepo = this;
|
|
39
|
+
this.add(landmark);
|
|
40
|
+
return landmark;
|
|
41
|
+
};
|
|
42
|
+
this.landmarkFactory = (id) => {
|
|
43
|
+
const ao = this.appObjects.getOrCreate(id);
|
|
44
|
+
return LandmarkEntity_1.makeLandmarkEntity(ao);
|
|
45
|
+
};
|
|
46
|
+
this.transform = Transform3D_1.Transform3D.addIfMissing(this.appObject);
|
|
47
|
+
}
|
|
48
|
+
deleteLandmark(id) {
|
|
49
|
+
const landmark = this.getForAppObject(id);
|
|
50
|
+
if (!landmark)
|
|
51
|
+
return;
|
|
52
|
+
landmark.appObject.dispose();
|
|
53
|
+
this.removeForAppObject(id);
|
|
32
54
|
}
|
|
33
55
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
+
import { DeleteAllLandmarksUC } from "../UseCases/DeleteAllLandmarksUC";
|
|
4
|
+
export declare class DeleteAllLandmarksUcMock extends DeleteAllLandmarksUC {
|
|
5
|
+
deleteAllLandmarks: jest.Mock<any, any>;
|
|
6
|
+
constructor(appObject: AppObject);
|
|
7
|
+
}
|
|
8
|
+
export declare function makeDeleteAllLandmarksUcMock(appObjects: AppObjectRepo): DeleteAllLandmarksUcMock;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeDeleteAllLandmarksUcMock = exports.DeleteAllLandmarksUcMock = void 0;
|
|
4
|
+
const DeleteAllLandmarksUC_1 = require("../UseCases/DeleteAllLandmarksUC");
|
|
5
|
+
class DeleteAllLandmarksUcMock extends DeleteAllLandmarksUC_1.DeleteAllLandmarksUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, DeleteAllLandmarksUC_1.DeleteAllLandmarksUC.type);
|
|
8
|
+
this.deleteAllLandmarks = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.DeleteAllLandmarksUcMock = DeleteAllLandmarksUcMock;
|
|
12
|
+
function makeDeleteAllLandmarksUcMock(appObjects) {
|
|
13
|
+
return new DeleteAllLandmarksUcMock(appObjects.getOrCreate("DeleteAllLandmarksUcMock"));
|
|
14
|
+
}
|
|
15
|
+
exports.makeDeleteAllLandmarksUcMock = makeDeleteAllLandmarksUcMock;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { DeleteLandmarkUC } from "../UseCases/DeleteLandmarkUC";
|
|
4
|
+
export declare class DeleteLandmarkUcMock extends DeleteLandmarkUC {
|
|
5
|
+
deleteLandmark: 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.DeleteLandmarkUcMock = void 0;
|
|
4
|
+
const DeleteLandmarkUC_1 = require("../UseCases/DeleteLandmarkUC");
|
|
5
|
+
class DeleteLandmarkUcMock extends DeleteLandmarkUC_1.DeleteLandmarkUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, DeleteLandmarkUC_1.DeleteLandmarkUC.type);
|
|
8
|
+
this.deleteLandmark = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.DeleteLandmarkUcMock = DeleteLandmarkUcMock;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { LandmarkListPM } from "../PM/LandmarkListPM";
|
|
4
|
+
export declare class LandmarkListPmMock extends LandmarkListPM {
|
|
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.LandmarkListPmMock = void 0;
|
|
4
|
+
const LandmarkListPM_1 = require("../PM/LandmarkListPM");
|
|
5
|
+
class LandmarkListPmMock extends LandmarkListPM_1.LandmarkListPM {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, LandmarkListPM_1.LandmarkListPM.type);
|
|
8
|
+
this.vmsAreEqual = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.LandmarkListPmMock = LandmarkListPmMock;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { LandmarkSizePM } from "../PM/LandmarkSizePM";
|
|
4
|
+
export declare class LandmarkSizePmMock extends LandmarkSizePM {
|
|
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.LandmarkSizePmMock = void 0;
|
|
4
|
+
const LandmarkSizePM_1 = require("../PM/LandmarkSizePM");
|
|
5
|
+
class LandmarkSizePmMock extends LandmarkSizePM_1.LandmarkSizePM {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, LandmarkSizePM_1.LandmarkSizePM.type);
|
|
8
|
+
this.vmsAreEqual = jest.fn();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.LandmarkSizePmMock = LandmarkSizePmMock;
|
|
@@ -8,7 +8,9 @@ import { Transform3D } from "../../Transform3D";
|
|
|
8
8
|
import { LandmarkDTO, LandmarkEntity } from "../Entities/LandmarkEntity";
|
|
9
9
|
import { LandmarkRepo } from "../Entities/LandmarkRepo";
|
|
10
10
|
export declare class MockLandmark extends LandmarkEntity {
|
|
11
|
-
|
|
11
|
+
get id(): string;
|
|
12
|
+
get inRepo(): LandmarkRepo | undefined;
|
|
13
|
+
set inRepo(repo: LandmarkRepo | undefined);
|
|
12
14
|
get size(): number;
|
|
13
15
|
set size(val: number);
|
|
14
16
|
parentID: string;
|
|
@@ -7,6 +7,15 @@ class MockLandmark extends LandmarkEntity_1.LandmarkEntity {
|
|
|
7
7
|
super(appObject, LandmarkEntity_1.LandmarkEntity.type);
|
|
8
8
|
this.parentID = "";
|
|
9
9
|
}
|
|
10
|
+
get id() {
|
|
11
|
+
throw new Error("Method not implemented.");
|
|
12
|
+
}
|
|
13
|
+
get inRepo() {
|
|
14
|
+
throw new Error("Method not implemented.");
|
|
15
|
+
}
|
|
16
|
+
set inRepo(repo) {
|
|
17
|
+
throw new Error("Method not implemented.");
|
|
18
|
+
}
|
|
10
19
|
get size() {
|
|
11
20
|
throw new Error("Method not implemented.");
|
|
12
21
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
+
import { TryAddNewLandmarkUC } from "../UseCases";
|
|
4
|
+
export declare class MockTryAddNewLandmarkUC extends TryAddNewLandmarkUC {
|
|
5
|
+
allow: jest.Mock<any, any>;
|
|
6
|
+
addFromRay: jest.Mock<any, any>;
|
|
7
|
+
tryAddLandmark: jest.Mock<any, any>;
|
|
8
|
+
constructor(appObject: AppObject);
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMockTryAddNewLandmarkUC(appObjects: AppObjectRepo): MockTryAddNewLandmarkUC;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMockTryAddNewLandmarkUC = exports.MockTryAddNewLandmarkUC = void 0;
|
|
4
|
+
const UseCases_1 = require("../UseCases");
|
|
5
|
+
class MockTryAddNewLandmarkUC extends UseCases_1.TryAddNewLandmarkUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UseCases_1.TryAddNewLandmarkUC.type);
|
|
8
|
+
this.allow = jest.fn();
|
|
9
|
+
this.addFromRay = jest.fn();
|
|
10
|
+
this.tryAddLandmark = jest.fn();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MockTryAddNewLandmarkUC = MockTryAddNewLandmarkUC;
|
|
14
|
+
function makeMockTryAddNewLandmarkUC(appObjects) {
|
|
15
|
+
return new MockTryAddNewLandmarkUC(appObjects.getOrCreate("MockTryAddNewLandmarkUC"));
|
|
16
|
+
}
|
|
17
|
+
exports.makeMockTryAddNewLandmarkUC = makeMockTryAddNewLandmarkUC;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject, AppObjectRepo } from "../../../AppObject";
|
|
3
|
+
import { TryPreviewLandmarkUC } from "../UseCases";
|
|
4
|
+
export declare class MockTryPreviewLandmarkUC extends TryPreviewLandmarkUC {
|
|
5
|
+
hidePreview: jest.Mock<any, any>;
|
|
6
|
+
allow: jest.Mock<any, any>;
|
|
7
|
+
tryPreviewLandmark: jest.Mock<any, any>;
|
|
8
|
+
constructor(appObject: AppObject);
|
|
9
|
+
}
|
|
10
|
+
export declare function makeMockTryPreviewLandmarkUC(appObjects: AppObjectRepo): MockTryPreviewLandmarkUC;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMockTryPreviewLandmarkUC = exports.MockTryPreviewLandmarkUC = void 0;
|
|
4
|
+
const UseCases_1 = require("../UseCases");
|
|
5
|
+
class MockTryPreviewLandmarkUC extends UseCases_1.TryPreviewLandmarkUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, UseCases_1.TryPreviewLandmarkUC.type);
|
|
8
|
+
this.hidePreview = jest.fn();
|
|
9
|
+
this.allow = jest.fn();
|
|
10
|
+
this.tryPreviewLandmark = jest.fn();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.MockTryPreviewLandmarkUC = MockTryPreviewLandmarkUC;
|
|
14
|
+
function makeMockTryPreviewLandmarkUC(appObjects) {
|
|
15
|
+
return new MockTryPreviewLandmarkUC(appObjects.getOrCreate("MockTryPreviewLandmarkUC"));
|
|
16
|
+
}
|
|
17
|
+
exports.makeMockTryPreviewLandmarkUC = makeMockTryPreviewLandmarkUC;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
import { AppObject } from "../../../AppObject";
|
|
3
|
+
import { SetLandmarkSizeUC } from "../UseCases/SetLandmarkSizeUC";
|
|
4
|
+
export declare class SetLandmarkSizeUcMark extends SetLandmarkSizeUC {
|
|
5
|
+
updateSize: jest.Mock<any, any>;
|
|
6
|
+
submitSize: jest.Mock<any, any>;
|
|
7
|
+
constructor(appObject: AppObject);
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetLandmarkSizeUcMark = void 0;
|
|
4
|
+
const SetLandmarkSizeUC_1 = require("../UseCases/SetLandmarkSizeUC");
|
|
5
|
+
class SetLandmarkSizeUcMark extends SetLandmarkSizeUC_1.SetLandmarkSizeUC {
|
|
6
|
+
constructor(appObject) {
|
|
7
|
+
super(appObject, SetLandmarkSizeUC_1.SetLandmarkSizeUC.type);
|
|
8
|
+
this.updateSize = jest.fn();
|
|
9
|
+
this.submitSize = jest.fn();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SetLandmarkSizeUcMark = SetLandmarkSizeUcMark;
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./DeleteAllLandmarksUcMock"), exports);
|
|
14
|
+
__exportStar(require("./DeleteLandmarkUcMock"), exports);
|
|
15
|
+
__exportStar(require("./LandmarkListPmMock"), exports);
|
|
16
|
+
__exportStar(require("./LandmarkSizePmMock"), exports);
|
|
17
|
+
__exportStar(require("./makeLandmarkDTO"), exports);
|
|
18
|
+
__exportStar(require("./MockLandmark"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeLandmarkDTO = void 0;
|
|
4
|
+
const ValueObjects_1 = require("../../../ValueObjects");
|
|
5
|
+
const OverlayColor_1 = require("../../OverlayColor");
|
|
6
|
+
function makeLandmarkDTO(id, parentID) {
|
|
7
|
+
const q = ValueObjects_1.Quaternion.FromYawPitchRoll(ValueObjects_1.Angle.FromDegrees(10), ValueObjects_1.Angle.FromDegrees(20), ValueObjects_1.Angle.FromDegrees(30));
|
|
8
|
+
const dto = {
|
|
9
|
+
id,
|
|
10
|
+
position: new ValueObjects_1.Vector3(1, 2, 3).dto,
|
|
11
|
+
size: 5,
|
|
12
|
+
parentID,
|
|
13
|
+
rotation: q.dto,
|
|
14
|
+
label: "Callout Label",
|
|
15
|
+
defaultLabel: "Custom Label",
|
|
16
|
+
color: OverlayColor_1.OverlayColorEnums.BLUE,
|
|
17
|
+
};
|
|
18
|
+
return dto;
|
|
19
|
+
}
|
|
20
|
+
exports.makeLandmarkDTO = makeLandmarkDTO;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { AppObject, AppObjectPM } from "../../../AppObject";
|
|
2
|
-
export declare class LandmarkListPM extends AppObjectPM<string[]> {
|
|
1
|
+
import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
|
|
2
|
+
export declare abstract class LandmarkListPM extends AppObjectPM<string[]> {
|
|
3
3
|
static readonly type = "LandmarkListPM";
|
|
4
|
-
static
|
|
5
|
-
private landmarkRepo?;
|
|
6
|
-
vmsAreEqual(a: string[], b: string[]): boolean;
|
|
7
|
-
onRepoChange: () => void;
|
|
8
|
-
dispose: () => void;
|
|
9
|
-
constructor(appObject: AppObject);
|
|
4
|
+
static get(id: string, appObjects: AppObjectRepo): LandmarkListPM | undefined;
|
|
10
5
|
}
|
|
6
|
+
export declare function makeLandmarkListPM(appObject: AppObject): LandmarkListPM;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LandmarkListPM = void 0;
|
|
3
|
+
exports.makeLandmarkListPM = exports.LandmarkListPM = void 0;
|
|
4
4
|
const AppObject_1 = require("../../../AppObject");
|
|
5
5
|
const LandmarkRepo_1 = require("../Entities/LandmarkRepo");
|
|
6
6
|
class LandmarkListPM extends AppObject_1.AppObjectPM {
|
|
7
|
+
static get(id, appObjects) {
|
|
8
|
+
var _a;
|
|
9
|
+
return (_a = appObjects
|
|
10
|
+
.get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(LandmarkListPM.type);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.LandmarkListPM = LandmarkListPM;
|
|
14
|
+
LandmarkListPM.type = "LandmarkListPM";
|
|
15
|
+
function makeLandmarkListPM(appObject) {
|
|
16
|
+
return new LandmarkListPMImp(appObject);
|
|
17
|
+
}
|
|
18
|
+
exports.makeLandmarkListPM = makeLandmarkListPM;
|
|
19
|
+
class LandmarkListPMImp extends LandmarkListPM {
|
|
7
20
|
constructor(appObject) {
|
|
21
|
+
var _a;
|
|
8
22
|
super(appObject, LandmarkListPM.type);
|
|
9
23
|
this.onRepoChange = () => {
|
|
10
24
|
if (!this.landmarkRepo)
|
|
@@ -13,34 +27,13 @@ class LandmarkListPM extends AppObject_1.AppObjectPM {
|
|
|
13
27
|
const ids = landmarks.map((landmark) => landmark.appObject.id);
|
|
14
28
|
this.doUpdateView(ids);
|
|
15
29
|
};
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
super.dispose();
|
|
19
|
-
(_a = this.landmarkRepo) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onRepoChange);
|
|
20
|
-
(_b = this.landmarkRepo) === null || _b === void 0 ? void 0 : _b.removeOnDisposeObserver(this.dispose);
|
|
21
|
-
};
|
|
22
|
-
this.landmarkRepo = appObject.getComponent(LandmarkRepo_1.LandmarkRepo.type);
|
|
23
|
-
if (this.landmarkRepo) {
|
|
24
|
-
this.landmarkRepo.addChangeObserver(this.onRepoChange);
|
|
25
|
-
this.landmarkRepo.addOnDisposeObserver(() => this.dispose());
|
|
26
|
-
this.onRepoChange();
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
console.warn("[LandmarkListPM] App Object does not have a LandmarkRepo Entity");
|
|
30
|
-
}
|
|
30
|
+
(_a = this.landmarkRepo) === null || _a === void 0 ? void 0 : _a.addChangeObserver(this.onRepoChange);
|
|
31
|
+
this.onRepoChange();
|
|
31
32
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (existing) {
|
|
35
|
-
return existing;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
return new LandmarkListPM(appObj);
|
|
39
|
-
}
|
|
33
|
+
get landmarkRepo() {
|
|
34
|
+
return this.getCachedLocalComponent(LandmarkRepo_1.LandmarkRepo.type);
|
|
40
35
|
}
|
|
41
36
|
vmsAreEqual(a, b) {
|
|
42
37
|
return a.length === b.length;
|
|
43
38
|
}
|
|
44
39
|
}
|
|
45
|
-
exports.LandmarkListPM = LandmarkListPM;
|
|
46
|
-
LandmarkListPM.type = "LandmarkListPM";
|