@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 {
|
|
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
|
|
4
|
-
import { SwitchCase as L, Case as
|
|
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
|
|
7
|
-
import '../../../../styles/header.css';const M = "_viewHeader_11wvf_1",
|
|
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:
|
|
10
|
-
clearSelectionButton:
|
|
9
|
+
titleBar: C,
|
|
10
|
+
clearSelectionButton: I
|
|
11
11
|
};
|
|
12
12
|
function A({
|
|
13
13
|
title: r,
|
|
14
|
-
itemCount:
|
|
15
|
-
isItemCountVisible:
|
|
16
|
-
onClearSelection:
|
|
17
|
-
selectionCount:
|
|
18
|
-
isSelectionCountVisible:
|
|
19
|
-
selectedItemName:
|
|
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:
|
|
24
|
-
} =
|
|
25
|
-
if (!(!!r ||
|
|
23
|
+
formatMessage: d
|
|
24
|
+
} = b(), m = v && i > 0, w = S && l != null;
|
|
25
|
+
if (!(!!r || m || !!a))
|
|
26
26
|
return null;
|
|
27
|
-
const
|
|
28
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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:
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
-
condition:
|
|
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(
|
|
47
|
-
"aria-label":
|
|
48
|
+
children: /* @__PURE__ */ e(x, {
|
|
49
|
+
"aria-label": d(s.clearSelectionAriaLabel),
|
|
48
50
|
icon: y,
|
|
49
|
-
onClick:
|
|
51
|
+
onClick: f,
|
|
50
52
|
size: "small",
|
|
51
53
|
variant: "small-utility",
|
|
52
|
-
className:
|
|
54
|
+
className: o.clearSelectionButton
|
|
53
55
|
})
|
|
54
56
|
}), /* @__PURE__ */ e(t.StartElements, {
|
|
55
|
-
children: /* @__PURE__ */ e(
|
|
57
|
+
children: /* @__PURE__ */ e(u, {
|
|
56
58
|
as: "span",
|
|
57
59
|
color: "textOnLightSecondary",
|
|
58
60
|
variant: "bodyLarge",
|
|
59
|
-
children:
|
|
61
|
+
children: p
|
|
60
62
|
})
|
|
61
63
|
})]
|
|
62
|
-
}), /* @__PURE__ */ e(
|
|
64
|
+
}), /* @__PURE__ */ e(h, {
|
|
63
65
|
condition: !!r,
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
className:
|
|
66
|
-
children: [r,
|
|
67
|
-
className:
|
|
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(
|
|
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: "{
|
|
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: "{
|
|
13
|
+
defaultMessage: "<b>{name}</b> is selected"
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
export {
|
package/dist/i18n/en-US.js
CHANGED
|
@@ -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": "{
|
|
25
|
-
"groupSharedFeatures.metadataView.header.singleItemSelected": "{
|
|
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 = {
|
|
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 = {
|
|
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":"{
|
|
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"}]
|