idmission-web-sdk 2.3.32 → 2.3.33

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.
@@ -15,7 +15,7 @@ export type FlipIdPromptProps = {
15
15
  width?: number;
16
16
  height?: number;
17
17
  padding?: number;
18
- imagePadding?: number | string;
18
+ imagePadding?: number;
19
19
  borderWidth?: number | string;
20
20
  borderColor?: string;
21
21
  borderRadius?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"FlipIdPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/FlipIdPrompt.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAuB,MAAM,OAAO,CAAA;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,OAAO,EAGL,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,sBAAsB,GAAG;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,eAAe,CAAC,EAAE,wBAAwB,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sBAAsB,CAAC,E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,iBAAiB,KAAG,YA4EtB,CAAA"}
@@ -22,7 +22,7 @@ export type IdCaptureGuideOverlayProps = {
22
22
  classNames?: IdCaptureGuideOverlayClassNames;
23
23
  images?: IdCaptureGuideImages;
24
24
  padding?: number;
25
- imagePadding?: number | string;
25
+ imagePadding?: number;
26
26
  imageVisible?: boolean;
27
27
  borderWidth?: number;
28
28
  borderColor?: string;
@@ -64,5 +64,7 @@ export declare const GuideCenterBorder: import("styled-components/dist/types").I
64
64
  $padding?: number;
65
65
  }>> & string;
66
66
  export declare const GuideText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
67
- export declare const GuideCenterInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
67
+ export declare const GuideCenterInner: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
68
+ $isLandscape?: boolean;
69
+ }>> & string;
68
70
  //# sourceMappingURL=IdCaptureGuideOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EAIb,MAAM,OAAO,CAAA;AAOd,OAAO,EAGL,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAgB,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAGL,oBAAoB,EAGrB,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,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AAM,oBAAoB,GAC5B,eAAe,GACf,SAAS,GACT,cAAc,GACd,eAAe,CAAA;AAEnB,eAAO,MAAM,qBAAqB,2TAmB/B,0BAA0B,KAAG,YAwK/B,CAAA;AAkBD,eAAO,MAAM,eAAe,yMAK3B,CAAA;AAED,eAAO,MAAM,cAAc,yMAW1B,CAAA;AAED,eAAO,MAAM,WAAW;gBACV,MAAM;iBACL,MAAM;iBACN,MAAM;YAiBpB,CAAA;AAED,eAAO,MAAM,MAAM;gBArBL,MAAM;iBACL,MAAM;iBACN,MAAM;;;mBAsBpB,CAAA;AAED,eAAO,MAAM,iBAAiB;gBAChB,MAAM;kBACJ,OAAO;YAUtB,CAAA;AAED,eAAO,MAAM,iBAAiB;kBACd,MAAM;mBACL,MAAM;eACV,MAAM;YAYlB,CAAA;AAED,eAAO,MAAM,SAAS,2MAIrB,CAAA;AAED,eAAO,MAAM,gBAAgB,yMAG5B,CAAA"}
1
+ {"version":3,"file":"IdCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,YAAY,EAMb,MAAM,OAAO,CAAA;AAId,OAAO,EAGL,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAgB,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAGL,oBAAoB,EAErB,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,+BAA+B,GAAG;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,C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BACV,MAAM;iBACL,MAAM;iBACN,MAAM;YAiBpB,CAAA;AAED,eAAO,MAAM,MAAM;gBArBL,MAAM;iBACL,MAAM;iBACN,MAAM;;;mBAsBpB,CAAA;AAED,eAAO,MAAM,iBAAiB;gBAChB,MAAM;kBACJ,OAAO;YAUtB,CAAA;AAED,eAAO,MAAM,iBAAiB;kBACd,MAAM;mBACL,MAAM;eACV,MAAM;YAYlB,CAAA;AAED,eAAO,MAAM,SAAS,2MAIrB,CAAA;AAED,eAAO,MAAM,gBAAgB;mBAA+B,OAAO;YAOlE,CAAA"}
@@ -8,7 +8,7 @@ export declare const IdCardGuideImageContainer: import("styled-components/dist/t
8
8
  progress?: number;
9
9
  }, {
10
10
  $isVisible?: boolean;
11
- $aspectRatio?: string;
11
+ aspectRatio?: number | string;
12
12
  }>> & string & Omit<typeof IdCardBorder, keyof React.Component<any, {}, any>>;
