@hkyhy/marsun-components-core 0.1.19 → 0.1.21
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/components/AgentHub/Chat/Detail/ChatAgentFab/index.d.ts +24 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/index.js +95 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/style.module.scss.js +15 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFab/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.d.ts +16 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js +37 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/style.module.scss.js +9 -0
- package/dist/components/AgentHub/Chat/Detail/ChatAgentFabLayout/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.d.ts +14 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js +79 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/style.module.scss.js +18 -0
- package/dist/components/AgentHub/Chat/Detail/ChatFollowUpSuggestions/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.d.ts +2 -0
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js +60 -49
- package/dist/components/AgentHub/Chat/Detail/ChatInput/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatInput/style.module.scss.js +7 -6
- package/dist/components/AgentHub/Chat/Detail/ChatInput/style.module.scss.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.d.ts +17 -4
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.js +104 -68
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/style.module.scss.js +13 -8
- package/dist/components/AgentHub/Chat/Detail/ChatPanel/style.module.scss.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatSuggestionRow/index.js +5 -4
- package/dist/components/AgentHub/Chat/Detail/ChatSuggestionRow/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/ChatSuggestionRow/style.module.scss.js +2 -2
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.d.ts +7 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.js +55 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.d.ts +10 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.js +120 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/style.module.scss.js +32 -0
- package/dist/components/AgentHub/Chat/Detail/ChatWidgetBlock/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Chat/Detail/CitationContent/style.module.scss.js +2 -2
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js +130 -114
- package/dist/components/AgentHub/Chat/Detail/MessageItem/index.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/MessageItem/style.module.scss.js +20 -18
- package/dist/components/AgentHub/Chat/Detail/MessageItem/style.module.scss.js.map +1 -1
- package/dist/components/AgentHub/Chat/Detail/index.d.ts +8 -0
- package/dist/components/AgentHub/Chat/hooks/index.d.ts +2 -0
- package/dist/components/AgentHub/Chat/hooks/useCitationPanel.d.ts +11 -0
- package/dist/components/AgentHub/Chat/hooks/useCitationPanel.js +22 -0
- package/dist/components/AgentHub/Chat/hooks/useCitationPanel.js.map +1 -0
- package/dist/components/AgentHub/types.d.ts +21 -0
- package/dist/components/Filter/FilterDateRange/index.d.ts +6 -1
- package/dist/components/Filter/FilterDateRange/index.js +84 -62
- package/dist/components/Filter/FilterDateRange/index.js.map +1 -1
- package/dist/components/Icons/index.d.ts +3 -1
- package/dist/components/Icons/index.js +157 -151
- package/dist/components/Icons/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +371 -355
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/utils/date.d.ts +12 -0
- package/dist/utils/date.js +29 -4
- package/dist/utils/date.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,85 +1,121 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useAutoScrollToBottom as
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
title:
|
|
13
|
-
subtitle:
|
|
14
|
-
showHeader:
|
|
15
|
-
showCloseButton:
|
|
16
|
-
onClose:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
import { jsxs as n, jsx as a, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { Button as w } from "antd";
|
|
3
|
+
import { useRef as j, useMemo as S, useCallback as L } from "react";
|
|
4
|
+
import u from "classnames";
|
|
5
|
+
import M from "../ChatFollowUpSuggestions/index.js";
|
|
6
|
+
import U from "../ChatInput/index.js";
|
|
7
|
+
import I from "../MessageItem/index.js";
|
|
8
|
+
import l from "./style.module.scss.js";
|
|
9
|
+
import { useAutoScrollToBottom as ll } from "../../hooks/useAutoScrollToBottom.js";
|
|
10
|
+
import al from "../../../../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
11
|
+
const ul = ({
|
|
12
|
+
title: d,
|
|
13
|
+
subtitle: m,
|
|
14
|
+
showHeader: D = !0,
|
|
15
|
+
showCloseButton: f = !1,
|
|
16
|
+
onClose: p,
|
|
17
|
+
headerActions: N,
|
|
18
|
+
headerExtra: v,
|
|
19
|
+
beforeInput: y,
|
|
20
|
+
followUpItems: c,
|
|
21
|
+
starterItems: t,
|
|
22
|
+
onFollowUpSelect: h,
|
|
23
|
+
onSendMessage: r,
|
|
24
|
+
followUpLoading: C = !1,
|
|
25
|
+
followUpDefaultExpanded: F = !0,
|
|
26
|
+
starterTitle: T = "推荐问",
|
|
27
|
+
followUpTitle: z = "推荐追问",
|
|
28
|
+
messages: i,
|
|
29
|
+
showEmptyHint: B,
|
|
30
|
+
emptyPlaceholder: E = "点击上方建议,或直接输入问题",
|
|
31
|
+
onCitationClick: H,
|
|
32
|
+
onEditMessage: P,
|
|
33
|
+
onResendMessage: V,
|
|
34
|
+
editDisabled: q,
|
|
35
|
+
inputValue: A,
|
|
36
|
+
inputLoading: b = !1,
|
|
37
|
+
onInputChange: G,
|
|
38
|
+
onSend: J,
|
|
39
|
+
onStop: K,
|
|
40
|
+
inputPlaceholder: O,
|
|
41
|
+
showInput: Q = !0,
|
|
42
|
+
className: W
|
|
35
43
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
enabled:
|
|
38
|
-
trigger:
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
const g = j(null), k = j(null), { handleScroll: X } = ll(g, k, {
|
|
45
|
+
enabled: i.length > 0,
|
|
46
|
+
trigger: i
|
|
47
|
+
}), s = i.some((e) => e.role === "user"), x = S(() => c != null && c.length ? c : !s && (t != null && t.length) ? t : [], [c, s, t]), o = x.length > 0 && !C && (typeof h == "function" || typeof r == "function"), Y = s ? z : T, Z = B ?? (!o && !C), _ = L(
|
|
48
|
+
(e) => {
|
|
49
|
+
if (h) {
|
|
50
|
+
h(e);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
r == null || r(e);
|
|
54
|
+
},
|
|
55
|
+
[h, r]
|
|
56
|
+
), R = y || o ? /* @__PURE__ */ n($, { children: [
|
|
57
|
+
y,
|
|
58
|
+
o ? /* @__PURE__ */ a(
|
|
59
|
+
M,
|
|
60
|
+
{
|
|
61
|
+
className: l["chat-panel-follow-up"],
|
|
62
|
+
items: x,
|
|
63
|
+
title: Y,
|
|
64
|
+
defaultExpanded: F,
|
|
65
|
+
onSelect: _
|
|
66
|
+
}
|
|
67
|
+
) : null
|
|
68
|
+
] }) : null;
|
|
69
|
+
return /* @__PURE__ */ n("div", { className: u("chat-panel", l["chat-panel"], W), children: [
|
|
70
|
+
D ? /* @__PURE__ */ n("div", { className: u("chat-panel-head", l["chat-panel-head"]), children: [
|
|
71
|
+
/* @__PURE__ */ n("div", { className: l["chat-panel-head-main"], children: [
|
|
72
|
+
/* @__PURE__ */ n("div", { children: [
|
|
73
|
+
d ? /* @__PURE__ */ a("strong", { className: l["chat-panel-title"], children: d }) : null,
|
|
74
|
+
m ? /* @__PURE__ */ a("span", { className: l["chat-panel-subtitle"], children: m }) : null
|
|
75
|
+
] }),
|
|
76
|
+
N || f && p ? /* @__PURE__ */ n("div", { className: l["chat-panel-head-actions"], children: [
|
|
77
|
+
N,
|
|
78
|
+
f && p ? /* @__PURE__ */ a(w, { type: "link", size: "small", onClick: p, children: "收起" }) : null
|
|
79
|
+
] }) : null
|
|
45
80
|
] }),
|
|
46
|
-
|
|
81
|
+
v ? /* @__PURE__ */ a("div", { className: l["chat-panel-head-extra"], children: v }) : null
|
|
47
82
|
] }) : null,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
E,
|
|
83
|
+
/* @__PURE__ */ a(
|
|
84
|
+
al,
|
|
51
85
|
{
|
|
52
|
-
className:
|
|
53
|
-
wrapperClassName:
|
|
54
|
-
onScroll:
|
|
55
|
-
ref:
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
|
|
86
|
+
className: u("chat-panel-messages", l["chat-panel-messages"]),
|
|
87
|
+
wrapperClassName: l["chat-panel-messages-wrapper"],
|
|
88
|
+
onScroll: X,
|
|
89
|
+
ref: g,
|
|
90
|
+
children: /* @__PURE__ */ a("div", { ref: k, children: i.length === 0 && Z ? /* @__PURE__ */ a("p", { className: l["chat-panel-empty"], children: E }) : i.map((e) => /* @__PURE__ */ a(
|
|
91
|
+
I,
|
|
58
92
|
{
|
|
59
|
-
message:
|
|
60
|
-
onCitationClick:
|
|
61
|
-
onEditMessage:
|
|
62
|
-
onResendMessage:
|
|
63
|
-
editDisabled:
|
|
93
|
+
message: e,
|
|
94
|
+
onCitationClick: H,
|
|
95
|
+
onEditMessage: P,
|
|
96
|
+
onResendMessage: V,
|
|
97
|
+
editDisabled: q || b
|
|
64
98
|
},
|
|
65
|
-
|
|
99
|
+
e.id
|
|
66
100
|
)) })
|
|
67
101
|
}
|
|
68
102
|
),
|
|
69
|
-
|
|
70
|
-
|
|
103
|
+
R ? /* @__PURE__ */ a("div", { className: l["chat-panel-before-input"], children: R }) : null,
|
|
104
|
+
Q ? /* @__PURE__ */ a("div", { className: l["chat-panel-input"], children: /* @__PURE__ */ a(
|
|
105
|
+
U,
|
|
71
106
|
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
107
|
+
embedded: !0,
|
|
108
|
+
value: A,
|
|
109
|
+
loading: b,
|
|
110
|
+
onChange: G,
|
|
111
|
+
onSend: J,
|
|
112
|
+
onStop: K,
|
|
113
|
+
placeholder: O
|
|
78
114
|
}
|
|
79
115
|
) }) : null
|
|
80
116
|
] });
|
|
81
117
|
};
|
|
82
118
|
export {
|
|
83
|
-
|
|
119
|
+
ul as default
|
|
84
120
|
};
|
|
85
121
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatPanel/index.tsx"],"sourcesContent":["import type { ChatMessage } from '@/components/AgentHub/types';\nimport { VirtualScrollbar } from '@/components/VirtualScrollbar';\nimport { Button } from 'antd';\nimport React, { useRef } from 'react';\nimport classNames from 'classnames';\nimport { useAutoScrollToBottom } from '../../hooks';\nimport ChatInput from '../ChatInput';\nimport type { ChatInputProps } from '../ChatInput';\nimport ChatSuggestionRow from '../ChatSuggestionRow';\nimport MessageItem from '../MessageItem';\nimport type { MessageItemProps } from '../MessageItem';\nimport styles from './style.module.scss';\n\nexport interface ChatPanelProps {\n title?: string;\n subtitle?: string;\n showHeader?: boolean;\n showCloseButton?: boolean;\n onClose?: () => void;\n\n showSuggestions?: boolean;\n suggestions?: string[];\n onSuggestionClick?: (text: string) => void;\n\n messages: ChatMessage[];\n showEmptyHint?: boolean;\n emptyPlaceholder?: string;\n onCitationClick?: MessageItemProps['onCitationClick'];\n onEditMessage?: MessageItemProps['onEditMessage'];\n onResendMessage?: MessageItemProps['onResendMessage'];\n editDisabled?: boolean;\n\n inputValue: string;\n inputLoading?: boolean;\n onInputChange: (v: string) => void;\n onSend: () => void;\n onStop?: ChatInputProps['onStop'];\n inputPlaceholder?: string;\n showInput?: boolean;\n\n className?: string;\n}\n\nconst ChatPanel: React.FC<ChatPanelProps> = ({\n title,\n subtitle,\n showHeader = true,\n showCloseButton = false,\n onClose,\n showSuggestions = false,\n suggestions = [],\n onSuggestionClick,\n messages,\n showEmptyHint = true,\n emptyPlaceholder = '点击上方建议,或直接输入问题',\n onCitationClick,\n onEditMessage,\n onResendMessage,\n editDisabled,\n inputValue,\n inputLoading = false,\n onInputChange,\n onSend,\n onStop,\n inputPlaceholder,\n showInput = true,\n className,\n}) => {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const messagesContentRef = useRef<HTMLDivElement>(null);\n\n const { handleScroll } = useAutoScrollToBottom(scrollContainerRef, messagesContentRef, {\n enabled: messages.length > 0,\n trigger: messages,\n });\n\n const showSuggestionRow =\n showSuggestions && suggestions.length > 0 && typeof onSuggestionClick === 'function';\n\n return (\n <div className={classNames('chat-panel', styles['chat-panel'], className)}>\n {showHeader ? (\n <div className={classNames('chat-panel-head', styles['chat-panel-head'])}>\n <div>\n {title ? <strong className={styles['chat-panel-title']}>{title}</strong> : null}\n {subtitle ? <span className={styles['chat-panel-subtitle']}>{subtitle}</span> : null}\n </div>\n {showCloseButton && onClose ? (\n <Button type=\"link\" size=\"small\" onClick={onClose}>\n 收起\n </Button>\n ) : null}\n </div>\n ) : null}\n\n {showSuggestionRow ? (\n <ChatSuggestionRow suggestions={suggestions} onSelect={onSuggestionClick} />\n ) : null}\n\n <VirtualScrollbar\n className={classNames('chat-panel-messages', styles['chat-panel-messages'])}\n wrapperClassName={styles['chat-panel-messages-wrapper']}\n onScroll={handleScroll}\n ref={scrollContainerRef}\n >\n <div ref={messagesContentRef}>\n {messages.length === 0 && showEmptyHint ? (\n <p className={styles['chat-panel-empty']}>{emptyPlaceholder}</p>\n ) : (\n messages.map((message) => (\n <MessageItem\n key={message.id}\n message={message}\n onCitationClick={onCitationClick}\n onEditMessage={onEditMessage}\n onResendMessage={onResendMessage}\n editDisabled={editDisabled || inputLoading}\n />\n ))\n )}\n </div>\n </VirtualScrollbar>\n\n {showInput ? (\n <div className={styles['chat-panel-input']}>\n <ChatInput\n value={inputValue}\n loading={inputLoading}\n onChange={onInputChange}\n onSend={onSend}\n onStop={onStop}\n placeholder={inputPlaceholder}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default ChatPanel;\n"],"names":["ChatPanel","title","subtitle","showHeader","showCloseButton","onClose","showSuggestions","suggestions","onSuggestionClick","messages","showEmptyHint","emptyPlaceholder","onCitationClick","onEditMessage","onResendMessage","editDisabled","inputValue","inputLoading","onInputChange","onSend","onStop","inputPlaceholder","showInput","className","scrollContainerRef","useRef","messagesContentRef","handleScroll","useAutoScrollToBottom","showSuggestionRow","jsxs","classNames","styles","jsx","Button","ChatSuggestionRow","VirtualScrollbar","message","MessageItem","ChatInput"],"mappings":";;;;;;;;;;AA2CA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,iBAAAC,IAAkB;AAAA,EAClB,SAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,aAAAC,IAAc,CAAA;AAAA,EACd,mBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,kBAAAC,IAAmB;AAAA,EACnB,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AACF,MAAM;AACJ,QAAMC,IAAqBC,EAAuB,IAAI,GAChDC,IAAqBD,EAAuB,IAAI,GAEhD,EAAE,cAAAE,EAAA,IAAiBC,EAAsBJ,GAAoBE,GAAoB;AAAA,IACrF,SAASjB,EAAS,SAAS;AAAA,IAC3B,SAASA;AAAA,EAAA,CACV,GAEKoB,IACJvB,KAAmBC,EAAY,SAAS,KAAK,OAAOC,KAAsB;AAE5E,SACE,gBAAAsB,EAAC,SAAI,WAAWC,EAAW,cAAcC,EAAO,YAAY,GAAGT,CAAS,GACrE,UAAA;AAAA,IAAApB,IACC,gBAAA2B,EAAC,SAAI,WAAWC,EAAW,mBAAmBC,EAAO,iBAAiB,CAAC,GACrE,UAAA;AAAA,MAAA,gBAAAF,EAAC,OAAA,EACE,UAAA;AA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E;AAAA,EAAA,GACN;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatPanel/index.tsx"],"sourcesContent":["import type { ChatMessage } from '@/components/AgentHub/types';\nimport { VirtualScrollbar } from '@/components/VirtualScrollbar';\nimport { Button } from 'antd';\nimport React, { useCallback, useMemo, useRef, type ReactNode } from 'react';\nimport classNames from 'classnames';\nimport { useAutoScrollToBottom } from '../../hooks';\nimport ChatFollowUpSuggestions from '../ChatFollowUpSuggestions';\nimport ChatInput from '../ChatInput';\nimport type { ChatInputProps } from '../ChatInput';\nimport MessageItem from '../MessageItem';\nimport type { MessageItemProps } from '../MessageItem';\nimport styles from './style.module.scss';\n\nexport interface ChatPanelProps {\n title?: string;\n subtitle?: string;\n showHeader?: boolean;\n showCloseButton?: boolean;\n onClose?: () => void;\n headerActions?: ReactNode;\n headerExtra?: ReactNode;\n beforeInput?: ReactNode;\n\n /** API 返回的推荐问/追问列表 */\n followUpItems?: string[];\n /** 无用户消息且无 followUpItems 时的兜底推荐 */\n starterItems?: string[];\n /** 点击推荐项(完全自定义,优先于 onSendMessage) */\n onFollowUpSelect?: (text: string) => void;\n /** 点击推荐项直接发送(推荐问/追问默认行为) */\n onSendMessage?: (text: string) => void;\n /** true 时隐藏推荐区(如会话加载、发送中) */\n followUpLoading?: boolean;\n followUpDefaultExpanded?: boolean;\n starterTitle?: string;\n followUpTitle?: string;\n\n messages: ChatMessage[];\n showEmptyHint?: boolean;\n emptyPlaceholder?: string;\n onCitationClick?: MessageItemProps['onCitationClick'];\n onEditMessage?: MessageItemProps['onEditMessage'];\n onResendMessage?: MessageItemProps['onResendMessage'];\n editDisabled?: boolean;\n\n inputValue: string;\n inputLoading?: boolean;\n onInputChange: (v: string) => void;\n onSend: () => void;\n onStop?: ChatInputProps['onStop'];\n inputPlaceholder?: string;\n showInput?: boolean;\n\n className?: string;\n}\n\nconst ChatPanel: React.FC<ChatPanelProps> = ({\n title,\n subtitle,\n showHeader = true,\n showCloseButton = false,\n onClose,\n headerActions,\n headerExtra,\n beforeInput,\n followUpItems,\n starterItems,\n onFollowUpSelect,\n onSendMessage,\n followUpLoading = false,\n followUpDefaultExpanded = true,\n starterTitle = '推荐问',\n followUpTitle = '推荐追问',\n messages,\n showEmptyHint,\n emptyPlaceholder = '点击上方建议,或直接输入问题',\n onCitationClick,\n onEditMessage,\n onResendMessage,\n editDisabled,\n inputValue,\n inputLoading = false,\n onInputChange,\n onSend,\n onStop,\n inputPlaceholder,\n showInput = true,\n className,\n}) => {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const messagesContentRef = useRef<HTMLDivElement>(null);\n\n const { handleScroll } = useAutoScrollToBottom(scrollContainerRef, messagesContentRef, {\n enabled: messages.length > 0,\n trigger: messages,\n });\n\n const hasUserMessages = messages.some((message) => message.role === 'user');\n\n const effectiveFollowUpItems = useMemo(() => {\n if (followUpItems?.length) return followUpItems;\n if (!hasUserMessages && starterItems?.length) return starterItems;\n return [];\n }, [followUpItems, hasUserMessages, starterItems]);\n\n const showFollowUp =\n effectiveFollowUpItems.length > 0 &&\n !followUpLoading &&\n (typeof onFollowUpSelect === 'function' || typeof onSendMessage === 'function');\n\n const followUpDisplayTitle = hasUserMessages ? followUpTitle : starterTitle;\n\n const effectiveShowEmptyHint = showEmptyHint ?? (!showFollowUp && !followUpLoading);\n\n const handleFollowUpSelect = useCallback(\n (text: string) => {\n if (onFollowUpSelect) {\n onFollowUpSelect(text);\n return;\n }\n onSendMessage?.(text);\n },\n [onFollowUpSelect, onSendMessage],\n );\n\n const beforeInputContent =\n beforeInput || showFollowUp ? (\n <>\n {beforeInput}\n {showFollowUp ? (\n <ChatFollowUpSuggestions\n className={styles['chat-panel-follow-up']}\n items={effectiveFollowUpItems}\n title={followUpDisplayTitle}\n defaultExpanded={followUpDefaultExpanded}\n onSelect={handleFollowUpSelect}\n />\n ) : null}\n </>\n ) : null;\n\n return (\n <div className={classNames('chat-panel', styles['chat-panel'], className)}>\n {showHeader ? (\n <div className={classNames('chat-panel-head', styles['chat-panel-head'])}>\n <div className={styles['chat-panel-head-main']}>\n <div>\n {title ? <strong className={styles['chat-panel-title']}>{title}</strong> : null}\n {subtitle ? <span className={styles['chat-panel-subtitle']}>{subtitle}</span> : null}\n </div>\n {headerActions || (showCloseButton && onClose) ? (\n <div className={styles['chat-panel-head-actions']}>\n {headerActions}\n {showCloseButton && onClose ? (\n <Button type=\"link\" size=\"small\" onClick={onClose}>\n 收起\n </Button>\n ) : null}\n </div>\n ) : null}\n </div>\n {headerExtra ? (\n <div className={styles['chat-panel-head-extra']}>{headerExtra}</div>\n ) : null}\n </div>\n ) : null}\n\n <VirtualScrollbar\n className={classNames('chat-panel-messages', styles['chat-panel-messages'])}\n wrapperClassName={styles['chat-panel-messages-wrapper']}\n onScroll={handleScroll}\n ref={scrollContainerRef}\n >\n <div ref={messagesContentRef}>\n {messages.length === 0 && effectiveShowEmptyHint ? (\n <p className={styles['chat-panel-empty']}>{emptyPlaceholder}</p>\n ) : (\n messages.map((message) => (\n <MessageItem\n key={message.id}\n message={message}\n onCitationClick={onCitationClick}\n onEditMessage={onEditMessage}\n onResendMessage={onResendMessage}\n editDisabled={editDisabled || inputLoading}\n />\n ))\n )}\n </div>\n </VirtualScrollbar>\n\n {beforeInputContent ? (\n <div className={styles['chat-panel-before-input']}>{beforeInputContent}</div>\n ) : null}\n\n {showInput ? (\n <div className={styles['chat-panel-input']}>\n <ChatInput\n embedded\n value={inputValue}\n loading={inputLoading}\n onChange={onInputChange}\n onSend={onSend}\n onStop={onStop}\n placeholder={inputPlaceholder}\n />\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default ChatPanel;\n"],"names":["ChatPanel","title","subtitle","showHeader","showCloseButton","onClose","headerActions","headerExtra","beforeInput","followUpItems","starterItems","onFollowUpSelect","onSendMessage","followUpLoading","followUpDefaultExpanded","starterTitle","followUpTitle","messages","showEmptyHint","emptyPlaceholder","onCitationClick","onEditMessage","onResendMessage","editDisabled","inputValue","inputLoading","onInputChange","onSend","onStop","inputPlaceholder","showInput","className","scrollContainerRef","useRef","messagesContentRef","handleScroll","useAutoScrollToBottom","hasUserMessages","message","effectiveFollowUpItems","useMemo","showFollowUp","followUpDisplayTitle","effectiveShowEmptyHint","handleFollowUpSelect","useCallback","text","beforeInputContent","jsxs","Fragment","jsx","ChatFollowUpSuggestions","styles","classNames","Button","VirtualScrollbar","MessageItem","ChatInput"],"mappings":";;;;;;;;;;AAwDA,MAAMA,KAAsC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,iBAAAC,IAAkB;AAAA,EAClB,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,yBAAAC,IAA0B;AAAA,EAC1B,cAAAC,IAAe;AAAA,EACf,eAAAC,IAAgB;AAAA,EAChB,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AACF,MAAM;AACJ,QAAMC,IAAqBC,EAAuB,IAAI,GAChDC,IAAqBD,EAAuB,IAAI,GAEhD,EAAE,cAAAE,EAAA,IAAiBC,GAAsBJ,GAAoBE,GAAoB;AAAA,IACrF,SAASjB,EAAS,SAAS;AAAA,IAC3B,SAASA;AAAA,EAAA,CACV,GAEKoB,IAAkBpB,EAAS,KAAK,CAACqB,MAAYA,EAAQ,SAAS,MAAM,GA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,QACR,OAAOjC;AAAA,QACP,SAASC;AAAA,QACT,UAAUC;AAAA,QACV,QAAAC;AAAA,QACA,QAAAC;AAAA,QACA,aAAaC;AAAA,MAAA;AAAA,IAAA,GAEjB,IACE;AAAA,EAAA,GACN;AAEJ;"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
const a = {
|
|
2
|
-
"chat-panel": "_chat-
|
|
3
|
-
"chat-panel-head": "_chat-panel-
|
|
4
|
-
"chat-panel-
|
|
5
|
-
"chat-panel-
|
|
6
|
-
"chat-panel-
|
|
7
|
-
"chat-panel-
|
|
8
|
-
"chat-panel-
|
|
9
|
-
"chat-panel-
|
|
2
|
+
"chat-panel": "_chat-panel_5inb6_1",
|
|
3
|
+
"chat-panel-head": "_chat-panel-head_5inb6_9",
|
|
4
|
+
"chat-panel-head-main": "_chat-panel-head-main_5inb6_19",
|
|
5
|
+
"chat-panel-head-extra": "_chat-panel-head-extra_5inb6_27",
|
|
6
|
+
"chat-panel-head-actions": "_chat-panel-head-actions_5inb6_32",
|
|
7
|
+
"chat-panel-title": "_chat-panel-title_5inb6_60",
|
|
8
|
+
"chat-panel-subtitle": "_chat-panel-subtitle_5inb6_68",
|
|
9
|
+
"chat-panel-messages-wrapper": "_chat-panel-messages-wrapper_5inb6_75",
|
|
10
|
+
"chat-panel-messages": "_chat-panel-messages_5inb6_75",
|
|
11
|
+
"chat-panel-empty": "_chat-panel-empty_5inb6_85",
|
|
12
|
+
"chat-panel-before-input": "_chat-panel-before-input_5inb6_92",
|
|
13
|
+
"chat-panel-follow-up": "_chat-panel-follow-up_5inb6_98",
|
|
14
|
+
"chat-panel-input": "_chat-panel-input_5inb6_103"
|
|
10
15
|
};
|
|
11
16
|
export {
|
|
12
17
|
a 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":";;;;;;;;;;;;;;;"}
|
|
@@ -3,15 +3,16 @@ import r from "classnames";
|
|
|
3
3
|
import e from "./style.module.scss.js";
|
|
4
4
|
const h = ({
|
|
5
5
|
suggestions: o,
|
|
6
|
-
onSelect:
|
|
7
|
-
visible:
|
|
6
|
+
onSelect: i,
|
|
7
|
+
visible: a = !0,
|
|
8
8
|
className: n
|
|
9
|
-
}) => !
|
|
9
|
+
}) => !a || !o.length ? null : /* @__PURE__ */ s("div", { className: r("chat-suggestion-row", e["chat-suggestion-row"], n), children: o.map((t) => /* @__PURE__ */ s(
|
|
10
10
|
"button",
|
|
11
11
|
{
|
|
12
12
|
type: "button",
|
|
13
13
|
className: r("chat-suggestion-chip", e["chat-suggestion-chip"]),
|
|
14
|
-
|
|
14
|
+
title: t,
|
|
15
|
+
onClick: () => i(t),
|
|
15
16
|
children: t
|
|
16
17
|
},
|
|
17
18
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatSuggestionRow/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport styles from './style.module.scss';\n\nexport interface ChatSuggestionRowProps {\n suggestions: string[];\n onSelect: (text: string) => void;\n visible?: boolean;\n className?: string;\n}\n\nconst ChatSuggestionRow: React.FC<ChatSuggestionRowProps> = ({\n suggestions,\n onSelect,\n visible = true,\n className,\n}) => {\n if (!visible || !suggestions.length) return null;\n\n return (\n <div className={classNames('chat-suggestion-row', styles['chat-suggestion-row'], className)}>\n {suggestions.map((text) => (\n <button\n key={text}\n type=\"button\"\n className={classNames('chat-suggestion-chip', styles['chat-suggestion-chip'])}\n onClick={() => onSelect(text)}\n >\n {text}\n </button>\n ))}\n </div>\n );\n};\n\nexport default ChatSuggestionRow;\n"],"names":["ChatSuggestionRow","suggestions","onSelect","visible","className","jsx","classNames","styles","text"],"mappings":";;;AAWA,MAAMA,IAAsD,CAAC;AAAA,EAC3D,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AACF,MACM,CAACD,KAAW,CAACF,EAAY,SAAe,OAG1C,gBAAAI,EAAC,OAAA,EAAI,WAAWC,EAAW,uBAAuBC,EAAO,qBAAqB,GAAGH,CAAS,GACvF,UAAAH,EAAY,IAAI,CAACO,MAChB,gBAAAH;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC,MAAK;AAAA,IACL,WAAWC,EAAW,wBAAwBC,EAAO,sBAAsB,CAAC;AAAA,IAC5E,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatSuggestionRow/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport styles from './style.module.scss';\n\nexport interface ChatSuggestionRowProps {\n suggestions: string[];\n onSelect: (text: string) => void;\n visible?: boolean;\n className?: string;\n}\n\nconst ChatSuggestionRow: React.FC<ChatSuggestionRowProps> = ({\n suggestions,\n onSelect,\n visible = true,\n className,\n}) => {\n if (!visible || !suggestions.length) return null;\n\n return (\n <div className={classNames('chat-suggestion-row', styles['chat-suggestion-row'], className)}>\n {suggestions.map((text) => (\n <button\n key={text}\n type=\"button\"\n className={classNames('chat-suggestion-chip', styles['chat-suggestion-chip'])}\n title={text}\n onClick={() => onSelect(text)}\n >\n {text}\n </button>\n ))}\n </div>\n );\n};\n\nexport default ChatSuggestionRow;\n"],"names":["ChatSuggestionRow","suggestions","onSelect","visible","className","jsx","classNames","styles","text"],"mappings":";;;AAWA,MAAMA,IAAsD,CAAC;AAAA,EAC3D,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AACF,MACM,CAACD,KAAW,CAACF,EAAY,SAAe,OAG1C,gBAAAI,EAAC,OAAA,EAAI,WAAWC,EAAW,uBAAuBC,EAAO,qBAAqB,GAAGH,CAAS,GACvF,UAAAH,EAAY,IAAI,CAACO,MAChB,gBAAAH;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC,MAAK;AAAA,IACL,WAAWC,EAAW,wBAAwBC,EAAO,sBAAsB,CAAC;AAAA,IAC5E,OAAOC;AAAA,IACP,SAAS,MAAMN,EAASM,CAAI;AAAA,IAE3B,UAAAA;AAAA,EAAA;AAAA,EANIA;AAAA,CAQR,GACH;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const s = {
|
|
2
|
-
"chat-suggestion-row": "_chat-suggestion-
|
|
3
|
-
"chat-suggestion-chip": "_chat-suggestion-
|
|
2
|
+
"chat-suggestion-row": "_chat-suggestion-row_16zf3_1",
|
|
3
|
+
"chat-suggestion-chip": "_chat-suggestion-chip_16zf3_9"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as n, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import g from "../../../../Sparkline/Sparkline/index.js";
|
|
3
|
+
import N from "classnames";
|
|
4
|
+
import e from "./style.module.scss.js";
|
|
5
|
+
const d = ["#2563eb", "#16a34a", "#ea580c", "#9333ea", "#dc2626"], b = ({ series: i, className: m }) => {
|
|
6
|
+
var o;
|
|
7
|
+
const s = (o = i.find((a) => {
|
|
8
|
+
var l;
|
|
9
|
+
return (l = a.x) == null ? void 0 : l.length;
|
|
10
|
+
})) == null ? void 0 : o.x;
|
|
11
|
+
return /* @__PURE__ */ n("div", { className: N(e["chat-widget-sparklines"], m), children: [
|
|
12
|
+
i.map((a, l) => {
|
|
13
|
+
const t = (a.y || []).map((p) => Number(p)), h = a.color || d[l % d.length], r = t.length ? t[t.length - 1] : null;
|
|
14
|
+
return /* @__PURE__ */ n(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: e["chat-widget-sparkline-row"],
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ n("span", { className: e["chat-widget-sparkline-label"], title: a.name, children: [
|
|
20
|
+
/* @__PURE__ */ c(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
className: e["chat-widget-sparkline-dot"],
|
|
24
|
+
style: { backgroundColor: h }
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
a.name || `系列 ${l + 1}`
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ c(
|
|
30
|
+
g,
|
|
31
|
+
{
|
|
32
|
+
data: t,
|
|
33
|
+
width: 108,
|
|
34
|
+
height: 24,
|
|
35
|
+
color: h,
|
|
36
|
+
className: e["chat-widget-sparkline-chart"]
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ c("span", { className: e["chat-widget-sparkline-value"], children: r != null && !Number.isNaN(r) ? r : "—" })
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
`${a.name || "series"}-${l}`
|
|
43
|
+
);
|
|
44
|
+
}),
|
|
45
|
+
s && s.length > 1 ? /* @__PURE__ */ n("div", { className: e["chat-widget-sparkline-footer"], children: [
|
|
46
|
+
s[0],
|
|
47
|
+
" → ",
|
|
48
|
+
s[s.length - 1]
|
|
49
|
+
] }) : null
|
|
50
|
+
] });
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
b as default
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=ChatWidgetSparkline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatWidgetSparkline.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatWidgetBlock/ChatWidgetSparkline.tsx"],"sourcesContent":["import Sparkline from '@/components/Sparkline/Sparkline';\nimport type { ChatWidgetSeries } from '@/components/AgentHub/types';\nimport classNames from 'classnames';\nimport styles from './style.module.scss';\n\nconst DEFAULT_COLORS = ['#2563eb', '#16a34a', '#ea580c', '#9333ea', '#dc2626'];\n\ntype ChatWidgetSparklineProps = {\n series: ChatWidgetSeries[];\n className?: string;\n};\n\nconst ChatWidgetSparkline: React.FC<ChatWidgetSparklineProps> = ({ series, className }) => {\n const axisLabels = series.find((item) => item.x?.length)?.x;\n\n return (\n <div className={classNames(styles['chat-widget-sparklines'], className)}>\n {series.map((item, index) => {\n const values = (item.y || []).map((v) => Number(v));\n const color = item.color || DEFAULT_COLORS[index % DEFAULT_COLORS.length];\n const latest = values.length ? values[values.length - 1] : null;\n\n return (\n <div\n key={`${item.name || 'series'}-${index}`}\n className={styles['chat-widget-sparkline-row']}\n >\n <span className={styles['chat-widget-sparkline-label']} title={item.name}>\n <span\n className={styles['chat-widget-sparkline-dot']}\n style={{ backgroundColor: color }}\n />\n {item.name || `系列 ${index + 1}`}\n </span>\n <Sparkline\n data={values}\n width={108}\n height={24}\n color={color}\n className={styles['chat-widget-sparkline-chart']}\n />\n <span className={styles['chat-widget-sparkline-value']}>\n {latest != null && !Number.isNaN(latest) ? latest : '—'}\n </span>\n </div>\n );\n })}\n {axisLabels && axisLabels.length > 1 ? (\n <div className={styles['chat-widget-sparkline-footer']}>\n {axisLabels[0]} → {axisLabels[axisLabels.length - 1]}\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default ChatWidgetSparkline;\n"],"names":["DEFAULT_COLORS","ChatWidgetSparkline","series","className","axisLabels","_a","item","jsxs","classNames","styles","index","values","v","color","latest","jsx","Sparkline"],"mappings":";;;;AAKA,MAAMA,IAAiB,CAAC,WAAW,WAAW,WAAW,WAAW,SAAS,GAOvEC,IAA0D,CAAC,EAAE,QAAAC,GAAQ,WAAAC,QAAgB;;AACzF,QAAMC,KAAaC,IAAAH,EAAO,KAAK,CAACI;;AAAS,YAAAD,IAAAC,EAAK,MAAL,gBAAAD,EAAQ;AAAA,GAAM,MAApC,gBAAAA,EAAuC;AAE1D,SACE,gBAAAE,EAAC,SAAI,WAAWC,EAAWC,EAAO,wBAAwB,GAAGN,CAAS,GACnE,UAAA;AAAA,IAAAD,EAAO,IAAI,CAACI,GAAMI,MAAU;AAC3B,YAAMC,KAAUL,EAAK,KAAK,CAAA,GAAI,IAAI,CA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../../../types';
|
|
2
|
+
export interface ChatWidgetBlockProps {
|
|
3
|
+
widgets?: ChatWidget[];
|
|
4
|
+
className?: string;
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
/** 置于正文之前时去掉顶部分隔线 */
|
|
7
|
+
leading?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ChatWidgetBlock: React.FC<ChatWidgetBlockProps>;
|
|
10
|
+
export default ChatWidgetBlock;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import { Table as x } from "antd";
|
|
3
|
+
import A from "classnames";
|
|
4
|
+
import y from "./ChatWidgetSparkline.js";
|
|
5
|
+
import l from "./style.module.scss.js";
|
|
6
|
+
import B from "../../../../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
7
|
+
const k = ["#2563eb", "#16a34a", "#ea580c", "#9333ea"], E = 72, O = 112, D = {
|
|
8
|
+
date: 96,
|
|
9
|
+
process: 88,
|
|
10
|
+
param: 96,
|
|
11
|
+
before: 80,
|
|
12
|
+
after: 80,
|
|
13
|
+
operator: 72,
|
|
14
|
+
indicator: 96,
|
|
15
|
+
domain: 72,
|
|
16
|
+
relation: 64,
|
|
17
|
+
coeff: 64
|
|
18
|
+
};
|
|
19
|
+
function S(t) {
|
|
20
|
+
const n = D[t.key], c = t.width ?? n ?? t.label.length * 12 + 24;
|
|
21
|
+
return Math.min(O, Math.max(E, c));
|
|
22
|
+
}
|
|
23
|
+
function U(t) {
|
|
24
|
+
return t.reduce((n, c) => n + S(c), 0);
|
|
25
|
+
}
|
|
26
|
+
function H(t, n) {
|
|
27
|
+
const c = U(t);
|
|
28
|
+
return /* @__PURE__ */ r(
|
|
29
|
+
B,
|
|
30
|
+
{
|
|
31
|
+
direction: "horizontal",
|
|
32
|
+
wrapperClassName: l["chat-widget-table-scroll-wrapper"],
|
|
33
|
+
className: l["chat-widget-table-scroll"],
|
|
34
|
+
children: /* @__PURE__ */ r(
|
|
35
|
+
x,
|
|
36
|
+
{
|
|
37
|
+
size: "small",
|
|
38
|
+
pagination: !1,
|
|
39
|
+
tableLayout: "fixed",
|
|
40
|
+
className: l["chat-widget-table"],
|
|
41
|
+
style: { width: c, minWidth: c },
|
|
42
|
+
columns: t.map((s) => ({
|
|
43
|
+
title: s.label,
|
|
44
|
+
dataIndex: s.key,
|
|
45
|
+
key: s.key,
|
|
46
|
+
width: S(s),
|
|
47
|
+
ellipsis: { showTitle: !0 }
|
|
48
|
+
})),
|
|
49
|
+
dataSource: (n || []).map((s, e) => ({ ...s, key: e }))
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
const K = ({
|
|
56
|
+
widgets: t = [],
|
|
57
|
+
className: n,
|
|
58
|
+
compact: c = !1,
|
|
59
|
+
leading: s = !1
|
|
60
|
+
}) => t.length ? /* @__PURE__ */ r(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: A(
|
|
64
|
+
"chat-widget-block",
|
|
65
|
+
l["chat-widget-block"],
|
|
66
|
+
c && l["chat-widget-block--compact"],
|
|
67
|
+
s && l["chat-widget-block--leading"],
|
|
68
|
+
n
|
|
69
|
+
),
|
|
70
|
+
children: t.map((e, T) => {
|
|
71
|
+
var d, p, m, u, b, f, g, N;
|
|
72
|
+
return /* @__PURE__ */ h("div", { className: l["chat-widget-item"], children: [
|
|
73
|
+
e.title ? /* @__PURE__ */ r("div", { className: l["chat-widget-title"], children: e.title }) : null,
|
|
74
|
+
e.type === "line_chart" && ((d = e.series) != null && d.length) ? /* @__PURE__ */ r(y, { series: e.series }) : null,
|
|
75
|
+
e.type === "bar_chart" && ((p = e.categories) != null && p.length) && ((m = e.series) != null && m.length) ? /* @__PURE__ */ r("div", { className: l["chat-widget-bars"], children: e.series.map((a, i) => {
|
|
76
|
+
var _;
|
|
77
|
+
const v = (a.y || []).map((o) => Number(o)), C = Math.max(...v, 1), W = a.color || k[i % k.length];
|
|
78
|
+
return /* @__PURE__ */ h("div", { className: l["chat-widget-bar-group"], children: [
|
|
79
|
+
/* @__PURE__ */ r("div", { className: l["chat-widget-bar-group-title"], children: a.name }),
|
|
80
|
+
/* @__PURE__ */ r("div", { className: l["chat-widget-bar-row"], children: (_ = e.categories) == null ? void 0 : _.map((o, L) => {
|
|
81
|
+
const M = v[L] ?? 0;
|
|
82
|
+
return /* @__PURE__ */ h("div", { className: l["chat-widget-bar-cell"], children: [
|
|
83
|
+
/* @__PURE__ */ r(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: l["chat-widget-bar"],
|
|
87
|
+
style: {
|
|
88
|
+
height: `${Math.max(8, M / C * 48)}px`,
|
|
89
|
+
backgroundColor: W
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ r("span", { children: o })
|
|
94
|
+
] }, o);
|
|
95
|
+
}) })
|
|
96
|
+
] }, i);
|
|
97
|
+
}) }) : null,
|
|
98
|
+
e.type === "bar_chart" && !((u = e.categories) != null && u.length) && ((b = e.series) != null && b.length) ? /* @__PURE__ */ r(y, { series: e.series }) : null,
|
|
99
|
+
e.type === "table" && ((f = e.columns) != null && f.length) ? H(e.columns, e.rows) : null,
|
|
100
|
+
e.type === "metric_cards" && ((g = e.items) != null && g.length) ? /* @__PURE__ */ r("div", { className: l["chat-widget-metric-cards"], children: e.items.map((a, i) => /* @__PURE__ */ h("div", { className: l["chat-widget-metric-card"], children: [
|
|
101
|
+
/* @__PURE__ */ r("div", { className: l["chat-widget-metric-card-label"], children: String(a.label || "") }),
|
|
102
|
+
/* @__PURE__ */ h("div", { className: l["chat-widget-metric-card-value"], children: [
|
|
103
|
+
String(a.value ?? "—"),
|
|
104
|
+
a.unit ? /* @__PURE__ */ r("span", { children: String(a.unit) }) : null
|
|
105
|
+
] })
|
|
106
|
+
] }, i)) }) : null,
|
|
107
|
+
(e.type === "doc_list" || e.type === "case_list" || e.type === "link_list") && ((N = e.items) != null && N.length) ? /* @__PURE__ */ r("ul", { className: l["chat-widget-list"], children: e.items.map((a, i) => /* @__PURE__ */ h("li", { children: [
|
|
108
|
+
a.href ? /* @__PURE__ */ r("a", { href: String(a.href), target: "_blank", rel: "noreferrer", children: String(a.label || a.doc || a.id || i + 1) }) : /* @__PURE__ */ r("span", { children: String(
|
|
109
|
+
a.label || a.doc || a.snippet || a.rootCause || i + 1
|
|
110
|
+
) }),
|
|
111
|
+
a.description || a.snippet ? /* @__PURE__ */ r("div", { className: l["chat-widget-list-desc"], children: String(a.description || a.snippet) }) : null
|
|
112
|
+
] }, i)) }) : null
|
|
113
|
+
] }, `${e.type}-${T}`);
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
) : null;
|
|
117
|
+
export {
|
|
118
|
+
K as default
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../src/components/AgentHub/Chat/Detail/ChatWidgetBlock/index.tsx"],"sourcesContent":["import type { ChatWidget } from '@/components/AgentHub/types';\nimport { VirtualScrollbar } from '@/components/VirtualScrollbar';\nimport { Table } from 'antd';\nimport classNames from 'classnames';\nimport ChatWidgetSparkline from './ChatWidgetSparkline';\nimport styles from './style.module.scss';\n\nexport interface ChatWidgetBlockProps {\n widgets?: ChatWidget[];\n className?: string;\n compact?: boolean;\n /** 置于正文之前时去掉顶部分隔线 */\n leading?: boolean;\n}\n\nconst DEFAULT_BAR_COLORS = ['#2563eb', '#16a34a', '#ea580c', '#9333ea'];\nconst TABLE_COLUMN_MIN_WIDTH = 72;\nconst TABLE_COLUMN_MAX_WIDTH = 112;\n\nconst TABLE_COLUMN_KEY_WIDTH: Record<string, number> = {\n date: 96,\n process: 88,\n param: 96,\n before: 80,\n after: 80,\n operator: 72,\n indicator: 96,\n domain: 72,\n relation: 64,\n coeff: 64,\n};\n\nfunction resolveTableColumnWidth(column: { key: string; label: string; width?: number }) {\n const hinted = TABLE_COLUMN_KEY_WIDTH[column.key];\n const preferred = column.width ?? hinted ?? column.label.length * 12 + 24;\n return Math.min(TABLE_COLUMN_MAX_WIDTH, Math.max(TABLE_COLUMN_MIN_WIDTH, preferred));\n}\n\nfunction resolveTableScrollWidth(columns: { key: string; label: string; width?: number }[]) {\n return columns.reduce((sum, column) => sum + resolveTableColumnWidth(column), 0);\n}\n\nfunction renderChatWidgetTable(\n columns: NonNullable<ChatWidget['columns']>,\n rows: ChatWidget['rows'],\n) {\n const scrollWidth = resolveTableScrollWidth(columns);\n return (\n <VirtualScrollbar\n direction=\"horizontal\"\n wrapperClassName={styles['chat-widget-table-scroll-wrapper']}\n className={styles['chat-widget-table-scroll']}\n >\n <Table\n size=\"small\"\n pagination={false}\n tableLayout=\"fixed\"\n className={styles['chat-widget-table']}\n style={{ width: scrollWidth, minWidth: scrollWidth }}\n columns={columns.map((column) => ({\n title: column.label,\n dataIndex: column.key,\n key: column.key,\n width: resolveTableColumnWidth(column),\n ellipsis: { showTitle: true },\n }))}\n dataSource={(rows || []).map((row, rowIndex) => ({ ...row, key: rowIndex }))}\n />\n </VirtualScrollbar>\n );\n}\n\nconst ChatWidgetBlock: React.FC<ChatWidgetBlockProps> = ({\n widgets = [],\n className,\n compact = false,\n leading = false,\n}) => {\n if (!widgets.length) return null;\n\n return (\n <div\n className={classNames(\n 'chat-widget-block',\n styles['chat-widget-block'],\n compact && styles['chat-widget-block--compact'],\n leading && styles['chat-widget-block--leading'],\n className,\n )}\n >\n {widgets.map((widget, index) => (\n <div key={`${widget.type}-${index}`} className={styles['chat-widget-item']}>\n {widget.title ? <div className={styles['chat-widget-title']}>{widget.title}</div> : null}\n\n {widget.type === 'line_chart' && widget.series?.length ? (\n <ChatWidgetSparkline series={widget.series} />\n ) : null}\n\n {widget.type === 'bar_chart' && widget.categories?.length && widget.series?.length ? (\n <div className={styles['chat-widget-bars']}>\n {widget.series.map((seriesItem, seriesIndex) => {\n const values = (seriesItem.y || []).map((v) => Number(v));\n const max = Math.max(...values, 1);\n const color =\n seriesItem.color || DEFAULT_BAR_COLORS[seriesIndex % DEFAULT_BAR_COLORS.length];\n return (\n <div key={seriesIndex} className={styles['chat-widget-bar-group']}>\n <div className={styles['chat-widget-bar-group-title']}>{seriesItem.name}</div>\n <div className={styles['chat-widget-bar-row']}>\n {widget.categories?.map((category, categoryIndex) => {\n const value = values[categoryIndex] ?? 0;\n return (\n <div key={category} className={styles['chat-widget-bar-cell']}>\n <div\n className={styles['chat-widget-bar']}\n style={{\n height: `${Math.max(8, (value / max) * 48)}px`,\n backgroundColor: color,\n }}\n />\n <span>{category}</span>\n </div>\n );\n })}\n </div>\n </div>\n );\n })}\n </div>\n ) : null}\n\n {widget.type === 'bar_chart' && !widget.categories?.length && widget.series?.length ? (\n <ChatWidgetSparkline series={widget.series} />\n ) : null}\n\n {widget.type === 'table' && widget.columns?.length\n ? renderChatWidgetTable(widget.columns, widget.rows)\n : null}\n\n {widget.type === 'metric_cards' && widget.items?.length ? (\n <div className={styles['chat-widget-metric-cards']}>\n {widget.items.map((item, itemIndex) => (\n <div key={itemIndex} className={styles['chat-widget-metric-card']}>\n <div className={styles['chat-widget-metric-card-label']}>\n {String(item.label || '')}\n </div>\n <div className={styles['chat-widget-metric-card-value']}>\n {String(item.value ?? '—')}\n {item.unit ? <span>{String(item.unit)}</span> : null}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n\n {(widget.type === 'doc_list' ||\n widget.type === 'case_list' ||\n widget.type === 'link_list') &&\n widget.items?.length ? (\n <ul className={styles['chat-widget-list']}>\n {widget.items.map((item, itemIndex) => (\n <li key={itemIndex}>\n {item.href ? (\n <a href={String(item.href)} target=\"_blank\" rel=\"noreferrer\">\n {String(item.label || item.doc || item.id || itemIndex + 1)}\n </a>\n ) : (\n <span>\n {String(\n item.label || item.doc || item.snippet || item.rootCause || itemIndex + 1,\n )}\n </span>\n )}\n {item.description || item.snippet ? (\n <div className={styles['chat-widget-list-desc']}>\n {String(item.description || item.snippet)}\n </div>\n ) : null}\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n ))}\n </div>\n );\n};\n\nexport default ChatWidgetBlock;\n"],"names":["DEFAULT_BAR_COLORS","TABLE_COLUMN_MIN_WIDTH","TABLE_COLUMN_MAX_WIDTH","TABLE_COLUMN_KEY_WIDTH","resolveTableColumnWidth","column","hinted","preferred","resolveTableScrollWidth","columns","sum","renderChatWidgetTable","rows","scrollWidth","jsx","VirtualScrollbar","styles","Table","row","rowIndex","ChatWidgetBlock","widgets","className","compact","leading","classNames","widget","index","_a","ChatWidgetSparkline","_b","_c","seriesItem","seriesIndex","values","v","max","color","jsxs","category","categoryIndex","value","_d","_e","_f","_g","item","itemIndex","_h"],"mappings":";;;;;;AAeA,MAAMA,IAAqB,CAAC,WAAW,WAAW,WAAW,SAAS,GAChEC,IAAyB,IACzBC,IAAyB,KAEzBC,IAAiD;AAAA,EACrD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AACT;AAEA,SAASC,EAAwBC,GAAwD;AACvF,QAAMC,IAASH,EAAuBE,EAAO,GAAG,GAC1CE,IAAYF,EAAO,SAASC,KAAUD,EAAO,MAAM,SAAS,KAAK;AACvE,SAAO,KAAK,IAAIH,GAAwB,KAAK,IAAID,GAAwBM,CAAS,CAAC;AACrF;AAEA,SAASC,EAAwBC,GAA2D;AAC1F,SAAOA,EAAQ,OAAO,CAACC,GAAKL,MAAWK,IAAMN,EAAwBC,CAAM,GAAG,CAAC;AACjF;AAEA,SAASM,EACPF,GACAG,GACA;AACA,QAAMC,IAAcL,EAAwBC,CAAO;AACnD,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,kBAAkBC,EAAO,kCAAkC;AAAA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,QAAO,UAAS,KAAI,cAC7C,iBAAOA,EAAK,SAASA,EAAK,OAAOA,EAAK,MAAMC,IAAY,CAAC,EAAA,CAC5D,IAEA,gBAAAjC,EAAC,QAAA,EACE,UAAA;AAAA,YACCgC,EAAK,SAASA,EAAK,OAAOA,EAAK,WAAWA,EAAK,aAAaC,IAAY;AAAA,UAAA,GAE5E;AAAA,UAEDD,EAAK,eAAeA,EAAK,UACxB,gBAAAhC,EAAC,SAAI,WAAWE,EAAO,uBAAuB,GAC3C,iBAAO8B,EAAK,eAAeA,EAAK,OAAO,GAC1C,IACE;AAAA,QAAA,KAhBGC,CAiBT,CACD,EAAA,CACH,IACE;AAAA,MAAA,EAAA,GA1FI,GAAGrB,EAAO,IAAI,IAAIC,CAAK,EA2FjC;AAAA,KACD;AAAA,EAAA;AAAA,IAzGuB;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
"chat-widget-block": "_chat-widget-block_e6f2c_1",
|
|
3
|
+
"chat-widget-block--compact": "_chat-widget-block--compact_e6f2c_10",
|
|
4
|
+
"chat-widget-block--leading": "_chat-widget-block--leading_e6f2c_15",
|
|
5
|
+
"chat-widget-item": "_chat-widget-item_e6f2c_21",
|
|
6
|
+
"chat-widget-title": "_chat-widget-title_e6f2c_27",
|
|
7
|
+
"chat-widget-sparklines": "_chat-widget-sparklines_e6f2c_34",
|
|
8
|
+
"chat-widget-sparkline-row": "_chat-widget-sparkline-row_e6f2c_40",
|
|
9
|
+
"chat-widget-sparkline-label": "_chat-widget-sparkline-label_e6f2c_47",
|
|
10
|
+
"chat-widget-sparkline-dot": "_chat-widget-sparkline-dot_e6f2c_59",
|
|
11
|
+
"chat-widget-sparkline-chart": "_chat-widget-sparkline-chart_e6f2c_66",
|
|
12
|
+
"chat-widget-sparkline-value": "_chat-widget-sparkline-value_e6f2c_71",
|
|
13
|
+
"chat-widget-sparkline-footer": "_chat-widget-sparkline-footer_e6f2c_79",
|
|
14
|
+
"chat-widget-table-scroll-wrapper": "_chat-widget-table-scroll-wrapper_e6f2c_86",
|
|
15
|
+
"chat-widget-table-scroll": "_chat-widget-table-scroll_e6f2c_86",
|
|
16
|
+
"chat-widget-table": "_chat-widget-table_e6f2c_86",
|
|
17
|
+
"chat-widget-metric-cards": "_chat-widget-metric-cards_e6f2c_106",
|
|
18
|
+
"chat-widget-metric-card": "_chat-widget-metric-card_e6f2c_106",
|
|
19
|
+
"chat-widget-metric-card-label": "_chat-widget-metric-card-label_e6f2c_119",
|
|
20
|
+
"chat-widget-metric-card-value": "_chat-widget-metric-card-value_e6f2c_124",
|
|
21
|
+
"chat-widget-list": "_chat-widget-list_e6f2c_137",
|
|
22
|
+
"chat-widget-list-desc": "_chat-widget-list-desc_e6f2c_147",
|
|
23
|
+
"chat-widget-bars": "_chat-widget-bars_e6f2c_153",
|
|
24
|
+
"chat-widget-bar-group-title": "_chat-widget-bar-group-title_e6f2c_159",
|
|
25
|
+
"chat-widget-bar-row": "_chat-widget-bar-row_e6f2c_164",
|
|
26
|
+
"chat-widget-bar-cell": "_chat-widget-bar-cell_e6f2c_170",
|
|
27
|
+
"chat-widget-bar": "_chat-widget-bar_e6f2c_153"
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
t as default
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=style.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const t = {
|
|
2
|
-
"citation-content-footer": "_citation-content-
|
|
3
|
-
"citation-content-citation-rich-content": "_citation-content-citation-rich-
|
|
2
|
+
"citation-content-footer": "_citation-content-footer_178qs_1",
|
|
3
|
+
"citation-content-citation-rich-content": "_citation-content-citation-rich-content_178qs_7"
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
6
|
t as default
|