onfido-sdk-ui 14.10.0-rc.0 → 14.14.0-rc.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/Onfido.iife.js CHANGED
@@ -1 +1 @@
1
- var a=Object.defineProperty;var v=(h,s,d)=>s in h?a(h,s,{enumerable:!0,configurable:!0,writable:!0,value:d}):h[s]=d;var o=(h,s,d)=>(v(h,typeof s!="symbol"?s+"":s,d),d);(function(h){"use strict";class s{constructor(){this.eventListener={}}addEventListener(n,e){return this.eventListener[n]=this.eventListener[n]||[],this.eventListener[n].push(e),this}removeEventListener(n,e){const t=this.eventListener[n];if(t){let i;for(;(i=t.indexOf(e))!==-1;)t.splice(i,1)}}trigger(n,e){e.type=n,(this.eventListener[n]||[]).forEach(t=>{t(e)})}}const d="v14";class l extends s{constructor(){super(...arguments);o(this,"_handle");o(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,i])=>{e.addEventListener(t,i)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const c={init(r){const n=new l;return import(r.sdkUrl||`https://sdk.onfido.com/${r.version||d}/Onfido.js`).then(t=>{const{Onfido:i}=t;n._setHandle(i.init(r))}).catch(t=>{var i;n.trigger("error",{error:t}),(i=r.onError)==null||i.call(r,t)}),n}};h.Onfido=c,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
1
+ var v=Object.defineProperty;var L=(i,r,d)=>r in i?v(i,r,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[r]=d;var o=(i,r,d)=>(L(i,typeof r!="symbol"?r+"":r,d),d);(function(i){"use strict";class r{constructor(){this.eventListener={}}addEventListener(n,e){return this.eventListener[n]=this.eventListener[n]||[],this.eventListener[n].push(e),this}removeEventListener(n,e){const t=this.eventListener[n];if(t){let h;for(;(h=t.indexOf(e))!==-1;)t.splice(h,1)}}trigger(n,e){e.type=n,(this.eventListener[n]||[]).forEach(t=>{t(e)})}}const d="v14";class c extends r{constructor(){super(...arguments);o(this,"_handle");o(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,h])=>{e.addEventListener(t,h)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const l=s=>`v${(s||d).replace(/^v/,"")}`,a={init(s){const n=new c;return import(s.sdkUrl||`https://sdk.onfido.com/${l(s.version)}/Onfido.js`).then(t=>{const{Onfido:h}=t;n._setHandle(h.init(s))}).catch(t=>{var h;n.trigger("error",{error:t}),(h=s.onError)==null||h.call(s,t)}),n}};i.Onfido=a,i.prefixVersion=l,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})})(this.window=this.window||{});
package/Onfido.js CHANGED
@@ -1,6 +1,6 @@
1
- var r = Object.defineProperty;
2
- var d = (s, t, e) => t in s ? r(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var h = (s, t, e) => (d(s, typeof t != "symbol" ? t + "" : t, e), e);
1
+ var h = Object.defineProperty;
2
+ var d = (s, t, e) => t in s ? h(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var r = (s, t, e) => (d(s, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  class o {
5
5
  constructor() {
6
6
  this.eventListener = {};
@@ -26,8 +26,8 @@ const l = "v14";
26
26
  class c extends o {
27
27
  constructor() {
28
28
  super(...arguments);
29
- h(this, "_handle");
30
- h(this, "_handleSetCallbacks", []);
29
+ r(this, "_handle");
30
+ r(this, "_handleSetCallbacks", []);
31
31
  }
32
32
  _setHandle(e) {
33
33
  this._handle = e, this._handleSetCallbacks.forEach((n) => n(e)), this._handleSetCallbacks = [], Object.entries(this.eventListener).forEach(([n, i]) => {
@@ -49,10 +49,10 @@ class c extends o {
49
49
  });
50
50
  }
51
51
  }
52
- const v = {
52
+ const v = (s) => `v${(s || l).replace(/^v/, "")}`, L = {
53
53
  init(s) {
54
54
  const t = new c();
55
- return import(s.sdkUrl || `https://sdk.onfido.com/${s.version || l}/Onfido.js`).then((n) => {
55
+ return import(s.sdkUrl || `https://sdk.onfido.com/${v(s.version)}/Onfido.js`).then((n) => {
56
56
  const { Onfido: i } = n;
57
57
  t._setHandle(i.init(s));
58
58
  }).catch((n) => {
@@ -62,5 +62,6 @@ const v = {
62
62
  }
63
63
  };
64
64
  export {
65
- v as Onfido
65
+ L as Onfido,
66
+ v as prefixVersion
66
67
  };
package/Onfido.umd.cjs CHANGED
@@ -1 +1 @@
1
- (function(n,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(n=typeof globalThis<"u"?globalThis:n||self,s(n.window=n.window||{}))})(this,function(n){"use strict";var f=Object.defineProperty;var v=(n,s,h)=>s in n?f(n,s,{enumerable:!0,configurable:!0,writable:!0,value:h}):n[s]=h;var r=(n,s,h)=>(v(n,typeof s!="symbol"?s+"":s,h),h);class s{constructor(){this.eventListener={}}addEventListener(i,e){return this.eventListener[i]=this.eventListener[i]||[],this.eventListener[i].push(e),this}removeEventListener(i,e){const t=this.eventListener[i];if(t){let d;for(;(d=t.indexOf(e))!==-1;)t.splice(d,1)}}trigger(i,e){e.type=i,(this.eventListener[i]||[]).forEach(t=>{t(e)})}}const h="v14";class l extends s{constructor(){super(...arguments);r(this,"_handle");r(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,d])=>{e.addEventListener(t,d)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const c={init(o){const i=new l;return import(o.sdkUrl||`https://sdk.onfido.com/${o.version||h}/Onfido.js`).then(t=>{const{Onfido:d}=t;i._setHandle(d.init(o))}).catch(t=>{var d;i.trigger("error",{error:t}),(d=o.onError)==null||d.call(o,t)}),i}};n.Onfido=c,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.window=n.window||{}))})(this,function(n){"use strict";var v=Object.defineProperty;var a=(n,i,o)=>i in n?v(n,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[i]=o;var h=(n,i,o)=>(a(n,typeof i!="symbol"?i+"":i,o),o);class i{constructor(){this.eventListener={}}addEventListener(s,e){return this.eventListener[s]=this.eventListener[s]||[],this.eventListener[s].push(e),this}removeEventListener(s,e){const t=this.eventListener[s];if(t){let r;for(;(r=t.indexOf(e))!==-1;)t.splice(r,1)}}trigger(s,e){e.type=s,(this.eventListener[s]||[]).forEach(t=>{t(e)})}}const o="v14";class c extends i{constructor(){super(...arguments);h(this,"_handle");h(this,"_handleSetCallbacks",[])}_setHandle(e){this._handle=e,this._handleSetCallbacks.forEach(t=>t(e)),this._handleSetCallbacks=[],Object.entries(this.eventListener).forEach(([t,r])=>{e.addEventListener(t,r)}),this.eventListener={}}addEventListener(e,t){return this._handle?(this._handle.addEventListener(e,t),this):super.addEventListener(e,t)}removeEventListener(e,t){if(this._handle)return this._handle.removeEventListener(e,t),this;super.removeEventListener(e,t)}tearDown(){var e;this._handle?(e=this._handle)==null||e.tearDown():this._handleSetCallbacks.push(()=>{this.tearDown()})}}const l=d=>`v${(d||o).replace(/^v/,"")}`,f={init(d){const s=new c;return import(d.sdkUrl||`https://sdk.onfido.com/${l(d.version)}/Onfido.js`).then(t=>{const{Onfido:r}=t;s._setHandle(r.init(d))}).catch(t=>{var r;s.trigger("error",{error:t}),(r=d.onError)==null||r.call(d,t)}),s}};n.Onfido=f,n.prefixVersion=l,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/license CHANGED
@@ -1,17 +1,17 @@
1
1
  Please see the terms of your Onfido Services Agreement which you are bound by with respect to your use of the Onfido
2
2
  SDK. To the extent the Onfido SDK includes copies or substantial portions of software licenced under third party terms
3
- and conditions this will be set out at https://sdk.onfido.com/capture/core/14.10.0/license.
3
+ and conditions this will be set out at https://sdk.onfido.com/capture/core/14.14.0/license.
4
4
 
5
5
  In the event of any inconsistency between the Onfido Services Agreement and any third party terms and conditions, the
6
6
  third party terms and conditions shall take precedence over the rights and
7
7
  restrictions granted in the Onfido Services Agreement solely in respect of such third party dependencies set out
8
- at https://sdk.onfido.com/capture/core/14.10.0/license.
8
+ at https://sdk.onfido.com/capture/core/14.14.0/license.
9
9
 
10
10
  3rd party licenses
11
11
  ------------------
12
12
 
13
13
  Name: @onfido/capture-shared
14
- Version: 1.17.1
14
+ Version: 1.20.1
15
15
  License: null
16
16
  Private: false
17
17
  Description: A shared library to use in various capture packages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onfido-sdk-ui",
3
- "version": "14.10.0-rc.0",
3
+ "version": "14.14.0-rc.0",
4
4
  "description": "JavaScript SDK view layer for Onfido identity verification",
5
5
  "author": "Web SDK Customer Support <web-sdk@onfido.com> (https://github.com/onfido)",
6
6
  "repository": {
package/types/Types.d.ts CHANGED
@@ -1,19 +1,8 @@
1
- import type { CaptureModule, CrossDevicePolicy, EnterpriseFeatures, LocaleDirection, Theme, ThemeConfig, Translations } from './shared/Types';
1
+ import type { LegacyStepDefinition, LegacyStepType, CrossDevicePolicy, EnterpriseFeatures, LocaleDirection, Theme, ThemeConfig, Translations, UserDetails } from './shared/Types';
2
2
  import type { CrossDeviceMethod } from './shared/CrossDeviceConnect.types';
3
3
  import type { EnterpriseFeatureCallback } from './shared/Enterprise';
4
- export type LegacyStepType = 'welcome' | 'complete' | 'face' | 'consent' | 'document' | 'poa';
5
4
  export declare const legacySteps: LegacyStepType[];
6
5
  export declare const isLegacyStepType: (step: LegacyStepDefinition) => step is LegacyStepType;
7
- export type LegacyStepDefinition = LegacyStepType | StepDefinition;
8
- export type StepDefinition = {
9
- type: LegacyStepType | string;
10
- options?: Record<string, unknown>;
11
- module?: CaptureModule;
12
- /**
13
- * the key used to serialize the output for onComplete
14
- */
15
- key?: string;
16
- };
17
6
  export type CompleteData = Record<string, unknown>;
18
7
  export type ErrorType = any;
19
8
  export type EnterpriseFeatureParameter = EnterpriseFeatures & EnterpriseFeatureCallback;
@@ -22,9 +11,11 @@ export type CommonSdkParameters = {
22
11
  containerId?: string;
23
12
  onError?: (error: ErrorType) => void;
24
13
  onComplete?: (data: CompleteData) => void;
14
+ enterpriseFeatures?: EnterpriseFeatureParameter;
25
15
  theme?: Theme;
26
16
  customUI?: ThemeConfig;
27
- enterpriseFeatures?: EnterpriseFeatureParameter;
17
+ language?: string | LegacyLanguageParameter;
18
+ translations?: Translations;
28
19
  };
29
20
  export type LegacyLanguageParameter = {
30
21
  locale?: string;
@@ -44,9 +35,7 @@ export type TokenParameters = {
44
35
  * number country code will default to GB.
45
36
  */
46
37
  smsNumberCountryCode?: string;
47
- userDetails?: {
48
- smsNumber?: string;
49
- };
38
+ userDetails?: UserDetails;
50
39
  _crossDeviceLinkMethods?: CrossDeviceMethod[];
51
40
  crossDevicePolicy?: CrossDevicePolicy;
52
41
  disableAnalytics?: boolean;
@@ -61,6 +61,9 @@ export type ExecutionContext = {
61
61
  customCallbacks?: CustomCallbacks;
62
62
  currentScriptHostname?: string;
63
63
  };
64
+ export type UserDetails = {
65
+ smsNumber?: string;
66
+ };
64
67
  export type ClientConfiguration = {
65
68
  token: string;
66
69
  sdkToken: SdkToken;
@@ -73,10 +76,13 @@ export type ClientConfiguration = {
73
76
  anonymousUuid: string;
74
77
  sessionUuid: string;
75
78
  workflowRunId: string | undefined;
79
+ steps: LegacyStepDefinition[];
76
80
  };
77
81
  enterpriseFeatures?: EnterpriseFeatures;
78
82
  crossDeviceClientIntroProductName?: string;
79
83
  crossDeviceClientIntroProductLogoSrc?: string;
84
+ smsNumberCountryCode?: string;
85
+ userDetails?: UserDetails;
80
86
  };
81
87
  export type SdkToken = {
82
88
  exp: number;
@@ -159,7 +165,7 @@ export type TrackedEnvironmentData = {
159
165
  };
160
166
  export type CrossDeviceInitialState = unknown;
161
167
  export type CrossDeviceInput = {
162
- backAvailable: boolean;
168
+ backActionType?: 'module' | 'cross-module';
163
169
  };
164
170
  export declare enum CaptureModuleType {
165
171
  HOSTED = "hosted",
@@ -177,4 +183,15 @@ export type ExternalModule = {
177
183
  } & ModuleType<CaptureModuleType.EXTERNAL>;
178
184
  export type CaptureModule = HostedModule | ExternalModule;
179
185
  export type CrossDevicePolicy = 'enable' | 'force' | 'disable';
186
+ export type LegacyStepType = 'welcome' | 'complete' | 'face' | 'consent' | 'document' | 'poa';
187
+ export type LegacyStepDefinition = LegacyStepType | StepDefinition;
188
+ export type StepDefinition = {
189
+ type: LegacyStepType | string;
190
+ options?: Record<string, unknown>;
191
+ module?: CaptureModule;
192
+ /**
193
+ * the key used to serialize the output for onComplete
194
+ */
195
+ key?: string;
196
+ };
180
197
  export {};