eli-video-interview 1.2.42-alpha.7 → 1.2.42-alpha.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.
@@ -22,7 +22,7 @@ import { Box, Button, Paper, Typography } from 'fbm-ui';
22
22
  import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
23
23
  var NO_ANSWER = INTERVIEW_STATUS.NO_ANSWER;
24
24
  var AiReportRoot = forwardRef(function (props, ref) {
25
- var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormReuslt = props.fetchFormReuslt, fetchCandidateInfo = props.fetchCandidateInfo;
25
+ var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo;
26
26
  var firstLoad = useRef(true);
27
27
  var _a = useAiReportStore(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
28
28
  var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
@@ -73,7 +73,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
73
73
  backgroundRepeat: 'no-repeat',
74
74
  backgroundPosition: 'center top',
75
75
  paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
76
- } }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), _jsx(FormReport, { fetchFormReuslt: fetchFormReuslt }), _jsx(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] })));
76
+ } }, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (_jsx(ReportHeader, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), _jsx(FormReport, { fetchFormResult: fetchFormResult }), _jsx(Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: _jsx(VideoQuestion, {}) }))] })));
77
77
  }
78
78
  }, [
79
79
  status,
@@ -84,7 +84,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
84
84
  customScore,
85
85
  handleRefreshSuccess,
86
86
  fetchCandidateInfo,
87
- fetchFormReuslt,
87
+ fetchFormResult,
88
88
  ]);
89
89
  return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
90
90
  });
@@ -74,7 +74,21 @@ var Evaluate = function (_a) {
74
74
  boxShadow: ' 0px 2px 6px 0px rgba(91,108,95,0.15)',
75
75
  padding: '8px 24px',
76
76
  borderRadius: 1.5,
77
- } }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canEdit && (_jsx(IconButton, __assign({ onClick: handleModeChange }, { children: _jsx(EditIcon, {}) })))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
77
+ } }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Box, __assign({ sx: {
78
+ position: 'relative',
79
+ '&:after': {
80
+ position: 'absolute',
81
+ width: 'calc(100% - 2px)',
82
+ background: ' linear-gradient( 90deg, #FFE5A9 0%, #FFB300 100%)',
83
+ left: -3,
84
+ bottom: 2,
85
+ height: 5,
86
+ content: '""',
87
+ color: 'rgba(0, 0, 0, 0.54)',
88
+ display: 'inline-block',
89
+ margin: '0 4px',
90
+ },
91
+ } }, { children: _jsx(Typography, __assign({ variant: "body2", fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && (_jsx(IconButton, __assign({ onClick: handleModeChange }, { children: _jsx(EditIcon, {}) })))] })), internalMode === 'edit' && (_jsxs(Box, __assign({ width: 1, pr: 2 }, { children: [_jsx(FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), _jsxs(Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [_jsx(Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
78
92
  handleModeChange();
79
93
  // setContent(evaluations?.join('\n'));
80
94
  } }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] })));
@@ -83,7 +83,6 @@ function isInPath(x, y, tx, ty, ctx) {
83
83
  var drawTop = function (layout, ctx) {
84
84
  // 设置全局样式
85
85
  var leftLableWidth = layout.leftLableWidth, height = layout.height, topLableHeight = layout.topLableHeight;
86
- ctx.font = '16px sans-serif';
87
86
  var offset = leftLableWidth;
88
87
  levelOrder.forEach(function (level, i) {
89
88
  var _a = levelConf[level], width = _a.width, gradient = _a.gradient, label = _a.label, fontColor = _a.fontColor;
@@ -98,15 +97,15 @@ var drawTop = function (layout, ctx) {
98
97
  ctx.fillStyle = fontColor;
99
98
  ctx.fillText(label, offset + width / 2 - labelWidth / 2, 18);
100
99
  // 绘制垂直虚线
101
- drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 50, 2, 2);
100
+ drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 54, 2, 2);
102
101
  // 绘制分数文本
103
102
  ctx.fillStyle = '#4CAF50';
104
- ctx.fillText("".concat(levelOrderScore[i]), offset - (i === 0 ? 4 : 8), height + topLableHeight - 40);
103
+ ctx.fillText("".concat(levelOrderScore[i]), offset - (i === 0 ? 5 : 9), height + topLableHeight - 40);
105
104
  offset += width + 1;
106
105
  // 绘制结束的虚线和文本 '100'
107
106
  if (i === levelOrder.length - 1) {
108
- drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight - 50, 2, 2);
109
- ctx.fillText('100', offset - 2 - 8, height + topLableHeight - 40);
107
+ drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight - 54, 2, 2);
108
+ ctx.fillText('100', offset - 2 - 10, height + topLableHeight - 40);
110
109
  }
111
110
  });
112
111
  };
