idmission-web-sdk 2.2.122 → 2.2.124
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/IdCaptureStateProvider.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/index.d.ts +31 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +98 -8
- 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 +88 -9
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +101 -12
- 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 +3 -3
package/dist/sdk2.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
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';
|
|
3
4
|
import platform from 'platform';
|
|
4
5
|
import styled, { keyframes, useTheme, ThemeProvider as ThemeProvider$1 } from 'styled-components';
|
|
5
6
|
import { useTranslation, initReactI18next } from 'react-i18next';
|
|
@@ -202,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
202
203
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
203
204
|
};
|
|
204
205
|
|
|
205
|
-
var webSdkVersion = '2.2.
|
|
206
|
+
var webSdkVersion = '2.2.124';
|
|
206
207
|
|
|
207
208
|
function getPlatform() {
|
|
208
209
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -4768,6 +4769,13 @@ function IdCaptureStateProvider(_a) {
|
|
|
4768
4769
|
return window.removeEventListener('resize', onResize);
|
|
4769
4770
|
};
|
|
4770
4771
|
}, [onResize]);
|
|
4772
|
+
useEffect(function resetWhenProviderUnmounts() {
|
|
4773
|
+
return function () {
|
|
4774
|
+
return useIdCaptureStore.getState().dispatch({
|
|
4775
|
+
type: 'resetWizard'
|
|
4776
|
+
});
|
|
4777
|
+
};
|
|
4778
|
+
}, []);
|
|
4771
4779
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);
|
|
4772
4780
|
}
|
|
4773
4781
|
var dispatchIdCaptureAction = function dispatchIdCaptureAction(action) {
|
|
@@ -12031,13 +12039,6 @@ var StyledButtonsRow$6 = styled(ButtonsRow)(templateObject_2$c || (templateObjec
|
|
|
12031
12039
|
var templateObject_1$e, templateObject_2$c;
|
|
12032
12040
|
|
|
12033
12041
|
var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
|
|
12034
|
-
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) {
|
|
12035
|
-
var _a, _b, _c, _d;
|
|
12036
|
-
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';
|
|
12037
|
-
}, function (props) {
|
|
12038
|
-
var _a, _b, _c, _d;
|
|
12039
|
-
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';
|
|
12040
|
-
});
|
|
12041
12042
|
var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
|
|
12042
12043
|
var onDismissed = _a.onDismissed,
|
|
12043
12044
|
onUserCancel = _a.onUserCancel,
|
|
@@ -12166,6 +12167,13 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12166
12167
|
}
|
|
12167
12168
|
}, verbiage.continueText))))));
|
|
12168
12169
|
};
|
|
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
|
+
});
|
|
12169
12177
|
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) {
|
|
12170
12178
|
var _a;
|
|
12171
12179
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
@@ -17654,7 +17662,78 @@ var DocumentCapture = function DocumentCapture(_a) {
|
|
|
17654
17662
|
};
|
|
17655
17663
|
|
|
17656
17664
|
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
|
+
};
|
|
17657
17726
|
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,
|
|
17658
17737
|
preloadModels: preloadModels,
|
|
17659
17738
|
themes: themes,
|
|
17660
17739
|
version: webSdkVersion,
|
|
@@ -17666,5 +17745,5 @@ globalThis.IDmissionSDK = {
|
|
|
17666
17745
|
setServerUrl: setServerUrl
|
|
17667
17746
|
};
|
|
17668
17747
|
|
|
17669
|
-
export { CapturedDocumentImg, CustomerBiometricsEnrollment, CustomerIdAndBiometricsEnrollment, CustomerIdentification, CustomerVerification, DocumentCapture, FaceValidation, IdAndFaceValidation, IdValidation, SignatureKYC, VideoIdValidation, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, isObject, preloadModels, setServerUrl, themes };
|
|
17748
|
+
export { CapturedDocumentImg, CustomerBiometricsEnrollment, CustomerIdAndBiometricsEnrollment, CustomerIdentification, CustomerVerification, DocumentCapture, FaceValidation, IdAndFaceValidation, IdValidation, SignatureKYC, VideoIdValidation, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, isObject, preloadModels, renderCustomerBiometricsEnrollment, renderCustomerIdAndBiometricsEnrollment, renderCustomerIdentification, renderCustomerVerification, renderDocumentCapture, renderFaceValidation, renderIdAndFaceValidation, renderIdValidation, renderSignatureKYC, renderVideoIdValidation, setServerUrl, themes };
|
|
17670
17749
|
//# sourceMappingURL=sdk2.esm.js.map
|