@notificationapi/react 0.0.17 → 0.0.19
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/Inbox.js +1292 -1273
- package/dist/assets/Notification.js +1 -1
- package/dist/assets/NotificationPreferencesPopup.js +1562 -0
- package/dist/assets/Preferences.js +739 -684
- package/dist/assets/button.js +1 -1
- package/dist/assets/colors.js +25 -25
- package/dist/assets/index.js +1 -1
- package/dist/assets/index2.js +32 -32
- package/dist/assets/index3.js +268 -268
- package/dist/components/Notifications/Inbox.d.ts +2 -3
- package/dist/components/Notifications/InboxHeader.d.ts +2 -1
- package/dist/components/Notifications/InboxHeader.js +17 -18
- package/dist/components/Notifications/NotificationFeed.d.ts +2 -3
- package/dist/components/Notifications/NotificationFeed.js +46 -29
- package/dist/components/Notifications/NotificationLauncher.js +96 -79
- package/dist/components/Notifications/NotificationPopup.d.ts +2 -3
- package/dist/components/Notifications/NotificationPopup.js +6 -4
- package/dist/components/Preferences/NotificationPreferencesPopup.js +4 -1500
- package/dist/components/Preferences/PreferenceInput.js +1 -1
- package/dist/components/Preferences/Preferences.js +4 -5
- package/dist/components/Preferences/index.js +1 -1
- package/dist/components/Provider/index.d.ts +1 -0
- package/dist/components/Provider/index.js +120 -96
- package/dist/main.js +5 -5
- package/package.json +1 -1
- package/dist/assets/BellOutlined.js +0 -60
- package/dist/assets/PurePanel.js +0 -67
|
@@ -2,10 +2,9 @@ import "react/jsx-runtime";
|
|
|
2
2
|
import "../Provider/index.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../assets/colors.js";
|
|
5
|
-
import { P as
|
|
6
|
-
import "../../assets/BellOutlined.js";
|
|
5
|
+
import { P as m, c as p, g as i } from "../../assets/Preferences.js";
|
|
7
6
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
m as Preferences,
|
|
8
|
+
p as getChannelIcon,
|
|
9
|
+
i as getChannelLabel
|
|
11
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as r } from "../../assets/NotificationPreferencesPopup.js";
|
|
2
2
|
import { NotificationPreferencesInline as f } from "./NotificationPreferencesInline.js";
|
|
3
3
|
export {
|
|
4
4
|
f as NotificationPreferencesInline,
|
|
@@ -96,6 +96,7 @@ export type Context = {
|
|
|
96
96
|
loadNotifications: (initial?: boolean) => void;
|
|
97
97
|
markAsOpened: () => void;
|
|
98
98
|
markAsArchived: (ids: string[] | "ALL") => void;
|
|
99
|
+
markAsUnarchived: (ids: string[] | "ALL") => void;
|
|
99
100
|
markAsClicked: (id: string) => void;
|
|
100
101
|
updateDelivery: (notificationId: string, channel: Channels, delivery: DeliveryOptions, subNotificationId?: string) => void;
|
|
101
102
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { api as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as y, useState as u, useEffect as D, useContext as B } from "react";
|
|
3
|
+
import { api as d } from "../../api.js";
|
|
4
|
+
const z = {
|
|
5
5
|
opened: "opened",
|
|
6
6
|
clicked: "clicked",
|
|
7
7
|
archived: "archived",
|
|
@@ -9,10 +9,10 @@ const q = {
|
|
|
9
9
|
actioned1: "actioned1",
|
|
10
10
|
actioned2: "actioned2"
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
const
|
|
12
|
+
var $ = /* @__PURE__ */ ((e) => (e.EMAIL = "EMAIL", e.INAPP_WEB = "INAPP_WEB", e.SMS = "SMS", e.CALL = "CALL", e.PUSH = "PUSH", e.WEB_PUSH = "WEB_PUSH", e))($ || {}), b = /* @__PURE__ */ ((e) => (e.OFF = "off", e.INSTANT = "instant", e.HOURLY = "hourly", e.DAILY = "daily", e.WEEKLY = "weekly", e.MONTHLY = "monthly", e))(b || {});
|
|
13
|
+
const S = y(
|
|
14
14
|
void 0
|
|
15
|
-
),
|
|
15
|
+
), Y = (e) => {
|
|
16
16
|
const c = {
|
|
17
17
|
...{
|
|
18
18
|
apiURL: "https://api.notificationapi.com",
|
|
@@ -21,51 +21,51 @@ const g = _(
|
|
|
21
21
|
initialLoadMaxAge: new Date((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 3))
|
|
22
22
|
},
|
|
23
23
|
...e
|
|
24
|
-
}, [
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
...
|
|
24
|
+
}, [s, f] = u(), [U, w] = u(), [N, A] = u(!1), [E, m] = u((/* @__PURE__ */ new Date()).toISOString()), [M, k] = u(!0), P = (a) => {
|
|
25
|
+
const i = (/* @__PURE__ */ new Date()).toISOString();
|
|
26
|
+
f((t) => (a = a.filter((n) => !(n.expDate && new Date(n.expDate * 1e3).toISOString() > i || n.date > i)), t ? [
|
|
27
|
+
...a.filter((n) => !t.find((o) => o.id === n.id)),
|
|
28
28
|
...t
|
|
29
|
-
] :
|
|
30
|
-
},
|
|
29
|
+
] : a));
|
|
30
|
+
}, T = async (a, i) => (await d(
|
|
31
31
|
c.apiURL,
|
|
32
32
|
"GET",
|
|
33
|
-
`notifications/INAPP_WEB?count=${
|
|
33
|
+
`notifications/INAPP_WEB?count=${a}&before=${i}`,
|
|
34
34
|
e.clientId,
|
|
35
35
|
e.userId,
|
|
36
36
|
e.hashedUserId
|
|
37
|
-
)).notifications,
|
|
38
|
-
let
|
|
37
|
+
)).notifications, R = async (a, i, t) => {
|
|
38
|
+
let n = [], o = a, r = !0, h = !0;
|
|
39
39
|
for (; h; ) {
|
|
40
|
-
const L = (await
|
|
41
|
-
|
|
42
|
-
new Date(
|
|
40
|
+
const L = (await T(
|
|
41
|
+
i,
|
|
42
|
+
new Date(o).getTime()
|
|
43
43
|
)).filter(
|
|
44
|
-
(I) => !
|
|
44
|
+
(I) => !n.find((l) => l.id === I.id)
|
|
45
45
|
);
|
|
46
|
-
|
|
46
|
+
o = L.reduce(
|
|
47
47
|
(I, l) => I < l.date ? I : l.date,
|
|
48
|
-
|
|
49
|
-
),
|
|
48
|
+
a
|
|
49
|
+
), n = [...n, ...L], r = L.length > 0, h = !0, (!r || n.length >= i || t && o < t) && (h = !1);
|
|
50
50
|
}
|
|
51
51
|
return {
|
|
52
|
-
notifications:
|
|
52
|
+
notifications: n,
|
|
53
53
|
couldLoadMore: r,
|
|
54
|
-
oldestReceived:
|
|
54
|
+
oldestReceived: o
|
|
55
55
|
};
|
|
56
|
-
},
|
|
57
|
-
if (!
|
|
56
|
+
}, g = async (a) => {
|
|
57
|
+
if (!M || N)
|
|
58
58
|
return;
|
|
59
|
-
|
|
60
|
-
const
|
|
59
|
+
A(!0);
|
|
60
|
+
const i = await R(
|
|
61
61
|
E,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
a ? c.initialLoadMaxCount : 1e3,
|
|
63
|
+
a ? c.initialLoadMaxAge.toISOString() : void 0
|
|
64
64
|
);
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
const
|
|
68
|
-
|
|
65
|
+
m(i.oldestReceived), k(i.couldLoadMore), P(i.notifications), A(!1);
|
|
66
|
+
}, x = async (a) => {
|
|
67
|
+
const i = (/* @__PURE__ */ new Date()).toISOString();
|
|
68
|
+
d(
|
|
69
69
|
c.apiURL,
|
|
70
70
|
"PATCH",
|
|
71
71
|
"notifications/INAPP_WEB",
|
|
@@ -73,20 +73,20 @@ const g = _(
|
|
|
73
73
|
e.userId,
|
|
74
74
|
e.hashedUserId,
|
|
75
75
|
{
|
|
76
|
-
trackingIds: [
|
|
77
|
-
clicked:
|
|
76
|
+
trackingIds: [a],
|
|
77
|
+
clicked: i
|
|
78
78
|
}
|
|
79
|
-
),
|
|
79
|
+
), f((t) => {
|
|
80
80
|
if (!t)
|
|
81
81
|
return [];
|
|
82
|
-
const
|
|
83
|
-
return
|
|
82
|
+
const n = [...t], o = n.find((r) => r.id === a);
|
|
83
|
+
return o && (o.clicked = i), n;
|
|
84
84
|
});
|
|
85
|
-
},
|
|
86
|
-
if (!
|
|
85
|
+
}, v = async () => {
|
|
86
|
+
if (!s)
|
|
87
87
|
return;
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
const a = (/* @__PURE__ */ new Date()).toISOString(), i = s.filter((t) => !t.opened || !t.seen).map((t) => t.id);
|
|
89
|
+
i.length !== 0 && (d(
|
|
90
90
|
c.apiURL,
|
|
91
91
|
"PATCH",
|
|
92
92
|
"notifications/INAPP_WEB",
|
|
@@ -94,22 +94,45 @@ const g = _(
|
|
|
94
94
|
e.userId,
|
|
95
95
|
e.hashedUserId,
|
|
96
96
|
{
|
|
97
|
-
trackingIds:
|
|
98
|
-
opened:
|
|
97
|
+
trackingIds: i,
|
|
98
|
+
opened: a
|
|
99
99
|
}
|
|
100
|
-
),
|
|
100
|
+
), f((t) => {
|
|
101
101
|
if (!t)
|
|
102
102
|
return [];
|
|
103
|
-
const
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
}),
|
|
103
|
+
const n = [...t];
|
|
104
|
+
return n.filter((o) => i.includes(o.id)).forEach((o) => {
|
|
105
|
+
o.opened = a, o.seen = !0;
|
|
106
|
+
}), n;
|
|
107
107
|
}));
|
|
108
|
-
},
|
|
109
|
-
if (!
|
|
108
|
+
}, C = async (a) => {
|
|
109
|
+
if (!s)
|
|
110
110
|
return;
|
|
111
|
-
const
|
|
112
|
-
|
|
111
|
+
const i = s.filter((t) => t.archived && (a === "ALL" || a.includes(t.id))).map((t) => t.id);
|
|
112
|
+
i.length !== 0 && (d(
|
|
113
|
+
c.apiURL,
|
|
114
|
+
"PATCH",
|
|
115
|
+
"notifications/INAPP_WEB",
|
|
116
|
+
e.clientId,
|
|
117
|
+
e.userId,
|
|
118
|
+
e.hashedUserId,
|
|
119
|
+
{
|
|
120
|
+
trackingIds: i,
|
|
121
|
+
archived: null
|
|
122
|
+
}
|
|
123
|
+
), f((t) => {
|
|
124
|
+
if (!t)
|
|
125
|
+
return [];
|
|
126
|
+
const n = [...t];
|
|
127
|
+
return n.filter((o) => i.includes(o.id)).forEach((o) => {
|
|
128
|
+
o.archived = void 0;
|
|
129
|
+
}), n;
|
|
130
|
+
}));
|
|
131
|
+
}, H = async (a) => {
|
|
132
|
+
if (!s)
|
|
133
|
+
return;
|
|
134
|
+
const i = (/* @__PURE__ */ new Date()).toISOString(), t = s.filter((n) => !n.archived && (a === "ALL" || a.includes(n.id))).map((n) => n.id);
|
|
135
|
+
t.length !== 0 && (d(
|
|
113
136
|
c.apiURL,
|
|
114
137
|
"PATCH",
|
|
115
138
|
"notifications/INAPP_WEB",
|
|
@@ -118,18 +141,18 @@ const g = _(
|
|
|
118
141
|
e.hashedUserId,
|
|
119
142
|
{
|
|
120
143
|
trackingIds: t,
|
|
121
|
-
archived:
|
|
144
|
+
archived: i
|
|
122
145
|
}
|
|
123
|
-
),
|
|
124
|
-
if (!
|
|
146
|
+
), f((n) => {
|
|
147
|
+
if (!n)
|
|
125
148
|
return [];
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
r.archived =
|
|
129
|
-
}),
|
|
149
|
+
const o = [...n];
|
|
150
|
+
return o.filter((r) => t.includes(r.id)).forEach((r) => {
|
|
151
|
+
r.archived = i;
|
|
152
|
+
}), o;
|
|
130
153
|
}));
|
|
131
|
-
},
|
|
132
|
-
|
|
154
|
+
}, O = (a, i, t, n) => {
|
|
155
|
+
d(
|
|
133
156
|
c.apiURL,
|
|
134
157
|
"POST",
|
|
135
158
|
"preferences",
|
|
@@ -138,65 +161,66 @@ const g = _(
|
|
|
138
161
|
e.hashedUserId,
|
|
139
162
|
[
|
|
140
163
|
{
|
|
141
|
-
notificationId:
|
|
142
|
-
subNotificationId:
|
|
143
|
-
channel:
|
|
164
|
+
notificationId: a,
|
|
165
|
+
subNotificationId: n,
|
|
166
|
+
channel: i,
|
|
144
167
|
delivery: t
|
|
145
168
|
}
|
|
146
169
|
]
|
|
147
170
|
).then(() => {
|
|
148
|
-
|
|
171
|
+
d(
|
|
149
172
|
c.apiURL,
|
|
150
173
|
"GET",
|
|
151
174
|
"preferences",
|
|
152
175
|
e.clientId,
|
|
153
176
|
e.userId,
|
|
154
177
|
e.hashedUserId
|
|
155
|
-
).then((
|
|
156
|
-
w(
|
|
178
|
+
).then((o) => {
|
|
179
|
+
w(o);
|
|
157
180
|
});
|
|
158
181
|
});
|
|
159
182
|
};
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const
|
|
183
|
+
D(() => {
|
|
184
|
+
g(!0);
|
|
185
|
+
const a = new WebSocket(
|
|
163
186
|
c.hashedUserId ? `${c.wsURL}?userId=${c.userId}&envId=${c.clientId}&userIdHash=${c.hashedUserId}` : `${c.wsURL}?userId=${c.userId}&envId=${c.clientId}`
|
|
164
187
|
);
|
|
165
|
-
|
|
166
|
-
const t = JSON.parse(
|
|
167
|
-
!t || !t.route || t.route === "inapp_web/new_notifications" &&
|
|
168
|
-
},
|
|
188
|
+
a.onmessage = (i) => {
|
|
189
|
+
const t = JSON.parse(i.data);
|
|
190
|
+
!t || !t.route || t.route === "inapp_web/new_notifications" && P(t.payload.notifications);
|
|
191
|
+
}, d(
|
|
169
192
|
c.apiURL,
|
|
170
193
|
"GET",
|
|
171
194
|
"preferences",
|
|
172
195
|
e.clientId,
|
|
173
196
|
e.userId,
|
|
174
197
|
e.hashedUserId
|
|
175
|
-
).then((
|
|
176
|
-
w(
|
|
198
|
+
).then((i) => {
|
|
199
|
+
w(i);
|
|
177
200
|
});
|
|
178
201
|
}, []);
|
|
179
|
-
const
|
|
180
|
-
notifications:
|
|
181
|
-
preferences:
|
|
182
|
-
loadNotifications:
|
|
183
|
-
markAsOpened:
|
|
184
|
-
markAsArchived:
|
|
185
|
-
|
|
186
|
-
|
|
202
|
+
const W = {
|
|
203
|
+
notifications: s,
|
|
204
|
+
preferences: U,
|
|
205
|
+
loadNotifications: g,
|
|
206
|
+
markAsOpened: v,
|
|
207
|
+
markAsArchived: H,
|
|
208
|
+
markAsUnarchived: C,
|
|
209
|
+
markAsClicked: x,
|
|
210
|
+
updateDelivery: O
|
|
187
211
|
};
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
},
|
|
190
|
-
const e =
|
|
212
|
+
return /* @__PURE__ */ _(S.Provider, { value: W, children: e.children });
|
|
213
|
+
}, F = () => {
|
|
214
|
+
const e = B(S);
|
|
191
215
|
if (!e)
|
|
192
216
|
throw new Error("useMyContext must be used within a MyProvider");
|
|
193
217
|
return e;
|
|
194
218
|
};
|
|
195
|
-
|
|
219
|
+
Y.useNotificationAPIContext = F;
|
|
196
220
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
221
|
+
$ as Channels,
|
|
222
|
+
b as DeliveryOptions,
|
|
223
|
+
z as NOTIFICATION_ACTIONS,
|
|
224
|
+
S as NotificationAPIContext,
|
|
225
|
+
Y as NotificationAPIProvider
|
|
202
226
|
};
|
package/dist/main.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NotificationFeed as r } from "./components/Notifications/NotificationFeed.js";
|
|
2
2
|
import { N as e } from "./assets/Inbox.js";
|
|
3
3
|
import { NotificationLauncher as n } from "./components/Notifications/NotificationLauncher.js";
|
|
4
|
-
import { NotificationCounter as
|
|
5
|
-
import {
|
|
4
|
+
import { NotificationCounter as a } from "./components/Notifications/NotificationCounter.js";
|
|
5
|
+
import { N } from "./assets/NotificationPreferencesPopup.js";
|
|
6
6
|
import { NotificationPreferencesInline as x } from "./components/Preferences/NotificationPreferencesInline.js";
|
|
7
|
-
import { NotificationAPIProvider as
|
|
7
|
+
import { NotificationAPIProvider as s } from "./components/Provider/index.js";
|
|
8
8
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
s as NotificationAPIProvider,
|
|
10
|
+
a as NotificationCounter,
|
|
11
11
|
r as NotificationFeed,
|
|
12
12
|
n as NotificationLauncher,
|
|
13
13
|
e as NotificationPopup,
|
package/package.json
CHANGED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { d as c, _ as l } from "./colors.js";
|
|
2
|
-
import * as t from "react";
|
|
3
|
-
import { I as s } from "./index3.js";
|
|
4
|
-
var d = `accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
5
|
-
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
6
|
-
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
7
|
-
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
8
|
-
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
9
|
-
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
10
|
-
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
11
|
-
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
12
|
-
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
13
|
-
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
14
|
-
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
15
|
-
summary tabIndex target title type useMap value width wmode wrap`, u = `onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
16
|
-
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
17
|
-
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
18
|
-
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
19
|
-
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
20
|
-
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
21
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`, p = "".concat(d, " ").concat(u).split(/[\s\n]+/), m = "aria-", h = "data-";
|
|
22
|
-
function i(o, n) {
|
|
23
|
-
return o.indexOf(n) === 0;
|
|
24
|
-
}
|
|
25
|
-
function O(o) {
|
|
26
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, e;
|
|
27
|
-
n === !1 ? e = {
|
|
28
|
-
aria: !0,
|
|
29
|
-
data: !0,
|
|
30
|
-
attr: !0
|
|
31
|
-
} : n === !0 ? e = {
|
|
32
|
-
aria: !0
|
|
33
|
-
} : e = c({}, n);
|
|
34
|
-
var r = {};
|
|
35
|
-
return Object.keys(o).forEach(function(a) {
|
|
36
|
-
// Aria
|
|
37
|
-
(e.aria && (a === "role" || i(a, m)) || // Data
|
|
38
|
-
e.data && i(a, h) || // Attr
|
|
39
|
-
e.attr && p.includes(a)) && (r[a] = o[a]);
|
|
40
|
-
}), r;
|
|
41
|
-
}
|
|
42
|
-
var g = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, name: "right", theme: "outlined" }, f = function(n, e) {
|
|
43
|
-
return /* @__PURE__ */ t.createElement(s, l({}, n, {
|
|
44
|
-
ref: e,
|
|
45
|
-
icon: g
|
|
46
|
-
}));
|
|
47
|
-
}, v = /* @__PURE__ */ t.forwardRef(f);
|
|
48
|
-
process.env.NODE_ENV !== "production" && (v.displayName = "RightOutlined");
|
|
49
|
-
var y = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M816 768h-24V428c0-141.1-104.3-257.7-240-277.1V112c0-22.1-17.9-40-40-40s-40 17.9-40 40v38.9c-135.7 19.4-240 136-240 277.1v340h-24c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h216c0 61.8 50.2 112 112 112s112-50.2 112-112h216c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM512 888c-26.5 0-48-21.5-48-48h96c0 26.5-21.5 48-48 48zM304 768V428c0-55.6 21.6-107.8 60.9-147.1S456.4 220 512 220c55.6 0 107.8 21.6 147.1 60.9S720 372.4 720 428v340H304z" } }] }, name: "bell", theme: "outlined" }, E = function(n, e) {
|
|
50
|
-
return /* @__PURE__ */ t.createElement(s, l({}, n, {
|
|
51
|
-
ref: e,
|
|
52
|
-
icon: y
|
|
53
|
-
}));
|
|
54
|
-
}, S = /* @__PURE__ */ t.forwardRef(E);
|
|
55
|
-
process.env.NODE_ENV !== "production" && (S.displayName = "BellOutlined");
|
|
56
|
-
export {
|
|
57
|
-
S as R,
|
|
58
|
-
v as a,
|
|
59
|
-
O as p
|
|
60
|
-
};
|
package/dist/assets/PurePanel.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { _ as R, C as w, a as E } from "./colors.js";
|
|
2
|
-
import * as e from "react";
|
|
3
|
-
import { I as y, u as I } from "./index3.js";
|
|
4
|
-
var j = { icon: { tag: "svg", attrs: { "fill-rule": "evenodd", viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, name: "close", theme: "outlined" }, z = function(s, l) {
|
|
5
|
-
return /* @__PURE__ */ e.createElement(y, R({}, s, {
|
|
6
|
-
ref: l,
|
|
7
|
-
icon: j
|
|
8
|
-
}));
|
|
9
|
-
}, S = /* @__PURE__ */ e.forwardRef(z);
|
|
10
|
-
process.env.NODE_ENV !== "production" && (S.displayName = "CloseOutlined");
|
|
11
|
-
function L(n) {
|
|
12
|
-
return (s) => /* @__PURE__ */ e.createElement(w, {
|
|
13
|
-
theme: {
|
|
14
|
-
token: {
|
|
15
|
-
motion: !1,
|
|
16
|
-
zIndexPopupBase: 0
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}, /* @__PURE__ */ e.createElement(n, Object.assign({}, s)));
|
|
20
|
-
}
|
|
21
|
-
const N = (n, s, l, W) => L((r) => {
|
|
22
|
-
const {
|
|
23
|
-
prefixCls: f,
|
|
24
|
-
style: p
|
|
25
|
-
} = r, a = e.useRef(null), [g, m] = e.useState(0), [v, C] = e.useState(0), [c, P] = I(!1, {
|
|
26
|
-
value: r.open
|
|
27
|
-
}), {
|
|
28
|
-
getPrefixCls: O
|
|
29
|
-
} = e.useContext(E), h = O("select", f);
|
|
30
|
-
e.useEffect(() => {
|
|
31
|
-
if (P(!0), typeof ResizeObserver < "u") {
|
|
32
|
-
const i = new ResizeObserver((t) => {
|
|
33
|
-
const o = t[0].target;
|
|
34
|
-
m(o.offsetHeight + 8), C(o.offsetWidth);
|
|
35
|
-
}), u = setInterval(() => {
|
|
36
|
-
var t;
|
|
37
|
-
const o = `.${h}-dropdown`, d = (t = a.current) === null || t === void 0 ? void 0 : t.querySelector(o);
|
|
38
|
-
d && (clearInterval(u), i.observe(d));
|
|
39
|
-
}, 10);
|
|
40
|
-
return () => {
|
|
41
|
-
clearInterval(u), i.disconnect();
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}, []);
|
|
45
|
-
let b = Object.assign(Object.assign({}, r), {
|
|
46
|
-
style: Object.assign(Object.assign({}, p), {
|
|
47
|
-
margin: 0
|
|
48
|
-
}),
|
|
49
|
-
open: c,
|
|
50
|
-
visible: c,
|
|
51
|
-
getPopupContainer: () => a.current
|
|
52
|
-
});
|
|
53
|
-
const x = {
|
|
54
|
-
paddingBottom: g,
|
|
55
|
-
position: "relative",
|
|
56
|
-
minWidth: v
|
|
57
|
-
};
|
|
58
|
-
return /* @__PURE__ */ e.createElement("div", {
|
|
59
|
-
ref: a,
|
|
60
|
-
style: x
|
|
61
|
-
}, /* @__PURE__ */ e.createElement(n, Object.assign({}, b)));
|
|
62
|
-
});
|
|
63
|
-
export {
|
|
64
|
-
S as R,
|
|
65
|
-
N as g,
|
|
66
|
-
L as w
|
|
67
|
-
};
|