@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.
Files changed (244) hide show
  1. package/README.md +134 -19
  2. package/lib/DamageDisclosure/DamageDisclosure.d.ts +44 -0
  3. package/lib/DamageDisclosure/DamageDisclosure.js +114 -0
  4. package/lib/DamageDisclosure/DamageDisclosure.styles.js +33 -0
  5. package/lib/DamageDisclosure/DamageDisclosureHOC.d.ts +27 -0
  6. package/lib/DamageDisclosure/DamageDisclosureHOC.js +45 -0
  7. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.d.ts +73 -0
  8. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.js +49 -0
  9. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.js +24 -0
  10. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.d.ts +52 -0
  11. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.js +22 -0
  12. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.d.ts +1 -0
  13. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.js +5 -0
  14. package/lib/DamageDisclosure/DamageDisclosureHUD/index.d.ts +2 -0
  15. package/lib/DamageDisclosure/DamageDisclosureHUD/index.js +20 -0
  16. package/lib/DamageDisclosure/hooks/index.d.ts +1 -0
  17. package/lib/DamageDisclosure/hooks/index.js +17 -0
  18. package/lib/DamageDisclosure/hooks/useDamageDisclosureState.d.ts +30 -0
  19. package/lib/DamageDisclosure/hooks/useDamageDisclosureState.js +55 -0
  20. package/lib/DamageDisclosure/index.d.ts +3 -0
  21. package/lib/DamageDisclosure/index.js +20 -0
  22. package/lib/PhotoCapture/PhotoCapture.d.ts +7 -5
  23. package/lib/PhotoCapture/PhotoCapture.js +27 -21
  24. package/lib/PhotoCapture/PhotoCapture.styles.js +0 -24
  25. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.d.ts +24 -7
  26. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.js +4 -4
  27. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.d.ts +21 -4
  28. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.js +10 -8
  29. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.d.ts +3 -4
  30. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.js +5 -4
  31. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.d.ts +1 -1
  32. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.js +4 -3
  33. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.d.ts +3 -3
  34. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.js +5 -4
  35. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.styles.js +2 -2
  36. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSlider.styles.js +2 -2
  37. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/hooks.d.ts +2 -2
  38. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.d.ts +3 -3
  39. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.js +4 -4
  40. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.styles.js +3 -3
  41. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/index.d.ts +0 -1
  42. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/index.js +0 -1
  43. package/lib/PhotoCapture/PhotoCaptureHUD/index.d.ts +0 -6
  44. package/lib/PhotoCapture/PhotoCaptureHUD/index.js +0 -6
  45. package/lib/PhotoCapture/hooks/index.d.ts +0 -8
  46. package/lib/PhotoCapture/hooks/index.js +0 -8
  47. package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.d.ts +3 -0
  48. package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.js +1 -1
  49. package/lib/PhotoCapture/hooks/usePhotoCaptureTutorial.d.ts +2 -2
  50. package/lib/VideoCapture/VideoCapture.d.ts +28 -0
  51. package/lib/VideoCapture/VideoCapture.js +81 -0
  52. package/lib/VideoCapture/VideoCapture.styles.js +9 -0
  53. package/lib/VideoCapture/VideoCaptureHOC.d.ts +27 -0
  54. package/lib/VideoCapture/VideoCaptureHOC.js +45 -0
  55. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.d.ts +44 -0
  56. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.js +158 -0
  57. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.js +14 -0
  58. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.d.ts +6 -0
  59. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.js +38 -0
  60. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.types.d.ts +33 -0
  61. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.types.js +2 -0
  62. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.d.ts +4873 -0
  63. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.js +105 -0
  64. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.d.ts +2 -0
  65. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.js +5 -0
  66. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.d.ts +14 -0
  67. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.js +30 -0
  68. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.d.ts +1 -0
  69. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.js +5 -0
  70. package/lib/VideoCapture/VideoCaptureHUD/index.d.ts +1 -0
  71. package/lib/VideoCapture/VideoCaptureHUD/index.js +5 -0
  72. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.d.ts +23 -0
  73. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.js +26 -0
  74. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.d.ts +12 -0
  75. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.js +72 -0
  76. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.d.ts +1 -0
  77. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.js +5 -0
  78. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.d.ts +7 -0
  79. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.js +32 -0
  80. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.d.ts +12 -0
  81. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.js +87 -0
  82. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.d.ts +22 -0
  83. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.js +2 -0
  84. package/lib/VideoCapture/VideoCapturePageLayout/index.d.ts +3 -0
  85. package/lib/VideoCapture/VideoCapturePageLayout/index.js +7 -0
  86. package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.d.ts +19 -0
  87. package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.js +107 -0
  88. package/lib/VideoCapture/VideoCapturePermissions/index.d.ts +1 -0
  89. package/lib/VideoCapture/VideoCapturePermissions/index.js +5 -0
  90. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.d.ts +7 -0
  91. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.js +44 -0
  92. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.d.ts +2437 -0
  93. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.js +60 -0
  94. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.types.d.ts +34 -0
  95. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.types.js +2 -0
  96. package/lib/VideoCapture/VideoCaptureProcessing/index.d.ts +2 -0
  97. package/lib/VideoCapture/VideoCaptureProcessing/index.js +5 -0
  98. package/lib/VideoCapture/hooks/index.d.ts +5 -0
  99. package/lib/VideoCapture/hooks/index.js +21 -0
  100. package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.d.ts +18 -0
  101. package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.js +45 -0
  102. package/lib/VideoCapture/hooks/useFastMovementsDetection/index.d.ts +2 -0
  103. package/lib/VideoCapture/hooks/useFastMovementsDetection/index.js +20 -0
  104. package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.d.ts +34 -0
  105. package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.js +64 -0
  106. package/lib/VideoCapture/hooks/useFrameSelection/index.d.ts +1 -0
  107. package/lib/VideoCapture/hooks/useFrameSelection/index.js +17 -0
  108. package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.d.ts +16 -0
  109. package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.js +62 -0
  110. package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.d.ts +43 -0
  111. package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.js +50 -0
  112. package/lib/VideoCapture/hooks/useVehicleWalkaround.d.ts +26 -0
  113. package/lib/VideoCapture/hooks/useVehicleWalkaround.js +39 -0
  114. package/lib/VideoCapture/hooks/useVideoRecording.d.ts +97 -0
  115. package/lib/VideoCapture/hooks/useVideoRecording.js +140 -0
  116. package/lib/VideoCapture/hooks/useVideoUploadQueue.d.ts +40 -0
  117. package/lib/VideoCapture/hooks/useVideoUploadQueue.js +51 -0
  118. package/lib/VideoCapture/index.d.ts +2 -0
  119. package/lib/VideoCapture/index.js +5 -0
  120. package/lib/assets/logos.asset.d.ts +1 -0
  121. package/lib/assets/logos.asset.js +4 -0
  122. package/lib/components/CancelButton/CancelButton.d.ts +14 -0
  123. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/PhotoCaptureHUDCancelButton.js → components/CancelButton/CancelButton.js} +6 -6
  124. package/lib/components/CancelButton/index.d.ts +1 -0
  125. package/lib/components/CancelButton/index.js +5 -0
  126. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.d.ts → components/CloseUpShot/CloseUpShot.d.ts} +10 -4
  127. package/lib/components/CloseUpShot/CloseUpShot.js +34 -0
  128. package/lib/components/CloseUpShot/CloseUpShot.styles.d.ts +2 -0
  129. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.styles.js → components/CloseUpShot/CloseUpShot.styles.js} +4 -3
  130. package/lib/components/CloseUpShot/hooks.d.ts +7 -0
  131. package/lib/components/CloseUpShot/hooks.js +25 -0
  132. package/lib/components/CloseUpShot/index.d.ts +1 -0
  133. package/lib/components/CloseUpShot/index.js +5 -0
  134. package/lib/components/Counter/Counter.d.ts +6 -0
  135. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.js → components/Counter/Counter.js} +9 -9
  136. package/lib/components/Counter/Counter.styles.d.ts +2 -0
  137. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.d.ts +6 -6
  138. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.js +6 -6
  139. package/lib/components/Counter/index.d.ts +2 -0
  140. package/lib/components/Counter/index.js +5 -0
  141. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.d.ts → components/HUDButtons/HUDButtons.d.ts} +4 -4
  142. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.js → components/HUDButtons/HUDButtons.js} +5 -5
  143. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons → components/HUDButtons}/hooks.d.ts +3 -3
  144. package/lib/components/HUDButtons/hooks.js +44 -0
  145. package/lib/components/HUDButtons/index.d.ts +1 -0
  146. package/lib/components/HUDButtons/index.js +5 -0
  147. package/lib/components/HUDOverlay/HUDOverlay.d.ts +7 -0
  148. package/lib/components/HUDOverlay/HUDOverlay.js +36 -0
  149. package/lib/components/HUDOverlay/HUDOverlay.styles.d.ts +2 -0
  150. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay → components/HUDOverlay}/hooks.d.ts +4 -4
  151. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay → components/HUDOverlay}/hooks.js +3 -3
  152. package/lib/components/HUDOverlay/index.d.ts +2 -0
  153. package/lib/components/HUDOverlay/index.js +5 -0
  154. package/lib/components/OrientationEnforcer/OrientationEnforcer.d.ts +16 -0
  155. package/lib/components/OrientationEnforcer/OrientationEnforcer.js +34 -0
  156. package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.d.ts +815 -0
  157. package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.js +49 -0
  158. package/lib/components/OrientationEnforcer/index.d.ts +1 -0
  159. package/lib/components/OrientationEnforcer/index.js +5 -0
  160. package/lib/components/PartSelection/PartSelection.d.ts +40 -0
  161. package/lib/components/PartSelection/PartSelection.js +39 -0
  162. package/lib/components/PartSelection/PartSelection.styles.d.ts +2 -0
  163. package/lib/components/PartSelection/PartSelection.styles.js +54 -0
  164. package/lib/components/PartSelection/index.d.ts +2 -0
  165. package/lib/components/PartSelection/index.js +5 -0
  166. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.d.ts → components/ZoomOutShot/ZoomOutShot.d.ts} +3 -3
  167. package/lib/components/ZoomOutShot/ZoomOutShot.js +38 -0
  168. package/lib/components/ZoomOutShot/ZoomOutShot.styles.d.ts +2 -0
  169. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.styles.js → components/ZoomOutShot/ZoomOutShot.styles.js} +3 -3
  170. package/lib/components/ZoomOutShot/hooks.d.ts +6 -0
  171. package/lib/components/ZoomOutShot/hooks.js +24 -0
  172. package/lib/components/ZoomOutShot/index.d.ts +1 -0
  173. package/lib/components/ZoomOutShot/index.js +5 -0
  174. package/lib/components/index.d.ts +8 -0
  175. package/lib/components/index.js +24 -0
  176. package/lib/errors.d.ts +3 -0
  177. package/lib/errors.js +7 -0
  178. package/lib/hooks/index.d.ts +10 -0
  179. package/lib/hooks/index.js +26 -0
  180. package/lib/{PhotoCapture/hooks → hooks}/useAdaptiveCameraConfig.d.ts +2 -2
  181. package/lib/hooks/useAddDamageMode.d.ts +56 -0
  182. package/lib/hooks/useAddDamageMode.js +76 -0
  183. package/lib/{PhotoCapture/hooks → hooks}/useBadConnectionWarning.d.ts +2 -2
  184. package/lib/hooks/useColorBackground.d.ts +4 -0
  185. package/lib/hooks/useColorBackground.js +15 -0
  186. package/lib/hooks/useEnforceOrientation.d.ts +6 -0
  187. package/lib/hooks/useEnforceOrientation.js +14 -0
  188. package/lib/{PhotoCapture/hooks → hooks}/usePhotoCaptureImages.js +1 -1
  189. package/lib/{PhotoCapture/hooks → hooks}/usePictureTaken.d.ts +4 -4
  190. package/lib/hooks/usePictureTaken.js +58 -0
  191. package/lib/{PhotoCapture/hooks → hooks}/useStartTasksOnComplete.d.ts +6 -6
  192. package/lib/{PhotoCapture/hooks → hooks}/useStartTasksOnComplete.js +3 -1
  193. package/lib/{PhotoCapture/hooks → hooks}/useUploadQueue.d.ts +24 -7
  194. package/lib/{PhotoCapture/hooks → hooks}/useUploadQueue.js +14 -4
  195. package/lib/index.d.ts +2 -0
  196. package/lib/index.js +2 -0
  197. package/lib/translations/de.json +64 -5
  198. package/lib/translations/en.json +64 -5
  199. package/lib/translations/fr.json +64 -5
  200. package/lib/translations/nl.json +64 -5
  201. package/lib/types.d.ts +102 -0
  202. package/lib/types.js +43 -0
  203. package/package.json +15 -15
  204. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/hooks.js +0 -44
  205. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/index.d.ts +0 -1
  206. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/index.js +0 -5
  207. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/PhotoCaptureHUDCancelButton.d.ts +0 -14
  208. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/index.d.ts +0 -1
  209. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/index.js +0 -5
  210. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.d.ts +0 -6
  211. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/index.d.ts +0 -2
  212. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/index.js +0 -5
  213. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.js +0 -38
  214. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/hooks.d.ts +0 -6
  215. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/hooks.js +0 -24
  216. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/index.d.ts +0 -1
  217. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/index.js +0 -5
  218. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.js +0 -40
  219. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/hooks.d.ts +0 -7
  220. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/hooks.js +0 -25
  221. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/index.d.ts +0 -1
  222. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/index.js +0 -5
  223. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.d.ts +0 -7
  224. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.js +0 -36
  225. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/index.d.ts +0 -2
  226. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/index.js +0 -5
  227. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDButtonBackground.d.ts +0 -4
  228. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDButtonBackground.js +0 -13
  229. package/lib/PhotoCapture/hooks/useAddDamageMode.d.ts +0 -42
  230. package/lib/PhotoCapture/hooks/useAddDamageMode.js +0 -57
  231. package/lib/PhotoCapture/hooks/usePictureTaken.js +0 -46
  232. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.styles.d.ts → DamageDisclosure/DamageDisclosure.styles.d.ts} +0 -0
  233. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.styles.d.ts → DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.d.ts} +0 -0
  234. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.styles.d.ts → VideoCapture/VideoCapture.styles.d.ts} +0 -0
  235. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.styles.d.ts → VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.d.ts} +0 -0
  236. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.styles.js → components/Counter/Counter.styles.js} +0 -0
  237. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles.d.ts → components/HUDButtons/HUDButtons.styles.d.ts} +0 -0
  238. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles.js → components/HUDButtons/HUDButtons.styles.js} +0 -0
  239. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.styles.js → components/HUDOverlay/HUDOverlay.styles.js} +0 -0
  240. /package/lib/{PhotoCapture/hooks → hooks}/useAdaptiveCameraConfig.js +0 -0
  241. /package/lib/{PhotoCapture/hooks → hooks}/useBadConnectionWarning.js +0 -0
  242. /package/lib/{PhotoCapture/hooks → hooks}/usePhotoCaptureImages.d.ts +0 -0
  243. /package/lib/{PhotoCapture/hooks → hooks}/useTracking.d.ts +0 -0
  244. /package/lib/{PhotoCapture/hooks → hooks}/useTracking.js +0 -0