@@ -167,11 +166,13 @@ var drawScore = function (layout, ctx, config, rect, score) {
167
166
  var borderRadius = 12;
168
167
  drawRoundedRect(rect.x, rect.y, rect.width, rect.height, borderRadius, true, false, ctx);
169
168
  ctx.fillStyle = score < 10 ? '#0D67FF' : '#fff';
170
- ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -24), rect.y + 18);
169
+ var scoreWidth = measureTextWidth(ctx, "".concat(score));
170
+ console.log(scoreWidth);
171
+ ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -scoreWidth - 4), rect.y + 18);
171
172
  };
172
173
  var draw = function (layout, dimensions, pathRef, ctx) {
174
+ ctx.font = '16px sans-serif';
173
175
  ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
174
- drawTop(layout, ctx);
175
176
  dimensions.forEach(function (v, i) {
176
177
  var _a;
177
178
  var config = getLevel(v.score);
@@ -192,13 +193,15 @@ var draw = function (layout, dimensions, pathRef, ctx) {
192
193
  height: MAX_HEIGHT,
193
194
  }, v.score);
194
195
  });
196
+ drawTop(layout, ctx);
195
197
  };
196
198
  var Graph = function (_a) {
197
199
  var _b = _a.items, items = _b === void 0 ? [] : _b;
198
200
  var ref = useRef(null);
199
201
  var pathRef = useRef([]);
200
202
  var _c = __read(useState(), 2), ctx = _c[0], setCtx = _c[1];
201
- var height = useMemo(function () { return 36 * items.length + 40 + 30; }, [items]);
203
+ var height = useMemo(function () { return 36 * items.length + 50 + 35; }, [items]);
204
+ console.log('height', height);
202
205
  useEffect(function () {
203
206
  if (items.length === 0)
204
207
  return;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { FormReports } from './interface';
3
3
  export interface FormsProps {
4
- fetchFormReuslt: () => Promise<FormReports>;
4
+ fetchFormResult: () => Promise<FormReports>;
5
5
  }
6
- declare const Forms: ({ fetchFormReuslt }: {
7
- fetchFormReuslt: any;
6
+ declare const Forms: ({ fetchFormResult }: {
7
+ fetchFormResult: any;
8
8
  }) => JSX.Element;
9
9
  export default Forms;
@@ -29,17 +29,17 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
29
29
  import Form from './Form';
30
30
  import { useEffect, useState } from 'react';
31
31
  var Forms = function (_a) {
32
- var fetchFormReuslt = _a.fetchFormReuslt;
32
+ var fetchFormResult = _a.fetchFormResult;
33
33
  var _b = __read(useState([]), 2), data = _b[0], setData = _b[1];
34
34
  useEffect(function () {
35
- if (fetchFormReuslt) {
36
- fetchFormReuslt()
35
+ if (fetchFormResult) {
36
+ fetchFormResult()
37
37
  .then(function (res) {
38
38
  setData(res);
39
39
  })
40
40
  .catch(console);
41
41
  }
42
- }, [fetchFormReuslt]);
42
+ }, [fetchFormResult]);
43
43
  return (_jsx(_Fragment, { children: data.map(function (item, index) { return (_jsx(Form, __assign({}, item), index)); }) }));
44
44
  };
45
45
  export default Forms;
@@ -108,9 +108,17 @@ var QuestionItem = function (props) {
108
108
  return (_jsxs(Stack, __assign({ sx: {
109
109
  padding: '16px 24px',
110
110
  mt: 2,
111
- }, onClick: handleClickItem }, { children: [_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [_jsxs(Stack, __assign({ flex: 1 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { backgroundColor: theme.palette.primary.main, color: '#fff', px: 0.5, borderRadius: '4px 4px 4px 4px', lineHeight: 1 } }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: 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
+ }, onClick: handleClickItem }, { children: [_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [_jsxs(Stack, __assign({ flex: 1 }, { children: [_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: {
112
+ backgroundColor: theme.palette.primary.main,
113
+ color: '#fff',
114
+ px: 0.5,
115
+ borderRadius: '4px 4px 4px 4px',
116
+ lineHeight: 1,
117
+ alignSelf: 'flex-start',
118
+ mt: 0.5,
119
+ } }, { children: index + 1 })), _jsx(Typography, __assign({ variant: "body2", color: token === stepToken ? theme.palette.primary.main : theme.palette.text.primary }, { children: 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) {
112
120
  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 }))] })] }));
113
- })] })), _jsx(Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _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] })) }))] }))), isExistWeight && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), 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 }))); }), workplaceEvaluation && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), _jsx(Typography, { variant: "caption", sx: {
121
+ })] })), _jsx(Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && (_jsxs(Box, __assign({ width: "100%", display: "flex", alignItems: "center", mt: 2 }, { children: [_jsx(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center", pl: 2 }, { children: workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), _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] })) }))] }))), isExistWeight && status === STEP_COMPLETED && (_jsxs(Stack, __assign({ mt: 3, spacing: 1, component: Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && (_jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [_jsx(Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), _jsx(Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), 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 }))); }), workplaceEvaluation && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), _jsx(Typography, { variant: "caption", sx: {
114
122
  color: '#424242',
115
123
  }, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
116
124
  };
@@ -206,7 +206,7 @@ export interface AiReportProps {
206
206
  onSendReminderClick?: () => void;
207
207
  onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
208
208
  onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
209
- fetchFormReuslt?: () => Promise<FormReports>;
209
+ fetchFormResult?: () => Promise<FormReports>;
210
210
  fetchCandidateInfo?: () => Promise<CandidateInfo>;
211
211
  }
212
212
  export interface AiReportRef {
@@ -25,7 +25,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
25
25
  onSendReminderClick?: (() => void) | undefined;
26
26
  onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
27
27
  onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
28
- fetchFormReuslt?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
28
+ fetchFormResult?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
29
29
  fetchCandidateInfo?: (() => Promise<import("./components/Candidate/Interface").CandidateInfo>) | undefined;
30
30
  ref: import("react").MutableRefObject<AiReportRef | undefined>;
31
31
  };
@@ -27,7 +27,7 @@ var fbm_ui_1 = require("fbm-ui");
27
27
  var react_1 = require("react");
28
28
  var NO_ANSWER = ai_report_1.INTERVIEW_STATUS.NO_ANSWER;
29
29
  var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
30
- var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormReuslt = props.fetchFormReuslt, fetchCandidateInfo = props.fetchCandidateInfo;
30
+ var token = props.token, customScore = props.customScore, reminderSent = props.reminderSent, operableButtons = props.operableButtons, onLoad = props.onLoad, onSendReminderClick = props.onSendReminderClick, fetchFormResult = props.fetchFormResult, fetchCandidateInfo = props.fetchCandidateInfo;
31
31
  var firstLoad = (0, react_1.useRef)(true);
32
32
  var _a = (0, global_store_1.useAiReportStore)(), updateState = _a.updateState, updateReportResult = _a.updateReportResult, reportResult = _a.reportResult;
33
33
  var _b = (reportResult || {}).collection, collection = _b === void 0 ? [] : _b;
@@ -78,7 +78,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
78
78
  backgroundRepeat: 'no-repeat',
79
79
  backgroundPosition: 'center top',
80
80
  paddingTop: (collection === null || collection === void 0 ? void 0 : collection.length) > 0 ? 0 : 3,
81
- } }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), (0, jsx_runtime_1.jsx)(Form_1.FormReport, { fetchFormReuslt: fetchFormReuslt }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {}) }))] })));
81
+ } }, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && ((0, jsx_runtime_1.jsx)(ReportHeader_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess, fetchCandidateInfo: fetchCandidateInfo, status: status })), (0, jsx_runtime_1.jsx)(Form_1.FormReport, { fetchFormResult: fetchFormResult }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Paper, __assign({ variant: "outlined", sx: { zIndex: 1, position: 'relative', mx: 2, borderRadius: 4 } }, { children: (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {}) }))] })));
82
82
  }
