@monkvision/inspection-capture-web 5.3.4 → 5.3.5

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.
@@ -13,9 +13,9 @@ var PhotoCaptureHUDSightTutorial_styles_1 = require("./PhotoCaptureHUDSightTutor
13
13
  * This component displays the sight tutorial for a specific sight.
14
14
  */
15
15
  function PhotoCaptureHUDSightTutorial(_a) {
16
- var _b, _c, _d, _e;
17
- var selectedSight = _a.selectedSight, sightTutorial = _a.sightTutorial, _f = _a.onClose, onClose = _f === void 0 ? function () { } : _f, show = _a.show, enableSightTutorial = _a.enableSightTutorial;
18
- var _g = (0, react_1.useState)(null), tutorialImage = _g[0], setTutorialImage = _g[1];
16
+ var _b, _c, _d, _e, _f;
17
+ var selectedSight = _a.selectedSight, sightTutorial = _a.sightTutorial, _g = _a.onClose, onClose = _g === void 0 ? function () { } : _g, show = _a.show, enableSightTutorial = _a.enableSightTutorial;
18
+ var _h = (0, react_1.useState)(null), tutorialImage = _h[0], setTutorialImage = _h[1];
19
19
  var i18n = (0, react_i18next_1.useTranslation)().i18n;
20
20
  var t = (0, react_i18next_1.useTranslation)().t;
21
21
  var style = (0, PhotoCaptureHUDSightTutorial_styles_1.usePhotoCaptureHUDSightTutorialStyles)(show, !!tutorialImage);
@@ -49,7 +49,7 @@ function PhotoCaptureHUDSightTutorial(_a) {
49
49
  if (enableSightTutorial === types_1.PhotoCaptureSightTutorialOption.DISABLED) {
50
50
  return null;
51
51
  }
52
- return ((0, jsx_runtime_1.jsxs)("div", { style: style.container, children: [(0, jsx_runtime_1.jsxs)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['iconsContainer'], children: [(0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['icon'], children: (0, jsx_runtime_1.jsx)(common_ui_web_1.IconAroundVehicle, { size: 80, orientationAngle: (_b = selectedSight.positioning) === null || _b === void 0 ? void 0 : _b.orientation, positionAroundVehicle: (_c = selectedSight.positioning) === null || _c === void 0 ? void 0 : _c.position, distance: (_d = selectedSight.positioning) === null || _d === void 0 ? void 0 : _d.distance }) }), (0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['icon'], children: (0, jsx_runtime_1.jsx)(common_ui_web_1.IconVerticalPosition, { size: 67, position: (_e = selectedSight.positioning) === null || _e === void 0 ? void 0 : _e.height, variant: IconVerticalPosition_types_1.IconVerticalPositionVariant.SECONDARY }) }), (0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['icon'], children: (0, jsx_runtime_1.jsx)(common_ui_web_1.SightOverlay, { style: PhotoCaptureHUDSightTutorial_styles_1.styles['sightIcon'], sight: selectedSight, getAttributes: style.sightIcon.getAttributes }) })] }), enableSightTutorial === types_1.PhotoCaptureSightTutorialOption.CLASSIC && ((0, jsx_runtime_1.jsxs)("div", { style: style.classicTutorialContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: style.classicTitleContainer, children: [(0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { style: PhotoCaptureHUDSightTutorial_styles_1.styles['closeButtonFiller'], icon: 'close', variant: 'text' }), (0, jsx_runtime_1.jsx)("span", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['classicTitle'], children: t('photo.hud.sightTutorial.tip').toUpperCase() }), (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { style: style.closeButton, primaryColor: 'text-black', icon: 'close', variant: 'text', onClick: onClose })] }), (0, jsx_runtime_1.jsx)("div", { style: style.classicGuidelineContainer, children: (0, jsx_runtime_1.jsx)("span", { style: style.classicGuideline, children: (tutorialGuideline === null || tutorialGuideline === void 0 ? void 0 : tutorialGuideline.length)
52
+ return ((0, jsx_runtime_1.jsxs)("div", { style: style.container, children: [(0, jsx_runtime_1.jsxs)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['iconsContainer'], children: [(0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['icon'], children: (0, jsx_runtime_1.jsx)(common_ui_web_1.VehicleWalkaroundIndicator, { size: 80, orientationAngle: (_b = selectedSight.positioning) === null || _b === void 0 ? void 0 : _b.orientation, alpha: (_d = (_c = selectedSight.positioning) === null || _c === void 0 ? void 0 : _c.position) !== null && _d !== void 0 ? _d : 0, distance: (_e = selectedSight.positioning) === null || _e === void 0 ? void 0 : _e.distance, showProgressBar: false }) }), (0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['icon'], children: (0, jsx_runtime_1.jsx)(common_ui_web_1.IconVerticalPosition, { size: 67, position: (_f = selectedSight.positioning) === null || _f === void 0 ? void 0 : _f.height, variant: IconVerticalPosition_types_1.IconVerticalPositionVariant.SECONDARY }) }), (0, jsx_runtime_1.jsx)("div", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['icon'], children: (0, jsx_runtime_1.jsx)(common_ui_web_1.SightOverlay, { style: PhotoCaptureHUDSightTutorial_styles_1.styles['sightIcon'], sight: selectedSight, getAttributes: style.sightIcon.getAttributes }) })] }), enableSightTutorial === types_1.PhotoCaptureSightTutorialOption.CLASSIC && ((0, jsx_runtime_1.jsxs)("div", { style: style.classicTutorialContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: style.classicTitleContainer, children: [(0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { style: PhotoCaptureHUDSightTutorial_styles_1.styles['closeButtonFiller'], icon: 'close', variant: 'text' }), (0, jsx_runtime_1.jsx)("span", { style: PhotoCaptureHUDSightTutorial_styles_1.styles['classicTitle'], children: t('photo.hud.sightTutorial.tip').toUpperCase() }), (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { style: style.closeButton, primaryColor: 'text-black', icon: 'close', variant: 'text', onClick: onClose })] }), (0, jsx_runtime_1.jsx)("div", { style: style.classicGuidelineContainer, children: (0, jsx_runtime_1.jsx)("span", { style: style.classicGuideline, children: (tutorialGuideline === null || tutorialGuideline === void 0 ? void 0 : tutorialGuideline.length)
53
53
  ? tutorialGuideline
54
54
  : t(tutorialImage
55
55
  ? 'photo.hud.sightTutorial.defaultTutorialWithImage'
@@ -140,5 +140,5 @@ function VideoCaptureHUD(_a) {
140
140
  resumeRecording();
141
141
  }
142
142
  }, [fastMovementsWarning, pauseRecording, resumeRecording]);
143
- return ((0, jsx_runtime_1.jsxs)("div", { style: VideoCaptureHUD_styles_1.styles['container'], children: [cameraPreview, (0, jsx_runtime_1.jsxs)("div", { style: VideoCaptureHUD_styles_1.styles['hudContainer'], children: [screen === VideoCaptureHUDScreen.RECORDING && ((0, jsx_runtime_1.jsx)(VideoCaptureRecording_1.VideoCaptureRecording, { walkaroundPosition: isRecording || isRecordingPaused ? walkaroundPosition : 0, isRecording: isRecording, isRecordingPaused: isRecordingPaused, recordingDurationMs: recordingDurationMs, onClickRecordVideo: onClickRecordVideo, onClickTakePicture: handleTakePictureClick, tooltip: tooltip ? t(getTooltipLabel(tooltip)) : undefined })), screen === VideoCaptureHUDScreen.PROCESSING && ((0, jsx_runtime_1.jsx)(VideoCaptureProcessing_1.VideoCaptureProcessing, { inspectionId: inspectionId, processedFrames: processedFrames, totalProcessingFrames: totalProcessingFrames, uploadedFrames: uploadedFrames, totalUploadingFrames: totalUploadingFrames, loading: startTasksLoading, onComplete: onComplete }))] }), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: isDiscardDialogDisplayed, message: t('video.recording.discardDialog.message'), confirmLabel: t('video.recording.discardDialog.keepRecording'), cancelLabel: t('video.recording.discardDialog.discardVideo'), onConfirm: onDiscardDialogKeepRecording, onCancel: onDiscardDialogDiscardVideo }), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: fastMovementsWarning !== null, message: t(getFastMovementsWarningMessage(fastMovementsWarning)), confirmLabel: t('video.recording.fastMovementsDialog.confirm'), onConfirm: onWarningDismiss, showCancelButton: false, dialogIcon: 'warning-outline', dialogIconPrimaryColor: 'caution' }), (0, jsx_runtime_1.jsx)(components_1.OrientationEnforcer, { orientation: enforceOrientation })] }));
143
+ return ((0, jsx_runtime_1.jsxs)("div", { style: VideoCaptureHUD_styles_1.styles['container'], children: [cameraPreview, (0, jsx_runtime_1.jsxs)("div", { style: VideoCaptureHUD_styles_1.styles['hudContainer'], children: [screen === VideoCaptureHUDScreen.RECORDING && ((0, jsx_runtime_1.jsx)(VideoCaptureRecording_1.VideoCaptureRecording, { walkaroundPosition: isRecording || isRecordingPaused ? walkaroundPosition : 0, isRecording: isRecording, isRecordingPaused: isRecordingPaused, recordingDurationMs: recordingDurationMs, onClickRecordVideo: onClickRecordVideo, onClickTakePicture: handleTakePictureClick, tooltip: tooltip ? t(getTooltipLabel(tooltip)) : undefined, recordVideoDisabled: handle.isLoading })), screen === VideoCaptureHUDScreen.PROCESSING && ((0, jsx_runtime_1.jsx)(VideoCaptureProcessing_1.VideoCaptureProcessing, { inspectionId: inspectionId, processedFrames: processedFrames, totalProcessingFrames: totalProcessingFrames, uploadedFrames: uploadedFrames, totalUploadingFrames: totalUploadingFrames, loading: startTasksLoading, onComplete: onComplete }))] }), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: isDiscardDialogDisplayed, message: t('video.recording.discardDialog.message'), confirmLabel: t('video.recording.discardDialog.keepRecording'), cancelLabel: t('video.recording.discardDialog.discardVideo'), onConfirm: onDiscardDialogKeepRecording, onCancel: onDiscardDialogDiscardVideo }), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: fastMovementsWarning !== null, message: t(getFastMovementsWarningMessage(fastMovementsWarning)), confirmLabel: t('video.recording.fastMovementsDialog.confirm'), onConfirm: onWarningDismiss, showCancelButton: false, dialogIcon: 'warning-outline', dialogIconPrimaryColor: 'caution' }), (0, jsx_runtime_1.jsx)(components_1.OrientationEnforcer, { orientation: enforceOrientation })] }));
144
144
  }
