@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.
- package/dist/assets/AntdIcon.js +4 -4
- package/dist/assets/Notification.js +3094 -2713
- package/dist/assets/PurePanel.js +2 -2
- package/dist/assets/RightOutlined.js +1 -1
- package/dist/assets/button.js +1394 -577
- package/dist/assets/channelUtils.js +1 -1
- package/dist/assets/colors.js +14798 -14301
- package/dist/assets/index.js +156 -158
- package/dist/assets/index2.js +212 -221
- package/dist/assets/index3.js +8307 -724
- package/dist/assets/pickAttrs.js +1 -1
- package/dist/assets/presets.js +810 -0
- package/dist/components/Notifications/Inbox.js +3520 -3323
- package/dist/components/Notifications/InboxHeader.d.ts +1 -2
- package/dist/components/Notifications/InboxHeader.js +2 -2
- package/dist/components/Notifications/Notification.js +1 -1
- package/dist/components/Notifications/NotificationFeed.js +1 -2
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -2
- package/dist/components/Preferences/NotificationPreferencesPopup.d.ts +1 -2
- package/dist/components/Preferences/NotificationPreferencesPopup.js +1423 -857
- package/dist/components/Preferences/PreferenceInput.d.ts +1 -1
- package/dist/components/Preferences/PreferenceInput.js +843 -812
- package/dist/components/Preferences/Preferences.d.ts +1 -2
- package/dist/components/Preferences/Preferences.js +331 -328
- package/dist/components/Preferences/channelUtils.js +1 -1
- package/dist/components/Provider/index.js +8 -16
- package/package.json +5 -5
- package/dist/assets/index4.js +0 -8408
|
@@ -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.
|
|
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": "^
|
|
17
|
-
"react-dom": "^
|
|
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": "^
|
|
23
|
-
"@types/react-dom": "^
|
|
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",
|