odaptos_design_system 2.0.7 → 2.0.9
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 +3 -1
- package/dist/odaptos_design_system.cjs.development.js +39 -4
- 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 +39 -4
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Molecules/Interviews/Chat.modules.scss +38 -11
- package/src/Molecules/Interviews/Chat.tsx +45 -1
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
gap: 0.5rem;
|
|
9
9
|
border-radius: 0.5rem;
|
|
10
10
|
background: #fff;
|
|
11
|
+
|
|
11
12
|
.scrolling_content {
|
|
12
13
|
display: flex;
|
|
13
14
|
flex-direction: column;
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
width: 100%;
|
|
17
18
|
overflow: hidden;
|
|
18
19
|
height: 100%;
|
|
20
|
+
|
|
19
21
|
.tasks_container {
|
|
20
22
|
display: flex;
|
|
21
23
|
flex-direction: column;
|
|
@@ -33,6 +35,21 @@
|
|
|
33
35
|
gap: 0.25rem;
|
|
34
36
|
}
|
|
35
37
|
|
|
38
|
+
.nm_message_container {
|
|
39
|
+
background-color: #E5F1FF;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
padding: 0.25rem 0.5rem 0.5rem 0.5rem;
|
|
43
|
+
gap: 0.25rem;
|
|
44
|
+
border-radius: 0.5rem;
|
|
45
|
+
border: 1px solid #66ADFF;
|
|
46
|
+
|
|
47
|
+
.nm_button {
|
|
48
|
+
width: 100%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
36
53
|
.user_message_container {
|
|
37
54
|
display: flex;
|
|
38
55
|
flex-direction: row;
|
|
@@ -53,6 +70,7 @@
|
|
|
53
70
|
transform: translateY(0.875rem);
|
|
54
71
|
opacity: 0;
|
|
55
72
|
}
|
|
73
|
+
|
|
56
74
|
to {
|
|
57
75
|
transform: translateY(0px);
|
|
58
76
|
opacity: 1;
|
|
@@ -72,6 +90,7 @@
|
|
|
72
90
|
border-radius: 0rem 0.5rem 0.5rem 0.5rem;
|
|
73
91
|
border: 1px solid #d5d5d6;
|
|
74
92
|
background: #fafafa;
|
|
93
|
+
|
|
75
94
|
.user_text {
|
|
76
95
|
color: var(--Color-Neutral-Dark-Shades-950, #26292e);
|
|
77
96
|
font-family: 'OpenSans';
|
|
@@ -81,6 +100,7 @@
|
|
|
81
100
|
line-height: 1.225rem;
|
|
82
101
|
margin: 0;
|
|
83
102
|
}
|
|
103
|
+
|
|
84
104
|
.blue {
|
|
85
105
|
color: #004799;
|
|
86
106
|
}
|
|
@@ -99,6 +119,7 @@
|
|
|
99
119
|
border: 1px solid var(--color-primary-200, #99c9ff);
|
|
100
120
|
background: var(--color-primary-100, #e5f1ff);
|
|
101
121
|
max-width: 85%;
|
|
122
|
+
|
|
102
123
|
.user_text {
|
|
103
124
|
color: var(--Color-Neutral-Dark-Shades-950, #26292e);
|
|
104
125
|
font-family: 'OpenSans';
|
|
@@ -108,6 +129,7 @@
|
|
|
108
129
|
line-height: 1.225rem;
|
|
109
130
|
margin: 0;
|
|
110
131
|
}
|
|
132
|
+
|
|
111
133
|
.blue {
|
|
112
134
|
color: #004799;
|
|
113
135
|
}
|
|
@@ -118,6 +140,7 @@
|
|
|
118
140
|
width: fit-content;
|
|
119
141
|
margin-left: auto;
|
|
120
142
|
}
|
|
143
|
+
|
|
121
144
|
.user_text_message_username {
|
|
122
145
|
display: flex;
|
|
123
146
|
width: fit-content;
|
|
@@ -131,10 +154,9 @@
|
|
|
131
154
|
display: flex;
|
|
132
155
|
align-items: center;
|
|
133
156
|
justify-content: center;
|
|
134
|
-
background: var(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
);
|
|
157
|
+
background: var(--color-gradients-003,
|
|
158
|
+
linear-gradient(135deg, #07f 0%, #9024f6 100%));
|
|
159
|
+
|
|
138
160
|
p {
|
|
139
161
|
padding: 0;
|
|
140
162
|
}
|
|
@@ -147,11 +169,13 @@
|
|
|
147
169
|
width: 100%;
|
|
148
170
|
animation: floatup 0.5s forwards;
|
|
149
171
|
margin: auto 0 0.5rem 0;
|
|
172
|
+
|
|
150
173
|
@keyframes floatup {
|
|
151
174
|
from {
|
|
152
175
|
transform: translateY(0.875rem);
|
|
153
176
|
opacity: 0;
|
|
154
177
|
}
|
|
178
|
+
|
|
155
179
|
to {
|
|
156
180
|
transform: translateY(0px);
|
|
157
181
|
opacity: 1;
|
|
@@ -167,10 +191,9 @@
|
|
|
167
191
|
display: flex;
|
|
168
192
|
align-items: center;
|
|
169
193
|
justify-content: center;
|
|
170
|
-
background: var(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
);
|
|
194
|
+
background: var(--color-gradients-003,
|
|
195
|
+
linear-gradient(135deg, #07f 0%, #9024f6 100%));
|
|
196
|
+
|
|
174
197
|
p {
|
|
175
198
|
padding: 0;
|
|
176
199
|
}
|
|
@@ -181,6 +204,7 @@
|
|
|
181
204
|
flex-direction: column;
|
|
182
205
|
width: 100%;
|
|
183
206
|
gap: 0.25rem;
|
|
207
|
+
|
|
184
208
|
.user_text {
|
|
185
209
|
color: var(--Color-Neutral-Dark-Shades-950, #26292e);
|
|
186
210
|
font-family: 'OpenSans';
|
|
@@ -211,11 +235,14 @@
|
|
|
211
235
|
}
|
|
212
236
|
|
|
213
237
|
.no_scrollbar {
|
|
238
|
+
|
|
214
239
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
215
240
|
&::-webkit-scrollbar {
|
|
216
241
|
display: none;
|
|
217
242
|
}
|
|
218
243
|
|
|
219
|
-
-ms-overflow-style: none;
|
|
220
|
-
|
|
221
|
-
|
|
244
|
+
-ms-overflow-style: none;
|
|
245
|
+
/* IE and Edge */
|
|
246
|
+
scrollbar-width: none;
|
|
247
|
+
/* Firefox */
|
|
248
|
+
}
|
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
Task,
|
|
10
10
|
EndRecording,
|
|
11
11
|
SusExplanation,
|
|
12
|
+
Button,
|
|
13
|
+
TvIcon,
|
|
14
|
+
SendIcon,
|
|
12
15
|
} from '../../';
|
|
13
16
|
import Grid from '@mui/material/Grid';
|
|
14
17
|
|
|
@@ -46,6 +49,8 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
46
49
|
SusExplanationDescription: string;
|
|
47
50
|
isSus: boolean;
|
|
48
51
|
stopRecording: () => void;
|
|
52
|
+
isInterviewNonModerated?: boolean;
|
|
53
|
+
startNMScreenSharing: () => void; //Non-Moderated Screen Sharing
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
export const Chat = ({
|
|
@@ -81,6 +86,8 @@ export const Chat = ({
|
|
|
81
86
|
SusExplanationDescription,
|
|
82
87
|
isSus,
|
|
83
88
|
stopRecording,
|
|
89
|
+
startNMScreenSharing,
|
|
90
|
+
isInterviewNonModerated = false,
|
|
84
91
|
...props
|
|
85
92
|
}: ChatProps) => {
|
|
86
93
|
const replaceURLs = (message: string) => {
|
|
@@ -143,6 +150,24 @@ export const Chat = ({
|
|
|
143
150
|
className={`${styles.tasks_container}
|
|
144
151
|
${customScrollingClassname}`}
|
|
145
152
|
>
|
|
153
|
+
{isInterviewNonModerated && (
|
|
154
|
+
<div className={styles.nm_message_container}>
|
|
155
|
+
<Text text={'Share your screen'} weight="bold" size="base" />
|
|
156
|
+
<Text
|
|
157
|
+
text={
|
|
158
|
+
'In order to participate to this test you need to share your screen before the first task is sent'
|
|
159
|
+
}
|
|
160
|
+
size="sm"
|
|
161
|
+
/>
|
|
162
|
+
<Button
|
|
163
|
+
id="start_screen_share"
|
|
164
|
+
text={'Share my screen'}
|
|
165
|
+
onClick={() => startNMScreenSharing()}
|
|
166
|
+
iconRight={<TvIcon />}
|
|
167
|
+
className={styles.nm_button}
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
)}
|
|
146
171
|
{tasks.map((task) => {
|
|
147
172
|
if (
|
|
148
173
|
task.type === 'question' ||
|
|
@@ -208,7 +233,11 @@ export const Chat = ({
|
|
|
208
233
|
isInterviewer={isInterviewer}
|
|
209
234
|
/>
|
|
210
235
|
);
|
|
211
|
-
} else if (
|
|
236
|
+
} else if (
|
|
237
|
+
task.type === 'scenario' &&
|
|
238
|
+
!isInterviewer &&
|
|
239
|
+
!isInterviewNonModerated
|
|
240
|
+
) {
|
|
212
241
|
const scenario = isInterviewer ? task : JSON.parse(task.body);
|
|
213
242
|
|
|
214
243
|
return (
|
|
@@ -225,6 +254,21 @@ export const Chat = ({
|
|
|
225
254
|
isInterviewer={isInterviewer}
|
|
226
255
|
/>
|
|
227
256
|
);
|
|
257
|
+
}
|
|
258
|
+
if (task.type === 'scenario' && isInterviewNonModerated) {
|
|
259
|
+
return (
|
|
260
|
+
<div className={styles.nm_message_container}>
|
|
261
|
+
<Text text={task.name} weight="bold" size="base" />
|
|
262
|
+
<Text text={task.description} size="sm" />
|
|
263
|
+
<Button
|
|
264
|
+
id="start_scenario"
|
|
265
|
+
text={'Start Now'}
|
|
266
|
+
onClick={() => sendTask(task)}
|
|
267
|
+
iconRight={<SendIcon />}
|
|
268
|
+
className={styles.nm_button}
|
|
269
|
+
/>
|
|
270
|
+
</div>
|
|
271
|
+
);
|
|
228
272
|
} else return <></>;
|
|
229
273
|
})}
|
|
230
274
|
{isInterviewer && areAllTasksSend && !isRecordingFinished && (
|