idmission-web-sdk 1.0.54 → 1.0.56
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/sdk2.cjs.development.js +12 -28
- 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 +12 -27
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +16 -31
- 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 -4
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var ReactDOM = require('react-dom/client');
|
|
8
|
-
var Sentry = require('@sentry/react');
|
|
9
8
|
var styled = require('styled-components');
|
|
10
9
|
var reactI18next = require('react-i18next');
|
|
11
10
|
var tf = require('@tensorflow/tfjs');
|
|
@@ -40,7 +39,6 @@ function _interopNamespace(e) {
|
|
|
40
39
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
41
40
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
42
41
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
43
|
-
var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
|
|
44
42
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
45
43
|
var tf__namespace = /*#__PURE__*/_interopNamespace(tf);
|
|
46
44
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
@@ -48,7 +46,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
48
46
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
49
47
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
50
48
|
|
|
51
|
-
var webSdkVersion = '1.0.
|
|
49
|
+
var webSdkVersion = '1.0.56';
|
|
52
50
|
|
|
53
51
|
function getPlatform() {
|
|
54
52
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -1351,7 +1349,6 @@ function listAvailableCameras(facingMode, requestMicAccess) {
|
|
|
1351
1349
|
return tslib.__generator(this, function (_a) {
|
|
1352
1350
|
switch (_a.label) {
|
|
1353
1351
|
case 0:
|
|
1354
|
-
_a.trys.push([0, 2,, 3]);
|
|
1355
1352
|
return [4 /*yield*/, navigator.mediaDevices.getUserMedia({
|
|
1356
1353
|
video: {
|
|
1357
1354
|
facingMode: {
|
|
@@ -1359,17 +1356,13 @@ function listAvailableCameras(facingMode, requestMicAccess) {
|
|
|
1359
1356
|
}
|
|
1360
1357
|
},
|
|
1361
1358
|
audio: requestMicAccess
|
|
1362
|
-
})
|
|
1359
|
+
})
|
|
1360
|
+
// This lists all available cameras attached to the user's device.
|
|
1361
|
+
];
|
|
1363
1362
|
case 1:
|
|
1364
|
-
// The first thing we need to do is call getUserMedia() so that the subsequent call to enumerateDevices() works.
|
|
1365
1363
|
cameraEnumerationStream = _a.sent();
|
|
1366
|
-
return [3 /*break*/, 3];
|
|
1367
|
-
case 2:
|
|
1368
|
-
_a.sent();
|
|
1369
|
-
return [2 /*return*/, []];
|
|
1370
|
-
case 3:
|
|
1371
1364
|
return [4 /*yield*/, navigator.mediaDevices.enumerateDevices()];
|
|
1372
|
-
case
|
|
1365
|
+
case 2:
|
|
1373
1366
|
videoDevices = _a.sent().filter(function (_a) {
|
|
1374
1367
|
var kind = _a.kind;
|
|
1375
1368
|
return kind === 'videoinput';
|
|
@@ -1531,7 +1524,10 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
1531
1524
|
if (e.name === 'NotAllowedError') {
|
|
1532
1525
|
console.error('camera access has been blocked by the user', e);
|
|
1533
1526
|
setCameraAccessDenied(true);
|
|
1534
|
-
} else
|
|
1527
|
+
} else {
|
|
1528
|
+
console.error('camera access encountered some other error', e);
|
|
1529
|
+
throw e;
|
|
1530
|
+
}
|
|
1535
1531
|
});
|
|
1536
1532
|
}, [cameraAccessDenied, iphoneContinuityCameraAllowed, iphoneContinuityCameraDenied, preferFrontFacingCamera]);
|
|
1537
1533
|
React.useEffect(function () {
|
|
@@ -1545,7 +1541,7 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
1545
1541
|
if (!((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia)) return cleanup;
|
|
1546
1542
|
(function () {
|
|
1547
1543
|
return tslib.__awaiter(void 0, void 0, void 0, function () {
|
|
1548
|
-
var stream,
|
|
1544
|
+
var stream, e_1, handleStreamEnded;
|
|
1549
1545
|
var _a;
|
|
1550
1546
|
return tslib.__generator(this, function (_b) {
|
|
1551
1547
|
switch (_b.label) {
|
|
@@ -1570,8 +1566,8 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
|
|
|
1570
1566
|
stream = _b.sent();
|
|
1571
1567
|
return [3 /*break*/, 4];
|
|
1572
1568
|
case 3:
|
|
1573
|
-
|
|
1574
|
-
if (
|
|
1569
|
+
e_1 = _b.sent();
|
|
1570
|
+
if (e_1.name === 'NotAllowedError') {
|
|
1575
1571
|
if (iphoneContinuityCameraAllowed) {
|
|
1576
1572
|
setIphoneContinuityCameraAvailable(false);
|
|
1577
1573
|
setIphoneContinuityCameraDenied(true);
|
|
@@ -15103,18 +15099,6 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
15103
15099
|
};
|
|
15104
15100
|
|
|
15105
15101
|
initializeI18n();
|
|
15106
|
-
if (Sentry__namespace !== undefined && Sentry__namespace.init) {
|
|
15107
|
-
Sentry__namespace.init({
|
|
15108
|
-
dsn: 'https://0a8e0e8df645473abe217b60b50fbcb1@o4505120557367296.ingest.sentry.io/4505120582008832',
|
|
15109
|
-
// integrations: [new Sentry.BrowserTracing()],
|
|
15110
|
-
// Performance Monitoring
|
|
15111
|
-
tracesSampleRate: 1.0,
|
|
15112
|
-
// Session Replay
|
|
15113
|
-
// replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
|
|
15114
|
-
// replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
|
|
15115
|
-
debug: true
|
|
15116
|
-
});
|
|
15117
|
-
}
|
|
15118
15102
|
function renderElement(component, targetElement) {
|
|
15119
15103
|
if (typeof targetElement === 'string') {
|
|
15120
15104
|
var result = document.querySelector(targetElement);
|