83
83
  }, [
84
84
  status,
@@ -89,7 +89,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
89
89
  customScore,
90
90
  handleRefreshSuccess,
91
91
  fetchCandidateInfo,
92
- fetchFormReuslt,
92
+ fetchFormResult,
93
93
  ]);
94
94
  return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '618px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
95
95
  });
@@ -76,7 +76,21 @@ var Evaluate = function (_a) {
76
76
  boxShadow: ' 0px 2px 6px 0px rgba(91,108,95,0.15)',
77
77
  padding: '8px 24px',
78
78
  borderRadius: 1.5,
79
- } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium" }, { children: title })), canEdit && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: handleModeChange }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
79
+ } }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ sx: {
80
+ position: 'relative',
81
+ '&:after': {
82
+ position: 'absolute',
83
+ width: 'calc(100% - 2px)',
84
+ background: ' linear-gradient( 90deg, #FFE5A9 0%, #FFB300 100%)',
85
+ left: -3,
86
+ bottom: 2,
87
+ height: 5,
88
+ content: '""',
89
+ color: 'rgba(0, 0, 0, 0.54)',
90
+ display: 'inline-block',
91
+ margin: '0 4px',
92
+ },
93
+ } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: "medium", zIndex: 1, sx: { position: 'relative', zIndex: 1 } }, { children: title })) })), canEdit && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: handleModeChange }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) })))] })), internalMode === 'edit' && ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
80
94
  handleModeChange();
