@vived/app 4.29.0 → 4.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/lib/Components/ChannelModel/Adapters/index.d.ts +1 -0
  2. package/lib/Components/ChannelModel/Adapters/index.js +1 -0
  3. package/lib/Components/ChannelModel/Adapters/modelObjectsAreStickableAdapter.d.ts +2 -0
  4. package/lib/Components/ChannelModel/Adapters/modelObjectsAreStickableAdapter.js +27 -0
  5. package/lib/Components/ChannelModel/Controllers/index.d.ts +1 -0
  6. package/lib/Components/ChannelModel/Controllers/index.js +1 -0
  7. package/lib/Components/ChannelModel/Controllers/stickAllActiveObjects.d.ts +2 -0
  8. package/lib/Components/ChannelModel/Controllers/stickAllActiveObjects.js +23 -0
  9. package/lib/Components/ChannelModel/Mocks/ModelObjectsAreStickableMock.d.ts +7 -0
  10. package/lib/Components/ChannelModel/Mocks/ModelObjectsAreStickableMock.js +11 -0
  11. package/lib/Components/ChannelModel/Mocks/StickAllChannelModelObjectsUCMock.d.ts +9 -0
  12. package/lib/Components/ChannelModel/Mocks/StickAllChannelModelObjectsUCMock.js +13 -0
  13. package/lib/Components/ChannelModel/Mocks/index.d.ts +2 -0
  14. package/lib/Components/ChannelModel/Mocks/index.js +2 -0
  15. package/lib/Components/ChannelModel/PMs/ModelObjectsAreStickablePM.d.ts +6 -0
  16. package/lib/Components/ChannelModel/PMs/ModelObjectsAreStickablePM.js +56 -0
  17. package/lib/Components/ChannelModel/PMs/index.d.ts +1 -0
  18. package/lib/Components/ChannelModel/PMs/index.js +1 -0
  19. package/lib/Components/ChannelModel/UC/StickAllChannelModelObjectsUC.d.ts +7 -0
  20. package/lib/Components/ChannelModel/UC/StickAllChannelModelObjectsUC.js +87 -0
  21. package/lib/Components/ChannelModel/UC/index.d.ts +1 -0
  22. package/lib/Components/ChannelModel/UC/index.js +1 -0
  23. package/lib/Components/InspectorTab/Adapters/index.d.ts +1 -0
  24. package/lib/Components/InspectorTab/Adapters/index.js +13 -0
  25. package/lib/Components/InspectorTab/Adapters/inspectorTabAdapter.d.ts +3 -0
  26. package/lib/Components/InspectorTab/Adapters/inspectorTabAdapter.js +23 -0
  27. package/lib/Components/InspectorTab/Controllers/clickSetInspectorTab.d.ts +2 -0
  28. package/lib/Components/InspectorTab/Controllers/clickSetInspectorTab.js +13 -0
  29. package/lib/Components/InspectorTab/Controllers/clickSetInspectorTabIndex.d.ts +2 -0
  30. package/lib/Components/InspectorTab/Controllers/clickSetInspectorTabIndex.js +13 -0
  31. package/lib/Components/InspectorTab/Controllers/index.d.ts +2 -0
  32. package/lib/Components/InspectorTab/Controllers/index.js +14 -0
  33. package/lib/Components/InspectorTab/Entities/InspectorTabEntity.d.ts +12 -0
  34. package/lib/Components/InspectorTab/Entities/InspectorTabEntity.js +54 -0
  35. package/lib/Components/InspectorTab/Entities/index.d.ts +1 -0
  36. package/lib/Components/InspectorTab/Entities/index.js +13 -0
  37. package/lib/Components/InspectorTab/Factories/index.d.ts +1 -0
  38. package/lib/Components/InspectorTab/Factories/index.js +13 -0
  39. package/lib/Components/InspectorTab/Factories/setupInspectorTabs.d.ts +2 -0
  40. package/lib/Components/InspectorTab/Factories/setupInspectorTabs.js +12 -0
  41. package/lib/Components/InspectorTab/Mocks/InspectorTabPmMock.d.ts +8 -0
  42. package/lib/Components/InspectorTab/Mocks/InspectorTabPmMock.js +15 -0
  43. package/lib/Components/InspectorTab/Mocks/index.d.ts +1 -0
  44. package/lib/Components/InspectorTab/Mocks/index.js +13 -0
  45. package/lib/Components/InspectorTab/PMs/InspectorTabPM.d.ts +12 -0
  46. package/lib/Components/InspectorTab/PMs/InspectorTabPM.js +55 -0
  47. package/lib/Components/InspectorTab/PMs/index.d.ts +1 -0
  48. package/lib/Components/InspectorTab/PMs/index.js +13 -0
  49. package/lib/Components/InspectorTab/index.d.ts +6 -0
  50. package/lib/Components/InspectorTab/index.js +18 -0
  51. package/lib/Components/MouseInput/Factories/index.d.ts +1 -0
  52. package/lib/Components/MouseInput/Factories/index.js +13 -0
  53. package/lib/Components/MouseInput/Factories/setupMouseInput.d.ts +2 -0
  54. package/lib/Components/MouseInput/Factories/setupMouseInput.js +9 -0
  55. package/lib/Components/OverlayColor/UC/SerializeOverlayColoredObjects.d.ts +27 -0
  56. package/lib/Components/OverlayColor/UC/SerializeOverlayColoredObjects.js +87 -0
  57. package/lib/Components/OverlayColor/UC/index.d.ts +1 -0
  58. package/lib/Components/OverlayColor/UC/index.js +1 -0
  59. package/lib/Components/SceneRoot/Mocks/DragScaleSceneRootUcMock.d.ts +9 -0
  60. package/lib/Components/SceneRoot/Mocks/DragScaleSceneRootUcMock.js +13 -0
  61. package/lib/Components/SceneRoot/Mocks/OrbitSceneRootUcMock.d.ts +11 -0
  62. package/lib/Components/SceneRoot/Mocks/OrbitSceneRootUcMock.js +15 -0
  63. package/lib/Components/SceneRoot/Mocks/PanSceneRootUcMock.d.ts +10 -0
  64. package/lib/Components/SceneRoot/Mocks/PanSceneRootUcMock.js +14 -0
  65. package/lib/Components/SceneRoot/Mocks/index.d.ts +2 -0
  66. package/lib/Components/SceneRoot/Mocks/index.js +14 -0
  67. package/lib/Components/Selection/Controller/KeyboardToClearSelection.d.ts +8 -0
  68. package/lib/Components/Selection/Controller/KeyboardToClearSelection.js +23 -0
  69. package/lib/Components/Selection/Factories/index.d.ts +1 -0
  70. package/lib/Components/Selection/Factories/index.js +13 -0
  71. package/lib/Components/Selection/Factories/setupSelection.d.ts +2 -0
  72. package/lib/Components/Selection/Factories/setupSelection.js +27 -0
  73. package/lib/Components/Stick/Adapters/index.d.ts +1 -0
  74. package/lib/Components/Stick/Adapters/index.js +13 -0
  75. package/lib/Components/Stick/Adapters/stickTargetAdapter.d.ts +3 -0
  76. package/lib/Components/Stick/Adapters/stickTargetAdapter.js +23 -0
  77. package/lib/Components/Stick/Controllers/DoubleClickToStickMC.d.ts +15 -0
  78. package/lib/Components/Stick/Controllers/DoubleClickToStickMC.js +57 -0
  79. package/lib/Components/Stick/Controllers/DoubleTapToStickTC.d.ts +15 -0
  80. package/lib/Components/Stick/Controllers/DoubleTapToStickTC.js +52 -0
  81. package/lib/Components/Stick/Controllers/clickStick.d.ts +2 -0
  82. package/lib/Components/Stick/Controllers/clickStick.js +13 -0
  83. package/lib/Components/Stick/Controllers/index.d.ts +3 -0
  84. package/lib/Components/Stick/Controllers/index.js +15 -0
  85. package/lib/Components/Stick/Entities/Stickable.d.ts +22 -0
  86. package/lib/Components/Stick/Entities/Stickable.js +101 -0
  87. package/lib/Components/Stick/Entities/index.d.ts +1 -0
  88. package/lib/Components/Stick/Entities/index.js +13 -0
  89. package/lib/Components/Stick/Factories/index.d.ts +1 -0
  90. package/lib/Components/Stick/Factories/index.js +13 -0
  91. package/lib/Components/Stick/Factories/setupStick.d.ts +2 -0
  92. package/lib/Components/Stick/Factories/setupStick.js +15 -0
  93. package/lib/Components/Stick/Mocks/StickTargetPmMock.d.ts +7 -0
  94. package/lib/Components/Stick/Mocks/StickTargetPmMock.js +11 -0
  95. package/lib/Components/Stick/Mocks/StickUCMock.d.ts +7 -0
  96. package/lib/Components/Stick/Mocks/StickUCMock.js +11 -0
  97. package/lib/Components/Stick/Mocks/TryStickAppObjectUCMock.d.ts +10 -0
  98. package/lib/Components/Stick/Mocks/TryStickAppObjectUCMock.js +17 -0
  99. package/lib/Components/Stick/Mocks/index.d.ts +3 -0
  100. package/lib/Components/Stick/Mocks/index.js +15 -0
  101. package/lib/Components/Stick/PMs/StickTargetPM.d.ts +11 -0
  102. package/lib/Components/Stick/PMs/StickTargetPM.js +50 -0
  103. package/lib/Components/Stick/PMs/index.d.ts +1 -0
  104. package/lib/Components/Stick/PMs/index.js +13 -0
  105. package/lib/Components/Stick/UCs/PanTransformWithStickUC.d.ts +3 -0
  106. package/lib/Components/Stick/UCs/PanTransformWithStickUC.js +131 -0
  107. package/lib/Components/Stick/UCs/StickUC.d.ts +7 -0
  108. package/lib/Components/Stick/UCs/StickUC.js +71 -0
  109. package/lib/Components/Stick/UCs/TryPickStickTarget.d.ts +8 -0
  110. package/lib/Components/Stick/UCs/TryPickStickTarget.js +26 -0
  111. package/lib/Components/Stick/UCs/TryStickAppObjectUC.d.ts +10 -0
  112. package/lib/Components/Stick/UCs/TryStickAppObjectUC.js +74 -0
  113. package/lib/Components/Stick/UCs/index.d.ts +4 -0
  114. package/lib/Components/Stick/UCs/index.js +16 -0
  115. package/lib/Components/Stick/index.d.ts +7 -0
  116. package/lib/Components/Stick/index.js +19 -0
  117. package/lib/Components/StoredView/Adapters/hasStoredViewAdapter.d.ts +2 -0
  118. package/lib/Components/StoredView/Adapters/hasStoredViewAdapter.js +19 -0
  119. package/lib/Components/StoredView/Adapters/index.d.ts +1 -0
  120. package/lib/Components/StoredView/Adapters/index.js +13 -0
  121. package/lib/Components/StoredView/Controllers/clearStoredView.d.ts +2 -0
  122. package/lib/Components/StoredView/Controllers/clearStoredView.js +13 -0
  123. package/lib/Components/StoredView/Controllers/index.d.ts +4 -0
  124. package/lib/Components/StoredView/Controllers/index.js +16 -0
  125. package/lib/Components/StoredView/Controllers/restoreStoredView.d.ts +2 -0
  126. package/lib/Components/StoredView/Controllers/restoreStoredView.js +13 -0
  127. package/lib/Components/StoredView/Controllers/setViewInXR.d.ts +2 -0
  128. package/lib/Components/StoredView/Controllers/setViewInXR.js +13 -0
  129. package/lib/Components/StoredView/Controllers/storeCurrentView.d.ts +2 -0
  130. package/lib/Components/StoredView/Controllers/storeCurrentView.js +13 -0
  131. package/lib/Components/StoredView/Factories/index.d.ts +1 -0
  132. package/lib/Components/StoredView/Factories/index.js +13 -0
  133. package/lib/Components/StoredView/Factories/setupStoredView.d.ts +2 -0
  134. package/lib/Components/StoredView/Factories/setupStoredView.js +21 -0
  135. package/lib/Components/StoredView/Mocks/ClearStoredViewUcMock.d.ts +8 -0
  136. package/lib/Components/StoredView/Mocks/ClearStoredViewUcMock.js +15 -0
  137. package/lib/Components/StoredView/Mocks/HasStoredViewPmMock.d.ts +8 -0
  138. package/lib/Components/StoredView/Mocks/HasStoredViewPmMock.js +15 -0
  139. package/lib/Components/StoredView/Mocks/RestoreStoredViewUcMock.d.ts +9 -0
  140. package/lib/Components/StoredView/Mocks/RestoreStoredViewUcMock.js +17 -0
  141. package/lib/Components/StoredView/Mocks/SetViewInXRUcMock.d.ts +8 -0
  142. package/lib/Components/StoredView/Mocks/SetViewInXRUcMock.js +15 -0
  143. package/lib/Components/StoredView/Mocks/StoreCurrentViewUcMock.d.ts +8 -0
  144. package/lib/Components/StoredView/Mocks/StoreCurrentViewUcMock.js +15 -0
  145. package/lib/Components/StoredView/Mocks/index.d.ts +1 -0
  146. package/lib/Components/StoredView/Mocks/index.js +13 -0
  147. package/lib/Components/Stylus/Factories/index.d.ts +1 -0
  148. package/lib/Components/Stylus/Factories/index.js +13 -0
  149. package/lib/Components/Stylus/Factories/setupStylus.d.ts +2 -0
  150. package/lib/Components/Stylus/Factories/setupStylus.js +19 -0
  151. package/lib/Components/Stylus/index.d.ts +1 -0
  152. package/lib/Components/Stylus/index.js +1 -0
  153. package/lib/Components/Tools/Factories/index.d.ts +1 -0
  154. package/lib/Components/Tools/Factories/index.js +13 -0
  155. package/lib/Components/Tools/Factories/setupTools.d.ts +3 -0
  156. package/lib/Components/Tools/Factories/setupTools.js +15 -0
  157. package/lib/Components/Tools/Factories/toolFactory.d.ts +3 -0
  158. package/lib/Components/Tools/Factories/toolFactory.js +14 -0
  159. package/lib/Components/TouchController/Factories/index.d.ts +1 -0
  160. package/lib/Components/TouchController/Factories/index.js +13 -0
  161. package/lib/Components/TouchController/Factories/setupTouchInput.d.ts +2 -0
  162. package/lib/Components/TouchController/Factories/setupTouchInput.js +9 -0
  163. package/lib/Components/Transform3D/UC/PanTransformUC.d.ts +28 -1
  164. package/lib/Components/Transform3D/UC/PanTransformUC.js +52 -34
  165. package/lib/Components/Transform3D/UC/TryPanTransformUC.d.ts +3 -2
  166. package/lib/Components/Transform3D/UC/index.d.ts +0 -1
  167. package/lib/Components/Transform3D/UC/index.js +0 -1
  168. package/lib/Components/UndoRedo/Factories/index.d.ts +1 -0
  169. package/lib/Components/UndoRedo/Factories/index.js +13 -0
  170. package/lib/Components/UndoRedo/Factories/setupUndoRedo.d.ts +2 -0
  171. package/lib/Components/UndoRedo/Factories/setupUndoRedo.js +18 -0
  172. package/lib/Components/UndoRedo/UCs/UndoRedoButtonStatesHook.d.ts +11 -0
  173. package/lib/Components/UndoRedo/UCs/UndoRedoButtonStatesHook.js +55 -0
  174. package/lib/Components/UndoRedo/UCs/index.d.ts +1 -0
  175. package/lib/Components/UndoRedo/UCs/index.js +13 -0
  176. package/lib/Components/index.d.ts +1 -0
  177. package/lib/Components/index.js +1 -0
  178. package/package.json +1 -1
