@box/metadata-editor 0.100.7 → 0.101.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/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import { ComboboxItemValue as oe } from "@ariakit/react";
|
2
|
-
import { Combobox as m,
|
3
|
-
import { Search as
|
4
|
-
import { IconIconOnLightSecondary as
|
5
|
-
import { useForkRef as ce } from "@box/blueprint-web/lib-esm/utils/useForkRef";
|
2
|
+
import { Combobox as m, useForkRef as te, LoadingIndicator as re, InlineNotice as ne, Text as ie } from "@box/blueprint-web";
|
3
|
+
import { Search as se, Loader as ae } from "@box/blueprint-web-assets/icons/Fill";
|
4
|
+
import { IconIconOnLightSecondary as le, Size6 as M, Size1 as ce } from "@box/blueprint-web-assets/tokens/tokens";
|
6
5
|
import T from "clsx";
|
7
6
|
import { forwardRef as F, useRef as C, useCallback as ue, useMemo as L, useEffect as de } from "react";
|
8
7
|
import { useIntl as P, FormattedMessage as V } from "react-intl";
|
@@ -26,7 +25,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
26
25
|
formatMessage: h
|
27
26
|
} = P();
|
28
27
|
return /* @__PURE__ */ N(fe, {
|
29
|
-
children: [/* @__PURE__ */ r(
|
28
|
+
children: [/* @__PURE__ */ r(ne, {
|
30
29
|
variant: "error",
|
31
30
|
variantIconAriaLabel: h(i.loadingResultsErrorIconLabel),
|
32
31
|
children: /* @__PURE__ */ r(V, {
|
@@ -36,14 +35,14 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
36
35
|
ref: p,
|
37
36
|
className: a.errorComboboxOption,
|
38
37
|
onClick: y,
|
39
|
-
children: /* @__PURE__ */ N(
|
38
|
+
children: /* @__PURE__ */ N(ie, {
|
40
39
|
as: "span",
|
41
40
|
className: a.errorComboboxOptionText,
|
42
41
|
color: "textOnLightLink",
|
43
42
|
variant: "bodyDefaultBold",
|
44
43
|
children: [/* @__PURE__ */ r(V, {
|
45
44
|
...i.loadingResultsErrorAction
|
46
|
-
}), /* @__PURE__ */ r(
|
45
|
+
}), /* @__PURE__ */ r(ae, {
|
47
46
|
color: "currentColor",
|
48
47
|
height: "12px",
|
49
48
|
width: "12px"
|
@@ -51,16 +50,16 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
51
50
|
})
|
52
51
|
})]
|
53
52
|
});
|
54
|
-
}), A = "__LOADING__", E = "__LOADING_ERROR__", Le = "0px 0px 20px 0px", Ae = /* @__PURE__ */ r(
|
55
|
-
color:
|
53
|
+
}), A = "__LOADING__", E = "__LOADING_ERROR__", Le = "0px 0px 20px 0px", Ae = /* @__PURE__ */ r(se, {
|
54
|
+
color: le,
|
56
55
|
height: M,
|
57
56
|
role: "presentation",
|
58
57
|
style: {
|
59
|
-
padding:
|
58
|
+
padding: ce,
|
60
59
|
boxSizing: "border-box"
|
61
60
|
},
|
62
61
|
width: M
|
63
|
-
}),
|
62
|
+
}), De = /* @__PURE__ */ F(function(p, h) {
|
64
63
|
const {
|
65
64
|
defaultFetcher: k,
|
66
65
|
onInputValueChange: f,
|
@@ -111,7 +110,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
111
110
|
ref: Y,
|
112
111
|
disabled: !0,
|
113
112
|
value: t,
|
114
|
-
children: /* @__PURE__ */ r(
|
113
|
+
children: /* @__PURE__ */ r(re, {
|
115
114
|
"aria-label": u(i.loadingMoreAriaLabel),
|
116
115
|
style: {
|
117
116
|
position: "unset"
|
@@ -180,7 +179,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
180
179
|
return /* @__PURE__ */ r(m, {
|
181
180
|
as: "input",
|
182
181
|
...U,
|
183
|
-
ref:
|
182
|
+
ref: te(b, h),
|
184
183
|
className: T({
|
185
184
|
[a.disabled]: _
|
186
185
|
}, j),
|
@@ -203,5 +202,5 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
203
202
|
});
|
204
203
|
});
|
205
204
|
export {
|
206
|
-
|
205
|
+
De as ComboboxWithApiPagination
|
207
206
|
};
|
@@ -1,20 +1,20 @@
|
|
1
|
-
import { Text as
|
2
|
-
import { FormattedDate as
|
3
|
-
import { convertISOStringToUTCDate as
|
4
|
-
import
|
1
|
+
import { Text as i } from "@box/blueprint-web";
|
2
|
+
import { FormattedDate as f } from "react-intl";
|
3
|
+
import { convertISOStringToUTCDate as y } from "../../../../utils/convertDate.js";
|
4
|
+
import h from "../../../interactive-text/interactive-text.js";
|
5
5
|
import { MetadataEntryDisplay as u } from "./metadata-entry-display.js";
|
6
|
-
import { jsxs as
|
7
|
-
import '../../../../../../styles/metadata-instance-entry.css';const
|
8
|
-
metadataInstanceEntry:
|
9
|
-
},
|
6
|
+
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
7
|
+
import '../../../../../../styles/metadata-instance-entry.css';const x = "_metadataInstanceEntry_gwoh6_1", g = {
|
8
|
+
metadataInstanceEntry: x
|
9
|
+
}, j = ({
|
10
10
|
description: n,
|
11
11
|
name: a,
|
12
|
-
shouldHideEmptyValues:
|
12
|
+
shouldHideEmptyValues: c,
|
13
13
|
type: o,
|
14
14
|
value: t,
|
15
|
-
taxonomyNodeFetcher:
|
16
|
-
taxonomyKey:
|
17
|
-
scope:
|
15
|
+
taxonomyNodeFetcher: s,
|
16
|
+
taxonomyKey: d,
|
17
|
+
scope: m
|
18
18
|
}) => {
|
19
19
|
const e = (() => {
|
20
20
|
if (typeof t == "number")
|
@@ -24,39 +24,47 @@ import '../../../../../../styles/metadata-instance-entry.css';const g = "_metada
|
|
24
24
|
if (Array.isArray(t))
|
25
25
|
return t.join(", ");
|
26
26
|
if (o === "date" && typeof t == "string") {
|
27
|
-
const
|
28
|
-
return /* @__PURE__ */ r(
|
27
|
+
const l = y(t);
|
28
|
+
return /* @__PURE__ */ r(f, {
|
29
29
|
day: "numeric",
|
30
30
|
month: "long",
|
31
|
-
value:
|
31
|
+
value: l,
|
32
32
|
year: "numeric"
|
33
33
|
});
|
34
34
|
}
|
35
35
|
return t;
|
36
36
|
})();
|
37
|
-
return
|
38
|
-
className:
|
39
|
-
children: [/* @__PURE__ */ r(
|
40
|
-
as: "
|
37
|
+
return c && !e ? null : /* @__PURE__ */ p("div", {
|
38
|
+
className: g.metadataInstanceEntry,
|
39
|
+
children: [/* @__PURE__ */ r(i, {
|
40
|
+
as: "h5",
|
41
41
|
color: "textOnLightSecondary",
|
42
42
|
variant: "bodyDefaultBold",
|
43
|
-
children: n ? /* @__PURE__ */ r(
|
43
|
+
children: n ? /* @__PURE__ */ r(h, {
|
44
44
|
as: "span",
|
45
45
|
color: "textOnLightSecondary",
|
46
46
|
tooltipText: n,
|
47
47
|
variant: "bodyDefaultBold",
|
48
48
|
children: a
|
49
|
-
}) :
|
49
|
+
}) : /* @__PURE__ */ r(i, {
|
50
|
+
as: "h5",
|
51
|
+
color: "textOnLightSecondary",
|
52
|
+
style: {
|
53
|
+
width: "fit-content"
|
54
|
+
},
|
55
|
+
variant: "bodyDefaultBold",
|
56
|
+
children: a
|
57
|
+
})
|
50
58
|
}), /* @__PURE__ */ r(u, {
|
51
59
|
formattedValue: e,
|
52
|
-
scope:
|
53
|
-
taxonomyKey:
|
54
|
-
taxonomyNodeFetcher:
|
60
|
+
scope: m,
|
61
|
+
taxonomyKey: d,
|
62
|
+
taxonomyNodeFetcher: s,
|
55
63
|
type: o,
|
56
64
|
value: t
|
57
65
|
})]
|
58
66
|
});
|
59
67
|
};
|
60
68
|
export {
|
61
|
-
|
69
|
+
j as MetadataInstanceEntry
|
62
70
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/metadata-editor",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.101.1",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@ariakit/react": "0.4.15",
|
6
6
|
"@box/blueprint-web": "^7.30.3",
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"devDependencies": {
|
16
16
|
"@ariakit/react": "0.4.15",
|
17
17
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
18
|
-
"@box/blueprint-web": "^11.
|
18
|
+
"@box/blueprint-web": "^11.5.0",
|
19
19
|
"@box/blueprint-web-assets": "^4.40.0",
|
20
20
|
"@box/storybook-utils": "^0.9.2",
|
21
21
|
"@testing-library/react": "^15.0.6",
|