81
95
  // setContent(evaluations?.join('\n'));
82
96
  } }, { children: "\u53D6\u6D88" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "textSecondary", sx: { whiteSpace: 'pre-wrap' } }, { children: content })))] })));
@@ -85,7 +85,6 @@ function isInPath(x, y, tx, ty, ctx) {
85
85
  var drawTop = function (layout, ctx) {
86
86
  // 设置全局样式
87
87
  var leftLableWidth = layout.leftLableWidth, height = layout.height, topLableHeight = layout.topLableHeight;
88
- ctx.font = '16px sans-serif';
89
88
  var offset = leftLableWidth;
90
89
  levelOrder.forEach(function (level, i) {
91
90
  var _a = levelConf[level], width = _a.width, gradient = _a.gradient, label = _a.label, fontColor = _a.fontColor;
@@ -100,15 +99,15 @@ var drawTop = function (layout, ctx) {
100
99
  ctx.fillStyle = fontColor;
101
100
  ctx.fillText(label, offset + width / 2 - labelWidth / 2, 18);
102
101
  // 绘制垂直虚线
103
- drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 50, 2, 2);
102
+ drawVerticalDashedLine(ctx, offset - 1, 0, height + topLableHeight - 54, 2, 2);
104
103
  // 绘制分数文本
105
104
  ctx.fillStyle = '#4CAF50';
106
- ctx.fillText("".concat(levelOrderScore[i]), offset - (i === 0 ? 4 : 8), height + topLableHeight - 40);
105
+ ctx.fillText("".concat(levelOrderScore[i]), offset - (i === 0 ? 5 : 9), height + topLableHeight - 40);
107
106
  offset += width + 1;
108
107
  // 绘制结束的虚线和文本 '100'
109
108
  if (i === levelOrder.length - 1) {
110
- drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight - 50, 2, 2);
111
- ctx.fillText('100', offset - 2 - 8, height + topLableHeight - 40);
109
+ drawVerticalDashedLine(ctx, offset - 2, 0, height + topLableHeight - 54, 2, 2);
110
+ ctx.fillText('100', offset - 2 - 10, height + topLableHeight - 40);
112
111
  }
113
112
  });
114
113
  };
