@monkvision/inspection-capture-web 5.2.5 → 5.3.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/lib/DamageDisclosure/DamageDisclosure.d.ts +1 -2
- package/lib/DamageDisclosure/DamageDisclosure.js +2 -3
- package/lib/DamageDisclosure/DamageDisclosureHOC.d.ts +0 -1
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.d.ts +1 -2
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.js +2 -14
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.d.ts +1 -2
- package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.js +1 -2
- package/lib/DamageDisclosure/hooks/useDamageDisclosureState.js +1 -2
- package/lib/PhotoCapture/PhotoCapture.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCapture.js +2 -3
- package/lib/PhotoCapture/PhotoCaptureHOC.d.ts +0 -1
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.js +2 -14
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.js +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.js +2 -14
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.js +3 -15
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.js +3 -15
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/hooks.d.ts +108 -59
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/hooks.js +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSlider.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSlider.js +4 -15
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSliderButton.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSliderButton.js +2 -14
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/hooks.js +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/hooks.d.ts +307 -258
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/hooks.js +2 -3
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/PhotoCaptureHUDSightTutorial.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/PhotoCaptureHUDSightTutorial.js +4 -16
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/PhotoCaptureHUDSightTutorial.styles.d.ts +1175 -734
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDSightTutorial/PhotoCaptureHUDSightTutorial.styles.js +2 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/ArrowIcon.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/ArrowIcon.js +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/DisplayText.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/DisplayText.js +2 -14
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.d.ts +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.js +2 -3
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/hooks.d.ts +307 -258
- package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/hooks.js +1 -2
- package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDStyle.d.ts +307 -258
- package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDStyle.js +1 -2
- package/lib/PhotoCapture/errors.js +1 -1
- package/lib/PhotoCapture/hooks/useComplianceAnalytics.d.ts +0 -1
- package/lib/PhotoCapture/hooks/useComplianceAnalytics.js +1 -2
- package/lib/PhotoCapture/hooks/useImagesCleanup.js +1 -2
- package/lib/PhotoCapture/hooks/useInspectionComplete.js +3 -4
- package/lib/PhotoCapture/hooks/usePhotoCaptureSightGuidelines.js +2 -2
- package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.js +1 -2
- package/lib/PhotoCapture/hooks/usePhotoCaptureSightTutorial.js +1 -2
- package/lib/PhotoCapture/hooks/usePhotoCaptureTutorial.js +3 -3
- package/lib/VideoCapture/VideoCapture.d.ts +1 -2
- package/lib/VideoCapture/VideoCapture.js +2 -14
- package/lib/VideoCapture/VideoCaptureHOC.d.ts +0 -1
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.d.ts +1 -1
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.js +5 -17
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.d.ts +1 -2
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.js +2 -14
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.d.ts +1447 -1152
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.js +2 -2
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.d.ts +1 -2
- package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.js +2 -14
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.d.ts +1 -2
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.js +2 -3
- package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.js +2 -2
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.d.ts +1 -1
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.js +14 -3
- package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.js +2 -2
- package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.d.ts +1 -2
- package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.js +4 -16
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.d.ts +1 -2
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.js +2 -14
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.d.ts +324 -177
- package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.js +2 -2
- package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.js +3 -3
- package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.js +1 -2
- package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.js +1 -2
- package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.js +1 -2
- package/lib/VideoCapture/hooks/useVehicleWalkaround.js +1 -2
- package/lib/VideoCapture/hooks/useVideoRecording.js +3 -3
- package/lib/VideoCapture/hooks/useVideoUploadQueue.js +1 -2
- package/lib/components/CancelButton/CancelButton.d.ts +1 -2
- package/lib/components/CancelButton/CancelButton.js +2 -14
- package/lib/components/CloseUpShot/CloseUpShot.d.ts +1 -2
- package/lib/components/CloseUpShot/CloseUpShot.js +2 -3
- package/lib/components/CloseUpShot/hooks.js +1 -2
- package/lib/components/Counter/Counter.d.ts +1 -2
- package/lib/components/Counter/Counter.js +2 -3
- package/lib/components/Counter/hooks.js +1 -2
- package/lib/components/HUDButtons/HUDButtons.d.ts +1 -2
- package/lib/components/HUDButtons/HUDButtons.js +2 -3
- package/lib/components/HUDButtons/hooks.js +1 -2
- package/lib/components/HUDOverlay/HUDOverlay.d.ts +1 -2
- package/lib/components/HUDOverlay/HUDOverlay.js +2 -3
- package/lib/components/HUDOverlay/hooks.js +2 -3
- package/lib/components/OrientationEnforcer/OrientationEnforcer.d.ts +1 -2
- package/lib/components/OrientationEnforcer/OrientationEnforcer.js +2 -14
- package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.d.ts +108 -59
- package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.js +2 -2
- package/lib/components/PartSelection/PartSelection.d.ts +1 -2
- package/lib/components/PartSelection/PartSelection.js +3 -4
- package/lib/components/SightTutorialButton/SightTutorialButton.d.ts +1 -1
- package/lib/components/SightTutorialButton/SightTutorialButton.js +1 -2
- package/lib/components/ZoomOutShot/ZoomOutShot.d.ts +1 -2
- package/lib/components/ZoomOutShot/ZoomOutShot.js +2 -14
- package/lib/components/ZoomOutShot/hooks.js +1 -2
- package/lib/errors.js +1 -1
- package/lib/hooks/useAdaptiveCameraConfig.js +1 -2
- package/lib/hooks/useAddDamageMode.js +1 -2
- package/lib/hooks/useBadConnectionWarning.js +1 -2
- package/lib/hooks/useCaptureDuration.js +19 -7
- package/lib/hooks/useColorBackground.js +2 -3
- package/lib/hooks/useEnforceOrientation.js +1 -2
- package/lib/hooks/usePhotoCaptureImages.js +1 -2
- package/lib/hooks/usePictureTaken.js +1 -2
- package/lib/hooks/useStartTasksOnComplete.js +3 -4
- package/lib/hooks/useTracking.js +1 -2
- package/lib/hooks/useUploadQueue.js +3 -4
- package/lib/types.js +2 -2
- package/package.json +24 -25
|
@@ -11,7 +11,8 @@ 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.styles = void 0;
|
|
15
|
+
exports.useVideoCaptureProcessingStyles = useVideoCaptureProcessingStyles;
|
|
15
16
|
var common_1 = require("@monkvision/common");
|
|
16
17
|
exports.styles = {
|
|
17
18
|
container: {
|
|
@@ -57,4 +58,3 @@ function useVideoCaptureProcessingStyles(progress) {
|
|
|
57
58
|
progressBarStyle: __assign(__assign({}, exports.styles['progressBar']), { backgroundColor: palette.primary.dark, width: "".concat(progress * 100, "%") }),
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
|
-
exports.useVideoCaptureProcessingStyles = useVideoCaptureProcessingStyles;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.FastMovementType = void 0;
|
|
4
|
+
exports.detectFastMovements = detectFastMovements;
|
|
4
5
|
var SMOOTH_MOVEMENT_FACTOR = 0.98;
|
|
5
6
|
var ALPHA_DETECTION_MIN = 2.5;
|
|
6
7
|
var ALPHA_DETECTION_MAX = 179;
|
|
@@ -21,7 +22,7 @@ var FastMovementType;
|
|
|
21
22
|
* The user is shaking their phone too much.
|
|
22
23
|
*/
|
|
23
24
|
FastMovementType["PHONE_SHAKING"] = "phone_shaking";
|
|
24
|
-
})(FastMovementType
|
|
25
|
+
})(FastMovementType || (exports.FastMovementType = FastMovementType = {}));
|
|
25
26
|
/**
|
|
26
27
|
* Function used to detect fast user movements between DeviceOrientationEvent emissions.
|
|
27
28
|
*/
|
|
@@ -42,4 +43,3 @@ function detectFastMovements(rotation, previousRotation) {
|
|
|
42
43
|
}
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
|
-
exports.detectFastMovements = detectFastMovements;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFastMovementsDetection =
|
|
3
|
+
exports.useFastMovementsDetection = useFastMovementsDetection;
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var common_1 = require("@monkvision/common");
|
|
6
6
|
var fastMovementsDetection_1 = require("./fastMovementsDetection");
|
|
@@ -61,4 +61,3 @@ function useFastMovementsDetection(_a) {
|
|
|
61
61
|
onWarningDismiss: onWarningDismiss,
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
exports.useFastMovementsDetection = useFastMovementsDetection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable no-param-reassign */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.calculateLaplaceScores =
|
|
4
|
+
exports.calculateLaplaceScores = calculateLaplaceScores;
|
|
5
5
|
/**
|
|
6
6
|
* This function calculates the Laplace Scores for a given pixel array. This score can be used to get a rough estimate
|
|
7
7
|
* of the blurriness of the picture.
|
|
@@ -59,4 +59,3 @@ function calculateLaplaceScores(pixels, width, height) {
|
|
|
59
59
|
var laplaceStd = Math.sqrt(se / ((squareSize - 2) * (squareSize - 2)));
|
|
60
60
|
return { mean: laplaceMean, std: laplaceStd };
|
|
61
61
|
}
|
|
62
|
-
exports.calculateLaplaceScores = calculateLaplaceScores;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFrameSelection =
|
|
3
|
+
exports.useFrameSelection = useFrameSelection;
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var common_1 = require("@monkvision/common");
|
|
6
6
|
var monitoring_1 = require("@monkvision/monitoring");
|
|
@@ -47,4 +47,3 @@ function useFrameSelection(_a) {
|
|
|
47
47
|
onCaptureVideoFrame: onCaptureVideoFrame,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
exports.useFrameSelection = useFrameSelection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useVehicleWalkaround =
|
|
3
|
+
exports.useVehicleWalkaround = useVehicleWalkaround;
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var common_1 = require("@monkvision/common");
|
|
6
6
|
/**
|
|
@@ -36,4 +36,3 @@ function useVehicleWalkaround(_a) {
|
|
|
36
36
|
}, [walkaroundPosition, checkpoint, nextCheckpoint]);
|
|
37
37
|
return (0, common_1.useObjectMemo)({ startWalkaround: startWalkaround, walkaroundPosition: walkaroundPosition });
|
|
38
38
|
}
|
|
39
|
-
exports.useVehicleWalkaround = useVehicleWalkaround;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.VideoRecordingTooltip = void 0;
|
|
4
|
+
exports.useVideoRecording = useVideoRecording;
|
|
4
5
|
var react_1 = require("react");
|
|
5
6
|
var common_1 = require("@monkvision/common");
|
|
6
7
|
var hooks_1 = require("../../hooks");
|
|
@@ -18,7 +19,7 @@ var VideoRecordingTooltip;
|
|
|
18
19
|
* Tooltip displayed at the end of the recording, to indicate to the user where to press to stop the recording.
|
|
19
20
|
*/
|
|
20
21
|
VideoRecordingTooltip["END"] = "end";
|
|
21
|
-
})(VideoRecordingTooltip
|
|
22
|
+
})(VideoRecordingTooltip || (exports.VideoRecordingTooltip = VideoRecordingTooltip = {}));
|
|
22
23
|
var MINIMUM_VEHICLE_WALKAROUND_POSITION = 270;
|
|
23
24
|
/**
|
|
24
25
|
* Custom hook used to manage the video recording (AKA : The process of taking screenshots of the video stream at a
|
|
@@ -137,4 +138,3 @@ function useVideoRecording(_a) {
|
|
|
137
138
|
tooltip: tooltip,
|
|
138
139
|
};
|
|
139
140
|
}
|
|
140
|
-
exports.useVideoRecording = useVideoRecording;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable no-param-reassign */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useVideoUploadQueue =
|
|
4
|
+
exports.useVideoUploadQueue = useVideoUploadQueue;
|
|
5
5
|
var common_1 = require("@monkvision/common");
|
|
6
6
|
var network_1 = require("@monkvision/network");
|
|
7
7
|
var react_1 = require("react");
|
|
@@ -48,4 +48,3 @@ function useVideoUploadQueue(_a) {
|
|
|
48
48
|
onFrameSelected: onFrameSelected,
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
exports.useVideoUploadQueue = useVideoUploadQueue;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* Props of the CancelButton component.
|
|
4
3
|
*/
|
|
@@ -11,4 +10,4 @@ export interface CancelButtonProps {
|
|
|
11
10
|
/**
|
|
12
11
|
* Component implementing a cancel button displayed in the Camera HUD.
|
|
13
12
|
*/
|
|
14
|
-
export declare function CancelButton({ onCancel }: CancelButtonProps): JSX.Element;
|
|
13
|
+
export declare function CancelButton({ onCancel }: CancelButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.CancelButton =
|
|
3
|
+
exports.CancelButton = CancelButton;
|
|
15
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
5
|
var common_ui_web_1 = require("@monkvision/common-ui-web");
|
|
17
6
|
var react_i18next_1 = require("react-i18next");
|
|
@@ -23,6 +12,5 @@ function CancelButton(_a) {
|
|
|
23
12
|
var onCancel = _a.onCancel;
|
|
24
13
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
25
14
|
var primaryColor = (0, hooks_1.useColorBackground)();
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button,
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { onClick: onCancel, primaryColor: primaryColor, children: t('photo.hud.addDamage.cancelBtn') }));
|
|
27
16
|
}
|
|
28
|
-
exports.CancelButton = CancelButton;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PixelDimensions } from '@monkvision/types';
|
|
3
2
|
/**
|
|
4
3
|
* Props of the CloseUpShot component.
|
|
@@ -23,4 +22,4 @@ export interface CloseUpShotProps {
|
|
|
23
22
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
|
|
24
23
|
* mode is ADD_DAMAGE_2ND_SHOT | ADD_DAMAGE_PART_SELECT_SHOT.
|
|
25
24
|
*/
|
|
26
|
-
export declare function CloseUpShot({ onCancel, showCounter, streamDimensions }: CloseUpShotProps): JSX.Element;
|
|
25
|
+
export declare function CloseUpShot({ onCancel, showCounter, streamDimensions }: CloseUpShotProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,7 +11,7 @@ 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.CloseUpShot =
|
|
14
|
+
exports.CloseUpShot = CloseUpShot;
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var react_i18next_1 = require("react-i18next");
|
|
17
17
|
var common_1 = require("@monkvision/common");
|
|
@@ -29,6 +29,5 @@ function CloseUpShot(_a) {
|
|
|
29
29
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
30
30
|
var style = (0, hooks_1.useCloseUpShotStyle)();
|
|
31
31
|
var aspectRatio = (0, common_1.getAspectRatio)(streamDimensions);
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: CloseUpShot_styles_1.styles['container'], children: [(0, jsx_runtime_1.jsx)("div", { 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", { 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", { style: style.infoCloseup, "data-testid": 'label', children: t('photo.hud.addDamage.infoCloseup') })] }));
|
|
33
33
|
}
|
|
34
|
-
exports.CloseUpShot = CloseUpShot;
|
|
@@ -11,7 +11,7 @@ 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.useCloseUpShotStyle =
|
|
14
|
+
exports.useCloseUpShotStyle = useCloseUpShotStyle;
|
|
15
15
|
var common_1 = require("@monkvision/common");
|
|
16
16
|
var CloseUpShot_styles_1 = require("./CloseUpShot.styles");
|
|
17
17
|
function useCloseUpShotStyle() {
|
|
@@ -22,4 +22,3 @@ function useCloseUpShotStyle() {
|
|
|
22
22
|
infoCloseup: __assign(__assign({}, CloseUpShot_styles_1.styles['infoCloseup']), responsive(CloseUpShot_styles_1.styles['infoCloseupPortrait'])),
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
exports.useCloseUpShotStyle = useCloseUpShotStyle;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CounterProps } from './hooks';
|
|
3
2
|
/**
|
|
4
3
|
* Component that implements an indicator of pictures taken during the capture process.
|
|
5
4
|
*/
|
|
6
|
-
export declare function Counter(props: CounterProps): JSX.Element;
|
|
5
|
+
export declare function Counter(props: CounterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,7 +11,7 @@ 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.Counter =
|
|
14
|
+
exports.Counter = Counter;
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var Counter_styles_1 = require("./Counter.styles");
|
|
17
17
|
var hooks_1 = require("../../hooks");
|
|
@@ -22,6 +22,5 @@ var hooks_2 = require("./hooks");
|
|
|
22
22
|
function Counter(props) {
|
|
23
23
|
var label = (0, hooks_2.useCounterLabel)(props);
|
|
24
24
|
var backgroundColor = (0, hooks_1.useColorBackground)();
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)("div",
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: __assign(__assign({}, Counter_styles_1.styles['counter']), { backgroundColor: backgroundColor }), "data-testid": 'damage-counter', children: label }));
|
|
26
26
|
}
|
|
27
|
-
exports.Counter = Counter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCounterLabel =
|
|
3
|
+
exports.useCounterLabel = useCounterLabel;
|
|
4
4
|
var react_i18next_1 = require("react-i18next");
|
|
5
5
|
var types_1 = require("../../types");
|
|
6
6
|
function useCounterLabel(props) {
|
|
@@ -13,4 +13,3 @@ function useCounterLabel(props) {
|
|
|
13
13
|
}
|
|
14
14
|
return t('photo.hud.addDamage.closeupPictureCounter');
|
|
15
15
|
}
|
|
16
|
-
exports.useCounterLabel = useCounterLabel;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* Props of the HUDButtons component.
|
|
4
3
|
*/
|
|
@@ -64,4 +63,4 @@ export interface HUDButtonsProps {
|
|
|
64
63
|
* - A gallery button
|
|
65
64
|
* - A close button (only displayed if the `onClose` callback is defined)
|
|
66
65
|
*/
|
|
67
|
-
export declare function HUDButtons({ galleryPreview, onTakePicture, onOpenGallery, onClose, galleryDisabled, takePictureDisabled, closeDisabled, showCloseButton, showGalleryBadge, retakeCount, }: HUDButtonsProps): JSX.Element;
|
|
66
|
+
export declare function HUDButtons({ galleryPreview, onTakePicture, onOpenGallery, onClose, galleryDisabled, takePictureDisabled, closeDisabled, showCloseButton, showGalleryBadge, retakeCount, }: HUDButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,7 +11,7 @@ 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.HUDButtons =
|
|
14
|
+
exports.HUDButtons = HUDButtons;
|
|
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 common_1 = require("@monkvision/common");
|
|
@@ -38,6 +38,5 @@ function HUDButtons(_a) {
|
|
|
38
38
|
showCloseButton: showCloseButton,
|
|
39
39
|
showGalleryBadge: showGalleryBadge,
|
|
40
40
|
}), containerStyle = _k.containerStyle, gallery = _k.gallery, galleryBadgeStyle = _k.galleryBadgeStyle, close = _k.close, backgroundCoverStyle = _k.backgroundCoverStyle;
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: containerStyle, children: [(0, jsx_runtime_1.jsx)("button", __assign({ style: close.style, disabled: closeDisabled, onClick: onClose }, closeEventHandlers, { "data-testid": 'monk-close-btn', children: (0, jsx_runtime_1.jsx)(common_ui_web_1.Icon, { icon: 'close', size: 30, primaryColor: close.iconColor }) })), (0, jsx_runtime_1.jsx)(common_ui_web_1.TakePictureButton, { onClick: onTakePicture, size: 85, disabled: takePictureDisabled }), (0, jsx_runtime_1.jsx)("button", __assign({ style: gallery.style, disabled: galleryDisabled, onClick: onOpenGallery }, galleryEventHandlers, { "data-testid": 'monk-gallery-btn', children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [galleryPreview ? ((0, jsx_runtime_1.jsx)("div", { style: backgroundCoverStyle })) : ((0, jsx_runtime_1.jsx)(common_ui_web_1.Icon, { icon: 'gallery', size: 30, primaryColor: gallery.iconColor })), (0, jsx_runtime_1.jsx)("div", { "data-testid": 'monk-gallery-badge', style: galleryBadgeStyle, children: retakeCount > 0 && retakeCount })] }) }))] }));
|
|
42
42
|
}
|
|
43
|
-
exports.HUDButtons = HUDButtons;
|
|
@@ -11,7 +11,7 @@ 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.useHUDButtonsStyles =
|
|
14
|
+
exports.useHUDButtonsStyles = useHUDButtonsStyles;
|
|
15
15
|
var types_1 = require("@monkvision/types");
|
|
16
16
|
var react_1 = require("react");
|
|
17
17
|
var common_1 = require("@monkvision/common");
|
|
@@ -41,4 +41,3 @@ function useHUDButtonsStyles(params) {
|
|
|
41
41
|
backgroundCoverStyle: __assign(__assign({}, HUDButtons_styles_1.styles['backgroundCover']), { backgroundImage: params.galleryPreview ? "url(".concat(params.galleryPreview, ")") : 'none', transition: backgroundAnimationStart ? 'none' : 'transform 0.2s ease-out', transform: "scale(".concat(backgroundAnimationStart ? 0.3 : 1, ")") }),
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
exports.useHUDButtonsStyles = useHUDButtonsStyles;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { HUDOverlayProps } from './hooks';
|
|
3
2
|
/**
|
|
4
3
|
* Component that displays an overlay on top of the PhotoCapture/DamageDisclosure component that is used
|
|
5
4
|
* to display elements such as error messages, spinning loaders etc.
|
|
6
5
|
*/
|
|
7
|
-
export declare function HUDOverlay({ isCaptureLoading, captureError, handle, onRetry, inspectionId, }: HUDOverlayProps): JSX.Element | null;
|
|
6
|
+
export declare function HUDOverlay({ isCaptureLoading, captureError, handle, onRetry, inspectionId, }: HUDOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -11,7 +11,7 @@ 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.HUDOverlay =
|
|
14
|
+
exports.HUDOverlay = HUDOverlay;
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var react_i18next_1 = require("react-i18next");
|
|
17
17
|
var common_ui_web_1 = require("@monkvision/common-ui-web");
|
|
@@ -31,6 +31,5 @@ function HUDOverlay(_a) {
|
|
|
31
31
|
if (!isCaptureLoading && !error) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: HUDOverlay_styles_1.styles['overlay'], "data-testid": 'overlay', children: [!error && isCaptureLoading && (0, jsx_runtime_1.jsx)(common_ui_web_1.Spinner, { size: 80, primaryColor: 'primary' }), error && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: __assign(__assign(__assign({}, HUDOverlay_styles_1.styles['errorMessage']), responsive(HUDOverlay_styles_1.styles['errorMessageMobile'])), responsive(HUDOverlay_styles_1.styles['errorMessageTablet'])), children: error }), handleRetry && ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { style: HUDOverlay_styles_1.styles['retryButton'], variant: 'outline', icon: 'refresh', onClick: handleRetry, children: t('photo.hud.error.retry') }))] }))] }));
|
|
35
35
|
}
|
|
36
|
-
exports.HUDOverlay = HUDOverlay;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.useErrorLabel = useErrorLabel;
|
|
4
|
+
exports.useRetry = useRetry;
|
|
4
5
|
var camera_web_1 = require("@monkvision/camera-web");
|
|
5
6
|
var react_i18next_1 = require("react-i18next");
|
|
6
7
|
var common_1 = require("@monkvision/common");
|
|
@@ -33,7 +34,6 @@ function useErrorLabel(captureError, handle, inspectionId) {
|
|
|
33
34
|
}
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
36
|
-
exports.useErrorLabel = useErrorLabel;
|
|
37
37
|
function useRetry(_a) {
|
|
38
38
|
var captureError = _a.captureError, handle = _a.handle, onRetry = _a.onRetry;
|
|
39
39
|
if (handle.error) {
|
|
@@ -54,4 +54,3 @@ function useRetry(_a) {
|
|
|
54
54
|
}
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
|
-
exports.useRetry = useRetry;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DeviceOrientation } from '@monkvision/types';
|
|
3
2
|
/**
|
|
4
3
|
* Props accepted by the OrientationEnforcer component.
|
|
@@ -13,4 +12,4 @@ export interface OrientationEnforcerProps {
|
|
|
13
12
|
* Component that enforces a certain device orientation. If the current device orientation is not equal to the one
|
|
14
13
|
* passed as a prop, it will display an error on the screen asking the user to rotate their device.
|
|
15
14
|
*/
|
|
16
|
-
export declare function OrientationEnforcer({ orientation }: OrientationEnforcerProps): JSX.Element | null;
|
|
15
|
+
export declare function OrientationEnforcer({ orientation }: OrientationEnforcerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,17 +1,6 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.OrientationEnforcer =
|
|
3
|
+
exports.OrientationEnforcer = OrientationEnforcer;
|
|
15
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
5
|
var common_ui_web_1 = require("@monkvision/common-ui-web");
|
|
17
6
|
var react_i18next_1 = require("react-i18next");
|
|
@@ -29,6 +18,5 @@ function OrientationEnforcer(_a) {
|
|
|
29
18
|
if (!isViolatingEnforcedOrientation) {
|
|
30
19
|
return null;
|
|
31
20
|
}
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: containerStyle, children: [(0, jsx_runtime_1.jsxs)("div", { style: OrientationEnforcer_styles_1.styles['titleContainer'], children: [(0, jsx_runtime_1.jsx)(common_ui_web_1.Icon, { icon: 'rotate', primaryColor: 'text-primary', size: 30 }), (0, jsx_runtime_1.jsx)("div", { style: OrientationEnforcer_styles_1.styles['title'], children: t('orientationEnforcer.title') })] }), (0, jsx_runtime_1.jsx)("div", { style: OrientationEnforcer_styles_1.styles['description'], children: t('orientationEnforcer.description') })] }));
|
|
33
22
|
}
|
|
34
|
-
exports.OrientationEnforcer = OrientationEnforcer;
|