@vived/core 1.4.2 → 1.4.4
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/README.md +142 -20
- package/dist/cjs/AppObject/AppObject.js +53 -0
- package/dist/cjs/AppObject/AppObject.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectComponent.js +78 -0
- package/dist/cjs/AppObject/AppObjectComponent.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectController.js +22 -0
- package/dist/cjs/AppObject/AppObjectController.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectEntity.js +52 -0
- package/dist/cjs/AppObject/AppObjectEntity.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectEntityRepo.js +75 -1
- package/dist/cjs/AppObject/AppObjectEntityRepo.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectPM.js +46 -0
- package/dist/cjs/AppObject/AppObjectPM.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectRepo.js +20 -0
- package/dist/cjs/AppObject/AppObjectRepo.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectUC.js +23 -0
- package/dist/cjs/AppObject/AppObjectUC.js.map +1 -1
- package/dist/cjs/AppObject/AppObjectView.js +22 -0
- package/dist/cjs/AppObject/AppObjectView.js.map +1 -1
- package/dist/cjs/AppObject/getSingletonComponent.js +19 -0
- package/dist/cjs/AppObject/getSingletonComponent.js.map +1 -1
- package/dist/cjs/Entities/MemoizedAngle.js +21 -0
- package/dist/cjs/Entities/MemoizedAngle.js.map +1 -1
- package/dist/cjs/Entities/MemoizedBoolean.js +21 -0
- package/dist/cjs/Entities/MemoizedBoolean.js.map +1 -1
- package/dist/cjs/Entities/MemoizedColor.js +21 -0
- package/dist/cjs/Entities/MemoizedColor.js.map +1 -1
- package/dist/cjs/Entities/MemoizedNumber.js +21 -0
- package/dist/cjs/Entities/MemoizedNumber.js.map +1 -1
- package/dist/cjs/Entities/MemoizedQuaternion.js +21 -0
- package/dist/cjs/Entities/MemoizedQuaternion.js.map +1 -1
- package/dist/cjs/Entities/MemoizedString.js +21 -0
- package/dist/cjs/Entities/MemoizedString.js.map +1 -1
- package/dist/cjs/Entities/MemoizedVector2.js +21 -0
- package/dist/cjs/Entities/MemoizedVector2.js.map +1 -1
- package/dist/cjs/Entities/MemoizedVector3.js +21 -0
- package/dist/cjs/Entities/MemoizedVector3.js.map +1 -1
- package/dist/cjs/Entities/ObservableEntity.js +17 -0
- package/dist/cjs/Entities/ObservableEntity.js.map +1 -1
- package/dist/cjs/Entities/ObserverList.js +21 -0
- package/dist/cjs/Entities/ObserverList.js.map +1 -1
- package/dist/cjs/Entities/RangedNumber.js +29 -0
- package/dist/cjs/Entities/RangedNumber.js.map +1 -1
- package/dist/cjs/ExampleFeature/Adapters/examplePmAdapter.js +64 -0
- package/dist/cjs/ExampleFeature/Adapters/examplePmAdapter.js.map +1 -0
- package/dist/cjs/ExampleFeature/Adapters/exampleSingletonPmAdapter.js +60 -0
- package/dist/cjs/ExampleFeature/Adapters/exampleSingletonPmAdapter.js.map +1 -0
- package/dist/cjs/ExampleFeature/Adapters/index.js +19 -0
- package/dist/cjs/ExampleFeature/Adapters/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Controllers/index.js +19 -0
- package/dist/cjs/ExampleFeature/Controllers/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Controllers/setExampleText.js +48 -0
- package/dist/cjs/ExampleFeature/Controllers/setExampleText.js.map +1 -0
- package/dist/cjs/ExampleFeature/Controllers/toggleExampleBoolean.js +47 -0
- package/dist/cjs/ExampleFeature/Controllers/toggleExampleBoolean.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleEntity.js +90 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleEntity.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleRepo.js +113 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleRepo.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleSingletonEntity.js +69 -0
- package/dist/cjs/ExampleFeature/Entities/ExampleSingletonEntity.js.map +1 -0
- package/dist/cjs/ExampleFeature/Entities/index.js +20 -0
- package/dist/cjs/ExampleFeature/Entities/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Factory/index.js +18 -0
- package/dist/cjs/ExampleFeature/Factory/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/Factory/setupExampleFeature.js +29 -0
- package/dist/cjs/ExampleFeature/Factory/setupExampleFeature.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockEditExampleStringUC.js +47 -0
- package/dist/cjs/ExampleFeature/Mocks/MockEditExampleStringUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExamplePM.js +48 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExamplePM.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExampleSingletonPM.js +59 -0
- package/dist/cjs/ExampleFeature/Mocks/MockExampleSingletonPM.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js +57 -0
- package/dist/cjs/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/Mocks/index.js +21 -0
- package/dist/cjs/ExampleFeature/Mocks/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/PMs/ExamplePM.js +97 -0
- package/dist/cjs/ExampleFeature/PMs/ExamplePM.js.map +1 -0
- package/dist/cjs/ExampleFeature/PMs/ExampleSingletonPM.js +102 -0
- package/dist/cjs/ExampleFeature/PMs/ExampleSingletonPM.js.map +1 -0
- package/dist/cjs/ExampleFeature/PMs/index.js +19 -0
- package/dist/cjs/ExampleFeature/PMs/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/UCs/EditExampleStringUC.js +87 -0
- package/dist/cjs/ExampleFeature/UCs/EditExampleStringUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/UCs/ToggleExampleBooleanUC.js +79 -0
- package/dist/cjs/ExampleFeature/UCs/ToggleExampleBooleanUC.js.map +1 -0
- package/dist/cjs/ExampleFeature/UCs/index.js +19 -0
- package/dist/cjs/ExampleFeature/UCs/index.js.map +1 -0
- package/dist/cjs/ExampleFeature/index.js +24 -0
- package/dist/cjs/ExampleFeature/index.js.map +1 -0
- package/dist/cjs/Types/PmAdapter.js.map +1 -1
- package/dist/cjs/Types/SingletonPmAdapter.js.map +1 -1
- package/dist/cjs/ValueObjects/Angle.js +1 -1
- package/dist/cjs/ValueObjects/Angle.js.map +1 -1
- package/dist/cjs/ValueObjects/LineSegment2D.js +6 -6
- package/dist/cjs/ValueObjects/LineSegment2D.js.map +1 -1
- package/dist/cjs/ValueObjects/Matrix.js +6 -6
- package/dist/cjs/ValueObjects/Matrix.js.map +1 -1
- package/dist/cjs/ValueObjects/Quaternion.js +17 -17
- package/dist/cjs/ValueObjects/Quaternion.js.map +1 -1
- package/dist/cjs/ValueObjects/Vector2.js +15 -8
- package/dist/cjs/ValueObjects/Vector2.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/AppObject/AppObject.js +53 -0
- package/dist/esm/AppObject/AppObject.js.map +1 -1
- package/dist/esm/AppObject/AppObjectComponent.js +78 -0
- package/dist/esm/AppObject/AppObjectComponent.js.map +1 -1
- package/dist/esm/AppObject/AppObjectController.js +22 -0
- package/dist/esm/AppObject/AppObjectController.js.map +1 -1
- package/dist/esm/AppObject/AppObjectEntity.js +52 -0
- package/dist/esm/AppObject/AppObjectEntity.js.map +1 -1
- package/dist/esm/AppObject/AppObjectEntityRepo.js +75 -1
- package/dist/esm/AppObject/AppObjectEntityRepo.js.map +1 -1
- package/dist/esm/AppObject/AppObjectPM.js +46 -0
- package/dist/esm/AppObject/AppObjectPM.js.map +1 -1
- package/dist/esm/AppObject/AppObjectRepo.js +20 -0
- package/dist/esm/AppObject/AppObjectRepo.js.map +1 -1
- package/dist/esm/AppObject/AppObjectUC.js +24 -1
- package/dist/esm/AppObject/AppObjectUC.js.map +1 -1
- package/dist/esm/AppObject/AppObjectView.js +23 -1
- package/dist/esm/AppObject/AppObjectView.js.map +1 -1
- package/dist/esm/AppObject/getSingletonComponent.js +19 -0
- package/dist/esm/AppObject/getSingletonComponent.js.map +1 -1
- package/dist/esm/Entities/MemoizedAngle.js +21 -0
- package/dist/esm/Entities/MemoizedAngle.js.map +1 -1
- package/dist/esm/Entities/MemoizedBoolean.js +21 -0
- package/dist/esm/Entities/MemoizedBoolean.js.map +1 -1
- package/dist/esm/Entities/MemoizedColor.js +21 -0
- package/dist/esm/Entities/MemoizedColor.js.map +1 -1
- package/dist/esm/Entities/MemoizedNumber.js +21 -0
- package/dist/esm/Entities/MemoizedNumber.js.map +1 -1
- package/dist/esm/Entities/MemoizedQuaternion.js +21 -0
- package/dist/esm/Entities/MemoizedQuaternion.js.map +1 -1
- package/dist/esm/Entities/MemoizedString.js +21 -0
- package/dist/esm/Entities/MemoizedString.js.map +1 -1
- package/dist/esm/Entities/MemoizedVector2.js +21 -0
- package/dist/esm/Entities/MemoizedVector2.js.map +1 -1
- package/dist/esm/Entities/MemoizedVector3.js +21 -0
- package/dist/esm/Entities/MemoizedVector3.js.map +1 -1
- package/dist/esm/Entities/ObservableEntity.js +17 -0
- package/dist/esm/Entities/ObservableEntity.js.map +1 -1
- package/dist/esm/Entities/ObserverList.js +21 -0
- package/dist/esm/Entities/ObserverList.js.map +1 -1
- package/dist/esm/Entities/RangedNumber.js +29 -0
- package/dist/esm/Entities/RangedNumber.js.map +1 -1
- package/dist/esm/ExampleFeature/Adapters/examplePmAdapter.js +61 -0
- package/dist/esm/ExampleFeature/Adapters/examplePmAdapter.js.map +1 -0
- package/dist/esm/ExampleFeature/Adapters/exampleSingletonPmAdapter.js +57 -0
- package/dist/esm/ExampleFeature/Adapters/exampleSingletonPmAdapter.js.map +1 -0
- package/dist/esm/ExampleFeature/Adapters/index.js +3 -0
- package/dist/esm/ExampleFeature/Adapters/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Controllers/index.js +3 -0
- package/dist/esm/ExampleFeature/Controllers/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Controllers/setExampleText.js +45 -0
- package/dist/esm/ExampleFeature/Controllers/setExampleText.js.map +1 -0
- package/dist/esm/ExampleFeature/Controllers/toggleExampleBoolean.js +44 -0
- package/dist/esm/ExampleFeature/Controllers/toggleExampleBoolean.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/ExampleEntity.js +85 -0
- package/dist/esm/ExampleFeature/Entities/ExampleEntity.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/ExampleRepo.js +108 -0
- package/dist/esm/ExampleFeature/Entities/ExampleRepo.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/ExampleSingletonEntity.js +64 -0
- package/dist/esm/ExampleFeature/Entities/ExampleSingletonEntity.js.map +1 -0
- package/dist/esm/ExampleFeature/Entities/index.js +4 -0
- package/dist/esm/ExampleFeature/Entities/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Factory/index.js +2 -0
- package/dist/esm/ExampleFeature/Factory/index.js.map +1 -0
- package/dist/esm/ExampleFeature/Factory/setupExampleFeature.js +26 -0
- package/dist/esm/ExampleFeature/Factory/setupExampleFeature.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockEditExampleStringUC.js +43 -0
- package/dist/esm/ExampleFeature/Mocks/MockEditExampleStringUC.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockExamplePM.js +44 -0
- package/dist/esm/ExampleFeature/Mocks/MockExamplePM.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockExampleSingletonPM.js +54 -0
- package/dist/esm/ExampleFeature/Mocks/MockExampleSingletonPM.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js +52 -0
- package/dist/esm/ExampleFeature/Mocks/MockToggleExampleBooleanUC.js.map +1 -0
- package/dist/esm/ExampleFeature/Mocks/index.js +5 -0
- package/dist/esm/ExampleFeature/Mocks/index.js.map +1 -0
- package/dist/esm/ExampleFeature/PMs/ExamplePM.js +92 -0
- package/dist/esm/ExampleFeature/PMs/ExamplePM.js.map +1 -0
- package/dist/esm/ExampleFeature/PMs/ExampleSingletonPM.js +97 -0
- package/dist/esm/ExampleFeature/PMs/ExampleSingletonPM.js.map +1 -0
- package/dist/esm/ExampleFeature/PMs/index.js +3 -0
- package/dist/esm/ExampleFeature/PMs/index.js.map +1 -0
- package/dist/esm/ExampleFeature/UCs/EditExampleStringUC.js +82 -0
- package/dist/esm/ExampleFeature/UCs/EditExampleStringUC.js.map +1 -0
- package/dist/esm/ExampleFeature/UCs/ToggleExampleBooleanUC.js +74 -0
- package/dist/esm/ExampleFeature/UCs/ToggleExampleBooleanUC.js.map +1 -0
- package/dist/esm/ExampleFeature/UCs/index.js +3 -0
- package/dist/esm/ExampleFeature/UCs/index.js.map +1 -0
- package/dist/esm/ExampleFeature/index.js +8 -0
- package/dist/esm/ExampleFeature/index.js.map +1 -0
- package/dist/esm/Types/PmAdapter.js.map +1 -1
- package/dist/esm/Types/SingletonPmAdapter.js.map +1 -1
- package/dist/esm/ValueObjects/Angle.js +1 -1
- package/dist/esm/ValueObjects/Angle.js.map +1 -1
- package/dist/esm/ValueObjects/LineSegment2D.js +6 -6
- package/dist/esm/ValueObjects/LineSegment2D.js.map +1 -1
- package/dist/esm/ValueObjects/Matrix.js +6 -6
- package/dist/esm/ValueObjects/Matrix.js.map +1 -1
- package/dist/esm/ValueObjects/Quaternion.js +17 -17
- package/dist/esm/ValueObjects/Quaternion.js.map +1 -1
- package/dist/esm/ValueObjects/Vector2.js +15 -8
- package/dist/esm/ValueObjects/Vector2.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/types/AppObject/AppObject.d.ts +42 -0
- package/dist/types/AppObject/AppObject.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectComponent.d.ts +80 -0
- package/dist/types/AppObject/AppObjectComponent.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectController.d.ts +22 -0
- package/dist/types/AppObject/AppObjectController.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectEntity.d.ts +55 -0
- package/dist/types/AppObject/AppObjectEntity.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectEntityRepo.d.ts +75 -0
- package/dist/types/AppObject/AppObjectEntityRepo.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectPM.d.ts +53 -0
- package/dist/types/AppObject/AppObjectPM.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectRepo.d.ts +124 -0
- package/dist/types/AppObject/AppObjectRepo.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectUC.d.ts +23 -0
- package/dist/types/AppObject/AppObjectUC.d.ts.map +1 -1
- package/dist/types/AppObject/AppObjectView.d.ts +22 -0
- package/dist/types/AppObject/AppObjectView.d.ts.map +1 -1
- package/dist/types/AppObject/getSingletonComponent.d.ts +19 -0
- package/dist/types/AppObject/getSingletonComponent.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedAngle.d.ts +21 -0
- package/dist/types/Entities/MemoizedAngle.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedBoolean.d.ts +21 -0
- package/dist/types/Entities/MemoizedBoolean.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedColor.d.ts +21 -0
- package/dist/types/Entities/MemoizedColor.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedNumber.d.ts +21 -0
- package/dist/types/Entities/MemoizedNumber.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedQuaternion.d.ts +21 -0
- package/dist/types/Entities/MemoizedQuaternion.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedString.d.ts +21 -0
- package/dist/types/Entities/MemoizedString.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedVector2.d.ts +21 -0
- package/dist/types/Entities/MemoizedVector2.d.ts.map +1 -1
- package/dist/types/Entities/MemoizedVector3.d.ts +21 -0
- package/dist/types/Entities/MemoizedVector3.d.ts.map +1 -1
- package/dist/types/Entities/ObservableEntity.d.ts +20 -0
- package/dist/types/Entities/ObservableEntity.d.ts.map +1 -1
- package/dist/types/Entities/ObserverList.d.ts +21 -0
- package/dist/types/Entities/ObserverList.d.ts.map +1 -1
- package/dist/types/Entities/RangedNumber.d.ts +37 -0
- package/dist/types/Entities/RangedNumber.d.ts.map +1 -1
- package/dist/types/ExampleFeature/Adapters/examplePmAdapter.d.ts +29 -0
- package/dist/types/ExampleFeature/Adapters/examplePmAdapter.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Adapters/exampleSingletonPmAdapter.d.ts +31 -0
- package/dist/types/ExampleFeature/Adapters/exampleSingletonPmAdapter.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Adapters/index.d.ts +3 -0
- package/dist/types/ExampleFeature/Adapters/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Controllers/index.d.ts +3 -0
- package/dist/types/ExampleFeature/Controllers/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Controllers/setExampleText.d.ts +35 -0
- package/dist/types/ExampleFeature/Controllers/setExampleText.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Controllers/toggleExampleBoolean.d.ts +34 -0
- package/dist/types/ExampleFeature/Controllers/toggleExampleBoolean.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/ExampleEntity.d.ts +55 -0
- package/dist/types/ExampleFeature/Entities/ExampleEntity.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/ExampleRepo.d.ts +62 -0
- package/dist/types/ExampleFeature/Entities/ExampleRepo.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/ExampleSingletonEntity.d.ts +43 -0
- package/dist/types/ExampleFeature/Entities/ExampleSingletonEntity.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Entities/index.d.ts +4 -0
- package/dist/types/ExampleFeature/Entities/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Factory/index.d.ts +2 -0
- package/dist/types/ExampleFeature/Factory/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Factory/setupExampleFeature.d.ts +17 -0
- package/dist/types/ExampleFeature/Factory/setupExampleFeature.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockEditExampleStringUC.d.ts +42 -0
- package/dist/types/ExampleFeature/Mocks/MockEditExampleStringUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockExamplePM.d.ts +41 -0
- package/dist/types/ExampleFeature/Mocks/MockExamplePM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockExampleSingletonPM.d.ts +49 -0
- package/dist/types/ExampleFeature/Mocks/MockExampleSingletonPM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/MockToggleExampleBooleanUC.d.ts +47 -0
- package/dist/types/ExampleFeature/Mocks/MockToggleExampleBooleanUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/Mocks/index.d.ts +5 -0
- package/dist/types/ExampleFeature/Mocks/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/PMs/ExamplePM.d.ts +42 -0
- package/dist/types/ExampleFeature/PMs/ExamplePM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/PMs/ExampleSingletonPM.d.ts +52 -0
- package/dist/types/ExampleFeature/PMs/ExampleSingletonPM.d.ts.map +1 -0
- package/dist/types/ExampleFeature/PMs/index.d.ts +3 -0
- package/dist/types/ExampleFeature/PMs/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/UCs/EditExampleStringUC.d.ts +52 -0
- package/dist/types/ExampleFeature/UCs/EditExampleStringUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/UCs/ToggleExampleBooleanUC.d.ts +44 -0
- package/dist/types/ExampleFeature/UCs/ToggleExampleBooleanUC.d.ts.map +1 -0
- package/dist/types/ExampleFeature/UCs/index.d.ts +3 -0
- package/dist/types/ExampleFeature/UCs/index.d.ts.map +1 -0
- package/dist/types/ExampleFeature/index.d.ts +8 -0
- package/dist/types/ExampleFeature/index.d.ts.map +1 -0
- package/dist/types/Types/PmAdapter.d.ts +60 -0
- package/dist/types/Types/PmAdapter.d.ts.map +1 -1
- package/dist/types/Types/SingletonPmAdapter.d.ts +55 -0
- package/dist/types/Types/SingletonPmAdapter.d.ts.map +1 -1
- package/dist/types/ValueObjects/Angle.d.ts +1 -1
- package/dist/types/ValueObjects/Matrix.d.ts +5 -5
- package/dist/types/ValueObjects/Matrix.d.ts.map +1 -1
- package/dist/types/ValueObjects/Quaternion.d.ts +17 -17
- package/dist/types/ValueObjects/Vector2.d.ts +8 -3
- package/dist/types/ValueObjects/Vector2.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +6 -4
- package/dist/cjs/AppObject/AppObject.test.js +0 -113
- package/dist/cjs/AppObject/AppObject.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectComponent.test.js +0 -132
- package/dist/cjs/AppObject/AppObjectComponent.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectEntity.test.js +0 -108
- package/dist/cjs/AppObject/AppObjectEntity.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectEntityRepo.test.js +0 -149
- package/dist/cjs/AppObject/AppObjectEntityRepo.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectPM.test.js +0 -103
- package/dist/cjs/AppObject/AppObjectPM.test.js.map +0 -1
- package/dist/cjs/AppObject/AppObjectRepo.test.js +0 -213
- package/dist/cjs/AppObject/AppObjectRepo.test.js.map +0 -1
- package/dist/cjs/AppObject/getSingletonComponent.test.js +0 -13
- package/dist/cjs/AppObject/getSingletonComponent.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedAngle.test.js +0 -30
- package/dist/cjs/Entities/MemoizedAngle.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedBoolean.test.js +0 -34
- package/dist/cjs/Entities/MemoizedBoolean.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedColor.test.js +0 -32
- package/dist/cjs/Entities/MemoizedColor.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedNumber.test.js +0 -29
- package/dist/cjs/Entities/MemoizedNumber.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedQuaternion.test.js +0 -32
- package/dist/cjs/Entities/MemoizedQuaternion.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedString.test.js +0 -29
- package/dist/cjs/Entities/MemoizedString.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedVector2.test.js +0 -32
- package/dist/cjs/Entities/MemoizedVector2.test.js.map +0 -1
- package/dist/cjs/Entities/MemoizedVector3.test.js +0 -32
- package/dist/cjs/Entities/MemoizedVector3.test.js.map +0 -1
- package/dist/cjs/Entities/ObservableEntity.test.js +0 -25
- package/dist/cjs/Entities/ObservableEntity.test.js.map +0 -1
- package/dist/cjs/Entities/ObserverList.test.js +0 -44
- package/dist/cjs/Entities/ObserverList.test.js.map +0 -1
- package/dist/cjs/Entities/RangedNumber.test.js +0 -96
- package/dist/cjs/Entities/RangedNumber.test.js.map +0 -1
- package/dist/cjs/Utilities/LengthConverters.test.js +0 -24
- package/dist/cjs/Utilities/LengthConverters.test.js.map +0 -1
- package/dist/cjs/Utilities/LerpNumber.test.js +0 -90
- package/dist/cjs/Utilities/LerpNumber.test.js.map +0 -1
- package/dist/cjs/Utilities/addAlphaToHex.test.js +0 -34
- package/dist/cjs/Utilities/addAlphaToHex.test.js.map +0 -1
- package/dist/cjs/Utilities/alphaToHex.test.js +0 -75
- package/dist/cjs/Utilities/alphaToHex.test.js.map +0 -1
- package/dist/cjs/Utilities/degreesToRadians.test.js +0 -9
- package/dist/cjs/Utilities/degreesToRadians.test.js.map +0 -1
- package/dist/cjs/Utilities/easeFunctions.test.js +0 -209
- package/dist/cjs/Utilities/easeFunctions.test.js.map +0 -1
- package/dist/cjs/Utilities/interpolateNumber.test.js +0 -26
- package/dist/cjs/Utilities/interpolateNumber.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Angle.test.js +0 -28
- package/dist/cjs/ValueObjects/Angle.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Color.test.js +0 -147
- package/dist/cjs/ValueObjects/Color.test.js.map +0 -1
- package/dist/cjs/ValueObjects/LineSegment2D.test.js +0 -102
- package/dist/cjs/ValueObjects/LineSegment2D.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Matrix.test.js +0 -385
- package/dist/cjs/ValueObjects/Matrix.test.js.map +0 -1
- package/dist/cjs/ValueObjects/ParametricLine.test.js +0 -126
- package/dist/cjs/ValueObjects/ParametricLine.test.js.map +0 -1
- package/dist/cjs/ValueObjects/ParametricPlane.test.js +0 -101
- package/dist/cjs/ValueObjects/ParametricPlane.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Quaternion.test.js +0 -240
- package/dist/cjs/ValueObjects/Quaternion.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Rectangle.test.js +0 -32
- package/dist/cjs/ValueObjects/Rectangle.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Vector2.test.js +0 -136
- package/dist/cjs/ValueObjects/Vector2.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Vector3.test.js +0 -188
- package/dist/cjs/ValueObjects/Vector3.test.js.map +0 -1
- package/dist/cjs/ValueObjects/Version.test.js +0 -310
- package/dist/cjs/ValueObjects/Version.test.js.map +0 -1
- package/dist/esm/AppObject/AppObject.test.js +0 -110
- package/dist/esm/AppObject/AppObject.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectComponent.test.js +0 -130
- package/dist/esm/AppObject/AppObjectComponent.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectEntity.test.js +0 -106
- package/dist/esm/AppObject/AppObjectEntity.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectEntityRepo.test.js +0 -147
- package/dist/esm/AppObject/AppObjectEntityRepo.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectPM.test.js +0 -101
- package/dist/esm/AppObject/AppObjectPM.test.js.map +0 -1
- package/dist/esm/AppObject/AppObjectRepo.test.js +0 -211
- package/dist/esm/AppObject/AppObjectRepo.test.js.map +0 -1
- package/dist/esm/AppObject/getSingletonComponent.test.js +0 -11
- package/dist/esm/AppObject/getSingletonComponent.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedAngle.test.js +0 -28
- package/dist/esm/Entities/MemoizedAngle.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedBoolean.test.js +0 -32
- package/dist/esm/Entities/MemoizedBoolean.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedColor.test.js +0 -30
- package/dist/esm/Entities/MemoizedColor.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedNumber.test.js +0 -27
- package/dist/esm/Entities/MemoizedNumber.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedQuaternion.test.js +0 -30
- package/dist/esm/Entities/MemoizedQuaternion.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedString.test.js +0 -27
- package/dist/esm/Entities/MemoizedString.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedVector2.test.js +0 -30
- package/dist/esm/Entities/MemoizedVector2.test.js.map +0 -1
- package/dist/esm/Entities/MemoizedVector3.test.js +0 -30
- package/dist/esm/Entities/MemoizedVector3.test.js.map +0 -1
- package/dist/esm/Entities/ObservableEntity.test.js +0 -23
- package/dist/esm/Entities/ObservableEntity.test.js.map +0 -1
- package/dist/esm/Entities/ObserverList.test.js +0 -42
- package/dist/esm/Entities/ObserverList.test.js.map +0 -1
- package/dist/esm/Entities/RangedNumber.test.js +0 -94
- package/dist/esm/Entities/RangedNumber.test.js.map +0 -1
- package/dist/esm/Utilities/LengthConverters.test.js +0 -22
- package/dist/esm/Utilities/LengthConverters.test.js.map +0 -1
- package/dist/esm/Utilities/LerpNumber.test.js +0 -88
- package/dist/esm/Utilities/LerpNumber.test.js.map +0 -1
- package/dist/esm/Utilities/addAlphaToHex.test.js +0 -32
- package/dist/esm/Utilities/addAlphaToHex.test.js.map +0 -1
- package/dist/esm/Utilities/alphaToHex.test.js +0 -73
- package/dist/esm/Utilities/alphaToHex.test.js.map +0 -1
- package/dist/esm/Utilities/degreesToRadians.test.js +0 -7
- package/dist/esm/Utilities/degreesToRadians.test.js.map +0 -1
- package/dist/esm/Utilities/easeFunctions.test.js +0 -207
- package/dist/esm/Utilities/easeFunctions.test.js.map +0 -1
- package/dist/esm/Utilities/interpolateNumber.test.js +0 -24
- package/dist/esm/Utilities/interpolateNumber.test.js.map +0 -1
- package/dist/esm/ValueObjects/Angle.test.js +0 -26
- package/dist/esm/ValueObjects/Angle.test.js.map +0 -1
- package/dist/esm/ValueObjects/Color.test.js +0 -145
- package/dist/esm/ValueObjects/Color.test.js.map +0 -1
- package/dist/esm/ValueObjects/LineSegment2D.test.js +0 -100
- package/dist/esm/ValueObjects/LineSegment2D.test.js.map +0 -1
- package/dist/esm/ValueObjects/Matrix.test.js +0 -383
- package/dist/esm/ValueObjects/Matrix.test.js.map +0 -1
- package/dist/esm/ValueObjects/ParametricLine.test.js +0 -124
- package/dist/esm/ValueObjects/ParametricLine.test.js.map +0 -1
- package/dist/esm/ValueObjects/ParametricPlane.test.js +0 -99
- package/dist/esm/ValueObjects/ParametricPlane.test.js.map +0 -1
- package/dist/esm/ValueObjects/Quaternion.test.js +0 -238
- package/dist/esm/ValueObjects/Quaternion.test.js.map +0 -1
- package/dist/esm/ValueObjects/Rectangle.test.js +0 -30
- package/dist/esm/ValueObjects/Rectangle.test.js.map +0 -1
- package/dist/esm/ValueObjects/Vector2.test.js +0 -134
- package/dist/esm/ValueObjects/Vector2.test.js.map +0 -1
- package/dist/esm/ValueObjects/Vector3.test.js +0 -186
- package/dist/esm/ValueObjects/Vector3.test.js.map +0 -1
- package/dist/esm/ValueObjects/Version.test.js +0 -308
- package/dist/esm/ValueObjects/Version.test.js.map +0 -1
- package/dist/types/AppObject/AppObject.test.d.ts +0 -7
- package/dist/types/AppObject/AppObject.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectComponent.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectComponent.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectEntity.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectEntity.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectEntityRepo.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectEntityRepo.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectPM.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectPM.test.d.ts.map +0 -1
- package/dist/types/AppObject/AppObjectRepo.test.d.ts +0 -2
- package/dist/types/AppObject/AppObjectRepo.test.d.ts.map +0 -1
- package/dist/types/AppObject/getSingletonComponent.test.d.ts +0 -2
- package/dist/types/AppObject/getSingletonComponent.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedAngle.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedAngle.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedBoolean.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedBoolean.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedColor.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedColor.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedNumber.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedNumber.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedQuaternion.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedQuaternion.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedString.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedString.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedVector2.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedVector2.test.d.ts.map +0 -1
- package/dist/types/Entities/MemoizedVector3.test.d.ts +0 -2
- package/dist/types/Entities/MemoizedVector3.test.d.ts.map +0 -1
- package/dist/types/Entities/ObservableEntity.test.d.ts +0 -2
- package/dist/types/Entities/ObservableEntity.test.d.ts.map +0 -1
- package/dist/types/Entities/ObserverList.test.d.ts +0 -2
- package/dist/types/Entities/ObserverList.test.d.ts.map +0 -1
- package/dist/types/Entities/RangedNumber.test.d.ts +0 -2
- package/dist/types/Entities/RangedNumber.test.d.ts.map +0 -1
- package/dist/types/Utilities/LengthConverters.test.d.ts +0 -2
- package/dist/types/Utilities/LengthConverters.test.d.ts.map +0 -1
- package/dist/types/Utilities/LerpNumber.test.d.ts +0 -2
- package/dist/types/Utilities/LerpNumber.test.d.ts.map +0 -1
- package/dist/types/Utilities/addAlphaToHex.test.d.ts +0 -2
- package/dist/types/Utilities/addAlphaToHex.test.d.ts.map +0 -1
- package/dist/types/Utilities/alphaToHex.test.d.ts +0 -2
- package/dist/types/Utilities/alphaToHex.test.d.ts.map +0 -1
- package/dist/types/Utilities/degreesToRadians.test.d.ts +0 -2
- package/dist/types/Utilities/degreesToRadians.test.d.ts.map +0 -1
- package/dist/types/Utilities/easeFunctions.test.d.ts +0 -2
- package/dist/types/Utilities/easeFunctions.test.d.ts.map +0 -1
- package/dist/types/Utilities/interpolateNumber.test.d.ts +0 -2
- package/dist/types/Utilities/interpolateNumber.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Angle.test.d.ts +0 -2
- package/dist/types/ValueObjects/Angle.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Color.test.d.ts +0 -2
- package/dist/types/ValueObjects/Color.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/LineSegment2D.test.d.ts +0 -2
- package/dist/types/ValueObjects/LineSegment2D.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Matrix.test.d.ts +0 -2
- package/dist/types/ValueObjects/Matrix.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/ParametricLine.test.d.ts +0 -2
- package/dist/types/ValueObjects/ParametricLine.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/ParametricPlane.test.d.ts +0 -2
- package/dist/types/ValueObjects/ParametricPlane.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Quaternion.test.d.ts +0 -2
- package/dist/types/ValueObjects/Quaternion.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Rectangle.test.d.ts +0 -2
- package/dist/types/ValueObjects/Rectangle.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Vector2.test.d.ts +0 -2
- package/dist/types/ValueObjects/Vector2.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Vector3.test.d.ts +0 -2
- package/dist/types/ValueObjects/Vector3.test.d.ts.map +0 -1
- package/dist/types/ValueObjects/Version.test.d.ts +0 -2
- package/dist/types/ValueObjects/Version.test.d.ts.map +0 -1
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExampleEntity.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a standard (non-singleton) entity in the application.
|
|
5
|
+
* Entities store and manage data, track state changes, and notify observers when changes occur.
|
|
6
|
+
*
|
|
7
|
+
* Key concepts:
|
|
8
|
+
* - Entity classes extend AppObjectEntity
|
|
9
|
+
* - They provide access to data properties
|
|
10
|
+
* - They use Memoized types (MemoizedString, MemoizedBoolean, etc.) to track changes
|
|
11
|
+
* - They notify observers when properties change
|
|
12
|
+
*
|
|
13
|
+
* Usage pattern:
|
|
14
|
+
* 1. Get or create an entity instance using getById, get, or addIfMissing
|
|
15
|
+
* 2. Access or modify properties via getters/setters
|
|
16
|
+
* 3. Register change observers to react to property updates
|
|
17
|
+
*/
|
|
18
|
+
import { AppObject, AppObjectEntity, AppObjectRepo } from "../../AppObject";
|
|
19
|
+
/**
|
|
20
|
+
* ExampleEntity represents a basic entity with a string property.
|
|
21
|
+
* Abstract class provides the interface and static helper methods.
|
|
22
|
+
*/
|
|
23
|
+
export declare abstract class ExampleEntity extends AppObjectEntity {
|
|
24
|
+
/** Unique type identifier for this component */
|
|
25
|
+
static readonly type = "ExampleEntityType";
|
|
26
|
+
/** String property accessor methods that must be implemented */
|
|
27
|
+
abstract get aStringProperty(): string;
|
|
28
|
+
abstract set aStringProperty(val: string);
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves an ExampleEntity component from an AppObject
|
|
31
|
+
* @param appObj The AppObject to get the component from
|
|
32
|
+
* @returns The ExampleEntity component or undefined if not found
|
|
33
|
+
*/
|
|
34
|
+
static get(appObj: AppObject): ExampleEntity | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves an ExampleEntity by its parent AppObject's ID
|
|
37
|
+
* @param id The ID of the parent AppObject
|
|
38
|
+
* @param appObjects The AppObjectRepo to search in
|
|
39
|
+
* @returns The ExampleEntity component or undefined if not found
|
|
40
|
+
*/
|
|
41
|
+
static getById(id: string, appObjects: AppObjectRepo): ExampleEntity | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Ensures an ExampleEntity exists on the AppObject, creating one if needed
|
|
44
|
+
* @param appObj The AppObject to check/add the component to
|
|
45
|
+
* @returns The existing or newly created ExampleEntity
|
|
46
|
+
*/
|
|
47
|
+
static addIfMissing(appObj: AppObject): ExampleEntity;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Factory function to create a new ExampleEntity
|
|
51
|
+
* @param appObject The AppObject to attach the entity to
|
|
52
|
+
* @returns A new ExampleEntity instance
|
|
53
|
+
*/
|
|
54
|
+
export declare function makeExampleEntity(appObject: AppObject): ExampleEntity;
|
|
55
|
+
//# sourceMappingURL=ExampleEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleEntity.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/ExampleEntity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,iBAAiB,CAAC;AAGzB;;;GAGG;AACH,8BAAsB,aAAc,SAAQ,eAAe;IACzD,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,uBAAuB;IAE3C,gEAAgE;IAChE,QAAQ,KAAK,eAAe,IAAI,MAAM,CAAC;IACvC,QAAQ,KAAK,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE;IAE1C;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS;IAIxD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,aAAa,GAAG,SAAS;IAI5B;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa;CAQtD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,GACnB,aAAa,CAEf"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExampleRepo.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a repository to manage collections of entities.
|
|
5
|
+
* Repositories are responsible for creating, retrieving, and deleting entities.
|
|
6
|
+
*
|
|
7
|
+
* Key concepts:
|
|
8
|
+
* - Repositories extend AppObjectEntityRepo<T> where T is the entity type
|
|
9
|
+
* - They provide methods to create and delete entities
|
|
10
|
+
* - They manage collections of entities and provide access to them
|
|
11
|
+
* - They can use custom entity factories to create specialized entities
|
|
12
|
+
*
|
|
13
|
+
* Usage pattern:
|
|
14
|
+
* 1. Get or create a repository using getById, get, or addIfMissing
|
|
15
|
+
* 2. Use the repository to create new entities
|
|
16
|
+
* 3. Access entities through the repository's getters
|
|
17
|
+
* 4. Delete entities through the repository when they're no longer needed
|
|
18
|
+
*/
|
|
19
|
+
import { AppObject, AppObjectEntityRepo, AppObjectRepo } from "../../AppObject";
|
|
20
|
+
import { ExampleEntity } from "./ExampleEntity";
|
|
21
|
+
/** Type definition for a factory function that creates ExampleEntity instances */
|
|
22
|
+
export type ExampleEntityFactory = (id: string) => ExampleEntity;
|
|
23
|
+
/**
|
|
24
|
+
* ExampleRepo manages a collection of ExampleEntity instances.
|
|
25
|
+
* Abstract class provides the interface and static helper methods.
|
|
26
|
+
*/
|
|
27
|
+
export declare abstract class ExampleRepo extends AppObjectEntityRepo<ExampleEntity> {
|
|
28
|
+
/** Unique type identifier for this component */
|
|
29
|
+
static readonly type = "ExampleRepoType";
|
|
30
|
+
/** Factory function used to create new entities */
|
|
31
|
+
abstract exampleEntityFactory: ExampleEntityFactory;
|
|
32
|
+
/** Creates a new entity with an optional ID */
|
|
33
|
+
abstract createExampleEntity(id?: string): ExampleEntity;
|
|
34
|
+
/** Deletes an entity by its AppObject ID */
|
|
35
|
+
abstract deleteExampleEntity(id: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves an ExampleRepo component from an AppObject
|
|
38
|
+
* @param appObj The AppObject to get the component from
|
|
39
|
+
* @returns The ExampleRepo component or undefined if not found
|
|
40
|
+
*/
|
|
41
|
+
static get(appObj: AppObject): ExampleRepo | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves an ExampleRepo by its parent AppObject's ID
|
|
44
|
+
* @param id The ID of the parent AppObject
|
|
45
|
+
* @param appObjects The AppObjectRepo to search in
|
|
46
|
+
* @returns The ExampleRepo component or undefined if not found
|
|
47
|
+
*/
|
|
48
|
+
static getById(id: string, appObjects: AppObjectRepo): ExampleRepo | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Ensures an ExampleRepo exists on the AppObject, creating one if needed
|
|
51
|
+
* @param appObject The AppObject to check/add the component to
|
|
52
|
+
* @returns The existing or newly created ExampleRepo
|
|
53
|
+
*/
|
|
54
|
+
static addIfMissing(appObject: AppObject): ExampleRepo;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Factory function to create a new ExampleRepo
|
|
58
|
+
* @param appObject The AppObject to attach the repo to
|
|
59
|
+
* @returns A new ExampleRepo instance
|
|
60
|
+
*/
|
|
61
|
+
export declare function makeExampleRepo(appObject: AppObject): ExampleRepo;
|
|
62
|
+
//# sourceMappingURL=ExampleRepo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleRepo.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/ExampleRepo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAqB,MAAM,iBAAiB,CAAC;AAEnE,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,CAAC;AAEjE;;;GAGG;AACH,8BAAsB,WAAY,SAAQ,mBAAmB,CAAC,aAAa,CAAC;IAC1E,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,qBAAqB;IAEzC,mDAAmD;IACnD,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAEpD,+CAA+C;IAC/C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,aAAa;IAExD,4CAA4C;IAC5C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAE9C;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS;IAItD;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,WAAW,GAAG,SAAS;IAI1B;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW;CAQvD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAEjE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExampleSingletonEntity.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a singleton entity in the application.
|
|
5
|
+
* Singleton entities are special entities that exist only once in the application
|
|
6
|
+
* and can be accessed globally from anywhere.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - Singleton entities extend AppObjectEntity like regular entities
|
|
10
|
+
* - They register themselves as singletons with appObjects.registerSingleton()
|
|
11
|
+
* - They're accessed through a static get() method using getSingletonComponent()
|
|
12
|
+
* - There's only one instance of a singleton entity in the entire application
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern:
|
|
15
|
+
* 1. Access the singleton entity using the static get() method
|
|
16
|
+
* 2. Access or modify properties via getters/setters
|
|
17
|
+
* 3. Register change observers to react to property updates
|
|
18
|
+
*/
|
|
19
|
+
import { AppObject, AppObjectEntity, AppObjectRepo } from "../../AppObject";
|
|
20
|
+
/**
|
|
21
|
+
* SingletonEntityExample represents a global entity with a boolean property.
|
|
22
|
+
* As a singleton, only one instance exists in the application.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class SingletonEntityExample extends AppObjectEntity {
|
|
25
|
+
/** Unique type identifier for this component */
|
|
26
|
+
static readonly type = "SingletonEntityExampleType";
|
|
27
|
+
/** Boolean property accessor methods that must be implemented */
|
|
28
|
+
abstract get aBoolProperty(): boolean;
|
|
29
|
+
abstract set aBoolProperty(val: boolean);
|
|
30
|
+
/**
|
|
31
|
+
* Global accessor for the singleton entity
|
|
32
|
+
* @param appObjects The AppObjectRepo to search in
|
|
33
|
+
* @returns The singleton entity or undefined if not created yet
|
|
34
|
+
*/
|
|
35
|
+
static get: (appObjects: AppObjectRepo) => SingletonEntityExample | undefined;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Factory function to create a new SingletonEntityExample
|
|
39
|
+
* @param appObject The AppObject to attach the entity to
|
|
40
|
+
* @returns A new SingletonEntityExample instance
|
|
41
|
+
*/
|
|
42
|
+
export declare function makeSingletonEntityExample(appObject: AppObject): SingletonEntityExample;
|
|
43
|
+
//# sourceMappingURL=ExampleSingletonEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleSingletonEntity.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/ExampleSingletonEntity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,iBAAiB,CAAC;AAIzB;;;GAGG;AACH,8BAAsB,sBAAuB,SAAQ,eAAe;IAClE,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,gCAAgC;IAEpD,iEAAiE;IACjE,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC;IACtC,QAAQ,KAAK,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE;IAEzC;;;;OAIG;IACH,MAAM,CAAC,GAAG,GACR,YAAY,aAAa,KACxB,sBAAsB,GAAG,SAAS,CAC4B;CAClE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,sBAAsB,CAExB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Factory/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* setupExampleFeature.ts
|
|
3
|
+
*
|
|
4
|
+
* This file provides a setup function to initialize the ExampleFeature components.
|
|
5
|
+
* It creates a dedicated AppObject for ExampleFeature and adds all required
|
|
6
|
+
* singleton components to it.
|
|
7
|
+
*/
|
|
8
|
+
import { AppObjectRepo } from "../../AppObject";
|
|
9
|
+
import { SingletonEntityExample } from "../Entities/ExampleSingletonEntity";
|
|
10
|
+
/**
|
|
11
|
+
* Sets up the ExampleFeature by creating an AppObject and attaching required components.
|
|
12
|
+
*
|
|
13
|
+
* @param appObjects - Repository of AppObjects to use for creating the feature
|
|
14
|
+
* @returns The singleton entity instance
|
|
15
|
+
*/
|
|
16
|
+
export declare function setupExampleFeature(appObjects: AppObjectRepo): SingletonEntityExample;
|
|
17
|
+
//# sourceMappingURL=setupExampleFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupExampleFeature.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Factory/setupExampleFeature.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAA8B,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAIxG;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,GAAG,sBAAsB,CAUrF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MockEditExampleStringUC.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a mock UC for testing.
|
|
5
|
+
* Mock UCs extend the real UC classes but override their methods with test implementations.
|
|
6
|
+
* This allows tests to verify that the UC methods are called correctly without
|
|
7
|
+
* actually modifying entities or performing real operations.
|
|
8
|
+
*
|
|
9
|
+
* Key concepts:
|
|
10
|
+
* - Mock UCs extend the real UC classes
|
|
11
|
+
* - They override methods with test implementations (often empty or spy functions)
|
|
12
|
+
* - They're used in unit tests to isolate components from their dependencies
|
|
13
|
+
* - They help verify that methods are called with the correct parameters
|
|
14
|
+
*
|
|
15
|
+
* Usage pattern (in tests):
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // In a test file
|
|
18
|
+
* const mockUC = new MockEditExampleStringUC(appObject);
|
|
19
|
+
* const spy = jest.spyOn(mockUC, 'editExampleString');
|
|
20
|
+
*
|
|
21
|
+
* // Call the function that should use the UC
|
|
22
|
+
* someFunction(appObject);
|
|
23
|
+
*
|
|
24
|
+
* // Verify the UC method was called correctly
|
|
25
|
+
* expect(spy).toHaveBeenCalledWith('expected value');
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
import { AppObject } from "../../AppObject";
|
|
29
|
+
import { EditExampleStringUC } from "../UCs/EditExampleStringUC";
|
|
30
|
+
/**
|
|
31
|
+
* Mock implementation of EditExampleStringUC for testing
|
|
32
|
+
* Provides a no-op implementation of editExampleString that can be spied on in tests
|
|
33
|
+
*/
|
|
34
|
+
export declare class MockEditExampleStringUC extends EditExampleStringUC {
|
|
35
|
+
/**
|
|
36
|
+
* Mock implementation that does nothing
|
|
37
|
+
* In tests, this can be replaced with a Jest spy to track calls
|
|
38
|
+
*/
|
|
39
|
+
editExampleString: (text: string) => void;
|
|
40
|
+
constructor(appObject: AppObject);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=MockEditExampleStringUC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockEditExampleStringUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockEditExampleStringUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D;;;OAGG;IACH,iBAAiB,GAAI,MAAM,MAAM,KAAG,IAAI,CAAO;gBAEnC,SAAS,EAAE,SAAS;CAGjC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MockExamplePM.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a mock PM for testing.
|
|
5
|
+
* Mock PMs extend the real PM classes but override their methods with test implementations.
|
|
6
|
+
* This allows tests to verify PM behavior without depending on real entities.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - Mock PMs extend the real PM classes
|
|
10
|
+
* - They override methods with test implementations
|
|
11
|
+
* - They're used in unit tests to isolate components from their dependencies
|
|
12
|
+
* - They help test adapters and other components that use PMs
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern (in tests):
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // In a test file
|
|
17
|
+
* const mockPM = new MockExamplePM(appObject);
|
|
18
|
+
* const addViewSpy = jest.spyOn(mockPM, 'addView');
|
|
19
|
+
*
|
|
20
|
+
* // Test the component that uses the PM
|
|
21
|
+
* adapter.subscribe(id, appObjects, setVM);
|
|
22
|
+
*
|
|
23
|
+
* // Verify the PM method was called correctly
|
|
24
|
+
* expect(addViewSpy).toHaveBeenCalledWith(setVM);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import { AppObject } from "../../AppObject";
|
|
28
|
+
import { ExamplePM } from "../PMs/ExamplePM";
|
|
29
|
+
/**
|
|
30
|
+
* Mock implementation of ExamplePM for testing
|
|
31
|
+
* Provides simplified implementations of required methods
|
|
32
|
+
*/
|
|
33
|
+
export declare class MockExamplePM extends ExamplePM {
|
|
34
|
+
/**
|
|
35
|
+
* Simplified implementation that always returns true
|
|
36
|
+
* This avoids the need to implement real comparison logic in tests
|
|
37
|
+
*/
|
|
38
|
+
vmsAreEqual: () => boolean;
|
|
39
|
+
constructor(appObject: AppObject);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=MockExamplePM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockExamplePM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockExamplePM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,aAAc,SAAQ,SAAS;IAC1C;;;OAGG;IACH,WAAW,gBAET;gBAEU,SAAS,EAAE,SAAS;CAGjC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MockExampleSingletonPM.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a mock singleton PM for testing.
|
|
5
|
+
* Mock singleton PMs extend the real singleton PM classes and provide helper
|
|
6
|
+
* functions to create and access them in tests.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - Mock singleton PMs extend the real singleton PM classes
|
|
10
|
+
* - They override methods with test implementations
|
|
11
|
+
* - They include helper functions to create and access them in tests
|
|
12
|
+
* - They're used to test adapters and controllers that depend on singleton PMs
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern (in tests):
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // In a test file
|
|
17
|
+
* const mockPM = makeMockExampleSingletonPM(appObjects);
|
|
18
|
+
* const addViewSpy = jest.spyOn(mockPM, 'addView');
|
|
19
|
+
*
|
|
20
|
+
* // Test the component that uses the singleton PM
|
|
21
|
+
* adapter.subscribe(appObjects, setVM);
|
|
22
|
+
*
|
|
23
|
+
* // Verify the PM method was called correctly
|
|
24
|
+
* expect(addViewSpy).toHaveBeenCalledWith(setVM);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import { AppObject, AppObjectRepo } from "../../AppObject";
|
|
28
|
+
import { ExampleSingletonPM } from "../PMs/ExampleSingletonPM";
|
|
29
|
+
/**
|
|
30
|
+
* Mock implementation of ExampleSingletonPM for testing
|
|
31
|
+
* Provides simplified implementations of required methods
|
|
32
|
+
*/
|
|
33
|
+
export declare class MockExampleSingletonPM extends ExampleSingletonPM {
|
|
34
|
+
/**
|
|
35
|
+
* Simplified implementation that always returns true
|
|
36
|
+
* This avoids the need to implement real comparison logic in tests
|
|
37
|
+
*/
|
|
38
|
+
vmsAreEqual: () => boolean;
|
|
39
|
+
constructor(appObject: AppObject);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Helper function to create and register a MockExampleSingletonPM
|
|
43
|
+
* Returns the created mock for use in tests
|
|
44
|
+
*
|
|
45
|
+
* @param appObjects The AppObjectRepo to register the mock with
|
|
46
|
+
* @returns A new MockExampleSingletonPM instance
|
|
47
|
+
*/
|
|
48
|
+
export declare function makeMockExampleSingletonPM(appObjects: AppObjectRepo): MockExampleSingletonPM;
|
|
49
|
+
//# sourceMappingURL=MockExampleSingletonPM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockExampleSingletonPM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockExampleSingletonPM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D;;;OAGG;IACH,WAAW,gBAET;gBAEU,SAAS,EAAE,SAAS;CAGjC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,aAAa,0BAInE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MockToggleExampleBooleanUC.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a mock singleton UC for testing.
|
|
5
|
+
* Mock singleton UCs extend the real UC classes and provide helper functions
|
|
6
|
+
* to create and register them as singletons for tests.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - Mock singleton UCs extend the real UC classes
|
|
10
|
+
* - They override methods with test implementations
|
|
11
|
+
* - They register themselves as singletons just like the real UCs
|
|
12
|
+
* - They include helper functions to create them in tests
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern (in tests):
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // In a test file
|
|
17
|
+
* const mockUC = makeMockToggleExampleBooleanUC(appObject);
|
|
18
|
+
* const spy = jest.spyOn(mockUC, 'toggleExampleBoolean');
|
|
19
|
+
*
|
|
20
|
+
* // Call the function that should use the UC
|
|
21
|
+
* toggleExampleBoolean(appObjects);
|
|
22
|
+
*
|
|
23
|
+
* // Verify the UC method was called correctly
|
|
24
|
+
* expect(spy).toHaveBeenCalled();
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import { AppObject } from "../../AppObject";
|
|
28
|
+
import { ToggleExampleBooleanUC } from "../UCs/ToggleExampleBooleanUC";
|
|
29
|
+
/**
|
|
30
|
+
* Mock implementation of ToggleExampleBooleanUC for testing
|
|
31
|
+
* Provides a no-op implementation of toggleExampleBoolean that can be spied on in tests
|
|
32
|
+
*/
|
|
33
|
+
export declare class MockToggleExampleBooleanUC extends ToggleExampleBooleanUC {
|
|
34
|
+
/**
|
|
35
|
+
* Mock implementation that does nothing
|
|
36
|
+
* In tests, this can be replaced with a Jest spy to track calls
|
|
37
|
+
*/
|
|
38
|
+
toggleExampleBoolean: () => void;
|
|
39
|
+
constructor(appObject: AppObject);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Helper factory function to create a mock ToggleExampleBooleanUC
|
|
43
|
+
* @param appObject The AppObject to attach the UC to
|
|
44
|
+
* @returns A new MockToggleExampleBooleanUC instance
|
|
45
|
+
*/
|
|
46
|
+
export declare function makeMockToggleExampleBooleanUC(appObject: AppObject): MockToggleExampleBooleanUC;
|
|
47
|
+
//# sourceMappingURL=MockToggleExampleBooleanUC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockToggleExampleBooleanUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/MockToggleExampleBooleanUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,sBAAsB;IACpE;;;OAGG;IACH,oBAAoB,QAAO,IAAI,CAAO;gBAE1B,SAAS,EAAE,SAAS;CAKjC;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,SAAS,GACnB,0BAA0B,CAE5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/Mocks/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExamplePM.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a Presentation Manager (PM) component.
|
|
5
|
+
* PMs are responsible for transforming entity data into view models (VMs) for the UI.
|
|
6
|
+
* They observe entities for changes and update their views when data changes.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - PMs extend AppObjectPM<VM> where VM is the view model type
|
|
10
|
+
* - They observe entities and transform entity data into view models
|
|
11
|
+
* - They notify UI components (views) when view models change
|
|
12
|
+
* - Each PM instance is associated with a specific AppObject
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern:
|
|
15
|
+
* 1. Get a PM instance using getById
|
|
16
|
+
* 2. Register UI components as views using addView(callback)
|
|
17
|
+
* 3. PM will call the view callbacks with updated view models when entities change
|
|
18
|
+
* 4. Remove UI components with removeView(callback) when they're unmounted
|
|
19
|
+
*/
|
|
20
|
+
import { AppObject, AppObjectPM, AppObjectRepo } from "../../AppObject";
|
|
21
|
+
/**
|
|
22
|
+
* ExamplePM transforms ExampleEntity data into a simple string view model.
|
|
23
|
+
* Abstract class provides the interface and static helper methods.
|
|
24
|
+
*/
|
|
25
|
+
export declare abstract class ExamplePM extends AppObjectPM<string> {
|
|
26
|
+
/** Unique type identifier for this component */
|
|
27
|
+
static readonly type = "ExamplePMType";
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves an ExamplePM by its parent AppObject's ID
|
|
30
|
+
* @param id The ID of the parent AppObject
|
|
31
|
+
* @param appObjects The AppObjectRepo to search in
|
|
32
|
+
* @returns The ExamplePM component or undefined if not found
|
|
33
|
+
*/
|
|
34
|
+
static getById(id: string, appObjects: AppObjectRepo): ExamplePM | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Factory function to create a new ExamplePM
|
|
38
|
+
* @param appObject The AppObject to attach the PM to
|
|
39
|
+
* @returns A new ExamplePM instance
|
|
40
|
+
*/
|
|
41
|
+
export declare function makeExamplePM(appObject: AppObject): ExamplePM;
|
|
42
|
+
//# sourceMappingURL=ExamplePM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExamplePM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/PMs/ExamplePM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGxE;;;GAGG;AACH,8BAAsB,SAAU,SAAQ,WAAW,CAAC,MAAM,CAAC;IACzD,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,mBAAmB;IAEvC;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa;CAGrD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAE7D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExampleSingletonPM.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a Singleton Presentation Manager (PM).
|
|
5
|
+
* Singleton PMs are special PMs that exist only once in the application and can be
|
|
6
|
+
* accessed globally. They transform data from singleton entities into view models.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - Singleton PMs extend AppObjectPM<VM> like regular PMs
|
|
10
|
+
* - They register themselves as singletons with appObjects.registerSingleton()
|
|
11
|
+
* - They're accessed through a static get() method using getSingletonComponent()
|
|
12
|
+
* - They typically observe singleton entities and provide data to multiple UI components
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern:
|
|
15
|
+
* 1. Access the singleton PM using the static get() method
|
|
16
|
+
* 2. Register UI components as views using addView(callback)
|
|
17
|
+
* 3. PM will call the view callbacks with updated view models when entities change
|
|
18
|
+
* 4. Remove UI components with removeView(callback) when they're unmounted
|
|
19
|
+
*/
|
|
20
|
+
import { AppObject, AppObjectPM, AppObjectRepo } from "../../AppObject";
|
|
21
|
+
/**
|
|
22
|
+
* Interface defining the structure of the view model provided by ExampleSingletonPM
|
|
23
|
+
*/
|
|
24
|
+
export interface ExampleVM {
|
|
25
|
+
aBoolProperty: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* ExampleSingletonPM transforms SingletonEntityExample data into an ExampleVM.
|
|
29
|
+
* As a singleton, only one instance exists in the application.
|
|
30
|
+
*/
|
|
31
|
+
export declare abstract class ExampleSingletonPM extends AppObjectPM<ExampleVM> {
|
|
32
|
+
/** Unique type identifier for this component */
|
|
33
|
+
static readonly type = "ExampleSingletonPMType";
|
|
34
|
+
/**
|
|
35
|
+
* Global accessor for the singleton PM
|
|
36
|
+
* @param appObjects The AppObjectRepo to search in
|
|
37
|
+
* @returns The singleton PM or undefined if not created yet
|
|
38
|
+
*/
|
|
39
|
+
static get: (appObjects: AppObjectRepo) => ExampleSingletonPM | undefined;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Default view model used when no data is available
|
|
43
|
+
* UI components can use this initially or when the PM is not found
|
|
44
|
+
*/
|
|
45
|
+
export declare const defaultSlideNavigationVM: ExampleVM;
|
|
46
|
+
/**
|
|
47
|
+
* Factory function to create a new ExampleSingletonPM
|
|
48
|
+
* @param appObject The AppObject to attach the PM to
|
|
49
|
+
* @returns A new ExampleSingletonPM instance
|
|
50
|
+
*/
|
|
51
|
+
export declare function makeExampleSingletonPM(appObject: AppObject): ExampleSingletonPM;
|
|
52
|
+
//# sourceMappingURL=ExampleSingletonPM.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleSingletonPM.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/PMs/ExampleSingletonPM.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,SAAS,EACT,WAAW,EACX,aAAa,EACd,MAAM,iBAAiB,CAAC;AAIzB;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,8BAAsB,kBAAmB,SAAQ,WAAW,CAAC,SAAS,CAAC;IACrE,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,4BAA4B;IAEhD;;;;OAIG;IACH,MAAM,CAAC,GAAG,GAAI,YAAY,aAAa,KAAG,kBAAkB,GAAG,SAAS,CACX;CAC9D;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAEtC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,GACnB,kBAAkB,CAEpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/PMs/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EditExampleStringUC.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a Use Case (UC) component.
|
|
5
|
+
* UCs handle business logic and operations that modify entities.
|
|
6
|
+
* They encapsulate specific actions that can be performed in the application.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - UCs extend AppObjectUC and provide methods for specific operations
|
|
10
|
+
* - They implement business logic for modifying entities
|
|
11
|
+
* - They validate inputs and handle errors
|
|
12
|
+
* - Each UC instance is associated with a specific AppObject
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern:
|
|
15
|
+
* 1. Get a UC instance using getById or get
|
|
16
|
+
* 2. Call the UC's methods to perform operations
|
|
17
|
+
* 3. The UC will update entities, which will trigger PM updates and UI refreshes
|
|
18
|
+
*/
|
|
19
|
+
import { AppObject, AppObjectRepo, AppObjectUC } from "../../AppObject";
|
|
20
|
+
/**
|
|
21
|
+
* EditExampleStringUC provides functionality to update the string property of an ExampleEntity.
|
|
22
|
+
* Abstract class provides the interface and static helper methods.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class EditExampleStringUC extends AppObjectUC {
|
|
25
|
+
/** Unique type identifier for this component */
|
|
26
|
+
static readonly type = "EditExampleStringUCType";
|
|
27
|
+
/**
|
|
28
|
+
* Updates the string property of the associated ExampleEntity
|
|
29
|
+
* @param text The new string value to set
|
|
30
|
+
*/
|
|
31
|
+
abstract editExampleString(text: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* Retrieves an EditExampleStringUC component from an AppObject
|
|
34
|
+
* @param appObj The AppObject to get the component from
|
|
35
|
+
* @returns The EditExampleStringUC component or undefined if not found
|
|
36
|
+
*/
|
|
37
|
+
static get(appObj: AppObject): EditExampleStringUC | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves an EditExampleStringUC by its parent AppObject's ID
|
|
40
|
+
* @param id The ID of the parent AppObject
|
|
41
|
+
* @param appObjects The AppObjectRepo to search in
|
|
42
|
+
* @returns The EditExampleStringUC component or undefined if not found
|
|
43
|
+
*/
|
|
44
|
+
static getById(id: string, appObjects: AppObjectRepo): EditExampleStringUC | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Factory function to create a new EditExampleStringUC
|
|
48
|
+
* @param appObject The AppObject to attach the UC to
|
|
49
|
+
* @returns A new EditExampleStringUC instance
|
|
50
|
+
*/
|
|
51
|
+
export declare function makeEditSlideTextUC(appObject: AppObject): EditExampleStringUC;
|
|
52
|
+
//# sourceMappingURL=EditExampleStringUC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditExampleStringUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/UCs/EditExampleStringUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGxE;;;GAGG;AACH,8BAAsB,mBAAoB,SAAQ,WAAW;IAC3D,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,6BAA6B;IAEjD;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAE9C;;;;OAIG;IACH,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,GAAG,mBAAmB,GAAG,SAAS;IAI9D;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,aAAa,GACxB,mBAAmB,GAAG,SAAS;CAGnC;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,mBAAmB,CAE7E"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ToggleExampleBooleanUC.ts
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to implement a Singleton Use Case (UC) component.
|
|
5
|
+
* Singleton UCs are special UCs that exist only once in the application and can be
|
|
6
|
+
* accessed globally. They handle business logic and operations that modify singleton entities.
|
|
7
|
+
*
|
|
8
|
+
* Key concepts:
|
|
9
|
+
* - Singleton UCs extend AppObjectUC like regular UCs
|
|
10
|
+
* - They register themselves as singletons with appObjects.registerSingleton()
|
|
11
|
+
* - They're accessed through a static get() method using getSingletonComponent()
|
|
12
|
+
* - They typically operate on singleton entities
|
|
13
|
+
*
|
|
14
|
+
* Usage pattern:
|
|
15
|
+
* 1. Access the singleton UC using the static get() method
|
|
16
|
+
* 2. Call the UC's methods to perform operations
|
|
17
|
+
* 3. The UC will update entities, which will trigger PM updates and UI refreshes
|
|
18
|
+
*/
|
|
19
|
+
import { AppObject, AppObjectRepo, AppObjectUC } from "../../AppObject";
|
|
20
|
+
/**
|
|
21
|
+
* ToggleExampleBooleanUC provides functionality to toggle the boolean property
|
|
22
|
+
* of the SingletonEntityExample. As a singleton, only one instance exists in the application.
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class ToggleExampleBooleanUC extends AppObjectUC {
|
|
25
|
+
/** Unique type identifier for this component */
|
|
26
|
+
static readonly type = "ToggleExampleBooleanUCType";
|
|
27
|
+
/**
|
|
28
|
+
* Toggles the boolean property of the SingletonEntityExample
|
|
29
|
+
*/
|
|
30
|
+
abstract toggleExampleBoolean(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Global accessor for the singleton UC
|
|
33
|
+
* @param appObjects The AppObjectRepo to search in
|
|
34
|
+
* @returns The singleton UC or undefined if not created yet
|
|
35
|
+
*/
|
|
36
|
+
static get: (appObjects: AppObjectRepo) => ToggleExampleBooleanUC | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Factory function to create a new ToggleExampleBooleanUC
|
|
40
|
+
* @param appObject The AppObject to attach the UC to
|
|
41
|
+
* @returns A new ToggleExampleBooleanUC instance
|
|
42
|
+
*/
|
|
43
|
+
export declare function makeToggleExampleBooleanUC(appObject: AppObject): ToggleExampleBooleanUC;
|
|
44
|
+
//# sourceMappingURL=ToggleExampleBooleanUC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleExampleBooleanUC.d.ts","sourceRoot":"","sources":["../../../../src/ExampleFeature/UCs/ToggleExampleBooleanUC.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAIzB;;;GAGG;AACH,8BAAsB,sBAAuB,SAAQ,WAAW;IAC9D,gDAAgD;IAChD,MAAM,CAAC,QAAQ,CAAC,IAAI,gCAAgC;IAEpD;;OAEG;IACH,QAAQ,CAAC,oBAAoB,IAAI,IAAI;IAErC;;;;OAIG;IACH,MAAM,CAAC,GAAG,GACR,YAAY,aAAa,KACxB,sBAAsB,GAAG,SAAS,CAC4B;CAClE;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,GACnB,sBAAsB,CAExB"}
|