@box/metadata-editor 0.92.3 → 0.92.5
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/chunks/taxonomy-ancestor-status-pill.js +34 -35
- package/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js +5 -5
- package/esm/lib/components/add-metadata-template-dropdown/messages.js +1 -1
- package/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +39 -40
- package/esm/lib/components/combobox-with-api-pagination/messages.js +1 -1
- package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.js +1 -1
- package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.js +6 -6
- package/esm/lib/components/filter-dropdown-menu/messages.js +1 -1
- package/esm/lib/components/filter-instances-dropdown/filter-instances-dropdown.js +7 -7
- package/esm/lib/components/filter-instances-dropdown/messages.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.js +15 -16
- package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/messages.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +27 -28
- package/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +6 -6
- package/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +5 -5
- package/esm/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.js +9 -9
- package/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +5 -5
- package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.js +1 -1
- package/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +70 -567
- package/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +18 -19
- package/esm/lib/components/metadata-empty-state/messages.js +1 -1
- package/esm/lib/components/metadata-empty-state/metadata-empty-state.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +10 -10
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js +14 -15
- package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +2 -2
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js +14 -14
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +5 -5
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js +3 -3
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.js +3 -4
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.js +1 -1
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.js +1 -1
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +1 -1
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +1 -1
- package/esm/lib/components/unsaved-changes-modal/messages.js +1 -1
- package/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +18 -19
- package/esm/lib/messages.js +1 -1
- package/package.json +3 -3
- package/chunks/index.js +0 -292
- package/chunks/message.js +0 -18
@@ -2,11 +2,10 @@ import { Popover as t, FilterChip as _, InlineNotice as A, TextButton as T, Load
|
|
2
2
|
import { Loader as W } from "@box/blueprint-web-assets/icons/Fill";
|
3
3
|
import V from "lodash/orderBy";
|
4
4
|
import { useState as s } from "react";
|
5
|
-
import {
|
6
|
-
import
|
5
|
+
import { useIntl as B, FormattedMessage as y } from "react-intl";
|
6
|
+
import a from "../esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js";
|
7
7
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
8
|
-
import
|
9
|
-
import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentContainer_sfidx_1", w = "_popoverMainContent_sfidx_6", E = "_loadingIndicatorWrapper_sfidx_10", D = "_errorMessageWrapper_sfidx_17", P = "_errorMessageWrapperText_sfidx_22", R = "_container_sfidx_30", k = "_taxonomyAncestorTable_sfidx_36", K = "_taxonomyValueGroup_sfidx_79", G = "_taxonomyValueButton_sfidx_84", O = "_taxonomyValueLabel_sfidx_94", a = {
|
8
|
+
import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentContainer_sfidx_1", w = "_popoverMainContent_sfidx_6", E = "_loadingIndicatorWrapper_sfidx_10", D = "_errorMessageWrapper_sfidx_17", P = "_errorMessageWrapperText_sfidx_22", R = "_container_sfidx_30", k = "_taxonomyAncestorTable_sfidx_36", K = "_taxonomyValueGroup_sfidx_79", G = "_taxonomyValueButton_sfidx_84", O = "_taxonomyValueLabel_sfidx_94", n = {
|
10
9
|
popoverContentContainer: N,
|
11
10
|
popoverMainContent: w,
|
12
11
|
loadingIndicatorWrapper: E,
|
@@ -19,25 +18,25 @@ import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentC
|
|
19
18
|
taxonomyValueLabel: O
|
20
19
|
}, j = {
|
21
20
|
right: 24
|
22
|
-
}, z = (r) => {
|
23
|
-
r.stopPropagation();
|
24
21
|
}, S = (r) => {
|
22
|
+
r.stopPropagation();
|
23
|
+
}, z = (r) => {
|
25
24
|
(r.key === "ArrowLeft" || r.key === "ArrowRight") && r.stopPropagation();
|
26
25
|
};
|
27
|
-
function
|
26
|
+
function Y({
|
28
27
|
taxonomyNodeFetcher: r,
|
29
|
-
scope:
|
28
|
+
scope: f,
|
30
29
|
taxonomyKey: h,
|
31
30
|
value: v,
|
32
31
|
displayValue: c
|
33
32
|
}) {
|
34
33
|
const {
|
35
34
|
formatMessage: l
|
36
|
-
} = B(), [C,
|
37
|
-
d(!0), g(!1),
|
35
|
+
} = B(), [C, b] = s([]), [p, d] = s(!1), [m, g] = s(!1), [M, x] = s(!1), L = V(C, (o) => o.level), u = async () => {
|
36
|
+
d(!0), g(!1), x(!0);
|
38
37
|
try {
|
39
|
-
const o = await r(
|
40
|
-
|
38
|
+
const o = await r(f, h, v);
|
39
|
+
b(o);
|
41
40
|
} catch {
|
42
41
|
g(!0);
|
43
42
|
} finally {
|
@@ -45,60 +44,60 @@ function Z({
|
|
45
44
|
}
|
46
45
|
};
|
47
46
|
return /* @__PURE__ */ i(t.Root, {
|
48
|
-
onOpenChange:
|
49
|
-
open:
|
47
|
+
onOpenChange: x,
|
48
|
+
open: M,
|
50
49
|
children: [/* @__PURE__ */ e(t.Trigger, {
|
51
50
|
children: /* @__PURE__ */ e(_.ChipButton, {
|
52
51
|
"aria-checked": void 0,
|
53
|
-
className:
|
52
|
+
className: n.taxonomyValueButton,
|
54
53
|
disabled: !r,
|
55
|
-
onClick:
|
56
|
-
onKeyDown:
|
54
|
+
onClick: u,
|
55
|
+
onKeyDown: z,
|
57
56
|
role: void 0,
|
58
57
|
value: c,
|
59
58
|
children: /* @__PURE__ */ e(_.Label, {
|
60
|
-
className:
|
59
|
+
className: n.taxonomyValueLabel,
|
61
60
|
children: c
|
62
61
|
})
|
63
62
|
})
|
64
63
|
}), /* @__PURE__ */ e(t.ContentContainer, {
|
65
64
|
align: "start",
|
66
|
-
className:
|
65
|
+
className: n.popoverContentContainer,
|
67
66
|
collisionPadding: j,
|
68
|
-
onEscapeKeyDown:
|
67
|
+
onEscapeKeyDown: S,
|
69
68
|
children: /* @__PURE__ */ i(t.MainContent, {
|
70
|
-
className:
|
69
|
+
className: n.popoverMainContent,
|
71
70
|
children: [m && /* @__PURE__ */ i("div", {
|
72
|
-
className:
|
71
|
+
className: n.errorMessageWrapper,
|
73
72
|
children: [/* @__PURE__ */ e(A, {
|
74
73
|
variant: "error",
|
75
|
-
variantIconAriaLabel: l(
|
76
|
-
children: /* @__PURE__ */ e(
|
77
|
-
...
|
74
|
+
variantIconAriaLabel: l(a.loadingResultsErrorIconLabel),
|
75
|
+
children: /* @__PURE__ */ e(y, {
|
76
|
+
...a.loadingResultsErrorMessage
|
78
77
|
})
|
79
78
|
}), /* @__PURE__ */ e(T, {
|
80
|
-
className:
|
79
|
+
className: n.errorMessageWrapperText,
|
81
80
|
icon: W,
|
82
|
-
onClick:
|
81
|
+
onClick: u,
|
83
82
|
"data-target-id": "TextButton-loadingResultsErrorAction",
|
84
|
-
children: l(
|
83
|
+
children: l(a.loadingResultsErrorAction)
|
85
84
|
})]
|
86
85
|
}), p && /* @__PURE__ */ e("div", {
|
87
|
-
className:
|
86
|
+
className: n.loadingIndicatorWrapper,
|
88
87
|
children: /* @__PURE__ */ e(I, {
|
89
|
-
"aria-label": l(
|
88
|
+
"aria-label": l(a.loadingAriaLabel),
|
90
89
|
size: "large"
|
91
90
|
})
|
92
91
|
}), !m && !p && /* @__PURE__ */ e("table", {
|
93
|
-
className:
|
92
|
+
className: n.taxonomyAncestorTable,
|
94
93
|
children: /* @__PURE__ */ e("tbody", {
|
95
94
|
children: L.map((o) => /* @__PURE__ */ i("tr", {
|
96
95
|
children: [/* @__PURE__ */ e("th", {
|
97
96
|
scope: "row",
|
98
97
|
children: o.levelName
|
99
98
|
}), /* @__PURE__ */ e("td", {
|
100
|
-
children: o.levelValue || /* @__PURE__ */ e(
|
101
|
-
...
|
99
|
+
children: o.levelValue || /* @__PURE__ */ e(y, {
|
100
|
+
...a.emptyAncestorLevelValue
|
102
101
|
})
|
103
102
|
})]
|
104
103
|
}, o.id || o.level))
|
@@ -109,6 +108,6 @@ function Z({
|
|
109
108
|
});
|
110
109
|
}
|
111
110
|
export {
|
112
|
-
|
113
|
-
|
111
|
+
Y as T,
|
112
|
+
n as s
|
114
113
|
};
|
@@ -2,7 +2,7 @@ import { IconButton as S } from "@box/blueprint-web";
|
|
2
2
|
import { Plus as T } from "@box/blueprint-web-assets/icons/Fill";
|
3
3
|
import { Space2 as w } from "@box/blueprint-web-assets/tokens/px-tokens";
|
4
4
|
import { useState as y, useMemo as B } from "react";
|
5
|
-
import {
|
5
|
+
import { useIntl as I } from "react-intl";
|
6
6
|
import { getTemplateDisplayName as d } from "../../utils/utils.js";
|
7
7
|
import { FilterDropdownMenu as t } from "../filter-dropdown-menu/index.js";
|
8
8
|
import s from "./messages.js";
|
@@ -10,11 +10,11 @@ import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
10
10
|
const L = parseInt(w, 10);
|
11
11
|
function P({
|
12
12
|
availableTemplates: n,
|
13
|
-
onSelect:
|
14
|
-
selectedTemplates:
|
13
|
+
onSelect: p,
|
14
|
+
selectedTemplates: u
|
15
15
|
}) {
|
16
|
-
const o = I(), m = o.formatMessage(s.customMetadataName), [r, g] = y(""), i = B(() => n.filter((e) => d(e, m).toLowerCase().includes(r.toLowerCase())), [n, r]), f = r.length > 0 && i.length === 0, h = (e) =>
|
17
|
-
|
16
|
+
const o = I(), m = o.formatMessage(s.customMetadataName), [r, g] = y(""), i = B(() => n.filter((e) => d(e, m).toLowerCase().includes(r.toLowerCase())), [n, r]), f = r.length > 0 && i.length === 0, h = (e) => u.some((l) => l.scope === e.scope && l.templateKey === e.templateKey), M = (e) => {
|
17
|
+
p(e);
|
18
18
|
};
|
19
19
|
return /* @__PURE__ */ c(t.Root, {
|
20
20
|
resetValueOnHide: !0,
|
@@ -1,17 +1,16 @@
|
|
1
1
|
import { ComboboxItemValue as oe } from "@ariakit/react";
|
2
|
-
import { Combobox as
|
2
|
+
import { Combobox as m, LoadingIndicator as te, InlineNotice as re, Text as ne } from "@box/blueprint-web";
|
3
3
|
import { Search as ie, Loader as se } from "@box/blueprint-web-assets/icons/Fill";
|
4
|
-
import { IconIconOnLightSecondary as ae, Size6 as
|
4
|
+
import { IconIconOnLightSecondary as ae, Size6 as M, Size1 as le } from "@box/blueprint-web-assets/tokens/tokens";
|
5
5
|
import { useForkRef as ce } from "@box/blueprint-web/lib-esm/utils/useForkRef";
|
6
6
|
import T from "clsx";
|
7
|
-
import { forwardRef as F, useRef as C, useCallback as ue, useMemo as L, useEffect as
|
8
|
-
import {
|
7
|
+
import { forwardRef as F, useRef as C, useCallback as ue, useMemo as L, useEffect as de } from "react";
|
8
|
+
import { useIntl as P, FormattedMessage as V } from "react-intl";
|
9
9
|
import i from "./messages.js";
|
10
|
-
import { useAsyncList as
|
10
|
+
import { useAsyncList as me } from "./use-async-list.js";
|
11
11
|
import { useControllableState as pe } from "./utils/use-controllable-state.js";
|
12
|
-
import { useTrackVisibility as
|
13
|
-
import { jsx as r, jsxs as
|
14
|
-
import { M as N } from "../../../../chunks/message.js";
|
12
|
+
import { useTrackVisibility as he } from "./utils/use-intersection-observer.js";
|
13
|
+
import { jsx as r, jsxs as N, Fragment as fe } from "react/jsx-runtime";
|
15
14
|
import '../../../../styles/combobox-with-api-pagination.css';const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptionText_1m7se_11", _e = "_selected_1m7se_23", Oe = "_option_1m7se_34", Re = "_errorComboboxOption_1m7se_38", Ce = "_errorComboboxOptionText_1m7se_43", a = {
|
16
15
|
container: be,
|
17
16
|
disabled: ge,
|
@@ -24,25 +23,25 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
24
23
|
onTryAgain: y
|
25
24
|
}, p) => {
|
26
25
|
const {
|
27
|
-
formatMessage:
|
26
|
+
formatMessage: h
|
28
27
|
} = P();
|
29
|
-
return /* @__PURE__ */
|
28
|
+
return /* @__PURE__ */ N(fe, {
|
30
29
|
children: [/* @__PURE__ */ r(re, {
|
31
30
|
variant: "error",
|
32
|
-
variantIconAriaLabel:
|
33
|
-
children: /* @__PURE__ */ r(
|
31
|
+
variantIconAriaLabel: h(i.loadingResultsErrorIconLabel),
|
32
|
+
children: /* @__PURE__ */ r(V, {
|
34
33
|
...i.loadingResultsErrorMessage
|
35
34
|
})
|
36
|
-
}), /* @__PURE__ */ r(
|
35
|
+
}), /* @__PURE__ */ r(m.Option, {
|
37
36
|
ref: p,
|
38
37
|
className: a.errorComboboxOption,
|
39
38
|
onClick: y,
|
40
|
-
children: /* @__PURE__ */
|
39
|
+
children: /* @__PURE__ */ N(ne, {
|
41
40
|
as: "span",
|
42
41
|
className: a.errorComboboxOptionText,
|
43
42
|
color: "textOnLightLink",
|
44
43
|
variant: "bodyDefaultBold",
|
45
|
-
children: [/* @__PURE__ */ r(
|
44
|
+
children: [/* @__PURE__ */ r(V, {
|
46
45
|
...i.loadingResultsErrorAction
|
47
46
|
}), /* @__PURE__ */ r(se, {
|
48
47
|
color: "currentColor",
|
@@ -54,29 +53,29 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
54
53
|
});
|
55
54
|
}), A = "__LOADING__", E = "__LOADING_ERROR__", Le = "0px 0px 20px 0px", Ae = /* @__PURE__ */ r(ie, {
|
56
55
|
color: ae,
|
57
|
-
height:
|
56
|
+
height: M,
|
58
57
|
role: "presentation",
|
59
58
|
style: {
|
60
59
|
padding: le,
|
61
60
|
boxSizing: "border-box"
|
62
61
|
},
|
63
|
-
width:
|
64
|
-
}),
|
62
|
+
width: M
|
63
|
+
}), we = /* @__PURE__ */ F(function(p, h) {
|
65
64
|
const {
|
66
65
|
defaultFetcher: k,
|
67
|
-
onInputValueChange:
|
66
|
+
onInputValueChange: f,
|
68
67
|
value: D,
|
69
68
|
onValueChange: w,
|
70
|
-
noResultMessage:
|
71
|
-
defaultValue:
|
72
|
-
loadingAriaLabel:
|
69
|
+
noResultMessage: B,
|
70
|
+
defaultValue: W = [],
|
71
|
+
loadingAriaLabel: z,
|
73
72
|
multiselect: l = !1,
|
74
73
|
disabled: G,
|
75
74
|
className: j,
|
76
75
|
...U
|
77
76
|
} = p, {
|
78
77
|
formatMessage: u
|
79
|
-
} = P(), b = C(null), g = C(!0), e =
|
78
|
+
} = P(), b = C(null), g = C(!0), e = me({
|
80
79
|
async load({
|
81
80
|
marker: o,
|
82
81
|
searchInput: t,
|
@@ -96,7 +95,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
96
95
|
v.current || (e.reload(), v.current = !0);
|
97
96
|
}, []), [n, x] = pe({
|
98
97
|
prop: D,
|
99
|
-
defaultProp:
|
98
|
+
defaultProp: W,
|
100
99
|
onChange: w
|
101
100
|
}), _ = !l && n.length === 1, H = (o) => {
|
102
101
|
o === void 0 ? (x([]), g.current || (e.search(""), g.current = !0)) : Array.isArray(o) ? x(o) : x([o]);
|
@@ -107,7 +106,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
107
106
|
...c
|
108
107
|
} = o;
|
109
108
|
if (t === A)
|
110
|
-
return e.hasNextPage ? /* @__PURE__ */ r(
|
109
|
+
return e.hasNextPage ? /* @__PURE__ */ r(m.Option, {
|
111
110
|
...c,
|
112
111
|
ref: Y,
|
113
112
|
disabled: !0,
|
@@ -129,7 +128,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
129
128
|
if (O.some((s) => s.value === t))
|
130
129
|
return null;
|
131
130
|
const ee = n.some((s) => s.value === t);
|
132
|
-
return /* @__PURE__ */ r(
|
131
|
+
return /* @__PURE__ */ r(m.Option, {
|
133
132
|
...c,
|
134
133
|
className: a.option,
|
135
134
|
value: t,
|
@@ -139,7 +138,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
139
138
|
})
|
140
139
|
});
|
141
140
|
}, Q = (o) => {
|
142
|
-
if (
|
141
|
+
if (f == null || f(o), _ && o === "") {
|
143
142
|
g.current = !1;
|
144
143
|
return;
|
145
144
|
}
|
@@ -148,18 +147,18 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
148
147
|
var o;
|
149
148
|
e.reload(), (o = b.current) == null || o.focus();
|
150
149
|
};
|
151
|
-
let
|
152
|
-
e.hasError && !e.isLoading ?
|
150
|
+
let d;
|
151
|
+
e.hasError && !e.isLoading ? d = /* @__PURE__ */ r(S, {
|
153
152
|
onTryAgain: X
|
154
|
-
}) : e.isEmpty && !e.isLoading ?
|
153
|
+
}) : e.isEmpty && !e.isLoading ? d = B || u(i.noResults) : d = void 0;
|
155
154
|
const [Y, {
|
156
155
|
rootRef: Z,
|
157
|
-
isVisible:
|
158
|
-
}] =
|
156
|
+
isVisible: I
|
157
|
+
}] = he({
|
159
158
|
rootMargin: Le
|
160
159
|
});
|
161
|
-
|
162
|
-
if (!(
|
160
|
+
de(() => {
|
161
|
+
if (!(I && e.hasNextPage))
|
163
162
|
return;
|
164
163
|
const t = setTimeout(() => {
|
165
164
|
e.loadMore();
|
@@ -167,7 +166,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
167
166
|
return () => {
|
168
167
|
clearTimeout(t);
|
169
168
|
};
|
170
|
-
}, [
|
169
|
+
}, [I]);
|
171
170
|
const $ = L(() => {
|
172
171
|
const o = e.hasNextPage ? {
|
173
172
|
displayValue: A,
|
@@ -178,10 +177,10 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
178
177
|
} : null;
|
179
178
|
return [...e.items, ...O, o, t].filter(Boolean);
|
180
179
|
}, [e.hasNextPage, e.hasError, e.isEmpty, e.items, O]);
|
181
|
-
return /* @__PURE__ */ r(
|
180
|
+
return /* @__PURE__ */ r(m, {
|
182
181
|
as: "input",
|
183
182
|
...U,
|
184
|
-
ref: ce(b,
|
183
|
+
ref: ce(b, h),
|
185
184
|
className: T({
|
186
185
|
[a.disabled]: _
|
187
186
|
}, j),
|
@@ -192,9 +191,9 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
192
191
|
focusLoop: !1,
|
193
192
|
getPopoverRef: Z,
|
194
193
|
loading: e.isReloading,
|
195
|
-
loadingAriaLabel:
|
194
|
+
loadingAriaLabel: z || u(i.loadingAriaLabel),
|
196
195
|
multiselect: l,
|
197
|
-
noResultMessage:
|
196
|
+
noResultMessage: d,
|
198
197
|
onFocus: q,
|
199
198
|
onInputValueChange: Q,
|
200
199
|
onValueChange: H,
|
@@ -204,5 +203,5 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
204
203
|
});
|
205
204
|
});
|
206
205
|
export {
|
207
|
-
|
206
|
+
we as ComboboxWithApiPagination
|
208
207
|
};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { Combobox as
|
1
|
+
import { Combobox as n, ComboboxCancel as s } from "@ariakit/react";
|
2
2
|
import { IconButton as l, Divider as i } from "@box/blueprint-web";
|
3
3
|
import { Search as m, XMark as p } from "@box/blueprint-web-assets/icons/Fill";
|
4
4
|
import { IconIconOnLightSecondary as u, IconCtaIcon as d } from "@box/blueprint-web-assets/tokens/tokens";
|
5
|
-
import {
|
5
|
+
import { useIntl as h } from "react-intl";
|
6
6
|
import { s as o } from "../../../../chunks/filter-dropdown-menu.module.js";
|
7
7
|
import I from "./messages.js";
|
8
8
|
import { jsxs as r, Fragment as f, jsx as e } from "react/jsx-runtime";
|
@@ -11,7 +11,7 @@ const b = () => /* @__PURE__ */ e(p, {
|
|
11
11
|
}), x = (a) => {
|
12
12
|
const {
|
13
13
|
...t
|
14
|
-
} = a,
|
14
|
+
} = a, c = h().formatMessage(I.cancelButtonAriaLabel);
|
15
15
|
return /* @__PURE__ */ r(f, {
|
16
16
|
children: [/* @__PURE__ */ r("div", {
|
17
17
|
className: o.search,
|
@@ -19,14 +19,14 @@ const b = () => /* @__PURE__ */ e(p, {
|
|
19
19
|
className: o.searchIcon,
|
20
20
|
color: u,
|
21
21
|
role: "presentation"
|
22
|
-
}), /* @__PURE__ */ e(
|
22
|
+
}), /* @__PURE__ */ e(n, {
|
23
23
|
"aria-haspopup": "false",
|
24
24
|
autoSelect: !0,
|
25
25
|
className: o.searchInput,
|
26
26
|
...t
|
27
|
-
}), /* @__PURE__ */ e(
|
27
|
+
}), /* @__PURE__ */ e(s, {
|
28
28
|
render: /* @__PURE__ */ e(l, {
|
29
|
-
"aria-label":
|
29
|
+
"aria-label": c,
|
30
30
|
className: o.clearSearchIcon,
|
31
31
|
color: d,
|
32
32
|
icon: b,
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { TriggerButton as v, Text as C, ScrollableContainer as N, Divider as x } from "@box/blueprint-web";
|
2
|
-
import {
|
2
|
+
import { useIntl as B } from "react-intl";
|
3
3
|
import { SelectProvider as b, Select as I, SelectPopover as k, SelectItem as g, SelectItemCheck as M } from "@ariakit/react";
|
4
4
|
import { Space1 as S } from "@box/blueprint-web-assets/tokens/px-tokens";
|
5
5
|
import { useEffect as y } from "react";
|
6
6
|
import D from "clsx";
|
7
7
|
import { Checkmark as p } from "@box/blueprint-web-assets/icons/Fill";
|
8
|
-
import { getVisibleTemplates as j, getTemplateDisplayName as
|
8
|
+
import { getVisibleTemplates as j, getTemplateDisplayName as _ } from "../../utils/utils.js";
|
9
9
|
import s from "./messages.js";
|
10
10
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
11
11
|
import '../../../../styles/filter-instances-dropdown.css';const w = "_details_19fcm_1", F = "_triggerContainer_19fcm_5", O = "_triggerButton_19fcm_10", P = "_popover_19fcm_16", L = "_divider_19fcm_33", V = "_scrollableContainer_19fcm_36", z = "_item_19fcm_40", E = "_indicator_19fcm_67", G = "_indicatorIcon_19fcm_76", R = "_testContainer_19fcm_80", t = {
|
@@ -21,11 +21,11 @@ import '../../../../styles/filter-instances-dropdown.css';const w = "_details_19
|
|
21
21
|
testContainer: R
|
22
22
|
}, q = parseInt(S, 10);
|
23
23
|
function $({
|
24
|
-
appliedTemplates:
|
24
|
+
appliedTemplates: f,
|
25
25
|
selectedTemplates: c,
|
26
26
|
setSelectedTemplates: l
|
27
27
|
}) {
|
28
|
-
const a = B(), d = a.formatMessage(s.customMetadataName), n = j(
|
28
|
+
const a = B(), d = a.formatMessage(s.customMetadataName), n = j(f), i = c.length, m = n.length, u = i === 0 ? a.formatMessage(s.allTemplatesTriggerButtonText) : a.formatMessage(s.selectedTemplatesTriggerButtonText, {
|
29
29
|
selectedTemplatesNumber: i,
|
30
30
|
visibleTemplatesNumber: m
|
31
31
|
}), h = () => {
|
@@ -42,7 +42,7 @@ function $({
|
|
42
42
|
render: /* @__PURE__ */ e(v, {
|
43
43
|
caretDirection: "down",
|
44
44
|
className: t.triggerButton,
|
45
|
-
label:
|
45
|
+
label: u,
|
46
46
|
size: "small",
|
47
47
|
variant: "tertiary",
|
48
48
|
"data-target-id": "TriggerButton-allTemplatesTriggerButtonText|selectedTemplatesTriggerButtonText"
|
@@ -53,7 +53,7 @@ function $({
|
|
53
53
|
color: "textOnLightSecondary",
|
54
54
|
"data-testid": "detailsList",
|
55
55
|
variant: "caption",
|
56
|
-
children: n.filter((r) => c.some((T) => T === r.id)).map((r) =>
|
56
|
+
children: n.filter((r) => c.some((T) => T === r.id)).map((r) => _(r, d)).join(", ")
|
57
57
|
})]
|
58
58
|
}), /* @__PURE__ */ e(k, {
|
59
59
|
className: t.popover,
|
@@ -83,7 +83,7 @@ function $({
|
|
83
83
|
children: /* @__PURE__ */ e(p, {
|
84
84
|
className: t.indicatorIcon
|
85
85
|
})
|
86
|
-
}),
|
86
|
+
}), _(r, d)]
|
87
87
|
}, r.id))]
|
88
88
|
})
|
89
89
|
})]
|
@@ -1,17 +1,16 @@
|
|
1
|
-
import { Text as
|
1
|
+
import { Text as s, IconButton as c, DropdownMenu as a } from "@box/blueprint-web";
|
2
2
|
import { Checkmark as m, Ellipsis as f } from "@box/blueprint-web-assets/icons/Fill";
|
3
|
-
import {
|
3
|
+
import { useIntl as I, FormattedMessage as r } from "react-intl";
|
4
4
|
import t from "./messages.js";
|
5
5
|
import { formatSuggestionValue as w } from "./utils.js";
|
6
6
|
import { jsx as e, jsxs as i, Fragment as u } from "react/jsx-runtime";
|
7
|
-
import
|
8
|
-
import '../../../../../../styles/ai-suggestion-field.css';const C = "_wrapperGradient_t2yak_1", _ = "_wrapper_t2yak_1", M = "_buttons_t2yak_18", b = "_selectTrigger_t2yak_22", o = {
|
7
|
+
import '../../../../../../styles/ai-suggestion-field.css';const C = "_wrapperGradient_t2yak_1", _ = "_wrapper_t2yak_1", b = "_buttons_t2yak_18", k = "_selectTrigger_t2yak_22", o = {
|
9
8
|
wrapperGradient: C,
|
10
9
|
wrapper: _,
|
11
|
-
buttons:
|
12
|
-
selectTrigger:
|
10
|
+
buttons: b,
|
11
|
+
selectTrigger: k
|
13
12
|
};
|
14
|
-
function
|
13
|
+
function N({
|
15
14
|
aiSuggestion: S,
|
16
15
|
onAiSuggestionAppend: g,
|
17
16
|
onAiSuggestionReplace: d,
|
@@ -19,13 +18,13 @@ function D({
|
|
19
18
|
type: n,
|
20
19
|
isSameValue: h
|
21
20
|
}) {
|
22
|
-
const
|
21
|
+
const l = I();
|
23
22
|
return /* @__PURE__ */ e("div", {
|
24
23
|
className: o.wrapperGradient,
|
25
24
|
children: /* @__PURE__ */ e("div", {
|
26
25
|
className: o.wrapper,
|
27
26
|
children: h ? /* @__PURE__ */ i(u, {
|
28
|
-
children: [/* @__PURE__ */ e(
|
27
|
+
children: [/* @__PURE__ */ e(s, {
|
29
28
|
as: "p",
|
30
29
|
color: "textOnLightSecondary",
|
31
30
|
variant: "caption",
|
@@ -35,7 +34,7 @@ function D({
|
|
35
34
|
}), /* @__PURE__ */ e("div", {
|
36
35
|
className: o.buttons,
|
37
36
|
children: /* @__PURE__ */ e(c, {
|
38
|
-
"aria-label":
|
37
|
+
"aria-label": l.formatMessage(t.aiSuggestionConfirm),
|
39
38
|
icon: m,
|
40
39
|
onClick: p,
|
41
40
|
size: "x-small",
|
@@ -44,24 +43,24 @@ function D({
|
|
44
43
|
})]
|
45
44
|
}) : /* @__PURE__ */ i(u, {
|
46
45
|
children: [/* @__PURE__ */ i("div", {
|
47
|
-
children: [/* @__PURE__ */ e(
|
46
|
+
children: [/* @__PURE__ */ e(s, {
|
48
47
|
as: "p",
|
49
48
|
color: "textOnLightSecondary",
|
50
49
|
variant: "caption",
|
51
50
|
children: /* @__PURE__ */ e(r, {
|
52
51
|
...t.aiSuggestionCaption
|
53
52
|
})
|
54
|
-
}), /* @__PURE__ */ e(
|
53
|
+
}), /* @__PURE__ */ e(s, {
|
55
54
|
as: "p",
|
56
55
|
children: w(S, {
|
57
56
|
type: n,
|
58
|
-
locale:
|
57
|
+
locale: l.locale
|
59
58
|
})
|
60
59
|
})]
|
61
60
|
}), /* @__PURE__ */ i("div", {
|
62
61
|
className: o.buttons,
|
63
62
|
children: [/* @__PURE__ */ e(c, {
|
64
|
-
"aria-label":
|
63
|
+
"aria-label": l.formatMessage(n === "multiSelect" ? t.aiSuggestionAppend : t.aiSuggestionClearAndReplace),
|
65
64
|
"data-target-id": n === "multiSelect" ? "IconButton-aiSuggestionAppend" : "IconButton-aiSuggestionClearAndReplace",
|
66
65
|
icon: m,
|
67
66
|
onClick: n === "multiSelect" ? g : d,
|
@@ -70,7 +69,7 @@ function D({
|
|
70
69
|
children: [/* @__PURE__ */ e(a.Trigger, {
|
71
70
|
className: o.selectTrigger,
|
72
71
|
children: /* @__PURE__ */ e(c, {
|
73
|
-
"aria-label":
|
72
|
+
"aria-label": l.formatMessage(t.aiSuggestionOptions),
|
74
73
|
icon: f,
|
75
74
|
"data-target-id": "IconButton-aiSuggestionOptions"
|
76
75
|
})
|
@@ -102,5 +101,5 @@ function D({
|
|
102
101
|
});
|
103
102
|
}
|
104
103
|
export {
|
105
|
-
|
104
|
+
N as AiSuggestionField
|
106
105
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DateI18nProvider as L, DatePicker as P } from "@box/blueprint-web";
|
2
2
|
import { useFormikContext as A, getIn as I, Field as T } from "formik";
|
3
3
|
import { forwardRef as w, useMemo as S } from "react";
|
4
|
-
import {
|
4
|
+
import { useIntl as V } from "react-intl";
|
5
5
|
import { convertIsoStringToCalendarDate as N, convertCalendarDateToISOString as O } from "../../../../utils/convertDate.js";
|
6
6
|
import a from "../../../../messages.js";
|
7
7
|
import { g as B } from "../../../../../../chunks/utils2.js";
|