idmission-web-sdk 2.1.15 → 2.1.17

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.
Files changed (62) hide show
  1. package/dist/components/customer_flows/IdValidation.d.ts +2 -0
  2. package/dist/components/id_capture/IdCaptureWizard.d.ts +2 -1
  3. package/dist/sdk2.esm.js +73 -69
  4. package/dist/sdk2.esm.js.map +1 -1
  5. package/dist/sdk2.umd.development.js +73 -69
  6. package/dist/sdk2.umd.development.js.map +1 -1
  7. package/dist/sdk2.umd.production.js +1 -1
  8. package/dist/sdk2.umd.production.js.map +1 -1
  9. package/dist/version.d.ts +1 -1
  10. package/package.json +2 -23
  11. package/dist/stories/Auth.stories.d.ts +0 -8
  12. package/dist/stories/Components/AdditionalDocumentCapture.stories.d.ts +0 -25
  13. package/dist/stories/Components/CompositeWizard/FaceLivenessAndIdCapture.stories.d.ts +0 -15
  14. package/dist/stories/Components/CompositeWizard/IdCaptureAndFaceLiveness.stories.d.ts +0 -24
  15. package/dist/stories/Components/DocumentCaptureGuideOverlay/FlipIdPrompt.stories.d.ts +0 -34
  16. package/dist/stories/Components/DocumentCaptureGuideOverlay/LicenseBack.stories.d.ts +0 -21
  17. package/dist/stories/Components/DocumentCaptureGuideOverlay/LicenseFront.stories.d.ts +0 -27
  18. package/dist/stories/Components/DocumentCaptureGuideOverlay/Passport.stories.d.ts +0 -22
  19. package/dist/stories/Components/FaceLiveness/Capture.stories.d.ts +0 -21
  20. package/dist/stories/Components/FaceLiveness/Wizard.stories.d.ts +0 -23
  21. package/dist/stories/Components/HighPerformanceFaceDetection/Minimal.stories.d.ts +0 -13
  22. package/dist/stories/Components/HighPerformanceObjectDetection/Minimal.stories.d.ts +0 -13
  23. package/dist/stories/Components/IdCapture/LicenseBackCapture.stories.d.ts +0 -16
  24. package/dist/stories/Components/IdCapture/LicenseFrontCapture.stories.d.ts +0 -18
  25. package/dist/stories/Components/IdCapture/PassportCapture.stories.d.ts +0 -17
  26. package/dist/stories/Components/IdCapture/Wizard.stories.d.ts +0 -12
  27. package/dist/stories/Components/ReadTextPrompt.stories.d.ts +0 -19
  28. package/dist/stories/Components/SignatureCapture.stories.d.ts +0 -17
  29. package/dist/stories/Components/VideoIdCaptureGuideOverlay.stories.d.ts +0 -42
  30. package/dist/stories/Components/VideoSignatureCapture.stories.d.ts +0 -19
  31. package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +0 -38
  32. package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +0 -42
  33. package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +0 -31
  34. package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +0 -32
  35. package/dist/stories/CustomerFlows/DocumentCapture.stories.d.ts +0 -92
  36. package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +0 -52
  37. package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +0 -54
  38. package/dist/stories/CustomerFlows/IdValidation.stories.d.ts +0 -170
  39. package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +0 -32
  40. package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +0 -95
  41. package/dist/stories/Experiments/Camera.stories.d.ts +0 -7
  42. package/dist/stories/Experiments/CameraEnumerationTool.stories.d.ts +0 -22
  43. package/dist/stories/Experiments/FrameLoop.stories.d.ts +0 -7
  44. package/dist/stories/Experiments/MultiCamera.stories.d.ts +0 -7
  45. package/dist/stories/Experiments/MultiStreamVideoCapture.stories.d.ts +0 -7
  46. package/dist/stories/Experiments/PlatformDetectionTool.stories.d.ts +0 -7
  47. package/dist/stories/Experiments/SpeedTest.stories.d.ts +0 -7
  48. package/dist/stories/Experiments/VideoCapture.stories.d.ts +0 -7
  49. package/dist/stories/Experiments/WebSdkExample.stories.d.ts +0 -7
  50. package/dist/stories/FallbackFlows/IdCapture.stories.d.ts +0 -31
  51. package/dist/stories/FallbackFlows/SelfieCapture.stories.d.ts +0 -16
  52. package/dist/stories/TokenGeneration.stories.d.ts +0 -7
  53. package/dist/stories/models/FaceDetection.stories.d.ts +0 -9
  54. package/dist/stories/models/FocusModel.stories.d.ts +0 -7
  55. package/dist/stories/utils/cdnUrl.d.ts +0 -1
  56. package/dist/stories/utils/getToken.d.ts +0 -9
  57. package/dist/stories/utils/makeRandomString.d.ts +0 -1
  58. package/dist/stories/utils/sessions.d.ts +0 -13
  59. package/dist/stories/utils/test_photos/cat1.d.ts +0 -6
  60. package/dist/stories/utils/test_photos/cat2.d.ts +0 -6
  61. package/dist/stories/utils/test_photos/cat3.d.ts +0 -6
  62. package/dist/stories/utils/useLocalStorage.d.ts +0 -1
