@box/uploads-manager 2.1.15 → 2.2.0

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/README.md CHANGED
@@ -72,7 +72,7 @@ type UploadItemStatus = 'pending' | 'uploading' | 'staged' | 'complete' | 'error
72
72
  | `onItemCancel` | `(itemId: string) => void` | No | Cancel a single item |
73
73
  | `onItemRetry` | `(itemId: string) => void` | No | Retry a single item (labeled "Retry") |
74
74
  | `onItemRemove` | `(itemId: string) => void` | No | Remove a completed/errored/canceled item |
75
- | `onItemOpen` | `(itemId: string) => void` | No | Open file preview for a completed item |
75
+ | `onItemOpen` | `(itemId: string) => void` | No | Open a completed item |
76
76
  | `onItemShare` | `(itemId: string) => void` | No | Share a completed item via link |
77
77
 
78
78
  ## Usage
@@ -5,14 +5,14 @@ import { ArrowUpRightSquare as r, ArrowsSpinning as i, Link as a, XMark as o } f
5
5
  import { useIntl as s } from "react-intl";
6
6
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
7
  function d({ item: d, onItemCancel: f, onItemRetry: p, onItemRemove: m, onItemOpen: h, onItemShare: g }) {
8
- let _ = s(), { status: v, isFolder: y, isRetryable: b } = d;
8
+ let _ = s(), { status: v, isRetryable: y } = d;
9
9
  return v === "pending" || v === "uploading" ? f ? /* @__PURE__ */ l(n.ActionIconButton, {
10
10
  "aria-label": _.formatMessage(e.itemActionCancelAriaLabel),
11
11
  className: t.actionButton,
12
12
  icon: o,
13
13
  onClick: () => f(d.id),
14
14
  size: "small"
15
- }) : null : v === "complete" ? y ? null : /* @__PURE__ */ u(c, { children: [h && /* @__PURE__ */ l(n.ActionIconButton, {
15
+ }) : null : v === "complete" ? /* @__PURE__ */ u(c, { children: [h && /* @__PURE__ */ l(n.ActionIconButton, {
16
16
  "aria-label": _.formatMessage(e.itemActionOpenAriaLabel),
17
17
  className: t.actionButton,
18
18
  icon: r,
@@ -24,7 +24,7 @@ function d({ item: d, onItemCancel: f, onItemRetry: p, onItemRemove: m, onItemOp
24
24
  icon: a,
25
25
  onClick: () => g(d.id),
26
26
  size: "small"
27
- })] }) : v === "error" ? /* @__PURE__ */ u(c, { children: [b !== !1 && p && /* @__PURE__ */ l(n.ActionIconButton, {
27
+ })] }) : v === "error" ? /* @__PURE__ */ u(c, { children: [y !== !1 && p && /* @__PURE__ */ l(n.ActionIconButton, {
28
28
  "aria-label": _.formatMessage(e.itemActionRetryAriaLabel),
29
29
  className: t.actionButton,
30
30
  icon: i,
@@ -39,7 +39,7 @@ export interface UploadItem {
39
39
  status: UploadItemStatus;
40
40
  /**
41
41
  * Whether this item represents a folder rather than a file.
42
- * Folder items display a folder icon and have limited actions.
42
+ * Folder items display a folder icon.
43
43
  *
44
44
  * @default false
45
45
  */
@@ -79,12 +79,12 @@ export interface UploadsItemActionCallbacks {
79
79
  /** Remove an errored item from the list */
80
80
  onItemRemove?: (itemId: string) => void;
81
81
  /**
82
- * Open file preview for a completed item.
82
+ * Open a completed item (file preview or folder).
83
83
  * When not provided, the "Open" action button is not rendered.
84
84
  */
85
85
  onItemOpen?: (itemId: string) => void;
86
86
  /**
87
- * Share a completed item via link.
87
+ * Share a completed item (file or folder) via link.
88
88
  * When not provided, the "Share" action button is not rendered.
89
89
  */
90
90
  onItemShare?: (itemId: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/uploads-manager",
3
- "version": "2.1.15",
3
+ "version": "2.2.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^16.4.5",