@monkvision/inspection-capture-web 4.5.6 → 4.6.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/README.md +134 -19
- package/lib/DamageDisclosure/DamageDisclosure.d.ts +44 -0
- package/lib/DamageDisclosure/DamageDisclosure.js +114 -0
- package/lib/DamageDisclosure/DamageDisclosure.styles.js +33 -0
- package/lib/DamageDisclosure/DamageDisclosureHOC.d.ts +27 -0
- package/lib/DamageDisclosure/DamageDisclosureHOC.js +45 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.d.ts +73 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.js +49 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.js +24 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.d.ts +52 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.js +22 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.d.ts +1 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.js +5 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/index.d.ts +2 -0
- package/lib/DamageDisclosure/DamageDisclosureHUD/index.js +20 -0
- package/lib/DamageDisclosure/hooks/index.d.ts +1 -0
- package/lib/DamageDisclosure/hooks/index.js +17 -0
- package/lib/DamageDisclosure/hooks/useDamageDisclosureState.d.ts +30 -0
- package/lib/DamageDisclosure/hooks/useDamageDisclosureState.js +55 -0
- package/lib/DamageDisclosure/index.d.ts +3 -0
- package/lib/DamageDisclosure/index.js +20 -0
- package/lib/PhotoCapture/PhotoCapture.d.ts +7 -5
- package/lib/PhotoCapture/PhotoCapture.js +27 -21
- package/lib/PhotoCapture/PhotoCapture.styles.js +0 -24
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.d.ts +24 -7
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.js +4 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.d.ts +21 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.js +10 -8
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.d.ts +3 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.js +5 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.d.ts +1 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.js +4 -3
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.d.ts +3 -3
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.js +5 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.styles.js +2 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSlider.styles.js +2 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/hooks.d.ts +2 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.d.ts +3 -3
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.js +4 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.styles.js +3 -3
- package/lib/PhotoCapture/PhotoCaptureHUD/hooks/index.d.ts +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/hooks/index.js +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/index.d.ts +0 -6
- package/lib/PhotoCapture/PhotoCaptureHUD/index.js +0 -6
- package/lib/PhotoCapture/hooks/index.d.ts +0 -8
- package/lib/PhotoCapture/hooks/index.js +0 -8
- package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.d.ts +3 -0
- package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.js +1 -1
- package/lib/PhotoCapture/hooks/usePhotoCaptureTutorial.d.ts +2 -2
- package/lib/VideoCapture/VideoCapture.d.ts +28 -0
- package/lib/VideoCapture/VideoCapture.js +81 -0
- package/lib/VideoCapture/VideoCapture.styles.js +9 -0
- package/lib/VideoCapture/VideoCaptureHOC.d.ts +27 -0
- package/lib/VideoCapture/VideoCaptureHOC.js +45 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.d.ts +44 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.js +158 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.js +14 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.d.ts +6 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.js +38 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.types.d.ts +33 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.types.js +2 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.d.ts +4873 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.js +105 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.d.ts +2 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.js +5 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.d.ts +14 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.js +30 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.d.ts +1 -0
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.js +5 -0
- package/lib/VideoCapture/VideoCaptureHUD/index.d.ts +1 -0
- package/lib/VideoCapture/VideoCaptureHUD/index.js +5 -0
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.d.ts +23 -0
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.js +26 -0
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.d.ts +12 -0
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.js +72 -0
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.d.ts +1 -0
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.js +5 -0
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.d.ts +7 -0
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.js +32 -0
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.d.ts +12 -0
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.js +87 -0
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.d.ts +22 -0
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.js +2 -0
- package/lib/VideoCapture/VideoCapturePageLayout/index.d.ts +3 -0
- package/lib/VideoCapture/VideoCapturePageLayout/index.js +7 -0
- package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.d.ts +19 -0
- package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.js +107 -0
- package/lib/VideoCapture/VideoCapturePermissions/index.d.ts +1 -0
- package/lib/VideoCapture/VideoCapturePermissions/index.js +5 -0
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.d.ts +7 -0
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.js +44 -0
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.d.ts +2437 -0
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.js +60 -0
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.types.d.ts +34 -0
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.types.js +2 -0
- package/lib/VideoCapture/VideoCaptureProcessing/index.d.ts +2 -0
- package/lib/VideoCapture/VideoCaptureProcessing/index.js +5 -0
- package/lib/VideoCapture/hooks/index.d.ts +5 -0
- package/lib/VideoCapture/hooks/index.js +21 -0
- package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.d.ts +18 -0
- package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.js +45 -0
- package/lib/VideoCapture/hooks/useFastMovementsDetection/index.d.ts +2 -0
- package/lib/VideoCapture/hooks/useFastMovementsDetection/index.js +20 -0
- package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.d.ts +34 -0
- package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.js +64 -0
- package/lib/VideoCapture/hooks/useFrameSelection/index.d.ts +1 -0
- package/lib/VideoCapture/hooks/useFrameSelection/index.js +17 -0
- package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.d.ts +16 -0
- package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.js +62 -0
- package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.d.ts +43 -0
- package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.js +50 -0
- package/lib/VideoCapture/hooks/useVehicleWalkaround.d.ts +26 -0
- package/lib/VideoCapture/hooks/useVehicleWalkaround.js +39 -0
- package/lib/VideoCapture/hooks/useVideoRecording.d.ts +97 -0
- package/lib/VideoCapture/hooks/useVideoRecording.js +140 -0
- package/lib/VideoCapture/hooks/useVideoUploadQueue.d.ts +40 -0
- package/lib/VideoCapture/hooks/useVideoUploadQueue.js +51 -0
- package/lib/VideoCapture/index.d.ts +2 -0
- package/lib/VideoCapture/index.js +5 -0
- package/lib/assets/logos.asset.d.ts +1 -0
- package/lib/assets/logos.asset.js +4 -0
- package/lib/components/CancelButton/CancelButton.d.ts +14 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/PhotoCaptureHUDCancelButton.js → components/CancelButton/CancelButton.js} +6 -6
- package/lib/components/CancelButton/index.d.ts +1 -0
- package/lib/components/CancelButton/index.js +5 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.d.ts → components/CloseUpShot/CloseUpShot.d.ts} +10 -4
- package/lib/components/CloseUpShot/CloseUpShot.js +34 -0
- package/lib/components/CloseUpShot/CloseUpShot.styles.d.ts +2 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.styles.js → components/CloseUpShot/CloseUpShot.styles.js} +4 -3
- package/lib/components/CloseUpShot/hooks.d.ts +7 -0
- package/lib/components/CloseUpShot/hooks.js +25 -0
- package/lib/components/CloseUpShot/index.d.ts +1 -0
- package/lib/components/CloseUpShot/index.js +5 -0
- package/lib/components/Counter/Counter.d.ts +6 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.js → components/Counter/Counter.js} +9 -9
- package/lib/components/Counter/Counter.styles.d.ts +2 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.d.ts +6 -6
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.js +6 -6
- package/lib/components/Counter/index.d.ts +2 -0
- package/lib/components/Counter/index.js +5 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.d.ts → components/HUDButtons/HUDButtons.d.ts} +4 -4
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.js → components/HUDButtons/HUDButtons.js} +5 -5
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons → components/HUDButtons}/hooks.d.ts +3 -3
- package/lib/components/HUDButtons/hooks.js +44 -0
- package/lib/components/HUDButtons/index.d.ts +1 -0
- package/lib/components/HUDButtons/index.js +5 -0
- package/lib/components/HUDOverlay/HUDOverlay.d.ts +7 -0
- package/lib/components/HUDOverlay/HUDOverlay.js +36 -0
- package/lib/components/HUDOverlay/HUDOverlay.styles.d.ts +2 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay → components/HUDOverlay}/hooks.d.ts +4 -4
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay → components/HUDOverlay}/hooks.js +3 -3
- package/lib/components/HUDOverlay/index.d.ts +2 -0
- package/lib/components/HUDOverlay/index.js +5 -0
- package/lib/components/OrientationEnforcer/OrientationEnforcer.d.ts +16 -0
- package/lib/components/OrientationEnforcer/OrientationEnforcer.js +34 -0
- package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.d.ts +815 -0
- package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.js +49 -0
- package/lib/components/OrientationEnforcer/index.d.ts +1 -0
- package/lib/components/OrientationEnforcer/index.js +5 -0
- package/lib/components/PartSelection/PartSelection.d.ts +40 -0
- package/lib/components/PartSelection/PartSelection.js +39 -0
- package/lib/components/PartSelection/PartSelection.styles.d.ts +2 -0
- package/lib/components/PartSelection/PartSelection.styles.js +54 -0
- package/lib/components/PartSelection/index.d.ts +2 -0
- package/lib/components/PartSelection/index.js +5 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.d.ts → components/ZoomOutShot/ZoomOutShot.d.ts} +3 -3
- package/lib/components/ZoomOutShot/ZoomOutShot.js +38 -0
- package/lib/components/ZoomOutShot/ZoomOutShot.styles.d.ts +2 -0
- package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.styles.js → components/ZoomOutShot/ZoomOutShot.styles.js} +3 -3
- package/lib/components/ZoomOutShot/hooks.d.ts +6 -0
- package/lib/components/ZoomOutShot/hooks.js +24 -0
- package/lib/components/ZoomOutShot/index.d.ts +1 -0
- package/lib/components/ZoomOutShot/index.js +5 -0
- package/lib/components/index.d.ts +8 -0
- package/lib/components/index.js +24 -0
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +7 -0
- package/lib/hooks/index.d.ts +10 -0
- package/lib/hooks/index.js +26 -0
- package/lib/{PhotoCapture/hooks → hooks}/useAdaptiveCameraConfig.d.ts +2 -2
- package/lib/hooks/useAddDamageMode.d.ts +56 -0
- package/lib/hooks/useAddDamageMode.js +76 -0
- package/lib/{PhotoCapture/hooks → hooks}/useBadConnectionWarning.d.ts +2 -2
- package/lib/hooks/useColorBackground.d.ts +4 -0
- package/lib/hooks/useColorBackground.js +15 -0
- package/lib/hooks/useEnforceOrientation.d.ts +6 -0
- package/lib/hooks/useEnforceOrientation.js +14 -0
- package/lib/{PhotoCapture/hooks → hooks}/usePhotoCaptureImages.js +1 -1
- package/lib/{PhotoCapture/hooks → hooks}/usePictureTaken.d.ts +4 -4
- package/lib/hooks/usePictureTaken.js +58 -0
- package/lib/{PhotoCapture/hooks → hooks}/useStartTasksOnComplete.d.ts +6 -6
- package/lib/{PhotoCapture/hooks → hooks}/useStartTasksOnComplete.js +3 -1
- package/lib/{PhotoCapture/hooks → hooks}/useUploadQueue.d.ts +24 -7
- package/lib/{PhotoCapture/hooks → hooks}/useUploadQueue.js +14 -4
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/lib/translations/de.json +64 -5
- package/lib/translations/en.json +64 -5
- package/lib/translations/fr.json +64 -5
- package/lib/translations/nl.json +64 -5
- package/lib/types.d.ts +102 -0
- package/lib/types.js +43 -0
- package/package.json +15 -15
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/hooks.js +0 -44
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/index.d.ts +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/index.js +0 -5
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/PhotoCaptureHUDCancelButton.d.ts +0 -14
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/index.d.ts +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/index.js +0 -5
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.d.ts +0 -6
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/index.d.ts +0 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/index.js +0 -5
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.js +0 -38
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/hooks.d.ts +0 -6
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/hooks.js +0 -24
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/index.d.ts +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/index.js +0 -5
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.js +0 -40
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/hooks.d.ts +0 -7
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/hooks.js +0 -25
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/index.d.ts +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/index.js +0 -5
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.d.ts +0 -7
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.js +0 -36
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/index.d.ts +0 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/index.js +0 -5
- package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDButtonBackground.d.ts +0 -4
- package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDButtonBackground.js +0 -13
- package/lib/PhotoCapture/hooks/useAddDamageMode.d.ts +0 -42
- package/lib/PhotoCapture/hooks/useAddDamageMode.js +0 -57
- package/lib/PhotoCapture/hooks/usePictureTaken.js +0 -46
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.styles.d.ts → DamageDisclosure/DamageDisclosure.styles.d.ts} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.styles.d.ts → DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.d.ts} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.styles.d.ts → VideoCapture/VideoCapture.styles.d.ts} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.styles.d.ts → VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.d.ts} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.styles.js → components/Counter/Counter.styles.js} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles.d.ts → components/HUDButtons/HUDButtons.styles.d.ts} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles.js → components/HUDButtons/HUDButtons.styles.js} +0 -0
- /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.styles.js → components/HUDOverlay/HUDOverlay.styles.js} +0 -0
- /package/lib/{PhotoCapture/hooks → hooks}/useAdaptiveCameraConfig.js +0 -0
- /package/lib/{PhotoCapture/hooks → hooks}/useBadConnectionWarning.js +0 -0
- /package/lib/{PhotoCapture/hooks → hooks}/usePhotoCaptureImages.d.ts +0 -0
- /package/lib/{PhotoCapture/hooks → hooks}/useTracking.d.ts +0 -0
- /package/lib/{PhotoCapture/hooks → hooks}/useTracking.js +0 -0
package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { PhotoCaptureAppConfig, Image, PixelDimensions, Sight, VehiclePart, VehicleType } from '@monkvision/types';
|
|
3
|
+
import { TutorialSteps } from '../../hooks';
|
|
4
|
+
import { CaptureMode } from '../../../types';
|
|
4
5
|
/**
|
|
5
6
|
* Props of the PhotoCaptureHUDElements component.
|
|
6
7
|
*/
|
|
7
|
-
export interface PhotoCaptureHUDElementsProps extends Pick<
|
|
8
|
+
export interface PhotoCaptureHUDElementsProps extends Pick<PhotoCaptureAppConfig, 'enableSightGuidelines' | 'sightGuidelines' | 'addDamage'> {
|
|
8
9
|
/**
|
|
9
10
|
* The currently selected sight in the PhotoCapture component : the sight that the user needs to capture.
|
|
10
11
|
*/
|
|
@@ -20,15 +21,23 @@ export interface PhotoCaptureHUDElementsProps extends Pick<CaptureAppConfig, 'en
|
|
|
20
21
|
/**
|
|
21
22
|
* The current mode of the component.
|
|
22
23
|
*/
|
|
23
|
-
mode:
|
|
24
|
+
mode: CaptureMode;
|
|
24
25
|
/**
|
|
25
26
|
* The current tutorial step in PhotoCapture component.
|
|
26
27
|
*/
|
|
27
28
|
tutorialStep: TutorialSteps | null;
|
|
29
|
+
/**
|
|
30
|
+
* Current vehicle parts selected to take a picture of.
|
|
31
|
+
*/
|
|
32
|
+
vehicleParts: VehiclePart[];
|
|
28
33
|
/**
|
|
29
34
|
* Callback called when the user presses the Add Damage button.
|
|
30
35
|
*/
|
|
31
36
|
onAddDamage: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Callback called when the user selects the parts to take a picture of.
|
|
39
|
+
*/
|
|
40
|
+
onAddDamagePartsSelected?: (parts: VehiclePart[]) => void;
|
|
32
41
|
/**
|
|
33
42
|
* Callback called when the user cancels the Add Damage mode.
|
|
34
43
|
*/
|
|
@@ -41,6 +50,10 @@ export interface PhotoCaptureHUDElementsProps extends Pick<CaptureAppConfig, 'en
|
|
|
41
50
|
* Callback called when the user manually selects a sight to retake.
|
|
42
51
|
*/
|
|
43
52
|
onRetakeSight: (sight: string) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Callback called when the user clicks on the "Validate" button of the Add Damage mode.
|
|
55
|
+
*/
|
|
56
|
+
onValidateVehicleParts: () => void;
|
|
44
57
|
/**
|
|
45
58
|
* The effective pixel dimensions of the Camera video stream on the screen.
|
|
46
59
|
*/
|
|
@@ -57,6 +70,10 @@ export interface PhotoCaptureHUDElementsProps extends Pick<CaptureAppConfig, 'en
|
|
|
57
70
|
* The current images taken by the user (ignoring retaken pictures etc.).
|
|
58
71
|
*/
|
|
59
72
|
images: Image[];
|
|
73
|
+
/**
|
|
74
|
+
* The vehicle type of the inspection.
|
|
75
|
+
*/
|
|
76
|
+
vehicleType: VehicleType;
|
|
60
77
|
}
|
|
61
78
|
/**
|
|
62
79
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process.
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PhotoCaptureHUDElements = void 0;
|
|
4
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var hooks_1 = require("../../hooks");
|
|
6
5
|
var PhotoCaptureHUDElementsSight_1 = require("../PhotoCaptureHUDElementsSight");
|
|
7
|
-
var
|
|
8
|
-
var
|
|
6
|
+
var components_1 = require("../../../components");
|
|
7
|
+
var types_1 = require("../../../types");
|
|
9
8
|
/**
|
|
10
9
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process.
|
|
11
10
|
*/
|
|
@@ -13,12 +12,15 @@ function PhotoCaptureHUDElements(params) {
|
|
|
13
12
|
if (params.isLoading || !!params.error) {
|
|
14
13
|
return null;
|
|
15
14
|
}
|
|
16
|
-
if (params.mode ===
|
|
17
|
-
return ((0, jsx_runtime_1.jsx)(PhotoCaptureHUDElementsSight_1.PhotoCaptureHUDElementsSight, { sights: params.sights, selectedSight: params.selectedSight, onSelectedSight: params.onSelectSight, onRetakeSight: params.onRetakeSight, sightsTaken: params.sightsTaken, onAddDamage: params.onAddDamage, previewDimensions: params.previewDimensions, images: params.images,
|
|
15
|
+
if (params.mode === types_1.CaptureMode.SIGHT) {
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(PhotoCaptureHUDElementsSight_1.PhotoCaptureHUDElementsSight, { sights: params.sights, selectedSight: params.selectedSight, onSelectedSight: params.onSelectSight, onRetakeSight: params.onRetakeSight, sightsTaken: params.sightsTaken, onAddDamage: params.onAddDamage, previewDimensions: params.previewDimensions, images: params.images, addDamage: params.addDamage, sightGuidelines: params.sightGuidelines, enableSightGuidelines: params.enableSightGuidelines, tutorialStep: params.tutorialStep }));
|
|
18
17
|
}
|
|
19
|
-
if (params.mode ===
|
|
20
|
-
return (0, jsx_runtime_1.jsx)(
|
|
18
|
+
if (params.mode === types_1.CaptureMode.ADD_DAMAGE_1ST_SHOT) {
|
|
19
|
+
return (0, jsx_runtime_1.jsx)(components_1.ZoomOutShot, { onCancel: params.onCancelAddDamage });
|
|
21
20
|
}
|
|
22
|
-
|
|
21
|
+
if ([types_1.CaptureMode.ADD_DAMAGE_2ND_SHOT, types_1.CaptureMode.ADD_DAMAGE_PART_SELECT_SHOT].includes(params.mode)) {
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(components_1.CloseUpShot, { onCancel: params.onCancelAddDamage, streamDimensions: params.previewDimensions, showCounter: params.mode === types_1.CaptureMode.ADD_DAMAGE_2ND_SHOT }));
|
|
23
|
+
}
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(components_1.PartSelection, { onCancel: params.onCancelAddDamage, vehicleParts: params.vehicleParts, vehicleType: params.vehicleType, onValidateVehicleParts: params.onValidateVehicleParts, onAddDamagePartsSelected: params.onAddDamagePartsSelected }));
|
|
23
25
|
}
|
|
24
26
|
exports.PhotoCaptureHUDElements = PhotoCaptureHUDElements;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { AddDamage } from '@monkvision/types';
|
|
2
3
|
/**
|
|
3
4
|
* Props of the AddDamageButton component.
|
|
4
5
|
*/
|
|
@@ -9,12 +10,10 @@ export interface AddDamageButtonProps {
|
|
|
9
10
|
onAddDamage?: () => void;
|
|
10
11
|
/**
|
|
11
12
|
* Boolean indicating whether the Add Damage feature is enabled. If disabled, the `Add Damage` button will be hidden.
|
|
12
|
-
*
|
|
13
|
-
* @default true
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
addDamage?: AddDamage;
|
|
16
15
|
}
|
|
17
16
|
/**
|
|
18
17
|
* Custom button displayed in the PhotoCapture Camera HUD that allows user to enter add damage mode.
|
|
19
18
|
*/
|
|
20
|
-
export declare function AddDamageButton({ onAddDamage,
|
|
19
|
+
export declare function AddDamageButton({ onAddDamage, addDamage }: AddDamageButtonProps): JSX.Element | null;
|
|
@@ -15,14 +15,15 @@ exports.AddDamageButton = void 0;
|
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var common_ui_web_1 = require("@monkvision/common-ui-web");
|
|
17
17
|
var react_i18next_1 = require("react-i18next");
|
|
18
|
-
var
|
|
18
|
+
var types_1 = require("@monkvision/types");
|
|
19
|
+
var hooks_1 = require("../../../../hooks");
|
|
19
20
|
/**
|
|
20
21
|
* Custom button displayed in the PhotoCapture Camera HUD that allows user to enter add damage mode.
|
|
21
22
|
*/
|
|
22
23
|
function AddDamageButton(_a) {
|
|
23
|
-
var onAddDamage = _a.onAddDamage,
|
|
24
|
+
var onAddDamage = _a.onAddDamage, addDamage = _a.addDamage;
|
|
24
25
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
25
|
-
var primaryColor = (0, hooks_1.
|
|
26
|
-
return
|
|
26
|
+
var primaryColor = (0, hooks_1.useColorBackground)();
|
|
27
|
+
return [types_1.AddDamage.TWO_SHOT, types_1.AddDamage.PART_SELECT].includes(addDamage) ? ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({ icon: 'add', onClick: onAddDamage, "data-testid": 'monk-test-btn', primaryColor: primaryColor }, { children: t('photo.hud.sight.addDamageBtn') }))) : null;
|
|
27
28
|
}
|
|
28
29
|
exports.AddDamageButton = AddDamageButton;
|
|
@@ -4,4 +4,4 @@ import { PhotoCaptureHUDElementsSightProps } from './hooks';
|
|
|
4
4
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
|
|
5
5
|
* mode is SIGHT.
|
|
6
6
|
*/
|
|
7
|
-
export declare function PhotoCaptureHUDElementsSight({ sights, selectedSight, onSelectedSight, onRetakeSight, onAddDamage, sightsTaken, previewDimensions, images,
|
|
7
|
+
export declare function PhotoCaptureHUDElementsSight({ sights, selectedSight, onSelectedSight, onRetakeSight, onAddDamage, sightsTaken, previewDimensions, images, addDamage, sightGuidelines, enableSightGuidelines, tutorialStep, }: PhotoCaptureHUDElementsSightProps): JSX.Element;
|
|
@@ -18,17 +18,18 @@ var SightSlider_1 = require("./SightSlider");
|
|
|
18
18
|
var PhotoCaptureHUDElementsSight_styles_1 = require("./PhotoCaptureHUDElementsSight.styles");
|
|
19
19
|
var AddDamageButton_1 = require("./AddDamageButton");
|
|
20
20
|
var hooks_1 = require("./hooks");
|
|
21
|
-
var PhotoCaptureHUDCounter_1 = require("../PhotoCaptureHUDCounter");
|
|
22
21
|
var hooks_2 = require("../../hooks");
|
|
23
22
|
var SightGuideline_1 = require("./SightGuideline");
|
|
23
|
+
var components_1 = require("../../../components");
|
|
24
|
+
var types_1 = require("../../../types");
|
|
24
25
|
/**
|
|
25
26
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
|
|
26
27
|
* mode is SIGHT.
|
|
27
28
|
*/
|
|
28
29
|
function PhotoCaptureHUDElementsSight(_a) {
|
|
29
|
-
var sights = _a.sights, selectedSight = _a.selectedSight, _b = _a.onSelectedSight, onSelectedSight = _b === void 0 ? function () { } : _b, _c = _a.onRetakeSight, onRetakeSight = _c === void 0 ? function () { } : _c, _d = _a.onAddDamage, onAddDamage = _d === void 0 ? function () { } : _d, sightsTaken = _a.sightsTaken, previewDimensions = _a.previewDimensions, images = _a.images,
|
|
30
|
+
var sights = _a.sights, selectedSight = _a.selectedSight, _b = _a.onSelectedSight, onSelectedSight = _b === void 0 ? function () { } : _b, _c = _a.onRetakeSight, onRetakeSight = _c === void 0 ? function () { } : _c, _d = _a.onAddDamage, onAddDamage = _d === void 0 ? function () { } : _d, sightsTaken = _a.sightsTaken, previewDimensions = _a.previewDimensions, images = _a.images, addDamage = _a.addDamage, sightGuidelines = _a.sightGuidelines, enableSightGuidelines = _a.enableSightGuidelines, tutorialStep = _a.tutorialStep;
|
|
30
31
|
var style = (0, hooks_1.usePhotoCaptureHUDSightPreviewStyle)({ previewDimensions: previewDimensions });
|
|
31
32
|
var showSight = previewDimensions && (!tutorialStep || tutorialStep === hooks_2.TutorialSteps.SIGHT);
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDElementsSight_styles_1.styles['container'] }, { children: [showSight && (0, jsx_runtime_1.jsx)(common_ui_web_1.SightOverlay, { style: style.overlay, sight: selectedSight }), !tutorialStep && ((0, jsx_runtime_1.jsxs)("div", __assign({ style: style.elementsContainer }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: style.top }, { children: [(0, jsx_runtime_1.jsx)(SightGuideline_1.SightGuideline, { sightId: selectedSight.id, sightGuidelines: sightGuidelines, enableSightGuidelines: enableSightGuidelines,
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDElementsSight_styles_1.styles['container'] }, { children: [showSight && (0, jsx_runtime_1.jsx)(common_ui_web_1.SightOverlay, { style: style.overlay, sight: selectedSight }), !tutorialStep && ((0, jsx_runtime_1.jsxs)("div", __assign({ style: style.elementsContainer }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: style.top }, { children: [(0, jsx_runtime_1.jsx)(SightGuideline_1.SightGuideline, { sightId: selectedSight.id, sightGuidelines: sightGuidelines, enableSightGuidelines: enableSightGuidelines, addDamage: addDamage }), (0, jsx_runtime_1.jsx)(AddDamageButton_1.AddDamageButton, { onAddDamage: onAddDamage, addDamage: addDamage })] })), (0, jsx_runtime_1.jsxs)("div", __assign({ style: style.bottom }, { children: [(0, jsx_runtime_1.jsx)(components_1.Counter, { mode: types_1.CaptureMode.SIGHT, totalSights: sights.length, sightsTaken: sightsTaken.length }), (0, jsx_runtime_1.jsx)(SightSlider_1.SightSlider, { sights: sights, selectedSight: selectedSight, sightsTaken: sightsTaken, onSelectedSight: onSelectedSight, onRetakeSight: onRetakeSight, images: images })] }))] })))] })));
|
|
33
34
|
}
|
|
34
35
|
exports.PhotoCaptureHUDElementsSight = PhotoCaptureHUDElementsSight;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { PhotoCaptureAppConfig } from '@monkvision/types';
|
|
3
3
|
/**
|
|
4
4
|
* Props of the SightGuideline component.
|
|
5
5
|
*/
|
|
6
|
-
export interface SightGuidelineProps extends Pick<
|
|
6
|
+
export interface SightGuidelineProps extends Pick<PhotoCaptureAppConfig, 'addDamage' | 'sightGuidelines' | 'enableSightGuidelines'> {
|
|
7
7
|
/**
|
|
8
8
|
* The id of the sight.
|
|
9
9
|
*/
|
|
@@ -18,4 +18,4 @@ export interface SightGuidelineProps extends Pick<CaptureAppConfig, 'enableAddDa
|
|
|
18
18
|
/**
|
|
19
19
|
* Custom button displaying the sight guideline.
|
|
20
20
|
*/
|
|
21
|
-
export declare function SightGuideline({ sightId, sightGuidelines, enableSightGuidelines,
|
|
21
|
+
export declare function SightGuideline({ sightId, sightGuidelines, enableSightGuidelines, addDamage, enableDefaultMessage, }: SightGuidelineProps): JSX.Element;
|
|
@@ -15,19 +15,20 @@ exports.SightGuideline = void 0;
|
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var react_1 = require("react");
|
|
17
17
|
var common_ui_web_1 = require("@monkvision/common-ui-web");
|
|
18
|
+
var types_1 = require("@monkvision/types");
|
|
18
19
|
var react_i18next_1 = require("react-i18next");
|
|
19
20
|
var common_1 = require("@monkvision/common");
|
|
20
|
-
var hooks_1 = require("../../hooks");
|
|
21
21
|
var SightGuideline_styles_1 = require("./SightGuideline.styles");
|
|
22
|
+
var hooks_1 = require("../../../../hooks");
|
|
22
23
|
/**
|
|
23
24
|
* Custom button displaying the sight guideline.
|
|
24
25
|
*/
|
|
25
26
|
function SightGuideline(_a) {
|
|
26
|
-
var sightId = _a.sightId, sightGuidelines = _a.sightGuidelines, enableSightGuidelines = _a.enableSightGuidelines,
|
|
27
|
+
var sightId = _a.sightId, sightGuidelines = _a.sightGuidelines, enableSightGuidelines = _a.enableSightGuidelines, addDamage = _a.addDamage, _b = _a.enableDefaultMessage, enableDefaultMessage = _b === void 0 ? false : _b;
|
|
27
28
|
var _c = (0, react_1.useState)(true), showGuideline = _c[0], setShowGuideline = _c[1];
|
|
28
|
-
var primaryColor = (0, hooks_1.
|
|
29
|
+
var primaryColor = (0, hooks_1.useColorBackground)();
|
|
29
30
|
var _d = (0, react_i18next_1.useTranslation)(), i18n = _d.i18n, t = _d.t;
|
|
30
|
-
var style =
|
|
31
|
+
var style = addDamage === types_1.AddDamage.DISABLED ? SightGuideline_styles_1.styles['containerWide'] : SightGuideline_styles_1.styles['container'];
|
|
31
32
|
var guidelineFound = sightGuidelines === null || sightGuidelines === void 0 ? void 0 : sightGuidelines.find(function (value) { return value.sightIds.includes(sightId); });
|
|
32
33
|
var defaultMessage = enableDefaultMessage
|
|
33
34
|
? t('photo.hud.guidelines.defaultGuideline')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.styles = void 0;
|
|
4
|
-
var
|
|
4
|
+
var HUDButtons_styles_1 = require("../../../../components/HUDButtons/HUDButtons.styles");
|
|
5
5
|
exports.styles = {
|
|
6
6
|
container: {
|
|
7
7
|
display: 'flex',
|
|
@@ -12,7 +12,7 @@ exports.styles = {
|
|
|
12
12
|
position: 'fixed',
|
|
13
13
|
left: '50%',
|
|
14
14
|
transform: 'translate(-50%, 0)',
|
|
15
|
-
width: "calc(98% - (".concat(
|
|
15
|
+
width: "calc(98% - (".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 4, "px))"),
|
|
16
16
|
justifyContent: 'center',
|
|
17
17
|
},
|
|
18
18
|
button: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.styles = void 0;
|
|
4
|
-
var
|
|
4
|
+
var HUDButtons_styles_1 = require("../../../../components/HUDButtons/HUDButtons.styles");
|
|
5
5
|
exports.styles = {
|
|
6
6
|
container: {
|
|
7
7
|
display: 'flex',
|
|
@@ -18,7 +18,7 @@ exports.styles = {
|
|
|
18
18
|
},
|
|
19
19
|
containerPortrait: {
|
|
20
20
|
__media: { portrait: true },
|
|
21
|
-
bottom: "".concat(
|
|
21
|
+
bottom: "".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 1.5, "px"),
|
|
22
22
|
right: 0,
|
|
23
23
|
paddingRight: '45%',
|
|
24
24
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PhotoCaptureAppConfig, Image, PixelDimensions, Sight } from '@monkvision/types';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
3
|
import { TutorialSteps } from '../../hooks';
|
|
4
4
|
/**
|
|
5
5
|
* Props of the PhotoCaptureHUDElementsSight component.
|
|
6
6
|
*/
|
|
7
|
-
export interface PhotoCaptureHUDElementsSightProps extends Pick<
|
|
7
|
+
export interface PhotoCaptureHUDElementsSightProps extends Pick<PhotoCaptureAppConfig, 'enableSightGuidelines' | 'sightGuidelines' | 'addDamage'> {
|
|
8
8
|
/**
|
|
9
9
|
* The list of sights provided to the PhotoCapture component.
|
|
10
10
|
*/
|
package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { PhotoCaptureAppConfig } from '@monkvision/types';
|
|
3
3
|
import { TutorialSteps } from '../../hooks';
|
|
4
4
|
/**
|
|
5
5
|
* Props of the PhotoCaptureHUDTutorial component.
|
|
6
6
|
*/
|
|
7
|
-
export interface PhotoCaptureHUDTutorialProps extends Pick<
|
|
7
|
+
export interface PhotoCaptureHUDTutorialProps extends Pick<PhotoCaptureAppConfig, 'allowSkipTutorial' | 'sightGuidelines' | 'addDamage'> {
|
|
8
8
|
/**
|
|
9
9
|
* The id of the sight.
|
|
10
10
|
*/
|
|
@@ -25,4 +25,4 @@ export interface PhotoCaptureHUDTutorialProps extends Pick<CaptureAppConfig, 'al
|
|
|
25
25
|
/**
|
|
26
26
|
* Component that displays an tutorial overlay on top of the PhotoCapture component.
|
|
27
27
|
*/
|
|
28
|
-
export declare function PhotoCaptureHUDTutorial({ currentTutorialStep, allowSkipTutorial, sightGuidelines, sightId, onNextTutorialStep, onCloseTutorial, }: PhotoCaptureHUDTutorialProps): JSX.Element | null;
|
|
28
|
+
export declare function PhotoCaptureHUDTutorial({ currentTutorialStep, allowSkipTutorial, sightGuidelines, sightId, onNextTutorialStep, onCloseTutorial, addDamage, }: PhotoCaptureHUDTutorialProps): JSX.Element | null;
|
|
@@ -17,10 +17,10 @@ var react_i18next_1 = require("react-i18next");
|
|
|
17
17
|
var common_ui_web_1 = require("@monkvision/common-ui-web");
|
|
18
18
|
var PhotoCaptureHUDTutorial_styles_1 = require("./PhotoCaptureHUDTutorial.styles");
|
|
19
19
|
var hooks_1 = require("../../hooks");
|
|
20
|
-
var hooks_2 = require("../hooks");
|
|
21
20
|
var PhotoCaptureHUDElementsSight_1 = require("../PhotoCaptureHUDElementsSight");
|
|
22
21
|
var ArrowIcon_1 = require("./ArrowIcon");
|
|
23
22
|
var DisplayText_1 = require("./DisplayText");
|
|
23
|
+
var hooks_2 = require("../../../hooks");
|
|
24
24
|
function getButtonStyle(enableAddDamage) {
|
|
25
25
|
return { visibility: enableAddDamage ? 'visible' : 'hidden' };
|
|
26
26
|
}
|
|
@@ -28,9 +28,9 @@ function getButtonStyle(enableAddDamage) {
|
|
|
28
28
|
* Component that displays an tutorial overlay on top of the PhotoCapture component.
|
|
29
29
|
*/
|
|
30
30
|
function PhotoCaptureHUDTutorial(_a) {
|
|
31
|
-
var currentTutorialStep = _a.currentTutorialStep, allowSkipTutorial = _a.allowSkipTutorial, sightGuidelines = _a.sightGuidelines, sightId = _a.sightId, onNextTutorialStep = _a.onNextTutorialStep, onCloseTutorial = _a.onCloseTutorial;
|
|
31
|
+
var currentTutorialStep = _a.currentTutorialStep, allowSkipTutorial = _a.allowSkipTutorial, sightGuidelines = _a.sightGuidelines, sightId = _a.sightId, onNextTutorialStep = _a.onNextTutorialStep, onCloseTutorial = _a.onCloseTutorial, addDamage = _a.addDamage;
|
|
32
32
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
33
|
-
var primaryColor = (0, hooks_2.
|
|
34
|
-
return currentTutorialStep ? ((0, jsx_runtime_1.jsx)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['backdropContainer'], "data-testid": 'backdrop' }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['elementsContainer'] }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['topContainer'] }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['buttonsContainer'] }, { children: [(0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDTutorial_styles_1.styles['closeButtonTwin'] }), (0, jsx_runtime_1.jsx)(PhotoCaptureHUDElementsSight_1.SightGuideline, { sightId: sightId, sightGuidelines: sightGuidelines, enableSightGuidelines: currentTutorialStep === hooks_1.TutorialSteps.GUIDELINE,
|
|
33
|
+
var primaryColor = (0, hooks_2.useColorBackground)();
|
|
34
|
+
return currentTutorialStep ? ((0, jsx_runtime_1.jsx)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['backdropContainer'], "data-testid": 'backdrop' }, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['elementsContainer'] }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['topContainer'] }, { children: [(0, jsx_runtime_1.jsxs)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['buttonsContainer'] }, { children: [(0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDTutorial_styles_1.styles['closeButtonTwin'] }), (0, jsx_runtime_1.jsx)(PhotoCaptureHUDElementsSight_1.SightGuideline, { sightId: sightId, sightGuidelines: sightGuidelines, enableSightGuidelines: currentTutorialStep === hooks_1.TutorialSteps.GUIDELINE, addDamage: addDamage, enableDefaultMessage: true }), (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { style: __assign(__assign({}, PhotoCaptureHUDTutorial_styles_1.styles['closeButton']), getButtonStyle(allowSkipTutorial)), disabled: !allowSkipTutorial, icon: 'close', primaryColor: primaryColor, onClick: onCloseTutorial })] })), (0, jsx_runtime_1.jsx)("div", __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['arrows'] }, { children: (0, jsx_runtime_1.jsx)(ArrowIcon_1.ArrowIcon, { tutorialStep: currentTutorialStep }) }))] })), (0, jsx_runtime_1.jsx)(DisplayText_1.DisplayText, { tutorialStep: currentTutorialStep }), (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({ style: PhotoCaptureHUDTutorial_styles_1.styles['nextButton'], primaryColor: 'primary', onClick: onNextTutorialStep }, { children: t('photo.hud.tutorial.next') }))] })) }))) : null;
|
|
35
35
|
}
|
|
36
36
|
exports.PhotoCaptureHUDTutorial = PhotoCaptureHUDTutorial;
|
package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.styles = void 0;
|
|
4
|
-
var
|
|
4
|
+
var HUDButtons_styles_1 = require("../../../components/HUDButtons/HUDButtons.styles");
|
|
5
5
|
exports.styles = {
|
|
6
6
|
backdropContainer: {
|
|
7
7
|
position: 'fixed',
|
|
@@ -17,7 +17,7 @@ exports.styles = {
|
|
|
17
17
|
display: 'flex',
|
|
18
18
|
flexDirection: 'column',
|
|
19
19
|
position: 'fixed',
|
|
20
|
-
width: "calc(98% - (".concat(
|
|
20
|
+
width: "calc(98% - (".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 4, "px))"),
|
|
21
21
|
top: '10px',
|
|
22
22
|
bottom: '40px',
|
|
23
23
|
justifyContent: 'space-between',
|
|
@@ -63,7 +63,7 @@ exports.styles = {
|
|
|
63
63
|
arrowSightTutorial: {
|
|
64
64
|
position: 'fixed',
|
|
65
65
|
bottom: '60px',
|
|
66
|
-
left: "calc((".concat(
|
|
66
|
+
left: "calc((".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 2, "px))"),
|
|
67
67
|
width: '40px',
|
|
68
68
|
},
|
|
69
69
|
};
|
|
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./usePhotoCaptureHUDStyle"), exports);
|
|
18
|
-
__exportStar(require("./usePhotoCaptureHUDButtonBackground"), exports);
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
export { PhotoCaptureHUD, type PhotoCaptureHUDProps } from './PhotoCaptureHUD';
|
|
2
2
|
export * from './hooks';
|
|
3
|
-
export * from './PhotoCaptureHUDButtons';
|
|
4
|
-
export * from './PhotoCaptureHUDCancelButton';
|
|
5
|
-
export * from './PhotoCaptureHUDCounter';
|
|
6
|
-
export * from './PhotoCaptureHUDOverlay';
|
|
7
3
|
export * from './PhotoCaptureHUDElements';
|
|
8
|
-
export * from './PhotoCaptureHUDElementsAddDamage1stShot';
|
|
9
|
-
export * from './PhotoCaptureHUDElementsAddDamage2ndShot';
|
|
10
4
|
export * from './PhotoCaptureHUDElementsSight';
|
|
11
5
|
export * from './PhotoCaptureHUDTutorial';
|
|
@@ -18,12 +18,6 @@ exports.PhotoCaptureHUD = void 0;
|
|
|
18
18
|
var PhotoCaptureHUD_1 = require("./PhotoCaptureHUD");
|
|
19
19
|
Object.defineProperty(exports, "PhotoCaptureHUD", { enumerable: true, get: function () { return PhotoCaptureHUD_1.PhotoCaptureHUD; } });
|
|
20
20
|
__exportStar(require("./hooks"), exports);
|
|
21
|
-
__exportStar(require("./PhotoCaptureHUDButtons"), exports);
|
|
22
|
-
__exportStar(require("./PhotoCaptureHUDCancelButton"), exports);
|
|
23
|
-
__exportStar(require("./PhotoCaptureHUDCounter"), exports);
|
|
24
|
-
__exportStar(require("./PhotoCaptureHUDOverlay"), exports);
|
|
25
21
|
__exportStar(require("./PhotoCaptureHUDElements"), exports);
|
|
26
|
-
__exportStar(require("./PhotoCaptureHUDElementsAddDamage1stShot"), exports);
|
|
27
|
-
__exportStar(require("./PhotoCaptureHUDElementsAddDamage2ndShot"), exports);
|
|
28
22
|
__exportStar(require("./PhotoCaptureHUDElementsSight"), exports);
|
|
29
23
|
__exportStar(require("./PhotoCaptureHUDTutorial"), exports);
|
|
@@ -1,11 +1,3 @@
|
|
|
1
1
|
export * from './usePhotoCaptureSightState';
|
|
2
|
-
export * from './useStartTasksOnComplete';
|
|
3
|
-
export * from './useAddDamageMode';
|
|
4
|
-
export * from './useUploadQueue';
|
|
5
|
-
export * from './usePictureTaken';
|
|
6
|
-
export * from './usePhotoCaptureImages';
|
|
7
2
|
export * from './useComplianceAnalytics';
|
|
8
|
-
export * from './useBadConnectionWarning';
|
|
9
|
-
export * from './useAdaptiveCameraConfig';
|
|
10
|
-
export * from './useTracking';
|
|
11
3
|
export * from './usePhotoCaptureTutorial';
|
|
@@ -15,13 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./usePhotoCaptureSightState"), exports);
|
|
18
|
-
__exportStar(require("./useStartTasksOnComplete"), exports);
|
|
19
|
-
__exportStar(require("./useAddDamageMode"), exports);
|
|
20
|
-
__exportStar(require("./useUploadQueue"), exports);
|
|
21
|
-
__exportStar(require("./usePictureTaken"), exports);
|
|
22
|
-
__exportStar(require("./usePhotoCaptureImages"), exports);
|
|
23
18
|
__exportStar(require("./useComplianceAnalytics"), exports);
|
|
24
|
-
__exportStar(require("./useBadConnectionWarning"), exports);
|
|
25
|
-
__exportStar(require("./useAdaptiveCameraConfig"), exports);
|
|
26
|
-
__exportStar(require("./useTracking"), exports);
|
|
27
19
|
__exportStar(require("./usePhotoCaptureTutorial"), exports);
|
|
@@ -75,6 +75,9 @@ export interface PhotoCaptureSightsParams {
|
|
|
75
75
|
* The options for the compliance conf
|
|
76
76
|
*/
|
|
77
77
|
complianceOptions: ComplianceOptions;
|
|
78
|
+
/**
|
|
79
|
+
* Callback used to manually update the completion state of the inspection.
|
|
80
|
+
*/
|
|
78
81
|
setIsInitialInspectionFetched: (state: boolean) => void;
|
|
79
82
|
/**
|
|
80
83
|
* Record associating each sight with a list of tasks to execute for it. If not provided, the default tasks of the
|
|
@@ -99,7 +99,7 @@ function usePhotoCaptureSightState(_a) {
|
|
|
99
99
|
var notCompliantSights = captureSights
|
|
100
100
|
.map(function (s) { return ({
|
|
101
101
|
sight: s,
|
|
102
|
-
image: (0, common_1.getInspectionImages)(inspectionId, state.images, true).find(function (i) { return i.inspectionId === inspectionId && i.sightId === s.id; }),
|
|
102
|
+
image: (0, common_1.getInspectionImages)(inspectionId, state.images, undefined, true).find(function (i) { return i.inspectionId === inspectionId && i.sightId === s.id; }),
|
|
103
103
|
}); })
|
|
104
104
|
.filter(function (_a) {
|
|
105
105
|
var image = _a.image;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PhotoCaptureAppConfig } from '@monkvision/types';
|
|
2
2
|
export declare const STORAGE_KEY_PHOTO_CAPTURE_TUTORIAL = "@monk_photoCaptureTutorial";
|
|
3
3
|
/**
|
|
4
4
|
* Enum of the different steps of the PhotoCapture Tutorial component.
|
|
@@ -24,7 +24,7 @@ export declare enum TutorialSteps {
|
|
|
24
24
|
/**
|
|
25
25
|
* Parameters of the usePhotoCaptureTutorial hook.
|
|
26
26
|
*/
|
|
27
|
-
export interface PhotoCaptureTutorial extends Pick<
|
|
27
|
+
export interface PhotoCaptureTutorial extends Pick<PhotoCaptureAppConfig, 'enableTutorial' | 'enableSightTutorial' | 'enableSightGuidelines'> {
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Custom hook used to manage the state of photo capture tutorial.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MonkApiConfig } from '@monkvision/network';
|
|
3
|
+
import { CameraConfig, VideoCaptureAppConfig } from '@monkvision/types';
|
|
4
|
+
/**
|
|
5
|
+
* Props of the VideoCapture component.
|
|
6
|
+
*/
|
|
7
|
+
export interface VideoCaptureProps extends Pick<VideoCaptureAppConfig, keyof CameraConfig | 'additionalTasks' | 'startTasksOnComplete' | 'enforceOrientation' | 'minRecordingDuration' | 'maxRetryCount' | 'enableFastWalkingWarning' | 'enablePhoneShakingWarning' | 'fastWalkingWarningCooldown' | 'phoneShakingWarningCooldown'> {
|
|
8
|
+
/**
|
|
9
|
+
* The ID of the inspection to add the video frames to.
|
|
10
|
+
*/
|
|
11
|
+
inspectionId: string;
|
|
12
|
+
/**
|
|
13
|
+
* The api config used to communicate with the API. Make sure that the user described in the auth token is the same
|
|
14
|
+
* one as the one that created the inspection provided in the `inspectionId` prop.
|
|
15
|
+
*/
|
|
16
|
+
apiConfig: MonkApiConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Callback called when the inspection is complete.
|
|
19
|
+
*/
|
|
20
|
+
onComplete?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* The language to be used by this component.
|
|
23
|
+
*
|
|
24
|
+
* @default en
|
|
25
|
+
*/
|
|
26
|
+
lang?: string | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function VideoCapture({ inspectionId, apiConfig, additionalTasks, startTasksOnComplete, enforceOrientation, minRecordingDuration, maxRetryCount, enableFastWalkingWarning, enablePhoneShakingWarning, fastWalkingWarningCooldown, phoneShakingWarningCooldown, onComplete, lang, }: VideoCaptureProps): JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.VideoCapture = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var common_1 = require("@monkvision/common");
|
|
17
|
+
var react_1 = require("react");
|
|
18
|
+
var camera_web_1 = require("@monkvision/camera-web");
|
|
19
|
+
var monitoring_1 = require("@monkvision/monitoring");
|
|
20
|
+
var VideoCapture_styles_1 = require("./VideoCapture.styles");
|
|
21
|
+
var VideoCapturePermissions_1 = require("./VideoCapturePermissions");
|
|
22
|
+
var VideoCaptureHUD_1 = require("./VideoCaptureHUD");
|
|
23
|
+
var hooks_1 = require("../hooks");
|
|
24
|
+
var hooks_2 = require("./hooks");
|
|
25
|
+
var VideoCaptureScreen;
|
|
26
|
+
(function (VideoCaptureScreen) {
|
|
27
|
+
VideoCaptureScreen["PERMISSIONS"] = "permissions";
|
|
28
|
+
VideoCaptureScreen["CAPTURE"] = "capture";
|
|
29
|
+
})(VideoCaptureScreen || (VideoCaptureScreen = {}));
|
|
30
|
+
// No ts-doc for this component : the component exported is VideoCaptureHOC
|
|
31
|
+
function VideoCapture(_a) {
|
|
32
|
+
var inspectionId = _a.inspectionId, apiConfig = _a.apiConfig, additionalTasks = _a.additionalTasks, startTasksOnComplete = _a.startTasksOnComplete, enforceOrientation = _a.enforceOrientation, _b = _a.minRecordingDuration, minRecordingDuration = _b === void 0 ? 15000 : _b, _c = _a.maxRetryCount, maxRetryCount = _c === void 0 ? 3 : _c, _d = _a.enableFastWalkingWarning, enableFastWalkingWarning = _d === void 0 ? true : _d, _e = _a.enablePhoneShakingWarning, enablePhoneShakingWarning = _e === void 0 ? true : _e, _f = _a.fastWalkingWarningCooldown, fastWalkingWarningCooldown = _f === void 0 ? 1000 : _f, _g = _a.phoneShakingWarningCooldown, phoneShakingWarningCooldown = _g === void 0 ? 1000 : _g, onComplete = _a.onComplete, lang = _a.lang;
|
|
33
|
+
(0, common_1.useI18nSync)(lang);
|
|
34
|
+
var _h = (0, react_1.useState)(VideoCaptureScreen.PERMISSIONS), screen = _h[0], setScreen = _h[1];
|
|
35
|
+
var _j = (0, react_1.useState)(false), isRecording = _j[0], setIsRecording = _j[1];
|
|
36
|
+
var handleError = (0, monitoring_1.useMonitoring)().handleError;
|
|
37
|
+
var _k = (0, hooks_2.useFastMovementsDetection)({
|
|
38
|
+
isRecording: isRecording,
|
|
39
|
+
enableFastWalkingWarning: enableFastWalkingWarning,
|
|
40
|
+
enablePhoneShakingWarning: enablePhoneShakingWarning,
|
|
41
|
+
fastWalkingWarningCooldown: fastWalkingWarningCooldown,
|
|
42
|
+
phoneShakingWarningCooldown: phoneShakingWarningCooldown,
|
|
43
|
+
}), onDeviceOrientationEvent = _k.onDeviceOrientationEvent, fastMovementsWarning = _k.fastMovementsWarning, onWarningDismiss = _k.onWarningDismiss;
|
|
44
|
+
var _l = (0, common_1.useDeviceOrientation)({ onDeviceOrientationEvent: onDeviceOrientationEvent }), alpha = _l.alpha, requestCompassPermission = _l.requestCompassPermission;
|
|
45
|
+
var startTasksLoading = (0, common_1.useLoadingState)();
|
|
46
|
+
var startTasks = (0, hooks_1.useStartTasksOnComplete)({
|
|
47
|
+
inspectionId: inspectionId,
|
|
48
|
+
apiConfig: apiConfig,
|
|
49
|
+
additionalTasks: additionalTasks,
|
|
50
|
+
startTasksOnComplete: startTasksOnComplete,
|
|
51
|
+
loading: startTasksLoading,
|
|
52
|
+
});
|
|
53
|
+
var allowRedirect = (0, common_1.usePreventExit)(true).allowRedirect;
|
|
54
|
+
var handleComplete = function () {
|
|
55
|
+
startTasks()
|
|
56
|
+
.then(function () {
|
|
57
|
+
allowRedirect();
|
|
58
|
+
onComplete === null || onComplete === void 0 ? void 0 : onComplete();
|
|
59
|
+
})
|
|
60
|
+
.catch(function (err) {
|
|
61
|
+
startTasksLoading.onError(err);
|
|
62
|
+
handleError(err);
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var hudProps = {
|
|
66
|
+
inspectionId: inspectionId,
|
|
67
|
+
maxRetryCount: maxRetryCount,
|
|
68
|
+
apiConfig: apiConfig,
|
|
69
|
+
minRecordingDuration: minRecordingDuration,
|
|
70
|
+
enforceOrientation: enforceOrientation,
|
|
71
|
+
isRecording: isRecording,
|
|
72
|
+
setIsRecording: setIsRecording,
|
|
73
|
+
alpha: alpha,
|
|
74
|
+
fastMovementsWarning: fastMovementsWarning,
|
|
75
|
+
onWarningDismiss: onWarningDismiss,
|
|
76
|
+
startTasksLoading: startTasksLoading,
|
|
77
|
+
onComplete: handleComplete,
|
|
78
|
+
};
|
|
79
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: VideoCapture_styles_1.styles['container'] }, { children: [screen === VideoCaptureScreen.PERMISSIONS && ((0, jsx_runtime_1.jsx)(VideoCapturePermissions_1.VideoCapturePermissions, { requestCompassPermission: requestCompassPermission, onSuccess: function () { return setScreen(VideoCaptureScreen.CAPTURE); } })), screen === VideoCaptureScreen.CAPTURE && ((0, jsx_runtime_1.jsx)(camera_web_1.Camera, { HUDComponent: VideoCaptureHUD_1.VideoCaptureHUD, hudProps: hudProps }))] })));
|
|
80
|
+
}
|
|
81
|
+
exports.VideoCapture = VideoCapture;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { VideoCaptureProps } from './VideoCapture';
|
|
3
|
+
/**
|
|
4
|
+
* The VideoCapture component is a ready-to-use, single page component that implements a Camera app and lets the user
|
|
5
|
+
* record a video of their vehicle in order to add them to an already created Monk inspection. In order to use this
|
|
6
|
+
* component, you first need to generate an Auth0 authentication token, and create an inspection using the Monk Api.
|
|
7
|
+
* When creating the inspection, don't forget to set the tasks statuses to `NOT_STARTED`. This component will handle the
|
|
8
|
+
* starting of the tasks at the end of the capturing process. You can then pass the inspection ID, the api config (with
|
|
9
|
+
* the auth token) and everything will be handled automatically for you.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { VideoCapture } from '@monkvision/inspection-capture-web';
|
|
13
|
+
*
|
|
14
|
+
* export function VideoCaptureScreen({ inspectionId, apiConfig }: VideoCaptureScreenProps) {
|
|
15
|
+
* const { i18n } = useTranslation();
|
|
16
|
+
*
|
|
17
|
+
* return (
|
|
18
|
+
* <VideoCapture
|
|
19
|
+
* inspectionId={inspectionId}
|
|
20
|
+
* apiConfig={apiConfig}
|
|
21
|
+
* onComplete={() => { / * Navigate to another page * / }}
|
|
22
|
+
* lang={i18n.language}
|
|
23
|
+
* />
|
|
24
|
+
* );
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
export declare const VideoCaptureHOC: import("react").ForwardRefExoticComponent<VideoCaptureProps & import("react").RefAttributes<unknown>>;
|