@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.
Files changed (62) hide show
  1. package/dist/chunks/error.js +28 -0
  2. package/dist/chunks/expander-with-loading.js +29 -41
  3. package/dist/chunks/expander.js +24 -0
  4. package/dist/chunks/inline-error.js +27 -0
  5. package/dist/chunks/loading-node.js +20 -0
  6. package/dist/chunks/node-icon.module.js +2 -6
  7. package/dist/chunks/node-label.js +23 -0
  8. package/dist/chunks/nodes.module.js +317 -319
  9. package/dist/chunks/reload-node.js +40 -0
  10. package/dist/chunks/skeleton.js +14 -0
  11. package/dist/chunks/tree.js +78 -0
  12. package/dist/esm/index.js +6 -10
  13. package/dist/esm/lib/components/content-node/content-node.js +109 -136
  14. package/dist/esm/lib/components/content-node/expander-with-loading.js +2 -9
  15. package/dist/esm/lib/components/content-node/index.js +2 -4
  16. package/dist/esm/lib/components/content-node/messages.js +5 -9
  17. package/dist/esm/lib/components/content-node/variant-icon.js +15 -23
  18. package/dist/esm/lib/components/error/error.js +2 -34
  19. package/dist/esm/lib/components/error/index.js +2 -4
  20. package/dist/esm/lib/components/error/messages.js +14 -16
  21. package/dist/esm/lib/components/expander/expander.js +2 -33
  22. package/dist/esm/lib/components/expander/index.js +2 -4
  23. package/dist/esm/lib/components/expander/messages.js +10 -12
  24. package/dist/esm/lib/components/index.js +8 -17
  25. package/dist/esm/lib/components/inline-error/index.js +2 -4
  26. package/dist/esm/lib/components/inline-error/inline-error.js +2 -33
  27. package/dist/esm/lib/components/inline-error/messages.js +18 -20
  28. package/dist/esm/lib/components/load-more-node/index.js +2 -4
  29. package/dist/esm/lib/components/load-more-node/load-more-node.js +21 -31
  30. package/dist/esm/lib/components/load-more-node/messages.js +10 -12
  31. package/dist/esm/lib/components/loading-node/index.js +2 -4
  32. package/dist/esm/lib/components/loading-node/loading-node.js +2 -30
  33. package/dist/esm/lib/components/loading-node/messages.js +5 -9
  34. package/dist/esm/lib/components/node-icon/index.js +3 -6
  35. package/dist/esm/lib/components/node-icon/messages.js +5 -9
  36. package/dist/esm/lib/components/node-icon/node-avatar.js +27 -34
  37. package/dist/esm/lib/components/node-icon/node-item-icon.js +30 -41
  38. package/dist/esm/lib/components/node-label/index.js +2 -4
  39. package/dist/esm/lib/components/node-label/node-label.js +2 -34
  40. package/dist/esm/lib/components/reload-node/index.js +2 -4
  41. package/dist/esm/lib/components/reload-node/messages.js +18 -20
  42. package/dist/esm/lib/components/reload-node/reload-node.js +2 -52
  43. package/dist/esm/lib/components/service-node-wrapper/index.js +2 -4
  44. package/dist/esm/lib/components/service-node-wrapper/service-node-wrapper.js +10 -19
  45. package/dist/esm/lib/components/skeleton/index.js +2 -4
  46. package/dist/esm/lib/components/skeleton/skeleton.js +2 -22
  47. package/dist/esm/lib/components/truncated-tooltip-text/index.js +1 -3
  48. package/dist/esm/lib/components/truncated-tooltip-text/truncated-tooltip-text.js +25 -26
  49. package/dist/esm/lib/constants.js +2 -9
  50. package/dist/esm/lib/hooks/index.js +3 -6
  51. package/dist/esm/lib/hooks/useIntersectionObserver.js +13 -17
  52. package/dist/esm/lib/hooks/useSelectionInheritance.js +16 -20
  53. package/dist/esm/lib/tree.js +3 -128
  54. package/dist/esm/lib/utils.js +38 -46
  55. package/dist/styles/expander-with-loading.css +1 -1
  56. package/dist/styles/inline-error.css +1 -1
  57. package/dist/styles/loading-node.css +1 -1
  58. package/dist/styles/node-label.css +1 -1
  59. package/dist/styles/nodes.css +1 -1
  60. package/dist/styles/reload-node.css +1 -1
  61. package/dist/styles/skeleton.css +1 -1
  62. package/package.json +8 -8
