@blocklet/discuss-kit-ux 1.6.237 → 1.6.239
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/components/back.d.ts +0 -1
- package/dist/components/chat/types.d.ts +2 -0
- package/dist/{editor-BBrjb_5e.mjs → editor-9b3ZIu78.mjs} +1 -1
- package/dist/{index-CrcR6k_q.mjs → index-F3ym4Tb_.mjs} +35 -57
- package/dist/index.es.js +18 -19
- package/dist/index.umd.js +17 -39
- package/package.json +4 -4
|
@@ -6,6 +6,5 @@ interface BackProps {
|
|
|
6
6
|
iconOnly?: boolean;
|
|
7
7
|
sx?: SxProps;
|
|
8
8
|
}
|
|
9
|
-
export declare const PreviousLocationRecorder: () => null;
|
|
10
9
|
export declare function Back({ url, fallbackUrl, iconOnly, sx, ...rest }: BackProps & ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -22,12 +22,14 @@ interface CommentNotificationMessage extends INotificationMessage {
|
|
|
22
22
|
type: 'comment';
|
|
23
23
|
comment: Pick<Post, 'id' | 'excerpt'>;
|
|
24
24
|
post: Pick<Post, 'id' | 'title' | 'excerpt' | 'cover'>;
|
|
25
|
+
cc?: boolean;
|
|
25
26
|
}
|
|
26
27
|
interface ReplyNotificationMessage extends INotificationMessage {
|
|
27
28
|
type: 'reply';
|
|
28
29
|
reply: Pick<Post, 'id' | 'excerpt'>;
|
|
29
30
|
comment: Pick<Post, 'id' | 'excerpt'>;
|
|
30
31
|
post: Pick<Post, 'id' | 'title' | 'excerpt' | 'cover'>;
|
|
32
|
+
cc?: boolean;
|
|
31
33
|
}
|
|
32
34
|
interface MentionInCommentNotificationMessage extends INotificationMessage {
|
|
33
35
|
type: 'mentionInComment';
|
|
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
|
|
|
4
4
|
import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
|
|
5
5
|
import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
|
|
6
6
|
import { lazy } from "react";
|
|
7
|
-
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-
|
|
7
|
+
import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-F3ym4Tb_.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -1170,7 +1170,8 @@ function ProfileCard({ user, click, ...rest }) {
|
|
|
1170
1170
|
size: 14,
|
|
1171
1171
|
did: user.did
|
|
1172
1172
|
}
|
|
1173
|
-
)
|
|
1173
|
+
),
|
|
1174
|
+
/* @__PURE__ */ jsx(Box$1, { sx: { mt: 1 }, children: /* @__PURE__ */ jsx(Badge, { passports: (user == null ? void 0 : user.passports) || [], pointInfo: (user == null ? void 0 : user.pointInfo) || {}, did: user == null ? void 0 : user.did }) })
|
|
1174
1175
|
] })
|
|
1175
1176
|
] }),
|
|
1176
1177
|
chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) !== user.did && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -1263,6 +1264,7 @@ function AuthorInfo({
|
|
|
1263
1264
|
open,
|
|
1264
1265
|
onClose: () => setOpen(false),
|
|
1265
1266
|
onOpen: () => setOpen(true),
|
|
1267
|
+
PopperProps: { disablePortal: false },
|
|
1266
1268
|
title: /* @__PURE__ */ jsx(ProfileCard, { user, click }),
|
|
1267
1269
|
children: /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsx(
|
|
1268
1270
|
Avatar,
|
|
@@ -1307,7 +1309,7 @@ function AuthorInfo({
|
|
|
1307
1309
|
);
|
|
1308
1310
|
return /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
|
|
1309
1311
|
renderAvatar(),
|
|
1310
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
|
|
1312
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", flexDirection: "column", flex: 1, overflow: "hidden" }, children: [
|
|
1311
1313
|
/* @__PURE__ */ jsxs(
|
|
1312
1314
|
Box$1,
|
|
1313
1315
|
{
|
|
@@ -3920,17 +3922,7 @@ function ChatList({ inWallet, ...rest }) {
|
|
|
3920
3922
|
);
|
|
3921
3923
|
if (chat.type === "dm") {
|
|
3922
3924
|
const oppositeUser = getOppositeUser(chat);
|
|
3923
|
-
return /* @__PURE__ */ jsx(
|
|
3924
|
-
AuthorInfo,
|
|
3925
|
-
{
|
|
3926
|
-
user: oppositeUser,
|
|
3927
|
-
showProfileCard: false,
|
|
3928
|
-
showBadge: false,
|
|
3929
|
-
showDID: false,
|
|
3930
|
-
linkToProfile: !inWallet,
|
|
3931
|
-
children: latestMessageTextContent
|
|
3932
|
-
}
|
|
3933
|
-
);
|
|
3925
|
+
return /* @__PURE__ */ jsx(AuthorInfo, { user: oppositeUser, showProfileCard: true, showBadge: false, showDID: false, linkToProfile: !inWallet, children: latestMessageTextContent });
|
|
3934
3926
|
}
|
|
3935
3927
|
if (chat.type === "channel") {
|
|
3936
3928
|
return /* @__PURE__ */ jsx(ChannelGroup, { chat, children: latestMessageTextContent });
|
|
@@ -4160,7 +4152,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4160
4152
|
return null;
|
|
4161
4153
|
};
|
|
4162
4154
|
const render = () => {
|
|
4163
|
-
var _a2, _b2, _c, _d
|
|
4155
|
+
var _a2, _b2, _c, _d;
|
|
4164
4156
|
const baseCardSx = {
|
|
4165
4157
|
py: 1.5,
|
|
4166
4158
|
px: 2,
|
|
@@ -4226,13 +4218,13 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4226
4218
|
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4227
4219
|
/* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4228
4220
|
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4229
|
-
/* @__PURE__ */ jsx("span", { children: (
|
|
4221
|
+
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") })
|
|
4230
4222
|
] }),
|
|
4231
4223
|
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4232
4224
|
]
|
|
4233
4225
|
}
|
|
4234
4226
|
),
|
|
4235
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4227
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4236
4228
|
renderQuote(message.post)
|
|
4237
4229
|
]
|
|
4238
4230
|
}
|
|
@@ -4260,7 +4252,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4260
4252
|
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4261
4253
|
/* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4262
4254
|
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4263
|
-
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.
|
|
4255
|
+
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") })
|
|
4264
4256
|
] }),
|
|
4265
4257
|
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4266
4258
|
]
|
|
@@ -4303,7 +4295,7 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4303
4295
|
]
|
|
4304
4296
|
}
|
|
4305
4297
|
),
|
|
4306
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4298
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_d = (_b2 = message == null ? void 0 : message.comment) == null ? void 0 : _b2.excerpt) == null ? void 0 : _d.replace((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.fullName, "") }),
|
|
4307
4299
|
renderQuote(message.post)
|
|
4308
4300
|
]
|
|
4309
4301
|
}
|
|
@@ -4588,28 +4580,15 @@ function Participants({ users, sx, ...rest }) {
|
|
|
4588
4580
|
}
|
|
4589
4581
|
) }) });
|
|
4590
4582
|
}
|
|
4591
|
-
const KEY_PREVIOUS_LOCATION = "__previous_location__";
|
|
4592
|
-
const getPreviousLocation = () => {
|
|
4593
|
-
return sessionStorage.getItem(KEY_PREVIOUS_LOCATION);
|
|
4594
|
-
};
|
|
4595
|
-
const PreviousLocationRecorder = () => {
|
|
4596
|
-
const location = useLocation();
|
|
4597
|
-
const locationRef = useRef();
|
|
4598
|
-
useEffect(() => {
|
|
4599
|
-
if (locationRef.current) {
|
|
4600
|
-
sessionStorage.setItem(KEY_PREVIOUS_LOCATION, locationRef.current);
|
|
4601
|
-
}
|
|
4602
|
-
locationRef.current = window.location.href;
|
|
4603
|
-
}, [location]);
|
|
4604
|
-
return null;
|
|
4605
|
-
};
|
|
4606
4583
|
function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
4607
4584
|
const navigate = useNavigate();
|
|
4585
|
+
const location = useLocation();
|
|
4608
4586
|
const mergedSx = [{}, ...Array.isArray(sx) ? sx : [sx]];
|
|
4609
4587
|
const handleClick = () => {
|
|
4588
|
+
var _a2;
|
|
4610
4589
|
if (url) {
|
|
4611
4590
|
navigate(url, { replace: true });
|
|
4612
|
-
} else if (
|
|
4591
|
+
} else if ((_a2 = location.state) == null ? void 0 : _a2.from) {
|
|
4613
4592
|
navigate(-1);
|
|
4614
4593
|
} else {
|
|
4615
4594
|
navigate(fallbackUrl || "/");
|
|
@@ -5550,7 +5529,7 @@ function Pagination({
|
|
|
5550
5529
|
}
|
|
5551
5530
|
);
|
|
5552
5531
|
}
|
|
5553
|
-
const Editor = lazy(() => import("./editor-
|
|
5532
|
+
const Editor = lazy(() => import("./editor-9b3ZIu78.mjs"));
|
|
5554
5533
|
function LazyEditor(props) {
|
|
5555
5534
|
const fallback = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
5556
5535
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
|
@@ -5728,13 +5707,13 @@ const en = {
|
|
|
5728
5707
|
channelDescription: "Channel Description",
|
|
5729
5708
|
channelName: "Channel Name",
|
|
5730
5709
|
deleteChannel: "Delete Channel",
|
|
5731
|
-
commentedYourPost: "commented your post",
|
|
5732
|
-
commentedPost: "commented post",
|
|
5710
|
+
commentedYourPost: "commented on your post",
|
|
5711
|
+
commentedPost: "commented on a post",
|
|
5733
5712
|
newPost: "create a new post",
|
|
5734
5713
|
mentionInComment: "mentioned you in a comment",
|
|
5735
5714
|
mentionInPost: "mentioned you in a post",
|
|
5736
|
-
replyYourComment: "replied your comment",
|
|
5737
|
-
replyComment: "replied comment",
|
|
5715
|
+
replyYourComment: "replied to your comment",
|
|
5716
|
+
replyComment: "replied to a comment",
|
|
5738
5717
|
deleteChannelTitle: "Delete this channel?",
|
|
5739
5718
|
deleteChannelDesc: "If you delete this channel, all messages in the channel will be deleted immediately.",
|
|
5740
5719
|
leaveChannel: "Leave channel",
|
|
@@ -11771,24 +11750,23 @@ export {
|
|
|
11771
11750
|
useApiErrorHandler as a9,
|
|
11772
11751
|
useDefaultApiErrorHandler as aa,
|
|
11773
11752
|
DefaultApiErrorHandler as ab,
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
useSubscription as at,
|
|
11753
|
+
Back as ac,
|
|
11754
|
+
LazyEditor as ad,
|
|
11755
|
+
EditorPreview as ae,
|
|
11756
|
+
DirtyPromptContainer as af,
|
|
11757
|
+
ConfirmNavigation as ag,
|
|
11758
|
+
UploaderContext as ah,
|
|
11759
|
+
useUploader as ai,
|
|
11760
|
+
UploaderTrigger as aj,
|
|
11761
|
+
UploaderProvider as ak,
|
|
11762
|
+
composeImageUrl as al,
|
|
11763
|
+
usePointUpContext as am,
|
|
11764
|
+
PointUpProvider as an,
|
|
11765
|
+
ButtonGroup as ao,
|
|
11766
|
+
SegmentedControl as ap,
|
|
11767
|
+
create as aq,
|
|
11768
|
+
getWsClient as ar,
|
|
11769
|
+
useSubscription as as,
|
|
11792
11770
|
Input as b,
|
|
11793
11771
|
useChanged as c,
|
|
11794
11772
|
useSessionContext as d,
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { Q, m, U, A, k,
|
|
2
|
+
import { Q, m, U, A, k, ac, B, E, J, H, K, ao, X, W, _, Y, Z, a0, v, C, w, x, z, a4, a5, ag, a7, N, O, ab, D, af, ae, F, G, b, j, ad, M, P, an, q, o, R, S, a8, ap, n, a1, a3, ah, ak, aj, al, aq, L, ar, l, p, r, h, t, f, a9, T, c, $, y, a6, aa, u, am, d, as, a2, ai, e } from "./index-F3ym4Tb_.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
|
@@ -14,13 +14,13 @@ export {
|
|
|
14
14
|
U as AuthzProvider,
|
|
15
15
|
A as Avatar,
|
|
16
16
|
k as Avatars,
|
|
17
|
-
|
|
17
|
+
ac as Back,
|
|
18
18
|
B as Badge,
|
|
19
19
|
E as BinaryThumb,
|
|
20
20
|
J as BlogCard,
|
|
21
21
|
H as BlogList,
|
|
22
22
|
K as BlogPermaLink,
|
|
23
|
-
|
|
23
|
+
ao as ButtonGroup,
|
|
24
24
|
X as Chat,
|
|
25
25
|
W as ChatClient,
|
|
26
26
|
_ as ChatHeaderAddon,
|
|
@@ -34,39 +34,38 @@ export {
|
|
|
34
34
|
z as CommentsProvider,
|
|
35
35
|
a4 as Confirm,
|
|
36
36
|
a5 as ConfirmContext,
|
|
37
|
-
|
|
37
|
+
ag as ConfirmNavigation,
|
|
38
38
|
a7 as ConfirmProvider,
|
|
39
39
|
N as CoverImage,
|
|
40
40
|
O as CoverImageUpload,
|
|
41
41
|
ab as DefaultApiErrorHandler,
|
|
42
42
|
D as DefaultEditorConfigProvider,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
af as DirtyPromptContainer,
|
|
44
|
+
ae as EditorPreview,
|
|
45
45
|
F as EmptyStatus,
|
|
46
46
|
G as GithubReaction,
|
|
47
47
|
b as Input,
|
|
48
48
|
j as InternalThemeProvider,
|
|
49
|
-
|
|
49
|
+
ad as LazyEditor,
|
|
50
50
|
M as Menu,
|
|
51
51
|
P as Pagination,
|
|
52
|
-
|
|
52
|
+
an as PointUpProvider,
|
|
53
53
|
q as Post,
|
|
54
54
|
o as PostContent,
|
|
55
|
-
ac as PreviousLocationRecorder,
|
|
56
55
|
R as RelativeTime,
|
|
57
56
|
S as ScrollableEditorWrapper,
|
|
58
57
|
a8 as SecureLabelPicker,
|
|
59
|
-
|
|
58
|
+
ap as SegmentedControl,
|
|
60
59
|
n as SystemUser,
|
|
61
60
|
a1 as UnreadNotificationContext,
|
|
62
61
|
a3 as UnreadNotificationProvider,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
ah as UploaderContext,
|
|
63
|
+
ak as UploaderProvider,
|
|
64
|
+
aj as UploaderTrigger,
|
|
65
|
+
al as composeImageUrl,
|
|
66
|
+
aq as create,
|
|
68
67
|
L as getBlogLink,
|
|
69
|
-
|
|
68
|
+
ar as getWsClient,
|
|
70
69
|
l as lexicalUtils,
|
|
71
70
|
p as preferences,
|
|
72
71
|
r as routes,
|
|
@@ -81,10 +80,10 @@ export {
|
|
|
81
80
|
a6 as useConfirm,
|
|
82
81
|
aa as useDefaultApiErrorHandler,
|
|
83
82
|
u as useNow,
|
|
84
|
-
|
|
83
|
+
am as usePointUpContext,
|
|
85
84
|
d as useSessionContext,
|
|
86
|
-
|
|
85
|
+
as as useSubscription,
|
|
87
86
|
a2 as useUnreadNotification,
|
|
88
|
-
|
|
87
|
+
ai as useUploader,
|
|
89
88
|
e as utils
|
|
90
89
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1102,7 +1102,8 @@ var __publicField = (obj, key, value) => {
|
|
|
1102
1102
|
size: 14,
|
|
1103
1103
|
did: user.did
|
|
1104
1104
|
}
|
|
1105
|
-
)
|
|
1105
|
+
),
|
|
1106
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { mt: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Badge, { passports: (user == null ? void 0 : user.passports) || [], pointInfo: (user == null ? void 0 : user.pointInfo) || {}, did: user == null ? void 0 : user.did }) })
|
|
1106
1107
|
] })
|
|
1107
1108
|
] }),
|
|
1108
1109
|
chatUrl && ((_b2 = session == null ? void 0 : session.user) == null ? void 0 : _b2.did) && ((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.did) !== user.did && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -1195,6 +1196,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1195
1196
|
open,
|
|
1196
1197
|
onClose: () => setOpen(false),
|
|
1197
1198
|
onOpen: () => setOpen(true),
|
|
1199
|
+
PopperProps: { disablePortal: false },
|
|
1198
1200
|
title: /* @__PURE__ */ jsxRuntime.jsx(ProfileCard, { user, click }),
|
|
1199
1201
|
children: /* @__PURE__ */ jsxRuntime.jsx(Box, { sx: { display: "flex", cursor: "pointer", width: avatarSize, height: avatarSize }, onClick: click, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
1202
|
Avatar,
|
|
@@ -1239,7 +1241,7 @@ var __publicField = (obj, key, value) => {
|
|
|
1239
1241
|
);
|
|
1240
1242
|
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
|
|
1241
1243
|
renderAvatar(),
|
|
1242
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1 }, children: [
|
|
1244
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column", flex: 1, overflow: "hidden" }, children: [
|
|
1243
1245
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1244
1246
|
Box,
|
|
1245
1247
|
{
|
|
@@ -3852,17 +3854,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3852
3854
|
);
|
|
3853
3855
|
if (chat.type === "dm") {
|
|
3854
3856
|
const oppositeUser = getOppositeUser(chat);
|
|
3855
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3856
|
-
AuthorInfo,
|
|
3857
|
-
{
|
|
3858
|
-
user: oppositeUser,
|
|
3859
|
-
showProfileCard: false,
|
|
3860
|
-
showBadge: false,
|
|
3861
|
-
showDID: false,
|
|
3862
|
-
linkToProfile: !inWallet,
|
|
3863
|
-
children: latestMessageTextContent
|
|
3864
|
-
}
|
|
3865
|
-
);
|
|
3857
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AuthorInfo, { user: oppositeUser, showProfileCard: true, showBadge: false, showDID: false, linkToProfile: !inWallet, children: latestMessageTextContent });
|
|
3866
3858
|
}
|
|
3867
3859
|
if (chat.type === "channel") {
|
|
3868
3860
|
return /* @__PURE__ */ jsxRuntime.jsx(ChannelGroup, { chat, children: latestMessageTextContent });
|
|
@@ -4092,7 +4084,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4092
4084
|
return null;
|
|
4093
4085
|
};
|
|
4094
4086
|
const render = () => {
|
|
4095
|
-
var _a2, _b2, _c, _d
|
|
4087
|
+
var _a2, _b2, _c, _d;
|
|
4096
4088
|
const baseCardSx = {
|
|
4097
4089
|
py: 1.5,
|
|
4098
4090
|
px: 2,
|
|
@@ -4158,13 +4150,13 @@ var __publicField = (obj, key, value) => {
|
|
|
4158
4150
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4159
4151
|
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4160
4152
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4161
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (
|
|
4153
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") })
|
|
4162
4154
|
] }),
|
|
4163
4155
|
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4164
4156
|
]
|
|
4165
4157
|
}
|
|
4166
4158
|
),
|
|
4167
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4159
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4168
4160
|
renderQuote(message.post)
|
|
4169
4161
|
]
|
|
4170
4162
|
}
|
|
@@ -4192,7 +4184,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4192
4184
|
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4193
4185
|
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4194
4186
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4195
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.
|
|
4187
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") })
|
|
4196
4188
|
] }),
|
|
4197
4189
|
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4198
4190
|
]
|
|
@@ -4235,7 +4227,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4235
4227
|
]
|
|
4236
4228
|
}
|
|
4237
4229
|
),
|
|
4238
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (
|
|
4230
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_d = (_b2 = message == null ? void 0 : message.comment) == null ? void 0 : _b2.excerpt) == null ? void 0 : _d.replace((_c = session == null ? void 0 : session.user) == null ? void 0 : _c.fullName, "") }),
|
|
4239
4231
|
renderQuote(message.post)
|
|
4240
4232
|
]
|
|
4241
4233
|
}
|
|
@@ -4520,28 +4512,15 @@ var __publicField = (obj, key, value) => {
|
|
|
4520
4512
|
}
|
|
4521
4513
|
) }) });
|
|
4522
4514
|
}
|
|
4523
|
-
const KEY_PREVIOUS_LOCATION = "__previous_location__";
|
|
4524
|
-
const getPreviousLocation = () => {
|
|
4525
|
-
return sessionStorage.getItem(KEY_PREVIOUS_LOCATION);
|
|
4526
|
-
};
|
|
4527
|
-
const PreviousLocationRecorder = () => {
|
|
4528
|
-
const location = reactRouterDom.useLocation();
|
|
4529
|
-
const locationRef = react.useRef();
|
|
4530
|
-
react.useEffect(() => {
|
|
4531
|
-
if (locationRef.current) {
|
|
4532
|
-
sessionStorage.setItem(KEY_PREVIOUS_LOCATION, locationRef.current);
|
|
4533
|
-
}
|
|
4534
|
-
locationRef.current = window.location.href;
|
|
4535
|
-
}, [location]);
|
|
4536
|
-
return null;
|
|
4537
|
-
};
|
|
4538
4515
|
function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
4539
4516
|
const navigate = reactRouterDom.useNavigate();
|
|
4517
|
+
const location = reactRouterDom.useLocation();
|
|
4540
4518
|
const mergedSx = [{}, ...Array.isArray(sx) ? sx : [sx]];
|
|
4541
4519
|
const handleClick = () => {
|
|
4520
|
+
var _a2;
|
|
4542
4521
|
if (url) {
|
|
4543
4522
|
navigate(url, { replace: true });
|
|
4544
|
-
} else if (
|
|
4523
|
+
} else if ((_a2 = location.state) == null ? void 0 : _a2.from) {
|
|
4545
4524
|
navigate(-1);
|
|
4546
4525
|
} else {
|
|
4547
4526
|
navigate(fallbackUrl || "/");
|
|
@@ -5660,13 +5639,13 @@ var __publicField = (obj, key, value) => {
|
|
|
5660
5639
|
channelDescription: "Channel Description",
|
|
5661
5640
|
channelName: "Channel Name",
|
|
5662
5641
|
deleteChannel: "Delete Channel",
|
|
5663
|
-
commentedYourPost: "commented your post",
|
|
5664
|
-
commentedPost: "commented post",
|
|
5642
|
+
commentedYourPost: "commented on your post",
|
|
5643
|
+
commentedPost: "commented on a post",
|
|
5665
5644
|
newPost: "create a new post",
|
|
5666
5645
|
mentionInComment: "mentioned you in a comment",
|
|
5667
5646
|
mentionInPost: "mentioned you in a post",
|
|
5668
|
-
replyYourComment: "replied your comment",
|
|
5669
|
-
replyComment: "replied comment",
|
|
5647
|
+
replyYourComment: "replied to your comment",
|
|
5648
|
+
replyComment: "replied to a comment",
|
|
5670
5649
|
deleteChannelTitle: "Delete this channel?",
|
|
5671
5650
|
deleteChannelDesc: "If you delete this channel, all messages in the channel will be deleted immediately.",
|
|
5672
5651
|
leaveChannel: "Leave channel",
|
|
@@ -11735,7 +11714,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11735
11714
|
exports2.PointUpProvider = PointUpProvider;
|
|
11736
11715
|
exports2.Post = PostComponent;
|
|
11737
11716
|
exports2.PostContent = PostContent;
|
|
11738
|
-
exports2.PreviousLocationRecorder = PreviousLocationRecorder;
|
|
11739
11717
|
exports2.RelativeTime = RelativeTime;
|
|
11740
11718
|
exports2.ScrollableEditorWrapper = ScrollableEditorWrapper;
|
|
11741
11719
|
exports2.SecureLabelPicker = SecureLabelPicker;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.239",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/bridge": "^2.9.77",
|
|
32
32
|
"@arcblock/ws": "^1.18.116",
|
|
33
|
-
"@blocklet/editor": "1.6.
|
|
34
|
-
"@blocklet/labels": "1.6.
|
|
33
|
+
"@blocklet/editor": "1.6.239",
|
|
34
|
+
"@blocklet/labels": "1.6.239",
|
|
35
35
|
"@blocklet/uploader": "^0.1.2",
|
|
36
36
|
"@emotion/css": "^11.10.5",
|
|
37
37
|
"@emotion/react": "^11.10.5",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"resolutions": {
|
|
96
96
|
"react": "^18.2.0"
|
|
97
97
|
},
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "14c8c180f957d6b4574cefaaf60202b6afeb1a53"
|
|
99
99
|
}
|