idmission-web-sdk 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +4 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +10 -1
- package/dist/sdk2.cjs.development.js +25 -14
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +25 -14
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +25 -14
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/package.json +1 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -8819,6 +8819,9 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8819
8819
|
cameraInitializingText = _a.cameraInitializingText,
|
|
8820
8820
|
cameraAccessBlockedText = _a.cameraAccessBlockedText,
|
|
8821
8821
|
continueText = _a.continueText,
|
|
8822
|
+
continueBtnDisabledBackgroundColor = _a.continueBtnDisabledBackgroundColor,
|
|
8823
|
+
continueBtnBackgroundColor = _a.continueBtnBackgroundColor,
|
|
8824
|
+
continueBtnTextColor = _a.continueBtnTextColor,
|
|
8822
8825
|
_b = _a.instructionImageUrl,
|
|
8823
8826
|
instructionImageUrl = _b === void 0 ? DEFAULT_CDN_URL + '/WebSDK-Instruction-DL-Capture-3-Portrait.png' : _b,
|
|
8824
8827
|
_c = _a.accessBlockedImageUrl,
|
|
@@ -8836,6 +8839,15 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8836
8839
|
var _e = useState(false),
|
|
8837
8840
|
dismissed = _e[0],
|
|
8838
8841
|
setDismissed = _e[1];
|
|
8842
|
+
headingText || (headingText = t('Use your device camera to capture your ID'));
|
|
8843
|
+
useContinuityCameraText || (useContinuityCameraText = t('Use your iPhone as a webcam'));
|
|
8844
|
+
modelsWarmingUpText || (modelsWarmingUpText = t('Models warming up...'));
|
|
8845
|
+
cameraInitializingText || (cameraInitializingText = t('Camera initializing...'));
|
|
8846
|
+
cameraAccessBlockedText || (cameraAccessBlockedText = t('Camera access blocked'));
|
|
8847
|
+
continueText || (continueText = t('Continue'));
|
|
8848
|
+
continueBtnDisabledBackgroundColor || (continueBtnDisabledBackgroundColor = 'gray');
|
|
8849
|
+
continueBtnBackgroundColor || (continueBtnBackgroundColor = 'mint');
|
|
8850
|
+
continueBtnTextColor || (continueBtnTextColor = 'white');
|
|
8839
8851
|
useEffect(function () {
|
|
8840
8852
|
if (!buttonRef.current) return;
|
|
8841
8853
|
laddaRef.current = Ladda.create(buttonRef.current);
|
|
@@ -8874,12 +8886,6 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8874
8886
|
accessBlockedImageUrl: accessBlockedImageUrl
|
|
8875
8887
|
});
|
|
8876
8888
|
}
|
|
8877
|
-
headingText = headingText || t('Use your device camera to capture your ID');
|
|
8878
|
-
useContinuityCameraText = useContinuityCameraText || t('Use your iPhone as a webcam');
|
|
8879
|
-
modelsWarmingUpText = modelsWarmingUpText || t('Models warming up...');
|
|
8880
|
-
cameraInitializingText = cameraInitializingText || t('Camera initializing...');
|
|
8881
|
-
cameraAccessBlockedText = cameraAccessBlockedText || t('Camera access blocked');
|
|
8882
|
-
continueText = continueText || t('Continue');
|
|
8883
8889
|
return /*#__PURE__*/React__default.createElement(OverlayContainer, null, /*#__PURE__*/React__default.createElement(OverlayInner, null, /*#__PURE__*/React__default.createElement("h3", null, headingText), /*#__PURE__*/React__default.createElement(OverlayImageWrapper, {
|
|
8884
8890
|
style: {
|
|
8885
8891
|
pointerEvents: 'none'
|
|
@@ -8903,11 +8909,14 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8903
8909
|
}), /*#__PURE__*/React__default.createElement("label", {
|
|
8904
8910
|
htmlFor: "use-continuity-camera"
|
|
8905
8911
|
}, useContinuityCameraText))), /*#__PURE__*/React__default.createElement("button", {
|
|
8912
|
+
ref: buttonRef,
|
|
8906
8913
|
className: "ladda-button",
|
|
8907
8914
|
"data-style": "expand-right",
|
|
8908
|
-
"data-color": "mint",
|
|
8909
8915
|
disabled: !cameraReady || !modelsReady,
|
|
8910
|
-
|
|
8916
|
+
style: {
|
|
8917
|
+
color: continueBtnTextColor,
|
|
8918
|
+
backgroundColor: !cameraReady || !modelsReady ? continueBtnDisabledBackgroundColor : continueBtnBackgroundColor
|
|
8919
|
+
},
|
|
8911
8920
|
onClick: function onClick() {
|
|
8912
8921
|
setDismissed(true);
|
|
8913
8922
|
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
|
|
@@ -9591,6 +9600,8 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9591
9600
|
cameraInitializingText: verbiage.loadingOverlayCameraInitializingText,
|
|
9592
9601
|
cameraAccessBlockedText: verbiage.loadingOverlayCameraAccessBlockedText,
|
|
9593
9602
|
continueText: verbiage.loadingOverlayContinueText,
|
|
9603
|
+
continueBtnBackgroundColor: colors.loadingContinueBtnBackgroundColor,
|
|
9604
|
+
continueBtnTextColor: colors.loadingContinueBtnTextColor,
|
|
9594
9605
|
instructionImageUrl: assets.loadingOverlayInstructionImageUrl,
|
|
9595
9606
|
onDismissed: function onDismissed() {
|
|
9596
9607
|
setOverlayDismissed(true);
|
|
@@ -10904,6 +10915,11 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
10904
10915
|
if (cameraAccessDenied) return;
|
|
10905
10916
|
listAvailableCameras().then(function (availableCameras) {
|
|
10906
10917
|
var selectedCamera;
|
|
10918
|
+
if (preferFrontFacingCamera) {
|
|
10919
|
+
selectedCamera = availableCameras.find(function (deviceInfo) {
|
|
10920
|
+
return labelMatches(deviceInfo, frontLabels);
|
|
10921
|
+
});
|
|
10922
|
+
}
|
|
10907
10923
|
var platform = getPlatform();
|
|
10908
10924
|
if (!iphoneContinuityCameraDenied && (!platform || platform.os.family === 'OS X')) {
|
|
10909
10925
|
var iphoneContinuityCamera = availableCameras.find(function (deviceInfo) {
|
|
@@ -10911,14 +10927,9 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
10911
10927
|
});
|
|
10912
10928
|
setIphoneContinuityCameraAvailable(!!iphoneContinuityCamera);
|
|
10913
10929
|
if (iphoneContinuityCamera && iphoneContinuityCameraAllowed) {
|
|
10914
|
-
selectedCamera = iphoneContinuityCamera;
|
|
10930
|
+
selectedCamera || (selectedCamera = iphoneContinuityCamera);
|
|
10915
10931
|
}
|
|
10916
10932
|
}
|
|
10917
|
-
if (preferFrontFacingCamera) {
|
|
10918
|
-
selectedCamera || (selectedCamera = availableCameras.find(function (deviceInfo) {
|
|
10919
|
-
return labelMatches(deviceInfo, frontLabels);
|
|
10920
|
-
}));
|
|
10921
|
-
}
|
|
10922
10933
|
if (wideAngleIsBetter()) {
|
|
10923
10934
|
selectedCamera || (selectedCamera = availableCameras.find(function (deviceInfo) {
|
|
10924
10935
|
return labelMatches(deviceInfo, backUltraWideLabels);
|