@abdellatifui/react 3.2.56 → 3.2.57
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/nextgen.js +18 -15
- package/package.json +1 -1
package/dist/nextgen.js
CHANGED
|
@@ -22529,26 +22529,29 @@ const Kd = An({ name: "", onChange: () => {
|
|
|
22529
22529
|
}, []), q(() => {
|
|
22530
22530
|
if (!S || !h || !w.connected) return;
|
|
22531
22531
|
console.log("Mounting Notification Listener ...");
|
|
22532
|
-
const v = (
|
|
22533
|
-
if (console.log("API : Coming Notification : ",
|
|
22534
|
-
const
|
|
22532
|
+
const v = (A) => {
|
|
22533
|
+
if (console.log("API : Coming Notification : ", A), A?._role === "alert") {
|
|
22534
|
+
const T = A?.status === 200;
|
|
22535
22535
|
abui?.alert?.({
|
|
22536
|
-
error: !
|
|
22537
|
-
success:
|
|
22538
|
-
body:
|
|
22539
|
-
...
|
|
22536
|
+
error: !T,
|
|
22537
|
+
success: T,
|
|
22538
|
+
body: A?.message,
|
|
22539
|
+
...A?._options
|
|
22540
22540
|
});
|
|
22541
|
-
} else if (
|
|
22542
|
-
const
|
|
22541
|
+
} else if (A?._role === "toast") {
|
|
22542
|
+
const T = A?.status === 200 ? "success" : "error";
|
|
22543
22543
|
abui?.toast?.({
|
|
22544
|
-
body:
|
|
22545
|
-
type:
|
|
22546
|
-
...
|
|
22544
|
+
body: A?.message,
|
|
22545
|
+
type: T,
|
|
22546
|
+
...A?._options
|
|
22547
22547
|
});
|
|
22548
22548
|
}
|
|
22549
|
+
}, E = (A) => {
|
|
22550
|
+
const { url: T } = A;
|
|
22551
|
+
window.open(T, "_self");
|
|
22549
22552
|
};
|
|
22550
|
-
return w.on("/stream/notify", v), () => {
|
|
22551
|
-
console.log("Unmounting Notification Listener ..."), w.off("/stream/notify", v);
|
|
22553
|
+
return w.on("/stream/notify", v), w.on("/stream/redirect", E), () => {
|
|
22554
|
+
console.log("Unmounting Notification Listener ..."), w.off("/stream/notify", v), w.off("/stream/redirect", E);
|
|
22552
22555
|
};
|
|
22553
22556
|
}, [h, S, w?.connected]);
|
|
22554
22557
|
const x = oe((v) => async (...E) => {
|
|
@@ -22563,7 +22566,7 @@ const Kd = An({ name: "", onChange: () => {
|
|
|
22563
22566
|
return T;
|
|
22564
22567
|
} catch (T) {
|
|
22565
22568
|
const _ = T;
|
|
22566
|
-
|
|
22569
|
+
return l && l(_), u && u(_), _;
|
|
22567
22570
|
}
|
|
22568
22571
|
}, [f, a, u, p, l]), k = le(() => {
|
|
22569
22572
|
const v = up.create({
|