idmission-web-sdk 2.3.33 → 2.3.35
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/dist/components/GuideOrientationContextProvider.d.ts +2 -6
- package/dist/components/GuideOrientationContextProvider.d.ts.map +1 -1
- package/dist/components/id_capture/FlipIdPrompt.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuidesCommon.d.ts +3 -1
- package/dist/components/id_capture/IdCaptureGuidesCommon.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +1 -0
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +79 -115
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +79 -115
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +79 -115
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import React, { ReactElement, ReactNode, RefCallback
|
|
1
|
+
import React, { ReactElement, ReactNode, RefCallback } from 'react';
|
|
2
2
|
export type GuideOrientationState = {
|
|
3
3
|
orientation: 'portrait' | 'landscape';
|
|
4
4
|
wrapperWidth: number;
|
|
5
5
|
wrapperHeight: number;
|
|
6
6
|
wrapperAspectRatio: number;
|
|
7
7
|
imageAspectRatio: number;
|
|
8
|
+
setImageAspectRatio: (n: number) => void;
|
|
8
9
|
wrapperRef: RefCallback<HTMLDivElement>;
|
|
9
|
-
setDimensions: (dimensions: {
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
}) => void;
|
|
13
|
-
onImageLoaded: (e: SyntheticEvent) => void;
|
|
14
10
|
};
|
|
15
11
|
export declare const GuideOrientationContext: React.Context<GuideOrientationState>;
|
|
16
12
|
export default function GuideOrientationContextProvider({ children, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuideOrientationContextProvider.d.ts","sourceRoot":"","sources":["../../src/components/GuideOrientationContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,YAAY,EACZ,SAAS,EACT,WAAW,
|
|
1
|
+
{"version":3,"file":"GuideOrientationContextProvider.d.ts","sourceRoot":"","sources":["../../src/components/GuideOrientationContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEZ,YAAY,EACZ,SAAS,EACT,WAAW,EAIZ,MAAM,OAAO,CAAA;AAGd,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,UAAU,GAAG,WAAW,CAAA;IACrC,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,UAAU,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;CACxC,CAAA;AAED,eAAO,MAAM,uBAAuB,sCAQlC,CAAA;AAEF,MAAM,CAAC,OAAO,UAAU,+BAA+B,CAAC,EACtD,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;CACpB,GAAG,YAAY,CAsCf;AAED,wBAAgB,0BAA0B,IAAI,qBAAqB,CAOlE"}
|
|
@@ -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;
|
|
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;AAG5D,OAAO,EAGL,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAGxB,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,CAAA;IACrB,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,EAAE,OAAO,CAAA;IAChC,UAAU,CAAC,EAAE,sBAAsB,CAAA;IACnC,QAAQ,CAAC,EAAE,oBAAoB,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,YAAY,uHAUtB,iBAAiB,KAAG,YA4EtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"IdCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAa,MAAM,OAAO,CAAA;AAItD,OAAO,EAGL,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAgB,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAGL,oBAAoB,EAErB,MAAM,iBAAiB,CAAA;AAGxB,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,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,sBAAsB,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,CAAC,EAAE,+BAA+B,CAAA;IAC5C,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,CAAA;IACnC,eAAe,CAAC,EAAE,oBAAoB,CAAA;IACtC,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAC5B,eAAe,GACf,SAAS,GACT,cAAc,GACd,eAAe,CAAA;AAEnB,eAAO,MAAM,qBAAqB,2TAmB/B,0BAA0B,KAAG,YAyJ/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;YAalB,CAAA;AAED,eAAO,MAAM,SAAS,2MAIrB,CAAA;AAED,eAAO,MAAM,gBAAgB;mBAA+B,OAAO;YASlE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
export declare const IdCardGuideImageContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
status?: IdCardGuideStatus;
|
|
4
4
|
borderWidth?: number | string;
|
|
@@ -6,6 +6,7 @@ export declare const IdCardGuideImageContainer: import("styled-components/dist/t
|
|
|
6
6
|
borderColor?: string;
|
|
7
7
|
aspectRatio?: number;
|
|
8
8
|
progress?: number;
|
|
9
|
+
style?: CSSProperties;
|
|
9
10
|
}, {
|
|
10
11
|
$isVisible?: boolean;
|
|
11
12
|
aspectRatio?: number | string;
|
|
@@ -22,6 +23,7 @@ declare function IdCardBorder({ children, status, borderWidth, borderRadius, bor
|
|
|
22
23
|
borderColor?: string;
|
|
23
24
|
aspectRatio?: number;
|
|
24
25
|
progress?: number;
|
|
26
|
+
style?: CSSProperties;
|
|
25
27
|
}): React.JSX.Element;
|
|
26
28
|
export {};
|
|
27
29
|
//# sourceMappingURL=IdCaptureGuidesCommon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdCaptureGuidesCommon.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuidesCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"IdCaptureGuidesCommon.d.ts","sourceRoot":"","sources":["../../../src/components/id_capture/IdCaptureGuidesCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAiC,MAAM,OAAO,CAAA;AAM3E,eAAO,MAAM,yBAAyB;aA+B3B,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;YACT,aAAa;;iBApCR,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;IACjB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,qBAoFA"}
|
|
@@ -22,6 +22,7 @@ export declare const FlipImageContainer: import("styled-components/dist/types").
|
|
|
22
22
|
borderColor?: string;
|
|
23
23
|
aspectRatio?: number;
|
|
24
24
|
progress?: number;
|
|
25
|
+
style?: CSSProperties;
|
|
25
26
|
}, "aspectRatio" | "$isVisible"> & {
|
|
26
27
|
$isVisible?: boolean;
|
|
27
28
|
aspectRatio?: number | string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdVideoCaptureFlipIdPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/video_id/IdVideoCaptureFlipIdPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,YAAY,EAAuB,MAAM,OAAO,CAAA;AAM/E,OAAO,EAEL,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAGxB,MAAM,MAAM,oCAAoC,GAAG;IACjD,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,+BAA+B,GAAG;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,UAAU,CAAC,EAAE,oCAAoC,CAAA;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,aAAa,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,0BAA0B,8FAOpC,+BAA+B,KAAG,YAwEpC,CAAA;AAED,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"IdVideoCaptureFlipIdPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/video_id/IdVideoCaptureFlipIdPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,YAAY,EAAuB,MAAM,OAAO,CAAA;AAM/E,OAAO,EAEL,oBAAoB,EACrB,MAAM,iBAAiB,CAAA;AAGxB,MAAM,MAAM,oCAAoC,GAAG;IACjD,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,+BAA+B,GAAG;IAC5C,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,UAAU,CAAC,EAAE,oCAAoC,CAAA;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,aAAa,CAAA;CAC3B,CAAA;AAED,eAAO,MAAM,0BAA0B,8FAOpC,+BAA+B,KAAG,YAwEpC,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;iBAChB,MAAM;qBACF,MAAM;YAWxB,CAAA"}
|
|
@@ -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.
|
|
238
|
+
var webSdkVersion = '2.3.35';
|
|
239
239
|
|
|
240
240
|
function getPlatform() {
|
|
241
241
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -506,7 +506,7 @@ var OverlayInner$2 = styled__default.default.div(templateObject_2$D || (template
|
|
|
506
506
|
var OverlayImageContainer = styled__default.default.div(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
|
|
507
507
|
var OverlayImageRow = styled__default.default.div(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
|
|
508
508
|
var GrayOverlayContainer = styled__default.default(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
509
|
-
var ButtonsColumn = styled__default.default.div(templateObject_6$
|
|
509
|
+
var ButtonsColumn = styled__default.default.div(templateObject_6$a || (templateObject_6$a = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
510
510
|
var WideButton = styled__default.default(LoaderButton)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n width: 100%;\n border-radius: 30px;\n"], ["\n width: 100%;\n border-radius: 30px;\n"])));
|
|
511
511
|
var WideBorderButton = styled__default.default(WideButton)(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
512
512
|
var _a, _b;
|
|
@@ -545,7 +545,7 @@ var LoadingOverlayLoadingListItem = styled__default.default.li(templateObject_19
|
|
|
545
545
|
var LoadingOverlayProgressContainer = styled__default.default.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
546
546
|
var LoadingOverlayCustomLoadingGraphic = styled__default.default.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
547
547
|
var LoadingOverlayContinueButtonContainer = styled__default.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
548
|
-
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$
|
|
548
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$6, templateObject_8$4, templateObject_9$3, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
|
|
549
549
|
|
|
550
550
|
var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
|
|
551
551
|
var accessBlockedImageUrl = _a.accessBlockedImageUrl;
|
|
@@ -7613,7 +7613,7 @@ var ButtonsRow$1 = styled__default.default(LoadingOverlayButtonsRow)(templateObj
|
|
|
7613
7613
|
var _a, _b, _c, _d, _e, _f;
|
|
7614
7614
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
7615
7615
|
});
|
|
7616
|
-
var ProgressBarBackground$1 = styled__default.default(LoadingOverlayProgressBarBackground)(templateObject_6$
|
|
7616
|
+
var ProgressBarBackground$1 = styled__default.default(LoadingOverlayProgressBarBackground)(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
|
|
7617
7617
|
var _a, _b, _c, _d;
|
|
7618
7618
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
7619
7619
|
}, function (props) {
|
|
@@ -7643,7 +7643,7 @@ var ContinueButton$1 = styled__default.default(LoaderButton)(templateObject_8$3
|
|
|
7643
7643
|
var _a, _b, _c, _d;
|
|
7644
7644
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
7645
7645
|
});
|
|
7646
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$
|
|
7646
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$5, templateObject_8$3;
|
|
7647
7647
|
|
|
7648
7648
|
var ContinuityCameraCheckboxContainer = styled__default.default.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
7649
7649
|
var ContinuityCameraCheckbox = styled__default.default.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -7894,8 +7894,8 @@ var ImagesContainer = styled__default.default(OverlayImageContainer)(templateObj
|
|
|
7894
7894
|
var ImageRow = styled__default.default(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"], ["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"])));
|
|
7895
7895
|
var ImageCol$1 = styled__default.default.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"], ["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"])));
|
|
7896
7896
|
var StyledImage = styled__default.default(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
7897
|
-
var DebugPre = styled__default.default.pre(templateObject_6$
|
|
7898
|
-
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$
|
|
7897
|
+
var DebugPre = styled__default.default.pre(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
|
|
7898
|
+
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$8;
|
|
7899
7899
|
|
|
7900
7900
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
7901
7901
|
var _this = this;
|
|
@@ -7993,12 +7993,13 @@ function IdCardBorder(_a) {
|
|
|
7993
7993
|
var progressBarColor = (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.progressBarColor) !== null && _k !== void 0 ? _k : borderColor;
|
|
7994
7994
|
var progressBarIndicatorColor = (_o = (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.progressBarIndicatorColor) !== null && _o !== void 0 ? _o : '#287ec6';
|
|
7995
7995
|
var progressBarWidth = (_r = (_q = (_p = theme.idCapture) === null || _p === void 0 ? void 0 : _p.guideBox) === null || _q === void 0 ? void 0 : _q.progressBarWidth) !== null && _r !== void 0 ? _r : borderWidth;
|
|
7996
|
-
return /*#__PURE__*/React__namespace.default.createElement(IdCardBorderContainer, _assign({}, props
|
|
7996
|
+
return /*#__PURE__*/React__namespace.default.createElement(IdCardBorderContainer, _assign({}, props, {
|
|
7997
|
+
style: _assign(_assign({}, props.style), {
|
|
7998
|
+
aspectRatio: aspectRatio
|
|
7999
|
+
})
|
|
8000
|
+
}), /*#__PURE__*/React__namespace.default.createElement(IdCardBorderInner, {
|
|
7997
8001
|
ref: ref,
|
|
7998
8002
|
style: {
|
|
7999
|
-
maxHeight: '100%',
|
|
8000
|
-
maxWidth: '100%',
|
|
8001
|
-
display: 'flex',
|
|
8002
8003
|
aspectRatio: aspectRatio
|
|
8003
8004
|
}
|
|
8004
8005
|
}, children), status === 'ready' && !wavesDisabled && ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(IdCardBorderSvg, {
|
|
@@ -8098,16 +8099,17 @@ function IdCardBorderSvg(_a) {
|
|
|
8098
8099
|
className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
|
|
8099
8100
|
}));
|
|
8100
8101
|
}
|
|
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);
|
|
8102
|
-
var
|
|
8103
|
-
var
|
|
8102
|
+
var IdCardBorderContainer = styled__default.default.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\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"], ["\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\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);
|
|
8103
|
+
var IdCardBorderInner = styled__default.default.div(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
8104
|
+
var SvgOverlay = styled__default.default.svg(templateObject_5$a || (templateObject_5$a = __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"])));
|
|
8105
|
+
var IdCardBorderRect = styled__default.default.rect(templateObject_6$7 || (templateObject_6$7 = __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) {
|
|
8104
8106
|
var _a;
|
|
8105
8107
|
return (_a = props.$speed) !== null && _a !== void 0 ? _a : '3s';
|
|
8106
8108
|
}, function (props) {
|
|
8107
8109
|
var _a;
|
|
8108
8110
|
return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
|
|
8109
8111
|
});
|
|
8110
|
-
var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a;
|
|
8112
|
+
var templateObject_1$A, templateObject_2$t, templateObject_3$k, templateObject_4$e, templateObject_5$a, templateObject_6$7;
|
|
8111
8113
|
|
|
8112
8114
|
var defaultIdCaptureGuideImages = {
|
|
8113
8115
|
portrait: {
|
|
@@ -8297,19 +8299,12 @@ var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
|
8297
8299
|
wrapperAspectRatio: 0,
|
|
8298
8300
|
imageAspectRatio: 0,
|
|
8299
8301
|
wrapperRef: null,
|
|
8300
|
-
|
|
8301
|
-
return null;
|
|
8302
|
-
},
|
|
8303
|
-
onImageLoaded: function onImageLoaded() {
|
|
8302
|
+
setImageAspectRatio: function setImageAspectRatio() {
|
|
8304
8303
|
return null;
|
|
8305
8304
|
}
|
|
8306
8305
|
});
|
|
8307
8306
|
function GuideOrientationContextProvider(_a) {
|
|
8308
8307
|
var children = _a.children;
|
|
8309
|
-
var setDimensions = React.useState({
|
|
8310
|
-
width: 1,
|
|
8311
|
-
height: 1
|
|
8312
|
-
})[1];
|
|
8313
8308
|
var _b = React.useState(1),
|
|
8314
8309
|
imageAspectRatio = _b[0],
|
|
8315
8310
|
setImageAspectRatio = _b[1];
|
|
@@ -8322,10 +8317,6 @@ function GuideOrientationContextProvider(_a) {
|
|
|
8322
8317
|
var wrapperAspectRatio = React.useMemo(function () {
|
|
8323
8318
|
return wrapperWidth / wrapperHeight;
|
|
8324
8319
|
}, [wrapperHeight, wrapperWidth]);
|
|
8325
|
-
var onImageLoaded = React.useCallback(function (e) {
|
|
8326
|
-
var img = e.target;
|
|
8327
|
-
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
8328
|
-
}, []);
|
|
8329
8320
|
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
8330
8321
|
var value = React.useMemo(function () {
|
|
8331
8322
|
return {
|
|
@@ -8334,11 +8325,10 @@ function GuideOrientationContextProvider(_a) {
|
|
|
8334
8325
|
wrapperHeight: wrapperHeight,
|
|
8335
8326
|
wrapperAspectRatio: wrapperAspectRatio,
|
|
8336
8327
|
imageAspectRatio: imageAspectRatio,
|
|
8337
|
-
|
|
8338
|
-
wrapperRef: wrapperRef
|
|
8339
|
-
onImageLoaded: onImageLoaded
|
|
8328
|
+
setImageAspectRatio: setImageAspectRatio,
|
|
8329
|
+
wrapperRef: wrapperRef
|
|
8340
8330
|
};
|
|
8341
|
-
}, [imageAspectRatio,
|
|
8331
|
+
}, [imageAspectRatio, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
|
|
8342
8332
|
return /*#__PURE__*/React__namespace.default.createElement(GuideOrientationContext.Provider, {
|
|
8343
8333
|
value: value
|
|
8344
8334
|
}, children);
|
|
@@ -8366,7 +8356,7 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8366
8356
|
portraitGuidesOnMobile = _g === void 0 ? true : _g,
|
|
8367
8357
|
_h = _a.classNames,
|
|
8368
8358
|
classNames = _h === void 0 ? {} : _h;
|
|
8369
|
-
var
|
|
8359
|
+
var imageAspectRatio = useGuideOrientationContext().imageAspectRatio;
|
|
8370
8360
|
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
8371
8361
|
var _j = React.useState(1),
|
|
8372
8362
|
transitionTime = _j[0],
|
|
@@ -8403,12 +8393,12 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8403
8393
|
borderRadius: borderRadius,
|
|
8404
8394
|
"$transforms": frontTransforms.join(' '),
|
|
8405
8395
|
"$transitionTime": transitionTime,
|
|
8396
|
+
aspectRatio: imageAspectRatio,
|
|
8406
8397
|
"$isVisible": true
|
|
8407
8398
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8408
8399
|
alt: "",
|
|
8409
8400
|
src: images[orientation].SHOW_ID_FRONT.url,
|
|
8410
8401
|
className: classNames.frontImage,
|
|
8411
|
-
onLoad: onImageLoaded,
|
|
8412
8402
|
width: width,
|
|
8413
8403
|
height: height
|
|
8414
8404
|
})), /*#__PURE__*/React__namespace.default.createElement(FlipImageContainer, {
|
|
@@ -8419,6 +8409,7 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8419
8409
|
borderRadius: borderRadius,
|
|
8420
8410
|
"$transforms": backTransforms.join(' '),
|
|
8421
8411
|
"$transitionTime": transitionTime,
|
|
8412
|
+
aspectRatio: imageAspectRatio,
|
|
8422
8413
|
"$isVisible": true
|
|
8423
8414
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8424
8415
|
alt: "",
|
|
@@ -8430,66 +8421,49 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8430
8421
|
};
|
|
8431
8422
|
|
|
8432
8423
|
var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
8433
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r
|
|
8434
|
-
var
|
|
8435
|
-
classNames =
|
|
8436
|
-
|
|
8437
|
-
userSuppliedImages =
|
|
8424
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
8425
|
+
var _s = _a.classNames,
|
|
8426
|
+
classNames = _s === void 0 ? {} : _s,
|
|
8427
|
+
_t = _a.images,
|
|
8428
|
+
userSuppliedImages = _t === void 0 ? defaultIdCaptureGuideImages : _t,
|
|
8438
8429
|
userSuppliedPadding = _a.padding,
|
|
8439
8430
|
userSuppliedImagePadding = _a.imagePadding,
|
|
8440
|
-
|
|
8441
|
-
imageVisible =
|
|
8431
|
+
_u = _a.imageVisible,
|
|
8432
|
+
imageVisible = _u === void 0 ? true : _u,
|
|
8442
8433
|
borderWidth = _a.borderWidth,
|
|
8443
8434
|
borderColor = _a.borderColor,
|
|
8444
|
-
|
|
8445
|
-
idCardBorderWidth =
|
|
8446
|
-
|
|
8447
|
-
idCardBorderColor =
|
|
8435
|
+
_v = _a.idCardBorderWidth,
|
|
8436
|
+
idCardBorderWidth = _v === void 0 ? '2.5%' : _v,
|
|
8437
|
+
_w = _a.idCardBorderColor,
|
|
8438
|
+
idCardBorderColor = _w === void 0 ? 'white' : _w,
|
|
8448
8439
|
maskColor = _a.maskColor,
|
|
8449
|
-
|
|
8450
|
-
isMirrored =
|
|
8451
|
-
|
|
8452
|
-
isBackToFront =
|
|
8453
|
-
|
|
8454
|
-
portraitGuidesOnMobile =
|
|
8455
|
-
|
|
8456
|
-
instruction =
|
|
8457
|
-
|
|
8458
|
-
requestedAction =
|
|
8459
|
-
|
|
8460
|
-
progress =
|
|
8461
|
-
|
|
8462
|
-
status =
|
|
8440
|
+
_x = _a.isMirrored,
|
|
8441
|
+
isMirrored = _x === void 0 ? false : _x,
|
|
8442
|
+
_y = _a.isBackToFront,
|
|
8443
|
+
isBackToFront = _y === void 0 ? false : _y,
|
|
8444
|
+
_z = _a.portraitGuidesOnMobile,
|
|
8445
|
+
portraitGuidesOnMobile = _z === void 0 ? true : _z,
|
|
8446
|
+
_0 = _a.instruction,
|
|
8447
|
+
instruction = _0 === void 0 ? '' : _0,
|
|
8448
|
+
_1 = _a.requestedAction,
|
|
8449
|
+
requestedAction = _1 === void 0 ? 'SHOW_ID_FRONT' : _1,
|
|
8450
|
+
_2 = _a.progress,
|
|
8451
|
+
progress = _2 === void 0 ? 0 : _2,
|
|
8452
|
+
_3 = _a.status,
|
|
8453
|
+
status = _3 === void 0 ? 'ready' : _3,
|
|
8463
8454
|
onClick = _a.onClick;
|
|
8464
|
-
var
|
|
8465
|
-
wrapperRef =
|
|
8466
|
-
wrapperWidth =
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
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];
|
|
8455
|
+
var _4 = useGuideOrientationContext(),
|
|
8456
|
+
wrapperRef = _4.wrapperRef,
|
|
8457
|
+
wrapperWidth = _4.wrapperWidth,
|
|
8458
|
+
imageAspectRatio = _4.imageAspectRatio,
|
|
8459
|
+
wrapperAspectRatio = _4.wrapperAspectRatio,
|
|
8460
|
+
setImageAspectRatio = _4.setImageAspectRatio;
|
|
8461
|
+
var _5 = useResizeObserver(),
|
|
8462
|
+
innerRef = _5.ref,
|
|
8463
|
+
innerWidth = _5.width,
|
|
8464
|
+
innerHeight = _5.height;
|
|
8485
8465
|
var theme = styled.useTheme();
|
|
8486
8466
|
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;
|
|
8487
|
-
React.useEffect(function () {
|
|
8488
|
-
setDimensions({
|
|
8489
|
-
width: wrapperWidth,
|
|
8490
|
-
height: wrapperHeight
|
|
8491
|
-
});
|
|
8492
|
-
}, [setDimensions, wrapperHeight, wrapperWidth]);
|
|
8493
8467
|
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;
|
|
8494
8468
|
var paddingAndBorderPx = padding * 2 + (borderWidth !== null && borderWidth !== void 0 ? borderWidth : 0) * 2;
|
|
8495
8469
|
var images = useImagesWithBackToFront(userSuppliedImages, isBackToFront);
|
|
@@ -8497,28 +8471,18 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8497
8471
|
var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
|
|
8498
8472
|
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;
|
|
8499
8473
|
var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
|
|
8500
|
-
var onImageLoaded = React.useCallback(function (e) {
|
|
8501
|
-
guideOrientationOnImageLoaded(e);
|
|
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
|
|
8505
|
-
});
|
|
8506
|
-
}, [guideOrientationOnImageLoaded, currentImage, imageDimensions.height, imageDimensions.width]);
|
|
8507
8474
|
React.useEffect(function () {
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
});
|
|
8520
|
-
}
|
|
8521
|
-
}, [setDimensions, setContainerDimensions, imageDimensions.height, imageDimensions.width]);
|
|
8475
|
+
setImageAspectRatio(currentImage.width / currentImage.height);
|
|
8476
|
+
}, [currentImage.height, currentImage.width, setImageAspectRatio]);
|
|
8477
|
+
function onImageLoaded() {
|
|
8478
|
+
dispatchIdCaptureAction({
|
|
8479
|
+
type: 'guideImageLoaded',
|
|
8480
|
+
payload: {
|
|
8481
|
+
width: currentImage.width,
|
|
8482
|
+
height: currentImage.height
|
|
8483
|
+
}
|
|
8484
|
+
});
|
|
8485
|
+
}
|
|
8522
8486
|
return /*#__PURE__*/React__namespace.default.createElement(StyledPageContainer, {
|
|
8523
8487
|
ref: wrapperRef,
|
|
8524
8488
|
onClick: onClick,
|
|
@@ -8548,10 +8512,10 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8548
8512
|
className: classNames.centerRegionBorder
|
|
8549
8513
|
}, /*#__PURE__*/React__namespace.default.createElement(GuideCenterInner, {
|
|
8550
8514
|
"$isLandscape": orientation === 'landscape',
|
|
8551
|
-
ref:
|
|
8515
|
+
ref: innerRef,
|
|
8552
8516
|
className: classNames.centerRegionInner,
|
|
8553
8517
|
style: {
|
|
8554
|
-
aspectRatio:
|
|
8518
|
+
aspectRatio: imageAspectRatio
|
|
8555
8519
|
}
|
|
8556
8520
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImageContainer, {
|
|
8557
8521
|
status: status,
|
|
@@ -8559,7 +8523,7 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8559
8523
|
borderWidth: idCardBorderWidth,
|
|
8560
8524
|
borderColor: idCardBorderColor,
|
|
8561
8525
|
"$isVisible": requestedAction !== 'FLIP_ID',
|
|
8562
|
-
aspectRatio:
|
|
8526
|
+
aspectRatio: imageAspectRatio
|
|
8563
8527
|
}, /*#__PURE__*/React__namespace.default.createElement(IdCardGuideImage, {
|
|
8564
8528
|
alt: "",
|
|
8565
8529
|
src: currentImage.url,
|
|
@@ -8567,8 +8531,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8567
8531
|
className: classNames.image,
|
|
8568
8532
|
"$isInvisible": !imageVisible,
|
|
8569
8533
|
"$isMirrored": isMirrored,
|
|
8570
|
-
width:
|
|
8571
|
-
height:
|
|
8534
|
+
width: innerWidth || currentImage.width,
|
|
8535
|
+
height: innerHeight || currentImage.height
|
|
8572
8536
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__namespace.default.createElement(FlipIdPrompt, {
|
|
8573
8537
|
images: images,
|
|
8574
8538
|
borderWidth: idCardBorderWidth,
|
|
@@ -8576,8 +8540,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8576
8540
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
8577
8541
|
isMirrored: isMirrored,
|
|
8578
8542
|
classNames: classNames.flipIdPrompt,
|
|
8579
|
-
width:
|
|
8580
|
-
height:
|
|
8543
|
+
width: innerWidth,
|
|
8544
|
+
height: innerHeight
|
|
8581
8545
|
}))))), /*#__PURE__*/React__namespace.default.createElement(Spacer, {
|
|
8582
8546
|
"$maskColor": maskColor,
|
|
8583
8547
|
"$minWidth": padding,
|
|
@@ -8617,14 +8581,14 @@ var GuideCenterRegion = styled__default.default.div(templateObject_6$6 || (templ
|
|
|
8617
8581
|
}, function (props) {
|
|
8618
8582
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
8619
8583
|
});
|
|
8620
|
-
var GuideCenterBorder = styled__default.default.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"])), function (props) {
|
|
8584
|
+
var GuideCenterBorder = styled__default.default.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n max-width: 100%;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n max-width: 100%;\n position: relative;\n ", "\n"])), function (props) {
|
|
8621
8585
|
var _a, _b;
|
|
8622
8586
|
return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
|
|
8623
8587
|
}, function (props) {
|
|
8624
8588
|
return props.$padding ? "padding: ".concat(props.$padding, "px;") : '';
|
|
8625
8589
|
});
|
|
8626
8590
|
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"])));
|
|
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) {
|
|
8591
|
+
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 align-items: center;\n justify-content: center;\n"], ["\n position: relative;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) {
|
|
8628
8592
|
return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
|
|
8629
8593
|
});
|
|
8630
8594
|
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;
|