@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
|
@@ -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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { VariantIcon as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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 "
|
|
2
|
-
|
|
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,10 +1,6 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
2
|
-
import { NodeItemIcon as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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 {
|
|
2
|
-
|
|
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,18 +1,16 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 {
|
|
2
|
-
|
|
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,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
|
+
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 };
|