@hexar/biometric-identity-sdk-react-native 1.0.14 → 1.0.15
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiometricIdentityFlow.d.ts","sourceRoot":"","sources":["../../src/components/BiometricIdentityFlow.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAOL,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,cAAc,EAKd,iBAAiB,EAElB,MAAM,oCAAoC,CAAC;AAU5C,MAAM,WAAW,0BAA0B;IACzC,oBAAoB,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,OAAO,CAAC,EAAE,SAAS,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"BiometricIdentityFlow.d.ts","sourceRoot":"","sources":["../../src/components/BiometricIdentityFlow.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAOL,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,cAAc,EAKd,iBAAiB,EAElB,MAAM,oCAAoC,CAAC;AAU5C,MAAM,WAAW,0BAA0B;IACzC,oBAAoB,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,OAAO,CAAC,EAAE,SAAS,CAAC;KACrB,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAoTtE,CAAC;AAiOF,eAAe,qBAAqB,CAAC"}
|
|
@@ -69,12 +69,13 @@ const BiometricIdentityFlow = ({ onValidationComplete, onError, theme, language,
|
|
|
69
69
|
}, [language]);
|
|
70
70
|
const strings = (0, biometric_identity_sdk_core_1.getStrings)();
|
|
71
71
|
const styles = createStyles(theme);
|
|
72
|
-
// Handle validation result
|
|
72
|
+
// Handle validation result - call callback when RESULT step is reached
|
|
73
73
|
(0, react_1.useEffect)(() => {
|
|
74
|
-
if (state.validationResult) {
|
|
74
|
+
if (state.currentStep === biometric_identity_sdk_core_1.SDKStep.RESULT && state.validationResult) {
|
|
75
|
+
// Call callback automatically when validation completes
|
|
75
76
|
onValidationComplete(state.validationResult);
|
|
76
77
|
}
|
|
77
|
-
}, [state.validationResult, onValidationComplete]);
|
|
78
|
+
}, [state.currentStep, state.validationResult, onValidationComplete]);
|
|
78
79
|
// Handle error
|
|
79
80
|
(0, react_1.useEffect)(() => {
|
|
80
81
|
if (state.error) {
|
|
@@ -175,7 +176,10 @@ const BiometricIdentityFlow = ({ onValidationComplete, onError, theme, language,
|
|
|
175
176
|
}
|
|
176
177
|
// Show result
|
|
177
178
|
if (state.currentStep === biometric_identity_sdk_core_1.SDKStep.RESULT && state.validationResult) {
|
|
178
|
-
return (react_1.default.createElement(ResultScreen_1.ResultScreen, { result: state.validationResult, theme: theme, language: language, onClose: () =>
|
|
179
|
+
return (react_1.default.createElement(ResultScreen_1.ResultScreen, { result: state.validationResult, theme: theme, language: language, onClose: () => {
|
|
180
|
+
// Callback already called automatically when RESULT step was reached
|
|
181
|
+
// This onClose is just for UI cleanup/navigation
|
|
182
|
+
} }));
|
|
179
183
|
}
|
|
180
184
|
// Show error
|
|
181
185
|
if (state.currentStep === biometric_identity_sdk_core_1.SDKStep.ERROR && state.error) {
|
package/package.json
CHANGED
|
@@ -93,12 +93,13 @@ export const BiometricIdentityFlow: React.FC<BiometricIdentityFlowProps> = ({
|
|
|
93
93
|
const strings = getStrings();
|
|
94
94
|
const styles = createStyles(theme);
|
|
95
95
|
|
|
96
|
-
// Handle validation result
|
|
96
|
+
// Handle validation result - call callback when RESULT step is reached
|
|
97
97
|
useEffect(() => {
|
|
98
|
-
if (state.validationResult) {
|
|
98
|
+
if (state.currentStep === SDKStep.RESULT && state.validationResult) {
|
|
99
|
+
// Call callback automatically when validation completes
|
|
99
100
|
onValidationComplete(state.validationResult);
|
|
100
101
|
}
|
|
101
|
-
}, [state.validationResult, onValidationComplete]);
|
|
102
|
+
}, [state.currentStep, state.validationResult, onValidationComplete]);
|
|
102
103
|
|
|
103
104
|
// Handle error
|
|
104
105
|
useEffect(() => {
|
|
@@ -251,7 +252,10 @@ export const BiometricIdentityFlow: React.FC<BiometricIdentityFlowProps> = ({
|
|
|
251
252
|
result={state.validationResult}
|
|
252
253
|
theme={theme}
|
|
253
254
|
language={language}
|
|
254
|
-
onClose={() =>
|
|
255
|
+
onClose={() => {
|
|
256
|
+
// Callback already called automatically when RESULT step was reached
|
|
257
|
+
// This onClose is just for UI cleanup/navigation
|
|
258
|
+
}}
|
|
255
259
|
/>
|
|
256
260
|
);
|
|
257
261
|
}
|