onfido-sdk-ui 14.60.0 → 14.61.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-api
13
- Version: 0.0.0-master.2187611
13
+ Version: 0.0.0-master.2220301
14
14
  License: null
15
15
  Private: false
16
16
  Repository: git@gitlab.eu-west-1.mgmt.onfido.xyz:onfido/sdks/capture-api.git
@@ -26,7 +26,7 @@ Description: A shared library to use in various capture packages
26
26
  ---
27
27
 
28
28
  Name: @onfido/sdk-analytics
29
- Version: 0.0.147
29
+ Version: 0.0.152
30
30
  License: null
31
31
  Private: false
32
32
  Description: Contracts for Onfido in-house analytics
@@ -252,7 +252,7 @@ SOFTWARE.
252
252
  ---
253
253
 
254
254
  Name: capture-module
255
- Version: 3.15.0
255
+ Version: 3.16.0
256
256
  License: null
257
257
  Private: false
258
258
 
@@ -293,7 +293,7 @@ SOFTWARE.
293
293
  ---
294
294
 
295
295
  Name: @onfido/capture-contract
296
- Version: 0.0.0-master.2215141
296
+ Version: 0.0.0-master.2229565
297
297
  License: null
298
298
  Private: false
299
299
  Description: Contracts for the SDKs and modules
package/Onfido.js CHANGED
@@ -1,7 +1,7 @@
1
- var U = Object.defineProperty;
2
- var E = (e, i, n) => i in e ? U(e, i, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[i] = n;
3
- var k = (e, i, n) => (E(e, typeof i != "symbol" ? i + "" : i, n), n);
4
- class B {
1
+ var B = Object.defineProperty;
2
+ var L = (e, i, n) => i in e ? B(e, i, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[i] = n;
3
+ var k = (e, i, n) => (L(e, typeof i != "symbol" ? i + "" : i, n), n);
4
+ class O {
5
5
  constructor() {
6
6
  this.eventListener = {};
7
7
  }
@@ -22,10 +22,10 @@ class B {
22
22
  });
23
23
  }
24
24
  }
25
- function L(e) {
25
+ function R(e) {
26
26
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
27
27
  }
28
- function O(e) {
28
+ function N(e) {
29
29
  if (e.__esModule)
30
30
  return e;
31
31
  var i = e.default;
@@ -46,14 +46,14 @@ function O(e) {
46
46
  });
47
47
  }), n;
48
48
  }
49
- function R(e) {
49
+ function V(e) {
50
50
  throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
51
51
  }
52
52
  var D = { exports: {} };
53
- const N = {}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
53
+ const M = {}, P = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
54
54
  __proto__: null,
55
- default: N
56
- }, Symbol.toStringTag, { value: "Module" })), M = /* @__PURE__ */ O(V);
55
+ default: M
56
+ }, Symbol.toStringTag, { value: "Module" })), W = /* @__PURE__ */ N(P);
57
57
  (function(e) {
58
58
  (function() {
59
59
  var i, n = 0, r = [], o;
@@ -65,7 +65,7 @@ const N = {}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
65
65
  return typeof t == "string" ? /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t) : !1;
66
66
  };
67
67
  var s;
68
- typeof crypto < "u" ? s = crypto : typeof window < "u" && typeof window.msCrypto < "u" && (s = window.msCrypto), typeof R == "function" ? (s = s || M, e.exports = d) : typeof window < "u" && (window.uuid = d), d.randomBytes = function() {
68
+ typeof crypto < "u" ? s = crypto : typeof window < "u" && typeof window.msCrypto < "u" && (s = window.msCrypto), typeof V == "function" ? (s = s || W, e.exports = d) : typeof window < "u" && (window.uuid = d), d.randomBytes = function() {
69
69
  if (s) {
70
70
  if (s.randomBytes)
71
71
  return s.randomBytes;
@@ -98,8 +98,8 @@ const N = {}, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
98
98
  }
99
99
  })();
100
100
  })(D);
101
- var P = D.exports;
102
- const _ = /* @__PURE__ */ L(P);
101
+ var j = D.exports;
102
+ const _ = /* @__PURE__ */ R(j);
103
103
  var a;
