idmission-web-sdk 2.2.177 → 2.3.1
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/ButtonsRow.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +1 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/lib/locales/de.d.ts +1 -0
- package/dist/lib/locales/de.d.ts.map +1 -1
- package/dist/lib/locales/es.d.ts +1 -0
- package/dist/lib/locales/es.d.ts.map +1 -1
- package/dist/lib/locales/fr.d.ts +1 -0
- package/dist/lib/locales/fr.d.ts.map +1 -1
- package/dist/lib/locales/index.d.ts +8 -0
- package/dist/lib/locales/index.d.ts.map +1 -1
- package/dist/lib/locales/it.d.ts +1 -0
- package/dist/lib/locales/it.d.ts.map +1 -1
- package/dist/lib/locales/ja.d.ts +1 -0
- package/dist/lib/locales/ja.d.ts.map +1 -1
- package/dist/lib/locales/pt.d.ts +1 -0
- package/dist/lib/locales/pt.d.ts.map +1 -1
- package/dist/lib/locales/ru.d.ts +1 -0
- package/dist/lib/locales/ru.d.ts.map +1 -1
- package/dist/lib/locales/zh.d.ts +1 -0
- package/dist/lib/locales/zh.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +93 -57
- 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 +93 -57
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +93 -57
- 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/themes/index.d.ts +11 -0
- package/dist/themes/index.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.
|
|
207
|
+
var webSdkVersion = '2.3.1';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -430,7 +430,7 @@ var StyledButton = styled.button(templateObject_1$P || (templateObject_1$P = __m
|
|
|
430
430
|
});
|
|
431
431
|
var templateObject_1$P;
|
|
432
432
|
|
|
433
|
-
var ButtonsRow$2 = styled.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n"])));
|
|
433
|
+
var ButtonsRow$2 = styled.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"])));
|
|
434
434
|
var templateObject_1$O;
|
|
435
435
|
|
|
436
436
|
var GuidanceMessageContainerDiv = styled.div(templateObject_1$N || (templateObject_1$N = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
|
|
@@ -3692,6 +3692,7 @@ var es = {
|
|
|
3692
3692
|
'Loading guided capture experience...': 'Cargando la experiencia guiada para la captura....',
|
|
3693
3693
|
'Guided capture experience ready': 'Experiencia guiada lista',
|
|
3694
3694
|
"Let's Go!": '¡Vamos!',
|
|
3695
|
+
'Please wait...': 'Espere...',
|
|
3695
3696
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': 'Estamos teniendo problemas para identificar el lado correcto de la identificación,¿continuar con la captura?',
|
|
3696
3697
|
OK: 'Sí',
|
|
3697
3698
|
'Capture with Camera': 'Capturar con la cámara',
|
|
@@ -3820,6 +3821,7 @@ var de = {
|
|
|
3820
3821
|
'Loading guided capture experience...': 'Geführte Erfassung wird geladen...',
|
|
3821
3822
|
'Guided capture experience ready': 'Geführte Erfassung bereit',
|
|
3822
3823
|
"Let's Go!": "Los geht's!",
|
|
3824
|
+
'Please wait...': 'Bitte warten...',
|
|
3823
3825
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': 'Wir haben Probleme, die richtige Seite Ihres Ausweises zu erkennen. Möchten Sie dennoch mit der Erfassung fortfahren?',
|
|
3824
3826
|
OK: 'OK',
|
|
3825
3827
|
'Capture with Camera': 'Mit der Kamera aufnehmen',
|
|
@@ -3947,7 +3949,8 @@ var fr = {
|
|
|
3947
3949
|
'Camera ready': 'Caméra prête',
|
|
3948
3950
|
'Loading guided capture experience...': "Chargement de l'expérience de capture guidée...",
|
|
3949
3951
|
'Guided capture experience ready': 'Expérience de capture guidée prête',
|
|
3950
|
-
"Let's Go!": 'Allons-y
|
|
3952
|
+
"Let's Go!": 'Allons-y!',
|
|
3953
|
+
'Please wait...': 'Veuillez patienter...',
|
|
3951
3954
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': "Nous rencontrons des difficultés pour identifier la bonne face de votre pièce d'identité. Voulez-vous quand même continuer la capture ?",
|
|
3952
3955
|
OK: 'OK',
|
|
3953
3956
|
'Capture with Camera': "Capture avec l'appareil photo",
|
|
@@ -4076,6 +4079,7 @@ var it = {
|
|
|
4076
4079
|
'Loading guided capture experience...': "Caricamento dell'esperienza di acquisizione guidata...",
|
|
4077
4080
|
'Guided capture experience ready': 'Esperienza di acquisizione guidata pronta',
|
|
4078
4081
|
"Let's Go!": 'Iniziamo!',
|
|
4082
|
+
'Please wait...': 'Attendere...',
|
|
4079
4083
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': "Si stanno verificando problemi nell'identificare il lato corretto del documento d'identità. Procedere con l'acquisizione?",
|
|
4080
4084
|
OK: 'OK',
|
|
4081
4085
|
'Capture with Camera': 'Acquisisci con la fotocamera',
|
|
@@ -4204,6 +4208,7 @@ var ja = {
|
|
|
4204
4208
|
'Loading guided capture experience...': '撮影ガイダンスのエクスペリエンスを読み込み中…',
|
|
4205
4209
|
'Guided capture experience ready': '撮影ガイダンスのエクスペリエンスが準備完了',
|
|
4206
4210
|
"Let's Go!": '始めましょう',
|
|
4211
|
+
'Please wait...': 'お待ちください…',
|
|
4207
4212
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': '身分証の正しい寸法を特定できません。それでも撮影を続行しますか?',
|
|
4208
4213
|
OK: 'OK',
|
|
4209
4214
|
'Capture with Camera': 'カメラで撮影',
|
|
@@ -4332,6 +4337,7 @@ var pt = {
|
|
|
4332
4337
|
'Loading guided capture experience...': 'Carregando a experiência de captura guiada...',
|
|
4333
4338
|
'Guided capture experience ready': 'Experiência de captura guiada pronta',
|
|
4334
4339
|
"Let's Go!": 'Vamos lá!',
|
|
4340
|
+
'Please wait...': 'Aguarde...',
|
|
4335
4341
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': 'Estamos com dificuldades para identificar o lado correto da sua identidade. Deseja continuar com a captura mesmo assim?',
|
|
4336
4342
|
OK: 'OK',
|
|
4337
4343
|
'Capture with Camera': 'Capturar com a câmera',
|
|
@@ -4460,6 +4466,7 @@ var ru = {
|
|
|
4460
4466
|
'Loading guided capture experience...': 'Загрузка данных опыта управляемой съемки…',
|
|
4461
4467
|
'Guided capture experience ready': 'Данные опыта управляемой съемки готовы',
|
|
4462
4468
|
"Let's Go!": 'Поехали!',
|
|
4469
|
+
'Please wait...': 'Подождите…',
|
|
4463
4470
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': 'У нас возникли проблемы с определением правильной стороны вашего удостоверения личности. Все равно хотите продолжить съемку?',
|
|
4464
4471
|
OK: 'OK',
|
|
4465
4472
|
'Capture with Camera': 'Снимок с камеры',
|
|
@@ -4588,6 +4595,7 @@ var zh = {
|
|
|
4588
4595
|
'Loading guided capture experience...': '正在載入引導式拍攝體驗...',
|
|
4589
4596
|
'Guided capture experience ready': '引導式拍攝體驗就緒',
|
|
4590
4597
|
"Let's Go!": '開始!',
|
|
4598
|
+
'Please wait...': '請稍候...',
|
|
4591
4599
|
'We are having trouble identifying the correct side of your id do you want to continue with capture anyway?': '無法識別證件的正確一面,是否仍要繼續拍攝?',
|
|
4592
4600
|
OK: '確定',
|
|
4593
4601
|
'Capture with Camera': '使用相机拍摄',
|
|
@@ -7253,34 +7261,35 @@ function LoadingListItemIndicator(_a) {
|
|
|
7253
7261
|
|
|
7254
7262
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
7255
7263
|
var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
|
|
7256
|
-
var _b, _c, _d, _e;
|
|
7264
|
+
var _b, _c, _d, _e, _f, _g;
|
|
7257
7265
|
var onDismissed = _a.onDismissed,
|
|
7258
7266
|
onUserCancel = _a.onUserCancel,
|
|
7259
7267
|
instructions = _a.instructions,
|
|
7260
|
-
|
|
7261
|
-
rotateImage =
|
|
7262
|
-
|
|
7263
|
-
assets =
|
|
7264
|
-
|
|
7265
|
-
classNames =
|
|
7266
|
-
|
|
7267
|
-
colors =
|
|
7268
|
-
|
|
7269
|
-
rawVerbiage =
|
|
7268
|
+
_h = _a.rotateImage,
|
|
7269
|
+
rotateImage = _h === void 0 ? false : _h,
|
|
7270
|
+
_j = _a.assets,
|
|
7271
|
+
assets = _j === void 0 ? {} : _j,
|
|
7272
|
+
_k = _a.classNames,
|
|
7273
|
+
classNames = _k === void 0 ? {} : _k,
|
|
7274
|
+
_l = _a.colors,
|
|
7275
|
+
colors = _l === void 0 ? {} : _l,
|
|
7276
|
+
_m = _a.verbiage,
|
|
7277
|
+
rawVerbiage = _m === void 0 ? {} : _m,
|
|
7270
7278
|
customOverlayContent = _a.customOverlayContent;
|
|
7271
7279
|
var sessionCheckState = useAuthContext()[0].sessionCheckState;
|
|
7272
7280
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
7273
|
-
var
|
|
7274
|
-
modelsReady =
|
|
7275
|
-
modelDownloadProgress =
|
|
7276
|
-
var
|
|
7277
|
-
cameraReady =
|
|
7278
|
-
cameraAccessDenied =
|
|
7279
|
-
iphoneContinuityCameraAvailable =
|
|
7280
|
-
setIphoneContinuityCameraAllowed =
|
|
7281
|
-
var
|
|
7282
|
-
dismissed =
|
|
7283
|
-
setDismissed =
|
|
7281
|
+
var _o = useIdCaptureModelsContext(),
|
|
7282
|
+
modelsReady = _o.ready,
|
|
7283
|
+
modelDownloadProgress = _o.modelDownloadProgress;
|
|
7284
|
+
var _p = useCameraStore(),
|
|
7285
|
+
cameraReady = _p.cameraReady,
|
|
7286
|
+
cameraAccessDenied = _p.cameraAccessDenied,
|
|
7287
|
+
iphoneContinuityCameraAvailable = _p.iphoneContinuityCameraAvailable,
|
|
7288
|
+
setIphoneContinuityCameraAllowed = _p.setIphoneContinuityCameraAllowed;
|
|
7289
|
+
var _q = useState(false),
|
|
7290
|
+
dismissed = _q[0],
|
|
7291
|
+
setDismissed = _q[1];
|
|
7292
|
+
var theme = useTheme();
|
|
7284
7293
|
assets.instructionImageUrl || (assets.instructionImageUrl = legacyInstructionImageUrl$1);
|
|
7285
7294
|
var verbiage = useTranslations(rawVerbiage, {
|
|
7286
7295
|
headingText: 'Use your device camera to capture your ID',
|
|
@@ -7291,6 +7300,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7291
7300
|
cameraInitializingText: 'Camera initializing...',
|
|
7292
7301
|
cameraInitializedText: 'Camera ready',
|
|
7293
7302
|
continueText: "Let's Go!",
|
|
7303
|
+
pleaseWaitText: 'Please wait...',
|
|
7294
7304
|
sessionCheckingText: 'Authenticating...'
|
|
7295
7305
|
});
|
|
7296
7306
|
var ready = sessionReady && modelsReady && cameraReady;
|
|
@@ -7385,17 +7395,18 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7385
7395
|
state: sessionReady && modelsReady ? 'done' : 'running'
|
|
7386
7396
|
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer$1, {
|
|
7387
7397
|
className: classNames.continueBtnContainer
|
|
7388
|
-
}, ready && ( /*#__PURE__*/React__default.createElement(ContinueButton$1, {
|
|
7398
|
+
}, (ready || ((_g = (_f = theme.idCapture) === null || _f === void 0 ? void 0 : _f.loadingOverlay) === null || _g === void 0 ? void 0 : _g.displayDisabledContinueBtn)) && ( /*#__PURE__*/React__default.createElement(ContinueButton$1, {
|
|
7389
7399
|
autoFocus: true,
|
|
7390
|
-
finished:
|
|
7400
|
+
finished: ready,
|
|
7391
7401
|
className: classNames.continueBtn,
|
|
7402
|
+
disabled: !ready,
|
|
7392
7403
|
variant: "positive",
|
|
7393
7404
|
colors: colors.continueBtn,
|
|
7394
7405
|
onClick: function onClick() {
|
|
7395
7406
|
setDismissed(true);
|
|
7396
7407
|
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
|
|
7397
7408
|
}
|
|
7398
|
-
}, verbiage.continueText))))));
|
|
7409
|
+
}, ready ? verbiage.continueText : verbiage.pleaseWaitText))))));
|
|
7399
7410
|
};
|
|
7400
7411
|
var OverlayInner$1 = styled(LoadingOverlayInner)(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n"], ["\n background: ", ";\n color: ", ";\n"])), function (props) {
|
|
7401
7412
|
var _a, _b, _c, _d;
|
|
@@ -7424,7 +7435,7 @@ var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templa
|
|
|
7424
7435
|
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation);
|
|
7425
7436
|
var CustomLoadingGraphic$1 = styled.img(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
7426
7437
|
var ContinueButtonContainer$1 = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
7427
|
-
var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"])), function (props) {
|
|
7438
|
+
var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"])), function (props) {
|
|
7428
7439
|
var _a, _b, _c, _d, _e, _f;
|
|
7429
7440
|
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, ";") : '';
|
|
7430
7441
|
}, function (props) {
|
|
@@ -7433,6 +7444,15 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObje
|
|
|
7433
7444
|
}, function (props) {
|
|
7434
7445
|
var _a, _b, _c, _d, _e, _f;
|
|
7435
7446
|
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.continueBtnBorder) ? "border: ".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.continueBtnBorder, ";") : '';
|
|
7447
|
+
}, function (props) {
|
|
7448
|
+
var _a, _b, _c, _d;
|
|
7449
|
+
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.continueBtnDisabledBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
7450
|
+
}, function (props) {
|
|
7451
|
+
var _a, _b, _c, _d;
|
|
7452
|
+
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.continueBtnDisabledTextColor) !== null && _d !== void 0 ? _d : 'white';
|
|
7453
|
+
}, function (props) {
|
|
7454
|
+
var _a, _b, _c, _d;
|
|
7455
|
+
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';
|
|
7436
7456
|
});
|
|
7437
7457
|
var templateObject_1$D, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$2, templateObject_9$2, templateObject_10$1;
|
|
7438
7458
|
|
|
@@ -12262,40 +12282,43 @@ var templateObject_1$g, templateObject_2$e;
|
|
|
12262
12282
|
|
|
12263
12283
|
var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
|
|
12264
12284
|
var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
|
|
12285
|
+
var _b, _c;
|
|
12265
12286
|
var onDismissed = _a.onDismissed,
|
|
12266
12287
|
onUserCancel = _a.onUserCancel,
|
|
12267
12288
|
customOverlayContent = _a.customOverlayContent,
|
|
12268
|
-
|
|
12269
|
-
waitForIdCaptureModels =
|
|
12270
|
-
|
|
12271
|
-
assets =
|
|
12272
|
-
|
|
12273
|
-
classNames =
|
|
12274
|
-
|
|
12275
|
-
colors =
|
|
12276
|
-
|
|
12277
|
-
rawVerbiage =
|
|
12289
|
+
_d = _a.waitForIdCaptureModels,
|
|
12290
|
+
waitForIdCaptureModels = _d === void 0 ? false : _d,
|
|
12291
|
+
_e = _a.assets,
|
|
12292
|
+
assets = _e === void 0 ? {} : _e,
|
|
12293
|
+
_f = _a.classNames,
|
|
12294
|
+
classNames = _f === void 0 ? {} : _f,
|
|
12295
|
+
_g = _a.colors,
|
|
12296
|
+
colors = _g === void 0 ? {} : _g,
|
|
12297
|
+
_h = _a.verbiage,
|
|
12298
|
+
rawVerbiage = _h === void 0 ? {} : _h;
|
|
12278
12299
|
var sessionCheckState = useAuthContext()[0].sessionCheckState;
|
|
12279
12300
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
12280
|
-
var
|
|
12301
|
+
var _j = useCameraStore(useShallow(function (state) {
|
|
12281
12302
|
return {
|
|
12282
12303
|
cameraReady: state.cameraReady,
|
|
12283
12304
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
12284
12305
|
microphoneAccessDenied: state.microphoneAccessDenied
|
|
12285
12306
|
};
|
|
12286
12307
|
})),
|
|
12287
|
-
cameraReady =
|
|
12288
|
-
cameraAccessDenied =
|
|
12289
|
-
microphoneAccessDenied =
|
|
12290
|
-
var
|
|
12291
|
-
modelsReady =
|
|
12292
|
-
modelDownloadProgress =
|
|
12308
|
+
cameraReady = _j.cameraReady,
|
|
12309
|
+
cameraAccessDenied = _j.cameraAccessDenied,
|
|
12310
|
+
microphoneAccessDenied = _j.microphoneAccessDenied;
|
|
12311
|
+
var _k = useSelfieGuidanceModelsContext(),
|
|
12312
|
+
modelsReady = _k.ready,
|
|
12313
|
+
modelDownloadProgress = _k.modelDownloadProgress;
|
|
12293
12314
|
var idCaptureModelsContext = useContext(IdCaptureModelsContext);
|
|
12315
|
+
var theme = useTheme();
|
|
12294
12316
|
var verbiage = useTranslations(rawVerbiage, {
|
|
12295
12317
|
headingText: 'Use your device camera to capture your face',
|
|
12296
12318
|
removeEyeCoveringsText: 'Remove Sunglasses & Hat',
|
|
12297
12319
|
avoidExcessiveBacklightingText: 'Avoid Excessive Backlighting',
|
|
12298
12320
|
continueText: "Let's Go!",
|
|
12321
|
+
pleaseWaitText: 'Please wait...',
|
|
12299
12322
|
cameraInitializingText: 'Accessing camera...',
|
|
12300
12323
|
cameraInitializedText: 'Camera ready',
|
|
12301
12324
|
downloadingText: 'Downloading...',
|
|
@@ -12303,9 +12326,9 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12303
12326
|
modelsReadyText: 'Guided capture experience ready',
|
|
12304
12327
|
sessionCheckingText: 'Authenticating...'
|
|
12305
12328
|
});
|
|
12306
|
-
var
|
|
12307
|
-
headingTextIndex =
|
|
12308
|
-
setHeadingTextIndex =
|
|
12329
|
+
var _l = useState(0),
|
|
12330
|
+
headingTextIndex = _l[0],
|
|
12331
|
+
setHeadingTextIndex = _l[1];
|
|
12309
12332
|
var headingText = [verbiage.headingText, verbiage.removeEyeCoveringsText, verbiage.avoidExcessiveBacklightingText][headingTextIndex];
|
|
12310
12333
|
useEffect(function () {
|
|
12311
12334
|
setInterval(function () {
|
|
@@ -12314,9 +12337,9 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12314
12337
|
});
|
|
12315
12338
|
}, 3000);
|
|
12316
12339
|
}, []);
|
|
12317
|
-
var
|
|
12318
|
-
dismissed =
|
|
12319
|
-
setDismissed =
|
|
12340
|
+
var _m = useState(false),
|
|
12341
|
+
dismissed = _m[0],
|
|
12342
|
+
setDismissed = _m[1];
|
|
12320
12343
|
if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
12321
12344
|
if (cameraAccessDenied) {
|
|
12322
12345
|
return /*#__PURE__*/React__default.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -12382,9 +12405,10 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12382
12405
|
state: sessionReady && allModelsReady ? 'done' : 'running'
|
|
12383
12406
|
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer, {
|
|
12384
12407
|
className: classNames.continueBtnContainer
|
|
12385
|
-
}, ready && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
12408
|
+
}, (ready || ((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.displayDisabledContinueBtn)) && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
12386
12409
|
autoFocus: true,
|
|
12387
|
-
finished:
|
|
12410
|
+
finished: ready,
|
|
12411
|
+
disabled: !ready,
|
|
12388
12412
|
className: classNames.continueBtn,
|
|
12389
12413
|
variant: "positive",
|
|
12390
12414
|
colors: colors.continueBtn,
|
|
@@ -12392,7 +12416,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12392
12416
|
setDismissed(true);
|
|
12393
12417
|
onDismissed === null || onDismissed === void 0 ? void 0 : onDismissed();
|
|
12394
12418
|
}
|
|
12395
|
-
}, verbiage.continueText))))));
|
|
12419
|
+
}, ready ? verbiage.continueText : verbiage.pleaseWaitText))))));
|
|
12396
12420
|
};
|
|
12397
12421
|
var OverlayInner = styled(LoadingOverlayInner)(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n"], ["\n background: ", ";\n color: ", ";\n"])), function (props) {
|
|
12398
12422
|
var _a, _b, _c, _d;
|
|
@@ -12421,7 +12445,7 @@ var ProgressIndicator = styled(LoadingOverlayProgressIndicator)(templateObject_4
|
|
|
12421
12445
|
});
|
|
12422
12446
|
var CustomLoadingGraphic = styled.img(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
12423
12447
|
var ContinueButtonContainer = styled.div(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
12424
|
-
var ContinueButton = styled(LoaderButton)(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n"])), function (props) {
|
|
12448
|
+
var ContinueButton = styled(LoaderButton)(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
12425
12449
|
var _a, _b, _c, _d, _e, _f;
|
|
12426
12450
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === 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.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
12427
12451
|
}, function (props) {
|
|
@@ -12430,6 +12454,15 @@ var ContinueButton = styled(LoaderButton)(templateObject_7$2 || (templateObject_
|
|
|
12430
12454
|
}, function (props) {
|
|
12431
12455
|
var _a, _b, _c, _d, _e, _f;
|
|
12432
12456
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) ? "border: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.continueBtnBorder, ";") : '';
|
|
12457
|
+
}, function (props) {
|
|
12458
|
+
var _a, _b, _c, _d;
|
|
12459
|
+
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
12460
|
+
}, function (props) {
|
|
12461
|
+
var _a, _b, _c, _d;
|
|
12462
|
+
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledTextColor) !== null && _d !== void 0 ? _d : 'white';
|
|
12463
|
+
}, function (props) {
|
|
12464
|
+
var _a, _b, _c, _d;
|
|
12465
|
+
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
12433
12466
|
});
|
|
12434
12467
|
var templateObject_1$f, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4, templateObject_6$3, templateObject_7$2;
|
|
12435
12468
|
|
|
@@ -15368,7 +15401,10 @@ var defaultTheme = {
|
|
|
15368
15401
|
progressBarBackgroundOpacity: 0.75,
|
|
15369
15402
|
progressBarIndicatorColor: 'var(--idm-color-positive-600)',
|
|
15370
15403
|
progressBarTextColor: 'white',
|
|
15371
|
-
continueBtnBorder: '2px solid white'
|
|
15404
|
+
continueBtnBorder: '2px solid white',
|
|
15405
|
+
continueBtnDisabledBackgroundColor: 'var(--idm-color-positive-600)',
|
|
15406
|
+
continueBtnDisabledTextColor: 'white',
|
|
15407
|
+
continueBtnDisabledBorder: 'none'
|
|
15372
15408
|
},
|
|
15373
15409
|
guideOverlay: {
|
|
15374
15410
|
backgroundColor: '#708090',
|