@@ -2,4 +2,4 @@ import { VideoCaptureRecordingProps } from './VideoCaptureRecording.types';
2
2
  /**
3
3
  * HUD used in recording mode displayed on top of the camera in the VideoCaputre process.
4
4
  */
5
- export declare function VideoCaptureRecording({ walkaroundPosition, isRecording, isRecordingPaused, recordingDurationMs, onClickRecordVideo, onClickTakePicture, tooltip, }: VideoCaptureRecordingProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function VideoCaptureRecording({ walkaroundPosition, isRecording, isRecordingPaused, recordingDurationMs, onClickRecordVideo, onClickTakePicture, tooltip, recordVideoDisabled, }: VideoCaptureRecordingProps): import("react/jsx-runtime").JSX.Element;
@@ -16,11 +16,11 @@ function formatRecordingDuration(durationMs) {
16
16
  * HUD used in recording mode displayed on top of the camera in the VideoCaputre process.
17
17
  */
18
18
  function VideoCaptureRecording(_a) {
19
- var walkaroundPosition = _a.walkaroundPosition, isRecording = _a.isRecording, isRecordingPaused = _a.isRecordingPaused, recordingDurationMs = _a.recordingDurationMs, onClickRecordVideo = _a.onClickRecordVideo, onClickTakePicture = _a.onClickTakePicture, tooltip = _a.tooltip;
19
+ var walkaroundPosition = _a.walkaroundPosition, isRecording = _a.isRecording, isRecordingPaused = _a.isRecordingPaused, recordingDurationMs = _a.recordingDurationMs, onClickRecordVideo = _a.onClickRecordVideo, onClickTakePicture = _a.onClickTakePicture, tooltip = _a.tooltip, recordVideoDisabled = _a.recordVideoDisabled;
20
20
  var _b = (0, VideoCaptureRecordingStyles_1.useVideoCaptureRecordingStyles)({ isRecording: isRecording }), container = _b.container, indicators = _b.indicators, recordingDuration = _b.recordingDuration, controls = _b.controls, takePictureFlash = _b.takePictureFlash, walkaroundIndicator = _b.walkaroundIndicator, showTakePictureFlash = _b.showTakePictureFlash, tooltipPosition = _b.tooltipPosition;
21
21
  var handleTakePictureClick = function () {
22
22
  showTakePictureFlash();
23
23
  onClickTakePicture === null || onClickTakePicture === void 0 ? void 0 : onClickTakePicture();
24
24
  };
25
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: indicators, children: (isRecording || isRecordingPaused) && ((0, jsx_runtime_1.jsx)("div", { style: recordingDuration, children: formatRecordingDuration(recordingDurationMs) })) }), (0, jsx_runtime_1.jsxs)("div", { style: controls, children: [(0, jsx_runtime_1.jsx)("div", { style: walkaroundIndicator, "data-testid": 'walkaround-indicator-container', children: (0, jsx_runtime_1.jsx)(common_ui_web_1.VehicleWalkaroundIndicator, { alpha: walkaroundPosition }) }), (0, jsx_runtime_1.jsx)(common_ui_web_1.RecordVideoButton, { isRecording: isRecording, onClick: onClickRecordVideo, tooltip: tooltip, tooltipPosition: tooltipPosition }), (0, jsx_runtime_1.jsx)(common_ui_web_1.TakePictureButton, { onClick: handleTakePictureClick, disabled: !isRecording })] }), (0, jsx_runtime_1.jsx)("div", { style: takePictureFlash })] }));
25
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: indicators, children: (isRecording || isRecordingPaused) && ((0, jsx_runtime_1.jsx)("div", { style: recordingDuration, children: formatRecordingDuration(recordingDurationMs) })) }), (0, jsx_runtime_1.jsxs)("div", { style: controls, children: [(0, jsx_runtime_1.jsx)("div", { style: walkaroundIndicator, "data-testid": 'walkaround-indicator-container', children: (0, jsx_runtime_1.jsx)(common_ui_web_1.VehicleWalkaroundIndicator, { alpha: walkaroundPosition }) }), (0, jsx_runtime_1.jsx)(common_ui_web_1.RecordVideoButton, { isRecording: isRecording, onClick: onClickRecordVideo, tooltip: tooltip, tooltipPosition: tooltipPosition, disabled: recordVideoDisabled }), (0, jsx_runtime_1.jsx)(common_ui_web_1.TakePictureButton, { onClick: handleTakePictureClick, disabled: !isRecording })] }), (0, jsx_runtime_1.jsx)("div", { style: takePictureFlash })] }));
26
26
  }
