idmission-web-sdk 2.1.80 → 2.1.82

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,6 +1,5 @@
1
1
  export * from './types';
2
2
  export * from './defaults';
3
- export * from './merge';
4
3
  export * from './byUrl';
5
4
  export * from './backToFront';
6
5
  export * from './orientation';
package/dist/index.d.ts CHANGED
@@ -50,3 +50,4 @@ declare global {
50
50
  var IDmissionSDK: IDmissionSDK;
51
51
  }
52
52
  export { preloadModels, themes, Theme, IdValidation, FaceValidation, IdAndFaceValidation, CustomerIdAndBiometricsEnrollment, CustomerBiometricsEnrollment, CustomerVerification, CustomerIdentification, SignatureKYC, VideoIdValidation, DocumentCapture, SubmissionRequest, SubmissionResponse, CapturedDocumentImg, allowedAuthUrls, defaultAuthUrl, defaultSubmissionUrl, setServerUrl, };
53
+ export { isObject } from './lib/utils/merge';
@@ -76,6 +76,7 @@ declare const _default: {
76
76
  Upload: string;
77
77
  'Uploading...': string;
78
78
  'Upload succeeded!': string;
79
+ 'Performing facial recognition, please hold still...': string;
79
80
  'Display the front of your ID card...': string;
80
81
  'Display the back of your ID card...': string;
81
82
  'Please move your face to the center...': string;
@@ -84,6 +84,7 @@ export declare const resources: {
84
84
  Upload: string;
85
85
  'Uploading...': string;
86
86
  'Upload succeeded!': string;
87
+ 'Performing facial recognition, please hold still...': string;
87
88
  'Display the front of your ID card...': string;
88
89
  'Display the back of your ID card...': string;
89
90
  'Please move your face to the center...': string;
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
234
234
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
235
235
  };
236
236
 
237
- var webSdkVersion = '2.1.80';
237
+ var webSdkVersion = '2.1.82';
238
238
 
239
239
  function getPlatform() {
240
240
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -6938,6 +6938,7 @@ var esTranslation = {
6938
6938
  Upload: 'Enviar',
6939
6939
  'Uploading...': 'Procesando...',
6940
6940
  'Upload succeeded!': 'Proceso completo!',
6941
+ 'Performing facial recognition, please hold still...': 'Realizando el reconocimiento facial, por favor no te muevas',
6941
6942
  'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
6942
6943
  'Display the back of your ID card...': 'Hay que mostrar el reverso de la identificación...',
6943
6944
  'Please move your face to the center...': 'Por favor, hay que mover la cabeza hacia el centro...',
@@ -8533,6 +8534,16 @@ var defaultIdCaptureGuideImages = {
8533
8534
  }
8534
8535
  };
8535
8536
 
8537
+ function useGuideImagesByUrl(images) {
8538
+ return React.useMemo(function () {
8539
+ return Object.fromEntries(Object.values(images).flatMap(function (v) {
8540
+ return Object.values(v);
8541
+ }).map(function (v) {
8542
+ return [v.url, v];
8543
+ }));
8544
+ }, [images]);
8545
+ }
8546
+
8536
8547
  function isObject(item) {
8537
8548
  return !!item && typeof item === 'object' && !Array.isArray(item);
8538
8549
  }
@@ -8555,16 +8566,6 @@ function mergeDeep(target, source) {
8555
8566
  return output;
8556
8567
  }
8557
8568
 
8558
- function useGuideImagesByUrl(images) {
8559
- return React.useMemo(function () {
8560
- return Object.fromEntries(Object.values(images).flatMap(function (v) {
8561
- return Object.values(v);
8562
- }).map(function (v) {
8563
- return [v.url, v];
8564
- }));
8565
- }, [images]);
8566
- }
8567
-
8568
8569
  function useGuideImages(userSuppliedImages) {
8569
8570
  return React.useMemo(function () {
8570
8571
  warnAboutImagesMissingDimensions(userSuppliedImages);
@@ -15168,12 +15169,21 @@ var resolveTheme = function resolveTheme(input) {
15168
15169
  if (input in themes) return themes[input];
15169
15170
  return themes.none;
15170
15171
  }
15172
+ if (input.base) {
15173
+ var baseTheme = themes[input.base];
15174
+ if (baseTheme) {
15175
+ return mergeDeep(baseTheme, input);
15176
+ }
15177
+ }
15171
15178
  return input;
15172
15179
  };
15173
15180
  var ThemeProvider = function ThemeProvider(_a) {
15174
15181
  var children = _a.children,
15175
15182
  themeInput = _a.theme;
15176
- var theme = resolveTheme(themeInput);
15183
+ var themeRef = React.useRef(themeInput);
15184
+ var theme = React.useMemo(function () {
15185
+ return resolveTheme(themeRef.current);
15186
+ }, []);
15177
15187
  var colors = theme.colors;
15178
15188
  React.useEffect(function () {
15179
15189
  for (var name_1 in colors) {
@@ -17713,6 +17723,7 @@ exports.IdValidation = IdValidation;
17713
17723
  exports.SignatureKYC = SignatureKYC;
17714
17724
  exports.VideoIdValidation = VideoIdValidation;
17715
17725
  exports.allowedAuthUrls = allowedAuthUrls;
17726
+ exports.isObject = isObject;
17716
17727
  exports.preloadModels = preloadModels;
17717
17728
  exports.renderCustomerBiometricsEnrollment = renderCustomerBiometricsEnrollment;
17718
17729
  exports.renderCustomerIdAndBiometricsEnrollment = renderCustomerIdAndBiometricsEnrollment;