@hkyhy/marsun-components-core 0.1.52 → 0.1.56
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/README.md +29 -15
- package/dist/agent-hub.d.ts +11 -0
- package/dist/agent-hub.js +144 -0
- package/dist/agent-hub.js.map +1 -0
- package/dist/components/AgentHub/Chat/Action/CreateButton.js +3 -3
- package/dist/components/AgentHub/Chat/Action/ManageActionButtons.js +4 -4
- package/dist/components/AgentHub/Chat/Action/SessionActionButtons.js +4 -4
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js +29 -27
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js +19 -18
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/CitationPanel/index.js +18 -17
- package/dist/components/AgentHub/Chat/Detail/CitationPanel/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/MessageActions/index.js +23 -19
- package/dist/components/AgentHub/Chat/Detail/MessageActions/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js +23 -21
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/List/ChatCard/index.js +7 -7
- package/dist/components/AgentHub/Chat/List/SessionSidebar/index.js +19 -17
- package/dist/components/AgentHub/Chat/List/SessionSidebar/index.js.map +1 -1
- package/dist/components/AgentHub/KnowledgeBase/Action/CreateButton.js +3 -3
- package/dist/components/AgentHub/KnowledgeBase/Action/ManageActionButtons.js +1 -1
- package/dist/components/AgentHub/KnowledgeBase/Detail/DocumentTable/index.js +16 -15
- package/dist/components/AgentHub/KnowledgeBase/Detail/DocumentTable/index.js.map +1 -1
- package/dist/components/AgentHub/KnowledgeBase/Detail/ParseStatusTag/index.js +7 -7
- package/dist/components/AgentHub/KnowledgeBase/List/KnowledgeCard/index.js +8 -8
- package/dist/components/AgentHub/Report/Detail/ReportHtmlPreview/index.js +1 -1
- package/dist/components/Auth/UserProfileCard/UserProfileCard.js +7 -7
- package/dist/components/Auth/UserProfileCard/style.module.scss.js +16 -16
- package/dist/components/File/FileItem/index.js +22 -20
- package/dist/components/File/FileItem/index.js.map +1 -1
- package/dist/components/File/FilePreview/index.js +11 -11
- package/dist/components/File/fileDisplay.js +41 -36
- package/dist/components/File/fileDisplay.js.map +1 -1
- package/dist/components/Filter/CommonFilter/index.js +20 -18
- package/dist/components/Filter/CommonFilter/index.js.map +1 -1
- package/dist/components/Filter/FilterSelect/index.js +90 -89
- package/dist/components/Filter/FilterSelect/index.js.map +1 -1
- package/dist/components/Filter/FilterTreeSelect/index.js +51 -48
- package/dist/components/Filter/FilterTreeSelect/index.js.map +1 -1
- package/dist/components/Filter/FilterTrigger/index.js +13 -11
- package/dist/components/Filter/FilterTrigger/index.js.map +1 -1
- package/dist/components/Form/PersonOptionRow/index.js +4 -4
- package/dist/components/Icons/ArrowLeft.d.ts +1 -0
- package/dist/components/Icons/ArrowLeft.js +7 -0
- package/dist/components/Icons/ArrowLeft.js.map +1 -0
- package/dist/components/Icons/ArrowLeftRight.d.ts +1 -0
- package/dist/components/Icons/ArrowLeftRight.js +7 -0
- package/dist/components/Icons/ArrowLeftRight.js.map +1 -0
- package/dist/components/Icons/BarChart3.d.ts +1 -0
- package/dist/components/Icons/BarChart3.js +7 -0
- package/dist/components/Icons/BarChart3.js.map +1 -0
- package/dist/components/Icons/Bell.d.ts +1 -0
- package/dist/components/Icons/Bell.js +7 -0
- package/dist/components/Icons/Bell.js.map +1 -0
- package/dist/components/Icons/BookOpen.d.ts +1 -0
- package/dist/components/Icons/BookOpen.js +7 -0
- package/dist/components/Icons/BookOpen.js.map +1 -0
- package/dist/components/Icons/Bot.d.ts +1 -0
- package/dist/components/Icons/Bot.js +7 -0
- package/dist/components/Icons/Bot.js.map +1 -0
- package/dist/components/Icons/Check.d.ts +1 -0
- package/dist/components/Icons/Check.js +7 -0
- package/dist/components/Icons/Check.js.map +1 -0
- package/dist/components/Icons/ChevronDown.d.ts +1 -0
- package/dist/components/Icons/ChevronDown.js +7 -0
- package/dist/components/Icons/ChevronDown.js.map +1 -0
- package/dist/components/Icons/ChevronLeft.d.ts +1 -0
- package/dist/components/Icons/ChevronLeft.js +7 -0
- package/dist/components/Icons/ChevronLeft.js.map +1 -0
- package/dist/components/Icons/ChevronRight.d.ts +1 -0
- package/dist/components/Icons/ChevronRight.js +7 -0
- package/dist/components/Icons/ChevronRight.js.map +1 -0
- package/dist/components/Icons/ChevronUp.d.ts +1 -0
- package/dist/components/Icons/ChevronUp.js +7 -0
- package/dist/components/Icons/ChevronUp.js.map +1 -0
- package/dist/components/Icons/CircleAlert.d.ts +1 -0
- package/dist/components/Icons/CircleAlert.js +7 -0
- package/dist/components/Icons/CircleAlert.js.map +1 -0
- package/dist/components/Icons/CircleCheck.d.ts +1 -0
- package/dist/components/Icons/CircleCheck.js +7 -0
- package/dist/components/Icons/CircleCheck.js.map +1 -0
- package/dist/components/Icons/CircleHelp.d.ts +1 -0
- package/dist/components/Icons/CircleHelp.js +7 -0
- package/dist/components/Icons/CircleHelp.js.map +1 -0
- package/dist/components/Icons/CirclePlay.d.ts +1 -0
- package/dist/components/Icons/CirclePlay.js +7 -0
- package/dist/components/Icons/CirclePlay.js.map +1 -0
- package/dist/components/Icons/CircleX.d.ts +1 -0
- package/dist/components/Icons/CircleX.js +7 -0
- package/dist/components/Icons/CircleX.js.map +1 -0
- package/dist/components/Icons/ClipboardCheck.d.ts +1 -0
- package/dist/components/Icons/ClipboardCheck.js +7 -0
- package/dist/components/Icons/ClipboardCheck.js.map +1 -0
- package/dist/components/Icons/Clock.d.ts +1 -0
- package/dist/components/Icons/Clock.js +7 -0
- package/dist/components/Icons/Clock.js.map +1 -0
- package/dist/components/Icons/CloudDownload.d.ts +1 -0
- package/dist/components/Icons/CloudDownload.js +7 -0
- package/dist/components/Icons/CloudDownload.js.map +1 -0
- package/dist/components/Icons/CloudUpload.d.ts +1 -0
- package/dist/components/Icons/CloudUpload.js +7 -0
- package/dist/components/Icons/CloudUpload.js.map +1 -0
- package/dist/components/Icons/Code.d.ts +1 -0
- package/dist/components/Icons/Code.js +7 -0
- package/dist/components/Icons/Code.js.map +1 -0
- package/dist/components/Icons/Copy.d.ts +1 -0
- package/dist/components/Icons/Copy.js +7 -0
- package/dist/components/Icons/Copy.js.map +1 -0
- package/dist/components/Icons/Crown.d.ts +1 -0
- package/dist/components/Icons/Crown.js +7 -0
- package/dist/components/Icons/Crown.js.map +1 -0
- package/dist/components/Icons/Database.d.ts +1 -0
- package/dist/components/Icons/Database.js +7 -0
- package/dist/components/Icons/Database.js.map +1 -0
- package/dist/components/Icons/Download.d.ts +1 -0
- package/dist/components/Icons/Download.js +7 -0
- package/dist/components/Icons/Download.js.map +1 -0
- package/dist/components/Icons/Eye.d.ts +1 -0
- package/dist/components/Icons/Eye.js +7 -0
- package/dist/components/Icons/Eye.js.map +1 -0
- package/dist/components/Icons/EyeOff.d.ts +1 -0
- package/dist/components/Icons/EyeOff.js +7 -0
- package/dist/components/Icons/EyeOff.js.map +1 -0
- package/dist/components/Icons/File.d.ts +1 -0
- package/dist/components/Icons/File.js +7 -0
- package/dist/components/Icons/File.js.map +1 -0
- package/dist/components/Icons/FileArchive.d.ts +1 -0
- package/dist/components/Icons/FileArchive.js +7 -0
- package/dist/components/Icons/FileArchive.js.map +1 -0
- package/dist/components/Icons/FileImage.d.ts +1 -0
- package/dist/components/Icons/FileImage.js +7 -0
- package/dist/components/Icons/FileImage.js.map +1 -0
- package/dist/components/Icons/FileSpreadsheet.d.ts +1 -0
- package/dist/components/Icons/FileSpreadsheet.js +7 -0
- package/dist/components/Icons/FileSpreadsheet.js.map +1 -0
- package/dist/components/Icons/FileText.d.ts +1 -0
- package/dist/components/Icons/FileText.js +7 -0
- package/dist/components/Icons/FileText.js.map +1 -0
- package/dist/components/Icons/Flag.d.ts +1 -0
- package/dist/components/Icons/Flag.js +7 -0
- package/dist/components/Icons/Flag.js.map +1 -0
- package/dist/components/Icons/Flame.d.ts +1 -0
- package/dist/components/Icons/Flame.js +7 -0
- package/dist/components/Icons/Flame.js.map +1 -0
- package/dist/components/Icons/Folder.d.ts +1 -0
- package/dist/components/Icons/Folder.js +7 -0
- package/dist/components/Icons/Folder.js.map +1 -0
- package/dist/components/Icons/FolderOpen.d.ts +1 -0
- package/dist/components/Icons/FolderOpen.js +7 -0
- package/dist/components/Icons/FolderOpen.js.map +1 -0
- package/dist/components/Icons/Hash.d.ts +1 -0
- package/dist/components/Icons/Hash.js +7 -0
- package/dist/components/Icons/Hash.js.map +1 -0
- package/dist/components/Icons/House.d.ts +1 -0
- package/dist/components/Icons/House.js +7 -0
- package/dist/components/Icons/House.js.map +1 -0
- package/dist/components/Icons/Import.d.ts +1 -0
- package/dist/components/Icons/Import.js +7 -0
- package/dist/components/Icons/Import.js.map +1 -0
- package/dist/components/Icons/Inbox.d.ts +1 -0
- package/dist/components/Icons/Inbox.js +7 -0
- package/dist/components/Icons/Inbox.js.map +1 -0
- package/dist/components/Icons/Info.d.ts +1 -0
- package/dist/components/Icons/Info.js +7 -0
- package/dist/components/Icons/Info.js.map +1 -0
- package/dist/components/Icons/LayoutDashboard.d.ts +1 -0
- package/dist/components/Icons/LayoutDashboard.js +7 -0
- package/dist/components/Icons/LayoutDashboard.js.map +1 -0
- package/dist/components/Icons/LayoutGrid.d.ts +1 -0
- package/dist/components/Icons/LayoutGrid.js +7 -0
- package/dist/components/Icons/LayoutGrid.js.map +1 -0
- package/dist/components/Icons/ListTodo.d.ts +1 -0
- package/dist/components/Icons/ListTodo.js +7 -0
- package/dist/components/Icons/ListTodo.js.map +1 -0
- package/dist/components/Icons/Loader2.d.ts +1 -0
- package/dist/components/Icons/Loader2.js +7 -0
- package/dist/components/Icons/Loader2.js.map +1 -0
- package/dist/components/Icons/Lock.d.ts +1 -0
- package/dist/components/Icons/Lock.js +7 -0
- package/dist/components/Icons/Lock.js.map +1 -0
- package/dist/components/Icons/LogOut.d.ts +1 -0
- package/dist/components/Icons/LogOut.js +7 -0
- package/dist/components/Icons/LogOut.js.map +1 -0
- package/dist/components/Icons/Maximize2.d.ts +1 -0
- package/dist/components/Icons/Maximize2.js +7 -0
- package/dist/components/Icons/Maximize2.js.map +1 -0
- package/dist/components/Icons/MessageCircle.d.ts +1 -0
- package/dist/components/Icons/MessageCircle.js +7 -0
- package/dist/components/Icons/MessageCircle.js.map +1 -0
- package/dist/components/Icons/MessageSquare.d.ts +1 -0
- package/dist/components/Icons/MessageSquare.js +7 -0
- package/dist/components/Icons/MessageSquare.js.map +1 -0
- package/dist/components/Icons/Minimize2.d.ts +1 -0
- package/dist/components/Icons/Minimize2.js +7 -0
- package/dist/components/Icons/Minimize2.js.map +1 -0
- package/dist/components/Icons/PanelLeftClose.d.ts +1 -0
- package/dist/components/Icons/PanelLeftClose.js +7 -0
- package/dist/components/Icons/PanelLeftClose.js.map +1 -0
- package/dist/components/Icons/PanelLeftOpen.d.ts +1 -0
- package/dist/components/Icons/PanelLeftOpen.js +7 -0
- package/dist/components/Icons/PanelLeftOpen.js.map +1 -0
- package/dist/components/Icons/Pause.d.ts +1 -0
- package/dist/components/Icons/Pause.js +7 -0
- package/dist/components/Icons/Pause.js.map +1 -0
- package/dist/components/Icons/Pencil.d.ts +1 -0
- package/dist/components/Icons/Pencil.js +7 -0
- package/dist/components/Icons/Pencil.js.map +1 -0
- package/dist/components/Icons/Plus.d.ts +1 -0
- package/dist/components/Icons/Plus.js +7 -0
- package/dist/components/Icons/Plus.js.map +1 -0
- package/dist/components/Icons/Presentation.d.ts +1 -0
- package/dist/components/Icons/Presentation.js +7 -0
- package/dist/components/Icons/Presentation.js.map +1 -0
- package/dist/components/Icons/RefreshCw.d.ts +1 -0
- package/dist/components/Icons/RefreshCw.js +7 -0
- package/dist/components/Icons/RefreshCw.js.map +1 -0
- package/dist/components/Icons/RotateCw.d.ts +1 -0
- package/dist/components/Icons/RotateCw.js +7 -0
- package/dist/components/Icons/RotateCw.js.map +1 -0
- package/dist/components/Icons/Send.d.ts +1 -0
- package/dist/components/Icons/Send.js +7 -0
- package/dist/components/Icons/Send.js.map +1 -0
- package/dist/components/Icons/Settings.d.ts +1 -0
- package/dist/components/Icons/Settings.js +7 -0
- package/dist/components/Icons/Settings.js.map +1 -0
- package/dist/components/Icons/Shield.d.ts +1 -0
- package/dist/components/Icons/Shield.js +7 -0
- package/dist/components/Icons/Shield.js.map +1 -0
- package/dist/components/Icons/ShieldCheck.d.ts +1 -0
- package/dist/components/Icons/ShieldCheck.js +7 -0
- package/dist/components/Icons/ShieldCheck.js.map +1 -0
- package/dist/components/Icons/SlidersHorizontal.d.ts +1 -0
- package/dist/components/Icons/SlidersHorizontal.js +7 -0
- package/dist/components/Icons/SlidersHorizontal.js.map +1 -0
- package/dist/components/Icons/Square.d.ts +1 -0
- package/dist/components/Icons/Square.js +7 -0
- package/dist/components/Icons/Square.js.map +1 -0
- package/dist/components/Icons/Star.d.ts +1 -0
- package/dist/components/Icons/Star.js +7 -0
- package/dist/components/Icons/Star.js.map +1 -0
- package/dist/components/Icons/ThumbsDown.d.ts +1 -0
- package/dist/components/Icons/ThumbsDown.js +7 -0
- package/dist/components/Icons/ThumbsDown.js.map +1 -0
- package/dist/components/Icons/ThumbsUp.d.ts +1 -0
- package/dist/components/Icons/ThumbsUp.js +7 -0
- package/dist/components/Icons/ThumbsUp.js.map +1 -0
- package/dist/components/Icons/Trash2.d.ts +1 -0
- package/dist/components/Icons/Trash2.js +7 -0
- package/dist/components/Icons/Trash2.js.map +1 -0
- package/dist/components/Icons/Trophy.d.ts +1 -0
- package/dist/components/Icons/Trophy.js +7 -0
- package/dist/components/Icons/Trophy.js.map +1 -0
- package/dist/components/Icons/Undo2.d.ts +1 -0
- package/dist/components/Icons/Undo2.js +7 -0
- package/dist/components/Icons/Undo2.js.map +1 -0
- package/dist/components/Icons/Upload.d.ts +1 -0
- package/dist/components/Icons/Upload.js +7 -0
- package/dist/components/Icons/Upload.js.map +1 -0
- package/dist/components/Icons/User.d.ts +1 -0
- package/dist/components/Icons/User.js +7 -0
- package/dist/components/Icons/User.js.map +1 -0
- package/dist/components/Icons/UserPlus.d.ts +1 -0
- package/dist/components/Icons/UserPlus.js +7 -0
- package/dist/components/Icons/UserPlus.js.map +1 -0
- package/dist/components/Icons/UserRoundCog.d.ts +1 -0
- package/dist/components/Icons/UserRoundCog.js +7 -0
- package/dist/components/Icons/UserRoundCog.js.map +1 -0
- package/dist/components/Icons/Users.d.ts +1 -0
- package/dist/components/Icons/Users.js +7 -0
- package/dist/components/Icons/Users.js.map +1 -0
- package/dist/components/Icons/X.d.ts +1 -0
- package/dist/components/Icons/X.js +7 -0
- package/dist/components/Icons/X.js.map +1 -0
- package/dist/components/Icons/createIcon.d.ts +9 -0
- package/dist/components/Icons/createIcon.js +32 -0
- package/dist/components/Icons/createIcon.js.map +1 -0
- package/dist/components/Icons/index.d.ts +80 -90
- package/dist/components/Icons/registry.d.ts +6 -0
- package/dist/components/Icons/registry.js +239 -0
- package/dist/components/Icons/registry.js.map +1 -0
- package/dist/components/InteractiveBlock/InteractiveBlock.js +6 -6
- package/dist/components/Layout/AgentAppShell/AgentAppShell.js +112 -91
- package/dist/components/Layout/AgentAppShell/AgentAppShell.js.map +1 -1
- package/dist/components/Layout/AgentAppShell/style.module.scss.js +20 -18
- package/dist/components/Layout/AgentAppShell/style.module.scss.js.map +1 -1
- package/dist/components/Layout/PageHeaderLayout/index.js +7 -7
- package/dist/components/Modal/Modal/index.js +8 -8
- package/dist/components/Modal/StepModal/index.js +9 -9
- package/dist/components/OrgTree/OrgTree.js +41 -39
- package/dist/components/OrgTree/OrgTree.js.map +1 -1
- package/dist/components/StateBar/StateBar.js +4 -4
- package/dist/components/Table/ColumnConfigPanel.js +13 -10
- package/dist/components/Table/ColumnConfigPanel.js.map +1 -1
- package/dist/components/Table/Table.js +7 -7
- package/dist/components/Tour/AppTour/index.js +10 -10
- package/dist/components/Upload/index.js +76 -72
- package/dist/components/Upload/index.js.map +1 -1
- package/dist/file.d.ts +5 -0
- package/dist/file.js +24 -0
- package/dist/file.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +615 -537
- package/dist/index.js.map +1 -1
- package/dist/llm.d.ts +5 -0
- package/dist/llm.js +8 -0
- package/dist/llm.js.map +1 -0
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +15 -5
- package/dist/components/Icons/index.js +0 -268
- package/dist/components/Icons/index.js.map +0 -1
|
@@ -1,103 +1,124 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import a from "./style.module.scss.js";
|
|
1
|
+
import { jsx as a, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Layout as S, Menu as j } from "antd";
|
|
3
|
+
import n from "classnames";
|
|
4
|
+
import e from "./style.module.scss.js";
|
|
6
5
|
import z from "../../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
7
|
-
|
|
6
|
+
import { ChevronRight as L } from "../../Icons/ChevronRight.js";
|
|
7
|
+
import { ChevronLeft as W } from "../../Icons/ChevronLeft.js";
|
|
8
|
+
const { Header: H, Sider: M } = S, F = ({
|
|
8
9
|
brandTitle: m,
|
|
9
|
-
brandLogo:
|
|
10
|
-
brandMark:
|
|
11
|
-
menuItems:
|
|
12
|
-
selectedKeys:
|
|
13
|
-
onMenuClick:
|
|
14
|
-
collapsed:
|
|
15
|
-
onToggleCollapsed:
|
|
16
|
-
siderWidth:
|
|
17
|
-
siderFooter:
|
|
18
|
-
headerTitle:
|
|
19
|
-
headerDescription:
|
|
20
|
-
headerActions:
|
|
21
|
-
headerScrolled:
|
|
22
|
-
children:
|
|
23
|
-
className:
|
|
24
|
-
frameClassName:
|
|
25
|
-
siderClassName:
|
|
26
|
-
mainClassName:
|
|
10
|
+
brandLogo: o,
|
|
11
|
+
brandMark: c = "A",
|
|
12
|
+
menuItems: h,
|
|
13
|
+
selectedKeys: u,
|
|
14
|
+
onMenuClick: N,
|
|
15
|
+
collapsed: t = !1,
|
|
16
|
+
onToggleCollapsed: i,
|
|
17
|
+
siderWidth: s = 240,
|
|
18
|
+
siderFooter: b,
|
|
19
|
+
headerTitle: p,
|
|
20
|
+
headerDescription: l,
|
|
21
|
+
headerActions: d,
|
|
22
|
+
headerScrolled: f = !1,
|
|
23
|
+
children: v,
|
|
24
|
+
className: C,
|
|
25
|
+
frameClassName: x,
|
|
26
|
+
siderClassName: A,
|
|
27
|
+
mainClassName: w
|
|
27
28
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
const y = c.trim().charAt(0).toUpperCase() || "A", g = 80, k = t ? g : s;
|
|
30
|
+
return /* @__PURE__ */ a("div", { className: n("agent-app-shell", e["agent-app-shell"], C), children: /* @__PURE__ */ r(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: n("agent-app-frame", e["agent-app-frame"], x),
|
|
34
|
+
style: { "--agent-sider-width": `${k}px` },
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ r(
|
|
37
|
+
M,
|
|
38
|
+
{
|
|
39
|
+
trigger: null,
|
|
40
|
+
collapsible: !0,
|
|
41
|
+
collapsed: t,
|
|
42
|
+
collapsedWidth: g,
|
|
43
|
+
width: s,
|
|
44
|
+
className: n("agent-app-sider", e["agent-app-sider"], A),
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ r(
|
|
47
|
+
z,
|
|
48
|
+
{
|
|
49
|
+
wrapperClassName: n("agent-sider-scroll", e["agent-sider-scroll"]),
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ r(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: n(
|
|
55
|
+
"agent-sider-brand",
|
|
56
|
+
e["agent-sider-brand"],
|
|
57
|
+
t && e["agent-sider-brand--collapsed"]
|
|
58
|
+
),
|
|
59
|
+
children: [
|
|
60
|
+
o ?? /* @__PURE__ */ a("span", { className: e["agent-sider-logo"], children: y }),
|
|
61
|
+
t ? null : /* @__PURE__ */ a("h1", { className: e["agent-sider-title"], children: m })
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ a(
|
|
66
|
+
j,
|
|
67
|
+
{
|
|
68
|
+
mode: "inline",
|
|
69
|
+
inlineCollapsed: t,
|
|
70
|
+
selectedKeys: u,
|
|
71
|
+
items: h,
|
|
72
|
+
onClick: N,
|
|
73
|
+
className: n("agent-app-menu", e["agent-app-menu"])
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
b
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
i ? /* @__PURE__ */ a(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
type: "button",
|
|
87
|
+
className: n(
|
|
88
|
+
e["agent-sider-toggle"],
|
|
89
|
+
t && e["agent-sider-toggle--collapsed"]
|
|
90
|
+
),
|
|
91
|
+
onClick: i,
|
|
92
|
+
"aria-label": t ? "展开侧栏" : "收起侧栏",
|
|
93
|
+
"aria-expanded": !t,
|
|
94
|
+
children: t ? /* @__PURE__ */ a(L, { size: 14 }) : /* @__PURE__ */ a(W, { size: 14 })
|
|
95
|
+
}
|
|
96
|
+
) : null,
|
|
97
|
+
/* @__PURE__ */ r("div", { className: n("agent-app-main", e["agent-app-main"], w), children: [
|
|
98
|
+
/* @__PURE__ */ r(
|
|
99
|
+
H,
|
|
41
100
|
{
|
|
42
|
-
|
|
101
|
+
className: n(
|
|
102
|
+
e["agent-page-topbar"],
|
|
103
|
+
f && e["agent-page-topbar--scrolled"],
|
|
104
|
+
l ? e["agent-page-topbar--with-description"] : void 0
|
|
105
|
+
),
|
|
43
106
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
l ?
|
|
47
|
-
] }),
|
|
48
|
-
/* @__PURE__ */ e
|
|
49
|
-
S,
|
|
50
|
-
{
|
|
51
|
-
mode: "inline",
|
|
52
|
-
inlineCollapsed: l,
|
|
53
|
-
selectedKeys: d,
|
|
54
|
-
items: o,
|
|
55
|
-
onClick: h,
|
|
56
|
-
className: t("agent-app-menu", a["agent-app-menu"])
|
|
57
|
-
}
|
|
58
|
-
)
|
|
107
|
+
/* @__PURE__ */ a("div", { className: e["agent-page-topbar-leading"], children: p ? /* @__PURE__ */ r("div", { className: e["agent-page-topbar-meta"], children: [
|
|
108
|
+
/* @__PURE__ */ a("h1", { className: e["agent-page-topbar-title"], children: p }),
|
|
109
|
+
l ? /* @__PURE__ */ a("p", { className: e["agent-page-topbar-description"], children: l }) : null
|
|
110
|
+
] }) : null }),
|
|
111
|
+
d ? /* @__PURE__ */ a("div", { className: e["agent-page-topbar-actions"], children: d }) : null
|
|
59
112
|
]
|
|
60
113
|
}
|
|
61
114
|
),
|
|
62
|
-
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/* @__PURE__ */ n(
|
|
68
|
-
P,
|
|
69
|
-
{
|
|
70
|
-
className: t(
|
|
71
|
-
a["agent-page-topbar"],
|
|
72
|
-
b && a["agent-page-topbar--scrolled"],
|
|
73
|
-
r ? a["agent-page-topbar--with-description"] : void 0
|
|
74
|
-
),
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ n("div", { className: a["agent-page-topbar-leading"], children: [
|
|
77
|
-
s ? /* @__PURE__ */ e(
|
|
78
|
-
j,
|
|
79
|
-
{
|
|
80
|
-
type: "text",
|
|
81
|
-
className: a["agent-sider-toggle-btn"],
|
|
82
|
-
icon: l ? /* @__PURE__ */ e(w, { size: 18 }) : /* @__PURE__ */ e(y, { size: 18 }),
|
|
83
|
-
onClick: s,
|
|
84
|
-
"aria-label": l ? "展开侧栏" : "收起侧栏"
|
|
85
|
-
}
|
|
86
|
-
) : null,
|
|
87
|
-
i ? /* @__PURE__ */ n("div", { className: a["agent-page-topbar-meta"], children: [
|
|
88
|
-
/* @__PURE__ */ e("h1", { className: a["agent-page-topbar-title"], children: i }),
|
|
89
|
-
r ? /* @__PURE__ */ e("p", { className: a["agent-page-topbar-description"], children: r }) : null
|
|
90
|
-
] }) : null
|
|
91
|
-
] }),
|
|
92
|
-
p ? /* @__PURE__ */ e("div", { className: a["agent-page-topbar-actions"], children: p }) : null
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
f
|
|
97
|
-
] })
|
|
98
|
-
] }) });
|
|
115
|
+
v
|
|
116
|
+
] })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
) });
|
|
99
120
|
};
|
|
100
121
|
export {
|
|
101
|
-
|
|
122
|
+
F as default
|
|
102
123
|
};
|
|
103
124
|
//# sourceMappingURL=AgentAppShell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentAppShell.js","sources":["../../../../src/components/Layout/AgentAppShell/AgentAppShell.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"AgentAppShell.js","sources":["../../../../src/components/Layout/AgentAppShell/AgentAppShell.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '../../Icons';\nimport { VirtualScrollbar } from '../../VirtualScrollbar';\nimport { Layout, Menu } from 'antd';\nimport classNames from 'classnames';\nimport React from 'react';\nimport styles from './style.module.scss';\n\nconst { Header, Sider } = Layout;\n\n/** 菜单项:宽松 any,避免业务仓与 core 双份 antd 类型冲突 */\nexport type AgentAppShellMenuItems = any;\n\nexport type AgentAppShellProps = {\n /** 侧栏品牌标题 */\n brandTitle: string;\n /** 侧栏品牌图标(默认字母徽章用 brandMark) */\n brandLogo?: React.ReactNode;\n /** 无 brandLogo 时显示的单字/短文案徽章 */\n brandMark?: string;\n /** 侧栏菜单(antd Menu items) */\n menuItems: AgentAppShellMenuItems;\n selectedKeys?: string[];\n onMenuClick?: (info: { key: string }) => void;\n /** 侧栏是否折叠 */\n collapsed?: boolean;\n onToggleCollapsed?: () => void;\n /** 侧栏宽度(展开) */\n siderWidth?: number;\n /** 侧栏底部(如 UserProfileCard) */\n siderFooter?: React.ReactNode;\n /** 顶栏标题 */\n headerTitle?: React.ReactNode;\n /** 顶栏描述 */\n headerDescription?: React.ReactNode;\n /** 顶栏右侧操作 */\n headerActions?: React.ReactNode;\n /** 主内容区滚动后顶栏毛玻璃 */\n headerScrolled?: boolean;\n /** 主内容 */\n children: React.ReactNode;\n className?: string;\n /** 根节点额外 class(兼容业务全局选择器) */\n frameClassName?: string;\n siderClassName?: string;\n mainClassName?: string;\n};\n\n/**\n * Agent 业务壳:左 sider(品牌 + 菜单 + 底部槽)+ 右主区(顶栏 + children)。\n * 纯 UI;菜单数据、鉴权、路由由业务注入。\n */\nconst AgentAppShell: React.FC<AgentAppShellProps> = ({\n brandTitle,\n brandLogo,\n brandMark = 'A',\n menuItems,\n selectedKeys,\n onMenuClick,\n collapsed = false,\n onToggleCollapsed,\n siderWidth = 240,\n siderFooter,\n headerTitle,\n headerDescription,\n headerActions,\n headerScrolled = false,\n children,\n className,\n frameClassName,\n siderClassName,\n mainClassName,\n}) => {\n const mark = brandMark.trim().charAt(0).toUpperCase() || 'A';\n const siderCollapsedWidth = 80;\n const siderActualWidth = collapsed ? siderCollapsedWidth : siderWidth;\n\n return (\n <div className={classNames('agent-app-shell', styles['agent-app-shell'], className)}>\n <div\n className={classNames('agent-app-frame', styles['agent-app-frame'], frameClassName)}\n style={{ '--agent-sider-width': `${siderActualWidth}px` } as React.CSSProperties}\n >\n <Sider\n trigger={null}\n collapsible\n collapsed={collapsed}\n collapsedWidth={siderCollapsedWidth}\n width={siderWidth}\n className={classNames('agent-app-sider', styles['agent-app-sider'], siderClassName)}\n >\n <VirtualScrollbar\n wrapperClassName={classNames('agent-sider-scroll', styles['agent-sider-scroll'])}\n >\n <div\n className={classNames(\n 'agent-sider-brand',\n styles['agent-sider-brand'],\n collapsed && styles['agent-sider-brand--collapsed'],\n )}\n >\n {brandLogo ?? <span className={styles['agent-sider-logo']}>{mark}</span>}\n {!collapsed ? <h1 className={styles['agent-sider-title']}>{brandTitle}</h1> : null}\n </div>\n <Menu\n mode=\"inline\"\n inlineCollapsed={collapsed}\n selectedKeys={selectedKeys}\n items={menuItems as React.ComponentProps<typeof Menu>['items']}\n onClick={onMenuClick as React.ComponentProps<typeof Menu>['onClick']}\n className={classNames('agent-app-menu', styles['agent-app-menu'])}\n />\n </VirtualScrollbar>\n {siderFooter}\n </Sider>\n\n {onToggleCollapsed ? (\n <button\n type=\"button\"\n className={classNames(\n styles['agent-sider-toggle'],\n collapsed && styles['agent-sider-toggle--collapsed'],\n )}\n onClick={onToggleCollapsed}\n aria-label={collapsed ? '展开侧栏' : '收起侧栏'}\n aria-expanded={!collapsed}\n >\n {collapsed ? <ChevronRight size={14} /> : <ChevronLeft size={14} />}\n </button>\n ) : null}\n\n <div className={classNames('agent-app-main', styles['agent-app-main'], mainClassName)}>\n <Header\n className={classNames(\n styles['agent-page-topbar'],\n headerScrolled && styles['agent-page-topbar--scrolled'],\n headerDescription ? styles['agent-page-topbar--with-description'] : undefined,\n )}\n >\n <div className={styles['agent-page-topbar-leading']}>\n {headerTitle ? (\n <div className={styles['agent-page-topbar-meta']}>\n <h1 className={styles['agent-page-topbar-title']}>{headerTitle}</h1>\n {headerDescription ? (\n <p className={styles['agent-page-topbar-description']}>{headerDescription}</p>\n ) : null}\n </div>\n ) : null}\n </div>\n {headerActions ? (\n <div className={styles['agent-page-topbar-actions']}>{headerActions}</div>\n ) : null}\n </Header>\n {children}\n </div>\n </div>\n </div>\n );\n};\n\nexport default AgentAppShell;\n"],"names":["Header","Sider","Layout","AgentAppShell","brandTitle","brandLogo","brandMark","menuItems","selectedKeys","onMenuClick","collapsed","onToggleCollapsed","siderWidth","siderFooter","headerTitle","headerDescription","headerActions","headerScrolled","children","className","frameClassName","siderClassName","mainClassName","mark","siderCollapsedWidth","siderActualWidth","jsx","classNames","styles","jsxs","VirtualScrollbar","Menu","ChevronRight","ChevronLeft"],"mappings":"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"}
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
const e = {
|
|
2
|
-
"agent-app-shell": "_agent-app-
|
|
3
|
-
"agent-app-frame": "_agent-app-
|
|
4
|
-
"agent-app-sider": "_agent-app-
|
|
5
|
-
"agent-sider-scroll": "_agent-sider-
|
|
6
|
-
"agent-sider-brand": "_agent-sider-
|
|
7
|
-
"agent-sider-
|
|
8
|
-
"agent-sider-
|
|
9
|
-
"agent-
|
|
10
|
-
"agent-app-
|
|
11
|
-
"agent-
|
|
12
|
-
"agent-page-topbar
|
|
13
|
-
"agent-page-topbar--
|
|
14
|
-
"agent-page-topbar-
|
|
15
|
-
"agent-page-topbar-
|
|
16
|
-
"agent-page-topbar-
|
|
17
|
-
"agent-page-topbar-
|
|
18
|
-
"agent-
|
|
19
|
-
"agent-
|
|
2
|
+
"agent-app-shell": "_agent-app-shell_q9nbx_1",
|
|
3
|
+
"agent-app-frame": "_agent-app-frame_q9nbx_8",
|
|
4
|
+
"agent-app-sider": "_agent-app-sider_q9nbx_17",
|
|
5
|
+
"agent-sider-scroll": "_agent-sider-scroll_q9nbx_32",
|
|
6
|
+
"agent-sider-brand": "_agent-sider-brand_q9nbx_37",
|
|
7
|
+
"agent-sider-brand--collapsed": "_agent-sider-brand--collapsed_q9nbx_44",
|
|
8
|
+
"agent-sider-logo": "_agent-sider-logo_q9nbx_50",
|
|
9
|
+
"agent-sider-title": "_agent-sider-title_q9nbx_64",
|
|
10
|
+
"agent-app-menu": "_agent-app-menu_q9nbx_75",
|
|
11
|
+
"agent-app-main": "_agent-app-main_q9nbx_121",
|
|
12
|
+
"agent-page-topbar": "_agent-page-topbar_q9nbx_134",
|
|
13
|
+
"agent-page-topbar--scrolled": "_agent-page-topbar--scrolled_q9nbx_149",
|
|
14
|
+
"agent-page-topbar--with-description": "_agent-page-topbar--with-description_q9nbx_154",
|
|
15
|
+
"agent-page-topbar-leading": "_agent-page-topbar-leading_q9nbx_158",
|
|
16
|
+
"agent-page-topbar-meta": "_agent-page-topbar-meta_q9nbx_166",
|
|
17
|
+
"agent-page-topbar-title": "_agent-page-topbar-title_q9nbx_170",
|
|
18
|
+
"agent-page-topbar-description": "_agent-page-topbar-description_q9nbx_179",
|
|
19
|
+
"agent-sider-toggle": "_agent-sider-toggle_q9nbx_186",
|
|
20
|
+
"agent-sider-toggle--collapsed": "_agent-sider-toggle--collapsed_q9nbx_218",
|
|
21
|
+
"agent-page-topbar-actions": "_agent-page-topbar-actions_q9nbx_222"
|
|
20
22
|
};
|
|
21
23
|
export {
|
|
22
24
|
e as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { Button as c } from "antd";
|
|
2
|
+
import { Button as h } from "antd";
|
|
4
3
|
import a from "classnames";
|
|
5
|
-
import
|
|
4
|
+
import c from "../PageSpin/index.js";
|
|
6
5
|
import r from "./style.module.scss.js";
|
|
7
|
-
import { usePageShell as
|
|
6
|
+
import { usePageShell as g } from "../PageShell/PageShellContext.js";
|
|
7
|
+
import { ArrowLeft as u } from "../../Icons/ArrowLeft.js";
|
|
8
8
|
const P = ({
|
|
9
9
|
title: l,
|
|
10
10
|
onBack: t,
|
|
@@ -13,7 +13,7 @@ const P = ({
|
|
|
13
13
|
spinning: p = !1,
|
|
14
14
|
children: s
|
|
15
15
|
}) => {
|
|
16
|
-
const { pageLoading: d } =
|
|
16
|
+
const { pageLoading: d } = g(), m = !!(p || d);
|
|
17
17
|
return /* @__PURE__ */ o("div", { className: a("page-header-layout", r["page-header-layout"]), children: [
|
|
18
18
|
/* @__PURE__ */ o("div", { className: a("page-header-layout-root", r["page-header-layout-root"]), children: [
|
|
19
19
|
/* @__PURE__ */ o(
|
|
@@ -24,7 +24,7 @@ const P = ({
|
|
|
24
24
|
r["page-header-layout-container"]
|
|
25
25
|
),
|
|
26
26
|
children: [
|
|
27
|
-
t && /* @__PURE__ */ e(
|
|
27
|
+
t && /* @__PURE__ */ e(h, { type: "text", icon: /* @__PURE__ */ e(u, {}), onClick: t }),
|
|
28
28
|
/* @__PURE__ */ e(
|
|
29
29
|
"h2",
|
|
30
30
|
{
|
|
@@ -41,7 +41,7 @@ const P = ({
|
|
|
41
41
|
/* @__PURE__ */ e("div", { children: n })
|
|
42
42
|
] }),
|
|
43
43
|
i && /* @__PURE__ */ e("div", { className: a("page-header-layout-inner", r["page-header-layout-inner"]), children: i }),
|
|
44
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(c, { spinning: m, children: s })
|
|
45
45
|
] });
|
|
46
46
|
};
|
|
47
47
|
export {
|
|
@@ -3,10 +3,10 @@ import I from "@kne/button-group";
|
|
|
3
3
|
import { Modal as z } from "antd";
|
|
4
4
|
import e from "classnames";
|
|
5
5
|
import { useMemo as h, useState as B, useEffect as T } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { resolveModalWidth as _, resolveModalSizeAnchor as j, MODAL_SIZE_BODY_HEIGHT as C } from "../utils/resolveModalSize.js";
|
|
6
|
+
import { resolveModalWidth as V, resolveModalSizeAnchor as _, MODAL_SIZE_BODY_HEIGHT as j } from "../utils/resolveModalSize.js";
|
|
8
7
|
import r from "./style.module.scss.js";
|
|
9
|
-
import
|
|
8
|
+
import C from "../../TooltipInfo/TooltipInfo.js";
|
|
9
|
+
import { Info as D } from "../../Icons/Info.js";
|
|
10
10
|
import G from "../../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
11
11
|
function O() {
|
|
12
12
|
const [i, m] = B(() => typeof window < "u" ? window.innerWidth : 1200);
|
|
@@ -33,12 +33,12 @@ const Q = ({
|
|
|
33
33
|
closable: x = !0
|
|
34
34
|
}) => {
|
|
35
35
|
const n = O(), E = h(
|
|
36
|
-
() =>
|
|
36
|
+
() => V({ size: l, width: s, viewportWidth: n }),
|
|
37
37
|
[l, s, n]
|
|
38
38
|
), L = h(
|
|
39
|
-
() =>
|
|
39
|
+
() => _({ size: l, width: s, viewportWidth: n }),
|
|
40
40
|
[l, s, n]
|
|
41
|
-
), g =
|
|
41
|
+
), g = j[L], d = h(() => {
|
|
42
42
|
const u = (w ?? []).filter((H) => !H.hidden), c = u[0];
|
|
43
43
|
return !c || c.type != null ? u : [{ ...c, type: "primary" }, ...u.slice(1)];
|
|
44
44
|
}, [w]), S = /* @__PURE__ */ p("div", { className: e("marsun-modal-title-wrap", r["marsun-modal-title-wrap"]), children: [
|
|
@@ -46,7 +46,7 @@ const Q = ({
|
|
|
46
46
|
/* @__PURE__ */ p("div", { className: e("marsun-modal-title-group", r["marsun-modal-title-group"]), children: [
|
|
47
47
|
/* @__PURE__ */ t("div", { className: e("marsun-modal-title", r["marsun-modal-title"]), children: o }),
|
|
48
48
|
a != null && a.length ? /* @__PURE__ */ t(
|
|
49
|
-
|
|
49
|
+
C,
|
|
50
50
|
{
|
|
51
51
|
content: a,
|
|
52
52
|
placement: "topLeft",
|
|
@@ -59,7 +59,7 @@ const Q = ({
|
|
|
59
59
|
"marsun-modal-info-trigger",
|
|
60
60
|
r["marsun-modal-info-trigger"]
|
|
61
61
|
),
|
|
62
|
-
children: /* @__PURE__ */ t(
|
|
62
|
+
children: /* @__PURE__ */ t(D, { size: 16, "aria-hidden": !0 })
|
|
63
63
|
}
|
|
64
64
|
)
|
|
65
65
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as n, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { resolveModalWidth as L } from "../utils/resolveModalSize.js";
|
|
2
|
+
import { Modal as I, Steps as W, Button as c } from "antd";
|
|
3
|
+
import { useMemo as z, useCallback as k } from "react";
|
|
4
|
+
import { resolveModalWidth as F } from "../utils/resolveModalSize.js";
|
|
6
5
|
import f from "./style.module.scss.js";
|
|
7
6
|
import e from "classnames";
|
|
7
|
+
import { ChevronLeft as L } from "../../Icons/ChevronLeft.js";
|
|
8
8
|
const y = (t) => {
|
|
9
9
|
if (t !== void 0)
|
|
10
10
|
return typeof t == "function" ? t() : t;
|
|
@@ -20,7 +20,7 @@ const y = (t) => {
|
|
|
20
20
|
className: N,
|
|
21
21
|
onStepChange: l
|
|
22
22
|
}) => {
|
|
23
|
-
const r =
|
|
23
|
+
const r = z(() => i.findIndex((m) => m.key === a), [i, a]), o = i[r], E = k(() => {
|
|
24
24
|
r > 0 && (l == null || l(i[r - 1].key));
|
|
25
25
|
}, [r, i, l]), M = k(async () => {
|
|
26
26
|
if (!(o != null && o.beforeEnter)) {
|
|
@@ -29,13 +29,13 @@ const y = (t) => {
|
|
|
29
29
|
}
|
|
30
30
|
await o.beforeEnter() && r < i.length - 1 && (l == null || l(i[r + 1].key));
|
|
31
31
|
}, [o, r, i, l]), b = t ?? (o == null ? void 0 : o.title) ?? "", B = () => (o == null ? void 0 : o.footer) !== void 0 ? y(o.footer) : /* @__PURE__ */ n("div", { className: e("step-modal-root", f["step-modal-root"]), children: [
|
|
32
|
-
r > 0 && (o == null ? void 0 : o.allowBack) !== !1 && /* @__PURE__ */ d(c, { icon: /* @__PURE__ */ d(
|
|
32
|
+
r > 0 && (o == null ? void 0 : o.allowBack) !== !1 && /* @__PURE__ */ d(c, { icon: /* @__PURE__ */ d(L, {}), onClick: E, children: "上一步" }),
|
|
33
33
|
/* @__PURE__ */ d("div", { className: e("step-modal-container", f["step-modal-container"]) }),
|
|
34
34
|
/* @__PURE__ */ d(c, { onClick: s, children: "取消" }),
|
|
35
35
|
r < i.length - 1 && /* @__PURE__ */ d(c, { type: "primary", onClick: M, children: "下一步" })
|
|
36
|
-
] }), j =
|
|
36
|
+
] }), j = F({ width: x });
|
|
37
37
|
return /* @__PURE__ */ n(
|
|
38
|
-
|
|
38
|
+
I,
|
|
39
39
|
{
|
|
40
40
|
title: b,
|
|
41
41
|
open: v,
|
|
@@ -47,7 +47,7 @@ const y = (t) => {
|
|
|
47
47
|
className: N,
|
|
48
48
|
children: [
|
|
49
49
|
u && i.length > 1 && /* @__PURE__ */ d(
|
|
50
|
-
|
|
50
|
+
W,
|
|
51
51
|
{
|
|
52
52
|
current: r,
|
|
53
53
|
size: "small",
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { Spin as v, Tree as B, Tooltip as F, Space as L, Button as p, Popconfirm as M } from "antd";
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { Spin as S, Tree as w, Tooltip as j, Space as v, Button as p, Popconfirm as B } from "antd";
|
|
4
3
|
import o from "classnames";
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import
|
|
7
|
-
|
|
4
|
+
import { useMemo as F, useState as L, useEffect as M } from "react";
|
|
5
|
+
import m from "./style.module.scss.js";
|
|
6
|
+
import { Plus as O } from "../Icons/Plus.js";
|
|
7
|
+
import { Pencil as q } from "../Icons/Pencil.js";
|
|
8
|
+
import { Trash2 as A } from "../Icons/Trash2.js";
|
|
9
|
+
function T(a) {
|
|
8
10
|
var l;
|
|
9
11
|
const i = [];
|
|
10
|
-
for (const n of
|
|
12
|
+
for (const n of a)
|
|
11
13
|
i.push(n.id), (l = n.children) != null && l.length && i.push(...T(n.children));
|
|
12
14
|
return i;
|
|
13
15
|
}
|
|
14
|
-
function k(
|
|
16
|
+
function k(a, i) {
|
|
15
17
|
var l;
|
|
16
|
-
for (const n of
|
|
18
|
+
for (const n of a) {
|
|
17
19
|
if (n.id === i)
|
|
18
20
|
return { id: n.id, name: n.name, parentId: n.parentId ?? null };
|
|
19
21
|
if ((l = n.children) != null && l.length) {
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
+
const c = k(n.children, i);
|
|
23
|
+
if (c) return c;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
return null;
|
|
25
27
|
}
|
|
26
|
-
const
|
|
27
|
-
nodes:
|
|
28
|
+
const W = ({
|
|
29
|
+
nodes: a,
|
|
28
30
|
loading: i = !1,
|
|
29
31
|
editable: l = !1,
|
|
30
32
|
className: n,
|
|
31
|
-
selectedKeys:
|
|
33
|
+
selectedKeys: c,
|
|
32
34
|
onSelect: f,
|
|
33
35
|
onAdd: g,
|
|
34
36
|
onEdit: h,
|
|
@@ -37,28 +39,28 @@ const U = ({
|
|
|
37
39
|
deleteOkText: x = "删除",
|
|
38
40
|
deleteOkType: b = "danger"
|
|
39
41
|
}) => {
|
|
40
|
-
const y =
|
|
41
|
-
|
|
42
|
+
const y = F(() => T(a), [a]), [C, N] = L([]);
|
|
43
|
+
M(() => {
|
|
42
44
|
N(y);
|
|
43
45
|
}, [y]);
|
|
44
46
|
const P = (s) => s.map((r) => {
|
|
45
47
|
var z;
|
|
46
48
|
return {
|
|
47
49
|
key: r.id,
|
|
48
|
-
title: /* @__PURE__ */ u("div", { className: o("marsun-org-tree-row",
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
50
|
+
title: /* @__PURE__ */ u("div", { className: o("marsun-org-tree-row", m["marsun-org-tree-row"]), children: [
|
|
51
|
+
/* @__PURE__ */ t(
|
|
52
|
+
j,
|
|
51
53
|
{
|
|
52
54
|
title: r.nameExtra ? /* @__PURE__ */ u(K, { children: [
|
|
53
55
|
r.name,
|
|
54
56
|
r.nameExtra
|
|
55
57
|
] }) : r.name,
|
|
56
|
-
children: /* @__PURE__ */ u("span", { className: o("marsun-org-tree-name",
|
|
58
|
+
children: /* @__PURE__ */ u("span", { className: o("marsun-org-tree-name", m["marsun-org-tree-name"]), children: [
|
|
57
59
|
r.name,
|
|
58
|
-
r.nameExtra ? /* @__PURE__ */
|
|
60
|
+
r.nameExtra ? /* @__PURE__ */ t(
|
|
59
61
|
"span",
|
|
60
62
|
{
|
|
61
|
-
className: o("marsun-org-tree-extra",
|
|
63
|
+
className: o("marsun-org-tree-extra", m["marsun-org-tree-extra"]),
|
|
62
64
|
children: r.nameExtra
|
|
63
65
|
}
|
|
64
66
|
) : null
|
|
@@ -66,30 +68,30 @@ const U = ({
|
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
l ? /* @__PURE__ */ u(
|
|
69
|
-
|
|
71
|
+
v,
|
|
70
72
|
{
|
|
71
73
|
size: 0,
|
|
72
|
-
className: o("marsun-org-tree-actions",
|
|
74
|
+
className: o("marsun-org-tree-actions", m["marsun-org-tree-actions"]),
|
|
73
75
|
children: [
|
|
74
|
-
g ? /* @__PURE__ */
|
|
76
|
+
g ? /* @__PURE__ */ t(
|
|
75
77
|
p,
|
|
76
78
|
{
|
|
77
79
|
type: "text",
|
|
78
80
|
size: "small",
|
|
79
81
|
"aria-label": "添加子节点",
|
|
80
|
-
icon: /* @__PURE__ */
|
|
82
|
+
icon: /* @__PURE__ */ t(O, { size: 14 }),
|
|
81
83
|
onClick: (e) => {
|
|
82
84
|
e.stopPropagation(), g(r.id);
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
) : null,
|
|
86
|
-
h ? /* @__PURE__ */
|
|
88
|
+
h ? /* @__PURE__ */ t(
|
|
87
89
|
p,
|
|
88
90
|
{
|
|
89
91
|
type: "text",
|
|
90
92
|
size: "small",
|
|
91
93
|
"aria-label": "编辑",
|
|
92
|
-
icon: /* @__PURE__ */
|
|
94
|
+
icon: /* @__PURE__ */ t(q, { size: 14 }),
|
|
93
95
|
onClick: (e) => {
|
|
94
96
|
e.stopPropagation(), h({
|
|
95
97
|
id: r.id,
|
|
@@ -99,8 +101,8 @@ const U = ({
|
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
) : null,
|
|
102
|
-
d ? /* @__PURE__ */
|
|
103
|
-
|
|
104
|
+
d ? /* @__PURE__ */ t(
|
|
105
|
+
B,
|
|
104
106
|
{
|
|
105
107
|
title: E,
|
|
106
108
|
okText: x,
|
|
@@ -108,14 +110,14 @@ const U = ({
|
|
|
108
110
|
cancelText: "取消",
|
|
109
111
|
onConfirm: (e) => (e == null || e.stopPropagation(), d({ id: r.id, name: r.name })),
|
|
110
112
|
onCancel: (e) => e == null ? void 0 : e.stopPropagation(),
|
|
111
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ t(
|
|
112
114
|
p,
|
|
113
115
|
{
|
|
114
116
|
type: "text",
|
|
115
117
|
size: "small",
|
|
116
118
|
danger: !0,
|
|
117
119
|
"aria-label": x,
|
|
118
|
-
icon: /* @__PURE__ */
|
|
120
|
+
icon: /* @__PURE__ */ t(A, { size: 14 }),
|
|
119
121
|
onClick: (e) => e.stopPropagation()
|
|
120
122
|
}
|
|
121
123
|
)
|
|
@@ -127,19 +129,19 @@ const U = ({
|
|
|
127
129
|
] }),
|
|
128
130
|
children: (z = r.children) != null && z.length ? P(r.children) : void 0
|
|
129
131
|
};
|
|
130
|
-
}), I = P(
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
-
|
|
132
|
+
}), I = P(a);
|
|
133
|
+
return /* @__PURE__ */ t(S, { spinning: i, children: /* @__PURE__ */ t(
|
|
134
|
+
w,
|
|
133
135
|
{
|
|
134
|
-
className: o("marsun-org-tree",
|
|
136
|
+
className: o("marsun-org-tree", m["marsun-org-tree"], n),
|
|
135
137
|
treeData: I,
|
|
136
138
|
expandedKeys: C,
|
|
137
139
|
onExpand: (s) => N(s),
|
|
138
|
-
selectedKeys:
|
|
140
|
+
selectedKeys: c,
|
|
139
141
|
onSelect: (s) => {
|
|
140
142
|
if (!f) return;
|
|
141
143
|
const r = s[0] != null ? String(s[0]) : "";
|
|
142
|
-
f(r ? k(
|
|
144
|
+
f(r ? k(a, r) : null);
|
|
143
145
|
},
|
|
144
146
|
showLine: !0,
|
|
145
147
|
blockNode: !0
|
|
@@ -147,6 +149,6 @@ const U = ({
|
|
|
147
149
|
) });
|
|
148
150
|
};
|
|
149
151
|
export {
|
|
150
|
-
|
|
152
|
+
W as default
|
|
151
153
|
};
|
|
152
154
|
//# sourceMappingURL=OrgTree.js.map
|