@vived/app 5.3.0 → 6.1.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/dist/cjs/Babylon/Adapters/showBabylonInspectorAdapter.test.js +3 -0
- package/dist/cjs/Babylon/Adapters/showBabylonInspectorAdapter.test.js.map +1 -1
- package/dist/cjs/Babylon/Mocks/MockSceneRayPickUC.js.map +1 -1
- package/dist/cjs/Babylon/Mocks/ShowBabylonInspectorPmMock.js.map +1 -1
- package/dist/cjs/Babylon/PM/ShowBabylonInspectorPM.js +9 -6
- package/dist/cjs/Babylon/PM/ShowBabylonInspectorPM.js.map +1 -1
- package/dist/cjs/BaseApp/PM/IsAuthoringPM.js +6 -9
- package/dist/cjs/BaseApp/PM/IsAuthoringPM.js.map +1 -1
- package/dist/cjs/BaseApp/PM/IsAuthoringPM.test.js +2 -6
- package/dist/cjs/BaseApp/PM/IsAuthoringPM.test.js.map +1 -1
- package/dist/cjs/BaseApp/PM/IsReviewingPM.js +6 -9
- package/dist/cjs/BaseApp/PM/IsReviewingPM.js.map +1 -1
- package/dist/cjs/BaseApp/PM/IsReviewingPM.test.js +2 -6
- package/dist/cjs/BaseApp/PM/IsReviewingPM.test.js.map +1 -1
- package/dist/cjs/BaseApp/PM/SlideTextPM.js +6 -5
- package/dist/cjs/BaseApp/PM/SlideTextPM.js.map +1 -1
- package/dist/cjs/BaseApp/PM/SlideTextPM.test.js +2 -6
- package/dist/cjs/BaseApp/PM/SlideTextPM.test.js.map +1 -1
- package/dist/cjs/BaseApp/UC/EditSlideTextUC.test.js +1 -0
- package/dist/cjs/BaseApp/UC/EditSlideTextUC.test.js.map +1 -1
- package/dist/cjs/BaseApp/UC/SerializeBaseAppState.js +1 -1
- package/dist/cjs/BaseApp/UC/SerializeBaseAppState.js.map +1 -1
- package/dist/cjs/Callouts/Factories/calloutFactory.test.js +6 -0
- package/dist/cjs/Callouts/Factories/calloutFactory.test.js.map +1 -1
- package/dist/cjs/Callouts/UC/CreateCalloutUndoRedo.test.js +8 -9
- package/dist/cjs/Callouts/UC/CreateCalloutUndoRedo.test.js.map +1 -1
- package/dist/cjs/Callouts/UC/SerializeCallouts.js +1 -1
- package/dist/cjs/Callouts/UC/SerializeCallouts.js.map +1 -1
- package/dist/cjs/Callouts/UC/TryAddCallout.test.js.map +1 -1
- package/dist/cjs/Challenge/UCs/SerializeChallenge.js +1 -1
- package/dist/cjs/Challenge/UCs/SerializeChallenge.js.map +1 -1
- package/dist/cjs/Challenge/UCs/ShowChallengeHelpUC.test.js +3 -2
- package/dist/cjs/Challenge/UCs/ShowChallengeHelpUC.test.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ActiveModelPM.js +6 -5
- package/dist/cjs/ChannelModel/PMs/ActiveModelPM.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ActiveModelPM.test.js +2 -6
- package/dist/cjs/ChannelModel/PMs/ActiveModelPM.test.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelHasCalloutsPM.js +5 -3
- package/dist/cjs/ChannelModel/PMs/ModelHasCalloutsPM.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelHasCalloutsPM.test.js +1 -0
- package/dist/cjs/ChannelModel/PMs/ModelHasCalloutsPM.test.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelHasLandmarksPM.js +3 -7
- package/dist/cjs/ChannelModel/PMs/ModelHasLandmarksPM.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelHasLandmarksPM.test.js +1 -0
- package/dist/cjs/ChannelModel/PMs/ModelHasLandmarksPM.test.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreHiddenPM.js +3 -9
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreHiddenPM.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreHiddenPM.test.js +1 -0
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreHiddenPM.test.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreStickablePM.js +3 -7
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreStickablePM.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreStickablePM.test.js +1 -0
- package/dist/cjs/ChannelModel/PMs/ModelObjectsAreStickablePM.test.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelObjectsHaveOverlayPM.js +3 -9
- package/dist/cjs/ChannelModel/PMs/ModelObjectsHaveOverlayPM.js.map +1 -1
- package/dist/cjs/ChannelModel/PMs/ModelObjectsHaveOverlayPM.test.js +1 -0
- package/dist/cjs/ChannelModel/PMs/ModelObjectsHaveOverlayPM.test.js.map +1 -1
- package/dist/cjs/ChannelModel/UC/LoadChannelModelUC.test.js +6 -6
- package/dist/cjs/ChannelModel/UC/LoadChannelModelUC.test.js.map +1 -1
- package/dist/cjs/ChannelModel/UC/SelectChannelModelUC.test.js +1 -1
- package/dist/cjs/ChannelModel/UC/SelectChannelModelUC.test.js.map +1 -1
- package/dist/cjs/ChannelModel/UC/SerializeActiveModel.js +1 -1
- package/dist/cjs/ChannelModel/UC/SerializeActiveModel.js.map +1 -1
- package/dist/cjs/Dispatcher/Entities/AppDispatcher.js +7 -0
- package/dist/cjs/Dispatcher/Entities/AppDispatcher.js.map +1 -1
- package/dist/cjs/Dispatcher/Entities/AppDispatcher.test.js +31 -0
- package/dist/cjs/Dispatcher/Entities/AppDispatcher.test.js.map +1 -1
- package/dist/cjs/Dispatcher/Factories/DispatcherFeatureFactory.js +3 -1
- package/dist/cjs/Dispatcher/Factories/DispatcherFeatureFactory.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/GetAssetBlobURLUCMock.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/GetAssetBlobURLUCMock.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/GetLinkedAssetsUCMock.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/GetLinkedAssetsUCMock.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockDispatcher.js +2 -2
- package/dist/cjs/Dispatcher/Mocks/MockDispatcher.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockGetAssetFolderURL.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockGetAssetFolderURL.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowAlert.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowAlert.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowConfirm.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowConfirm.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowMarkdown.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowMarkdown.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowSpinner.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockShowSpinner.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/MockSubmitResult.js +5 -5
- package/dist/cjs/Dispatcher/Mocks/MockSubmitResult.js.map +1 -1
- package/dist/cjs/Dispatcher/Mocks/ShowSelectModelUCMock.js +1 -1
- package/dist/cjs/Dispatcher/Mocks/ShowSelectModelUCMock.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/AppIsReadyUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/AppIsReadyUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/DispatchStartZSpaceUC.test.js +2 -1
- package/dist/cjs/Dispatcher/UC/DispatchStartZSpaceUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/DispatchStateChangeUC.test.js +1 -0
- package/dist/cjs/Dispatcher/UC/DispatchStateChangeUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/DispatchStopZSpaceUC.test.js +2 -1
- package/dist/cjs/Dispatcher/UC/DispatchStopZSpaceUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GetAssetBlobURLUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GetAssetBlobURLUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GetAssetFolderURLUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GetAssetFolderURLUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GetAssetMetaUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GetAssetMetaUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GetAssetsForOwnerUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GetAssetsForOwnerUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GetLinkedAssetsUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GetLinkedAssetsUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GoToNextStateUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GoToNextStateUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/GoToPreviousStateUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/GoToPreviousStateUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/HasNextStateUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/HasNextStateUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/HasPreviousStateUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/HasPreviousStateUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/IsAssetFetchedUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/IsAssetFetchedUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/IsZSpaceAvailableUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/IsZSpaceAvailableUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/RegisterExternalStylesheetsUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/RegisterExternalStylesheetsUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/RestoreCurrentStateUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/RestoreCurrentStateUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/StateIsCompleteUC.test.js +3 -1
- package/dist/cjs/Dispatcher/UC/StateIsCompleteUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/SubmitActivityAssetUC.test.js +5 -3
- package/dist/cjs/Dispatcher/UC/SubmitActivityAssetUC.test.js.map +1 -1
- package/dist/cjs/Dispatcher/UC/SubmitResultResultUC.test.js +11 -5
- package/dist/cjs/Dispatcher/UC/SubmitResultResultUC.test.js.map +1 -1
- package/dist/cjs/Enablement/PM/EnabledStatePM.js +5 -9
- package/dist/cjs/Enablement/PM/EnabledStatePM.js.map +1 -1
- package/dist/cjs/Enablement/PM/EnabledStatePM.test.js +1 -0
- package/dist/cjs/Enablement/PM/EnabledStatePM.test.js.map +1 -1
- package/dist/cjs/Environment/UCs/SerializeEnvironment.js +1 -1
- package/dist/cjs/Environment/UCs/SerializeEnvironment.js.map +1 -1
- package/dist/cjs/Hideable/Factories/setupHideable.test.js +6 -0
- package/dist/cjs/Hideable/Factories/setupHideable.test.js.map +1 -1
- package/dist/cjs/Hideable/UCs/SerializeHideableObjects.js +1 -1
- package/dist/cjs/Hideable/UCs/SerializeHideableObjects.js.map +1 -1
- package/dist/cjs/Hideable/UCs/TryHideWithPickUC.test.js.map +1 -1
- package/dist/cjs/HoverLabel/UseCases/SerializeAllowHoverLabel.js +1 -1
- package/dist/cjs/HoverLabel/UseCases/SerializeAllowHoverLabel.js.map +1 -1
- package/dist/cjs/HoverLabel/UseCases/TryShowHoverLabel.test.js.map +1 -1
- package/dist/cjs/Label/Controller/submitCustomLabel.test.js +3 -0
- package/dist/cjs/Label/Controller/submitCustomLabel.test.js.map +1 -1
- package/dist/cjs/Label/Controller/updateCustomLabel.test.js +3 -0
- package/dist/cjs/Label/Controller/updateCustomLabel.test.js.map +1 -1
- package/dist/cjs/Label/UC/ClearCustomLabelUC.test.js +0 -7
- package/dist/cjs/Label/UC/ClearCustomLabelUC.test.js.map +1 -1
- package/dist/cjs/Label/UC/SerializeCustomLabels.js +1 -1
- package/dist/cjs/Label/UC/SerializeCustomLabels.js.map +1 -1
- package/dist/cjs/Label/UC/SetCustomLabelUC.test.js +0 -7
- package/dist/cjs/Label/UC/SetCustomLabelUC.test.js.map +1 -1
- package/dist/cjs/LabelDrop/Controller/releaseLabelDropAnswerItemScreen.test.js.map +1 -1
- package/dist/cjs/LabelDrop/UseCases/SerializeLabelDrop.js +1 -1
- package/dist/cjs/LabelDrop/UseCases/SerializeLabelDrop.js.map +1 -1
- package/dist/cjs/LabelDrop/UseCases/ToggleLabelDropTargetUC.test.js.map +1 -1
- package/dist/cjs/Landmarks/PM/LandmarkSizePM.js +5 -8
- package/dist/cjs/Landmarks/PM/LandmarkSizePM.js.map +1 -1
- package/dist/cjs/Landmarks/UseCases/SerializeLandmarks.js +1 -1
- package/dist/cjs/Landmarks/UseCases/SerializeLandmarks.js.map +1 -1
- package/dist/cjs/Landmarks/UseCases/TryAddNewLandmarkUC.test.js +2 -0
- package/dist/cjs/Landmarks/UseCases/TryAddNewLandmarkUC.test.js.map +1 -1
- package/dist/cjs/ObjectPick/UseCases/SerializeObjectPick.js +1 -1
- package/dist/cjs/ObjectPick/UseCases/SerializeObjectPick.js.map +1 -1
- package/dist/cjs/ObjectPick/UseCases/TrySelectObjectPickUC.test.js.map +1 -1
- package/dist/cjs/ObjectPick/UseCases/TrySubmitObjectPickUC.test.js +1 -0
- package/dist/cjs/ObjectPick/UseCases/TrySubmitObjectPickUC.test.js.map +1 -1
- package/dist/cjs/OverlayColor/UC/SerializeOverlayColoredObjects.js +1 -1
- package/dist/cjs/OverlayColor/UC/SerializeOverlayColoredObjects.js.map +1 -1
- package/dist/cjs/Question/UC/SerializeQuestionChallenge.js +1 -1
- package/dist/cjs/Question/UC/SerializeQuestionChallenge.js.map +1 -1
- package/dist/cjs/Question/UC/SubmitQuestionAnswerUC.test.js +1 -0
- package/dist/cjs/Question/UC/SubmitQuestionAnswerUC.test.js.map +1 -1
- package/dist/cjs/RequestHandler/Entities/AppHandler.js +4 -0
- package/dist/cjs/RequestHandler/Entities/AppHandler.js.map +1 -1
- package/dist/cjs/RequestHandler/Entities/AppHandler.test.js +27 -0
- package/dist/cjs/RequestHandler/Entities/AppHandler.test.js.map +1 -1
- package/dist/cjs/RequestHandler/Factories/RequestHandlerFeatureFactory.js +28 -29
- package/dist/cjs/RequestHandler/Factories/RequestHandlerFeatureFactory.js.map +1 -1
- package/dist/cjs/RequestHandler/Factories/RequestHandlerFeatureFactory.test.js +128 -0
- package/dist/cjs/RequestHandler/Factories/RequestHandlerFeatureFactory.test.js.map +1 -0
- package/dist/cjs/RequestHandler/Mocks/MockAppHandlerEntity.js +1 -0
- package/dist/cjs/RequestHandler/Mocks/MockAppHandlerEntity.js.map +1 -1
- package/dist/cjs/SceneRoot/UC/SerializeSceneRoot.js +1 -1
- package/dist/cjs/SceneRoot/UC/SerializeSceneRoot.js.map +1 -1
- package/dist/cjs/Selection/Controller/MouseHoverOnAppObject.test.js.map +1 -1
- package/dist/cjs/Selection/Controller/MousePressOnAppObject.test.js.map +1 -1
- package/dist/cjs/Selection/Controller/MouseSelectAppObject.test.js.map +1 -1
- package/dist/cjs/StateMachine/Controller/clickRestorePreviousState.js +21 -0
- package/dist/cjs/StateMachine/Controller/clickRestorePreviousState.js.map +1 -0
- package/dist/cjs/StateMachine/Controller/clickRestorePreviousState.test.js +34 -0
- package/dist/cjs/StateMachine/Controller/clickRestorePreviousState.test.js.map +1 -0
- package/dist/cjs/StateMachine/Controller/index.js +1 -1
- package/dist/cjs/StateMachine/Controller/index.js.map +1 -1
- package/dist/cjs/StateMachine/Entities/StateMachineEntity.js +26 -4
- package/dist/cjs/StateMachine/Entities/StateMachineEntity.js.map +1 -1
- package/dist/cjs/StateMachine/Entities/StateMachineEntity.test.js +23 -4
- package/dist/cjs/StateMachine/Entities/StateMachineEntity.test.js.map +1 -1
- package/dist/cjs/Stick/UCs/TryStickAppObjectUC.test.js.map +1 -1
- package/dist/cjs/StoredView/PM/HasStoredViewPM.js +6 -10
- package/dist/cjs/StoredView/PM/HasStoredViewPM.js.map +1 -1
- package/dist/cjs/StoredView/PM/HasStoredViewPM.test.js +1 -0
- package/dist/cjs/StoredView/PM/HasStoredViewPM.test.js.map +1 -1
- package/dist/cjs/StoredView/UC/SerializeStoredView.js +1 -1
- package/dist/cjs/StoredView/UC/SerializeStoredView.js.map +1 -1
- package/dist/cjs/Stylus/PMs/StylusIsInUsePM.js +7 -6
- package/dist/cjs/Stylus/PMs/StylusIsInUsePM.js.map +1 -1
- package/dist/cjs/Stylus/PMs/StylusIsInUsePM.test.js +2 -6
- package/dist/cjs/Stylus/PMs/StylusIsInUsePM.test.js.map +1 -1
- package/dist/cjs/Stylus/UCs/EmulateStylusUC.test.js.map +1 -1
- package/dist/cjs/Transform3D/UC/BumpTransformScaleAboutPixelPoint.test.js.map +1 -1
- package/dist/cjs/Transform3D/UC/PinchTransform.test.js.map +1 -1
- package/dist/cjs/Transform3D/UC/TryPanTransformUC.test.js.map +1 -1
- package/dist/cjs/Transparency/UCs/SerializeTransparentObjects.js +1 -1
- package/dist/cjs/Transparency/UCs/SerializeTransparentObjects.js.map +1 -1
- package/dist/cjs/zSpace/PM/ZSpaceIsEnabledPM.js +6 -5
- package/dist/cjs/zSpace/PM/ZSpaceIsEnabledPM.js.map +1 -1
- package/dist/cjs/zSpace/PM/ZSpaceIsEnabledPM.test.js +4 -8
- package/dist/cjs/zSpace/PM/ZSpaceIsEnabledPM.test.js.map +1 -1
- package/dist/cjs/zSpace/PM/ZSpaceIsSupportedPM.js +6 -5
- package/dist/cjs/zSpace/PM/ZSpaceIsSupportedPM.js.map +1 -1
- package/dist/cjs/zSpace/PM/ZSpaceIsSupportedPM.test.js +1 -0
- package/dist/cjs/zSpace/PM/ZSpaceIsSupportedPM.test.js.map +1 -1
- package/dist/esm/Babylon/Adapters/showBabylonInspectorAdapter.test.js +3 -0
- package/dist/esm/Babylon/Adapters/showBabylonInspectorAdapter.test.js.map +1 -1
- package/dist/esm/Babylon/Mocks/MockSceneRayPickUC.js.map +1 -1
- package/dist/esm/Babylon/Mocks/ShowBabylonInspectorPmMock.js.map +1 -1
- package/dist/esm/Babylon/PM/ShowBabylonInspectorPM.js +9 -6
- package/dist/esm/Babylon/PM/ShowBabylonInspectorPM.js.map +1 -1
- package/dist/esm/BaseApp/PM/IsAuthoringPM.js +7 -10
- package/dist/esm/BaseApp/PM/IsAuthoringPM.js.map +1 -1
- package/dist/esm/BaseApp/PM/IsAuthoringPM.test.js +2 -6
- package/dist/esm/BaseApp/PM/IsAuthoringPM.test.js.map +1 -1
- package/dist/esm/BaseApp/PM/IsReviewingPM.js +7 -10
- package/dist/esm/BaseApp/PM/IsReviewingPM.js.map +1 -1
- package/dist/esm/BaseApp/PM/IsReviewingPM.test.js +2 -6
- package/dist/esm/BaseApp/PM/IsReviewingPM.test.js.map +1 -1
- package/dist/esm/BaseApp/PM/SlideTextPM.js +7 -6
- package/dist/esm/BaseApp/PM/SlideTextPM.js.map +1 -1
- package/dist/esm/BaseApp/PM/SlideTextPM.test.js +2 -6
- package/dist/esm/BaseApp/PM/SlideTextPM.test.js.map +1 -1
- package/dist/esm/BaseApp/UC/EditSlideTextUC.test.js +1 -0
- package/dist/esm/BaseApp/UC/EditSlideTextUC.test.js.map +1 -1
- package/dist/esm/BaseApp/UC/SerializeBaseAppState.js +1 -1
- package/dist/esm/BaseApp/UC/SerializeBaseAppState.js.map +1 -1
- package/dist/esm/Callouts/Factories/calloutFactory.test.js +6 -0
- package/dist/esm/Callouts/Factories/calloutFactory.test.js.map +1 -1
- package/dist/esm/Callouts/UC/CreateCalloutUndoRedo.test.js +8 -9
- package/dist/esm/Callouts/UC/CreateCalloutUndoRedo.test.js.map +1 -1
- package/dist/esm/Callouts/UC/SerializeCallouts.js +1 -1
- package/dist/esm/Callouts/UC/SerializeCallouts.js.map +1 -1
- package/dist/esm/Callouts/UC/TryAddCallout.test.js.map +1 -1
- package/dist/esm/Challenge/UCs/SerializeChallenge.js +1 -1
- package/dist/esm/Challenge/UCs/SerializeChallenge.js.map +1 -1
- package/dist/esm/Challenge/UCs/ShowChallengeHelpUC.test.js +3 -2
- package/dist/esm/Challenge/UCs/ShowChallengeHelpUC.test.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ActiveModelPM.js +7 -6
- package/dist/esm/ChannelModel/PMs/ActiveModelPM.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ActiveModelPM.test.js +2 -6
- package/dist/esm/ChannelModel/PMs/ActiveModelPM.test.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelHasCalloutsPM.js +5 -3
- package/dist/esm/ChannelModel/PMs/ModelHasCalloutsPM.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelHasCalloutsPM.test.js +1 -0
- package/dist/esm/ChannelModel/PMs/ModelHasCalloutsPM.test.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelHasLandmarksPM.js +3 -7
- package/dist/esm/ChannelModel/PMs/ModelHasLandmarksPM.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelHasLandmarksPM.test.js +1 -0
- package/dist/esm/ChannelModel/PMs/ModelHasLandmarksPM.test.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreHiddenPM.js +3 -9
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreHiddenPM.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreHiddenPM.test.js +1 -0
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreHiddenPM.test.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreStickablePM.js +3 -7
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreStickablePM.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreStickablePM.test.js +1 -0
- package/dist/esm/ChannelModel/PMs/ModelObjectsAreStickablePM.test.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelObjectsHaveOverlayPM.js +3 -9
- package/dist/esm/ChannelModel/PMs/ModelObjectsHaveOverlayPM.js.map +1 -1
- package/dist/esm/ChannelModel/PMs/ModelObjectsHaveOverlayPM.test.js +1 -0
- package/dist/esm/ChannelModel/PMs/ModelObjectsHaveOverlayPM.test.js.map +1 -1
- package/dist/esm/ChannelModel/UC/LoadChannelModelUC.test.js +6 -6
- package/dist/esm/ChannelModel/UC/LoadChannelModelUC.test.js.map +1 -1
- package/dist/esm/ChannelModel/UC/SelectChannelModelUC.test.js +1 -1
- package/dist/esm/ChannelModel/UC/SelectChannelModelUC.test.js.map +1 -1
- package/dist/esm/ChannelModel/UC/SerializeActiveModel.js +1 -1
- package/dist/esm/ChannelModel/UC/SerializeActiveModel.js.map +1 -1
- package/dist/esm/Dispatcher/Entities/AppDispatcher.js +7 -0
- package/dist/esm/Dispatcher/Entities/AppDispatcher.js.map +1 -1
- package/dist/esm/Dispatcher/Entities/AppDispatcher.test.js +31 -0
- package/dist/esm/Dispatcher/Entities/AppDispatcher.test.js.map +1 -1
- package/dist/esm/Dispatcher/Factories/DispatcherFeatureFactory.js +3 -1
- package/dist/esm/Dispatcher/Factories/DispatcherFeatureFactory.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/GetAssetBlobURLUCMock.js +1 -1
- package/dist/esm/Dispatcher/Mocks/GetAssetBlobURLUCMock.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/GetLinkedAssetsUCMock.js +1 -1
- package/dist/esm/Dispatcher/Mocks/GetLinkedAssetsUCMock.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockDispatcher.js +2 -2
- package/dist/esm/Dispatcher/Mocks/MockDispatcher.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockGetAssetFolderURL.js +1 -1
- package/dist/esm/Dispatcher/Mocks/MockGetAssetFolderURL.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowAlert.js +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowAlert.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowConfirm.js +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowConfirm.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowMarkdown.js +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowMarkdown.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowSpinner.js +1 -1
- package/dist/esm/Dispatcher/Mocks/MockShowSpinner.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/MockSubmitResult.js +5 -5
- package/dist/esm/Dispatcher/Mocks/MockSubmitResult.js.map +1 -1
- package/dist/esm/Dispatcher/Mocks/ShowSelectModelUCMock.js +1 -1
- package/dist/esm/Dispatcher/Mocks/ShowSelectModelUCMock.js.map +1 -1
- package/dist/esm/Dispatcher/UC/AppIsReadyUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/AppIsReadyUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/DispatchStartZSpaceUC.test.js +2 -1
- package/dist/esm/Dispatcher/UC/DispatchStartZSpaceUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/DispatchStateChangeUC.test.js +1 -0
- package/dist/esm/Dispatcher/UC/DispatchStateChangeUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/DispatchStopZSpaceUC.test.js +2 -1
- package/dist/esm/Dispatcher/UC/DispatchStopZSpaceUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GetAssetBlobURLUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GetAssetBlobURLUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GetAssetFolderURLUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GetAssetFolderURLUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GetAssetMetaUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GetAssetMetaUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GetAssetsForOwnerUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GetAssetsForOwnerUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GetLinkedAssetsUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GetLinkedAssetsUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GoToNextStateUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GoToNextStateUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/GoToPreviousStateUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/GoToPreviousStateUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/HasNextStateUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/HasNextStateUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/HasPreviousStateUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/HasPreviousStateUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/IsAssetFetchedUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/IsAssetFetchedUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/IsZSpaceAvailableUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/IsZSpaceAvailableUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/RegisterExternalStylesheetsUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/RegisterExternalStylesheetsUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/RestoreCurrentStateUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/RestoreCurrentStateUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/StateIsCompleteUC.test.js +3 -1
- package/dist/esm/Dispatcher/UC/StateIsCompleteUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/SubmitActivityAssetUC.test.js +5 -3
- package/dist/esm/Dispatcher/UC/SubmitActivityAssetUC.test.js.map +1 -1
- package/dist/esm/Dispatcher/UC/SubmitResultResultUC.test.js +11 -5
- package/dist/esm/Dispatcher/UC/SubmitResultResultUC.test.js.map +1 -1
- package/dist/esm/Enablement/PM/EnabledStatePM.js +5 -9
- package/dist/esm/Enablement/PM/EnabledStatePM.js.map +1 -1
- package/dist/esm/Enablement/PM/EnabledStatePM.test.js +1 -0
- package/dist/esm/Enablement/PM/EnabledStatePM.test.js.map +1 -1
- package/dist/esm/Environment/UCs/SerializeEnvironment.js +1 -1
- package/dist/esm/Environment/UCs/SerializeEnvironment.js.map +1 -1
- package/dist/esm/Hideable/Factories/setupHideable.test.js +6 -0
- package/dist/esm/Hideable/Factories/setupHideable.test.js.map +1 -1
- package/dist/esm/Hideable/UCs/SerializeHideableObjects.js +1 -1
- package/dist/esm/Hideable/UCs/SerializeHideableObjects.js.map +1 -1
- package/dist/esm/Hideable/UCs/TryHideWithPickUC.test.js.map +1 -1
- package/dist/esm/HoverLabel/UseCases/SerializeAllowHoverLabel.js +1 -1
- package/dist/esm/HoverLabel/UseCases/SerializeAllowHoverLabel.js.map +1 -1
- package/dist/esm/HoverLabel/UseCases/TryShowHoverLabel.test.js.map +1 -1
- package/dist/esm/Label/Controller/submitCustomLabel.test.js +3 -0
- package/dist/esm/Label/Controller/submitCustomLabel.test.js.map +1 -1
- package/dist/esm/Label/Controller/updateCustomLabel.test.js +3 -0
- package/dist/esm/Label/Controller/updateCustomLabel.test.js.map +1 -1
- package/dist/esm/Label/UC/ClearCustomLabelUC.test.js +0 -7
- package/dist/esm/Label/UC/ClearCustomLabelUC.test.js.map +1 -1
- package/dist/esm/Label/UC/SerializeCustomLabels.js +1 -1
- package/dist/esm/Label/UC/SerializeCustomLabels.js.map +1 -1
- package/dist/esm/Label/UC/SetCustomLabelUC.test.js +0 -7
- package/dist/esm/Label/UC/SetCustomLabelUC.test.js.map +1 -1
- package/dist/esm/LabelDrop/Controller/releaseLabelDropAnswerItemScreen.test.js.map +1 -1
- package/dist/esm/LabelDrop/UseCases/SerializeLabelDrop.js +1 -1
- package/dist/esm/LabelDrop/UseCases/SerializeLabelDrop.js.map +1 -1
- package/dist/esm/LabelDrop/UseCases/ToggleLabelDropTargetUC.test.js.map +1 -1
- package/dist/esm/Landmarks/PM/LandmarkSizePM.js +5 -8
- package/dist/esm/Landmarks/PM/LandmarkSizePM.js.map +1 -1
- package/dist/esm/Landmarks/UseCases/SerializeLandmarks.js +1 -1
- package/dist/esm/Landmarks/UseCases/SerializeLandmarks.js.map +1 -1
- package/dist/esm/Landmarks/UseCases/TryAddNewLandmarkUC.test.js +2 -0
- package/dist/esm/Landmarks/UseCases/TryAddNewLandmarkUC.test.js.map +1 -1
- package/dist/esm/ObjectPick/UseCases/SerializeObjectPick.js +1 -1
- package/dist/esm/ObjectPick/UseCases/SerializeObjectPick.js.map +1 -1
- package/dist/esm/ObjectPick/UseCases/TrySelectObjectPickUC.test.js.map +1 -1
- package/dist/esm/ObjectPick/UseCases/TrySubmitObjectPickUC.test.js +1 -0
- package/dist/esm/ObjectPick/UseCases/TrySubmitObjectPickUC.test.js.map +1 -1
- package/dist/esm/OverlayColor/UC/SerializeOverlayColoredObjects.js +1 -1
- package/dist/esm/OverlayColor/UC/SerializeOverlayColoredObjects.js.map +1 -1
- package/dist/esm/Question/UC/SerializeQuestionChallenge.js +1 -1
- package/dist/esm/Question/UC/SerializeQuestionChallenge.js.map +1 -1
- package/dist/esm/Question/UC/SubmitQuestionAnswerUC.test.js +1 -0
- package/dist/esm/Question/UC/SubmitQuestionAnswerUC.test.js.map +1 -1
- package/dist/esm/RequestHandler/Entities/AppHandler.js +4 -0
- package/dist/esm/RequestHandler/Entities/AppHandler.js.map +1 -1
- package/dist/esm/RequestHandler/Entities/AppHandler.test.js +27 -0
- package/dist/esm/RequestHandler/Entities/AppHandler.test.js.map +1 -1
- package/dist/esm/RequestHandler/Factories/RequestHandlerFeatureFactory.js +28 -29
- package/dist/esm/RequestHandler/Factories/RequestHandlerFeatureFactory.js.map +1 -1
- package/dist/esm/RequestHandler/Factories/RequestHandlerFeatureFactory.test.js +126 -0
- package/dist/esm/RequestHandler/Factories/RequestHandlerFeatureFactory.test.js.map +1 -0
- package/dist/esm/RequestHandler/Mocks/MockAppHandlerEntity.js +1 -0
- package/dist/esm/RequestHandler/Mocks/MockAppHandlerEntity.js.map +1 -1
- package/dist/esm/SceneRoot/UC/SerializeSceneRoot.js +1 -1
- package/dist/esm/SceneRoot/UC/SerializeSceneRoot.js.map +1 -1
- package/dist/esm/Selection/Controller/MouseHoverOnAppObject.test.js.map +1 -1
- package/dist/esm/Selection/Controller/MousePressOnAppObject.test.js.map +1 -1
- package/dist/esm/Selection/Controller/MouseSelectAppObject.test.js.map +1 -1
- package/dist/esm/StateMachine/Controller/clickRestorePreviousState.js +17 -0
- package/dist/esm/StateMachine/Controller/clickRestorePreviousState.js.map +1 -0
- package/dist/esm/StateMachine/Controller/clickRestorePreviousState.test.js +32 -0
- package/dist/esm/StateMachine/Controller/clickRestorePreviousState.test.js.map +1 -0
- package/dist/esm/StateMachine/Controller/index.js +1 -1
- package/dist/esm/StateMachine/Controller/index.js.map +1 -1
- package/dist/esm/StateMachine/Entities/StateMachineEntity.js +26 -4
- package/dist/esm/StateMachine/Entities/StateMachineEntity.js.map +1 -1
- package/dist/esm/StateMachine/Entities/StateMachineEntity.test.js +23 -4
- package/dist/esm/StateMachine/Entities/StateMachineEntity.test.js.map +1 -1
- package/dist/esm/Stick/UCs/TryStickAppObjectUC.test.js.map +1 -1
- package/dist/esm/StoredView/PM/HasStoredViewPM.js +7 -11
- package/dist/esm/StoredView/PM/HasStoredViewPM.js.map +1 -1
- package/dist/esm/StoredView/PM/HasStoredViewPM.test.js +1 -0
- package/dist/esm/StoredView/PM/HasStoredViewPM.test.js.map +1 -1
- package/dist/esm/StoredView/UC/SerializeStoredView.js +1 -1
- package/dist/esm/StoredView/UC/SerializeStoredView.js.map +1 -1
- package/dist/esm/Stylus/PMs/StylusIsInUsePM.js +8 -7
- package/dist/esm/Stylus/PMs/StylusIsInUsePM.js.map +1 -1
- package/dist/esm/Stylus/PMs/StylusIsInUsePM.test.js +2 -6
- package/dist/esm/Stylus/PMs/StylusIsInUsePM.test.js.map +1 -1
- package/dist/esm/Stylus/UCs/EmulateStylusUC.test.js.map +1 -1
- package/dist/esm/Transform3D/UC/BumpTransformScaleAboutPixelPoint.test.js.map +1 -1
- package/dist/esm/Transform3D/UC/PinchTransform.test.js.map +1 -1
- package/dist/esm/Transform3D/UC/TryPanTransformUC.test.js.map +1 -1
- package/dist/esm/Transparency/UCs/SerializeTransparentObjects.js +1 -1
- package/dist/esm/Transparency/UCs/SerializeTransparentObjects.js.map +1 -1
- package/dist/esm/zSpace/PM/ZSpaceIsEnabledPM.js +7 -6
- package/dist/esm/zSpace/PM/ZSpaceIsEnabledPM.js.map +1 -1
- package/dist/esm/zSpace/PM/ZSpaceIsEnabledPM.test.js +4 -8
- package/dist/esm/zSpace/PM/ZSpaceIsEnabledPM.test.js.map +1 -1
- package/dist/esm/zSpace/PM/ZSpaceIsSupportedPM.js +7 -6
- package/dist/esm/zSpace/PM/ZSpaceIsSupportedPM.js.map +1 -1
- package/dist/esm/zSpace/PM/ZSpaceIsSupportedPM.test.js +1 -0
- package/dist/esm/zSpace/PM/ZSpaceIsSupportedPM.test.js.map +1 -1
- package/dist/types/Babylon/PM/ShowBabylonInspectorPM.d.ts +3 -2
- package/dist/types/Babylon/PM/ShowBabylonInspectorPM.d.ts.map +1 -1
- package/dist/types/BaseApp/PM/IsAuthoringPM.d.ts +2 -2
- package/dist/types/BaseApp/PM/IsAuthoringPM.d.ts.map +1 -1
- package/dist/types/BaseApp/PM/IsReviewingPM.d.ts +2 -2
- package/dist/types/BaseApp/PM/IsReviewingPM.d.ts.map +1 -1
- package/dist/types/BaseApp/PM/SlideTextPM.d.ts +2 -2
- package/dist/types/BaseApp/PM/SlideTextPM.d.ts.map +1 -1
- package/dist/types/BaseApp/UC/SerializeBaseAppState.d.ts +1 -1
- package/dist/types/Callouts/Controller/MouseAddCalloutMC.d.ts +1 -1
- package/dist/types/Callouts/Controller/MouseAddCalloutMC.d.ts.map +1 -1
- package/dist/types/Callouts/Controller/TouchAddCalloutTC.d.ts +1 -1
- package/dist/types/Callouts/Controller/TouchAddCalloutTC.d.ts.map +1 -1
- package/dist/types/Callouts/UC/SerializeCallouts.d.ts +1 -1
- package/dist/types/Challenge/UCs/SerializeChallenge.d.ts +1 -1
- package/dist/types/ChannelModel/PMs/ActiveModelPM.d.ts +4 -3
- package/dist/types/ChannelModel/PMs/ActiveModelPM.d.ts.map +1 -1
- package/dist/types/ChannelModel/UC/SerializeActiveModel.d.ts +2 -2
- package/dist/types/Dispatcher/Entities/AppDispatcher.d.ts +1 -0
- package/dist/types/Dispatcher/Entities/AppDispatcher.d.ts.map +1 -1
- package/dist/types/Dispatcher/Factories/DispatcherFeatureFactory.d.ts +1 -0
- package/dist/types/Dispatcher/Factories/DispatcherFeatureFactory.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/GetAssetBlobURLUCMock.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/GetAssetBlobURLUCMock.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/GetLinkedAssetsUCMock.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/GetLinkedAssetsUCMock.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockDispatcher.d.ts +2 -2
- package/dist/types/Dispatcher/Mocks/MockDispatcher.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockGetAssetFolderURL.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/MockGetAssetFolderURL.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowAlert.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowAlert.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowConfirm.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowConfirm.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowMarkdown.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowMarkdown.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowSpinner.d.ts +1 -1
- package/dist/types/Dispatcher/Mocks/MockShowSpinner.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/MockSubmitResult.d.ts +5 -5
- package/dist/types/Dispatcher/Mocks/MockSubmitResult.d.ts.map +1 -1
- package/dist/types/Dispatcher/Mocks/ShowSelectModelUCMock.d.ts +4 -1
- package/dist/types/Dispatcher/Mocks/ShowSelectModelUCMock.d.ts.map +1 -1
- package/dist/types/Environment/UCs/SerializeEnvironment.d.ts +1 -1
- package/dist/types/Hideable/UCs/SerializeHideableObjects.d.ts +2 -2
- package/dist/types/HoverLabel/UseCases/SerializeAllowHoverLabel.d.ts +1 -1
- package/dist/types/Label/UC/SerializeCustomLabels.d.ts +1 -2
- package/dist/types/Label/UC/SerializeCustomLabels.d.ts.map +1 -1
- package/dist/types/LabelDrop/UseCases/SerializeLabelDrop.d.ts +1 -1
- package/dist/types/Landmarks/UseCases/SerializeLandmarks.d.ts +1 -1
- package/dist/types/ObjectPick/UseCases/SerializeObjectPick.d.ts +1 -1
- package/dist/types/OverlayColor/UC/SerializeOverlayColoredObjects.d.ts +2 -2
- package/dist/types/Question/UC/SerializeQuestionChallenge.d.ts +1 -1
- package/dist/types/RequestHandler/Entities/AppHandler.d.ts +1 -0
- package/dist/types/RequestHandler/Entities/AppHandler.d.ts.map +1 -1
- package/dist/types/RequestHandler/Factories/RequestHandlerFeatureFactory.d.ts +19 -20
- package/dist/types/RequestHandler/Factories/RequestHandlerFeatureFactory.d.ts.map +1 -1
- package/dist/types/RequestHandler/Factories/RequestHandlerFeatureFactory.test.d.ts +2 -0
- package/dist/types/RequestHandler/Factories/RequestHandlerFeatureFactory.test.d.ts.map +1 -0
- package/dist/types/RequestHandler/Mocks/MockAppHandlerEntity.d.ts +1 -0
- package/dist/types/RequestHandler/Mocks/MockAppHandlerEntity.d.ts.map +1 -1
- package/dist/types/SceneRoot/UC/SerializeSceneRoot.d.ts +1 -1
- package/dist/types/StateMachine/Controller/clickRestorePreviousState.d.ts +7 -0
- package/dist/types/StateMachine/Controller/clickRestorePreviousState.d.ts.map +1 -0
- package/dist/types/StateMachine/Controller/clickRestorePreviousState.test.d.ts +2 -0
- package/dist/types/StateMachine/Controller/clickRestorePreviousState.test.d.ts.map +1 -0
- package/dist/types/StateMachine/Controller/index.d.ts +1 -1
- package/dist/types/StateMachine/Controller/index.d.ts.map +1 -1
- package/dist/types/StateMachine/Entities/StateMachineEntity.d.ts +87 -2
- package/dist/types/StateMachine/Entities/StateMachineEntity.d.ts.map +1 -1
- package/dist/types/StoredView/PM/HasStoredViewPM.d.ts +2 -2
- package/dist/types/StoredView/PM/HasStoredViewPM.d.ts.map +1 -1
- package/dist/types/StoredView/UC/SerializeStoredView.d.ts +1 -1
- package/dist/types/Stylus/PMs/StylusIsInUsePM.d.ts +2 -2
- package/dist/types/Stylus/PMs/StylusIsInUsePM.d.ts.map +1 -1
- package/dist/types/Transform3D/UC/MoveTransformUC.d.ts +3 -3
- package/dist/types/Transform3D/UC/MoveTransformUC.d.ts.map +1 -1
- package/dist/types/Transform3D/UC/PanTransformUC.d.ts +3 -3
- package/dist/types/Transform3D/UC/PanTransformUC.d.ts.map +1 -1
- package/dist/types/Transform3D/UC/TryMoveTransformUC.d.ts +1 -1
- package/dist/types/Transform3D/UC/TryMoveTransformUC.d.ts.map +1 -1
- package/dist/types/Transform3D/UC/TryPanTransformUC.d.ts +2 -2
- package/dist/types/Transform3D/UC/TryPanTransformUC.d.ts.map +1 -1
- package/dist/types/Transparency/UCs/SerializeTransparentObjects.d.ts +2 -2
- package/dist/types/zSpace/PM/ZSpaceIsEnabledPM.d.ts +2 -2
- package/dist/types/zSpace/PM/ZSpaceIsEnabledPM.d.ts.map +1 -1
- package/dist/types/zSpace/PM/ZSpaceIsSupportedPM.d.ts +2 -2
- package/dist/types/zSpace/PM/ZSpaceIsSupportedPM.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/Dispatcher/README.md +652 -0
- package/src/RequestHandler/README.md +790 -0
- package/src/StateMachine/README.md +430 -0
|
@@ -0,0 +1,790 @@
|
|
|
1
|
+
# RequestHandler Feature
|
|
2
|
+
|
|
3
|
+
The RequestHandler feature provides a centralized request-response mechanism for handling app-level operations in VIVED applications. It implements a versioned request protocol that allows external systems to interact with the application through well-defined request types and payloads.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This feature acts as a command dispatcher that routes incoming requests to appropriate handlers (Use Cases) based on the request type. It supports payload versioning to maintain backward compatibility as the API evolves, and provides introspection capabilities to query supported request types and their versions.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
The RequestHandler feature follows Clean Architecture and Domain-Driven Design principles:
|
|
12
|
+
|
|
13
|
+
- **Entity**: `AppHandlerEntity` - Manages request handler registration and routing
|
|
14
|
+
- **Use Cases**: 10 specialized use cases handle different app-level operations
|
|
15
|
+
- **Factory**: `RequestHandlerFeatureFactory` - Sets up all feature components
|
|
16
|
+
- **Legacy Setup**: `setupAppHandlers()` - Function-based setup for backward compatibility
|
|
17
|
+
|
|
18
|
+
## Configuration
|
|
19
|
+
|
|
20
|
+
The `RequestHandlerFeatureFactory` accepts an optional configuration object to control feature support and logging behavior. This allows you to disable features that your application doesn't need, reducing memory overhead and initialization time.
|
|
21
|
+
|
|
22
|
+
### Configuration Options
|
|
23
|
+
|
|
24
|
+
Pass a configuration object when creating the factory:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import {
|
|
28
|
+
makeRequestHandlerFeatureFactory,
|
|
29
|
+
IRequestHandlerConfig,
|
|
30
|
+
} from "@vived/app";
|
|
31
|
+
|
|
32
|
+
const config: IRequestHandlerConfig = {
|
|
33
|
+
verbose: true, // Enable verbose logging
|
|
34
|
+
zSpaceSupported: false, // Disable zSpace-related handlers
|
|
35
|
+
themeSupported: true, // Enable theme color handlers (default)
|
|
36
|
+
babylonSupported: false, // Disable Babylon inspector handler
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const factory = makeRequestHandlerFeatureFactory(appObjects, config);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Available Configuration Options
|
|
43
|
+
|
|
44
|
+
| Property | Type | Default | Controls | Related Use Cases |
|
|
45
|
+
| ------------------ | --------- | ------- | -------------------------- | ------------------------- |
|
|
46
|
+
| `verbose` | `boolean` | `false` | Request logging to console | All requests |
|
|
47
|
+
| `zSpaceSupported` | `boolean` | `true` | zSpace XR functionality | START_ZSPACE, STOP_ZSPACE |
|
|
48
|
+
| `themeSupported` | `boolean` | `true` | Theme color management | SET_THEME_COLORS |
|
|
49
|
+
| `babylonSupported` | `boolean` | `true` | Babylon.js inspector | SHOW_BABYLON_INSPECTOR |
|
|
50
|
+
|
|
51
|
+
### Verbose Logging
|
|
52
|
+
|
|
53
|
+
When `verbose` is enabled, all incoming requests are logged to the console:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const factory = makeRequestHandlerFeatureFactory(appObjects, { verbose: true });
|
|
57
|
+
|
|
58
|
+
// Now all requests will be logged
|
|
59
|
+
const request: Request = {
|
|
60
|
+
type: "START_APP",
|
|
61
|
+
version: 2,
|
|
62
|
+
payload: { container: document.getElementById("app") },
|
|
63
|
+
};
|
|
64
|
+
appHandler.handler(request);
|
|
65
|
+
// Console output: [AppHandler] Request received: { type: "START_APP", version: 2, payload: {...} }
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**When to Enable**:
|
|
69
|
+
|
|
70
|
+
- Debugging request flow issues
|
|
71
|
+
- Monitoring which requests are being sent
|
|
72
|
+
- Troubleshooting version mismatches
|
|
73
|
+
- Development and testing environments
|
|
74
|
+
|
|
75
|
+
**Note**: Disable verbose logging in production to avoid console clutter.
|
|
76
|
+
|
|
77
|
+
### Feature Support Flags
|
|
78
|
+
|
|
79
|
+
Use configuration flags to disable optional features:
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// Minimal configuration - only required features
|
|
83
|
+
const minimalConfig = {
|
|
84
|
+
zSpaceSupported: false,
|
|
85
|
+
themeSupported: false,
|
|
86
|
+
babylonSupported: false,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// Development configuration - all features with logging
|
|
90
|
+
const devConfig = {
|
|
91
|
+
verbose: true,
|
|
92
|
+
zSpaceSupported: true,
|
|
93
|
+
themeSupported: true,
|
|
94
|
+
babylonSupported: true,
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// Production configuration - no debugging features
|
|
98
|
+
const prodConfig = {
|
|
99
|
+
verbose: false,
|
|
100
|
+
zSpaceSupported: true,
|
|
101
|
+
themeSupported: true,
|
|
102
|
+
babylonSupported: false,
|
|
103
|
+
};
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**When to Disable Features**:
|
|
107
|
+
|
|
108
|
+
- Your application doesn't use zSpace devices → set `zSpaceSupported: false`
|
|
109
|
+
- Your application has fixed styling → set `themeSupported: false`
|
|
110
|
+
- You're not using Babylon.js or don't need debugging tools → set `babylonSupported: false`
|
|
111
|
+
|
|
112
|
+
## Sending Requests
|
|
113
|
+
|
|
114
|
+
Requests are sent using the standard VIVED core `Request` interface:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
import { Request } from "@vived/core";
|
|
118
|
+
|
|
119
|
+
const request: Request = {
|
|
120
|
+
type: "REQUEST_TYPE",
|
|
121
|
+
version: 1,
|
|
122
|
+
payload: {
|
|
123
|
+
// Request-specific data
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
appHandler.handler(request);
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Supported Request Types
|
|
131
|
+
|
|
132
|
+
### 1. START_APP
|
|
133
|
+
|
|
134
|
+
Starts the application rendering in a specified HTML container.
|
|
135
|
+
|
|
136
|
+
- **Request Type**: `START_APP`
|
|
137
|
+
- **Current Version**: 2
|
|
138
|
+
- **Payload**:
|
|
139
|
+
```typescript
|
|
140
|
+
{
|
|
141
|
+
container: HTMLElement;
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
- **Example**:
|
|
145
|
+
```typescript
|
|
146
|
+
const request: Request = {
|
|
147
|
+
type: "START_APP",
|
|
148
|
+
version: 2,
|
|
149
|
+
payload: {
|
|
150
|
+
container: document.getElementById("app-container"),
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
appHandler.handler(request);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 2. STOP_APP
|
|
157
|
+
|
|
158
|
+
Stops the application rendering.
|
|
159
|
+
|
|
160
|
+
- **Request Type**: `STOP_APP`
|
|
161
|
+
- **Current Version**: 1
|
|
162
|
+
- **Payload**: None
|
|
163
|
+
- **Example**:
|
|
164
|
+
```typescript
|
|
165
|
+
const request: Request = {
|
|
166
|
+
type: "STOP_APP",
|
|
167
|
+
version: 1,
|
|
168
|
+
};
|
|
169
|
+
appHandler.handler(request);
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 3. DISPOSE_APP
|
|
173
|
+
|
|
174
|
+
Disposes of the application and cleans up resources.
|
|
175
|
+
|
|
176
|
+
- **Request Type**: `DISPOSE_APP`
|
|
177
|
+
- **Current Version**: 1
|
|
178
|
+
- **Payload**: None
|
|
179
|
+
- **Example**:
|
|
180
|
+
```typescript
|
|
181
|
+
const request: Request = {
|
|
182
|
+
type: "DISPOSE_APP",
|
|
183
|
+
version: 1,
|
|
184
|
+
};
|
|
185
|
+
appHandler.handler(request);
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### 4. SET_APP_STATE
|
|
189
|
+
|
|
190
|
+
Sets the application state, including slide navigation and state machine configuration.
|
|
191
|
+
|
|
192
|
+
- **Request Type**: `SET_APP_STATE`
|
|
193
|
+
- **Current Version**: 3
|
|
194
|
+
- **Payload**:
|
|
195
|
+
```typescript
|
|
196
|
+
{
|
|
197
|
+
finalState?: SerializedStates; // State machine configuration
|
|
198
|
+
hasNextSlide: boolean; // Whether there's a next slide
|
|
199
|
+
hasPreviousSlide: boolean; // Whether there's a previous slide
|
|
200
|
+
hideNavigation: boolean; // Whether to hide slide navigation
|
|
201
|
+
duration?: number; // Transition duration in ms
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
- **Example**:
|
|
205
|
+
```typescript
|
|
206
|
+
const request: Request = {
|
|
207
|
+
type: "SET_APP_STATE",
|
|
208
|
+
version: 3,
|
|
209
|
+
payload: {
|
|
210
|
+
hasNextSlide: true,
|
|
211
|
+
hasPreviousSlide: false,
|
|
212
|
+
hideNavigation: false,
|
|
213
|
+
duration: 500,
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
appHandler.handler(request);
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### 5. SET_IS_AUTHORING
|
|
220
|
+
|
|
221
|
+
Sets whether the application is in authoring mode.
|
|
222
|
+
|
|
223
|
+
- **Request Type**: `SET_IS_AUTHORING`
|
|
224
|
+
- **Current Version**: 1
|
|
225
|
+
- **Payload**:
|
|
226
|
+
```typescript
|
|
227
|
+
{
|
|
228
|
+
isAuthoring: boolean;
|
|
229
|
+
}
|
|
230
|
+
```
|
|
231
|
+
- **Example**:
|
|
232
|
+
```typescript
|
|
233
|
+
const request: Request = {
|
|
234
|
+
type: "SET_IS_AUTHORING",
|
|
235
|
+
version: 1,
|
|
236
|
+
payload: {
|
|
237
|
+
isAuthoring: true,
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
appHandler.handler(request);
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### 6. ENABLE_FEATURE
|
|
244
|
+
|
|
245
|
+
Enables a feature flag in the application.
|
|
246
|
+
|
|
247
|
+
- **Request Type**: `ENABLE_FEATURE`
|
|
248
|
+
- **Current Version**: 1
|
|
249
|
+
- **Payload**:
|
|
250
|
+
```typescript
|
|
251
|
+
{
|
|
252
|
+
featureFlag: string;
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
- **Example**:
|
|
256
|
+
```typescript
|
|
257
|
+
const request: Request = {
|
|
258
|
+
type: "ENABLE_FEATURE",
|
|
259
|
+
version: 1,
|
|
260
|
+
payload: {
|
|
261
|
+
featureFlag: "NEW_FEATURE_NAME",
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
appHandler.handler(request);
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### 7. SET_THEME_COLORS
|
|
268
|
+
|
|
269
|
+
Sets the theme colors for the application.
|
|
270
|
+
|
|
271
|
+
- **Request Type**: `SET_THEME_COLORS`
|
|
272
|
+
- **Current Version**: 1
|
|
273
|
+
- **Payload**:
|
|
274
|
+
```typescript
|
|
275
|
+
{
|
|
276
|
+
colors: {
|
|
277
|
+
[colorType: string]: string; // Hex color values
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
- **Example**:
|
|
282
|
+
```typescript
|
|
283
|
+
const request: Request = {
|
|
284
|
+
type: "SET_THEME_COLORS",
|
|
285
|
+
version: 1,
|
|
286
|
+
payload: {
|
|
287
|
+
colors: {
|
|
288
|
+
primary: "#FF5733",
|
|
289
|
+
secondary: "#33C3FF",
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
};
|
|
293
|
+
appHandler.handler(request);
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### 8. SHOW_BABYLON_INSPECTOR
|
|
297
|
+
|
|
298
|
+
Shows or hides the Babylon.js scene inspector for debugging.
|
|
299
|
+
|
|
300
|
+
- **Request Type**: `SHOW_BABYLON_INSPECTOR`
|
|
301
|
+
- **Current Version**: 1
|
|
302
|
+
- **Payload**:
|
|
303
|
+
```typescript
|
|
304
|
+
{
|
|
305
|
+
showBabylonInspector: boolean;
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
- **Example**:
|
|
309
|
+
```typescript
|
|
310
|
+
const request: Request = {
|
|
311
|
+
type: "SHOW_BABYLON_INSPECTOR",
|
|
312
|
+
version: 1,
|
|
313
|
+
payload: {
|
|
314
|
+
showBabylonInspector: true,
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
appHandler.handler(request);
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### 9. START_ZSPACE
|
|
321
|
+
|
|
322
|
+
Starts zSpace XR functionality.
|
|
323
|
+
|
|
324
|
+
- **Request Type**: `START_ZSPACE`
|
|
325
|
+
- **Current Version**: 3
|
|
326
|
+
- **Payload**:
|
|
327
|
+
```typescript
|
|
328
|
+
{
|
|
329
|
+
session: XRSession | null;
|
|
330
|
+
emulate: boolean;
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
- **Example**:
|
|
334
|
+
```typescript
|
|
335
|
+
const request: Request = {
|
|
336
|
+
type: "START_ZSPACE",
|
|
337
|
+
version: 3,
|
|
338
|
+
payload: {
|
|
339
|
+
session: xrSession,
|
|
340
|
+
emulate: false,
|
|
341
|
+
},
|
|
342
|
+
};
|
|
343
|
+
appHandler.handler(request);
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### 10. STOP_ZSPACE
|
|
347
|
+
|
|
348
|
+
Stops zSpace XR functionality.
|
|
349
|
+
|
|
350
|
+
- **Request Type**: `STOP_ZSPACE`
|
|
351
|
+
- **Current Version**: 1
|
|
352
|
+
- **Payload**: None
|
|
353
|
+
- **Example**:
|
|
354
|
+
```typescript
|
|
355
|
+
const request: Request = {
|
|
356
|
+
type: "STOP_ZSPACE",
|
|
357
|
+
version: 1,
|
|
358
|
+
};
|
|
359
|
+
appHandler.handler(request);
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Introspection Requests
|
|
363
|
+
|
|
364
|
+
The RequestHandler provides two special introspection requests that allow external systems to discover supported request types and versions.
|
|
365
|
+
|
|
366
|
+
### GET_APP_PAYLOAD_VERSION
|
|
367
|
+
|
|
368
|
+
Retrieves the current payload version for all registered request handlers.
|
|
369
|
+
|
|
370
|
+
- **Request Type**: `GET_APP_PAYLOAD_VERSION`
|
|
371
|
+
- **Version**: 2
|
|
372
|
+
- **Payload**:
|
|
373
|
+
```typescript
|
|
374
|
+
{
|
|
375
|
+
callback: (versionMap: Map<string, number>) => void;
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
- **Example**:
|
|
379
|
+
```typescript
|
|
380
|
+
const request: Request = {
|
|
381
|
+
type: "GET_APP_PAYLOAD_VERSION",
|
|
382
|
+
version: 2,
|
|
383
|
+
payload: {
|
|
384
|
+
callback: (versionMap: Map<string, number>) => {
|
|
385
|
+
console.log("Supported request types:", versionMap);
|
|
386
|
+
// Map will contain entries like:
|
|
387
|
+
// "START_APP" => 2
|
|
388
|
+
// "STOP_APP" => 1
|
|
389
|
+
// etc.
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
appHandler.handler(request);
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### GET_APP_HANDLER_VERSION
|
|
397
|
+
|
|
398
|
+
Retrieves the current version of the AppHandler system itself.
|
|
399
|
+
|
|
400
|
+
- **Request Type**: `GET_APP_HANDLER_VERSION`
|
|
401
|
+
- **Version**: 1
|
|
402
|
+
- **Payload**:
|
|
403
|
+
```typescript
|
|
404
|
+
{
|
|
405
|
+
callback: (version: number) => void;
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
- **Example**:
|
|
409
|
+
```typescript
|
|
410
|
+
const request: Request = {
|
|
411
|
+
type: "GET_APP_HANDLER_VERSION",
|
|
412
|
+
version: 1,
|
|
413
|
+
payload: {
|
|
414
|
+
callback: (version: number) => {
|
|
415
|
+
console.log("AppHandler version:", version);
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
};
|
|
419
|
+
appHandler.handler(request);
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
## Creating Custom Request Handlers
|
|
423
|
+
|
|
424
|
+
You can extend the RequestHandler feature with custom request handlers by implementing the `RequestHandler` interface and registering it with the `AppHandlerEntity`.
|
|
425
|
+
|
|
426
|
+
### Step 1: Implement RequestHandler Interface
|
|
427
|
+
|
|
428
|
+
```typescript
|
|
429
|
+
import { AppObject, AppObjectUC } from "@vived/core";
|
|
430
|
+
import {
|
|
431
|
+
AppHandlerEntity,
|
|
432
|
+
RequestHandler,
|
|
433
|
+
UnsupportedRequestVersion,
|
|
434
|
+
UnableToParsePayload,
|
|
435
|
+
} from "@vived/app";
|
|
436
|
+
|
|
437
|
+
export abstract class MyCustomUC extends AppObjectUC implements RequestHandler {
|
|
438
|
+
static readonly type = "MyCustomUC";
|
|
439
|
+
readonly requestType = "MY_CUSTOM_REQUEST";
|
|
440
|
+
readonly payloadVersion = 1;
|
|
441
|
+
|
|
442
|
+
abstract action: (data: MyPayload) => void;
|
|
443
|
+
abstract handleRequest: (version: number, payload?: unknown) => void;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export function makeMyCustomUC(appObject: AppObject): MyCustomUC {
|
|
447
|
+
return new MyCustomUCImp(appObject);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
class MyCustomUCImp extends MyCustomUC {
|
|
451
|
+
action = (data: MyPayload) => {
|
|
452
|
+
// Implement your custom logic here
|
|
453
|
+
console.log("Custom action executed:", data);
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
handleRequest = (version: number, payload: unknown) => {
|
|
457
|
+
if (version === this.payloadVersion) {
|
|
458
|
+
const data = this.castPayload(payload);
|
|
459
|
+
this.action(data);
|
|
460
|
+
} else {
|
|
461
|
+
throw new UnsupportedRequestVersion(this.requestType, version);
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
private castPayload(payload: unknown): MyPayload {
|
|
466
|
+
const castPayload = payload as MyPayload;
|
|
467
|
+
if (castPayload.myField === undefined) {
|
|
468
|
+
throw new UnableToParsePayload(
|
|
469
|
+
this.requestType,
|
|
470
|
+
this.payloadVersion,
|
|
471
|
+
JSON.stringify(payload),
|
|
472
|
+
);
|
|
473
|
+
}
|
|
474
|
+
return castPayload;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
constructor(appObject: AppObject) {
|
|
478
|
+
super(appObject, MyCustomUC.type);
|
|
479
|
+
|
|
480
|
+
// Register this handler with AppHandlerEntity
|
|
481
|
+
const handler = appObject.getComponent<AppHandlerEntity>(
|
|
482
|
+
AppHandlerEntity.type,
|
|
483
|
+
);
|
|
484
|
+
if (!handler) {
|
|
485
|
+
this.warn(
|
|
486
|
+
"MyCustomUC requires AppHandlerEntity to be added to the app object first",
|
|
487
|
+
);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
handler.registerRequestHandler(this);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
type MyPayload = {
|
|
496
|
+
myField: string;
|
|
497
|
+
};
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Step 2: Register Your Custom Handler
|
|
501
|
+
|
|
502
|
+
```typescript
|
|
503
|
+
import { makeMyCustomUC } from "./MyCustomUC";
|
|
504
|
+
|
|
505
|
+
// After setting up RequestHandler feature
|
|
506
|
+
const handlerAO = appObjectRepo.getOrCreate("AppHandlers");
|
|
507
|
+
makeMyCustomUC(handlerAO);
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### Step 3: Use Your Custom Handler
|
|
511
|
+
|
|
512
|
+
```typescript
|
|
513
|
+
const request: Request = {
|
|
514
|
+
type: "MY_CUSTOM_REQUEST",
|
|
515
|
+
version: 1,
|
|
516
|
+
payload: {
|
|
517
|
+
myField: "custom data",
|
|
518
|
+
},
|
|
519
|
+
};
|
|
520
|
+
appHandler.handler(request);
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
## Overriding Default Use Case Behavior
|
|
524
|
+
|
|
525
|
+
If you need to customize the behavior of an existing request handler without creating a completely new one, you can inject a custom `action` function. All Use Cases expose their `action` property, which can be overridden after instantiation.
|
|
526
|
+
|
|
527
|
+
### Example: Customizing START_APP Behavior
|
|
528
|
+
|
|
529
|
+
```typescript
|
|
530
|
+
import { setupAppHandlers, StartAppBaseUC } from "@vived/app";
|
|
531
|
+
import { makeAppObjectRepo } from "@vived/core";
|
|
532
|
+
|
|
533
|
+
const appObjectRepo = makeAppObjectRepo();
|
|
534
|
+
const appHandler = setupAppHandlers(appObjectRepo);
|
|
535
|
+
|
|
536
|
+
// Get the existing StartAppUC
|
|
537
|
+
const handlerAO = appObjectRepo.get("AppHandlers");
|
|
538
|
+
const startAppUC = handlerAO?.getComponent<StartAppBaseUC>(StartAppBaseUC.type);
|
|
539
|
+
|
|
540
|
+
if (startAppUC) {
|
|
541
|
+
// Override the default action with custom behavior
|
|
542
|
+
startAppUC.action = (container: HTMLElement) => {
|
|
543
|
+
console.log("Custom start logic before rendering");
|
|
544
|
+
|
|
545
|
+
// Add your custom initialization here
|
|
546
|
+
myCustomSetup();
|
|
547
|
+
|
|
548
|
+
// Call the original behavior if needed, or replace entirely
|
|
549
|
+
const appRenderingUC = AppRenderingUC.get(appObjectRepo);
|
|
550
|
+
appRenderingUC?.startRendering(container);
|
|
551
|
+
|
|
552
|
+
console.log("Custom start logic after rendering");
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
### Example: Customizing DISPOSE_APP Behavior
|
|
558
|
+
|
|
559
|
+
```typescript
|
|
560
|
+
import { DisposeAppBaseUC } from "@vived/app";
|
|
561
|
+
|
|
562
|
+
// Get the existing DisposeAppUC
|
|
563
|
+
const disposeAppUC = handlerAO?.getComponent<DisposeAppBaseUC>(
|
|
564
|
+
DisposeAppBaseUC.type,
|
|
565
|
+
);
|
|
566
|
+
|
|
567
|
+
if (disposeAppUC) {
|
|
568
|
+
// Inject custom disposal logic
|
|
569
|
+
disposeAppUC.action = () => {
|
|
570
|
+
console.log("Performing custom cleanup");
|
|
571
|
+
|
|
572
|
+
// Your custom cleanup logic
|
|
573
|
+
cleanupCustomResources();
|
|
574
|
+
removeEventListeners();
|
|
575
|
+
|
|
576
|
+
console.log("Cleanup complete");
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### Example: Augmenting SET_APP_STATE Behavior
|
|
582
|
+
|
|
583
|
+
```typescript
|
|
584
|
+
import { SetAppStateBaseUC, SetAppStateAction } from "@vived/app";
|
|
585
|
+
|
|
586
|
+
// Get the existing SetAppStateUC
|
|
587
|
+
const setAppStateUC = handlerAO?.getComponent<SetAppStateBaseUC>(
|
|
588
|
+
SetAppStateBaseUC.type,
|
|
589
|
+
);
|
|
590
|
+
|
|
591
|
+
if (setAppStateUC) {
|
|
592
|
+
// Store the original action
|
|
593
|
+
const originalAction = setAppStateUC.action;
|
|
594
|
+
|
|
595
|
+
// Create augmented action that calls original and adds custom logic
|
|
596
|
+
setAppStateUC.action = (data) => {
|
|
597
|
+
console.log("Before state change:", data);
|
|
598
|
+
|
|
599
|
+
// Call original behavior
|
|
600
|
+
originalAction(data);
|
|
601
|
+
|
|
602
|
+
// Add custom logic after
|
|
603
|
+
notifyStateChangeListeners(data);
|
|
604
|
+
console.log("After state change complete");
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### When to Override vs Create New Handler
|
|
610
|
+
|
|
611
|
+
**Override the action function when:**
|
|
612
|
+
|
|
613
|
+
- You want to modify or extend existing request handler behavior
|
|
614
|
+
- You need to add logging, metrics, or side effects
|
|
615
|
+
- You want to wrap the default behavior with pre/post processing
|
|
616
|
+
- You're working within the same application context
|
|
617
|
+
|
|
618
|
+
**Create a new request handler when:**
|
|
619
|
+
|
|
620
|
+
- You need a completely different request type
|
|
621
|
+
- You require different payload structure or versioning
|
|
622
|
+
- You're adding new functionality rather than modifying existing
|
|
623
|
+
|
|
624
|
+
### Important Notes
|
|
625
|
+
|
|
626
|
+
1. **Override After Setup**: Always override the action after the RequestHandler feature has been fully initialized
|
|
627
|
+
2. **Type Safety**: Use the proper types (e.g., `SetAppStateAction`) when defining your custom action
|
|
628
|
+
3. **Original Behavior**: Store a reference to the original action if you want to call it as part of your custom logic
|
|
629
|
+
4. **Validation**: The `handleRequest` method still performs version checking and payload validation before calling your custom action
|
|
630
|
+
|
|
631
|
+
## Error Handling
|
|
632
|
+
|
|
633
|
+
The RequestHandler provides two main error types:
|
|
634
|
+
|
|
635
|
+
### UnsupportedRequestVersion
|
|
636
|
+
|
|
637
|
+
Thrown when a request is sent with an unsupported version number.
|
|
638
|
+
|
|
639
|
+
```typescript
|
|
640
|
+
try {
|
|
641
|
+
appHandler.handler(request);
|
|
642
|
+
} catch (error) {
|
|
643
|
+
if (error instanceof UnsupportedRequestVersion) {
|
|
644
|
+
console.error("Version not supported:", error.message);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
### UnableToParsePayload
|
|
650
|
+
|
|
651
|
+
Thrown when the payload cannot be parsed or is missing required fields.
|
|
652
|
+
|
|
653
|
+
```typescript
|
|
654
|
+
try {
|
|
655
|
+
appHandler.handler(request);
|
|
656
|
+
} catch (error) {
|
|
657
|
+
if (error instanceof UnableToParsePayload) {
|
|
658
|
+
console.error("Invalid payload:", error.message);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
## Best Practices
|
|
664
|
+
|
|
665
|
+
1. **Version Compatibility**: Always check supported versions using `GET_APP_PAYLOAD_VERSION` before sending requests to ensure compatibility.
|
|
666
|
+
|
|
667
|
+
2. **Error Handling**: Wrap request handler calls in try-catch blocks to gracefully handle unsupported versions or invalid payloads.
|
|
668
|
+
|
|
669
|
+
3. **Registration Order**: Ensure the `AppHandlerEntity` is created before registering any request handlers.
|
|
670
|
+
|
|
671
|
+
4. **Single Responsibility**: Each request handler should handle one specific operation. Create separate handlers for different operations.
|
|
672
|
+
|
|
673
|
+
5. **Payload Validation**: Always validate payloads thoroughly in the `castPayload` method to ensure type safety.
|
|
674
|
+
|
|
675
|
+
6. **Versioning**: When updating request payloads, increment the version number and maintain backward compatibility where possible.
|
|
676
|
+
|
|
677
|
+
7. **Action Injection**: To customize default behavior, inject a custom `action` function rather than creating an entirely new request handler. This maintains the existing request routing and validation logic.
|
|
678
|
+
|
|
679
|
+
8. **Logging**: The system automatically logs warnings for:
|
|
680
|
+
- Unregistered request types
|
|
681
|
+
- Multiple handlers registered for the same type
|
|
682
|
+
- Handler execution errors
|
|
683
|
+
|
|
684
|
+
## Dependencies
|
|
685
|
+
|
|
686
|
+
The RequestHandler feature depends on:
|
|
687
|
+
|
|
688
|
+
- `@vived/core`: Core application framework
|
|
689
|
+
- `BaseApp`: For app state and rendering control
|
|
690
|
+
- `StateMachine`: For state management (SET_APP_STATE)
|
|
691
|
+
- `UndoRedo`: For undo/redo stack management (SET_APP_STATE)
|
|
692
|
+
- `FeatureFlags`: For feature flag management (ENABLE_FEATURE)
|
|
693
|
+
- `ThemeColors`: For theme color management (SET_THEME_COLORS)
|
|
694
|
+
- `Babylon`: For scene inspector (SHOW_BABYLON_INSPECTOR)
|
|
695
|
+
- `XR`: For XR rendering (START_ZSPACE)
|
|
696
|
+
- `zSpace`: For zSpace device support (START_ZSPACE, STOP_ZSPACE)
|
|
697
|
+
- `Stylus`: For stylus emulation (START_ZSPACE)
|
|
698
|
+
|
|
699
|
+
## Testing
|
|
700
|
+
|
|
701
|
+
The feature includes comprehensive unit tests. To run tests:
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
npm run test:once RequestHandler
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
Test coverage includes:
|
|
708
|
+
|
|
709
|
+
- Request routing and handler execution
|
|
710
|
+
- Version validation
|
|
711
|
+
- Payload parsing and validation
|
|
712
|
+
- Error handling
|
|
713
|
+
- Multiple handler registration warnings
|
|
714
|
+
- Introspection request handling
|
|
715
|
+
|
|
716
|
+
## Example: Complete Usage
|
|
717
|
+
|
|
718
|
+
```typescript
|
|
719
|
+
import { makeAppObjectRepo } from "@vived/core";
|
|
720
|
+
import { setupAppHandlers } from "@vived/app";
|
|
721
|
+
|
|
722
|
+
// Setup
|
|
723
|
+
const appObjectRepo = makeAppObjectRepo();
|
|
724
|
+
const appHandler = setupAppHandlers(appObjectRepo);
|
|
725
|
+
|
|
726
|
+
// Query supported versions
|
|
727
|
+
const versionRequest = {
|
|
728
|
+
type: "GET_APP_PAYLOAD_VERSION",
|
|
729
|
+
version: 2,
|
|
730
|
+
payload: {
|
|
731
|
+
callback: (versionMap: Map<string, number>) => {
|
|
732
|
+
console.log("Supported requests:", versionMap);
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
};
|
|
736
|
+
appHandler.handler(versionRequest);
|
|
737
|
+
|
|
738
|
+
// Start the app
|
|
739
|
+
const startRequest = {
|
|
740
|
+
type: "START_APP",
|
|
741
|
+
version: 2,
|
|
742
|
+
payload: {
|
|
743
|
+
container: document.getElementById("app-container"),
|
|
744
|
+
},
|
|
745
|
+
};
|
|
746
|
+
appHandler.handler(startRequest);
|
|
747
|
+
|
|
748
|
+
// Enable a feature
|
|
749
|
+
const featureRequest = {
|
|
750
|
+
type: "ENABLE_FEATURE",
|
|
751
|
+
version: 1,
|
|
752
|
+
payload: {
|
|
753
|
+
featureFlag: "ADVANCED_MODE",
|
|
754
|
+
},
|
|
755
|
+
};
|
|
756
|
+
appHandler.handler(featureRequest);
|
|
757
|
+
|
|
758
|
+
// Set app state
|
|
759
|
+
const stateRequest = {
|
|
760
|
+
type: "SET_APP_STATE",
|
|
761
|
+
version: 3,
|
|
762
|
+
payload: {
|
|
763
|
+
hasNextSlide: true,
|
|
764
|
+
hasPreviousSlide: false,
|
|
765
|
+
hideNavigation: false,
|
|
766
|
+
duration: 300,
|
|
767
|
+
},
|
|
768
|
+
};
|
|
769
|
+
appHandler.handler(stateRequest);
|
|
770
|
+
|
|
771
|
+
// Stop the app
|
|
772
|
+
const stopRequest = {
|
|
773
|
+
type: "STOP_APP",
|
|
774
|
+
version: 1,
|
|
775
|
+
};
|
|
776
|
+
appHandler.handler(stopRequest);
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
## Migration Notes
|
|
780
|
+
|
|
781
|
+
When upgrading to newer versions of the RequestHandler feature:
|
|
782
|
+
|
|
783
|
+
1. Use the introspection requests to check supported versions
|
|
784
|
+
2. Update your request payloads to match the latest version
|
|
785
|
+
3. Test thoroughly with the new version before deploying
|
|
786
|
+
4. Maintain fallback logic for older versions if needed
|
|
787
|
+
|
|
788
|
+
## Support
|
|
789
|
+
|
|
790
|
+
For questions or issues with the RequestHandler feature, please refer to the VIVED documentation or contact the development team.
|