onfido-sdk-ui 14.50.0 → 14.52.0

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.
package/LICENSE CHANGED
@@ -10,7 +10,7 @@ at https://documentation.onfido.com/sdk/sdk-licenses/.
10
10
  ------------------
11
11
 
12
12
  Name: @onfido/capture-shared
13
- Version: 2.23.11
13
+ Version: 2.23.16
14
14
  License: null
15
15
  Private: false
16
16
  Description: A shared library to use in various capture packages
package/Onfido.iife.js CHANGED
@@ -1 +1 @@
1
- var f=Object.defineProperty;var L=(s,o,d)=>o in s?f(s,o,{enumerable:!0,configurable:!0,writable:!0,value:d}):s[o]=d;var h=(s,o,d)=>(L(s,typeof o!="symbol"?o+"":o,d),d);(function(s){"use strict";class o{constructor(){this.eventListener={}}addEventListener(i,e){return this.eventListener[i]=this.eventListener[i]||[],this.eventListener[i].push(e),this}removeEventListener(i,e){const n=this.eventListener[i];if(n){let r;for(;(r=n.indexOf(e))!==-1;)n.splice(r,1)}}trigger(i,e){(this.eventListener[i]||[]).forEach(n=>{n==null||n(e)})}}const d="v14";class c extends o{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,r])=>{e.addEventListener(n,r)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=t=>`v${(t||d).replace(/^v/,"")}`,v={init(t){const i=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ t.sdkUrl||`https://sdk.onfido.com/${l(t.version)}/Onfido.js`).then(n=>{const{Onfido:r}=n;i._setHandle(r.init(t))}).catch(n=>{var r;i.trigger("error",{error:n}),(r=t.onError)==null||r.call(t,n)}),i}};Object.defineProperty(v,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:t=>{window.Onfido=window.Onfido||{},window.Onfido.environment=t}});const a=v;s.Onfido=a,s.prefixVersion=l,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
1
+ var f=Object.defineProperty;var w=(s,o,d)=>o in s?f(s,o,{enumerable:!0,configurable:!0,writable:!0,value:d}):s[o]=d;var h=(s,o,d)=>(w(s,typeof o!="symbol"?o+"":o,d),d);(function(s){"use strict";class o{constructor(){this.eventListener={}}addEventListener(i,e){return this.eventListener[i]=this.eventListener[i]||[],this.eventListener[i].push(e),this}removeEventListener(i,e){const n=this.eventListener[i];if(n){let r;for(;(r=n.indexOf(e))!==-1;)n.splice(r,1)}}trigger(i,e){(this.eventListener[i]||[]).forEach(n=>{n==null||n(e)})}}const d="v14";window.OnfidoDistribution={name:"NPM"};class c extends o{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,r])=>{e.addEventListener(n,r)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=t=>`v${(t||d).replace(/^v/,"")}`,v={init(t){const i=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ t.sdkUrl||`https://sdk.onfido.com/${l(t.version)}/Onfido.js`).then(n=>{const{Onfido:r}=n;i._setHandle(r.init(t))}).catch(n=>{var r;i.trigger("error",{error:n}),(r=t.onError)==null||r.call(t,n)}),i}};Object.defineProperty(v,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:t=>{window.Onfido=window.Onfido||{},window.Onfido.environment=t}});const a=v;s.Onfido=a,s.prefixVersion=l,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
package/Onfido.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var d = Object.defineProperty;
2
2
  var h = (i, t, e) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var r = (i, t, e) => (h(i, typeof t != "symbol" ? t + "" : t, e), e);