@@ -96,6 +96,8 @@ export interface IdValidationProps extends PropsWithChildren {
96
96
  rotateLoadingOverlayImageWhenPortrait?: boolean;
97
97
  /** Number of milliseconds indicating the maximum amount of time that should be spent trying to load the guided capture experience before giving up and resorting to the stock camera instead. Defaults to 45000 (45 seconds). */
98
98
  modelLoadTimeoutMs?: number;
99
+ /** Boolean to indicate whether to force the fallback mode even if the ID capture models are available. Defaults to `false`. */
100
+ forceFallbackMode?: boolean;
99
101
  /** Object to allow documents that have been previously captured to be submitted. Valid keys: `idCardFront`, `idCardBack`, `passport`.*/
100
102
  precapturedDocuments?: CapturedDocuments;
101
103
  /** Callback function that fires immediately prior to each document upload, giving the client application an opportunity to specify custom asynchronous logic that captures the document contents before it is exchanged for a document token. The document content and metadata are passed in as parameters and a promise resolving to void or false should be returned. If the returned promise resolves to false, the document will not be uploaded. */
@@ -63,10 +63,11 @@ export type IdCaptureWizardProps = {
63
63
  portraitGuidesOnMobile?: boolean;
64
64
  rotateLoadingOverlayImageWhenPortrait?: boolean;
65
65
  silentFallback?: boolean;
66
+ forceFallbackMode?: boolean;
66
67
  assets?: IdCaptureWizardAssets;
67
68
  classNames?: IdCaptureWizardClassNames;
68
69
  colors?: IdCaptureWizardColors;
69
70
  verbiage?: IdCaptureWizardVerbiage;
70
71
  debugMode?: boolean;
71
72
  };
72
- export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
73
+ export declare const IdCaptureWizard: ({ onSuccess, onExitCapture, onUserCancel, loadingOverlayMode, precapturedDocuments, captureRequirement, separateIdCardCaptureSequence, thresholds, skipSuccessScreen, instructions, releaseCameraAccessOnExit, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, silentFallback, forceFallbackMode, assets, classNames, colors, verbiage, debugMode, }: IdCaptureWizardProps) => ReactElement;
package/dist/sdk2.esm.js CHANGED
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
204
204
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
205
205
  };
206
206
 
207
- var webSdkVersion = '2.1.15';
207
+ var webSdkVersion = '2.1.17';
208
208
 
