@blocklet/discuss-kit-ux 2.0.154 → 2.0.156
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.
|
@@ -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-CaIvSXjU.mjs";
|
|
8
8
|
const BlockletEditor = lazy(() => import("@blocklet/editor"));
|
|
9
9
|
const Root = styled(Box)`
|
|
10
10
|
.be-editable,
|
|
@@ -4188,7 +4188,7 @@ const Time = ({ createdAt }) => {
|
|
|
4188
4188
|
const diffInMilliseconds = now.getTime() - messageTime.getTime();
|
|
4189
4189
|
const diffInDays = diffInMilliseconds / (1e3 * 60 * 60 * 24);
|
|
4190
4190
|
const isWithinSevenDays = diffInDays <= 3;
|
|
4191
|
-
return /* @__PURE__ */ jsx(Box$1, {
|
|
4191
|
+
return /* @__PURE__ */ jsx(Box$1, { component: "span", sx: { fontSize: 12, color: "grey.500", ml: 0.8 }, children: isWithinSevenDays ? /* @__PURE__ */ jsx(RelativeTime, { value: createdAt }) : dayjs(messageTime).format("YYYY-MM-DD HH:mm") });
|
|
4192
4192
|
};
|
|
4193
4193
|
const baseItemSx = {
|
|
4194
4194
|
px: 1.25,
|
|
@@ -4351,111 +4351,53 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4351
4351
|
transition: "all 120ms linear"
|
|
4352
4352
|
};
|
|
4353
4353
|
if (message.type === "post_create") {
|
|
4354
|
-
return /* @__PURE__ */ jsxs(
|
|
4355
|
-
Box$1,
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
display: "flex",
|
|
4366
|
-
flexDirection: "row",
|
|
4367
|
-
justifyContent: "space-between",
|
|
4368
|
-
alignItems: "center",
|
|
4369
|
-
color: "primary.light"
|
|
4370
|
-
},
|
|
4371
|
-
children: [
|
|
4372
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4373
|
-
/* @__PURE__ */ jsx(Icon, { icon: "tabler:news", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4374
|
-
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4375
|
-
/* @__PURE__ */ jsx("span", { children: t("chat.newPost") })
|
|
4376
|
-
] }),
|
|
4377
|
-
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4378
|
-
]
|
|
4379
|
-
}
|
|
4380
|
-
),
|
|
4381
|
-
renderQuote(message.post)
|
|
4382
|
-
]
|
|
4383
|
-
}
|
|
4384
|
-
);
|
|
4354
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: { ...baseCardSx }, children: [
|
|
4355
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { color: "primary.light" }, children: [
|
|
4356
|
+
/* @__PURE__ */ jsxs(Box$1, { children: [
|
|
4357
|
+
/* @__PURE__ */ jsx(Icon, { icon: "tabler:news", style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 } }),
|
|
4358
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4359
|
+
/* @__PURE__ */ jsx("span", { children: t("chat.newPost") })
|
|
4360
|
+
] }),
|
|
4361
|
+
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4362
|
+
] }),
|
|
4363
|
+
renderQuote(message.post)
|
|
4364
|
+
] });
|
|
4385
4365
|
}
|
|
4386
4366
|
if (message.type === "comment") {
|
|
4387
|
-
return /* @__PURE__ */ jsxs(
|
|
4388
|
-
Box$1,
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
},
|
|
4404
|
-
children: [
|
|
4405
|
-
/* @__PURE__ */ jsxs(Box$1, { children: [
|
|
4406
|
-
/* @__PURE__ */ jsx(
|
|
4407
|
-
Icon,
|
|
4408
|
-
{
|
|
4409
|
-
icon: "tabler:message-circle-2",
|
|
4410
|
-
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4411
|
-
}
|
|
4412
|
-
),
|
|
4413
|
-
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5, verticalAlign: "middle" }, children: message.sourceUser.fullName }),
|
|
4414
|
-
/* @__PURE__ */ jsx("span", { style: { verticalAlign: "middle" }, children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") })
|
|
4415
|
-
] }),
|
|
4416
|
-
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4417
|
-
]
|
|
4418
|
-
}
|
|
4419
|
-
),
|
|
4420
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4421
|
-
renderQuote(message.post)
|
|
4422
|
-
]
|
|
4423
|
-
}
|
|
4424
|
-
);
|
|
4367
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: { ...baseCardSx }, children: [
|
|
4368
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { color: "primary.light" }, children: [
|
|
4369
|
+
/* @__PURE__ */ jsx(
|
|
4370
|
+
Icon,
|
|
4371
|
+
{
|
|
4372
|
+
icon: "tabler:message-circle-2",
|
|
4373
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4374
|
+
}
|
|
4375
|
+
),
|
|
4376
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4377
|
+
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") }),
|
|
4378
|
+
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4379
|
+
] }),
|
|
4380
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4381
|
+
renderQuote(message.post)
|
|
4382
|
+
] });
|
|
4425
4383
|
}
|
|
4426
4384
|
if (message.type === "reply") {
|
|
4427
|
-
return /* @__PURE__ */ jsxs(
|
|
4428
|
-
Box$1,
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
},
|
|
4444
|
-
children: [
|
|
4445
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4446
|
-
/* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4447
|
-
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4448
|
-
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") })
|
|
4449
|
-
] }),
|
|
4450
|
-
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4451
|
-
]
|
|
4452
|
-
}
|
|
4453
|
-
),
|
|
4454
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: message.reply.excerpt }),
|
|
4455
|
-
renderQuote({ title: message.post.title, excerpt: message.comment.excerpt })
|
|
4456
|
-
]
|
|
4457
|
-
}
|
|
4458
|
-
);
|
|
4385
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: { ...baseCardSx }, children: [
|
|
4386
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { color: "primary.light" }, children: [
|
|
4387
|
+
/* @__PURE__ */ jsx(
|
|
4388
|
+
Icon,
|
|
4389
|
+
{
|
|
4390
|
+
icon: "tabler:message-circle-2",
|
|
4391
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4392
|
+
}
|
|
4393
|
+
),
|
|
4394
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4395
|
+
/* @__PURE__ */ jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") }),
|
|
4396
|
+
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4397
|
+
] }),
|
|
4398
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: message.reply.excerpt }),
|
|
4399
|
+
renderQuote({ title: message.post.title, excerpt: message.comment.excerpt })
|
|
4400
|
+
] });
|
|
4459
4401
|
}
|
|
4460
4402
|
if (message.type === "mentionInComment") {
|
|
4461
4403
|
return /* @__PURE__ */ jsxs(
|
|
@@ -4465,29 +4407,21 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4465
4407
|
...baseCardSx
|
|
4466
4408
|
},
|
|
4467
4409
|
children: [
|
|
4468
|
-
/* @__PURE__ */ jsxs(
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
" ",
|
|
4484
|
-
t("chat.mentionInComment")
|
|
4485
|
-
] })
|
|
4486
|
-
] }),
|
|
4487
|
-
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4488
|
-
]
|
|
4489
|
-
}
|
|
4490
|
-
),
|
|
4410
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { color: "primary.light" }, children: [
|
|
4411
|
+
/* @__PURE__ */ jsx(
|
|
4412
|
+
Icon,
|
|
4413
|
+
{
|
|
4414
|
+
icon: "tabler:message-circle-2",
|
|
4415
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4416
|
+
}
|
|
4417
|
+
),
|
|
4418
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4419
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
4420
|
+
" ",
|
|
4421
|
+
t("chat.mentionInComment")
|
|
4422
|
+
] }),
|
|
4423
|
+
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4424
|
+
] }),
|
|
4491
4425
|
/* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_d2 = (_b2 = message == null ? void 0 : message.comment) == null ? void 0 : _b2.excerpt) == null ? void 0 : _d2.replace((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.fullName, "") }),
|
|
4492
4426
|
renderQuote(message.post)
|
|
4493
4427
|
]
|
|
@@ -4495,37 +4429,21 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4495
4429
|
);
|
|
4496
4430
|
}
|
|
4497
4431
|
if (message.type === "mentionInPost") {
|
|
4498
|
-
return /* @__PURE__ */ jsxs(
|
|
4499
|
-
Box$1,
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
color: "primary.light"
|
|
4514
|
-
},
|
|
4515
|
-
children: [
|
|
4516
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4517
|
-
/* @__PURE__ */ jsx(Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4518
|
-
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4519
|
-
/* @__PURE__ */ jsx("span", { children: t("chat.mentionInPost") })
|
|
4520
|
-
] }),
|
|
4521
|
-
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4522
|
-
]
|
|
4523
|
-
}
|
|
4524
|
-
),
|
|
4525
|
-
renderQuote(message.post)
|
|
4526
|
-
]
|
|
4527
|
-
}
|
|
4528
|
-
);
|
|
4432
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: { ...baseCardSx }, children: [
|
|
4433
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { color: "primary.light" }, children: [
|
|
4434
|
+
/* @__PURE__ */ jsx(
|
|
4435
|
+
Icon,
|
|
4436
|
+
{
|
|
4437
|
+
icon: "tabler:message-circle-2",
|
|
4438
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4439
|
+
}
|
|
4440
|
+
),
|
|
4441
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4442
|
+
/* @__PURE__ */ jsx("span", { children: t("chat.mentionInPost") }),
|
|
4443
|
+
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4444
|
+
] }),
|
|
4445
|
+
renderQuote(message.post)
|
|
4446
|
+
] });
|
|
4529
4447
|
}
|
|
4530
4448
|
if (message.type === "pointUp") {
|
|
4531
4449
|
const { points, post, comment, eventKey = "" } = message;
|
|
@@ -4545,37 +4463,21 @@ function NotificationMessage({ chat, message, prevMessage }) {
|
|
|
4545
4463
|
assign: t("chat.assignTask"),
|
|
4546
4464
|
unassign: t("chat.unassignTask")
|
|
4547
4465
|
};
|
|
4548
|
-
return /* @__PURE__ */ jsxs(
|
|
4549
|
-
Box$1,
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
color: "primary.light"
|
|
4564
|
-
},
|
|
4565
|
-
children: [
|
|
4566
|
-
/* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4567
|
-
/* @__PURE__ */ jsx(Icon, { icon: "tabler:arrow-forward-up", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4568
|
-
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4569
|
-
/* @__PURE__ */ jsx("span", { children: titles[message.subtype] })
|
|
4570
|
-
] }),
|
|
4571
|
-
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4572
|
-
]
|
|
4573
|
-
}
|
|
4574
|
-
),
|
|
4575
|
-
renderQuote(message.post)
|
|
4576
|
-
]
|
|
4577
|
-
}
|
|
4578
|
-
);
|
|
4466
|
+
return /* @__PURE__ */ jsxs(Box$1, { sx: { ...baseCardSx }, children: [
|
|
4467
|
+
/* @__PURE__ */ jsxs(Box$1, { sx: { color: "primary.light" }, children: [
|
|
4468
|
+
/* @__PURE__ */ jsx(
|
|
4469
|
+
Icon,
|
|
4470
|
+
{
|
|
4471
|
+
icon: "tabler:arrow-forward-up",
|
|
4472
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4473
|
+
}
|
|
4474
|
+
),
|
|
4475
|
+
/* @__PURE__ */ jsx(Box$1, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4476
|
+
/* @__PURE__ */ jsx("span", { children: titles[message.subtype] }),
|
|
4477
|
+
/* @__PURE__ */ jsx(Time, { createdAt: message.createdAt })
|
|
4478
|
+
] }),
|
|
4479
|
+
renderQuote(message.post)
|
|
4480
|
+
] });
|
|
4579
4481
|
}
|
|
4580
4482
|
return /* @__PURE__ */ jsx(Message, { message, showTime: false });
|
|
4581
4483
|
};
|
|
@@ -4811,7 +4713,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
|
|
|
4811
4713
|
}
|
|
4812
4714
|
const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 14L21 3m0 0l-6.5 18a.55.55 0 0 1-1 0L10 14l-7-3.5a.55.55 0 0 1 0-1z" }) });
|
|
4813
4715
|
const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M3 19V8.5a3.5 3.5 0 0 1 7 0V19m-7-6h7m11-1v7" }) });
|
|
4814
|
-
const Editor = lazy(() => import("./editor-
|
|
4716
|
+
const Editor = lazy(() => import("./editor-CVphYeBx.mjs"));
|
|
4815
4717
|
function LazyEditor(props) {
|
|
4816
4718
|
const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
|
|
4817
4719
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-
|
|
2
|
+
import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-CaIvSXjU.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -4113,7 +4113,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4113
4113
|
const diffInMilliseconds = now.getTime() - messageTime.getTime();
|
|
4114
4114
|
const diffInDays = diffInMilliseconds / (1e3 * 60 * 60 * 24);
|
|
4115
4115
|
const isWithinSevenDays = diffInDays <= 3;
|
|
4116
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Box, {
|
|
4116
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { fontSize: 12, color: "grey.500", ml: 0.8 }, children: isWithinSevenDays ? /* @__PURE__ */ jsxRuntime.jsx(RelativeTime, { value: createdAt }) : dayjs(messageTime).format("YYYY-MM-DD HH:mm") });
|
|
4117
4117
|
};
|
|
4118
4118
|
const baseItemSx = {
|
|
4119
4119
|
px: 1.25,
|
|
@@ -4276,111 +4276,53 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4276
4276
|
transition: "all 120ms linear"
|
|
4277
4277
|
};
|
|
4278
4278
|
if (message.type === "post_create") {
|
|
4279
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4280
|
-
Box,
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
display: "flex",
|
|
4291
|
-
flexDirection: "row",
|
|
4292
|
-
justifyContent: "space-between",
|
|
4293
|
-
alignItems: "center",
|
|
4294
|
-
color: "primary.light"
|
|
4295
|
-
},
|
|
4296
|
-
children: [
|
|
4297
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4298
|
-
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:news", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4299
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4300
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("chat.newPost") })
|
|
4301
|
-
] }),
|
|
4302
|
-
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4303
|
-
]
|
|
4304
|
-
}
|
|
4305
|
-
),
|
|
4306
|
-
renderQuote(message.post)
|
|
4307
|
-
]
|
|
4308
|
-
}
|
|
4309
|
-
);
|
|
4279
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ...baseCardSx }, children: [
|
|
4280
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: "primary.light" }, children: [
|
|
4281
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
4282
|
+
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:news", style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 } }),
|
|
4283
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4284
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("chat.newPost") })
|
|
4285
|
+
] }),
|
|
4286
|
+
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4287
|
+
] }),
|
|
4288
|
+
renderQuote(message.post)
|
|
4289
|
+
] });
|
|
4310
4290
|
}
|
|
4311
4291
|
if (message.type === "comment") {
|
|
4312
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4313
|
-
Box,
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
},
|
|
4329
|
-
children: [
|
|
4330
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
4331
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4332
|
-
react$1.Icon,
|
|
4333
|
-
{
|
|
4334
|
-
icon: "tabler:message-circle-2",
|
|
4335
|
-
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4336
|
-
}
|
|
4337
|
-
),
|
|
4338
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5, verticalAlign: "middle" }, children: message.sourceUser.fullName }),
|
|
4339
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { verticalAlign: "middle" }, children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") })
|
|
4340
|
-
] }),
|
|
4341
|
-
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4342
|
-
]
|
|
4343
|
-
}
|
|
4344
|
-
),
|
|
4345
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4346
|
-
renderQuote(message.post)
|
|
4347
|
-
]
|
|
4348
|
-
}
|
|
4349
|
-
);
|
|
4292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ...baseCardSx }, children: [
|
|
4293
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: "primary.light" }, children: [
|
|
4294
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4295
|
+
react$1.Icon,
|
|
4296
|
+
{
|
|
4297
|
+
icon: "tabler:message-circle-2",
|
|
4298
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4299
|
+
}
|
|
4300
|
+
),
|
|
4301
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4302
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.commentedPost") : t("chat.commentedYourPost") }),
|
|
4303
|
+
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4304
|
+
] }),
|
|
4305
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_a2 = message == null ? void 0 : message.comment) == null ? void 0 : _a2.excerpt }),
|
|
4306
|
+
renderQuote(message.post)
|
|
4307
|
+
] });
|
|
4350
4308
|
}
|
|
4351
4309
|
if (message.type === "reply") {
|
|
4352
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4353
|
-
Box,
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
},
|
|
4369
|
-
children: [
|
|
4370
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4371
|
-
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4372
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4373
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") })
|
|
4374
|
-
] }),
|
|
4375
|
-
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4376
|
-
]
|
|
4377
|
-
}
|
|
4378
|
-
),
|
|
4379
|
-
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: message.reply.excerpt }),
|
|
4380
|
-
renderQuote({ title: message.post.title, excerpt: message.comment.excerpt })
|
|
4381
|
-
]
|
|
4382
|
-
}
|
|
4383
|
-
);
|
|
4310
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ...baseCardSx }, children: [
|
|
4311
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: "primary.light" }, children: [
|
|
4312
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4313
|
+
react$1.Icon,
|
|
4314
|
+
{
|
|
4315
|
+
icon: "tabler:message-circle-2",
|
|
4316
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4317
|
+
}
|
|
4318
|
+
),
|
|
4319
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4320
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: (message == null ? void 0 : message.cc) ? t("chat.replyComment") : t("chat.replyYourComment") }),
|
|
4321
|
+
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4322
|
+
] }),
|
|
4323
|
+
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: message.reply.excerpt }),
|
|
4324
|
+
renderQuote({ title: message.post.title, excerpt: message.comment.excerpt })
|
|
4325
|
+
] });
|
|
4384
4326
|
}
|
|
4385
4327
|
if (message.type === "mentionInComment") {
|
|
4386
4328
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4390,29 +4332,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4390
4332
|
...baseCardSx
|
|
4391
4333
|
},
|
|
4392
4334
|
children: [
|
|
4393
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
" ",
|
|
4409
|
-
t("chat.mentionInComment")
|
|
4410
|
-
] })
|
|
4411
|
-
] }),
|
|
4412
|
-
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4413
|
-
]
|
|
4414
|
-
}
|
|
4415
|
-
),
|
|
4335
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: "primary.light" }, children: [
|
|
4336
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4337
|
+
react$1.Icon,
|
|
4338
|
+
{
|
|
4339
|
+
icon: "tabler:message-circle-2",
|
|
4340
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4341
|
+
}
|
|
4342
|
+
),
|
|
4343
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4344
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
4345
|
+
" ",
|
|
4346
|
+
t("chat.mentionInComment")
|
|
4347
|
+
] }),
|
|
4348
|
+
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4349
|
+
] }),
|
|
4416
4350
|
/* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body1", sx: { fontSize: 16 }, children: (_d2 = (_b2 = message == null ? void 0 : message.comment) == null ? void 0 : _b2.excerpt) == null ? void 0 : _d2.replace((_c2 = session == null ? void 0 : session.user) == null ? void 0 : _c2.fullName, "") }),
|
|
4417
4351
|
renderQuote(message.post)
|
|
4418
4352
|
]
|
|
@@ -4420,37 +4354,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4420
4354
|
);
|
|
4421
4355
|
}
|
|
4422
4356
|
if (message.type === "mentionInPost") {
|
|
4423
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4424
|
-
Box,
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
color: "primary.light"
|
|
4439
|
-
},
|
|
4440
|
-
children: [
|
|
4441
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4442
|
-
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:message-circle-2", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4443
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4444
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("chat.mentionInPost") })
|
|
4445
|
-
] }),
|
|
4446
|
-
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4447
|
-
]
|
|
4448
|
-
}
|
|
4449
|
-
),
|
|
4450
|
-
renderQuote(message.post)
|
|
4451
|
-
]
|
|
4452
|
-
}
|
|
4453
|
-
);
|
|
4357
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ...baseCardSx }, children: [
|
|
4358
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: "primary.light" }, children: [
|
|
4359
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4360
|
+
react$1.Icon,
|
|
4361
|
+
{
|
|
4362
|
+
icon: "tabler:message-circle-2",
|
|
4363
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4364
|
+
}
|
|
4365
|
+
),
|
|
4366
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4367
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("chat.mentionInPost") }),
|
|
4368
|
+
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4369
|
+
] }),
|
|
4370
|
+
renderQuote(message.post)
|
|
4371
|
+
] });
|
|
4454
4372
|
}
|
|
4455
4373
|
if (message.type === "pointUp") {
|
|
4456
4374
|
const { points, post, comment, eventKey = "" } = message;
|
|
@@ -4470,37 +4388,21 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4470
4388
|
assign: t("chat.assignTask"),
|
|
4471
4389
|
unassign: t("chat.unassignTask")
|
|
4472
4390
|
};
|
|
4473
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4474
|
-
Box,
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
color: "primary.light"
|
|
4489
|
-
},
|
|
4490
|
-
children: [
|
|
4491
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center" }, children: [
|
|
4492
|
-
/* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: "tabler:arrow-forward-up", style: { height: 15, width: 15, marginRight: 4 } }),
|
|
4493
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4494
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: titles[message.subtype] })
|
|
4495
|
-
] }),
|
|
4496
|
-
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4497
|
-
]
|
|
4498
|
-
}
|
|
4499
|
-
),
|
|
4500
|
-
renderQuote(message.post)
|
|
4501
|
-
]
|
|
4502
|
-
}
|
|
4503
|
-
);
|
|
4391
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { ...baseCardSx }, children: [
|
|
4392
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { color: "primary.light" }, children: [
|
|
4393
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4394
|
+
react$1.Icon,
|
|
4395
|
+
{
|
|
4396
|
+
icon: "tabler:arrow-forward-up",
|
|
4397
|
+
style: { verticalAlign: "middle", height: 15, width: 15, marginRight: 4 }
|
|
4398
|
+
}
|
|
4399
|
+
),
|
|
4400
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { mr: 0.5 }, children: message.sourceUser.fullName }),
|
|
4401
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: titles[message.subtype] }),
|
|
4402
|
+
/* @__PURE__ */ jsxRuntime.jsx(Time, { createdAt: message.createdAt })
|
|
4403
|
+
] }),
|
|
4404
|
+
renderQuote(message.post)
|
|
4405
|
+
] });
|
|
4504
4406
|
}
|
|
4505
4407
|
return /* @__PURE__ */ jsxRuntime.jsx(Message, { message, showTime: false });
|
|
4506
4408
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/discuss-kit-ux",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.156",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@arcblock/bridge": "^2.10.28",
|
|
32
32
|
"@arcblock/react-hooks": "^2.10.28",
|
|
33
33
|
"@arcblock/ws": "^1.18.135",
|
|
34
|
-
"@blocklet/editor": "2.0.
|
|
35
|
-
"@blocklet/labels": "2.0.
|
|
34
|
+
"@blocklet/editor": "2.0.156",
|
|
35
|
+
"@blocklet/labels": "2.0.156",
|
|
36
36
|
"@blocklet/uploader": "^0.1.28",
|
|
37
37
|
"@emotion/css": "^11.10.5",
|
|
38
38
|
"@emotion/react": "^11.10.5",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"resolutions": {
|
|
101
101
|
"react": "^18.2.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "eefba27a6dd5c7ae4ecd42515a5013ef064a1faa"
|
|
104
104
|
}
|