eli-video-interview 1.2.41-alpha.21 → 1.2.41-alpha.23

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.
@@ -28,8 +28,8 @@ var AiReportRoot = forwardRef(function (props, ref) {
28
28
  var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
29
29
  var firstLoad = useRef(true);
30
30
  var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
31
- var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f;
32
- var _g = useRequest(function () { return PostAiInterviewResult([token]); }, {
31
+ var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f, _g = _b.isSimulated, isSimulated = _g === void 0 ? false : _g;
32
+ var _h = useRequest(function () { return PostAiInterviewResult([token]); }, {
33
33
  manual: true,
34
34
  onSuccess: function (_a) {
35
35
  var list = _a.data.list;
@@ -47,7 +47,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
47
47
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
48
48
  }
49
49
  },
50
- }), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
50
+ }), data = _h.data, loading = _h.loading, postAiInterviewResult = _h.run;
51
51
  var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
52
52
  var handleRefreshSuccess = useCallback(function () {
53
53
  postAiInterviewResult();
@@ -102,7 +102,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
102
102
  return (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [_jsx(Box, { children: _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ style: { marginTop: '2px' } }, { children: _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), _jsx(Box, __assign({ mt: 2 }, { children: _jsx(Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
103
103
  }
104
104
  else {
105
- return (_jsxs(Box, __assign({ pb: 3 }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), _jsxs(Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && _jsx(Report, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }))] })));
105
+ return (_jsxs(Box, __assign({ pb: 3 }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), _jsxs(Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && _jsx(Report, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), !isSimulated && _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }))] })));
106
106
  }
107
107
  }, [
108
108
  status,
@@ -25,12 +25,14 @@ var __read = (this && this.__read) || function (o, n) {
25
25
  }
26
26
  return ar;
27
27
  };
28
+ import { createElement as _createElement } from "react";
28
29
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
29
30
  import Abilities from './Abilities';
30
31
  import BodyImages from './BodyImages';
31
32
  import ScoreSlider from './ScoreSlider';
32
33
  import SingleChoice from './SingleChoice';
33
34
  import { QuestionDesc } from './styled';
35
+ import Workplaces from './Workplaces';
34
36
  import { ADD_QUESTION_TYPE, QUESTION_TYPE } from "../../../../enum/ai-question";
35
37
  import { INTERVIEW_STEP_STATUS } from "../../../../enum/ai-report";
36
38
  import FormatQuoteIcon from '@mui/icons-material/FormatQuote';
@@ -109,6 +111,6 @@ var QuestionItem = function (props) {
109
111
  borderColor: token === stepToken ? theme.palette.primary.main : '',
110
112
  }, 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
113
  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
- }), 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, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
114
+ }), 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, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && _jsx(Abilities, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return (_createElement(Workplaces, __assign({}, v, { key: v.token }))); })] }), token));
113
115
  };
114
116
  export default QuestionItem;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const Workplaces: ({ suggestionAnswer, referenceAnswer }: {
3
+ suggestionAnswer: any;
4
+ referenceAnswer: any;
5
+ }) => JSX.Element | null;
6
+ export default Workplaces;
@@ -0,0 +1,26 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { Typography } from 'fbm-ui';
14
+ import { Paper, Stack } from 'fbm-ui/lib/mui';
15
+ var Workplaces = function (_a) {
16
+ var suggestionAnswer = _a.suggestionAnswer, referenceAnswer = _a.referenceAnswer;
17
+ if (suggestionAnswer || referenceAnswer) {
18
+ return (_jsxs(Stack, __assign({ sx: {
19
+ backgroundColor: 'rgb(245, 245, 245)',
20
+ }, p: 1, spacing: 1 }, { children: [suggestionAnswer && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700 }, { children: "\u5206\u6790\u5EFA\u8BAE" })), _jsx(Paper, __assign({ sx: { padding: '8px 26px 8px 8px ' }, variant: "outlined" }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: suggestionAnswer })) }))] })), referenceAnswer && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700 }, { children: "\u53C2\u8003\u6A21\u677F" })), _jsx(Paper, __assign({ sx: { padding: '8px 26px 8px 8px ' }, variant: "outlined" }, { children: _jsx(Typography, __assign({ variant: "body2" }, { children: referenceAnswer })) }))] }))] })));
21
+ }
22
+ else {
23
+ return null;
24
+ }
25
+ };
26
+ export default Workplaces;
@@ -52,6 +52,9 @@ export interface Ability {
52
52
  name: string;
53
53
  type: number;
54
54
  weight: number | string;
55
+ token: string;
56
+ suggestionAnswer: string;
57
+ referenceAnswer: string;
55
58
  }