209
209
  function getPlatform() {
210
210
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -9522,40 +9522,42 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9522
9522
  rotateLoadingOverlayImageWhenPortrait = _1 === void 0 ? true : _1,
9523
9523
  _2 = _a.silentFallback,
9524
9524
  silentFallback = _2 === void 0 ? false : _2,
9525
- _3 = _a.assets,
9526
- assets = _3 === void 0 ? {} : _3,
9527
- _4 = _a.classNames,
9528
- classNames = _4 === void 0 ? {} : _4,
9529
- _5 = _a.colors,
9530
- colors = _5 === void 0 ? {} : _5,
9531
- _6 = _a.verbiage,
9532
- verbiage = _6 === void 0 ? {} : _6,
9533
- _7 = _a.debugMode,
9534
- debugMode = _7 === void 0 ? false : _7;
9535
- var _8 = useIdCaptureState(),
9536
- state = _8[0],
9537
- dispatch = _8[1];
9538
- var _9 = useContext(CameraStateContext),
9539
- cameraAccessDenied = _9.cameraAccessDenied,
9540
- requestCameraAccess = _9.requestCameraAccess,
9541
- releaseCameraAccess = _9.releaseCameraAccess;
9542
- var _10 = useState(false),
9543
- overlayDismissed = _10[0],
9544
- setOverlayDismissed = _10[1];
9545
- var _11 = useContext(SubmissionContext),
9546
- submissionStatus = _11.submissionStatus,
9547
- setIdFrontImage = _11.setIdFrontImage,
9548
- setIdBackImage = _11.setIdBackImage,
9549
- setPassportImage = _11.setPassportImage,
9550
- logIdFrontCaptureAttempt = _11.logIdFrontCaptureAttempt,
9551
- logIdBackCaptureAttempt = _11.logIdBackCaptureAttempt;
9552
- var _12 = useContext(IdCaptureModelsContext),
9553
- start = _12.start,
9554
- stop = _12.stop,
9555
- onPredictionMade = _12.onPredictionMade,
9556
- setRequiredDocumentType = _12.setRequiredDocumentType,
9557
- modelError = _12.modelError,
9558
- resetBestFrame = _12.resetBestFrame;
9525
+ _3 = _a.forceFallbackMode,
9526
+ forceFallbackMode = _3 === void 0 ? false : _3,
9527
+ _4 = _a.assets,
9528
+ assets = _4 === void 0 ? {} : _4,
9529
+ _5 = _a.classNames,
9530
+ classNames = _5 === void 0 ? {} : _5,
9531
+ _6 = _a.colors,
9532
+ colors = _6 === void 0 ? {} : _6,
9533
+ _7 = _a.verbiage,
9534
+ verbiage = _7 === void 0 ? {} : _7,
9535
+ _8 = _a.debugMode,
9536
+ debugMode = _8 === void 0 ? false : _8;
9537
+ var _9 = useIdCaptureState(),
9538
+ state = _9[0],
9539
+ dispatch = _9[1];
9540
+ var _10 = useContext(CameraStateContext),
9541
+ cameraAccessDenied = _10.cameraAccessDenied,
9542
+ requestCameraAccess = _10.requestCameraAccess,
9543
+ releaseCameraAccess = _10.releaseCameraAccess;
9544
+ var _11 = useState(false),
9545
+ overlayDismissed = _11[0],
9546
+ setOverlayDismissed = _11[1];
9547
+ var _12 = useContext(SubmissionContext),
9548
+ submissionStatus = _12.submissionStatus,
9549
+ setIdFrontImage = _12.setIdFrontImage,
9550
+ setIdBackImage = _12.setIdBackImage,
9551
+ setPassportImage = _12.setPassportImage,
9552
+ logIdFrontCaptureAttempt = _12.logIdFrontCaptureAttempt,
9553
+ logIdBackCaptureAttempt = _12.logIdBackCaptureAttempt;
9554
+ var _13 = useContext(IdCaptureModelsContext),
9555
+ start = _13.start,
9556
+ stop = _13.stop,
9557
+ onPredictionMade = _13.onPredictionMade,
9558
+ setRequiredDocumentType = _13.setRequiredDocumentType,
9559
+ modelError = _13.modelError,
9560
+ resetBestFrame = _13.resetBestFrame;
9559
9561
  useEffect(function () {
9560
9562
  dispatch({
9561
9563
  type: 'configureWizard',
@@ -9644,9 +9646,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9644
9646
  type: 'resetWizard'
9645
9647
  });
9646
9648
  }, [dispatch]);
9647
- var _13 = useState(0),
9648
- attempt = _13[0],
9649
- setAttempt = _13[1];
9649
+ var _14 = useState(0),
9650
+ attempt = _14[0],
9651
+ setAttempt = _14[1];
9650
9652
  var onExit = useCallback(function () {
9651
9653
  releaseCameraAccess();
9652
9654
  setOverlayDismissed(false);
@@ -9699,12 +9701,12 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9699
9701
  })
9700
9702
  };
9701
9703
  var theme = useTheme();
9702
- var _14 = useIdCaptureState()[0],
9703
- guideRectX = _14.guideRectX,
9704
- guideRectY = _14.guideRectY,
9705
- guideRectWidth = _14.guideRectWidth,
9706
- guideRectHeight = _14.guideRectHeight,
9707
- imageUrl = _14.imageUrl;
9704
+ var _15 = useIdCaptureState()[0],
9705
+ guideRectX = _15.guideRectX,
9706
+ guideRectY = _15.guideRectY,
9707
+ guideRectWidth = _15.guideRectWidth,
9708
+ guideRectHeight = _15.guideRectHeight,
9709
+ imageUrl = _15.imageUrl;
9708
9710
  var idCaptureAssets = assets[state.requestedDocumentType];
9709
9711
  var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
9710
9712
  useEffect(function () {
@@ -9758,8 +9760,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
9758
9760
  });
9759
9761
  });
9760
9762
  }, [dispatch]);