3
+ var o = (i, t, e) => (h(i, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  class l {
5
5
  constructor() {
6
6
  this.eventListener = {};
@@ -23,11 +23,12 @@ class l {
23
23
  }
24
24
  }
25
25
  const v = "v14";
26
+ window.OnfidoDistribution = { name: "NPM" };
26
27
  class c extends l {
27
28
  constructor() {
28
29
  super(...arguments);
29
- r(this, "_handle");
30
- r(this, "_handleSetCallbacks", []);
30
+ o(this, "_handle");
31
+ o(this, "_handleSetCallbacks", []);
31
32
  }
32
33
  _setHandle(e) {
33
34
  this._handle = e, this._handleSetCallbacks.forEach((n) => n(e)), this._handleSetCallbacks = [], Object.entries(this.eventListener).forEach(([n, s]) => {
@@ -56,7 +57,7 @@ class c extends l {
56
57
  return (e = this._handle) == null ? void 0 : e.version;
57
58
  }
58
59
  }
59
- const a = (i) => `v${(i || v).replace(/^v/, "")}`, o = {
60
+ const a = (i) => `v${(i || v).replace(/^v/, "")}`, r = {
60
61
  init(i) {
61
62
  const t = new c();
62
63
  return import(/* webpackIgnore: true */ /* @vite-ignore */ i.sdkUrl || `https://sdk.onfido.com/${a(i.version)}/Onfido.js`).then((n) => {
@@ -68,13 +69,13 @@ const a = (i) => `v${(i || v).replace(/^v/, "")}`, o = {
68
69
  }), t;
69
70
  }
70
71
  };
71
- Object.defineProperty(o, "environment", {
72
+ Object.defineProperty(r, "environment", {
72
73
  get: () => window == null ? void 0 : window.Onfido.environment,
73
74
  set: (i) => {
74
75
  window.Onfido = window.Onfido || {}, window.Onfido.environment = i;
75
76
  }
76
77
  });
77
- const L = o;
78
+ const L = r;
78
79
  export {
79
80
  L as Onfido,
80
81
  a as prefixVersion
package/Onfido.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.window=t.window||{}))})(this,function(t){"use strict";var a=Object.defineProperty;var u=(t,i,r)=>i in t?a(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r;var h=(t,i,r)=>(u(t,typeof i!="symbol"?i+"":i,r),r);class i{constructor(){this.eventListener={}}addEventListener(o,e){return this.eventListener[o]=this.eventListener[o]||[],this.eventListener[o].push(e),this}removeEventListener(o,e){const n=this.eventListener[o];if(n){let d;for(;(d=n.indexOf(e))!==-1;)n.splice(d,1)}}trigger(o,e){(this.eventListener[o]||[]).forEach(n=>{n==null||n(e)})}}const r="v14";class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,d])=>{e.addEventListener(n,d)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=s=>`v${(s||r).replace(/^v/,"")}`,f={init(s){const o=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(n=>{const{Onfido:d}=n;o._setHandle(d.init(s))}).catch(n=>{var d;o.trigger("error",{error:n}),(d=s.onError)==null||d.call(s,n)}),o}};Object.defineProperty(f,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:s=>{window.Onfido=window.Onfido||{},window.Onfido.environment=s}});const v=f;t.Onfido=v,t.prefixVersion=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(t,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(t=typeof globalThis<"u"?globalThis:t||self,i(t.window=t.window||{}))})(this,function(t){"use strict";var a=Object.defineProperty;var u=(t,i,r)=>i in t?a(t,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[i]=r;var h=(t,i,r)=>(u(t,typeof i!="symbol"?i+"":i,r),r);class i{constructor(){this.eventListener={}}addEventListener(o,e){return this.eventListener[o]=this.eventListener[o]||[],this.eventListener[o].push(e),this}removeEventListener(o,e){const n=this.eventListener[o];if(n){let d;for(;(d=n.indexOf(e))!==-1;)n.splice(d,1)}}trigger(o,e){(this.eventListener[o]||[]).forEach(n=>{n==null||n(e)})}}const r="v14";window.OnfidoDistribution={name:"NPM"};class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(n=>n(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([n,d])=>{e.addEventListener(n,d)}),this.eventListener={}}addEventListener(e,n){return this._handle?(this._handle.addEventListener(e,n),this):super.addEventListener(e,n)}removeEventListener(e,n){if(this._handle)return this._handle.removeEventListener(e,n),this;super.removeEventListener(e,n)}async tearDown(){var e;if(this._handle)await((e=this._handle)==null?void 0:e.tearDown());else return this._handleSetCallbacks.push(()=>{this.tearDown()}),Promise.resolve()}get version(){var e;return(e=this._handle)==null?void 0:e.version}}const l=s=>`v${(s||r).replace(/^v/,"")}`,f={init(s){const o=new c;return import(/* webpackIgnore: true */ /* @vite-ignore */ s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(n=>{const{Onfido:d}=n;o._setHandle(d.init(s))}).catch(n=>{var d;o.trigger("error",{error:n}),(d=s.onError)==null||d.call(s,n)}),o}};Object.defineProperty(f,"environment",{get:()=>window==null?void 0:window.Onfido.environment,set:s=>{window.Onfido=window.Onfido||{},window.Onfido.environment=s}});const v=f;t.Onfido=v,t.prefixVersion=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onfido-sdk-ui",
3
- "version": "14.50.0",
3
+ "version": "14.52.0",
4
4
  "description": "JavaScript SDK view layer for Onfido identity verification",
5
5
  "author": "Onfido Customer Support <support@onfido.com> (https://documentation.onfido.com/sdk/web/)",
6
6
  "repository": {
package/types/Onfido.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { CaptureRunEvents } from './Events';
2
2
 
3
- export declare const backwardCompatibility: (parameter: SdkParameters) => void;
3
+ export declare const backwardCompatibility: (parameter: SdkParameters) => SdkParameters;
4
4
 
5
5
  declare type CaptureModule = HostedModule | ExternalModule;
6
6
 
@@ -203,7 +203,7 @@ declare type Score = {
203
203
  threshold: number;
204
204
  };
205
205
 
206
- declare type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error';
206
+ declare type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error' | 'cross_device_desktop_unavailable' | 'cross_device_connection_lost';
207
207
 
208
208
  export declare type SdkParameters = StudioSdkParameters | ClassicSdkParameters | CrossDeviceSdkParameters;
209
209
 
@@ -3,13 +3,15 @@ export declare enum SdkErrorLevel {
3
3
  EXTERNAL = "external",
4
4
  INTERNAL = "internal"
5
5
  }
6
- export type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error';
6
+ export type SdkErrorTypes = 'invalid_token' | 'expired_token' | 'expired_trial' | 'geoblocked_request' | 'permissions_unavailable' | 'exception' | 'unsupported' | 'unsupported_feature' | 'invalid_sdk_parameter' | 'restart' | 'desktop' | 'unsupported_sdk_version' | 'no_camera' | 'user_consent_denied' | 'uncaught_fetch_error' | 'api_error' | 'cross_device_verification_invalid' | 'cross_device_verification_abort' | 'workflow_abandoned' | 'workflow_error' | 'workflow_input_error' | 'cross_device_desktop_unavailable' | 'cross_device_connection_lost';
7
7
  export declare const isSdkError: (error: unknown) => boolean;
8
8
  export type SdkErrors = {
9
9
  type: SdkErrorTypes;
10
10
  message: string;
11
11
  level: SdkErrorLevel;
12
12
  };
13
+ export declare const CrossDeviceDesktopUnavailable: SdkErrors;
14
+ export declare const CrossDeviceConnectionLost: SdkErrors;
13
15
  export declare const CrossDeviceRestartError: SdkErrors;
14
16
  export declare const CrossDeviceDesktopError: SdkErrors;
15
17
  export declare const CrossDeviceVerificationInvalidError: SdkErrors;
@@ -17,7 +17,9 @@ export type SdkFeatures = {
17
17
  web_enable_cross_device_verification?: boolean;
18
18
  web_enable_js_camera_poa?: boolean;
19
19
  web_enable_cross_device_qr_refresh?: boolean;
20
+ web_cross_device_qr_refresh_timeout?: number;
20
21
  web_enable_cross_device_confirmation?: boolean;
22
+ web_enable_cross_device_reconnect?: boolean;
21
23
  web_enable_pre_init_permission_check?: boolean;
22
24
  use_customized_api_requests?: boolean;
23
25
  logger?: {
@@ -20,7 +20,7 @@ export type ModuleFinishOptions = {
20
20
  };
21
21
  export type ExecutorMethod = 'bootstrap' | 'ping' | 'start';
22
22
  export type CrossDeviceExecutorMethod = 'crossDevice.update' | 'crossDevice.abort';
23
- export type RunnerMethod = 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'crossDevice.verify' | 'crossDevice.abort' | 'crossDevice.regenerate' | 'analytics.send' | 'analyticsV2.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.exit' | 'navigation.externalLink' | 'navigation.closeExternalLink' | 'customCallback.invoke' | 'passkey.create' | 'passkey.get';
23
+ export type RunnerMethod = 'captureModule.finish' | 'captureModule.error' | 'captureModule.unsupported' | 'crossDevice.start' | 'crossDevice.preload' | 'crossDevice.verify' | 'crossDevice.abort' | 'crossDevice.regenerate' | 'analytics.send' | 'analyticsV2.send' | 'analytics.userAnalytics' | 'navigation.back' | 'navigation.exit' | 'navigation.externalLink' | 'navigation.closeExternalLink' | 'customCallback.invoke' | 'passkey.create' | 'passkey.get' | 'crossDevice.browserReload';
24
24
  export type Configuration<T = unknown> = {
25
25
  translations?: T;
26
26
  theme?: Theme;