56
59
  export interface ScoreInfo {
57
60
  weight: number | string;
@@ -143,6 +146,7 @@ export interface AiInterviewReportList {
143
146
  startTime: number;
144
147
  completeTime: number;
145
148
  hasProVersion: boolean;
149
+ isSimulated: boolean;
146
150
  steps: AiInterviewReportStep[];
147
151
  }
148
152
  export interface AiInterviewReportData {
@@ -33,8 +33,8 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
33
33
  var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick;
34
34
  var firstLoad = (0, react_1.useRef)(true);
35
35
  var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
36
- var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f;
37
- var _g = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
36
+ var _b = reportResult || {}, _c = _b.collection, collection = _c === void 0 ? [] : _c, _d = _b.workplaces, workplaces = _d === void 0 ? [] : _d, _e = _b.model, model = _e === void 0 ? 'standard' : _e, _f = _b.hasProVersion, hasProVersion = _f === void 0 ? false : _f, _g = _b.isSimulated, isSimulated = _g === void 0 ? false : _g;
37
+ var _h = (0, ahooks_1.useRequest)(function () { return (0, ai_report_2.PostAiInterviewResult)([token]); }, {
38
38
  manual: true,
39
39
  onSuccess: function (_a) {
40
40
  var list = _a.data.list;
@@ -52,7 +52,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
52
52
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(__assign({ pageStepIndexes: pageStepIndexes_1 }, result));
53
53
  }
54
54
  },
55
- }), data = _g.data, loading = _g.loading, postAiInterviewResult = _g.run;
55
+ }), data = _h.data, loading = _h.loading, postAiInterviewResult = _h.run;
56
56
  var status = (data === null || data === void 0 ? void 0 : data.data.list[0].status) || NO_ANSWER;
57
57
  var handleRefreshSuccess = (0, react_1.useCallback)(function () {
58
58
  postAiInterviewResult();
@@ -107,7 +107,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
107
107
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%", display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", style: { marginTop: '149px' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, { children: (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/CandidateInfoEmpty.png", alt: "", style: { width: '140px', height: '140px' } }) }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "textPrimary", style: { fontWeight: '500' } }, { children: "\u8BE5\u5019\u9009\u4EBA\u5C1A\u672A\u5F00\u59CB\u9762\u8BD5" })) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('sendReminder')) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ style: { marginTop: '2px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: "\u82E5\u957F\u65F6\u95F4\u672A\u5F00\u59CB\uFF0C\u5EFA\u8BAE\u4F60\u7ED9\u5019\u9009\u4EBA\u53D1\u9001\u77ED\u4FE1\u63D0\u9192" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "large", variant: "outlined", color: "primary", disabled: reminderSent, onClick: onSendReminderClick }, { children: reminderSent ? '已提醒' : '发送提醒' })) }))] }))] })));
108
108
  }
109
109
  else {
110
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && (0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
110
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ pb: 3 }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, onSwitchReportModel: handleSwitchReportModel })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { mt: -10, zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: [![FAILED, IN_CALCULATION].includes(status) && (0, jsx_runtime_1.jsx)(Report_1.default, {}), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), !isSimulated && (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }))] })));
111
111
  }
112
112
  }, [
113
113
  status,
@@ -30,12 +30,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
+ var react_1 = require("react");
33
34
  var jsx_runtime_1 = require("react/jsx-runtime");
34
35
  var Abilities_1 = __importDefault(require("./Abilities"));
35
36
  var BodyImages_1 = __importDefault(require("./BodyImages"));
36
37
  var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
37
38
  var SingleChoice_1 = __importDefault(require("./SingleChoice"));
38
39
  var styled_1 = require("./styled");
40
+ var Workplaces_1 = __importDefault(require("./Workplaces"));
39
41
  var ai_question_1 = require("../../../../enum/ai-question");
40
42
  var ai_report_1 = require("../../../../enum/ai-report");
41
43
  var FormatQuote_1 = __importDefault(require("@mui/icons-material/FormatQuote"));
@@ -45,11 +47,11 @@ var fbm_ui_1 = require("fbm-ui");
45
47
  var ThemeProvider_1 = require("fbm-ui/lib/components/ThemeProvider");
46
48
  var mui_1 = require("fbm-ui/lib/mui");
47
49
  var immutability_helper_1 = __importDefault(require("immutability-helper"));
48
- var react_1 = require("react");
50
+ var react_2 = require("react");
49
51
  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
52
  var QuestionItem = function (props) {
51
53
  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
- var _d = __read((0, react_1.useState)(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
54
+ var _d = __read((0, react_2.useState)(false), 2), showAbilities = _d[0], setShowAbilities = _d[1];
53
55
  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
56
  var steps = (reportResult || {}).steps;
55
57
  var isAbilities = operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('abilities');
@@ -58,7 +60,7 @@ var QuestionItem = function (props) {
58
60
  var isShowWeight = abilities.length === 0 || showAbilities || !isAbilities || showAbilitiesDetails;
59
61
  var isShowAbilitiesDetails = abilities.length > 0 && (showAbilities || showAbilitiesDetails);
60
62
  var isSingleChoice = aiShowType === ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE;
61
- var comprehensiveScore = (0, react_1.useMemo)(function () {
63
+ var comprehensiveScore = (0, react_2.useMemo)(function () {
62
64
  if (status === STEP_COMPLETED) {
63
65
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: ThemeProvider_1.theme.palette.primary.main, fontSize: 16, fontWeight: 500 }, { children: (0, utils_1.formatScore)(score) })));
64
66
  }
@@ -72,7 +74,7 @@ var QuestionItem = function (props) {
72
74
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "error", fontSize: 16, fontWeight: 500 }, { children: "\u8BA1\u7B97\u5931\u8D25" })));
73
75
  }
74
76
  }, [score, status]);
