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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
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';
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';
6
6
 
7
7
  function _interopNamespaceDefault(e) {
8
8
  var n = Object.create(null);
@@ -22,7 +22,6 @@
22
22
  }
23
23
 
24
24
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
25
- var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
26
25
 
27
26
  /******************************************************************************
28
27
  Copyright (c) Microsoft Corporation.
@@ -211,7 +210,7 @@
211
210
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
211
  };
213
212
 
214
- var webSdkVersion = '2.2.124';
213
+ var webSdkVersion = '2.2.126';
215
214
 
216
215
  function getPlatform() {
217
216
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -16311,6 +16310,7 @@
16311
16310
  }), modelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React.createElement(ContinueButtonContainer$1, {
16312
16311
  className: classNames.continueBtnContainer
16313
16312
  }, modelsReady && cameraReady && ( /*#__PURE__*/React.createElement(ContinueButton$1, {
16313
+ autoFocus: true,
16314
16314
  finished: true,
16315
16315
  className: classNames.continueBtn,
16316
16316
  variant: "positive",
@@ -16366,12 +16366,15 @@
16366
16366
  }, progressBarAnimation);
16367
16367
  var CustomLoadingGraphic$1 = styled.img(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
16368
16368
  var ContinueButtonContainer$1 = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
16369
- 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) {
16369
+ 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) {
16370
16370
  var _a, _b, _c, _d, _e, _f;
16371
16371
  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, ";") : '';
16372
16372
  }, function (props) {
16373
16373
  var _a, _b, _c, _d, _e, _f;
16374
16374
  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, ";") : '';
16375
+ }, function (props) {
16376
+ var _a, _b, _c, _d, _e, _f;
16377
+ 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, ";") : '';
16375
16378
  });
16376
16379
  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;
16377
16380
 
@@ -21163,6 +21166,13 @@
21163
21166
  var templateObject_1$e, templateObject_2$c;
21164
21167
 
21165
21168
  var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
21169
+ 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) {
21170
+ var _a, _b, _c, _d;
21171
+ 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';
21172
+ }, function (props) {
21173
+ var _a, _b, _c, _d;
21174
+ 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';
21175
+ });
21166
21176
  var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
21167
21177
  var onDismissed = _a.onDismissed,
21168
21178
  onUserCancel = _a.onUserCancel,
@@ -21281,6 +21291,7 @@
21281
21291
  }), allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React.createElement(ContinueButtonContainer, {
21282
21292
  className: classNames.continueBtnContainer
21283
21293
  }, allModelsReady && cameraReady && ( /*#__PURE__*/React.createElement(ContinueButton, {
21294
+ autoFocus: true,
21284
21295
  finished: true,
21285
21296
  className: classNames.continueBtn,
21286
21297
  variant: "positive",
@@ -21291,13 +21302,6 @@
21291
21302
  }
21292
21303
  }, verbiage.continueText))))));
21293
21304
  };
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
- });
21301
21305
  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) {
21302
21306
  var _a;
21303
21307
  return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
@@ -21333,12 +21337,15 @@
21333
21337
  }, progressBarAnimation);
21334
21338
  var CustomLoadingGraphic = styled.img(templateObject_13 || (templateObject_13 = __makeTemplateObject([""], [""])));
21335
21339
  var ContinueButtonContainer = styled.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
21336
- 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) {
21340
+ 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) {
21337
21341
  var _a, _b, _c, _d, _e, _f;
21338
21342
  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, ";") : '';
21339
21343
  }, function (props) {
21340
21344
  var _a, _b, _c, _d, _e, _f;
21341
21345
  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, ";") : '';
21346
+ }, function (props) {
21347
+ var _a, _b, _c, _d, _e, _f;
21348
+ 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, ";") : '';
21342
21349
  });
21343
21350
  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;
21344
21351
 
@@ -27554,78 +27561,7 @@
27554
27561
  };
27555
27562
 
27556
27563
  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
- };
27618
27564
  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,
27629
27565
  preloadModels: preloadModels,
27630
27566
  themes: themes,
27631
27567
  version: webSdkVersion,
@@ -28113,16 +28049,6 @@
28113
28049
  exports.allowedAuthUrls = allowedAuthUrls;
28114
28050
  exports.isObject = isObject;
28115
28051
  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;
28126
28052
  exports.setServerUrl = setServerUrl;
28127
28053
  exports.themes = themes;
28128
28054