idmission-web-sdk 2.2.122 → 2.2.123

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('platform'), require('styled-components'), require('tus-js-client'), require('react-dom'), require('prop-types')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'platform', 'styled-components', 'tus-js-client', 'react-dom', 'prop-types'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Sdk2 = {}, global.React, global.platform, global.styled, global.tusJsClient, global.reactDom, global.PropTypes));
5
- })(this, (function (exports, React, platform, styled, tusJsClient, reactDom, require$$0) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom/client'), require('platform'), require('styled-components'), require('tus-js-client'), require('react-dom'), require('prop-types')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom/client', 'platform', 'styled-components', 'tus-js-client', 'react-dom', 'prop-types'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Sdk2 = {}, global.React, global.ReactDOM, global.platform, global.styled, global.tusJsClient, global.ReactDOM, global.PropTypes));
5
+ })(this, (function (exports, React, ReactDOM, platform, styled, tusJsClient, reactDom, require$$0) { 'use strict';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -22,6 +22,7 @@
22
22
  }
23
23
 
24
24
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
25
+ var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
25
26
 
26
27
  /******************************************************************************
27
28
  Copyright (c) Microsoft Corporation.
@@ -210,7 +211,7 @@
210
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
211
212
  };
212
213
 
213
- var webSdkVersion = '2.2.122';
214
+ var webSdkVersion = '2.2.123';
214
215
 
215
216
  function getPlatform() {
216
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -11083,6 +11084,11 @@
11083
11084
  }));
11084
11085
  function IdCaptureStateProvider(_a) {
11085
11086
  var children = _a.children;
11087
+ React.useEffect(function resetWhenProviderMounts() {
11088
+ useIdCaptureStore.getState().dispatch({
11089
+ type: 'resetWizard'
11090
+ });
11091
+ }, []);
11086
11092
  var overrideWrongDocumentTypeGuidance = useIdCaptureStore(useShallow(function (state) {
11087
11093
  return state.overrideWrongDocumentTypeGuidance;
11088
11094
  }));
@@ -21155,13 +21161,6 @@
21155
21161
  var templateObject_1$e, templateObject_2$c;
21156
21162
 
21157
21163
  var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
21158
- 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) {
21159
- var _a, _b, _c, _d;
21160
- 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';
21161
- }, function (props) {
21162
- var _a, _b, _c, _d;
21163
- 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';
21164
- });
21165
21164
  var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
21166
21165
  var onDismissed = _a.onDismissed,
21167
21166
  onUserCancel = _a.onUserCancel,
@@ -21290,6 +21289,13 @@
21290
21289
  }
21291
21290
  }, verbiage.continueText))))));
21292
21291
  };
21292
+ 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) {
21293
+ var _a, _b, _c, _d;
21294
+ 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';
21295
+ }, function (props) {
21296
+ var _a, _b, _c, _d;
21297
+ 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';
21298
+ });
21293
21299
  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) {
21294
21300
  var _a;
21295
21301
  return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
@@ -27546,7 +27552,78 @@
27546
27552
  };
27547
27553
 
27548
27554
  initializeI18n();
27555
+ function renderElement(component, targetElement) {
27556
+ if (typeof targetElement === 'string') {
27557
+ var result = document.querySelector(targetElement);
27558
+ if (!result) throw new Error("targetElement ".concat(targetElement, " not found"));
27559
+ targetElement = result;
27560
+ } else if (!targetElement) {
27561
+ targetElement = document.createElement('div');
27562
+ document.body.append(targetElement);
27563
+ }
27564
+ var root = ReactDOM__namespace.createRoot(targetElement);
27565
+ root.render( /*#__PURE__*/React.createElement(OverlayContainer, null, component));
27566
+ if ('remove' in targetElement) {
27567
+ var originalRemove_1 = targetElement.remove;
27568
+ targetElement.remove = function () {
27569
+ try {
27570
+ root.unmount();
27571
+ originalRemove_1();
27572
+ } catch (e) {
27573
+ debug('failed to unmount', e);
27574
+ }
27575
+ };
27576
+ }
27577
+ return targetElement;
27578
+ }
27579
+ function renderComponent(Component, targetElement, options) {
27580
+ if (!options) {
27581
+ options = targetElement;
27582
+ targetElement = undefined;
27583
+ }
27584
+ return renderElement( /*#__PURE__*/React.createElement(Component, _assign({}, options)), targetElement);
27585
+ }
27586
+ var renderIdValidation = function renderIdValidation(optionsOrTargetElement, options) {
27587
+ return renderComponent(IdValidation, optionsOrTargetElement, options);
27588
+ };
27589
+ var renderFaceValidation = function renderFaceValidation(optionsOrTargetElement, options) {
27590
+ return renderComponent(FaceValidation, optionsOrTargetElement, options);
27591
+ };
27592
+ var renderIdAndFaceValidation = function renderIdAndFaceValidation(optionsOrTargetElement, options) {
27593
+ return renderComponent(IdAndFaceValidation, optionsOrTargetElement, options);
27594
+ };
27595
+ var renderCustomerIdAndBiometricsEnrollment = function renderCustomerIdAndBiometricsEnrollment(optionsOrTargetElement, options) {
27596
+ return renderComponent(CustomerIdAndBiometricsEnrollment, optionsOrTargetElement, options);
27597
+ };
27598
+ var renderCustomerBiometricsEnrollment = function renderCustomerBiometricsEnrollment(optionsOrTargetElement, options) {
27599
+ return renderComponent(CustomerBiometricsEnrollment, optionsOrTargetElement, options);
27600
+ };
27601
+ var renderCustomerVerification = function renderCustomerVerification(optionsOrTargetElement, options) {
27602
+ return renderComponent(CustomerVerification, optionsOrTargetElement, options);
27603
+ };
27604
+ var renderCustomerIdentification = function renderCustomerIdentification(optionsOrTargetElement, options) {
27605
+ return renderComponent(CustomerIdentification, optionsOrTargetElement, options);
27606
+ };
27607
+ var renderSignatureKYC = function renderSignatureKYC(optionsOrTargetElement, options) {
27608
+ return renderComponent(SignatureKYC, optionsOrTargetElement, options);
27609
+ };
27610
+ var renderVideoIdValidation = function renderVideoIdValidation(optionsOrTargetElement, options) {
27611
+ return renderComponent(VideoIdValidation, optionsOrTargetElement, options);
27612
+ };
27613
+ var renderDocumentCapture = function renderDocumentCapture(optionsOrTargetElement, options) {
27614
+ return renderComponent(DocumentCapture, optionsOrTargetElement, options);
27615
+ };
27549
27616
  globalThis.IDmissionSDK = {
27617
+ renderIdValidation: renderIdValidation,
27618
+ renderFaceValidation: renderFaceValidation,
27619
+ renderIdAndFaceValidation: renderIdAndFaceValidation,
27620
+ renderCustomerIdAndBiometricsEnrollment: renderCustomerIdAndBiometricsEnrollment,
27621
+ renderCustomerBiometricsEnrollment: renderCustomerBiometricsEnrollment,
27622
+ renderCustomerVerification: renderCustomerVerification,
27623
+ renderCustomerIdentification: renderCustomerIdentification,
27624
+ renderSignatureKYC: renderSignatureKYC,
27625
+ renderVideoIdValidation: renderVideoIdValidation,
27626
+ renderDocumentCapture: renderDocumentCapture,
27550
27627
  preloadModels: preloadModels,
27551
27628
  themes: themes,
27552
27629
  version: webSdkVersion,
@@ -28034,6 +28111,16 @@
28034
28111
  exports.allowedAuthUrls = allowedAuthUrls;
28035
28112
  exports.isObject = isObject;
28036
28113
  exports.preloadModels = preloadModels;
28114
+ exports.renderCustomerBiometricsEnrollment = renderCustomerBiometricsEnrollment;
28115
+ exports.renderCustomerIdAndBiometricsEnrollment = renderCustomerIdAndBiometricsEnrollment;
28116
+ exports.renderCustomerIdentification = renderCustomerIdentification;
28117
+ exports.renderCustomerVerification = renderCustomerVerification;
28118
+ exports.renderDocumentCapture = renderDocumentCapture;
28119
+ exports.renderFaceValidation = renderFaceValidation;
28120
+ exports.renderIdAndFaceValidation = renderIdAndFaceValidation;
28121
+ exports.renderIdValidation = renderIdValidation;
28122
+ exports.renderSignatureKYC = renderSignatureKYC;
28123
+ exports.renderVideoIdValidation = renderVideoIdValidation;
28037
28124
  exports.setServerUrl = setServerUrl;
28038
28125
  exports.themes = themes;
28039
28126