@box/threaded-annotations 2.1.6 → 2.1.7
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/esm/lib/components/v2/message-editor/subcomponents/post-button.js +22 -20
- package/dist/esm/lib/components/v2/message-header/message-header.js +62 -58
- package/dist/esm/lib/components/v2/message-header/message-options-menu.js +33 -26
- package/dist/esm/lib/components/v2/text-message/subcomponents/message-footer.js +35 -33
- package/dist/esm/lib/components/v2/text-message/text-message.js +65 -63
- package/dist/esm/lib/v2/resin-targets.js +18 -0
- package/dist/types/lib/components/v2/message-header/message-options-menu.d.ts +2 -1
- package/dist/types/lib/v2/resin-targets.d.ts +17 -0
- package/package.json +1 -1
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { useMessageEditorContext as e } from "../message-editor-context.js";
|
|
2
2
|
import t from "../messages.js";
|
|
3
3
|
import { useMessageSubmit as n } from "../hooks/useMessageSubmit.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as r } from "../../../../v2/resin-targets.js";
|
|
5
|
+
import { Button as i } from "@box/blueprint-web";
|
|
6
|
+
import { useIntl as a } from "react-intl";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
8
|
+
import { ArrowUp as s } from "@box/blueprint-web-assets/icons/Medium";
|
|
9
|
+
var c = ({ disabled: c, onPost: l, onPostError: u, onPostSuccess: d, cleanEditor: f, getEditorJsonContent: p }) => {
|
|
10
|
+
let { isLoading: m } = e(), { handleSubmit: h } = n({
|
|
11
|
+
onSubmit: l,
|
|
12
|
+
onSubmitError: u,
|
|
13
|
+
onSuccess: d,
|
|
14
|
+
cleanEditor: f,
|
|
15
|
+
getEditorJsonContent: p
|
|
16
|
+
}), g = a();
|
|
17
|
+
return /* @__PURE__ */ o(i, {
|
|
18
|
+
"aria-label": g.formatMessage(t.post),
|
|
19
|
+
"data-resin-target": r.COMMENT_POST,
|
|
20
|
+
disabled: c,
|
|
21
|
+
endIcon: s,
|
|
22
|
+
loading: m,
|
|
23
|
+
loadingAriaLabel: g.formatMessage(t.postLoading),
|
|
24
|
+
onClick: h,
|
|
23
25
|
size: "small",
|
|
24
26
|
variant: "primary"
|
|
25
27
|
});
|
|
26
28
|
};
|
|
27
|
-
export {
|
|
29
|
+
export { c as PostButton };
|
|
@@ -1,86 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import i from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { CheckmarkCircle as m } from "@box/blueprint-web-assets/icons/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as e } from "../../../v2/resin-targets.js";
|
|
2
|
+
import { useThreadedAnnotationsContext as t } from "../../../v2/threaded-annotations-context.js";
|
|
3
|
+
import { UserAvatarButton as n } from "../user-avatar/user-avatar.js";
|
|
4
|
+
import { n as r, t as i } from "../../../../../chunks/delete-confirmation-popover.js";
|
|
5
|
+
import a from "./messages.js";
|
|
6
|
+
import { MessageOptionsMenu as o } from "./message-options-menu.js";
|
|
7
|
+
import { IconButton as s, Text as c, Tooltip as l } from "@box/blueprint-web";
|
|
8
|
+
import { useState as u } from "react";
|
|
9
|
+
import { useIntl as d } from "react-intl";
|
|
10
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
import { CheckmarkCircle as m } from "@box/blueprint-web-assets/icons/Medium";
|
|
12
|
+
import { CheckmarkCircle as h } from "@box/blueprint-web-assets/icons/MediumFilled";
|
|
13
|
+
var g = ({ author: g, canResolve: _ = !1, isResolved: v = !1, canEdit: y = !0, canDelete: b = !0, hasReplies: x = !1, isFirstMessage: S = !1, onAvatarClick: C, onCopyLink: w, onDelete: T, onEdit: E, onResolve: D, onThreadDelete: O, onUnresolve: k }) => {
|
|
14
|
+
let A = d(), { isAnnotations: j } = t(), [M, N] = u(!1), [P, F] = u(!1);
|
|
15
|
+
return /* @__PURE__ */ p("div", {
|
|
16
|
+
className: r.headerContainer,
|
|
17
|
+
children: [/* @__PURE__ */ p("div", {
|
|
18
|
+
className: r.information,
|
|
19
|
+
children: [/* @__PURE__ */ f(n, {
|
|
20
|
+
onClick: C,
|
|
21
|
+
user: g
|
|
22
|
+
}), /* @__PURE__ */ f("div", {
|
|
23
|
+
className: r.textContainer,
|
|
23
24
|
"data-message-author": !0,
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ f(c, {
|
|
25
26
|
as: "p",
|
|
26
|
-
className:
|
|
27
|
+
className: r.author,
|
|
27
28
|
color: "textOnLightDefault",
|
|
28
29
|
variant: "bodyDefaultBold",
|
|
29
|
-
children:
|
|
30
|
+
children: g.name
|
|
30
31
|
})
|
|
31
32
|
})]
|
|
32
|
-
}), /* @__PURE__ */
|
|
33
|
-
className:
|
|
34
|
-
"data-state":
|
|
33
|
+
}), /* @__PURE__ */ p("div", {
|
|
34
|
+
className: r.optionsMenu,
|
|
35
|
+
"data-state": M || P ? "open" : "closed",
|
|
35
36
|
children: [
|
|
36
|
-
|
|
37
|
-
content:
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
"aria-label":
|
|
37
|
+
_ && !v && /* @__PURE__ */ f(l, {
|
|
38
|
+
content: A.formatMessage(a.resolveButtonAriaLabel),
|
|
39
|
+
children: /* @__PURE__ */ f(s, {
|
|
40
|
+
"aria-label": A.formatMessage(a.resolveButtonAriaLabel),
|
|
40
41
|
"data-no-expand": !0,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
"data-resin-target": j ? e.ANNOTATION_RESOLVE : e.COMMENT_RESOLVE,
|
|
43
|
+
disabled: P,
|
|
44
|
+
icon: m,
|
|
45
|
+
onClick: () => D?.(),
|
|
44
46
|
size: "small"
|
|
45
47
|
})
|
|
46
48
|
}),
|
|
47
|
-
|
|
48
|
-
content:
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
"aria-label":
|
|
49
|
+
_ && v && /* @__PURE__ */ f(l, {
|
|
50
|
+
content: A.formatMessage(a.unresolveButtonAriaLabel),
|
|
51
|
+
children: /* @__PURE__ */ f(s, {
|
|
52
|
+
"aria-label": A.formatMessage(a.unresolveButtonAriaLabel),
|
|
51
53
|
"data-no-expand": !0,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
"data-resin-target": j ? e.ANNOTATION_UNRESOLVE : e.COMMENT_UNRESOLVE,
|
|
55
|
+
disabled: P,
|
|
56
|
+
icon: h,
|
|
57
|
+
onClick: () => k?.(),
|
|
55
58
|
size: "small",
|
|
56
59
|
variant: "icon-logo"
|
|
57
60
|
})
|
|
58
61
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
canDelete:
|
|
61
|
-
canEdit:
|
|
62
|
-
disabled:
|
|
63
|
-
|
|
62
|
+
/* @__PURE__ */ f(o, {
|
|
63
|
+
canDelete: b,
|
|
64
|
+
canEdit: y,
|
|
65
|
+
disabled: P,
|
|
66
|
+
isAnnotations: j,
|
|
67
|
+
onCopyLink: w,
|
|
64
68
|
onDelete: () => {
|
|
65
|
-
|
|
69
|
+
S ? (N(!1), F(!0)) : (N(!1), T?.());
|
|
66
70
|
},
|
|
67
|
-
onEdit:
|
|
68
|
-
onOpenChange:
|
|
71
|
+
onEdit: E,
|
|
72
|
+
onOpenChange: N
|
|
69
73
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
hasReplies:
|
|
72
|
-
isAnnotation:
|
|
74
|
+
/* @__PURE__ */ f(i, {
|
|
75
|
+
hasReplies: x,
|
|
76
|
+
isAnnotation: j,
|
|
73
77
|
onCancel: () => {
|
|
74
|
-
|
|
78
|
+
F(!1), N(!1);
|
|
75
79
|
},
|
|
76
80
|
onConfirm: () => {
|
|
77
|
-
|
|
81
|
+
O?.(), F(!1), N(!1);
|
|
78
82
|
},
|
|
79
|
-
onOpenChange:
|
|
80
|
-
open:
|
|
83
|
+
onOpenChange: F,
|
|
84
|
+
open: P
|
|
81
85
|
})
|
|
82
86
|
]
|
|
83
87
|
})]
|
|
84
88
|
});
|
|
85
89
|
};
|
|
86
|
-
export {
|
|
90
|
+
export { g as MessageHeader };
|
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
import { THREADED_ANNOTATIONS_PORTAL as e } from "../../../v2/constants.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as t } from "../../../v2/resin-targets.js";
|
|
3
|
+
import n from "./messages.js";
|
|
4
|
+
import { DropdownMenu as r, IconButton as i } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as a } from "react-intl";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { Ellipsis as c, Link as l, Pencil as u, Trash as d } from "@box/blueprint-web-assets/icons/Medium";
|
|
8
|
+
var f = ({ canDelete: f = !0, canEdit: p = !0, disabled: m, isAnnotations: h = !1, onCopyLink: g, onDelete: _, onEdit: v, onOpenChange: y }) => {
|
|
9
|
+
let { formatMessage: b } = a(), x = p || !!g;
|
|
10
|
+
if (!(x || f)) return null;
|
|
11
|
+
let S = h ? t.ANNOTATION_MENU : t.COMMENT_MENU, C = h ? t.ANNOTATION_EDIT : t.COMMENT_EDIT, w = h ? t.ANNOTATION_COPY_LINK : t.COMMENT_COPY_LINK, T = h ? t.ANNOTATION_DELETE : t.COMMENT_DELETE;
|
|
12
|
+
return /* @__PURE__ */ s(r.Root, {
|
|
10
13
|
modal: !1,
|
|
11
|
-
onOpenChange:
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
-
"aria-label":
|
|
14
|
+
onOpenChange: y,
|
|
15
|
+
children: [/* @__PURE__ */ o(r.Trigger, { children: /* @__PURE__ */ o(i, {
|
|
16
|
+
"aria-label": b(n.moreOptionsAriaLabel),
|
|
14
17
|
"data-no-expand": !0,
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
"data-resin-target": S,
|
|
19
|
+
disabled: m,
|
|
20
|
+
icon: c,
|
|
17
21
|
size: "small"
|
|
18
|
-
}) }), /* @__PURE__ */
|
|
22
|
+
}) }), /* @__PURE__ */ s(r.Content, {
|
|
19
23
|
...e,
|
|
20
24
|
align: "end",
|
|
21
25
|
children: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
p && /* @__PURE__ */ s(r.Item, {
|
|
27
|
+
"data-resin-target": C,
|
|
28
|
+
onSelect: () => v?.(),
|
|
29
|
+
children: [/* @__PURE__ */ o(r.Item.StartElement, { icon: u }), /* @__PURE__ */ o(r.Item.MainContent, { label: b(n.edit) })]
|
|
25
30
|
}),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
g && /* @__PURE__ */ s(r.Item, {
|
|
32
|
+
"data-resin-target": w,
|
|
33
|
+
onSelect: () => g(),
|
|
34
|
+
children: [/* @__PURE__ */ o(r.Item.StartElement, { icon: l }), /* @__PURE__ */ o(r.Item.MainContent, { label: b(n.copyLink) })]
|
|
29
35
|
}),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
f && x && /* @__PURE__ */ o(r.Separator, {}),
|
|
37
|
+
f && /* @__PURE__ */ s(r.Item, {
|
|
38
|
+
"data-resin-target": T,
|
|
39
|
+
onSelect: () => _?.(),
|
|
33
40
|
variant: "destructive",
|
|
34
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ o(r.Item.StartElement, { icon: d }), /* @__PURE__ */ o(r.Item.MainContent, { label: b(n.delete) })]
|
|
35
42
|
})
|
|
36
43
|
]
|
|
37
44
|
})]
|
|
38
|
-
})
|
|
45
|
+
});
|
|
39
46
|
};
|
|
40
|
-
export {
|
|
47
|
+
export { f as MessageOptionsMenu };
|
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as e } from "../../../../v2/resin-targets.js";
|
|
2
|
+
import t from "../messages.js";
|
|
3
|
+
import { t as n } from "../../../../../../chunks/text-message.module.js";
|
|
4
|
+
import { Button as r, Focusable as i, Text as a, Tooltip as o } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as s } from "react-intl";
|
|
6
|
+
import { getReadableTime as c } from "@box/readable-time";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
var d = ({ createdAt: d, onReply: f, updatedAt: p }) => {
|
|
9
|
+
let m = s();
|
|
10
|
+
return /* @__PURE__ */ u("div", {
|
|
11
|
+
className: n.messageFooter,
|
|
11
12
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
content:
|
|
13
|
+
/* @__PURE__ */ l(o, {
|
|
14
|
+
content: c({
|
|
14
15
|
alwaysShowTime: !0,
|
|
15
|
-
intl:
|
|
16
|
+
intl: m,
|
|
16
17
|
relativeThreshold: 0,
|
|
17
|
-
timestamp:
|
|
18
|
+
timestamp: d
|
|
18
19
|
}),
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
className:
|
|
20
|
+
children: /* @__PURE__ */ l(i, {
|
|
21
|
+
className: n.readableTimeWrapper,
|
|
21
22
|
"data-no-expand": !0,
|
|
22
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ l(a, {
|
|
23
24
|
as: "span",
|
|
24
25
|
color: "textOnLightSecondary",
|
|
25
26
|
variant: "bodySmall",
|
|
26
|
-
children:
|
|
27
|
-
intl:
|
|
28
|
-
timestamp:
|
|
27
|
+
children: c({
|
|
28
|
+
intl: m,
|
|
29
|
+
timestamp: d
|
|
29
30
|
})
|
|
30
31
|
})
|
|
31
32
|
})
|
|
32
33
|
}),
|
|
33
|
-
|
|
34
|
-
content:
|
|
34
|
+
p !== void 0 && /* @__PURE__ */ l(o, {
|
|
35
|
+
content: m.formatMessage(t.editedTooltip, { time: c({
|
|
35
36
|
alwaysShowTime: !0,
|
|
36
|
-
intl:
|
|
37
|
+
intl: m,
|
|
37
38
|
relativeThreshold: 0,
|
|
38
|
-
timestamp:
|
|
39
|
+
timestamp: p
|
|
39
40
|
}) }),
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ l(i, {
|
|
41
42
|
"data-no-expand": !0,
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ l(a, {
|
|
43
44
|
as: "span",
|
|
44
45
|
color: "textOnLightSecondary",
|
|
45
46
|
variant: "bodySmall",
|
|
46
|
-
children:
|
|
47
|
+
children: m.formatMessage(t.edited)
|
|
47
48
|
})
|
|
48
49
|
})
|
|
49
50
|
}),
|
|
50
|
-
|
|
51
|
-
"aria-label":
|
|
52
|
-
className:
|
|
51
|
+
f && /* @__PURE__ */ l(r, {
|
|
52
|
+
"aria-label": m.formatMessage(t.replyButtonAriaLabel),
|
|
53
|
+
className: n.replyButton,
|
|
53
54
|
"data-no-expand": !0,
|
|
55
|
+
"data-resin-target": e.COMMENT_REPLY,
|
|
54
56
|
size: "x-small",
|
|
55
57
|
variant: "quaternary",
|
|
56
|
-
onClick:
|
|
57
|
-
children:
|
|
58
|
+
onClick: f,
|
|
59
|
+
children: m.formatMessage(t.reply)
|
|
58
60
|
})
|
|
59
61
|
]
|
|
60
62
|
});
|
|
61
63
|
};
|
|
62
|
-
export {
|
|
64
|
+
export { d as MessageFooter };
|
|
@@ -1,76 +1,78 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import a from "
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import l from "
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as e } from "../../../v2/resin-targets.js";
|
|
2
|
+
import { MessageEditorVariant as t } from "../message-editor/message-editor.types.js";
|
|
3
|
+
import { MessageEditor as n } from "../message-editor/message-editor.js";
|
|
4
|
+
import { useThreadedAnnotationsContext as r } from "../../../v2/threaded-annotations-context.js";
|
|
5
|
+
import { t as i } from "../../../../../chunks/annotation-badge.js";
|
|
6
|
+
import { MessageHeader as a } from "../message-header/message-header.js";
|
|
7
|
+
import o from "./messages.js";
|
|
8
|
+
import { t as s } from "../../../../../chunks/text-message.module.js";
|
|
9
|
+
import { MessageFooter as c } from "./subcomponents/message-footer.js";
|
|
10
|
+
import { MessageRenderer as l } from "./subcomponents/message-renderer.js";
|
|
11
|
+
import u from "clsx";
|
|
12
|
+
import { useIntl as d } from "react-intl";
|
|
13
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
|
+
var h = ({ id: h, author: g, message: _, createdAt: v, updatedAt: y, permissions: b, showThreadedIndicator: x = !0, isResolved: S = !1, isFirstMessage: C = !1, hasReplies: w = !1, maxCharacterCount: T, onAvatarClick: E, onCopyLink: D, onDelete: O, onThreadDelete: k, onEdit: A, onEditError: j, onResolve: M, onUnresolve: N, userSelectorProps: P, annotationTarget: F, onAnnotationBadgeClick: I, originalContentDeleted: L }) => {
|
|
15
|
+
let { canResolve: R, canEdit: z, canDelete: B } = b, V = d(), { dispatch: H, isReplyDisabled: U, isEditDisabled: W, isAnnotations: G, editingMessageId: K } = r(), q = K === h, J = !!A && !W && z;
|
|
16
|
+
return /* @__PURE__ */ m("div", {
|
|
17
|
+
"aria-label": V.formatMessage(o.annotationMessageAriaLabel),
|
|
18
|
+
className: s.textMessage,
|
|
18
19
|
"data-message-wrapper": !0,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
"data-resin-component": e.COMMENT_CARD,
|
|
21
|
+
children: [/* @__PURE__ */ p(a, {
|
|
22
|
+
author: g,
|
|
23
|
+
canResolve: R,
|
|
24
|
+
isResolved: S,
|
|
25
|
+
canDelete: B,
|
|
26
|
+
canEdit: J,
|
|
27
|
+
hasReplies: w,
|
|
28
|
+
isFirstMessage: C,
|
|
29
|
+
onAvatarClick: E,
|
|
30
|
+
onCopyLink: D ? () => D(h) : void 0,
|
|
31
|
+
onDelete: () => O(h),
|
|
32
|
+
onThreadDelete: k,
|
|
33
|
+
onEdit: J ? () => H({
|
|
32
34
|
type: "EDIT",
|
|
33
|
-
id:
|
|
35
|
+
id: h
|
|
34
36
|
}) : void 0,
|
|
35
|
-
onResolve:
|
|
36
|
-
onUnresolve:
|
|
37
|
-
}), /* @__PURE__ */
|
|
38
|
-
className:
|
|
39
|
-
children: [/* @__PURE__ */
|
|
40
|
-
className:
|
|
41
|
-
children: [
|
|
42
|
-
className:
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
-
annotationTarget:
|
|
45
|
-
onClick: () =>
|
|
46
|
-
originalContentDeleted:
|
|
37
|
+
onResolve: M ? () => M(h) : void 0,
|
|
38
|
+
onUnresolve: N ? () => N(h) : void 0
|
|
39
|
+
}), /* @__PURE__ */ m("div", {
|
|
40
|
+
className: s.contentWrapper,
|
|
41
|
+
children: [/* @__PURE__ */ p("div", { className: u(s.threadedIndicator, !x && s.threadedIndicatorHidden) }), /* @__PURE__ */ m("div", {
|
|
42
|
+
className: s.messageContent,
|
|
43
|
+
children: [F && !G && /* @__PURE__ */ p("div", {
|
|
44
|
+
className: s.annotationBadgeWrapper,
|
|
45
|
+
children: /* @__PURE__ */ p(i, {
|
|
46
|
+
annotationTarget: F,
|
|
47
|
+
onClick: () => I?.(h),
|
|
48
|
+
originalContentDeleted: L
|
|
47
49
|
})
|
|
48
|
-
}),
|
|
49
|
-
className:
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
initialContent:
|
|
52
|
-
maxCharacterCount:
|
|
53
|
-
onEditCancel: () =>
|
|
54
|
-
onEditSuccess: () =>
|
|
55
|
-
onSave: (e) =>
|
|
56
|
-
onSaveError:
|
|
57
|
-
userSelectorProps:
|
|
58
|
-
variant:
|
|
50
|
+
}), q && A ? /* @__PURE__ */ p("div", {
|
|
51
|
+
className: s.inlineEditSlot,
|
|
52
|
+
children: /* @__PURE__ */ p(n, {
|
|
53
|
+
initialContent: _,
|
|
54
|
+
maxCharacterCount: T,
|
|
55
|
+
onEditCancel: () => H({ type: "CLEAR_EDIT" }),
|
|
56
|
+
onEditSuccess: () => H({ type: "CLEAR_EDIT" }),
|
|
57
|
+
onSave: (e) => A(h, e),
|
|
58
|
+
onSaveError: j,
|
|
59
|
+
userSelectorProps: P,
|
|
60
|
+
variant: t.EDIT_MESSAGE
|
|
59
61
|
})
|
|
60
|
-
}) : /* @__PURE__ */
|
|
61
|
-
className:
|
|
62
|
+
}) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
63
|
+
className: s.rendererWrapper,
|
|
62
64
|
"data-message-body": !0,
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
-
}), /* @__PURE__ */
|
|
65
|
-
createdAt:
|
|
66
|
-
onReply:
|
|
65
|
+
children: /* @__PURE__ */ p(l, { messageObject: _ })
|
|
66
|
+
}), /* @__PURE__ */ p(c, {
|
|
67
|
+
createdAt: v,
|
|
68
|
+
onReply: U ? void 0 : () => H({
|
|
67
69
|
type: "REPLY",
|
|
68
|
-
author:
|
|
70
|
+
author: g
|
|
69
71
|
}),
|
|
70
|
-
updatedAt:
|
|
72
|
+
updatedAt: y
|
|
71
73
|
})] })]
|
|
72
74
|
})]
|
|
73
75
|
})]
|
|
74
76
|
});
|
|
75
77
|
};
|
|
76
|
-
export {
|
|
78
|
+
export { h as TextMessage };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
ANNOTATION_COPY_LINK: "activityfeed-annotation-copylink",
|
|
3
|
+
ANNOTATION_DELETE: "activityfeed-annotation-delete",
|
|
4
|
+
ANNOTATION_EDIT: "activityfeed-annotation-edit",
|
|
5
|
+
ANNOTATION_MENU: "activityfeed-annotation-options",
|
|
6
|
+
ANNOTATION_RESOLVE: "activityfeed-annotation-resolve",
|
|
7
|
+
ANNOTATION_UNRESOLVE: "activityfeed-annotation-unresolve",
|
|
8
|
+
COMMENT_CARD: "activityfeed-comment-card",
|
|
9
|
+
COMMENT_COPY_LINK: "activityfeed-comment-copylink",
|
|
10
|
+
COMMENT_DELETE: "activityfeed-comment-delete",
|
|
11
|
+
COMMENT_EDIT: "activityfeed-comment-edit",
|
|
12
|
+
COMMENT_MENU: "activityfeed-comment-options",
|
|
13
|
+
COMMENT_POST: "activityfeed-comment-post",
|
|
14
|
+
COMMENT_REPLY: "activityfeed-comment-reply",
|
|
15
|
+
COMMENT_RESOLVE: "activityfeed-comment-resolve",
|
|
16
|
+
COMMENT_UNRESOLVE: "activityfeed-comment-unresolve"
|
|
17
|
+
};
|
|
18
|
+
export { e as THREADED_ANNOTATIONS_RESIN_TARGETS };
|
|
@@ -2,6 +2,7 @@ export interface MessageOptionsMenuProps {
|
|
|
2
2
|
canDelete?: boolean;
|
|
3
3
|
canEdit?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
isAnnotations?: boolean;
|
|
5
6
|
onCopyLink?: () => void;
|
|
6
7
|
onDelete?: () => void;
|
|
7
8
|
onEdit?: () => void;
|
|
@@ -11,4 +12,4 @@ export interface MessageOptionsMenuProps {
|
|
|
11
12
|
* Renders a context menu for an annotation message with Edit, Copy link, and Delete options.
|
|
12
13
|
* Returns null when no items would be shown.
|
|
13
14
|
*/
|
|
14
|
-
export declare const MessageOptionsMenu: ({ canDelete, canEdit, disabled, onCopyLink, onDelete, onEdit, onOpenChange, }: MessageOptionsMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const MessageOptionsMenu: ({ canDelete, canEdit, disabled, isAnnotations, onCopyLink, onDelete, onEdit, onOpenChange, }: MessageOptionsMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const THREADED_ANNOTATIONS_RESIN_TARGETS: {
|
|
2
|
+
readonly ANNOTATION_COPY_LINK: "activityfeed-annotation-copylink";
|
|
3
|
+
readonly ANNOTATION_DELETE: "activityfeed-annotation-delete";
|
|
4
|
+
readonly ANNOTATION_EDIT: "activityfeed-annotation-edit";
|
|
5
|
+
readonly ANNOTATION_MENU: "activityfeed-annotation-options";
|
|
6
|
+
readonly ANNOTATION_RESOLVE: "activityfeed-annotation-resolve";
|
|
7
|
+
readonly ANNOTATION_UNRESOLVE: "activityfeed-annotation-unresolve";
|
|
8
|
+
readonly COMMENT_CARD: "activityfeed-comment-card";
|
|
9
|
+
readonly COMMENT_COPY_LINK: "activityfeed-comment-copylink";
|
|
10
|
+
readonly COMMENT_DELETE: "activityfeed-comment-delete";
|
|
11
|
+
readonly COMMENT_EDIT: "activityfeed-comment-edit";
|
|
12
|
+
readonly COMMENT_MENU: "activityfeed-comment-options";
|
|
13
|
+
readonly COMMENT_POST: "activityfeed-comment-post";
|
|
14
|
+
readonly COMMENT_REPLY: "activityfeed-comment-reply";
|
|
15
|
+
readonly COMMENT_RESOLVE: "activityfeed-comment-resolve";
|
|
16
|
+
readonly COMMENT_UNRESOLVE: "activityfeed-comment-unresolve";
|
|
17
|
+
};
|