odaptos_design_system 2.0.44 → 2.0.45
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/Molecules/Interviews/Chat.d.ts +6 -3
- package/dist/Molecules/Interviews/Task.d.ts +3 -1
- package/dist/odaptos_design_system.cjs.development.js +18 -45
- 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 +18 -45
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Molecules/Interviews/Chat.modules.scss +0 -14
- package/src/Molecules/Interviews/Chat.tsx +16 -49
- package/src/Molecules/Interviews/Task.tsx +6 -2
|
@@ -5,6 +5,11 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
5
5
|
welcomeDescription?: string;
|
|
6
6
|
startInterviewTitle?: string;
|
|
7
7
|
startInterviewBtnTitle?: string;
|
|
8
|
+
scenarioText?: string;
|
|
9
|
+
taskText?: string;
|
|
10
|
+
questionText?: string;
|
|
11
|
+
noteText?: string;
|
|
12
|
+
actionText?: string;
|
|
8
13
|
startInterviewIcon?: JSX.Element;
|
|
9
14
|
startInterview?: (task: any) => void;
|
|
10
15
|
tasks: any[];
|
|
@@ -33,7 +38,5 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
33
38
|
SusExplanationDescription: string;
|
|
34
39
|
isSus: boolean;
|
|
35
40
|
stopRecording: () => void;
|
|
36
|
-
isInterviewNonModerated?: boolean;
|
|
37
|
-
startNMScreenSharing: () => void;
|
|
38
41
|
}
|
|
39
|
-
export declare const Chat: ({ chatTitle, welcomeTitle, welcomeDescription, startInterviewTitle, startInterviewBtnTitle, startInterviewIcon, startInterview, tasks, sendTask, currentTask, chatInputPlaceholder, chatInputValue, chatInputonChange, sendMessage, className, isTaskMode, isInterviewer, messages, idsTasksAlreadySent, customScrollingClassname, customContentClassname, disabledTask, disabledScenario, areAllTasksSend, isRecordingFinished, stopRecTitle, stopRecDescription, stopRecCTA, SusExplanationTitle, SusExplanationDescription, isSus, stopRecording,
|
|
42
|
+
export declare const Chat: ({ chatTitle, welcomeTitle, welcomeDescription, startInterviewTitle, startInterviewBtnTitle, scenarioText, taskText, questionText, noteText, actionText, startInterviewIcon, startInterview, tasks, sendTask, currentTask, chatInputPlaceholder, chatInputValue, chatInputonChange, sendMessage, className, isTaskMode, isInterviewer, messages, idsTasksAlreadySent, customScrollingClassname, customContentClassname, disabledTask, disabledScenario, areAllTasksSend, isRecordingFinished, stopRecTitle, stopRecDescription, stopRecCTA, SusExplanationTitle, SusExplanationDescription, isSus, stopRecording, ...props }: ChatProps) => React.JSX.Element;
|
|
@@ -16,6 +16,8 @@ export interface TaskProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
16
16
|
taskNumber: string;
|
|
17
17
|
taskTitle: string;
|
|
18
18
|
taskTitleTooltip: string;
|
|
19
|
+
noteText?: string;
|
|
20
|
+
actionText?: string;
|
|
19
21
|
url?: string;
|
|
20
22
|
notes?: string;
|
|
21
23
|
state: 'idle' | 'active' | 'disabled' | 'done';
|
|
@@ -32,5 +34,5 @@ export interface TaskProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
32
34
|
mainAction?: () => void;
|
|
33
35
|
isInterviewer?: boolean;
|
|
34
36
|
}
|
|
35
|
-
export declare const Task: ({ taskNumber, taskTitle, taskTitleTooltip, notes, url, className, task, sendTask, state, isDone, iconAction1, iconAction2, iconAction3, action1, action2, action3, mainActionText, mainAction, isInterviewer, ...props }: TaskProps) => React.JSX.Element;
|
|
37
|
+
export declare const Task: ({ taskNumber, taskTitle, taskTitleTooltip, notes, noteText, actionText, url, className, task, sendTask, state, isDone, iconAction1, iconAction2, iconAction3, action1, action2, action3, mainActionText, mainAction, isInterviewer, ...props }: TaskProps) => React.JSX.Element;
|
|
36
38
|
export {};
|
|
@@ -11615,8 +11615,8 @@ function Partner9({
|
|
|
11615
11615
|
}))));
|
|
11616
11616
|
}
|
|
11617
11617
|
|
|
11618
|
-
var css_248z$h = ".Chat-modules_chatContainer__7vRrr{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__7vRrr .Chat-modules_scrolling_content__xMYjW{display:flex;flex-direction:column;gap:1rem;height:100%;max-width:100%;overflow:hidden;width:100%}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk{display:flex;flex-direction:column;gap:1rem;height:100%;max-width:100%;overflow-y:scroll;padding-bottom:14rem;width:100%}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-
|
|
11619
|
-
var styles$h = {"chatContainer":"Chat-modules_chatContainer__7vRrr","scrolling_content":"Chat-modules_scrolling_content__xMYjW","tasks_container":"Chat-modules_tasks_container__LrZfk","message_chatbot":"Chat-modules_message_chatbot__-6axR","
|
|
11618
|
+
var css_248z$h = ".Chat-modules_chatContainer__7vRrr{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__7vRrr .Chat-modules_scrolling_content__xMYjW{display:flex;flex-direction:column;gap:1rem;height:100%;max-width:100%;overflow:hidden;width:100%}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk{display:flex;flex-direction:column;gap:1rem;height:100%;max-width:100%;overflow-y:scroll;padding-bottom:14rem;width:100%}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_message_container__0J-S7{animation:Chat-modules_floatup__GBxLy .5s forwards;display:flex;flex-direction:row;gap:.5rem;justify-content:flex-end;margin:.5rem 0;width:100%}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_message_container__0J-S7 .Chat-modules_message__B3WGA p{margin-left:auto}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_not_user_text_message__-V3lh{align-items:flex-end;background:#fafafa;border:1px solid #d5d5d6;border-radius:0 .5rem .5rem .5rem;display:flex;flex-direction:column;gap:.5rem;max-width:85%;padding:1rem;white-space:break-spaces;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_not_user_text_message__-V3lh .Chat-modules_user_text__f-eQo{color:var(--Color-Neutral-Dark-Shades-950,#26292e);font-family:Open Sans;font-size:.875rem;font-style:normal;font-weight:400;line-height:1.225rem;margin:0}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_not_user_text_message__-V3lh .Chat-modules_blue__7Kfag{color:#004799}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_text_message__jshOh{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:85%;padding:1rem;white-space:break-spaces;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_text_message__jshOh .Chat-modules_user_text__f-eQo{color:var(--Color-Neutral-Dark-Shades-950,#26292e);font-family:Open Sans;font-size:.875rem;font-style:normal;font-weight:400;line-height:1.225rem;margin:0}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_text_message__jshOh .Chat-modules_blue__7Kfag{color:#004799}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_text_message_username_left__BKzRA{display:flex;margin-left:auto;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_text_message_username__pkGl1{display:flex;width:-moz-fit-content;width:fit-content}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_indicator__WmvD9{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__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_user_indicator__WmvD9 p{padding:0}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_message_container_chatbot__w71-G{animation:Chat-modules_floatup__GBxLy .5s forwards;display:flex;flex-direction:row;gap:.5rem;margin:auto 0 .5rem;width:100%}@keyframes Chat-modules_floatup__GBxLy{0%{opacity:0;transform:translateY(.875rem)}to{opacity:1;transform:translateY(0)}}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_bot_indicator__iPMbo{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__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_bot_indicator__iPMbo p{padding:0}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_message_chatbot__-6axR{display:flex;flex-direction:column;gap:.25rem;width:100%}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_message_chatbot__-6axR .Chat-modules_user_text__f-eQo{color:var(--Color-Neutral-Dark-Shades-950,#26292e);font-family:Open Sans;font-size:.875rem;font-style:normal;font-weight:400;line-height:1.225rem;margin:0}.Chat-modules_chatContainer__7vRrr .Chat-modules_scrolling_content__xMYjW .Chat-modules_tasks_container__LrZfk .Chat-modules_text_message__ODXLS{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__Cy2xg{-ms-overflow-style:none;scrollbar-width:none}.Chat-modules_no_scrollbar__Cy2xg::-webkit-scrollbar{display:none}";
|
|
11619
|
+
var styles$h = {"chatContainer":"Chat-modules_chatContainer__7vRrr","scrolling_content":"Chat-modules_scrolling_content__xMYjW","tasks_container":"Chat-modules_tasks_container__LrZfk","message_chatbot":"Chat-modules_message_chatbot__-6axR","user_message_container":"Chat-modules_user_message_container__0J-S7","floatup":"Chat-modules_floatup__GBxLy","message":"Chat-modules_message__B3WGA","not_user_text_message":"Chat-modules_not_user_text_message__-V3lh","user_text":"Chat-modules_user_text__f-eQo","blue":"Chat-modules_blue__7Kfag","user_text_message":"Chat-modules_user_text_message__jshOh","user_text_message_username_left":"Chat-modules_user_text_message_username_left__BKzRA","user_text_message_username":"Chat-modules_user_text_message_username__pkGl1","user_indicator":"Chat-modules_user_indicator__WmvD9","message_container_chatbot":"Chat-modules_message_container_chatbot__w71-G","bot_indicator":"Chat-modules_bot_indicator__iPMbo","text_message":"Chat-modules_text_message__ODXLS","no_scrollbar":"Chat-modules_no_scrollbar__Cy2xg"};
|
|
11620
11620
|
styleInject(css_248z$h);
|
|
11621
11621
|
|
|
11622
11622
|
const Chat = ({
|
|
@@ -11625,6 +11625,11 @@ const Chat = ({
|
|
|
11625
11625
|
welcomeDescription,
|
|
11626
11626
|
startInterviewTitle,
|
|
11627
11627
|
startInterviewBtnTitle,
|
|
11628
|
+
scenarioText = 'Scenario',
|
|
11629
|
+
taskText = 'Task',
|
|
11630
|
+
questionText = 'Question',
|
|
11631
|
+
noteText = 'Notes',
|
|
11632
|
+
actionText = 'Actions:',
|
|
11628
11633
|
startInterviewIcon,
|
|
11629
11634
|
startInterview,
|
|
11630
11635
|
tasks,
|
|
@@ -11652,8 +11657,6 @@ const Chat = ({
|
|
|
11652
11657
|
SusExplanationDescription,
|
|
11653
11658
|
isSus,
|
|
11654
11659
|
stopRecording,
|
|
11655
|
-
startNMScreenSharing,
|
|
11656
|
-
isInterviewNonModerated = false,
|
|
11657
11660
|
...props
|
|
11658
11661
|
}) => {
|
|
11659
11662
|
const replaceURLs = message => {
|
|
@@ -11701,31 +11704,18 @@ const Chat = ({
|
|
|
11701
11704
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
11702
11705
|
className: `${styles$h.tasks_container}
|
|
11703
11706
|
${customScrollingClassname}`
|
|
11704
|
-
},
|
|
11705
|
-
className: styles$h.nm_message_container
|
|
11706
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
11707
|
-
text: 'Share your screen',
|
|
11708
|
-
weight: "bold",
|
|
11709
|
-
size: "base"
|
|
11710
|
-
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
11711
|
-
text: 'In order to participate to this test you need to share your screen before the first task is sent',
|
|
11712
|
-
size: "sm"
|
|
11713
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
11714
|
-
id: "start_screen_share",
|
|
11715
|
-
text: 'Share my screen',
|
|
11716
|
-
onClick: () => startNMScreenSharing(),
|
|
11717
|
-
iconRight: /*#__PURE__*/React__default.createElement(TvIcon, null),
|
|
11718
|
-
className: styles$h.nm_button
|
|
11719
|
-
})), tasks.map(task => {
|
|
11707
|
+
}, tasks.map(task => {
|
|
11720
11708
|
if (task.type === 'question' || task.type === 'task' || task.type === 'scenario' && isInterviewer) {
|
|
11721
11709
|
const realTask = isInterviewer ? task : JSON.parse(task.body);
|
|
11722
11710
|
const realCurrentTask = isInterviewer ? currentTask : JSON.parse(currentTask.body);
|
|
11723
11711
|
return /*#__PURE__*/React__default.createElement(Task, {
|
|
11724
11712
|
key: realTask._id,
|
|
11725
|
-
taskNumber: `${realTask.type === 'task' ?
|
|
11713
|
+
taskNumber: `${realTask.type === 'task' ? taskText : realTask.type === 'question' ? questionText : scenarioText} #${realTask.index}`,
|
|
11726
11714
|
taskTitle: realTask.type === 'scenario' ? idsTasksAlreadySent.includes(realTask._id) && realCurrentTask._id !== realTask._id || disabledTask ? realTask.name ?? realTask.description : realCurrentTask && realCurrentTask._id === realTask._id ? realTask.description : realTask.name ?? realTask.description : realTask.description,
|
|
11727
11715
|
taskTitleTooltip: realTask.description || realTask.name,
|
|
11728
11716
|
url: realTask.url,
|
|
11717
|
+
noteText: noteText,
|
|
11718
|
+
actionText: actionText,
|
|
11729
11719
|
notes: realTask.notes,
|
|
11730
11720
|
state: idsTasksAlreadySent.includes(realTask._id) && realCurrentTask._id !== realTask._id ? 'done' : disabledTask ? 'disabled' : realCurrentTask && realCurrentTask._id === realTask._id ? 'active' : 'idle',
|
|
11731
11721
|
task: realTask,
|
|
@@ -11735,7 +11725,7 @@ const Chat = ({
|
|
|
11735
11725
|
isDone: idsTasksAlreadySent.includes(realTask._id) && realCurrentTask._id !== realTask._id,
|
|
11736
11726
|
isInterviewer: isInterviewer
|
|
11737
11727
|
});
|
|
11738
|
-
} else if (task.type === 'scenario' && !isInterviewer
|
|
11728
|
+
} else if (task.type === 'scenario' && !isInterviewer) {
|
|
11739
11729
|
const scenario = isInterviewer ? task : JSON.parse(task.body);
|
|
11740
11730
|
return /*#__PURE__*/React__default.createElement(Scenario, {
|
|
11741
11731
|
title: `Scenario #${scenario.index}`,
|
|
@@ -11746,25 +11736,6 @@ const Chat = ({
|
|
|
11746
11736
|
url: scenario.url ?? '',
|
|
11747
11737
|
disabled: disabledScenario
|
|
11748
11738
|
});
|
|
11749
|
-
}
|
|
11750
|
-
if (task.type === 'scenario' && isInterviewNonModerated) {
|
|
11751
|
-
const realTask = isInterviewer ? task : JSON.parse(task.body);
|
|
11752
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
11753
|
-
className: styles$h.nm_message_container
|
|
11754
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
11755
|
-
text: realTask.name,
|
|
11756
|
-
weight: "bold",
|
|
11757
|
-
size: "base"
|
|
11758
|
-
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
11759
|
-
text: realTask.description,
|
|
11760
|
-
size: "sm"
|
|
11761
|
-
}), /*#__PURE__*/React__default.createElement(Button, {
|
|
11762
|
-
id: "start_scenario",
|
|
11763
|
-
text: 'Start Now',
|
|
11764
|
-
onClick: () => sendTask(realTask),
|
|
11765
|
-
iconRight: /*#__PURE__*/React__default.createElement(SendIcon, null),
|
|
11766
|
-
className: styles$h.nm_button
|
|
11767
|
-
}));
|
|
11768
11739
|
} else return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
11769
11740
|
}), isInterviewer && areAllTasksSend && !isRecordingFinished && /*#__PURE__*/React__default.createElement(EndRecording, {
|
|
11770
11741
|
stopRecTitle: stopRecTitle,
|
|
@@ -12425,6 +12396,8 @@ const Task = ({
|
|
|
12425
12396
|
taskTitle,
|
|
12426
12397
|
taskTitleTooltip,
|
|
12427
12398
|
notes,
|
|
12399
|
+
noteText,
|
|
12400
|
+
actionText,
|
|
12428
12401
|
url,
|
|
12429
12402
|
className,
|
|
12430
12403
|
task,
|
|
@@ -12480,8 +12453,8 @@ const Task = ({
|
|
|
12480
12453
|
stroke: "#fafafa"
|
|
12481
12454
|
})), notes && isInterviewer && /*#__PURE__*/React__default.createElement("div", {
|
|
12482
12455
|
className: styles$r.notesContainer
|
|
12483
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
12484
|
-
text:
|
|
12456
|
+
}, noteText && /*#__PURE__*/React__default.createElement(Text, {
|
|
12457
|
+
text: noteText,
|
|
12485
12458
|
size: "xs",
|
|
12486
12459
|
italic: true
|
|
12487
12460
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
@@ -12489,8 +12462,8 @@ const Task = ({
|
|
|
12489
12462
|
size: "sm"
|
|
12490
12463
|
}))), areActionsDisplay && /*#__PURE__*/React__default.createElement("div", {
|
|
12491
12464
|
className: styles$r.taskContent
|
|
12492
|
-
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
12493
|
-
text:
|
|
12465
|
+
}, actionText && /*#__PURE__*/React__default.createElement(Text, {
|
|
12466
|
+
text: actionText,
|
|
12494
12467
|
size: "xs",
|
|
12495
12468
|
italic: true
|
|
12496
12469
|
}), /*#__PURE__*/React__default.createElement("div", {
|