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.
@@ -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.124';
214
215
 
215
216
  function getPlatform() {
216
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -11102,6 +11103,13 @@
11102
11103
  return window.removeEventListener('resize', onResize);
11103
11104
  };
11104
11105
  }, [onResize]);
11106
+ React.useEffect(function resetWhenProviderUnmounts() {
11107
+ return function () {
11108
+ return useIdCaptureStore.getState().dispatch({
11109
+ type: 'resetWizard'
11110
+ });
11111
+ };
11112
+ }, []);
11105
11113
  return /*#__PURE__*/React.createElement(React.Fragment, null, children);
11106
11114
  }
11107
11115
  var dispatchIdCaptureAction = function dispatchIdCaptureAction(action) {
@@ -21155,13 +21163,6 @@
21155
21163
  var templateObject_1$e, templateObject_2$c;
21156
21164
 
21157
21165
  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
21166
  var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
21166
21167
  var onDismissed = _a.onDismissed,
21167
21168
  onUserCancel = _a.onUserCancel,
@@ -21290,6 +21291,13 @@
21290
21291
  }
21291
21292
  }, verbiage.continueText))))));
21292
21293
  };
21294
+ 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) {
21295
+ var _a, _b, _c, _d;
21296
+ 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';
21297
+ }, function (props) {
21298
+ var _a, _b, _c, _d;
21299
+ 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';
21300
+ });
21293
21301
  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
21302
  var _a;
21295
21303
  return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
@@ -27546,7 +27554,78 @@
27546
27554
  };
27547
27555
 
27548
27556
  initializeI18n();
27557
+ function renderElement(component, targetElement) {
27558
+ if (typeof targetElement === 'string') {
27559
+ var result = document.querySelector(targetElement);
27560
+ if (!result) throw new Error("targetElement ".concat(targetElement, " not found"));
27561
+ targetElement = result;
27562
+ } else if (!targetElement) {
27563
+ targetElement = document.createElement('div');
27564
+ document.body.append(targetElement);
27565
+ }
27566
+ var root = ReactDOM__namespace.createRoot(targetElement);
27567
+ root.render( /*#__PURE__*/React.createElement(OverlayContainer, null, component));
27568
+ if ('remove' in targetElement) {
27569
+ var originalRemove_1 = targetElement.remove;
27570
+ targetElement.remove = function () {
27571
+ try {
27572
+ root.unmount();
27573
+ originalRemove_1();
27574
+ } catch (e) {
27575
+ debug('failed to unmount', e);
27576
+ }
27577
+ };
27578
+ }
27579
+ return targetElement;
27580
+ }
27581
+ function renderComponent(Component, targetElement, options) {
27582
+ if (!options) {
27583
+ options = targetElement;
27584
+ targetElement = undefined;
27585
+ }
27586
+ return renderElement( /*#__PURE__*/React.createElement(Component, _assign({}, options)), targetElement);
27587
+ }
27588
+ var renderIdValidation = function renderIdValidation(optionsOrTargetElement, options) {
27589
+ return renderComponent(IdValidation, optionsOrTargetElement, options);
27590
+ };
27591
+ var renderFaceValidation = function renderFaceValidation(optionsOrTargetElement, options) {
27592
+ return renderComponent(FaceValidation, optionsOrTargetElement, options);
27593
+ };
27594
+ var renderIdAndFaceValidation = function renderIdAndFaceValidation(optionsOrTargetElement, options) {
27595
+ return renderComponent(IdAndFaceValidation, optionsOrTargetElement, options);
27596
+ };
27597
+ var renderCustomerIdAndBiometricsEnrollment = function renderCustomerIdAndBiometricsEnrollment(optionsOrTargetElement, options) {
27598
+ return renderComponent(CustomerIdAndBiometricsEnrollment, optionsOrTargetElement, options);
27599
+ };
27600
+ var renderCustomerBiometricsEnrollment = function renderCustomerBiometricsEnrollment(optionsOrTargetElement, options) {
27601
+ return renderComponent(CustomerBiometricsEnrollment, optionsOrTargetElement, options);
27602
+ };
27603
+ var renderCustomerVerification = function renderCustomerVerification(optionsOrTargetElement, options) {
27604
+ return renderComponent(CustomerVerification, optionsOrTargetElement, options);
27605
+ };
27606
+ var renderCustomerIdentification = function renderCustomerIdentification(optionsOrTargetElement, options) {
27607
+ return renderComponent(CustomerIdentification, optionsOrTargetElement, options);
27608
+ };
27609
+ var renderSignatureKYC = function renderSignatureKYC(optionsOrTargetElement, options) {
27610
+ return renderComponent(SignatureKYC, optionsOrTargetElement, options);
27611
+ };
27612
+ var renderVideoIdValidation = function renderVideoIdValidation(optionsOrTargetElement, options) {
27613
+ return renderComponent(VideoIdValidation, optionsOrTargetElement, options);
27614
+ };
27615
+ var renderDocumentCapture = function renderDocumentCapture(optionsOrTargetElement, options) {
27616
+ return renderComponent(DocumentCapture, optionsOrTargetElement, options);
27617
+ };
27549
27618
  globalThis.IDmissionSDK = {
27619
+ renderIdValidation: renderIdValidation,
27620
+ renderFaceValidation: renderFaceValidation,
27621
+ renderIdAndFaceValidation: renderIdAndFaceValidation,
27622
+ renderCustomerIdAndBiometricsEnrollment: renderCustomerIdAndBiometricsEnrollment,
27623
+ renderCustomerBiometricsEnrollment: renderCustomerBiometricsEnrollment,
27624
+ renderCustomerVerification: renderCustomerVerification,
27625
+ renderCustomerIdentification: renderCustomerIdentification,
27626
+ renderSignatureKYC: renderSignatureKYC,
27627
+ renderVideoIdValidation: renderVideoIdValidation,
27628
+ renderDocumentCapture: renderDocumentCapture,
27550
27629
  preloadModels: preloadModels,
27551
27630
  themes: themes,
27552
27631
  version: webSdkVersion,
@@ -28034,6 +28113,16 @@
28034
28113
  exports.allowedAuthUrls = allowedAuthUrls;
28035
28114
  exports.isObject = isObject;
28036
28115
  exports.preloadModels = preloadModels;
28116
+ exports.renderCustomerBiometricsEnrollment = renderCustomerBiometricsEnrollment;
28117
+ exports.renderCustomerIdAndBiometricsEnrollment = renderCustomerIdAndBiometricsEnrollment;
28118
+ exports.renderCustomerIdentification = renderCustomerIdentification;
28119
+ exports.renderCustomerVerification = renderCustomerVerification;
28120
+ exports.renderDocumentCapture = renderDocumentCapture;
28121
+ exports.renderFaceValidation = renderFaceValidation;
28122
+ exports.renderIdAndFaceValidation = renderIdAndFaceValidation;
28123
+ exports.renderIdValidation = renderIdValidation;
28124
+ exports.renderSignatureKYC = renderSignatureKYC;
28125
+ exports.renderVideoIdValidation = renderVideoIdValidation;
28037
28126
  exports.setServerUrl = setServerUrl;
28038
28127
  exports.themes = themes;
28039
28128