@nocios/crudify-ui 1.0.58 → 1.0.59
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 +48 -3
- package/dist/index.mjs +48 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -175,22 +175,50 @@ var useCrudifyLogin = (config, _options = {}) => {
|
|
|
175
175
|
};
|
|
176
176
|
}, [config]);
|
|
177
177
|
(0, import_react3.useEffect)(() => {
|
|
178
|
-
|
|
178
|
+
console.log("\u{1F527} useCrudifyLogin useEffect triggered:", {
|
|
179
|
+
publicApiKey: !!finalConfig.publicApiKey,
|
|
180
|
+
env: finalConfig.env,
|
|
181
|
+
hasPublicApiKey: !!finalConfig.publicApiKey
|
|
182
|
+
});
|
|
183
|
+
if (!finalConfig.publicApiKey) {
|
|
184
|
+
console.log("\u274C No publicApiKey, skipping crudify initialization");
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
179
187
|
try {
|
|
188
|
+
console.log("\u2699\uFE0F Configuring crudify with env:", finalConfig.env);
|
|
180
189
|
import_crudify_browser.default.config(finalConfig.env);
|
|
190
|
+
console.log("\u{1F680} Initializing crudify with publicApiKey:", finalConfig.publicApiKey.substring(0, 10) + "...");
|
|
181
191
|
import_crudify_browser.default.init(finalConfig.publicApiKey, "none");
|
|
192
|
+
console.log("\u2705 Crudify initialization completed");
|
|
193
|
+
console.log("\u{1F50D} Crudify state after init:", {
|
|
194
|
+
hasTransaction: typeof import_crudify_browser.default.transaction === "function",
|
|
195
|
+
hasLogin: typeof import_crudify_browser.default.login === "function",
|
|
196
|
+
crudifyObject: import_crudify_browser.default
|
|
197
|
+
});
|
|
182
198
|
} catch (error) {
|
|
183
|
-
console.error("Error initializing crudify:", error);
|
|
199
|
+
console.error("\u274C Error initializing crudify:", error);
|
|
184
200
|
}
|
|
185
201
|
}, [finalConfig.publicApiKey, finalConfig.env]);
|
|
186
202
|
const crudifyMethods = (0, import_react3.useMemo)(() => {
|
|
203
|
+
console.log("\u{1F504} crudifyMethods useMemo triggered:", {
|
|
204
|
+
publicApiKey: !!finalConfig.publicApiKey,
|
|
205
|
+
crudifyLogin: typeof import_crudify_browser.default.login,
|
|
206
|
+
crudifyTransaction: typeof import_crudify_browser.default.transaction
|
|
207
|
+
});
|
|
187
208
|
if (!finalConfig.publicApiKey) {
|
|
209
|
+
console.log("\u274C No publicApiKey, returning null crudifyMethods");
|
|
188
210
|
return null;
|
|
189
211
|
}
|
|
190
|
-
|
|
212
|
+
const methods = {
|
|
191
213
|
login: import_crudify_browser.default.login,
|
|
192
214
|
transaction: import_crudify_browser.default.transaction
|
|
193
215
|
};
|
|
216
|
+
console.log("\u2705 Returning crudifyMethods:", {
|
|
217
|
+
hasLogin: typeof methods.login === "function",
|
|
218
|
+
hasTransaction: typeof methods.transaction === "function",
|
|
219
|
+
methods
|
|
220
|
+
});
|
|
221
|
+
return methods;
|
|
194
222
|
}, [finalConfig.publicApiKey]);
|
|
195
223
|
return { crudify: crudifyMethods };
|
|
196
224
|
};
|
|
@@ -774,10 +802,26 @@ var ResetPasswordForm = ({ config, onNavigate, onError, searchParams, onResetSuc
|
|
|
774
802
|
setTimeout(() => onNavigate?.("/login/forgotPassword"), 3e3);
|
|
775
803
|
}, [searchParams, crudify3, t, onNavigate]);
|
|
776
804
|
(0, import_react6.useEffect)(() => {
|
|
805
|
+
console.log("\u{1F504} Pending validation useEffect triggered:", {
|
|
806
|
+
crudify: !!crudify3,
|
|
807
|
+
pendingValidation,
|
|
808
|
+
crudifyType: typeof crudify3,
|
|
809
|
+
crudifyKeys: crudify3 ? Object.keys(crudify3) : null
|
|
810
|
+
});
|
|
777
811
|
if (crudify3 && pendingValidation) {
|
|
778
812
|
console.log("\u{1F680} Crudify ready! Executing pending validation:", pendingValidation);
|
|
813
|
+
console.log("\u{1F50D} Crudify object details:", {
|
|
814
|
+
hasTransaction: typeof crudify3.transaction === "function",
|
|
815
|
+
hasInit: typeof crudify3.init === "function",
|
|
816
|
+
crudifyInstance: crudify3
|
|
817
|
+
});
|
|
779
818
|
const validateCode = async (emailToValidate, codeToValidate) => {
|
|
780
819
|
console.log("\u{1F50D} Validating reset code:", { emailToValidate, codeToValidate });
|
|
820
|
+
console.log("\u{1F4CB} Pre-validation crudify check:", {
|
|
821
|
+
crudify: !!crudify3,
|
|
822
|
+
transaction: typeof crudify3?.transaction,
|
|
823
|
+
crudifyString: crudify3?.toString?.()
|
|
824
|
+
});
|
|
781
825
|
try {
|
|
782
826
|
const data = [
|
|
783
827
|
{
|
|
@@ -786,6 +830,7 @@ var ResetPasswordForm = ({ config, onNavigate, onError, searchParams, onResetSuc
|
|
|
786
830
|
}
|
|
787
831
|
];
|
|
788
832
|
console.log("\u{1F4E4} Sending validation request:", data);
|
|
833
|
+
console.log("\u{1F3AF} About to call crudify.transaction...");
|
|
789
834
|
const response = await crudify3.transaction(data);
|
|
790
835
|
console.log("\u{1F4E5} Validation response:", response);
|
|
791
836
|
if (response.success) {
|
package/dist/index.mjs
CHANGED
|
@@ -131,22 +131,50 @@ var useCrudifyLogin = (config, _options = {}) => {
|
|
|
131
131
|
};
|
|
132
132
|
}, [config]);
|
|
133
133
|
useEffect2(() => {
|
|
134
|
-
|
|
134
|
+
console.log("\u{1F527} useCrudifyLogin useEffect triggered:", {
|
|
135
|
+
publicApiKey: !!finalConfig.publicApiKey,
|
|
136
|
+
env: finalConfig.env,
|
|
137
|
+
hasPublicApiKey: !!finalConfig.publicApiKey
|
|
138
|
+
});
|
|
139
|
+
if (!finalConfig.publicApiKey) {
|
|
140
|
+
console.log("\u274C No publicApiKey, skipping crudify initialization");
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
135
143
|
try {
|
|
144
|
+
console.log("\u2699\uFE0F Configuring crudify with env:", finalConfig.env);
|
|
136
145
|
crudify.config(finalConfig.env);
|
|
146
|
+
console.log("\u{1F680} Initializing crudify with publicApiKey:", finalConfig.publicApiKey.substring(0, 10) + "...");
|
|
137
147
|
crudify.init(finalConfig.publicApiKey, "none");
|
|
148
|
+
console.log("\u2705 Crudify initialization completed");
|
|
149
|
+
console.log("\u{1F50D} Crudify state after init:", {
|
|
150
|
+
hasTransaction: typeof crudify.transaction === "function",
|
|
151
|
+
hasLogin: typeof crudify.login === "function",
|
|
152
|
+
crudifyObject: crudify
|
|
153
|
+
});
|
|
138
154
|
} catch (error) {
|
|
139
|
-
console.error("Error initializing crudify:", error);
|
|
155
|
+
console.error("\u274C Error initializing crudify:", error);
|
|
140
156
|
}
|
|
141
157
|
}, [finalConfig.publicApiKey, finalConfig.env]);
|
|
142
158
|
const crudifyMethods = useMemo2(() => {
|
|
159
|
+
console.log("\u{1F504} crudifyMethods useMemo triggered:", {
|
|
160
|
+
publicApiKey: !!finalConfig.publicApiKey,
|
|
161
|
+
crudifyLogin: typeof crudify.login,
|
|
162
|
+
crudifyTransaction: typeof crudify.transaction
|
|
163
|
+
});
|
|
143
164
|
if (!finalConfig.publicApiKey) {
|
|
165
|
+
console.log("\u274C No publicApiKey, returning null crudifyMethods");
|
|
144
166
|
return null;
|
|
145
167
|
}
|
|
146
|
-
|
|
168
|
+
const methods = {
|
|
147
169
|
login: crudify.login,
|
|
148
170
|
transaction: crudify.transaction
|
|
149
171
|
};
|
|
172
|
+
console.log("\u2705 Returning crudifyMethods:", {
|
|
173
|
+
hasLogin: typeof methods.login === "function",
|
|
174
|
+
hasTransaction: typeof methods.transaction === "function",
|
|
175
|
+
methods
|
|
176
|
+
});
|
|
177
|
+
return methods;
|
|
150
178
|
}, [finalConfig.publicApiKey]);
|
|
151
179
|
return { crudify: crudifyMethods };
|
|
152
180
|
};
|
|
@@ -730,10 +758,26 @@ var ResetPasswordForm = ({ config, onNavigate, onError, searchParams, onResetSuc
|
|
|
730
758
|
setTimeout(() => onNavigate?.("/login/forgotPassword"), 3e3);
|
|
731
759
|
}, [searchParams, crudify3, t, onNavigate]);
|
|
732
760
|
useEffect4(() => {
|
|
761
|
+
console.log("\u{1F504} Pending validation useEffect triggered:", {
|
|
762
|
+
crudify: !!crudify3,
|
|
763
|
+
pendingValidation,
|
|
764
|
+
crudifyType: typeof crudify3,
|
|
765
|
+
crudifyKeys: crudify3 ? Object.keys(crudify3) : null
|
|
766
|
+
});
|
|
733
767
|
if (crudify3 && pendingValidation) {
|
|
734
768
|
console.log("\u{1F680} Crudify ready! Executing pending validation:", pendingValidation);
|
|
769
|
+
console.log("\u{1F50D} Crudify object details:", {
|
|
770
|
+
hasTransaction: typeof crudify3.transaction === "function",
|
|
771
|
+
hasInit: typeof crudify3.init === "function",
|
|
772
|
+
crudifyInstance: crudify3
|
|
773
|
+
});
|
|
735
774
|
const validateCode = async (emailToValidate, codeToValidate) => {
|
|
736
775
|
console.log("\u{1F50D} Validating reset code:", { emailToValidate, codeToValidate });
|
|
776
|
+
console.log("\u{1F4CB} Pre-validation crudify check:", {
|
|
777
|
+
crudify: !!crudify3,
|
|
778
|
+
transaction: typeof crudify3?.transaction,
|
|
779
|
+
crudifyString: crudify3?.toString?.()
|
|
780
|
+
});
|
|
737
781
|
try {
|
|
738
782
|
const data = [
|
|
739
783
|
{
|
|
@@ -742,6 +786,7 @@ var ResetPasswordForm = ({ config, onNavigate, onError, searchParams, onResetSuc
|
|
|
742
786
|
}
|
|
743
787
|
];
|
|
744
788
|
console.log("\u{1F4E4} Sending validation request:", data);
|
|
789
|
+
console.log("\u{1F3AF} About to call crudify.transaction...");
|
|
745
790
|
const response = await crudify3.transaction(data);
|
|
746
791
|
console.log("\u{1F4E5} Validation response:", response);
|
|
747
792
|
if (response.success) {
|