idmission-web-sdk 2.2.124 → 2.2.126
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/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/index.d.ts +10 -31
- package/dist/index.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +18 -93
- 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 +19 -83
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +22 -96
- 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
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { forwardRef, useState, useEffect, useRef, useContext, createContext, useReducer, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
3
|
-
import * as ReactDOM from 'react-dom/client';
|
|
4
3
|
import platform from 'platform';
|
|
5
4
|
import styled, { keyframes, useTheme, ThemeProvider as ThemeProvider$1 } from 'styled-components';
|
|
6
5
|
import { useTranslation, initReactI18next } from 'react-i18next';
|
|
@@ -203,7 +202,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
203
202
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
204
203
|
};
|
|
205
204
|
|
|
206
|
-
var webSdkVersion = '2.2.
|
|
205
|
+
var webSdkVersion = '2.2.126';
|
|
207
206
|
|
|
208
207
|
function getPlatform() {
|
|
209
208
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -7187,6 +7186,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7187
7186
|
}), modelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer$1, {
|
|
7188
7187
|
className: classNames.continueBtnContainer
|
|
7189
7188
|
}, modelsReady && cameraReady && ( /*#__PURE__*/React__default.createElement(ContinueButton$1, {
|
|
7189
|
+
autoFocus: true,
|
|
7190
7190
|
finished: true,
|
|
7191
7191
|
className: classNames.continueBtn,
|
|
7192
7192
|
variant: "positive",
|
|
@@ -7242,12 +7242,15 @@ var ProgressIndicator$1 = styled.span(templateObject_15$1 || (templateObject_15$
|
|
|
7242
7242
|
}, progressBarAnimation);
|
|
7243
7243
|
var CustomLoadingGraphic$1 = styled.img(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
7244
7244
|
var ContinueButtonContainer$1 = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
7245
|
-
var ContinueButton$1 = styled(LoaderButton)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n"])), function (props) {
|
|
7245
|
+
var ContinueButton$1 = styled(LoaderButton)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"])), function (props) {
|
|
7246
7246
|
var _a, _b, _c, _d, _e, _f;
|
|
7247
7247
|
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.progressBarFontSize) ? "font-size: ".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.progressBarFontSize, ";") : '';
|
|
7248
7248
|
}, function (props) {
|
|
7249
7249
|
var _a, _b, _c, _d, _e, _f;
|
|
7250
7250
|
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, ";") : '';
|
|
7251
|
+
}, function (props) {
|
|
7252
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7253
|
+
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, ";") : '';
|
|
7251
7254
|
});
|
|
7252
7255
|
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;
|
|
7253
7256
|
|
|
@@ -12039,6 +12042,13 @@ var StyledButtonsRow$6 = styled(ButtonsRow)(templateObject_2$c || (templateObjec
|
|
|
12039
12042
|
var templateObject_1$e, templateObject_2$c;
|
|
12040
12043
|
|
|
12041
12044
|
var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
|
|
12045
|
+
var OverlayInner = styled.div(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"], ["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"])), function (props) {
|
|
12046
|
+
var _a, _b, _c, _d;
|
|
12047
|
+
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.backgroundColor) !== null && _d !== void 0 ? _d : '#ecedf3';
|
|
12048
|
+
}, function (props) {
|
|
12049
|
+
var _a, _b, _c, _d;
|
|
12050
|
+
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.textColor) !== null && _d !== void 0 ? _d : 'black';
|
|
12051
|
+
});
|
|
12042
12052
|
var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
|
|
12043
12053
|
var onDismissed = _a.onDismissed,
|
|
12044
12054
|
onUserCancel = _a.onUserCancel,
|
|
@@ -12157,6 +12167,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12157
12167
|
}), allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer, {
|
|
12158
12168
|
className: classNames.continueBtnContainer
|
|
12159
12169
|
}, allModelsReady && cameraReady && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
12170
|
+
autoFocus: true,
|
|
12160
12171
|
finished: true,
|
|
12161
12172
|
className: classNames.continueBtn,
|
|
12162
12173
|
variant: "positive",
|
|
@@ -12167,13 +12178,6 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12167
12178
|
}
|
|
12168
12179
|
}, verbiage.continueText))))));
|
|
12169
12180
|
};
|
|
12170
|
-
var OverlayInner = styled.div(templateObject_1$d || (templateObject_1$d = __makeTemplateObject(["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"], ["\n height: 100dvh;\n display: flex;\n flex-direction: column;\n background: ", ";\n color: ", ";\n"])), function (props) {
|
|
12171
|
-
var _a, _b, _c, _d;
|
|
12172
|
-
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.backgroundColor) !== null && _d !== void 0 ? _d : '#ecedf3';
|
|
12173
|
-
}, function (props) {
|
|
12174
|
-
var _a, _b, _c, _d;
|
|
12175
|
-
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.textColor) !== null && _d !== void 0 ? _d : 'black';
|
|
12176
|
-
});
|
|
12177
12181
|
var OverlayHeader = styled.div(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"])), function (props) {
|
|
12178
12182
|
var _a;
|
|
12179
12183
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
@@ -12209,12 +12213,15 @@ var ProgressIndicator = styled.span(templateObject_12 || (templateObject_12 = __
|
|
|
12209
12213
|
}, progressBarAnimation);
|
|
12210
12214
|
var CustomLoadingGraphic = styled.img(templateObject_13 || (templateObject_13 = __makeTemplateObject([""], [""])));
|
|
12211
12215
|
var ContinueButtonContainer = styled.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
12212
|
-
var ContinueButton = styled(LoaderButton)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n"])), function (props) {
|
|
12216
|
+
var ContinueButton = styled(LoaderButton)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"])), function (props) {
|
|
12213
12217
|
var _a, _b, _c, _d, _e, _f;
|
|
12214
12218
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
12215
12219
|
}, function (props) {
|
|
12216
12220
|
var _a, _b, _c, _d, _e, _f;
|
|
12217
12221
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === 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.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.continueBtnBorder, ";") : '';
|
|
12222
|
+
}, function (props) {
|
|
12223
|
+
var _a, _b, _c, _d, _e, _f;
|
|
12224
|
+
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === 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.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.continueBtnBorder, ";") : '';
|
|
12218
12225
|
});
|
|
12219
12226
|
var templateObject_1$d, templateObject_2$b, templateObject_3$b, templateObject_4$6, templateObject_5$3, templateObject_6$3, templateObject_7$2, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15;
|
|
12220
12227
|
|
|
@@ -17662,78 +17669,7 @@ var DocumentCapture = function DocumentCapture(_a) {
|
|
|
17662
17669
|
};
|
|
17663
17670
|
|
|
17664
17671
|
initializeI18n();
|
|
17665
|
-
function renderElement(component, targetElement) {
|
|
17666
|
-
if (typeof targetElement === 'string') {
|
|
17667
|
-
var result = document.querySelector(targetElement);
|
|
17668
|
-
if (!result) throw new Error("targetElement ".concat(targetElement, " not found"));
|
|
17669
|
-
targetElement = result;
|
|
17670
|
-
} else if (!targetElement) {
|
|
17671
|
-
targetElement = document.createElement('div');
|
|
17672
|
-
document.body.append(targetElement);
|
|
17673
|
-
}
|
|
17674
|
-
var root = ReactDOM.createRoot(targetElement);
|
|
17675
|
-
root.render( /*#__PURE__*/React__default.createElement(OverlayContainer, null, component));
|
|
17676
|
-
if ('remove' in targetElement) {
|
|
17677
|
-
var originalRemove_1 = targetElement.remove;
|
|
17678
|
-
targetElement.remove = function () {
|
|
17679
|
-
try {
|
|
17680
|
-
root.unmount();
|
|
17681
|
-
originalRemove_1();
|
|
17682
|
-
} catch (e) {
|
|
17683
|
-
debug('failed to unmount', e);
|
|
17684
|
-
}
|
|
17685
|
-
};
|
|
17686
|
-
}
|
|
17687
|
-
return targetElement;
|
|
17688
|
-
}
|
|
17689
|
-
function renderComponent(Component, targetElement, options) {
|
|
17690
|
-
if (!options) {
|
|
17691
|
-
options = targetElement;
|
|
17692
|
-
targetElement = undefined;
|
|
17693
|
-
}
|
|
17694
|
-
return renderElement( /*#__PURE__*/React__default.createElement(Component, _assign({}, options)), targetElement);
|
|
17695
|
-
}
|
|
17696
|
-
var renderIdValidation = function renderIdValidation(optionsOrTargetElement, options) {
|
|
17697
|
-
return renderComponent(IdValidation, optionsOrTargetElement, options);
|
|
17698
|
-
};
|
|
17699
|
-
var renderFaceValidation = function renderFaceValidation(optionsOrTargetElement, options) {
|
|
17700
|
-
return renderComponent(FaceValidation, optionsOrTargetElement, options);
|
|
17701
|
-
};
|
|
17702
|
-
var renderIdAndFaceValidation = function renderIdAndFaceValidation(optionsOrTargetElement, options) {
|
|
17703
|
-
return renderComponent(IdAndFaceValidation, optionsOrTargetElement, options);
|
|
17704
|
-
};
|
|
17705
|
-
var renderCustomerIdAndBiometricsEnrollment = function renderCustomerIdAndBiometricsEnrollment(optionsOrTargetElement, options) {
|
|
17706
|
-
return renderComponent(CustomerIdAndBiometricsEnrollment, optionsOrTargetElement, options);
|
|
17707
|
-
};
|
|
17708
|
-
var renderCustomerBiometricsEnrollment = function renderCustomerBiometricsEnrollment(optionsOrTargetElement, options) {
|
|
17709
|
-
return renderComponent(CustomerBiometricsEnrollment, optionsOrTargetElement, options);
|
|
17710
|
-
};
|
|
17711
|
-
var renderCustomerVerification = function renderCustomerVerification(optionsOrTargetElement, options) {
|
|
17712
|
-
return renderComponent(CustomerVerification, optionsOrTargetElement, options);
|
|
17713
|
-
};
|
|
17714
|
-
var renderCustomerIdentification = function renderCustomerIdentification(optionsOrTargetElement, options) {
|
|
17715
|
-
return renderComponent(CustomerIdentification, optionsOrTargetElement, options);
|
|
17716
|
-
};
|
|
17717
|
-
var renderSignatureKYC = function renderSignatureKYC(optionsOrTargetElement, options) {
|
|
17718
|
-
return renderComponent(SignatureKYC, optionsOrTargetElement, options);
|
|
17719
|
-
};
|
|
17720
|
-
var renderVideoIdValidation = function renderVideoIdValidation(optionsOrTargetElement, options) {
|
|
17721
|
-
return renderComponent(VideoIdValidation, optionsOrTargetElement, options);
|
|
17722
|
-
};
|
|
17723
|
-
var renderDocumentCapture = function renderDocumentCapture(optionsOrTargetElement, options) {
|
|
17724
|
-
return renderComponent(DocumentCapture, optionsOrTargetElement, options);
|
|
17725
|
-
};
|
|
17726
17672
|
globalThis.IDmissionSDK = {
|
|
17727
|
-
renderIdValidation: renderIdValidation,
|
|
17728
|
-
renderFaceValidation: renderFaceValidation,
|
|
17729
|
-
renderIdAndFaceValidation: renderIdAndFaceValidation,
|
|
17730
|
-
renderCustomerIdAndBiometricsEnrollment: renderCustomerIdAndBiometricsEnrollment,
|
|
17731
|
-
renderCustomerBiometricsEnrollment: renderCustomerBiometricsEnrollment,
|
|
17732
|
-
renderCustomerVerification: renderCustomerVerification,
|
|
17733
|
-
renderCustomerIdentification: renderCustomerIdentification,
|
|
17734
|
-
renderSignatureKYC: renderSignatureKYC,
|
|
17735
|
-
renderVideoIdValidation: renderVideoIdValidation,
|
|
17736
|
-
renderDocumentCapture: renderDocumentCapture,
|
|
17737
17673
|
preloadModels: preloadModels,
|
|
17738
17674
|
themes: themes,
|
|
17739
17675
|
version: webSdkVersion,
|
|
@@ -17745,5 +17681,5 @@ globalThis.IDmissionSDK = {
|
|
|
17745
17681
|
setServerUrl: setServerUrl
|
|
17746
17682
|
};
|
|
17747
17683
|
|
|
17748
|
-
export { CapturedDocumentImg, CustomerBiometricsEnrollment, CustomerIdAndBiometricsEnrollment, CustomerIdentification, CustomerVerification, DocumentCapture, FaceValidation, IdAndFaceValidation, IdValidation, SignatureKYC, VideoIdValidation, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, isObject, preloadModels,
|
|
17684
|
+
export { CapturedDocumentImg, CustomerBiometricsEnrollment, CustomerIdAndBiometricsEnrollment, CustomerIdentification, CustomerVerification, DocumentCapture, FaceValidation, IdAndFaceValidation, IdValidation, SignatureKYC, VideoIdValidation, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, isObject, preloadModels, setServerUrl, themes };
|
|
17749
17685
|
//# sourceMappingURL=sdk2.esm.js.map
|