@nocios/crudify-ui 1.0.68 → 1.0.69
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 +27 -0
- package/dist/index.mjs +27 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -672,6 +672,11 @@ var ResetPasswordForm = ({ onNavigate, onError, searchParams, onResetSuccess, cr
|
|
|
672
672
|
const [isValidating, setIsValidating] = (0, import_react5.useState)(false);
|
|
673
673
|
const { t } = useTranslation();
|
|
674
674
|
(0, import_react5.useEffect)(() => {
|
|
675
|
+
if (!searchParams) {
|
|
676
|
+
console.log("\u{1F504} No searchParams yet, waiting...");
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
console.log("\u{1F504} Processing searchParams:", searchParams.toString());
|
|
675
680
|
if (searchParams) {
|
|
676
681
|
const fromCodeVerificationParam = searchParams.get("fromCodeVerification");
|
|
677
682
|
const emailParam = searchParams.get("email");
|
|
@@ -749,11 +754,33 @@ var ResetPasswordForm = ({ onNavigate, onError, searchParams, onResetSuccess, cr
|
|
|
749
754
|
console.log("\u{1F3AF} About to call crudify.transaction...");
|
|
750
755
|
const response = await crudify3.transaction(data);
|
|
751
756
|
console.log("\u{1F4E5} Validation response:", response);
|
|
757
|
+
console.log("\u{1F4E5} Raw response type:", typeof response);
|
|
758
|
+
console.log("\u{1F4E5} Response keys:", Object.keys(response));
|
|
759
|
+
if (response.data) {
|
|
760
|
+
console.log("\u{1F4E5} Response.data type:", typeof response.data);
|
|
761
|
+
console.log("\u{1F4E5} Response.data content:", response.data);
|
|
762
|
+
}
|
|
763
|
+
if (response.data && Array.isArray(response.data)) {
|
|
764
|
+
console.log("\u{1F50D} Checking array response data:", response.data);
|
|
765
|
+
const validationResult = response.data[0];
|
|
766
|
+
if (validationResult && validationResult.response && validationResult.response.status === "OK") {
|
|
767
|
+
console.log("\u2705 Code validation successful (from array data)");
|
|
768
|
+
setCodeValidated(true);
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
752
772
|
if (response.success) {
|
|
753
773
|
console.log("\u2705 Code validation successful");
|
|
754
774
|
setCodeValidated(true);
|
|
755
775
|
} else {
|
|
756
776
|
console.log("\u274C Code validation failed:", response);
|
|
777
|
+
console.log("\u274C Full error details:", {
|
|
778
|
+
success: response.success,
|
|
779
|
+
data: response.data,
|
|
780
|
+
errors: response.errors,
|
|
781
|
+
errorCode: response.errorCode,
|
|
782
|
+
fieldsWarning: response.fieldsWarning
|
|
783
|
+
});
|
|
757
784
|
if (response.data?.response?.status === "TOO_MANY_REQUESTS") {
|
|
758
785
|
setErrors([t("errors.auth.TOO_MANY_REQUESTS")]);
|
|
759
786
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -628,6 +628,11 @@ var ResetPasswordForm = ({ onNavigate, onError, searchParams, onResetSuccess, cr
|
|
|
628
628
|
const [isValidating, setIsValidating] = useState4(false);
|
|
629
629
|
const { t } = useTranslation();
|
|
630
630
|
useEffect3(() => {
|
|
631
|
+
if (!searchParams) {
|
|
632
|
+
console.log("\u{1F504} No searchParams yet, waiting...");
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
console.log("\u{1F504} Processing searchParams:", searchParams.toString());
|
|
631
636
|
if (searchParams) {
|
|
632
637
|
const fromCodeVerificationParam = searchParams.get("fromCodeVerification");
|
|
633
638
|
const emailParam = searchParams.get("email");
|
|
@@ -705,11 +710,33 @@ var ResetPasswordForm = ({ onNavigate, onError, searchParams, onResetSuccess, cr
|
|
|
705
710
|
console.log("\u{1F3AF} About to call crudify.transaction...");
|
|
706
711
|
const response = await crudify3.transaction(data);
|
|
707
712
|
console.log("\u{1F4E5} Validation response:", response);
|
|
713
|
+
console.log("\u{1F4E5} Raw response type:", typeof response);
|
|
714
|
+
console.log("\u{1F4E5} Response keys:", Object.keys(response));
|
|
715
|
+
if (response.data) {
|
|
716
|
+
console.log("\u{1F4E5} Response.data type:", typeof response.data);
|
|
717
|
+
console.log("\u{1F4E5} Response.data content:", response.data);
|
|
718
|
+
}
|
|
719
|
+
if (response.data && Array.isArray(response.data)) {
|
|
720
|
+
console.log("\u{1F50D} Checking array response data:", response.data);
|
|
721
|
+
const validationResult = response.data[0];
|
|
722
|
+
if (validationResult && validationResult.response && validationResult.response.status === "OK") {
|
|
723
|
+
console.log("\u2705 Code validation successful (from array data)");
|
|
724
|
+
setCodeValidated(true);
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
708
728
|
if (response.success) {
|
|
709
729
|
console.log("\u2705 Code validation successful");
|
|
710
730
|
setCodeValidated(true);
|
|
711
731
|
} else {
|
|
712
732
|
console.log("\u274C Code validation failed:", response);
|
|
733
|
+
console.log("\u274C Full error details:", {
|
|
734
|
+
success: response.success,
|
|
735
|
+
data: response.data,
|
|
736
|
+
errors: response.errors,
|
|
737
|
+
errorCode: response.errorCode,
|
|
738
|
+
fieldsWarning: response.fieldsWarning
|
|
739
|
+
});
|
|
713
740
|
if (response.data?.response?.status === "TOO_MANY_REQUESTS") {
|
|
714
741
|
setErrors([t("errors.auth.TOO_MANY_REQUESTS")]);
|
|
715
742
|
} else {
|