idmission-web-sdk 0.0.47 → 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/README.md
CHANGED
|
@@ -90,8 +90,14 @@ Render a fullscreen ID capture component that instructs the user to photograph b
|
|
|
90
90
|
|
|
91
91
|
**ID Capture Colors**
|
|
92
92
|
<table>
|
|
93
|
+
<tr><td><code>loadingContinueBtnBackgroundColor</code></td><td>Default: mint</td></tr>
|
|
94
|
+
<tr><td><code>loadingContinueBtnTextColor</code></td><td>Default: white</td></tr>
|
|
93
95
|
<tr><td><code>guideBoxUnsatisfiedColor</code></td><td>Default: white</td></tr>
|
|
94
96
|
<tr><td><code>guideBoxSatisfiedColor</code></td><td>Default: green</td></tr>
|
|
97
|
+
<tr><td><code>successDoneBtnBackgroundColor</code></td><td>Default: mint</td></tr>
|
|
98
|
+
<tr><td><code>successDoneBtnTextColor</code></td><td>Default: white</td></tr>
|
|
99
|
+
<tr><td><code>successRetryBtnBackgroundColor</code></td><td>Default: orange</td></tr>
|
|
100
|
+
<tr><td><code>successRetryBtnTextColor</code></td><td>Default: white</td></tr>
|
|
95
101
|
</table>
|
|
96
102
|
|
|
97
103
|
**ID Capture Verbiage**
|
|
@@ -178,12 +184,22 @@ Render a fullscreen capture component that analyzes frames from the user's front
|
|
|
178
184
|
**Face Liveness Colors**
|
|
179
185
|
|
|
180
186
|
<table>
|
|
187
|
+
<tr><td><code>loadingContinueBtnBackgroundColor</code></td><td>Default: mint</td></tr>
|
|
188
|
+
<tr><td><code>loadingContinueBtnTextColor</code></td><td>Default: white</td></tr>
|
|
181
189
|
<tr><td><code>guidesUnsatisfiedColor</code></td><td>Default: white</td></tr>
|
|
182
190
|
<tr><td><code>guidesSatisfiedColor</code></td><td>Default: green</td></tr>
|
|
183
191
|
<tr><td><code>guidanceMessagesSatisfiedBackgroundColor</code></td><td>Default: green</td></tr>
|
|
184
192
|
<tr><td><code>guidanceMessagesUnsatisfiedBackgroundColor</code></td><td>Default: red</td></tr>
|
|
185
193
|
<tr><td><code>guidanceMessagesSatisfiedTextColor</code></td><td>Default: white</td></tr>
|
|
186
194
|
<tr><td><code>guidanceMessagesUnsatisfiedTextColor</code></td><td>Default: white</td></tr>
|
|
195
|
+
<tr><td><code>successDoneBtnBackgroundColor</code></td><td>Default: mint</td></tr>
|
|
196
|
+
<tr><td><code>successDoneBtnTextColor</code></td><td>Default: white</td></tr>
|
|
197
|
+
<tr><td><code>successRetryBtnBackgroundColor</code></td><td>Default: orange</td></tr>
|
|
198
|
+
<tr><td><code>successRetryBtnTextColor</code></td><td>Default: white</td></tr>
|
|
199
|
+
<tr><td><code>failureRetryBtnBackgroundColor</code></td><td>Default: orange</td></tr>
|
|
200
|
+
<tr><td><code>failureRetryBtnTextColor</code></td><td>Default: white</td></tr>
|
|
201
|
+
<tr><td><code>failureExitBtnBackgroundColor</code></td><td>Default: darkgray</td></tr>
|
|
202
|
+
<tr><td><code>failureExitBtnTextColor</code></td><td>Default: white</td></tr>
|
|
187
203
|
</table>
|
|
188
204
|
|
|
189
205
|
**Face Liveness Verbiage**
|
|
@@ -454,12 +470,22 @@ Render a fullscreen capture component that analyzes frames from the user's front
|
|
|
454
470
|
**Customer Identification Colors**
|
|
455
471
|
|
|
456
472
|
<table>
|
|
473
|
+
<tr><td><code>loadingContinueBtnBackgroundColor</code></td><td>Default: mint</td></tr>
|
|
474
|
+
<tr><td><code>loadingContinueBtnTextColor</code></td><td>Default: white</td></tr>
|
|
457
475
|
<tr><td><code>guidesUnsatisfiedColor</code></td><td>Default: white</td></tr>
|
|
458
476
|
<tr><td><code>guidesSatisfiedColor</code></td><td>Default: green</td></tr>
|
|
459
477
|
<tr><td><code>guidanceMessagesSatisfiedBackgroundColor</code></td><td>Default: green</td></tr>
|
|
460
478
|
<tr><td><code>guidanceMessagesUnsatisfiedBackgroundColor</code></td><td>Default: red</td></tr>
|
|
461
479
|
<tr><td><code>guidanceMessagesSatisfiedTextColor</code></td><td>Default: white</td></tr>
|
|
462
480
|
<tr><td><code>guidanceMessagesUnsatisfiedTextColor</code></td><td>Default: white</td></tr>
|
|
481
|
+
<tr><td><code>successDoneBtnBackgroundColor</code></td><td>Default: mint</td></tr>
|
|
482
|
+
<tr><td><code>successDoneBtnTextColor</code></td><td>Default: white</td></tr>
|
|
483
|
+
<tr><td><code>successRetryBtnBackgroundColor</code></td><td>Default: orange</td></tr>
|
|
484
|
+
<tr><td><code>successRetryBtnTextColor</code></td><td>Default: white</td></tr>
|
|
485
|
+
<tr><td><code>failureRetryBtnBackgroundColor</code></td><td>Default: orange</td></tr>
|
|
486
|
+
<tr><td><code>failureRetryBtnTextColor</code></td><td>Default: white</td></tr>
|
|
487
|
+
<tr><td><code>failureExitBtnBackgroundColor</code></td><td>Default: darkgray</td></tr>
|
|
488
|
+
<tr><td><code>failureExitBtnTextColor</code></td><td>Default: white</td></tr>
|
|
463
489
|
</table>
|
|
464
490
|
|
|
465
491
|
**Customer Identification Verbiage**
|
|
@@ -6,8 +6,11 @@ export type IdCaptureLoadingOverlayProps = {
|
|
|
6
6
|
cameraInitializingText?: string;
|
|
7
7
|
cameraAccessBlockedText?: string;
|
|
8
8
|
continueText?: string;
|
|
9
|
+
continueBtnDisabledBackgroundColor?: string;
|
|
10
|
+
continueBtnBackgroundColor?: string;
|
|
11
|
+
continueBtnTextColor?: string;
|
|
9
12
|
instructionImageUrl?: string;
|
|
10
13
|
accessBlockedImageUrl?: string;
|
|
11
14
|
onDismissed?: () => void;
|
|
12
15
|
};
|
|
13
|
-
export declare const IdCaptureLoadingOverlay: ({ headingText, useContinuityCameraText, modelsWarmingUpText, cameraInitializingText, cameraAccessBlockedText, continueText, instructionImageUrl, accessBlockedImageUrl, onDismissed, }: IdCaptureLoadingOverlayProps) => ReactElement;
|
|
16
|
+
export declare const IdCaptureLoadingOverlay: ({ headingText, useContinuityCameraText, modelsWarmingUpText, cameraInitializingText, cameraAccessBlockedText, continueText, continueBtnDisabledBackgroundColor, continueBtnBackgroundColor, continueBtnTextColor, instructionImageUrl, accessBlockedImageUrl, onDismissed, }: IdCaptureLoadingOverlayProps) => ReactElement;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { IdCaptureColors } from './IdCapture';
|
|
3
2
|
export type IdCaptureAssets = {
|
|
4
3
|
documentDetectionModelUrl?: string;
|
|
5
4
|
focusModelUrl?: string;
|
|
@@ -11,6 +10,16 @@ export type IdCaptureAssets = {
|
|
|
11
10
|
passportPortraitGuidesImageUrl?: string;
|
|
12
11
|
passportLandscapeGuidesImageUrl?: string;
|
|
13
12
|
};
|
|
13
|
+
export type IdCaptureColors = {
|
|
14
|
+
loadingContinueBtnBackgroundColor?: string;
|
|
15
|
+
loadingContinueBtnTextColor?: string;
|
|
16
|
+
guideBoxUnsatisfiedColor?: string;
|
|
17
|
+
guideBoxSatisfiedColor?: string;
|
|
18
|
+
successDoneBtnBackgroundColor?: string;
|
|
19
|
+
successDoneBtnTextColor?: string;
|
|
20
|
+
successRetryBtnBackgroundColor?: string;
|
|
21
|
+
successRetryBtnTextColor?: string;
|
|
22
|
+
};
|
|
14
23
|
export type IdCaptureVerbiage = {
|
|
15
24
|
loadingOverlayHeadingText?: string;
|
|
16
25
|
loadingOverlayUseContinuityCameraText?: string;
|
|
@@ -8855,6 +8855,9 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8855
8855
|
cameraInitializingText = _a.cameraInitializingText,
|
|
8856
8856
|
cameraAccessBlockedText = _a.cameraAccessBlockedText,
|
|
8857
8857
|
continueText = _a.continueText,
|
|
8858
|
+
continueBtnDisabledBackgroundColor = _a.continueBtnDisabledBackgroundColor,
|
|
8859
|
+
continueBtnBackgroundColor = _a.continueBtnBackgroundColor,
|
|
8860
|
+
continueBtnTextColor = _a.continueBtnTextColor,
|
|
8858
8861
|
_b = _a.instructionImageUrl,
|
|
8859
8862
|
instructionImageUrl = _b === void 0 ? DEFAULT_CDN_URL + '/WebSDK-Instruction-DL-Capture-3-Portrait.png' : _b,
|
|
8860
8863
|
_c = _a.accessBlockedImageUrl,
|
|
@@ -8872,6 +8875,15 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8872
8875
|
var _e = React.useState(false),
|
|
8873
8876
|
dismissed = _e[0],
|
|
8874
8877
|
setDismissed = _e[1];
|
|
8878
|
+
headingText || (headingText = t('Use your device camera to capture your ID'));
|
|
8879
|
+
useContinuityCameraText || (useContinuityCameraText = t('Use your iPhone as a webcam'));
|
|
8880
|
+
modelsWarmingUpText || (modelsWarmingUpText = t('Models warming up...'));
|
|
8881
|
+
cameraInitializingText || (cameraInitializingText = t('Camera initializing...'));
|
|
8882
|
+
cameraAccessBlockedText || (cameraAccessBlockedText = t('Camera access blocked'));
|
|
8883
|
+
continueText || (continueText = t('Continue'));
|
|
8884
|
+
continueBtnDisabledBackgroundColor || (continueBtnDisabledBackgroundColor = 'gray');
|
|
8885
|
+
continueBtnBackgroundColor || (continueBtnBackgroundColor = 'mint');
|
|
8886
|
+
continueBtnTextColor || (continueBtnTextColor = 'white');
|
|
8875
8887
|
React.useEffect(function () {
|
|
8876
8888
|
if (!buttonRef.current) return;
|
|
8877
8889
|
laddaRef.current = Ladda__namespace.create(buttonRef.current);
|
|
@@ -8910,12 +8922,6 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8910
8922
|
accessBlockedImageUrl: accessBlockedImageUrl
|
|
8911
8923
|
});
|
|
8912
8924
|
}
|
|
8913
|
-
headingText = headingText || t('Use your device camera to capture your ID');
|
|
8914
|
-
useContinuityCameraText = useContinuityCameraText || t('Use your iPhone as a webcam');
|
|
8915
|
-
modelsWarmingUpText = modelsWarmingUpText || t('Models warming up...');
|
|
8916
|
-
cameraInitializingText = cameraInitializingText || t('Camera initializing...');
|
|
8917
|
-
cameraAccessBlockedText = cameraAccessBlockedText || t('Camera access blocked');
|
|
8918
|
-
continueText = continueText || t('Continue');
|
|
8919
8925
|
return /*#__PURE__*/React__default['default'].createElement(OverlayContainer, null, /*#__PURE__*/React__default['default'].createElement(OverlayInner, null, /*#__PURE__*/React__default['default'].createElement("h3", null, headingText), /*#__PURE__*/React__default['default'].createElement(OverlayImageWrapper, {
|
|
8920
8926
|
style: {
|
|
8921
8927
|
pointerEvents: 'none'
|
|
@@ -8939,11 +8945,14 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
8939
8945
|
}), /*#__PURE__*/React__default['default'].createElement("label", {
|
|
8940
8946
|
htmlFor: "use-continuity-camera"
|
|
8941
8947
|
}, useContinuityCameraText))), /*#__PURE__*/React__default['default'].createElement("button", {
|
|
8948
|
+
ref: buttonRef,
|
|
8942
8949
|
className: "ladda-button",
|
|
8943
8950
|
"data-style": "expand-right",
|
|
8944
|
-
"data-color": "mint",
|
|
8945
8951
|
disabled: !cameraReady || !modelsReady,
|
|
8946
|
-
|
|
8952
|
+
style: {
|
|
8953
|
+
color: continueBtnTextColor,
|
|
8954
|
+
backgroundColor: !cameraReady || !modelsReady ? continueBtnDisabledBackgroundColor : continueBtnBackgroundColor
|
|
8955
|
+
},
|
|
8947
8956
|
onClick: function onClick() {
|
|
8948
8957
|
setDismissed(true);
|
|
8949
8958
|
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
|
|
@@ -9627,6 +9636,8 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
9627
9636
|
cameraInitializingText: verbiage.loadingOverlayCameraInitializingText,
|
|
9628
9637
|
cameraAccessBlockedText: verbiage.loadingOverlayCameraAccessBlockedText,
|
|
9629
9638
|
continueText: verbiage.loadingOverlayContinueText,
|
|
9639
|
+
continueBtnBackgroundColor: colors.loadingContinueBtnBackgroundColor,
|
|
9640
|
+
continueBtnTextColor: colors.loadingContinueBtnTextColor,
|
|
9630
9641
|
instructionImageUrl: assets.loadingOverlayInstructionImageUrl,
|
|
9631
9642
|
onDismissed: function onDismissed() {
|
|
9632
9643
|
setOverlayDismissed(true);
|
|
@@ -10940,6 +10951,11 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
10940
10951
|
if (cameraAccessDenied) return;
|
|
10941
10952
|
listAvailableCameras().then(function (availableCameras) {
|
|
10942
10953
|
var selectedCamera;
|
|
10954
|
+
if (preferFrontFacingCamera) {
|
|
10955
|
+
selectedCamera = availableCameras.find(function (deviceInfo) {
|
|
10956
|
+
return labelMatches(deviceInfo, frontLabels);
|
|
10957
|
+
});
|
|
10958
|
+
}
|
|
10943
10959
|
var platform = getPlatform();
|
|
10944
10960
|
if (!iphoneContinuityCameraDenied && (!platform || platform.os.family === 'OS X')) {
|
|
10945
10961
|
var iphoneContinuityCamera = availableCameras.find(function (deviceInfo) {
|
|
@@ -10947,14 +10963,9 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
10947
10963
|
});
|
|
10948
10964
|
setIphoneContinuityCameraAvailable(!!iphoneContinuityCamera);
|
|
10949
10965
|
if (iphoneContinuityCamera && iphoneContinuityCameraAllowed) {
|
|
10950
|
-
selectedCamera = iphoneContinuityCamera;
|
|
10966
|
+
selectedCamera || (selectedCamera = iphoneContinuityCamera);
|
|
10951
10967
|
}
|
|
10952
10968
|
}
|
|
10953
|
-
if (preferFrontFacingCamera) {
|
|
10954
|
-
selectedCamera || (selectedCamera = availableCameras.find(function (deviceInfo) {
|
|
10955
|
-
return labelMatches(deviceInfo, frontLabels);
|
|
10956
|
-
}));
|
|
10957
|
-
}
|
|
10958
10969
|
if (wideAngleIsBetter()) {
|
|
10959
10970
|
selectedCamera || (selectedCamera = availableCameras.find(function (deviceInfo) {
|
|
10960
10971
|
return labelMatches(deviceInfo, backUltraWideLabels);
|