@notificationapi/react 0.0.23 → 0.0.25
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 +200 -0
- package/dist/assets/Notification.js +127 -120
- package/dist/assets/PurePanel.js +69 -0
- package/dist/assets/RightOutlined.js +13 -0
- package/dist/assets/button.js +19 -18
- package/dist/assets/channelUtils.js +77 -0
- package/dist/assets/colors.js +8534 -9304
- package/dist/assets/index.js +16 -15
- package/dist/assets/index2.js +33 -32
- package/dist/assets/index3.js +722 -8531
- package/dist/assets/index4.js +8408 -0
- package/dist/assets/pickAttrs.js +42 -0
- package/dist/components/Notifications/Inbox.d.ts +3 -7
- package/dist/components/Notifications/Inbox.js +6250 -8
- package/dist/components/Notifications/InboxHeader.d.ts +1 -1
- package/dist/components/Notifications/InboxHeader.js +8 -7
- package/dist/components/Notifications/Notification.d.ts +2 -5
- package/dist/components/Notifications/Notification.js +3 -4
- package/dist/components/Notifications/NotificationCounter.d.ts +2 -2
- package/dist/components/Notifications/NotificationFeed.d.ts +4 -5
- package/dist/components/Notifications/NotificationFeed.js +28 -26
- package/dist/components/Notifications/NotificationLauncher.d.ts +1 -6
- package/dist/components/Notifications/NotificationLauncher.js +16 -18
- package/dist/components/Notifications/NotificationPopup.d.ts +5 -9
- package/dist/components/Notifications/NotificationPopup.js +119 -12
- package/dist/components/Notifications/UnreadBadge.d.ts +4 -7
- package/dist/components/Notifications/UnreadBadge.js +8 -10
- package/dist/components/Notifications/index.js +5 -5
- package/dist/components/Notifications/interface.d.ts +46 -0
- package/dist/components/Notifications/interface.js +19 -0
- package/dist/components/Preferences/NotificationPreferencesInline.d.ts +1 -1
- package/dist/components/Preferences/NotificationPreferencesInline.js +1 -1
- package/dist/components/Preferences/NotificationPreferencesPopup.js +1503 -4
- package/dist/components/Preferences/PreferenceInput.d.ts +5 -4
- package/dist/components/Preferences/PreferenceInput.js +1435 -4
- package/dist/components/Preferences/Preferences.d.ts +1 -4
- package/dist/components/Preferences/Preferences.js +581 -8
- package/dist/components/Preferences/channelUtils.d.ts +4 -0
- package/dist/components/Preferences/channelUtils.js +8 -0
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/index.d.ts +2 -2
- package/dist/components/Provider/index.js +150 -126
- package/dist/main.d.ts +2 -2
- package/dist/main.js +9 -9
- package/package.json +5 -2
- package/dist/assets/Inbox.js +0 -6363
- package/dist/assets/NotificationPreferencesPopup.js +0 -1562
- package/dist/assets/Preferences.js +0 -2120
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
`https://${
|
|
1
|
+
import { jsx as W } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as H, useState as N, useCallback as A, useMemo as B, useRef as m, useEffect as x, useContext as G } from "react";
|
|
3
|
+
const J = async (e, c, d, r, f, I, h) => {
|
|
4
|
+
const g = _(r, f, I), l = await fetch(
|
|
5
|
+
`https://${c}/${r}/users/${encodeURIComponent(
|
|
6
6
|
f
|
|
7
7
|
)}/${d}`,
|
|
8
8
|
{
|
|
9
9
|
method: e,
|
|
10
|
-
body: JSON.stringify(
|
|
10
|
+
body: JSON.stringify(h),
|
|
11
11
|
headers: {
|
|
12
|
-
Authorization: `Basic ${
|
|
12
|
+
Authorization: `Basic ${g}`
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
);
|
|
16
16
|
try {
|
|
17
|
-
return await
|
|
17
|
+
return await l.json();
|
|
18
18
|
} catch {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, _ = (e, c, d) => btoa(d ? e + ":" + c + ":" + d : e + ":" + c), L = {
|
|
22
22
|
host: "api.notificationapi.com",
|
|
23
23
|
websocketHost: "ws.notificationapi.com",
|
|
24
24
|
userId: "",
|
|
@@ -31,43 +31,43 @@ const j = async (e, o, d, r, f, g, l) => {
|
|
|
31
31
|
onNewInAppNotifications: void 0,
|
|
32
32
|
keepWebSocketAliveForSeconds: 86400
|
|
33
33
|
// 24 hours
|
|
34
|
-
},
|
|
35
|
-
config:
|
|
34
|
+
}, i = {
|
|
35
|
+
config: L,
|
|
36
36
|
init: function(e) {
|
|
37
|
-
return this.config = { ...
|
|
37
|
+
return this.config = { ...L, ...e }, {
|
|
38
38
|
...this
|
|
39
39
|
};
|
|
40
40
|
},
|
|
41
41
|
rest: {
|
|
42
|
-
generic: function(e,
|
|
43
|
-
return
|
|
42
|
+
generic: function(e, c, d) {
|
|
43
|
+
return J(
|
|
44
44
|
e,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
i.config.host,
|
|
46
|
+
c,
|
|
47
|
+
i.config.clientId,
|
|
48
|
+
i.config.userId,
|
|
49
|
+
i.config.hashedUserId,
|
|
50
50
|
d
|
|
51
51
|
);
|
|
52
52
|
},
|
|
53
|
-
getNotifications: function(e,
|
|
54
|
-
return
|
|
53
|
+
getNotifications: function(e, c) {
|
|
54
|
+
return i.rest.generic(
|
|
55
55
|
"GET",
|
|
56
|
-
`notifications/INAPP_WEB?count=${
|
|
56
|
+
`notifications/INAPP_WEB?count=${c}&before=${e}`
|
|
57
57
|
);
|
|
58
58
|
},
|
|
59
59
|
patchNotifications: function(e) {
|
|
60
|
-
return
|
|
60
|
+
return i.rest.generic(
|
|
61
61
|
"PATCH",
|
|
62
62
|
"notifications/INAPP_WEB",
|
|
63
63
|
e
|
|
64
64
|
);
|
|
65
65
|
},
|
|
66
66
|
getPreferences: function() {
|
|
67
|
-
return
|
|
67
|
+
return i.rest.generic("GET", "preferences");
|
|
68
68
|
},
|
|
69
69
|
postPreferences: function(e) {
|
|
70
|
-
return
|
|
70
|
+
return i.rest.generic(
|
|
71
71
|
"POST",
|
|
72
72
|
"preferences",
|
|
73
73
|
e
|
|
@@ -77,63 +77,66 @@ const j = async (e, o, d, r, f, g, l) => {
|
|
|
77
77
|
websocket: {
|
|
78
78
|
object: void 0,
|
|
79
79
|
connect: function() {
|
|
80
|
-
let e = `wss://${
|
|
81
|
-
return
|
|
82
|
-
const d = JSON.parse(
|
|
80
|
+
let e = `wss://${i.config.websocketHost}?userId=${encodeURIComponent(i.config.userId)}&envId=${i.config.clientId}`;
|
|
81
|
+
return i.config.hashedUserId && (e += `&userIdHash=${encodeURIComponent(i.config.hashedUserId)}`), i.websocket.object = new WebSocket(e), i.websocket.object.onmessage = (c) => {
|
|
82
|
+
const d = JSON.parse(c.data);
|
|
83
83
|
if (!(!d || !d.route) && d.route === "inapp_web/new_notifications") {
|
|
84
84
|
const r = d;
|
|
85
|
-
|
|
85
|
+
i.config.onNewInAppNotifications && i.config.onNewInAppNotifications(
|
|
86
86
|
r.payload.notifications
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
},
|
|
89
|
+
}, i.websocket.object;
|
|
90
90
|
},
|
|
91
91
|
disconnect: function(e) {
|
|
92
|
-
var
|
|
93
|
-
|
|
92
|
+
var c;
|
|
93
|
+
i.websocket.object && ((c = i.websocket.object) == null || c.close(), e && e(i.websocket.object));
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
openWebSocket: function() {
|
|
97
|
-
return
|
|
98
|
-
setTimeout(
|
|
99
|
-
|
|
100
|
-
this.websocket.
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
return i.websocket.connect(() => {
|
|
98
|
+
setTimeout(
|
|
99
|
+
() => {
|
|
100
|
+
this.websocket.disconnect(() => {
|
|
101
|
+
this.websocket.connect();
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
54e4
|
|
105
|
+
);
|
|
103
106
|
});
|
|
104
107
|
},
|
|
105
108
|
getInAppNotifications: async (e) => {
|
|
106
|
-
const
|
|
107
|
-
let r = [], f = e.before,
|
|
108
|
-
for (;
|
|
109
|
-
const
|
|
109
|
+
const c = e.maxCountNeeded || i.config.getInAppDefaultCount, d = e.oldestNeeded || i.config.getInAppDefaultOldest;
|
|
110
|
+
let r = [], f = e.before, I = !0, h = !0;
|
|
111
|
+
for (; h; ) {
|
|
112
|
+
const g = (await i.rest.getNotifications(
|
|
110
113
|
f,
|
|
111
|
-
|
|
114
|
+
c
|
|
112
115
|
)).notifications.filter(
|
|
113
|
-
(
|
|
116
|
+
(l) => !r.find((p) => p.id === l.id)
|
|
114
117
|
);
|
|
115
|
-
f =
|
|
116
|
-
(
|
|
118
|
+
f = g.reduce(
|
|
119
|
+
(l, p) => l < p.date ? l : p.date,
|
|
117
120
|
e.before
|
|
118
|
-
), r = [...r, ...
|
|
121
|
+
), r = [...r, ...g], I = g.length > 0, h = !0, (!I || r.length >= c || f < d) && (h = !1);
|
|
119
122
|
}
|
|
120
123
|
return {
|
|
121
124
|
items: r,
|
|
122
|
-
hasMore:
|
|
125
|
+
hasMore: I,
|
|
123
126
|
oldestReceived: f
|
|
124
127
|
};
|
|
125
128
|
},
|
|
126
129
|
updateInAppNotifications: async (e) => {
|
|
127
|
-
const
|
|
130
|
+
const c = {
|
|
128
131
|
trackingIds: e.ids
|
|
129
132
|
};
|
|
130
|
-
return e.archived === !0 ?
|
|
133
|
+
return e.archived === !0 ? c.archived = (/* @__PURE__ */ new Date()).toISOString() : e.archived === !1 && (c.archived = null), e.clicked === !0 ? c.clicked = (/* @__PURE__ */ new Date()).toISOString() : e.clicked === !1 && (c.clicked = null), e.opened === !0 ? c.opened = (/* @__PURE__ */ new Date()).toISOString() : e.opened === !1 && (c.opened = null), i.rest.patchNotifications(c);
|
|
131
134
|
},
|
|
132
|
-
getPreferences: async () =>
|
|
133
|
-
updateDeliveryOption: async (e) =>
|
|
134
|
-
},
|
|
135
|
+
getPreferences: async () => i.rest.getPreferences(),
|
|
136
|
+
updateDeliveryOption: async (e) => i.rest.postPreferences([e])
|
|
137
|
+
}, M = H(
|
|
135
138
|
void 0
|
|
136
|
-
),
|
|
139
|
+
), z = (e) => {
|
|
137
140
|
const d = {
|
|
138
141
|
...{
|
|
139
142
|
apiURL: "https://api.notificationapi.com",
|
|
@@ -142,118 +145,139 @@ const j = async (e, o, d, r, f, g, l) => {
|
|
|
142
145
|
initialLoadMaxAge: new Date((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 3))
|
|
143
146
|
},
|
|
144
147
|
...e
|
|
145
|
-
}, [r, f] = N(), [
|
|
148
|
+
}, [r, f] = N(), [I, h] = N(), [g, l] = N(!1), [p, D] = N((/* @__PURE__ */ new Date()).toISOString()), [b, v] = N(!0), S = A((o) => {
|
|
146
149
|
const s = (/* @__PURE__ */ new Date()).toISOString();
|
|
147
|
-
f((
|
|
148
|
-
...
|
|
149
|
-
...
|
|
150
|
-
] :
|
|
151
|
-
},
|
|
150
|
+
f((t) => (o = o.filter((n) => !(n.expDate && new Date(n.expDate * 1e3).toISOString() > s || n.date > s)), t ? [
|
|
151
|
+
...o.filter((n) => !t.find((a) => a.id === n.id)),
|
|
152
|
+
...t
|
|
153
|
+
] : o));
|
|
154
|
+
}, []), u = B(() => i.init({
|
|
152
155
|
clientId: e.clientId,
|
|
153
156
|
userId: e.userId,
|
|
154
157
|
hashedUserId: e.hashedUserId,
|
|
155
|
-
onNewInAppNotifications: (
|
|
156
|
-
|
|
158
|
+
onNewInAppNotifications: (o) => {
|
|
159
|
+
S(o);
|
|
157
160
|
}
|
|
158
|
-
}),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
}), [
|
|
162
|
+
e.clientId,
|
|
163
|
+
e.userId,
|
|
164
|
+
e.hashedUserId,
|
|
165
|
+
S
|
|
166
|
+
]), y = A(
|
|
167
|
+
async (o, s) => {
|
|
168
|
+
const t = await u.rest.getNotifications(o, s);
|
|
169
|
+
D(t.oldestReceived), v(t.couldLoadMore), S(t.notifications);
|
|
170
|
+
},
|
|
171
|
+
[S, u.rest]
|
|
172
|
+
), O = m(b), P = m(g), C = m(p);
|
|
173
|
+
x(() => {
|
|
174
|
+
O.current = b, P.current = g, C.current = p;
|
|
175
|
+
}, [b, g, p]);
|
|
176
|
+
const k = A(
|
|
177
|
+
async (o) => {
|
|
178
|
+
if (!(!o && (!O.current || P.current))) {
|
|
179
|
+
l(!0);
|
|
180
|
+
try {
|
|
181
|
+
await y(
|
|
182
|
+
o ? (/* @__PURE__ */ new Date()).toISOString() : C.current,
|
|
183
|
+
o ? d.initialLoadMaxCount : 1e3
|
|
184
|
+
);
|
|
185
|
+
} finally {
|
|
186
|
+
l(!1);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
[d.initialLoadMaxCount, y]
|
|
191
|
+
), U = async (o) => {
|
|
168
192
|
if (!r)
|
|
169
193
|
return;
|
|
170
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(),
|
|
171
|
-
|
|
172
|
-
if (!
|
|
194
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), t = r.filter((n) => o.includes(n.id) && !n.clicked).map((n) => n.id);
|
|
195
|
+
u.updateInAppNotifications({ ids: t, clicked: !0 }), f((n) => {
|
|
196
|
+
if (!n)
|
|
173
197
|
return [];
|
|
174
|
-
const a = [...
|
|
175
|
-
return a.filter((
|
|
176
|
-
|
|
198
|
+
const a = [...n];
|
|
199
|
+
return a.filter((w) => t.includes(w.id)).forEach((w) => {
|
|
200
|
+
w.clicked = s;
|
|
177
201
|
}), a;
|
|
178
202
|
});
|
|
179
|
-
},
|
|
203
|
+
}, R = async () => {
|
|
180
204
|
if (!r)
|
|
181
205
|
return;
|
|
182
|
-
const
|
|
183
|
-
s.length !== 0 && (
|
|
206
|
+
const o = (/* @__PURE__ */ new Date()).toISOString(), s = r.filter((t) => !t.opened || !t.seen).map((t) => t.id);
|
|
207
|
+
s.length !== 0 && (u.updateInAppNotifications({
|
|
184
208
|
ids: s,
|
|
185
209
|
opened: !0
|
|
186
|
-
}), f((
|
|
187
|
-
if (!
|
|
210
|
+
}), f((t) => {
|
|
211
|
+
if (!t)
|
|
188
212
|
return [];
|
|
189
|
-
const
|
|
190
|
-
return
|
|
191
|
-
a.opened =
|
|
192
|
-
}),
|
|
213
|
+
const n = [...t];
|
|
214
|
+
return n.filter((a) => s.includes(a.id)).forEach((a) => {
|
|
215
|
+
a.opened = o, a.seen = !0;
|
|
216
|
+
}), n;
|
|
193
217
|
}));
|
|
194
|
-
},
|
|
218
|
+
}, $ = async (o) => {
|
|
195
219
|
if (!r)
|
|
196
220
|
return;
|
|
197
|
-
const s = r.filter((
|
|
198
|
-
s.length !== 0 && (
|
|
221
|
+
const s = r.filter((t) => t.archived && (o === "ALL" || o.includes(t.id))).map((t) => t.id);
|
|
222
|
+
s.length !== 0 && (u.updateInAppNotifications({
|
|
199
223
|
ids: s,
|
|
200
224
|
archived: !1
|
|
201
|
-
}), f((
|
|
202
|
-
if (!
|
|
225
|
+
}), f((t) => {
|
|
226
|
+
if (!t)
|
|
203
227
|
return [];
|
|
204
|
-
const
|
|
205
|
-
return
|
|
228
|
+
const n = [...t];
|
|
229
|
+
return n.filter((a) => s.includes(a.id)).forEach((a) => {
|
|
206
230
|
a.archived = void 0;
|
|
207
|
-
}),
|
|
231
|
+
}), n;
|
|
208
232
|
}));
|
|
209
|
-
},
|
|
233
|
+
}, E = async (o) => {
|
|
210
234
|
if (!r)
|
|
211
235
|
return;
|
|
212
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(),
|
|
213
|
-
|
|
214
|
-
if (!
|
|
236
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), t = r.filter((n) => !n.archived && (o === "ALL" || o.includes(n.id))).map((n) => n.id);
|
|
237
|
+
t.length !== 0 && (u.updateInAppNotifications({ ids: t, archived: !0 }), f((n) => {
|
|
238
|
+
if (!n)
|
|
215
239
|
return [];
|
|
216
|
-
const a = [...
|
|
217
|
-
return a.filter((
|
|
218
|
-
|
|
240
|
+
const a = [...n];
|
|
241
|
+
return a.filter((w) => t.includes(w.id)).forEach((w) => {
|
|
242
|
+
w.archived = s;
|
|
219
243
|
}), a;
|
|
220
244
|
}));
|
|
221
|
-
},
|
|
222
|
-
|
|
223
|
-
notificationId:
|
|
245
|
+
}, j = (o, s, t, n) => {
|
|
246
|
+
u.updateDeliveryOption({
|
|
247
|
+
notificationId: o,
|
|
224
248
|
channel: s,
|
|
225
|
-
delivery:
|
|
226
|
-
subNotificationId:
|
|
249
|
+
delivery: t,
|
|
250
|
+
subNotificationId: n
|
|
227
251
|
}).then(() => {
|
|
228
|
-
|
|
229
|
-
|
|
252
|
+
u.getPreferences().then((a) => {
|
|
253
|
+
h(a);
|
|
230
254
|
});
|
|
231
255
|
});
|
|
232
256
|
};
|
|
233
|
-
|
|
234
|
-
f([]),
|
|
235
|
-
|
|
257
|
+
x(() => {
|
|
258
|
+
f([]), l(!1), h(void 0), D((/* @__PURE__ */ new Date()).toISOString()), v(!0), k(!0), u.openWebSocket(), u.getPreferences().then((o) => {
|
|
259
|
+
h(o);
|
|
236
260
|
});
|
|
237
|
-
}, [
|
|
238
|
-
const
|
|
261
|
+
}, [u, k]);
|
|
262
|
+
const T = {
|
|
239
263
|
notifications: r,
|
|
240
|
-
preferences:
|
|
264
|
+
preferences: I,
|
|
241
265
|
loadNotifications: k,
|
|
242
|
-
markAsOpened:
|
|
243
|
-
markAsArchived:
|
|
244
|
-
markAsUnarchived:
|
|
245
|
-
markAsClicked:
|
|
246
|
-
updateDelivery:
|
|
266
|
+
markAsOpened: R,
|
|
267
|
+
markAsArchived: E,
|
|
268
|
+
markAsUnarchived: $,
|
|
269
|
+
markAsClicked: U,
|
|
270
|
+
updateDelivery: j
|
|
247
271
|
};
|
|
248
|
-
return /* @__PURE__ */ M
|
|
249
|
-
},
|
|
250
|
-
const e =
|
|
272
|
+
return /* @__PURE__ */ W(M.Provider, { value: T, children: e.children });
|
|
273
|
+
}, F = () => {
|
|
274
|
+
const e = G(M);
|
|
251
275
|
if (!e)
|
|
252
276
|
throw new Error("useMyContext must be used within a MyProvider");
|
|
253
277
|
return e;
|
|
254
278
|
};
|
|
255
|
-
|
|
279
|
+
z.useNotificationAPIContext = F;
|
|
256
280
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
281
|
+
M as NotificationAPIContext,
|
|
282
|
+
z as NotificationAPIProvider
|
|
259
283
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { NotificationFeed, NotificationPopup, NotificationLauncher, NotificationCounter
|
|
2
|
-
export { NotificationPreferencesInline, NotificationPreferencesPopup
|
|
1
|
+
export { NotificationFeed, NotificationPopup, NotificationLauncher, NotificationCounter } from './components/Notifications';
|
|
2
|
+
export { NotificationPreferencesInline, NotificationPreferencesPopup } from './components/Preferences';
|
|
3
3
|
export { NotificationAPIProvider } from './components/Provider';
|
package/dist/main.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { NotificationFeed as r } from "./components/Notifications/NotificationFeed.js";
|
|
2
|
-
import {
|
|
2
|
+
import { NotificationPopup as e } from "./components/Notifications/NotificationPopup.js";
|
|
3
3
|
import { NotificationLauncher as n } from "./components/Notifications/NotificationLauncher.js";
|
|
4
|
-
import { NotificationCounter as
|
|
5
|
-
import {
|
|
6
|
-
import { NotificationPreferencesInline as
|
|
7
|
-
import { NotificationAPIProvider as
|
|
4
|
+
import { NotificationCounter as c } from "./components/Notifications/NotificationCounter.js";
|
|
5
|
+
import { NotificationPreferencesPopup as m } from "./components/Preferences/NotificationPreferencesPopup.js";
|
|
6
|
+
import { NotificationPreferencesInline as N } from "./components/Preferences/NotificationPreferencesInline.js";
|
|
7
|
+
import { NotificationAPIProvider as u } from "./components/Provider/index.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
u as NotificationAPIProvider,
|
|
10
|
+
c as NotificationCounter,
|
|
11
11
|
r as NotificationFeed,
|
|
12
12
|
n as NotificationLauncher,
|
|
13
13
|
e as NotificationPopup,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
N as NotificationPreferencesInline,
|
|
15
|
+
m as NotificationPreferencesPopup
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notificationapi/react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
8
8
|
"build": "tsc --p ./tsconfig.build.json && vite build",
|
|
9
9
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
10
|
+
"format": "prettier --write \"{src,lib}/**/*.{ts,tsx,js,jsx,json,css,md,html}\"",
|
|
11
|
+
"prettier-check": "prettier --check \"{src,lib}/**/*.{ts,tsx,js,jsx,json,css,md,html}\"",
|
|
10
12
|
"preview": "vite preview",
|
|
11
13
|
"prepublishOnly": "npm run build"
|
|
12
14
|
},
|
|
@@ -25,6 +27,7 @@
|
|
|
25
27
|
"eslint": "^8.57.0",
|
|
26
28
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
27
29
|
"eslint-plugin-react-refresh": "^0.4.6",
|
|
30
|
+
"prettier": "^3.3.3",
|
|
28
31
|
"glob": "^10.4.1",
|
|
29
32
|
"typescript": "^5.2.2",
|
|
30
33
|
"vite": "^5.2.0",
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
"**/*.css"
|
|
41
44
|
],
|
|
42
45
|
"dependencies": {
|
|
43
|
-
"@notificationapi/core": "^0.0.
|
|
46
|
+
"@notificationapi/core": "^0.0.8",
|
|
44
47
|
"antd": "^5.17.4",
|
|
45
48
|
"javascript-time-ago": "^2.5.10",
|
|
46
49
|
"liquidjs": "^10.14.0",
|