@monkvision/inspection-capture-web 5.2.4 → 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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CameraProps } from '@monkvision/camera-web';
|
|
3
2
|
import { MonkApiConfig } from '@monkvision/network';
|
|
4
3
|
import { CameraConfig, PhotoCaptureAppConfig, ComplianceOptions, CompressionOptions, MonkPicture, VehicleType } from '@monkvision/types';
|
|
@@ -41,4 +40,4 @@ export interface DamageDisclosureProps extends Pick<CameraProps<DamageDisclosure
|
|
|
41
40
|
*/
|
|
42
41
|
lang?: string | null;
|
|
43
42
|
}
|
|
44
|
-
export declare function DamageDisclosure({ inspectionId, apiConfig, onClose, onComplete, onPictureTaken, enableCompliance, complianceIssues, customComplianceThresholds, useLiveCompliance, maxUploadDurationWarning, showCloseButton, addDamage, useAdaptiveImageQuality, lang, enforceOrientation, vehicleType, ...initialCameraConfig }: DamageDisclosureProps): JSX.Element;
|
|
43
|
+
export declare function DamageDisclosure({ inspectionId, apiConfig, onClose, onComplete, onPictureTaken, enableCompliance, complianceIssues, customComplianceThresholds, useLiveCompliance, maxUploadDurationWarning, showCloseButton, addDamage, useAdaptiveImageQuality, lang, enforceOrientation, vehicleType, ...initialCameraConfig }: DamageDisclosureProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.DamageDisclosure =
|
|
25
|
+
exports.DamageDisclosure = DamageDisclosure;
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var analytics_1 = require("@monkvision/analytics");
|
|
28
28
|
var camera_web_1 = require("@monkvision/camera-web");
|
|
@@ -107,6 +107,5 @@ function DamageDisclosure(_a) {
|
|
|
107
107
|
vehicleType: vehicleType,
|
|
108
108
|
enforceOrientation: enforceOrientation,
|
|
109
109
|
};
|
|
110
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
110
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: DamageDisclosure_styles_1.styles['container'], children: [currentScreen === types_2.CaptureScreen.CAMERA && ((0, jsx_runtime_1.jsx)(camera_web_1.Camera, __assign({ HUDComponent: DamageDisclosureHUD_1.DamageDisclosureHUD, onPictureTaken: handlePictureTaken, hudProps: hudProps }, adaptiveCameraConfig))), currentScreen === types_2.CaptureScreen.GALLERY && ((0, jsx_runtime_1.jsx)(common_ui_web_1.InspectionGallery, { inspectionId: inspectionId, sights: [], apiConfig: apiConfig, captureMode: true, lang: lang, showBackButton: true, onBack: handleGalleryBack, onNavigateToCapture: handleGalleryBack, onValidate: onComplete, addDamage: addDamage, validateButtonLabel: t('photo.gallery.next'), isInspectionCompleted: false, filterByImageType: types_1.ImageType.CLOSE_UP })), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: isBadConnectionWarningDialogDisplayed, showCancelButton: false, dialogIcon: 'warning-outline', dialogIconPrimaryColor: 'caution-base', message: t('photo.badConnectionWarning.message'), confirmLabel: t('photo.badConnectionWarning.confirm'), onConfirm: closeBadConnectionWarningDialog })] }));
|
|
111
111
|
}
|
|
112
|
-
exports.DamageDisclosure = DamageDisclosure;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PhotoCaptureAppConfig, Image, VehiclePart, VehicleType } from '@monkvision/types';
|
|
3
2
|
import { CameraHUDProps } from '@monkvision/camera-web';
|
|
4
3
|
import { LoadingState } from '@monkvision/common';
|
|
@@ -70,4 +69,4 @@ export interface DamageDisclosureHUDProps extends CameraHUDProps, Pick<PhotoCapt
|
|
|
70
69
|
* over the Camera preview. It implements elements such as buttons to interact with
|
|
71
70
|
* the camera, DamageDisclosure indicators, error messages, loaders etc.
|
|
72
71
|
*/
|
|
73
|
-
export declare function DamageDisclosureHUD({ inspectionId, lastPictureTakenUri, mode, vehicleParts, addDamage, onAddDamage, onAddDamagePartsSelected, onValidateVehicleParts, onCancelAddDamage, onOpenGallery, onClose, onRetry, showCloseButton, loading, handle, cameraPreview, enforceOrientation, images, vehicleType, }: DamageDisclosureHUDProps): JSX.Element;
|
|
72
|
+
export declare function DamageDisclosureHUD({ inspectionId, lastPictureTakenUri, mode, vehicleParts, addDamage, onAddDamage, onAddDamagePartsSelected, onValidateVehicleParts, onCancelAddDamage, onOpenGallery, onClose, onRetry, showCloseButton, loading, handle, cameraPreview, enforceOrientation, images, vehicleType, }: DamageDisclosureHUDProps): 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.DamageDisclosureHUD =
|
|
3
|
+
exports.DamageDisclosureHUD = DamageDisclosureHUD;
|
|
15
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
5
|
var react_1 = require("react");
|
|
17
6
|
var types_1 = require("@monkvision/types");
|
|
@@ -45,6 +34,5 @@ function DamageDisclosureHUD(_a) {
|
|
|
45
34
|
trackEvent('Disclosure Closed');
|
|
46
35
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
47
36
|
};
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
37
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: DamageDisclosureHUD_styles_1.styles['container'], children: [(0, jsx_runtime_1.jsxs)("div", { style: DamageDisclosureHUD_styles_1.styles['previewContainer'], "data-testid": 'camera-preview', children: [cameraPreview, (0, jsx_runtime_1.jsx)(DamageDisclosureHUDElements_1.DamageDisclosureHUDElements, { mode: mode, addDamage: addDamage, vehicleParts: vehicleParts, onAddDamage: onAddDamage, onCancelAddDamage: onCancelAddDamage, onAddDamagePartsSelected: onAddDamagePartsSelected, onValidateVehicleParts: onValidateVehicleParts, isLoading: loading.isLoading, error: (_b = loading.error) !== null && _b !== void 0 ? _b : handle.error, previewDimensions: handle.previewDimensions, vehicleType: vehicleType })] }), mode !== types_2.CaptureMode.ADD_DAMAGE_PART_SELECT && ((0, jsx_runtime_1.jsx)(HUDButtons_1.HUDButtons, { onOpenGallery: onOpenGallery, onTakePicture: handle === null || handle === void 0 ? void 0 : handle.takePicture, onClose: function () { return setShowCloseModal(true); }, galleryPreview: lastPictureTakenUri !== null && lastPictureTakenUri !== void 0 ? lastPictureTakenUri : undefined, closeDisabled: !!loading.error || !!handle.error, galleryDisabled: !!loading.error || !!handle.error, takePictureDisabled: !!loading.error || !!handle.error || handle.isLoading || loading.isLoading, showCloseButton: showCloseButton, showGalleryBadge: retakeCount > 0, retakeCount: retakeCount })), (0, jsx_runtime_1.jsx)(HUDOverlay_1.HUDOverlay, { inspectionId: inspectionId, handle: handle, isCaptureLoading: loading.isLoading, captureError: loading.error, onRetry: onRetry }), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: showCloseModal, message: t('photo.hud.closeConfirm.message'), cancelLabel: t('photo.hud.closeConfirm.cancel'), confirmLabel: t('photo.hud.closeConfirm.confirm'), onCancel: function () { return setShowCloseModal(false); }, onConfirm: handleCloseConfirm }), (0, jsx_runtime_1.jsx)(components_1.OrientationEnforcer, { orientation: enforceOrientation })] }));
|
|
49
38
|
}
|
|
50
|
-
exports.DamageDisclosureHUD = DamageDisclosureHUD;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PhotoCaptureAppConfig, PixelDimensions, VehiclePart, VehicleType } from '@monkvision/types';
|
|
3
2
|
import { CaptureMode } from '../../../types';
|
|
4
3
|
/**
|
|
@@ -49,4 +48,4 @@ export interface DamageDisclosureHUDElementsProps extends Pick<PhotoCaptureAppCo
|
|
|
49
48
|
/**
|
|
50
49
|
* Component implementing an HUD displayed on top of the Camera preview during the DamageDisclosure process.
|
|
51
50
|
*/
|
|
52
|
-
export declare function DamageDisclosureHUDElements(params: DamageDisclosureHUDElementsProps): JSX.Element | null;
|
|
51
|
+
export declare function DamageDisclosureHUDElements(params: DamageDisclosureHUDElementsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DamageDisclosureHUDElements =
|
|
3
|
+
exports.DamageDisclosureHUDElements = DamageDisclosureHUDElements;
|
|
4
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
var types_1 = require("../../../types");
|
|
6
6
|
var components_1 = require("../../../components");
|
|
@@ -19,4 +19,3 @@ function DamageDisclosureHUDElements(params) {
|
|
|
19
19
|
}
|
|
20
20
|
return ((0, jsx_runtime_1.jsx)(components_1.PartSelection, { vehicleType: params.vehicleType, onCancel: params.onCancelAddDamage, vehicleParts: params.vehicleParts, onValidateVehicleParts: params.onValidateVehicleParts, onAddDamagePartsSelected: params.onAddDamagePartsSelected }));
|
|
21
21
|
}
|
|
22
|
-
exports.DamageDisclosureHUDElements = DamageDisclosureHUDElements;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDamageDisclosureState =
|
|
3
|
+
exports.useDamageDisclosureState = useDamageDisclosureState;
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var network_1 = require("@monkvision/network");
|
|
6
6
|
var monitoring_1 = require("@monkvision/monitoring");
|
|
@@ -52,4 +52,3 @@ function useDamageDisclosureState(_a) {
|
|
|
52
52
|
retryLoadingInspection: retryLoadingInspection,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
exports.useDamageDisclosureState = useDamageDisclosureState;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { MonkApiConfig } from '@monkvision/network';
|
|
3
2
|
import { CameraConfig, ComplianceOptions, MonkPicture, PhotoCaptureAppConfig, Sight, VehicleType } from '@monkvision/types';
|
|
4
3
|
/**
|
|
@@ -48,4 +47,4 @@ export interface PhotoCaptureProps extends Pick<PhotoCaptureAppConfig, keyof Cam
|
|
|
48
47
|
*/
|
|
49
48
|
validateButtonLabel?: string;
|
|
50
49
|
}
|
|
51
|
-
export declare function PhotoCapture({ sights, inspectionId, apiConfig, additionalTasks, tasksBySight, startTasksOnComplete, onClose, onComplete, onPictureTaken, maxUploadDurationWarning, showCloseButton, enableCompliance, enableCompliancePerSight, complianceIssues, complianceIssuesPerSight, customComplianceThresholds, customComplianceThresholdsPerSight, useLiveCompliance, allowSkipRetake, addDamage, sightGuidelines, enableTutorial, allowSkipTutorial, enableSightTutorial, sightTutorial, enableSightGuidelines, useAdaptiveImageQuality, lang, enforceOrientation, validateButtonLabel, vehicleType, autoDeletePreviousSightImages, ...initialCameraConfig }: PhotoCaptureProps): JSX.Element;
|
|
50
|
+
export declare function PhotoCapture({ sights, inspectionId, apiConfig, additionalTasks, tasksBySight, startTasksOnComplete, onClose, onComplete, onPictureTaken, maxUploadDurationWarning, showCloseButton, enableCompliance, enableCompliancePerSight, complianceIssues, complianceIssuesPerSight, customComplianceThresholds, customComplianceThresholdsPerSight, useLiveCompliance, allowSkipRetake, addDamage, sightGuidelines, enableTutorial, allowSkipTutorial, enableSightTutorial, sightTutorial, enableSightGuidelines, useAdaptiveImageQuality, lang, enforceOrientation, validateButtonLabel, vehicleType, autoDeletePreviousSightImages, ...initialCameraConfig }: PhotoCaptureProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.PhotoCapture =
|
|
25
|
+
exports.PhotoCapture = PhotoCapture;
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var analytics_1 = require("@monkvision/analytics");
|
|
28
28
|
var camera_web_1 = require("@monkvision/camera-web");
|
|
@@ -194,6 +194,5 @@ function PhotoCapture(_a) {
|
|
|
194
194
|
showSightTutorial: showSightTutorial,
|
|
195
195
|
toggleSightTutorial: toggleSightTutorial,
|
|
196
196
|
};
|
|
197
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
197
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: PhotoCapture_styles_1.styles['container'], children: [currentScreen === PhotoCaptureScreen.CAMERA && ((0, jsx_runtime_1.jsx)(camera_web_1.Camera, __assign({ HUDComponent: PhotoCaptureHUD_1.PhotoCaptureHUD, onPictureTaken: handlePictureTaken, hudProps: hudProps }, adaptiveCameraConfig))), currentScreen === PhotoCaptureScreen.GALLERY && ((0, jsx_runtime_1.jsx)(common_ui_web_1.InspectionGallery, __assign({ inspectionId: inspectionId, apiConfig: apiConfig, captureMode: true, lang: lang, showBackButton: true, sights: sights, allowSkipRetake: allowSkipRetake, onBack: handleGalleryBack, onNavigateToCapture: handleNavigateToCapture, onValidate: handleInspectionCompleted, addDamage: addDamage, validateButtonLabel: validateButtonLabel, isInspectionCompleted: sightState.isInspectionCompleted }, complianceOptions))), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: isBadConnectionWarningDialogDisplayed, showCancelButton: false, dialogIcon: 'warning-outline', dialogIconPrimaryColor: 'caution-base', message: t('photo.badConnectionWarning.message'), confirmLabel: t('photo.badConnectionWarning.confirm'), onConfirm: closeBadConnectionWarningDialog })] }));
|
|
198
198
|
}
|
|
199
|
-
exports.PhotoCapture = PhotoCapture;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PhotoCaptureAppConfig, Image, Sight, VehiclePart, VehicleType } from '@monkvision/types';
|
|
3
2
|
import { CameraHUDProps } from '@monkvision/camera-web';
|
|
4
3
|
import { LoadingState } from '@monkvision/common';
|
|
@@ -119,4 +118,4 @@ export interface PhotoCaptureHUDProps extends CameraHUDProps, Pick<PhotoCaptureA
|
|
|
119
118
|
* preview. It implements elements such as buttons to interact with the camera, PhotoCapture indicators, error messages,
|
|
120
119
|
* loaders etc.
|
|
121
120
|
*/
|
|
122
|
-
export declare function PhotoCaptureHUD({ inspectionId, sights, selectedSight, sightsTaken, lastPictureTakenUri, mode, vehicleParts, onSelectSight, onRetakeSight, onAddDamage, onAddDamagePartsSelected, onValidateVehicleParts, onCancelAddDamage, onOpenGallery, onRetry, onClose, showCloseButton, loading, handle, cameraPreview, images, addDamage, sightGuidelines, showSightGuidelines, currentTutorialStep, allowSkipTutorial, onNextTutorialStep, onCloseTutorial, enforceOrientation, vehicleType, onDisableSightGuidelines, sightTutorial, enableSightTutorial, showSightTutorial, toggleSightTutorial, }: PhotoCaptureHUDProps): JSX.Element;
|
|
121
|
+
export declare function PhotoCaptureHUD({ inspectionId, sights, selectedSight, sightsTaken, lastPictureTakenUri, mode, vehicleParts, onSelectSight, onRetakeSight, onAddDamage, onAddDamagePartsSelected, onValidateVehicleParts, onCancelAddDamage, onOpenGallery, onRetry, onClose, showCloseButton, loading, handle, cameraPreview, images, addDamage, sightGuidelines, showSightGuidelines, currentTutorialStep, allowSkipTutorial, onNextTutorialStep, onCloseTutorial, enforceOrientation, vehicleType, onDisableSightGuidelines, sightTutorial, enableSightTutorial, showSightTutorial, toggleSightTutorial, }: PhotoCaptureHUDProps): 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.PhotoCaptureHUD =
|
|
3
|
+
exports.PhotoCaptureHUD = PhotoCaptureHUD;
|
|
15
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
5
|
var react_1 = require("react");
|
|
17
6
|
var types_1 = require("@monkvision/types");
|
|
@@ -46,6 +35,5 @@ function PhotoCaptureHUD(_a) {
|
|
|
46
35
|
trackEvent('Capture Closed');
|
|
47
36
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
48
37
|
};
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: style.container, children: [(0, jsx_runtime_1.jsxs)("div", { style: style.previewContainer, "data-testid": 'camera-preview', children: [cameraPreview, (0, jsx_runtime_1.jsx)(PhotoCaptureHUDElements_1.PhotoCaptureHUDElements, { selectedSight: selectedSight, sights: sights, sightsTaken: sightsTaken, mode: mode, vehicleParts: vehicleParts, onAddDamage: onAddDamage, onCancelAddDamage: onCancelAddDamage, onAddDamagePartsSelected: onAddDamagePartsSelected, onSelectSight: onSelectSight, onRetakeSight: onRetakeSight, onValidateVehicleParts: onValidateVehicleParts, error: (_b = loading.error) !== null && _b !== void 0 ? _b : handle.error, previewDimensions: handle.previewDimensions, images: images, addDamage: addDamage, sightGuidelines: sightGuidelines, showSightGuidelines: showSightGuidelines, tutorialStep: currentTutorialStep, vehicleType: vehicleType, onDisableSightGuidelines: onDisableSightGuidelines, enableSightTutorial: enableSightTutorial, toggleSightTutorial: toggleSightTutorial })] }), mode !== types_2.CaptureMode.ADD_DAMAGE_PART_SELECT && ((0, jsx_runtime_1.jsx)(components_1.HUDButtons, { onOpenGallery: onOpenGallery, onTakePicture: handle === null || handle === void 0 ? void 0 : handle.takePicture, onClose: function () { return setShowCloseModal(true); }, galleryPreview: lastPictureTakenUri !== null && lastPictureTakenUri !== void 0 ? lastPictureTakenUri : undefined, closeDisabled: !!loading.error || !!handle.error, galleryDisabled: !!loading.error || !!handle.error, takePictureDisabled: !!loading.error || !!handle.error || handle.isLoading || loading.isLoading, showCloseButton: showCloseButton, showGalleryBadge: retakeCount > 0, retakeCount: retakeCount })), (0, jsx_runtime_1.jsx)(components_1.HUDOverlay, { inspectionId: inspectionId, handle: handle, isCaptureLoading: loading.isLoading, captureError: loading.error, onRetry: onRetry }), (0, jsx_runtime_1.jsx)(common_ui_web_1.BackdropDialog, { show: showCloseModal, message: t('photo.hud.closeConfirm.message'), cancelLabel: t('photo.hud.closeConfirm.cancel'), confirmLabel: t('photo.hud.closeConfirm.confirm'), onCancel: function () { return setShowCloseModal(false); }, onConfirm: handleCloseConfirm }), (0, jsx_runtime_1.jsx)(PhotoCaptureHUDTutorial_1.PhotoCaptureHUDTutorial, { currentTutorialStep: handle.error || loading.error ? null : currentTutorialStep, onNextTutorialStep: onNextTutorialStep, onCloseTutorial: onCloseTutorial, allowSkipTutorial: allowSkipTutorial, sightId: selectedSight.id, sightGuidelines: sightGuidelines, addDamage: addDamage, toggleSightTutorial: toggleSightTutorial }), (0, jsx_runtime_1.jsx)(PhotoCaptureHUDSightTutorial_1.PhotoCaptureHUDSightTutorial, { show: showSightTutorial, sightTutorial: sightTutorial, selectedSight: selectedSight, onClose: toggleSightTutorial, enableSightTutorial: enableSightTutorial }), (0, jsx_runtime_1.jsx)(components_1.OrientationEnforcer, { orientation: enforceOrientation })] }));
|
|
50
39
|
}
|
|
51
|
-
exports.PhotoCaptureHUD = PhotoCaptureHUD;
|
package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PhotoCaptureAppConfig, Image, PixelDimensions, Sight, VehiclePart, VehicleType } from '@monkvision/types';
|
|
3
2
|
import { TutorialSteps } from '../../hooks';
|
|
4
3
|
import { CaptureMode } from '../../../types';
|
|
@@ -86,4 +85,4 @@ export interface PhotoCaptureHUDElementsProps extends Pick<PhotoCaptureAppConfig
|
|
|
86
85
|
/**
|
|
87
86
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process.
|
|
88
87
|
*/
|
|
89
|
-
export declare function PhotoCaptureHUDElements(params: PhotoCaptureHUDElementsProps): JSX.Element | null;
|
|
88
|
+
export declare function PhotoCaptureHUDElements(params: PhotoCaptureHUDElementsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PhotoCaptureHUDElements =
|
|
3
|
+
exports.PhotoCaptureHUDElements = PhotoCaptureHUDElements;
|
|
4
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
var PhotoCaptureHUDElementsSight_1 = require("../PhotoCaptureHUDElementsSight");
|
|
6
6
|
var components_1 = require("../../../components");
|
|
@@ -23,4 +23,3 @@ function PhotoCaptureHUDElements(params) {
|
|
|
23
23
|
}
|
|
24
24
|
return ((0, jsx_runtime_1.jsx)(components_1.PartSelection, { onCancel: params.onCancelAddDamage, vehicleParts: params.vehicleParts, vehicleType: params.vehicleType, onValidateVehicleParts: params.onValidateVehicleParts, onAddDamagePartsSelected: params.onAddDamagePartsSelected }));
|
|
25
25
|
}
|
|
26
|
-
exports.PhotoCaptureHUDElements = PhotoCaptureHUDElements;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { AddDamage } from '@monkvision/types';
|
|
3
2
|
/**
|
|
4
3
|
* Props of the AddDamageButton component.
|
|
@@ -16,4 +15,4 @@ export interface AddDamageButtonProps {
|
|
|
16
15
|
/**
|
|
17
16
|
* Custom button displayed in the PhotoCapture Camera HUD that allows user to enter add damage mode.
|
|
18
17
|
*/
|
|
19
|
-
export declare function AddDamageButton({ onAddDamage, addDamage }: AddDamageButtonProps): JSX.Element | null;
|
|
18
|
+
export declare function AddDamageButton({ onAddDamage, addDamage }: AddDamageButtonProps): 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.AddDamageButton =
|
|
3
|
+
exports.AddDamageButton = AddDamageButton;
|
|
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");
|
|
@@ -24,6 +13,5 @@ function AddDamageButton(_a) {
|
|
|
24
13
|
var onAddDamage = _a.onAddDamage, addDamage = _a.addDamage;
|
|
25
14
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
26
15
|
var primaryColor = (0, hooks_1.useColorBackground)();
|
|
27
|
-
return [types_1.AddDamage.TWO_SHOT, types_1.AddDamage.PART_SELECT].includes(addDamage) ? ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button,
|
|
16
|
+
return [types_1.AddDamage.TWO_SHOT, types_1.AddDamage.PART_SELECT].includes(addDamage) ? ((0, jsx_runtime_1.jsx)(common_ui_web_1.Button, { icon: 'add', onClick: onAddDamage, "data-testid": 'monk-test-btn', primaryColor: primaryColor, children: t('photo.hud.sight.addDamageBtn') })) : null;
|
|
28
17
|
}
|
|
29
|
-
exports.AddDamageButton = AddDamageButton;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PhotoCaptureHUDElementsSightProps } from './hooks';
|
|
3
2
|
/**
|
|
4
3
|
* Component implementing an HUD displayed on top of the Camera preview during the PhotoCapture process when the current
|
|
5
4
|
* mode is SIGHT.
|
|
6
5
|
*/
|
|
7
|
-
export declare function PhotoCaptureHUDElementsSight({ sights, selectedSight, onSelectedSight, onRetakeSight, onAddDamage, onDisableSightGuidelines, sightsTaken, previewDimensions, images, addDamage, sightGuidelines, showSightGuidelines, tutorialStep, enableSightTutorial, toggleSightTutorial, }: PhotoCaptureHUDElementsSightProps): JSX.Element;
|
|
6
|
+
export declare function PhotoCaptureHUDElementsSight({ sights, selectedSight, onSelectedSight, onRetakeSight, onAddDamage, onDisableSightGuidelines, sightsTaken, previewDimensions, images, addDamage, sightGuidelines, showSightGuidelines, tutorialStep, enableSightTutorial, toggleSightTutorial, }: PhotoCaptureHUDElementsSightProps): 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.PhotoCaptureHUDElementsSight =
|
|
3
|
+
exports.PhotoCaptureHUDElementsSight = PhotoCaptureHUDElementsSight;
|
|
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 types_1 = require("@monkvision/types");
|
|
@@ -31,9 +20,8 @@ function PhotoCaptureHUDElementsSight(_a) {
|
|
|
31
20
|
var sights = _a.sights, selectedSight = _a.selectedSight, _b = _a.onSelectedSight, onSelectedSight = _b === void 0 ? function () { } : _b, _c = _a.onRetakeSight, onRetakeSight = _c === void 0 ? function () { } : _c, _d = _a.onAddDamage, onAddDamage = _d === void 0 ? function () { } : _d, _e = _a.onDisableSightGuidelines, onDisableSightGuidelines = _e === void 0 ? function () { } : _e, sightsTaken = _a.sightsTaken, previewDimensions = _a.previewDimensions, images = _a.images, addDamage = _a.addDamage, sightGuidelines = _a.sightGuidelines, showSightGuidelines = _a.showSightGuidelines, tutorialStep = _a.tutorialStep, enableSightTutorial = _a.enableSightTutorial, toggleSightTutorial = _a.toggleSightTutorial;
|
|
32
21
|
var style = (0, hooks_1.usePhotoCaptureHUDSightPreviewStyle)({ previewDimensions: previewDimensions });
|
|
33
22
|
var showSight = previewDimensions && (!tutorialStep || tutorialStep === hooks_2.TutorialSteps.SIGHT);
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)("div",
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: PhotoCaptureHUDElementsSight_styles_1.styles['container'], children: [showSight && (0, jsx_runtime_1.jsx)(common_ui_web_1.SightOverlay, { style: style.overlay, sight: selectedSight }), !tutorialStep && ((0, jsx_runtime_1.jsxs)("div", { style: style.elementsContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: style.top, children: [[
|
|
35
24
|
types_1.PhotoCaptureSightTutorialOption.CLASSIC,
|
|
36
25
|
types_1.PhotoCaptureSightTutorialOption.MODERN,
|
|
37
|
-
].includes(enableSightTutorial) && ((0, jsx_runtime_1.jsx)(components_1.SightTutorialButton, { toggleSightTutorial: toggleSightTutorial })), (0, jsx_runtime_1.jsx)(SightGuideline_1.SightGuideline, { sightId: selectedSight.id, sightGuidelines: sightGuidelines, disabled: !showSightGuidelines, addDamage: addDamage, onDisableSightGuidelines: onDisableSightGuidelines }), (0, jsx_runtime_1.jsx)(AddDamageButton_1.AddDamageButton, { onAddDamage: onAddDamage, addDamage: addDamage })] })
|
|
26
|
+
].includes(enableSightTutorial) && ((0, jsx_runtime_1.jsx)(components_1.SightTutorialButton, { toggleSightTutorial: toggleSightTutorial })), (0, jsx_runtime_1.jsx)(SightGuideline_1.SightGuideline, { sightId: selectedSight.id, sightGuidelines: sightGuidelines, disabled: !showSightGuidelines, addDamage: addDamage, onDisableSightGuidelines: onDisableSightGuidelines }), (0, jsx_runtime_1.jsx)(AddDamageButton_1.AddDamageButton, { onAddDamage: onAddDamage, addDamage: addDamage })] }), (0, jsx_runtime_1.jsxs)("div", { style: style.bottom, children: [(0, jsx_runtime_1.jsx)(components_1.Counter, { mode: types_2.CaptureMode.SIGHT, totalSights: sights.length, sightsTaken: sightsTaken.length }), (0, jsx_runtime_1.jsx)(SightSlider_1.SightSlider, { sights: sights, selectedSight: selectedSight, sightsTaken: sightsTaken, onSelectedSight: onSelectedSight, onRetakeSight: onRetakeSight, images: images })] })] }))] }));
|
|
38
27
|
}
|
|
39
|
-
exports.PhotoCaptureHUDElementsSight = PhotoCaptureHUDElementsSight;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PhotoCaptureAppConfig } from '@monkvision/types';
|
|
3
2
|
/**
|
|
4
3
|
* Props of the SightGuideline component.
|
|
@@ -28,4 +27,4 @@ export interface SightGuidelineProps extends Pick<PhotoCaptureAppConfig, 'addDam
|
|
|
28
27
|
/**
|
|
29
28
|
* Custom button displaying the sight guideline.
|
|
30
29
|
*/
|
|
31
|
-
export declare function SightGuideline({ sightId, sightGuidelines, addDamage, enableDefaultMessage, disabled, onDisableSightGuidelines, }: SightGuidelineProps): JSX.Element;
|
|
30
|
+
export declare function SightGuideline({ sightId, sightGuidelines, addDamage, enableDefaultMessage, disabled, onDisableSightGuidelines, }: SightGuidelineProps): 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.SightGuideline =
|
|
3
|
+
exports.SightGuideline = SightGuideline;
|
|
15
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
5
|
var react_1 = require("react");
|
|
17
6
|
var react_i18next_1 = require("react-i18next");
|
|
@@ -39,10 +28,9 @@ function SightGuideline(_a) {
|
|
|
39
28
|
setShowGuideline(false);
|
|
40
29
|
};
|
|
41
30
|
(0, react_1.useEffect)(function () { return setShowGuideline(true); }, [sightId]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)("div",
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: style.container, "data-testid": 'container', children: !disabled && showGuideline && guideline && ((0, jsx_runtime_1.jsxs)("div", { style: style.guideline, "data-testid": 'guideline', children: [guideline, (0, jsx_runtime_1.jsxs)("div", { style: SightGuideline_styles_1.styles['buttonContainer'], children: [(0, jsx_runtime_1.jsxs)("div", { style: SightGuideline_styles_1.styles['checkbox'], role: 'checkbox', "aria-checked": checked, tabIndex: 0, onClick: function () { return setChecked(!checked); }, onKeyDown: function (e) {
|
|
43
32
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
44
33
|
setChecked(!checked);
|
|
45
34
|
}
|
|
46
|
-
}, "data-testid": 'checkbox-container'
|
|
35
|
+
}, "data-testid": 'checkbox-container', children: [(0, jsx_runtime_1.jsx)("input", { type: 'checkbox', checked: checked, onChange: function (e) { return e.stopPropagation(); } }), (0, jsx_runtime_1.jsx)("span", { children: t('photo.hud.guidelines.disable') })] }), (0, jsx_runtime_1.jsx)("button", { style: SightGuideline_styles_1.styles['button'], onClick: handleShowSightGuidelines, "data-testid": 'button', children: t('photo.hud.guidelines.validate') })] })] })) }));
|
|
47
36
|
}
|
|
48
|
-
exports.SightGuideline = SightGuideline;
|