@box/metadata-view 0.39.4 → 0.41.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.
Files changed (51) hide show
  1. package/dist/chunks/form-filter-chip.js +75 -50
  2. package/dist/esm/lib/components/filter-row/all-filters-chip.js +35 -30
  3. package/dist/esm/lib/components/filter-row/filter-row.js +34 -42
  4. package/dist/esm/lib/components/filter-row/form-filter-chip.js +2 -2
  5. package/dist/esm/lib/components/filter-row/initial-field-values.js +15 -13
  6. package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +51 -34
  7. package/dist/esm/lib/components/filter-sidepanel/filter.js +32 -29
  8. package/dist/esm/lib/components/metadata-table/messages.js +6 -2
  9. package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js +46 -33
  10. package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +83 -99
  11. package/dist/esm/lib/components/metadata-table/table-renderer.js +6 -6
  12. package/dist/i18n/bn-IN.js +1 -0
  13. package/dist/i18n/da-DK.js +1 -0
  14. package/dist/i18n/de-DE.js +1 -0
  15. package/dist/i18n/en-AU.js +1 -0
  16. package/dist/i18n/en-CA.js +1 -0
  17. package/dist/i18n/en-GB.js +1 -0
  18. package/dist/i18n/en-US.js +1 -0
  19. package/dist/i18n/en-US.properties +2 -0
  20. package/dist/i18n/en-x-pseudo.js +1 -0
  21. package/dist/i18n/es-419.js +1 -0
  22. package/dist/i18n/es-ES.js +1 -0
  23. package/dist/i18n/fi-FI.js +1 -0
  24. package/dist/i18n/fr-CA.js +1 -0
  25. package/dist/i18n/fr-FR.js +1 -0
  26. package/dist/i18n/hi-IN.js +1 -0
  27. package/dist/i18n/it-IT.js +1 -0
  28. package/dist/i18n/ja-JP.js +1 -0
  29. package/dist/i18n/json/src/lib/components/metadata-table/messages.json +1 -1
  30. package/dist/i18n/ko-KR.js +1 -0
  31. package/dist/i18n/nb-NO.js +1 -0
  32. package/dist/i18n/nl-NL.js +1 -0
  33. package/dist/i18n/pl-PL.js +1 -0
  34. package/dist/i18n/pt-BR.js +1 -0
  35. package/dist/i18n/ru-RU.js +1 -0
  36. package/dist/i18n/sv-SE.js +1 -0
  37. package/dist/i18n/tr-TR.js +1 -0
  38. package/dist/i18n/zh-CN.js +1 -0
  39. package/dist/i18n/zh-TW.js +1 -0
  40. package/dist/styles/form-filter-chip.css +1 -1
  41. package/dist/types/lib/components/filter-row/all-filters-chip.d.ts +1 -2
  42. package/dist/types/lib/components/filter-row/form-filter-chip.d.ts +1 -2
  43. package/dist/types/lib/components/filter-row/initial-field-values.d.ts +2 -0
  44. package/dist/types/lib/components/filter-row/metadata-filter-chip.d.ts +1 -2
  45. package/dist/types/lib/components/filter-row/types.d.ts +19 -0
  46. package/dist/types/lib/components/metadata-table/messages.d.ts +5 -0
  47. package/dist/types/lib/components/metadata-table/metadata-table.d.ts +2 -3
  48. package/dist/types/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.d.ts +3 -4
  49. package/dist/types/lib/components/metadata-table/table-body/table-body-with-data.d.ts +3 -5
  50. package/dist/types/lib/components/metadata-table/table-renderer.d.ts +2 -3
  51. package/package.json +2 -2