@@ -5,4 +5,5 @@ export * from "./channelModelObjectAdapter";
5
5
  export * from "./modelHasCalloutsAdapter";
6
6
  export * from "./modelHasLandmarksAdapter";
7
7
  export * from "./modelObjectsAreHiddenAdapter";
8
+ export * from "./modelObjectsAreStickableAdapter";
8
9
  export * from "./modelObjectsHaveOverlayAdapter";
@@ -17,4 +17,5 @@ __exportStar(require("./channelModelObjectAdapter"), exports);
17
17
  __exportStar(require("./modelHasCalloutsAdapter"), exports);
18
18
  __exportStar(require("./modelHasLandmarksAdapter"), exports);
19
19
  __exportStar(require("./modelObjectsAreHiddenAdapter"), exports);
20
+ __exportStar(require("./modelObjectsAreStickableAdapter"), exports);
20
21
  __exportStar(require("./modelObjectsHaveOverlayAdapter"), exports);
@@ -0,0 +1,2 @@
1
+ import { PmAdapter } from "../../../Types";
2
+ export declare const modelObjectsAreStickableAdapter: PmAdapter<boolean>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.modelObjectsAreStickableAdapter = void 0;
4
+ const ModelObjectsAreStickablePM_1 = require("../PMs/ModelObjectsAreStickablePM");
5
+ exports.modelObjectsAreStickableAdapter = {
6
+ defaultVM: false,
7
+ subscribe: (id, appObjects, setVM) => {
8
+ if (!id)
9
+ return;
10
+ const pm = ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM.get(id, appObjects);
11
+ if (!pm) {
12
+ appObjects.submitError("modelObjectsAreStickableAdapter", "Unable to find ModelObjectsAreStickablePM");
13
+ return;
14
+ }
15
+ pm.addView(setVM);
16
+ },
17
+ unsubscribe: (id, appObjects, setVM) => {
18
+ if (!id)
19
+ return;
20
+ const pm = ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM.get(id, appObjects);
21
+ if (!pm) {
22
+ appObjects.submitError("modelObjectsAreStickableAdapter", "Unable to find ModelObjectsAreStickablePM");
23
+ return;
24
+ }
25
+ pm.removeView(setVM);
26
+ },
27
+ };
@@ -1,3 +1,4 @@
1
1
  export * from "./clearActiveObjectsOverlays";
