@nocios/crudify-ui 1.0.73 → 1.0.75
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 -9
- package/dist/index.mjs +27 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -256,6 +256,11 @@ function loginStateReducer(state, action) {
|
|
|
256
256
|
oldScreen: state.currentScreen,
|
|
257
257
|
newScreen: newState.currentScreen,
|
|
258
258
|
oldParams: state.searchParams,
|
|
259
|
+
newParams: newState.searchParams,
|
|
260
|
+
urlBefore: window.location.search
|
|
261
|
+
});
|
|
262
|
+
console.log("\u{1F310} LoginStateReducer - Browser URL management needed?", {
|
|
263
|
+
newScreen: newState.currentScreen,
|
|
259
264
|
newParams: newState.searchParams
|
|
260
265
|
});
|
|
261
266
|
return newState;
|
|
@@ -274,10 +279,13 @@ function loginStateReducer(state, action) {
|
|
|
274
279
|
// Clear related errors when updating form data
|
|
275
280
|
errors: {
|
|
276
281
|
...state.errors,
|
|
277
|
-
...Object.keys(action.payload).reduce(
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
...Object.keys(action.payload).reduce(
|
|
283
|
+
(acc, key) => ({
|
|
284
|
+
...acc,
|
|
285
|
+
[key]: void 0
|
|
286
|
+
}),
|
|
287
|
+
{}
|
|
288
|
+
)
|
|
281
289
|
}
|
|
282
290
|
};
|
|
283
291
|
case "SET_LOADING":
|
|
@@ -1112,6 +1120,8 @@ var ForgotPasswordForm = ({ onScreenChange, onError }) => {
|
|
|
1112
1120
|
}
|
|
1113
1121
|
};
|
|
1114
1122
|
const handleBack = () => {
|
|
1123
|
+
console.log("\u{1F4E7} ForgotPasswordForm - handleBack called");
|
|
1124
|
+
console.log("\u{1F4E7} ForgotPasswordForm - Navigating back to login");
|
|
1115
1125
|
onScreenChange?.("login");
|
|
1116
1126
|
};
|
|
1117
1127
|
const handleGoToCheckCode = () => {
|
|
@@ -1560,7 +1570,8 @@ var CheckCodeForm = ({ onScreenChange, onError, searchParams }) => {
|
|
|
1560
1570
|
}
|
|
1561
1571
|
};
|
|
1562
1572
|
const handleBack = () => {
|
|
1563
|
-
console.log("\u{1F522} CheckCodeForm - handleBack called");
|
|
1573
|
+
console.log("\u{1F522} CheckCodeForm - handleBack called, current searchParams:", searchParams);
|
|
1574
|
+
console.log("\u{1F522} CheckCodeForm - Navigating back to forgotPassword");
|
|
1564
1575
|
onScreenChange?.("forgotPassword");
|
|
1565
1576
|
};
|
|
1566
1577
|
const handleCodeChange = (event) => {
|
|
@@ -1706,11 +1717,18 @@ var CrudifyLoginInternal = ({
|
|
|
1706
1717
|
currentScreen: state.currentScreen,
|
|
1707
1718
|
newScreen: screen2,
|
|
1708
1719
|
params,
|
|
1709
|
-
stateSearchParams: state.searchParams
|
|
1720
|
+
stateSearchParams: state.searchParams,
|
|
1721
|
+
urlBeforeChange: window.location.search
|
|
1710
1722
|
});
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1723
|
+
let finalParams = params;
|
|
1724
|
+
if (screen2 === "login") {
|
|
1725
|
+
console.log("\u{1F9F9} CrudifyLoginInternal - Navigating to login, should clear email param from URL");
|
|
1726
|
+
} else if (screen2 === "forgotPassword") {
|
|
1727
|
+
console.log("\u{1F9F9} CrudifyLoginInternal - Navigating to forgotPassword, checking if email should be preserved");
|
|
1728
|
+
}
|
|
1729
|
+
setScreen(screen2, finalParams);
|
|
1730
|
+
onScreenChange?.(screen2, finalParams);
|
|
1731
|
+
console.log("\u2705 CrudifyLoginInternal - screen change completed, URL after:", window.location.search);
|
|
1714
1732
|
};
|
|
1715
1733
|
const renderCurrentForm = () => {
|
|
1716
1734
|
console.log("\u{1F3A8} CrudifyLoginInternal - renderCurrentForm called:", {
|
package/dist/index.mjs
CHANGED
|
@@ -205,6 +205,11 @@ function loginStateReducer(state, action) {
|
|
|
205
205
|
oldScreen: state.currentScreen,
|
|
206
206
|
newScreen: newState.currentScreen,
|
|
207
207
|
oldParams: state.searchParams,
|
|
208
|
+
newParams: newState.searchParams,
|
|
209
|
+
urlBefore: window.location.search
|
|
210
|
+
});
|
|
211
|
+
console.log("\u{1F310} LoginStateReducer - Browser URL management needed?", {
|
|
212
|
+
newScreen: newState.currentScreen,
|
|
208
213
|
newParams: newState.searchParams
|
|
209
214
|
});
|
|
210
215
|
return newState;
|
|
@@ -223,10 +228,13 @@ function loginStateReducer(state, action) {
|
|
|
223
228
|
// Clear related errors when updating form data
|
|
224
229
|
errors: {
|
|
225
230
|
...state.errors,
|
|
226
|
-
...Object.keys(action.payload).reduce(
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
231
|
+
...Object.keys(action.payload).reduce(
|
|
232
|
+
(acc, key) => ({
|
|
233
|
+
...acc,
|
|
234
|
+
[key]: void 0
|
|
235
|
+
}),
|
|
236
|
+
{}
|
|
237
|
+
)
|
|
230
238
|
}
|
|
231
239
|
};
|
|
232
240
|
case "SET_LOADING":
|
|
@@ -1061,6 +1069,8 @@ var ForgotPasswordForm = ({ onScreenChange, onError }) => {
|
|
|
1061
1069
|
}
|
|
1062
1070
|
};
|
|
1063
1071
|
const handleBack = () => {
|
|
1072
|
+
console.log("\u{1F4E7} ForgotPasswordForm - handleBack called");
|
|
1073
|
+
console.log("\u{1F4E7} ForgotPasswordForm - Navigating back to login");
|
|
1064
1074
|
onScreenChange?.("login");
|
|
1065
1075
|
};
|
|
1066
1076
|
const handleGoToCheckCode = () => {
|
|
@@ -1509,7 +1519,8 @@ var CheckCodeForm = ({ onScreenChange, onError, searchParams }) => {
|
|
|
1509
1519
|
}
|
|
1510
1520
|
};
|
|
1511
1521
|
const handleBack = () => {
|
|
1512
|
-
console.log("\u{1F522} CheckCodeForm - handleBack called");
|
|
1522
|
+
console.log("\u{1F522} CheckCodeForm - handleBack called, current searchParams:", searchParams);
|
|
1523
|
+
console.log("\u{1F522} CheckCodeForm - Navigating back to forgotPassword");
|
|
1513
1524
|
onScreenChange?.("forgotPassword");
|
|
1514
1525
|
};
|
|
1515
1526
|
const handleCodeChange = (event) => {
|
|
@@ -1655,11 +1666,18 @@ var CrudifyLoginInternal = ({
|
|
|
1655
1666
|
currentScreen: state.currentScreen,
|
|
1656
1667
|
newScreen: screen2,
|
|
1657
1668
|
params,
|
|
1658
|
-
stateSearchParams: state.searchParams
|
|
1669
|
+
stateSearchParams: state.searchParams,
|
|
1670
|
+
urlBeforeChange: window.location.search
|
|
1659
1671
|
});
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1672
|
+
let finalParams = params;
|
|
1673
|
+
if (screen2 === "login") {
|
|
1674
|
+
console.log("\u{1F9F9} CrudifyLoginInternal - Navigating to login, should clear email param from URL");
|
|
1675
|
+
} else if (screen2 === "forgotPassword") {
|
|
1676
|
+
console.log("\u{1F9F9} CrudifyLoginInternal - Navigating to forgotPassword, checking if email should be preserved");
|
|
1677
|
+
}
|
|
1678
|
+
setScreen(screen2, finalParams);
|
|
1679
|
+
onScreenChange?.(screen2, finalParams);
|
|
1680
|
+
console.log("\u2705 CrudifyLoginInternal - screen change completed, URL after:", window.location.search);
|
|
1663
1681
|
};
|
|
1664
1682
|
const renderCurrentForm = () => {
|
|
1665
1683
|
console.log("\u{1F3A8} CrudifyLoginInternal - renderCurrentForm called:", {
|