@@ -18,6 +18,10 @@ export interface VideoCaptureRecordingProps {
18
18
  * The total duration (in milliseconds) of the current video recording.
19
19
  */
20
20
  recordingDurationMs: number;
21
+ /**
22
+ * Boolean indicating if the record video button should be disabled or not.
23
+ */
24
+ recordVideoDisabled: boolean;
21
25
  /**
22
26
  * Callback called when the user clicks on the record video button.
23
27
  */
@@ -21,7 +21,6 @@ export interface VideoCapturePageLayoutProps {
21
21
  showLogo?: boolean;
22
22
  /**
23
23
  * Boolean indicating if the confirm button should be displayed or not.
24
- * If true, the confirmButtonProps must be provided.
25
24
  */
26
25
  showConfirmButton?: boolean;
27
26
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monkvision/inspection-capture-web",
3
- "version": "5.3.4",
3
+ "version": "5.3.5",
4
4
  "license": "BSD-3-Clause-Clear",
5
5
  "packageManager": "yarn@3.2.4",
6
6
  "description": "MonkJs inspection capture package for React (web) used to implement the Monk inspection capture workflow",
@@ -28,12 +28,12 @@
28
28
  "lint:fix": "yarn run prettier:fix && yarn run eslint:fix"
29
29
  },
30
30
  "dependencies": {
31
- "@monkvision/analytics": "5.3.4",
32
- "@monkvision/camera-web": "5.3.4",
33
- "@monkvision/common": "5.3.4",
34
- "@monkvision/common-ui-web": "5.3.4",
35
- "@monkvision/network": "5.3.4",
36
- "@monkvision/sights": "5.3.4",
31
+ "@monkvision/analytics": "5.3.5",
32
+ "@monkvision/camera-web": "5.3.5",
33
+ "@monkvision/common": "5.3.5",
34
+ "@monkvision/common-ui-web": "5.3.5",
35
+ "@monkvision/network": "5.3.5",
36
+ "@monkvision/sights": "5.3.5",
37
37
  "i18next": "^23.4.5",
38
38
  "react-i18next": "^13.2.0"
39
39
  },
@@ -44,13 +44,13 @@
44
44
  "react-router-dom": "^6.22.3"
45
45
  },