75
- var renderText = (0, react_1.useMemo)(function () {
77
+ var renderText = (0, react_2.useMemo)(function () {
76
78
  var keyPointAnalysis = analysisResult[6];
77
79
  if (keyPointAnalysis && (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.text)) {
78
80
  var content_1 = analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.text;
@@ -87,7 +89,7 @@ var QuestionItem = function (props) {
87
89
  }
88
90
  return analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.text;
89
91
  }, [analysisResult]);
90
- var handleChangeCommitted = (0, react_1.useCallback)(function (score) {
92
+ var handleChangeCommitted = (0, react_2.useCallback)(function (score) {
91
93
  var _a;
92
94
  if (isSingleChoice)
93
95
  return;
@@ -100,7 +102,7 @@ var QuestionItem = function (props) {
100
102
  score: score,
101
103
  });
102
104
  }, [index, reportResult, steps, updateReportResult, onScoreChange, isSingleChoice]);
103
- var handleClickItem = (0, react_1.useCallback)(function (e) {
105
+ var handleClickItem = (0, react_2.useCallback)(function (e) {
104
106
  e.stopPropagation();
105
107
  if (videoUrl) {
106
108
  updateState({ stepToken: token });
@@ -114,6 +116,6 @@ var QuestionItem = function (props) {
114
116
  borderColor: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : '',
115
117
  }, 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
118
  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
- }), 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, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice })] }), token));
119
+ }), 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, noWrap: true }, { children: ["\u7EFC\u5408\u8BC4\u5206\uFF1A", comprehensiveScore] })) }))] }))), isShowAbilitiesDetails && (0, jsx_runtime_1.jsx)(Abilities_1.default, { stepIndex: index, disabledScore: isSingleChoice }), abilities.map(function (v) { return ((0, react_1.createElement)(Workplaces_1.default, __assign({}, v, { key: v.token }))); })] }), token));
118
120
  };
119
121
  exports.default = QuestionItem;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const Workplaces: ({ suggestionAnswer, referenceAnswer }: {
3
+ suggestionAnswer: any;
4
+ referenceAnswer: any;
5
+ }) => JSX.Element | null;
6
+ export default Workplaces;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var fbm_ui_1 = require("fbm-ui");
16
+ var mui_1 = require("fbm-ui/lib/mui");
17
+ var Workplaces = function (_a) {
18
+ var suggestionAnswer = _a.suggestionAnswer, referenceAnswer = _a.referenceAnswer;
19
+ if (suggestionAnswer || referenceAnswer) {
20
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ sx: {
21
+ backgroundColor: 'rgb(245, 245, 245)',
22
+ }, p: 1, spacing: 1 }, { children: [suggestionAnswer && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700 }, { children: "\u5206\u6790\u5EFA\u8BAE" })), (0, jsx_runtime_1.jsx)(mui_1.Paper, __assign({ sx: { padding: '8px 26px 8px 8px ' }, variant: "outlined" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: suggestionAnswer })) }))] })), referenceAnswer && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700 }, { children: "\u53C2\u8003\u6A21\u677F" })), (0, jsx_runtime_1.jsx)(mui_1.Paper, __assign({ sx: { padding: '8px 26px 8px 8px ' }, variant: "outlined" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: referenceAnswer })) }))] }))] })));
23
+ }
24
+ else {
25
+ return null;
26
+ }
27
+ };
28
+ exports.default = Workplaces;
@@ -52,6 +52,9 @@ export interface Ability {
52
52
  name: string;
53
53
  type: number;
54
54
  weight: number | string;
55
+ token: string;
56
+ suggestionAnswer: string;
57
+ referenceAnswer: string;
55
58
  }
56
59
  export interface ScoreInfo {
57
60
  weight: number | string;
@@ -143,6 +146,7 @@ export interface AiInterviewReportList {
143
146
  startTime: number;
144
147
  completeTime: number;
145
148
  hasProVersion: boolean;
149
+ isSimulated: boolean;
146
150
  steps: AiInterviewReportStep[];
147
151
  }
148
152
  export interface AiInterviewReportData {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.41-alpha.21",
3
+ "version": "1.2.41-alpha.23",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",