@box/activity-feed 1.15.0 → 1.16.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.
@@ -17,60 +17,50 @@ import '../styles/TaskItemFooter.css';var l = {
17
17
  approvalApproveIcon: "_approvalApproveIcon_1bak0_58",
18
18
  approvalRejectIcon: "_approvalRejectIcon_1bak0_62"
19
19
  };
20
- function u({ assignees: u, canApprove: d, canReject: f, disabled: p = !1, dueDate: m, hasNextPage: h, onApprove: g, onComplete: _, onLoadAllAssignee: v, onReject: y, onView: b, showActionButtons: x, showApprovalActions: S, showGeneralComplete: C, showViewDetails: w }) {
21
- let T = i();
20
+ function u({ assignees: u, canApprove: d, canReject: f, disabled: p = !1, dueDate: m, hasNextPage: h, onApprove: g, onComplete: _, onLoadAllAssignee: v, onReject: y, showActionButtons: b, showApprovalActions: x, showGeneralComplete: S }) {
21
+ let C = i();
22
22
  return /* @__PURE__ */ o("div", {
23
- className: x ? l.textMessageFooterSlot : `${l.textMessageFooterSlot} ${l.marginBottom}`,
23
+ className: b ? l.textMessageFooterSlot : `${l.textMessageFooterSlot} ${l.marginBottom}`,
24
24
  children: [
25
- m && /* @__PURE__ */ a(n, { dueDate: m }),
25
+ !!m && /* @__PURE__ */ a(n, { dueDate: m }),
26
26
  /* @__PURE__ */ a(t, {
27
27
  assignees: u,
28
28
  disabled: p,
29
29
  hasNextPage: h,
30
30
  onLoadAllAssignee: v
31
31
  }),
32
- x && /* @__PURE__ */ o("div", { children: [
33
- w && /* @__PURE__ */ a(r, {
34
- disabled: p,
35
- onClick: b,
32
+ b && /* @__PURE__ */ o("div", { children: [S && /* @__PURE__ */ a(r, {
33
+ disabled: p,
34
+ onClick: _,
35
+ size: "small",
36
+ variant: "primary",
37
+ children: C.formatMessage(e.taskCompleteAction)
38
+ }), x && /* @__PURE__ */ o("div", {
39
+ className: l.approvalActionsRow,
40
+ children: [/* @__PURE__ */ a(r, {
41
+ disabled: p || !d,
42
+ onClick: g,
36
43
  size: "small",
37
- variant: "primary",
38
- children: T.formatMessage(e.taskViewDetailsAction)
39
- }),
40
- C && /* @__PURE__ */ a(r, {
41
- disabled: p,
42
- onClick: _,
44
+ startIcon: () => /* @__PURE__ */ a(s, {
45
+ className: l.approvalApproveIcon,
46
+ color: "currentColor"
47
+ }),
48
+ type: "button",
49
+ variant: "secondary",
50
+ children: C.formatMessage(e.taskApproveAction)
51
+ }), /* @__PURE__ */ a(r, {
52
+ disabled: p || !f,
53
+ onClick: y,
43
54
  size: "small",
44
- variant: "primary",
45
- children: T.formatMessage(e.taskCompleteAction)
46
- }),
47
- S && /* @__PURE__ */ o("div", {
48
- className: l.approvalActionsRow,
49
- children: [/* @__PURE__ */ a(r, {
50
- disabled: p || !d,
51
- onClick: g,
52
- size: "small",
53
- startIcon: () => /* @__PURE__ */ a(s, {
54
- className: l.approvalApproveIcon,
55
- color: "currentColor"
56
- }),
57
- type: "button",
58
- variant: "secondary",
59
- children: T.formatMessage(e.taskApproveAction)
60
- }), /* @__PURE__ */ a(r, {
61
- disabled: p || !f,
62
- onClick: y,
63
- size: "small",
64
- startIcon: () => /* @__PURE__ */ a(c, {
65
- className: l.approvalRejectIcon,
66
- color: "currentColor"
67
- }),
68
- type: "button",
69
- variant: "secondary",
70
- children: T.formatMessage(e.taskRejectAction)
71
- })]
72
- })
73
- ] })
55
+ startIcon: () => /* @__PURE__ */ a(c, {
56
+ className: l.approvalRejectIcon,
57
+ color: "currentColor"
58
+ }),
59
+ type: "button",
60
+ variant: "secondary",
61
+ children: C.formatMessage(e.taskRejectAction)
62
+ })]
63
+ })] })
74
64
  ]
75
65
  });
76
66
  }
@@ -27,8 +27,8 @@ function d(e) {
27
27
  let t = e.trim().split(/\s+/);
28
28
  return t.length === 1 ? t[0].charAt(0).toUpperCase() : (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase();
29
29
  }
30
- function f({ id: f, author: p, message: m, createdAt: h, canEdit: g = !1, canDelete: _ = !1, onEdit: v, onDelete: y, showThreadedIndicator: b = !1, children: x }) {
31
- let [S, C] = n(!1), w = g && !!v || _ && !!y, T = d(p.name);
30
+ function f({ id: f, author: p, message: m, createdAt: h, canEdit: g = !1, canDelete: _ = !1, disabled: v = !1, onEdit: y, onDelete: b, onView: x, showThreadedIndicator: S = !1, children: C }) {
31
+ let [w, T] = n(!1), E = g && !!y || _ && !!b || !!x, D = d(p.name);
32
32
  return /* @__PURE__ */ o("div", {
33
33
  className: l.taskMessage,
34
34
  "data-message-wrapper": !0,
@@ -42,7 +42,7 @@ function f({ id: f, author: p, message: m, createdAt: h, canEdit: g = !1, canDel
42
42
  colorIndex: parseInt(p.id, 10) || 0,
43
43
  size: "medium",
44
44
  src: p.avatarUrl || "",
45
- text: T
45
+ text: D
46
46
  }), /* @__PURE__ */ a("div", {
47
47
  className: l.textContainer,
48
48
  children: /* @__PURE__ */ a(i, {
@@ -53,20 +53,22 @@ function f({ id: f, author: p, message: m, createdAt: h, canEdit: g = !1, canDel
53
53
  children: p.name
54
54
  })
55
55
  })]
56
- }), w && /* @__PURE__ */ a("div", {
56
+ }), E && /* @__PURE__ */ a("div", {
57
57
  className: l.optionsMenu,
58
- "data-state": S ? "open" : "closed",
58
+ "data-state": w ? "open" : "closed",
59
59
  children: /* @__PURE__ */ a(t, {
60
60
  canDelete: _,
61
61
  canEdit: g,
62
- onDelete: y ? () => y(f) : void 0,
63
- onEdit: v ? () => v(f) : void 0,
64
- onOpenChange: C
62
+ disabled: v,
63
+ onDelete: b ? () => b(f) : void 0,
64
+ onEdit: y ? () => y(f) : void 0,
65
+ onView: x ? () => x(f) : void 0,
66
+ onOpenChange: T
65
67
  })
66
68
  })]
67
69
  }), /* @__PURE__ */ o("div", {
68
70
  className: l.contentWrapper,
69
- children: [/* @__PURE__ */ a("div", { className: c(l.threadedIndicator, !b && l.threadedIndicatorHidden) }), /* @__PURE__ */ o("div", {
71
+ children: [/* @__PURE__ */ a("div", { className: c(l.threadedIndicator, !S && l.threadedIndicatorHidden) }), /* @__PURE__ */ o("div", {
70
72
  className: l.messageContent,
71
73
  children: [
72
74
  /* @__PURE__ */ a(e, { messageObject: m }),
@@ -77,7 +79,7 @@ function f({ id: f, author: p, message: m, createdAt: h, canEdit: g = !1, canDel
77
79
  timestamp: h
78
80
  })
79
81
  }),
80
- x
82
+ C
81
83
  ]
82
84
  })]
83
85
  })]
@@ -5,54 +5,61 @@ import { useEffect as r, useState as i } from "react";
5
5
  import { DropdownMenu as a, IconButton as o, Text as s } from "@box/blueprint-web";
6
6
  import { useIntl as c } from "react-intl";
7
7
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { Ellipsis as d, Pencil as f, Trash as p } from "@box/blueprint-web-assets/icons/Medium";
9
- import { bpTextTextDestructiveOnLight as m } from "@box/blueprint-web-assets/tokens/tokens";
10
- import '../styles/task-options-menu.css';var h = { shell: "_shell_zywke_2" };
11
- function g({ canDelete: g = !0, canEdit: _ = !0, disabled: v, onEdit: y, onDelete: b, onOpenChange: x }) {
12
- let { formatMessage: S } = c(), [C, w] = i(!1), [T, E] = i(!1);
8
+ import { Ellipsis as d, InformationCircle as f, Pencil as p, Trash as m } from "@box/blueprint-web-assets/icons/Medium";
9
+ import { bpTextTextDestructiveOnLight as h } from "@box/blueprint-web-assets/tokens/tokens";
10
+ import '../styles/task-options-menu.css';var g = { shell: "_shell_zywke_2" };
11
+ function _({ canDelete: _ = !0, canEdit: v = !0, disabled: y, onEdit: b, onDelete: x, onView: S, onOpenChange: C }) {
12
+ let { formatMessage: w } = c(), [T, E] = i(!1), [D, O] = i(!1);
13
13
  return r(() => {
14
- x?.(C || T);
14
+ C?.(T || D);
15
15
  }, [
16
- C,
17
16
  T,
18
- x
17
+ D,
18
+ C
19
19
  ]), /* @__PURE__ */ u("div", {
20
- className: h.shell,
20
+ className: g.shell,
21
21
  children: [/* @__PURE__ */ u(a.Root, {
22
- onOpenChange: w,
22
+ onOpenChange: E,
23
23
  children: [/* @__PURE__ */ l(a.Trigger, { children: /* @__PURE__ */ l(o, {
24
- "aria-label": S(t.moreOptionsAriaLabel),
24
+ "aria-label": w(t.moreOptionsAriaLabel),
25
25
  "data-no-expand": !0,
26
- disabled: v || T,
26
+ disabled: y || D,
27
27
  icon: d,
28
28
  size: "small"
29
29
  }) }), /* @__PURE__ */ u(a.Content, {
30
30
  align: "end",
31
- children: [_ && y && /* @__PURE__ */ u(a.Item, {
32
- onSelect: () => y(),
33
- children: [/* @__PURE__ */ l(a.Item.StartElement, { icon: f }), /* @__PURE__ */ l(a.Item.MainContent, { label: S(e.taskEditMenuItem) })]
34
- }), g && b && /* @__PURE__ */ u(a.Item, {
35
- onSelect: () => {
36
- E(!0);
37
- },
38
- children: [/* @__PURE__ */ l(a.Item.StartElement, { children: /* @__PURE__ */ l(p, { color: m }) }), /* @__PURE__ */ l(a.Item.MainContent, { children: /* @__PURE__ */ l(s, {
39
- as: "span",
40
- color: "textOnLightError",
41
- variant: "bodyDefault",
42
- children: S(e.taskDeleteMenuItem)
43
- }) })]
44
- })]
31
+ children: [
32
+ S && /* @__PURE__ */ u(a.Item, {
33
+ onSelect: () => S(),
34
+ children: [/* @__PURE__ */ l(a.Item.StartElement, { icon: f }), /* @__PURE__ */ l(a.Item.MainContent, { label: w(e.taskViewDetailsAction) })]
35
+ }),
36
+ v && b && /* @__PURE__ */ u(a.Item, {
37
+ onSelect: () => b(),
38
+ children: [/* @__PURE__ */ l(a.Item.StartElement, { icon: p }), /* @__PURE__ */ l(a.Item.MainContent, { label: w(e.taskEditMenuItem) })]
39
+ }),
40
+ _ && x && /* @__PURE__ */ u(a.Item, {
41
+ onSelect: () => {
42
+ O(!0);
43
+ },
44
+ children: [/* @__PURE__ */ l(a.Item.StartElement, { children: /* @__PURE__ */ l(m, { color: h }) }), /* @__PURE__ */ l(a.Item.MainContent, { children: /* @__PURE__ */ l(s, {
45
+ as: "span",
46
+ color: "textOnLightError",
47
+ variant: "bodyDefault",
48
+ children: w(e.taskDeleteMenuItem)
49
+ }) })]
50
+ })
51
+ ]
45
52
  })]
46
- }), g && b && /* @__PURE__ */ l(n, {
53
+ }), _ && x && /* @__PURE__ */ l(n, {
47
54
  onCancel: () => {
48
- E(!1);
55
+ O(!1);
49
56
  },
50
57
  onConfirm: () => {
51
- b?.(), E(!1);
58
+ x?.(), O(!1);
52
59
  },
53
- onOpenChange: E,
54
- open: T
60
+ onOpenChange: O,
61
+ open: D
55
62
  })]
56
63
  });
57
64
  }
58
- export { g as t };
65
+ export { _ as t };
@@ -8,20 +8,18 @@ import { Card as u, Text as d } from "@box/blueprint-web";
8
8
  import { useIntl as f } from "react-intl";
9
9
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
10
  import { Stamp as h, Tasks as g } from "@box/blueprint-web-assets/icons/Medium";
11
- function _({ assignees: _, author: v, completedAt: y, completionRule: b, createdAt: x, currentUserId: S, description: C, disabled: w = !1, dueDate: T, fileCount: E, getAvatarUrl: D, hasNextPage: O, id: k, onApprove: A, onComplete: j, onDelete: M, onEdit: N, onLoadAllAssignee: P, onReject: F, onView: I, permissions: L, status: R, taskType: z }) {
12
- let B = f(), V = R === e.COMPLETED || R === e.APPROVED || R === e.REJECTED, H = S ? _.find((e) => e.id === S) : void 0, U = !!(!V && H && H.permissions?.canUpdate && H.status === e.NOT_STARTED), W = () => {
13
- j?.(k);
14
- }, G = () => {
15
- A?.(k);
11
+ function _({ assignees: _, author: v, completedAt: y, completionRule: b, createdAt: x, currentUserId: S, description: C, disabled: w = !1, dueDate: T, fileCount: E, getAvatarUrl: D, hasNextPage: O, id: k, managedBy: A, onApprove: j, onComplete: M, onDelete: N, onEdit: P, onLoadAllAssignee: F, onReject: I, onView: L, permissions: R, status: z, taskType: B }) {
12
+ let V = f(), H = z === e.COMPLETED || z === e.APPROVED || z === e.REJECTED, U = S ? _.find((e) => e.id === S) : void 0, W = !!(!H && U && U.permissions?.canUpdate && U.status === e.NOT_STARTED), G = () => {
13
+ M?.(k);
16
14
  }, K = () => {
17
- F?.(k);
15
+ j?.(k);
18
16
  }, q = () => {
19
17
  I?.(k);
20
- }, J = (E ?? 1) > 1 && !!I, Y = !J && z === t.GENERAL && U && !!j, X = !J && z === t.APPROVAL && U && !!(A || F), Z = l(C), Q = c(v, D), $ = L ? L.canDelete : !!M, ee = L ? L.canUpdate : !!N, te = J || Y || X, ne = /* @__PURE__ */ p(a, {
18
+ }, J = (E ?? 1) > 1, Y = (J || (A?.entries?.length ?? 0) > 0) && !!L, X = !J && B === t.GENERAL && W && !!M, Z = !J && B === t.APPROVAL && W && !!(j || I), Q = l(C), $ = c(v, D), ee = R ? R.canDelete : !!N, te = R ? R.canUpdate : !!P, ne = X || Z, re = /* @__PURE__ */ p(a, {
21
19
  completedAt: y ?? x,
22
20
  showCount: b === n.ALL_ASSIGNEES && !O,
23
21
  totalCount: _.length,
24
- variant: R
22
+ variant: z
25
23
  });
26
24
  return /* @__PURE__ */ m(u, {
27
25
  className: o.taskItem,
@@ -31,7 +29,7 @@ function _({ assignees: _, author: v, completedAt: y, completionRule: b, created
31
29
  className: o.header,
32
30
  children: /* @__PURE__ */ m("div", {
33
31
  className: o.headerTitleRow,
34
- children: [z === t.APPROVAL ? /* @__PURE__ */ p(h, {
32
+ children: [B === t.APPROVAL ? /* @__PURE__ */ p(h, {
35
33
  "aria-hidden": !0,
36
34
  className: o.headerLeadingIcon,
37
35
  color: "currentColor"
@@ -42,39 +40,39 @@ function _({ assignees: _, author: v, completedAt: y, completionRule: b, created
42
40
  }), /* @__PURE__ */ p(d, {
43
41
  as: "h4",
44
42
  variant: "bodyDefaultSemibold",
45
- children: B.formatMessage(z === t.APPROVAL ? i.approvalTaskLabel : i.taskLabel)
43
+ children: V.formatMessage(B === t.APPROVAL ? i.approvalTaskLabel : i.taskLabel)
46
44
  })]
47
45
  })
48
46
  }), /* @__PURE__ */ m("div", {
49
47
  className: o.cardBody,
50
48
  children: [/* @__PURE__ */ p(r, {
51
- author: Q,
52
- canDelete: !w && $,
53
- canEdit: !w && ee,
49
+ author: $,
50
+ canDelete: !w && ee,
51
+ canEdit: !w && te,
54
52
  createdAt: x,
53
+ disabled: w,
55
54
  id: k,
56
- message: Z,
57
- onDelete: M,
58
- onEdit: N,
59
- showThreadedIndicator: V,
55
+ message: Q,
56
+ onDelete: N,
57
+ onEdit: P,
58
+ onView: Y ? L : void 0,
59
+ showThreadedIndicator: H,
60
60
  children: /* @__PURE__ */ p(s, {
61
61
  assignees: _,
62
- canApprove: !!A,
63
- canReject: !!F,
62
+ canApprove: !!j,
63
+ canReject: !!I,
64
64
  disabled: w,
65
65
  dueDate: T,
66
66
  hasNextPage: O,
67
- onApprove: G,
68
- onComplete: W,
69
- onLoadAllAssignee: P,
70
- onReject: K,
71
- onView: q,
72
- showActionButtons: te,
73
- showApprovalActions: X,
74
- showGeneralComplete: Y,
75
- showViewDetails: J
67
+ onApprove: K,
68
+ onComplete: G,
69
+ onLoadAllAssignee: F,
70
+ onReject: q,
71
+ showActionButtons: ne,
72
+ showApprovalActions: Z,
73
+ showGeneralComplete: X
76
74
  })
77
- }), ne]
75
+ }), re]
78
76
  })]
79
77
  });
80
78
  }
@@ -1,3 +1,3 @@
1
1
  import { TaskItemProps } from './types';
2
- export declare function TaskItem({ assignees, author, completedAt, completionRule, createdAt, currentUserId, description, disabled, dueDate, fileCount, getAvatarUrl, hasNextPage, id, onApprove, onComplete, onDelete, onEdit, onLoadAllAssignee, onReject, onView, permissions: taskPermissions, status, taskType, }: TaskItemProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function TaskItem({ assignees, author, completedAt, completionRule, createdAt, currentUserId, description, disabled, dueDate, fileCount, getAvatarUrl, hasNextPage, id, managedBy, onApprove, onComplete, onDelete, onEdit, onLoadAllAssignee, onReject, onView, permissions: taskPermissions, status, taskType, }: TaskItemProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default TaskItem;
@@ -10,10 +10,8 @@ export type TaskItemFooterProps = {
10
10
  onComplete: () => void;
11
11
  onLoadAllAssignee?: () => Promise<TaskAssignee[]>;
12
12
  onReject: () => void;
13
- onView: () => void;
14
13
  showActionButtons: boolean;
15
14
  showApprovalActions: boolean;
16
15
  showGeneralComplete: boolean;
17
- showViewDetails: boolean;
18
16
  };
19
- export declare function TaskItemFooter({ assignees, canApprove, canReject, disabled, dueDate, hasNextPage, onApprove, onComplete, onLoadAllAssignee, onReject, onView, showActionButtons, showApprovalActions, showGeneralComplete, showViewDetails, }: TaskItemFooterProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function TaskItemFooter({ assignees, canApprove, canReject, disabled, dueDate, hasNextPage, onApprove, onComplete, onLoadAllAssignee, onReject, showActionButtons, showApprovalActions, showGeneralComplete, }: TaskItemFooterProps): import("react/jsx-runtime").JSX.Element;
@@ -7,10 +7,12 @@ export interface TaskMessageProps {
7
7
  createdAt: number;
8
8
  canEdit?: boolean;
9
9
  canDelete?: boolean;
10
+ disabled?: boolean;
10
11
  onEdit?: (id: string) => void;
11
12
  onDelete?: (id: string) => void;
13
+ onView?: (id: string) => void;
12
14
  /** When true, shows the threaded indicator vertical line */
13
15
  showThreadedIndicator?: boolean;
14
16
  children?: ReactNode;
15
17
  }
16
- export declare function TaskMessage({ id, author, message, createdAt, canEdit, canDelete, onEdit, onDelete, showThreadedIndicator, children, }: TaskMessageProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function TaskMessage({ id, author, message, createdAt, canEdit, canDelete, disabled, onEdit, onDelete, onView, showThreadedIndicator, children, }: TaskMessageProps): import("react/jsx-runtime").JSX.Element;
@@ -4,10 +4,11 @@ export interface TaskOptionsMenuProps {
4
4
  disabled?: boolean;
5
5
  onEdit?: () => void;
6
6
  onDelete?: () => void;
7
+ onView?: () => void;
7
8
  onOpenChange?: (isOpen: boolean) => void;
8
9
  }
9
10
  /**
10
- * Context menu for a task message with Modify task and Delete task options.
11
+ * Context menu for a task message with View task details, Modify task and Delete task options.
11
12
  * Delete opens an anchored confirmation popover (same pattern as threaded message-header).
12
13
  */
13
- export declare function TaskOptionsMenu({ canDelete, canEdit, disabled, onEdit, onDelete, onOpenChange, }: TaskOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function TaskOptionsMenu({ canDelete, canEdit, disabled, onEdit, onDelete, onView, onOpenChange, }: TaskOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -42,8 +42,25 @@ export interface TaskAuthor {
42
42
  id: string;
43
43
  name: string;
44
44
  }
45
+ export interface TaskManager {
46
+ avatarUrl?: string;
47
+ email?: string;
48
+ id: string;
49
+ name: string;
50
+ }
51
+ export interface TaskManagedBy {
52
+ entries: TaskManager[];
53
+ next_marker: string | null;
54
+ limit: number;
55
+ }
45
56
  export interface TaskItemProps {
46
- /** Current logged-in user ID (used to determine if action buttons should show) */
57
+ /**
58
+ * Current logged-in user ID. Used only for **footer** primary actions (Mark complete / Approve / Reject):
59
+ * the current user must appear in {@link TaskItemProps.assignees} with `NOT_STARTED` and assignee-level
60
+ * `permissions.canUpdate`. `TaskItem` does not use this field for the message ⋯ menu: Modify / Delete follow
61
+ * {@link TaskItemProps.permissions} or {@link TaskItemProps.onEdit} / {@link TaskItemProps.onDelete}; View details
62
+ * follows {@link TaskItemProps.onView} with {@link TaskItemProps.fileCount} / {@link TaskItemProps.managedBy}.
63
+ */
47
64
  currentUserId?: string;
48
65
  /** Unique task ID */
49
66
  id: string;
@@ -70,12 +87,21 @@ export interface TaskItemProps {
70
87
  completionRule?: TaskCompletionRule;
71
88
  /**
72
89
  * Number of files associated with this task.
73
- * Omitted or nullish values are treated as 1. When the result is > 1 and `onView` is provided, shows "View Task Details" instead of other footer actions.
90
+ * Omitted or nullish values are treated as 1. When greater than 1, footer Complete / Approve / Reject are hidden.
91
+ * Pass `onView` (with multi-file and/or `managedBy`) so "View task details" can appear in the message menu.
74
92
  */
75
93
  fileCount?: number | null;
76
94
  /**
77
- * API permissions for the task. When set, `canDelete` / `canUpdate` drive message delete & edit UI;
78
- * omit to fall back to whether `onDelete` and `onEdit` callbacks are provided.
95
+ * Managers with full permissions on this task (API: `managed_by`).
96
+ * When `entries` is non-empty and `onView` is provided, adds "View Task Details" to the message options menu.
97
+ * Footer primary actions still show when the user can act (unlike multi-file tasks, where those footer actions are hidden).
98
+ */
99
+ managedBy?: TaskManagedBy;
100
+ /**
101
+ * Task-level API permissions (`permissions` on the task resource). When set, `canDelete` / `canUpdate` drive
102
+ * Modify / Delete in the **message** ⋯ menu (with {@link TaskItemProps.disabled}). When omitted, those menu
103
+ * items follow whether {@link TaskItemProps.onEdit} / {@link TaskItemProps.onDelete} are provided — not the
104
+ * footer assignee gate (`currentUserId` + assignee row).
79
105
  */
80
106
  permissions?: TaskItemPermissions;
81
107
  /** Callback when a general task is completed (footer shows only for `taskType: TaskType.GENERAL`). */
@@ -89,8 +115,9 @@ export interface TaskItemProps {
89
115
  /** Callback when task is deleted */
90
116
  onDelete?: (taskId: string) => void;
91
117
  /**
92
- * Callback when "View Task Details" is clicked for multi-file tasks.
93
- * When effective file count (`fileCount` with nullish treated as 1) is > 1 and this is provided, replaces other footer actions; if omitted, normal actions still show when allowed.
118
+ * Callback when "View Task Details" is chosen from the message options menu.
119
+ * The menu item is shown when this is provided and either effective `fileCount` is greater than 1 or `managedBy.entries` is non-empty.
120
+ * Footer Complete / Approve / Reject are hidden when effective `fileCount` is greater than 1. With managers only (`managedBy`) on a single-file task, footer actions can still show when the user can act. This callback controls the menu item, not the multi-file footer hide rule.
94
121
  */
95
122
  onView?: (taskId: string) => void;
96
123
  /** Get avatar URL for a user (omit or return undefined when none). */
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@box/activity-feed",
3
- "version": "1.15.0",
3
+ "version": "1.16.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@box/blueprint-web": "^14.16.2",
7
- "@box/blueprint-web-assets": "^4.115.2",
8
- "@box/collaboration-popover": "^1.61.3",
9
- "@box/readable-time": "^1.40.3",
10
- "@box/threaded-annotations": "^1.83.3",
11
- "@box/user-selector": "^1.75.3",
6
+ "@box/blueprint-web": "^14.17.0",
7
+ "@box/blueprint-web-assets": "^4.115.3",
8
+ "@box/collaboration-popover": "^1.61.4",
9
+ "@box/readable-time": "^1.40.4",
10
+ "@box/threaded-annotations": "^1.83.4",
11
+ "@box/user-selector": "^1.75.4",
12
12
  "clsx": "^1.2.1",
13
13
  "react": "^18.0.0",
14
14
  "react-dom": "^18.0.0",
@@ -18,14 +18,14 @@
18
18
  "access": "public"
19
19
  },
20
20
  "devDependencies": {
21
- "@box/blueprint-web": "^14.16.2",
22
- "@box/blueprint-web-assets": "^4.115.2",
23
- "@box/collaboration-popover": "^1.61.3",
21
+ "@box/blueprint-web": "^14.17.0",
22
+ "@box/blueprint-web-assets": "^4.115.3",
23
+ "@box/collaboration-popover": "^1.61.4",
24
24
  "@box/eslint-plugin-blueprint": "1.1.18",
25
- "@box/readable-time": "^1.40.3",
26
- "@box/storybook-utils": "0.18.2",
27
- "@box/threaded-annotations": "^1.83.3",
28
- "@box/user-selector": "^1.75.3",
25
+ "@box/readable-time": "^1.40.4",
26
+ "@box/storybook-utils": "0.18.3",
27
+ "@box/threaded-annotations": "^1.83.4",
28
+ "@box/user-selector": "^1.75.4",
29
29
  "react-intl": "^6.4.2"
30
30
  },
31
31
  "files": [