@koraidv/react 1.7.9 → 1.7.10
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/index.js +21 -10
- package/dist/index.mjs +21 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1509,13 +1509,18 @@ function ProcessingScreen({ steps }) {
|
|
|
1509
1509
|
] });
|
|
1510
1510
|
}
|
|
1511
1511
|
function computeScoreBreakdown(verification) {
|
|
1512
|
-
const
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
const docPercent = Math.round(
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
const
|
|
1512
|
+
const livenessPercent = Math.round(
|
|
1513
|
+
verification.scores?.liveness ?? verification.livenessVerification?.livenessScore ?? 0
|
|
1514
|
+
);
|
|
1515
|
+
const docPercent = Math.round(
|
|
1516
|
+
verification.scores?.documentAuth ?? (verification.documentVerification?.authenticityScore ?? 0) * 100
|
|
1517
|
+
);
|
|
1518
|
+
const nameMatch = Math.round(
|
|
1519
|
+
verification.scores?.nameMatch ?? (verification.documentVerification?.firstName && verification.documentVerification?.lastName ? 100 : 0)
|
|
1520
|
+
);
|
|
1521
|
+
const selfiePercent = Math.round(
|
|
1522
|
+
verification.scores?.faceMatch ?? verification.faceVerification?.matchScore ?? 0
|
|
1523
|
+
);
|
|
1519
1524
|
function getStatus(score) {
|
|
1520
1525
|
if (score >= 75) return "pass";
|
|
1521
1526
|
if (score >= 50) return "borderline";
|
|
@@ -2663,7 +2668,9 @@ function ResultScreen({ verification, onDone, onRetry, resultPageMode, simplifie
|
|
|
2663
2668
|
}
|
|
2664
2669
|
}
|
|
2665
2670
|
function SuccessResult({ verification, onDone }) {
|
|
2666
|
-
const score =
|
|
2671
|
+
const score = Math.round(
|
|
2672
|
+
verification.scores?.overall ?? 100 - (verification.riskScore ?? 16)
|
|
2673
|
+
);
|
|
2667
2674
|
const metrics = computeScoreBreakdown(verification);
|
|
2668
2675
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: styles.resultContainer, children: [
|
|
2669
2676
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: styles.resultContent, children: [
|
|
@@ -2704,7 +2711,9 @@ function SuccessResult({ verification, onDone }) {
|
|
|
2704
2711
|
] });
|
|
2705
2712
|
}
|
|
2706
2713
|
function RejectedResult({ verification, onRetry }) {
|
|
2707
|
-
const score =
|
|
2714
|
+
const score = Math.round(
|
|
2715
|
+
verification.scores?.overall ?? 100 - (verification.riskScore ?? 58)
|
|
2716
|
+
);
|
|
2708
2717
|
const metrics = computeScoreBreakdown(verification);
|
|
2709
2718
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: styles.resultContainer, children: [
|
|
2710
2719
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: styles.resultContent, children: [
|
|
@@ -2795,7 +2804,9 @@ function ExpiredResult({ verification, onRetry }) {
|
|
|
2795
2804
|
] });
|
|
2796
2805
|
}
|
|
2797
2806
|
function ManualReviewResult({ verification, onDone }) {
|
|
2798
|
-
const score =
|
|
2807
|
+
const score = Math.round(
|
|
2808
|
+
verification.scores?.overall ?? 100 - (verification.riskScore ?? 32)
|
|
2809
|
+
);
|
|
2799
2810
|
const metrics = computeScoreBreakdown(verification);
|
|
2800
2811
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: styles.resultContainer, children: [
|
|
2801
2812
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { style: styles.resultContent, children: [
|
package/dist/index.mjs
CHANGED
|
@@ -1460,13 +1460,18 @@ function ProcessingScreen({ steps }) {
|
|
|
1460
1460
|
] });
|
|
1461
1461
|
}
|
|
1462
1462
|
function computeScoreBreakdown(verification) {
|
|
1463
|
-
const
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
const docPercent = Math.round(
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
const
|
|
1463
|
+
const livenessPercent = Math.round(
|
|
1464
|
+
verification.scores?.liveness ?? verification.livenessVerification?.livenessScore ?? 0
|
|
1465
|
+
);
|
|
1466
|
+
const docPercent = Math.round(
|
|
1467
|
+
verification.scores?.documentAuth ?? (verification.documentVerification?.authenticityScore ?? 0) * 100
|
|
1468
|
+
);
|
|
1469
|
+
const nameMatch = Math.round(
|
|
1470
|
+
verification.scores?.nameMatch ?? (verification.documentVerification?.firstName && verification.documentVerification?.lastName ? 100 : 0)
|
|
1471
|
+
);
|
|
1472
|
+
const selfiePercent = Math.round(
|
|
1473
|
+
verification.scores?.faceMatch ?? verification.faceVerification?.matchScore ?? 0
|
|
1474
|
+
);
|
|
1470
1475
|
function getStatus(score) {
|
|
1471
1476
|
if (score >= 75) return "pass";
|
|
1472
1477
|
if (score >= 50) return "borderline";
|
|
@@ -2614,7 +2619,9 @@ function ResultScreen({ verification, onDone, onRetry, resultPageMode, simplifie
|
|
|
2614
2619
|
}
|
|
2615
2620
|
}
|
|
2616
2621
|
function SuccessResult({ verification, onDone }) {
|
|
2617
|
-
const score =
|
|
2622
|
+
const score = Math.round(
|
|
2623
|
+
verification.scores?.overall ?? 100 - (verification.riskScore ?? 16)
|
|
2624
|
+
);
|
|
2618
2625
|
const metrics = computeScoreBreakdown(verification);
|
|
2619
2626
|
return /* @__PURE__ */ jsxs9("div", { style: styles.resultContainer, children: [
|
|
2620
2627
|
/* @__PURE__ */ jsxs9("div", { style: styles.resultContent, children: [
|
|
@@ -2655,7 +2662,9 @@ function SuccessResult({ verification, onDone }) {
|
|
|
2655
2662
|
] });
|
|
2656
2663
|
}
|
|
2657
2664
|
function RejectedResult({ verification, onRetry }) {
|
|
2658
|
-
const score =
|
|
2665
|
+
const score = Math.round(
|
|
2666
|
+
verification.scores?.overall ?? 100 - (verification.riskScore ?? 58)
|
|
2667
|
+
);
|
|
2659
2668
|
const metrics = computeScoreBreakdown(verification);
|
|
2660
2669
|
return /* @__PURE__ */ jsxs9("div", { style: styles.resultContainer, children: [
|
|
2661
2670
|
/* @__PURE__ */ jsxs9("div", { style: styles.resultContent, children: [
|
|
@@ -2746,7 +2755,9 @@ function ExpiredResult({ verification, onRetry }) {
|
|
|
2746
2755
|
] });
|
|
2747
2756
|
}
|
|
2748
2757
|
function ManualReviewResult({ verification, onDone }) {
|
|
2749
|
-
const score =
|
|
2758
|
+
const score = Math.round(
|
|
2759
|
+
verification.scores?.overall ?? 100 - (verification.riskScore ?? 32)
|
|
2760
|
+
);
|
|
2750
2761
|
const metrics = computeScoreBreakdown(verification);
|
|
2751
2762
|
return /* @__PURE__ */ jsxs9("div", { style: styles.resultContainer, children: [
|
|
2752
2763
|
/* @__PURE__ */ jsxs9("div", { style: styles.resultContent, children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koraidv/react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.10",
|
|
4
4
|
"description": "Kora IDV React Components for Identity Verification",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "vitest run"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@koraidv/core": "^1.7.
|
|
24
|
+
"@koraidv/core": "^1.7.10"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^18.2.0",
|