eli-video-interview 1.7.0 → 1.8.0

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.
@@ -60,13 +60,18 @@ var RiskBadge = function (_a) {
60
60
  };
61
61
  // 作弊检测详情表(不带头标题行,仅表格)
62
62
  var RECITE_ROW_NAME = '疑似读稿';
63
- // 读背稿线索:题号 + 高亮引用的原文片段 + 模型理由(后端没返回线索时回退静态文案)
64
63
  var ReadReciteEvidence = function (_a) {
65
- var text = _a.text, stepIndex = _a.stepIndex;
64
+ var evidence = _a.evidence, stepIndex = _a.stepIndex;
65
+ var text = evidence.text || '';
66
66
  var matched = /「([^」]+)」/.exec(text);
67
67
  var quote = matched === null || matched === void 0 ? void 0 : matched[1];
68
68
  var rest = quote ? text.replace("\u300C".concat(quote, "\u300D"), '') : text;
69
- return (_jsxs("span", __assign({ style: { display: 'block', textAlign: 'left', lineHeight: '20px' } }, { children: [stepIndex > 0 && _jsxs("span", __assign({ style: { fontWeight: 600 } }, { children: ["\u7B2C ", stepIndex, " \u9898\uFF1A"] })), quote && _jsxs("span", __assign({ style: { color: '#D46B08', fontWeight: 600 } }, { children: ["\u300C", quote, "\u300D"] })), _jsx("span", { children: rest })] })));
69
+ var metrics = (evidence.metrics || []).slice(0, 3);
70
+ return (_jsxs("span", __assign({ style: { display: 'block', textAlign: 'left', lineHeight: '20px' } }, { children: [stepIndex > 0 && _jsxs("span", __assign({ style: { fontWeight: 600 } }, { children: ["\u7B2C ", stepIndex, " \u9898\uFF1A"] })), quote && _jsxs("span", __assign({ style: { color: '#D46B08', fontWeight: 600 } }, { children: ["\u300C", quote, "\u300D"] })), _jsx("span", { children: rest }), metrics.length > 0 && (_jsx("span", __assign({ style: { display: 'block', marginTop: 4, color: 'rgba(0,0,0,.45)', fontSize: 12, lineHeight: '18px' } }, { children: metrics
71
+ .map(function (m) {
72
+ return "".concat(m.name, " ").concat(m.value).concat(m.unit || '').concat(m.compare ? "\uFF08\u672C\u573A".concat(m.compare).concat(m.baseline ? "\uFF0C\u4E2D\u4F4D ".concat(m.baseline).concat(m.unit || '') : '', "\uFF09") : '');
73
+ })
74
+ .join(' · ') })))] })));
70
75
  };
71
76
  var COL_W1 = 118; // 检测项目列宽
72
77
  var COL_W2 = 130; // 风险评估列宽
@@ -81,7 +86,7 @@ var CheatDetailTable = function (_a) {
81
86
  alignItems: 'center',
82
87
  borderTop: '1px solid #F2F4F6',
83
88
  bgcolor: i % 2 ? '#FAFCFE' : '#fff',
84
- } }, { children: [_jsx(Typography, __assign({ sx: { width: COL_W1, flexShrink: 0, textAlign: 'center', color: TEXT_COLOR, fontSize: 12 } }, { children: row.name })), _jsx(Box, __assign({ sx: { width: COL_W2, flexShrink: 0, display: 'flex', justifyContent: 'center' } }, { children: _jsx(RiskBadge, { has: hit }) })), _jsx(Typography, __assign({ sx: { flex: 1, textAlign: 'center', color: TEXT_COLOR, fontSize: 12, lineHeight: '20px' } }, { children: hit && row.name === RECITE_ROW_NAME && (reciteEvidence === null || reciteEvidence === void 0 ? void 0 : reciteEvidence.text) ? (_jsx(ReadReciteEvidence, { text: reciteEvidence.text, stepIndex: reciteStepIndex })) : hit ? (row.detail) : ('暂无风险') }))] }), row.name));
89
+ } }, { children: [_jsx(Typography, __assign({ sx: { width: COL_W1, flexShrink: 0, textAlign: 'center', color: TEXT_COLOR, fontSize: 12 } }, { children: row.name })), _jsx(Box, __assign({ sx: { width: COL_W2, flexShrink: 0, display: 'flex', justifyContent: 'center' } }, { children: _jsx(RiskBadge, { has: hit }) })), _jsx(Typography, __assign({ sx: { flex: 1, textAlign: 'center', color: TEXT_COLOR, fontSize: 12, lineHeight: '20px' } }, { children: hit && row.name === RECITE_ROW_NAME && (reciteEvidence === null || reciteEvidence === void 0 ? void 0 : reciteEvidence.text) ? (_jsx(ReadReciteEvidence, { evidence: reciteEvidence, stepIndex: reciteStepIndex })) : hit ? (row.detail) : ('暂无风险') }))] }), row.name));
85
90
  })] })));
86
91
  };