@@ -1,18 +1,9 @@
1
1
  import { ContentNode as e } from "./content-node/content-node.js";
2
- import { InlineError as p } from "./inline-error/inline-error.js";
3
- import { LoadMoreNode as f } from "./load-more-node/load-more-node.js";
4
- import { LoadingNode as x } from "./loading-node/loading-node.js";
5
- import { ReloadNode as a } from "./reload-node/reload-node.js";
6
- import { ServiceNodeWrapper as i } from "./service-node-wrapper/service-node-wrapper.js";
7
- import { Skeleton as E } from "./skeleton/skeleton.js";
8
- import { Error as S } from "./error/error.js";
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,4 +1,2 @@
1
- import { InlineError as e } from "./inline-error.js";
2
- export {
3
- e as InlineError
4
- };
1
+ import { t as e } from "../../../../chunks/inline-error.js";
2
+ export { e as InlineError };
@@ -1,33 +1,2 @@
1
- import { useIntl as r } from "react-intl";
2
- import { InlineNotice as a, TextButton as l } from "@box/blueprint-web";
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
- const a = 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
- }
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,4 +1,2 @@
1
- import { LoadMoreNode as r } from "./load-more-node.js";
2
- export {
3
- r as LoadMoreNode
4
- };
1
+ import { LoadMoreNode as e } from "./load-more-node.js";
2
+ export { e as LoadMoreNode };
@@ -1,32 +1,22 @@
1
- import { TextButton as i } from "@box/blueprint-web";
2
- import c from "clsx";
3
- import { useIntl as f } from "react-intl";
4
- import n from "./messages.js";
5
- import { s as e } from "../../../../chunks/nodes.module.js";
6
- import { jsx as s } from "react/jsx-runtime";
7
- function g({
8
- level: a,
9
- size: o,
10
- isDisabled: d,
11
- getNodeProps: m,
12
- element: l
13
- }) {
14
- const r = f(), t = m();
15
- return /* @__PURE__ */ s("div", {
16
- ...t,
17
- className: c("node", e.node, e[`node-${o}-level${a - 1}`], e[`node--${o}`], {
18
- [e["node--focused"]]: t.className.includes("tree-node--focused"),
19
- [e["node--disabled"]]: d
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
- const o = 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
- }
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,4 +1,2 @@
1
- import { LoadingNode as e } from "./loading-node.js";
2
- export {
3
- e as LoadingNode
4
- };
1
+ import { t as e } from "../../../../chunks/loading-node.js";
2
+ export { e as LoadingNode };
@@ -1,30 +1,2 @@
1
- import { LoadingIndicator as n } from "@box/blueprint-web";
2
- import m from "clsx";
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
- const o = e({
3
- loadingIndicatorAriaLabel: {
4
- id: "groupSharedFeatures.tree.branch.loadMore",
5
- defaultMessage: "Loading more content"
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 r } from "./node-avatar.js";
2
- import { NodeItemIcon as m } from "./node-item-icon.js";
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
- const s = e({
3
- iconLabel: {
4
- id: "groupSharedFeatures.tree.node.iconLabel",
5
- defaultMessage: "Icon for {iconType}"
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 { IconBadge as n, Avatar as e } from "@box/blueprint-web";
2
- import { useMemo as d } from "react";
3
- import { s as l } from "../../../../chunks/node-icon.module.js";
4
- import { jsx as a } from "react/jsx-runtime";
5
- const s = {
6
- admin: "collaborator-admin",
7
- coadmin: "collaborator-coadmin"
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 A({
10
- avatarSrc: c,
11
- badge: r,
12
- size: m,
13
- nodeTitle: o
14
- }) {
15
- const i = d(() => o.charAt(0).toUpperCase(), [o]), t = /* @__PURE__ */ a(e, {
16
- alt: o,
17
- color: "BoxBlue50",
18
- size: m === "small" ? "small" : "large",
19
- src: c,
20
- text: i
21
- });
22
- return r && s[r] ? /* @__PURE__ */ a("div", {
23
- className: l.icon,
24
- children: /* @__PURE__ */ a(n, {
25
- size: m === "small" ? "small" : "medium",
26
- variant: s[r],
27
- children: t
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 { Trash as c } from "@box/blueprint-web-assets/icons/Fill";
2
- import { Size6 as f, Size8 as I } from "@box/blueprint-web-assets/tokens/px-tokens";
3
- import { itemIconTable as b, ItemIcon as r } from "@box/item-icon";
4
- import { useIntl as d } from "react-intl";
5
- import a from "./messages.js";
6
- import { s as e } from "../../../../chunks/node-icon.module.js";
7
- import { jsx as s } from "react/jsx-runtime";
8
- const i = {
9
- trash: c
10
- };
11
- function S({
12
- size: n,
13
- iconType: o
14
- }) {
15
- const m = d(), t = n === "small" ? f : I;
16
- if (o && i[o]) {
17
- const l = i[o];
18
- return /* @__PURE__ */ s(l, {
19
- ariaLabel: m.formatMessage(a.iconLabel, {
20
- iconType: o
21
- }),
22
- className: e.icon,
23
- height: t,
24
- width: t
25
- });
26
- }
27
- return o && b[o] ? /* @__PURE__ */ s(r, {
28
- ariaLabel: m.formatMessage(a.iconLabel, {
29
- iconType: o
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,4 +1,2 @@
1
- import { NodeLabel as r } from "./node-label.js";
2
- export {
3
- r as NodeLabel
4
- };
1
+ import { t as e } from "../../../../chunks/node-label.js";
2
+ export { e as NodeLabel };
@@ -1,34 +1,2 @@
1
- import { Text as l } from "@box/blueprint-web";
2
- import i from "clsx";
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,4 +1,2 @@
1
- import { ReloadNode as d } from "./reload-node.js";
2
- export {
3
- d as ReloadNode
4
- };
1
+ import { t as e } from "../../../../chunks/reload-node.js";
2
+ export { e as ReloadNode };
@@ -1,22 +1,20 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const a = 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
- }
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 { InlineNotice as m, TextButton as f } from "@box/blueprint-web";
2
- import N from "clsx";
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,4 +1,2 @@
1
- import { ServiceNodeWrapper as o } from "./service-node-wrapper.js";
2
- export {
3
- o as ServiceNodeWrapper
4
- };
1
+ import { ServiceNodeWrapper as e } from "./service-node-wrapper.js";
2
+ export { e as ServiceNodeWrapper };
@@ -1,20 +1,11 @@
1
- import { SERVICE_NODE_DATA_ATTRIBUTE as o, RELOAD_NODE_DATA_ATTRIBUTE as d, BRANCH_ID_DATA_ATTRIBUTE as A, LOAD_MORE_NODE_DATA_ATTRIBUTE as e } from "../../constants.js";
2
- import { jsx as E } from "react/jsx-runtime";
3
- function R({
4
- isDisabled: t,
5
- parentId: a,
6
- variant: r,
7
- children: _
8
- }) {
9
- const T = {
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 };
@@ -1,4 +1,2 @@
1
- import { Skeleton as r } from "./skeleton.js";
2
- export {
3
- r as Skeleton
4
- };
1
+ import { t as e } from "../../../../chunks/skeleton.js";
2
+ export { e as Skeleton };