@box/metadata-editor 0.84.10 → 0.85.2
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/filter-dropdown-menu.module.js +4 -5
- package/chunks/index.js +292 -0
- package/chunks/message.js +18 -0
- package/chunks/taxonomy-ancestor-status-pill.js +33 -33
- package/chunks/utils2.js +7 -8
- 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 +29 -29
- 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 +10 -11
- package/esm/lib/components/filter-instances-dropdown/messages.js +1 -1
- package/esm/lib/components/interactive-header-text/interactive-header-text.js +8 -9
- package/esm/lib/components/interactive-text/interactive-text.js +11 -12
- package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.js +14 -14
- 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 +28 -27
- 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 +2 -3
- package/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +567 -70
- package/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +19 -18
- 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/custom-instance/custom-instance.js +13 -14
- 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 +4 -5
- 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 -14
- 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/metadata-instance-form.js +27 -28
- 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 +10 -11
- 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 +4 -5
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +16 -17
- package/esm/lib/components/metadata-instance-list/metadata-instance-list.js +8 -9
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +7 -8
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +3 -4
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +8 -9
- 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 +4 -3
- 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 +6 -7
- 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 +10 -11
- package/esm/lib/components/unsaved-changes-modal/messages.js +1 -1
- package/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +19 -18
- package/esm/lib/messages.js +1 -1
- package/esm/lib/metadata-editor.js +4 -5
- package/i18n/en-x-pseudo.js +111 -111
- package/i18n/en-x-pseudo.properties +111 -111
- package/package.json +5 -5
- package/styles/ai-suggestion-field.css +1 -1
- package/styles/utils.css +1 -1
- package/types/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.d.ts +1 -1
- package/types/lib/components/add-metadata-template-dropdown/types.d.ts +1 -1
- package/types/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.d.ts +5 -5
- package/types/lib/components/combobox-with-api-pagination/types.d.ts +2 -2
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/index.d.ts +6 -6
- package/types/lib/components/filter-instances-dropdown/filter-instances-dropdown.d.ts +1 -1
- package/types/lib/components/filter-instances-dropdown/types.d.ts +1 -1
- package/types/lib/components/interactive-header-text/interactive-header-text.d.ts +1 -1
- package/types/lib/components/interactive-text/interactive-text.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/types.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/utils.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-date-field/types.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/types.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/editor-field-types.d.ts +6 -6
- package/types/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.d.ts +4 -4
- package/types/lib/components/metadata-editor-fields/metadata-editor-fields.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/types.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/utils.d.ts +1 -1
- package/types/lib/components/metadata-empty-state/metadata-empty-state.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form-card-wrapper.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +3 -3
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.d.ts +3 -3
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/types.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/types.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/types.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +2 -2
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +2 -2
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/types.d.ts +2 -2
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/types.d.ts +2 -2
- package/types/lib/components/unsaved-changes-modal/types.d.ts +1 -1
- package/types/lib/components/unsaved-changes-modal/unsaved-changes-modal.d.ts +1 -1
- package/types/lib/defaults.d.ts +1 -1
- package/types/lib/mappers.d.ts +2 -2
- package/types/lib/test-utils/formik-wrapper.d.ts +3 -3
- package/types/lib/test-utils/sample-data.d.ts +1 -1
- package/types/lib/test-utils/test-utils.d.ts +1 -1
- package/types/lib/types.d.ts +1 -1
- package/types/lib/utils/api-wrapper.d.ts +1 -1
- package/types/lib/utils/autofill-context.d.ts +2 -2
- package/types/lib/utils/convertDate.d.ts +1 -1
- package/types/lib/utils/utils.d.ts +1 -1
@@ -1,18 +1,18 @@
|
|
1
|
-
import "../../../../styles/combobox-with-api-pagination.css";
|
2
1
|
import { ComboboxItemValue as oe } from "@ariakit/react";
|
3
2
|
import { Combobox as d, LoadingIndicator as te, InlineNotice as re, Text as ne } from "@box/blueprint-web";
|
4
3
|
import { Search as ie, Loader as se } from "@box/blueprint-web-assets/icons/Fill";
|
5
|
-
import { IconIconOnLightSecondary as ae, Size6 as
|
4
|
+
import { IconIconOnLightSecondary as ae, Size6 as I, Size1 as le } from "@box/blueprint-web-assets/tokens/tokens";
|
6
5
|
import { useForkRef as ce } from "@box/blueprint-web/lib-esm/utils/useForkRef";
|
7
6
|
import T from "clsx";
|
8
7
|
import { forwardRef as F, useRef as C, useCallback as ue, useMemo as L, useEffect as me } from "react";
|
9
|
-
import {
|
8
|
+
import { u as P } from "../../../../chunks/index.js";
|
10
9
|
import i from "./messages.js";
|
11
10
|
import { useAsyncList as de } from "./use-async-list.js";
|
12
11
|
import { useControllableState as pe } from "./utils/use-controllable-state.js";
|
13
|
-
import { useTrackVisibility as
|
14
|
-
import { jsx as r, jsxs as
|
15
|
-
|
12
|
+
import { useTrackVisibility as fe } from "./utils/use-intersection-observer.js";
|
13
|
+
import { jsx as r, jsxs as V, Fragment as he } from "react/jsx-runtime";
|
14
|
+
import { M as N } from "../../../../chunks/message.js";
|
15
|
+
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
16
|
container: be,
|
17
17
|
disabled: ge,
|
18
18
|
highlightOptionText: xe,
|
@@ -24,25 +24,25 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
24
24
|
onTryAgain: y
|
25
25
|
}, p) => {
|
26
26
|
const {
|
27
|
-
formatMessage:
|
27
|
+
formatMessage: f
|
28
28
|
} = P();
|
29
|
-
return /* @__PURE__ */
|
29
|
+
return /* @__PURE__ */ V(he, {
|
30
30
|
children: [/* @__PURE__ */ r(re, {
|
31
31
|
variant: "error",
|
32
|
-
variantIconAriaLabel:
|
33
|
-
children: /* @__PURE__ */ r(
|
32
|
+
variantIconAriaLabel: f(i.loadingResultsErrorIconLabel),
|
33
|
+
children: /* @__PURE__ */ r(N, {
|
34
34
|
...i.loadingResultsErrorMessage
|
35
35
|
})
|
36
36
|
}), /* @__PURE__ */ r(d.Option, {
|
37
37
|
ref: p,
|
38
38
|
className: a.errorComboboxOption,
|
39
39
|
onClick: y,
|
40
|
-
children: /* @__PURE__ */
|
40
|
+
children: /* @__PURE__ */ V(ne, {
|
41
41
|
as: "span",
|
42
42
|
className: a.errorComboboxOptionText,
|
43
43
|
color: "textOnLightLink",
|
44
44
|
variant: "bodyDefaultBold",
|
45
|
-
children: [/* @__PURE__ */ r(
|
45
|
+
children: [/* @__PURE__ */ r(N, {
|
46
46
|
...i.loadingResultsErrorAction
|
47
47
|
}), /* @__PURE__ */ r(se, {
|
48
48
|
color: "currentColor",
|
@@ -54,22 +54,22 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
54
54
|
});
|
55
55
|
}), A = "__LOADING__", E = "__LOADING_ERROR__", Le = "0px 0px 20px 0px", Ae = /* @__PURE__ */ r(ie, {
|
56
56
|
color: ae,
|
57
|
-
height:
|
57
|
+
height: I,
|
58
58
|
role: "presentation",
|
59
59
|
style: {
|
60
60
|
padding: le,
|
61
61
|
boxSizing: "border-box"
|
62
62
|
},
|
63
|
-
width:
|
64
|
-
}),
|
63
|
+
width: I
|
64
|
+
}), ze = /* @__PURE__ */ F(function(p, f) {
|
65
65
|
const {
|
66
66
|
defaultFetcher: k,
|
67
|
-
onInputValueChange:
|
67
|
+
onInputValueChange: h,
|
68
68
|
value: D,
|
69
69
|
onValueChange: w,
|
70
|
-
noResultMessage:
|
71
|
-
defaultValue:
|
72
|
-
loadingAriaLabel:
|
70
|
+
noResultMessage: z,
|
71
|
+
defaultValue: B = [],
|
72
|
+
loadingAriaLabel: W,
|
73
73
|
multiselect: l = !1,
|
74
74
|
disabled: G,
|
75
75
|
className: j,
|
@@ -96,7 +96,7 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
96
96
|
v.current || (e.reload(), v.current = !0);
|
97
97
|
}, []), [n, x] = pe({
|
98
98
|
prop: D,
|
99
|
-
defaultProp:
|
99
|
+
defaultProp: B,
|
100
100
|
onChange: w
|
101
101
|
}), _ = !l && n.length === 1, H = (o) => {
|
102
102
|
o === void 0 ? (x([]), g.current || (e.search(""), g.current = !0)) : Array.isArray(o) ? x(o) : x([o]);
|
@@ -139,7 +139,7 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
139
139
|
})
|
140
140
|
});
|
141
141
|
}, Q = (o) => {
|
142
|
-
if (
|
142
|
+
if (h == null || h(o), _ && o === "") {
|
143
143
|
g.current = !1;
|
144
144
|
return;
|
145
145
|
}
|
@@ -151,15 +151,15 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
151
151
|
let m;
|
152
152
|
e.hasError && !e.isLoading ? m = /* @__PURE__ */ r(S, {
|
153
153
|
onTryAgain: X
|
154
|
-
}) : e.isEmpty && !e.isLoading ? m =
|
154
|
+
}) : e.isEmpty && !e.isLoading ? m = z || u(i.noResults) : m = void 0;
|
155
155
|
const [Y, {
|
156
156
|
rootRef: Z,
|
157
|
-
isVisible:
|
158
|
-
}] =
|
157
|
+
isVisible: M
|
158
|
+
}] = fe({
|
159
159
|
rootMargin: Le
|
160
160
|
});
|
161
161
|
me(() => {
|
162
|
-
if (!(
|
162
|
+
if (!(M && e.hasNextPage))
|
163
163
|
return;
|
164
164
|
const t = setTimeout(() => {
|
165
165
|
e.loadMore();
|
@@ -167,7 +167,7 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
167
167
|
return () => {
|
168
168
|
clearTimeout(t);
|
169
169
|
};
|
170
|
-
}, [
|
170
|
+
}, [M]);
|
171
171
|
const $ = L(() => {
|
172
172
|
const o = e.hasNextPage ? {
|
173
173
|
displayValue: A,
|
@@ -181,7 +181,7 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
181
181
|
return /* @__PURE__ */ r(d, {
|
182
182
|
as: "input",
|
183
183
|
...U,
|
184
|
-
ref: ce(b,
|
184
|
+
ref: ce(b, f),
|
185
185
|
className: T({
|
186
186
|
[a.disabled]: _
|
187
187
|
}, j),
|
@@ -192,7 +192,7 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
192
192
|
focusLoop: !1,
|
193
193
|
getPopoverRef: Z,
|
194
194
|
loading: e.isReloading,
|
195
|
-
loadingAriaLabel:
|
195
|
+
loadingAriaLabel: W || u(i.loadingAriaLabel),
|
196
196
|
multiselect: l,
|
197
197
|
noResultMessage: m,
|
198
198
|
onFocus: q,
|
@@ -204,5 +204,5 @@ const be = "_container_1m7se_1", ge = "_disabled_1m7se_7", xe = "_highlightOptio
|
|
204
204
|
});
|
205
205
|
});
|
206
206
|
export {
|
207
|
-
|
207
|
+
ze as ComboboxWithApiPagination
|
208
208
|
};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { Combobox as
|
1
|
+
import { Combobox as c, ComboboxCancel as n } 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 { u as h } from "../../../../chunks/index.js";
|
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, s = 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(c, {
|
23
23
|
"aria-haspopup": "false",
|
24
24
|
autoSelect: !0,
|
25
25
|
className: o.searchInput,
|
26
26
|
...t
|
27
|
-
}), /* @__PURE__ */ e(
|
27
|
+
}), /* @__PURE__ */ e(n, {
|
28
28
|
render: /* @__PURE__ */ e(l, {
|
29
|
-
"aria-label":
|
29
|
+
"aria-label": s,
|
30
30
|
className: o.clearSearchIcon,
|
31
31
|
color: d,
|
32
32
|
icon: b,
|
@@ -1,15 +1,14 @@
|
|
1
|
-
import "../../../../styles/filter-instances-dropdown.css";
|
2
1
|
import { TriggerButton as v, Text as C, ScrollableContainer as N, Divider as x } from "@box/blueprint-web";
|
3
|
-
import {
|
2
|
+
import { u as B } from "../../../../chunks/index.js";
|
4
3
|
import { SelectProvider as b, Select as I, SelectPopover as k, SelectItem as g, SelectItemCheck as M } from "@ariakit/react";
|
5
4
|
import { Space1 as S } from "@box/blueprint-web-assets/tokens/px-tokens";
|
6
5
|
import { useEffect as y } from "react";
|
7
6
|
import D from "clsx";
|
8
7
|
import { Checkmark as p } from "@box/blueprint-web-assets/icons/Fill";
|
9
|
-
import { getVisibleTemplates as j, getTemplateDisplayName as
|
8
|
+
import { getVisibleTemplates as j, getTemplateDisplayName as u } from "../../utils/utils.js";
|
10
9
|
import s from "./messages.js";
|
11
10
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
12
|
-
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 = {
|
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 = {
|
13
12
|
details: w,
|
14
13
|
triggerContainer: F,
|
15
14
|
triggerButton: O,
|
@@ -21,12 +20,12 @@ const w = "_details_19fcm_1", F = "_triggerContainer_19fcm_5", O = "_triggerButt
|
|
21
20
|
indicatorIcon: G,
|
22
21
|
testContainer: R
|
23
22
|
}, q = parseInt(S, 10);
|
24
|
-
function
|
25
|
-
appliedTemplates:
|
23
|
+
function $({
|
24
|
+
appliedTemplates: _,
|
26
25
|
selectedTemplates: c,
|
27
26
|
setSelectedTemplates: l
|
28
27
|
}) {
|
29
|
-
const a = B(), d = a.formatMessage(s.customMetadataName), n = j(
|
28
|
+
const a = B(), d = a.formatMessage(s.customMetadataName), n = j(_), i = c.length, m = n.length, f = i === 0 ? a.formatMessage(s.allTemplatesTriggerButtonText) : a.formatMessage(s.selectedTemplatesTriggerButtonText, {
|
30
29
|
selectedTemplatesNumber: i,
|
31
30
|
visibleTemplatesNumber: m
|
32
31
|
}), h = () => {
|
@@ -43,7 +42,7 @@ function tt({
|
|
43
42
|
render: /* @__PURE__ */ e(v, {
|
44
43
|
caretDirection: "down",
|
45
44
|
className: t.triggerButton,
|
46
|
-
label:
|
45
|
+
label: f,
|
47
46
|
size: "small",
|
48
47
|
variant: "tertiary",
|
49
48
|
"data-target-id": "TriggerButton-allTemplatesTriggerButtonText|selectedTemplatesTriggerButtonText"
|
@@ -54,7 +53,7 @@ function tt({
|
|
54
53
|
color: "textOnLightSecondary",
|
55
54
|
"data-testid": "detailsList",
|
56
55
|
variant: "caption",
|
57
|
-
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) => u(r, d)).join(", ")
|
58
57
|
})]
|
59
58
|
}), /* @__PURE__ */ e(k, {
|
60
59
|
className: t.popover,
|
@@ -84,12 +83,12 @@ function tt({
|
|
84
83
|
children: /* @__PURE__ */ e(p, {
|
85
84
|
className: t.indicatorIcon
|
86
85
|
})
|
87
|
-
}),
|
86
|
+
}), u(r, d)]
|
88
87
|
}, r.id))]
|
89
88
|
})
|
90
89
|
})]
|
91
90
|
});
|
92
91
|
}
|
93
92
|
export {
|
94
|
-
|
93
|
+
$ as FilterInstancesDropdown
|
95
94
|
};
|
@@ -1,19 +1,18 @@
|
|
1
|
-
import "../../../../styles/interactive-header-text.css";
|
2
1
|
import { Focusable as l } from "@ariakit/react";
|
3
|
-
import { useFullTextTooltip as
|
4
|
-
import
|
2
|
+
import { useFullTextTooltip as n, Text as i } from "@box/blueprint-web";
|
3
|
+
import m from "clsx";
|
5
4
|
import { useRef as p } from "react";
|
6
5
|
import { jsx as e, Fragment as c } from "react/jsx-runtime";
|
7
|
-
const d = "_header_d9pl2_1", f = {
|
6
|
+
import '../../../../styles/interactive-header-text.css';const d = "_header_d9pl2_1", f = {
|
8
7
|
header: d
|
9
|
-
},
|
8
|
+
}, _ = ({
|
10
9
|
className: o,
|
11
10
|
title: r
|
12
11
|
}) => {
|
13
12
|
const t = p(null), {
|
14
13
|
Wrapper: a,
|
15
14
|
wrapperProps: s
|
16
|
-
} =
|
15
|
+
} = n({
|
17
16
|
ref: t,
|
18
17
|
textValue: r
|
19
18
|
});
|
@@ -21,10 +20,10 @@ const d = "_header_d9pl2_1", f = {
|
|
21
20
|
children: /* @__PURE__ */ e(a, {
|
22
21
|
...s,
|
23
22
|
children: /* @__PURE__ */ e(l, {
|
24
|
-
render: /* @__PURE__ */ e(
|
23
|
+
render: /* @__PURE__ */ e(i, {
|
25
24
|
ref: t,
|
26
25
|
as: "h4",
|
27
|
-
className:
|
26
|
+
className: m(f.header, o),
|
28
27
|
variant: "titleMedium",
|
29
28
|
children: r
|
30
29
|
})
|
@@ -33,5 +32,5 @@ const d = "_header_d9pl2_1", f = {
|
|
33
32
|
});
|
34
33
|
};
|
35
34
|
export {
|
36
|
-
|
35
|
+
_ as default
|
37
36
|
};
|
@@ -1,32 +1,31 @@
|
|
1
|
-
import "
|
2
|
-
import { Focusable as n } from "@ariakit/react";
|
1
|
+
import { Focusable as o } from "@ariakit/react";
|
3
2
|
import { Tooltip as a, Text as s } from "@box/blueprint-web";
|
4
3
|
import m from "clsx";
|
5
4
|
import { jsx as t } from "react/jsx-runtime";
|
6
|
-
const x = "_interactiveText_2jv0p_1", l = {
|
5
|
+
import '../../../../styles/interactive-text.css';const x = "_interactiveText_2jv0p_1", l = {
|
7
6
|
interactiveText: x
|
8
|
-
},
|
7
|
+
}, _ = ({
|
9
8
|
tooltipText: r,
|
10
|
-
className:
|
11
|
-
children:
|
9
|
+
className: c,
|
10
|
+
children: i,
|
12
11
|
...e
|
13
12
|
}) => {
|
14
13
|
const {
|
15
|
-
as:
|
14
|
+
as: n = "span"
|
16
15
|
} = e;
|
17
16
|
return /* @__PURE__ */ t(a, {
|
18
17
|
__checkInteractivity: !1,
|
19
18
|
content: r,
|
20
|
-
children: /* @__PURE__ */ t(
|
19
|
+
children: /* @__PURE__ */ t(o, {
|
21
20
|
render: /* @__PURE__ */ t(s, {
|
22
|
-
as:
|
23
|
-
className: m(l.interactiveText,
|
21
|
+
as: n,
|
22
|
+
className: m(l.interactiveText, c),
|
24
23
|
...e,
|
25
|
-
children:
|
24
|
+
children: i
|
26
25
|
})
|
27
26
|
})
|
28
27
|
});
|
29
28
|
};
|
30
29
|
export {
|
31
|
-
|
30
|
+
_ as default
|
32
31
|
};
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import "
|
2
|
-
import { Text as s, IconButton as c, DropdownMenu as a } from "@box/blueprint-web";
|
1
|
+
import { Text as l, IconButton as c, DropdownMenu as a } from "@box/blueprint-web";
|
3
2
|
import { Checkmark as m, Ellipsis as f } from "@box/blueprint-web-assets/icons/Fill";
|
4
|
-
import {
|
3
|
+
import { u as I } from "../../../../../../chunks/index.js";
|
5
4
|
import t from "./messages.js";
|
6
5
|
import { formatSuggestionValue as w } from "./utils.js";
|
7
6
|
import { jsx as e, jsxs as i, Fragment as u } from "react/jsx-runtime";
|
8
|
-
|
7
|
+
import { M as r } from "../../../../../../chunks/message.js";
|
8
|
+
import '../../../../../../styles/ai-suggestion-field.css';const C = "_wrapperGradient_t2yak_1", _ = "_wrapper_t2yak_1", M = "_buttons_t2yak_18", b = "_selectTrigger_t2yak_22", o = {
|
9
9
|
wrapperGradient: C,
|
10
10
|
wrapper: _,
|
11
|
-
buttons:
|
12
|
-
selectTrigger:
|
11
|
+
buttons: M,
|
12
|
+
selectTrigger: b
|
13
13
|
};
|
14
14
|
function D({
|
15
15
|
aiSuggestion: S,
|
@@ -19,13 +19,13 @@ function D({
|
|
19
19
|
type: n,
|
20
20
|
isSameValue: h
|
21
21
|
}) {
|
22
|
-
const
|
22
|
+
const s = I();
|
23
23
|
return /* @__PURE__ */ e("div", {
|
24
24
|
className: o.wrapperGradient,
|
25
25
|
children: /* @__PURE__ */ e("div", {
|
26
26
|
className: o.wrapper,
|
27
27
|
children: h ? /* @__PURE__ */ i(u, {
|
28
|
-
children: [/* @__PURE__ */ e(
|
28
|
+
children: [/* @__PURE__ */ e(l, {
|
29
29
|
as: "p",
|
30
30
|
color: "textOnLightSecondary",
|
31
31
|
variant: "caption",
|
@@ -35,7 +35,7 @@ function D({
|
|
35
35
|
}), /* @__PURE__ */ e("div", {
|
36
36
|
className: o.buttons,
|
37
37
|
children: /* @__PURE__ */ e(c, {
|
38
|
-
"aria-label":
|
38
|
+
"aria-label": s.formatMessage(t.aiSuggestionConfirm),
|
39
39
|
icon: m,
|
40
40
|
onClick: p,
|
41
41
|
size: "x-small",
|
@@ -44,24 +44,24 @@ function D({
|
|
44
44
|
})]
|
45
45
|
}) : /* @__PURE__ */ i(u, {
|
46
46
|
children: [/* @__PURE__ */ i("div", {
|
47
|
-
children: [/* @__PURE__ */ e(
|
47
|
+
children: [/* @__PURE__ */ e(l, {
|
48
48
|
as: "p",
|
49
49
|
color: "textOnLightSecondary",
|
50
50
|
variant: "caption",
|
51
51
|
children: /* @__PURE__ */ e(r, {
|
52
52
|
...t.aiSuggestionCaption
|
53
53
|
})
|
54
|
-
}), /* @__PURE__ */ e(
|
54
|
+
}), /* @__PURE__ */ e(l, {
|
55
55
|
as: "p",
|
56
56
|
children: w(S, {
|
57
57
|
type: n,
|
58
|
-
locale:
|
58
|
+
locale: s.locale
|
59
59
|
})
|
60
60
|
})]
|
61
61
|
}), /* @__PURE__ */ i("div", {
|
62
62
|
className: o.buttons,
|
63
63
|
children: [/* @__PURE__ */ e(c, {
|
64
|
-
"aria-label":
|
64
|
+
"aria-label": s.formatMessage(n === "multiSelect" ? t.aiSuggestionAppend : t.aiSuggestionClearAndReplace),
|
65
65
|
"data-target-id": n === "multiSelect" ? "IconButton-aiSuggestionAppend" : "IconButton-aiSuggestionClearAndReplace",
|
66
66
|
icon: m,
|
67
67
|
onClick: n === "multiSelect" ? g : d,
|
@@ -70,7 +70,7 @@ function D({
|
|
70
70
|
children: [/* @__PURE__ */ e(a.Trigger, {
|
71
71
|
className: o.selectTrigger,
|
72
72
|
children: /* @__PURE__ */ e(c, {
|
73
|
-
"aria-label":
|
73
|
+
"aria-label": s.formatMessage(t.aiSuggestionOptions),
|
74
74
|
icon: f,
|
75
75
|
"data-target-id": "IconButton-aiSuggestionOptions"
|
76
76
|
})
|
@@ -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 { u as V } from "../../../../../../chunks/index.js";
|
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";
|
@@ -1,12 +1,13 @@
|
|
1
|
-
import { Select as
|
1
|
+
import { Select as o, SELECT_EMPTY_VALUE as l } from "@box/blueprint-web";
|
2
2
|
import { useFormikContext as C, getIn as L, Field as P } from "formik";
|
3
3
|
import { forwardRef as $ } from "react";
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import { g as
|
7
|
-
import { jsx as t, jsxs as
|
4
|
+
import { u as b } from "../../../../../../chunks/index.js";
|
5
|
+
import i from "../../../../messages.js";
|
6
|
+
import { g as j } from "../../../../../../chunks/utils2.js";
|
7
|
+
import { jsx as t, jsxs as w } from "react/jsx-runtime";
|
8
|
+
import { M as I } from "../../../../../../chunks/message.js";
|
8
9
|
const U = /* @__PURE__ */ $(({
|
9
|
-
className:
|
10
|
+
className: c,
|
10
11
|
isAiSuggestionApplied: u,
|
11
12
|
description: p,
|
12
13
|
disableForm: f,
|
@@ -15,41 +16,41 @@ const U = /* @__PURE__ */ $(({
|
|
15
16
|
label: n,
|
16
17
|
onValueEdited: v,
|
17
18
|
options: g,
|
18
|
-
portalElement:
|
19
|
-
},
|
19
|
+
portalElement: M
|
20
|
+
}, E) => {
|
20
21
|
const {
|
21
|
-
setFieldValue:
|
22
|
-
values:
|
23
|
-
} = C(), V = b(), m = `${h ?? s}.value`,
|
22
|
+
setFieldValue: F,
|
23
|
+
values: x
|
24
|
+
} = C(), V = b(), m = `${h ?? s}.value`, r = g || L(x, `${s}.options`, []).map(({
|
24
25
|
key: a
|
25
|
-
}) => a),
|
26
|
+
}) => a), d = V.formatMessage(i.selectValuePlaceholder);
|
26
27
|
return /* @__PURE__ */ t("div", {
|
27
28
|
"data-testid": `${n}-field`,
|
28
29
|
children: /* @__PURE__ */ t(P, {
|
29
30
|
name: m,
|
30
31
|
children: ({
|
31
32
|
field: a
|
32
|
-
}) => /* @__PURE__ */ t(
|
33
|
-
ref:
|
34
|
-
className:
|
33
|
+
}) => /* @__PURE__ */ t(o, {
|
34
|
+
ref: E,
|
35
|
+
className: c,
|
35
36
|
disabled: f,
|
36
|
-
label:
|
37
|
+
label: j(n, p, u),
|
37
38
|
onValueChange: (e) => {
|
38
|
-
|
39
|
+
F(m, e === l ? "" : e), v();
|
39
40
|
},
|
40
|
-
placeholder:
|
41
|
+
placeholder: d,
|
41
42
|
...a,
|
42
|
-
value: a.value ===
|
43
|
-
children: /* @__PURE__ */
|
44
|
-
container:
|
43
|
+
value: a.value === l ? "" : a.value,
|
44
|
+
children: /* @__PURE__ */ w(o.Content, {
|
45
|
+
container: M,
|
45
46
|
onEscapeKeyDown: (e) => e.stopPropagation(),
|
46
|
-
children: [/* @__PURE__ */ t(
|
47
|
-
text:
|
48
|
-
value:
|
49
|
-
children: /* @__PURE__ */ t(
|
50
|
-
...
|
47
|
+
children: [/* @__PURE__ */ t(o.Option, {
|
48
|
+
text: d,
|
49
|
+
value: l,
|
50
|
+
children: /* @__PURE__ */ t(I, {
|
51
|
+
...i.selectValuePlaceholder
|
51
52
|
})
|
52
|
-
}),
|
53
|
+
}), r == null ? void 0 : r.map((e) => /* @__PURE__ */ t(o.Option, {
|
53
54
|
text: e,
|
54
55
|
value: e,
|
55
56
|
children: e
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
const
|
1
|
+
import { u as o } from "../../../../../../chunks/index.js";
|
2
|
+
import s from "../../../../messages.js";
|
3
|
+
const n = (t) => t != null && t.length ? /^[-+]?\d+(\.\d+)?$/.test(t) : !0, l = () => {
|
4
4
|
const t = o();
|
5
5
|
return {
|
6
6
|
validateFloats: (r) => {
|
7
|
-
if (!
|
8
|
-
return t.formatMessage(
|
7
|
+
if (!n(r))
|
8
|
+
return t.formatMessage(s.floatFieldInvalidValue);
|
9
9
|
}
|
10
10
|
};
|
11
11
|
};
|
12
12
|
export {
|
13
|
-
|
13
|
+
n as isFloatOrBlank,
|
14
14
|
l as useFloatValidation
|
15
15
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Combobox as w } from "@box/blueprint-web";
|
2
2
|
import { useFormikContext as x, getIn as M, Field as $ } from "formik";
|
3
3
|
import { forwardRef as I } from "react";
|
4
|
-
import {
|
4
|
+
import { u as j } from "../../../../../../chunks/index.js";
|
5
5
|
import k from "../../../../messages.js";
|
6
6
|
import { g as D } from "../../../../../../chunks/utils2.js";
|
7
7
|
import { fieldDefaultProps as O } from "../constants.js";
|
@@ -21,13 +21,13 @@ const E = /* @__PURE__ */ I(({
|
|
21
21
|
const {
|
22
22
|
setFieldValue: h,
|
23
23
|
values: F
|
24
|
-
} = x(), v = j(),
|
24
|
+
} = x(), v = j(), a = `${p ?? o}.value`, C = f || M(F, `${o}.options`, []).map(({
|
25
25
|
key: e
|
26
|
-
}) => e), L = (e,
|
26
|
+
}) => e), L = (e, r) => r.toLowerCase().includes(e.toLowerCase());
|
27
27
|
return /* @__PURE__ */ t("div", {
|
28
28
|
"data-testid": `${l}-field`,
|
29
29
|
children: /* @__PURE__ */ t($, {
|
30
|
-
name:
|
30
|
+
name: a,
|
31
31
|
children: ({
|
32
32
|
field: e
|
33
33
|
}) => {
|
@@ -44,7 +44,7 @@ const E = /* @__PURE__ */ I(({
|
|
44
44
|
multiselect: !0,
|
45
45
|
name: e.name,
|
46
46
|
onValueChange: (V) => {
|
47
|
-
h(
|
47
|
+
h(a, V), d();
|
48
48
|
},
|
49
49
|
options: C,
|
50
50
|
placeholder: b,
|