funda-ui 4.6.222 → 4.6.333

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/Chatbox/index.css CHANGED
@@ -198,6 +198,7 @@
198
198
  margin-bottom: 10px;
199
199
  font-size: 13px;
200
200
  margin-right: 0;
201
+ /* copy button */
201
202
  }
202
203
  .custom-chatbox-container .messages img, .custom-chatbox-container .messages svg, .custom-chatbox-container .messages video, .custom-chatbox-container .messages canvas, .custom-chatbox-container .messages audio, .custom-chatbox-container .messages iframe, .custom-chatbox-container .messages embed, .custom-chatbox-container .messages object {
203
204
  display: inline;
@@ -208,10 +209,11 @@
208
209
  .custom-chatbox-container .messages::-webkit-scrollbar-thumb {
209
210
  background: rgba(0, 0, 0, 0.2);
210
211
  }
211
- .custom-chatbox-container .messages > div {
212
+ .custom-chatbox-container .messages > div:not(.newchat-btn) {
212
213
  margin: 5px 0;
213
214
  padding: 3px 5px;
214
215
  border-radius: 0.35rem;
216
+ position: relative;
215
217
  }
216
218
  .custom-chatbox-container .messages p {
217
219
  margin: 3px 0;
@@ -284,6 +286,21 @@
284
286
  background: transparent;
285
287
  padding-top: 0;
286
288
  }
289
+ .custom-chatbox-container .messages .copy-btn {
290
+ position: absolute;
291
+ left: calc(var(--custom-chatbox-content-w) - 0.7rem);
292
+ bottom: 0.5rem;
293
+ z-index: 1;
294
+ background: transparent;
295
+ border: none;
296
+ padding: 4px;
297
+ cursor: pointer;
298
+ opacity: 0.6;
299
+ transition: opacity 0.2s;
300
+ }
301
+ .custom-chatbox-container .messages .copy-btn:hover {
302
+ opacity: 1;
303
+ }
287
304
  .custom-chatbox-container .msg-dotted-loader-container {
288
305
  font-weight: normal;
289
306
  transform: translateY(-5px);
@@ -72,10 +72,14 @@ export declare type ChatboxProps = {
72
72
  newChatButton?: FloatingButton;
73
73
  customMethods?: CustomMethod[];
74
74
  defaultQuestions?: QuestionData;
75
+ showCopyBtn?: boolean;
76
+ autoCopyReply?: boolean;
75
77
  customRequest?: CustomRequestFunction;
76
78
  renderParser?: (input: string) => Promise<string>;
77
79
  requestBodyFormatter?: (body: any, contextData: Record<string, any>, conversationHistory: MessageDetail[]) => Promise<Record<string, any>>;
80
+ copiedContentFormatter?: (string: string) => string;
78
81
  nameFormatter?: (input: string) => string;
82
+ onCopyCallback?: (res: Record<string, any>) => void;
79
83
  onQuestionClick?: (text: string, methods: Record<string, Function>) => void;
80
84
  onInputChange?: (controlRef: React.RefObject<any>, val: string) => any;
81
85
  onInputCallback?: (input: string) => Promise<string>;