eli-video-interview 1.2.41-alpha.0 → 1.2.41-alpha.1
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/esm/components/Charts/ReportPie.js +0 -3
- package/esm/modules/ai-question/components/QuestionModel/Item.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +2 -2
- package/lib/components/Charts/ReportPie.js +0 -3
- package/lib/modules/ai-question/components/QuestionModel/Item.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +2 -2
- package/package.json +1 -1
|
@@ -66,9 +66,6 @@ var ReportPie = function (props) {
|
|
|
66
66
|
var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
|
|
67
67
|
return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
|
|
68
68
|
});
|
|
69
|
-
// .sort(function (a, b) {
|
|
70
|
-
// return a.weight - b.weight;
|
|
71
|
-
// });
|
|
72
69
|
var options = {
|
|
73
70
|
tooltip: {
|
|
74
71
|
trigger: 'item',
|
|
@@ -54,7 +54,7 @@ import { getSecondToTime } from "../../../../utils/utils";
|
|
|
54
54
|
import { Box, Chip, confirm, DeleteIcon, DragHandleIcon, EditIcon, IconButton, InfoIcon, Input, Select, Switch, Tooltip, Typography } from 'fbm-ui';
|
|
55
55
|
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
56
56
|
import { memo, useCallback, useMemo } from 'react';
|
|
57
|
-
var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(
|
|
57
|
+
var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(7).keys()), false).map(function (v) {
|
|
58
58
|
return { label: "\u6700\u591A\u8FFD\u95EE".concat(v + 1, "\u6B21"), value: v + 1 };
|
|
59
59
|
})), false), [
|
|
60
60
|
{ label: '直到充分为止', value: -1 },
|
|
@@ -43,7 +43,7 @@ import update from 'immutability-helper';
|
|
|
43
43
|
import { useCallback, useMemo, useState } from 'react';
|
|
44
44
|
var STEP_NO_ANSWER = INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
45
45
|
var QuestionItem = function (props) {
|
|
46
|
-
var token = props.token, reviewImgs = props.reviewImgs,
|
|
46
|
+
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
|
|
47
47
|
var _d = __read(useState(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
48
48
|
var _e = useAiReportStore(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
49
49
|
var steps = (reportResult || {}).steps;
|
|
@@ -109,6 +109,6 @@ var QuestionItem = function (props) {
|
|
|
109
109
|
borderColor: token === stepToken ? theme.palette.primary.main : '',
|
|
110
110
|
}, variant: "outlined", onClick: handleClickItem }, { children: [_jsxs(Typography, __assign({ fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: [index + 1, ".", desc] })), _jsxs(QuestionDesc, { children: [_jsx(BodyImages, { reviewImgs: reviewImgs }), _jsx(FormatQuoteIcon, {}), status === STEP_IN_CALCULATION ? (_jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : (_jsxs(_Fragment, { children: [isSingleChoice && _jsx(SingleChoice, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), _jsx(Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && (_jsxs(Box, { children: [_jsx("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
111
111
|
return (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), _jsxs(QuestionDesc, { children: [_jsx(FormatQuoteIcon, {}), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
112
|
-
}),
|
|
112
|
+
}), isExistWeight && status === STEP_COMPLETED && (_jsxs(Box, __assign({ mt: 2, display: "flex" }, { children: [_jsxs(Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && _jsxs(Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && (_jsxs(_Fragment, { children: [_jsx(ScoreSlider, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && (_jsx(Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), _jsx(Box, __assign({ width: 150, textAlign: "right" }, { children: _jsxs(Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
|
|
113
113
|
};
|
|
114
114
|
export default QuestionItem;
|
|
@@ -71,9 +71,6 @@ var ReportPie = function (props) {
|
|
|
71
71
|
var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
|
|
72
72
|
return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
|
|
73
73
|
});
|
|
74
|
-
// .sort(function (a, b) {
|
|
75
|
-
// return a.weight - b.weight;
|
|
76
|
-
// });
|
|
77
74
|
var options = {
|
|
78
75
|
tooltip: {
|
|
79
76
|
trigger: 'item',
|
|
@@ -56,7 +56,7 @@ var utils_1 = require("../../../../utils/utils");
|
|
|
56
56
|
var fbm_ui_1 = require("fbm-ui");
|
|
57
57
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
58
58
|
var react_1 = require("react");
|
|
59
|
-
var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(
|
|
59
|
+
var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(7).keys()), false).map(function (v) {
|
|
60
60
|
return { label: "\u6700\u591A\u8FFD\u95EE".concat(v + 1, "\u6B21"), value: v + 1 };
|
|
61
61
|
})), false), [
|
|
62
62
|
{ label: '直到充分为止', value: -1 },
|
|
@@ -48,7 +48,7 @@ var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
|
48
48
|
var react_1 = require("react");
|
|
49
49
|
var STEP_NO_ANSWER = ai_report_1.INTERVIEW_STEP_STATUS.STEP_NO_ANSWER, STEP_COMPLETED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_COMPLETED, STEP_FAILED = ai_report_1.INTERVIEW_STEP_STATUS.STEP_FAILED, STEP_IN_CALCULATION = ai_report_1.INTERVIEW_STEP_STATUS.STEP_IN_CALCULATION;
|
|
50
50
|
var QuestionItem = function (props) {
|
|
51
|
-
var token = props.token, reviewImgs = props.reviewImgs,
|
|
51
|
+
var token = props.token, reviewImgs = props.reviewImgs, followupQuestions = props.followupQuestions, index = props.index, status = props.status, _a = props.answer, analysisResult = _a.analysisResult, videoUrl = _a.videoUrl, _b = props.question, desc = _b.desc, type = _b.type, options = _b.options, aiShowType = _b.aiShowType, _c = props.scoreInfo, score = _c.score, weight = _c.weight, originScore = _c.originScore, finalScore = _c.finalScore, abilities = _c.abilities;
|
|
52
52
|
var _d = __read((0, react_1.useState)(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
|
|
53
53
|
var _e = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.stepToken, store.operableButtons, store.showAbilitiesDetails]; }), reportResult = _e.reportResult, stepToken = _e.stepToken, operableButtons = _e.operableButtons, showAbilitiesDetails = _e.showAbilitiesDetails, updateState = _e.updateState, updateReportResult = _e.updateReportResult, onScoreChange = _e.onScoreChange, onStepChange = _e.onStepChange;
|
|
54
54
|
var steps = (reportResult || {}).steps;
|
|
@@ -114,6 +114,6 @@ var QuestionItem = function (props) {
|
|
|
114
114
|
borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
|
|
115
115
|
}, variant: "outlined", onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: [index + 1, ".", desc] })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(BodyImages_1.default, { reviewImgs: reviewImgs }), (0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), status === STEP_IN_CALCULATION ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u89C6\u9891\u5904\u7406\u4E2D\uFF0C\u8BF7\u7A0D\u5019" }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isSingleChoice && (0, jsx_runtime_1.jsx)(SingleChoice_1.default, { options: options || [], selected: (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.selected) || [] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", color: "secondary", dangerouslySetInnerHTML: { __html: renderText } }), type === ai_question_1.QUESTION_TYPE.COLOR_BLINDNESS && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img) && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)("img", { style: { width: 100, height: 100 }, src: analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.img, alt: "" }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: ["\u56DE\u7B54\uFF1A", analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer] }))] }))] }))] }), followupQuestions === null || followupQuestions === void 0 ? void 0 : followupQuestions.map(function (v) {
|
|
116
116
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ mt: 1, fontSize: 14, color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: "\u8FFD\u95EE\uFF1A".concat(v === null || v === void 0 ? void 0 : v.desc) })), (0, jsx_runtime_1.jsxs)(styled_1.QuestionDesc, { children: [(0, jsx_runtime_1.jsx)(FormatQuote_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 1 }, { children: v === null || v === void 0 ? void 0 : v.answer }))] })] }));
|
|
117
|
-
}),
|
|
117
|
+
}), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", mr: 4 }, { children: ["\u8BC4\u5206\uFF1A", finalScore.toFixed(0), "\u5206"] })), isShowWeight && (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: ["\u5355\u9898\u6743\u91CD\uFF1A", weight, "%"] }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { valueLabelDisplay: "".concat(isSingleChoice ? 'off' : 'auto'), originScore: originScore, disabledScore: isSingleChoice, finalScore: finalScore, isShowScoreRank: true, onChangeCommitted: handleChangeCommitted }), isShowAbilitiesButton && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", style: { whiteSpace: 'nowrap' }, onClick: function () { return setShowAbilities(!showAbilities); } }, { children: showAbilities ? '收起' : '详情' })))] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 150, textAlign: "right" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body1", fontSize: 16, fontWeight: 500 }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
|
|
118
118
|
};
|
|
119
119
|
exports.default = QuestionItem;
|