idmission-web-sdk 2.2.95 → 2.2.96
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/dist/components/id_capture/IdCaptureOrUploadScreen.d.ts +2 -0
- package/dist/components/id_capture/IdCaptureOrUploadScreen.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureStateProvider.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +41 -23
- 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 +41 -23
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +41 -23
- 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/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
203
203
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
204
204
|
};
|
|
205
205
|
|
|
206
|
-
var webSdkVersion = '2.2.
|
|
206
|
+
var webSdkVersion = '2.2.96';
|
|
207
207
|
|
|
208
208
|
function getPlatform() {
|
|
209
209
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -4674,11 +4674,15 @@ var _reducer = function reducer(state, action) {
|
|
|
4674
4674
|
captureState: action.payload ? 'initializing' : 'capturing'
|
|
4675
4675
|
});
|
|
4676
4676
|
case 'setUploadingDocumentsType':
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
uploadingDocumentsType: action.payload
|
|
4680
|
-
|
|
4681
|
-
|
|
4677
|
+
{
|
|
4678
|
+
var requestedDocumentType = !action.payload || action.payload === 'idCard' ? 'idCardFront' : action.payload;
|
|
4679
|
+
var uploadingDocumentsType = action.payload === 'singlePage' ? 'idCard' : action.payload;
|
|
4680
|
+
return _assign(_assign({}, state), {
|
|
4681
|
+
captureState: action.payload ? 'uploading' : 'initializing',
|
|
4682
|
+
uploadingDocumentsType: uploadingDocumentsType,
|
|
4683
|
+
requestedDocumentType: requestedDocumentType
|
|
4684
|
+
});
|
|
4685
|
+
}
|
|
4682
4686
|
case 'resetWizard':
|
|
4683
4687
|
return _assign(_assign({}, initialState$4), {
|
|
4684
4688
|
captureRequirement: state.captureRequirement,
|
|
@@ -6968,7 +6972,7 @@ var LoadingListContainer$1 = styled.div(templateObject_9$3 || (templateObject_9$
|
|
|
6968
6972
|
var LoadingList$1 = styled.ul(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"], ["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"])));
|
|
6969
6973
|
var LoadingListItem$1 = styled.li(templateObject_11$2 || (templateObject_11$2 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"], ["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"])));
|
|
6970
6974
|
var ProgressContainer$1 = styled.div(templateObject_12$2 || (templateObject_12$2 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
6971
|
-
var ProgressBarBackground$1 = styled.div(templateObject_13$
|
|
6975
|
+
var ProgressBarBackground$1 = styled.div(templateObject_13$2 || (templateObject_13$2 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: ", ";\n opacity: ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: ", ";\n opacity: ", ";\n"])), function (props) {
|
|
6972
6976
|
var _a, _b, _c, _d;
|
|
6973
6977
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
6974
6978
|
}, function (props) {
|
|
@@ -6991,7 +6995,7 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_18 || (templateObject
|
|
|
6991
6995
|
var _a, _b, _c, _d, _e, _f;
|
|
6992
6996
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) ? "border: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.continueBtnBorder, ";") : '';
|
|
6993
6997
|
});
|
|
6994
|
-
var templateObject_1$z, templateObject_2$u, templateObject_3$m, templateObject_4$g, templateObject_5$b, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$
|
|
6998
|
+
var templateObject_1$z, templateObject_2$u, templateObject_3$m, templateObject_4$g, templateObject_5$b, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$2, templateObject_11$2, templateObject_12$2, templateObject_13$2, templateObject_14$1, templateObject_15$1, templateObject_16, templateObject_17, templateObject_18;
|
|
6995
6999
|
|
|
6996
7000
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
6997
7001
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -9256,16 +9260,20 @@ function IdDocumentUploadScreen(_a) {
|
|
|
9256
9260
|
classNames = _b === void 0 ? {} : _b,
|
|
9257
9261
|
_c = _a.verbiage,
|
|
9258
9262
|
rawVerbiage = _c === void 0 ? {} : _c;
|
|
9259
|
-
var _d =
|
|
9260
|
-
|
|
9261
|
-
|
|
9263
|
+
var _d = useIdCaptureState(),
|
|
9264
|
+
state = _d[0],
|
|
9265
|
+
dispatch = _d[1];
|
|
9262
9266
|
var _e = useState(null),
|
|
9263
|
-
|
|
9264
|
-
|
|
9267
|
+
idFrontFile = _e[0],
|
|
9268
|
+
setIdFrontFile = _e[1];
|
|
9269
|
+
var _f = useState(null),
|
|
9270
|
+
idBackFile = _f[0],
|
|
9271
|
+
setIdBackFile = _f[1];
|
|
9265
9272
|
var onCapturedManually = useOnCapturedManually();
|
|
9266
9273
|
var verbiage = useTranslations(rawVerbiage, {
|
|
9267
9274
|
uploadIdFrontText: 'Upload ID Front',
|
|
9268
9275
|
uploadIdBackText: 'Upload ID Back',
|
|
9276
|
+
uploadIdBackHelpTextIfSinglePageAllowed: 'Upload the back of the ID if it is not included in the front image.',
|
|
9269
9277
|
loadingText: 'Loading...',
|
|
9270
9278
|
continueText: 'Continue',
|
|
9271
9279
|
cancelText: 'Cancel'
|
|
@@ -9290,16 +9298,24 @@ function IdDocumentUploadScreen(_a) {
|
|
|
9290
9298
|
className: classNames.uploadIdBackButton,
|
|
9291
9299
|
onFileSelected: setIdBackFile,
|
|
9292
9300
|
loadingText: verbiage.loadingText
|
|
9293
|
-
}, verbiage.uploadIdBackText)
|
|
9301
|
+
}, verbiage.uploadIdBackText), state.allowSinglePageIdCapture && ( /*#__PURE__*/React__default.createElement(UploadIdBackHelpText, {
|
|
9302
|
+
className: classNames.uploadIdBackHelpTextIfSinglePageAllowed
|
|
9303
|
+
}, verbiage.uploadIdBackHelpTextIfSinglePageAllowed))), /*#__PURE__*/React__default.createElement(ScreenActionsBar, {
|
|
9294
9304
|
className: classNames.actionsBar
|
|
9295
9305
|
}, /*#__PURE__*/React__default.createElement(CancelUploadTypeButton, {
|
|
9296
9306
|
className: classNames.cancelButton
|
|
9297
9307
|
}, verbiage.cancelText), /*#__PURE__*/React__default.createElement(Button, {
|
|
9298
9308
|
className: classNames.continueButton,
|
|
9299
|
-
disabled: !idFrontFile || !idBackFile,
|
|
9309
|
+
disabled: !idFrontFile || !state.allowSinglePageIdCapture && !idBackFile,
|
|
9300
9310
|
colors: buttonColors,
|
|
9301
9311
|
onClick: function onClick() {
|
|
9302
|
-
|
|
9312
|
+
if (!idBackFile && state.allowSinglePageIdCapture) {
|
|
9313
|
+
dispatch({
|
|
9314
|
+
type: 'setUploadingDocumentsType',
|
|
9315
|
+
payload: 'singlePage'
|
|
9316
|
+
});
|
|
9317
|
+
}
|
|
9318
|
+
void onCapturedManually(idFrontFile, idBackFile);
|
|
9303
9319
|
}
|
|
9304
9320
|
}, verbiage.continueText)));
|
|
9305
9321
|
}
|
|
@@ -9325,7 +9341,7 @@ function useOnCapturedManually() {
|
|
|
9325
9341
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
9326
9342
|
files[_i] = arguments[_i];
|
|
9327
9343
|
}
|
|
9328
|
-
return Promise.all(files.map(readFile)).then(function (f) {
|
|
9344
|
+
return Promise.all(files.filter(Boolean).map(readFile)).then(function (f) {
|
|
9329
9345
|
for (var _i = 0, f_1 = f; _i < f_1.length; _i++) {
|
|
9330
9346
|
var imageData = f_1[_i];
|
|
9331
9347
|
dispatch({
|
|
@@ -9340,6 +9356,7 @@ function useOnCapturedManually() {
|
|
|
9340
9356
|
}
|
|
9341
9357
|
function readFile(file) {
|
|
9342
9358
|
return new Promise(function (resolve, reject) {
|
|
9359
|
+
if (!file) return reject(new Error('File is undefined'));
|
|
9343
9360
|
var reader = new FileReader();
|
|
9344
9361
|
reader.onload = function () {
|
|
9345
9362
|
return resolve(reader.result);
|
|
@@ -9405,13 +9422,14 @@ var ScreenPanelHeading = styled.h3(templateObject_4$9 || (templateObject_4$9 = _
|
|
|
9405
9422
|
var ScreenActionsBar = styled.div(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"])));
|
|
9406
9423
|
var DashedSeparator = styled.div(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
9407
9424
|
var OrWrapper = styled.div(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
9408
|
-
var
|
|
9409
|
-
var
|
|
9410
|
-
var
|
|
9425
|
+
var UploadIdBackHelpText = styled.p(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"], ["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"])));
|
|
9426
|
+
var Button = styled(WideBorderButton)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"], ["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"])));
|
|
9427
|
+
var Modal = styled.div(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
|
|
9428
|
+
var Dialog = styled.div(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"], ["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"])), function (props) {
|
|
9411
9429
|
var _a;
|
|
9412
9430
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
9413
9431
|
});
|
|
9414
|
-
var ModalCloseButton = styled.button(
|
|
9432
|
+
var ModalCloseButton = styled.button(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n width: 60px;\n height: 60px;\n background: black;\n color: whitesmoke;\n border-radius: 50%;\n font-size: 32px;\n border: none;\n cursor: pointer;\n margin: 20px 0;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n transition: background 0.3s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0;\n\n &:hover {\n background: #222;\n color: white;\n }\n"], ["\n width: 60px;\n height: 60px;\n background: black;\n color: whitesmoke;\n border-radius: 50%;\n font-size: 32px;\n border: none;\n cursor: pointer;\n margin: 20px 0;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n transition: background 0.3s ease;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n padding: 0;\n\n &:hover {\n background: #222;\n color: white;\n }\n"])));
|
|
9415
9433
|
function XIcon(props) {
|
|
9416
9434
|
return /*#__PURE__*/React__default.createElement("svg", _assign({
|
|
9417
9435
|
width: "25",
|
|
@@ -9662,7 +9680,7 @@ function IdDocumentIcon(props) {
|
|
|
9662
9680
|
strokeWidth: "3"
|
|
9663
9681
|
}));
|
|
9664
9682
|
}
|
|
9665
|
-
var InlineSvg = styled.svg(
|
|
9683
|
+
var InlineSvg = styled.svg(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject(["\n display: inline;\n"], ["\n display: inline;\n"])));
|
|
9666
9684
|
function humanFileSize(bytes, si, dp) {
|
|
9667
9685
|
if (si === void 0) {
|
|
9668
9686
|
si = false;
|
|
@@ -9683,7 +9701,7 @@ function humanFileSize(bytes, si, dp) {
|
|
|
9683
9701
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
9684
9702
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
9685
9703
|
}
|
|
9686
|
-
var templateObject_1$l, templateObject_2$j, templateObject_3$f, templateObject_4$9, templateObject_5$5, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1;
|
|
9704
|
+
var templateObject_1$l, templateObject_2$j, templateObject_3$f, templateObject_4$9, templateObject_5$5, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9$1, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1;
|
|
9687
9705
|
|
|
9688
9706
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
9689
9707
|
var _b, _c, _d, _e, _f, _g;
|