@@ -0,0 +1,49 @@
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.useOrientationEnforcerStyles = exports.styles = void 0;
15
+ var common_1 = require("@monkvision/common");
16
+ exports.styles = {
17
+ container: {
18
+ position: 'fixed',
19
+ inset: 0,
20
+ zIndex: 999999,
21
+ display: 'flex',
22
+ justifyContent: 'center',
23
+ alignItems: 'center',
24
+ flexDirection: 'column',
25
+ boxSizing: 'border-box',
26
+ padding: '50px 10%',
27
+ },
28
+ titleContainer: {
29
+ display: 'flex',
30
+ alignItems: 'center',
31
+ },
32
+ title: {
33
+ fontSize: 18,
34
+ marginLeft: 16,
35
+ },
36
+ description: {
37
+ fontSize: 16,
38
+ paddingTop: 16,
39
+ opacity: 0.8,
40
+ textAlign: 'center',
41
+ },
42
+ };
43
+ function useOrientationEnforcerStyles() {
44
+ var palette = (0, common_1.useMonkTheme)().palette;
45
+ return {
46
+ containerStyle: __assign(__assign({}, exports.styles['container']), { backgroundColor: palette.background.base }),
47
+ };
48
+ }
49
+ exports.useOrientationEnforcerStyles = useOrientationEnforcerStyles;
@@ -0,0 +1 @@
1
+ export { OrientationEnforcer, type OrientationEnforcerProps } from './OrientationEnforcer';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrientationEnforcer = void 0;
4
+ var OrientationEnforcer_1 = require("./OrientationEnforcer");
5
+ Object.defineProperty(exports, "OrientationEnforcer", { enumerable: true, get: function () { return OrientationEnforcer_1.OrientationEnforcer; } });
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import { VehiclePart, VehicleType } from '@monkvision/types';
3
+ /**
4
+ * Props of PartSelection component.
5
+ */
6
+ export interface PartSelectionProps {
7
+ /**
8
+ * Vehicle type of the wireframe to display.
9
+ */
10
+ vehicleType: VehicleType;
11
+ /**
12
+ * Current vehicle parts selected to take a picture of.
13
+ */
14
+ vehicleParts: VehiclePart[];
15
+ /**
16
+ * Boolean indicating if the vehicle part selector is currently displayed.
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * Callback called when the user cancels the Add Damage mode.
21
+ */
22
+ onCancel?: () => void;
23
+ /**
24
+ * Callback called when the user selects the parts to take a picture of.
25
+ */
26
+ onAddDamagePartsSelected?: (parts: VehiclePart[]) => void;
27
+ /**
28
+ * Callback called when the user clicks on the "Validate" button of the Add Damage mode.
29
+ */
30
+ onValidateVehicleParts?: () => void;
31
+ /**
32
+ * The maximum number of parts that can be selected.
33
+ */
34
+ maxSelectableParts?: number;
35
+ }
36
+ /**
37
+ * Component that displays a vehicle wireframe on top of the Camera Preview that is used
38
+ * to select the parts of the vehicle that the user wants to take a picture of.
39
+ */
40
+ export declare function PartSelection({ vehicleType, vehicleParts, disabled, onCancel, onAddDamagePartsSelected, onValidateVehicleParts, maxSelectableParts, }: PartSelectionProps): JSX.Element | null;
@@ -0,0 +1,39 @@
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.PartSelection = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var common_1 = require("@monkvision/common");
17
+ var common_ui_web_1 = require("@monkvision/common-ui-web");
18
+ var react_i18next_1 = require("react-i18next");
19
+ var PartSelection_styles_1 = require("./PartSelection.styles");
20
+ var hooks_1 = require("../../hooks");
21
+ /**
22
+ * Component that displays a vehicle wireframe on top of the Camera Preview that is used
23
+ * to select the parts of the vehicle that the user wants to take a picture of.
24
+ */
25
+ function PartSelection(_a) {
26
+ var vehicleType = _a.vehicleType, vehicleParts = _a.vehicleParts, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.onCancel, onCancel = _c === void 0 ? function () { } : _c, _d = _a.onAddDamagePartsSelected, onAddDamagePartsSelected = _d === void 0 ? function () { } : _d, _e = _a.onValidateVehicleParts, onValidateVehicleParts = _e === void 0 ? function () { } : _e, _f = _a.maxSelectableParts, maxSelectableParts = _f === void 0 ? 1 : _f;
27
+ var palette = (0, common_1.useMonkTheme)().palette;
28
+ var _g = (0, react_i18next_1.useTranslation)(), i18n = _g.i18n, t = _g.t;
29
+ var backgroundColor = (0, hooks_1.useColorBackground)(0.9);
30
+ var buttonColor = (0, hooks_1.useColorBackground)();
31
+ if (!vehicleType) {
32
+ throw new Error('Vehicle type state is not found from useMonkAppState');
33
+ }
34
+ var instruction = maxSelectableParts === 1 ? 'photo.hud.addDamage.selectPart' : 'photo.hud.addDamage.selectParts';
35
+ return disabled ? null : ((0, jsx_runtime_1.jsxs)("div", __assign({ style: __assign(__assign({}, PartSelection_styles_1.styles['container']), { background: backgroundColor }) }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: PartSelection_styles_1.styles['vehicleSelect'] }, { children: (0, jsx_runtime_1.jsx)(common_ui_web_1.VehiclePartSelection, { vehicleType: vehicleType, maxSelectableParts: maxSelectableParts, onPartsSelected: onAddDamagePartsSelected }) })), (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { primaryColor: buttonColor, onClick: onCancel, style: PartSelection_styles_1.styles['closeBtn'], icon: 'close' }), (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { primaryColor: vehicleParts.length ? palette.primary.base : palette.text.disabled, onClick: onValidateVehicleParts, style: PartSelection_styles_1.styles['validateBtn'], disabled: vehicleParts.length === 0, icon: 'check' }), (0, jsx_runtime_1.jsxs)("div", __assign({ style: PartSelection_styles_1.styles['labelsContainer'] }, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({ primaryColor: palette.text.white, secondaryColor: palette.text.black, style: PartSelection_styles_1.styles['tutoLabel'] }, { children: t(instruction) })) }), vehicleParts.length > 0 && ((0, jsx_runtime_1.jsx)("span", __assign({ style: PartSelection_styles_1.styles['partsLabel'] }, { children: (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({ primaryColor: palette.text.white, secondaryColor: palette.text.black }, { children: vehicleParts
36
+ .map(function (part) { return common_1.vehiclePartLabels[part][(0, common_1.getLanguage)(i18n.language)]; })
37
+ .join(', ') })) })))] }))] })));
38
+ }
39
+ exports.PartSelection = PartSelection;
@@ -0,0 +1,2 @@
1
+ import { Styles } from '@monkvision/types';
2
+ export declare const styles: Styles;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.styles = void 0;
4
+ exports.styles = {
5
+ container: {
6
+ position: 'fixed',
7
+ display: 'flex',
8
+ flexDirection: 'column',
9
+ justifyItems: 'center',
10
+ alignItems: 'center',
11
+ inset: 0,
12
+ },
13
+ vehicleSelect: {
14
+ alignSelf: 'stretch',
15
+ justifySelf: 'stretch',
16
+ position: 'fixed',
17
+ height: '85%',
18
+ width: '75%',
19
+ top: '50%',
20
+ left: '50%',
21
+ transform: 'translate(-50%, -50%)',
22
+ zIndex: 9,
23
+ },
24
+ labelsContainer: {
25
+ position: 'fixed',
26
+ display: 'flex',
27
+ flexDirection: 'column',
28
+ justifyContent: 'space-between',
29
+ alignItems: 'center',
30
+ top: '10px',
31
+ bottom: '10px',
32
+ width: '90%',
33
+ },
34
+ partsLabel: {
35
+ display: 'flex',
36
+ justifyContent: 'center',
37
+ },
38
+ tutoLabel: {
39
+ display: 'flex',
40
+ justifyContent: 'center',
41
+ },
42
+ closeBtn: {
43
+ position: 'fixed',
44
+ top: '5px',
45
+ left: '5px',
46
+ },
47
+ validateBtn: {
48
+ position: 'fixed',
49
+ top: '50%',
50
+ right: '10px',
51
+ transform: 'translate(-50%, -50%)',
52
+ zIndex: 10,
53
+ },
54
+ };
@@ -0,0 +1,2 @@
1
+ export { PartSelection } from './PartSelection';
2
+ export { type PartSelectionProps } from './PartSelection';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PartSelection = void 0;
4
+ var PartSelection_1 = require("./PartSelection");
5
+ Object.defineProperty(exports, "PartSelection", { enumerable: true, get: function () { return PartSelection_1.PartSelection; } });
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  /**
3
- * Props of the PhotoCaptureHUDElementsAddDamage1stShot component.
3
+ * Props of the ZoomOutShot component.
4
4
  */