@@ -1,59 +1,84 @@
1
- import { useState as v } from "react";
2
- import { useIntl as F } from "react-intl";
3
- import { Popover as e, FilterChip as r, Button as l } from "@box/blueprint-web";
4
- import { useFormikContext as g } from "formik";
5
- import m from "../esm/lib/components/filter-row/messages.js";
6
- import { jsx as o, jsxs as t } from "react/jsx-runtime";
7
- import '../styles/form-filter-chip.css';const y = "_popoverFooter_6tqyh_1", _ = "_filterChipGroup_6tqyh_9", b = {
8
- popoverFooter: y,
9
- filterChipGroup: _
10
- }, j = ({
11
- children: c,
12
- formRef: h,
13
- icon: i,
14
- id: n,
15
- name: u,
16
- selected: d
1
+ import { Popover as n, FilterChip as i, Button as v } from "@box/blueprint-web";
2
+ import { useFormikContext as R, getIn as r } from "formik";
3
+ import { useState as f, useMemo as V } from "react";
4
+ import { useIntl as G } from "react-intl";
5
+ import g from "../esm/lib/components/filter-row/messages.js";
6
+ import { jsx as l, jsxs as p } from "react/jsx-runtime";
7
+ import '../styles/form-filter-chip.css';const M = "_popoverFooter_z1gpu_1", j = "_popoverContent_z1gpu_9", N = "_filterChipGroup_z1gpu_13", h = {
8
+ popoverFooter: M,
9
+ popoverContent: j,
10
+ filterChipGroup: N
11
+ }, H = ({
12
+ children: y,
13
+ formRef: C,
14
+ icon: u,
15
+ id: e,
16
+ name: F
17
17
  }) => {
18
18
  const {
19
- formatMessage: s
20
- } = F(), [f, p] = v(!1), a = g(), C = () => {
21
- a.handleSubmit(), p(!1);
22
- };
23
- return /* @__PURE__ */ o("div", {
24
- children: /* @__PURE__ */ t(e.Root, {
25
- onOpenChange: p,
26
- open: f,
27
- children: [/* @__PURE__ */ o(e.Trigger, {
28
- children: /* @__PURE__ */ t(r.TriggerChip, {
29
- selected: d,
30
- value: n,
31
- children: [i && /* @__PURE__ */ o(r.Icon, {
32
- icon: i
33
- }), /* @__PURE__ */ o(r.Label, {
34
- children: u
35
- }), /* @__PURE__ */ o(r.DropdownIndicator, {})]
36
- }, n)
37
- }), /* @__PURE__ */ t(e.ContentContainer, {
19
+ formatMessage: c
20
+ } = G(), [T, m] = f(!1), {
21
+ handleSubmit: $,
22
+ setFieldValue: s,
23
+ resetForm: D,
24
+ values: t
25
+ } = R(), _ = () => {
26
+ $(), m(!1);
27
+ }, [b, S] = f(t), z = (a) => {
28
+ m(a), a ? S(t) : D({
29
+ values: b
30
+ });
31
+ }, B = () => {
32
+ s(`metadata.fields.${e}.value.enum`, []), s(`metadata.fields.${e}.value.range`, {}), s(`metadata.fields.${e}.value.relativeType`, void 0), s(`metadata.fields.${e}.value.relativeDays`, void 0), s(`metadata.fields.${e}.value.customType`, "anyTime"), s(`metadata.fields.${e}.value.customDays`, void 0);
33
+ }, I = () => {
34
+ const a = r(t, `metadata.fields.${e}.value.customType`), o = a && a !== "anyTime" && a !== "customRange", d = r(t, `metadata.fields.${e}.value.relativeType`), x = d && d !== "customRange", O = r(t, `metadata.fields.${e}.value.range.gt`) || r(t, `metadata.fields.${e}.value.range.lt`);
35
+ return (o || x) && !O;
36
+ }, k = V(() => {
37
+ const a = r(t, `metadata.fields.${e}.fieldType`);
38
+ if (a === "string" || a === "float") {
39
+ const o = r(t, `metadata.fields.${e}.value.enum`);
40
+ return o && o.length > 0 && !!o[0];
41
+ }
42
+ if (a === "date") {
43
+ const o = r(t, `metadata.fields.${e}.value.range`);
44
+ return o && (o.gt || o.lt);
45
+ }
46
+ return !1;
47
+ }, [t, e]);
48
+ return /* @__PURE__ */ l("div", {
49
+ children: /* @__PURE__ */ p(n.Root, {
50
+ onOpenChange: z,
51
+ open: T,
52
+ children: [/* @__PURE__ */ l(n.Trigger, {
53
+ children: /* @__PURE__ */ p(i.TriggerChip, {
54
+ selected: k,
55
+ value: e,
56
+ children: [u && /* @__PURE__ */ l(i.Icon, {
57
+ icon: u
58
+ }), /* @__PURE__ */ l(i.Label, {
59
+ children: F
60
+ }), /* @__PURE__ */ l(i.DropdownIndicator, {})]
61
+ }, e)
62
+ }), /* @__PURE__ */ p(n.ContentContainer, {
38
63
  align: "start",
39
- container: h.current,
40
- children: [/* @__PURE__ */ o(e.MainContent, {
41
- children: c
42
- }), /* @__PURE__ */ t(e.Footer, {
43
- className: b.popoverFooter,
44
- children: [/* @__PURE__ */ o(l, {
45
- onClick: () => {
46
- a.setFieldValue(`metadata.fields.${n}.value.enum`, []);
47
- },
64
+ className: h.popoverContent,
65
+ container: C.current,
66
+ children: [/* @__PURE__ */ l(n.MainContent, {
67
+ children: y
68
+ }), /* @__PURE__ */ p(n.Footer, {
69
+ className: h.popoverFooter,
70
+ children: [/* @__PURE__ */ l(v, {
71
+ onClick: B,
48
72
  size: "small",
49
73
  variant: "secondary",
50
- children: s(m.clearButton)
51
- }), /* @__PURE__ */ o(l, {
52
- onClick: C,
74
+ children: c(g.clearButton)
75
+ }), /* @__PURE__ */ l(v, {
76
+ disabled: I(),
77
+ onClick: _,
53
78
  size: "small",
54
79
  type: "submit",
55
80
  variant: "primary",
56
- children: s(m.applyButton)
81
+ children: c(g.applyButton)
57
82
  })]
58
83
  })]
59
84
  })]
@@ -61,6 +86,6 @@ import '../styles/form-filter-chip.css';const y = "_popoverFooter_6tqyh_1", _ =
61
86
  });
62
87
  };
63
88
  export {
64
- j as F,
65
- b as s
89
+ H as F,
90
+ h as s
66
91
  };
@@ -1,43 +1,48 @@
1
- import { FilterChip as e } from "@box/blueprint-web";
2
- import { Filter as m } from "@box/blueprint-web-assets/icons/Line";
3
- import { useState as f } from "react";
4
- import { useIntl as c } from "react-intl";
5
- import d from "../filter-sidepanel/filter-sidepanel.js";
6
- import { getInitialFieldValues as h } from "./initial-field-values.js";
7
- import u from "./messages.js";
8
- import { jsxs as o, Fragment as g, jsx as t } from "react/jsx-runtime";
9
- const M = ({
10
- activeFilterCount: i,
11
- filterGroups: l
1
+ import { FilterChip as t } from "@box/blueprint-web";
2
+ import { Filter as S } from "@box/blueprint-web-assets/icons/Line";
3
+ import { useFormikContext as I } from "formik";
4
+ import { useState as O, useMemo as x } from "react";
5
+ import { useIntl as b } from "react-intl";
6
+ import j from "../filter-sidepanel/filter-sidepanel.js";
7
+ import { getInitialFieldValues as M } from "./initial-field-values.js";
8
+ import k from "./messages.js";
9
+ import { jsxs as F, Fragment as A, jsx as l } from "react/jsx-runtime";
10
+ const D = ({
11
+ filterGroups: r
12
12
  }) => {
13
13
  const {
14
- formatMessage: s
15
- } = c(), [n, r] = f(!1), a = () => r(!0);
16
- return /* @__PURE__ */ o(g, {
14
+ formatMessage: f
15
+ } = b(), {
16
+ values: i
17
+ } = I(), [a, n] = O(!1), d = () => n(!0), v = ([o, e]) => {
18
+ var m, u, p, c, g, h;
19
+ return ((m = e.value) == null ? void 0 : m.enum) && e.value.enum.length > 0 && !!e.value.enum[0] || ((u = e.value) == null ? void 0 : u.range) && (((c = (p = e.value) == null ? void 0 : p.range) == null ? void 0 : c.gt) || ((h = (g = e.value) == null ? void 0 : g.range) == null ? void 0 : h.lt));
20
+ }, s = x(() => Object.entries(i.metadata.fields).filter(v).length, [i]);
21
+ return /* @__PURE__ */ F(A, {
17
22
  children: [
18
23
  // We need to initialize the sidepanel state at the moment it is opened
19
- n && /* @__PURE__ */ t(d, {
20
- filterGroups: l,
21
- getInitialFormValues: () => h(l.flatMap(({
22
- filters: p
23
- }) => p)),
24
- isOpen: n,
25
- onIsOpenChange: r
24
+ a && /* @__PURE__ */ l(j, {
25
+ filterGroups: r,
26
+ getInitialFormValues: () => M(r.flatMap(({
27
+ filters: o
28
+ }) => o)),
29
+ isOpen: a,
30
+ onIsOpenChange: n
26
31
  }),
27
- /* @__PURE__ */ o(e.ChipButton, {
28
- onClick: a,
32
+ /* @__PURE__ */ F(t.ChipButton, {
33
+ onClick: d,
29
34
  value: "all-filters-chip-btn",
30
- children: [/* @__PURE__ */ t(e.Icon, {
31
- icon: m
32
- }), /* @__PURE__ */ t(e.Label, {
33
- children: s(u.allFilters)
34
- }), i > 0 ? /* @__PURE__ */ t(e.Status, {
35
- children: i.toString()
35
+ children: [/* @__PURE__ */ l(t.Icon, {
36
+ icon: S
37
+ }), /* @__PURE__ */ l(t.Label, {
38
+ children: f(k.allFilters)
39
+ }), s > 0 ? /* @__PURE__ */ l(t.Status, {
40
+ children: s.toString()
36
41
  }) : null]
37
42
  })
38
43
  ]
39
44
  });
40
45
  };
41
46
  export {
42
- M as default
47
+ D as default
43
48
  };
@@ -1,61 +1,53 @@
1
- import { FilterChip as I } from "@box/blueprint-web";
2
- import { Formik as S, Form as v } from "formik";
3
- import { useState as R, useEffect as g, useRef as w } from "react";
4
- import C from "./all-filters-chip.js";
5
- import { getInitialFieldValues as G } from "./initial-field-values.js";
6
- import { MetadataFilterChip as b } from "./metadata-filter-chip.js";
7
- import { usePredefinedFilter as j } from "./predefinedFilters/use-predefined-filter.js";
8
- import { s as x } from "../../../../chunks/form-filter-chip.js";
9
- import { jsx as l, jsxs as V } from "react/jsx-runtime";
10
- const p = (s) => Object.entries(s).filter(([r, t]) => {
1
+ import { FilterChip as d } from "@box/blueprint-web";
2
+ import { Formik as c, Form as h } from "formik";
3
+ import { useRef as F } from "react";
4
+ import R from "./all-filters-chip.js";
5
+ import { getInitialFieldValues as v } from "./initial-field-values.js";
6
+ import { MetadataFilterChip as G } from "./metadata-filter-chip.js";
7
+ import { usePredefinedFilter as b } from "./predefinedFilters/use-predefined-filter.js";
8
+ import { s as g } from "../../../../chunks/form-filter-chip.js";
9
+ import { jsx as l, jsxs as j } from "react/jsx-runtime";
10
+ const z = (o) => Object.entries(o).filter(([t, r]) => {
11
11
  var i;
12
- return ((i = t.value) == null ? void 0 : i.enum) && t.value.enum.length > 0 && t.value.enum[0] !== "";
13
- }).map(([r]) => r), q = ({
14
- predefinedFilterOptions: s,
15
- filterGroups: r = [],
16
- initialFilterValues: t,
12
+ return ((i = r.value) == null ? void 0 : i.enum) && r.value.enum.length > 0 && r.value.enum[0] !== "";
13
+ }).map(([t]) => t), A = ({
14
+ predefinedFilterOptions: o,
15
+ filterGroups: t = [],
16
+ initialFilterValues: r,
17
17
  isAllFiltersDisabled: i,
18
- onFilterSubmit: o
18
+ onFilterSubmit: m
19
19
  }) => {
20
- const [a, n] = R([]), f = j(s), F = ({
20
+ const p = b(o), u = ({
21
21
  metadata: {
22
22
  fields: e
23
23
  }
24
24
  }) => {
25
- const h = p(e);
26
- n(h), o && o(e);
27
- }, m = [...f, ...r], u = m.flatMap(({
25
+ m && m(e);
26
+ }, s = [...p, ...t], a = s.flatMap(({
28
27
  filters: e
29
- }) => e), d = G(u, t);
30
- g(() => {
31
- const e = p(d.metadata.fields);
32
- n(e);
33
- }, []);
34
- const c = w(null);
35
- return /* @__PURE__ */ l(S, {
28
+ }) => e), f = v(a, r), n = F(null);
29
+ return /* @__PURE__ */ l(c, {
36
30
  enableReinitialize: !0,
37
- initialValues: d,
38
- onSubmit: F,
39
- children: /* @__PURE__ */ l(v, {
40
- ref: c,
41
- children: /* @__PURE__ */ V(I.Group, {
42
- className: x.filterChipGroup,
31
+ initialValues: f,
32
+ onSubmit: u,
33
+ children: /* @__PURE__ */ l(h, {
34
+ ref: n,
35
+ children: /* @__PURE__ */ j(d.Group, {
36
+ className: g.filterChipGroup,
43
37
  name: "metadata-view-filters",
44
38
  type: "multiple",
45
- children: [i ? null : /* @__PURE__ */ l(C, {
46
- activeFilterCount: a.length,
47
- filterGroups: m
48
- }), u.filter((e) => e.shouldRenderChip).map((e) => /* @__PURE__ */ l(b, {
39
+ children: [i ? null : /* @__PURE__ */ l(R, {
40
+ filterGroups: s
41
+ }), a.filter((e) => e.shouldRenderChip).map((e) => /* @__PURE__ */ l(G, {
49
42
  filterOption: e,
50
- formRef: c,
51
- selected: a.includes(e.id)
43
+ formRef: n
52
44
  }, e.id))]
53
45
  })
54
46
  })
55
47
  });
56
48
  };
57
49
  export {
58
- q as FilterRow,
59
- q as default,
60
- p as getSelectedFilterIds
50
+ A as FilterRow,
51
+ A as default,
52
+ z as getSelectedFilterIds
61
53
  };
@@ -1,7 +1,7 @@
1
- import "react";
2
- import "react-intl";
3
1
  import "@box/blueprint-web";
4
2
  import "formik";
3
+ import "react";
4
+ import "react-intl";
5
5
  import { F as e, F as f } from "../../../../chunks/form-filter-chip.js";
6
6
  import "./messages.js";
7
7
  import "react/jsx-runtime";
@@ -1,19 +1,21 @@
1
- const r = (t) => ({
2
- key: t,
3
- id: t
4
- }), c = ({
5
- fieldType: t,
6
- options: e
7
- }) => ["enum", "multiSelect"].includes(t) ? (e || []).map(r) : [], l = (t, e) => ({
1
+ const c = (e) => ({
2
+ key: e,
3
+ id: e
4
+ }), o = ({
5
+ fieldType: e,
6
+ options: n
7
+ }) => ["enum", "multiSelect"].includes(e) ? (n || []).map(c) : [], l = (e, n) => ({
8
8
  metadata: {
9
- fields: t.reduce((a, n) => {
9
+ fields: e.reduce((a, t) => {
10
10
  var i;
11
- const u = (i = e == null ? void 0 : e[n.id]) == null ? void 0 : i.value, o = {
12
- enum: []
11
+ const u = (i = n == null ? void 0 : n[t.id]) == null ? void 0 : i.value, d = {
12
+ enum: [],
13
+ customType: "anyTime"
13
14
  };
14
- return a[n.id] = {
15
- value: u || o,
16
- options: c(n)
15
+ return a[t.id] = {
16
+ value: u || d,
17
+ fieldType: t.fieldType,
18
+ options: o(t)
17
19
  }, a;
18
20
  }, {})
19
21
  }
@@ -1,56 +1,73 @@
1
- import { MetadataStringField as d } from "@box/metadata-filter";
2
- import { F as p } from "../../../../chunks/form-filter-chip.js";
3
- import { SelectFilterChip as f } from "./select-filter-chip.js";
4
- import { MetadataFileChip as u } from "../metadata-value/metadata-file-chip.js";
1
+ import { MetadataStringField as f, MetadataDateField as F } from "@box/metadata-filter";
2
+ import { useIntl as h } from "react-intl";
3
+ import { F as n } from "../../../../chunks/form-filter-chip.js";
4
+ import { SelectFilterChip as C } from "./select-filter-chip.js";
5
+ import { MetadataFileChip as M } from "../metadata-value/metadata-file-chip.js";
5
6
  import { jsx as t } from "react/jsx-runtime";
6
- const S = ({
7
- filterOption: n,
8
- formRef: a,
9
- selected: m
7
+ const y = ({
8
+ filterOption: s,
9
+ formRef: i
10
10
  }) => {
11
11
  const {
12
- fieldType: r,
13
- icon: l,
12
+ canUseRelativeDates: c,
13
+ customDateFilterOptions: d,
14
+ fieldType: o,
15
+ icon: r,
14
16
  id: e,
15
- name: i,
16
- options: s,
17
- variant: c
18
- } = n, o = `metadata.fields.${e}`;
19
- switch (r) {
17
+ name: a,
18
+ options: m,
19
+ variant: p
20
+ } = s, {
21
+ locale: u
22
+ } = h(), l = `metadata.fields.${e}`;
23
+ switch (o) {
20
24
  case "date":
25
+ return /* @__PURE__ */ t(n, {
26
+ formRef: i,
27
+ icon: r,
28
+ id: e,
29
+ name: a,
30
+ children: /* @__PURE__ */ t(F, {
31
+ canUseRelativeDates: c,
32
+ customDateFilterOptions: d,
33
+ direction: "vertical",
34
+ fieldNamePrefix: l,
35
+ label: a,
36
+ locale: u
37
+ })
38
+ }, e);
21
39
  case "float":
22
40
  case "string":
23
- return /* @__PURE__ */ t(p, {
24
- formRef: a,
25
- icon: l,
41
+ return /* @__PURE__ */ t(n, {
42
+ formRef: i,
43
+ icon: r,
26
44
  id: e,
27
- name: i,
28
- selected: m,
29
- children: /* @__PURE__ */ t(d, {
30
- fieldNamePrefix: o,
31
- label: i
45
+ name: a,
46
+ children: /* @__PURE__ */ t(f, {
47
+ fieldNamePrefix: l,
48
+ label: a
32
49
  })
33
50
  }, e);
34
51
  case "multiSelect":
35
- if (c === "file")
36
- return /* @__PURE__ */ t(u, {
52
+ if (p === "file")
53
+ return /* @__PURE__ */ t(M, {
37
54
  id: e
38
55
  });
39
56
  case "enum":
40
- return /* @__PURE__ */ t(f, {
41
- fieldNamePrefix: o,
42
- formRef: a,
43
- icon: l,
57
+ return /* @__PURE__ */ t(C, {
58
+ fieldNamePrefix: l,
59
+ formRef: i,
60
+ icon: r,
44
61
  id: e,
45
- name: i,
46
- options: s,
47
- type: r
62
+ name: a,
63
+ options: m,
64
+ type: o
48
65
  });
49
66
  default:
50
67
  return null;
51
68
  }
52
69
  };
53
70
  export {
54
- S as MetadataFilterChip,
55
- S as default
71
+ y as MetadataFilterChip,
72
+ y as default
56
73
  };
@@ -1,9 +1,9 @@
1
- import { MetadataStringField as o, MetadataMultiSelectField as s, MetadataEnumField as f, MetadataDateField as m } from "@box/metadata-filter";
2
- import { useIntl as c } from "react-intl";
1
+ import { MetadataStringField as o, MetadataMultiSelectField as f, MetadataEnumField as s, MetadataDateField as m } from "@box/metadata-filter";
2
+ import { useIntl as n } from "react-intl";
3
3
  import { MetadataFileField as F } from "../metadata-value/metadata-file-field.js";
4
4
  import { MetadataLocationField as M } from "../metadata-value/metadata-location-field.js";
5
- import { MetadataSearchField as x } from "../metadata-value/metadata-search-field.js";
6
- import { MetadataRadioField as S } from "../metadata-value/metadata-radio-field.js";
5
+ import { MetadataRadioField as x } from "../metadata-value/metadata-radio-field.js";
6
+ import { MetadataSearchField as S } from "../metadata-value/metadata-search-field.js";
7
7
  import { jsx as t } from "react/jsx-runtime";
8
8
  const i = (e) => `metadata.fields.${e}`, b = ({
9
9
  id: e,
@@ -13,7 +13,7 @@ const i = (e) => `metadata.fields.${e}`, b = ({
13
13
  }) => {
14
14
  switch (r) {
15
15
  case "search":
16
- return /* @__PURE__ */ t(x, {
16
+ return /* @__PURE__ */ t(S, {
17
17
  id: e,
18
18
  name: a,
19
19
  placeholder: l
@@ -38,7 +38,7 @@ const i = (e) => `metadata.fields.${e}`, b = ({
38
38
  });
39
39
  case "default":
40
40
  default:
41
- return /* @__PURE__ */ t(s, {
41
+ return /* @__PURE__ */ t(f, {
42
42
  fieldNamePrefix: i(e),
43
43
  label: a || "",
44
44
  portalElement: r
@@ -49,27 +49,27 @@ const i = (e) => `metadata.fields.${e}`, b = ({
49
49
  name: a,
50
50
  parentRef: l,
51
51
  variant: r,
52
- renderer: d,
53
- triggerCallback: n
52
+ renderer: c,
53
+ triggerCallback: d
54
54
  }) => {
55
55
  const {
56
56
  locale: u
57
- } = c();
57
+ } = n();
58
58
  switch (r) {
59
59
  case "file":
60
60
  return /* @__PURE__ */ t(M, {
61
61
  id: e,
62
- renderer: d,
63
- triggerSetValueCallback: n
62
+ renderer: c,
63
+ triggerSetValueCallback: d
64
64
  });
65
65
  case "radio":
66
- return /* @__PURE__ */ t(S, {
66
+ return /* @__PURE__ */ t(x, {
67
67
  id: e,
68
68
  name: a
69
69
  });
70
70
  case "default":
71
71
  default:
72
- return /* @__PURE__ */ t(f, {
72
+ return /* @__PURE__ */ t(s, {
73
73
  fieldNamePrefix: i(e),
74
74
  label: a || "",
75
75
  locale: u,
@@ -77,22 +77,25 @@ const i = (e) => `metadata.fields.${e}`, b = ({
77
77
  });
78
78
  }
79
79
  }, P = ({
80
- id: e,
81
- customLabels: a,
82
- variant: l
80
+ customLabels: e,
81
+ canUseRelativeDates: a,
82
+ customDateFilterOptions: l,
83
+ id: r,
84
+ name: c
83
85
  }) => {
84
86
  const {
85
- locale: r
86
- } = c();
87
+ locale: d
88
+ } = n();
87
89
  return /* @__PURE__ */ t(m, {
88
- canUseRelativeDates: l === "relative",
89
- customFieldLabels: a,
90
+ canUseRelativeDates: a,
91
+ customDateFilterOptions: l,
92
+ customFieldLabels: e,
90
93
  direction: "vertical",
91
- fieldNamePrefix: i(e),
92
- label: "",
93
- locale: r
94
+ fieldNamePrefix: i(r),
95
+ label: c || "",
96
+ locale: d
94
97
  });
95
- }, R = ({
98
+ }, k = ({
96
99
  ...e
97
100
  }) => {
98
101
  switch (e.fieldType) {
@@ -101,6 +104,10 @@ const i = (e) => `metadata.fields.${e}`, b = ({
101
104
  return /* @__PURE__ */ t(b, {
102
105
  ...e
103
106
  });
107
+ case "date":
108
+ return /* @__PURE__ */ t(P, {
109
+ ...e
110
+ });
104
111
  case "multiSelect":
105
112
  return /* @__PURE__ */ t(g, {
106
113
  ...e
@@ -109,14 +116,10 @@ const i = (e) => `metadata.fields.${e}`, b = ({
109
116
  return /* @__PURE__ */ t(h, {
110
117
  ...e
111
118
  });
112
- case "date":
113
- return /* @__PURE__ */ t(P, {
114
- ...e
115
- });
116
119
  default:
117
120
  return null;
118
121
  }
119
122
  };
120
123
  export {
121
- R as default
124
+ k as default
122
125
  };
@@ -1,5 +1,5 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const s = e({
2
+ const a = e({
3
3
  listView: {
4
4
  id: "groupSharedFeatures.metadataView.itemList.listView",
5
5
  defaultMessage: "List view"
@@ -7,8 +7,12 @@ const s = e({
7
7
  selectAll: {
8
8
  id: "groupSharedFeatures.metadataView.itemList.selectAll",
9
9
  defaultMessage: "Select all"
10
+ },
11
+ unselectedOptionLabel: {
12
+ id: "groupSharedFeatures.metadataView.inlineEditingCell.unselectedOptionLabel",
13
+ defaultMessage: "--"
10
14
  }
11
15
  });
12
16
  export {
13
- s as default
17
+ a as default
14
18
  };