13
13
  export declare const IdCardGuideImage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {
14
14
  $isMirrored?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureGuidesCommon.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuidesCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAM5D,eAAO,MAAM,yBAAyB;aAkC3B,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;;iBAtCJ,OAAO;mBACL,MAAM;6EAOtB,CAAA;AAED,eAAO,MAAM,gBAAgB;kBACb,OAAO;mBACN,OAAO;YAOvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CAAA;AAElE,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,MAAgB,EAChB,WAAgB,EAChB,YAAiB,EACjB,WAAqB,EACrB,WAAW,EACX,QAAY,EACZ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACxC,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,qBAoFA"}
1
+ {"version":3,"file":"IdCaptureGuidesCommon.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuidesCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAM5D,eAAO,MAAM,yBAAyB;aA+B3B,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;;iBAnCJ,OAAO;kBACN,MAAM,GAAG,MAAM;6EAK9B,CAAA;AAED,eAAO,MAAM,gBAAgB;kBACb,OAAO;mBACN,OAAO;YAMvB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CAAA;AAElE,iBAAS,YAAY,CAAC,EACpB,QAAQ,EACR,MAAgB,EAChB,WAAgB,EAChB,YAAiB,EACjB,WAAqB,EACrB,WAAe,EACf,QAAY,EACZ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACxC,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,qBA6FA"}
@@ -22,9 +22,9 @@ export declare const FlipImageContainer: import("styled-components/dist/types").
22
22
  borderColor?: string;
23
23
  aspectRatio?: number;
24
24
  progress?: number;
25
- }, "$isVisible" | "$aspectRatio"> & {
25
+ }, "aspectRatio" | "$isVisible"> & {
26
26
  $isVisible?: boolean;
27
- $aspectRatio?: string;
27
+ aspectRatio?: number | string;
28
28
  }, {
29
29
  $transforms: string;
30
30
  $transitionTime: number;
@@ -235,7 +235,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
235
235
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
236
236
  };
237
237
 
238
- var webSdkVersion = '2.3.32';
238
+ var webSdkVersion = '2.3.33';
239
239
 
