@blocklet/discuss-kit-ux 1.6.148 → 1.6.150
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.
|
@@ -45,7 +45,12 @@ interface PointUpNotificationMessage extends INotificationMessage {
|
|
|
45
45
|
comment?: Pick<Post, 'id' | 'excerpt'>;
|
|
46
46
|
eventKey?: string;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
interface TaskNotificationMessage extends INotificationMessage {
|
|
49
|
+
type: 'task';
|
|
50
|
+
subtype: 'open' | 'close' | 'assign' | 'unassign';
|
|
51
|
+
post: Pick<Post, 'id' | 'title' | 'excerpt' | 'cover'>;
|
|
52
|
+
}
|
|
53
|
+
export type NotificationMessage = CommentNotificationMessage | ReplyNotificationMessage | MentionInCommentNotificationMessage | MentionInPostNotificationMessage | PointUpNotificationMessage | TaskNotificationMessage;
|
|
49
54
|
interface CommonChat {
|
|
50
55
|
id: string;
|
|
51
56
|
participants: User[];
|
|
@@ -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-0NOeD-2C.mjs";
|
|
8
8
|
import "@blocklet/labels";
|
|
9
9
|
import "@mui/material/styles";
|
|
10
10
|
import "@mui/material/Box";
|
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
var _a, _b;
|
|
8
|
-
import {
|
|
8
|
+
import { Labels2, LabelPicker } from "@blocklet/labels";
|
|
9
9
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
10
10
|
import { useTheme, ThemeProvider, styled as styled$1 } from "@mui/material/styles";
|
|
11
11
|
import { useEffect, useRef, lazy, useState, createElement, useContext, isValidElement, Suspense, useMemo, createContext, Fragment as Fragment$1, forwardRef, useCallback } from "react";
|
|
@@ -2785,6 +2785,7 @@ function BlogItem({
|
|
|
2785
2785
|
const theme = useTheme();
|
|
2786
2786
|
const downMd = useMediaQuery$1(theme.breakpoints.down("md"));
|
|
2787
2787
|
const { locale } = useLocaleContext();
|
|
2788
|
+
const navigate = useNavigate();
|
|
2788
2789
|
const coverImgWidths = { xs: 84, md: 180, lg: 200 };
|
|
2789
2790
|
const coverImgWidth = useResponsiveValue(coverImgWidths);
|
|
2790
2791
|
if (loading) {
|
|
@@ -2846,23 +2847,24 @@ function BlogItem({
|
|
|
2846
2847
|
}
|
|
2847
2848
|
),
|
|
2848
2849
|
displayLabels && /* @__PURE__ */ jsx(
|
|
2849
|
-
|
|
2850
|
+
Labels2,
|
|
2850
2851
|
{
|
|
2851
2852
|
labels: item.labels,
|
|
2852
|
-
|
|
2853
|
-
|
|
2853
|
+
renderLabel: (node, element) => {
|
|
2854
|
+
const { id: id2 } = node.data;
|
|
2854
2855
|
return /* @__PURE__ */ jsx(
|
|
2855
2856
|
Box,
|
|
2856
2857
|
{
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
children:
|
|
2858
|
+
onClick: (e) => {
|
|
2859
|
+
e.preventDefault();
|
|
2860
|
+
navigate(`/tags/${locale}/${id2}`);
|
|
2861
|
+
},
|
|
2862
|
+
children: element
|
|
2862
2863
|
},
|
|
2863
2864
|
id2
|
|
2864
2865
|
);
|
|
2865
|
-
}
|
|
2866
|
+
},
|
|
2867
|
+
sx: { display: "inline-flex", mt: 1 }
|
|
2866
2868
|
}
|
|
2867
2869
|
),
|
|
2868
2870
|
/* @__PURE__ */ jsx(
|
|
@@ -3781,6 +3783,21 @@ function NotificationMessage({ chat, message, prevMessage, ...rest }) {
|
|
|
3781
3783
|
post && renderQuote(post)
|
|
3782
3784
|
] });
|
|
3783
3785
|
}
|
|
3786
|
+
if (message.type === "task") {
|
|
3787
|
+
const titles = {
|
|
3788
|
+
open: " opened a post",
|
|
3789
|
+
close: " closed a post",
|
|
3790
|
+
assign: " assigned you to a post",
|
|
3791
|
+
unassign: " unassigned you from a post"
|
|
3792
|
+
};
|
|
3793
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
3794
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
3795
|
+
/* @__PURE__ */ jsx(Box, { component: "span", sx: { fontWeight: "bold" }, children: message.sourceUser.fullName }),
|
|
3796
|
+
/* @__PURE__ */ jsx("span", { children: titles[message.subtype] })
|
|
3797
|
+
] }),
|
|
3798
|
+
renderQuote(message.post)
|
|
3799
|
+
] });
|
|
3800
|
+
}
|
|
3784
3801
|
return /* @__PURE__ */ jsx(Message, { message, showTime: false });
|
|
3785
3802
|
};
|
|
3786
3803
|
const messageInterval = message.createdAt.getTime() - ((prevMessage == null ? void 0 : prevMessage.createdAt.getTime()) || 0);
|
|
@@ -4541,7 +4558,7 @@ function Pagination({ page, size = 20, total, onChange, routerMode = true, ...re
|
|
|
4541
4558
|
}
|
|
4542
4559
|
);
|
|
4543
4560
|
}
|
|
4544
|
-
const Editor = lazy(() => import("./editor-
|
|
4561
|
+
const Editor = lazy(() => import("./editor-8KrQFW0-.mjs"));
|
|
4545
4562
|
function LazyEditor(props) {
|
|
4546
4563
|
const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4547
4564
|
/* @__PURE__ */ jsx(Skeleton, {}),
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "@blocklet/labels";
|
|
2
|
-
import { N, j, Q, A, h, a8, B, y, F, z, H, U, T, W, Y, o, C, q, v, x, a0, a1, ac, a3, K, L, D, ab, aa, E, G, c, b, a9, M, P, aj, n, m, a7, R, S, a4, k, Z, $, ad, ag, af, ah, ak, J, al, l, p, r, t, d, a5, O, e, X, w, a2, a6, u, ai, am, _, ae, f } from "./index-
|
|
2
|
+
import { N, j, Q, A, h, a8, B, y, F, z, H, U, T, W, Y, o, C, q, v, x, a0, a1, ac, a3, K, L, D, ab, aa, E, G, c, b, a9, M, P, aj, n, m, a7, R, S, a4, k, Z, $, ad, ag, af, ah, ak, J, al, l, p, r, t, d, a5, O, e, X, w, a2, a6, u, ai, am, _, ae, f } from "./index-0NOeD-2C.mjs";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@mui/material/Box";
|
package/dist/index.umd.js
CHANGED
|
@@ -2724,6 +2724,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2724
2724
|
const theme = styles.useTheme();
|
|
2725
2725
|
const downMd = useMediaQuery(theme.breakpoints.down("md"));
|
|
2726
2726
|
const { locale } = context.useLocaleContext();
|
|
2727
|
+
const navigate = reactRouterDom.useNavigate();
|
|
2727
2728
|
const coverImgWidths = { xs: 84, md: 180, lg: 200 };
|
|
2728
2729
|
const coverImgWidth = useResponsiveValue(coverImgWidths);
|
|
2729
2730
|
if (loading) {
|
|
@@ -2785,23 +2786,24 @@ var __publicField = (obj, key, value) => {
|
|
|
2785
2786
|
}
|
|
2786
2787
|
),
|
|
2787
2788
|
displayLabels && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2788
|
-
labels.
|
|
2789
|
+
labels.Labels2,
|
|
2789
2790
|
{
|
|
2790
2791
|
labels: item.labels,
|
|
2791
|
-
|
|
2792
|
-
|
|
2792
|
+
renderLabel: (node, element) => {
|
|
2793
|
+
const { id: id2 } = node.data;
|
|
2793
2794
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2794
2795
|
Box,
|
|
2795
2796
|
{
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
children:
|
|
2797
|
+
onClick: (e) => {
|
|
2798
|
+
e.preventDefault();
|
|
2799
|
+
navigate(`/tags/${locale}/${id2}`);
|
|
2800
|
+
},
|
|
2801
|
+
children: element
|
|
2801
2802
|
},
|
|
2802
2803
|
id2
|
|
2803
2804
|
);
|
|
2804
|
-
}
|
|
2805
|
+
},
|
|
2806
|
+
sx: { display: "inline-flex", mt: 1 }
|
|
2805
2807
|
}
|
|
2806
2808
|
),
|
|
2807
2809
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3720,6 +3722,21 @@ var __publicField = (obj, key, value) => {
|
|
|
3720
3722
|
post && renderQuote(post)
|
|
3721
3723
|
] });
|
|
3722
3724
|
}
|
|
3725
|
+
if (message.type === "task") {
|
|
3726
|
+
const titles = {
|
|
3727
|
+
open: " opened a post",
|
|
3728
|
+
close: " closed a post",
|
|
3729
|
+
assign: " assigned you to a post",
|
|
3730
|
+
unassign: " unassigned you from a post"
|
|
3731
|
+
};
|
|
3732
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
3733
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { children: [
|
|
3734
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", sx: { fontWeight: "bold" }, children: message.sourceUser.fullName }),
|
|
3735
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: titles[message.subtype] })
|
|
3736
|
+
] }),
|
|
3737
|
+
renderQuote(message.post)
|
|
3738
|
+
] });
|
|
3739
|
+
}
|
|
3723
3740
|
return /* @__PURE__ */ jsxRuntime.jsx(Message, { message, showTime: false });
|
|
3724
3741
|
};
|
|
3725
3742
|
const messageInterval = message.createdAt.getTime() - ((prevMessage == null ? void 0 : prevMessage.createdAt.getTime()) || 0);
|
package/dist/preferences.d.ts
CHANGED
|
@@ -33,5 +33,9 @@ declare const preferences: {
|
|
|
33
33
|
blogTemplate: "standard" | "corp";
|
|
34
34
|
primaryColor: string;
|
|
35
35
|
secondaryColor: string;
|
|
36
|
+
subscriptionPublicType: "slice" | "blur";
|
|
37
|
+
enableAssignmentDiscussion: boolean;
|
|
38
|
+
enableAssignmentBlog: boolean;
|
|
39
|
+
enableAssignmentDoc: boolean;
|
|
36
40
|
};
|
|
37
41
|
export default preferences;
|
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.150",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@arcblock/ws": "^1.18.110",
|
|
32
|
-
"@blocklet/editor": "1.6.
|
|
33
|
-
"@blocklet/labels": "1.6.
|
|
32
|
+
"@blocklet/editor": "1.6.150",
|
|
33
|
+
"@blocklet/labels": "1.6.150",
|
|
34
34
|
"@blocklet/uploader": "^0.0.73",
|
|
35
35
|
"@emotion/css": "^11.10.5",
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"resolutions": {
|
|
94
94
|
"react": "^18.2.0"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "c14a9d37e2affa1d0ddd1e6e398ec488b8d28911"
|
|
97
97
|
}
|