87
92
  var CheatRisk = function () {
@@ -62,13 +62,18 @@ var RiskBadge = function (_a) {
62
62
  };
63
63
  // 作弊检测详情表(不带头标题行,仅表格)
64
64
  var RECITE_ROW_NAME = '疑似读稿';
65
- // 读背稿线索:题号 + 高亮引用的原文片段 + 模型理由(后端没返回线索时回退静态文案)
66
65
  var ReadReciteEvidence = function (_a) {
67
- var text = _a.text, stepIndex = _a.stepIndex;
66
+ var evidence = _a.evidence, stepIndex = _a.stepIndex;
67
+ var text = evidence.text || '';
68
68
  var matched = /「([^」]+)」/.exec(text);
69
69
  var quote = matched === null || matched === void 0 ? void 0 : matched[1];
70
70
  var rest = quote ? text.replace("\u300C".concat(quote, "\u300D"), '') : text;
71
- return ((0, jsx_runtime_1.jsxs)("span", __assign({ style: { display: 'block', textAlign: 'left', lineHeight: '20px' } }, { children: [stepIndex > 0 && (0, jsx_runtime_1.jsxs)("span", __assign({ style: { fontWeight: 600 } }, { children: ["\u7B2C ", stepIndex, " \u9898\uFF1A"] })), quote && (0, jsx_runtime_1.jsxs)("span", __assign({ style: { color: '#D46B08', fontWeight: 600 } }, { children: ["\u300C", quote, "\u300D"] })), (0, jsx_runtime_1.jsx)("span", { children: rest })] })));
71
+ var metrics = (evidence.metrics || []).slice(0, 3);
72
+ return ((0, jsx_runtime_1.jsxs)("span", __assign({ style: { display: 'block', textAlign: 'left', lineHeight: '20px' } }, { children: [stepIndex > 0 && (0, jsx_runtime_1.jsxs)("span", __assign({ style: { fontWeight: 600 } }, { children: ["\u7B2C ", stepIndex, " \u9898\uFF1A"] })), quote && (0, jsx_runtime_1.jsxs)("span", __assign({ style: { color: '#D46B08', fontWeight: 600 } }, { children: ["\u300C", quote, "\u300D"] })), (0, jsx_runtime_1.jsx)("span", { children: rest }), metrics.length > 0 && ((0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'block', marginTop: 4, color: 'rgba(0,0,0,.45)', fontSize: 12, lineHeight: '18px' } }, { children: metrics
73
+ .map(function (m) {
74
+ return "".concat(m.name, " ").concat(m.value).concat(m.unit || '').concat(m.compare ? "\uFF08\u672C\u573A".concat(m.compare).concat(m.baseline ? "\uFF0C\u4E2D\u4F4D ".concat(m.baseline).concat(m.unit || '') : '', "\uFF09") : '');
75
+ })
76
+ .join(' · ') })))] })));
72
77
  };
73
78
  var COL_W1 = 118; // 检测项目列宽
74
79
  var COL_W2 = 130; // 风险评估列宽
@@ -83,7 +88,7 @@ var CheatDetailTable = function (_a) {
83
88
  alignItems: 'center',
84
89
  borderTop: '1px solid #F2F4F6',
85
90
  bgcolor: i % 2 ? '#FAFCFE' : '#fff',
86
- } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { width: COL_W1, flexShrink: 0, textAlign: 'center', color: TEXT_COLOR, fontSize: 12 } }, { children: row.name })), (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ sx: { width: COL_W2, flexShrink: 0, display: 'flex', justifyContent: 'center' } }, { children: (0, jsx_runtime_1.jsx)(RiskBadge, { has: hit }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { flex: 1, textAlign: 'center', color: TEXT_COLOR, fontSize: 12, lineHeight: '20px' } }, { children: hit && row.name === RECITE_ROW_NAME && (reciteEvidence === null || reciteEvidence === void 0 ? void 0 : reciteEvidence.text) ? ((0, jsx_runtime_1.jsx)(ReadReciteEvidence, { text: reciteEvidence.text, stepIndex: reciteStepIndex })) : hit ? (row.detail) : ('暂无风险') }))] }), row.name));
91
+ } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { width: COL_W1, flexShrink: 0, textAlign: 'center', color: TEXT_COLOR, fontSize: 12 } }, { children: row.name })), (0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ sx: { width: COL_W2, flexShrink: 0, display: 'flex', justifyContent: 'center' } }, { children: (0, jsx_runtime_1.jsx)(RiskBadge, { has: hit }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ sx: { flex: 1, textAlign: 'center', color: TEXT_COLOR, fontSize: 12, lineHeight: '20px' } }, { children: hit && row.name === RECITE_ROW_NAME && (reciteEvidence === null || reciteEvidence === void 0 ? void 0 : reciteEvidence.text) ? ((0, jsx_runtime_1.jsx)(ReadReciteEvidence, { evidence: reciteEvidence, stepIndex: reciteStepIndex })) : hit ? (row.detail) : ('暂无风险') }))] }), row.name));
87
92
  })] })));
88
93
  };
89
94
  var CheatRisk = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",