9761
- useEffect(function () {}, []);
9762
- if (modelError) {
9763
+ if (forceFallbackMode || modelError) {
9763
9764
  return /*#__PURE__*/React__default.createElement(IdCaptureFallback, {
9764
9765
  idCaptureRequirement: captureRequirement,
9765
9766
  onFinished: onSubmitClick,
@@ -13939,6 +13940,8 @@ var IdValidation = function IdValidation(_a) {
13939
13940
  rotateLoadingOverlayImageWhenPortrait = _k === void 0 ? true : _k,
13940
13941
  _l = _a.modelLoadTimeoutMs,
13941
13942
  modelLoadTimeoutMs = _l === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _l,
13943
+ _m = _a.forceFallbackMode,
13944
+ forceFallbackMode = _m === void 0 ? false : _m,
13942
13945
  onBeforeSubmit = _a.onBeforeSubmit,
13943
13946
  onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
13944
13947
  onDocumentUploadProgress = _a.onDocumentUploadProgress,
@@ -13952,28 +13955,28 @@ var IdValidation = function IdValidation(_a) {
13952
13955
  onUserCancel = _a.onUserCancel,
13953
13956
  onModelError = _a.onModelError,
13954
13957
  onCameraAccessDenied = _a.onCameraAccessDenied,
13955
- _m = _a.theme,
13956
- theme = _m === void 0 ? 'default' : _m,
13957
- _o = _a.assets,
13958
- assets = _o === void 0 ? {} : _o,
13959
- _p = _a.classNames,
13960
- classNames = _p === void 0 ? {} : _p,
13961
- _q = _a.colors,
13962
- colors = _q === void 0 ? {} : _q,
13963
- _r = _a.verbiage,
13964
- verbiage = _r === void 0 ? {} : _r,
13965
- _s = _a.captureSignature,
13966
- captureSignature = _s === void 0 ? false : _s,
13967
- _t = _a.captureSignatureVideo,
13968
- captureSignatureVideo = _t === void 0 ? false : _t,
13969
- _u = _a.captureAdditionalDocuments,
13970
- captureAdditionalDocuments = _u === void 0 ? [] : _u,
13971
- _v = _a.geolocationEnabled,
13972
- geolocationEnabled = _v === void 0 ? true : _v,
13973
- _w = _a.geolocationRequired,
13974
- geolocationRequired = _w === void 0 ? false : _w,
13975
- _x = _a.debugMode,
13976
- debugMode = _x === void 0 ? false : _x;
13958
+ _o = _a.theme,
13959
+ theme = _o === void 0 ? 'default' : _o,
13960
+ _p = _a.assets,
13961
+ assets = _p === void 0 ? {} : _p,
13962
+ _q = _a.classNames,
13963
+ classNames = _q === void 0 ? {} : _q,
13964
+ _r = _a.colors,
13965
+ colors = _r === void 0 ? {} : _r,
13966
+ _s = _a.verbiage,
13967
+ verbiage = _s === void 0 ? {} : _s,
13968
+ _t = _a.captureSignature,
13969
+ captureSignature = _t === void 0 ? false : _t,
13970
+ _u = _a.captureSignatureVideo,
13971
+ captureSignatureVideo = _u === void 0 ? false : _u,
13972
+ _v = _a.captureAdditionalDocuments,
13973
+ captureAdditionalDocuments = _v === void 0 ? [] : _v,
13974
+ _w = _a.geolocationEnabled,
13975
+ geolocationEnabled = _w === void 0 ? true : _w,
13976
+ _x = _a.geolocationRequired,
13977
+ geolocationRequired = _x === void 0 ? false : _x,
13978
+ _y = _a.debugMode,
13979
+ debugMode = _y === void 0 ? false : _y;
13977
13980
  useLanguage(lang);
13978
13981
  useDebugLogging(debugMode);
13979
13982
  var idCaptureProps = useMemo(function () {
@@ -13987,6 +13990,7 @@ var IdValidation = function IdValidation(_a) {
13987
13990
  thresholds: idCaptureThresholds,
13988
13991
  skipSuccessScreen: skipSuccessScreen,
13989
13992
  loadingOverlayMode: loadingOverlayMode,
13993
+ forceFallbackMode: forceFallbackMode,
13990
13994
  instructions: instructions,
13991
13995
  guideType: guideType,
13992
13996
  portraitGuidesOnMobile: portraitGuidesOnMobile,
@@ -13998,7 +14002,7 @@ var IdValidation = function IdValidation(_a) {
13998
14002
  verbiage: verbiage,
13999
14003
  debugMode: debugMode
14000
14004
  };
14001
- }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
14005
+ }, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, forceFallbackMode, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, assets, classNames, colors, verbiage, debugMode]);
14002
14006
  var additionalDocumentCaptureProps = useMemo(function () {
14003
14007
  return {
14004
14008
  documents: captureAdditionalDocuments,