@box/tree 1.38.33 → 1.38.34
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/error.js +28 -0
- package/dist/chunks/expander-with-loading.js +29 -41
- package/dist/chunks/expander.js +24 -0
- package/dist/chunks/inline-error.js +27 -0
- package/dist/chunks/loading-node.js +20 -0
- package/dist/chunks/node-icon.module.js +2 -6
- package/dist/chunks/node-label.js +23 -0
- package/dist/chunks/nodes.module.js +317 -319
- package/dist/chunks/reload-node.js +40 -0
- package/dist/chunks/skeleton.js +14 -0
- package/dist/chunks/tree.js +78 -0
- package/dist/esm/index.js +6 -10
- package/dist/esm/lib/components/content-node/content-node.js +109 -136
- package/dist/esm/lib/components/content-node/expander-with-loading.js +2 -9
- package/dist/esm/lib/components/content-node/index.js +2 -4
- package/dist/esm/lib/components/content-node/messages.js +5 -9
- package/dist/esm/lib/components/content-node/variant-icon.js +15 -23
- package/dist/esm/lib/components/error/error.js +2 -34
- package/dist/esm/lib/components/error/index.js +2 -4
- package/dist/esm/lib/components/error/messages.js +14 -16
- package/dist/esm/lib/components/expander/expander.js +2 -33
- package/dist/esm/lib/components/expander/index.js +2 -4
- package/dist/esm/lib/components/expander/messages.js +10 -12
- package/dist/esm/lib/components/index.js +8 -17
- package/dist/esm/lib/components/inline-error/index.js +2 -4
- package/dist/esm/lib/components/inline-error/inline-error.js +2 -33
- package/dist/esm/lib/components/inline-error/messages.js +18 -20
- package/dist/esm/lib/components/load-more-node/index.js +2 -4
- package/dist/esm/lib/components/load-more-node/load-more-node.js +21 -31
- package/dist/esm/lib/components/load-more-node/messages.js +10 -12
- package/dist/esm/lib/components/loading-node/index.js +2 -4
- package/dist/esm/lib/components/loading-node/loading-node.js +2 -30
- package/dist/esm/lib/components/loading-node/messages.js +5 -9
- package/dist/esm/lib/components/node-icon/index.js +3 -6
- package/dist/esm/lib/components/node-icon/messages.js +5 -9
- package/dist/esm/lib/components/node-icon/node-avatar.js +27 -34
- package/dist/esm/lib/components/node-icon/node-item-icon.js +30 -41
- package/dist/esm/lib/components/node-label/index.js +2 -4
- package/dist/esm/lib/components/node-label/node-label.js +2 -34
- package/dist/esm/lib/components/reload-node/index.js +2 -4
- package/dist/esm/lib/components/reload-node/messages.js +18 -20
- package/dist/esm/lib/components/reload-node/reload-node.js +2 -52
- package/dist/esm/lib/components/service-node-wrapper/index.js +2 -4
- package/dist/esm/lib/components/service-node-wrapper/service-node-wrapper.js +10 -19
- package/dist/esm/lib/components/skeleton/index.js +2 -4
- package/dist/esm/lib/components/skeleton/skeleton.js +2 -22
- package/dist/esm/lib/components/truncated-tooltip-text/index.js +1 -3
- package/dist/esm/lib/components/truncated-tooltip-text/truncated-tooltip-text.js +25 -26
- package/dist/esm/lib/constants.js +2 -9
- package/dist/esm/lib/hooks/index.js +3 -6
- package/dist/esm/lib/hooks/useIntersectionObserver.js +13 -17
- package/dist/esm/lib/hooks/useSelectionInheritance.js +16 -20
- package/dist/esm/lib/tree.js +3 -128
- package/dist/esm/lib/utils.js +38 -46
- package/dist/styles/expander-with-loading.css +1 -1
- package/dist/styles/inline-error.css +1 -1
- package/dist/styles/loading-node.css +1 -1
- package/dist/styles/node-label.css +1 -1
- package/dist/styles/nodes.css +1 -1
- package/dist/styles/reload-node.css +1 -1
- package/dist/styles/skeleton.css +1 -1
- package/package.json +8 -8
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { ContentNode as e } from "./content-node/content-node.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
export {
|
|
10
|
-
e as ContentNode,
|
|
11
|
-
p as InlineError,
|
|
12
|
-
f as LoadMoreNode,
|
|
13
|
-
x as LoadingNode,
|
|
14
|
-
a as ReloadNode,
|
|
15
|
-
i as ServiceNodeWrapper,
|
|
16
|
-
E as Skeleton,
|
|
17
|
-
S as TreeError
|
|
18
|
-
};
|
|
2
|
+
import { t } from "../../../chunks/error.js";
|
|
3
|
+
import { t as n } from "../../../chunks/inline-error.js";
|
|
4
|
+
import { LoadMoreNode as r } from "./load-more-node/load-more-node.js";
|
|
5
|
+
import { t as i } from "../../../chunks/loading-node.js";
|
|
6
|
+
import { t as a } from "../../../chunks/reload-node.js";
|
|
7
|
+
import { ServiceNodeWrapper as o } from "./service-node-wrapper/service-node-wrapper.js";
|
|
8
|
+
import { t as s } from "../../../chunks/skeleton.js";
|
|
9
|
+
export { e as ContentNode, n as InlineError, r as LoadMoreNode, i as LoadingNode, a as ReloadNode, o as ServiceNodeWrapper, s as Skeleton, t as TreeError };
|
|
@@ -1,33 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { Loader as s } from "@box/blueprint-web-assets/icons/Fill";
|
|
4
|
-
import t from "./messages.js";
|
|
5
|
-
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
6
|
-
import '../../../../styles/inline-error.css';const m = "_inlineNotice_16lna_1", d = "_reloadTextButton_16lna_6", n = {
|
|
7
|
-
inlineNotice: m,
|
|
8
|
-
reloadTextButton: d
|
|
9
|
-
};
|
|
10
|
-
function B({
|
|
11
|
-
onReload: i
|
|
12
|
-
}) {
|
|
13
|
-
const e = r();
|
|
14
|
-
return /* @__PURE__ */ c("div", {
|
|
15
|
-
className: n.inlineNotice,
|
|
16
|
-
children: [/* @__PURE__ */ o(a, {
|
|
17
|
-
variant: "error",
|
|
18
|
-
variantIconAriaLabel: e.formatMessage(t.inlineNoticeIconAriaLabel),
|
|
19
|
-
children: /* @__PURE__ */ o("span", {
|
|
20
|
-
children: e.formatMessage(t.inlineNoticeText)
|
|
21
|
-
})
|
|
22
|
-
}), /* @__PURE__ */ o(l, {
|
|
23
|
-
"aria-label": e.formatMessage(t.reloadButtonAriaLabel),
|
|
24
|
-
className: n.reloadTextButton,
|
|
25
|
-
icon: s,
|
|
26
|
-
onClick: i,
|
|
27
|
-
children: e.formatMessage(t.reloadButtonText)
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
B as InlineError
|
|
33
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/inline-error.js";
|
|
2
|
+
export { e as InlineError };
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
reloadButtonText: {
|
|
4
|
+
id: "groupSharedFeatures.tree.inlineError.reloadButtonText",
|
|
5
|
+
defaultMessage: "Reload"
|
|
6
|
+
},
|
|
7
|
+
inlineNoticeText: {
|
|
8
|
+
id: "groupSharedFeatures.tree.inlineError.inlineNoticeText",
|
|
9
|
+
defaultMessage: "Loading failed"
|
|
10
|
+
},
|
|
11
|
+
inlineNoticeIconAriaLabel: {
|
|
12
|
+
id: "groupSharedFeatures.tree.inlineError.inlineNoticeIconAriaLabel",
|
|
13
|
+
defaultMessage: "Error"
|
|
14
|
+
},
|
|
15
|
+
reloadButtonAriaLabel: {
|
|
16
|
+
id: "groupSharedFeatures.tree.inlineError.reloadButtonAriaLabel",
|
|
17
|
+
defaultMessage: "Reload content tree"
|
|
18
|
+
}
|
|
19
19
|
});
|
|
20
|
-
export {
|
|
21
|
-
a as default
|
|
22
|
-
};
|
|
20
|
+
export { t as default };
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children: /* @__PURE__ */ s(i, {
|
|
22
|
-
"aria-label": r.formatMessage(n.loadMoreButtonAriaLabel, {
|
|
23
|
-
nodeName: l.name
|
|
24
|
-
}),
|
|
25
|
-
tabIndex: -1,
|
|
26
|
-
children: r.formatMessage(n.loadMoreButtonTitle)
|
|
27
|
-
})
|
|
28
|
-
});
|
|
1
|
+
import { t as e } from "../../../../chunks/nodes.module.js";
|
|
2
|
+
import t from "./messages.js";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
import { TextButton as r } from "@box/blueprint-web";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { useIntl as a } from "react-intl";
|
|
7
|
+
function o({ level: o, size: s, isDisabled: c, getNodeProps: l, element: u }) {
|
|
8
|
+
let d = a(), f = l();
|
|
9
|
+
return /* @__PURE__ */ i("div", {
|
|
10
|
+
...f,
|
|
11
|
+
className: n("node", e.node, e[`node-${s}-level${o - 1}`], e[`node--${s}`], {
|
|
12
|
+
[e["node--focused"]]: f.className.includes("tree-node--focused"),
|
|
13
|
+
[e["node--disabled"]]: c
|
|
14
|
+
}),
|
|
15
|
+
children: /* @__PURE__ */ i(r, {
|
|
16
|
+
"aria-label": d.formatMessage(t.loadMoreButtonAriaLabel, { nodeName: u.name }),
|
|
17
|
+
tabIndex: -1,
|
|
18
|
+
children: d.formatMessage(t.loadMoreButtonTitle)
|
|
19
|
+
})
|
|
20
|
+
});
|
|
29
21
|
}
|
|
30
|
-
export {
|
|
31
|
-
g as LoadMoreNode
|
|
32
|
-
};
|
|
22
|
+
export { o as LoadMoreNode };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
loadMoreButtonTitle: {
|
|
4
|
+
id: "groupSharedFeatures.tree.branch.loadMoreButtonTitle",
|
|
5
|
+
defaultMessage: "Load More"
|
|
6
|
+
},
|
|
7
|
+
loadMoreButtonAriaLabel: {
|
|
8
|
+
id: "groupSharedFeatures.tree.branch.loadMoreButtonAriaLabel",
|
|
9
|
+
defaultMessage: "Load More for {nodeName}"
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
|
-
export {
|
|
13
|
-
o as default
|
|
14
|
-
};
|
|
12
|
+
export { t as default };
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useIntl as t } from "react-intl";
|
|
4
|
-
import i from "./messages.js";
|
|
5
|
-
import { s as o } from "../../../../chunks/nodes.module.js";
|
|
6
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
-
import '../../../../styles/loading-node.css';const c = "_loader_1d12s_1", f = {
|
|
8
|
-
loader: c
|
|
9
|
-
};
|
|
10
|
-
function L({
|
|
11
|
-
level: r,
|
|
12
|
-
size: e,
|
|
13
|
-
getNodeProps: d
|
|
14
|
-
}) {
|
|
15
|
-
const l = t(), s = d();
|
|
16
|
-
return /* @__PURE__ */ a("div", {
|
|
17
|
-
...s,
|
|
18
|
-
className: m("node", o.node, o[`node-${e}-level${r - 1}`], o[`node--${e}`], {
|
|
19
|
-
[o["node--focused"]]: s.className.includes("tree-node--focused")
|
|
20
|
-
}),
|
|
21
|
-
children: /* @__PURE__ */ a(n, {
|
|
22
|
-
"aria-label": l.formatMessage(i.loadingIndicatorAriaLabel),
|
|
23
|
-
className: f.loader,
|
|
24
|
-
size: e === "small" ? "small" : "medium"
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
L as LoadingNode
|
|
30
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/loading-node.js";
|
|
2
|
+
export { e as LoadingNode };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
o as default
|
|
10
|
-
};
|
|
2
|
+
var t = e({ loadingIndicatorAriaLabel: {
|
|
3
|
+
id: "groupSharedFeatures.tree.branch.loadMore",
|
|
4
|
+
defaultMessage: "Loading more content"
|
|
5
|
+
} });
|
|
6
|
+
export { t as default };
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { NodeAvatar as
|
|
2
|
-
import { NodeItemIcon as
|
|
3
|
-
export {
|
|
4
|
-
r as NodeAvatar,
|
|
5
|
-
m as NodeItemIcon
|
|
6
|
-
};
|
|
1
|
+
import { NodeAvatar as e } from "./node-avatar.js";
|
|
2
|
+
import { NodeItemIcon as t } from "./node-item-icon.js";
|
|
3
|
+
export { e as NodeAvatar, t as NodeItemIcon };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export {
|
|
9
|
-
s as default
|
|
10
|
-
};
|
|
2
|
+
var t = e({ iconLabel: {
|
|
3
|
+
id: "groupSharedFeatures.tree.node.iconLabel",
|
|
4
|
+
defaultMessage: "Icon for {iconType}"
|
|
5
|
+
} });
|
|
6
|
+
export { t as default };
|
|
@@ -1,36 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { t as e } from "../../../../chunks/node-icon.module.js";
|
|
2
|
+
import { useMemo as t } from "react";
|
|
3
|
+
import { Avatar as n, IconBadge as r } from "@box/blueprint-web";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
var a = {
|
|
6
|
+
admin: "collaborator-admin",
|
|
7
|
+
coadmin: "collaborator-coadmin"
|
|
8
8
|
};
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})
|
|
29
|
-
}) : /* @__PURE__ */ a("div", {
|
|
30
|
-
className: l.icon,
|
|
31
|
-
children: t
|
|
32
|
-
});
|
|
9
|
+
function o({ avatarSrc: o, badge: s, size: c, nodeTitle: l }) {
|
|
10
|
+
let u = t(() => l.charAt(0).toUpperCase(), [l]), d = /* @__PURE__ */ i(n, {
|
|
11
|
+
alt: l,
|
|
12
|
+
color: "BoxBlue50",
|
|
13
|
+
size: c === "small" ? "small" : "large",
|
|
14
|
+
src: o,
|
|
15
|
+
text: u
|
|
16
|
+
});
|
|
17
|
+
return s && a[s] ? /* @__PURE__ */ i("div", {
|
|
18
|
+
className: e.icon,
|
|
19
|
+
children: /* @__PURE__ */ i(r, {
|
|
20
|
+
size: c === "small" ? "small" : "medium",
|
|
21
|
+
variant: a[s],
|
|
22
|
+
children: d
|
|
23
|
+
})
|
|
24
|
+
}) : /* @__PURE__ */ i("div", {
|
|
25
|
+
className: e.icon,
|
|
26
|
+
children: d
|
|
27
|
+
});
|
|
33
28
|
}
|
|
34
|
-
export {
|
|
35
|
-
A as NodeAvatar
|
|
36
|
-
};
|
|
29
|
+
export { o as NodeAvatar };
|
|
@@ -1,42 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}),
|
|
31
|
-
className: e.icon,
|
|
32
|
-
dimension: t,
|
|
33
|
-
iconType: o
|
|
34
|
-
}) : /* @__PURE__ */ s(r, {
|
|
35
|
-
className: e.icon,
|
|
36
|
-
dimension: t,
|
|
37
|
-
iconType: "default"
|
|
38
|
-
});
|
|
1
|
+
import { t as e } from "../../../../chunks/node-icon.module.js";
|
|
2
|
+
import t from "./messages.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { useIntl as r } from "react-intl";
|
|
5
|
+
import { Trash as i } from "@box/blueprint-web-assets/icons/Fill";
|
|
6
|
+
import { Size6 as a, Size8 as o } from "@box/blueprint-web-assets/tokens/px-tokens";
|
|
7
|
+
import { ItemIcon as s, itemIconTable as c } from "@box/item-icon";
|
|
8
|
+
var l = { trash: i };
|
|
9
|
+
function u({ size: i, iconType: u }) {
|
|
10
|
+
let d = r(), f = i === "small" ? a : o;
|
|
11
|
+
if (u && l[u]) {
|
|
12
|
+
let r = l[u];
|
|
13
|
+
return /* @__PURE__ */ n(r, {
|
|
14
|
+
ariaLabel: d.formatMessage(t.iconLabel, { iconType: u }),
|
|
15
|
+
className: e.icon,
|
|
16
|
+
height: f,
|
|
17
|
+
width: f
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return u && c[u] ? /* @__PURE__ */ n(s, {
|
|
21
|
+
ariaLabel: d.formatMessage(t.iconLabel, { iconType: u }),
|
|
22
|
+
className: e.icon,
|
|
23
|
+
dimension: f,
|
|
24
|
+
iconType: u
|
|
25
|
+
}) : /* @__PURE__ */ n(s, {
|
|
26
|
+
className: e.icon,
|
|
27
|
+
dimension: f,
|
|
28
|
+
iconType: "default"
|
|
29
|
+
});
|
|
39
30
|
}
|
|
40
|
-
export {
|
|
41
|
-
S as NodeItemIcon
|
|
42
|
-
};
|
|
31
|
+
export { u as NodeItemIcon };
|
|
@@ -1,34 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { forwardRef as p } from "react";
|
|
4
|
-
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
5
|
-
import '../../../../styles/node-label.css';const b = "_label_24n7b_2", m = {
|
|
6
|
-
label: b
|
|
7
|
-
}, v = /* @__PURE__ */ p((o, r) => {
|
|
8
|
-
const {
|
|
9
|
-
color: e = "textOnLightSecondary",
|
|
10
|
-
isInTooltip: s = !1,
|
|
11
|
-
labelName: t,
|
|
12
|
-
labelValue: n
|
|
13
|
-
} = o;
|
|
14
|
-
return /* @__PURE__ */ c("div", {
|
|
15
|
-
ref: r,
|
|
16
|
-
className: i({
|
|
17
|
-
[m.label]: !s
|
|
18
|
-
}),
|
|
19
|
-
children: [/* @__PURE__ */ a(l, {
|
|
20
|
-
as: "span",
|
|
21
|
-
color: e,
|
|
22
|
-
variant: "labelBold",
|
|
23
|
-
children: t.toUpperCase()
|
|
24
|
-
}), /* @__PURE__ */ a(l, {
|
|
25
|
-
as: "span",
|
|
26
|
-
color: e,
|
|
27
|
-
variant: "label",
|
|
28
|
-
children: ` / ${n.toUpperCase()}`
|
|
29
|
-
})]
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
export {
|
|
33
|
-
v as NodeLabel
|
|
34
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/node-label.js";
|
|
2
|
+
export { e as NodeLabel };
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
reloadButtonTitle: {
|
|
4
|
+
id: "groupSharedFeatures.tree.branch.reloadButtonTitle",
|
|
5
|
+
defaultMessage: "Reload"
|
|
6
|
+
},
|
|
7
|
+
reloadButtonAriaLabel: {
|
|
8
|
+
id: "groupSharedFeatures.tree.branch.reloadButtonAriaLabel",
|
|
9
|
+
defaultMessage: "Reload content for {nodeName}"
|
|
10
|
+
},
|
|
11
|
+
loadingError: {
|
|
12
|
+
id: "groupSharedFeatures.tree.branch.loadingError",
|
|
13
|
+
defaultMessage: "Loading Error"
|
|
14
|
+
},
|
|
15
|
+
iconAriaLabel: {
|
|
16
|
+
id: "groupSharedFeatures.tree.branch.loadingErrorIconAriaLabel",
|
|
17
|
+
defaultMessage: "Error"
|
|
18
|
+
}
|
|
19
19
|
});
|
|
20
|
-
export {
|
|
21
|
-
a as default
|
|
22
|
-
};
|
|
20
|
+
export { t as default };
|
|
@@ -1,52 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useIntl as x } from "react-intl";
|
|
4
|
-
import { Loader as p } from "@box/blueprint-web-assets/icons/Fill";
|
|
5
|
-
import t from "./messages.js";
|
|
6
|
-
import { s as e } from "../../../../chunks/nodes.module.js";
|
|
7
|
-
import { jsxs as g, Fragment as u, jsx as r } from "react/jsx-runtime";
|
|
8
|
-
import '../../../../styles/reload-node.css';const _ = "_errorNotice_1frn3_2", l = {
|
|
9
|
-
errorNotice: _,
|
|
10
|
-
"errorNoticeText--large": "_errorNoticeText--large_1frn3_7",
|
|
11
|
-
"errorNoticeText--small": "_errorNoticeText--small_1frn3_17"
|
|
12
|
-
};
|
|
13
|
-
function M({
|
|
14
|
-
level: n,
|
|
15
|
-
size: o,
|
|
16
|
-
isDisabled: c,
|
|
17
|
-
getNodeProps: d,
|
|
18
|
-
element: s
|
|
19
|
-
}) {
|
|
20
|
-
const a = x(), i = d();
|
|
21
|
-
return /* @__PURE__ */ g(u, {
|
|
22
|
-
children: [/* @__PURE__ */ r("div", {
|
|
23
|
-
className: e[`node-${o}-level${n - 1}`],
|
|
24
|
-
children: /* @__PURE__ */ r(m, {
|
|
25
|
-
className: l.errorNotice,
|
|
26
|
-
variant: "error",
|
|
27
|
-
variantIconAriaLabel: a.formatMessage(t.iconAriaLabel),
|
|
28
|
-
children: /* @__PURE__ */ r("span", {
|
|
29
|
-
className: l[`errorNoticeText--${o}`],
|
|
30
|
-
children: s.metadata.error || a.formatMessage(t.loadingError)
|
|
31
|
-
})
|
|
32
|
-
})
|
|
33
|
-
}), /* @__PURE__ */ r("div", {
|
|
34
|
-
...i,
|
|
35
|
-
className: N("node", e.node, e[`node-${o}-level${n - 1}`], e[`node--${o}`], {
|
|
36
|
-
[e["node--focused"]]: i.className.includes("tree-node--focused"),
|
|
37
|
-
[e["node--disabled"]]: c
|
|
38
|
-
}),
|
|
39
|
-
children: /* @__PURE__ */ r(f, {
|
|
40
|
-
"aria-label": a.formatMessage(t.reloadButtonAriaLabel, {
|
|
41
|
-
nodeName: s.name
|
|
42
|
-
}),
|
|
43
|
-
icon: p,
|
|
44
|
-
tabIndex: -1,
|
|
45
|
-
children: a.formatMessage(t.reloadButtonTitle)
|
|
46
|
-
})
|
|
47
|
-
})]
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
M as ReloadNode
|
|
52
|
-
};
|
|
1
|
+
import { t as e } from "../../../../chunks/reload-node.js";
|
|
2
|
+
export { e as ReloadNode };
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[`data-${o}`]: !0
|
|
11
|
-
};
|
|
12
|
-
return r === "reload" && (T[`data-${d}`] = !0, T[`data-${A}`] = a), r === "loadMore" && (T[`data-${e}`] = !0, T[`data-${A}`] = a), /* @__PURE__ */ E("div", {
|
|
13
|
-
"aria-disabled": t,
|
|
14
|
-
...T,
|
|
15
|
-
children: _
|
|
16
|
-
});
|
|
1
|
+
import { BRANCH_ID_DATA_ATTRIBUTE as e, LOAD_MORE_NODE_DATA_ATTRIBUTE as t, RELOAD_NODE_DATA_ATTRIBUTE as n, SERVICE_NODE_DATA_ATTRIBUTE as r } from "../../constants.js";
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
function a({ isDisabled: a, parentId: o, variant: s, children: c }) {
|
|
4
|
+
let l = { [`data-${r}`]: !0 };
|
|
5
|
+
return s === "reload" && (l[`data-${n}`] = !0, l[`data-${e}`] = o), s === "loadMore" && (l[`data-${t}`] = !0, l[`data-${e}`] = o), /* @__PURE__ */ i("div", {
|
|
6
|
+
"aria-disabled": a,
|
|
7
|
+
...l,
|
|
8
|
+
children: c
|
|
9
|
+
});
|
|
17
10
|
}
|
|
18
|
-
export {
|
|
19
|
-
R as ServiceNodeWrapper
|
|
20
|
-
};
|
|
11
|
+
export { a as ServiceNodeWrapper };
|