@box/metadata-view 1.53.18 → 1.53.19

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,72 +1,74 @@
1
- import { PageHeader as t, IconButton as b, Text as h, Status as H } from "@box/blueprint-web";
1
+ import { Text as u, PageHeader as t, IconButton as x, Status as H } from "@box/blueprint-web";
2
2
  import { XMark as y } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as C } from "react-intl";
4
- import { SwitchCase as L, Case as S } from "../switch-case/switch-case.js";
3
+ import { useIntl as b } from "react-intl";
4
+ import { SwitchCase as L, Case as h } from "../switch-case/switch-case.js";
5
5
  import s from "./messages.js";
6
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
7
- import '../../../../styles/header.css';const M = "_viewHeader_11wvf_1", I = "_titleBar_11wvf_5", N = "_clearSelectionButton_11wvf_11", n = {
6
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
7
+ import '../../../../styles/header.css';const M = "_viewHeader_11wvf_1", C = "_titleBar_11wvf_5", I = "_clearSelectionButton_11wvf_11", o = {
8
8
  viewHeader: M,
9
- titleBar: I,
10
- clearSelectionButton: N
9
+ titleBar: C,
10
+ clearSelectionButton: I
11
11
  };
12
12
  function A({
13
13
  title: r,
14
- itemCount: i,
15
- isItemCountVisible: f = !0,
16
- onClearSelection: v,
17
- selectionCount: c = 0,
18
- isSelectionCountVisible: w = !0,
19
- selectedItemName: d,
14
+ itemCount: l,
15
+ isItemCountVisible: S = !0,
16
+ onClearSelection: f,
17
+ selectionCount: i = 0,
18
+ isSelectionCountVisible: v = !0,
19
+ selectedItemName: c,
20
20
  rightSlot: a
21
21
  }) {
22
22
  const {
23
- formatMessage: m
24
- } = C(), u = w && c > 0, B = f && i != null;
25
- if (!(!!r || u || !!a))
23
+ formatMessage: d
24
+ } = b(), m = v && i > 0, w = S && l != null;
25
+ if (!(!!r || m || !!a))
26
26
  return null;
27
- const l = (_) => /* @__PURE__ */ e(h, {
28
- color: "textOnLightDefault",
29
- variant: "bodyLargeBold",
30
- as: "span",
31
- children: _
32
- }), [g, p] = d ? [s.singleItemSelected, {
33
- boldName: l(d)
27
+ const [B, g] = c ? [s.singleItemSelected, {
28
+ name: c
34
29
  }] : [s.itemsSelected, {
35
- boldCount: l(c),
36
- b: l
37
- }], x = m(g, p);
38
- return /* @__PURE__ */ o(t.Root, {
30
+ count: i
31
+ }], p = d(B, {
32
+ ...g,
33
+ b: (_) => /* @__PURE__ */ e(u, {
34
+ color: "textOnLightDefault",
35
+ variant: "bodyLargeBold",
36
+ as: "span",
37
+ children: _
38
+ })
39
+ });
40
+ return /* @__PURE__ */ n(t.Root, {
39
41
  variant: "inline",
40
42
  sticky: !1,
41
- className: n.viewHeader,
42
- children: [/* @__PURE__ */ o(L, {
43
- children: [/* @__PURE__ */ o(S, {
44
- condition: u,
43
+ className: o.viewHeader,
44
+ children: [/* @__PURE__ */ n(L, {
45
+ children: [/* @__PURE__ */ n(h, {
46
+ condition: m,
45
47
  children: [/* @__PURE__ */ e(t.Corner, {
46
- children: /* @__PURE__ */ e(b, {
47
- "aria-label": m(s.clearSelectionAriaLabel),
48
+ children: /* @__PURE__ */ e(x, {
49
+ "aria-label": d(s.clearSelectionAriaLabel),
48
50
  icon: y,
49
- onClick: v,
51
+ onClick: f,
50
52
  size: "small",
51
53
  variant: "small-utility",
52
- className: n.clearSelectionButton
54
+ className: o.clearSelectionButton
53
55
  })
54
56
  }), /* @__PURE__ */ e(t.StartElements, {
55
- children: /* @__PURE__ */ e(h, {
57
+ children: /* @__PURE__ */ e(u, {
56
58
  as: "span",
57
59
  color: "textOnLightSecondary",
58
60
  variant: "bodyLarge",
59
- children: x
61
+ children: p
60
62
  })
61
63
  })]
62
- }), /* @__PURE__ */ e(S, {
64
+ }), /* @__PURE__ */ e(h, {
63
65
  condition: !!r,
64
- children: /* @__PURE__ */ o("div", {
65
- className: n.titleBar,
66
- children: [r, B && /* @__PURE__ */ e(H, {
67
- className: n.itemCount,
66
+ children: /* @__PURE__ */ n("div", {
67
+ className: o.titleBar,
68
+ children: [r, w && /* @__PURE__ */ e(H, {
69
+ className: o.itemCount,
68
70
  colorIndex: 0,
69
- text: String(i)
71
+ text: String(l)
70
72
  })]
71
73
  })
72
74
  })]
@@ -6,11 +6,11 @@ const t = e({
6
6
  },
7
7
  itemsSelected: {
8
8
  id: "groupSharedFeatures.metadataView.header.itemsSelected",
9
- defaultMessage: "{boldCount} <b>items</b> are selected"
9
+ defaultMessage: "{count, plural, one {<b># item</b> is selected} other {<b># items</b> are selected}}"
10
10
  },
11
11
  singleItemSelected: {
12
12
  id: "groupSharedFeatures.metadataView.header.singleItemSelected",
13
- defaultMessage: "{boldName} is selected"
13
+ defaultMessage: "<b>{name}</b> is selected"
14
14
  }
15
15
  });
16
16
  export {
@@ -21,8 +21,8 @@ export default {
21
21
  "groupSharedFeatures.metadataView.filterSidepanel.showResultsButton": "Search",
22
22
  "groupSharedFeatures.metadataView.gridList.gridView": "Grid View",
23
23
  "groupSharedFeatures.metadataView.header.clearSelectionAriaLabel": "Clear selection",
24
- "groupSharedFeatures.metadataView.header.itemsSelected": "{boldCount} <b>items</b> are selected",
25
- "groupSharedFeatures.metadataView.header.singleItemSelected": "{boldName} is selected",
24
+ "groupSharedFeatures.metadataView.header.itemsSelected": "{count, plural, one {<b># item</b> is selected} other {<b># items</b> are selected}}",
25
+ "groupSharedFeatures.metadataView.header.singleItemSelected": "<b>{name}</b> is selected",
26
26
  "groupSharedFeatures.metadataView.inlineEditingCell.unselectedOptionLabel": "--",
27
27
  "groupSharedFeatures.metadataView.itemActionMenu.actionMenu": "Action menu",
28
28
  "groupSharedFeatures.metadataView.itemList.errorMessage": "Something went wrong. Please refresh this page.",
@@ -42,10 +42,10 @@ groupSharedFeatures.metadataView.filterSidepanel.showResultsButton = Search
42
42
  groupSharedFeatures.metadataView.gridList.gridView = Grid View
43
43
  # Aria label for the clear selection button
44
44
  groupSharedFeatures.metadataView.header.clearSelectionAriaLabel = Clear selection
45
- # Selection count text in the header when items are selected or item name is unavailable
46
- groupSharedFeatures.metadataView.header.itemsSelected = {boldCount} <b>items</b> are selected
45
+ # Selection count text in the header when multiple items are selected or item name is unavailable
46
+ groupSharedFeatures.metadataView.header.itemsSelected = {count, plural, one {<b># item</b> is selected} other {<b># items</b> are selected}}
47
47
  # Selection text in the header when a single item is selected, showing the item name
48
- groupSharedFeatures.metadataView.header.singleItemSelected = {boldName} is selected
48
+ groupSharedFeatures.metadataView.header.singleItemSelected = <b>{name}</b> is selected
49
49
  # Label for the default unselected option in inline editing dropdowns
50
50
  groupSharedFeatures.metadataView.inlineEditingCell.unselectedOptionLabel = --
51
51
  # Label for the action menu for an item in the metadata view list
@@ -1 +1 @@
1
- [{"id":"groupSharedFeatures.metadataView.header.clearSelectionAriaLabel","description":"Aria label for the clear selection button","defaultMessage":"Clear selection"},{"id":"groupSharedFeatures.metadataView.header.itemsSelected","description":"Selection count text in the header when items are selected or item name is unavailable","defaultMessage":"{boldCount} <b>items</b> are selected"},{"id":"groupSharedFeatures.metadataView.header.singleItemSelected","description":"Selection text in the header when a single item is selected, showing the item name","defaultMessage":"{boldName} is selected"}]
1
+ [{"id":"groupSharedFeatures.metadataView.header.clearSelectionAriaLabel","description":"Aria label for the clear selection button","defaultMessage":"Clear selection"},{"id":"groupSharedFeatures.metadataView.header.itemsSelected","description":"Selection count text in the header when multiple items are selected or item name is unavailable","defaultMessage":"{count, plural, one {<b># item</b> is selected} other {<b># items</b> are selected}}"},{"id":"groupSharedFeatures.metadataView.header.singleItemSelected","description":"Selection text in the header when a single item is selected, showing the item name","defaultMessage":"<b>{name}</b> is selected"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-view",
3
- "version": "1.53.18",
3
+ "version": "1.53.19",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@box/blueprint-web": "^13.17.0",