@box/metadata-filter 1.17.3 → 1.18.1
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/metadata-date-field.module.js +4 -4
- package/dist/esm/lib/components/metadata-filter-fields/components/metadata-date-field/metadata-date-field-relative.js +21 -21
- package/dist/esm/lib/components/metadata-filter-fields/components/metadata-date-field/metadata-date-field.js +88 -86
- package/dist/esm/lib/components/metadata-filter-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +5 -1
- package/dist/styles/metadata-date-field.css +1 -1
- package/dist/types/lib/components/metadata-filter-fields/components/metadata-date-field/metadata-date-field.d.ts +1 -1
- package/dist/types/lib/components/metadata-filter-fields/types.d.ts +3 -1
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../styles/metadata-date-field.css';const n = "
|
|
1
|
+
import '../styles/metadata-date-field.css';const n = "_container_10ye0_1", t = "_dateSelect_10ye0_6", e = "_rangeInputsContainer_10ye0_9", a = "_verticalLayout_10ye0_13", o = "_inputContainer_10ye0_23", r = "_advancedDateContainer_10ye0_31", c = "_datePicker_10ye0_40", i = "_daysInputContainer_10ye0_44", _ = {
|
|
2
2
|
container: n,
|
|
3
|
-
|
|
4
|
-
rangeInputsContainer:
|
|
5
|
-
verticalLayout:
|
|
3
|
+
dateSelect: t,
|
|
4
|
+
rangeInputsContainer: e,
|
|
5
|
+
verticalLayout: a,
|
|
6
6
|
inputContainer: o,
|
|
7
7
|
advancedDateContainer: r,
|
|
8
8
|
datePicker: c,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateI18nProvider as ue, Text as me, Radio as
|
|
1
|
+
import { DateI18nProvider as ue, Text as me, Radio as d, Select as x, DatePicker as H } from "@box/blueprint-web";
|
|
2
2
|
import fe from "clsx";
|
|
3
3
|
import { useFormikContext as ge, getIn as q, Field as z } from "formik";
|
|
4
4
|
import { useState as A, useRef as J, useCallback as he, useEffect as ve, useMemo as K } from "react";
|
|
@@ -6,7 +6,7 @@ import { useIntl as pe } from "react-intl";
|
|
|
6
6
|
import { R as o } from "../../../../../../chunks/types.js";
|
|
7
7
|
import { DEFAULT_MAX_DATE as Q } from "./constants.js";
|
|
8
8
|
import { getRelativeFromToValues as Fe, convertToFormikValueRanged as W } from "./date-conversion-utils.js";
|
|
9
|
-
import { s as
|
|
9
|
+
import { s as c } from "../../../../../../chunks/metadata-date-field.module.js";
|
|
10
10
|
import { u as Me, E as L } from "../../../../../../chunks/use-date-validation.js";
|
|
11
11
|
import { getDynamicMaxMinValue as Y } from "./utils.js";
|
|
12
12
|
import a from "../../../../messages.js";
|
|
@@ -22,8 +22,8 @@ const ee = {
|
|
|
22
22
|
locale: I,
|
|
23
23
|
portalElement: M
|
|
24
24
|
}) => {
|
|
25
|
-
const [k, D] = A(o.FROM), [E, T] = A(!1), m = `${p}.value.range.gt`, f = `${p}.value.range.lt`, P = `${p}.value.relativeType`,
|
|
26
|
-
values:
|
|
25
|
+
const [k, D] = A(o.FROM), [E, T] = A(!1), m = `${p}.value.range.gt`, f = `${p}.value.range.lt`, P = `${p}.value.relativeType`, V = `${p}.value.relativeDays`, {
|
|
26
|
+
values: y,
|
|
27
27
|
setFieldTouched: ae,
|
|
28
28
|
setFieldValue: i
|
|
29
29
|
} = ge(), {
|
|
@@ -32,10 +32,10 @@ const ee = {
|
|
|
32
32
|
toDatePickerValue: h,
|
|
33
33
|
fromErrorType: B,
|
|
34
34
|
toErrorType: w
|
|
35
|
-
} = Me(
|
|
35
|
+
} = Me(y, m, f, I, !0), r = pe(), G = q(y, P), te = g || h;
|
|
36
36
|
let R = "anyTime";
|
|
37
37
|
Z(G) ? R = G : te && (R = "customRange");
|
|
38
|
-
const [v, re] = A(R), F = q(
|
|
38
|
+
const [v, re] = A(R), F = q(y, V), b = J(g), O = J(h), U = {
|
|
39
39
|
clearDatePickerAriaLabel: r.formatMessage(a.clearSelectedDate),
|
|
40
40
|
nextMonthAriaLabel: r.formatMessage(a.switchToNextMonth),
|
|
41
41
|
openCalendarDropdownAriaLabel: r.formatMessage(a.openCalendar),
|
|
@@ -51,7 +51,7 @@ const ee = {
|
|
|
51
51
|
ae(t, !0), D(e);
|
|
52
52
|
}, se = (e) => {
|
|
53
53
|
let t;
|
|
54
|
-
Z(e) && (t = e), i(P, t), re(e), i(
|
|
54
|
+
Z(e) && (t = e), i(P, t), re(e), i(V, void 0), T(!0);
|
|
55
55
|
}, X = he(() => {
|
|
56
56
|
const {
|
|
57
57
|
from: e,
|
|
@@ -75,11 +75,11 @@ const ee = {
|
|
|
75
75
|
};
|
|
76
76
|
}, s = De.map(t);
|
|
77
77
|
return /* @__PURE__ */ l(x, {
|
|
78
|
-
className:
|
|
78
|
+
className: c.dateSelect,
|
|
79
79
|
defaultValue: F === void 0 ? "" : String(F),
|
|
80
80
|
label: r.formatMessage(a.relativeDaysSelectLabel),
|
|
81
81
|
onValueChange: (n) => {
|
|
82
|
-
i(
|
|
82
|
+
i(V, Number(n)), T(!0);
|
|
83
83
|
},
|
|
84
84
|
placeholder: r.formatMessage(a.selectValuePlaceholder),
|
|
85
85
|
children: /* @__PURE__ */ l(x.Content, {
|
|
@@ -92,7 +92,7 @@ const ee = {
|
|
|
92
92
|
})
|
|
93
93
|
});
|
|
94
94
|
}, ce = () => v !== "customRange" ? null : /* @__PURE__ */ S("div", {
|
|
95
|
-
className: fe(
|
|
95
|
+
className: fe(c.rangeInputsContainer, c.verticalLayout, c.dateSelect),
|
|
96
96
|
children: [/* @__PURE__ */ l(z, {
|
|
97
97
|
name: m,
|
|
98
98
|
validate: (e) => $(b.current, O.current, o.FROM),
|
|
@@ -100,7 +100,7 @@ const ee = {
|
|
|
100
100
|
field: e,
|
|
101
101
|
meta: t
|
|
102
102
|
}) => /* @__PURE__ */ l("div", {
|
|
103
|
-
className:
|
|
103
|
+
className: c.inputContainer,
|
|
104
104
|
children: /* @__PURE__ */ l(H, {
|
|
105
105
|
...e,
|
|
106
106
|
...U,
|
|
@@ -122,7 +122,7 @@ const ee = {
|
|
|
122
122
|
field: e,
|
|
123
123
|
meta: t
|
|
124
124
|
}) => /* @__PURE__ */ l("div", {
|
|
125
|
-
className:
|
|
125
|
+
className: c.inputContainer,
|
|
126
126
|
children: /* @__PURE__ */ l(H, {
|
|
127
127
|
...e,
|
|
128
128
|
...U,
|
|
@@ -143,38 +143,38 @@ const ee = {
|
|
|
143
143
|
return /* @__PURE__ */ l(ue, {
|
|
144
144
|
locale: I,
|
|
145
145
|
children: /* @__PURE__ */ S("div", {
|
|
146
|
-
className:
|
|
146
|
+
className: c.container,
|
|
147
147
|
"data-testid": `${N}-field`,
|
|
148
148
|
children: [/* @__PURE__ */ l(me, {
|
|
149
149
|
as: "span",
|
|
150
|
-
className:
|
|
150
|
+
className: c.rangeFieldLabel,
|
|
151
151
|
color: "textOnLightSecondary",
|
|
152
152
|
variant: "bodyDefaultBold",
|
|
153
153
|
children: N
|
|
154
|
-
}), /* @__PURE__ */ S(
|
|
154
|
+
}), /* @__PURE__ */ S(d.Group, {
|
|
155
155
|
disabled: u,
|
|
156
156
|
loop: !1,
|
|
157
157
|
onValueChange: se,
|
|
158
158
|
value: v,
|
|
159
|
-
children: [/* @__PURE__ */ l(
|
|
159
|
+
children: [/* @__PURE__ */ l(d.Item, {
|
|
160
160
|
label: r.formatMessage(a.relativeDateFilterAnyTime),
|
|
161
161
|
value: "anyTime"
|
|
162
|
-
}), /* @__PURE__ */ l(
|
|
162
|
+
}), /* @__PURE__ */ l(d.Item, {
|
|
163
163
|
label: r.formatMessage(a.relativeDateFilterToday),
|
|
164
164
|
value: "today"
|
|
165
|
-
}), /* @__PURE__ */ l(
|
|
165
|
+
}), /* @__PURE__ */ l(d.Item, {
|
|
166
166
|
description: C("next"),
|
|
167
167
|
label: r.formatMessage(a.relativeDateFilterNext),
|
|
168
168
|
value: "next"
|
|
169
|
-
}), /* @__PURE__ */ l(
|
|
169
|
+
}), /* @__PURE__ */ l(d.Item, {
|
|
170
170
|
description: C("past"),
|
|
171
171
|
label: r.formatMessage(a.relativeDateFilterPast),
|
|
172
172
|
value: "past"
|
|
173
|
-
}), /* @__PURE__ */ l(
|
|
173
|
+
}), /* @__PURE__ */ l(d.Item, {
|
|
174
174
|
description: C("olderThan"),
|
|
175
175
|
label: r.formatMessage(a.relativeDateFilterOlderThan),
|
|
176
176
|
value: "olderThan"
|
|
177
|
-
}), /* @__PURE__ */ l(
|
|
177
|
+
}), /* @__PURE__ */ l(d.Item, {
|
|
178
178
|
description: ce(),
|
|
179
179
|
label: r.formatMessage(a.relativeDateFilterCustomRange),
|
|
180
180
|
value: "customRange"
|
|
@@ -1,114 +1,116 @@
|
|
|
1
|
-
import { Text as
|
|
2
|
-
import { useFormikContext as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useIntl as
|
|
1
|
+
import { Text as J, DateI18nProvider as K, DatePicker as P } from "@box/blueprint-web";
|
|
2
|
+
import { useFormikContext as Q, Field as y } from "formik";
|
|
3
|
+
import { useState as W, useRef as E, useMemo as I } from "react";
|
|
4
|
+
import { useIntl as Y } from "react-intl";
|
|
5
5
|
import n from "../../../../messages.js";
|
|
6
6
|
import { R as a } from "../../../../../../chunks/types.js";
|
|
7
|
-
import { DEFAULT_MAX_DATE as
|
|
8
|
-
import { convertToFormikValue as
|
|
9
|
-
import { MetadataDateFieldRelative as
|
|
10
|
-
import { s as
|
|
11
|
-
import { u as
|
|
12
|
-
import { useDateInternationalization as
|
|
13
|
-
import { getDynamicMaxMinValue as
|
|
14
|
-
import { jsx as t, jsxs as
|
|
15
|
-
const
|
|
16
|
-
canUseRelativeDates:
|
|
17
|
-
...
|
|
18
|
-
}) =>
|
|
19
|
-
...
|
|
20
|
-
}) : /* @__PURE__ */ t(
|
|
21
|
-
...
|
|
22
|
-
}),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
import { DEFAULT_MAX_DATE as $ } from "./constants.js";
|
|
8
|
+
import { convertToFormikValue as B } from "./date-conversion-utils.js";
|
|
9
|
+
import { MetadataDateFieldRelative as Z } from "./metadata-date-field-relative.js";
|
|
10
|
+
import { s as i } from "../../../../../../chunks/metadata-date-field.module.js";
|
|
11
|
+
import { u as ee, E as g } from "../../../../../../chunks/use-date-validation.js";
|
|
12
|
+
import { useDateInternationalization as ae } from "./use-date-internationalization.js";
|
|
13
|
+
import { getDynamicMaxMinValue as w } from "./utils.js";
|
|
14
|
+
import { jsx as t, jsxs as z } from "react/jsx-runtime";
|
|
15
|
+
const pe = ({
|
|
16
|
+
canUseRelativeDates: f,
|
|
17
|
+
...s
|
|
18
|
+
}) => f ? /* @__PURE__ */ t(Z, {
|
|
19
|
+
...s
|
|
20
|
+
}) : /* @__PURE__ */ t(re, {
|
|
21
|
+
...s
|
|
22
|
+
}), re = ({
|
|
23
|
+
customFieldLabels: f = [],
|
|
24
|
+
direction: s = "horizontal",
|
|
25
|
+
disableForm: v,
|
|
26
|
+
fieldNamePrefix: D,
|
|
27
|
+
label: O,
|
|
26
28
|
locale: M,
|
|
27
|
-
portalElement:
|
|
29
|
+
portalElement: T
|
|
28
30
|
}) => {
|
|
29
|
-
const [
|
|
31
|
+
const [L, h] = W(a.FROM), m = `${D}.value.range.gt`, c = `${D}.value.range.lt`, {
|
|
30
32
|
values: S,
|
|
31
|
-
setFieldTouched:
|
|
32
|
-
setFieldValue:
|
|
33
|
-
} =
|
|
34
|
-
localTimezone:
|
|
35
|
-
} =
|
|
36
|
-
validateDates:
|
|
37
|
-
fromDatePickerValue:
|
|
38
|
-
toDatePickerValue:
|
|
39
|
-
fromErrorType:
|
|
40
|
-
toErrorType:
|
|
41
|
-
} =
|
|
33
|
+
setFieldTouched: j,
|
|
34
|
+
setFieldValue: V
|
|
35
|
+
} = Q(), {
|
|
36
|
+
localTimezone: R
|
|
37
|
+
} = ae(M), {
|
|
38
|
+
validateDates: b,
|
|
39
|
+
fromDatePickerValue: d,
|
|
40
|
+
toDatePickerValue: u,
|
|
41
|
+
fromErrorType: x,
|
|
42
|
+
toErrorType: A
|
|
43
|
+
} = ee(S, m, c, M, !1), o = Y(), F = E(d), p = E(u), C = {
|
|
42
44
|
clearDatePickerAriaLabel: o.formatMessage(n.clearSelectedDate),
|
|
43
45
|
nextMonthAriaLabel: o.formatMessage(n.switchToNextMonth),
|
|
44
46
|
openCalendarDropdownAriaLabel: o.formatMessage(n.openCalendar),
|
|
45
47
|
previousMonthAriaLabel: o.formatMessage(n.switchToNextMonth)
|
|
46
|
-
},
|
|
47
|
-
const r =
|
|
48
|
-
F.current = e,
|
|
49
|
-
},
|
|
50
|
-
const r =
|
|
51
|
-
p.current = e,
|
|
52
|
-
},
|
|
53
|
-
const r = e === a.FROM ?
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
className:
|
|
58
|
-
"data-testid": `${
|
|
59
|
-
children: [/* @__PURE__ */ t(
|
|
48
|
+
}, [G, X] = f, _ = (e) => {
|
|
49
|
+
const r = B(e, R, a.FROM);
|
|
50
|
+
F.current = e, V(m, r), h(a.FROM);
|
|
51
|
+
}, H = (e) => {
|
|
52
|
+
const r = B(e, R, a.TO);
|
|
53
|
+
p.current = e, V(c, r), h(a.TO);
|
|
54
|
+
}, N = (e) => {
|
|
55
|
+
const r = e === a.FROM ? m : c;
|
|
56
|
+
j(r, !0), h(e);
|
|
57
|
+
}, U = I(() => w(u, $), [u]), q = I(() => w(d), [d]), k = (e, r, l) => !!(r === g.MAX && e === g.OVERLAPPING || e === g.OVERLAPPING && l);
|
|
58
|
+
return /* @__PURE__ */ z("div", {
|
|
59
|
+
className: i.container,
|
|
60
|
+
"data-testid": `${O}-field`,
|
|
61
|
+
children: [/* @__PURE__ */ t(J, {
|
|
60
62
|
as: "span",
|
|
61
|
-
className:
|
|
63
|
+
className: i.rangeFieldLabel,
|
|
62
64
|
color: "textOnLightSecondary",
|
|
63
65
|
variant: "bodyDefaultBold",
|
|
64
|
-
children:
|
|
65
|
-
}), /* @__PURE__ */ t(
|
|
66
|
+
children: O
|
|
67
|
+
}), /* @__PURE__ */ t(K, {
|
|
66
68
|
locale: M,
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
className:
|
|
69
|
-
children: [/* @__PURE__ */ t(
|
|
70
|
-
name:
|
|
71
|
-
validate: (e) =>
|
|
69
|
+
children: /* @__PURE__ */ z("div", {
|
|
70
|
+
className: `${i.rangeInputsContainer} ${s === "vertical" ? i.verticalLayout : ""}`,
|
|
71
|
+
children: [/* @__PURE__ */ t(y, {
|
|
72
|
+
name: m,
|
|
73
|
+
validate: (e) => b(F.current, p.current, a.FROM),
|
|
72
74
|
children: ({
|
|
73
75
|
field: e,
|
|
74
76
|
meta: r
|
|
75
77
|
}) => /* @__PURE__ */ t("div", {
|
|
76
|
-
className:
|
|
77
|
-
children: /* @__PURE__ */ t(
|
|
78
|
+
className: i.inputContainer,
|
|
79
|
+
children: /* @__PURE__ */ t(P, {
|
|
78
80
|
...e,
|
|
79
|
-
...
|
|
81
|
+
...C,
|
|
80
82
|
calendarAriaLabel: o.formatMessage(n.selectFromDate),
|
|
81
|
-
error:
|
|
82
|
-
isDisabled:
|
|
83
|
-
label: o.formatMessage(n.fieldFromLabel),
|
|
84
|
-
maxValue:
|
|
85
|
-
onBlur: () =>
|
|
86
|
-
onChange: (
|
|
87
|
-
portalElement:
|
|
88
|
-
value:
|
|
83
|
+
error: k(x, A, L !== a.FROM) ? void 0 : r.error,
|
|
84
|
+
isDisabled: v,
|
|
85
|
+
label: G || o.formatMessage(n.fieldFromLabel),
|
|
86
|
+
maxValue: U,
|
|
87
|
+
onBlur: () => N(a.FROM),
|
|
88
|
+
onChange: (l) => _(l),
|
|
89
|
+
portalElement: T,
|
|
90
|
+
value: d
|
|
89
91
|
})
|
|
90
92
|
})
|
|
91
|
-
}), /* @__PURE__ */ t(
|
|
93
|
+
}), /* @__PURE__ */ t(y, {
|
|
92
94
|
name: c,
|
|
93
|
-
validate: (e) =>
|
|
95
|
+
validate: (e) => b(F.current, p.current, a.TO),
|
|
94
96
|
children: ({
|
|
95
97
|
field: e,
|
|
96
98
|
meta: r
|
|
97
99
|
}) => /* @__PURE__ */ t("div", {
|
|
98
|
-
className:
|
|
99
|
-
children: /* @__PURE__ */ t(
|
|
100
|
+
className: i.inputContainer,
|
|
101
|
+
children: /* @__PURE__ */ t(P, {
|
|
100
102
|
...e,
|
|
101
|
-
...
|
|
103
|
+
...C,
|
|
102
104
|
calendarAriaLabel: o.formatMessage(n.selectToDate),
|
|
103
|
-
error:
|
|
104
|
-
isDisabled:
|
|
105
|
-
label: o.formatMessage(n.fieldToLabel),
|
|
106
|
-
maxValue:
|
|
107
|
-
minValue:
|
|
108
|
-
onBlur: () =>
|
|
109
|
-
onChange: (
|
|
110
|
-
portalElement:
|
|
111
|
-
value:
|
|
105
|
+
error: k(A, x, L !== a.TO) ? void 0 : r.error,
|
|
106
|
+
isDisabled: v,
|
|
107
|
+
label: X || o.formatMessage(n.fieldToLabel),
|
|
108
|
+
maxValue: $,
|
|
109
|
+
minValue: q,
|
|
110
|
+
onBlur: () => N(a.TO),
|
|
111
|
+
onChange: (l) => H(l),
|
|
112
|
+
portalElement: T,
|
|
113
|
+
value: u
|
|
112
114
|
})
|
|
113
115
|
})
|
|
114
116
|
})]
|
|
@@ -117,7 +119,7 @@ const fe = ({
|
|
|
117
119
|
});
|
|
118
120
|
};
|
|
119
121
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
pe as MetadataDateField,
|
|
123
|
+
re as MetadataDateFieldNonRelative,
|
|
124
|
+
pe as default
|
|
123
125
|
};
|
|
@@ -35,7 +35,11 @@ const V = ({
|
|
|
35
35
|
name: e.name,
|
|
36
36
|
onValueChange: (p) => i(a, p),
|
|
37
37
|
options: d,
|
|
38
|
-
placeholder: (
|
|
38
|
+
placeholder: (
|
|
39
|
+
// Empty array must be substituded if there is no value found
|
|
40
|
+
// Otherwise an no placeholder appears despite no selection
|
|
41
|
+
((t = e.value || []) == null ? void 0 : t.length) === 0 ? u.formatMessage(x.multiselectPlaceholder) : ""
|
|
42
|
+
),
|
|
39
43
|
portalElement: s,
|
|
40
44
|
value: e.value
|
|
41
45
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._container_10ye0_1{display:flex;flex-direction:column;gap:var(--space-2)}._container_10ye0_1 ._dateSelect_10ye0_6{margin-top:var(--space-3)}._container_10ye0_1 ._rangeInputsContainer_10ye0_9{display:flex;gap:var(--space-2)}._container_10ye0_1 ._rangeInputsContainer_10ye0_9._verticalLayout_10ye0_13{flex-direction:column;gap:var(--space-4)}@media (max-width: 374px){._container_10ye0_1 ._rangeInputsContainer_10ye0_9{flex-direction:column;gap:var(--space-4)}}._container_10ye0_1 ._rangeInputsContainer_10ye0_9 ._inputContainer_10ye0_23{display:flex;flex-direction:column;flex-grow:0;width:100%;min-width:0}._advancedDateContainer_10ye0_31{display:flex;flex-direction:column}._advancedDateContainer_10ye0_31 ._rangeInputsContainer_10ye0_9{display:flex;flex-direction:column;gap:var(--space-2)}._advancedDateContainer_10ye0_31 ._rangeInputsContainer_10ye0_9 ._datePicker_10ye0_40{flex-grow:0;width:100%}._advancedDateContainer_10ye0_31 ._daysInputContainer_10ye0_44{width:100%}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MetadataFieldProps } from '../../types';
|
|
2
2
|
export declare const MetadataDateField: ({ canUseRelativeDates, ...props }: MetadataFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare const MetadataDateFieldNonRelative: ({ disableForm, fieldNamePrefix, label, locale, portalElement, }: MetadataFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const MetadataDateFieldNonRelative: ({ customFieldLabels, direction, disableForm, fieldNamePrefix, label, locale, portalElement, }: MetadataFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default MetadataDateField;
|
|
@@ -21,7 +21,7 @@ export type MetadataFieldProps = {
|
|
|
21
21
|
portalElement?: HTMLElement;
|
|
22
22
|
options?: Array<MetadataTemplateFieldOption>;
|
|
23
23
|
locale: string;
|
|
24
|
-
taxonomyOptionsFetcher
|
|
24
|
+
taxonomyOptionsFetcher?: TaxonomyOptionsFetcher;
|
|
25
25
|
className?: string;
|
|
26
26
|
canUseRelativeDates?: boolean;
|
|
27
27
|
isAdvancedFilterEnabled?: boolean;
|
|
@@ -30,4 +30,6 @@ export type MetadataFieldProps = {
|
|
|
30
30
|
filterOptionsMap?: [string, string][];
|
|
31
31
|
onAdvancedFilterOptionChange?: (fieldKey: string, option: string) => void;
|
|
32
32
|
fieldAdvancedFilterOptions?: string;
|
|
33
|
+
direction?: 'horizontal' | 'vertical';
|
|
34
|
+
customFieldLabels?: Array<string>;
|
|
33
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-filter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@box/blueprint-web": "^7.8.0",
|
|
6
6
|
"@box/blueprint-web-assets": "^4.16.0",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"react-intl": "6.4.2"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@box/blueprint-web": "^12.51.
|
|
15
|
-
"@box/blueprint-web-assets": "^4.
|
|
16
|
-
"@box/storybook-utils": "^0.13.
|
|
14
|
+
"@box/blueprint-web": "^12.51.1",
|
|
15
|
+
"@box/blueprint-web-assets": "^4.63.0",
|
|
16
|
+
"@box/storybook-utils": "^0.13.18",
|
|
17
17
|
"react": "^18.3.0",
|
|
18
18
|
"react-dom": "^18.3.0",
|
|
19
19
|
"react-intl": "6.4.2"
|