240
240
  function getPlatform() {
241
241
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -7947,12 +7947,10 @@ function resetCanvasDimensions(canvas) {
7947
7947
  canvas.style.height = '0';
7948
7948
  }
7949
7949
 
7950
- var IdCardGuideImageContainer = styled__default.default(IdCardBorder)(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n aspect-ratio: ", ";\n display: flex;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n aspect-ratio: ", ";\n display: flex;\n"])), function (props) {
7950
+ var IdCardGuideImageContainer = styled__default.default(IdCardBorder)(templateObject_1$A || (templateObject_1$A = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
7951
7951
  return props.$isVisible ? '' : 'opacity: 0;';
7952
- }, function (props) {
7953
- return props.$aspectRatio;
7954
7952
  });
7955
- var IdCardGuideImage = styled__default.default.img(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n transform-style: preserve-3d;\n ", "\n ", "\n max-width: 100%;\n max-height: 100%;\n"], ["\n transform-style: preserve-3d;\n ", "\n ", "\n max-width: 100%;\n max-height: 100%;\n"])), function (props) {
7953
+ var IdCardGuideImage = styled__default.default.img(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"], ["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"])), function (props) {
7956
7954
  return props.$isMirrored ? 'transform: scaleX(-1);' : '';
7957
7955
  }, function (props) {
7958
7956
  return props.$isInvisible ? 'opacity: 0;' : '';
@@ -7968,19 +7966,20 @@ function IdCardBorder(_a) {
7968
7966
  borderRadius = _u === void 0 ? 25 : _u,
7969
7967
  _v = _a.borderColor,
7970
7968
  borderColor = _v === void 0 ? 'white' : _v,
7971
- aspectRatio = _a.aspectRatio,
7972
- _w = _a.progress,
7973
- progress = _w === void 0 ? 0 : _w,
7969
+ _w = _a.aspectRatio,
7970
+ aspectRatio = _w === void 0 ? 1 : _w,
7971
+ _x = _a.progress,
7972
+ progress = _x === void 0 ? 0 : _x,
7974
7973
  props = __rest(_a, ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress"]);
7975
- var _x = useResizeObserver(),
7976
- ref = _x.ref,
7977
- _y = _x.width,
7978
- width = _y === void 0 ? 0 : _y,
7979
- _z = _x.height,
7980
- height = _z === void 0 ? 0 : _z;
7981
- var _0 = React.useState(0),
7982
- progressResets = _0[0],
7983
- setProgressResets = _0[1];
7974
+ var _y = useResizeObserver(),
7975
+ ref = _y.ref,
7976
+ _z = _y.width,
7977
+ width = _z === void 0 ? 0 : _z,
7978
+ _0 = _y.height,
7979
+ height = _0 === void 0 ? 0 : _0;
7980
+ var _1 = React.useState(0),
7981
+ progressResets = _1[0],
7982
+ setProgressResets = _1[1];
7984
7983
  React.useEffect(function () {
7985
7984
  if (progress === 0 && status === 'capturing') {
7986
7985
  setProgressResets(function (n) {
@@ -7997,8 +7996,10 @@ function IdCardBorder(_a) {
7997
7996
  return /*#__PURE__*/React__namespace.default.createElement(IdCardBorderContainer, _assign({}, props), /*#__PURE__*/React__namespace.default.createElement("div", {
7998
7997
  ref: ref,
7999
7998
  style: {
8000
- aspectRatio: aspectRatio,
8001
- flex: 1
7999
+ maxHeight: '100%',
8000
+ maxWidth: '100%',
8001
+ display: 'flex',
8002
+ aspectRatio: aspectRatio
8002
8003
  }
8003
8004
  }, children), status === 'ready' && !wavesDisabled && ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(IdCardBorderSvg, {
8004
8005
  width: width,
@@ -8097,7 +8098,7 @@ function IdCardBorderSvg(_a) {
8097
8098
  className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
8098
8099
  }));
8099
8100
  }
8100
- var IdCardBorderContainer = styled__default.default.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
8101
+ var IdCardBorderContainer = styled__default.default.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n max-width: 100%;\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n max-width: 100%;\n & > .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(2) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(3) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
8101
8102
  var SvgOverlay = styled__default.default.svg(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
8102
8103
  var IdCardBorderRect = styled__default.default.rect(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
8103
8104
  var _a;
@@ -8429,46 +8430,58 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
8429
8430
  };
8430
8431
 
8431
8432
  var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8432
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
8433
- var _p = _a.classNames,
8434
- classNames = _p === void 0 ? {} : _p,
8435
- _q = _a.images,
8436
- userSuppliedImages = _q === void 0 ? defaultIdCaptureGuideImages : _q,
8433
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
8434
+ var _u = _a.classNames,
8435
+ classNames = _u === void 0 ? {} : _u,
8436
+ _v = _a.images,
8437
+ userSuppliedImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
8437
8438
  userSuppliedPadding = _a.padding,
8438
8439
  userSuppliedImagePadding = _a.imagePadding,
8439
- _r = _a.imageVisible,
8440
- imageVisible = _r === void 0 ? true : _r,
8440
+ _w = _a.imageVisible,
8441
+ imageVisible = _w === void 0 ? true : _w,
8441
8442
  borderWidth = _a.borderWidth,
8442
8443
  borderColor = _a.borderColor,
8443
- _s = _a.idCardBorderWidth,
8444
- idCardBorderWidth = _s === void 0 ? '2.5%' : _s,
8445
- _t = _a.idCardBorderColor,
8446
- idCardBorderColor = _t === void 0 ? 'white' : _t,
8444
+ _x = _a.idCardBorderWidth,
8445
+ idCardBorderWidth = _x === void 0 ? '2.5%' : _x,
8446
+ _y = _a.idCardBorderColor,
8447
+ idCardBorderColor = _y === void 0 ? 'white' : _y,
8447
8448
  maskColor = _a.maskColor,
8448
- _u = _a.isMirrored,
8449
- isMirrored = _u === void 0 ? false : _u,
8450
- _v = _a.isBackToFront,
8451
- isBackToFront = _v === void 0 ? false : _v,
8452
- _w = _a.portraitGuidesOnMobile,
8453
- portraitGuidesOnMobile = _w === void 0 ? true : _w,
8454
- _x = _a.instruction,
8455
- instruction = _x === void 0 ? '' : _x,
8456
- _y = _a.requestedAction,
8457
- requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
8458
- _z = _a.progress,
8459
- progress = _z === void 0 ? 0 : _z,
8460
- _0 = _a.status,
8461
- status = _0 === void 0 ? 'ready' : _0,
8449
+ _z = _a.isMirrored,
8450
+ isMirrored = _z === void 0 ? false : _z,
8451
+ _0 = _a.isBackToFront,
8452
+ isBackToFront = _0 === void 0 ? false : _0,
8453
+ _1 = _a.portraitGuidesOnMobile,
8454
+ portraitGuidesOnMobile = _1 === void 0 ? true : _1,
8455
+ _2 = _a.instruction,
8456
+ instruction = _2 === void 0 ? '' : _2,
8457
+ _3 = _a.requestedAction,
8458
+ requestedAction = _3 === void 0 ? 'SHOW_ID_FRONT' : _3,
8459
+ _4 = _a.progress,
8460
+ progress = _4 === void 0 ? 0 : _4,
8461
+ _5 = _a.status,
8462
+ status = _5 === void 0 ? 'ready' : _5,
8462
8463
  onClick = _a.onClick;
8463
- var _1 = useGuideOrientationContext(),
8464
- wrapperRef = _1.wrapperRef,
8465
- wrapperWidth = _1.wrapperWidth,
8466
- wrapperHeight = _1.wrapperHeight,
8467
- imageAspectRatio = _1.imageAspectRatio,
8468
- wrapperAspectRatio = _1.wrapperAspectRatio,
8469
- guideOrientationOnImageLoaded = _1.onImageLoaded,
8470
- setDimensions = _1.setDimensions;
8471
- var state = useIdCaptureStore();
8464
+ var _6 = useGuideOrientationContext(),
8465
+ wrapperRef = _6.wrapperRef,
8466
+ wrapperWidth = _6.wrapperWidth,
8467
+ wrapperHeight = _6.wrapperHeight,
8468
+ imageAspectRatio = _6.imageAspectRatio,
8469
+ wrapperAspectRatio = _6.wrapperAspectRatio,
8470
+ guideOrientationOnImageLoaded = _6.onImageLoaded,
8471
+ setDimensions = _6.setDimensions;
8472
+ var containerRef = React.useRef(null);
8473
+ var _7 = React.useState({
8474
+ width: 0,
8475
+ height: 0
8476
+ }),
8477
+ imageDimensions = _7[0],
8478
+ setImageDimensions = _7[1];
8479
+ var _8 = React.useState({
8480
+ width: 0,
8481
+ height: 0
8482
+ }),
8483
+ containerDimensions = _8[0],
8484
+ setContainerDimensions = _8[1];
8472
8485
  var theme = styled.useTheme();
8473
8486
  if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
8474
8487
  React.useEffect(function () {
@@ -8480,34 +8493,32 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8480
8493
  var padding = userSuppliedPadding !== null && userSuppliedPadding !== void 0 ? userSuppliedPadding : isMobile() ? (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.mobilePadding) !== null && _g !== void 0 ? _g : 0 : (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.desktopPadding) !== null && _k !== void 0 ? _k : 50;
8481
8494
  var paddingAndBorderPx = padding * 2 + (borderWidth !== null && borderWidth !== void 0 ? borderWidth : 0) * 2;
8482
8495
  var images = useImagesWithBackToFront(userSuppliedImages, isBackToFront);
8483
- var imagesByUrl = useGuideImagesByUrl(images);
8484
8496
  var orientation = getOrientation(portraitGuidesOnMobile);
8485
8497
  var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
8486
- var imagePadding = (_o = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.imagePadding) !== null && _o !== void 0 ? _o : '0 50px';
8487
- if (typeof imagePadding === 'number') {
8488
- imagePadding = "".concat(imagePadding, "px");
8489
- }
8490
- var paddingForMath = imagePadding.replace(/[^0-9\s]/g, '').split(' ').map(Number);
8491
- var paddingForMathMax = Math.max.apply(Math, paddingForMath);
8492
- var imageWidth = state.guideRectWidth - paddingForMathMax * 2;
8493
- var imageHeight = state.guideRectHeight - paddingForMathMax * 2;
8498
+ var imagePadding = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : isMobile() ? (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.mobileImagePadding) !== null && _o !== void 0 ? _o : 0 : (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.imagePadding) !== null && _r !== void 0 ? _r : 50;
8494
8499
  var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
8495
- var cardAspectRatio = imageAspectRatio > 1 ? '1.6' : '0.625';
8496
8500
  var onImageLoaded = React.useCallback(function (e) {
8497
- var _a, _b;
8498
8501
  guideOrientationOnImageLoaded(e);
8499
- var img = e.currentTarget;
8500
- var imageByUrl = imagesByUrl[img.src];
8501
- var width = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth;
8502
- var height = (_b = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _b !== void 0 ? _b : img.naturalHeight;
8503
- dispatchIdCaptureAction({
8504
- type: 'guideImageLoaded',
8505
- payload: {
8506
- width: width,
8507
- height: height
8508
- }
8502
+ setImageDimensions({
8503
+ width: (currentImage === null || currentImage === void 0 ? void 0 : currentImage.width) || imageDimensions.width,
8504
+ height: (currentImage === null || currentImage === void 0 ? void 0 : currentImage.height) || imageDimensions.height
8509
8505
  });
8510
- }, [guideOrientationOnImageLoaded, imagesByUrl]);
8506
+ }, [guideOrientationOnImageLoaded, currentImage, imageDimensions.height, imageDimensions.width]);
8507
+ React.useEffect(function () {
8508
+ if (containerRef.current && containerRef.current.clientWidth && containerRef.current.clientHeight) {
8509
+ setContainerDimensions({
8510
+ width: containerRef.current.clientWidth,
8511
+ height: containerRef.current.clientHeight
8512
+ });
8513
+ dispatchIdCaptureAction({
8514
+ type: 'guideImageLoaded',
8515
+ payload: {
8516
+ width: imageDimensions.width,
8517
+ height: imageDimensions.height
8518
+ }
8519
+ });
8520
+ }
8521
+ }, [setDimensions, setContainerDimensions, imageDimensions.height, imageDimensions.width]);
8511
8522
  return /*#__PURE__*/React__namespace.default.createElement(StyledPageContainer, {
8512
8523
  ref: wrapperRef,
8513
8524
  onClick: onClick,
@@ -8536,14 +8547,19 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8536
8547
  "$padding": imagePadding,
8537
8548
  className: classNames.centerRegionBorder
8538
8549
  }, /*#__PURE__*/React__namespace.default.createElement(GuideCenterInner, {
8539
- className: classNames.centerRegionInner
8550
+ "$isLandscape": orientation === 'landscape',
8551
+ ref: containerRef,
8552
+ className: classNames.centerRegionInner,
8553
+ style: {
8554
+ aspectRatio: imageDimensions.width && imageDimensions.height ? imageDimensions.width / imageDimensions.height : 1
8555
+ }
8540
8556
  }, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImageContainer, {
8541
8557
  status: status,
8542
8558
  progress: progress,
8543
8559
  borderWidth: idCardBorderWidth,
8544
8560
  borderColor: idCardBorderColor,
8545
8561
  "$isVisible": requestedAction !== 'FLIP_ID',
8546
- "$aspectRatio": cardAspectRatio
8562
+ aspectRatio: imageDimensions.width && imageDimensions.height ? imageDimensions.width / imageDimensions.height : 1
8547
8563
  }, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
8548
8564
  alt: "",
8549
8565
  src: currentImage.url,
@@ -8551,8 +8567,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8551
8567
  className: classNames.image,
8552
8568
  "$isInvisible": !imageVisible,
8553
8569
  "$isMirrored": isMirrored,
8554
- width: imageWidth,
8555
- height: imageHeight
8570
+ width: containerDimensions.width ? containerDimensions.width : imageDimensions.width,
8571
+ height: containerDimensions.height ? containerDimensions.height : imageDimensions.height
8556
8572
  })), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__namespace.default.createElement(FlipIdPrompt, {
8557
8573
  images: images,
8558
8574
  borderWidth: idCardBorderWidth,
@@ -8560,8 +8576,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
8560
8576
  portraitGuidesOnMobile: portraitGuidesOnMobile,
8561
8577
  isMirrored: isMirrored,
8562
8578
  classNames: classNames.flipIdPrompt,
8563
- width: imageWidth,
8564
- height: imageHeight
8579
+ width: (_s = currentImage === null || currentImage === void 0 ? void 0 : currentImage.width) !== null && _s !== void 0 ? _s : imageDimensions.width,
8580
+ height: (_t = currentImage === null || currentImage === void 0 ? void 0 : currentImage.width) !== null && _t !== void 0 ? _t : imageDimensions.height
8565
8581
  }))))), /*#__PURE__*/React__namespace.default.createElement(Spacer, {
8566
8582
  "$maskColor": maskColor,
8567
8583
  "$minWidth": padding,
@@ -8605,10 +8621,12 @@ var GuideCenterBorder = styled__default.default.div(templateObject_7$4 || (templ
8605
8621
  var _a, _b;
8606
8622
  return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
8607
8623
  }, function (props) {
8608
- return props.$padding ? "padding: ".concat(props.$padding, ";") : '';
8624
+ return props.$padding ? "padding: ".concat(props.$padding, "px;") : '';
8609
8625
  });
8610
8626
  var GuideText = styled__default.default.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
8611
- var GuideCenterInner = styled__default.default.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
8627
+ var GuideCenterInner = styled__default.default.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n"], ["\n position: relative;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n"])), function (props) {
8628
+ return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
8629
+ });
8612
8630
  var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$6, templateObject_7$4, templateObject_8$2, templateObject_9$2;
8613
8631
 
8614
8632
  var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
@@ -15741,7 +15759,8 @@ var defaultTheme = {
15741
15759
  borderWidth: 4,
15742
15760
  desktopPadding: 50,
15743
15761
  mobilePadding: 0,
15744
- imagePadding: '0 50px',
15762
+ imagePadding: 50,
15763
+ mobileImagePadding: 0,
15745
15764
  wavesDisabled: false,
15746
15765
  wavesColor: '#287ec6',
15747
15766
  progressBarColor: 'white',