@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.
Files changed (2) hide show
  1. package/dist/nextgen.js +18 -15
  2. 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 = (E) => {
22533
- if (console.log("API : Coming Notification : ", E), E?._role === "alert") {
22534
- const A = E?.status === 200;
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: !A,
22537
- success: A,
22538
- body: E?.message,
22539
- ...E?._options
22536
+ error: !T,
22537
+ success: T,
22538
+ body: A?.message,
22539
+ ...A?._options
22540
22540
  });
22541
- } else if (E?._role === "toast") {
22542
- const A = E?.status === 200 ? "success" : "error";
22541
+ } else if (A?._role === "toast") {
22542
+ const T = A?.status === 200 ? "success" : "error";
22543
22543
  abui?.toast?.({
22544
- body: E?.message,
22545
- type: A,
22546
- ...E?._options
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
- throw l && l(_), u && u(_), T;
22569
+ return l && l(_), u && u(_), _;
22567
22570
  }
22568
22571
  }, [f, a, u, p, l]), k = le(() => {
22569
22572
  const v = up.create({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abdellatifui/react",
3
3
  "private": false,
4
- "version": "3.2.56",
4
+ "version": "3.2.57",
5
5
  "type": "module",
6
6
  "types": "dist/nextgen.d.ts",
7
7
  "files": [