eli-video-interview 1.9.4 → 1.9.5

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.
@@ -58,7 +58,7 @@ var getLevel = function (score) {
58
58
  }
59
59
  };
60
60
  var ReportPie = function (props) {
61
- var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
61
+ var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a, _b = props.radius, radius = _b === void 0 ? [45, 100] : _b;
62
62
  var scores = source.map(function (_a) {
63
63
  var score = _a.score;
64
64
  return score;
@@ -90,7 +90,7 @@ var ReportPie = function (props) {
90
90
  series: [
91
91
  {
92
92
  type: 'pie',
93
- radius: [45, 100],
93
+ radius: radius,
94
94
  center: ['50%', '50%'],
95
95
  data: data,
96
96
  roseType: 'radius',
@@ -15,4 +15,6 @@ export interface TemplatePieProps {
15
15
  export interface ReportPieProps {
16
16
  id: string;
17
17
  source: Collection[];
18
+ /** 饼图半径 [内径, 外径],默认 [45, 100];容器窄(如 v3 的 400)时调小一点,给外侧标签留出空间 */
19
+ radius?: [number, number];
18
20
  }
@@ -18,7 +18,8 @@ var Report = function () {
18
18
  var reportResult = useAiReportStore(function (store) { return [store.reportResult]; }).reportResult;
19
19
  var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b;
20
20
  return (
21
- // 400 宽度会把饼图标签挤到条形图上面(v2 是 500),这里放宽到 480 让标签有完整空间
22
- _jsx(Box, __assign({ width: 480, flexShrink: 0 }, { children: _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection }), _jsx(ScoreBigBall, { score: score || 0, status: status })] })) })));
21
+ // 容器宽度保持 400(和原来一致,不能加宽:加宽会把整行挤爆、条形图连同左侧维度名一起被推到卡片外)
22
+ // 圆环改用更小的半径,让外侧标签在 400 里也放得下
23
+ _jsx(Box, __assign({ width: 400, flexShrink: 0 }, { children: _jsxs(Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [_jsx(ReportPie, { id: orderToken || '', source: collection, radius: [38, 82] }), _jsx(ScoreBigBall, { score: score || 0, status: status })] })) })));
23
24
  };
24
25
  export default Report;
@@ -63,7 +63,7 @@ var getLevel = function (score) {
63
63
  }
64
64
  };
65
65
  var ReportPie = function (props) {
66
- var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
66
+ var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a, _b = props.radius, radius = _b === void 0 ? [45, 100] : _b;
67
67
  var scores = source.map(function (_a) {
68
68
  var score = _a.score;
69
69
  return score;
@@ -95,7 +95,7 @@ var ReportPie = function (props) {
95
95
  series: [
96
96
  {
97
97
  type: 'pie',
98
- radius: [45, 100],
98
+ radius: radius,
99
99
  center: ['50%', '50%'],
100
100
  data: data,
101
101
  roseType: 'radius',
@@ -15,4 +15,6 @@ export interface TemplatePieProps {
15
15
  export interface ReportPieProps {
16
16
  id: string;
17
17
  source: Collection[];
18
+ /** 饼图半径 [内径, 外径],默认 [45, 100];容器窄(如 v3 的 400)时调小一点,给外侧标签留出空间 */
19
+ radius?: [number, number];
18
20
  }
@@ -23,7 +23,8 @@ var Report = function () {
23
23
  var reportResult = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult]; }).reportResult;
24
24
  var _a = reportResult || {}, orderToken = _a.orderToken, score = _a.score, status = _a.status, _b = _a.collection, collection = _b === void 0 ? [] : _b;
25
25
  return (
26
- // 400 宽度会把饼图标签挤到条形图上面(v2 是 500),这里放宽到 480 让标签有完整空间
27
- (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 480, flexShrink: 0 }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)(ReportPie_1.default, { id: orderToken || '', source: collection }), (0, jsx_runtime_1.jsx)(ScoreBigBall_1.default, { score: score || 0, status: status })] })) })));
26
+ // 容器宽度保持 400(和原来一致,不能加宽:加宽会把整行挤爆、条形图连同左侧维度名一起被推到卡片外)
27
+ // 圆环改用更小的半径,让外侧标签在 400 里也放得下
28
+ (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 400, flexShrink: 0 }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ height: 300, sx: { position: 'relative' } }, { children: [(0, jsx_runtime_1.jsx)(ReportPie_1.default, { id: orderToken || '', source: collection, radius: [38, 82] }), (0, jsx_runtime_1.jsx)(ScoreBigBall_1.default, { score: score || 0, status: status })] })) })));
28
29
  };
29
30
  exports.default = Report;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.9.4",
3
+ "version": "1.9.5",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",