@box/metadata-editor 0.82.4 → 0.83.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.
@@ -1,59 +1,59 @@
|
|
1
|
-
import { Text as n, EmptyState as
|
2
|
-
import { JobAnalyzeData as
|
3
|
-
import { useCallback as
|
1
|
+
import { Text as n, EmptyState as m } from "@box/blueprint-web";
|
2
|
+
import { JobAnalyzeData as c } from "@box/blueprint-web-assets/illustrations/Small";
|
3
|
+
import { useCallback as f } from "react";
|
4
4
|
import { useIntl as d } from "react-intl";
|
5
|
-
import
|
6
|
-
import { jsx as
|
5
|
+
import a from "./messages.js";
|
6
|
+
import { jsx as e } from "react/jsx-runtime";
|
7
7
|
function E({
|
8
|
-
isAnyEmptyValueHidden:
|
9
|
-
isBoxAiSuggestionsFeatureEnabled:
|
8
|
+
isAnyEmptyValueHidden: s = !1,
|
9
|
+
isBoxAiSuggestionsFeatureEnabled: p = !1,
|
10
10
|
level: r,
|
11
|
-
onShowEmptyValues:
|
11
|
+
onShowEmptyValues: o
|
12
12
|
}) {
|
13
|
-
const t = d(),
|
13
|
+
const t = d(), l = f(() => {
|
14
14
|
if (r === "manager")
|
15
|
-
return /* @__PURE__ */
|
15
|
+
return /* @__PURE__ */ e(n, {
|
16
16
|
as: "p",
|
17
|
-
children: t.formatMessage(
|
17
|
+
children: t.formatMessage(a.managerLevelEmptyStateBody)
|
18
18
|
});
|
19
19
|
if (r === "instance")
|
20
|
-
return
|
21
|
-
onClick:
|
22
|
-
children: t.formatMessage(
|
20
|
+
return s ? /* @__PURE__ */ e(m.PrimaryAction, {
|
21
|
+
onClick: o,
|
22
|
+
children: t.formatMessage(a.instanceLevelSeeEmptyValuesCTA)
|
23
23
|
}) : (
|
24
24
|
// EmptyState component requires body element so if level === "instance" && !isAnyEmptyValueHidden we pass heading as body and nothing as heading
|
25
|
-
/* @__PURE__ */
|
25
|
+
/* @__PURE__ */ e(n, {
|
26
26
|
as: "h1",
|
27
27
|
variant: "titleSmall",
|
28
|
-
children: t.formatMessage(
|
28
|
+
children: t.formatMessage(a.instanceLevelEmptyStateHeadingNoAttributes)
|
29
29
|
})
|
30
30
|
);
|
31
|
-
const
|
32
|
-
return /* @__PURE__ */
|
31
|
+
const i = t.formatMessage(a.fileLevelEmptyStateDefaultBody);
|
32
|
+
return /* @__PURE__ */ e(n, {
|
33
33
|
as: "p",
|
34
|
-
children:
|
34
|
+
children: i
|
35
35
|
});
|
36
|
-
}, [t,
|
36
|
+
}, [t, s, r, o]), g = f(() => {
|
37
37
|
if (r === "manager")
|
38
|
-
return /* @__PURE__ */
|
38
|
+
return /* @__PURE__ */ e(n, {
|
39
39
|
as: "h2",
|
40
|
-
children: t.formatMessage(
|
40
|
+
children: t.formatMessage(a.managerLevelEmptyStateHeading)
|
41
41
|
});
|
42
42
|
if (r === "instance")
|
43
|
-
return
|
43
|
+
return s ? /* @__PURE__ */ e(n, {
|
44
44
|
as: "h2",
|
45
|
-
children: t.formatMessage(
|
45
|
+
children: t.formatMessage(a.instanceLevelEmptyStateHeading)
|
46
46
|
}) : null;
|
47
|
-
const
|
48
|
-
return /* @__PURE__ */
|
47
|
+
const i = t.formatMessage(a.fileLevelEmptyStateDefaultHeading);
|
48
|
+
return /* @__PURE__ */ e(n, {
|
49
49
|
as: "h2",
|
50
|
-
children:
|
50
|
+
children: i
|
51
51
|
});
|
52
|
-
}, [t,
|
53
|
-
return /* @__PURE__ */
|
54
|
-
body:
|
52
|
+
}, [t, s, r]);
|
53
|
+
return /* @__PURE__ */ e(m, {
|
54
|
+
body: l(),
|
55
55
|
heading: g(),
|
56
|
-
illustration:
|
56
|
+
illustration: c,
|
57
57
|
size: "small"
|
58
58
|
});
|
59
59
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/metadata-editor",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.83.0",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@ariakit/react": "0.4.14",
|
6
6
|
"@box/blueprint-web": "^7.30.3",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"devDependencies": {
|
15
15
|
"@ariakit/react": "0.4.14",
|
16
16
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
17
|
-
"@box/blueprint-web": "^9.7.
|
17
|
+
"@box/blueprint-web": "^9.7.3",
|
18
18
|
"@box/blueprint-web-assets": "^4.31.1",
|
19
19
|
"@box/storybook-utils": "^0.8.1",
|
20
20
|
"@testing-library/react": "^15.0.6",
|
@@ -53,5 +53,5 @@
|
|
53
53
|
"**/*.css"
|
54
54
|
],
|
55
55
|
"license": "SEE LICENSE IN LICENSE",
|
56
|
-
"gitHead": "
|
56
|
+
"gitHead": "ce8788c77a7c7c083cb57af2d5b14abb566ce6e2"
|
57
57
|
}
|