104
104
  (function(e) {
105
105
  e.MicrophonePermissionDenied = "MicrophonePermissionDenied", e.CameraPermissionDenied = "CameraPermissionDenied", e.PermissionsUnavailable = "PermissionsUnavailable", e.CameraNotDetected = "CameraNotDetected", e.CameraException = "CameraException", e.FailedToWriteToDisk = "FailedToWriteToDisk", e.InvalidImageData = "InvalidImageData", e.WorkflowTaskAbandoned = "WorkflowTaskAbandoned", e.WorkflowTaskError = "WorkflowTaskError", e.BiometricTokenRetrievalException = "BiometricTokenRetrievalException", e.WorkflowBiometricTokenStorageException = "WorkflowBiometricTokenStorageException", e.CrossDeviceRestartError = "CrossDeviceRestartError", e.CrossDeviceDesktopError = "CrossDeviceDesktopError", e.CrossDeviceVerificationInvalidError = "CrossDeviceVerificationInvalidError", e.CrossDeviceVerificationAbortError = "CrossDeviceVerificationAbortError", e.InvalidToken = "InvalidToken", e.ExpiredToken = "ExpiredToken", e.ExpiredTrial = "ExpiredTrial", e.NetworkException = "NetworkException", e.UploadError = "UploadError", e.InitialisationInvalid = "InitialisationInvalid", e.SdkVersionInsufficient = "SdkVersionInsufficient", e.UnsupportedError = "UnsupportedError", e.UnsupportedFeatureError = "UnsupportedFeatureError", e.InvalidSdkParameter = "InvalidSdkParameter", e.FeaturesNotAuthorized = "FeaturesNotAuthorized", e.MissingSteps = "MissingSteps", e.DuplicateStep = "DuplicateStep", e.WelcomeMustBeFirstStep = "WelcomeMustBeFirstStep", e.WorkflowVersionMismatch = "WorkflowVersionMismatch", e.WorkflowInputError = "WorkflowInputError", e.MissingLogoCobrandingParameter = "MissingLogoCobrandingParameter", e.InvalidCustomTranslations = "InvalidCustomTranslations", e.InvalidCountryCode = "InvalidCountryCode", e.InvalidDocumentFormatAndCountryCombination = "InvalidDocumentFormatAndCountryCombination", e.InvalidDocumentTypeException = "InvalidDocumentTypeException", e.InvalidDocumentTitle = "InvalidDocumentTitle", e.DuplicateGenericDocument = "DuplicateGenericDocument", e.NfcInputNotAvailable = "NfcInputNotAvailable", e.AppTerminated = "AppTerminated", e.GenericException = "GenericException", e.GeoBlocked = "GeoBlocked", e.ModuleLoadError = "ModuleLoadError";
@@ -179,7 +179,7 @@ class h extends Error {
179
179
  }) : i;
180
180
  }
181
181
  }
182
- const W = (e) => {
182
+ const q = (e) => {
183
183
  const { payload: i, urls: n } = e;
184
184
  return {
185
185
  sub: e.sub,
@@ -203,23 +203,23 @@ const W = (e) => {
203
203
  isTrial: i.is_trial
204
204
  }
205
205
  };
206
- }, j = (e) => {
206
+ }, G = (e) => {
207
207
  if (!e)
208
208
  throw new h(I);
209
209
  try {
210
- return W(JSON.parse(atob(e.split(".")[1])));
210
+ return q(JSON.parse(atob(e.split(".")[1])));
211
211
  } catch {
212
212
  throw new h(I);
213
213
  }
214
- }, T = "14", q = "14.45.0";
214
+ }, T = "14", A = "fallback", $ = "0.0.0";
215
215
  var v = /* @__PURE__ */ ((e) => (e.Npm = "Npm", e.Evergreen = "Evergreen", e))(v || {}), y = /* @__PURE__ */ ((e) => (e.Started = "Started", e.Error = "Error", e.Retry = "Retry", e.Fallback = "Fallback", e.Completed = "Completed", e))(y || {});
