@deepnoid/ui 0.1.51 → 0.1.53
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/.turbo/turbo-build.log +138 -138
- package/dist/{chunk-2RK3IMLR.mjs → chunk-T43IV3GD.mjs} +1 -0
- package/dist/{chunk-4FO4MABJ.mjs → chunk-XUP7M6LX.mjs} +43 -65
- package/dist/components/modal/index.js +1 -0
- package/dist/components/modal/index.mjs +1 -1
- package/dist/components/modal/modal.js +1 -0
- package/dist/components/modal/modal.mjs +1 -1
- package/dist/components/table/index.mjs +4 -4
- package/dist/components/table/table.mjs +4 -4
- package/dist/components/tree/index.js +43 -65
- package/dist/components/tree/index.mjs +1 -1
- package/dist/components/tree/tree.d.mts +1 -2
- package/dist/components/tree/tree.d.ts +1 -2
- package/dist/components/tree/tree.js +43 -65
- package/dist/components/tree/tree.mjs +1 -1
- package/dist/index.js +44 -65
- package/dist/index.mjs +14 -14
- package/package.json +1 -1
- package/dist/{chunk-LIUQU45I.mjs → chunk-7XFHA2U5.mjs} +3 -3
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import { forwardRef, useMemo, useState, useCallback } from "react";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
var TreeNodeItem = forwardRef(
|
|
16
|
-
({ node, depth, fileIcon, selectedId,
|
|
16
|
+
({ node, depth, fileIcon, selectedId, classNames, onExpand }, ref) => {
|
|
17
17
|
const [isOpen, setIsOpen] = useState(false);
|
|
18
18
|
const [children, setChildren] = useState(node.children);
|
|
19
19
|
const [isLoadingChildren, setIsLoadingChildren] = useState(false);
|
|
@@ -47,74 +47,53 @@ var TreeNodeItem = forwardRef(
|
|
|
47
47
|
e.preventDefault();
|
|
48
48
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
49
49
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
59
|
-
),
|
|
60
|
-
children: [
|
|
61
|
-
/* @__PURE__ */ jsxs(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
className: clsx(
|
|
65
|
-
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
66
|
-
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
67
|
-
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
68
|
-
),
|
|
69
|
-
onClick: handleClick,
|
|
70
|
-
onContextMenu: handleRightClick,
|
|
71
|
-
children: [
|
|
72
|
-
hasMore && /* @__PURE__ */ jsx(
|
|
73
|
-
Icon_default,
|
|
74
|
-
{
|
|
75
|
-
name: "right-chevron",
|
|
76
|
-
className: clsx(
|
|
77
|
-
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
78
|
-
isOpen ? "rotate-90" : "rotate-0"
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
fileIcon,
|
|
83
|
-
node.content
|
|
84
|
-
]
|
|
85
|
-
}
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]", children: [
|
|
51
|
+
/* @__PURE__ */ jsxs(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: clsx(
|
|
55
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
56
|
+
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
57
|
+
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
86
58
|
),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
59
|
+
onClick: handleClick,
|
|
60
|
+
onContextMenu: handleRightClick,
|
|
61
|
+
children: [
|
|
62
|
+
hasMore && /* @__PURE__ */ jsx(
|
|
63
|
+
Icon_default,
|
|
91
64
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
]
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
65
|
+
name: "right-chevron",
|
|
66
|
+
className: clsx(
|
|
67
|
+
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
68
|
+
isOpen ? "rotate-90" : "rotate-0"
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
fileIcon,
|
|
73
|
+
node.content
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
isOpen && /* @__PURE__ */ jsxs("div", { children: [
|
|
78
|
+
isLoadingChildren && /* @__PURE__ */ jsx("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
|
|
79
|
+
children == null ? void 0 : children.map((child) => /* @__PURE__ */ jsx(
|
|
80
|
+
TreeNodeItem,
|
|
81
|
+
{
|
|
82
|
+
node: child,
|
|
83
|
+
depth: depth + 1,
|
|
84
|
+
selectedId,
|
|
85
|
+
classNames,
|
|
86
|
+
fileIcon,
|
|
87
|
+
onExpand
|
|
88
|
+
},
|
|
89
|
+
child.id
|
|
90
|
+
))
|
|
91
|
+
] })
|
|
92
|
+
] });
|
|
105
93
|
}
|
|
106
94
|
);
|
|
107
95
|
TreeNodeItem.displayName = "TreeNodeItem";
|
|
108
|
-
var Tree = ({
|
|
109
|
-
headerContent,
|
|
110
|
-
group,
|
|
111
|
-
groupIcon,
|
|
112
|
-
fileIcon,
|
|
113
|
-
selectedId,
|
|
114
|
-
isLoading = false,
|
|
115
|
-
classNames,
|
|
116
|
-
onExpand
|
|
117
|
-
}) => {
|
|
96
|
+
var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }) => {
|
|
118
97
|
const slots = useMemo(() => treeStyle(), []);
|
|
119
98
|
const handleClick = (e) => {
|
|
120
99
|
var _a;
|
|
@@ -151,7 +130,6 @@ var Tree = ({
|
|
|
151
130
|
classNames,
|
|
152
131
|
fileIcon,
|
|
153
132
|
selectedId,
|
|
154
|
-
isLoading,
|
|
155
133
|
onExpand
|
|
156
134
|
},
|
|
157
135
|
node.id
|
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
import "../../chunk-DX3KXNP6.mjs";
|
|
3
3
|
import {
|
|
4
4
|
table_default
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-7XFHA2U5.mjs";
|
|
6
6
|
import "../../chunk-BPEMHZH3.mjs";
|
|
7
7
|
import "../../chunk-P7YYNA6L.mjs";
|
|
8
|
-
import "../../chunk-7B7LRG5J.mjs";
|
|
9
|
-
import "../../chunk-OTEWHVER.mjs";
|
|
10
|
-
import "../../chunk-F3HENRVM.mjs";
|
|
11
8
|
import "../../chunk-MZ76AA76.mjs";
|
|
12
9
|
import "../../chunk-6PN3DGOE.mjs";
|
|
13
10
|
import {
|
|
@@ -15,6 +12,9 @@ import {
|
|
|
15
12
|
} from "../../chunk-6TIIBU7J.mjs";
|
|
16
13
|
import "../../chunk-DQRAFUDA.mjs";
|
|
17
14
|
import "../../chunk-M37VBNB3.mjs";
|
|
15
|
+
import "../../chunk-7B7LRG5J.mjs";
|
|
16
|
+
import "../../chunk-OTEWHVER.mjs";
|
|
17
|
+
import "../../chunk-F3HENRVM.mjs";
|
|
18
18
|
import "../../chunk-2GCSFWHD.mjs";
|
|
19
19
|
import "../../chunk-FDBWNO2X.mjs";
|
|
20
20
|
import "../../chunk-QZ3LVYJW.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
table_default
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-7XFHA2U5.mjs";
|
|
5
5
|
import "../../chunk-BPEMHZH3.mjs";
|
|
6
6
|
import "../../chunk-P7YYNA6L.mjs";
|
|
7
|
-
import "../../chunk-7B7LRG5J.mjs";
|
|
8
|
-
import "../../chunk-OTEWHVER.mjs";
|
|
9
|
-
import "../../chunk-F3HENRVM.mjs";
|
|
10
7
|
import "../../chunk-MZ76AA76.mjs";
|
|
11
8
|
import "../../chunk-6PN3DGOE.mjs";
|
|
12
9
|
import "../../chunk-DQRAFUDA.mjs";
|
|
13
10
|
import "../../chunk-M37VBNB3.mjs";
|
|
11
|
+
import "../../chunk-7B7LRG5J.mjs";
|
|
12
|
+
import "../../chunk-OTEWHVER.mjs";
|
|
13
|
+
import "../../chunk-F3HENRVM.mjs";
|
|
14
14
|
import "../../chunk-2GCSFWHD.mjs";
|
|
15
15
|
import "../../chunk-FDBWNO2X.mjs";
|
|
16
16
|
import "../../chunk-QZ3LVYJW.mjs";
|
|
@@ -4373,7 +4373,7 @@ function toVal(mix) {
|
|
|
4373
4373
|
// src/components/tree/tree.tsx
|
|
4374
4374
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
4375
4375
|
var TreeNodeItem = (0, import_react.forwardRef)(
|
|
4376
|
-
({ node, depth, fileIcon, selectedId,
|
|
4376
|
+
({ node, depth, fileIcon, selectedId, classNames, onExpand }, ref) => {
|
|
4377
4377
|
const [isOpen, setIsOpen] = (0, import_react.useState)(false);
|
|
4378
4378
|
const [children, setChildren] = (0, import_react.useState)(node.children);
|
|
4379
4379
|
const [isLoadingChildren, setIsLoadingChildren] = (0, import_react.useState)(false);
|
|
@@ -4407,74 +4407,53 @@ var TreeNodeItem = (0, import_react.forwardRef)(
|
|
|
4407
4407
|
e.preventDefault();
|
|
4408
4408
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
4409
4409
|
};
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
4419
|
-
),
|
|
4420
|
-
children: [
|
|
4421
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4422
|
-
"div",
|
|
4423
|
-
{
|
|
4424
|
-
className: clsx(
|
|
4425
|
-
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4426
|
-
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
4427
|
-
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
4428
|
-
),
|
|
4429
|
-
onClick: handleClick,
|
|
4430
|
-
onContextMenu: handleRightClick,
|
|
4431
|
-
children: [
|
|
4432
|
-
hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4433
|
-
Icon_default,
|
|
4434
|
-
{
|
|
4435
|
-
name: "right-chevron",
|
|
4436
|
-
className: clsx(
|
|
4437
|
-
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
4438
|
-
isOpen ? "rotate-90" : "rotate-0"
|
|
4439
|
-
)
|
|
4440
|
-
}
|
|
4441
|
-
),
|
|
4442
|
-
fileIcon,
|
|
4443
|
-
node.content
|
|
4444
|
-
]
|
|
4445
|
-
}
|
|
4410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]", children: [
|
|
4411
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4412
|
+
"div",
|
|
4413
|
+
{
|
|
4414
|
+
className: clsx(
|
|
4415
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4416
|
+
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
4417
|
+
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
4446
4418
|
),
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4419
|
+
onClick: handleClick,
|
|
4420
|
+
onContextMenu: handleRightClick,
|
|
4421
|
+
children: [
|
|
4422
|
+
hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4423
|
+
Icon_default,
|
|
4451
4424
|
{
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
]
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4425
|
+
name: "right-chevron",
|
|
4426
|
+
className: clsx(
|
|
4427
|
+
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
4428
|
+
isOpen ? "rotate-90" : "rotate-0"
|
|
4429
|
+
)
|
|
4430
|
+
}
|
|
4431
|
+
),
|
|
4432
|
+
fileIcon,
|
|
4433
|
+
node.content
|
|
4434
|
+
]
|
|
4435
|
+
}
|
|
4436
|
+
),
|
|
4437
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
4438
|
+
isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
|
|
4439
|
+
children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4440
|
+
TreeNodeItem,
|
|
4441
|
+
{
|
|
4442
|
+
node: child,
|
|
4443
|
+
depth: depth + 1,
|
|
4444
|
+
selectedId,
|
|
4445
|
+
classNames,
|
|
4446
|
+
fileIcon,
|
|
4447
|
+
onExpand
|
|
4448
|
+
},
|
|
4449
|
+
child.id
|
|
4450
|
+
))
|
|
4451
|
+
] })
|
|
4452
|
+
] });
|
|
4465
4453
|
}
|
|
4466
4454
|
);
|
|
4467
4455
|
TreeNodeItem.displayName = "TreeNodeItem";
|
|
4468
|
-
var Tree = ({
|
|
4469
|
-
headerContent,
|
|
4470
|
-
group,
|
|
4471
|
-
groupIcon,
|
|
4472
|
-
fileIcon,
|
|
4473
|
-
selectedId,
|
|
4474
|
-
isLoading = false,
|
|
4475
|
-
classNames,
|
|
4476
|
-
onExpand
|
|
4477
|
-
}) => {
|
|
4456
|
+
var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }) => {
|
|
4478
4457
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4479
4458
|
const handleClick = (e) => {
|
|
4480
4459
|
var _a;
|
|
@@ -4511,7 +4490,6 @@ var Tree = ({
|
|
|
4511
4490
|
classNames,
|
|
4512
4491
|
fileIcon,
|
|
4513
4492
|
selectedId,
|
|
4514
|
-
isLoading,
|
|
4515
4493
|
onExpand
|
|
4516
4494
|
},
|
|
4517
4495
|
node.id
|
|
@@ -23,12 +23,11 @@ interface TreeProps {
|
|
|
23
23
|
groupIcon?: ReactNode;
|
|
24
24
|
fileIcon?: ReactNode;
|
|
25
25
|
selectedId?: number | string;
|
|
26
|
-
isLoading?: boolean;
|
|
27
26
|
classNames?: SlotsToClasses<TreeSlots>;
|
|
28
27
|
onExpand?: (node: TreeNode) => Promise<TreeNode[]>;
|
|
29
28
|
}
|
|
30
29
|
declare const Tree: {
|
|
31
|
-
({ headerContent, group, groupIcon, fileIcon, selectedId,
|
|
30
|
+
({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }: TreeProps): react_jsx_runtime.JSX.Element;
|
|
32
31
|
displayName: string;
|
|
33
32
|
};
|
|
34
33
|
|
|
@@ -23,12 +23,11 @@ interface TreeProps {
|
|
|
23
23
|
groupIcon?: ReactNode;
|
|
24
24
|
fileIcon?: ReactNode;
|
|
25
25
|
selectedId?: number | string;
|
|
26
|
-
isLoading?: boolean;
|
|
27
26
|
classNames?: SlotsToClasses<TreeSlots>;
|
|
28
27
|
onExpand?: (node: TreeNode) => Promise<TreeNode[]>;
|
|
29
28
|
}
|
|
30
29
|
declare const Tree: {
|
|
31
|
-
({ headerContent, group, groupIcon, fileIcon, selectedId,
|
|
30
|
+
({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }: TreeProps): react_jsx_runtime.JSX.Element;
|
|
32
31
|
displayName: string;
|
|
33
32
|
};
|
|
34
33
|
|
|
@@ -4372,7 +4372,7 @@ function toVal(mix) {
|
|
|
4372
4372
|
// src/components/tree/tree.tsx
|
|
4373
4373
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
4374
4374
|
var TreeNodeItem = (0, import_react.forwardRef)(
|
|
4375
|
-
({ node, depth, fileIcon, selectedId,
|
|
4375
|
+
({ node, depth, fileIcon, selectedId, classNames, onExpand }, ref) => {
|
|
4376
4376
|
const [isOpen, setIsOpen] = (0, import_react.useState)(false);
|
|
4377
4377
|
const [children, setChildren] = (0, import_react.useState)(node.children);
|
|
4378
4378
|
const [isLoadingChildren, setIsLoadingChildren] = (0, import_react.useState)(false);
|
|
@@ -4406,74 +4406,53 @@ var TreeNodeItem = (0, import_react.forwardRef)(
|
|
|
4406
4406
|
e.preventDefault();
|
|
4407
4407
|
(_a = node.onRightClick) == null ? void 0 : _a.call(node, e);
|
|
4408
4408
|
};
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
isLoading ? "-translate-y-2 opacity-0" : "translate-y-0 opacity-100"
|
|
4418
|
-
),
|
|
4419
|
-
children: [
|
|
4420
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4421
|
-
"div",
|
|
4422
|
-
{
|
|
4423
|
-
className: clsx(
|
|
4424
|
-
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4425
|
-
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
4426
|
-
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
4427
|
-
),
|
|
4428
|
-
onClick: handleClick,
|
|
4429
|
-
onContextMenu: handleRightClick,
|
|
4430
|
-
children: [
|
|
4431
|
-
hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4432
|
-
Icon_default,
|
|
4433
|
-
{
|
|
4434
|
-
name: "right-chevron",
|
|
4435
|
-
className: clsx(
|
|
4436
|
-
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
4437
|
-
isOpen ? "rotate-90" : "rotate-0"
|
|
4438
|
-
)
|
|
4439
|
-
}
|
|
4440
|
-
),
|
|
4441
|
-
fileIcon,
|
|
4442
|
-
node.content
|
|
4443
|
-
]
|
|
4444
|
-
}
|
|
4409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { ref, className: depth > 1 ? hasMore ? "ml-[30px]" : "ml-[55px]" : hasMore ? "" : "ml-[25px]", children: [
|
|
4410
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
4411
|
+
"div",
|
|
4412
|
+
{
|
|
4413
|
+
className: clsx(
|
|
4414
|
+
slots.node({ class: classNames == null ? void 0 : classNames.node }),
|
|
4415
|
+
slots.clickable({ class: classNames == null ? void 0 : classNames.clickable }),
|
|
4416
|
+
selectedId == node.id ? "bg-neutral-soft" : ""
|
|
4445
4417
|
),
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4418
|
+
onClick: handleClick,
|
|
4419
|
+
onContextMenu: handleRightClick,
|
|
4420
|
+
children: [
|
|
4421
|
+
hasMore && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4422
|
+
Icon_default,
|
|
4450
4423
|
{
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
]
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4424
|
+
name: "right-chevron",
|
|
4425
|
+
className: clsx(
|
|
4426
|
+
"text-neutral-main cursor-pointer transition-transform duration-150",
|
|
4427
|
+
isOpen ? "rotate-90" : "rotate-0"
|
|
4428
|
+
)
|
|
4429
|
+
}
|
|
4430
|
+
),
|
|
4431
|
+
fileIcon,
|
|
4432
|
+
node.content
|
|
4433
|
+
]
|
|
4434
|
+
}
|
|
4435
|
+
),
|
|
4436
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
4437
|
+
isLoadingChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "text-neutral py-1 text-sm", children: "loading..." }),
|
|
4438
|
+
children == null ? void 0 : children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
4439
|
+
TreeNodeItem,
|
|
4440
|
+
{
|
|
4441
|
+
node: child,
|
|
4442
|
+
depth: depth + 1,
|
|
4443
|
+
selectedId,
|
|
4444
|
+
classNames,
|
|
4445
|
+
fileIcon,
|
|
4446
|
+
onExpand
|
|
4447
|
+
},
|
|
4448
|
+
child.id
|
|
4449
|
+
))
|
|
4450
|
+
] })
|
|
4451
|
+
] });
|
|
4464
4452
|
}
|
|
4465
4453
|
);
|
|
4466
4454
|
TreeNodeItem.displayName = "TreeNodeItem";
|
|
4467
|
-
var Tree = ({
|
|
4468
|
-
headerContent,
|
|
4469
|
-
group,
|
|
4470
|
-
groupIcon,
|
|
4471
|
-
fileIcon,
|
|
4472
|
-
selectedId,
|
|
4473
|
-
isLoading = false,
|
|
4474
|
-
classNames,
|
|
4475
|
-
onExpand
|
|
4476
|
-
}) => {
|
|
4455
|
+
var Tree = ({ headerContent, group, groupIcon, fileIcon, selectedId, classNames, onExpand }) => {
|
|
4477
4456
|
const slots = (0, import_react.useMemo)(() => treeStyle(), []);
|
|
4478
4457
|
const handleClick = (e) => {
|
|
4479
4458
|
var _a;
|
|
@@ -4510,7 +4489,6 @@ var Tree = ({
|
|
|
4510
4489
|
classNames,
|
|
4511
4490
|
fileIcon,
|
|
4512
4491
|
selectedId,
|
|
4513
|
-
isLoading,
|
|
4514
4492
|
onExpand
|
|
4515
4493
|
},
|
|
4516
4494
|
node.id
|