@@ -169,11 +168,13 @@ var drawScore = function (layout, ctx, config, rect, score) {
169
168
  var borderRadius = 12;
170
169
  drawRoundedRect(rect.x, rect.y, rect.width, rect.height, borderRadius, true, false, ctx);
171
170
  ctx.fillStyle = score < 10 ? '#0D67FF' : '#fff';
172
- ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -24), rect.y + 18);
171
+ var scoreWidth = measureTextWidth(ctx, "".concat(score));
172
+ console.log(scoreWidth);
173
+ ctx.fillText("".concat(score), layout.leftLableWidth + rect.width + (score < 10 ? 4 : -scoreWidth - 4), rect.y + 18);
173
174
  };
174
175
  var draw = function (layout, dimensions, pathRef, ctx) {
176
+ ctx.font = '16px sans-serif';
175
177
  ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
176
- drawTop(layout, ctx);
177
178
  dimensions.forEach(function (v, i) {
178
179
  var _a;
179
180
  var config = getLevel(v.score);
@@ -194,13 +195,15 @@ var draw = function (layout, dimensions, pathRef, ctx) {
194
195
  height: MAX_HEIGHT,
195
196
  }, v.score);
196
197
  });
198
+ drawTop(layout, ctx);
197
199
  };
198
200
  var Graph = function (_a) {
199
201
  var _b = _a.items, items = _b === void 0 ? [] : _b;
200
202
  var ref = (0, react_1.useRef)(null);
201
203
  var pathRef = (0, react_1.useRef)([]);
202
204
  var _c = __read((0, react_1.useState)(), 2), ctx = _c[0], setCtx = _c[1];
203
- var height = (0, react_1.useMemo)(function () { return 36 * items.length + 40 + 30; }, [items]);
205
+ var height = (0, react_1.useMemo)(function () { return 36 * items.length + 50 + 35; }, [items]);
206
+ console.log('height', height);
204
207
  (0, react_1.useEffect)(function () {
205
208
  if (items.length === 0)
206
209
  return;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { FormReports } from './interface';
3
3
  export interface FormsProps {
4
- fetchFormReuslt: () => Promise<FormReports>;
4
+ fetchFormResult: () => Promise<FormReports>;
5
5
  }
6
- declare const Forms: ({ fetchFormReuslt }: {
7
- fetchFormReuslt: any;
6
+ declare const Forms: ({ fetchFormResult }: {
7
+ fetchFormResult: any;
8
8
  }) => JSX.Element;
9
9
  export default Forms;
@@ -34,17 +34,17 @@ var jsx_runtime_1 = require("react/jsx-runtime");
34
34
  var Form_1 = __importDefault(require("./Form"));
35
35
  var react_1 = require("react");
36
36
  var Forms = function (_a) {
37
- var fetchFormReuslt = _a.fetchFormReuslt;
37
+ var fetchFormResult = _a.fetchFormResult;
38
38
  var _b = __read((0, react_1.useState)([]), 2), data = _b[0], setData = _b[1];
39
39
  (0, react_1.useEffect)(function () {
40
- if (fetchFormReuslt) {
41
- fetchFormReuslt()
40
+ if (fetchFormResult) {
41
+ fetchFormResult()
42
42
  .then(function (res) {
43
43
  setData(res);
44
44
  })
45
45
  .catch(console);
46
46
  }
47
- }, [fetchFormReuslt]);
47
+ }, [fetchFormResult]);
48
48
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: data.map(function (item, index) { return ((0, jsx_runtime_1.jsx)(Form_1.default, __assign({}, item), index)); }) }));
49
49
  };
50
50
  exports.default = Forms;
@@ -113,9 +113,17 @@ var QuestionItem = function (props) {
113
113
  return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ sx: {
114
114
  padding: '16px 24px',
115
115
  mt: 2,
116
- }, onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ flex: 1 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { backgroundColor: ThemeProvider_1.theme.palette.primary.main, color: '#fff', px: 0.5, borderRadius: '4px 4px 4px 4px', lineHeight: 1 } }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: desc }))] })), (0, jsx_runtime_1.jsxs)(styled_2.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
+ }, onClick: handleClickItem }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 4 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ flex: 1 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: {
117
+ backgroundColor: ThemeProvider_1.theme.palette.primary.main,
118
+ color: '#fff',
119
+ px: 0.5,
120
+ borderRadius: '4px 4px 4px 4px',
121
+ lineHeight: 1,
122
+ alignSelf: 'flex-start',
123
+ mt: 0.5,
124
+ } }, { children: index + 1 })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: token === stepToken ? ThemeProvider_1.theme.palette.primary.main : ThemeProvider_1.theme.palette.text.primary }, { children: desc }))] })), (0, jsx_runtime_1.jsxs)(styled_2.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) {
117
125
  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_2.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 }))] })] }));
