odaptos_design_system 1.4.115 → 1.4.117
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 +3 -1
- package/dist/Interviews/ControlsBar.d.ts +2 -2
- package/dist/Interviews/Task.d.ts +3 -1
- package/dist/odaptos_design_system.cjs.development.js +42 -18
- 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 +42 -18
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Interviews/Chat.modules.scss +4 -4
- package/src/Interviews/Chat.tsx +138 -118
- package/src/Interviews/ControlsBar.tsx +4 -4
- package/src/Interviews/Task.tsx +10 -1
|
@@ -2,6 +2,7 @@ import React, { HTMLAttributes } from 'react';
|
|
|
2
2
|
interface TaskItem {
|
|
3
3
|
_id: string;
|
|
4
4
|
description: string;
|
|
5
|
+
url: string;
|
|
5
6
|
notes: string;
|
|
6
7
|
type: 'task' | 'question';
|
|
7
8
|
timedTask: boolean;
|
|
@@ -31,6 +32,7 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
32
|
isChatDisplay?: boolean;
|
|
32
33
|
isInterviewer?: boolean;
|
|
33
34
|
messages: any[];
|
|
35
|
+
idsTasksAlreadySent: string[];
|
|
34
36
|
}
|
|
35
|
-
export declare const Chat: ({ goBackText, goBack, chatTitle, welcomeTitle, welcomeDescription, startInterviewTitle, startInterviewBtnTitle, startInterviewIcon, startInterview, tasks, sendTask, currentTask, chatInputPlaceholder, chatInputValue, chatInputonChange, sendMessage, className, isTaskMode, isInterviewer, messages, ...props }: ChatProps) => React.JSX.Element;
|
|
37
|
+
export declare const Chat: ({ goBackText, goBack, chatTitle, welcomeTitle, welcomeDescription, startInterviewTitle, startInterviewBtnTitle, startInterviewIcon, startInterview, tasks, sendTask, currentTask, chatInputPlaceholder, chatInputValue, chatInputonChange, sendMessage, className, isTaskMode, isInterviewer, messages, idsTasksAlreadySent, ...props }: ChatProps) => React.JSX.Element;
|
|
36
38
|
export {};
|
|
@@ -2,7 +2,6 @@ import React, { HTMLAttributes } from 'react';
|
|
|
2
2
|
export interface ControlsBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
className?: string;
|
|
4
4
|
isInterviewer?: boolean;
|
|
5
|
-
isScreenShare?: boolean;
|
|
6
5
|
endInterview?: () => void;
|
|
7
6
|
enableScreenSharing?: () => void;
|
|
8
7
|
enableMicrophone?: () => void;
|
|
@@ -18,9 +17,10 @@ export interface ControlsBarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
17
|
isNewTask?: boolean;
|
|
19
18
|
isNewMessage?: boolean;
|
|
20
19
|
isMicrophoneActive?: boolean;
|
|
20
|
+
screenShareText?: string;
|
|
21
21
|
isCameraActive?: boolean;
|
|
22
22
|
isRecording?: boolean;
|
|
23
23
|
disabledRecording?: boolean;
|
|
24
24
|
disabledEndInterview?: boolean;
|
|
25
25
|
}
|
|
26
|
-
export declare const ControlsBar: ({ className, isInterviewer,
|
|
26
|
+
export declare const ControlsBar: ({ className, isInterviewer, endInterview, enableScreenSharing, enableMicrophone, muteMicrophone, enableCamera, muteCamera, displayChat, displayTasks, startRecording, stopRecording, isChatOpen, areTasksOpen, isNewTask, isNewMessage, isMicrophoneActive, isCameraActive, isRecording, screenShareText, disabledRecording, disabledEndInterview, ...props }: ControlsBarProps) => React.JSX.Element;
|
|
@@ -2,6 +2,7 @@ import React, { HTMLAttributes } from 'react';
|
|
|
2
2
|
interface TaskItem {
|
|
3
3
|
_id: string;
|
|
4
4
|
description: string;
|
|
5
|
+
url: string;
|
|
5
6
|
notes: string;
|
|
6
7
|
type: 'task' | 'question';
|
|
7
8
|
timedTask: boolean;
|
|
@@ -13,6 +14,7 @@ export interface TaskProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
14
|
className?: string;
|
|
14
15
|
taskNumber: string;
|
|
15
16
|
taskTitle: string;
|
|
17
|
+
url?: string;
|
|
16
18
|
notes?: string;
|
|
17
19
|
state: 'idle' | 'active' | 'disabled';
|
|
18
20
|
isDone: boolean;
|
|
@@ -28,5 +30,5 @@ export interface TaskProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
28
30
|
mainActionText?: string;
|
|
29
31
|
mainAction?: () => void;
|
|
30
32
|
}
|
|
31
|
-
export declare const Task: ({ taskNumber, taskTitle, notes, className, taskIndex, task, sendTask, state, isDone, iconAction1, iconAction2, iconAction3, action1, action2, action3, mainActionText, mainAction, ...props }: TaskProps) => React.JSX.Element;
|
|
33
|
+
export declare const Task: ({ taskNumber, taskTitle, notes, url, className, taskIndex, task, sendTask, state, isDone, iconAction1, iconAction2, iconAction3, action1, action2, action3, mainActionText, mainAction, ...props }: TaskProps) => React.JSX.Element;
|
|
32
34
|
export {};
|
|
@@ -7859,7 +7859,6 @@ styleInject(css_248z$a);
|
|
|
7859
7859
|
const ControlsBar = ({
|
|
7860
7860
|
className,
|
|
7861
7861
|
isInterviewer,
|
|
7862
|
-
isScreenShare,
|
|
7863
7862
|
endInterview,
|
|
7864
7863
|
enableScreenSharing,
|
|
7865
7864
|
enableMicrophone,
|
|
@@ -7877,6 +7876,7 @@ const ControlsBar = ({
|
|
|
7877
7876
|
isMicrophoneActive,
|
|
7878
7877
|
isCameraActive,
|
|
7879
7878
|
isRecording,
|
|
7879
|
+
screenShareText,
|
|
7880
7880
|
disabledRecording,
|
|
7881
7881
|
disabledEndInterview,
|
|
7882
7882
|
...props
|
|
@@ -7913,8 +7913,8 @@ const ControlsBar = ({
|
|
|
7913
7913
|
disabled: disabledEndInterview,
|
|
7914
7914
|
onClick: () => endInterview(),
|
|
7915
7915
|
icon: /*#__PURE__*/React__default.createElement(HangUpIcon, null)
|
|
7916
|
-
}), !isInterviewer &&
|
|
7917
|
-
text:
|
|
7916
|
+
}), !isInterviewer && screenShareText && enableScreenSharing && /*#__PURE__*/React__default.createElement(InterviewButton, {
|
|
7917
|
+
text: screenShareText,
|
|
7918
7918
|
variant: "screenshare",
|
|
7919
7919
|
icon: /*#__PURE__*/React__default.createElement(TvFlatScreenIcon, null),
|
|
7920
7920
|
onClick: () => enableScreenSharing()
|
|
@@ -7953,7 +7953,7 @@ const ControlsBar = ({
|
|
|
7953
7953
|
}));
|
|
7954
7954
|
};
|
|
7955
7955
|
|
|
7956
|
-
var css_248z$b = ".Chat-modules_chatContainer__xzg50{align-items:flex-start;background:#fff;border-radius:.5rem;display:flex;flex-direction:column;gap:.5rem;height:100%;min-width:25rem;padding:1rem}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP{display:flex;flex-direction:column;gap:1rem;max-width:100%;width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh{display:flex;flex-direction:column;gap:1rem;max-height:70%;overflow-x:hidden;overflow-y:scroll}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_message_container__-ocjf{animation:Chat-modules_floatup__aU0gp .5s forwards;display:flex;flex-direction:row;gap:.5rem;justify-content:flex-end;margin:2rem 0;width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_message_container__-ocjf .Chat-modules_message__6y4CT p{margin-left:auto}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message__T2wQS{align-items:flex-end;background:var(--color-primary-100,#e5f1ff);border:1px solid var(--color-primary-200,#99c9ff);border-radius:.5rem 0 .5rem .5rem;display:flex;flex-direction:column;gap:.5rem;margin-left:auto;max-width:100%;padding:1rem;white-space:break-spaces;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message__T2wQS .Chat-modules_user_text__Mi5Mo{color:var(--Color-Neutral-Dark-Shades-950,#26292e);font-family:OpenSans;font-size:.875rem;font-style:normal;font-weight:400;line-height:1.225rem;margin:0}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message__T2wQS .Chat-modules_blue__JjGi-{color:#004799}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message_username__CpwdY{display:flex;margin-left:auto;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_indicator__p0Ehc{align-items:center;background:var(--color-gradients-003,linear-gradient(135deg,#07f 0,#9024f6 100%));border-radius:.5rem .5rem .5rem 0;display:flex;height:
|
|
7956
|
+
var css_248z$b = ".Chat-modules_chatContainer__xzg50{align-items:flex-start;background:#fff;border-radius:.5rem;display:flex;flex-direction:column;gap:.5rem;height:100%;min-width:25rem;padding:1rem}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP{display:flex;flex-direction:column;gap:1rem;max-width:100%;width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh{display:flex;flex-direction:column;gap:1rem;max-height:70%;overflow-x:hidden;overflow-y:scroll}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_message_container__-ocjf{animation:Chat-modules_floatup__aU0gp .5s forwards;display:flex;flex-direction:row;gap:.5rem;justify-content:flex-end;margin:2rem 0;width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_message_container__-ocjf .Chat-modules_message__6y4CT p{margin-left:auto}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message__T2wQS{align-items:flex-end;background:var(--color-primary-100,#e5f1ff);border:1px solid var(--color-primary-200,#99c9ff);border-radius:.5rem 0 .5rem .5rem;display:flex;flex-direction:column;gap:.5rem;margin-left:auto;max-width:100%;padding:1rem;white-space:break-spaces;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message__T2wQS .Chat-modules_user_text__Mi5Mo{color:var(--Color-Neutral-Dark-Shades-950,#26292e);font-family:OpenSans;font-size:.875rem;font-style:normal;font-weight:400;line-height:1.225rem;margin:0}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message__T2wQS .Chat-modules_blue__JjGi-{color:#004799}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_text_message_username__CpwdY{display:flex;margin-left:auto;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_indicator__p0Ehc{align-items:center;background:var(--color-gradients-003,linear-gradient(135deg,#07f 0,#9024f6 100%));border-radius:.5rem .5rem .5rem 0;display:flex;height:2.75rem;justify-content:center;padding:.625rem .5625rem;width:2.75rem}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_user_indicator__p0Ehc p{padding:0}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_message_container_chatbot__s2mU6{animation:Chat-modules_floatup__aU0gp .5s forwards;display:flex;flex-direction:row;gap:.5rem;margin:auto 0 .5rem;width:100%}@keyframes Chat-modules_floatup__aU0gp{0%{opacity:0;transform:translateY(.875rem)}to{opacity:1;transform:translateY(0)}}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_bot_indicator__5-WNz{align-items:center;background:var(--color-gradients-003,linear-gradient(135deg,#07f 0,#9024f6 100%));border-radius:.5rem .5rem 0 .5rem;display:flex;height:2.75rem;justify-content:center;padding:.625rem .5625rem;width:2.75rem}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_bot_indicator__5-WNz p{padding:0}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_message_chatbot__X-4XW{display:flex;flex-direction:column;gap:.25rem;width:100%}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_message_chatbot__X-4XW .Chat-modules_user_text__Mi5Mo{color:var(--Color-Neutral-Dark-Shades-950,#26292e);font-family:OpenSans;font-size:.875rem;font-style:normal;font-weight:400;line-height:1.225rem;margin:0}.Chat-modules_chatContainer__xzg50 .Chat-modules_scrolling_content__urvdP .Chat-modules_tasks_container__Mg9Oh .Chat-modules_text_message__suuTz{align-items:flex-start;background:var(--color-neutral-basics-white,#fff);border:1px solid var(--color-neutral-clear-shades-200,#e1e1e2);border-radius:0 .5rem .5rem .5rem;display:flex;flex-direction:column;gap:.5rem;max-width:100%;padding:1rem;position:relative;white-space:break-spaces;width:-moz-fit-content;width:fit-content}.Chat-modules_no_scrollbar__Ia2bX{-ms-overflow-style:none;scrollbar-width:none}.Chat-modules_no_scrollbar__Ia2bX::-webkit-scrollbar{display:none}";
|
|
7957
7957
|
var styles$b = {"chatContainer":"Chat-modules_chatContainer__xzg50","scrolling_content":"Chat-modules_scrolling_content__urvdP","tasks_container":"Chat-modules_tasks_container__Mg9Oh","message_chatbot":"Chat-modules_message_chatbot__X-4XW","user_message_container":"Chat-modules_user_message_container__-ocjf","floatup":"Chat-modules_floatup__aU0gp","message":"Chat-modules_message__6y4CT","user_text_message":"Chat-modules_user_text_message__T2wQS","user_text":"Chat-modules_user_text__Mi5Mo","blue":"Chat-modules_blue__JjGi-","user_text_message_username":"Chat-modules_user_text_message_username__CpwdY","user_indicator":"Chat-modules_user_indicator__p0Ehc","message_container_chatbot":"Chat-modules_message_container_chatbot__s2mU6","bot_indicator":"Chat-modules_bot_indicator__5-WNz","text_message":"Chat-modules_text_message__suuTz","no_scrollbar":"Chat-modules_no_scrollbar__Ia2bX"};
|
|
7958
7958
|
styleInject(css_248z$b);
|
|
7959
7959
|
|
|
@@ -7978,6 +7978,7 @@ const Chat = ({
|
|
|
7978
7978
|
isTaskMode,
|
|
7979
7979
|
isInterviewer,
|
|
7980
7980
|
messages,
|
|
7981
|
+
idsTasksAlreadySent,
|
|
7981
7982
|
...props
|
|
7982
7983
|
}) => {
|
|
7983
7984
|
const detectAndWrapLinks = text => {
|
|
@@ -8024,25 +8025,44 @@ const Chat = ({
|
|
|
8024
8025
|
onClick: startInterview
|
|
8025
8026
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8026
8027
|
className: `${styles$b.tasks_container} ${styles$b.no_scrollbar}`
|
|
8027
|
-
}, isTaskMode ? tasks.map((task, index) => {
|
|
8028
|
-
const currentTaskIndex = tasks.findIndex(task => task._id === currentTask._id);
|
|
8029
|
-
const isCompletedTask = index < currentTaskIndex;
|
|
8028
|
+
}, isTaskMode ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, tasks.filter(task => idsTasksAlreadySent.includes(task._id)).map((task, index) => {
|
|
8030
8029
|
return /*#__PURE__*/React__default.createElement(Task, {
|
|
8031
8030
|
key: task._id,
|
|
8032
8031
|
taskNumber: `${task.type === 'task' ? 'Task' : 'Question'} #${index + 1}`,
|
|
8033
8032
|
taskTitle: task.description,
|
|
8033
|
+
url: task.url,
|
|
8034
8034
|
notes: task.notes,
|
|
8035
|
-
state:
|
|
8035
|
+
state: 'disabled',
|
|
8036
8036
|
taskIndex: index,
|
|
8037
8037
|
task: task,
|
|
8038
8038
|
sendTask: sendTask,
|
|
8039
|
-
isDone:
|
|
8039
|
+
isDone: true
|
|
8040
8040
|
});
|
|
8041
|
-
})
|
|
8041
|
+
}), tasks.filter(task => !idsTasksAlreadySent.includes(task._id)).map((task, index) => {
|
|
8042
|
+
return /*#__PURE__*/React__default.createElement(Task, {
|
|
8043
|
+
key: task._id,
|
|
8044
|
+
taskNumber: `${task.type === 'task' ? 'Task' : 'Question'} #${index + 1}`,
|
|
8045
|
+
taskTitle: task.description,
|
|
8046
|
+
url: task.url,
|
|
8047
|
+
notes: task.notes,
|
|
8048
|
+
state: currentTask._id === task._id ? 'active' : 'idle',
|
|
8049
|
+
taskIndex: index,
|
|
8050
|
+
task: task,
|
|
8051
|
+
sendTask: sendTask,
|
|
8052
|
+
isDone: false
|
|
8053
|
+
});
|
|
8054
|
+
})) : messages && messages.map(message => {
|
|
8042
8055
|
if (message) {
|
|
8043
8056
|
if (message.from && message.from.identify === 'interviewer' && isInterviewer) return /*#__PURE__*/React__default.createElement("div", {
|
|
8044
8057
|
className: styles$b.user_message_container
|
|
8045
8058
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8059
|
+
className: styles$b.user_indicator
|
|
8060
|
+
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
8061
|
+
text: `${message.from.name.split(' ').map(n => n[0]).join('')}`,
|
|
8062
|
+
weight: "bold",
|
|
8063
|
+
color: "white",
|
|
8064
|
+
size: "sm"
|
|
8065
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8046
8066
|
className: styles$b.message_chatbot
|
|
8047
8067
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8048
8068
|
className: styles$b.user_text_message
|
|
@@ -8053,13 +8073,6 @@ const Chat = ({
|
|
|
8053
8073
|
size: "xs",
|
|
8054
8074
|
color: "grey",
|
|
8055
8075
|
className: styles$b.user_text_message_username
|
|
8056
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8057
|
-
className: styles$b.user_indicator
|
|
8058
|
-
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
8059
|
-
text: `${message.from.name.split(' ').map(n => n[0]).join('')}`,
|
|
8060
|
-
weight: "bold",
|
|
8061
|
-
color: "white",
|
|
8062
|
-
size: "sm"
|
|
8063
8076
|
})));else if (message.from && message.from.identify === 'interviewee' && !isInterviewer) return /*#__PURE__*/React__default.createElement("div", {
|
|
8064
8077
|
className: styles$b.user_message_container
|
|
8065
8078
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -8299,6 +8312,7 @@ const Task = ({
|
|
|
8299
8312
|
taskNumber,
|
|
8300
8313
|
taskTitle,
|
|
8301
8314
|
notes,
|
|
8315
|
+
url,
|
|
8302
8316
|
className,
|
|
8303
8317
|
taskIndex,
|
|
8304
8318
|
task,
|
|
@@ -8356,7 +8370,17 @@ const Task = ({
|
|
|
8356
8370
|
text: taskTitle,
|
|
8357
8371
|
size: "sm",
|
|
8358
8372
|
weight: "bold"
|
|
8359
|
-
}),
|
|
8373
|
+
}), url && /*#__PURE__*/React__default.createElement("div", {
|
|
8374
|
+
className: styles$i.notesContainer
|
|
8375
|
+
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
8376
|
+
text: "URL",
|
|
8377
|
+
size: "xs",
|
|
8378
|
+
italic: true
|
|
8379
|
+
}), /*#__PURE__*/React__default.createElement(Link, {
|
|
8380
|
+
text: url,
|
|
8381
|
+
link: url,
|
|
8382
|
+
size: "sm"
|
|
8383
|
+
})), notes && /*#__PURE__*/React__default.createElement("div", {
|
|
8360
8384
|
className: styles$i.notesContainer
|
|
8361
8385
|
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
8362
8386
|
text: "Notes",
|