@notificationapi/react 0.0.31 → 0.0.32

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.
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import "../../assets/index3.js";
2
+ import "../../assets/presets.js";
3
3
  import "../Notifications/interface.js";
4
4
  import { a as r, g as m } from "../../assets/channelUtils.js";
5
5
  export {
@@ -221,54 +221,46 @@ const J = async (e, s, i, a, f, w, p) => {
221
221
  },
222
222
  [i.initialLoadMaxCount, O]
223
223
  ), R = async (o) => {
224
- if (!a)
225
- return;
224
+ if (!a) return;
226
225
  const r = (/* @__PURE__ */ new Date()).toISOString(), t = a.filter((c) => o.includes(c.id) && !c.clicked).map((c) => c.id);
227
226
  u.updateInAppNotifications({ ids: t, clicked: !0 }), f((c) => {
228
- if (!c)
229
- return [];
227
+ if (!c) return [];
230
228
  const d = [...c];
231
229
  return d.filter((I) => t.includes(I.id)).forEach((I) => {
232
230
  I.clicked = r;
233
231
  }), d;
234
232
  });
235
233
  }, $ = async () => {
236
- if (!a)
237
- return;
234
+ if (!a) return;
238
235
  const o = (/* @__PURE__ */ new Date()).toISOString(), r = a.filter((t) => !t.opened || !t.seen).map((t) => t.id);
239
236
  r.length !== 0 && (u.updateInAppNotifications({
240
237
  ids: r,
241
238
  opened: !0
242
239
  }), f((t) => {
243
- if (!t)
244
- return [];
240
+ if (!t) return [];
245
241
  const c = [...t];
246
242
  return c.filter((d) => r.includes(d.id)).forEach((d) => {
247
243
  d.opened = o, d.seen = !0;
248
244
  }), c;
249
245
  }));
250
246
  }, j = async (o) => {
251
- if (!a)
252
- return;
247
+ if (!a) return;
253
248
  const r = a.filter((t) => t.archived && (o === "ALL" || o.includes(t.id))).map((t) => t.id);
254
249
  r.length !== 0 && (u.updateInAppNotifications({
255
250
  ids: r,
256
251
  archived: !1
257
252
  }), f((t) => {
258
- if (!t)
259
- return [];
253
+ if (!t) return [];
260
254
  const c = [...t];
261
255
  return c.filter((d) => r.includes(d.id)).forEach((d) => {
262
256
  d.archived = void 0;
263
257
  }), c;
264
258
  }));
265
259
  }, T = async (o) => {
266
- if (!a)
267
- return;
260
+ if (!a) return;
268
261
  const r = (/* @__PURE__ */ new Date()).toISOString(), t = a.filter((c) => !c.archived && (o === "ALL" || o.includes(c.id))).map((c) => c.id);
269
262
  t.length !== 0 && (u.updateInAppNotifications({ ids: t, archived: !0 }), f((c) => {
270
- if (!c)
271
- return [];
263
+ if (!c) return [];
272
264
  const d = [...c];
273
265
  return d.filter((I) => t.includes(I.id)).forEach((I) => {
274
266
  I.archived = r;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@notificationapi/react",
3
3
  "private": false,
4
- "version": "0.0.31",
4
+ "version": "0.0.32",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -13,14 +13,14 @@
13
13
  "prepublishOnly": "npm run build"
14
14
  },
15
15
  "peerDependencies": {
16
- "react": "^16.14.0",
17
- "react-dom": "^16.14.0"
16
+ "react": "^17.0.2",
17
+ "react-dom": "^17.0.2"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@ant-design/icons": "^5.3.6",
21
21
  "@types/node": "^20.12.7",
22
- "@types/react": "^16.14.0",
23
- "@types/react-dom": "^16.9.8",
22
+ "@types/react": "^17.0.38",
23
+ "@types/react-dom": "^17.0.11",
24
24
  "@typescript-eslint/eslint-plugin": "^7.2.0",
25
25
  "@typescript-eslint/parser": "^7.2.0",
26
26
  "@vitejs/plugin-react": "^4.2.1",