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.
@@ -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
- onKeyDown?: () => void;
6
+ sendMessage?: () => void;
7
7
  onChange: (event: any) => void;
8
8
  }
9
- export declare const ChatInput: ({ className, value, onChange, onKeyDown, placeholder, }: ChatInputProps) => React.JSX.Element;
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
- onKeyDown,
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' && onKeyDown) {
5586
- onKeyDown();
5587
+ if (e.key === 'Enter' && sendMessage) {
5588
+ sendMessage();
5587
5589
  }
5588
5590
  }
5589
- }), /*#__PURE__*/React__default.createElement(SendEmailIcon, {
5590
- fill: "#8A8B8E",
5591
- stroke: "#8A8B8E"
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