@box/metadata-view 1.26.0 → 1.27.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/index.js +41 -41
- package/dist/chunks/types.js +3 -3
- package/dist/esm/lib/components/filter-row/initial-field-values.js +12 -13
- package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +1 -0
- package/dist/esm/lib/components/filter-row/predefinedFilters/index.js +2 -2
- package/dist/esm/lib/components/filter-row/select-filter-chip.js +39 -40
- package/dist/esm/lib/components/filter-sidepanel/filter-side-panel.js +36 -36
- package/dist/esm/lib/components/filter-sidepanel/filter.js +7 -4
- package/dist/esm/lib/components/item-action-menu/item-action-menu.js +103 -103
- package/dist/esm/lib/components/metadata-grid/metadata-grid.js +29 -30
- package/dist/esm/lib/components/metadata-table/actionColumn.js +3 -3
- package/dist/esm/lib/components/metadata-table/hooks/useInfiniteScrollTableItems.js +13 -16
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +140 -144
- package/dist/esm/lib/components/metadata-table/table-renderer.js +35 -35
- package/dist/esm/lib/components/metadata-value/metadata-checkbox-field.js +14 -15
- package/dist/esm/lib/components/metadata-value/metadata-file-chip.js +13 -14
- package/dist/esm/lib/components/metadata-value/metadata-file-field.js +12 -13
- package/dist/esm/lib/components/metadata-value/metadata-location-field.js +31 -32
- package/dist/esm/lib/components/metadata-value/metadata-radio-field.js +10 -11
- package/dist/esm/lib/components/metadata-value/metadata-search-field.js +22 -23
- package/dist/esm/lib/components/sort-dropdown/sort-dropdown.js +35 -35
- package/dist/esm/lib/metadata-view.js +59 -59
- package/dist/i18n/en-x-pseudo.js +31 -31
- package/dist/i18n/en-x-pseudo.properties +31 -31
- package/dist/styles/action-bar.css +1 -1
- package/package.json +12 -12
package/dist/chunks/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Row as
|
|
2
|
-
import
|
|
3
|
-
import { ItemTypeIcon as
|
|
4
|
-
import
|
|
1
|
+
import { Row as k, Cell as s, Text as r, ActionCell as y } from "@box/blueprint-web";
|
|
2
|
+
import C from "lodash/get";
|
|
3
|
+
import { ItemTypeIcon as h } from "@box/item-icon";
|
|
4
|
+
import p from "clsx";
|
|
5
5
|
import { I as n } from "./types.js";
|
|
6
|
-
import { THUMBNAIL_LIST_VIEW_HEIGHTS as
|
|
7
|
-
import { jsxs as
|
|
8
|
-
import { ItemActionMenu as
|
|
9
|
-
import '../styles/index.css';const
|
|
10
|
-
tableHeaderActionsWrapper:
|
|
11
|
-
tableHeaderActions:
|
|
12
|
-
tableRow:
|
|
13
|
-
isClickable:
|
|
14
|
-
selectAllCheckbox:
|
|
15
|
-
tableNameCell:
|
|
16
|
-
tableNameCellTitle:
|
|
17
|
-
hasSubtitle:
|
|
18
|
-
tableNameCellText:
|
|
6
|
+
import { THUMBNAIL_LIST_VIEW_HEIGHTS as R } from "../esm/lib/components/constants.js";
|
|
7
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
8
|
+
import { ItemActionMenu as w } from "../esm/lib/components/item-action-menu/item-action-menu.js";
|
|
9
|
+
import '../styles/index.css';const U = "_tableHeaderActionsWrapper_1sntd_1", B = "_tableHeaderActions_1sntd_1", W = "_tableRow_1sntd_33", g = "_isClickable_1sntd_41", j = "_selectAllCheckbox_1sntd_45", M = "_tableNameCell_1sntd_50", $ = "_tableNameCellTitle_1sntd_56", v = "_hasSubtitle_1sntd_60", O = "_tableNameCellText_1sntd_65", D = "_tableNameCellIconInline_1sntd_70", G = "_iconCell_1sntd_74", t = {
|
|
10
|
+
tableHeaderActionsWrapper: U,
|
|
11
|
+
tableHeaderActions: B,
|
|
12
|
+
tableRow: W,
|
|
13
|
+
isClickable: g,
|
|
14
|
+
selectAllCheckbox: j,
|
|
15
|
+
tableNameCell: M,
|
|
16
|
+
tableNameCellTitle: $,
|
|
17
|
+
hasSubtitle: v,
|
|
18
|
+
tableNameCellText: O,
|
|
19
19
|
tableNameCellIconInline: D,
|
|
20
20
|
iconCell: G
|
|
21
21
|
}, Z = ({
|
|
@@ -24,52 +24,52 @@ import '../styles/index.css';const W = "_tableHeaderActionsWrapper_1sntd_1", g =
|
|
|
24
24
|
iconColumnVariant: a,
|
|
25
25
|
item: l,
|
|
26
26
|
itemActionMenuProps: b,
|
|
27
|
-
onTableRowClick:
|
|
27
|
+
onTableRowClick: _,
|
|
28
28
|
shouldRenderActionColumn: u,
|
|
29
29
|
zoomLevel: f = 0
|
|
30
|
-
}) => /* @__PURE__ */
|
|
31
|
-
className:
|
|
32
|
-
[t.isClickable]:
|
|
30
|
+
}) => /* @__PURE__ */ d(k, {
|
|
31
|
+
className: p(t.tableRow, {
|
|
32
|
+
[t.isClickable]: _
|
|
33
33
|
}),
|
|
34
34
|
id: l.id,
|
|
35
|
-
onAction: () =>
|
|
35
|
+
onAction: () => _?.(l),
|
|
36
36
|
children: [a === n.COLUMN ? /* @__PURE__ */ e(s, {
|
|
37
37
|
style: {
|
|
38
|
-
height:
|
|
38
|
+
height: R[f]
|
|
39
39
|
},
|
|
40
|
-
children: /* @__PURE__ */ e(
|
|
40
|
+
children: /* @__PURE__ */ e(h, {
|
|
41
41
|
className: t.iconCell,
|
|
42
42
|
item: l
|
|
43
43
|
})
|
|
44
|
-
}, `item-type-icon-${l.id}`) : null, x.map((
|
|
44
|
+
}, `item-type-icon-${l.id}`) : null, x.map((c) => {
|
|
45
45
|
const {
|
|
46
46
|
cellRenderer: m,
|
|
47
|
-
id:
|
|
47
|
+
id: o,
|
|
48
48
|
isItemMetadata: A,
|
|
49
49
|
subtitle: L,
|
|
50
50
|
textValue: S,
|
|
51
51
|
type: E
|
|
52
|
-
} =
|
|
52
|
+
} = c, i = `${S}-${l.id}`;
|
|
53
53
|
if (m)
|
|
54
54
|
return /* @__PURE__ */ e(s, {
|
|
55
|
-
children: m(l,
|
|
55
|
+
children: m(l, c)
|
|
56
56
|
}, i);
|
|
57
|
-
const H = A ?
|
|
58
|
-
if (
|
|
57
|
+
const H = A ? o.split(".")[1] : o, N = C(l, H);
|
|
58
|
+
if (o === "name" && (a === n.INLINE || a === n.INLINE_SUBTITLE))
|
|
59
59
|
return /* @__PURE__ */ e(s, {
|
|
60
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ d("div", {
|
|
61
61
|
className: t.tableNameCell,
|
|
62
|
-
children: [/* @__PURE__ */ e(
|
|
62
|
+
children: [/* @__PURE__ */ e(h, {
|
|
63
63
|
item: l
|
|
64
|
-
}), /* @__PURE__ */
|
|
65
|
-
className:
|
|
64
|
+
}), /* @__PURE__ */ d("div", {
|
|
65
|
+
className: p(t.tableNameCellTitle, {
|
|
66
66
|
[t.hasSubtitle]: a === n.INLINE_SUBTITLE
|
|
67
67
|
}),
|
|
68
|
-
children: [/* @__PURE__ */ e(
|
|
68
|
+
children: [/* @__PURE__ */ e(r, {
|
|
69
69
|
as: "span",
|
|
70
70
|
className: t.tableNameCellText,
|
|
71
71
|
children: N
|
|
72
|
-
}), a === n.INLINE_SUBTITLE ? /* @__PURE__ */ e(
|
|
72
|
+
}), a === n.INLINE_SUBTITLE ? /* @__PURE__ */ e(r, {
|
|
73
73
|
as: "span",
|
|
74
74
|
className: t.tableNameCellText,
|
|
75
75
|
color: "textOnLightSecondary",
|
|
@@ -79,23 +79,23 @@ import '../styles/index.css';const W = "_tableHeaderActionsWrapper_1sntd_1", g =
|
|
|
79
79
|
})
|
|
80
80
|
}, i);
|
|
81
81
|
if (E === "multiSelect") {
|
|
82
|
-
const I =
|
|
82
|
+
const I = C(l, o);
|
|
83
83
|
return /* @__PURE__ */ e(s, {
|
|
84
84
|
children: I ? I.join(" ") : ""
|
|
85
85
|
}, i);
|
|
86
86
|
}
|
|
87
87
|
return /* @__PURE__ */ e(s, {
|
|
88
|
-
children: /* @__PURE__ */ e(
|
|
88
|
+
children: /* @__PURE__ */ e(r, {
|
|
89
89
|
as: "span",
|
|
90
90
|
children: N
|
|
91
91
|
})
|
|
92
92
|
}, i);
|
|
93
|
-
}), u && /* @__PURE__ */ e(
|
|
93
|
+
}), u && /* @__PURE__ */ e(y, {
|
|
94
94
|
isCheckboxDisabled: T,
|
|
95
|
-
children: (
|
|
95
|
+
children: (c) => b ? /* @__PURE__ */ e(w, {
|
|
96
96
|
...b,
|
|
97
97
|
item: l,
|
|
98
|
-
onOpenChange:
|
|
98
|
+
onOpenChange: c
|
|
99
99
|
}) : null
|
|
100
100
|
})]
|
|
101
101
|
}, l.id);
|
package/dist/chunks/types.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
let e = /* @__PURE__ */ function(t) {
|
|
1
|
+
let e = /* @__PURE__ */ (function(t) {
|
|
2
2
|
return t.INLINE = "inline", t.COLUMN = "column", t.INLINE_SUBTITLE = "inline-subtitle", t;
|
|
3
|
-
}({}), i = /* @__PURE__ */ function(t) {
|
|
3
|
+
})({}), i = /* @__PURE__ */ (function(t) {
|
|
4
4
|
return t.GRID = "grid", t.LIST = "list", t;
|
|
5
|
-
}({});
|
|
5
|
+
})({});
|
|
6
6
|
export {
|
|
7
7
|
e as I,
|
|
8
8
|
i as V
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = (e) => ({
|
|
2
2
|
key: e,
|
|
3
3
|
id: e
|
|
4
4
|
}), d = ({
|
|
5
5
|
fieldType: e,
|
|
6
|
-
options:
|
|
7
|
-
}) => ["enum", "multiSelect"].includes(e) ? (
|
|
6
|
+
options: u
|
|
7
|
+
}) => ["enum", "multiSelect"].includes(e) ? (u || []).map(i) : [], s = (e) => e === "date" ? {
|
|
8
8
|
customType: "anyTime",
|
|
9
9
|
range: {
|
|
10
10
|
gt: "",
|
|
@@ -17,20 +17,19 @@ const l = (e) => ({
|
|
|
17
17
|
}
|
|
18
18
|
} : {
|
|
19
19
|
enum: []
|
|
20
|
-
},
|
|
20
|
+
}, o = (e, u) => ({
|
|
21
21
|
metadata: {
|
|
22
|
-
fields: e.reduce((a,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
options: d(n)
|
|
22
|
+
fields: e.reduce((a, t) => {
|
|
23
|
+
const n = u?.[t.id]?.value, l = s(t.fieldType);
|
|
24
|
+
return a[t.id] = {
|
|
25
|
+
value: n ?? l,
|
|
26
|
+
fieldType: t.fieldType,
|
|
27
|
+
options: d(t)
|
|
29
28
|
}, a;
|
|
30
29
|
}, {})
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
s as getDefaultFieldValue,
|
|
34
|
+
o as getInitialFieldValues
|
|
36
35
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
let o = /* @__PURE__ */ function(r) {
|
|
1
|
+
let o = /* @__PURE__ */ (function(r) {
|
|
2
2
|
return r.KeywordSearchFilterGroup = "KeywordSearchFilterGroup", r.FileTypeFilterGroup = "FileTypeFilterGroup", r.LocationFilterGroup = "LocationFilterGroup", r;
|
|
3
|
-
}({});
|
|
3
|
+
})({});
|
|
4
4
|
export {
|
|
5
5
|
o as PredefinedFilterName
|
|
6
6
|
};
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
import { DropdownMenu as
|
|
2
|
-
import { useFormikContext as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import { jsxs as
|
|
7
|
-
const
|
|
8
|
-
fieldNamePrefix:
|
|
9
|
-
formRef:
|
|
10
|
-
icon:
|
|
1
|
+
import { DropdownMenu as o, FilterChip as c } from "@box/blueprint-web";
|
|
2
|
+
import { useFormikContext as z } from "formik";
|
|
3
|
+
import { useState as A } from "react";
|
|
4
|
+
import { useIntl as O } from "react-intl";
|
|
5
|
+
import S from "./messages.js";
|
|
6
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
7
|
+
const R = ({
|
|
8
|
+
fieldNamePrefix: p,
|
|
9
|
+
formRef: C,
|
|
10
|
+
icon: m,
|
|
11
11
|
id: i,
|
|
12
|
-
name:
|
|
13
|
-
options:
|
|
14
|
-
type:
|
|
12
|
+
name: h,
|
|
13
|
+
options: f,
|
|
14
|
+
type: l,
|
|
15
15
|
placeholder: n
|
|
16
16
|
}) => {
|
|
17
|
-
var f, p, g, k;
|
|
18
17
|
const {
|
|
19
|
-
formatMessage:
|
|
20
|
-
} =
|
|
21
|
-
values:
|
|
22
|
-
setFieldValue:
|
|
23
|
-
submitForm:
|
|
24
|
-
} =
|
|
25
|
-
name:
|
|
18
|
+
formatMessage: g
|
|
19
|
+
} = O(), [k, v] = A(!1), {
|
|
20
|
+
values: x,
|
|
21
|
+
setFieldValue: b,
|
|
22
|
+
submitForm: w
|
|
23
|
+
} = z(), u = x.metadata?.fields?.[i]?.value?.enum, F = Array.isArray(u) ? u : [], e = new Set(F), I = e.size > 0 ? g(S.chipNameWithCount, {
|
|
24
|
+
name: h,
|
|
26
25
|
count: e.size
|
|
27
|
-
}) :
|
|
28
|
-
|
|
26
|
+
}) : h, y = !!n && l !== "multiSelect", d = async (r, s) => {
|
|
27
|
+
l === "enum" ? e.clear() : e.delete(s), r && s !== n && e.add(s), await b(`${p}.value.enum`, Array.from(e)), w();
|
|
29
28
|
};
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
onOpenChange:
|
|
32
|
-
open:
|
|
33
|
-
children: [/* @__PURE__ */ t(
|
|
29
|
+
return /* @__PURE__ */ a(o.Root, {
|
|
30
|
+
onOpenChange: v,
|
|
31
|
+
open: k,
|
|
32
|
+
children: [/* @__PURE__ */ t(o.Trigger, {
|
|
34
33
|
asChild: !0,
|
|
35
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ a(c.TriggerChip, {
|
|
36
35
|
selected: e.size > 0,
|
|
37
36
|
value: i,
|
|
38
|
-
children: [
|
|
39
|
-
icon:
|
|
40
|
-
}), /* @__PURE__ */ t(
|
|
41
|
-
children:
|
|
42
|
-
}), /* @__PURE__ */ t(
|
|
37
|
+
children: [m && /* @__PURE__ */ t(c.Icon, {
|
|
38
|
+
icon: m
|
|
39
|
+
}), /* @__PURE__ */ t(c.Label, {
|
|
40
|
+
children: I
|
|
41
|
+
}), /* @__PURE__ */ t(c.DropdownIndicator, {})]
|
|
43
42
|
}, i)
|
|
44
|
-
}), /* @__PURE__ */
|
|
45
|
-
container:
|
|
46
|
-
children: [
|
|
43
|
+
}), /* @__PURE__ */ a(o.Content, {
|
|
44
|
+
container: C.current,
|
|
45
|
+
children: [y && /* @__PURE__ */ t(o.CheckboxItem, {
|
|
47
46
|
checked: e.size === 0,
|
|
48
|
-
onCheckedChange: (r) =>
|
|
47
|
+
onCheckedChange: (r) => d(r, n),
|
|
49
48
|
children: n
|
|
50
|
-
}, n),
|
|
49
|
+
}, n), f?.map((r) => /* @__PURE__ */ t(o.CheckboxItem, {
|
|
51
50
|
checked: e.has(r),
|
|
52
|
-
onCheckedChange: (
|
|
51
|
+
onCheckedChange: (s) => d(s, r),
|
|
53
52
|
children: r
|
|
54
53
|
}, r))]
|
|
55
54
|
})]
|
|
56
55
|
});
|
|
57
56
|
};
|
|
58
57
|
export {
|
|
59
|
-
|
|
58
|
+
R as SelectFilterChip
|
|
60
59
|
};
|
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
import { Filter as x } from "./filter.js";
|
|
2
|
-
import { SidePanel as t, Accordion as
|
|
2
|
+
import { SidePanel as t, Accordion as d } from "@box/blueprint-web";
|
|
3
3
|
import { useIntl as j } from "react-intl";
|
|
4
4
|
import { useFormikContext as B } from "formik";
|
|
5
|
-
import
|
|
6
|
-
import { useState as
|
|
7
|
-
import
|
|
8
|
-
import { jsx as e, jsxs as
|
|
9
|
-
import '../../../../styles/filter-side-panel.css';const
|
|
10
|
-
sidePanelContent:
|
|
11
|
-
staticPosition:
|
|
12
|
-
},
|
|
13
|
-
containerRef:
|
|
5
|
+
import R from "lodash/noop";
|
|
6
|
+
import { useState as u } from "react";
|
|
7
|
+
import i from "./messages.js";
|
|
8
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import '../../../../styles/filter-side-panel.css';const k = "_sidePanelContent_1j6pr_1", A = "_staticPosition_1j6pr_1", a = {
|
|
10
|
+
sidePanelContent: k,
|
|
11
|
+
staticPosition: A
|
|
12
|
+
}, M = ({
|
|
13
|
+
containerRef: h,
|
|
14
14
|
filterGroups: r,
|
|
15
15
|
isOpen: C,
|
|
16
|
-
onIsOpenChange:
|
|
17
|
-
getInitialFormValues:
|
|
16
|
+
onIsOpenChange: s = R,
|
|
17
|
+
getInitialFormValues: f
|
|
18
18
|
}) => {
|
|
19
19
|
const {
|
|
20
20
|
formatMessage: o
|
|
21
21
|
} = j(), {
|
|
22
|
-
handleSubmit:
|
|
23
|
-
resetForm:
|
|
24
|
-
values:
|
|
25
|
-
} = B(), [S] =
|
|
26
|
-
|
|
27
|
-
values:
|
|
22
|
+
handleSubmit: P,
|
|
23
|
+
resetForm: c,
|
|
24
|
+
values: F
|
|
25
|
+
} = B(), [S] = u(F), [v, y] = u(null), _ = () => {
|
|
26
|
+
c({
|
|
27
|
+
values: f()
|
|
28
28
|
});
|
|
29
29
|
}, b = (n) => {
|
|
30
|
-
|
|
30
|
+
c({
|
|
31
31
|
values: S
|
|
32
|
-
}),
|
|
32
|
+
}), s(n);
|
|
33
33
|
}, g = () => {
|
|
34
|
-
|
|
34
|
+
P(), s(!1);
|
|
35
35
|
};
|
|
36
36
|
return /* @__PURE__ */ e(t, {
|
|
37
37
|
onOpenChange: b,
|
|
38
38
|
open: C,
|
|
39
39
|
variant: "overlay",
|
|
40
40
|
children: /* @__PURE__ */ e(t.Overlay, {
|
|
41
|
-
container:
|
|
42
|
-
children: /* @__PURE__ */
|
|
41
|
+
container: h?.current,
|
|
42
|
+
children: /* @__PURE__ */ p(t.Content, {
|
|
43
43
|
className: a.sidePanelContent,
|
|
44
44
|
children: [/* @__PURE__ */ e(t.Header, {
|
|
45
45
|
className: a.staticPosition,
|
|
46
|
-
children: o(
|
|
46
|
+
children: o(i.filtersHeader)
|
|
47
47
|
}), /* @__PURE__ */ e(t.ScrollableContainer, {
|
|
48
48
|
ref: y,
|
|
49
|
-
children: /* @__PURE__ */ e(
|
|
50
|
-
defaultValue: r.map((n,
|
|
49
|
+
children: /* @__PURE__ */ e(d, {
|
|
50
|
+
defaultValue: r.map((n, l) => `item-${l}`),
|
|
51
51
|
type: "multiple",
|
|
52
|
-
children: r.map((n,
|
|
52
|
+
children: r.map((n, l) => /* @__PURE__ */ e(d.Item, {
|
|
53
53
|
...n.toggleable ? {} : {
|
|
54
54
|
fixed: "true"
|
|
55
55
|
},
|
|
56
56
|
title: n.title,
|
|
57
|
-
value: `item-${
|
|
58
|
-
children: n.filters.map((
|
|
59
|
-
...
|
|
57
|
+
value: `item-${l}`,
|
|
58
|
+
children: n.filters.map((m) => /* @__PURE__ */ e(x, {
|
|
59
|
+
...m,
|
|
60
60
|
parentRef: v
|
|
61
|
-
},
|
|
61
|
+
}, m.id))
|
|
62
62
|
}, `accordion-item-${n.title || "unnamed"}`))
|
|
63
63
|
})
|
|
64
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ p(t.Footer, {
|
|
65
65
|
className: a.staticPosition,
|
|
66
66
|
children: [/* @__PURE__ */ e(t.Footer.SecondaryButton, {
|
|
67
67
|
onClick: _,
|
|
68
|
-
children: o(
|
|
68
|
+
children: o(i.clearAllButton)
|
|
69
69
|
}), /* @__PURE__ */ e(t.Footer.PrimaryButton, {
|
|
70
70
|
onClick: g,
|
|
71
|
-
children: o(
|
|
71
|
+
children: o(i.showResultsButton)
|
|
72
72
|
})]
|
|
73
73
|
}), /* @__PURE__ */ e(t.Close, {
|
|
74
|
-
"aria-label": o(
|
|
74
|
+
"aria-label": o(i.closeAriaLabel)
|
|
75
75
|
})]
|
|
76
76
|
})
|
|
77
77
|
})
|
|
78
78
|
});
|
|
79
79
|
};
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
M as FilterSidePanel
|
|
82
82
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MetadataEnumField as f, MetadataMultiSelectField as m, MetadataDateField as s, MetadataFloatField as F, MetadataStringField as M } from "@box/metadata-filter";
|
|
2
2
|
import { useIntl as o } from "react-intl";
|
|
3
3
|
import { MetadataFileField as x } from "../metadata-value/metadata-file-field.js";
|
|
4
4
|
import { MetadataLocationField as b } from "../metadata-value/metadata-location-field.js";
|
|
@@ -19,9 +19,10 @@ const i = (e) => `metadata.fields.${e}`, g = ({
|
|
|
19
19
|
name: t,
|
|
20
20
|
placeholder: l
|
|
21
21
|
});
|
|
22
|
+
// default case should act same as no variant defined
|
|
22
23
|
case "default":
|
|
23
24
|
default:
|
|
24
|
-
return /* @__PURE__ */ a(
|
|
25
|
+
return /* @__PURE__ */ a(M, {
|
|
25
26
|
fieldNamePrefix: i(e),
|
|
26
27
|
label: t || "",
|
|
27
28
|
placeholder: l
|
|
@@ -43,6 +44,7 @@ const i = (e) => `metadata.fields.${e}`, g = ({
|
|
|
43
44
|
id: e,
|
|
44
45
|
name: t
|
|
45
46
|
});
|
|
47
|
+
// default case should act same as no variant defined
|
|
46
48
|
case "default":
|
|
47
49
|
default:
|
|
48
50
|
return /* @__PURE__ */ a(m, {
|
|
@@ -70,6 +72,7 @@ const i = (e) => `metadata.fields.${e}`, g = ({
|
|
|
70
72
|
renderer: c,
|
|
71
73
|
triggerSetValueCallback: n
|
|
72
74
|
});
|
|
75
|
+
// default case should act same as no variant defined
|
|
73
76
|
case "radio":
|
|
74
77
|
return /* @__PURE__ */ a(S, {
|
|
75
78
|
id: e,
|
|
@@ -78,7 +81,7 @@ const i = (e) => `metadata.fields.${e}`, g = ({
|
|
|
78
81
|
});
|
|
79
82
|
case "default":
|
|
80
83
|
default:
|
|
81
|
-
return /* @__PURE__ */ a(
|
|
84
|
+
return /* @__PURE__ */ a(f, {
|
|
82
85
|
fieldNamePrefix: i(e),
|
|
83
86
|
label: t || "",
|
|
84
87
|
locale: u,
|
|
@@ -102,7 +105,7 @@ const i = (e) => `metadata.fields.${e}`, g = ({
|
|
|
102
105
|
const {
|
|
103
106
|
locale: n
|
|
104
107
|
} = o();
|
|
105
|
-
return /* @__PURE__ */ a(
|
|
108
|
+
return /* @__PURE__ */ a(s, {
|
|
106
109
|
canUseRelativeDates: t,
|
|
107
110
|
customDateFilterOptions: l,
|
|
108
111
|
customFieldLabels: e,
|