@box/metadata-view 0.11.0 → 0.13.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/dist/chunks/table-body-with-data.js +80 -0
- package/dist/esm/lib/components/filter-row/filter-row.js +49 -33
- package/dist/esm/lib/components/filter-row/index.js +4 -0
- package/dist/esm/lib/components/filter-row/messages.js +4 -0
- package/dist/esm/lib/components/metadata-table/metadata-table.js +52 -46
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +8 -40
- package/dist/esm/lib/metadata-view.js +6 -6
- package/dist/i18n/bn-IN.js +1 -0
- package/dist/i18n/da-DK.js +1 -0
- package/dist/i18n/de-DE.js +1 -0
- package/dist/i18n/en-AU.js +1 -0
- package/dist/i18n/en-CA.js +1 -0
- package/dist/i18n/en-GB.js +1 -0
- package/dist/i18n/en-US.js +1 -0
- package/dist/i18n/en-US.properties +2 -0
- package/dist/i18n/en-x-pseudo.js +1 -0
- package/dist/i18n/es-419.js +1 -0
- package/dist/i18n/es-ES.js +1 -0
- package/dist/i18n/fi-FI.js +1 -0
- package/dist/i18n/fr-CA.js +1 -0
- package/dist/i18n/fr-FR.js +1 -0
- package/dist/i18n/hi-IN.js +1 -0
- package/dist/i18n/it-IT.js +1 -0
- package/dist/i18n/ja-JP.js +1 -0
- package/dist/i18n/json/src/lib/components/filter-row/messages.json +1 -1
- package/dist/i18n/ko-KR.js +1 -0
- package/dist/i18n/nb-NO.js +1 -0
- package/dist/i18n/nl-NL.js +1 -0
- package/dist/i18n/pl-PL.js +1 -0
- package/dist/i18n/pt-BR.js +1 -0
- package/dist/i18n/ru-RU.js +1 -0
- package/dist/i18n/sv-SE.js +1 -0
- package/dist/i18n/tr-TR.js +1 -0
- package/dist/i18n/zh-CN.js +1 -0
- package/dist/i18n/zh-TW.js +1 -0
- package/dist/styles/table-body-with-data.css +1 -0
- package/dist/types/lib/components/filter-row/filter-row.d.ts +8 -2
- package/dist/types/lib/components/filter-row/index.d.ts +1 -0
- package/dist/types/lib/components/filter-row/messages.d.ts +5 -0
- package/dist/types/lib/components/filter-row/types.d.ts +0 -5
- package/dist/types/lib/components/metadata-table/metadata-table.d.ts +3 -2
- package/dist/types/lib/components/metadata-table/table-body/table-body-with-data.d.ts +1 -1
- package/dist/types/lib/metadata-view.d.ts +1 -1
- package/dist/types/lib/types.d.ts +8 -2
- package/package.json +3 -3
- package/dist/styles/metadata-table.css +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { TableBody as L, Row as x, Cell as c, Text as i, ActionCell as A } from "@box/blueprint-web";
|
|
2
|
+
import h from "lodash/get";
|
|
3
|
+
import { ItemTypeIcon as p } from "@box/item-icon";
|
|
4
|
+
import E from "clsx";
|
|
5
|
+
import { jsx as l, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { ItemActionMenu as f } from "../esm/lib/components/item-action-menu/item-action-menu.js";
|
|
7
|
+
import '../styles/table-body-with-data.css';let a = /* @__PURE__ */ function(t) {
|
|
8
|
+
return t.INLINE = "inline", t.COLUMN = "column", t.INLINE_SUBTITLE = "inline-subtitle", t;
|
|
9
|
+
}({});
|
|
10
|
+
const C = "_tableHeaderActionsWrapper_r2hj7_1", S = "_tableHeaderActions_r2hj7_1", y = "_selectAllCheckbox_r2hj7_33", j = "_tableNameCell_r2hj7_38", B = "_tableNameCellSubTitle_r2hj7_44", I = {
|
|
11
|
+
tableHeaderActionsWrapper: C,
|
|
12
|
+
tableHeaderActions: S,
|
|
13
|
+
selectAllCheckbox: y,
|
|
14
|
+
tableNameCell: j,
|
|
15
|
+
tableNameCellSubTitle: B
|
|
16
|
+
}, g = ({
|
|
17
|
+
columns: t,
|
|
18
|
+
iconColumnVariant: r,
|
|
19
|
+
isSelectAllEnabled: _,
|
|
20
|
+
items: T,
|
|
21
|
+
itemActionMenuProps: b
|
|
22
|
+
}) => /* @__PURE__ */ l(L, {
|
|
23
|
+
items: T.map((e) => ({
|
|
24
|
+
key: e.id,
|
|
25
|
+
...e
|
|
26
|
+
})),
|
|
27
|
+
children: (e) => /* @__PURE__ */ o(x, {
|
|
28
|
+
id: e.id,
|
|
29
|
+
children: [r === a.COLUMN ? /* @__PURE__ */ l(c, {
|
|
30
|
+
children: /* @__PURE__ */ l(p, {
|
|
31
|
+
item: e
|
|
32
|
+
})
|
|
33
|
+
}, `item-type-icon-${e.id}`) : null, t.map((s) => {
|
|
34
|
+
const {
|
|
35
|
+
cellRenderer: N,
|
|
36
|
+
id: n,
|
|
37
|
+
subTitle: m,
|
|
38
|
+
textValue: u
|
|
39
|
+
} = s, d = `${u}-${e.id}`;
|
|
40
|
+
return n === "name" && (r === a.INLINE || r === a.INLINE_SUBTITLE) ? /* @__PURE__ */ l(c, {
|
|
41
|
+
children: /* @__PURE__ */ o("div", {
|
|
42
|
+
className: I.tableNameCell,
|
|
43
|
+
children: [/* @__PURE__ */ l(p, {
|
|
44
|
+
item: e
|
|
45
|
+
}), /* @__PURE__ */ o("div", {
|
|
46
|
+
className: E({
|
|
47
|
+
[I.tableNameCellSubTitle]: r === a.INLINE_SUBTITLE
|
|
48
|
+
}),
|
|
49
|
+
children: [/* @__PURE__ */ l(i, {
|
|
50
|
+
as: "span",
|
|
51
|
+
children: h(e, n)
|
|
52
|
+
}), r === a.INLINE_SUBTITLE ? /* @__PURE__ */ l(i, {
|
|
53
|
+
as: "span",
|
|
54
|
+
color: "textOnLightSecondary",
|
|
55
|
+
children: m
|
|
56
|
+
}) : null]
|
|
57
|
+
})]
|
|
58
|
+
})
|
|
59
|
+
}, d) : N ? /* @__PURE__ */ l(c, {
|
|
60
|
+
children: N(e, s)
|
|
61
|
+
}, d) : /* @__PURE__ */ l(c, {
|
|
62
|
+
children: /* @__PURE__ */ l(i, {
|
|
63
|
+
as: "span",
|
|
64
|
+
children: h(e, n)
|
|
65
|
+
})
|
|
66
|
+
}, d);
|
|
67
|
+
}), _ && /* @__PURE__ */ l(A, {
|
|
68
|
+
children: (s) => b ? /* @__PURE__ */ l(f, {
|
|
69
|
+
...b,
|
|
70
|
+
item: e,
|
|
71
|
+
onOpenChange: s
|
|
72
|
+
}) : null
|
|
73
|
+
})]
|
|
74
|
+
}, e.id)
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
a as I,
|
|
78
|
+
g as T,
|
|
79
|
+
I as s
|
|
80
|
+
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { FilterChip as
|
|
2
|
-
import { MetadataBadge as
|
|
3
|
-
import { Formik as
|
|
4
|
-
import { useState as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { FilterChip as l } from "@box/blueprint-web";
|
|
2
|
+
import { Filter as g, MetadataBadge as p } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
+
import { Formik as S, Form as b } from "formik";
|
|
4
|
+
import { useState as v, useRef as w } from "react";
|
|
5
|
+
import { useIntl as C } from "react-intl";
|
|
6
|
+
import { StringFilterChip as I } from "./string-filter-chip.js";
|
|
7
|
+
import j from "./messages.js";
|
|
8
|
+
import { jsx as i, jsxs as c } from "react/jsx-runtime";
|
|
9
|
+
const k = (e, s, n) => {
|
|
8
10
|
switch (e.fieldType) {
|
|
9
11
|
case "float":
|
|
10
12
|
case "string":
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
formRef:
|
|
13
|
+
return /* @__PURE__ */ i(I, {
|
|
14
|
+
formRef: n,
|
|
13
15
|
id: e.id,
|
|
14
16
|
name: e.name,
|
|
15
17
|
selected: s
|
|
@@ -17,36 +19,39 @@ const v = (e, s, c) => {
|
|
|
17
19
|
case "date":
|
|
18
20
|
case "enum":
|
|
19
21
|
case "multiSelect":
|
|
20
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ c(l.Chip, {
|
|
21
23
|
value: e.id,
|
|
22
|
-
children: [/* @__PURE__ */ l
|
|
23
|
-
icon:
|
|
24
|
-
}), /* @__PURE__ */ l
|
|
24
|
+
children: [/* @__PURE__ */ i(l.Icon, {
|
|
25
|
+
icon: p
|
|
26
|
+
}), /* @__PURE__ */ i(l.Label, {
|
|
25
27
|
children: e.name
|
|
26
28
|
})]
|
|
27
29
|
}, e.id);
|
|
28
30
|
default:
|
|
29
31
|
return null;
|
|
30
32
|
}
|
|
31
|
-
},
|
|
33
|
+
}, _ = ({
|
|
32
34
|
filterOptions: e,
|
|
33
|
-
|
|
35
|
+
onAllFiltersClick: s,
|
|
36
|
+
onFilterSubmit: n
|
|
34
37
|
}) => {
|
|
35
|
-
const
|
|
38
|
+
const {
|
|
39
|
+
formatMessage: d
|
|
40
|
+
} = C(), [u, o] = v([]), h = ([t, r]) => {
|
|
36
41
|
var a;
|
|
37
|
-
return ((a =
|
|
38
|
-
},
|
|
42
|
+
return ((a = r.value) == null ? void 0 : a.enum) && r.value.enum.length > 0;
|
|
43
|
+
}, F = ({
|
|
39
44
|
metadata: {
|
|
40
45
|
fields: t
|
|
41
46
|
}
|
|
42
47
|
}) => {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
},
|
|
48
|
+
const r = Object.entries(t).filter(h).map(([a]) => a);
|
|
49
|
+
o(r), n(t);
|
|
50
|
+
}, f = {
|
|
46
51
|
metadata: {
|
|
47
|
-
fields: e.reduce((t,
|
|
52
|
+
fields: e.reduce((t, r) => {
|
|
48
53
|
let a;
|
|
49
|
-
switch (
|
|
54
|
+
switch (r.fieldType) {
|
|
50
55
|
case "string":
|
|
51
56
|
case "float":
|
|
52
57
|
a = [""];
|
|
@@ -54,25 +59,36 @@ const v = (e, s, c) => {
|
|
|
54
59
|
default:
|
|
55
60
|
a = null;
|
|
56
61
|
}
|
|
57
|
-
return t[
|
|
62
|
+
return t[r.id] = {
|
|
58
63
|
value: a
|
|
59
64
|
}, t;
|
|
60
65
|
}, {})
|
|
61
66
|
}
|
|
62
|
-
},
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
initialValues:
|
|
65
|
-
onSubmit:
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
ref:
|
|
68
|
-
children: /* @__PURE__ */ l
|
|
67
|
+
}, m = w(null);
|
|
68
|
+
return /* @__PURE__ */ i(S, {
|
|
69
|
+
initialValues: f,
|
|
70
|
+
onSubmit: F,
|
|
71
|
+
children: /* @__PURE__ */ i(b, {
|
|
72
|
+
ref: m,
|
|
73
|
+
children: /* @__PURE__ */ c(l.Group, {
|
|
69
74
|
name: "metadata-view-filters",
|
|
70
75
|
type: "multiple",
|
|
71
|
-
children:
|
|
76
|
+
children: [/* @__PURE__ */ c(l.ChipButton, {
|
|
77
|
+
onClick: s,
|
|
78
|
+
value: "all-filters-chip-btn",
|
|
79
|
+
children: [/* @__PURE__ */ i(l.Icon, {
|
|
80
|
+
icon: g
|
|
81
|
+
}), /* @__PURE__ */ i(l.Label, {
|
|
82
|
+
children: d(j.allFilters)
|
|
83
|
+
}), e.length > 0 && /* @__PURE__ */ i(l.Status, {
|
|
84
|
+
children: e.length.toString()
|
|
85
|
+
})]
|
|
86
|
+
}), e.map((t) => k(t, u.includes(t.id), m))]
|
|
72
87
|
})
|
|
73
88
|
})
|
|
74
89
|
});
|
|
75
90
|
};
|
|
76
91
|
export {
|
|
77
|
-
|
|
92
|
+
_ as FilterRow,
|
|
93
|
+
_ as default
|
|
78
94
|
};
|
|
@@ -11,6 +11,10 @@ const a = e({
|
|
|
11
11
|
textInputPlaceholder: {
|
|
12
12
|
id: "groupSharedFeatures.metadataView.filterRow.textInputPlaceholder",
|
|
13
13
|
defaultMessage: "Set Value"
|
|
14
|
+
},
|
|
15
|
+
allFilters: {
|
|
16
|
+
id: "groupSharedFeatures.metadataView.filterRow.AllFilters",
|
|
17
|
+
defaultMessage: "All Filters"
|
|
14
18
|
}
|
|
15
19
|
});
|
|
16
20
|
export {
|
|
@@ -1,75 +1,81 @@
|
|
|
1
|
-
import { Text as
|
|
2
|
-
import { useIntl as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { Text as x, ListCheckbox as T, Table as g, TableHeader as w, Column as W } from "@box/blueprint-web";
|
|
2
|
+
import { useIntl as y } from "react-intl";
|
|
3
|
+
import C from "./table-body/ghost-table-body.js";
|
|
4
|
+
import { I as M, s as l, T as N } from "../../../../chunks/table-body-with-data.js";
|
|
5
5
|
import h from "./messages.js";
|
|
6
|
-
import { jsx as e, jsxs as
|
|
7
|
-
|
|
8
|
-
tableHeaderActionsWrapper: k,
|
|
9
|
-
tableHeaderActions: W,
|
|
10
|
-
selectAllCheckbox: w
|
|
11
|
-
}, D = ({
|
|
6
|
+
import { jsx as e, jsxs as R } from "react/jsx-runtime";
|
|
7
|
+
const v = ({
|
|
12
8
|
columns: r,
|
|
13
|
-
isLoading:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
isLoading: i,
|
|
10
|
+
iconColumnVariant: o,
|
|
11
|
+
isSelectAllEnabled: d,
|
|
12
|
+
items: p,
|
|
13
|
+
itemActionMenuProps: f,
|
|
14
|
+
...u
|
|
18
15
|
}) => {
|
|
19
16
|
const {
|
|
20
|
-
formatMessage:
|
|
21
|
-
} =
|
|
17
|
+
formatMessage: n
|
|
18
|
+
} = y(), a = [];
|
|
19
|
+
o === M.COLUMN && a.push({
|
|
20
|
+
id: "item-type-icon",
|
|
21
|
+
isRowHeader: !1,
|
|
22
|
+
hideHeader: !1,
|
|
23
|
+
maxWidth: 60,
|
|
24
|
+
minWidth: 60
|
|
25
|
+
});
|
|
26
|
+
const b = r.map((s) => {
|
|
22
27
|
const {
|
|
23
|
-
id:
|
|
24
|
-
headerRenderer:
|
|
28
|
+
id: m,
|
|
29
|
+
headerRenderer: c,
|
|
25
30
|
textValue: t,
|
|
26
|
-
...
|
|
27
|
-
} =
|
|
31
|
+
...H
|
|
32
|
+
} = s;
|
|
28
33
|
return {
|
|
29
|
-
children:
|
|
34
|
+
children: c ? c(t, s) : /* @__PURE__ */ e(x, {
|
|
30
35
|
as: "span",
|
|
31
36
|
children: t
|
|
32
37
|
}),
|
|
33
|
-
isRowHeader:
|
|
34
|
-
id:
|
|
38
|
+
isRowHeader: m === "name",
|
|
39
|
+
id: m,
|
|
35
40
|
textValue: t,
|
|
36
|
-
...
|
|
41
|
+
...H
|
|
37
42
|
};
|
|
38
43
|
});
|
|
39
|
-
return
|
|
44
|
+
return a.push(...b), d && a.push({
|
|
40
45
|
id: "actions",
|
|
41
|
-
className:
|
|
46
|
+
className: l.tableHeaderActions,
|
|
42
47
|
children: /* @__PURE__ */ e("div", {
|
|
43
|
-
className:
|
|
44
|
-
children: /* @__PURE__ */ e(
|
|
45
|
-
"aria-label":
|
|
46
|
-
className:
|
|
47
|
-
isDisabled:
|
|
48
|
+
className: l.tableHeaderActionsWrapper,
|
|
49
|
+
children: /* @__PURE__ */ e(T, {
|
|
50
|
+
"aria-label": n(h.selectAll),
|
|
51
|
+
className: l.selectAllCheckbox,
|
|
52
|
+
isDisabled: i
|
|
48
53
|
})
|
|
49
54
|
}),
|
|
50
55
|
isRowHeader: !1,
|
|
51
56
|
hideHeader: !1,
|
|
52
57
|
allowsSorting: !1
|
|
53
|
-
}), /* @__PURE__ */
|
|
54
|
-
"aria-label":
|
|
58
|
+
}), /* @__PURE__ */ R(g, {
|
|
59
|
+
"aria-label": n(h.listView),
|
|
55
60
|
selectionBehavior: "toggle",
|
|
56
61
|
selectionMode: "multiple",
|
|
57
|
-
...
|
|
58
|
-
children: [/* @__PURE__ */ e(
|
|
59
|
-
columns:
|
|
60
|
-
children: (
|
|
61
|
-
...
|
|
62
|
+
...u,
|
|
63
|
+
children: [/* @__PURE__ */ e(w, {
|
|
64
|
+
columns: a,
|
|
65
|
+
children: (s) => /* @__PURE__ */ e(W, {
|
|
66
|
+
...s
|
|
62
67
|
})
|
|
63
|
-
}),
|
|
64
|
-
columnLength:
|
|
65
|
-
}) : /* @__PURE__ */ e(
|
|
68
|
+
}), i ? /* @__PURE__ */ e(C, {
|
|
69
|
+
columnLength: a.length
|
|
70
|
+
}) : /* @__PURE__ */ e(N, {
|
|
66
71
|
columns: r,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
iconColumnVariant: o,
|
|
73
|
+
isSelectAllEnabled: d,
|
|
74
|
+
itemActionMenuProps: f,
|
|
75
|
+
items: p
|
|
70
76
|
})]
|
|
71
77
|
});
|
|
72
78
|
};
|
|
73
79
|
export {
|
|
74
|
-
|
|
80
|
+
v as default
|
|
75
81
|
};
|
|
@@ -1,42 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
items: c,
|
|
9
|
-
itemActionMenuProps: n
|
|
10
|
-
}) => /* @__PURE__ */ e(h, {
|
|
11
|
-
items: c.map((r) => ({
|
|
12
|
-
key: r.id,
|
|
13
|
-
...r
|
|
14
|
-
})),
|
|
15
|
-
children: (r) => /* @__PURE__ */ T(m, {
|
|
16
|
-
id: r.id,
|
|
17
|
-
children: [i.map((l) => {
|
|
18
|
-
const {
|
|
19
|
-
cellRenderer: d,
|
|
20
|
-
id: s,
|
|
21
|
-
textValue: u
|
|
22
|
-
} = l, o = `${u}-${r.id}`;
|
|
23
|
-
return d ? /* @__PURE__ */ e(t, {
|
|
24
|
-
children: d(r, l)
|
|
25
|
-
}, o) : /* @__PURE__ */ e(t, {
|
|
26
|
-
children: /* @__PURE__ */ e(p, {
|
|
27
|
-
as: "span",
|
|
28
|
-
children: x(r, s)
|
|
29
|
-
})
|
|
30
|
-
}, o);
|
|
31
|
-
}), a && /* @__PURE__ */ e(f, {
|
|
32
|
-
children: (l) => n ? /* @__PURE__ */ e(y, {
|
|
33
|
-
...n,
|
|
34
|
-
item: r,
|
|
35
|
-
onOpenChange: l
|
|
36
|
-
}) : null
|
|
37
|
-
})]
|
|
38
|
-
}, r.id)
|
|
39
|
-
});
|
|
1
|
+
import "@box/blueprint-web";
|
|
2
|
+
import "lodash/get";
|
|
3
|
+
import "@box/item-icon";
|
|
4
|
+
import "clsx";
|
|
5
|
+
import { T as f } from "../../../../../chunks/table-body-with-data.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "../../item-action-menu/item-action-menu.js";
|
|
40
8
|
export {
|
|
41
|
-
|
|
9
|
+
f as default
|
|
42
10
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import r from "./components/
|
|
2
|
-
import e from "
|
|
3
|
-
import {
|
|
1
|
+
import r from "./components/pagination/pagination.js";
|
|
2
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { FilterRow as i } from "./components/filter-row/filter-row.js";
|
|
4
4
|
import m from "./components/metadata-table/metadata-table.js";
|
|
5
5
|
import '../../styles/metadata-view.css';const n = {};
|
|
6
6
|
function d({
|
|
7
7
|
filterRowProps: a,
|
|
8
8
|
metadataTableProps: o
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ e("div", {
|
|
11
11
|
className: n.container,
|
|
12
|
-
children: [/* @__PURE__ */ t(
|
|
12
|
+
children: [/* @__PURE__ */ t(i, {
|
|
13
13
|
...a
|
|
14
14
|
}), /* @__PURE__ */ t(m, {
|
|
15
15
|
...o
|
|
16
|
-
}), /* @__PURE__ */ t(
|
|
16
|
+
}), /* @__PURE__ */ t(r, {})]
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
export {
|
package/dist/i18n/bn-IN.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/da-DK.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/de-DE.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/en-AU.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/en-CA.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/en-GB.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/en-US.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# Button label to open the sidepanel with all filters
|
|
2
|
+
groupSharedFeatures.metadataView.filterRow.AllFilters = All Filters
|
|
1
3
|
# Button label to apply the current input as a filter to the metadata table
|
|
2
4
|
groupSharedFeatures.metadataView.filterRow.applyButton = Apply
|
|
3
5
|
# Button label to clear the current input in a textarea
|
package/dist/i18n/en-x-pseudo.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/es-419.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/es-ES.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/fi-FI.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/fr-CA.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/fr-FR.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/hi-IN.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/it-IT.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/ja-JP.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"groupSharedFeatures.metadataView.filterRow.applyButton","description":"Button label to apply the current input as a filter to the metadata table","defaultMessage":"Apply"},{"id":"groupSharedFeatures.metadataView.filterRow.clearButton","description":"Button label to clear the current input in a textarea","defaultMessage":"Clear"},{"id":"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder","description":"Placeholder text for the input field in the filter row","defaultMessage":"Set Value"}]
|
|
1
|
+
[{"id":"groupSharedFeatures.metadataView.filterRow.applyButton","description":"Button label to apply the current input as a filter to the metadata table","defaultMessage":"Apply"},{"id":"groupSharedFeatures.metadataView.filterRow.clearButton","description":"Button label to clear the current input in a textarea","defaultMessage":"Clear"},{"id":"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder","description":"Placeholder text for the input field in the filter row","defaultMessage":"Set Value"},{"id":"groupSharedFeatures.metadataView.filterRow.AllFilters","description":"Button label to open the sidepanel with all filters","defaultMessage":"All Filters"}]
|
package/dist/i18n/ko-KR.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/nb-NO.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/nl-NL.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/pl-PL.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/pt-BR.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/ru-RU.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/sv-SE.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/tr-TR.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/zh-CN.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
package/dist/i18n/zh-TW.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"groupSharedFeatures.metadataView.filterRow.AllFilters": "All Filters",
|
|
2
3
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Apply",
|
|
3
4
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Clear",
|
|
4
5
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Set Value",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tableHeaderActionsWrapper_r2hj7_1{position:absolute;top:0;right:var(--size-4);bottom:0;display:flex;gap:var(--space-2);align-items:center;justify-content:center;padding:0 var(--space-2);background:var(--item-background);margin-block:var(--space-2)}._tableHeaderActionsWrapper_r2hj7_1:before{position:absolute;left:0;z-index:0;display:block;width:0;height:50%;box-shadow:-.25rem 0 .625rem .625rem var(--item-background);content:""}._tableHeaderActions_r2hj7_1{position:sticky;right:0;width:var(--size-6);padding:0}._selectAllCheckbox_r2hj7_33 svg{transform:none!important}._tableNameCell_r2hj7_38{display:flex;gap:var(--space-3);align-items:center}._tableNameCellSubTitle_r2hj7_44{display:flex;flex-direction:column}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { MetadataTemplateField } from '@box/metadata-filter';
|
|
2
|
+
import { FilterOption } from './types';
|
|
3
|
+
export interface FilterRowProps {
|
|
4
|
+
filterOptions: FilterOption[];
|
|
5
|
+
onAllFiltersClick?: () => void;
|
|
6
|
+
onFilterSubmit: (fields: MetadataTemplateField[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const FilterRow: ({ filterOptions, onAllFiltersClick, onFilterSubmit }: FilterRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
9
|
export default FilterRow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './filter-row';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MetadataTemplateField } from '@box/metadata-filter';
|
|
2
1
|
import { MetadataFieldType } from '../../types';
|
|
3
2
|
export interface FilterOption {
|
|
4
3
|
id: string;
|
|
@@ -6,10 +5,6 @@ export interface FilterOption {
|
|
|
6
5
|
fieldType: MetadataFieldType;
|
|
7
6
|
selected: boolean;
|
|
8
7
|
}
|
|
9
|
-
export interface FilterRowProps {
|
|
10
|
-
filterOptions: FilterOption[];
|
|
11
|
-
onFilterSubmit: (fields: MetadataTemplateField[]) => void;
|
|
12
|
-
}
|
|
13
8
|
export interface FilterChipProps {
|
|
14
9
|
formRef: React.RefObject<HTMLFormElement>;
|
|
15
10
|
id: string;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { TableProps } from '@box/blueprint-web';
|
|
2
2
|
import { Item } from '@box/types';
|
|
3
3
|
import { ItemActionMenuProps } from '../item-action-menu';
|
|
4
|
-
import { Column } from '../../types';
|
|
4
|
+
import { IconColumnVariant, Column } from '../../types';
|
|
5
5
|
export interface MetadataTableProps extends TableProps {
|
|
6
6
|
columns: Column[];
|
|
7
|
+
iconColumnVariant?: IconColumnVariant;
|
|
7
8
|
isLoading?: boolean;
|
|
8
9
|
isSelectAllEnabled?: boolean;
|
|
9
10
|
items: Item[];
|
|
10
11
|
itemActionMenuProps?: Omit<ItemActionMenuProps, 'item' | 'onOpenChange'>;
|
|
11
12
|
}
|
|
12
|
-
declare const MetadataTable: ({ columns, isLoading, isSelectAllEnabled, items, itemActionMenuProps, ...tableProps }: MetadataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const MetadataTable: ({ columns, isLoading, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, ...tableProps }: MetadataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export default MetadataTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TableProps } from '@box/blueprint-web';
|
|
2
2
|
import { MetadataTableProps } from '../metadata-table';
|
|
3
|
-
declare const TableBodyWithData: ({ columns, isSelectAllEnabled, items, itemActionMenuProps, }: Omit<MetadataTableProps, keyof TableProps>) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const TableBodyWithData: ({ columns, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, }: Omit<MetadataTableProps, keyof TableProps>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default TableBodyWithData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MetadataTableProps } from './components/metadata-table';
|
|
2
|
-
import { FilterRowProps } from './components/filter-row
|
|
2
|
+
import { FilterRowProps } from './components/filter-row';
|
|
3
3
|
export interface MetadataViewProps {
|
|
4
4
|
filterRowProps: FilterRowProps;
|
|
5
5
|
metadataTableProps: MetadataTableProps;
|
|
@@ -6,6 +6,12 @@ export interface Column extends Partial<ColumnProps> {
|
|
|
6
6
|
cellRenderer?: (item: Item, column: Column) => React.ReactNode | undefined;
|
|
7
7
|
headerRenderer?: (name: string, column: Column) => React.ReactNode | undefined;
|
|
8
8
|
id: string;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
subTitle?: string;
|
|
10
|
+
textValue: string | null;
|
|
11
|
+
type: MetadataFieldType | null;
|
|
12
|
+
}
|
|
13
|
+
export declare enum IconColumnVariant {
|
|
14
|
+
INLINE = "inline",
|
|
15
|
+
COLUMN = "column",
|
|
16
|
+
INLINE_SUBTITLE = "inline-subtitle"
|
|
11
17
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@box/blueprint-web": "^11.12.0",
|
|
7
7
|
"@box/blueprint-web-assets": "^4.44.1",
|
|
8
|
-
"@box/item-icon": "^0.9.
|
|
8
|
+
"@box/item-icon": "^0.9.172",
|
|
9
9
|
"@box/metadata-filter": "^1.8.4",
|
|
10
10
|
"@box/types": "0.1.0",
|
|
11
11
|
"formik": "^2.4.5",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@box/blueprint-web": "^11.12.0",
|
|
19
19
|
"@box/blueprint-web-assets": "^4.55.0",
|
|
20
20
|
"@box/eslint-plugin-blueprint": "*",
|
|
21
|
-
"@box/item-icon": "^0.
|
|
21
|
+
"@box/item-icon": "^0.10.0",
|
|
22
22
|
"@box/metadata-filter": "^1.10.0",
|
|
23
23
|
"@box/storybook-utils": "0.13.8",
|
|
24
24
|
"@box/types": "0.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._tableHeaderActionsWrapper_hf6y3_1{position:absolute;top:0;right:var(--size-4);bottom:0;display:flex;gap:var(--space-2);align-items:center;justify-content:center;padding:0 var(--space-2);background:var(--item-background);margin-block:var(--space-2)}._tableHeaderActionsWrapper_hf6y3_1:before{position:absolute;left:0;z-index:0;display:block;width:0;height:50%;box-shadow:-.25rem 0 .625rem .625rem var(--item-background);content:""}._tableHeaderActions_hf6y3_1{position:sticky;right:0;width:var(--size-6);padding:0}._selectAllCheckbox_hf6y3_33 svg{transform:none!important}
|