@asgard-js/react 0.0.34 → 0.0.37
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgard-js/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"vitest": "^1.6.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@asgard-js/core": "^0.0.
|
|
57
|
+
"@asgard-js/core": "^0.0.37",
|
|
58
58
|
"react": "^18.0.0",
|
|
59
59
|
"react-dom": "^18.0.0"
|
|
60
60
|
},
|
|
@@ -14,20 +14,16 @@ import SendSvg from '../../../icons/send.svg?react';
|
|
|
14
14
|
import { SpeechInputButton } from './speech-input-button';
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import { useAsgardThemeContext } from '../../../context/asgard-theme-context';
|
|
17
|
-
import { useAsgardAppInitializationContext } from '../../../context/asgard-app-initialization-context';
|
|
18
17
|
|
|
19
18
|
export function ChatbotFooter(): ReactNode {
|
|
20
19
|
const { sendMessage, isConnecting } = useAsgardContext();
|
|
21
20
|
|
|
22
21
|
const { chatbot } = useAsgardThemeContext();
|
|
23
|
-
const { data: { annotations } } = useAsgardAppInitializationContext();
|
|
24
22
|
|
|
25
23
|
const [value, setValue] = useState('');
|
|
26
24
|
const [isComposing, setIsComposing] = useState(false);
|
|
27
25
|
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
|
28
26
|
|
|
29
|
-
const inputPlaceholder = annotations?.embedConfig?.inputPlaceholder || 'Enter message';
|
|
30
|
-
|
|
31
27
|
const disabled = useMemo(
|
|
32
28
|
() => isConnecting || !value.trim(),
|
|
33
29
|
[isConnecting, value]
|
|
@@ -110,7 +106,7 @@ export function ChatbotFooter(): ReactNode {
|
|
|
110
106
|
disabled={isConnecting}
|
|
111
107
|
cols={40}
|
|
112
108
|
value={value}
|
|
113
|
-
placeholder=
|
|
109
|
+
placeholder="Enter message"
|
|
114
110
|
onChange={onChange}
|
|
115
111
|
onKeyDown={onKeyDown}
|
|
116
112
|
onCompositionStart={() => setIsComposing(true)}
|