118
- })] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && ((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", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (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] })) }))] }))), isExistWeight && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), 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 }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
126
+ })] })), (0, jsx_runtime_1.jsx)(styled_1.Video, { src: videoUrl, controls: true })] })), isExistWeight && status !== STEP_COMPLETED && ((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", pl: 2 }, { children: workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))) })), (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] })) }))] }))), isExistWeight && status === STEP_COMPLETED && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ mt: 3, spacing: 1, component: mui_1.Paper, variant: "outlined", sx: { border: '1px solid #9BCC9B', background: '#F7FFF7' }, p: 2 }, { children: [workplaceName && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 0.5, mb: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { color: '#4CAF50' }, variant: "body2", fontWeight: "medium" }, { children: "\u8003\u6838\u70B9\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: workplaceName }))] }))), 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 }))); }), workplaceEvaluation && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", fontWeight: 700, sx: { color: '#4caf50' } }, { children: "AI\u8BC4\u4EF7" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { variant: "caption", sx: {
119
127
  color: '#424242',
120
128
  }, dangerouslySetInnerHTML: { __html: workplaceEvaluation } })] }))] })))] }), token));
121
129
  };
@@ -206,7 +206,7 @@ export interface AiReportProps {
206
206
  onSendReminderClick?: () => void;
207
207
  onScoreRankIntervalsChange?: (scoreRankIntervals?: ScoreRankIntervals[]) => void;
208
208
  onScoreRankIntervalsSubmit?: (scoreRankIntervals?: ScoreRankIntervals[]) => Promise<any>;
209
- fetchFormReuslt?: () => Promise<FormReports>;
209
+ fetchFormResult?: () => Promise<FormReports>;
210
210
  fetchCandidateInfo?: () => Promise<CandidateInfo>;
211
211
  }
212
212
  export interface AiReportRef {
@@ -25,7 +25,7 @@ export declare const useAiReportV2: (props: AiReportProps) => {
25
25
  onSendReminderClick?: (() => void) | undefined;
26
26
  onScoreRankIntervalsChange?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => void) | undefined;
27
27
  onScoreRankIntervalsSubmit?: ((scoreRankIntervals?: import("./components/RankingRange/interface").ScoreRankIntervals[] | undefined) => Promise<any>) | undefined;
28
- fetchFormReuslt?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
28
+ fetchFormResult?: (() => Promise<import("./components/Form/interface").FormReports>) | undefined;
29
29
  fetchCandidateInfo?: (() => Promise<import("./components/Candidate/Interface").CandidateInfo>) | undefined;
30
30
  ref: import("react").MutableRefObject<AiReportRef | undefined>;
31
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.42-alpha.7",
3
+ "version": "1.2.42-alpha.9",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",