test-chat-sdk 0.0.0
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/.prettierrc.js +24 -0
- package/README.md +46 -0
- package/config/env.js +104 -0
- package/config/getHttpsConfig.js +66 -0
- package/config/jest/babelTransform.js +29 -0
- package/config/jest/cssTransform.js +14 -0
- package/config/jest/fileTransform.js +40 -0
- package/config/modules.js +134 -0
- package/config/paths.js +77 -0
- package/config/webpack/persistentCache/createEnvironmentHash.js +9 -0
- package/config/webpack.config.js +785 -0
- package/config/webpackDevServer.config.js +127 -0
- package/dist/Chat/AgentList/index.d.ts +9 -0
- package/dist/Chat/ChatFooter/index.d.ts +17 -0
- package/dist/Chat/Conversation/index.d.ts +11 -0
- package/dist/Chat/MessageContainer/index.d.ts +19 -0
- package/dist/Chat/MobileAgents/index.d.ts +11 -0
- package/dist/Chat/components/AgentTip/index.d.ts +8 -0
- package/dist/Chat/components/ConversationModal/index.d.ts +10 -0
- package/dist/Chat/components/CopilotAvatar/index.d.ts +2 -0
- package/dist/Chat/components/Message.d.ts +10 -0
- package/dist/Chat/components/RecommendQuestions/index.d.ts +6 -0
- package/dist/Chat/components/Text.d.ts +9 -0
- package/dist/Chat/constants.d.ts +19 -0
- package/dist/Chat/index.d.ts +17 -0
- package/dist/Chat/service.d.ts +11 -0
- package/dist/Chat/type.d.ts +97 -0
- package/dist/Copilot/constants.d.ts +11 -0
- package/dist/Copilot/index.d.ts +13 -0
- package/dist/ShowCase/index.d.ts +8 -0
- package/dist/ShowCase/service.d.ts +2 -0
- package/dist/ShowCase/type.d.ts +11 -0
- package/dist/common/constants.d.ts +58 -0
- package/dist/common/env.d.ts +3 -0
- package/dist/common/type.d.ts +247 -0
- package/dist/components/ChatItem/ExecuteItem.d.ts +25 -0
- package/dist/components/ChatItem/ExpandParseTip.d.ts +20 -0
- package/dist/components/ChatItem/FilterItem.d.ts +17 -0
- package/dist/components/ChatItem/Loading.d.ts +2 -0
- package/dist/components/ChatItem/ParseTip.d.ts +26 -0
- package/dist/components/ChatItem/ParseTipUtils.d.ts +10 -0
- package/dist/components/ChatItem/SimilarQuestionItem.d.ts +10 -0
- package/dist/components/ChatItem/SqlItem.d.ts +17 -0
- package/dist/components/ChatItem/SwitchEntity.d.ts +9 -0
- package/dist/components/ChatItem/Text.d.ts +6 -0
- package/dist/components/ChatItem/Typing.d.ts +2 -0
- package/dist/components/ChatItem/index.d.ts +33 -0
- package/dist/components/ChatMsg/ApplyAuth/index.d.ts +7 -0
- package/dist/components/ChatMsg/Bar/index.d.ts +13 -0
- package/dist/components/ChatMsg/DateOptions/index.d.ts +9 -0
- package/dist/components/ChatMsg/FilterSection/index.d.ts +8 -0
- package/dist/components/ChatMsg/MarkDown/index.d.ts +10 -0
- package/dist/components/ChatMsg/Message/index.d.ts +18 -0
- package/dist/components/ChatMsg/MetricCard/PeriodCompareItem.d.ts +7 -0
- package/dist/components/ChatMsg/MetricCard/index.d.ts +10 -0
- package/dist/components/ChatMsg/MetricTrend/MetricInfo.d.ts +8 -0
- package/dist/components/ChatMsg/MetricTrend/MetricTrendChart.d.ts +14 -0
- package/dist/components/ChatMsg/MetricTrend/MultiMetricsTrendChart.d.ts +12 -0
- package/dist/components/ChatMsg/MetricTrend/index.d.ts +16 -0
- package/dist/components/ChatMsg/NoPermissionChart/index.d.ts +8 -0
- package/dist/components/ChatMsg/Pie/PieChart.d.ts +11 -0
- package/dist/components/ChatMsg/Pie/index.d.ts +14 -0
- package/dist/components/ChatMsg/Table/index.d.ts +12 -0
- package/dist/components/ChatMsg/Text/index.d.ts +9 -0
- package/dist/components/ChatMsg/WebPage/index.d.ts +8 -0
- package/dist/components/ChatMsg/index.d.ts +15 -0
- package/dist/components/DrillDownDimensions/DimensionSection.d.ts +11 -0
- package/dist/components/DrillDownDimensions/index.d.ts +13 -0
- package/dist/components/IconFont/index.d.ts +3 -0
- package/dist/components/MetricOptions/index.d.ts +11 -0
- package/dist/components/RecommendOptions/index.d.ts +9 -0
- package/dist/components/Tools/FeedbackModal.d.ts +9 -0
- package/dist/components/Tools/index.d.ts +12 -0
- package/dist/demo/Chat.d.ts +2 -0
- package/dist/demo/ChatDemo.d.ts +4 -0
- package/dist/demo/CopilotDemo.d.ts +2 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useComposing.d.ts +5 -0
- package/dist/hooks/useExportByEcharts.d.ts +10 -0
- package/dist/hooks/useMethodRegister.d.ts +4 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.es.js +1 -0
- package/dist/service/axiosInstance.d.ts +3 -0
- package/dist/service/index.d.ts +25 -0
- package/dist/utils/utils.d.ts +45 -0
- package/package.json +214 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/manifest.json +15 -0
- package/public/robots.txt +3 -0
- package/rollup/rollup.config.mjs +37 -0
- package/rollup/rollup.esm.config.mjs +21 -0
- package/rollup/rollup.umd.config.mjs +30 -0
- package/scripts/build.js +217 -0
- package/scripts/start.js +154 -0
- package/scripts/test.js +52 -0
- package/src/Chat/AgentList/index.tsx +52 -0
- package/src/Chat/AgentList/style.module.less +83 -0
- package/src/Chat/ChatFooter/index.tsx +423 -0
- package/src/Chat/ChatFooter/style.module.less +225 -0
- package/src/Chat/Conversation/index.tsx +236 -0
- package/src/Chat/Conversation/style.module.less +171 -0
- package/src/Chat/MessageContainer/index.tsx +145 -0
- package/src/Chat/MessageContainer/style.module.less +53 -0
- package/src/Chat/MobileAgents/index.tsx +62 -0
- package/src/Chat/MobileAgents/style.module.less +55 -0
- package/src/Chat/components/AgentTip/index.tsx +48 -0
- package/src/Chat/components/AgentTip/style.module.less +44 -0
- package/src/Chat/components/ConversationModal/index.tsx +65 -0
- package/src/Chat/components/CopilotAvatar/index.tsx +8 -0
- package/src/Chat/components/CopilotAvatar/style.module.less +13 -0
- package/src/Chat/components/Message.tsx +38 -0
- package/src/Chat/components/RecommendQuestions/index.tsx +64 -0
- package/src/Chat/components/RecommendQuestions/style.module.less +36 -0
- package/src/Chat/components/Text.tsx +42 -0
- package/src/Chat/components/style.module.less +311 -0
- package/src/Chat/constants.ts +37 -0
- package/src/Chat/index.tsx +526 -0
- package/src/Chat/service.ts +49 -0
- package/src/Chat/style.module.less +119 -0
- package/src/Chat/type.ts +107 -0
- package/src/Copilot/constants.ts +11 -0
- package/src/Copilot/index.tsx +149 -0
- package/src/Copilot/style.module.less +151 -0
- package/src/ShowCase/index.tsx +120 -0
- package/src/ShowCase/service.ts +12 -0
- package/src/ShowCase/style.module.less +46 -0
- package/src/ShowCase/type.ts +14 -0
- package/src/common/constants.ts +93 -0
- package/src/common/env.ts +5 -0
- package/src/common/type.ts +270 -0
- package/src/components/ChatItem/ExecuteItem.tsx +210 -0
- package/src/components/ChatItem/ExpandParseTip.tsx +333 -0
- package/src/components/ChatItem/FilterItem.tsx +209 -0
- package/src/components/ChatItem/Loading.tsx +14 -0
- package/src/components/ChatItem/ParseTip.tsx +322 -0
- package/src/components/ChatItem/ParseTipUtils.tsx +205 -0
- package/src/components/ChatItem/SimilarQuestionItem.tsx +84 -0
- package/src/components/ChatItem/SqlItem.tsx +410 -0
- package/src/components/ChatItem/SwitchEntity.tsx +52 -0
- package/src/components/ChatItem/Text.tsx +17 -0
- package/src/components/ChatItem/Typing.tsx +19 -0
- package/src/components/ChatItem/index.tsx +843 -0
- package/src/components/ChatItem/style.less +670 -0
- package/src/components/ChatMsg/ApplyAuth/index.tsx +30 -0
- package/src/components/ChatMsg/ApplyAuth/style.less +13 -0
- package/src/components/ChatMsg/Bar/index.tsx +208 -0
- package/src/components/ChatMsg/Bar/style.less +60 -0
- package/src/components/ChatMsg/DateOptions/index.tsx +46 -0
- package/src/components/ChatMsg/DateOptions/style.less +43 -0
- package/src/components/ChatMsg/FilterSection/index.tsx +42 -0
- package/src/components/ChatMsg/FilterSection/style.less +37 -0
- package/src/components/ChatMsg/MarkDown/index.tsx +26 -0
- package/src/components/ChatMsg/MarkDown/style.less +9 -0
- package/src/components/ChatMsg/Message/index.tsx +105 -0
- package/src/components/ChatMsg/Message/style.less +119 -0
- package/src/components/ChatMsg/MetricCard/PeriodCompareItem.tsx +29 -0
- package/src/components/ChatMsg/MetricCard/index.tsx +80 -0
- package/src/components/ChatMsg/MetricCard/style.less +126 -0
- package/src/components/ChatMsg/MetricTrend/MetricInfo.tsx +60 -0
- package/src/components/ChatMsg/MetricTrend/MetricTrendChart.tsx +235 -0
- package/src/components/ChatMsg/MetricTrend/MultiMetricsTrendChart.tsx +162 -0
- package/src/components/ChatMsg/MetricTrend/index.tsx +127 -0
- package/src/components/ChatMsg/MetricTrend/style.less +195 -0
- package/src/components/ChatMsg/NoPermissionChart/index.tsx +28 -0
- package/src/components/ChatMsg/NoPermissionChart/style.less +26 -0
- package/src/components/ChatMsg/Pie/PieChart.tsx +120 -0
- package/src/components/ChatMsg/Pie/index.tsx +88 -0
- package/src/components/ChatMsg/Pie/style.less +43 -0
- package/src/components/ChatMsg/Table/index.tsx +103 -0
- package/src/components/ChatMsg/Table/style.less +131 -0
- package/src/components/ChatMsg/Text/index.tsx +70 -0
- package/src/components/ChatMsg/Text/style.less +38 -0
- package/src/components/ChatMsg/WebPage/index.tsx +125 -0
- package/src/components/ChatMsg/index.tsx +428 -0
- package/src/components/ChatMsg/style.less +28 -0
- package/src/components/DrillDownDimensions/DimensionSection.tsx +99 -0
- package/src/components/DrillDownDimensions/index.tsx +76 -0
- package/src/components/DrillDownDimensions/style.less +64 -0
- package/src/components/IconFont/index.tsx +7 -0
- package/src/components/MetricOptions/index.tsx +75 -0
- package/src/components/MetricOptions/style.less +69 -0
- package/src/components/RecommendOptions/index.tsx +126 -0
- package/src/components/RecommendOptions/style.less +24 -0
- package/src/components/Tools/FeedbackModal.tsx +55 -0
- package/src/components/Tools/index.tsx +126 -0
- package/src/components/Tools/style.less +67 -0
- package/src/demo/Chat.tsx +73 -0
- package/src/demo/ChatDemo.tsx +14 -0
- package/src/demo/CopilotDemo.tsx +43 -0
- package/src/demo/style.module.less +19 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useComposing.ts +31 -0
- package/src/hooks/useExportByEcharts.ts +41 -0
- package/src/hooks/useMethodRegister.ts +25 -0
- package/src/index.tsx +44 -0
- package/src/service/axiosInstance.ts +58 -0
- package/src/service/index.ts +174 -0
- package/src/setupProxy.js +18 -0
- package/src/setupTests.ts +5 -0
- package/src/styles/global.less +52 -0
- package/src/styles/index.less +39 -0
- package/src/styles/reboot.less +14 -0
- package/src/styles/variables.less +80 -0
- package/src/typings.d.ts +179 -0
- package/src/utils/utils.ts +346 -0
- package/tsconfig.build.json +20 -0
- package/tsconfig.json +27 -0
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
@import '../../styles/index.less';
|
|
2
|
+
|
|
3
|
+
@chat-item-prefix-cls: ~'@{supersonic-chat-prefix}-item';
|
|
4
|
+
@filter-item-prefix-cls: ~'@{supersonic-chat-prefix}-filter-item';
|
|
5
|
+
@sql-item-prefix-cls: ~'@{supersonic-chat-prefix}-sql-item';
|
|
6
|
+
@similar-questions-prefix-cls: ~'@{supersonic-chat-prefix}-similar-questions';
|
|
7
|
+
|
|
8
|
+
.@{chat-item-prefix-cls} {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: flex;
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// @keyframes breathing-text {
|
|
15
|
+
// 0% { font-size: 20px; color: #4c96f6; }
|
|
16
|
+
// 50% { font-size: 20px; color: #dce0f0; }
|
|
17
|
+
// 100% { font-size: 20px; color: #0000ff; }
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
// &-breathing-text {
|
|
22
|
+
// font-family: Arial, sans-serif;
|
|
23
|
+
// animation: breathing-text 3s infinite;
|
|
24
|
+
// }
|
|
25
|
+
|
|
26
|
+
&-breathing-text {
|
|
27
|
+
--bg-size: 400%;
|
|
28
|
+
--color-one: hsl(235, 87%, 34%);
|
|
29
|
+
--color-two: hsl(203, 95%, 55%);
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
background: linear-gradient(
|
|
32
|
+
90deg,
|
|
33
|
+
var(--color-one),
|
|
34
|
+
var(--color-two),
|
|
35
|
+
var(--color-one)
|
|
36
|
+
) 0 0 / var(--bg-size) 100%;
|
|
37
|
+
color: transparent;
|
|
38
|
+
background-clip: text;
|
|
39
|
+
-webkit-background-clip: text;
|
|
40
|
+
animation: move-bg 8s infinite linear;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes move-bg {
|
|
44
|
+
to {
|
|
45
|
+
background-position: var(--bg-size) 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
&-loading {
|
|
51
|
+
display: inline-block;
|
|
52
|
+
width: 60px;
|
|
53
|
+
height: 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&-loading-dot {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
width: 4px;
|
|
59
|
+
height: 4px;
|
|
60
|
+
background-color: var(--text-color);
|
|
61
|
+
margin: 0 2px;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
animation: dot 1s ease-in-out infinite;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&-loading-dot:nth-child(1) {
|
|
67
|
+
animation-delay: 0s;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-loading-dot:nth-child(2) {
|
|
71
|
+
animation-delay: 0.2s;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&-loading-dot:nth-child(3) {
|
|
75
|
+
animation-delay: 0.4s;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes dot {
|
|
79
|
+
0% {
|
|
80
|
+
opacity: 0;
|
|
81
|
+
transform: scale(0.5);
|
|
82
|
+
}
|
|
83
|
+
50% {
|
|
84
|
+
opacity: 1;
|
|
85
|
+
transform: scale(1);
|
|
86
|
+
}
|
|
87
|
+
100% {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
transform: scale(0.5);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-content-parser-container {
|
|
94
|
+
margin: 20px 0 0 10px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&-content-parser-options-title {
|
|
98
|
+
margin-right: 8px;
|
|
99
|
+
color: var(--text-color);
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&-content-options {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
column-gap: 13px;
|
|
107
|
+
margin-left: -10px;
|
|
108
|
+
|
|
109
|
+
&.mobile {
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&-content-option {
|
|
115
|
+
border-radius: 4px;
|
|
116
|
+
padding: 0 4px;
|
|
117
|
+
font-weight: normal;
|
|
118
|
+
color: var(--text-color-third);
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
|
|
121
|
+
&:hover {
|
|
122
|
+
color: var(--chat-blue);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&-content-option-active {
|
|
127
|
+
color: #fff !important;
|
|
128
|
+
background-color: var(--chat-blue)!important;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
&-content-option-disabled {
|
|
133
|
+
cursor: unset;
|
|
134
|
+
background-color: #eee;
|
|
135
|
+
&:hover {
|
|
136
|
+
color: #626a6a;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&-avatar {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
font-size: 40px;
|
|
145
|
+
width: 40px;
|
|
146
|
+
height: 40px;
|
|
147
|
+
margin-right: 6px;
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
color: var(--chat-blue);
|
|
150
|
+
background-color: #fff;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&-time {
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: -22px;
|
|
156
|
+
color: var(--text-color-fourth);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&-mobile-msg-card {
|
|
160
|
+
width: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&-content {
|
|
164
|
+
position: relative;
|
|
165
|
+
box-sizing: border-box;
|
|
166
|
+
min-width: 1px;
|
|
167
|
+
max-width: 100%;
|
|
168
|
+
padding: 12px 20px 12px 16px;
|
|
169
|
+
background: #fff;
|
|
170
|
+
border: 1px solid transparent;
|
|
171
|
+
border-radius: 12px;
|
|
172
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14), 0 0 2px rgba(0, 0, 0, 0.12);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&-content-mobile {
|
|
176
|
+
width: 100%;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&-content-text {
|
|
180
|
+
margin-top: 12px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.ant-picker {
|
|
184
|
+
background-color: #f5f8fb !important;
|
|
185
|
+
border-color: #ececec !important;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.ant-picker-input > input {
|
|
189
|
+
color: var(--chat-blue);
|
|
190
|
+
font-weight: 500;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&-title-bar {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
column-gap: 10px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&-title-tip {
|
|
200
|
+
margin-left: 2px;
|
|
201
|
+
color: var(--text-color-third);
|
|
202
|
+
font-weight: normal;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&-step-title {
|
|
206
|
+
font-weight: 500;
|
|
207
|
+
color: var(--text-color);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&-code {
|
|
211
|
+
margin-top: 10px !important;
|
|
212
|
+
padding: 6px 14px 8px !important;
|
|
213
|
+
border: 1px solid var(--border-color-base) !important;
|
|
214
|
+
border-radius: 4px !important;
|
|
215
|
+
background: #f5f8fb !important;
|
|
216
|
+
max-width: calc(100vw - 410px);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&-execute-title-bar {
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: space-between;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&-reload {
|
|
226
|
+
margin-left: 2px;
|
|
227
|
+
width: fit-content;
|
|
228
|
+
font-weight: normal;
|
|
229
|
+
color: var(--text-color-secondary);
|
|
230
|
+
font-size: 13px !important;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
&-step-icon {
|
|
234
|
+
color: var(--green);
|
|
235
|
+
font-size: 16px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&-step-error-icon {
|
|
239
|
+
color: var(--error-color);
|
|
240
|
+
font-size: 16px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&-content-container {
|
|
244
|
+
margin: 2px 0 2px 7px;
|
|
245
|
+
padding: 10px 0 4px 18px;
|
|
246
|
+
border-left: 1px solid var(--green);
|
|
247
|
+
padding-bottom: 10px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
&-content-container-simple {
|
|
251
|
+
border-left: none;
|
|
252
|
+
padding: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&-empty-content-container {
|
|
256
|
+
padding-bottom: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&-content-container-failed {
|
|
260
|
+
border-left: 1px solid transparent;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
&-auth-tip {
|
|
264
|
+
font-size: 13px;
|
|
265
|
+
color: var(--text-color-secondary);
|
|
266
|
+
margin-bottom: 12px;
|
|
267
|
+
line-height: 20px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&-switch-entity {
|
|
271
|
+
cursor: pointer;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&-down-icon {
|
|
275
|
+
margin-left: 4px;
|
|
276
|
+
color: var(--text-color-fourth);
|
|
277
|
+
font-size: 12px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&-last-node {
|
|
281
|
+
border-left: none;
|
|
282
|
+
margin-left: 0;
|
|
283
|
+
padding-left: 0;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&-chart-content {
|
|
287
|
+
padding: 6px 14px 12px;
|
|
288
|
+
border: 1px solid var(--border-color-base);
|
|
289
|
+
border-radius: 4px;
|
|
290
|
+
background: #f5f8fb;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&-multi-options {
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-direction: column;
|
|
296
|
+
row-gap: 12px;
|
|
297
|
+
padding: 4px 0 12px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&-options {
|
|
301
|
+
display: flex;
|
|
302
|
+
flex-direction: column;
|
|
303
|
+
row-gap: 12px;
|
|
304
|
+
margin-top: 4px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&-tip {
|
|
308
|
+
display: flex;
|
|
309
|
+
flex-direction: column;
|
|
310
|
+
row-gap: 10px;
|
|
311
|
+
flex-wrap: wrap;
|
|
312
|
+
color: var(--text-color-third);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&-tip-content {
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
flex-wrap: wrap;
|
|
319
|
+
row-gap: 10px;
|
|
320
|
+
column-gap: 12px;
|
|
321
|
+
color: var(--text-color-third);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&-tip-content-option {
|
|
325
|
+
padding: 6px 14px;
|
|
326
|
+
border-radius: 16px;
|
|
327
|
+
border: 1px solid var(--border-color-base);
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
|
|
330
|
+
&:hover {
|
|
331
|
+
border-color: var(--chat-blue);
|
|
332
|
+
color: var(--chat-blue);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&-tip-content-option-disabled {
|
|
337
|
+
cursor: auto;
|
|
338
|
+
|
|
339
|
+
&:hover {
|
|
340
|
+
color: var(--text-color-secondary);
|
|
341
|
+
border-color: var(--border-color-base);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&-tip-content-option-active {
|
|
346
|
+
border-color: var(--chat-blue);
|
|
347
|
+
color: var(--chat-blue);
|
|
348
|
+
cursor: auto;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
&-tip-item {
|
|
352
|
+
display: flex;
|
|
353
|
+
align-items: center;
|
|
354
|
+
flex-wrap: wrap;
|
|
355
|
+
row-gap: 4px;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
&-tip-item-content {
|
|
359
|
+
display: flex;
|
|
360
|
+
align-items: center;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&-tip-item-filter-content {
|
|
364
|
+
display: flex;
|
|
365
|
+
align-items: center;
|
|
366
|
+
flex-wrap: wrap;
|
|
367
|
+
column-gap: 12px;
|
|
368
|
+
row-gap: 6px;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&-tip-item-option {
|
|
372
|
+
display: flex;
|
|
373
|
+
align-items: center;
|
|
374
|
+
flex-wrap: wrap;
|
|
375
|
+
row-gap: 6px;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
&-mobile-tip-item-option {
|
|
379
|
+
.ant-picker-panel-container .ant-picker-panels {
|
|
380
|
+
flex-wrap: wrap !important;
|
|
381
|
+
width: 280px !important;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&-tip-item-filter-name {
|
|
386
|
+
color: var(--text-color-secondary);
|
|
387
|
+
font-weight: 500;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&-mode-name {
|
|
391
|
+
margin-right: -10px;
|
|
392
|
+
font-weight: 500;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
&-tip-item-value {
|
|
396
|
+
color: var(--chat-blue);
|
|
397
|
+
font-weight: 500;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
&-entity-info {
|
|
401
|
+
display: flex;
|
|
402
|
+
align-items: center;
|
|
403
|
+
flex-wrap: wrap;
|
|
404
|
+
row-gap: 6px;
|
|
405
|
+
column-gap: 12px;
|
|
406
|
+
color: var(--text-color-third);
|
|
407
|
+
font-size: 14px;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
&-dimension-item {
|
|
411
|
+
display: flex;
|
|
412
|
+
align-items: center;
|
|
413
|
+
flex-wrap: wrap;
|
|
414
|
+
row-gap: 6px;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
&-dimension-name {
|
|
418
|
+
color: var(--text-color-third);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
&-dimension-value {
|
|
422
|
+
color: var(--chat-blue);
|
|
423
|
+
font-weight: 500;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
&-metric-info-list {
|
|
427
|
+
margin-top: 30px;
|
|
428
|
+
display: flex;
|
|
429
|
+
flex-direction: column;
|
|
430
|
+
row-gap: 30px;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
&-typing {
|
|
434
|
+
width: 100%;
|
|
435
|
+
padding: 0 5px;
|
|
436
|
+
|
|
437
|
+
.ant-spin-dot {
|
|
438
|
+
width: 100% !important;
|
|
439
|
+
height: 100% !important;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
&-typing-bubble {
|
|
444
|
+
width: fit-content;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
&-text-bubble {
|
|
448
|
+
width: fit-content;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
&-text {
|
|
452
|
+
line-height: 1.5;
|
|
453
|
+
white-space: pre-wrap;
|
|
454
|
+
overflow-wrap: break-word;
|
|
455
|
+
user-select: text;
|
|
456
|
+
}
|
|
457
|
+
&-toggle-expand-btn {
|
|
458
|
+
margin-left: 4px;
|
|
459
|
+
color: var(--text-color-fourth);
|
|
460
|
+
font-size: 12px;
|
|
461
|
+
cursor: pointer;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
&-step-item {
|
|
465
|
+
position: relative;
|
|
466
|
+
margin: 2px 0 2px 7px;
|
|
467
|
+
padding: 2px 0 8px 18px;
|
|
468
|
+
border-left: 1px solid var(--green);
|
|
469
|
+
overflow: auto;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
&-export-data {
|
|
473
|
+
margin-left: 12px;
|
|
474
|
+
width: fit-content;
|
|
475
|
+
font-weight: normal;
|
|
476
|
+
color: var(--text-color-secondary);
|
|
477
|
+
font-size: 13px !important;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.@{filter-item-prefix-cls} {
|
|
482
|
+
display: flex;
|
|
483
|
+
align-items: center;
|
|
484
|
+
flex-wrap: wrap;
|
|
485
|
+
row-gap: 6px;
|
|
486
|
+
font-weight: 500;
|
|
487
|
+
|
|
488
|
+
&-filter-name {
|
|
489
|
+
color: var(--text-color-secondary);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
&-select-control {
|
|
493
|
+
min-width: 120px;
|
|
494
|
+
border-radius: 6px;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
&-operator-control {
|
|
498
|
+
min-width: 80px;
|
|
499
|
+
border-radius: 6px;
|
|
500
|
+
margin-right: 8px;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
&-input-number-control {
|
|
504
|
+
min-width: 100px;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
&-switch-entity-tip {
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
column-gap: 6px;
|
|
511
|
+
margin-left: 4px;
|
|
512
|
+
color: var(--text-color-fourth);
|
|
513
|
+
font-size: 13px;
|
|
514
|
+
font-weight: normal;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.ant-select-selector,
|
|
518
|
+
.ant-input-number-input {
|
|
519
|
+
background-color: #f5f8fb !important;
|
|
520
|
+
border-color: #ececec !important;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.ant-select-selection-item,
|
|
524
|
+
.ant-input-number-input {
|
|
525
|
+
color: var(--chat-blue);
|
|
526
|
+
font-weight: 500;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.ant-select-multiple .ant-select-selection-item {
|
|
530
|
+
background-color: var(--light-blue-background);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
&-filter-value {
|
|
534
|
+
color: var(--chat-blue);
|
|
535
|
+
font-weight: 500;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.@{sql-item-prefix-cls} {
|
|
540
|
+
position: relative;
|
|
541
|
+
margin: 2px 0 2px 7px;
|
|
542
|
+
padding: 2px 0 8px 18px;
|
|
543
|
+
border-left: 1px solid var(--green);
|
|
544
|
+
overflow: auto;
|
|
545
|
+
|
|
546
|
+
&-toggle-expand-btn {
|
|
547
|
+
color: var(--text-color-fourth);
|
|
548
|
+
font-size: 12px;
|
|
549
|
+
margin-right: 10px;
|
|
550
|
+
cursor: pointer;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
&-code {
|
|
554
|
+
margin-top: 10px !important;
|
|
555
|
+
padding: 6px 14px 8px !important;
|
|
556
|
+
border: 1px solid var(--border-color-base) !important;
|
|
557
|
+
border-radius: 4px !important;
|
|
558
|
+
background: #f5f8fb !important;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
&-copy-btn {
|
|
562
|
+
position: absolute;
|
|
563
|
+
top: 24px;
|
|
564
|
+
right: 20px;
|
|
565
|
+
background: transparent !important;
|
|
566
|
+
border: 0 !important;
|
|
567
|
+
color: var(--chat-blue);
|
|
568
|
+
cursor: pointer;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
&-schema-row {
|
|
572
|
+
display: flex;
|
|
573
|
+
margin-top: 10px;
|
|
574
|
+
|
|
575
|
+
&:first-child {
|
|
576
|
+
margin-top: 0;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
&-schema-title {
|
|
581
|
+
width: 50px;
|
|
582
|
+
color: var(--text-color);
|
|
583
|
+
font-weight: 500;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
&-schema-content {
|
|
587
|
+
flex: 1;
|
|
588
|
+
color: var(--text-color);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
&-few-shot-item {
|
|
592
|
+
margin-top: 10px;
|
|
593
|
+
|
|
594
|
+
&:first-child {
|
|
595
|
+
margin-top: 4px;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
&-few-shot-title {
|
|
600
|
+
color: var(--text-color);
|
|
601
|
+
font-weight: 500;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
&-few-shot-content {
|
|
605
|
+
margin-top: 8px;
|
|
606
|
+
display: flex;
|
|
607
|
+
flex-direction: column;
|
|
608
|
+
row-gap: 2px;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
&-few-shot-content-item {
|
|
612
|
+
display: flex;
|
|
613
|
+
align-items: baseline;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
&-few-shot-content-title {
|
|
617
|
+
width: 50px;
|
|
618
|
+
color: var(--text-color);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
&-few-shot-content-text {
|
|
622
|
+
line-height: 24px;
|
|
623
|
+
color: var(--text-color-secondary);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
&-few-shot-code {
|
|
627
|
+
padding: 0 !important;
|
|
628
|
+
background-color: transparent !important;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
&-export-log {
|
|
632
|
+
margin-left: 20px;
|
|
633
|
+
width: fit-content;
|
|
634
|
+
font-weight: normal;
|
|
635
|
+
color: var(--text-color-secondary);
|
|
636
|
+
font-size: 13px !important;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.@{sql-item-prefix-cls}-copilot {
|
|
641
|
+
width: 700px;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.@{similar-questions-prefix-cls} {
|
|
645
|
+
position: relative;
|
|
646
|
+
margin: 2px 0 2px 7px;
|
|
647
|
+
padding: 2px 0 8px 18px;
|
|
648
|
+
overflow: auto;
|
|
649
|
+
|
|
650
|
+
&-toggle-expand-btn {
|
|
651
|
+
margin-left: 4px;
|
|
652
|
+
color: var(--text-color-fourth);
|
|
653
|
+
font-size: 12px;
|
|
654
|
+
cursor: pointer;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
&-content {
|
|
658
|
+
display: flex;
|
|
659
|
+
flex-direction: column;
|
|
660
|
+
row-gap: 8px;
|
|
661
|
+
margin-top: 6px;
|
|
662
|
+
margin-bottom: 2px;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
&-question {
|
|
666
|
+
width: fit-content;
|
|
667
|
+
color: var(--chat-blue);
|
|
668
|
+
cursor: pointer;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { PREFIX_CLS } from '../../../common/constants';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
model: string;
|
|
5
|
+
onApplyAuth?: (model: string) => void;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const ApplyAuth: React.FC<Props> = ({ model, onApplyAuth }) => {
|
|
9
|
+
const prefixCls = `${PREFIX_CLS}-apply-auth`;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div className={prefixCls}>
|
|
13
|
+
暂无权限,
|
|
14
|
+
{onApplyAuth ? (
|
|
15
|
+
<span
|
|
16
|
+
className={`${prefixCls}-apply`}
|
|
17
|
+
onClick={() => {
|
|
18
|
+
onApplyAuth(model);
|
|
19
|
+
}}
|
|
20
|
+
>
|
|
21
|
+
点击申请
|
|
22
|
+
</span>
|
|
23
|
+
) : (
|
|
24
|
+
'请联系管理员申请权限'
|
|
25
|
+
)}
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default ApplyAuth;
|