idmission-web-sdk 2.3.111 → 2.3.113
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/common/signature.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignaturePad.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureSuccess.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +32 -8
- 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 +32 -8
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +32 -8
- 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
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.3.
|
|
214
|
+
var webSdkVersion = '2.3.113';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -24155,7 +24155,7 @@
|
|
|
24155
24155
|
return ((_a = props.theme.signatureCapture) === null || _a === void 0 ? void 0 : _a.backgroundPosition) ? "background-position: ".concat((_b = props.theme.signatureCapture) === null || _b === void 0 ? void 0 : _b.backgroundPosition, ";") : "";
|
|
24156
24156
|
});
|
|
24157
24157
|
var SignatureCanvasContainer$1 = styled.div(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"], ["\n position: absolute;\n top: 25%;\n left: 15%;\n width: 70%;\n height: 50%;\n\n @media (max-width: 800px) {\n top: 15%;\n left: 2%;\n width: 96%;\n height: 70%;\n }\n"])));
|
|
24158
|
-
var SignaturePad = styled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: relative;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n\n &.empty {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n\n &.head-tracking-unsatisfied {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n"], ["\n position: relative;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n\n &.empty {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n\n &.head-tracking-unsatisfied {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n"])), function (props) {
|
|
24158
|
+
var SignaturePad = styled.div(templateObject_3$a || (templateObject_3$a = __makeTemplateObject(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n\n &.empty {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n\n &.head-tracking-unsatisfied {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n"], ["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n background: ", ";\n border: ", ";\n border-radius: ", ";\n flex-grow: 1;\n z-index: 100;\n height: 100%;\n\n &.empty {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n\n &.head-tracking-unsatisfied {\n background: ", ";\n border: ", ";\n color: ", ";\n }\n"])), function (props) {
|
|
24159
24159
|
var _a, _b, _c;
|
|
24160
24160
|
return (_c = (_b = (_a = props.theme.signatureCapture) === null || _a === void 0 ? void 0 : _a.canvas) === null || _b === void 0 ? void 0 : _b.background) !== null && _c !== void 0 ? _c : 'rgba(255, 255, 255, 0.5)';
|
|
24161
24161
|
}, function (props) {
|
|
@@ -24591,16 +24591,34 @@
|
|
|
24591
24591
|
signaturePad: signaturePad
|
|
24592
24592
|
});
|
|
24593
24593
|
}, []);
|
|
24594
|
+
// We discovered that react-signature-canvas clears the canvas when the width and height are changed.
|
|
24595
|
+
// On some devices, the width and height appear to be occilating, so we lock them to the first observed width and height.
|
|
24596
|
+
// Consequently, the signature canvas is also locked to the first observed width and height, so resize behavior can be a little bit weird.
|
|
24597
|
+
var _j = React.useState(undefined),
|
|
24598
|
+
lockedWidth = _j[0],
|
|
24599
|
+
setLockedWidth = _j[1];
|
|
24600
|
+
var _k = React.useState(undefined),
|
|
24601
|
+
lockedHeight = _k[0],
|
|
24602
|
+
setLockedHeight = _k[1];
|
|
24603
|
+
React.useEffect(function () {
|
|
24604
|
+
if (!width || width < 10 || !height || height < 10) return;
|
|
24605
|
+
setLockedWidth(function (lockedWidth) {
|
|
24606
|
+
return lockedWidth !== null && lockedWidth !== void 0 ? lockedWidth : width;
|
|
24607
|
+
});
|
|
24608
|
+
setLockedHeight(function (lockedHeight) {
|
|
24609
|
+
return lockedHeight !== null && lockedHeight !== void 0 ? lockedHeight : height;
|
|
24610
|
+
});
|
|
24611
|
+
}, [width, height]);
|
|
24594
24612
|
var canvasProps = React.useMemo(function () {
|
|
24595
24613
|
return {
|
|
24596
|
-
width:
|
|
24597
|
-
height:
|
|
24614
|
+
width: lockedWidth,
|
|
24615
|
+
height: lockedHeight,
|
|
24598
24616
|
className: classNames.signatureCanvas
|
|
24599
24617
|
};
|
|
24600
|
-
}, [classNames.signatureCanvas,
|
|
24601
|
-
var
|
|
24602
|
-
emptyContentDismissed =
|
|
24603
|
-
setEmptyContentDismissed =
|
|
24618
|
+
}, [classNames.signatureCanvas, lockedHeight, lockedWidth]);
|
|
24619
|
+
var _l = React.useState(false),
|
|
24620
|
+
emptyContentDismissed = _l[0],
|
|
24621
|
+
setEmptyContentDismissed = _l[1];
|
|
24604
24622
|
React.useEffect(function () {
|
|
24605
24623
|
if (signaturePadEmpty) setEmptyContentDismissed(false);
|
|
24606
24624
|
}, [signaturePadEmpty]);
|
|
@@ -24916,6 +24934,9 @@
|
|
|
24916
24934
|
var assetSelectorOpts$1 = [{
|
|
24917
24935
|
value: 'signatureVideo',
|
|
24918
24936
|
label: 'Signature Video'
|
|
24937
|
+
}, {
|
|
24938
|
+
value: 'signatureImage',
|
|
24939
|
+
label: 'Signature Image'
|
|
24919
24940
|
}, {
|
|
24920
24941
|
value: 'selfieImage',
|
|
24921
24942
|
label: 'Selfie Image'
|
|
@@ -24975,6 +24996,9 @@
|
|
|
24975
24996
|
controls: true,
|
|
24976
24997
|
preload: "metadata",
|
|
24977
24998
|
autoPlay: true
|
|
24999
|
+
})), displayedAsset === 'signatureImage' && ctx.signatureData && ( /*#__PURE__*/React.createElement("img", {
|
|
25000
|
+
src: "data:image/jpeg;base64,".concat(ctx.signatureData.fileContent),
|
|
25001
|
+
alt: ""
|
|
24978
25002
|
})), displayedAsset === 'selfieImage' && ctx.selfieImage && ( /*#__PURE__*/React.createElement("img", {
|
|
24979
25003
|
src: ctx.selfieImage,
|
|
24980
25004
|
alt: ""
|