@box/threaded-annotations 1.84.14 → 1.85.1
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/chunks/delete-confirmation-popover.js +16 -13
- package/dist/chunks/messages-view.js +41 -37
- package/dist/chunks/threaded-annotations2.js +32 -31
- package/dist/esm/lib/components/v2/message-header/message-header.js +63 -53
- package/dist/esm/lib/components/v2/message-header/message-options-menu.js +29 -26
- package/dist/esm/lib/components/v2/message-header/messages.js +7 -3
- package/dist/esm/lib/components/v2/text-message/text-message.js +19 -17
- package/dist/i18n/bn-IN.js +2 -1
- package/dist/i18n/bn-IN.properties +6 -4
- package/dist/i18n/da-DK.js +2 -1
- package/dist/i18n/da-DK.properties +6 -4
- package/dist/i18n/de-DE.js +2 -1
- package/dist/i18n/de-DE.properties +6 -4
- package/dist/i18n/en-AU.js +2 -1
- package/dist/i18n/en-AU.properties +6 -4
- package/dist/i18n/en-CA.js +2 -1
- package/dist/i18n/en-CA.properties +6 -4
- package/dist/i18n/en-GB.js +2 -1
- package/dist/i18n/en-GB.properties +6 -4
- package/dist/i18n/en-US.js +2 -1
- package/dist/i18n/en-US.properties +6 -4
- package/dist/i18n/en-x-pseudo.js +43 -42
- package/dist/i18n/en-x-pseudo.properties +47 -45
- package/dist/i18n/es-419.js +2 -1
- package/dist/i18n/es-419.properties +6 -4
- package/dist/i18n/es-ES.js +2 -1
- package/dist/i18n/es-ES.properties +6 -4
- package/dist/i18n/fi-FI.js +2 -1
- package/dist/i18n/fi-FI.properties +6 -4
- package/dist/i18n/fr-CA.js +2 -1
- package/dist/i18n/fr-CA.properties +6 -4
- package/dist/i18n/fr-FR.js +2 -1
- package/dist/i18n/fr-FR.properties +6 -4
- package/dist/i18n/hi-IN.js +2 -1
- package/dist/i18n/hi-IN.properties +6 -4
- package/dist/i18n/it-IT.js +2 -1
- package/dist/i18n/it-IT.properties +6 -4
- package/dist/i18n/ja-JP.js +2 -1
- package/dist/i18n/ja-JP.properties +6 -4
- package/dist/i18n/json/src/lib/components/v2/message-header/messages.json +1 -1
- package/dist/i18n/ko-KR.js +2 -1
- package/dist/i18n/ko-KR.properties +6 -4
- package/dist/i18n/nb-NO.js +2 -1
- package/dist/i18n/nb-NO.properties +6 -4
- package/dist/i18n/nl-NL.js +2 -1
- package/dist/i18n/nl-NL.properties +6 -4
- package/dist/i18n/pl-PL.js +2 -1
- package/dist/i18n/pl-PL.properties +6 -4
- package/dist/i18n/pt-BR.js +2 -1
- package/dist/i18n/pt-BR.properties +6 -4
- package/dist/i18n/ru-RU.js +2 -1
- package/dist/i18n/ru-RU.properties +6 -4
- package/dist/i18n/sv-SE.js +2 -1
- package/dist/i18n/sv-SE.properties +6 -4
- package/dist/i18n/tr-TR.js +2 -1
- package/dist/i18n/tr-TR.properties +6 -4
- package/dist/i18n/zh-CN.js +2 -1
- package/dist/i18n/zh-CN.properties +6 -4
- package/dist/i18n/zh-TW.js +2 -1
- package/dist/i18n/zh-TW.properties +6 -4
- package/dist/types/lib/components/v2/message-header/delete-confirmation-popover.d.ts +5 -1
- package/dist/types/lib/components/v2/message-header/message-header.d.ts +9 -5
- package/dist/types/lib/components/v2/message-header/message-options-menu.d.ts +5 -3
- package/dist/types/lib/components/v2/message-header/messages.d.ts +6 -1
- package/dist/types/lib/components/v2/messages-view/messages-view.d.ts +2 -1
- package/dist/types/lib/components/v2/text-message/text-message.d.ts +4 -1
- package/dist/types/lib/v2/stories/shared.d.ts +1 -0
- package/dist/types/lib/v2/test-utils/test-selectors.d.ts +1 -0
- package/dist/types/lib/v2/threaded-annotations.d.ts +5 -0
- package/package.json +6 -6
|
@@ -14,42 +14,45 @@ import '../styles/delete-confirmation-popover.css';var c = {
|
|
|
14
14
|
optionsMenu: "_optionsMenu_1u78f_35",
|
|
15
15
|
deletePopoverAnchorWrapper: "_deletePopoverAnchorWrapper_1u78f_54",
|
|
16
16
|
deletePopoverAnchor: "_deletePopoverAnchor_1u78f_54"
|
|
17
|
-
}, u = ({
|
|
18
|
-
let
|
|
17
|
+
}, u = ({ hasReplies: u = !1, isAnnotation: d = !1, open: f, onOpenChange: p, onConfirm: m, onCancel: h }) => {
|
|
18
|
+
let g = a();
|
|
19
19
|
return /* @__PURE__ */ o("div", {
|
|
20
20
|
className: l.deletePopoverAnchorWrapper,
|
|
21
21
|
children: /* @__PURE__ */ s(r.Root, {
|
|
22
22
|
modal: !1,
|
|
23
|
-
onOpenChange:
|
|
24
|
-
open:
|
|
23
|
+
onOpenChange: p,
|
|
24
|
+
open: f,
|
|
25
25
|
children: [/* @__PURE__ */ o(r.Anchor, { children: /* @__PURE__ */ o(i, {
|
|
26
26
|
as: "span",
|
|
27
27
|
className: l.deletePopoverAnchor
|
|
28
28
|
}) }), /* @__PURE__ */ s(r.ContentContainer, {
|
|
29
29
|
...e,
|
|
30
30
|
align: "end",
|
|
31
|
-
"aria-label":
|
|
31
|
+
"aria-label": g.formatMessage(t.deleteConfirmation),
|
|
32
32
|
className: c.deletePopover,
|
|
33
33
|
side: "bottom",
|
|
34
34
|
children: [/* @__PURE__ */ o(r.MainContent, { children: /* @__PURE__ */ o(i, {
|
|
35
35
|
as: "p",
|
|
36
36
|
color: "textOnLightDefault",
|
|
37
37
|
variant: "bodyDefault",
|
|
38
|
-
children:
|
|
38
|
+
children: g.formatMessage(t.deleteQuestion, {
|
|
39
|
+
hasReplies: u ? "true" : "false",
|
|
40
|
+
type: d ? "annotation" : "comment"
|
|
41
|
+
})
|
|
39
42
|
}) }), /* @__PURE__ */ s(r.Footer, {
|
|
40
43
|
className: c.footer,
|
|
41
44
|
children: [/* @__PURE__ */ o(n, {
|
|
42
|
-
"aria-label":
|
|
43
|
-
onClick:
|
|
45
|
+
"aria-label": g.formatMessage(t.cancelDeleteButtonAriaLabel),
|
|
46
|
+
onClick: h,
|
|
44
47
|
size: "small",
|
|
45
48
|
variant: "secondary",
|
|
46
|
-
children:
|
|
49
|
+
children: g.formatMessage(t.deleteCancel)
|
|
47
50
|
}), /* @__PURE__ */ o(n, {
|
|
48
|
-
"aria-label":
|
|
49
|
-
onClick:
|
|
51
|
+
"aria-label": g.formatMessage(t.deleteButtonAriaLabel),
|
|
52
|
+
onClick: m,
|
|
50
53
|
size: "small",
|
|
51
|
-
variant: "
|
|
52
|
-
children:
|
|
54
|
+
variant: "destructive",
|
|
55
|
+
children: g.formatMessage(t.delete)
|
|
53
56
|
})]
|
|
54
57
|
})]
|
|
55
58
|
})]
|
|
@@ -14,73 +14,77 @@ import '../styles/messages-view.css';var u = {
|
|
|
14
14
|
messagesView: "_messagesView_1yvpu_4",
|
|
15
15
|
repliesContainer: "_repliesContainer_1yvpu_52",
|
|
16
16
|
messagesFade: "_messagesFade_1yvpu_58"
|
|
17
|
-
}, d = ({ messages: d, isResolved: f = !1, resolvedBy: p, resolvedAt: m, onDelete: h, onThreadDelete: g, onAvatarClick: _,
|
|
18
|
-
let { viewState:
|
|
17
|
+
}, d = ({ messages: d, isResolved: f = !1, resolvedBy: p, resolvedAt: m, onDelete: h, onThreadDelete: g, onAvatarClick: _, onCopyLink: v, onEdit: y, onResolve: b, onUnresolve: x, annotationTarget: S, onAnnotationBadgeClick: C, originalContentDeleted: w }) => {
|
|
18
|
+
let { viewState: T, dispatch: E, isAnnotations: D } = t(), O = s(null), k = T !== e.Collapsed, A = T === e.Composing, j = d.length > 2, M = j && !k, { handleScroll: N, isOverflowing: P } = a({
|
|
19
19
|
messageCount: d.length,
|
|
20
|
-
containerRef:
|
|
21
|
-
enabled:
|
|
22
|
-
isExpanded:
|
|
23
|
-
suppressAutoScroll:
|
|
24
|
-
}),
|
|
25
|
-
if (!
|
|
26
|
-
let
|
|
20
|
+
containerRef: O,
|
|
21
|
+
enabled: D,
|
|
22
|
+
isExpanded: k,
|
|
23
|
+
suppressAutoScroll: M
|
|
24
|
+
}), F = d[0], I = d.slice(1), L = I.length >= 1, R = I[I.length - 1], z = I.slice(0, -1), B = j && !k;
|
|
25
|
+
if (!F) return null;
|
|
26
|
+
let V = z[z.length - 1]?.author, H = z.length >= 2 ? z[z.length - 2].author : void 0, U = () => E({ type: "EXPAND" });
|
|
27
27
|
return /* @__PURE__ */ l("div", {
|
|
28
|
-
className: o(u.messagesViewWrapper,
|
|
28
|
+
className: o(u.messagesViewWrapper, P && u.overflowing, P && A && u.withEditorBelow),
|
|
29
29
|
children: [/* @__PURE__ */ l("div", {
|
|
30
|
-
ref:
|
|
31
|
-
className: o(u.messagesView,
|
|
32
|
-
onScroll:
|
|
30
|
+
ref: O,
|
|
31
|
+
className: o(u.messagesView, D && u.scrollable),
|
|
32
|
+
onScroll: N,
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ c(i, {
|
|
35
|
-
...
|
|
36
|
-
|
|
35
|
+
...F,
|
|
36
|
+
hasReplies: L,
|
|
37
|
+
showThreadedIndicator: L || f,
|
|
37
38
|
isResolved: f,
|
|
38
39
|
onDelete: h,
|
|
39
40
|
onThreadDelete: g,
|
|
40
41
|
onAvatarClick: _,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
onCopyLink: v,
|
|
43
|
+
onEdit: y,
|
|
44
|
+
onResolve: b,
|
|
45
|
+
onUnresolve: x,
|
|
44
46
|
isFirstMessage: !0,
|
|
45
|
-
annotationTarget:
|
|
46
|
-
onAnnotationBadgeClick:
|
|
47
|
-
originalContentDeleted:
|
|
47
|
+
annotationTarget: S,
|
|
48
|
+
onAnnotationBadgeClick: C,
|
|
49
|
+
originalContentDeleted: w
|
|
48
50
|
}),
|
|
49
|
-
|
|
50
|
-
lastUser:
|
|
51
|
-
repliesCount:
|
|
52
|
-
secondLastUser:
|
|
53
|
-
onShowReplies:
|
|
51
|
+
B && V && /* @__PURE__ */ c(r, {
|
|
52
|
+
lastUser: V,
|
|
53
|
+
repliesCount: z.length,
|
|
54
|
+
secondLastUser: H,
|
|
55
|
+
onShowReplies: U
|
|
54
56
|
}),
|
|
55
|
-
|
|
57
|
+
k && z.length > 0 && /* @__PURE__ */ c("div", {
|
|
56
58
|
className: u.repliesContainer,
|
|
57
|
-
children:
|
|
59
|
+
children: z.map((e) => /* @__PURE__ */ c(i, {
|
|
58
60
|
...e,
|
|
59
61
|
showThreadedIndicator: !0,
|
|
60
62
|
isResolved: f,
|
|
61
63
|
onDelete: h,
|
|
62
64
|
onAvatarClick: _,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
onCopyLink: v,
|
|
66
|
+
onEdit: y,
|
|
67
|
+
onResolve: b,
|
|
68
|
+
onUnresolve: x
|
|
66
69
|
}, e.id))
|
|
67
70
|
}),
|
|
68
|
-
|
|
69
|
-
...
|
|
71
|
+
R && /* @__PURE__ */ c(i, {
|
|
72
|
+
...R,
|
|
70
73
|
showThreadedIndicator: f,
|
|
71
74
|
isResolved: f,
|
|
72
75
|
onDelete: h,
|
|
73
76
|
onAvatarClick: _,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
onCopyLink: v,
|
|
78
|
+
onEdit: y,
|
|
79
|
+
onResolve: b,
|
|
80
|
+
onUnresolve: x
|
|
77
81
|
}),
|
|
78
82
|
f && p && m && /* @__PURE__ */ c(n, {
|
|
79
83
|
authorName: p,
|
|
80
84
|
createdAt: m
|
|
81
85
|
})
|
|
82
86
|
]
|
|
83
|
-
}),
|
|
87
|
+
}), P && /* @__PURE__ */ c("div", { className: u.messagesFade })]
|
|
84
88
|
});
|
|
85
89
|
};
|
|
86
90
|
export { d as t };
|
|
@@ -10,33 +10,33 @@ import '../styles/threaded-annotations2.css';var m = {
|
|
|
10
10
|
threadedAnnotations: "_threadedAnnotations_1dfb0_1",
|
|
11
11
|
expandable: "_expandable_1dfb0_10",
|
|
12
12
|
annotations: "_annotations_1dfb0_13"
|
|
13
|
-
}, h = ({ messages: r, isResolved: h = !1, resolvedBy: g, resolvedAt: _, onDelete: v, onThreadDelete: y, onAvatarClick: b,
|
|
14
|
-
let { viewState:
|
|
13
|
+
}, h = ({ messages: r, isResolved: h = !1, resolvedBy: g, resolvedAt: _, onDelete: v, onThreadDelete: y, onAvatarClick: b, onCopyLink: x, onEdit: S, onResolve: C, onUnresolve: w, onPost: T, onPostError: E, userSelectorProps: D, onEditorOpenChange: O, annotationTarget: k, onAnnotationBadgeClick: A, originalContentDeleted: j }) => {
|
|
14
|
+
let { viewState: M, dispatch: N, replyMention: P, isReplyDisabled: F, isAnnotations: I } = i(), L = d(null), R = M !== n.Collapsed, z = r.length > 2, B = M === n.Collapsed && (z || !F && !h);
|
|
15
15
|
l(() => {
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
if (!
|
|
16
|
+
O?.(R);
|
|
17
|
+
}, [R, O]), l(() => {
|
|
18
|
+
if (!R) return;
|
|
19
19
|
let t = `[${Object.keys(e)[0]}]`, n = (e) => {
|
|
20
20
|
let n = e.target;
|
|
21
|
-
|
|
21
|
+
L.current?.contains(n) || document.querySelector(t)?.contains(n) || N({ type: "COLLAPSE" });
|
|
22
22
|
};
|
|
23
23
|
return document.addEventListener("mousedown", n), () => document.removeEventListener("mousedown", n);
|
|
24
|
-
}, [
|
|
25
|
-
let
|
|
26
|
-
if (!
|
|
24
|
+
}, [R, N]);
|
|
25
|
+
let V = r.length === 0, H = c(() => N({ type: "CLEAR_MENTION" }), [N]), U = u(() => P ? o(P) : null, [P]), W = c((e) => {
|
|
26
|
+
if (!B) return;
|
|
27
27
|
let t = e.target;
|
|
28
|
-
!e.currentTarget.contains(t) || t.closest("[data-no-expand]") ||
|
|
29
|
-
}, [
|
|
30
|
-
return
|
|
31
|
-
onPost:
|
|
32
|
-
onPostError:
|
|
33
|
-
onPostSuccess:
|
|
34
|
-
userSelectorProps:
|
|
28
|
+
!e.currentTarget.contains(t) || t.closest("[data-no-expand]") || N({ type: "EXPAND" });
|
|
29
|
+
}, [B, N]);
|
|
30
|
+
return I && V ? /* @__PURE__ */ f(t, {
|
|
31
|
+
onPost: T,
|
|
32
|
+
onPostError: E,
|
|
33
|
+
onPostSuccess: H,
|
|
34
|
+
userSelectorProps: D,
|
|
35
35
|
isFirstAnnotation: !0
|
|
36
36
|
}) : /* @__PURE__ */ p("div", {
|
|
37
|
-
ref:
|
|
38
|
-
className: s(m.threadedAnnotations,
|
|
39
|
-
onClick:
|
|
37
|
+
ref: L,
|
|
38
|
+
className: s(m.threadedAnnotations, B && m.expandable, I && m.annotations),
|
|
39
|
+
onClick: B ? W : void 0,
|
|
40
40
|
children: [/* @__PURE__ */ f(a, {
|
|
41
41
|
messages: r,
|
|
42
42
|
isResolved: h,
|
|
@@ -45,18 +45,19 @@ import '../styles/threaded-annotations2.css';var m = {
|
|
|
45
45
|
onDelete: v,
|
|
46
46
|
onThreadDelete: y,
|
|
47
47
|
onAvatarClick: b,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
onCopyLink: x,
|
|
49
|
+
onEdit: S,
|
|
50
|
+
onResolve: C,
|
|
51
|
+
onUnresolve: w,
|
|
52
|
+
annotationTarget: k,
|
|
53
|
+
onAnnotationBadgeClick: A,
|
|
54
|
+
originalContentDeleted: j
|
|
55
|
+
}), M === n.Composing && /* @__PURE__ */ f(t, {
|
|
56
|
+
onPost: T,
|
|
57
|
+
onPostError: E,
|
|
58
|
+
onPostSuccess: H,
|
|
59
|
+
initialContent: U,
|
|
60
|
+
userSelectorProps: D
|
|
60
61
|
})]
|
|
61
62
|
});
|
|
62
63
|
}, g = (e) => /* @__PURE__ */ f(r, {
|
|
@@ -1,74 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import r from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { useThreadedAnnotationsContext as e } from "../../../v2/threaded-annotations-context.js";
|
|
2
|
+
import { UserAvatarButton as t } from "../user-avatar/user-avatar.js";
|
|
3
|
+
import { n, t as r } from "../../../../../chunks/delete-confirmation-popover.js";
|
|
4
|
+
import i from "./messages.js";
|
|
5
|
+
import { MessageOptionsMenu as a } from "./message-options-menu.js";
|
|
6
|
+
import { IconButton as o, Text as s, Tooltip as c } from "@box/blueprint-web";
|
|
7
|
+
import { useState as l } from "react";
|
|
8
|
+
import { useIntl as u } from "react-intl";
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { ArrowBack as p, CheckmarkCircle as m } from "@box/blueprint-web-assets/icons/Medium";
|
|
11
|
+
var h = ({ author: h, canResolve: g = !1, isResolved: _ = !1, canEdit: v = !0, canDelete: y = !0, hasReplies: b = !1, isFirstMessage: x = !1, onAvatarClick: S, onCopyLink: C, onDelete: w, onEdit: T, onResolve: E, onThreadDelete: D, onUnresolve: O }) => {
|
|
12
|
+
let k = u(), { isAnnotations: A } = e(), [j, M] = l(!1), [N, P] = l(!1);
|
|
13
|
+
return /* @__PURE__ */ f("div", {
|
|
14
|
+
className: n.headerContainer,
|
|
15
|
+
children: [/* @__PURE__ */ f("div", {
|
|
16
|
+
className: n.information,
|
|
17
|
+
children: [/* @__PURE__ */ d(t, {
|
|
18
|
+
onClick: S,
|
|
19
|
+
user: h
|
|
20
|
+
}), /* @__PURE__ */ d("div", {
|
|
20
21
|
"data-no-expand": !0,
|
|
21
|
-
className:
|
|
22
|
-
children: /* @__PURE__ */
|
|
22
|
+
className: n.textContainer,
|
|
23
|
+
children: /* @__PURE__ */ d(s, {
|
|
23
24
|
as: "p",
|
|
24
|
-
className:
|
|
25
|
+
className: n.author,
|
|
25
26
|
color: "textOnLightDefault",
|
|
26
27
|
variant: "bodyDefaultBold",
|
|
27
|
-
children:
|
|
28
|
+
children: h.name
|
|
28
29
|
})
|
|
29
30
|
})]
|
|
30
|
-
}), /* @__PURE__ */
|
|
31
|
-
className:
|
|
32
|
-
"data-state":
|
|
31
|
+
}), /* @__PURE__ */ f("div", {
|
|
32
|
+
className: n.optionsMenu,
|
|
33
|
+
"data-state": j || N ? "open" : "closed",
|
|
33
34
|
children: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
g && !_ && /* @__PURE__ */ d(c, {
|
|
36
|
+
content: k.formatMessage(i.resolveButtonAriaLabel),
|
|
37
|
+
children: /* @__PURE__ */ d(o, {
|
|
38
|
+
"aria-label": k.formatMessage(i.resolveButtonAriaLabel),
|
|
39
|
+
"data-no-expand": !0,
|
|
40
|
+
disabled: N,
|
|
41
|
+
icon: m,
|
|
42
|
+
onClick: () => E?.(),
|
|
43
|
+
size: "small"
|
|
44
|
+
})
|
|
41
45
|
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
g && _ && /* @__PURE__ */ d(c, {
|
|
47
|
+
content: k.formatMessage(i.unresolveButtonAriaLabel),
|
|
48
|
+
children: /* @__PURE__ */ d(o, {
|
|
49
|
+
"aria-label": k.formatMessage(i.unresolveButtonAriaLabel),
|
|
50
|
+
"data-no-expand": !0,
|
|
51
|
+
disabled: N,
|
|
52
|
+
icon: p,
|
|
53
|
+
onClick: () => O?.(),
|
|
54
|
+
size: "small"
|
|
55
|
+
})
|
|
49
56
|
}),
|
|
50
|
-
|
|
51
|
-
canDelete:
|
|
52
|
-
canEdit:
|
|
53
|
-
disabled:
|
|
57
|
+
/* @__PURE__ */ d(a, {
|
|
58
|
+
canDelete: y,
|
|
59
|
+
canEdit: v,
|
|
60
|
+
disabled: N,
|
|
61
|
+
onCopyLink: C,
|
|
54
62
|
onDelete: () => {
|
|
55
|
-
|
|
63
|
+
x ? (M(!1), P(!0)) : (M(!1), w?.());
|
|
56
64
|
},
|
|
57
|
-
onEdit:
|
|
58
|
-
onOpenChange:
|
|
65
|
+
onEdit: T,
|
|
66
|
+
onOpenChange: M
|
|
59
67
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ d(r, {
|
|
69
|
+
hasReplies: b,
|
|
70
|
+
isAnnotation: A,
|
|
61
71
|
onCancel: () => {
|
|
62
|
-
|
|
72
|
+
P(!1), M(!1);
|
|
63
73
|
},
|
|
64
74
|
onConfirm: () => {
|
|
65
|
-
|
|
75
|
+
D?.(), P(!1), M(!1);
|
|
66
76
|
},
|
|
67
|
-
onOpenChange:
|
|
68
|
-
open:
|
|
77
|
+
onOpenChange: P,
|
|
78
|
+
open: N
|
|
69
79
|
})
|
|
70
80
|
]
|
|
71
81
|
})]
|
|
72
82
|
});
|
|
73
83
|
};
|
|
74
|
-
export {
|
|
84
|
+
export { h as MessageHeader };
|
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
import { THREADED_ANNOTATIONS_PORTAL as e } from "../../../v2/constants.js";
|
|
2
2
|
import t from "./messages.js";
|
|
3
|
-
import { DropdownMenu as n, IconButton as r
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { Ellipsis as c, Pencil as l, Trash as u } from "@box/blueprint-web-assets/icons/Medium";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return /* @__PURE__ */ s(n.Root, {
|
|
3
|
+
import { DropdownMenu as n, IconButton as r } from "@box/blueprint-web";
|
|
4
|
+
import { useIntl as i } from "react-intl";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { Ellipsis as s, Link as c, Pencil as l, Trash as u } from "@box/blueprint-web-assets/icons/Medium";
|
|
7
|
+
var d = ({ canDelete: d = !0, canEdit: f = !0, disabled: p, onCopyLink: m, onDelete: h, onEdit: g, onOpenChange: _ }) => {
|
|
8
|
+
let { formatMessage: v } = i(), y = f || !!m;
|
|
9
|
+
return y || d ? /* @__PURE__ */ o(n.Root, {
|
|
11
10
|
onOpenChange: _,
|
|
12
|
-
children: [/* @__PURE__ */
|
|
11
|
+
children: [/* @__PURE__ */ a(n.Trigger, { children: /* @__PURE__ */ a(r, {
|
|
13
12
|
"aria-label": v(t.moreOptionsAriaLabel),
|
|
14
13
|
"data-no-expand": !0,
|
|
15
|
-
disabled:
|
|
16
|
-
icon:
|
|
14
|
+
disabled: p,
|
|
15
|
+
icon: s,
|
|
17
16
|
size: "small"
|
|
18
|
-
}) }), /* @__PURE__ */
|
|
17
|
+
}) }), /* @__PURE__ */ o(n.Content, {
|
|
19
18
|
...e,
|
|
20
19
|
align: "end",
|
|
21
|
-
children: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
children: [
|
|
21
|
+
f && /* @__PURE__ */ o(n.Item, {
|
|
22
|
+
onSelect: () => g?.(),
|
|
23
|
+
children: [/* @__PURE__ */ a(n.Item.StartElement, { icon: l }), /* @__PURE__ */ a(n.Item.MainContent, { label: v(t.edit) })]
|
|
24
|
+
}),
|
|
25
|
+
m && /* @__PURE__ */ o(n.Item, {
|
|
26
|
+
onSelect: () => m(),
|
|
27
|
+
children: [/* @__PURE__ */ a(n.Item.StartElement, { icon: c }), /* @__PURE__ */ a(n.Item.MainContent, { label: v(t.copyLink) })]
|
|
28
|
+
}),
|
|
29
|
+
d && y && /* @__PURE__ */ a(n.Separator, {}),
|
|
30
|
+
d && /* @__PURE__ */ o(n.Item, {
|
|
31
|
+
onSelect: () => h?.(),
|
|
32
|
+
variant: "destructive",
|
|
33
|
+
children: [/* @__PURE__ */ a(n.Item.StartElement, { icon: u }), /* @__PURE__ */ a(n.Item.MainContent, { label: v(t.delete) })]
|
|
34
|
+
})
|
|
35
|
+
]
|
|
33
36
|
})]
|
|
34
|
-
});
|
|
37
|
+
}) : null;
|
|
35
38
|
};
|
|
36
|
-
export {
|
|
39
|
+
export { d as MessageOptionsMenu };
|
|
@@ -4,9 +4,9 @@ var t = e({
|
|
|
4
4
|
id: "groupSharedFeatures.threadedAnnotations.deleteConfirmation",
|
|
5
5
|
defaultMessage: "Delete confirmation"
|
|
6
6
|
},
|
|
7
|
-
|
|
8
|
-
id: "groupSharedFeatures.threadedAnnotations.
|
|
9
|
-
defaultMessage: "Delete this comment and replies?\nThis action can't be undone."
|
|
7
|
+
deleteQuestion: {
|
|
8
|
+
id: "groupSharedFeatures.threadedAnnotations.deleteQuestion",
|
|
9
|
+
defaultMessage: "Delete this {type, select, annotation {annotation} other {comment}}{hasReplies, select, true { and replies} other {}}?\nThis action can't be undone."
|
|
10
10
|
},
|
|
11
11
|
deleteCancel: {
|
|
12
12
|
id: "groupSharedFeatures.threadedAnnotations.deleteCancel",
|
|
@@ -24,6 +24,10 @@ var t = e({
|
|
|
24
24
|
id: "groupSharedFeatures.threadedAnnotations.cancelDeleteButtonAriaLabel",
|
|
25
25
|
defaultMessage: "Cancel delete button"
|
|
26
26
|
},
|
|
27
|
+
copyLink: {
|
|
28
|
+
id: "groupSharedFeatures.threadedAnnotations.copyLink",
|
|
29
|
+
defaultMessage: "Copy link"
|
|
30
|
+
},
|
|
27
31
|
deleteButtonAriaLabel: {
|
|
28
32
|
id: "groupSharedFeatures.threadedAnnotations.deleteButtonAriaLabel",
|
|
29
33
|
defaultMessage: "Delete button"
|
|
@@ -7,36 +7,38 @@ import { MessageRenderer as o } from "./subcomponents/message-renderer.js";
|
|
|
7
7
|
import s from "clsx";
|
|
8
8
|
import { useIntl as c } from "react-intl";
|
|
9
9
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
-
var d = ({ id: d, author: f, message: p, createdAt: m, permissions: h, showThreadedIndicator: g = !0, isResolved: _ = !1, isFirstMessage: v = !1,
|
|
11
|
-
let { canResolve:
|
|
10
|
+
var d = ({ id: d, author: f, message: p, createdAt: m, permissions: h, showThreadedIndicator: g = !0, isResolved: _ = !1, isFirstMessage: v = !1, hasReplies: y = !1, onAvatarClick: b, onCopyLink: x, onDelete: S, onThreadDelete: C, onEdit: w, onResolve: T, onUnresolve: E, annotationTarget: D, onAnnotationBadgeClick: O, originalContentDeleted: k }) => {
|
|
11
|
+
let { canResolve: A, canEdit: j, canDelete: M } = h, N = c(), { dispatch: P, isReplyDisabled: F, isAnnotations: I } = e();
|
|
12
12
|
return /* @__PURE__ */ u("div", {
|
|
13
|
-
"aria-label":
|
|
13
|
+
"aria-label": N.formatMessage(r.annotationMessageAriaLabel),
|
|
14
14
|
className: i.textMessage,
|
|
15
15
|
"data-message-wrapper": !0,
|
|
16
16
|
children: [/* @__PURE__ */ l(n, {
|
|
17
17
|
author: f,
|
|
18
|
-
canResolve:
|
|
18
|
+
canResolve: A,
|
|
19
19
|
isResolved: _,
|
|
20
|
-
canDelete:
|
|
21
|
-
canEdit:
|
|
20
|
+
canDelete: M,
|
|
21
|
+
canEdit: j,
|
|
22
|
+
hasReplies: y,
|
|
22
23
|
isFirstMessage: v,
|
|
23
|
-
onAvatarClick:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
onAvatarClick: b,
|
|
25
|
+
onCopyLink: x ? () => x(d) : void 0,
|
|
26
|
+
onDelete: () => S(d),
|
|
27
|
+
onThreadDelete: C,
|
|
28
|
+
onEdit: w ? () => w(d) : void 0,
|
|
29
|
+
onResolve: T ? () => T(d) : void 0,
|
|
30
|
+
onUnresolve: E ? () => E(d) : void 0
|
|
29
31
|
}), /* @__PURE__ */ u("div", {
|
|
30
32
|
className: i.contentWrapper,
|
|
31
33
|
children: [/* @__PURE__ */ l("div", { className: s(i.threadedIndicator, !g && i.threadedIndicatorHidden) }), /* @__PURE__ */ u("div", {
|
|
32
34
|
className: i.messageContent,
|
|
33
35
|
children: [
|
|
34
|
-
|
|
36
|
+
D && !I && /* @__PURE__ */ l("div", {
|
|
35
37
|
className: i.annotationBadgeWrapper,
|
|
36
38
|
children: /* @__PURE__ */ l(t, {
|
|
37
|
-
annotationTarget:
|
|
38
|
-
onClick: () =>
|
|
39
|
-
originalContentDeleted:
|
|
39
|
+
annotationTarget: D,
|
|
40
|
+
onClick: () => O?.(d),
|
|
41
|
+
originalContentDeleted: k
|
|
40
42
|
})
|
|
41
43
|
}),
|
|
42
44
|
/* @__PURE__ */ l("div", {
|
|
@@ -45,7 +47,7 @@ var d = ({ id: d, author: f, message: p, createdAt: m, permissions: h, showThrea
|
|
|
45
47
|
}),
|
|
46
48
|
/* @__PURE__ */ l(a, {
|
|
47
49
|
createdAt: m,
|
|
48
|
-
onReply:
|
|
50
|
+
onReply: F ? void 0 : () => P({
|
|
49
51
|
type: "REPLY",
|
|
50
52
|
author: f
|
|
51
53
|
})
|
package/dist/i18n/bn-IN.js
CHANGED
|
@@ -3,12 +3,13 @@ export default {
|
|
|
3
3
|
"groupSharedFeatures.threadedAnnotations.annotationMessageAriaLabel": "অ্যানোটেশন বার্তা",
|
|
4
4
|
"groupSharedFeatures.threadedAnnotations.annotationPage": "পৃষ্ঠা {number}",
|
|
5
5
|
"groupSharedFeatures.threadedAnnotations.cancelDeleteButtonAriaLabel": "বাতিল করুন বোতাম",
|
|
6
|
+
"groupSharedFeatures.threadedAnnotations.copyLink": "Copy link",
|
|
6
7
|
"groupSharedFeatures.threadedAnnotations.delete": "মুছুন",
|
|
7
8
|
"groupSharedFeatures.threadedAnnotations.deleteButtonAriaLabel": "মুছুন বোতাম",
|
|
8
9
|
"groupSharedFeatures.threadedAnnotations.deleteCancel": "বাতিল করুন",
|
|
9
10
|
"groupSharedFeatures.threadedAnnotations.deleteCommentQuestion": "আপনি কি এই মন্তব্যটি মুছতে চান?",
|
|
10
|
-
"groupSharedFeatures.threadedAnnotations.deleteCommentWithRepliesQuestion": "এই মন্তব্য ও জবাবগুলো মুছবেন? এই পদক্ষেপটি আগের অবস্থায় ফেরানো যাবে না।",
|
|
11
11
|
"groupSharedFeatures.threadedAnnotations.deleteConfirmation": "নিশ্চিতকরণ মুছুন",
|
|
12
|
+
"groupSharedFeatures.threadedAnnotations.deleteQuestion": "Delete this {type, select, annotation {annotation} other {comment}}{hasReplies, select, true { and replies} other {}}? This action can't be undone.",
|
|
12
13
|
"groupSharedFeatures.threadedAnnotations.edit": "সম্পাদনা করুন",
|
|
13
14
|
"groupSharedFeatures.threadedAnnotations.hideReplies": "উত্তর লুকান",
|
|
14
15
|
"groupSharedFeatures.threadedAnnotations.markedAsResolved": "সমাধান করা হয়েছে হিসাবে চিহ্নিত করা হয়েছে",
|
|
@@ -6,6 +6,8 @@ groupSharedFeatures.threadedAnnotations.annotationMessageAriaLabel = অ্য
|
|
|
6
6
|
groupSharedFeatures.threadedAnnotations.annotationPage = পৃষ্ঠা {number}
|
|
7
7
|
# Aria label for cancel delete button
|
|
8
8
|
groupSharedFeatures.threadedAnnotations.cancelDeleteButtonAriaLabel = বাতিল করুন বোতাম
|
|
9
|
+
# Copy link option in message context menu
|
|
10
|
+
groupSharedFeatures.threadedAnnotations.copyLink = Copy link
|
|
9
11
|
# Delete button text
|
|
10
12
|
groupSharedFeatures.threadedAnnotations.delete = মুছুন
|
|
11
13
|
# Aria label for delete button
|
|
@@ -14,10 +16,10 @@ groupSharedFeatures.threadedAnnotations.deleteButtonAriaLabel = মুছুন
|
|
|
14
16
|
groupSharedFeatures.threadedAnnotations.deleteCancel = বাতিল করুন
|
|
15
17
|
# Confirmation text asking user if they want to delete a comment
|
|
16
18
|
groupSharedFeatures.threadedAnnotations.deleteCommentQuestion = আপনি কি এই মন্তব্যটি মুছতে চান?
|
|
17
|
-
# Confirmation text asking user if they want to delete a comment and its replies
|
|
18
|
-
groupSharedFeatures.threadedAnnotations.deleteCommentWithRepliesQuestion = এই মন্তব্য ও জবাবগুলো মুছবেন? এই পদক্ষেপটি আগের অবস্থায় ফেরানো যাবে না।
|
|
19
19
|
# Aria label for delete confirmation popover
|
|
20
20
|
groupSharedFeatures.threadedAnnotations.deleteConfirmation = নিশ্চিতকরণ মুছুন
|
|
21
|
+
# Confirmation text asking the user if they want to delete a thread. `type` is `annotation` or `comment`; `hasReplies` is `true` or `false`.
|
|
22
|
+
groupSharedFeatures.threadedAnnotations.deleteQuestion = Delete this {type, select, annotation {annotation} other {comment}}{hasReplies, select, true { and replies} other {}}? This action can't be undone.
|
|
21
23
|
# Edit option in message context menu
|
|
22
24
|
groupSharedFeatures.threadedAnnotations.edit = সম্পাদনা করুন
|
|
23
25
|
# Button text to hide replies in threaded annotations
|
|
@@ -64,7 +66,7 @@ groupSharedFeatures.threadedAnnotations.originalContentDeleted = মূল ক
|
|
|
64
66
|
groupSharedFeatures.threadedAnnotations.reply = উত্তর দিন
|
|
65
67
|
# Aria label for the reply button that opens the message editor
|
|
66
68
|
groupSharedFeatures.threadedAnnotations.replyButtonAriaLabel = উত্তর বোতাম
|
|
67
|
-
# Aria label for resolve button
|
|
69
|
+
# Aria label and tooltip content for the resolve button
|
|
68
70
|
groupSharedFeatures.threadedAnnotations.resolveButtonAriaLabel = সমাধান করুন
|
|
69
71
|
# Aria label for the resolution status message container
|
|
70
72
|
groupSharedFeatures.threadedAnnotations.resolvedStateAriaLabel = রেজোলিউশন স্ট্যাটাস মেসেজ
|
|
@@ -78,7 +80,7 @@ groupSharedFeatures.threadedAnnotations.showRepliesButtonAriaLabel = উত্
|
|
|
78
80
|
groupSharedFeatures.threadedAnnotations.textMentionAriaLabel = ব্যবহারকারীর উল্লেখ করুন
|
|
79
81
|
# Aria label for message text content
|
|
80
82
|
groupSharedFeatures.threadedAnnotations.textMessageAriaLabel = বার্তার টেক্সট
|
|
81
|
-
# Aria label for unresolve button
|
|
83
|
+
# Aria label and tooltip content for the unresolve button
|
|
82
84
|
groupSharedFeatures.threadedAnnotations.unresolveButtonAriaLabel = অমীমাংসিত
|
|
83
85
|
# Alt text for user avatar image
|
|
84
86
|
groupSharedFeatures.threadedAnnotations.userAvatar = ব্যবহারকারীর অবতার
|
package/dist/i18n/da-DK.js
CHANGED
|
@@ -3,12 +3,13 @@ export default {
|
|
|
3
3
|
"groupSharedFeatures.threadedAnnotations.annotationMessageAriaLabel": "Anmærkningsmeddelelse",
|
|
4
4
|
"groupSharedFeatures.threadedAnnotations.annotationPage": "Side {number}",
|
|
5
5
|
"groupSharedFeatures.threadedAnnotations.cancelDeleteButtonAriaLabel": "'Annuller sletning'-knap",
|
|
6
|
+
"groupSharedFeatures.threadedAnnotations.copyLink": "Copy link",
|
|
6
7
|
"groupSharedFeatures.threadedAnnotations.delete": "Slet",
|
|
7
8
|
"groupSharedFeatures.threadedAnnotations.deleteButtonAriaLabel": "Slet-knap",
|
|
8
9
|
"groupSharedFeatures.threadedAnnotations.deleteCancel": "Annuller",
|
|
9
10
|
"groupSharedFeatures.threadedAnnotations.deleteCommentQuestion": "Vil du slette denne kommentar?",
|
|
10
|
-
"groupSharedFeatures.threadedAnnotations.deleteCommentWithRepliesQuestion": "Slet denne kommentar og svarene? Denne handling kan ikke fortrydes.",
|
|
11
11
|
"groupSharedFeatures.threadedAnnotations.deleteConfirmation": "Bekræft sletning",
|
|
12
|
+
"groupSharedFeatures.threadedAnnotations.deleteQuestion": "Delete this {type, select, annotation {annotation} other {comment}}{hasReplies, select, true { and replies} other {}}? This action can't be undone.",
|
|
12
13
|
"groupSharedFeatures.threadedAnnotations.edit": "Rediger",
|
|
13
14
|
"groupSharedFeatures.threadedAnnotations.hideReplies": "Skjul svar",
|
|
14
15
|
"groupSharedFeatures.threadedAnnotations.markedAsResolved": "markeret som løst",
|