@box/metadata-view 1.53.23 → 1.53.24
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.
|
@@ -3,8 +3,8 @@ import { Grid as b } from "@box/blueprint-web-assets/icons/Fill";
|
|
|
3
3
|
import { useIntl as u } from "react-intl";
|
|
4
4
|
import { V as r } from "../../../../chunks/types.js";
|
|
5
5
|
import { ZoomButton as R } from "./zoom-button.js";
|
|
6
|
-
import
|
|
7
|
-
import { jsxs as
|
|
6
|
+
import e from "./messages.js";
|
|
7
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
8
8
|
import { FilterRow as x } from "../filter-row/filter-row.js";
|
|
9
9
|
import { SortDropdown as h } from "../sort-dropdown/sort-dropdown.js";
|
|
10
10
|
import '../../../../styles/action-bar.css';const A = "_actionBar_bbxsv_1", C = "_filterRow_bbxsv_8", G = "_additionalActions_bbxsv_13", I = "_viewModeButtonContainer_bbxsv_24", t = {
|
|
@@ -15,8 +15,8 @@ import '../../../../styles/action-bar.css';const A = "_actionBar_bbxsv_1", C = "
|
|
|
15
15
|
}, F = ({
|
|
16
16
|
isIconColumnEnabled: c,
|
|
17
17
|
isViewModeButtonDisabled: m,
|
|
18
|
-
onSortDescriptorChange:
|
|
19
|
-
onViewModeClick:
|
|
18
|
+
onSortDescriptorChange: d,
|
|
19
|
+
onViewModeClick: l,
|
|
20
20
|
onZoomLevelChange: f,
|
|
21
21
|
sortableColumns: w,
|
|
22
22
|
sortDescriptor: _,
|
|
@@ -28,18 +28,18 @@ import '../../../../styles/action-bar.css';const A = "_actionBar_bbxsv_1", C = "
|
|
|
28
28
|
const {
|
|
29
29
|
formatMessage: a
|
|
30
30
|
} = u();
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ s("div", {
|
|
32
32
|
className: t.actionBar,
|
|
33
33
|
children: [/* @__PURE__ */ o("div", {
|
|
34
34
|
className: t.filterRow,
|
|
35
35
|
children: /* @__PURE__ */ o(x, {
|
|
36
36
|
...B
|
|
37
37
|
})
|
|
38
|
-
}), /* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ s("div", {
|
|
39
39
|
className: t.additionalActions,
|
|
40
40
|
children: [n && /* @__PURE__ */ o(h, {
|
|
41
41
|
...n,
|
|
42
|
-
onSortDescriptorChange:
|
|
42
|
+
onSortDescriptorChange: d,
|
|
43
43
|
sortableColumns: w,
|
|
44
44
|
sortDescriptor: _
|
|
45
45
|
}), (c || i === r.GRID) && /* @__PURE__ */ o(R, {
|
|
@@ -48,9 +48,9 @@ import '../../../../styles/action-bar.css';const A = "_actionBar_bbxsv_1", C = "
|
|
|
48
48
|
}), !m && /* @__PURE__ */ o("div", {
|
|
49
49
|
className: t.viewModeButtonContainer,
|
|
50
50
|
children: /* @__PURE__ */ o(p, {
|
|
51
|
-
"aria-label": i === r.GRID ? a(
|
|
52
|
-
|
|
53
|
-
onClick:
|
|
51
|
+
"aria-label": i === r.GRID ? a(e.switchToListView) : a(e.switchToGridView),
|
|
52
|
+
endIcon: b,
|
|
53
|
+
onClick: l,
|
|
54
54
|
variant: i === r.GRID ? "primary" : "tertiary"
|
|
55
55
|
})
|
|
56
56
|
})]
|
package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js
CHANGED
|
@@ -4,21 +4,21 @@ import S from "lodash/get";
|
|
|
4
4
|
import w from "lodash/isEqual";
|
|
5
5
|
import { useIntl as x } from "react-intl";
|
|
6
6
|
import y from "../../messages.js";
|
|
7
|
-
import { jsx as t, jsxs as
|
|
8
|
-
import '../../../../../../styles/inline-editing-cell.css';const
|
|
9
|
-
inlineEditingCell:
|
|
7
|
+
import { jsx as t, jsxs as I } from "react/jsx-runtime";
|
|
8
|
+
import '../../../../../../styles/inline-editing-cell.css';const O = "_inlineEditingCell_1iieg_1", j = {
|
|
9
|
+
inlineEditingCell: O
|
|
10
10
|
}, R = ({
|
|
11
|
-
column:
|
|
11
|
+
column: d,
|
|
12
12
|
item: s,
|
|
13
13
|
onInlineEditChange: c
|
|
14
14
|
}) => {
|
|
15
15
|
const {
|
|
16
|
-
formatMessage:
|
|
16
|
+
formatMessage: m
|
|
17
17
|
} = x(), {
|
|
18
18
|
type: a,
|
|
19
19
|
inlineEditingOptions: f,
|
|
20
20
|
id: u
|
|
21
|
-
} =
|
|
21
|
+
} = d, r = S(s, u), n = typeof r == "string" ? [r] : r || [], o = m(y.unselectedOptionLabel), g = [{
|
|
22
22
|
value: null,
|
|
23
23
|
label: o
|
|
24
24
|
}, ...(f ?? []).map((e) => ({
|
|
@@ -31,11 +31,11 @@ import '../../../../../../styles/inline-editing-cell.css';const j = "_inlineEdit
|
|
|
31
31
|
a === "multiSelect" ? e === null ? l = [] : l = n.includes(e) ? n.filter((C) => C !== e) : [...n, e] : l = e, (a === "multiSelect" ? !w(l, n) : l !== n[0]) && c(s, l, u);
|
|
32
32
|
}, p = (e) => e === null ? n.length === 0 : n.includes(e);
|
|
33
33
|
return /* @__PURE__ */ t(b, {
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ I(i.Root, {
|
|
35
35
|
children: [/* @__PURE__ */ t(i.Trigger, {
|
|
36
36
|
children: /* @__PURE__ */ t(v, {
|
|
37
|
-
className:
|
|
38
|
-
|
|
37
|
+
className: j.inlineEditingCell,
|
|
38
|
+
endIcon: E,
|
|
39
39
|
variant: "secondary",
|
|
40
40
|
children: n.length > 0 ? n.join(", ") : o
|
|
41
41
|
})
|
|
@@ -1,44 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import g from "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { useFormikContext as u } from "formik";
|
|
2
|
+
import F from "lodash/noop";
|
|
3
|
+
import { useIntl as g } from "react-intl";
|
|
4
|
+
import { FolderShared as p } from "@box/blueprint-web-assets/icons/Content";
|
|
5
|
+
import { ContentField as h } from "@box/content-field";
|
|
6
|
+
import v from "./messages.js";
|
|
7
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
8
|
+
import '../../../../styles/metadata-location-field.css';const C = "_metadataLocationFieldTrigger_1d3ch_1", L = {
|
|
9
|
+
metadataLocationFieldTrigger: C
|
|
10
|
+
}, y = ({
|
|
10
11
|
id: e,
|
|
11
|
-
triggerSetValueCallback:
|
|
12
|
-
renderer:
|
|
12
|
+
triggerSetValueCallback: r = F,
|
|
13
|
+
renderer: i = (t) => t
|
|
13
14
|
}) => {
|
|
14
15
|
const {
|
|
15
16
|
formatMessage: t
|
|
16
|
-
} =
|
|
17
|
-
values:
|
|
18
|
-
setFieldValue:
|
|
19
|
-
} =
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
folderId:
|
|
17
|
+
} = g(), {
|
|
18
|
+
values: d,
|
|
19
|
+
setFieldValue: o
|
|
20
|
+
} = u(), a = d.metadata.fields[e].value.enum?.[0], n = () => {
|
|
21
|
+
o(`metadata.fields.${e}.value.enum`, []);
|
|
22
|
+
}, m = () => {
|
|
23
|
+
r((s, c, f = !1) => {
|
|
24
|
+
o(`metadata.fields.${e}.value.enum[0]`, {
|
|
25
|
+
folderId: s,
|
|
25
26
|
folderName: c,
|
|
26
27
|
isFolderShared: f
|
|
27
28
|
});
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
|
-
return
|
|
31
|
-
className:
|
|
32
|
-
children: /* @__PURE__ */
|
|
31
|
+
return i(/* @__PURE__ */ l("div", {
|
|
32
|
+
className: L.metadataLocationFieldTrigger,
|
|
33
|
+
children: /* @__PURE__ */ l(h, {
|
|
33
34
|
"data-target-id": `ContentField-filter_${e}`,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onClick:
|
|
37
|
-
|
|
38
|
-
title:
|
|
35
|
+
icon: a?.isFolderShared ? p : void 0,
|
|
36
|
+
onClear: n,
|
|
37
|
+
onClick: m,
|
|
38
|
+
placeholder: t(v.selectFolderHint),
|
|
39
|
+
title: a?.folderName ? {
|
|
40
|
+
titleValue: a.folderName,
|
|
41
|
+
type: "constant"
|
|
42
|
+
} : void 0
|
|
39
43
|
})
|
|
40
44
|
}));
|
|
41
45
|
};
|
|
42
46
|
export {
|
|
43
|
-
|
|
47
|
+
y as MetadataLocationField
|
|
44
48
|
};
|
package/package.json
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.24",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^
|
|
7
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
8
|
-
"@box/box-item-type-selector": "^1.39.
|
|
9
|
-
"@box/item-icon": "^2.32.
|
|
10
|
-
"@box/metadata-filter": "^1.80.
|
|
11
|
-
"@box/types": "2.1.
|
|
6
|
+
"@box/blueprint-web": "^14.0.0",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.111.15",
|
|
8
|
+
"@box/box-item-type-selector": "^1.39.19",
|
|
9
|
+
"@box/item-icon": "^2.32.12",
|
|
10
|
+
"@box/metadata-filter": "^1.80.21",
|
|
11
|
+
"@box/types": "2.1.11",
|
|
12
|
+
"@box/content-field": "^1.40.19",
|
|
12
13
|
"@tanstack/react-virtual": "^3.10.8",
|
|
13
14
|
"formik": "^2.4.5",
|
|
14
15
|
"lodash": "^4.17.15",
|
|
15
16
|
"react": "^18.0.0",
|
|
16
|
-
"react-aria-components": "
|
|
17
|
+
"react-aria-components": "1.16.0",
|
|
17
18
|
"react-dom": "^18.0.0",
|
|
18
19
|
"react-intl": "^6.4.2"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@box/blueprint-web": "^
|
|
22
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
23
|
-
"@box/box-item-type-selector": "^1.39.
|
|
24
|
-
"@box/eslint-plugin-blueprint": "1.1.
|
|
25
|
-
"@box/item-icon": "^2.32.
|
|
26
|
-
"@box/metadata-filter": "^1.80.
|
|
27
|
-
"@box/storybook-utils": "0.17.
|
|
28
|
-
"@box/types": "2.1.
|
|
22
|
+
"@box/blueprint-web": "^14.0.0",
|
|
23
|
+
"@box/blueprint-web-assets": "^4.111.15",
|
|
24
|
+
"@box/box-item-type-selector": "^1.39.19",
|
|
25
|
+
"@box/eslint-plugin-blueprint": "1.1.8",
|
|
26
|
+
"@box/item-icon": "^2.32.12",
|
|
27
|
+
"@box/metadata-filter": "^1.80.21",
|
|
28
|
+
"@box/storybook-utils": "0.17.15",
|
|
29
|
+
"@box/types": "2.1.11",
|
|
30
|
+
"@box/content-field": "^1.40.19",
|
|
29
31
|
"@tanstack/react-virtual": "^3.10.8",
|
|
30
32
|
"react-intl": "^6.4.2"
|
|
31
33
|
},
|