5
- export interface PhotoCaptureHUDElementsAddDamage1stShotProps {
5
+ export interface ZoomOutShotProps {
6
6
  /**
7
7
  * Callback called when the user cancels the Add Damage mode.
8
8
  */
@@ -12,4 +12,4 @@ export interface PhotoCaptureHUDElementsAddDamage1stShotProps {
12
12
  * Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
13
13
  * mode is ADD_DAMAGE_1ST_SHOT.
14
14
  */
15
- export declare function PhotoCaptureHUDElementsAddDamage1stShot({ onCancel, }: PhotoCaptureHUDElementsAddDamage1stShotProps): JSX.Element;
15
+ export declare function ZoomOutShot({ onCancel }: ZoomOutShotProps): JSX.Element;
@@ -0,0 +1,38 @@
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.ZoomOutShot = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_1 = require("react");
17
+ var react_i18next_1 = require("react-i18next");
18
+ var common_ui_web_1 = require("@monkvision/common-ui-web");
19
+ var ZoomOutShot_styles_1 = require("./ZoomOutShot.styles");
20
+ var hooks_1 = require("../../hooks");
21
+ var types_1 = require("../../types");
22
+ var assets_1 = require("../../assets");
23
+ var hooks_2 = require("./hooks");
24
+ var Counter_1 = require("../Counter");
25
+ var CancelButton_1 = require("../CancelButton");
26
+ /**
27
+ * Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
28
+ * mode is ADD_DAMAGE_1ST_SHOT.
29
+ */
30
+ function ZoomOutShot(_a) {
31
+ var onCancel = _a.onCancel;
32
+ var _b = (0, react_1.useState)(true), showInfoPopup = _b[0], setShowInfoPopup = _b[1];
33
+ var t = (0, react_i18next_1.useTranslation)().t;
34
+ var primaryColor = (0, hooks_1.useColorBackground)();
35
+ var style = (0, hooks_2.useZoomOutShotStyles)();
36
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: ZoomOutShot_styles_1.styles['container'] }, { children: [(0, jsx_runtime_1.jsx)(common_ui_web_1.DynamicSVG, { style: ZoomOutShot_styles_1.styles['svg'], svg: assets_1.crosshairSvg }), (0, jsx_runtime_1.jsxs)("div", __assign({ style: style.top }, { children: [(0, jsx_runtime_1.jsx)(Counter_1.Counter, { mode: types_1.CaptureMode.ADD_DAMAGE_1ST_SHOT }), (0, jsx_runtime_1.jsx)(CancelButton_1.CancelButton, { onCancel: onCancel })] })), showInfoPopup && ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({ icon: 'close', primaryColor: primaryColor, style: style.infoBtn, onClick: function () { return setShowInfoPopup(false); } }, { children: t('photo.hud.addDamage.infoBtn') })))] })));
37
+ }
38
+ exports.ZoomOutShot = ZoomOutShot;
@@ -0,0 +1,2 @@
1
+ import { Styles } from '@monkvision/types';
2
+ export declare const styles: Styles;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.styles = void 0;
4
- var PhotoCaptureHUDButtons_styles_1 = require("../PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles");
4
+ var HUDButtons_styles_1 = require("../HUDButtons/HUDButtons.styles");
5
5
  exports.styles = {
6
6
  container: {
7
7
  position: 'absolute',
@@ -28,7 +28,7 @@ exports.styles = {
28
28
  },
29
29
  topLandscape: {
30
30
  __media: { landscape: true },
31
- right: "".concat(PhotoCaptureHUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 2, "px"),
31
+ right: "".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 2, "px"),
32
32
  },
33
33
  infoBtn: {
34
34
  position: 'absolute',
@@ -37,7 +37,7 @@ exports.styles = {
37
37
  },
38
38
  infoBtnPortrait: {
39
39
  __media: { portrait: true },
40
- bottom: "".concat(PhotoCaptureHUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 1.5, "px"),
40
+ bottom: "".concat(HUDButtons_styles_1.PHOTO_CAPTURE_HUD_BUTTONS_BAR_WIDTH * 1.5, "px"),
41
41
  },
42
42
  svg: {
43
43
  width: '15%',
@@ -0,0 +1,6 @@
1
+ import { CSSProperties } from 'react';
2
+ export interface ZoomOutShotStyle {
3
+ top: CSSProperties;
4
+ infoBtn: CSSProperties;
5
+ }
6
+ export declare function useZoomOutShotStyles(): ZoomOutShotStyle;
@@ -0,0 +1,24 @@
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.useZoomOutShotStyles = void 0;
15
+ var common_1 = require("@monkvision/common");
16
+ var ZoomOutShot_styles_1 = require("./ZoomOutShot.styles");
17
+ function useZoomOutShotStyles() {
18
+ var responsive = (0, common_1.useResponsiveStyle)().responsive;
19
+ return {
20
+ top: __assign(__assign({}, ZoomOutShot_styles_1.styles['top']), responsive(ZoomOutShot_styles_1.styles['topLandscape'])),
21
+ infoBtn: __assign(__assign({}, ZoomOutShot_styles_1.styles['infoBtn']), responsive(ZoomOutShot_styles_1.styles['infoBtnPortrait'])),
22
+ };
23
+ }
24
+ exports.useZoomOutShotStyles = useZoomOutShotStyles;
@@ -0,0 +1 @@
1
+ export { ZoomOutShot, type ZoomOutShotProps } from './ZoomOutShot';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZoomOutShot = void 0;
4
+ var ZoomOutShot_1 = require("./ZoomOutShot");
5
+ Object.defineProperty(exports, "ZoomOutShot", { enumerable: true, get: function () { return ZoomOutShot_1.ZoomOutShot; } });
@@ -0,0 +1,8 @@
1
+ export * from './OrientationEnforcer';
2
+ export * from './CancelButton';
3
+ export * from './CloseUpShot';
4
+ export * from './HUDButtons';
5
+ export * from './PartSelection';
6
+ export * from './Counter';
7
+ export * from './ZoomOutShot';
8
+ export * from './HUDOverlay';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./OrientationEnforcer"), exports);
18
+ __exportStar(require("./CancelButton"), exports);
19
+ __exportStar(require("./CloseUpShot"), exports);
20
+ __exportStar(require("./HUDButtons"), exports);
21
+ __exportStar(require("./PartSelection"), exports);
22
+ __exportStar(require("./Counter"), exports);
23
+ __exportStar(require("./ZoomOutShot"), exports);
24
+ __exportStar(require("./HUDOverlay"), exports);
@@ -0,0 +1,3 @@
1
+ export declare enum PhotoCaptureErrorName {
2
+ MISSING_TASK_IN_INSPECTION = "PhotoCaptureMissingTaskInInspection"
3
+ }
package/lib/errors.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PhotoCaptureErrorName = void 0;
4
+ var PhotoCaptureErrorName;
5
+ (function (PhotoCaptureErrorName) {
6
+ PhotoCaptureErrorName["MISSING_TASK_IN_INSPECTION"] = "PhotoCaptureMissingTaskInInspection";
7
+ })(PhotoCaptureErrorName = exports.PhotoCaptureErrorName || (exports.PhotoCaptureErrorName = {}));
@@ -0,0 +1,10 @@
1
+ export * from './useStartTasksOnComplete';
2
+ export * from './useEnforceOrientation';
3
+ export * from './useColorBackground';
4
+ export * from './useAddDamageMode';
5
+ export * from './useUploadQueue';
6
+ export * from './usePictureTaken';
7
+ export * from './usePhotoCaptureImages';
8
+ export * from './useBadConnectionWarning';
9
+ export * from './useAdaptiveCameraConfig';
10
+ export * from './useTracking';
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useStartTasksOnComplete"), exports);
18
+ __exportStar(require("./useEnforceOrientation"), exports);
19
+ __exportStar(require("./useColorBackground"), exports);
20
+ __exportStar(require("./useAddDamageMode"), exports);
21
+ __exportStar(require("./useUploadQueue"), exports);
22
+ __exportStar(require("./usePictureTaken"), exports);
23
+ __exportStar(require("./usePhotoCaptureImages"), exports);
24
+ __exportStar(require("./useBadConnectionWarning"), exports);
25
+ __exportStar(require("./useAdaptiveCameraConfig"), exports);
26
+ __exportStar(require("./useTracking"), exports);
@@ -1,9 +1,9 @@
1
- import { CameraConfig, CaptureAppConfig } from '@monkvision/types';
1
+ import { CameraConfig, PhotoCaptureAppConfig } from '@monkvision/types';
2
2
  import { UploadEventHandlers } from './useUploadQueue';
3
3
  /**
4
4
  * Props passed to the useAdaptiveCameraConfig hook.
5
5
  */
6
- export type UseAdaptiveCameraConfigOptions = Pick<CaptureAppConfig, 'useAdaptiveImageQuality'> & {
6
+ export type UseAdaptiveCameraConfigOptions = Pick<PhotoCaptureAppConfig, 'useAdaptiveImageQuality'> & {
7
7
  /**
8
8
  * The camera config passed as a prop to the PhotoCapture component.
9
9
  */
@@ -0,0 +1,56 @@
1
+ import { PhotoCaptureAppConfig, VehiclePart } from '@monkvision/types';
2
+ import { CaptureMode, CaptureScreen } from '../types';
3
+ /**
4
+ * Parameters of the useAddDamageMode hook.
5
+ */
6
+ export interface AddDamageModeParams extends Pick<PhotoCaptureAppConfig, 'addDamage'> {
7
+ /**
8
+ * The current screen of the Capture component.
9
+ */
10
+ currentScreen?: CaptureScreen;
11
+ /**
12
+ * Boolean indicating if the capture is in Damage Disclosure mode.
13
+ */
14
+ damageDisclosure?: boolean;
15
+ /**
16
+ * Callback called when the user clicks on the 'close` button in Damage Diclosure mode.
17
+ */
18
+ handleOpenGallery: () => void;
19
+ }
20
+ /**
21
+ * Handle used to modify the current CaptureMode of the PhotoCapture or DamageDisclosure component.
22
+ */
23
+ export interface AddDamageHandle {
24
+ /**
25
+ * The current mode of the component.
26
+ */
27
+ mode: CaptureMode;
28
+ /**
29
+ * Parts selected to take a picture of.
30
+ */
31
+ vehicleParts: VehiclePart[];
32
+ /**
33
+ * Callback to be called when the user clicks on the "Add Damage" button.
34
+ */
35
+ handleAddDamage: () => void;
36
+ /**
37
+ * Callback to be called when the user selects the parts to take a picture of.
38
+ */
39
+ handleAddDamagePartsSelected: (parts: VehiclePart[]) => void;
40
+ /**
41
+ * Callback to be called everytime the user takes a picture to update the mode after it.
42
+ */
43
+ updatePhotoCaptureModeAfterPictureTaken: () => void;
44
+ /**
45
+ * Callback to be called when the user clicks on the "Cancel" button of the Add Damage mode.
46
+ */
47
+ handleCancelAddDamage: () => void;
48
+ /**
49
+ * Callback called when the user clicks on the "Validate" button of the Add Damage mode.
50
+ */
51
+ handleValidateVehicleParts: () => void;
52
+ }
53
+ /**
54
+ * Custom hook used to switch between sight picture taking and add damage picture taking.
55
+ */
56
+ export declare function useAddDamageMode({ addDamage, currentScreen, handleOpenGallery, damageDisclosure, }: AddDamageModeParams): AddDamageHandle;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAddDamageMode = void 0;
4
+ var react_1 = require("react");
5
+ var common_1 = require("@monkvision/common");
6
+ var analytics_1 = require("@monkvision/analytics");
7
+ var types_1 = require("@monkvision/types");
8
+ var types_2 = require("../types");
9
+ function getInitialMode(addDamage, damageDisclosure) {
10
+ if (damageDisclosure && addDamage === types_1.AddDamage.PART_SELECT) {
11
+ return types_2.CaptureMode.ADD_DAMAGE_PART_SELECT;
12
+ }
13
+ if (damageDisclosure && addDamage === types_1.AddDamage.TWO_SHOT) {
14
+ return types_2.CaptureMode.ADD_DAMAGE_1ST_SHOT;
15
+ }
16
+ return types_2.CaptureMode.SIGHT;
17
+ }
18
+ /**
19
+ * Custom hook used to switch between sight picture taking and add damage picture taking.
20
+ */
21
+ function useAddDamageMode(_a) {
22
+ var addDamage = _a.addDamage, currentScreen = _a.currentScreen, _b = _a.handleOpenGallery, handleOpenGallery = _b === void 0 ? function () { } : _b, _c = _a.damageDisclosure, damageDisclosure = _c === void 0 ? false : _c;
23
+ var _d = (0, react_1.useState)(getInitialMode(addDamage, damageDisclosure)), mode = _d[0], setMode = _d[1];
24
+ var _e = (0, react_1.useState)([]), vehicleParts = _e[0], setVehicleParts = _e[1];
25
+ var trackEvent = (0, analytics_1.useAnalytics)().trackEvent;
26
+ var handleAddDamage = (0, react_1.useCallback)(function () {
27
+ if (addDamage === types_1.AddDamage.TWO_SHOT) {
28
+ setMode(types_2.CaptureMode.ADD_DAMAGE_1ST_SHOT);
29
+ trackEvent('AddDamage Selected', {
30
+ mode: types_2.CaptureMode.ADD_DAMAGE_1ST_SHOT,
31
+ });
32
+ }
33
+ if (addDamage === types_1.AddDamage.PART_SELECT) {
34
+ setMode(types_2.CaptureMode.ADD_DAMAGE_PART_SELECT);
35
+ trackEvent('AddDamage Selected', {
36
+ mode: types_2.CaptureMode.ADD_DAMAGE_PART_SELECT,
37
+ });
38
+ }
39
+ }, []);
40
+ var updatePhotoCaptureModeAfterPictureTaken = (0, react_1.useCallback)(function () {
41
+ setVehicleParts([]);
42
+ setMode(mode === types_2.CaptureMode.ADD_DAMAGE_1ST_SHOT
43
+ ? types_2.CaptureMode.ADD_DAMAGE_2ND_SHOT
44
+ : getInitialMode(addDamage, damageDisclosure));
45
+ if (damageDisclosure) {
46
+ handleOpenGallery();
47
+ }
48
+ }, [mode]);
49
+ var handleCancelAddDamage = (0, react_1.useCallback)(function () {
50
+ trackEvent('AddDamage Canceled', {
51
+ mode: mode,
52
+ });
53
+ if ([types_2.CaptureMode.ADD_DAMAGE_PART_SELECT, types_2.CaptureMode.ADD_DAMAGE_1ST_SHOT].includes(mode) &&
54
+ damageDisclosure) {
55
+ handleOpenGallery();
56
+ }
57
+ setVehicleParts([]);
58
+ setMode(getInitialMode(addDamage, damageDisclosure));
59
+ }, [mode, currentScreen]);
60
+ var handleAddDamagePartsSelected = (0, react_1.useCallback)(function (parts) {
61
+ setVehicleParts(parts);
62
+ }, []);
63
+ var handleValidateVehicleParts = (0, react_1.useCallback)(function () {
64
+ setMode(types_2.CaptureMode.ADD_DAMAGE_PART_SELECT_SHOT);
65
+ }, []);
66
+ return (0, common_1.useObjectMemo)({
67
+ mode: mode,
68
+ vehicleParts: vehicleParts,
69
+ handleAddDamage: handleAddDamage,
70
+ updatePhotoCaptureModeAfterPictureTaken: updatePhotoCaptureModeAfterPictureTaken,
71
+ handleCancelAddDamage: handleCancelAddDamage,
72
+ handleAddDamagePartsSelected: handleAddDamagePartsSelected,
73
+ handleValidateVehicleParts: handleValidateVehicleParts,
74
+ });
75
+ }
76
+ exports.useAddDamageMode = useAddDamageMode;
@@ -1,9 +1,9 @@
1
- import { CaptureAppConfig } from '@monkvision/types';
1
+ import { PhotoCaptureAppConfig } from '@monkvision/types';
2
2
  import { UploadEventHandlers } from './useUploadQueue';
3
3
  /**
4
4
  * Parameters accepted by the useBadConnectionWarning hook.
5
5
  */
6
- export type BadConnectionWarningParams = Required<Pick<CaptureAppConfig, 'maxUploadDurationWarning'>>;
6
+ export type BadConnectionWarningParams = Required<Pick<PhotoCaptureAppConfig, 'maxUploadDurationWarning'>>;
7
7
  /**
8
8
  * Handle used to manage the bad connection warning displayed to the user when uploads are failing.
9
9
  */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Custom hook used to generate the background color in the inspection capture web components.
3
+ */
4
+ export declare function useColorBackground(opacity?: number): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useColorBackground = void 0;
4
+ var common_1 = require("@monkvision/common");
5
+ var react_1 = require("react");
6
+ /**
7
+ * Custom hook used to generate the background color in the inspection capture web components.
8
+ */
9
+ function useColorBackground(opacity) {
10
+ if (opacity === void 0) { opacity = 0.64; }
11
+ var palette = (0, common_1.useMonkTheme)().palette;
12
+ var clampedOpacity = Math.max(0, Math.min(opacity, 1));
13
+ return (0, react_1.useMemo)(function () { return (0, common_1.changeAlpha)(palette.background.base, opacity); }, [palette, clampedOpacity]);
14
+ }
15
+ exports.useColorBackground = useColorBackground;
@@ -0,0 +1,6 @@
1
+ import { DeviceOrientation } from '@monkvision/types';
2
+ /**
3
+ * Custom hook used to check if the current device's orientation is violating the enforced orientation. Returns true if
4
+ * an orientation is being enforced and is not matching the current device orientation.
5
+ */
6
+ export declare function useEnforceOrientation(orientation?: DeviceOrientation | null): boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useEnforceOrientation = void 0;
4
+ var common_1 = require("@monkvision/common");
5
+ var types_1 = require("@monkvision/types");
6
+ /**
7
+ * Custom hook used to check if the current device's orientation is violating the enforced orientation. Returns true if
8
+ * an orientation is being enforced and is not matching the current device orientation.
9
+ */
10
+ function useEnforceOrientation(orientation) {
11
+ var dimensions = (0, common_1.useWindowDimensions)();
12
+ return !!orientation && (orientation === types_1.DeviceOrientation.PORTRAIT) !== dimensions.isPortrait;
13
+ }
14
+ exports.useEnforceOrientation = useEnforceOrientation;
@@ -8,6 +8,6 @@ var react_1 = require("react");
8
8
  */
9
9
  function usePhotoCaptureImages(inspectionId) {
10
10
  var state = (0, common_1.useMonkState)().state;
11
- return (0, react_1.useMemo)(function () { return (0, common_1.getInspectionImages)(inspectionId, state.images, true); }, [state.images, inspectionId]);
11
+ return (0, react_1.useMemo)(function () { return (0, common_1.getInspectionImages)(inspectionId, state.images, undefined, true); }, [state.images, inspectionId]);
12
12
  }
13
13
  exports.usePhotoCaptureImages = usePhotoCaptureImages;