idmission-web-sdk 2.2.121 → 2.2.122

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/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.121';
205
+ var webSdkVersion = '2.2.122';
207
206
 
208
207
  function getPlatform() {
209
208
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -12032,6 +12031,13 @@ var StyledButtonsRow$6 = styled(ButtonsRow)(templateObject_2$c || (templateObjec
12032
12031
  var templateObject_1$e, templateObject_2$c;
12033
12032
 
12034
12033
  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
+ });
12035
12041
  var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
12036
12042
  var onDismissed = _a.onDismissed,
12037
12043
  onUserCancel = _a.onUserCancel,
@@ -12160,13 +12166,6 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
12160
12166
  }
12161
12167
  }, verbiage.continueText))))));
12162
12168
  };
12163
- 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) {
12164
- var _a, _b, _c, _d;
12165
- 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';
12166
- }, function (props) {
12167
- var _a, _b, _c, _d;
12168
- 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';
12169
- });
12170
12169
  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) {
12171
12170
  var _a;
12172
12171
  return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
@@ -17655,78 +17654,7 @@ var DocumentCapture = function DocumentCapture(_a) {
17655
17654
  };
17656
17655
 
17657
17656
  initializeI18n();
17658
- function renderElement(component, targetElement) {
17659
- if (typeof targetElement === 'string') {
17660
- var result = document.querySelector(targetElement);
17661
- if (!result) throw new Error("targetElement ".concat(targetElement, " not found"));
17662
- targetElement = result;
17663
- } else if (!targetElement) {
17664
- targetElement = document.createElement('div');
17665
- document.body.append(targetElement);
17666
- }
17667
- var root = ReactDOM.createRoot(targetElement);
17668
- root.render( /*#__PURE__*/React__default.createElement(OverlayContainer, null, component));
17669
- if ('remove' in targetElement) {
17670
- var originalRemove_1 = targetElement.remove;
17671
- targetElement.remove = function () {
17672
- try {
17673
- root.unmount();
17674
- originalRemove_1();
17675
- } catch (e) {
17676
- debug('failed to unmount', e);
17677
- }
17678
- };
17679
- }
17680
- return targetElement;
17681
- }
17682
- function renderComponent(Component, targetElement, options) {
17683
- if (!options) {
17684
- options = targetElement;
17685
- targetElement = undefined;
17686
- }
17687
- return renderElement( /*#__PURE__*/React__default.createElement(Component, _assign({}, options)), targetElement);
17688
- }
17689
- var renderIdValidation = function renderIdValidation(optionsOrTargetElement, options) {
17690
- return renderComponent(IdValidation, optionsOrTargetElement, options);
17691
- };
17692
- var renderFaceValidation = function renderFaceValidation(optionsOrTargetElement, options) {
17693
- return renderComponent(FaceValidation, optionsOrTargetElement, options);
17694
- };
17695
- var renderIdAndFaceValidation = function renderIdAndFaceValidation(optionsOrTargetElement, options) {
17696
- return renderComponent(IdAndFaceValidation, optionsOrTargetElement, options);
17697
- };
17698
- var renderCustomerIdAndBiometricsEnrollment = function renderCustomerIdAndBiometricsEnrollment(optionsOrTargetElement, options) {
17699
- return renderComponent(CustomerIdAndBiometricsEnrollment, optionsOrTargetElement, options);
17700
- };
17701
- var renderCustomerBiometricsEnrollment = function renderCustomerBiometricsEnrollment(optionsOrTargetElement, options) {
17702
- return renderComponent(CustomerBiometricsEnrollment, optionsOrTargetElement, options);
17703
- };
17704
- var renderCustomerVerification = function renderCustomerVerification(optionsOrTargetElement, options) {
17705
- return renderComponent(CustomerVerification, optionsOrTargetElement, options);
17706
- };
17707
- var renderCustomerIdentification = function renderCustomerIdentification(optionsOrTargetElement, options) {
17708
- return renderComponent(CustomerIdentification, optionsOrTargetElement, options);
17709
- };
17710
- var renderSignatureKYC = function renderSignatureKYC(optionsOrTargetElement, options) {
17711
- return renderComponent(SignatureKYC, optionsOrTargetElement, options);
17712
- };
17713
- var renderVideoIdValidation = function renderVideoIdValidation(optionsOrTargetElement, options) {
17714
- return renderComponent(VideoIdValidation, optionsOrTargetElement, options);
17715
- };
17716
- var renderDocumentCapture = function renderDocumentCapture(optionsOrTargetElement, options) {
17717
- return renderComponent(DocumentCapture, optionsOrTargetElement, options);
17718
- };
17719
17657
  globalThis.IDmissionSDK = {
17720
- renderIdValidation: renderIdValidation,
17721
- renderFaceValidation: renderFaceValidation,
17722
- renderIdAndFaceValidation: renderIdAndFaceValidation,
17723
- renderCustomerIdAndBiometricsEnrollment: renderCustomerIdAndBiometricsEnrollment,
17724
- renderCustomerBiometricsEnrollment: renderCustomerBiometricsEnrollment,
17725
- renderCustomerVerification: renderCustomerVerification,
17726
- renderCustomerIdentification: renderCustomerIdentification,
17727
- renderSignatureKYC: renderSignatureKYC,
17728
- renderVideoIdValidation: renderVideoIdValidation,
17729
- renderDocumentCapture: renderDocumentCapture,
17730
17658
  preloadModels: preloadModels,
17731
17659
  themes: themes,
17732
17660
  version: webSdkVersion,
@@ -17738,5 +17666,5 @@ globalThis.IDmissionSDK = {
17738
17666
  setServerUrl: setServerUrl
17739
17667
  };
17740
17668
 
17741
- 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 };
17669
+ export { CapturedDocumentImg, CustomerBiometricsEnrollment, CustomerIdAndBiometricsEnrollment, CustomerIdentification, CustomerVerification, DocumentCapture, FaceValidation, IdAndFaceValidation, IdValidation, SignatureKYC, VideoIdValidation, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, isObject, preloadModels, setServerUrl, themes };
17742
17670
  //# sourceMappingURL=sdk2.esm.js.map