odaptos_design_system 1.4.52 → 1.4.53
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/Interviews/Chat.d.ts +2 -1
- package/dist/Interviews/ChatInput.d.ts +2 -2
- package/dist/odaptos_design_system.cjs.development.js +14 -7
- package/dist/odaptos_design_system.cjs.development.js.map +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js +1 -1
- package/dist/odaptos_design_system.cjs.production.min.js.map +1 -1
- package/dist/odaptos_design_system.esm.js +14 -7
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Interviews/Chat.tsx +3 -0
- package/src/Interviews/ChatInput.tsx +11 -6
|
@@ -25,7 +25,8 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
chatInputPlaceholder?: string;
|
|
26
26
|
chatInputValue?: string;
|
|
27
27
|
chatInputonChange?: (message: string) => void;
|
|
28
|
+
sendMessage: () => void;
|
|
28
29
|
className?: string;
|
|
29
30
|
}
|
|
30
|
-
export declare const Chat: ({ goBackText, goBack, chatTitle, welcomeTitle, welcomeDescription, startInterviewTitle, startInterviewBtnTitle, startInterviewIcon, startInterview, tasks, sendTask, validateTask, currentTask, chatInputPlaceholder, chatInputValue, chatInputonChange, className, ...props }: ChatProps) => React.JSX.Element;
|
|
31
|
+
export declare const Chat: ({ goBackText, goBack, chatTitle, welcomeTitle, welcomeDescription, startInterviewTitle, startInterviewBtnTitle, startInterviewIcon, startInterview, tasks, sendTask, validateTask, currentTask, chatInputPlaceholder, chatInputValue, chatInputonChange, sendMessage, className, ...props }: ChatProps) => React.JSX.Element;
|
|
31
32
|
export {};
|
|
@@ -3,8 +3,8 @@ interface ChatInputProps {
|
|
|
3
3
|
className?: string;
|
|
4
4
|
value: string;
|
|
5
5
|
placeholder: string;
|
|
6
|
-
|
|
6
|
+
sendMessage?: () => void;
|
|
7
7
|
onChange: (event: any) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const ChatInput: ({ className, value, onChange,
|
|
9
|
+
export declare const ChatInput: ({ className, value, onChange, sendMessage, placeholder, }: ChatInputProps) => React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -5517,6 +5517,7 @@ const Chat = ({
|
|
|
5517
5517
|
chatInputPlaceholder,
|
|
5518
5518
|
chatInputValue,
|
|
5519
5519
|
chatInputonChange,
|
|
5520
|
+
sendMessage,
|
|
5520
5521
|
className,
|
|
5521
5522
|
...props
|
|
5522
5523
|
}) => {
|
|
@@ -5560,7 +5561,8 @@ const Chat = ({
|
|
|
5560
5561
|
})), chatInputPlaceholder && typeof chatInputValue === 'string' && chatInputonChange && /*#__PURE__*/React__default.createElement(ChatInput, {
|
|
5561
5562
|
placeholder: chatInputPlaceholder,
|
|
5562
5563
|
value: chatInputValue,
|
|
5563
|
-
onChange: chatInputonChange
|
|
5564
|
+
onChange: chatInputonChange,
|
|
5565
|
+
sendMessage: sendMessage
|
|
5564
5566
|
}));
|
|
5565
5567
|
};
|
|
5566
5568
|
|
|
@@ -5572,7 +5574,7 @@ const ChatInput = ({
|
|
|
5572
5574
|
className,
|
|
5573
5575
|
value,
|
|
5574
5576
|
onChange,
|
|
5575
|
-
|
|
5577
|
+
sendMessage,
|
|
5576
5578
|
placeholder
|
|
5577
5579
|
}) => {
|
|
5578
5580
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -5582,13 +5584,18 @@ const ChatInput = ({
|
|
|
5582
5584
|
value: value ? value : '',
|
|
5583
5585
|
onChange: onChange,
|
|
5584
5586
|
onKeyPress: e => {
|
|
5585
|
-
if (e.key === 'Enter' &&
|
|
5586
|
-
|
|
5587
|
+
if (e.key === 'Enter' && sendMessage) {
|
|
5588
|
+
sendMessage();
|
|
5587
5589
|
}
|
|
5588
5590
|
}
|
|
5589
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
5590
|
-
|
|
5591
|
-
|
|
5591
|
+
}), /*#__PURE__*/React__default.createElement(IconButton, {
|
|
5592
|
+
icon: /*#__PURE__*/React__default.createElement(SendEmailIcon, {
|
|
5593
|
+
fill: "#8A8B8E",
|
|
5594
|
+
stroke: "#8A8B8E"
|
|
5595
|
+
}),
|
|
5596
|
+
onClick: () => {
|
|
5597
|
+
if (sendMessage) sendMessage();
|
|
5598
|
+
}
|
|
5592
5599
|
}));
|
|
5593
5600
|
};
|
|
5594
5601
|
|