odaptos_design_system 1.4.110 → 1.4.113
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/odaptos_design_system.cjs.development.js +84 -68
- 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 +84 -68
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Interviews/Chat.modules.scss +28 -6
- package/src/Interviews/Chat.tsx +98 -72
|
@@ -7953,8 +7953,8 @@ 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_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:
|
|
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_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"};
|
|
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:1.75rem;justify-content:center;padding:.625rem .5625rem;width:2rem}.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:1.75rem;justify-content:center;padding:.625rem .5625rem;width:2rem}.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
|
+
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
|
|
|
7960
7960
|
const Chat = ({
|
|
@@ -7980,6 +7980,25 @@ const Chat = ({
|
|
|
7980
7980
|
messages,
|
|
7981
7981
|
...props
|
|
7982
7982
|
}) => {
|
|
7983
|
+
const detectAndWrapLinks = text => {
|
|
7984
|
+
// Expression régulière pour détecter les URLs
|
|
7985
|
+
const urlRegex = /(?:https?:\/\/|www\.)[^\s]+/g;
|
|
7986
|
+
return text.split(urlRegex).map((part, index) => {
|
|
7987
|
+
if (index % 2 === 1) {
|
|
7988
|
+
// If the index is odd, it's a URL, wrap it in a <a> tag
|
|
7989
|
+
const url = part.startsWith('www.') ? `http://${part}` : part;
|
|
7990
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
7991
|
+
key: index,
|
|
7992
|
+
href: url,
|
|
7993
|
+
target: "_blank",
|
|
7994
|
+
rel: "noopener noreferrer"
|
|
7995
|
+
}, part);
|
|
7996
|
+
} else {
|
|
7997
|
+
// Otherwise, simply display the text
|
|
7998
|
+
return part;
|
|
7999
|
+
}
|
|
8000
|
+
});
|
|
8001
|
+
};
|
|
7983
8002
|
return /*#__PURE__*/React__default.createElement(Grid, Object.assign({
|
|
7984
8003
|
container: true,
|
|
7985
8004
|
item: true,
|
|
@@ -8019,72 +8038,69 @@ const Chat = ({
|
|
|
8019
8038
|
sendTask: sendTask,
|
|
8020
8039
|
isDone: isCompletedTask
|
|
8021
8040
|
});
|
|
8022
|
-
}) : messages.map(message => {
|
|
8023
|
-
if (message
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
size: "xs",
|
|
8086
|
-
color: "grey"
|
|
8087
|
-
})));
|
|
8041
|
+
}) : messages && messages.map(message => {
|
|
8042
|
+
if (message) {
|
|
8043
|
+
if (message.from && message.from.identify === 'interviewer' && isInterviewer) return /*#__PURE__*/React__default.createElement("div", {
|
|
8044
|
+
className: styles$b.user_message_container
|
|
8045
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8046
|
+
className: styles$b.message_chatbot
|
|
8047
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8048
|
+
className: styles$b.user_text_message
|
|
8049
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8050
|
+
className: styles$b.user_text
|
|
8051
|
+
}, detectAndWrapLinks(message.body))), /*#__PURE__*/React__default.createElement(Text, {
|
|
8052
|
+
text: message.createdAt.toLocaleTimeString(),
|
|
8053
|
+
size: "xs",
|
|
8054
|
+
color: "grey",
|
|
8055
|
+
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
|
+
})));else if (message.from && message.from.identify === 'interviewee' && !isInterviewer) return /*#__PURE__*/React__default.createElement("div", {
|
|
8064
|
+
className: styles$b.user_message_container
|
|
8065
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8066
|
+
className: styles$b.message_chatbot
|
|
8067
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8068
|
+
className: styles$b.user_text_message
|
|
8069
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8070
|
+
className: styles$b.user_text
|
|
8071
|
+
}, detectAndWrapLinks(message.body))), /*#__PURE__*/React__default.createElement(Text, {
|
|
8072
|
+
text: message.createdAt.toLocaleTimeString(),
|
|
8073
|
+
size: "xs",
|
|
8074
|
+
color: "grey",
|
|
8075
|
+
className: styles$b.user_text_message_username
|
|
8076
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
8077
|
+
className: styles$b.user_indicator
|
|
8078
|
+
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
8079
|
+
text: `${message.from.name.split(' ').map(n => n[0]).join('')}`,
|
|
8080
|
+
weight: "bold",
|
|
8081
|
+
color: "white",
|
|
8082
|
+
size: "sm"
|
|
8083
|
+
}))));else return /*#__PURE__*/React__default.createElement("div", {
|
|
8084
|
+
className: styles$b.message_container_chatbot
|
|
8085
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8086
|
+
className: styles$b.bot_indicator
|
|
8087
|
+
}, /*#__PURE__*/React__default.createElement(Title, {
|
|
8088
|
+
text: `${message.from.name.split(' ').map(n => n[0]).join('')}`,
|
|
8089
|
+
weight: "bold",
|
|
8090
|
+
color: "white",
|
|
8091
|
+
size: "sm"
|
|
8092
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
8093
|
+
className: styles$b.message_chatbot
|
|
8094
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
8095
|
+
className: styles$b.text_message
|
|
8096
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
8097
|
+
className: styles$b.user_text
|
|
8098
|
+
}, detectAndWrapLinks(message.body))), /*#__PURE__*/React__default.createElement(Text, {
|
|
8099
|
+
text: message.createdAt.toLocaleTimeString(),
|
|
8100
|
+
size: "xs",
|
|
8101
|
+
color: "grey"
|
|
8102
|
+
})));
|
|
8103
|
+
} else return null;
|
|
8088
8104
|
}))), !isTaskMode && chatInputPlaceholder && typeof chatInputValue === 'string' && chatInputonChange && /*#__PURE__*/React__default.createElement(ChatInput, {
|
|
8089
8105
|
placeholder: chatInputPlaceholder,
|
|
8090
8106
|
value: chatInputValue,
|