@incodetech/web 0.0.0-dev-20260828-a341651e → 0.0.0-dev-20260831-e0b1ec3e
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/id/id.es.js +67 -2
- package/package.json +2 -2
package/dist/id/id.es.js
CHANGED
|
@@ -330,7 +330,7 @@ var KEY_BY_FAIL_REASON = {
|
|
|
330
330
|
NETWORK_ERROR: "idv2.digitalIdUpload.unknownDocumentTypeScreen.errorTitle",
|
|
331
331
|
GENERIC: "idv2.digitalIdUpload.unknownDocumentTypeScreen.errorTitle"
|
|
332
332
|
};
|
|
333
|
-
var ErrorScreen = ({ manager, state }) => {
|
|
333
|
+
var ErrorScreen$1 = ({ manager, state }) => {
|
|
334
334
|
const { t } = useTranslation();
|
|
335
335
|
const failReason = state.failReason ?? "GENERIC";
|
|
336
336
|
const isTerminal = state.phase === "exhausted" || TERMINAL_REASONS.has(failReason);
|
|
@@ -762,13 +762,74 @@ var DigitalIdUpload = ({ manager, state }) => {
|
|
|
762
762
|
state
|
|
763
763
|
});
|
|
764
764
|
if (state.phase === "fileTooLarge") return /* @__PURE__ */ u(FileTooLargeScreen, { manager });
|
|
765
|
-
if (state.phase === "error" || state.phase === "exhausted") return /* @__PURE__ */ u(ErrorScreen, {
|
|
765
|
+
if (state.phase === "error" || state.phase === "exhausted") return /* @__PURE__ */ u(ErrorScreen$1, {
|
|
766
766
|
manager,
|
|
767
767
|
state
|
|
768
768
|
});
|
|
769
769
|
return null;
|
|
770
770
|
};
|
|
771
771
|
//#endregion
|
|
772
|
+
//#region src/modules/id/deviceWallet/errorScreen.tsx
|
|
773
|
+
/**
|
|
774
|
+
* Failure screen for the device-wallet (mDL) handshake. Renders the shared
|
|
775
|
+
* `VerificationResult` (same look as the digital-ID redirect failure screen)
|
|
776
|
+
* with per-reason copy. Keys are static literals so i18nexus can extract them
|
|
777
|
+
* (author EN + supported locales in i18nexus); the subtitle keys match the
|
|
778
|
+
* core `DEVICE_WALLET_ERROR_KEYS` map, kept local here — like
|
|
779
|
+
* `digitalIdRedirect/failureScreen.tsx` — to avoid a runtime value import
|
|
780
|
+
* from `@incodetech/core`. Failure is non-blocking: retry restarts the
|
|
781
|
+
* handshake, or fall back to the ID-Capture chooser.
|
|
782
|
+
*/
|
|
783
|
+
var COPY_KEYS$1 = {
|
|
784
|
+
UNSUPPORTED_PLATFORM: {
|
|
785
|
+
title: "idv2.deviceWallet.unsupportedPlatformTitle",
|
|
786
|
+
subtitle: "idv2.deviceWallet.unsupportedPlatformDescription"
|
|
787
|
+
},
|
|
788
|
+
NO_CREDENTIAL: {
|
|
789
|
+
title: "idv2.deviceWallet.noCredentialTitle",
|
|
790
|
+
subtitle: "idv2.deviceWallet.noCredentialDescription"
|
|
791
|
+
},
|
|
792
|
+
WALLET_ERROR: {
|
|
793
|
+
title: "idv2.deviceWallet.errorTitle",
|
|
794
|
+
subtitle: "idv2.deviceWallet.errorDescription"
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
var GENERIC_KEYS$1 = {
|
|
798
|
+
title: "idv2.deviceWallet.errorTitle",
|
|
799
|
+
subtitle: "idv2.deviceWallet.errorDescription"
|
|
800
|
+
};
|
|
801
|
+
var ErrorScreen = ({ failReason, onRetry, onUseAnotherMethod }) => {
|
|
802
|
+
const { t } = useTranslation();
|
|
803
|
+
const { title, subtitle } = failReason ? COPY_KEYS$1[failReason] : GENERIC_KEYS$1;
|
|
804
|
+
const canRetry = failReason !== "UNSUPPORTED_PLATFORM";
|
|
805
|
+
return /* @__PURE__ */ u(VerificationResult, {
|
|
806
|
+
status: "failure",
|
|
807
|
+
failureTitle: t(title),
|
|
808
|
+
errorMessage: t(subtitle),
|
|
809
|
+
onRetry: canRetry ? onRetry : void 0,
|
|
810
|
+
retryLabel: t("common.tryAgain"),
|
|
811
|
+
onSkip: onUseAnotherMethod,
|
|
812
|
+
skipLabel: t("idv2.deviceWallet.useAnotherMethodButton")
|
|
813
|
+
});
|
|
814
|
+
};
|
|
815
|
+
//#endregion
|
|
816
|
+
//#region src/modules/id/deviceWallet/deviceWallet.tsx
|
|
817
|
+
/**
|
|
818
|
+
* Device-wallet (mDL) handshake rendered INSIDE ID-Capture as a child machine
|
|
819
|
+
* — mirrors `digitalIdRedirect/digitalIdRedirect.tsx`. The core child owns
|
|
820
|
+
* request → wallet sheet → decrypt; this layer only renders the phase. During
|
|
821
|
+
* `presenting` the OS wallet sheet covers the page, so a spinner is all the
|
|
822
|
+
* page itself needs.
|
|
823
|
+
*/
|
|
824
|
+
var DeviceWallet = ({ manager, state }) => {
|
|
825
|
+
if (state.phase === "failed") return /* @__PURE__ */ u(ErrorScreen, {
|
|
826
|
+
failReason: state.failReason,
|
|
827
|
+
onRetry: () => manager.deviceWalletRetry(),
|
|
828
|
+
onUseAnotherMethod: () => manager.deviceWalletUseAnotherMethod()
|
|
829
|
+
});
|
|
830
|
+
return /* @__PURE__ */ u(TransitionSpinner, { hideText: true });
|
|
831
|
+
};
|
|
832
|
+
//#endregion
|
|
772
833
|
//#region src/modules/id/digitalIdRedirect/failureScreen.tsx
|
|
773
834
|
/**
|
|
774
835
|
* Failure screen for the digital-ID web-redirect (Trinsic iDIN/FTN). Renders the
|
|
@@ -1309,6 +1370,10 @@ var IdContent = ({ config, manager: externalManager, onFinish, onError }) => {
|
|
|
1309
1370
|
manager,
|
|
1310
1371
|
state
|
|
1311
1372
|
});
|
|
1373
|
+
if (state.status === "deviceWallet") return /* @__PURE__ */ u(DeviceWallet, {
|
|
1374
|
+
manager,
|
|
1375
|
+
state
|
|
1376
|
+
});
|
|
1312
1377
|
return null;
|
|
1313
1378
|
};
|
|
1314
1379
|
var IdWithLocalConfig = ({ config, manager, onFinish, onError }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260831-e0b1ec3e",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
"qrcode": "^1.5.4",
|
|
293
293
|
"signature_pad": "^5.1.3",
|
|
294
294
|
"tailwindcss": "^4.1.17",
|
|
295
|
-
"@incodetech/core": "0.0.0-dev-
|
|
295
|
+
"@incodetech/core": "0.0.0-dev-20260831-e0b1ec3e"
|
|
296
296
|
},
|
|
297
297
|
"devDependencies": {
|
|
298
298
|
"@microsoft/api-extractor": "^7.53.3",
|