odaptos_design_system 1.4.132 → 1.4.134
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/FeaturesTable/components/TableBody/components/RowCell.d.ts +3 -3
- package/dist/Interviews/Chat.d.ts +4 -18
- package/dist/odaptos_design_system.cjs.development.js +37 -29
- 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 +37 -29
- package/dist/odaptos_design_system.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/FeaturesTable/components/TableBody/components/FeatureRow.tsx +13 -8
- package/src/FeaturesTable/components/TableBody/components/RowCell.tsx +6 -6
- package/src/Interviews/Chat.tsx +32 -40
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface RowCellProps {
|
|
3
|
-
prefix
|
|
4
|
-
value
|
|
5
|
-
sufix
|
|
3
|
+
prefix?: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
sufix?: string;
|
|
6
6
|
}
|
|
7
7
|
export declare const RowCell: ({ prefix, value, sufix }: RowCellProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
interface TaskItem {
|
|
3
|
-
_id: string;
|
|
4
|
-
description: string;
|
|
5
|
-
url: string;
|
|
6
|
-
name: string;
|
|
7
|
-
index: number;
|
|
8
|
-
notes: string;
|
|
9
|
-
type: 'task' | 'question';
|
|
10
|
-
timedTask: boolean;
|
|
11
|
-
totalSeconds: number;
|
|
12
|
-
successSeconds: number;
|
|
13
|
-
failureSeconds: number;
|
|
14
|
-
}
|
|
15
2
|
export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
3
|
goBackText?: string;
|
|
17
4
|
goBack?: () => void;
|
|
@@ -21,10 +8,10 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
21
8
|
startInterviewTitle?: string;
|
|
22
9
|
startInterviewBtnTitle?: string;
|
|
23
10
|
startInterviewIcon?: JSX.Element;
|
|
24
|
-
startInterview?: (task:
|
|
25
|
-
tasks:
|
|
26
|
-
sendTask: (task:
|
|
27
|
-
currentTask?:
|
|
11
|
+
startInterview?: (task: any) => void;
|
|
12
|
+
tasks: any[];
|
|
13
|
+
sendTask: (task: any) => void;
|
|
14
|
+
currentTask?: any;
|
|
28
15
|
chatInputPlaceholder?: string;
|
|
29
16
|
chatInputValue?: string;
|
|
30
17
|
chatInputonChange?: (message: string) => void;
|
|
@@ -37,4 +24,3 @@ export interface ChatProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
37
24
|
idsTasksAlreadySent: string[];
|
|
38
25
|
}
|
|
39
26
|
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;
|
|
40
|
-
export {};
|
|
@@ -8893,8 +8893,8 @@ const RowCell = ({
|
|
|
8893
8893
|
}) => {
|
|
8894
8894
|
const yesValues = ['yes', 'oui', 'sí', 'si', 'ja'];
|
|
8895
8895
|
const noValues = ['no', 'non', 'nein', 'não', 'nao'];
|
|
8896
|
-
const showCheckmark = yesValues.includes(value.toLowerCase());
|
|
8897
|
-
const hideCheckmark = noValues.includes(value.toLowerCase());
|
|
8896
|
+
const showCheckmark = value ? yesValues.includes(value.toLowerCase()) : false;
|
|
8897
|
+
const hideCheckmark = value ? noValues.includes(value.toLowerCase()) : false;
|
|
8898
8898
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
8899
8899
|
className: styles$a.rowCell
|
|
8900
8900
|
}, prefix && /*#__PURE__*/React__default.createElement(Text, {
|
|
@@ -8903,7 +8903,7 @@ const RowCell = ({
|
|
|
8903
8903
|
text: prefix
|
|
8904
8904
|
}), showCheckmark ? /*#__PURE__*/React__default.createElement(CheckedIcon, {
|
|
8905
8905
|
className: styles$a.checkedIcon
|
|
8906
|
-
}) : hideCheckmark ? null : /*#__PURE__*/React__default.createElement(Text, {
|
|
8906
|
+
}) : hideCheckmark || !value ? null : /*#__PURE__*/React__default.createElement(Text, {
|
|
8907
8907
|
size: "sm",
|
|
8908
8908
|
weight: "bold",
|
|
8909
8909
|
text: value
|
|
@@ -9070,12 +9070,17 @@ const FeatureRow = ({
|
|
|
9070
9070
|
variant: "tertiary",
|
|
9071
9071
|
size: "xxs",
|
|
9072
9072
|
className: styles$a.tooltipButton
|
|
9073
|
-
}))), tierList.map((tier, index) =>
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9073
|
+
}))), tierList.map((tier, index) => {
|
|
9074
|
+
const tierPrefix = feature[tier] ? feature[tier].Prefix : undefined;
|
|
9075
|
+
const tierValue = feature[tier] ? feature[tier].Value : undefined;
|
|
9076
|
+
const tierSufix = feature[tier] ? feature[tier].Sufix : undefined;
|
|
9077
|
+
return /*#__PURE__*/React__default.createElement(RowCell, {
|
|
9078
|
+
key: `${feature.Name}-${index}`,
|
|
9079
|
+
prefix: tierPrefix,
|
|
9080
|
+
value: tierValue,
|
|
9081
|
+
sufix: tierSufix
|
|
9082
|
+
});
|
|
9083
|
+
}));
|
|
9079
9084
|
};
|
|
9080
9085
|
|
|
9081
9086
|
const SectionTitleRow = ({
|
|
@@ -9218,27 +9223,30 @@ const Chat = ({
|
|
|
9218
9223
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9219
9224
|
className: `${styles$d.tasks_container} ${styles$d.no_scrollbar}`
|
|
9220
9225
|
}, isTaskMode ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, tasks.map(task => {
|
|
9221
|
-
if (task.type === 'question' || task.type === 'task' || task.type === 'scenario' && isInterviewer)
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9226
|
+
if (task.type === 'question' || task.type === 'task' || task.type === 'scenario' && isInterviewer) {
|
|
9227
|
+
const realTask = isInterviewer ? task : JSON.parse(task.body);
|
|
9228
|
+
return /*#__PURE__*/React__default.createElement(Task, {
|
|
9229
|
+
key: realTask._id,
|
|
9230
|
+
taskNumber: `${realTask.type === 'task' ? 'Task' : realTask.type === 'question' ? 'Question' : 'Scenario'} #${realTask.index}`,
|
|
9231
|
+
taskTitle: realTask.description,
|
|
9232
|
+
url: realTask.url,
|
|
9233
|
+
notes: realTask.notes,
|
|
9234
|
+
state: idsTasksAlreadySent.includes(realTask._id) ? 'disabled' : currentTask && currentTask._id === realTask._id ? 'active' : 'idle',
|
|
9235
|
+
task: realTask,
|
|
9236
|
+
sendTask: () => {
|
|
9237
|
+
if (realTask.type === 'task' || realTask.type === 'question') sendTask(realTask);else if (startInterview && realTask.type === 'scenario') startInterview(realTask);else return;
|
|
9238
|
+
},
|
|
9239
|
+
isDone: false,
|
|
9240
|
+
isInterviewer: isInterviewer
|
|
9241
|
+
});
|
|
9242
|
+
} else if (task.type === 'scenario' && !isInterviewer) {
|
|
9243
|
+
const scenario = isInterviewer ? task : JSON.parse(task.body);
|
|
9236
9244
|
return /*#__PURE__*/React__default.createElement(Scenario, {
|
|
9237
|
-
title:
|
|
9238
|
-
description:
|
|
9239
|
-
buttonText:
|
|
9240
|
-
buttonIcon:
|
|
9241
|
-
url:
|
|
9245
|
+
title: scenario.name,
|
|
9246
|
+
description: scenario.description ?? '',
|
|
9247
|
+
buttonText: scenario.url ? startInterviewBtnTitle : undefined,
|
|
9248
|
+
buttonIcon: scenario.url ? startInterviewIcon : undefined,
|
|
9249
|
+
url: scenario.url
|
|
9242
9250
|
});
|
|
9243
9251
|
} else return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
9244
9252
|
})) : messages && messages.map(message => {
|