@box/tree 1.38.32 → 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
@@ -0,0 +1,40 @@
1
+ import { t as e } from "./nodes.module.js";
2
+ import t from "../esm/lib/components/reload-node/messages.js";
3
+ import n from "clsx";
4
+ import { InlineNotice as r, TextButton as i } from "@box/blueprint-web";
5
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { useIntl as c } from "react-intl";
7
+ import { Loader as l } from "@box/blueprint-web-assets/icons/Fill";
8
+ import '../styles/reload-node.css';var u = {
9
+ errorNotice: "_errorNotice_1frn3_2",
10
+ "errorNoticeText--large": "_errorNoticeText--large_1frn3_7",
11
+ "errorNoticeText--small": "_errorNoticeText--small_1frn3_17"
12
+ };
13
+ function d({ level: d, size: f, isDisabled: p, getNodeProps: m, element: h }) {
14
+ let g = c(), _ = m();
15
+ return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
16
+ className: e[`node-${f}-level${d - 1}`],
17
+ children: /* @__PURE__ */ o(r, {
18
+ className: u.errorNotice,
19
+ variant: "error",
20
+ variantIconAriaLabel: g.formatMessage(t.iconAriaLabel),
21
+ children: /* @__PURE__ */ o("span", {
22
+ className: u[`errorNoticeText--${f}`],
23
+ children: h.metadata.error || g.formatMessage(t.loadingError)
24
+ })
25
+ })
26
+ }), /* @__PURE__ */ o("div", {
27
+ ..._,
28
+ className: n("node", e.node, e[`node-${f}-level${d - 1}`], e[`node--${f}`], {
29
+ [e["node--focused"]]: _.className.includes("tree-node--focused"),
30
+ [e["node--disabled"]]: p
31
+ }),
32
+ children: /* @__PURE__ */ o(i, {
33
+ "aria-label": g.formatMessage(t.reloadButtonAriaLabel, { nodeName: h.name }),
34
+ icon: l,
35
+ tabIndex: -1,
36
+ children: g.formatMessage(t.reloadButtonTitle)
37
+ })
38
+ })] });
39
+ }
40
+ export { d as t };
@@ -0,0 +1,14 @@
1
+ import { Ghost as e } from "@box/blueprint-web";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Size5 as n } from "@box/blueprint-web-assets/tokens/px-tokens";
4
+ import '../styles/skeleton.css';var r = { skeleton: "_skeleton_10rap_1" }, i = 5;
5
+ function a({ rows: a = i }) {
6
+ return /* @__PURE__ */ t("div", {
7
+ className: r.skeleton,
8
+ children: Array.from({ length: a }, (r, i) => /* @__PURE__ */ t(e, {
9
+ height: n,
10
+ variant: "pill"
11
+ }, i))
12
+ });
13
+ }
14
+ export { a as t };
@@ -0,0 +1,78 @@
1
+ import { useSelectionInheritance as e } from "../esm/lib/hooks/useSelectionInheritance.js";
2
+ import { ContentNode as t } from "../esm/lib/components/content-node/content-node.js";
3
+ import { LoadMoreNode as n } from "../esm/lib/components/load-more-node/load-more-node.js";
4
+ import { t as r } from "./loading-node.js";
5
+ import { t as i } from "./reload-node.js";
6
+ import { ServiceNodeWrapper as a } from "../esm/lib/components/service-node-wrapper/service-node-wrapper.js";
7
+ import { preventDisabledNodeExpanding as o, preventLoadingContentNodeExpanding as s, serviceNodeClickHandler as c, serviceNodeKeyboardHandler as l } from "../esm/lib/utils.js";
8
+ import u from "clsx";
9
+ import { forwardRef as d, useCallback as f, useEffect as p, useRef as m } from "react";
10
+ import { TooltipProvider as h, useForkRef as g } from "@box/blueprint-web";
11
+ import { jsx as _ } from "react/jsx-runtime";
12
+ import v from "react-accessible-treeview";
13
+ import '../styles/tree.css';var y = { tree: "_tree_17956_1" }, b = (e, o, s) => (c) => {
14
+ let { element: l, isDisabled: u } = c, { id: d, metadata: f, parent: p } = l, { variant: m } = f;
15
+ return m === "content" || m === "user" || m === "labeled" ? /* @__PURE__ */ _(t, {
16
+ ...c,
17
+ size: e,
18
+ withIcon: o,
19
+ containsSelection: s.includes(d)
20
+ }) : m === "loadMore" ? /* @__PURE__ */ _(a, {
21
+ isDisabled: u,
22
+ parentId: p,
23
+ variant: "loadMore",
24
+ children: /* @__PURE__ */ _(n, {
25
+ ...c,
26
+ size: e
27
+ })
28
+ }) : m === "reload" ? /* @__PURE__ */ _(a, {
29
+ isDisabled: u,
30
+ parentId: p,
31
+ variant: "reload",
32
+ children: /* @__PURE__ */ _(i, {
33
+ ...c,
34
+ size: e
35
+ })
36
+ }) : m === "loading" ? /* @__PURE__ */ _(a, {
37
+ isDisabled: u,
38
+ variant: "loading",
39
+ children: /* @__PURE__ */ _(r, {
40
+ ...c,
41
+ size: e
42
+ })
43
+ }) : null;
44
+ }, x = /* @__PURE__ */ d(function({ "aria-label": t, size: n = "small", data: r, withIcons: i = !1, onExpand: a, onSelect: d, onLoadData: x, className: S, multiSelect: C = !1, ...w }, T) {
45
+ let E = m(null), { selectionInheritors: D, getSelectionInheritors: O } = e();
46
+ p(() => {
47
+ let e = E.current;
48
+ return e && (e.addEventListener("keydown", o), e.addEventListener("keydown", s)), () => {
49
+ e && (e.removeEventListener("keydown", o), e.removeEventListener("keydown", s));
50
+ };
51
+ }), p(() => {
52
+ let e = E.current, t = l(x), n = c(x);
53
+ return e && (e.addEventListener("keydown", t), e.addEventListener("click", n)), () => {
54
+ e && (e.removeEventListener("keydown", t), e.removeEventListener("click", n));
55
+ };
56
+ }), p(() => {
57
+ O(r, w.selectedIds || w.defaultSelectedIds);
58
+ }, []);
59
+ let k = f((e) => {
60
+ O(r, Array.from(e.treeState.selectedIds)), d && d(e);
61
+ }, [
62
+ d,
63
+ r,
64
+ O
65
+ ]);
66
+ return /* @__PURE__ */ _(h, { children: /* @__PURE__ */ _(v, {
67
+ ref: g(E, T),
68
+ "aria-label": t,
69
+ className: u(y.tree, S),
70
+ data: r,
71
+ multiSelect: C,
72
+ nodeRenderer: b(n, i, D),
73
+ onExpand: a,
74
+ onSelect: k,
75
+ ...w
76
+ }) });
77
+ });
78
+ export { x as t };
package/dist/esm/index.js CHANGED
@@ -1,10 +1,6 @@
1
- import { Tree as o } from "./lib/tree.js";
2
- import { InlineError as f } from "./lib/components/inline-error/inline-error.js";
3
- import { Error as n } from "./lib/components/error/error.js";
4
- import { Skeleton as x } from "./lib/components/skeleton/skeleton.js";
5
- export {
6
- f as InlineError,
7
- o as Tree,
8
- n as TreeError,
9
- x as TreeSkeleton
10
- };
1
+ import { t as e } from "../chunks/error.js";
2
+ import { t } from "../chunks/inline-error.js";
3
+ import { t as n } from "../chunks/skeleton.js";
4
+ import "./lib/components/index.js";
5
+ import { t as r } from "../chunks/tree.js";
6
+ export { t as InlineError, r as Tree, e as TreeError, n as TreeSkeleton };
@@ -1,137 +1,110 @@
1
- import r from "clsx";
2
- import { useRef as c, useMemo as P } from "react";
3
- import { CONTENT_NODE_LOADING as W, CONTENT_NODE as q } from "../../constants.js";
4
- import { E as B, c as n } from "../../../../chunks/expander-with-loading.js";
5
- import { VariantIcon as F } from "./variant-icon.js";
6
- import { s as e } from "../../../../chunks/nodes.module.js";
7
- import { jsxs as u, jsx as l } from "react/jsx-runtime";
8
- import { useIntersectionObserver as H } from "../../hooks/useIntersectionObserver.js";
9
- import { NodeLabel as R } from "../node-label/node-label.js";
10
- import { TruncatedTooltipText as J } from "../truncated-tooltip-text/truncated-tooltip-text.js";
11
- function te({
12
- element: {
13
- name: i,
14
- metadata: t
15
- },
16
- level: N,
17
- getNodeProps: p,
18
- handleSelect: b,
19
- handleExpand: h,
20
- isBranch: V,
21
- isExpanded: v,
22
- isDisabled: m,
23
- isSelected: x,
24
- size: o,
25
- withIcon: L,
26
- containsSelection: k
27
- }) {
28
- const T = c(null), D = c(null), $ = c(null), f = c(null), {
29
- isLoading: E = !1,
30
- selectable: O = !0,
31
- variant: d
32
- } = t, {
33
- labelName: w,
34
- labelValue: I,
35
- subtitle: s,
36
- withDivider: _
37
- } = d === "labeled" ? {
38
- labelName: t.labelName,
39
- labelValue: t.labelValue,
40
- subtitle: void 0,
41
- withDivider: !1
42
- } : {
43
- labelName: void 0,
44
- labelValue: void 0,
45
- subtitle: t.subtitle,
46
- withDivider: t.withDivider ?? !1
47
- }, a = P(() => p({
48
- onClick: b
49
- }), [p, b]), j = H(T), C = !m && !v && k, y = {
50
- [`data-${q}`]: !0,
51
- [`data-${W}`]: E
52
- }, A = !!s || d === "labeled", g = ["node", e.node, e[`node-${o}-level${N - 1}`], e[`node--${o}`], {
53
- [e[`node--${o}-extraData`]]: A,
54
- [e["node--focused"]]: a.className.includes("tree-node--focused"),
55
- [e["node--disabled"]]: m,
56
- [e["node--nonselectable"]]: !O,
57
- "node--with-divider": _
58
- }], G = /* @__PURE__ */ u("div", {
59
- ...a,
60
- className: r(g, {
61
- [e["node--selected"]]: x || C
62
- }),
63
- "data-target-id": t?.dataTargetId,
64
- children: [V && /* @__PURE__ */ l("div", {
65
- className: r(e.expander, e[`expander-level${N - 1}`], e[`expander-${o}`]),
66
- children: /* @__PURE__ */ l(B, {
67
- handleExpand: h,
68
- isDisabled: m,
69
- isExpanded: v,
70
- isLoading: E,
71
- metadata: t,
72
- size: o
73
- })
74
- }), /* @__PURE__ */ u("div", {
75
- className: r(n.content),
76
- children: [L && /* @__PURE__ */ l(F, {
77
- metadata: t,
78
- name: i,
79
- size: o
80
- }), /* @__PURE__ */ u("div", {
81
- className: n["title-wrapper"],
82
- ...!O && {
83
- onClick: h
84
- },
85
- children: [d === "labeled" && /* @__PURE__ */ l(R, {
86
- ref: f,
87
- labelName: w,
88
- labelValue: I
89
- }), /* @__PURE__ */ l("span", {
90
- ref: D,
91
- className: r(n.title, n[`title--${o}`], {
92
- [n["title--selected"]]: x || C
93
- }),
94
- children: i
95
- }), s && /* @__PURE__ */ l("span", {
96
- ref: $,
97
- className: n.subtitle,
98
- children: s
99
- })]
100
- })]
101
- })]
102
- }), M = /* @__PURE__ */ l("div", {
103
- ...a,
104
- className: r(g, {
105
- [e["node--selected"]]: a.className.includes("tree-node--selected")
106
- }),
107
- "data-target-id": t?.dataTargetId,
108
- children: i
109
- });
110
- return /* @__PURE__ */ l("div", {
111
- ref: T,
112
- ...y,
113
- children: j ? M : /* @__PURE__ */ l(J, {
114
- labelElementRef: f,
115
- subtitleElementRef: $,
116
- textElementRef: D,
117
- tooltipContent: /* @__PURE__ */ u("div", {
118
- className: n.tooltip,
119
- children: [d === "labeled" && /* @__PURE__ */ l(R, {
120
- ref: f,
121
- color: "textOnDarkDefault",
122
- isInTooltip: !0,
123
- labelName: w,
124
- labelValue: I
125
- }), /* @__PURE__ */ l("span", {
126
- children: i
127
- }), s && /* @__PURE__ */ l("span", {
128
- children: s
129
- })]
130
- }),
131
- children: G
132
- })
133
- });
1
+ import { CONTENT_NODE as e, CONTENT_NODE_LOADING as t } from "../../constants.js";
2
+ import { useIntersectionObserver as n } from "../../hooks/useIntersectionObserver.js";
3
+ import { TruncatedTooltipText as r } from "../truncated-tooltip-text/truncated-tooltip-text.js";
4
+ import { n as i, t as a } from "../../../../chunks/expander-with-loading.js";
5
+ import { VariantIcon as o } from "./variant-icon.js";
6
+ import { t as s } from "../../../../chunks/nodes.module.js";
7
+ import { t as c } from "../../../../chunks/node-label.js";
8
+ import l from "clsx";
9
+ import { useMemo as u, useRef as d } from "react";
10
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ function m({ element: { name: m, metadata: h }, level: g, getNodeProps: _, handleSelect: v, handleExpand: y, isBranch: b, isExpanded: x, isDisabled: S, isSelected: C, size: w, withIcon: T, containsSelection: E }) {
12
+ let D = d(null), O = d(null), k = d(null), A = d(null), { isLoading: j = !1, selectable: M = !0, variant: N } = h, { labelName: P, labelValue: F, subtitle: I, withDivider: L } = N === "labeled" ? {
13
+ labelName: h.labelName,
14
+ labelValue: h.labelValue,
15
+ subtitle: void 0,
16
+ withDivider: !1
17
+ } : {
18
+ labelName: void 0,
19
+ labelValue: void 0,
20
+ subtitle: h.subtitle,
21
+ withDivider: h.withDivider ?? !1
22
+ }, R = u(() => _({ onClick: v }), [_, v]), z = n(D), B = !S && !x && E, V = {
23
+ [`data-${e}`]: !0,
24
+ [`data-${t}`]: j
25
+ }, H = !!I || N === "labeled", U = [
26
+ "node",
27
+ s.node,
28
+ s[`node-${w}-level${g - 1}`],
29
+ s[`node--${w}`],
30
+ {
31
+ [s[`node--${w}-extraData`]]: H,
32
+ [s["node--focused"]]: R.className.includes("tree-node--focused"),
33
+ [s["node--disabled"]]: S,
34
+ [s["node--nonselectable"]]: !M,
35
+ "node--with-divider": L
36
+ }
37
+ ], W = /* @__PURE__ */ p("div", {
38
+ ...R,
39
+ className: l(U, { [s["node--selected"]]: C || B }),
40
+ "data-target-id": h?.dataTargetId,
41
+ children: [b && /* @__PURE__ */ f("div", {
42
+ className: l(s.expander, s[`expander-level${g - 1}`], s[`expander-${w}`]),
43
+ children: /* @__PURE__ */ f(a, {
44
+ handleExpand: y,
45
+ isDisabled: S,
46
+ isExpanded: x,
47
+ isLoading: j,
48
+ metadata: h,
49
+ size: w
50
+ })
51
+ }), /* @__PURE__ */ p("div", {
52
+ className: l(i.content),
53
+ children: [T && /* @__PURE__ */ f(o, {
54
+ metadata: h,
55
+ name: m,
56
+ size: w
57
+ }), /* @__PURE__ */ p("div", {
58
+ className: i["title-wrapper"],
59
+ ...!M && { onClick: y },
60
+ children: [
61
+ N === "labeled" && /* @__PURE__ */ f(c, {
62
+ ref: A,
63
+ labelName: P,
64
+ labelValue: F
65
+ }),
66
+ /* @__PURE__ */ f("span", {
67
+ ref: O,
68
+ className: l(i.title, i[`title--${w}`], { [i["title--selected"]]: C || B }),
69
+ children: m
70
+ }),
71
+ I && /* @__PURE__ */ f("span", {
72
+ ref: k,
73
+ className: i.subtitle,
74
+ children: I
75
+ })
76
+ ]
77
+ })]
78
+ })]
79
+ }), G = /* @__PURE__ */ f("div", {
80
+ ...R,
81
+ className: l(U, { [s["node--selected"]]: R.className.includes("tree-node--selected") }),
82
+ "data-target-id": h?.dataTargetId,
83
+ children: m
84
+ });
85
+ return /* @__PURE__ */ f("div", {
86
+ ref: D,
87
+ ...V,
88
+ children: z ? G : /* @__PURE__ */ f(r, {
89
+ labelElementRef: A,
90
+ subtitleElementRef: k,
91
+ textElementRef: O,
92
+ tooltipContent: /* @__PURE__ */ p("div", {
93
+ className: i.tooltip,
94
+ children: [
95
+ N === "labeled" && /* @__PURE__ */ f(c, {
96
+ ref: A,
97
+ color: "textOnDarkDefault",
98
+ isInTooltip: !0,
99
+ labelName: P,
100
+ labelValue: F
101
+ }),
102
+ /* @__PURE__ */ f("span", { children: m }),
103
+ I && /* @__PURE__ */ f("span", { children: I })
104
+ ]
105
+ }),
106
+ children: W
107
+ })
108
+ });
134
109
  }
135
- export {
136
- te as ContentNode
137
- };
110
+ export { m as ContentNode };
@@ -1,9 +1,2 @@
1
- import "react-intl";
2
- import "@box/blueprint-web";
3
- import "./messages.js";
4
- import { E as d } from "../../../../chunks/expander-with-loading.js";
5
- import "react/jsx-runtime";
6
- import "../expander/expander.js";
7
- export {
8
- d as ExpanderWithLoading
9
- };
1
+ import { t as e } from "../../../../chunks/expander-with-loading.js";
2
+ export { e as ExpanderWithLoading };
@@ -1,4 +1,2 @@
1
- import { ContentNode as t } from "./content-node.js";
2
- export {
3
- t as ContentNode
4
- };
1
+ import { ContentNode as e } from "./content-node.js";
2
+ export { e as ContentNode };
@@ -1,10 +1,6 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const r = e({
3
- branchContentLoaderLabel: {
4
- id: "groupSharedFeatures.tree.branch.loaderLabel",
5
- defaultMessage: "Loading content for branch"
6
- }
7
- });
8
- export {
9
- r as default
10
- };
2
+ var t = e({ branchContentLoaderLabel: {
3
+ id: "groupSharedFeatures.tree.branch.loaderLabel",
4
+ defaultMessage: "Loading content for branch"
5
+ } });
6
+ export { t as default };
@@ -1,24 +1,16 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { NodeItemIcon as c } from "../node-icon/node-item-icon.js";
3
- import { NodeAvatar as i } from "../node-icon/node-avatar.js";
4
- const u = ({
5
- name: e,
6
- metadata: r,
7
- size: o
8
- }) => {
9
- const {
10
- variant: n
11
- } = r;
12
- return n === "content" ? /* @__PURE__ */ t(c, {
13
- iconType: r.iconType,
14
- size: o
15
- }) : n === "user" ? /* @__PURE__ */ t(i, {
16
- avatarSrc: r.avatarSrc,
17
- badge: r.badge,
18
- nodeTitle: e,
19
- size: o
20
- }) : null;
21
- };
22
- export {
23
- u as VariantIcon
1
+ import { NodeAvatar as e } from "../node-icon/node-avatar.js";
2
+ import { NodeItemIcon as t } from "../node-icon/node-item-icon.js";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ var r = ({ name: r, metadata: i, size: a }) => {
5
+ let { variant: o } = i;
6
+ return o === "content" ? /* @__PURE__ */ n(t, {
7
+ iconType: i.iconType,
8
+ size: a
9
+ }) : o === "user" ? /* @__PURE__ */ n(e, {
10
+ avatarSrc: i.avatarSrc,
11
+ badge: i.badge,
12
+ nodeTitle: r,
13
+ size: a
14
+ }) : null;
24
15
  };
16
+ export { r as VariantIcon };
@@ -1,34 +1,2 @@
1
- import { useIntl as i } from "react-intl";
2
- import { EmptyState as t, Text as s } from "@box/blueprint-web";
3
- import { Loader as m } from "@box/blueprint-web-assets/icons/Fill";
4
- import { Unplugged as a } from "@box/blueprint-web-assets/illustrations/Medium";
5
- import e from "./messages.js";
6
- import { jsx as r } from "react/jsx-runtime";
7
- import '../../../../styles/error.css';const l = "_error_pq9k8_1", c = {
8
- error: l
9
- };
10
- function y({
11
- onReload: n
12
- }) {
13
- const o = i();
14
- return /* @__PURE__ */ r(t, {
15
- body: /* @__PURE__ */ r(s, {
16
- as: "p",
17
- children: o.formatMessage(e.errorBody)
18
- }),
19
- className: c.error,
20
- heading: /* @__PURE__ */ r(s, {
21
- as: "h2",
22
- children: o.formatMessage(e.errorTitle)
23
- }),
24
- illustration: a,
25
- children: /* @__PURE__ */ r(t.PrimaryAction, {
26
- endIcon: m,
27
- onClick: n,
28
- children: o.formatMessage(e.reloadButton)
29
- })
30
- });
31
- }
32
- export {
33
- y as Error
34
- };
1
+ import { t as e } from "../../../../chunks/error.js";
2
+ export { e as Error };
@@ -1,4 +1,2 @@
1
- import { Error as e } from "./error.js";
2
- export {
3
- e as TreeError
4
- };
1
+ import { t as e } from "../../../../chunks/error.js";
2
+ export { e as TreeError };
@@ -1,18 +1,16 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const a = e({
3
- errorTitle: {
4
- id: "groupSharedFeatures.tree.error.title",
5
- defaultMessage: "Unable to load tree"
6
- },
7
- errorBody: {
8
- id: "groupSharedFeatures.tree.error.body",
9
- defaultMessage: "Reload to try again."
10
- },
11
- reloadButton: {
12
- id: "groupSharedFeatures.tree.error.reload",
13
- defaultMessage: "Reload"
14
- }
2
+ var t = e({
3
+ errorTitle: {
4
+ id: "groupSharedFeatures.tree.error.title",
5
+ defaultMessage: "Unable to load tree"
6
+ },
7
+ errorBody: {
8
+ id: "groupSharedFeatures.tree.error.body",
9
+ defaultMessage: "Reload to try again."
10
+ },
11
+ reloadButton: {
12
+ id: "groupSharedFeatures.tree.error.reload",
13
+ defaultMessage: "Reload"
14
+ }
15
15
  });
16
- export {
17
- a as default
18
- };
16
+ export { t as default };
@@ -1,33 +1,2 @@
1
- import { IconButton as i } from "@box/blueprint-web";
2
- import { PointerChevron as p, PointerChevronRight as c } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as x } from "react-intl";
4
- import o from "./messages.js";
5
- import { jsx as d } from "react/jsx-runtime";
6
- import '../../../../styles/expander.css';const f = {
7
- "expander-small": "_expander-small_17erq_1",
8
- "expander-large": "_expander-large_17erq_5"
9
- };
10
- function I({
11
- onClick: t,
12
- size: r,
13
- disabled: n,
14
- expanded: e,
15
- dataTargetId: l
16
- }) {
17
- const s = x(), m = (a) => {
18
- a.stopPropagation(), t(a);
19
- };
20
- return /* @__PURE__ */ d(i, {
21
- "aria-label": s.formatMessage(e ? o.collapse : o.expand),
22
- className: f[`expander-${r}`],
23
- "data-target-id": l,
24
- disabled: n,
25
- icon: e ? p : c,
26
- onClick: m,
27
- size: r === "small" ? "x-small" : "small",
28
- tabIndex: -1
29
- });
30
- }
31
- export {
32
- I as Expander
33
- };
1
+ import { t as e } from "../../../../chunks/expander.js";
2
+ export { e as Expander };
@@ -1,4 +1,2 @@
1
- import { Expander as o } from "./expander.js";
2
- export {
3
- o as Expander
4
- };
1
+ import { t as e } from "../../../../chunks/expander.js";
2
+ export { e as Expander };
@@ -1,14 +1,12 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const s = e({
3
- collapse: {
4
- id: "groupSharedFeatures.tree.expander.collapse",
5
- defaultMessage: "Collapse branch"
6
- },
7
- expand: {
8
- id: "groupSharedFeatures.tree.expander.expand",
9
- defaultMessage: "Expand branch"
10
- }
2
+ var t = e({
3
+ collapse: {
4
+ id: "groupSharedFeatures.tree.expander.collapse",
5
+ defaultMessage: "Collapse branch"
6
+ },
7
+ expand: {
8
+ id: "groupSharedFeatures.tree.expander.expand",
9
+ defaultMessage: "Expand branch"
10
+ }
11
11
  });
12
- export {
13
- s as default
14
- };
12
+ export { t as default };