@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
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { VideoCaptureAppConfig } from '@monkvision/types';
|
|
3
|
+
import { VehicleWalkaroundHandle } from './useVehicleWalkaround';
|
|
4
|
+
/**
|
|
5
|
+
* Enumeration of the different tooltips displayed on top of the recording button during the recording process.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum VideoRecordingTooltip {
|
|
8
|
+
/**
|
|
9
|
+
* Tooltip displayed before the recording has been started, to indicate to the user where to press to start the
|
|
10
|
+
* recording.
|
|
11
|
+
*/
|
|
12
|
+
START = "start",
|
|
13
|
+
/**
|
|
14
|
+
* Tooltip displayed at the end of the recording, to indicate to the user where to press to stop the recording.
|
|
15
|
+
*/
|
|
16
|
+
END = "end"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Params accepted by the useVideoRecording hook.
|
|
20
|
+
*/
|
|
21
|
+
export interface UseVideoRecordingParams extends Pick<VehicleWalkaroundHandle, 'walkaroundPosition' | 'startWalkaround'>, Pick<VideoCaptureAppConfig, 'enforceOrientation'> {
|
|
22
|
+
/**
|
|
23
|
+
* Boolean indicating if the video is currently recording or not.
|
|
24
|
+
*/
|
|
25
|
+
isRecording: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Callback called when setting the `isRecording` state.
|
|
28
|
+
*/
|
|
29
|
+
setIsRecording: Dispatch<SetStateAction<boolean>>;
|
|
30
|
+
/**
|
|
31
|
+
* The interval in milliseconds at which screenshots of the video stream should be taken.
|
|
32
|
+
*/
|
|
33
|
+
screenshotInterval: number;
|
|
34
|
+
/**
|
|
35
|
+
* The minimum duration of a recording.
|
|
36
|
+
*
|
|
37
|
+
* If the user tries to stop the recording too soon, the recording will be paused, and a warning dialog will be
|
|
38
|
+
* displayed on the screen, asking the user if they want to restart the recording over, or resume recording the
|
|
39
|
+
* vehicle walkaround.
|
|
40
|
+
*/
|
|
41
|
+
minRecordingDuration: number;
|
|
42
|
+
/**
|
|
43
|
+
* Callback called when a screenshot of the video stream should be taken and then added to the processing queue.
|
|
44
|
+
*/
|
|
45
|
+
onCaptureVideoFrame?: () => void;
|
|
46
|
+
/**
|
|
47
|
+
* Callback called when the recording is complete.
|
|
48
|
+
*/
|
|
49
|
+
onRecordingComplete?: () => void;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Handle returned by the useVideoRecording hook used to maange the video recording (AKA : The process of taking
|
|
53
|
+
* screenshots of the video stream at a given interval).
|
|
54
|
+
*/
|
|
55
|
+
export interface VideoRecordingHandle {
|
|
56
|
+
/**
|
|
57
|
+
* Boolean indicating if the video recording is paused or not.
|
|
58
|
+
*/
|
|
59
|
+
isRecordingPaused: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The total duration (in milliseconds) of the current video recording.
|
|
62
|
+
*/
|
|
63
|
+
recordingDurationMs: number;
|
|
64
|
+
/**
|
|
65
|
+
* Callback called when the user clicks on the record video button.
|
|
66
|
+
*/
|
|
67
|
+
onClickRecordVideo: () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Boolean indicating if the discard video dialog should be displayed on the screen or not.
|
|
70
|
+
*/
|
|
71
|
+
isDiscardDialogDisplayed: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Callback called when the user clicks on the "Keep Recording" option of the discard video dialog.
|
|
74
|
+
*/
|
|
75
|
+
onDiscardDialogKeepRecording: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* Callback called when the user clicks on the "Discard Video" option of the discard video dialog.
|
|
78
|
+
*/
|
|
79
|
+
onDiscardDialogDiscardVideo: () => void;
|
|
80
|
+
/**
|
|
81
|
+
* Callback called to pause the video recording.
|
|
82
|
+
*/
|
|
83
|
+
pauseRecording: () => void;
|
|
84
|
+
/**
|
|
85
|
+
* Callback called to resume the video recording after it has been paused.
|
|
86
|
+
*/
|
|
87
|
+
resumeRecording: () => void;
|
|
88
|
+
/**
|
|
89
|
+
* The tooltip displayed to the user.
|
|
90
|
+
*/
|
|
91
|
+
tooltip: VideoRecordingTooltip | null;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Custom hook used to manage the video recording (AKA : The process of taking screenshots of the video stream at a
|
|
95
|
+
* given interval).
|
|
96
|
+
*/
|
|
97
|
+
export declare function useVideoRecording({ isRecording, setIsRecording, screenshotInterval, minRecordingDuration, enforceOrientation, walkaroundPosition, startWalkaround, onCaptureVideoFrame, onRecordingComplete, }: UseVideoRecordingParams): VideoRecordingHandle;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useVideoRecording = exports.VideoRecordingTooltip = void 0;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var common_1 = require("@monkvision/common");
|
|
6
|
+
var hooks_1 = require("../../hooks");
|
|
7
|
+
/**
|
|
8
|
+
* Enumeration of the different tooltips displayed on top of the recording button during the recording process.
|
|
9
|
+
*/
|
|
10
|
+
var VideoRecordingTooltip;
|
|
11
|
+
(function (VideoRecordingTooltip) {
|
|
12
|
+
/**
|
|
13
|
+
* Tooltip displayed before the recording has been started, to indicate to the user where to press to start the
|
|
14
|
+
* recording.
|
|
15
|
+
*/
|
|
16
|
+
VideoRecordingTooltip["START"] = "start";
|
|
17
|
+
/**
|
|
18
|
+
* Tooltip displayed at the end of the recording, to indicate to the user where to press to stop the recording.
|
|
19
|
+
*/
|
|
20
|
+
VideoRecordingTooltip["END"] = "end";
|
|
21
|
+
})(VideoRecordingTooltip = exports.VideoRecordingTooltip || (exports.VideoRecordingTooltip = {}));
|
|
22
|
+
var MINIMUM_VEHICLE_WALKAROUND_POSITION = 270;
|
|
23
|
+
/**
|
|
24
|
+
* Custom hook used to manage the video recording (AKA : The process of taking screenshots of the video stream at a
|
|
25
|
+
* given interval).
|
|
26
|
+
*/
|
|
27
|
+
function useVideoRecording(_a) {
|
|
28
|
+
var isRecording = _a.isRecording, setIsRecording = _a.setIsRecording, screenshotInterval = _a.screenshotInterval, minRecordingDuration = _a.minRecordingDuration, enforceOrientation = _a.enforceOrientation, walkaroundPosition = _a.walkaroundPosition, startWalkaround = _a.startWalkaround, onCaptureVideoFrame = _a.onCaptureVideoFrame, onRecordingComplete = _a.onRecordingComplete;
|
|
29
|
+
var _b = (0, react_1.useState)(false), isRecordingPaused = _b[0], setIsRecordingPaused = _b[1];
|
|
30
|
+
var _c = (0, react_1.useState)(0), additionalRecordingDuration = _c[0], setAdditionalRecordingDuration = _c[1];
|
|
31
|
+
var _d = (0, react_1.useState)(null), recordingStartTimestamp = _d[0], setRecordingStartTimestamp = _d[1];
|
|
32
|
+
var _e = (0, react_1.useState)(false), isDiscardDialogDisplayed = _e[0], setDiscardDialogDisplayed = _e[1];
|
|
33
|
+
var _f = (0, react_1.useState)(false), orientationPause = _f[0], setOrientationPause = _f[1];
|
|
34
|
+
var _g = (0, react_1.useState)(VideoRecordingTooltip.START), tooltip = _g[0], setTooltip = _g[1];
|
|
35
|
+
var isViolatingEnforcedOrientation = (0, hooks_1.useEnforceOrientation)(enforceOrientation);
|
|
36
|
+
var getRecordingDurationMs = (0, react_1.useCallback)(function () {
|
|
37
|
+
return additionalRecordingDuration +
|
|
38
|
+
(recordingStartTimestamp ? Date.now() - recordingStartTimestamp : 0);
|
|
39
|
+
}, [additionalRecordingDuration, recordingStartTimestamp]);
|
|
40
|
+
var pauseRecording = (0, react_1.useCallback)(function () {
|
|
41
|
+
setIsRecordingPaused(function (isRecordingPausedValue) {
|
|
42
|
+
if (!isRecordingPausedValue) {
|
|
43
|
+
setIsRecording(false);
|
|
44
|
+
setRecordingStartTimestamp(function (recordingStartTimestampValue) {
|
|
45
|
+
setAdditionalRecordingDuration(function (value) {
|
|
46
|
+
return recordingStartTimestampValue
|
|
47
|
+
? value + Date.now() - recordingStartTimestampValue
|
|
48
|
+
: value;
|
|
49
|
+
});
|
|
50
|
+
return null;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return true;
|
|
54
|
+
});
|
|
55
|
+
}, []);
|
|
56
|
+
var resumeRecording = (0, react_1.useCallback)(function () {
|
|
57
|
+
setIsRecordingPaused(function (isRecordingPausedValue) {
|
|
58
|
+
if (isRecordingPausedValue) {
|
|
59
|
+
setRecordingStartTimestamp(Date.now());
|
|
60
|
+
setIsRecording(true);
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
});
|
|
64
|
+
}, []);
|
|
65
|
+
var onClickRecordVideo = (0, react_1.useCallback)(function () {
|
|
66
|
+
if (isRecording) {
|
|
67
|
+
if (getRecordingDurationMs() < minRecordingDuration ||
|
|
68
|
+
walkaroundPosition < MINIMUM_VEHICLE_WALKAROUND_POSITION) {
|
|
69
|
+
pauseRecording();
|
|
70
|
+
setDiscardDialogDisplayed(true);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
setIsRecording(false);
|
|
74
|
+
onRecordingComplete === null || onRecordingComplete === void 0 ? void 0 : onRecordingComplete();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
setAdditionalRecordingDuration(0);
|
|
79
|
+
setRecordingStartTimestamp(Date.now());
|
|
80
|
+
setIsRecording(true);
|
|
81
|
+
startWalkaround();
|
|
82
|
+
setTooltip(null);
|
|
83
|
+
}
|
|
84
|
+
}, [
|
|
85
|
+
isRecording,
|
|
86
|
+
getRecordingDurationMs,
|
|
87
|
+
minRecordingDuration,
|
|
88
|
+
walkaroundPosition,
|
|
89
|
+
pauseRecording,
|
|
90
|
+
onRecordingComplete,
|
|
91
|
+
]);
|
|
92
|
+
var onDiscardDialogKeepRecording = (0, react_1.useCallback)(function () {
|
|
93
|
+
resumeRecording();
|
|
94
|
+
setDiscardDialogDisplayed(false);
|
|
95
|
+
}, [resumeRecording]);
|
|
96
|
+
var onDiscardDialogDiscardVideo = (0, react_1.useCallback)(function () {
|
|
97
|
+
setIsRecordingPaused(false);
|
|
98
|
+
setAdditionalRecordingDuration(0);
|
|
99
|
+
setRecordingStartTimestamp(null);
|
|
100
|
+
setIsRecording(false);
|
|
101
|
+
setDiscardDialogDisplayed(false);
|
|
102
|
+
}, []);
|
|
103
|
+
(0, common_1.useInterval)(function () {
|
|
104
|
+
if (isRecording) {
|
|
105
|
+
onCaptureVideoFrame === null || onCaptureVideoFrame === void 0 ? void 0 : onCaptureVideoFrame();
|
|
106
|
+
}
|
|
107
|
+
}, isRecording ? screenshotInterval : null);
|
|
108
|
+
(0, react_1.useEffect)(function () {
|
|
109
|
+
if (isViolatingEnforcedOrientation && isRecording) {
|
|
110
|
+
setOrientationPause(true);
|
|
111
|
+
pauseRecording();
|
|
112
|
+
}
|
|
113
|
+
else if (!isViolatingEnforcedOrientation && orientationPause) {
|
|
114
|
+
setOrientationPause(false);
|
|
115
|
+
resumeRecording();
|
|
116
|
+
}
|
|
117
|
+
}, [isViolatingEnforcedOrientation, isRecording, orientationPause]);
|
|
118
|
+
(0, react_1.useEffect)(function () {
|
|
119
|
+
if (isRecording) {
|
|
120
|
+
if (walkaroundPosition > 315) {
|
|
121
|
+
setTooltip(VideoRecordingTooltip.END);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
setTooltip(null);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}, [walkaroundPosition, isRecording]);
|
|
128
|
+
return {
|
|
129
|
+
isRecordingPaused: isRecordingPaused,
|
|
130
|
+
recordingDurationMs: getRecordingDurationMs(),
|
|
131
|
+
onClickRecordVideo: onClickRecordVideo,
|
|
132
|
+
onDiscardDialogKeepRecording: onDiscardDialogKeepRecording,
|
|
133
|
+
onDiscardDialogDiscardVideo: onDiscardDialogDiscardVideo,
|
|
134
|
+
isDiscardDialogDisplayed: isDiscardDialogDisplayed,
|
|
135
|
+
pauseRecording: pauseRecording,
|
|
136
|
+
resumeRecording: resumeRecording,
|
|
137
|
+
tooltip: tooltip,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
exports.useVideoRecording = useVideoRecording;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MonkPicture } from '@monkvision/types';
|
|
2
|
+
import { MonkApiConfig } from '@monkvision/network';
|
|
3
|
+
/**
|
|
4
|
+
* Params accepted by the useVideoUploadQueue hook.
|
|
5
|
+
*/
|
|
6
|
+
export interface VideoUploadQueueParams {
|
|
7
|
+
/**
|
|
8
|
+
* The config used to communicate with the API.
|
|
9
|
+
*/
|
|
10
|
+
apiConfig: MonkApiConfig;
|
|
11
|
+
/**
|
|
12
|
+
* The ID of the current inspection.
|
|
13
|
+
*/
|
|
14
|
+
inspectionId: string;
|
|
15
|
+
/**
|
|
16
|
+
* The maximum number of retries allowed for failed image uploads.
|
|
17
|
+
*/
|
|
18
|
+
maxRetryCount: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Handle used to manage the video frame upload queue.
|
|
22
|
+
*/
|
|
23
|
+
export interface VideoUploadQueueHandle {
|
|
24
|
+
/**
|
|
25
|
+
* The number of frames that have successfully been uploaded to the API.
|
|
26
|
+
*/
|
|
27
|
+
uploadedFrames: number;
|
|
28
|
+
/**
|
|
29
|
+
* The total number of frames added to the uploading queue.
|
|
30
|
+
*/
|
|
31
|
+
totalUploadingFrames: number;
|
|
32
|
+
/**
|
|
33
|
+
* Callback called when a frame has been selected by the frame selection hook.
|
|
34
|
+
*/
|
|
35
|
+
onFrameSelected: (picture: MonkPicture) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Hook used to manage the video frame upload queue.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useVideoUploadQueue({ apiConfig, inspectionId, maxRetryCount, }: VideoUploadQueueParams): VideoUploadQueueHandle;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable no-param-reassign */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.useVideoUploadQueue = void 0;
|
|
5
|
+
var common_1 = require("@monkvision/common");
|
|
6
|
+
var network_1 = require("@monkvision/network");
|
|
7
|
+
var react_1 = require("react");
|
|
8
|
+
/**
|
|
9
|
+
* Hook used to manage the video frame upload queue.
|
|
10
|
+
*/
|
|
11
|
+
function useVideoUploadQueue(_a) {
|
|
12
|
+
var apiConfig = _a.apiConfig, inspectionId = _a.inspectionId, maxRetryCount = _a.maxRetryCount;
|
|
13
|
+
var frameIndex = (0, react_1.useRef)(0);
|
|
14
|
+
var frameTimestamp = (0, react_1.useRef)(null);
|
|
15
|
+
var addImage = (0, network_1.useMonkApi)(apiConfig).addImage;
|
|
16
|
+
var queue = (0, common_1.useQueue)(function (upload) {
|
|
17
|
+
return addImage({
|
|
18
|
+
uploadType: network_1.ImageUploadType.VIDEO_FRAME,
|
|
19
|
+
inspectionId: inspectionId,
|
|
20
|
+
picture: upload.picture,
|
|
21
|
+
frameIndex: upload.frameIndex,
|
|
22
|
+
timestamp: upload.timestamp,
|
|
23
|
+
});
|
|
24
|
+
}, {
|
|
25
|
+
storeFailedItems: true,
|
|
26
|
+
onItemFail: function (upload) {
|
|
27
|
+
upload.retryCount += 1;
|
|
28
|
+
if (upload.retryCount <= maxRetryCount) {
|
|
29
|
+
queue.push(upload);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
var onFrameSelected = (0, react_1.useCallback)(function (picture) {
|
|
34
|
+
var now = Date.now();
|
|
35
|
+
var upload = {
|
|
36
|
+
retryCount: 0,
|
|
37
|
+
picture: picture,
|
|
38
|
+
frameIndex: frameIndex.current,
|
|
39
|
+
timestamp: frameTimestamp.current === null ? 0 : now - frameTimestamp.current,
|
|
40
|
+
};
|
|
41
|
+
queue.push(upload);
|
|
42
|
+
frameIndex.current += 1;
|
|
43
|
+
frameTimestamp.current = now;
|
|
44
|
+
}, [queue.push]);
|
|
45
|
+
return (0, common_1.useObjectMemo)({
|
|
46
|
+
uploadedFrames: queue.totalItems - queue.processingCount,
|
|
47
|
+
totalUploadingFrames: queue.totalItems,
|
|
48
|
+
onFrameSelected: onFrameSelected,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.useVideoUploadQueue = useVideoUploadQueue;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VideoCapture = void 0;
|
|
4
|
+
var VideoCaptureHOC_1 = require("./VideoCaptureHOC");
|
|
5
|
+
Object.defineProperty(exports, "VideoCapture", { enumerable: true, get: function () { return VideoCaptureHOC_1.VideoCaptureHOC; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const monkLogoSVG = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"785\" height=\"210\" viewBox=\"0 0 785 210\"><path fill=\"#000000\" fill-rule=\"evenodd\" d=\"M338 7.1c8-.1 13 .5 21 2.5 5.9 1.4 14.7 4.5 20 7 5.2 2.5 12.2 6.5 15.5 8.9 3.3 2.3 9.1 7.4 12.9 11.1 3.7 3.8 8.8 9.6 11.1 12.9 2.4 3.3 5.9 9.1 7.8 13 2 3.8 4.5 9.9 5.7 13.5 1.1 3.6 2.5 9.4 3.2 13 .6 3.8.8 12 .5 20-.3 9.5-1.1 15.7-2.7 21-1.1 4.1-3.8 11.1-5.9 15.5-2.1 4.4-6.6 11.6-9.8 16-3.3 4.4-8.7 10.4-11.9 13.4-3.2 2.9-9.7 7.9-14.4 11-4.7 3.1-12.1 7.1-16.5 8.8-4.4 1.7-11.7 4.1-16.3 5.2-5.9 1.5-11.3 2.1-19.7 2.1-8.4 0-13.6-.6-19.3-2-4.2-1.2-10.2-3-13.2-4.1-3-1.2-7.5-3.1-10-4.4-2.5-1.3-7.6-4.5-11.5-7.2-3.9-2.7-10.3-8.3-14.3-12.4-4.1-4.1-9.3-10.3-11.7-13.9-2.3-3.6-5.6-9.2-7.2-12.5-1.7-3.3-4-8.9-5.1-12.5-1.1-3.6-2.6-9.2-3.3-12.5-.6-3.3-1.1-10.7-1.1-16.5 0-7.2.7-13.3 2.2-19.5 1.1-5 3.5-12.4 5.3-16.5 1.7-4.1 5.4-10.9 8.1-15 2.7-4.1 8.1-10.8 12-14.8 3.9-4.1 10-9.6 13.6-12.2 3.6-2.7 10.8-6.9 16-9.4 5.2-2.5 13.8-5.6 19-7 7-1.8 12.2-2.5 20-2.5zm-28.5 38.8c-4.7 2.3-10.7 6.4-14.5 9.9-3.6 3.2-8.4 8.8-10.7 12.3-2.3 3.5-5.3 9.3-6.7 12.9-1.3 3.6-2.9 10.3-3.6 15-.6 4.7-.9 11-.5 14 .3 3 1 7.8 1.6 10.5.6 2.8 2.8 8.6 4.9 13 2.2 4.4 5.7 10.3 8 13 2.3 2.8 6.5 6.9 9.3 9.3 2.9 2.3 8.3 5.8 12.2 7.7 3.9 1.9 9.9 4.1 13.5 4.9 3.6.9 10.8 1.6 16 1.6 5.2 0 12.2-.7 15.5-1.5 3.3-.8 9.8-3.4 14.5-5.7 6.6-3.2 10.2-5.9 16-11.7 5.3-5.3 8.8-10 11.7-15.6 2.3-4.4 4.9-11.2 5.8-15 1.3-5.2 1.6-9.9 1.2-18.5-.3-7.9-1.1-13.6-2.5-18-1.2-3.6-3.8-9.4-5.9-12.9-2.1-3.5-6.7-9.3-10.3-12.9-3.6-3.6-9.2-8-12.5-9.9-3.3-1.9-9.4-4.6-13.5-6-5.6-1.9-10.2-2.6-18-2.9-6.9-.2-12.8.1-17 1.1-3.6.8-10.1 3.2-14.5 5.4zm257.6-39 31.4.6.2 95.8c.2 52.6 0 95.7-.5 95.7-.4 0-27.7-24.3-60.7-54.1S468.4 82.5 437 54V31.5c0-12.4.3-22.7.7-22.9.5-.2 29.6 25.8 128.8 115.7zm167.4 0h20.8c11.4 0 20.9.3 21.2.8.2.4-12.4 13.5-28.1 29.2-15.7 15.7-37.1 37.4-66.9 68.1l47.3 47.2c25.9 26 47.2 47.8 47.2 48.5 0 .9-4.8 1.2-41.5 1.2L637 104.4zM8 7.4l98.1 98 96.9-97v193.5h-31v-57.5c0-31.6-.3-57.7-.7-57.9-.4-.3-15.2 13.9-64.8 63.4L8 51.4zm333 75.2c2 .3 4.7 1 6 1.5 1.4.5 4 2 5.8 3.4 1.8 1.3 4.1 4.1 5.1 6.2 1.1 2 2.3 5.3 2.6 7.2.5 2.2.2 5.6-.8 9-1.2 4.2-2.6 6.5-6.1 9.8-2.5 2.3-6.2 4.7-8.3 5.2-2.1.5-5.1 1-6.8 1-1.6 0-5-.7-7.5-1.5-2.4-.9-5.9-3-7.7-4.8-1.8-1.8-4-5-4.9-7.2-1-2.6-1.4-6-1.1-9.5.2-3 1.3-7.3 2.3-9.4 1.1-2.2 3.5-5.1 5.4-6.5 1.9-1.4 5.5-3.1 8-3.8 2.5-.6 6.1-.9 8-.6z\"/></svg>";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.monkLogoSVG = void 0;
|
|
4
|
+
exports.monkLogoSVG = '<svg xmlns="http://www.w3.org/2000/svg" width="785" height="210" viewBox="0 0 785 210"><path fill="#000000" fill-rule="evenodd" d="M338 7.1c8-.1 13 .5 21 2.5 5.9 1.4 14.7 4.5 20 7 5.2 2.5 12.2 6.5 15.5 8.9 3.3 2.3 9.1 7.4 12.9 11.1 3.7 3.8 8.8 9.6 11.1 12.9 2.4 3.3 5.9 9.1 7.8 13 2 3.8 4.5 9.9 5.7 13.5 1.1 3.6 2.5 9.4 3.2 13 .6 3.8.8 12 .5 20-.3 9.5-1.1 15.7-2.7 21-1.1 4.1-3.8 11.1-5.9 15.5-2.1 4.4-6.6 11.6-9.8 16-3.3 4.4-8.7 10.4-11.9 13.4-3.2 2.9-9.7 7.9-14.4 11-4.7 3.1-12.1 7.1-16.5 8.8-4.4 1.7-11.7 4.1-16.3 5.2-5.9 1.5-11.3 2.1-19.7 2.1-8.4 0-13.6-.6-19.3-2-4.2-1.2-10.2-3-13.2-4.1-3-1.2-7.5-3.1-10-4.4-2.5-1.3-7.6-4.5-11.5-7.2-3.9-2.7-10.3-8.3-14.3-12.4-4.1-4.1-9.3-10.3-11.7-13.9-2.3-3.6-5.6-9.2-7.2-12.5-1.7-3.3-4-8.9-5.1-12.5-1.1-3.6-2.6-9.2-3.3-12.5-.6-3.3-1.1-10.7-1.1-16.5 0-7.2.7-13.3 2.2-19.5 1.1-5 3.5-12.4 5.3-16.5 1.7-4.1 5.4-10.9 8.1-15 2.7-4.1 8.1-10.8 12-14.8 3.9-4.1 10-9.6 13.6-12.2 3.6-2.7 10.8-6.9 16-9.4 5.2-2.5 13.8-5.6 19-7 7-1.8 12.2-2.5 20-2.5zm-28.5 38.8c-4.7 2.3-10.7 6.4-14.5 9.9-3.6 3.2-8.4 8.8-10.7 12.3-2.3 3.5-5.3 9.3-6.7 12.9-1.3 3.6-2.9 10.3-3.6 15-.6 4.7-.9 11-.5 14 .3 3 1 7.8 1.6 10.5.6 2.8 2.8 8.6 4.9 13 2.2 4.4 5.7 10.3 8 13 2.3 2.8 6.5 6.9 9.3 9.3 2.9 2.3 8.3 5.8 12.2 7.7 3.9 1.9 9.9 4.1 13.5 4.9 3.6.9 10.8 1.6 16 1.6 5.2 0 12.2-.7 15.5-1.5 3.3-.8 9.8-3.4 14.5-5.7 6.6-3.2 10.2-5.9 16-11.7 5.3-5.3 8.8-10 11.7-15.6 2.3-4.4 4.9-11.2 5.8-15 1.3-5.2 1.6-9.9 1.2-18.5-.3-7.9-1.1-13.6-2.5-18-1.2-3.6-3.8-9.4-5.9-12.9-2.1-3.5-6.7-9.3-10.3-12.9-3.6-3.6-9.2-8-12.5-9.9-3.3-1.9-9.4-4.6-13.5-6-5.6-1.9-10.2-2.6-18-2.9-6.9-.2-12.8.1-17 1.1-3.6.8-10.1 3.2-14.5 5.4zm257.6-39 31.4.6.2 95.8c.2 52.6 0 95.7-.5 95.7-.4 0-27.7-24.3-60.7-54.1S468.4 82.5 437 54V31.5c0-12.4.3-22.7.7-22.9.5-.2 29.6 25.8 128.8 115.7zm167.4 0h20.8c11.4 0 20.9.3 21.2.8.2.4-12.4 13.5-28.1 29.2-15.7 15.7-37.1 37.4-66.9 68.1l47.3 47.2c25.9 26 47.2 47.8 47.2 48.5 0 .9-4.8 1.2-41.5 1.2L637 104.4zM8 7.4l98.1 98 96.9-97v193.5h-31v-57.5c0-31.6-.3-57.7-.7-57.9-.4-.3-15.2 13.9-64.8 63.4L8 51.4zm333 75.2c2 .3 4.7 1 6 1.5 1.4.5 4 2 5.8 3.4 1.8 1.3 4.1 4.1 5.1 6.2 1.1 2 2.3 5.3 2.6 7.2.5 2.2.2 5.6-.8 9-1.2 4.2-2.6 6.5-6.1 9.8-2.5 2.3-6.2 4.7-8.3 5.2-2.1.5-5.1 1-6.8 1-1.6 0-5-.7-7.5-1.5-2.4-.9-5.9-3-7.7-4.8-1.8-1.8-4-5-4.9-7.2-1-2.6-1.4-6-1.1-9.5.2-3 1.3-7.3 2.3-9.4 1.1-2.2 3.5-5.1 5.4-6.5 1.9-1.4 5.5-3.1 8-3.8 2.5-.6 6.1-.9 8-.6z"/></svg>';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Props of the CancelButton component.
|
|
4
|
+
*/
|
|
5
|
+
export interface CancelButtonProps {
|
|
6
|
+
/**
|
|
7
|
+
* Callback called when the user clicks on the button.
|
|
8
|
+
*/
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Component implementing a cancel button displayed in the Camera HUD.
|
|
13
|
+
*/
|
|
14
|
+
export declare function CancelButton({ onCancel }: CancelButtonProps): JSX.Element;
|
|
@@ -11,18 +11,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
14
|
+
exports.CancelButton = 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 hooks_1 = require("
|
|
18
|
+
var hooks_1 = require("../../hooks");
|
|
19
19
|
/**
|
|
20
|
-
* Component implementing a cancel button displayed in the
|
|
20
|
+
* Component implementing a cancel button displayed in the Camera HUD.
|
|
21
21
|
*/
|
|
22
|
-
function
|
|
22
|
+
function CancelButton(_a) {
|
|
23
23
|
var onCancel = _a.onCancel;
|
|
24
24
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
25
|
-
var primaryColor = (0, hooks_1.
|
|
25
|
+
var primaryColor = (0, hooks_1.useColorBackground)();
|
|
26
26
|
return ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({ onClick: onCancel, primaryColor: primaryColor }, { children: t('photo.hud.addDamage.cancelBtn') })));
|
|
27
27
|
}
|
|
28
|
-
exports.
|
|
28
|
+
exports.CancelButton = CancelButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CancelButton, type CancelButtonProps } from './CancelButton';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelButton = void 0;
|
|
4
|
+
var CancelButton_1 = require("./CancelButton");
|
|
5
|
+
Object.defineProperty(exports, "CancelButton", { enumerable: true, get: function () { return CancelButton_1.CancelButton; } });
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PixelDimensions } from '@monkvision/types';
|
|
3
3
|
/**
|
|
4
|
-
* Props of the
|
|
4
|
+
* Props of the CloseUpShot component.
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface CloseUpShotProps {
|
|
7
7
|
/**
|
|
8
8
|
* Callback called when the user cancels the Add Damage mode.
|
|
9
9
|
*/
|
|
10
10
|
onCancel?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Boolean indicating whether the counter should be displayed.
|
|
13
|
+
*
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
showCounter?: boolean;
|
|
11
17
|
/**
|
|
12
18
|
* The dimensions of the Camera video stream.
|
|
13
19
|
*/
|
|
@@ -15,6 +21,6 @@ export interface PhotoCaptureHUDElementsAddDamage2ndShotProps {
|
|
|
15
21
|
}
|
|
16
22
|
/**
|
|
17
23
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
|
|
18
|
-
* mode is ADD_DAMAGE_2ND_SHOT.
|
|
24
|
+
* mode is ADD_DAMAGE_2ND_SHOT | ADD_DAMAGE_PART_SELECT_SHOT.
|
|
19
25
|
*/
|
|
20
|
-
export declare function
|
|
26
|
+
export declare function CloseUpShot({ onCancel, showCounter, streamDimensions }: CloseUpShotProps): JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.CloseUpShot = void 0;
|
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
var react_i18next_1 = require("react-i18next");
|
|
17
|
+
var common_1 = require("@monkvision/common");
|
|
18
|
+
var CloseUpShot_styles_1 = require("./CloseUpShot.styles");
|
|
19
|
+
var hooks_1 = require("./hooks");
|
|
20
|
+
var Counter_1 = require("../Counter");
|
|
21
|
+
var CancelButton_1 = require("../CancelButton");
|
|
22
|
+
var types_1 = require("../../types");
|
|
23
|
+
/**
|
|
24
|
+
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
|
|
25
|
+
* mode is ADD_DAMAGE_2ND_SHOT | ADD_DAMAGE_PART_SELECT_SHOT.
|
|
26
|
+
*/
|
|
27
|
+
function CloseUpShot(_a) {
|
|
28
|
+
var onCancel = _a.onCancel, _b = _a.showCounter, showCounter = _b === void 0 ? true : _b, streamDimensions = _a.streamDimensions;
|
|
29
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
|
30
|
+
var style = (0, hooks_1.useCloseUpShotStyle)();
|
|
31
|
+
var aspectRatio = (0, common_1.getAspectRatio)(streamDimensions);
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: CloseUpShot_styles_1.styles['container'] }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: __assign(__assign({}, CloseUpShot_styles_1.styles['frameContainer']), { aspectRatio: aspectRatio }), "data-testid": 'frame-container' }, { children: (0, jsx_runtime_1.jsx)("div", { style: style.frame }) })), (0, jsx_runtime_1.jsxs)("div", __assign({ style: style.top }, { children: [showCounter && (0, jsx_runtime_1.jsx)(Counter_1.Counter, { mode: types_1.CaptureMode.ADD_DAMAGE_2ND_SHOT }), (0, jsx_runtime_1.jsx)(CancelButton_1.CancelButton, { onCancel: onCancel })] })), (0, jsx_runtime_1.jsx)("div", __assign({ style: style.infoCloseup, "data-testid": 'label' }, { children: t('photo.hud.addDamage.infoCloseup') }))] })));
|
|
33
|
+
}
|
|
34
|
+
exports.CloseUpShot = CloseUpShot;
|
|
@@ -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("../HUDButtons/HUDButtons.styles");
|
|
5
5
|
exports.styles = {
|
|
6
6
|
container: {
|
|
7
7
|
position: 'absolute',
|
|
@@ -28,11 +28,12 @@ exports.styles = {
|
|
|
28
28
|
},
|
|
29
29
|
topLandscape: {
|
|
30
30
|
__media: { landscape: true },
|
|
31
|
-
right: "".concat(
|
|
31
|
+
right: "".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 2, "px"),
|
|
32
32
|
},
|
|
33
33
|
frameContainer: {
|
|
34
34
|
position: 'absolute',
|
|
35
35
|
width: '100%',
|
|
36
|
+
maxHeight: '100%',
|
|
36
37
|
},
|
|
37
38
|
frame: {
|
|
38
39
|
position: 'absolute',
|
|
@@ -72,6 +73,6 @@ exports.styles = {
|
|
|
72
73
|
},
|
|
73
74
|
infoCloseupPortrait: {
|
|
74
75
|
__media: { portrait: true },
|
|
75
|
-
bottom: "".concat(
|
|
76
|
+
bottom: "".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 1.5, "px"),
|
|
76
77
|
},
|
|
77
78
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
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.useCloseUpShotStyle = void 0;
|
|
15
|
+
var common_1 = require("@monkvision/common");
|
|
16
|
+
var CloseUpShot_styles_1 = require("./CloseUpShot.styles");
|
|
17
|
+
function useCloseUpShotStyle() {
|
|
18
|
+
var responsive = (0, common_1.useResponsiveStyle)().responsive;
|
|
19
|
+
return {
|
|
20
|
+
top: __assign(__assign({}, CloseUpShot_styles_1.styles['top']), responsive(CloseUpShot_styles_1.styles['topLandscape'])),
|
|
21
|
+
frame: __assign(__assign({}, CloseUpShot_styles_1.styles['frame']), responsive(CloseUpShot_styles_1.styles['framePortrait'])),
|
|
22
|
+
infoCloseup: __assign(__assign({}, CloseUpShot_styles_1.styles['infoCloseup']), responsive(CloseUpShot_styles_1.styles['infoCloseupPortrait'])),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
exports.useCloseUpShotStyle = useCloseUpShotStyle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CloseUpShot, type CloseUpShotProps as PhotoCaptureHUDElementsAddDamage2ndShotProps, } from './CloseUpShot';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloseUpShot = void 0;
|
|
4
|
+
var CloseUpShot_1 = require("./CloseUpShot");
|
|
5
|
+
Object.defineProperty(exports, "CloseUpShot", { enumerable: true, get: function () { return CloseUpShot_1.CloseUpShot; } });
|
|
@@ -11,17 +11,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.
|
|
14
|
+
exports.Counter = void 0;
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var
|
|
17
|
-
var hooks_1 = require("
|
|
16
|
+
var Counter_styles_1 = require("./Counter.styles");
|
|
17
|
+
var hooks_1 = require("../../hooks");
|
|
18
18
|
var hooks_2 = require("./hooks");
|
|
19
19
|
/**
|
|
20
|
-
* Component that implements an indicator of pictures taken during the
|
|
20
|
+
* Component that implements an indicator of pictures taken during the capture process.
|
|
21
21
|
*/
|
|
22
|
-
function
|
|
23
|
-
var label = (0, hooks_2.
|
|
24
|
-
var backgroundColor = (0, hooks_1.
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ style: __assign(__assign({},
|
|
22
|
+
function Counter(props) {
|
|
23
|
+
var label = (0, hooks_2.useCounterLabel)(props);
|
|
24
|
+
var backgroundColor = (0, hooks_1.useColorBackground)();
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", __assign({ style: __assign(__assign({}, Counter_styles_1.styles['counter']), { backgroundColor: backgroundColor }), "data-testid": 'damage-counter' }, { children: label })));
|
|
26
26
|
}
|
|
27
|
-
exports.
|
|
27
|
+
exports.Counter = Counter;
|
package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.d.ts
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CaptureMode } from '../../types';
|
|
2
2
|
/**
|
|
3
|
-
* Props of the
|
|
3
|
+
* Props of the Counter component.
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type CounterProps = {
|
|
6
6
|
/**
|
|
7
7
|
* The current mode of the PhotoCapture component.
|
|
8
8
|
*/
|
|
9
|
-
mode:
|
|
9
|
+
mode: CaptureMode.SIGHT;
|
|
10
10
|
/**
|
|
11
11
|
* The total number of sights given to the PhotoCapture component.
|
|
12
12
|
*/
|
|
@@ -19,6 +19,6 @@ export type PhotoCaptureHUDCounterProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* The current mode of the PhotoCapture component.
|
|
21
21
|
*/
|
|
22
|
-
mode:
|
|
22
|
+
mode: CaptureMode.ADD_DAMAGE_1ST_SHOT | CaptureMode.ADD_DAMAGE_2ND_SHOT | CaptureMode.ADD_DAMAGE_PART_SELECT | CaptureMode.ADD_DAMAGE_PART_SELECT_SHOT;
|
|
23
23
|
};
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function useCounterLabel(props: CounterProps): string;
|
package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.js
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useCounterLabel = void 0;
|
|
4
4
|
var react_i18next_1 = require("react-i18next");
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var types_1 = require("../../types");
|
|
6
|
+
function useCounterLabel(props) {
|
|
7
7
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
8
|
-
if (props.mode ===
|
|
8
|
+
if (props.mode === types_1.CaptureMode.SIGHT) {
|
|
9
9
|
return "".concat(props.sightsTaken, " / ").concat(props.totalSights);
|
|
10
10
|
}
|
|
11
|
-
if (props.mode ===
|
|
11
|
+
if (props.mode === types_1.CaptureMode.ADD_DAMAGE_1ST_SHOT) {
|
|
12
12
|
return t('photo.hud.addDamage.damagedPartCounter');
|
|
13
13
|
}
|
|
14
14
|
return t('photo.hud.addDamage.closeupPictureCounter');
|
|
15
15
|
}
|
|
16
|
-
exports.
|
|
16
|
+
exports.useCounterLabel = useCounterLabel;
|