2
2
  export * from "./clickSelectChannelModel";
3
+ export * from "./stickAllActiveObjects";
3
4
  export * from "./unhideAllActiveObjects";
@@ -12,4 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./clearActiveObjectsOverlays"), exports);
14
14
  __exportStar(require("./clickSelectChannelModel"), exports);
15
+ __exportStar(require("./stickAllActiveObjects"), exports);
15
16
  __exportStar(require("./unhideAllActiveObjects"), exports);
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ export declare function stickAllActiveObjects(appObjects: AppObjectRepo): void;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stickAllActiveObjects = void 0;
4
+ const Entities_1 = require("../Entities");
5
+ const UC_1 = require("../UC");
6
+ function stickAllActiveObjects(appObjects) {
7
+ const repo = Entities_1.ChannelModelRepo.get(appObjects);
8
+ if (!repo) {
9
+ appObjects.submitError("stickAllActiveObjects", "Unable to find ChannelModelRepo");
10
+ return;
11
+ }
12
+ if (!repo.activeModel) {
13
+ appObjects.submitWarning("stickAllActiveObjects", "No Model is Active");
14
+ return;
15
+ }
16
+ const uc = UC_1.StickAllChannelModelObjectsUC.get(repo.activeModel, appObjects);
17
+ if (!uc) {
18
+ appObjects.submitError("stickAllActiveObjects", "Unable to find StickAllChannelModelObjectsUC");
19
+ return;
20
+ }
21
+ uc.stickAll();
22
+ }
23
+ exports.stickAllActiveObjects = stickAllActiveObjects;
@@ -0,0 +1,7 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject } from "../../../AppObject";
3
+ import { ModelObjectsAreStickablePM } from "../PMs/ModelObjectsAreStickablePM";
4
+ export declare class ModelObjectsAreStickablePMMock extends ModelObjectsAreStickablePM {
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.ModelObjectsAreStickablePMMock = void 0;
4
+ const ModelObjectsAreStickablePM_1 = require("../PMs/ModelObjectsAreStickablePM");
5
+ class ModelObjectsAreStickablePMMock extends ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM {
6
+ constructor(appObject) {
7
+ super(appObject, ModelObjectsAreStickablePM_1.ModelObjectsAreStickablePM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.ModelObjectsAreStickablePMMock = ModelObjectsAreStickablePMMock;
@@ -0,0 +1,9 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject } from "../../../AppObject";
3
+ import { StickAllChannelModelObjectsUC } from "../UC";
4
+ export declare class StickAllChannelModelObjectsUCMock extends StickAllChannelModelObjectsUC {
5
+ easeFn: jest.Mock<any, any>;
6
+ stickDurationMS: number;
7
+ stickAll: jest.Mock<any, any>;
8
+ constructor(appObject: AppObject);
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StickAllChannelModelObjectsUCMock = void 0;
4
+ const UC_1 = require("../UC");
5
+ class StickAllChannelModelObjectsUCMock extends UC_1.StickAllChannelModelObjectsUC {
6
+ constructor(appObject) {
7
+ super(appObject, UC_1.StickAllChannelModelObjectsUC.type);
8
+ this.easeFn = jest.fn();
9
+ this.stickDurationMS = 0;
10
+ this.stickAll = jest.fn();
11
+ }
12
+ }
13
+ exports.StickAllChannelModelObjectsUCMock = StickAllChannelModelObjectsUCMock;
@@ -8,7 +8,9 @@ export * from "./LoadChannelModelMock";
8
8
  export * from "./ModelHasCalloutsPmMock";
9
9
  export * from "./ModelHasLandmarksPmMock";
10
10
  export * from "./ModelObjectsAreHiddenPMMock";
11
+ export * from "./ModelObjectsAreStickableMock";
11
12
  export * from "./ModelObjectsHaveOverlayPMMock";
12
13
  export * from "./SelectChannelModelUCMock";
14
+ export * from "./StickAllChannelModelObjectsUCMock";
13
15
  export * from "./UnhideAllChannelModelObjectsUCMock";
14
16
  export * from "./ValidateChannelModelMock";
@@ -20,7 +20,9 @@ __exportStar(require("./LoadChannelModelMock"), exports);
20
20
  __exportStar(require("./ModelHasCalloutsPmMock"), exports);
21
21
  __exportStar(require("./ModelHasLandmarksPmMock"), exports);
22
22
  __exportStar(require("./ModelObjectsAreHiddenPMMock"), exports);
23
+ __exportStar(require("./ModelObjectsAreStickableMock"), exports);
23
24
  __exportStar(require("./ModelObjectsHaveOverlayPMMock"), exports);
24
25
  __exportStar(require("./SelectChannelModelUCMock"), exports);
26
+ __exportStar(require("./StickAllChannelModelObjectsUCMock"), exports);
25
27
  __exportStar(require("./UnhideAllChannelModelObjectsUCMock"), exports);
26
28
  __exportStar(require("./ValidateChannelModelMock"), exports);
@@ -0,0 +1,6 @@
1
+ import { AppObject, AppObjectPM, AppObjectRepo } from "../../../AppObject";
2
+ export declare abstract class ModelObjectsAreStickablePM extends AppObjectPM<boolean> {
3
+ static readonly type = "ModelObjectsAreStickablePM";
4
+ static get(appObjID: string, appObjects: AppObjectRepo): ModelObjectsAreStickablePM | undefined;
5
+ }
6
+ export declare function makeModelObjectsAreStickablePM(appObject: AppObject): ModelObjectsAreStickablePM;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeModelObjectsAreStickablePM = exports.ModelObjectsAreStickablePM = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Stickable_1 = require("../../Stick/Entities/Stickable");
6
+ const Entities_1 = require("../Entities");
7
+ class ModelObjectsAreStickablePM extends AppObject_1.AppObjectPM {
8
+ static get(appObjID, appObjects) {
9
+ var _a;
10
+ return (_a = appObjects
11
+ .get(appObjID)) === null || _a === void 0 ? void 0 : _a.getComponent(ModelObjectsAreStickablePM.type);
12
+ }
13
+ }
14
+ exports.ModelObjectsAreStickablePM = ModelObjectsAreStickablePM;
15
+ ModelObjectsAreStickablePM.type = "ModelObjectsAreStickablePM";
16
+ function makeModelObjectsAreStickablePM(appObject) {
17
+ return new ModelObjectsAreStickablePMImp(appObject);
18
+ }
19
+ exports.makeModelObjectsAreStickablePM = makeModelObjectsAreStickablePM;
20
+ class ModelObjectsAreStickablePMImp extends ModelObjectsAreStickablePM {
21
+ constructor(appObject) {
22
+ super(appObject, ModelObjectsAreStickablePM.type);
23
+ this.onRepoChange = () => {
24
+ if (!this.channelModel)
25
+ return;
26
+ let stickable = false;
27
+ this.channelModel.modelObjects().forEach((obj) => {
28
+ var _a;
29
+ if (stickable)
30
+ return;
31
+ if ((_a = obj.appObject.getComponent(Stickable_1.StickableEntity.type)) === null || _a === void 0 ? void 0 : _a.canBeStuck) {
32
+ stickable = true;
33
+ }
34
+ });
35
+ this.doUpdateView(stickable);
36
+ };
37
+ this.dispose = () => {
38
+ var _a;
39
+ super.dispose();
40
+ (_a = this.channelModel) === null || _a === void 0 ? void 0 : _a.removeChangeObserver(this.onRepoChange);
41
+ };
42
+ if (this.channelModel) {
43
+ this.channelModel.addChangeObserver(this.onRepoChange);
44
+ this.onRepoChange();
45
+ }
46
+ else {
47
+ this.error("App Object does not have a ChannelModelEntity");
48
+ }
49
+ }
50
+ get channelModel() {
51
+ return this.getCachedLocalComponent(Entities_1.ChannelModelEntity.type);
52
+ }
53
+ vmsAreEqual(a, b) {
54
+ return a === b;
55
+ }
56
+ }
@@ -5,4 +5,5 @@ export * from "./ChannelModelPM";
5
5
  export * from "./ModelHasCalloutsPM";
6
6
  export * from "./ModelHasLandmarksPM";
7
7
  export * from "./ModelObjectsAreHiddenPM";
8
+ export * from "./ModelObjectsAreStickablePM";
8
9
  export * from "./ModelObjectsHaveOverlayPM";
@@ -17,4 +17,5 @@ __exportStar(require("./ChannelModelPM"), exports);
17
17
  __exportStar(require("./ModelHasCalloutsPM"), exports);
18
18
  __exportStar(require("./ModelHasLandmarksPM"), exports);
19
19
  __exportStar(require("./ModelObjectsAreHiddenPM"), exports);
20
+ __exportStar(require("./ModelObjectsAreStickablePM"), exports);
20
21
  __exportStar(require("./ModelObjectsHaveOverlayPM"), exports);
@@ -0,0 +1,7 @@
1
+ import { AppObject, AppObjectRepo, AppObjectUC } from "../../../AppObject";
2
+ export declare abstract class StickAllChannelModelObjectsUC extends AppObjectUC {
3
+ static readonly type = "StickAllChannelModelObjectsUC";
4
+ abstract stickAll(): void;
5
+ static get(id: string, appObjects: AppObjectRepo): StickAllChannelModelObjectsUC | undefined;
6
+ }
7
+ export declare function makeStickAllChannelModelObjectsUC(appObject: AppObject): StickAllChannelModelObjectsUC;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeStickAllChannelModelObjectsUC = exports.StickAllChannelModelObjectsUC = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const ValueObjects_1 = require("../../../ValueObjects");
6
+ const DispatchStateChangeUC_1 = require("../../Dispatcher/UC/DispatchStateChangeUC");
7
+ const Stickable_1 = require("../../Stick/Entities/Stickable");
8
+ const Transform3D_1 = require("../../Transform3D/Entities/Transform3D");
9
+ const UndoRedoEntity_1 = require("../../UndoRedo/Entities/UndoRedoEntity");
10
+ const Entities_1 = require("../Entities");
11
+ class StickAllChannelModelObjectsUC extends AppObject_1.AppObjectUC {
12
+ static get(id, appObjects) {
13
+ var _a;
14
+ return (_a = appObjects
15
+ .get(id)) === null || _a === void 0 ? void 0 : _a.getComponent(StickAllChannelModelObjectsUC.type);
16
+ }
17
+ }
18
+ exports.StickAllChannelModelObjectsUC = StickAllChannelModelObjectsUC;
19
+ StickAllChannelModelObjectsUC.type = "StickAllChannelModelObjectsUC";
20
+ function makeStickAllChannelModelObjectsUC(appObject) {
21
+ return new StickAllChannelModelObjectsUCImp(appObject);
22
+ }
23
+ exports.makeStickAllChannelModelObjectsUC = makeStickAllChannelModelObjectsUC;
24
+ class StickAllChannelModelObjectsUCImp extends StickAllChannelModelObjectsUC {
25
+ constructor(appObject) {
26
+ super(appObject, StickAllChannelModelObjectsUC.type);
27
+ this.stickAll = () => {
28
+ var _a;
29
+ if (!this.model)
30
+ return;
31
+ const dispatch = this.dispatchStateChange;
32
+ if (!dispatch)
33
+ return;
34
+ const stuckObjects = [];
35
+ this.model.modelObjects().forEach((modelObj) => {
36
+ const appObj = modelObj.appObject;
37
+ const stick = Stickable_1.StickableEntity.get(modelObj.id, this.appObjects);
38
+ if (!stick || stick.canBeStuck !== true)
39
+ return;
40
+ const transform = Transform3D_1.Transform3D.get(appObj);
41
+ if (!transform)
42
+ return;
43
+ const undoDTO = {
44
+ transform,
45
+ undoPos: transform.localPosition,
46
+ undoRot: transform.localRotation,
47
+ undoScale: transform.localScale,
48
+ redoPos: stick.stickPosition,
49
+ redoRot: stick.stickRotation,
50
+ redoScale: new ValueObjects_1.Vector3(stick.stickScale, stick.stickScale, stick.stickScale)
51
+ };
52
+ stick.doStick(dispatch);
53
+ stuckObjects.push(undoDTO);
54
+ });
55
+ if (stuckObjects.length === 0)
56
+ return;
57
+ (_a = this.undo) === null || _a === void 0 ? void 0 : _a.submitAction({
58
+ undoAction: () => {
59
+ stuckObjects.forEach((po) => {
60
+ po.transform.localPosition = po.undoPos;
61
+ po.transform.localRotation = po.undoRot;
62
+ po.transform.localScale = po.undoScale;
63
+ });
64
+ dispatch();
65
+ },
66
+ redoAction: () => {
67
+ stuckObjects.forEach((po) => {
68
+ po.transform.localPosition = po.redoPos;
69
+ po.transform.localRotation = po.redoRot;
70
+ po.transform.localScale = po.redoScale;
71
+ });
72
+ dispatch();
73
+ }
74
+ });
75
+ };
76
+ }
77
+ get model() {
78
+ return this.getCachedLocalComponent(Entities_1.ChannelModelEntity.type);
79
+ }
80
+ get dispatchStateChange() {
81
+ var _a;
82
+ return (_a = this.getCachedSingleton(DispatchStateChangeUC_1.DispatchStateChangeUC.type)) === null || _a === void 0 ? void 0 : _a.doDispatch;
83
+ }
84
+ get undo() {
85
+ return this.getCachedSingleton(UndoRedoEntity_1.UndoRedoEntity.type);
86
+ }
87
+ }
@@ -4,6 +4,7 @@ export * from "./ClearModelObjectOverlaysUC";
4
4
  export * from "./LoadChannelModelUC";
5
5
  export * from "./SelectChannelModelUC";
6
6
  export * from "./SerializeActiveModel";
7
+ export * from "./StickAllChannelModelObjectsUC";
7
8
  export * from "./UnhideAllAppObjectsUndoRedo";
8
9
  export * from "./UnhideAllChannelModelObjectsUC";
9
10
  export * from "./ValidateChannelModel";
@@ -16,6 +16,7 @@ __exportStar(require("./ClearModelObjectOverlaysUC"), exports);
16
16
  __exportStar(require("./LoadChannelModelUC"), exports);
17
17
  __exportStar(require("./SelectChannelModelUC"), exports);
18
18
  __exportStar(require("./SerializeActiveModel"), exports);
19
+ __exportStar(require("./StickAllChannelModelObjectsUC"), exports);
19
20
  __exportStar(require("./UnhideAllAppObjectsUndoRedo"), exports);
20
21
  __exportStar(require("./UnhideAllChannelModelObjectsUC"), exports);
21
22
  __exportStar(require("./ValidateChannelModel"), exports);
@@ -0,0 +1 @@
1
+ export * from "./inspectorTabAdapter";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./inspectorTabAdapter"), exports);
@@ -0,0 +1,3 @@
1
+ import { SingletonPmAdapter } from "../../../Types";
2
+ import { InspectorTabVM } from "../PMs/InspectorTabPM";
3
+ export declare const inspectorTabAdapter: SingletonPmAdapter<InspectorTabVM>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inspectorTabAdapter = void 0;
4
+ const InspectorTabPM_1 = require("../PMs/InspectorTabPM");
5
+ exports.inspectorTabAdapter = {
6
+ defaultVM: InspectorTabPM_1.defaultInspectorTabVM,
7
+ subscribe: (appObjects, setVM) => {
8
+ const pm = InspectorTabPM_1.InspectorTabPM.get(appObjects);
9
+ if (!pm) {
10
+ appObjects.submitError("inspectorTabAdapter", "Unable to find InspectorTabPM");
11
+ return;
12
+ }
13
+ pm.addView(setVM);
14
+ },
15
+ unsubscribe: (appObjects, setVM) => {
16
+ const pm = InspectorTabPM_1.InspectorTabPM.get(appObjects);
17
+ if (!pm) {
18
+ appObjects.submitError("inspectorTabAdapter", "Unable to find InspectorTabPM");
19
+ return;
20
+ }
21
+ pm.removeView(setVM);
22
+ }
23
+ };
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ export declare function clickSetInspectorTab(tab: string, appObjects: AppObjectRepo): void;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clickSetInspectorTab = void 0;
4
+ const InspectorTabEntity_1 = require("../Entities/InspectorTabEntity");
5
+ function clickSetInspectorTab(tab, appObjects) {
6
+ const entity = InspectorTabEntity_1.InspectorTabEntity.get(appObjects);
7
+ if (!entity) {
8
+ appObjects.submitError("clickSetInspectorTab", "Unable to find InspectorTabEntity");
9
+ return;
10
+ }
11
+ entity.activeTab = tab;
12
+ }
13
+ exports.clickSetInspectorTab = clickSetInspectorTab;
@@ -0,0 +1,2 @@
1
+ import { AppObjectRepo } from "../../../AppObject";
2
+ export declare function clickSetInspectorTabIndex(tabIndex: number, appObjects: AppObjectRepo): void;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clickSetInspectorTabIndex = void 0;
4
+ const InspectorTabEntity_1 = require("../Entities/InspectorTabEntity");
5
+ function clickSetInspectorTabIndex(tabIndex, appObjects) {
6
+ const entity = InspectorTabEntity_1.InspectorTabEntity.get(appObjects);
7
+ if (!entity) {
8
+ appObjects.submitError("clickSetInspectorTabIndex", "Unable to find InspectorTabEntity");
9
+ return;
10
+ }
11
+ entity.activeTabIndex = tabIndex;
12
+ }
13
+ exports.clickSetInspectorTabIndex = clickSetInspectorTabIndex;
@@ -0,0 +1,2 @@
1
+ export * from "./clickSetInspectorTab";
2
+ export * from "./clickSetInspectorTabIndex";
@@ -0,0 +1,14 @@
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("./clickSetInspectorTab"), exports);
14
+ __exportStar(require("./clickSetInspectorTabIndex"), exports);
@@ -0,0 +1,12 @@
1
+ import { AppObject, AppObjectEntity, AppObjectRepo } from "../../../AppObject";
2
+ export declare abstract class InspectorTabEntity extends AppObjectEntity {
3
+ static readonly type = "InspectorTabEntity";
4
+ abstract get inspectorTabs(): string[];
5
+ abstract setInspectorTabs(tabs: string[]): void;
6
+ abstract get activeTab(): string;
7
+ abstract set activeTab(val: string);
8
+ abstract get activeTabIndex(): number;
9
+ abstract set activeTabIndex(val: number);
10
+ static get: (appObjects: AppObjectRepo) => InspectorTabEntity | undefined;
11
+ }
12
+ export declare function makeInspectorTabEntity(appObject: AppObject): InspectorTabEntity;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeInspectorTabEntity = exports.InspectorTabEntity = void 0;
4
+ const AppObject_1 = require("../../../AppObject");
5
+ const Entities_1 = require("../../../Entities");
6
+ class InspectorTabEntity extends AppObject_1.AppObjectEntity {
7
+ }
8
+ exports.InspectorTabEntity = InspectorTabEntity;
9
+ InspectorTabEntity.type = "InspectorTabEntity";
10
+ InspectorTabEntity.get = (appObjects) => AppObject_1.getSingletonComponent(InspectorTabEntity.type, appObjects);
11
+ function makeInspectorTabEntity(appObject) {
12
+ return new InspectorTabEntityImp(appObject);
13
+ }
14
+ exports.makeInspectorTabEntity = makeInspectorTabEntity;
15
+ class InspectorTabEntityImp extends InspectorTabEntity {
16
+ constructor(appObject) {
17
+ super(appObject, InspectorTabEntity.type);
18
+ this._inspectorTabs = [];
19
+ this.memoizedIndex = new Entities_1.MemoizedNumber(-1, this.notifyOnChange);
20
+ this.appObjects.registerSingleton(this);
21
+ }
22
+ get inspectorTabs() {
23
+ return [...this._inspectorTabs];
24
+ }
25
+ setInspectorTabs(tabs) {
26
+ this._inspectorTabs = [...tabs];
27
+ if (tabs.length === 0)
28
+ return;
29
+ this.memoizedIndex.val = 0;
30
+ }
31
+ get activeTabIndex() {
32
+ return this.memoizedIndex.val;
33
+ }
34
+ set activeTabIndex(val) {
35
+ if (val < 0 || val >= this._inspectorTabs.length) {
36
+ this.warn("Invalid index: " + val);
37
+ return;
38
+ }
39
+ this.memoizedIndex.val = val;
40
+ }
41
+ get activeTab() {
42
+ if (this.memoizedIndex.val < 0)
43
+ return "";
44
+ return this._inspectorTabs[this.memoizedIndex.val];
45
+ }
46
+ set activeTab(inspectorTab) {
47
+ const index = this._inspectorTabs.indexOf(inspectorTab);
48
+ if (index === undefined || index < 0) {
49
+ this.warn("Unknown inspector tab: " + inspectorTab);
50
+ return;
51
+ }
52
+ this.memoizedIndex.val = index;
53
+ }
54
+ }
@@ -0,0 +1 @@
1
+ export * from "./InspectorTabEntity";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./InspectorTabEntity"), exports);
@@ -0,0 +1 @@
1
+ export * from "./setupInspectorTabs";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./setupInspectorTabs"), exports);
@@ -0,0 +1,2 @@
1
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
2
+ export declare function setupInspectorTabs(appObjects: AppObjectRepo, tabs: string[]): AppObject;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupInspectorTabs = void 0;
4
+ const Entities_1 = require("../Entities");
5
+ const PMs_1 = require("../PMs");
6
+ function setupInspectorTabs(appObjects, tabs) {
7
+ const ao = appObjects.getOrCreate("InspectorTabs");
8
+ Entities_1.makeInspectorTabEntity(ao).setInspectorTabs(tabs);
9
+ PMs_1.makeInspectorTabPM(ao);
10
+ return ao;
11
+ }
12
+ exports.setupInspectorTabs = setupInspectorTabs;
@@ -0,0 +1,8 @@
1
+ /// <reference types="jest" />
2
+ import { AppObject, AppObjectRepo } from "../../../AppObject";
3
+ import { InspectorTabPM } from "../PMs/InspectorTabPM";
4
+ export declare class InspectorTabPmMock extends InspectorTabPM {
5
+ vmsAreEqual: jest.Mock<any, any>;
6
+ constructor(appObject: AppObject);
7
+ }
8
+ export declare function makeInspectorTabPmMock(appObjects: AppObjectRepo): InspectorTabPmMock;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeInspectorTabPmMock = exports.InspectorTabPmMock = void 0;
4
+ const InspectorTabPM_1 = require("../PMs/InspectorTabPM");
5
+ class InspectorTabPmMock extends InspectorTabPM_1.InspectorTabPM {
6
+ constructor(appObject) {
7
+ super(appObject, InspectorTabPM_1.InspectorTabPM.type);
8
+ this.vmsAreEqual = jest.fn();
9
+ }
10
+ }
11
+ exports.InspectorTabPmMock = InspectorTabPmMock;
12
+ function makeInspectorTabPmMock(appObjects) {
13
+ return new InspectorTabPmMock(appObjects.getOrCreate("InspectorTabPmMock"));
14
+ }
15
+ exports.makeInspectorTabPmMock = makeInspectorTabPmMock;
@@ -0,0 +1 @@
1
+ export * from "./InspectorTabPmMock";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./InspectorTabPmMock"), exports);