46
46
  "devDependencies": {
47
- "@monkvision/eslint-config-base": "5.3.4",
48
- "@monkvision/eslint-config-typescript": "5.3.4",
49
- "@monkvision/eslint-config-typescript-react": "5.3.4",
50
- "@monkvision/jest-config": "5.3.4",
51
- "@monkvision/prettier-config": "5.3.4",
52
- "@monkvision/test-utils": "5.3.4",
53
- "@monkvision/typescript-config": "5.3.4",
47
+ "@monkvision/eslint-config-base": "5.3.5",
48
+ "@monkvision/eslint-config-typescript": "5.3.5",
49
+ "@monkvision/eslint-config-typescript-react": "5.3.5",
50
+ "@monkvision/jest-config": "5.3.5",
51
+ "@monkvision/prettier-config": "5.3.5",
52
+ "@monkvision/test-utils": "5.3.5",
53
+ "@monkvision/typescript-config": "5.3.5",
54
54
  "@testing-library/react": "^16.3.0",
55
55
  "@types/copyfiles": "^2",
56
56
  "@types/fscreen": "^1.0.1",
@@ -92,5 +92,5 @@
92
92
  "url": "https://github.com/monkvision/monkjs/issues"
93
93
  },
94
94
  "homepage": "https://github.com/monkvision/monkjs",
95
- "gitHead": "5b46d87e58706a101dfde74d52c697f3fc4e1970"
95
+ "gitHead": "cfca4988f50b55abca344f0ae3408a7798d61978"
96
96
  }