eli-video-interview 1.2.42-alpha.33 → 1.2.42-alpha.34

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.
@@ -77,10 +77,10 @@ var measureTextWidth = function (ctx, text) {
77
77
  var width = ctx.measureText(text).width;
78
78
  return width;
79
79
  };
80
- function isInPath(x, y, tx, ty, ctx) {
80
+ function isInPath(x, y, rect, ctx) {
81
81
  var dpr = window.devicePixelRatio || 1;
82
82
  ctx.beginPath();
83
- ctx.arc(tx / dpr, ty / dpr, 10 / dpr, 0, Math.PI * 2, true);
83
+ ctx.rect(0, rect.y / dpr, rect.width / dpr, rect.height / dpr);
84
84
  var ret = ctx.isPointInPath(x, y);
85
85
  ctx.closePath();
86
86
  return ret;
@@ -190,6 +190,7 @@ var draw = function (layout, dimensions, pathRef, ctx) {
190
190
  drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
191
191
  var endPointY = 65 + layout.itemSpacing * i;
192
192
  drawLable(v.name, 0, endPointY, ctx);
193
+ pathRef.push({ x: 0, y: y, width: layout.leftLableWidth, height: 22, tips: "".concat(v.name, ": ").concat(v.score) });
193
194
  var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
194
195
  drawScore(layout, ctx, config, {
195
196
  x: layout.leftLableWidth,
@@ -237,7 +238,7 @@ var Graph = function (_a) {
237
238
  // }, [pathRef]);
238
239
  var handleMouseMove = useCallback(function (e) {
239
240
  if (ctx) {
240
- var p = pathRef.current.find(function (p) { return isInPath(e.nativeEvent.offsetX, e.nativeEvent.offsetY, p.x, p.y, ctx); });
241
+ var p = pathRef.current.find(function (p) { return isInPath(e.nativeEvent.offsetX, e.nativeEvent.offsetY, p, ctx); });
241
242
  if (p) {
242
243
  tipEl.style.left = e.pageX + 10 + 'px';
243
244
  tipEl.style.top = e.pageY + 10 + 'px';
@@ -81,7 +81,7 @@ var Workplaces = function (_a) {
81
81
  setSuggestionAnswerContent(suggestionAnswer);
82
82
  } }, { children: "\u53D6\u6D88" })), _jsx(Button, __assign({ size: "medium", onClick: handleSubmit }, { children: "\u4FDD\u5B58" }))] }))] }))), internalMode === 'show' && (_jsx(Typography, { variant: "body2", sx: {
83
83
  color: '#424242',
84
- // whiteSpace: 'pre-wrap',
84
+ whiteSpace: 'pre-wrap',
85
85
  }, dangerouslySetInnerHTML: { __html: referenceAnswerContent } }))] }))] }));
86
86
  }
