idmission-web-sdk 2.2.126 → 2.2.128

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.126';
214
+ var webSdkVersion = '2.2.128';
214
215
 
215
216
  function getPlatform() {
216
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -25422,14 +25423,16 @@
25422
25423
  idCaptureForceFallbackMode = _q === void 0 ? false : _q,
25423
25424
  _r = _a.idCaptureAllowUploadingDocumentsFromStorage,
25424
25425
  idCaptureAllowUploadingDocumentsFromStorage = _r === void 0 ? false : _r,
25425
- _s = _a.selfieCaptureModelLoadTimeoutMs,
25426
- selfieCaptureModelLoadTimeoutMs = _s === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _s,
25427
- _t = _a.allowIdCardBackToFrontCapture,
25428
- allowIdCardBackToFrontCapture = _t === void 0 ? false : _t,
25429
- _u = _a.enableOverrideWrongDocumentTypeDialog,
25430
- enableOverrideWrongDocumentTypeDialog = _u === void 0 ? false : _u,
25431
- _v = _a.allowOverrideWrongDocumentTypeAfterMs,
25432
- allowOverrideWrongDocumentTypeAfterMs = _v === void 0 ? 8000 : _v,
25426
+ _s = _a.separateIdCardCaptureSequence,
25427
+ separateIdCardCaptureSequence = _s === void 0 ? false : _s,
25428
+ _t = _a.selfieCaptureModelLoadTimeoutMs,
25429
+ selfieCaptureModelLoadTimeoutMs = _t === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _t,
25430
+ _u = _a.allowIdCardBackToFrontCapture,
25431
+ allowIdCardBackToFrontCapture = _u === void 0 ? false : _u,
25432
+ _v = _a.enableOverrideWrongDocumentTypeDialog,
25433
+ enableOverrideWrongDocumentTypeDialog = _v === void 0 ? false : _v,
25434
+ _w = _a.allowOverrideWrongDocumentTypeAfterMs,
25435
+ allowOverrideWrongDocumentTypeAfterMs = _w === void 0 ? 8000 : _w,
25433
25436
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
25434
25437
  onDocumentUploaded = _a.onDocumentUploaded,
25435
25438
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -25446,28 +25449,28 @@
25446
25449
  onIdCaptureModelError = _a.onIdCaptureModelError,
25447
25450
  onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
25448
25451
  onCameraAccessDenied = _a.onCameraAccessDenied,
25449
- _w = _a.captureSignature,
25450
- captureSignature = _w === void 0 ? false : _w,
25451
- _x = _a.captureSignatureVideo,
25452
- captureSignatureVideo = _x === void 0 ? false : _x,
25453
- _y = _a.captureAdditionalDocuments,
25454
- captureAdditionalDocuments = _y === void 0 ? [] : _y,
25455
- _z = _a.theme,
25456
- theme = _z === void 0 ? 'default' : _z,
25457
- _0 = _a.assets,
25458
- assets = _0 === void 0 ? {} : _0,
25459
- _1 = _a.classNames,
25460
- classNames = _1 === void 0 ? {} : _1,
25461
- _2 = _a.colors,
25462
- colors = _2 === void 0 ? {} : _2,
25463
- _3 = _a.verbiage,
25464
- verbiage = _3 === void 0 ? {} : _3,
25465
- _4 = _a.geolocationEnabled,
25466
- geolocationEnabled = _4 === void 0 ? true : _4,
25467
- _5 = _a.geolocationRequired,
25468
- geolocationRequired = _5 === void 0 ? false : _5,
25469
- _6 = _a.debugMode,
25470
- debugMode = _6 === void 0 ? false : _6;
25452
+ _x = _a.captureSignature,
25453
+ captureSignature = _x === void 0 ? false : _x,
25454
+ _y = _a.captureSignatureVideo,
25455
+ captureSignatureVideo = _y === void 0 ? false : _y,
25456
+ _z = _a.captureAdditionalDocuments,
25457
+ captureAdditionalDocuments = _z === void 0 ? [] : _z,
25458
+ _0 = _a.theme,
25459
+ theme = _0 === void 0 ? 'default' : _0,
25460
+ _1 = _a.assets,
25461
+ assets = _1 === void 0 ? {} : _1,
25462
+ _2 = _a.classNames,
25463
+ classNames = _2 === void 0 ? {} : _2,
25464
+ _3 = _a.colors,
25465
+ colors = _3 === void 0 ? {} : _3,
25466
+ _4 = _a.verbiage,
25467
+ verbiage = _4 === void 0 ? {} : _4,
25468
+ _5 = _a.geolocationEnabled,
25469
+ geolocationEnabled = _5 === void 0 ? true : _5,
25470
+ _6 = _a.geolocationRequired,
25471
+ geolocationRequired = _6 === void 0 ? false : _6,
25472
+ _7 = _a.debugMode,
25473
+ debugMode = _7 === void 0 ? false : _7;
25471
25474
  useLanguage(lang);
25472
25475
  useDebugLogging(debugMode);
25473
25476
  var idCaptureProps = React.useMemo(function () {
@@ -25495,10 +25498,11 @@
25495
25498
  enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
25496
25499
  allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
25497
25500
  forceFallbackMode: idCaptureForceFallbackMode,
25501
+ separateIdCardCaptureSequence: separateIdCardCaptureSequence,
25498
25502
  skipSuccessScreen: skipSuccessScreen,
25499
25503
  debugMode: debugMode
25500
25504
  };
25501
- }, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, skipSuccessScreen, debugMode]);
25505
+ }, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
25502
25506
  var faceLivenessProps = React.useMemo(function () {
25503
25507
  return {
25504
25508
  loadingOverlayMode: faceLivenessLoadingOverlayMode,
@@ -25679,6 +25683,8 @@
25679
25683
  allowOverrideWrongDocumentTypeAfterMs = _u === void 0 ? 8000 : _u,
25680
25684
  _v = _a.allowUploadingDocumentsFromStorage,
25681
25685
  allowUploadingDocumentsFromStorage = _v === void 0 ? false : _v,
25686
+ _w = _a.separateIdCardCaptureSequence,
25687
+ separateIdCardCaptureSequence = _w === void 0 ? false : _w,
25682
25688
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
25683
25689
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
25684
25690
  onDocumentUploaded = _a.onDocumentUploaded,
@@ -25694,31 +25700,31 @@
25694
25700
  onIdCaptureModelError = _a.onIdCaptureModelError,
25695
25701
  onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
25696
25702
  onCameraAccessDenied = _a.onCameraAccessDenied,
25697
- _w = _a.captureSignature,
25698
- captureSignature = _w === void 0 ? false : _w,
25699
- _x = _a.captureSignatureVideo,
25700
- captureSignatureVideo = _x === void 0 ? false : _x,
25701
- _y = _a.captureAdditionalDocuments,
25702
- captureAdditionalDocuments = _y === void 0 ? [] : _y,
25703
- _z = _a.captureVideoId,
25704
- captureVideoId = _z === void 0 ? false : _z,
25703
+ _x = _a.captureSignature,
25704
+ captureSignature = _x === void 0 ? false : _x,
25705
+ _y = _a.captureSignatureVideo,
25706
+ captureSignatureVideo = _y === void 0 ? false : _y,
25707
+ _z = _a.captureAdditionalDocuments,
25708
+ captureAdditionalDocuments = _z === void 0 ? [] : _z,
25709
+ _0 = _a.captureVideoId,
25710
+ captureVideoId = _0 === void 0 ? false : _0,
25705
25711
  captureVideoIdProps = _a.captureVideoIdProps,
25706
- _0 = _a.theme,
25707
- theme = _0 === void 0 ? 'default' : _0,
25708
- _1 = _a.assets,
25709
- assets = _1 === void 0 ? {} : _1,
25710
- _2 = _a.classNames,
25711
- classNames = _2 === void 0 ? {} : _2,
25712
- _3 = _a.colors,
25713
- colors = _3 === void 0 ? {} : _3,
25714
- _4 = _a.verbiage,
25715
- verbiage = _4 === void 0 ? {} : _4,
25716
- _5 = _a.geolocationEnabled,
25717
- geolocationEnabled = _5 === void 0 ? true : _5,
25718
- _6 = _a.geolocationRequired,
25719
- geolocationRequired = _6 === void 0 ? false : _6,
25720
- _7 = _a.debugMode,
25721
- debugMode = _7 === void 0 ? false : _7;
25712
+ _1 = _a.theme,
25713
+ theme = _1 === void 0 ? 'default' : _1,
25714
+ _2 = _a.assets,
25715
+ assets = _2 === void 0 ? {} : _2,
25716
+ _3 = _a.classNames,
25717
+ classNames = _3 === void 0 ? {} : _3,
25718
+ _4 = _a.colors,
25719
+ colors = _4 === void 0 ? {} : _4,
25720
+ _5 = _a.verbiage,
25721
+ verbiage = _5 === void 0 ? {} : _5,
25722
+ _6 = _a.geolocationEnabled,
25723
+ geolocationEnabled = _6 === void 0 ? true : _6,
25724
+ _7 = _a.geolocationRequired,
25725
+ geolocationRequired = _7 === void 0 ? false : _7,
25726
+ _8 = _a.debugMode,
25727
+ debugMode = _8 === void 0 ? false : _8;
25722
25728
  useLanguage(lang);
25723
25729
  useDebugLogging(debugMode);
25724
25730
  var idCaptureProps = React.useMemo(function () {
@@ -25742,13 +25748,14 @@
25742
25748
  enableOverrideWrongDocumentTypeDialog: enableOverrideWrongDocumentTypeDialog,
25743
25749
  allowOverrideWrongDocumentTypeAfterMs: allowOverrideWrongDocumentTypeAfterMs,
25744
25750
  allowUploadingDocumentsFromStorage: allowUploadingDocumentsFromStorage,
25751
+ separateIdCardCaptureSequence: separateIdCardCaptureSequence,
25745
25752
  onExitCapture: onExitCapture,
25746
25753
  onUserCancel: onUserCancel,
25747
25754
  onModelError: onIdCaptureModelError,
25748
25755
  skipSuccessScreen: skipSuccessScreen,
25749
25756
  debugMode: debugMode
25750
25757
  };
25751
- }, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
25758
+ }, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
25752
25759
  var faceLivenessProps = React.useMemo(function () {
25753
25760
  return {
25754
25761
  onExitCapture: onExitCapture,
@@ -27561,7 +27568,78 @@
27561
27568
  };
27562
27569
 
27563
27570
  initializeI18n();
27571
+ function renderElement(component, targetElement) {
27572
+ if (typeof targetElement === 'string') {
27573
+ var result = document.querySelector(targetElement);
27574
+ if (!result) throw new Error("targetElement ".concat(targetElement, " not found"));
27575
+ targetElement = result;
27576
+ } else if (!targetElement) {
27577
+ targetElement = document.createElement('div');
27578
+ document.body.append(targetElement);
27579
+ }
27580
+ var root = ReactDOM__namespace.createRoot(targetElement);
27581
+ root.render( /*#__PURE__*/React.createElement(OverlayContainer, null, component));
27582
+ if ('remove' in targetElement) {
27583
+ var originalRemove_1 = targetElement.remove;
27584
+ targetElement.remove = function () {
27585
+ try {
27586
+ root.unmount();
27587
+ originalRemove_1();
27588
+ } catch (e) {
27589
+ debug('failed to unmount', e);
27590
+ }
27591
+ };
27592
+ }
27593
+ return targetElement;
27594
+ }
27595
+ function renderComponent(Component, targetElement, options) {
27596
+ if (!options) {
27597
+ options = targetElement;
27598
+ targetElement = undefined;
27599
+ }
27600
+ return renderElement( /*#__PURE__*/React.createElement(Component, _assign({}, options)), targetElement);
27601
+ }
27602
+ var renderIdValidation = function renderIdValidation(optionsOrTargetElement, options) {
27603
+ return renderComponent(IdValidation, optionsOrTargetElement, options);
27604
+ };
27605
+ var renderFaceValidation = function renderFaceValidation(optionsOrTargetElement, options) {
27606
+ return renderComponent(FaceValidation, optionsOrTargetElement, options);
27607
+ };
27608
+ var renderIdAndFaceValidation = function renderIdAndFaceValidation(optionsOrTargetElement, options) {
27609
+ return renderComponent(IdAndFaceValidation, optionsOrTargetElement, options);
27610
+ };
27611
+ var renderCustomerIdAndBiometricsEnrollment = function renderCustomerIdAndBiometricsEnrollment(optionsOrTargetElement, options) {
27612
+ return renderComponent(CustomerIdAndBiometricsEnrollment, optionsOrTargetElement, options);
27613
+ };
27614
+ var renderCustomerBiometricsEnrollment = function renderCustomerBiometricsEnrollment(optionsOrTargetElement, options) {
27615
+ return renderComponent(CustomerBiometricsEnrollment, optionsOrTargetElement, options);
27616
+ };
27617
+ var renderCustomerVerification = function renderCustomerVerification(optionsOrTargetElement, options) {
27618
+ return renderComponent(CustomerVerification, optionsOrTargetElement, options);
27619
+ };
27620
+ var renderCustomerIdentification = function renderCustomerIdentification(optionsOrTargetElement, options) {
27621
+ return renderComponent(CustomerIdentification, optionsOrTargetElement, options);
27622
+ };
27623
+ var renderSignatureKYC = function renderSignatureKYC(optionsOrTargetElement, options) {
27624
+ return renderComponent(SignatureKYC, optionsOrTargetElement, options);
27625
+ };
27626
+ var renderVideoIdValidation = function renderVideoIdValidation(optionsOrTargetElement, options) {
27627
+ return renderComponent(VideoIdValidation, optionsOrTargetElement, options);
27628
+ };
27629
+ var renderDocumentCapture = function renderDocumentCapture(optionsOrTargetElement, options) {
27630
+ return renderComponent(DocumentCapture, optionsOrTargetElement, options);
27631
+ };
27564
27632
  globalThis.IDmissionSDK = {
27633
+ renderIdValidation: renderIdValidation,
27634
+ renderFaceValidation: renderFaceValidation,
27635
+ renderIdAndFaceValidation: renderIdAndFaceValidation,
27636
+ renderCustomerIdAndBiometricsEnrollment: renderCustomerIdAndBiometricsEnrollment,
27637
+ renderCustomerBiometricsEnrollment: renderCustomerBiometricsEnrollment,
27638
+ renderCustomerVerification: renderCustomerVerification,
27639
+ renderCustomerIdentification: renderCustomerIdentification,
27640
+ renderSignatureKYC: renderSignatureKYC,
27641
+ renderVideoIdValidation: renderVideoIdValidation,
27642
+ renderDocumentCapture: renderDocumentCapture,
27565
27643
  preloadModels: preloadModels,
27566
27644
  themes: themes,
27567
27645
  version: webSdkVersion,
@@ -28049,6 +28127,16 @@
28049
28127
  exports.allowedAuthUrls = allowedAuthUrls;
28050
28128
  exports.isObject = isObject;
28051
28129
  exports.preloadModels = preloadModels;
28130
+ exports.renderCustomerBiometricsEnrollment = renderCustomerBiometricsEnrollment;
28131
+ exports.renderCustomerIdAndBiometricsEnrollment = renderCustomerIdAndBiometricsEnrollment;
28132
+ exports.renderCustomerIdentification = renderCustomerIdentification;
28133
+ exports.renderCustomerVerification = renderCustomerVerification;
28134
+ exports.renderDocumentCapture = renderDocumentCapture;
28135
+ exports.renderFaceValidation = renderFaceValidation;
28136
+ exports.renderIdAndFaceValidation = renderIdAndFaceValidation;
28137
+ exports.renderIdValidation = renderIdValidation;
28138
+ exports.renderSignatureKYC = renderSignatureKYC;
28139
+ exports.renderVideoIdValidation = renderVideoIdValidation;
28052
28140
  exports.setServerUrl = setServerUrl;
28053
28141
  exports.themes = themes;
28054
28142