@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.
@@ -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 { Button as r } from "@box/blueprint-web";
5
- import { useIntl as i } from "react-intl";
6
- import { jsx as a } from "react/jsx-runtime";
7
- import { ArrowUp as o } from "@box/blueprint-web-assets/icons/Medium";
8
- var s = ({ disabled: s, onPost: c, onPostError: l, onPostSuccess: u, cleanEditor: d, getEditorJsonContent: f }) => {
9
- let { isLoading: p } = e(), { handleSubmit: m } = n({
10
- onSubmit: c,
11
- onSubmitError: l,
12
- onSuccess: u,
13
- cleanEditor: d,
14
- getEditorJsonContent: f
15
- }), h = i();
16
- return /* @__PURE__ */ a(r, {
17
- "aria-label": h.formatMessage(t.post),
18
- disabled: s,
19
- endIcon: o,
20
- loading: p,
21
- loadingAriaLabel: h.formatMessage(t.postLoading),
22
- onClick: m,
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 { s as PostButton };
29
+ export { c as PostButton };
@@ -1,86 +1,90 @@
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 { CheckmarkCircle as p } from "@box/blueprint-web-assets/icons/Medium";
11
- import { CheckmarkCircle as m } from "@box/blueprint-web-assets/icons/MediumFilled";
12
- 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 }) => {
13
- let k = u(), { isAnnotations: A } = e(), [j, M] = l(!1), [N, P] = l(!1);
14
- return /* @__PURE__ */ f("div", {
15
- className: n.headerContainer,
16
- children: [/* @__PURE__ */ f("div", {
17
- className: n.information,
18
- children: [/* @__PURE__ */ d(t, {
19
- onClick: S,
20
- user: h
21
- }), /* @__PURE__ */ d("div", {
22
- className: n.textContainer,
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__ */ d(s, {
25
+ children: /* @__PURE__ */ f(c, {
25
26
  as: "p",
26
- className: n.author,
27
+ className: r.author,
27
28
  color: "textOnLightDefault",
28
29
  variant: "bodyDefaultBold",
29
- children: h.name
30
+ children: g.name
30
31
  })
31
32
  })]
32
- }), /* @__PURE__ */ f("div", {
33
- className: n.optionsMenu,
34
- "data-state": j || N ? "open" : "closed",
33
+ }), /* @__PURE__ */ p("div", {
34
+ className: r.optionsMenu,
35
+ "data-state": M || P ? "open" : "closed",
35
36
  children: [
36
- g && !_ && /* @__PURE__ */ d(c, {
37
- content: k.formatMessage(i.resolveButtonAriaLabel),
38
- children: /* @__PURE__ */ d(o, {
39
- "aria-label": k.formatMessage(i.resolveButtonAriaLabel),
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
- disabled: N,
42
- icon: p,
43
- onClick: () => E?.(),
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
- g && _ && /* @__PURE__ */ d(c, {
48
- content: k.formatMessage(i.unresolveButtonAriaLabel),
49
- children: /* @__PURE__ */ d(o, {
50
- "aria-label": k.formatMessage(i.unresolveButtonAriaLabel),
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
- disabled: N,
53
- icon: m,
54
- onClick: () => O?.(),
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__ */ d(a, {
60
- canDelete: y,
61
- canEdit: v,
62
- disabled: N,
63
- onCopyLink: C,
62
+ /* @__PURE__ */ f(o, {
63
+ canDelete: b,
64
+ canEdit: y,
65
+ disabled: P,
66
+ isAnnotations: j,
67
+ onCopyLink: w,
64
68
  onDelete: () => {
65
- x ? (M(!1), P(!0)) : (M(!1), w?.());
69
+ S ? (N(!1), F(!0)) : (N(!1), T?.());
66
70
  },
67
- onEdit: T,
68
- onOpenChange: M
71
+ onEdit: E,
72
+ onOpenChange: N
69
73
  }),
70
- /* @__PURE__ */ d(r, {
71
- hasReplies: b,
72
- isAnnotation: A,
74
+ /* @__PURE__ */ f(i, {
75
+ hasReplies: x,
76
+ isAnnotation: j,
73
77
  onCancel: () => {
74
- P(!1), M(!1);
78
+ F(!1), N(!1);
75
79
  },
76
80
  onConfirm: () => {
77
- D?.(), P(!1), M(!1);
81
+ O?.(), F(!1), N(!1);
78
82
  },
79
- onOpenChange: P,
80
- open: N
83
+ onOpenChange: F,
84
+ open: P
81
85
  })
82
86
  ]
83
87
  })]
84
88
  });
85
89
  };
86
- export { h as MessageHeader };
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 "./messages.js";
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, {
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__ */ a(n.Trigger, { children: /* @__PURE__ */ a(r, {
13
- "aria-label": v(t.moreOptionsAriaLabel),
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
- disabled: p,
16
- icon: s,
18
+ "data-resin-target": S,
19
+ disabled: m,
20
+ icon: c,
17
21
  size: "small"
18
- }) }), /* @__PURE__ */ o(n.Content, {
22
+ }) }), /* @__PURE__ */ s(r.Content, {
19
23
  ...e,
20
24
  align: "end",
21
25
  children: [
22
- f && /* @__PURE__ */ o(n.Item, {
23
- onSelect: () => g?.(),
24
- children: [/* @__PURE__ */ a(n.Item.StartElement, { icon: l }), /* @__PURE__ */ a(n.Item.MainContent, { label: v(t.edit) })]
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
- m && /* @__PURE__ */ o(n.Item, {
27
- onSelect: () => m(),
28
- children: [/* @__PURE__ */ a(n.Item.StartElement, { icon: c }), /* @__PURE__ */ a(n.Item.MainContent, { label: v(t.copyLink) })]
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
- d && y && /* @__PURE__ */ a(n.Separator, {}),
31
- d && /* @__PURE__ */ o(n.Item, {
32
- onSelect: () => h?.(),
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__ */ a(n.Item.StartElement, { icon: u }), /* @__PURE__ */ a(n.Item.MainContent, { label: v(t.delete) })]
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
- }) : null;
45
+ });
39
46
  };
40
- export { d as MessageOptionsMenu };
47
+ export { f as MessageOptionsMenu };
@@ -1,62 +1,64 @@
1
- import e from "../messages.js";
2
- import { t } from "../../../../../../chunks/text-message.module.js";
3
- import { Button as n, Focusable as r, Text as i, Tooltip as a } from "@box/blueprint-web";
4
- import { useIntl as o } from "react-intl";
5
- import { getReadableTime as s } from "@box/readable-time";
6
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
- var u = ({ createdAt: u, onReply: d, updatedAt: f }) => {
8
- let p = o();
9
- return /* @__PURE__ */ l("div", {
10
- className: t.messageFooter,
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__ */ c(a, {
13
- content: s({
13
+ /* @__PURE__ */ l(o, {
14
+ content: c({
14
15
  alwaysShowTime: !0,
15
- intl: p,
16
+ intl: m,
16
17
  relativeThreshold: 0,
17
- timestamp: u
18
+ timestamp: d
18
19
  }),
19
- children: /* @__PURE__ */ c(r, {
20
- className: t.readableTimeWrapper,
20
+ children: /* @__PURE__ */ l(i, {
21
+ className: n.readableTimeWrapper,
21
22
  "data-no-expand": !0,
22
- children: /* @__PURE__ */ c(i, {
23
+ children: /* @__PURE__ */ l(a, {
23
24
  as: "span",
24
25
  color: "textOnLightSecondary",
25
26
  variant: "bodySmall",
26
- children: s({
27
- intl: p,
28
- timestamp: u
27
+ children: c({
28
+ intl: m,
29
+ timestamp: d
29
30
  })
30
31
  })
31
32
  })
32
33
  }),
33
- f !== void 0 && /* @__PURE__ */ c(a, {
34
- content: p.formatMessage(e.editedTooltip, { time: s({
34
+ p !== void 0 && /* @__PURE__ */ l(o, {
35
+ content: m.formatMessage(t.editedTooltip, { time: c({
35
36
  alwaysShowTime: !0,
36
- intl: p,
37
+ intl: m,
37
38
  relativeThreshold: 0,
38
- timestamp: f
39
+ timestamp: p
39
40
  }) }),
40
- children: /* @__PURE__ */ c(r, {
41
+ children: /* @__PURE__ */ l(i, {
41
42
  "data-no-expand": !0,
42
- children: /* @__PURE__ */ c(i, {
43
+ children: /* @__PURE__ */ l(a, {
43
44
  as: "span",
44
45
  color: "textOnLightSecondary",
45
46
  variant: "bodySmall",
46
- children: p.formatMessage(e.edited)
47
+ children: m.formatMessage(t.edited)
47
48
  })
48
49
  })
49
50
  }),
50
- d && /* @__PURE__ */ c(n, {
51
- "aria-label": p.formatMessage(e.replyButtonAriaLabel),
52
- className: t.replyButton,
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: d,
57
- children: p.formatMessage(e.reply)
58
+ onClick: f,
59
+ children: m.formatMessage(t.reply)
58
60
  })
59
61
  ]
60
62
  });
61
63
  };
62
- export { u as MessageFooter };
64
+ export { d as MessageFooter };
@@ -1,76 +1,78 @@
1
- import { MessageEditorVariant as e } from "../message-editor/message-editor.types.js";
2
- import { MessageEditor as t } from "../message-editor/message-editor.js";
3
- import { useThreadedAnnotationsContext as n } from "../../../v2/threaded-annotations-context.js";
4
- import { t as r } from "../../../../../chunks/annotation-badge.js";
5
- import { MessageHeader as i } from "../message-header/message-header.js";
6
- import a from "./messages.js";
7
- import { t as o } from "../../../../../chunks/text-message.module.js";
8
- import { MessageFooter as s } from "./subcomponents/message-footer.js";
9
- import { MessageRenderer as c } from "./subcomponents/message-renderer.js";
10
- import l from "clsx";
11
- import { useIntl as u } from "react-intl";
12
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
13
- var m = ({ id: m, author: h, message: g, createdAt: _, updatedAt: v, permissions: y, showThreadedIndicator: b = !0, isResolved: x = !1, isFirstMessage: S = !1, hasReplies: C = !1, maxCharacterCount: w, onAvatarClick: T, onCopyLink: E, onDelete: D, onThreadDelete: O, onEdit: k, onEditError: A, onResolve: j, onUnresolve: M, userSelectorProps: N, annotationTarget: P, onAnnotationBadgeClick: F, originalContentDeleted: I }) => {
14
- let { canResolve: L, canEdit: R, canDelete: z } = y, B = u(), { dispatch: V, isReplyDisabled: H, isEditDisabled: U, isAnnotations: W, editingMessageId: G } = n(), K = G === m, q = !!k && !U && R;
15
- return /* @__PURE__ */ p("div", {
16
- "aria-label": B.formatMessage(a.annotationMessageAriaLabel),
17
- className: o.textMessage,
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
- children: [/* @__PURE__ */ f(i, {
20
- author: h,
21
- canResolve: L,
22
- isResolved: x,
23
- canDelete: z,
24
- canEdit: q,
25
- hasReplies: C,
26
- isFirstMessage: S,
27
- onAvatarClick: T,
28
- onCopyLink: E ? () => E(m) : void 0,
29
- onDelete: () => D(m),
30
- onThreadDelete: O,
31
- onEdit: q ? () => V({
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: m
35
+ id: h
34
36
  }) : void 0,
35
- onResolve: j ? () => j(m) : void 0,
36
- onUnresolve: M ? () => M(m) : void 0
37
- }), /* @__PURE__ */ p("div", {
38
- className: o.contentWrapper,
39
- children: [/* @__PURE__ */ f("div", { className: l(o.threadedIndicator, !b && o.threadedIndicatorHidden) }), /* @__PURE__ */ p("div", {
40
- className: o.messageContent,
41
- children: [P && !W && /* @__PURE__ */ f("div", {
42
- className: o.annotationBadgeWrapper,
43
- children: /* @__PURE__ */ f(r, {
44
- annotationTarget: P,
45
- onClick: () => F?.(m),
46
- originalContentDeleted: I
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
- }), K && k ? /* @__PURE__ */ f("div", {
49
- className: o.inlineEditSlot,
50
- children: /* @__PURE__ */ f(t, {
51
- initialContent: g,
52
- maxCharacterCount: w,
53
- onEditCancel: () => V({ type: "CLEAR_EDIT" }),
54
- onEditSuccess: () => V({ type: "CLEAR_EDIT" }),
55
- onSave: (e) => k(m, e),
56
- onSaveError: A,
57
- userSelectorProps: N,
58
- variant: e.EDIT_MESSAGE
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__ */ p(d, { children: [/* @__PURE__ */ f("div", {
61
- className: o.rendererWrapper,
62
+ }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
63
+ className: s.rendererWrapper,
62
64
  "data-message-body": !0,
63
- children: /* @__PURE__ */ f(c, { messageObject: g })
64
- }), /* @__PURE__ */ f(s, {
65
- createdAt: _,
66
- onReply: H ? void 0 : () => V({
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: h
70
+ author: g
69
71
  }),
70
- updatedAt: v
72
+ updatedAt: y
71
73
  })] })]
72
74
  })]
73
75
  })]
74
76
  });
75
77
  };
76
- export { m as TextMessage };
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/threaded-annotations",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "dependencies": {
6
6
  "@tanstack/react-virtual": "^3.10.8",