216
- const G = (e) => `v${(e || T).replace(/^v/, "")}`, m = (e) => `${e || T}`.replace(/^v/g, ""), $ = (e) => e.charAt(0).toUpperCase() + e.slice(1), g = (e, i, n = {}, r, o) => {
216
+ const g = (e) => e === A ? $ : E(e), z = (e) => `v${(e || T).replace(/^v/, "")}`, E = (e) => `${e || T}`.replace(/^v/g, ""), H = (e) => e.charAt(0).toUpperCase() + e.slice(1), m = (e, i, n = {}, r, o) => {
217
217
  var s, p;
218
218
  try {
219
219
  if ("token" in e) {
220
- const l = e.token, d = j(l);
220
+ const l = e.token, d = G(l);
221
221
  let t = "Light";
222
- (s = e.theme) != null && s.name && (t = $((p = e.theme) == null ? void 0 : p.name));
222
+ (s = e.theme) != null && s.name && (t = H((p = e.theme) == null ? void 0 : p.name));
223
223
  const c = e.language || "en-GB";
224
224
  let f = [];
225
225
  "steps" in e && (f = e.steps.map((u) => typeof u == "object" && "type" in u ? u.type : u)), fetch(`${d.urls.onfidoApiUrl}/v4/sdk/analytics`, {
@@ -229,7 +229,9 @@ const G = (e) => `v${(e || T).replace(/^v/, "")}`, m = (e) => `${e || T}`.replac
229
229
  "Content-Type": "application/json",
230
230
  authorization: `Bearer ${l}`,
231
231
  "x-onfido-sdk-platform": "web",
232
- "x-onfido-sdk-version": n == null ? void 0 : n.version
232
+ "x-onfido-sdk-version": g(
233
+ n == null ? void 0 : n.version
234
+ )
233
235
  },
234
236
  body: JSON.stringify({
235
237
  context: {
@@ -260,8 +262,10 @@ const G = (e) => `v${(e || T).replace(/^v/, "")}`, m = (e) => `${e || T}`.replac
260
262
  sdkInfo: {
261
263
  library: {
262
264
  sdk: "Web",
263
- version: (n == null ? void 0 : n.version) || m(q),
264
- pinnedVersion: m(e.version),
265
+ version: g(
266
+ (n == null ? void 0 : n.version) || A
267
+ ),
268
+ pinnedVersion: g(e.version),
265
269
  variant: "Bundled",
266
270
  analyticsLibraryVersion: "0.0.141"
267
271
  }
@@ -306,7 +310,7 @@ const G = (e) => `v${(e || T).replace(/^v/, "")}`, m = (e) => `${e || T}`.replac
306
310
  }
307
311
  };
308
312
  window.OnfidoDistribution = { name: "NPM" };
309
- class z extends B {
313
+ class K extends O {
310
314
  constructor() {
311
315
  super(...arguments);
312
316
  k(this, "_handle");
@@ -339,10 +343,10 @@ class z extends B {
339
343
  return (n = this._handle) == null ? void 0 : n.version;
340
344
  }
341
345
  }
342
- const A = {
346
+ const U = {
343
347
  init(e) {
344
- const i = new z(), n = m(e.version), r = e.sdkUrl || `https://sdk.onfido.com/${G(e.version)}/Onfido.js`;
345
- return g(
348
+ const i = new K(), n = E(e.version), r = e.sdkUrl || `https://sdk.onfido.com/${z(e.version)}/Onfido.js`;
349
+ return m(
346
350
  e,
347
351
  {
348
352
  identifier: "LoaderStateEvent",
@@ -353,7 +357,7 @@ const A = {
353
357
  version: n
354
358
  }
355
359
  ), import(/* webpackIgnore: true */ /* @vite-ignore */ r).then((o) => {
356
- g(
360
+ m(
357
361
  e,
358
362
  {
359
363
  identifier: "LoaderStateEvent",
@@ -368,7 +372,7 @@ const A = {
368
372
  i._setHandle(s.init(e));
369
373
  }).catch((o) => {
370
374
  var s;
371
- g(
375
+ m(
372
376
  e,
373
377
  {
374
378
  identifier: "LoaderStateEvent",
@@ -385,13 +389,13 @@ const A = {
385
389
  }), i;
386
390
  }
387
391
  };
388
- Object.defineProperty(A, "environment", {
392
+ Object.defineProperty(U, "environment", {
389
393
  get: () => window == null ? void 0 : window.Onfido.environment,
390
394
  set: (e) => {
391
395
  window.Onfido = window.Onfido || {}, window.Onfido.environment = e;
392
396
  }
393
397
  });
394
- const K = A;
398
+ const J = U;
395
399
  export {
396
- K as Onfido
400
+ J as Onfido
397
401
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onfido-sdk-ui",
3
- "version": "14.60.0",
3
+ "version": "14.61.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": {
@@ -1,7 +1,7 @@
1
1
  import type { ProofOfAddressType } from '../steps/ProofOfAddress.js';
2
2
  import type { StepNames } from '../steps/Step.js';
3
3
  export type CompleteCallback = (result: Record<string, CaptureResult>) => void;
4
- export type CaptureResult = FacePhotoCaptureResult;
4
+ export type CaptureResult = DocumentCaptureResult | FaceMotionCaptureResult | FacePhotoCaptureResult | FaceVideoCaptureResult | ProofOfAddressCaptureResult;
5
5
  export type FacePhotoCaptureResult = {
6
6
  type: StepNames.FacePhoto;
7
7
  id: string;
@@ -5,7 +5,6 @@ export declare enum ProofOfAddressType {
5
5
  AccommodationTenancyCertificate = "accommodation_tenancy_certificate",
6
6
  AddressCertificate = "address_certificate",
7
7
  BankBuildingSocietyStatement = "bank_building_society_statement",
8
- BankStatement = "bank_statement",
9
8
  BenefitLetters = "benefit_letters",
10
9
  CouncilTax = "council_tax",
11
10
  ElectricityBill = "electricity_bill",
@@ -32,4 +31,5 @@ export type ProofOfAddressFiltering = {
32
31
  export type ProofOfAddressOptions = {
33
32
  proofOfAddressFiltering?: ProofOfAddressFiltering;
34
33
  };
35
- export declare const ProofOfAddress: (key?: string) => ProofOfAddressStep;
34
+ export declare const defaultProofOfAddressOptions: {};
35
+ export declare const ProofOfAddress: (options?: Partial<ProofOfAddressOptions>, key?: string) => ProofOfAddressStep;
@@ -4,7 +4,6 @@ export var ProofOfAddressType;
4
4
  ProofOfAddressType["AccommodationTenancyCertificate"] = "accommodation_tenancy_certificate";
5
5
  ProofOfAddressType["AddressCertificate"] = "address_certificate";
6
6
  ProofOfAddressType["BankBuildingSocietyStatement"] = "bank_building_society_statement";
7
- ProofOfAddressType["BankStatement"] = "bank_statement";
8
7
  ProofOfAddressType["BenefitLetters"] = "benefit_letters";
9
8
  ProofOfAddressType["CouncilTax"] = "council_tax";
10
9
  ProofOfAddressType["ElectricityBill"] = "electricity_bill";
@@ -21,10 +20,14 @@ export var ProofOfAddressType;
21
20
  ProofOfAddressType["UtilityBill"] = "utility_bill";
22
21
  ProofOfAddressType["WaterBill"] = "water_bill";
23
22
  })(ProofOfAddressType || (ProofOfAddressType = {}));
24
- export const ProofOfAddress = (key = StepNames.ProofOfAddress) => {
23
+ export const defaultProofOfAddressOptions = {};
24
+ export const ProofOfAddress = (options, key = StepNames.ProofOfAddress) => {
25
25
  return {
26
26
  type: StepNames.ProofOfAddress,
27
+ options: {
28
+ ...defaultProofOfAddressOptions,
29
+ ...options,
30
+ },
27
31
  key,
28
- options: {},
29
32
  };
30
33
  };
@@ -1,8 +1,4 @@
1
1
  export type Branding = {
2
2
  text?: string;
3
3
  logo?: string;
4
- /**
5
- * @deprecated Internal type only
6
- */
7
- legacy?: boolean;
8
4
  };
@@ -9,7 +9,7 @@ export type Theme = {
9
9
  id?: string;
10
10
  mode?: ThemeMode;
11
11
  branding?: Branding;
12
- lightColors?: SdkColors;
13
- darkColors?: SdkColors;
12
+ lightColors?: Partial<SdkColors>;
13
+ darkColors?: Partial<SdkColors>;
14
14
  mediaResources?: MediaResources;
15
15
  };
@@ -25,5 +25,6 @@ export type FaceMotionFeatureFlags = {
25
25
  video_settings: {
26
26
  webm_mime_type_preference: string[];
27
27
  };
28
+ enable_devicemotion_permission?: boolean;
28
29
  };
29
30
  export {};
@@ -31,7 +31,8 @@ export type Configuration<T = unknown> = {
31
31
  };
32
32
  language?: string;
33
33
  workflowRunId?: string;
34
- taskId?: string | null;
34
+ taskId?: string;
35
+ taskDefinitionId?: string;
35
36
  };
36
37
  export type Input = Record<string, unknown>;
37
38
  export type Empty = Record<string, never>;
@@ -1,4 +1,5 @@
1
1
  import type { Theme } from '../capture-api/theming/Theme';
2
+ import type { Branding } from '../capture-api/theming/Branding';
2
3
  export type V15Theme = Theme & {
3
4
  /**
4
5
  * @deprecated Internal type: Temporary until fonts are officially supported through the theming API
@@ -12,4 +13,10 @@ export type V15Theme = Theme & {
12
13
  * @deprecated Internal type only
13
14
  */
14
15
  version?: 'v2' | 'v3';
16
+ /**
17
+ * @deprecated Internal type only
18
+ */
19
+ branding?: Branding & {
20
+ legacy?: boolean;
21
+ };
15
22
  };