87
87
  else {
@@ -7,22 +7,6 @@ export var PostAiInterviewRefresh = function (orderID) { return POST({ url: "/st
7
7
  export var PostAiInterviewEvaluation = function (data) {
8
8
  return POST({ url: "/standard/b/aiInterview/aiEvaluation/modify", data: data });
9
9
  };
10
- // type RequireOrderTokenIfManualEvaluation<T> = T extends { manualEvaluation: string }
11
- // ? T & { orderToken: string }
12
- // : T;
13
- // type RequireFlowStepTokenIfOtherFields<T> = T extends { scoreManualEvaluation: string } | T extends { suggestionAnswer: string } | T extends { referenceAnswer: string }
14
- // ? T & { flowStepToken: string }
15
- // : T;
16
- // type PostInterviewEvaluationData = {
17
- // manualEvaluation?: string;
18
- // orderToken?: string;
19
- // scoreManualEvaluation?: string;
20
- // suggestionAnswer?: string;
21
- // referenceAnswer?: string;
22
- // };
23
- // type FinalPostInterviewEvaluationData = RequireOrderTokenIfManualEvaluation<
24
- // RequireFlowStepTokenIfOtherFields<PostInterviewEvaluationData>
25
- // >;
26
10
  export var PostInterviewEvaluation = function (data) { return POST({ url: "/standard/b/aiInterview/evaluation/modify", data: data }); };
27
11
  // 更新职场能力回答
28
12
  export var PostAiInterviewWorkplace = function (data) {
@@ -80,10 +80,10 @@ var measureTextWidth = function (ctx, text) {
80
80
  var width = ctx.measureText(text).width;
81
81
  return width;
82
82
  };
83
- function isInPath(x, y, tx, ty, ctx) {
83
+ function isInPath(x, y, rect, ctx) {
84
84
  var dpr = window.devicePixelRatio || 1;
85
85
  ctx.beginPath();
86
- ctx.arc(tx / dpr, ty / dpr, 10 / dpr, 0, Math.PI * 2, true);
86
+ ctx.rect(0, rect.y / dpr, rect.width / dpr, rect.height / dpr);
87
87
  var ret = ctx.isPointInPath(x, y);
88
88
  ctx.closePath();
89
89
  return ret;
@@ -194,6 +194,7 @@ var draw = function (layout, dimensions, pathRef, ctx) {
194
194
  drawRoundedRect(x, y, MAX_WIDTH, MAX_HEIGHT, borderRadius, true, false, ctx);
195
195
  var endPointY = 65 + layout.itemSpacing * i;
196
196
  drawLable(v.name, 0, endPointY, ctx);
197
+ pathRef.push({ x: 0, y: y, width: layout.leftLableWidth, height: 22, tips: "".concat(v.name, ": ").concat(v.score) });
197
198
  var score = (_a = v.score) !== null && _a !== void 0 ? _a : (v.score < 4 ? 4 : v.score);
198
199
  drawScore(layout, ctx, config, {
199
200
  x: layout.leftLableWidth,
@@ -241,7 +242,7 @@ var Graph = function (_a) {
241
242
  // }, [pathRef]);
242
243
  var handleMouseMove = (0, react_1.useCallback)(function (e) {
243
244
  if (ctx) {
244
- var p = pathRef.current.find(function (p) { return isInPath(e.nativeEvent.offsetX, e.nativeEvent.offsetY, p.x, p.y, ctx); });
245
+ var p = pathRef.current.find(function (p) { return isInPath(e.nativeEvent.offsetX, e.nativeEvent.offsetY, p, ctx); });
245
246
  if (p) {
246
247
  tipEl.style.left = e.pageX + 10 + 'px';
247
248
  tipEl.style.top = e.pageY + 10 + 'px';
@@ -83,7 +83,7 @@ var Workplaces = function (_a) {
83
83
  setSuggestionAnswerContent(suggestionAnswer);
84
84
  } }, { 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, { variant: "body2", sx: {
85
85
  color: '#424242',
86
- // whiteSpace: 'pre-wrap',
86
+ whiteSpace: 'pre-wrap',
87
87
  }, dangerouslySetInnerHTML: { __html: referenceAnswerContent } }))] }))] }));
88
88
  }
89
89
  else {
@@ -13,22 +13,6 @@ var PostAiInterviewEvaluation = function (data) {
13
13
  return (0, request_1.POST)({ url: "/standard/b/aiInterview/aiEvaluation/modify", data: data });
14
14
  };
15
15
  exports.PostAiInterviewEvaluation = PostAiInterviewEvaluation;
16
- // type RequireOrderTokenIfManualEvaluation<T> = T extends { manualEvaluation: string }
17
- // ? T & { orderToken: string }
18
- // : T;
19
- // type RequireFlowStepTokenIfOtherFields<T> = T extends { scoreManualEvaluation: string } | T extends { suggestionAnswer: string } | T extends { referenceAnswer: string }
20
- // ? T & { flowStepToken: string }
21
- // : T;
22
- // type PostInterviewEvaluationData = {
23
- // manualEvaluation?: string;
24
- // orderToken?: string;
25
- // scoreManualEvaluation?: string;
26
- // suggestionAnswer?: string;
27
- // referenceAnswer?: string;
28
- // };
29
- // type FinalPostInterviewEvaluationData = RequireOrderTokenIfManualEvaluation<
30
- // RequireFlowStepTokenIfOtherFields<PostInterviewEvaluationData>
31
- // >;
32
16
  var PostInterviewEvaluation = function (data) { return (0, request_1.POST)({ url: "/standard/b/aiInterview/evaluation/modify", data: data }); };
33
17
  exports.PostInterviewEvaluation = PostInterviewEvaluation;
34
18
  // 更新职场能力回答
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.42-alpha.33",
3
+ "version": "1.2.42-alpha.34",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",