funda-ui 4.6.388 → 4.6.399
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 +5 -3
- package/Chatbox/index.d.ts +1 -1
- package/Chatbox/index.js +1 -1
- package/lib/cjs/Chatbox/index.d.ts +1 -1
- package/lib/cjs/Chatbox/index.js +1 -1
- package/lib/css/Chatbox/index.css +5 -3
- package/lib/esm/Chatbox/index.scss +8 -5
- package/lib/esm/Chatbox/index.tsx +14 -6
- package/lib/esm/Textarea/index.tsx +1 -0
- package/package.json +1 -1
package/Chatbox/index.css
CHANGED
|
@@ -140,6 +140,8 @@
|
|
|
140
140
|
--custom-balloon-text-color: #fff;
|
|
141
141
|
--custom-balloon-font-size: 12px;
|
|
142
142
|
--custom-balloon-move: 4px;
|
|
143
|
+
--custom-toolkit-select-options-container-min-w: 135px;
|
|
144
|
+
--custom-toolkit-select-options-container-max-h: 300px;
|
|
143
145
|
min-width: var(--custom-chatbox-w);
|
|
144
146
|
max-width: var(--custom-chatbox-w);
|
|
145
147
|
margin: auto;
|
|
@@ -539,7 +541,7 @@
|
|
|
539
541
|
.custom-chatbox-container .toolkit-select-wrapper .toolkit-select-options-container {
|
|
540
542
|
z-index: 1000;
|
|
541
543
|
width: 100%;
|
|
542
|
-
min-width:
|
|
544
|
+
min-width: var(--custom-toolkit-select-options-container-min-w);
|
|
543
545
|
transform: translateY(-100%);
|
|
544
546
|
}
|
|
545
547
|
.custom-chatbox-container .toolkit-select-wrapper .toolkit-select-options {
|
|
@@ -548,8 +550,8 @@
|
|
|
548
550
|
border-radius: 4px;
|
|
549
551
|
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
|
550
552
|
margin-bottom: 10px;
|
|
551
|
-
max-height:
|
|
552
|
-
min-width:
|
|
553
|
+
max-height: var(--custom-toolkit-select-options-container-max-h);
|
|
554
|
+
min-width: var(--custom-toolkit-select-options-container-min-w);
|
|
553
555
|
overflow-y: auto;
|
|
554
556
|
animation: dropupAnimation 0.2s ease;
|
|
555
557
|
position: absolute;
|
package/Chatbox/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare type CustomRequestResponse = {
|
|
|
40
40
|
content: string | Response | null;
|
|
41
41
|
isStream: boolean;
|
|
42
42
|
};
|
|
43
|
-
export declare type CustomRequestFunction = (message: string, config: CustomRequestConfig) => Promise<CustomRequestResponse>;
|
|
43
|
+
export declare type CustomRequestFunction = (message: string, config: CustomRequestConfig, customMethods: CustomMethod[], conversationHistory: MessageDetail[]) => Promise<CustomRequestResponse>;
|
|
44
44
|
export declare type ChatboxProps = {
|
|
45
45
|
debug?: boolean;
|
|
46
46
|
defaultRows?: number;
|
package/Chatbox/index.js
CHANGED
|
@@ -5277,7 +5277,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
5277
5277
|
requestBody: requestBodyRes,
|
|
5278
5278
|
apiUrl: args().requestApiUrl || '',
|
|
5279
5279
|
headers: args().headerConfigRes
|
|
5280
|
-
});
|
|
5280
|
+
}, customMethodsRef.current, conversationHistory.current);
|
|
5281
5281
|
case 13:
|
|
5282
5282
|
customResponse = _context7.sent;
|
|
5283
5283
|
content = customResponse.content, isStream = customResponse.isStream;
|
|
@@ -40,7 +40,7 @@ export declare type CustomRequestResponse = {
|
|
|
40
40
|
content: string | Response | null;
|
|
41
41
|
isStream: boolean;
|
|
42
42
|
};
|
|
43
|
-
export declare type CustomRequestFunction = (message: string, config: CustomRequestConfig) => Promise<CustomRequestResponse>;
|
|
43
|
+
export declare type CustomRequestFunction = (message: string, config: CustomRequestConfig, customMethods: CustomMethod[], conversationHistory: MessageDetail[]) => Promise<CustomRequestResponse>;
|
|
44
44
|
export declare type ChatboxProps = {
|
|
45
45
|
debug?: boolean;
|
|
46
46
|
defaultRows?: number;
|
package/lib/cjs/Chatbox/index.js
CHANGED
|
@@ -5277,7 +5277,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
5277
5277
|
requestBody: requestBodyRes,
|
|
5278
5278
|
apiUrl: args().requestApiUrl || '',
|
|
5279
5279
|
headers: args().headerConfigRes
|
|
5280
|
-
});
|
|
5280
|
+
}, customMethodsRef.current, conversationHistory.current);
|
|
5281
5281
|
case 13:
|
|
5282
5282
|
customResponse = _context7.sent;
|
|
5283
5283
|
content = customResponse.content, isStream = customResponse.isStream;
|
|
@@ -140,6 +140,8 @@
|
|
|
140
140
|
--custom-balloon-text-color: #fff;
|
|
141
141
|
--custom-balloon-font-size: 12px;
|
|
142
142
|
--custom-balloon-move: 4px;
|
|
143
|
+
--custom-toolkit-select-options-container-min-w: 135px;
|
|
144
|
+
--custom-toolkit-select-options-container-max-h: 300px;
|
|
143
145
|
min-width: var(--custom-chatbox-w);
|
|
144
146
|
max-width: var(--custom-chatbox-w);
|
|
145
147
|
margin: auto;
|
|
@@ -539,7 +541,7 @@
|
|
|
539
541
|
.custom-chatbox-container .toolkit-select-wrapper .toolkit-select-options-container {
|
|
540
542
|
z-index: 1000;
|
|
541
543
|
width: 100%;
|
|
542
|
-
min-width:
|
|
544
|
+
min-width: var(--custom-toolkit-select-options-container-min-w);
|
|
543
545
|
transform: translateY(-100%);
|
|
544
546
|
}
|
|
545
547
|
.custom-chatbox-container .toolkit-select-wrapper .toolkit-select-options {
|
|
@@ -548,8 +550,8 @@
|
|
|
548
550
|
border-radius: 4px;
|
|
549
551
|
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
|
550
552
|
margin-bottom: 10px;
|
|
551
|
-
max-height:
|
|
552
|
-
min-width:
|
|
553
|
+
max-height: var(--custom-toolkit-select-options-container-max-h);
|
|
554
|
+
min-width: var(--custom-toolkit-select-options-container-min-w);
|
|
553
555
|
overflow-y: auto;
|
|
554
556
|
animation: dropupAnimation 0.2s ease;
|
|
555
557
|
position: absolute;
|
|
@@ -171,6 +171,9 @@
|
|
|
171
171
|
--custom-balloon-text-color: #fff;
|
|
172
172
|
--custom-balloon-font-size: 12px;
|
|
173
173
|
--custom-balloon-move: 4px;
|
|
174
|
+
--custom-toolkit-select-options-container-min-w: 135px;
|
|
175
|
+
--custom-toolkit-select-options-container-max-h: 300px;
|
|
176
|
+
|
|
174
177
|
|
|
175
178
|
|
|
176
179
|
min-width: var(--custom-chatbox-w);
|
|
@@ -662,22 +665,22 @@
|
|
|
662
665
|
.toolkit-select-arrow.active {
|
|
663
666
|
transform: rotate(180deg);
|
|
664
667
|
}
|
|
665
|
-
|
|
668
|
+
|
|
666
669
|
.toolkit-select-options-container {
|
|
667
670
|
z-index: 1000;
|
|
668
671
|
width: 100%;
|
|
669
|
-
min-width:
|
|
672
|
+
min-width: var(--custom-toolkit-select-options-container-min-w);
|
|
670
673
|
transform: translateY(-100%);
|
|
671
674
|
}
|
|
672
|
-
|
|
675
|
+
|
|
673
676
|
.toolkit-select-options {
|
|
674
677
|
background-color: var(--custom-chatbox-toolkit-opt-color);
|
|
675
678
|
border: 1px solid var(--custom-chatbox-toolkit-opt-border-color);
|
|
676
679
|
border-radius: 4px;
|
|
677
680
|
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
|
|
678
681
|
margin-bottom: 10px;
|
|
679
|
-
max-height:
|
|
680
|
-
min-width:
|
|
682
|
+
max-height: var(--custom-toolkit-select-options-container-max-h);
|
|
683
|
+
min-width: var(--custom-toolkit-select-options-container-min-w);
|
|
681
684
|
overflow-y: auto;
|
|
682
685
|
animation: dropupAnimation 0.2s ease;
|
|
683
686
|
|
|
@@ -13,6 +13,7 @@ import { htmlEncode } from 'funda-utils/dist/cjs/sanitize';
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
// loader
|
|
17
18
|
import PureLoader from './PureLoader';
|
|
18
19
|
import TypingEffect from "./TypingEffect";
|
|
@@ -80,7 +81,9 @@ export type CustomRequestResponse = {
|
|
|
80
81
|
|
|
81
82
|
export type CustomRequestFunction = (
|
|
82
83
|
message: string,
|
|
83
|
-
config: CustomRequestConfig
|
|
84
|
+
config: CustomRequestConfig,
|
|
85
|
+
customMethods: CustomMethod[],
|
|
86
|
+
conversationHistory: MessageDetail[],
|
|
84
87
|
) => Promise<CustomRequestResponse>;
|
|
85
88
|
|
|
86
89
|
|
|
@@ -1041,11 +1044,16 @@ const Chatbox = (props: ChatboxProps) => {
|
|
|
1041
1044
|
// Update stream mode
|
|
1042
1045
|
setEnableStreamMode(false);
|
|
1043
1046
|
|
|
1044
|
-
let customResponse: any = await args().customRequest(
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1047
|
+
let customResponse: any = await args().customRequest(
|
|
1048
|
+
msg,
|
|
1049
|
+
{
|
|
1050
|
+
requestBody: requestBodyRes,
|
|
1051
|
+
apiUrl: args().requestApiUrl || '',
|
|
1052
|
+
headers: args().headerConfigRes
|
|
1053
|
+
},
|
|
1054
|
+
customMethodsRef.current,
|
|
1055
|
+
conversationHistory.current
|
|
1056
|
+
);
|
|
1049
1057
|
|
|
1050
1058
|
const { content, isStream } = customResponse;
|
|
1051
1059
|
let contentRes: any = content;
|
|
@@ -7,6 +7,7 @@ import { clsWrite, combinedCls } from 'funda-utils/dist/cjs/cls';
|
|
|
7
7
|
import { actualPropertyValue, getTextTop } from 'funda-utils/dist/cjs/inputsCalculation';
|
|
8
8
|
import useDebounce from 'funda-utils/dist/cjs/useDebounce';
|
|
9
9
|
|
|
10
|
+
|
|
10
11
|
export type TextareaProps = {
|
|
11
12
|
contentRef?: React.ForwardedRef<any>; // could use "Array" on contentRef.current, such as contentRef.current[0], contentRef.current[1]
|
|
12
13
|
wrapperClassName?: string;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "UIUX Lab",
|
|
3
3
|
"email": "uiuxlab@gmail.com",
|
|
4
4
|
"name": "funda-ui",
|
|
5
|
-
"version": "4.6.
|
|
5
|
+
"version": "4.6.399",
|
|
6
6
|
"description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|