@box/threaded-annotations 4.0.1 → 4.0.3
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 +38 -33
- package/dist/chunks/mention-component.js +80 -69
- package/dist/esm/lib/components/v2/message-editor/subcomponents/post-button.js +8 -8
- package/dist/esm/lib/components/v2/message-header/message-options-menu.js +34 -32
- package/dist/esm/lib/components/v2/text-message/text-message.js +1 -1
- package/dist/esm/lib/components/v2/user-avatar/user-avatar.js +22 -20
- package/dist/esm/lib/v2/resin-targets.js +11 -4
- package/dist/types/lib/v2/resin-targets.d.ts +10 -1
- package/package.json +11 -11
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { THREADED_ANNOTATIONS_PORTAL as e } from "../esm/lib/v2/constants.js";
|
|
2
|
-
import t from "../esm/lib/
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
2
|
+
import { THREADED_ANNOTATIONS_RESIN_COMPONENTS as t, THREADED_ANNOTATIONS_RESIN_FEATURE as n, THREADED_ANNOTATIONS_RESIN_TARGETS as r } from "../esm/lib/v2/resin-targets.js";
|
|
3
|
+
import i from "../esm/lib/components/v2/message-header/messages.js";
|
|
4
|
+
import { Button as a, Popover as o, Text as s } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as c } from "react-intl";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
+
import '../styles/delete-confirmation-popover.css';var d = {
|
|
7
8
|
deletePopover: "_deletePopover_1c8ll_2",
|
|
8
9
|
footer: "_footer_1c8ll_6"
|
|
9
|
-
},
|
|
10
|
+
}, f = {
|
|
10
11
|
headerContainer: "_headerContainer_1kmrp_29",
|
|
11
12
|
information: "_information_1kmrp_37",
|
|
12
13
|
textContainer: "_textContainer_1kmrp_44",
|
|
@@ -14,49 +15,53 @@ import '../styles/delete-confirmation-popover.css';var c = {
|
|
|
14
15
|
optionsMenu: "_optionsMenu_1kmrp_59",
|
|
15
16
|
deletePopoverAnchorWrapper: "_deletePopoverAnchorWrapper_1kmrp_78",
|
|
16
17
|
deletePopoverAnchor: "_deletePopoverAnchor_1kmrp_78"
|
|
17
|
-
},
|
|
18
|
-
let
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
className:
|
|
21
|
-
children: /* @__PURE__ */
|
|
18
|
+
}, p = ({ hasReplies: p = !1, isAnnotation: m = !1, open: h, onOpenChange: g, onConfirm: _, onCancel: v }) => {
|
|
19
|
+
let y = c();
|
|
20
|
+
return /* @__PURE__ */ l("div", {
|
|
21
|
+
className: f.deletePopoverAnchorWrapper,
|
|
22
|
+
children: /* @__PURE__ */ u(o.Root, {
|
|
22
23
|
modal: !1,
|
|
23
|
-
onOpenChange:
|
|
24
|
-
open:
|
|
25
|
-
children: [/* @__PURE__ */ o
|
|
24
|
+
onOpenChange: g,
|
|
25
|
+
open: h,
|
|
26
|
+
children: [/* @__PURE__ */ l(o.Anchor, { children: /* @__PURE__ */ l(s, {
|
|
26
27
|
as: "span",
|
|
27
|
-
className:
|
|
28
|
-
}) }), /* @__PURE__ */
|
|
28
|
+
className: f.deletePopoverAnchor
|
|
29
|
+
}) }), /* @__PURE__ */ u(o.ContentContainer, {
|
|
29
30
|
...e,
|
|
30
31
|
align: "end",
|
|
31
|
-
"aria-label":
|
|
32
|
-
className:
|
|
32
|
+
"aria-label": y.formatMessage(i.deleteConfirmation),
|
|
33
|
+
className: d.deletePopover,
|
|
34
|
+
"data-resin-component": m ? t.ANNOTATION_MENU : t.COMMENT_MENU,
|
|
35
|
+
"data-resin-feature": n,
|
|
33
36
|
side: "bottom",
|
|
34
|
-
children: [/* @__PURE__ */ o
|
|
37
|
+
children: [/* @__PURE__ */ l(o.MainContent, { children: /* @__PURE__ */ l(s, {
|
|
35
38
|
as: "p",
|
|
36
39
|
color: "textOnLightDefault",
|
|
37
40
|
variant: "bodyDefault",
|
|
38
|
-
children:
|
|
39
|
-
hasReplies:
|
|
40
|
-
type:
|
|
41
|
+
children: y.formatMessage(i.deleteQuestion, {
|
|
42
|
+
hasReplies: p ? "true" : "false",
|
|
43
|
+
type: m ? "annotation" : "comment"
|
|
41
44
|
})
|
|
42
|
-
}) }), /* @__PURE__ */
|
|
43
|
-
className:
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
"aria-label":
|
|
46
|
-
|
|
45
|
+
}) }), /* @__PURE__ */ u(o.Footer, {
|
|
46
|
+
className: d.footer,
|
|
47
|
+
children: [/* @__PURE__ */ l(a, {
|
|
48
|
+
"aria-label": y.formatMessage(i.cancelDeleteButtonAriaLabel),
|
|
49
|
+
"data-resin-target": r.DELETE_CANCEL,
|
|
50
|
+
onClick: v,
|
|
47
51
|
size: "small",
|
|
48
52
|
variant: "secondary",
|
|
49
|
-
children:
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
-
"aria-label":
|
|
52
|
-
|
|
53
|
+
children: y.formatMessage(i.deleteCancel)
|
|
54
|
+
}), /* @__PURE__ */ l(a, {
|
|
55
|
+
"aria-label": y.formatMessage(i.deleteButtonAriaLabel),
|
|
56
|
+
"data-resin-target": r.DELETE_CONFIRM,
|
|
57
|
+
onClick: _,
|
|
53
58
|
size: "small",
|
|
54
59
|
variant: "destructive",
|
|
55
|
-
children:
|
|
60
|
+
children: y.formatMessage(i.delete)
|
|
56
61
|
})]
|
|
57
62
|
})]
|
|
58
63
|
})]
|
|
59
64
|
})
|
|
60
65
|
});
|
|
61
66
|
};
|
|
62
|
-
export {
|
|
67
|
+
export { f as n, p as t };
|
|
@@ -1,95 +1,106 @@
|
|
|
1
1
|
import e from "../esm/lib/messages.js";
|
|
2
2
|
import { THREADED_ANNOTATIONS_PORTAL as t } from "../esm/lib/v2/constants.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
let {
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
import { THREADED_ANNOTATIONS_RESIN_COMPONENTS as n, THREADED_ANNOTATIONS_RESIN_FEATURE as r, THREADED_ANNOTATIONS_RESIN_TARGETS as i } from "../esm/lib/v2/resin-targets.js";
|
|
4
|
+
import { useMentionContext as a } from "../esm/lib/components/mention-component/mention-context.js";
|
|
5
|
+
import { Text as o } from "@box/blueprint-web";
|
|
6
|
+
import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
7
|
+
import { useIntl as d } from "react-intl";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { CollaborationPopover as m } from "@box/collaboration-popover";
|
|
10
|
+
import '../styles/mention-component.css';var h = { mention: "_mention_hc7gc_27" }, g = {
|
|
11
|
+
"data-resin-component": n.COMMENT_CARD,
|
|
12
|
+
"data-resin-feature": r
|
|
13
|
+
}, _ = ({ mentionedUserName: n, mentionedUserId: r, mentionedUserEmail: _, authorId: v, mentionId: y }) => {
|
|
14
|
+
let b = d(), x = l(!1), { collaborationPopoverProps: S, getAvatarUrl: C, fetchCollaboratorState: w, fetchEmail: T, openPopoverMentionId: E, openPopoverForMentionId: D, closeAllPopovers: O } = a(), [k, A] = u(!1), [j, M] = u(!1), [N, P] = u(_);
|
|
15
|
+
c(() => {
|
|
16
|
+
P(_);
|
|
17
|
+
}, [_, r]);
|
|
18
|
+
let { onSubmit: F, onClose: I } = S, L = s(async () => {
|
|
19
|
+
if (x.current) {
|
|
20
|
+
x.current = !1;
|
|
17
21
|
return;
|
|
18
22
|
}
|
|
19
|
-
if (!
|
|
20
|
-
let e =
|
|
21
|
-
if (!e &&
|
|
22
|
-
e = await
|
|
23
|
+
if (!j && y && r) {
|
|
24
|
+
let e = _ ?? N;
|
|
25
|
+
if (!e && T) try {
|
|
26
|
+
e = await T(r, n), P(e);
|
|
23
27
|
} catch {}
|
|
24
28
|
let t = {
|
|
25
|
-
id: Number(
|
|
26
|
-
name:
|
|
29
|
+
id: Number(r),
|
|
30
|
+
name: n,
|
|
27
31
|
email: e ?? "",
|
|
28
|
-
value:
|
|
29
|
-
},
|
|
32
|
+
value: r
|
|
33
|
+
}, i = !1;
|
|
30
34
|
try {
|
|
31
|
-
|
|
35
|
+
i = await w?.(t) ?? !1;
|
|
32
36
|
} catch {}
|
|
33
|
-
|
|
37
|
+
A(i), await D?.(y, t);
|
|
34
38
|
}
|
|
35
39
|
}, [
|
|
40
|
+
x,
|
|
41
|
+
j,
|
|
36
42
|
y,
|
|
37
|
-
|
|
43
|
+
r,
|
|
44
|
+
n,
|
|
38
45
|
_,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
E?.(), N?.(e, t);
|
|
46
|
+
N,
|
|
47
|
+
T,
|
|
48
|
+
w,
|
|
49
|
+
D
|
|
50
|
+
]), R = () => {
|
|
51
|
+
O?.(), I?.();
|
|
52
|
+
}, z = () => {
|
|
53
|
+
j && (x.current = !0, O?.());
|
|
54
|
+
}, B = (e) => {
|
|
55
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.repeat || L());
|
|
56
|
+
}, V = (e, t) => {
|
|
57
|
+
O?.(), F?.(e, t);
|
|
52
58
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
let
|
|
57
|
-
e.key === "Escape" &&
|
|
58
|
-
}, [
|
|
59
|
-
return
|
|
60
|
-
open:
|
|
61
|
-
...
|
|
62
|
-
anchor: /* @__PURE__ */
|
|
59
|
+
c(() => {
|
|
60
|
+
M(E === y);
|
|
61
|
+
}, [y, E]);
|
|
62
|
+
let H = s((e) => {
|
|
63
|
+
e.key === "Escape" && O?.();
|
|
64
|
+
}, [O]);
|
|
65
|
+
return c(() => (window.addEventListener("keydown", H), () => window.removeEventListener("keydown", H)), [H]), /* @__PURE__ */ f(m, {
|
|
66
|
+
open: j,
|
|
67
|
+
...S,
|
|
68
|
+
anchor: /* @__PURE__ */ p(o, {
|
|
63
69
|
"data-no-expand": !0,
|
|
64
|
-
"aria-label":
|
|
70
|
+
"aria-label": b.formatMessage(e.textMentionAriaLabel),
|
|
65
71
|
as: "span",
|
|
66
|
-
className:
|
|
67
|
-
"data-author-id":
|
|
72
|
+
className: h.mention,
|
|
73
|
+
"data-author-id": v,
|
|
68
74
|
"data-component-type": "mention",
|
|
69
|
-
"data-mention-id":
|
|
70
|
-
"data-mentioned-user-email":
|
|
71
|
-
"data-mentioned-user-id":
|
|
72
|
-
"data-mentioned-user-name":
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
"data-mention-id": y,
|
|
76
|
+
"data-mentioned-user-email": _,
|
|
77
|
+
"data-mentioned-user-id": r,
|
|
78
|
+
"data-mentioned-user-name": n,
|
|
79
|
+
"data-resin-target": i.MENTION,
|
|
80
|
+
onClick: L,
|
|
81
|
+
onKeyDown: B,
|
|
82
|
+
onPointerDown: z,
|
|
83
|
+
role: "button",
|
|
84
|
+
tabIndex: 0,
|
|
75
85
|
variant: "bodyDefault",
|
|
76
|
-
children: ["@",
|
|
86
|
+
children: ["@", n]
|
|
77
87
|
}),
|
|
78
|
-
onClose:
|
|
79
|
-
onSubmit:
|
|
88
|
+
onClose: R,
|
|
89
|
+
onSubmit: V,
|
|
80
90
|
popoverContentContainerProps: {
|
|
81
|
-
...
|
|
82
|
-
...t
|
|
91
|
+
...S.popoverContentContainerProps,
|
|
92
|
+
...t,
|
|
93
|
+
...g
|
|
83
94
|
},
|
|
84
95
|
sideOffset: 0,
|
|
85
96
|
userInfo: {
|
|
86
|
-
id:
|
|
87
|
-
name:
|
|
88
|
-
email:
|
|
89
|
-
avatarUrl:
|
|
90
|
-
isCollaborator:
|
|
97
|
+
id: r,
|
|
98
|
+
name: n,
|
|
99
|
+
email: N,
|
|
100
|
+
avatarUrl: C?.(r),
|
|
101
|
+
isCollaborator: k
|
|
91
102
|
}
|
|
92
103
|
});
|
|
93
104
|
};
|
|
94
|
-
|
|
95
|
-
export {
|
|
105
|
+
_.displayName = "MentionComponent";
|
|
106
|
+
export { _ as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import t from "../
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as e } from "../../../../v2/resin-targets.js";
|
|
2
|
+
import { useMessageEditorContext as t } from "../message-editor-context.js";
|
|
3
|
+
import n from "../messages.js";
|
|
4
|
+
import { useMessageSubmit as r } from "../hooks/useMessageSubmit.js";
|
|
5
5
|
import { Button as i } from "@box/blueprint-web";
|
|
6
6
|
import { useIntl as a } from "react-intl";
|
|
7
7
|
import { jsx as o } from "react/jsx-runtime";
|
|
8
8
|
import { ArrowUp as s } from "@box/blueprint-web-assets/icons/Medium";
|
|
9
9
|
var c = ({ disabled: c, onPost: l, onPostError: u, onPostSuccess: d, cleanEditor: f, getEditorJsonContent: p }) => {
|
|
10
|
-
let { isLoading: m } =
|
|
10
|
+
let { isLoading: m } = t(), { handleSubmit: h } = r({
|
|
11
11
|
onSubmit: l,
|
|
12
12
|
onSubmitError: u,
|
|
13
13
|
onSuccess: d,
|
|
@@ -15,12 +15,12 @@ var c = ({ disabled: c, onPost: l, onPostError: u, onPostSuccess: d, cleanEditor
|
|
|
15
15
|
getEditorJsonContent: p
|
|
16
16
|
}), g = a();
|
|
17
17
|
return /* @__PURE__ */ o(i, {
|
|
18
|
-
"aria-label": g.formatMessage(
|
|
19
|
-
"data-resin-target":
|
|
18
|
+
"aria-label": g.formatMessage(n.post),
|
|
19
|
+
"data-resin-target": e.COMMENT_POST,
|
|
20
20
|
disabled: c,
|
|
21
21
|
endIcon: s,
|
|
22
22
|
loading: m,
|
|
23
|
-
loadingAriaLabel: g.formatMessage(
|
|
23
|
+
loadingAriaLabel: g.formatMessage(n.postLoading),
|
|
24
24
|
onClick: h,
|
|
25
25
|
size: "small",
|
|
26
26
|
variant: "primary"
|
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
import { THREADED_ANNOTATIONS_PORTAL as e } from "../../../v2/constants.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { DropdownMenu as
|
|
5
|
-
import { useIntl as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import { Ellipsis as
|
|
8
|
-
var
|
|
9
|
-
let { formatMessage:
|
|
10
|
-
if (!(
|
|
11
|
-
let
|
|
12
|
-
return /* @__PURE__ */
|
|
2
|
+
import { THREADED_ANNOTATIONS_RESIN_COMPONENTS as t, THREADED_ANNOTATIONS_RESIN_FEATURE as n, THREADED_ANNOTATIONS_RESIN_TARGETS as r } from "../../../v2/resin-targets.js";
|
|
3
|
+
import i from "./messages.js";
|
|
4
|
+
import { DropdownMenu as a, IconButton as o } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as s } from "react-intl";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { Ellipsis as u, Link as d, Pencil as f, Trash as p } from "@box/blueprint-web-assets/icons/Medium";
|
|
8
|
+
var m = ({ canDelete: m = !0, canEdit: h = !0, disabled: g, isAnnotations: _ = !1, onCopyLink: v, onDelete: y, onEdit: b, onOpenChange: x }) => {
|
|
9
|
+
let { formatMessage: S } = s(), C = h || !!v;
|
|
10
|
+
if (!(C || m)) return null;
|
|
11
|
+
let w = _ ? t.ANNOTATION_MENU : t.COMMENT_MENU, T = _ ? r.ANNOTATION_MENU : r.COMMENT_MENU, E = _ ? r.ANNOTATION_EDIT : r.COMMENT_EDIT, D = _ ? r.ANNOTATION_COPY_LINK : r.COMMENT_COPY_LINK, O = _ ? r.ANNOTATION_DELETE : r.COMMENT_DELETE;
|
|
12
|
+
return /* @__PURE__ */ l(a.Root, {
|
|
13
13
|
modal: !1,
|
|
14
|
-
onOpenChange:
|
|
15
|
-
children: [/* @__PURE__ */
|
|
16
|
-
"aria-label":
|
|
14
|
+
onOpenChange: x,
|
|
15
|
+
children: [/* @__PURE__ */ c(a.Trigger, { children: /* @__PURE__ */ c(o, {
|
|
16
|
+
"aria-label": S(i.moreOptionsAriaLabel),
|
|
17
17
|
"data-no-expand": !0,
|
|
18
|
-
"data-resin-target":
|
|
19
|
-
disabled:
|
|
20
|
-
icon:
|
|
18
|
+
"data-resin-target": T,
|
|
19
|
+
disabled: g,
|
|
20
|
+
icon: u,
|
|
21
21
|
size: "small"
|
|
22
|
-
}) }), /* @__PURE__ */
|
|
22
|
+
}) }), /* @__PURE__ */ l(a.Content, {
|
|
23
23
|
...e,
|
|
24
24
|
align: "end",
|
|
25
|
+
"data-resin-component": w,
|
|
26
|
+
"data-resin-feature": n,
|
|
25
27
|
children: [
|
|
26
|
-
|
|
27
|
-
"data-resin-target":
|
|
28
|
-
onSelect: () =>
|
|
29
|
-
children: [/* @__PURE__ */
|
|
28
|
+
h && /* @__PURE__ */ l(a.Item, {
|
|
29
|
+
"data-resin-target": E,
|
|
30
|
+
onSelect: () => b?.(),
|
|
31
|
+
children: [/* @__PURE__ */ c(a.Item.StartElement, { icon: f }), /* @__PURE__ */ c(a.Item.MainContent, { label: S(i.edit) })]
|
|
30
32
|
}),
|
|
31
|
-
|
|
32
|
-
"data-resin-target":
|
|
33
|
-
onSelect: () =>
|
|
34
|
-
children: [/* @__PURE__ */
|
|
33
|
+
v && /* @__PURE__ */ l(a.Item, {
|
|
34
|
+
"data-resin-target": D,
|
|
35
|
+
onSelect: () => v(),
|
|
36
|
+
children: [/* @__PURE__ */ c(a.Item.StartElement, { icon: d }), /* @__PURE__ */ c(a.Item.MainContent, { label: S(i.copyLink) })]
|
|
35
37
|
}),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"data-resin-target":
|
|
39
|
-
onSelect: () =>
|
|
38
|
+
m && C && /* @__PURE__ */ c(a.Separator, {}),
|
|
39
|
+
m && /* @__PURE__ */ l(a.Item, {
|
|
40
|
+
"data-resin-target": O,
|
|
41
|
+
onSelect: () => y?.(),
|
|
40
42
|
variant: "destructive",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ c(a.Item.StartElement, { icon: p }), /* @__PURE__ */ c(a.Item.MainContent, { label: S(i.delete) })]
|
|
42
44
|
})
|
|
43
45
|
]
|
|
44
46
|
})]
|
|
45
47
|
});
|
|
46
48
|
};
|
|
47
|
-
export {
|
|
49
|
+
export { m as MessageOptionsMenu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { THREADED_ANNOTATIONS_RESIN_COMPONENTS as e } from "../../../v2/resin-targets.js";
|
|
2
2
|
import { MessageEditorVariant as t } from "../message-editor/message-editor.types.js";
|
|
3
3
|
import { MessageEditor as n } from "../message-editor/message-editor.js";
|
|
4
4
|
import { useThreadedAnnotationsContext as r } from "../../../v2/threaded-annotations-context.js";
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import t from "./
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { THREADED_ANNOTATIONS_RESIN_TARGETS as e } from "../../../v2/resin-targets.js";
|
|
2
|
+
import { getInitials as t } from "./getInitials.js";
|
|
3
|
+
import n from "./messages.js";
|
|
4
|
+
import { Avatar as r, ButtonWrapper as i, IconBadge as a } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as o } from "react-intl";
|
|
6
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
7
|
+
var c = ({ user: e, size: i = "medium" }) => {
|
|
8
|
+
let { name: c, isExternalUser: l, id: u, avatarUrl: d } = e, { formatMessage: f } = o(), p = t(c), m = /* @__PURE__ */ s(r, {
|
|
9
|
+
alt: f(n.userAvatar),
|
|
9
10
|
colorIndex: u,
|
|
10
|
-
size:
|
|
11
|
+
size: i,
|
|
11
12
|
src: d,
|
|
12
13
|
text: p
|
|
13
14
|
});
|
|
14
|
-
return l ? /* @__PURE__ */
|
|
15
|
+
return l ? /* @__PURE__ */ s(a, {
|
|
15
16
|
offset: {
|
|
16
17
|
right: -4,
|
|
17
18
|
bottom: -2
|
|
18
19
|
},
|
|
19
|
-
size:
|
|
20
|
+
size: i,
|
|
20
21
|
variant: "collaborator-external",
|
|
21
22
|
children: m
|
|
22
23
|
}) : m;
|
|
23
|
-
},
|
|
24
|
-
let { formatMessage:
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
"aria-label":
|
|
24
|
+
}, l = ({ user: t, size: r, onClick: a }) => {
|
|
25
|
+
let { formatMessage: l } = o();
|
|
26
|
+
return /* @__PURE__ */ s(i, {
|
|
27
|
+
"aria-label": l(n.userAvatarButtonAriaLabel),
|
|
27
28
|
"data-no-expand": !0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
"data-resin-target": e.PROFILE,
|
|
30
|
+
onClick: () => a(t.id),
|
|
31
|
+
children: /* @__PURE__ */ s(c, {
|
|
32
|
+
size: r,
|
|
33
|
+
user: t
|
|
32
34
|
})
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
|
-
export {
|
|
37
|
+
export { c as UserAvatar, l as UserAvatarButton };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
var e = {
|
|
1
|
+
var e = "activityfeedv2", t = {
|
|
2
|
+
ANNOTATION_MENU: "activityfeedannotation",
|
|
3
|
+
COMMENT_CARD: "activityfeedcommentcard",
|
|
4
|
+
COMMENT_MENU: "activityfeedcomment"
|
|
5
|
+
}, n = {
|
|
2
6
|
ANNOTATION_COPY_LINK: "activityfeed-annotation-copylink",
|
|
3
7
|
ANNOTATION_DELETE: "activityfeed-annotation-delete",
|
|
4
8
|
ANNOTATION_EDIT: "activityfeed-annotation-edit",
|
|
5
9
|
ANNOTATION_MENU: "activityfeed-annotation-options",
|
|
6
10
|
ANNOTATION_RESOLVE: "activityfeed-annotation-resolve",
|
|
7
11
|
ANNOTATION_UNRESOLVE: "activityfeed-annotation-unresolve",
|
|
8
|
-
COMMENT_CARD: "activityfeed-comment-card",
|
|
9
12
|
COMMENT_COPY_LINK: "activityfeed-comment-copylink",
|
|
10
13
|
COMMENT_DELETE: "activityfeed-comment-delete",
|
|
11
14
|
COMMENT_EDIT: "activityfeed-comment-edit",
|
|
@@ -13,6 +16,10 @@ var e = {
|
|
|
13
16
|
COMMENT_POST: "activityfeed-comment-post",
|
|
14
17
|
COMMENT_REPLY: "activityfeed-comment-reply",
|
|
15
18
|
COMMENT_RESOLVE: "activityfeed-comment-resolve",
|
|
16
|
-
COMMENT_UNRESOLVE: "activityfeed-comment-unresolve"
|
|
19
|
+
COMMENT_UNRESOLVE: "activityfeed-comment-unresolve",
|
|
20
|
+
DELETE_CANCEL: "activityfeed-delete-cancel",
|
|
21
|
+
DELETE_CONFIRM: "activityfeed-delete-confirm",
|
|
22
|
+
MENTION: "activityfeed-mentionlink",
|
|
23
|
+
PROFILE: "activityfeed-profilelink"
|
|
17
24
|
};
|
|
18
|
-
export { e as THREADED_ANNOTATIONS_RESIN_TARGETS };
|
|
25
|
+
export { t as THREADED_ANNOTATIONS_RESIN_COMPONENTS, e as THREADED_ANNOTATIONS_RESIN_FEATURE, n as THREADED_ANNOTATIONS_RESIN_TARGETS };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const THREADED_ANNOTATIONS_RESIN_FEATURE = "activityfeedv2";
|
|
2
|
+
export declare const THREADED_ANNOTATIONS_RESIN_COMPONENTS: {
|
|
3
|
+
readonly ANNOTATION_MENU: "activityfeedannotation";
|
|
4
|
+
readonly COMMENT_CARD: "activityfeedcommentcard";
|
|
5
|
+
readonly COMMENT_MENU: "activityfeedcomment";
|
|
6
|
+
};
|
|
1
7
|
export declare const THREADED_ANNOTATIONS_RESIN_TARGETS: {
|
|
2
8
|
readonly ANNOTATION_COPY_LINK: "activityfeed-annotation-copylink";
|
|
3
9
|
readonly ANNOTATION_DELETE: "activityfeed-annotation-delete";
|
|
@@ -5,7 +11,6 @@ export declare const THREADED_ANNOTATIONS_RESIN_TARGETS: {
|
|
|
5
11
|
readonly ANNOTATION_MENU: "activityfeed-annotation-options";
|
|
6
12
|
readonly ANNOTATION_RESOLVE: "activityfeed-annotation-resolve";
|
|
7
13
|
readonly ANNOTATION_UNRESOLVE: "activityfeed-annotation-unresolve";
|
|
8
|
-
readonly COMMENT_CARD: "activityfeed-comment-card";
|
|
9
14
|
readonly COMMENT_COPY_LINK: "activityfeed-comment-copylink";
|
|
10
15
|
readonly COMMENT_DELETE: "activityfeed-comment-delete";
|
|
11
16
|
readonly COMMENT_EDIT: "activityfeed-comment-edit";
|
|
@@ -14,4 +19,8 @@ export declare const THREADED_ANNOTATIONS_RESIN_TARGETS: {
|
|
|
14
19
|
readonly COMMENT_REPLY: "activityfeed-comment-reply";
|
|
15
20
|
readonly COMMENT_RESOLVE: "activityfeed-comment-resolve";
|
|
16
21
|
readonly COMMENT_UNRESOLVE: "activityfeed-comment-unresolve";
|
|
22
|
+
readonly DELETE_CANCEL: "activityfeed-delete-cancel";
|
|
23
|
+
readonly DELETE_CONFIRM: "activityfeed-delete-confirm";
|
|
24
|
+
readonly MENTION: "activityfeed-mentionlink";
|
|
25
|
+
readonly PROFILE: "activityfeed-profilelink";
|
|
17
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/threaded-annotations",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/dom": "^1.6.0",
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
"uuid": "^9.0.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@box/blueprint-web": "^16.
|
|
21
|
-
"@box/blueprint-web-assets": "^5.4.
|
|
22
|
-
"@box/collaboration-popover": "^2.1.
|
|
23
|
-
"@box/readable-time": "^2.1.
|
|
24
|
-
"@box/user-selector": "^2.1.
|
|
20
|
+
"@box/blueprint-web": "^16.8.0",
|
|
21
|
+
"@box/blueprint-web-assets": "^5.4.3",
|
|
22
|
+
"@box/collaboration-popover": "^2.1.23",
|
|
23
|
+
"@box/readable-time": "^2.1.23",
|
|
24
|
+
"@box/user-selector": "^2.1.24",
|
|
25
25
|
"clsx": "^1.2.1",
|
|
26
26
|
"react": "^18.0.0",
|
|
27
27
|
"react-dom": "^18.0.0",
|
|
28
28
|
"react-intl": "^6.4.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@box/blueprint-web": "^16.
|
|
32
|
-
"@box/blueprint-web-assets": "^5.4.
|
|
31
|
+
"@box/blueprint-web": "^16.8.0",
|
|
32
|
+
"@box/blueprint-web-assets": "^5.4.3",
|
|
33
33
|
"@box/eslint-plugin-blueprint": "2.1.9",
|
|
34
|
-
"@box/readable-time": "^2.1.
|
|
35
|
-
"@box/storybook-utils": "^1.1.
|
|
36
|
-
"@box/user-selector": "^2.1.
|
|
34
|
+
"@box/readable-time": "^2.1.23",
|
|
35
|
+
"@box/storybook-utils": "^1.1.22",
|
|
36
|
+
"@box/user-selector": "^2.1.24",
|
|
37
37
|
"react": "^18.0.0",
|
|
38
38
|
"react-dom": "^18.0.0"
|
|
39
39
|
},
|