eli-video-interview 1.2.15 → 1.2.16

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.
@@ -12,9 +12,8 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useCallback, useEffect, useState } from 'react';
14
14
  import { Tooltip, Typography } from 'fbm-ui';
15
- import { scoreRankIntervalColors } from "../../../../constants/ai-report";
16
15
  import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
- import { AiScoreRoot, RankingRoot, ScoreSliderRoot, StyledSlider } from './styled';
16
+ import { AiScoreRoot, ScoreSliderRoot, StyledSlider } from './styled';
18
17
  var ScoreSlider = function (props) {
19
18
  var _a = props.width, width = _a === void 0 ? 320 : _a, originScore = props.originScore, finalScore = props.finalScore, _b = props.valueLabelDisplay, valueLabelDisplay = _b === void 0 ? 'on' : _b, _c = props.isShowLabel, isShowLabel = _c === void 0 ? false : _c, _d = props.isShowScoreRank, isShowScoreRank = _d === void 0 ? false : _d, onChangeCommitted = props.onChangeCommitted;
20
19
  var aiScore = originScore.toFixed(0);
@@ -26,9 +25,6 @@ var ScoreSlider = function (props) {
26
25
  useEffect(function () {
27
26
  setScore(Number(finalScore.toFixed(0)));
28
27
  }, [finalScore]);
29
- return (_jsxs(ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && (_jsxs(_Fragment, { children: [scoreRankIntervals === null || scoreRankIntervals === void 0 ? void 0 : scoreRankIntervals.map(function (_a, index) {
30
- var rank = _a.rank, _b = _a.scoreRankIntervals, startRankProportion = _b.startRankProportion, endRankProportion = _b.endRankProportion, _c = _a.score, startScore = _c.startScore, endScore = _c.endScore;
31
- return (_jsx(Tooltip, __assign({ title: "\u524D".concat(startRankProportion * 100, "%-").concat(endRankProportion * 100, "%"), placement: "top" }, { children: _jsx(RankingRoot, { sx: { width: "".concat(endScore - startScore, "%"), left: "".concat(startScore, "%"), bgcolor: scoreRankIntervalColors[index] } }) }), rank));
32
- }), _jsx(Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: _jsx(AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) }))] })), _jsx(StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && (_jsxs(Typography, __assign({ width: 80, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
28
+ return (_jsxs(ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && (_jsx(_Fragment, { children: _jsx(Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: _jsx(AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) })) })), _jsx(StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && (_jsxs(Typography, __assign({ width: 80, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
33
29
  };
34
30
  export default ScoreSlider;
@@ -14,7 +14,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  var jsx_runtime_1 = require("react/jsx-runtime");
15
15
  var react_1 = require("react");
16
16
  var fbm_ui_1 = require("fbm-ui");
17
- var ai_report_1 = require("../../../../constants/ai-report");
18
17
  var global_store_1 = require("../../../../store/ai-report/global-store");
19
18
  var styled_1 = require("./styled");
20
19
  var ScoreSlider = function (props) {
@@ -28,9 +27,6 @@ var ScoreSlider = function (props) {
28
27
  (0, react_1.useEffect)(function () {
29
28
  setScore(Number(finalScore.toFixed(0)));
30
29
  }, [finalScore]);
31
- return ((0, jsx_runtime_1.jsxs)(styled_1.ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [scoreRankIntervals === null || scoreRankIntervals === void 0 ? void 0 : scoreRankIntervals.map(function (_a, index) {
32
- var rank = _a.rank, _b = _a.scoreRankIntervals, startRankProportion = _b.startRankProportion, endRankProportion = _b.endRankProportion, _c = _a.score, startScore = _c.startScore, endScore = _c.endScore;
33
- return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u524D".concat(startRankProportion * 100, "%-").concat(endRankProportion * 100, "%"), placement: "top" }, { children: (0, jsx_runtime_1.jsx)(styled_1.RankingRoot, { sx: { width: "".concat(endScore - startScore, "%"), left: "".concat(startScore, "%"), bgcolor: ai_report_1.scoreRankIntervalColors[index] } }) }), rank));
34
- }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: (0, jsx_runtime_1.jsx)(styled_1.AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) }))] })), (0, jsx_runtime_1.jsx)(styled_1.StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ width: 80, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
30
+ return ((0, jsx_runtime_1.jsxs)(styled_1.ScoreSliderRoot, __assign({ width: width }, { children: [isShowScoreRank && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "AI\u5F97\u5206\uFF1A".concat(aiScore), placement: "top" }, { children: (0, jsx_runtime_1.jsx)(styled_1.AiScoreRoot, { sx: { left: "calc(".concat(aiScore, "% - 12px)") } }) })) })), (0, jsx_runtime_1.jsx)(styled_1.StyledSlider, { valueLabelDisplay: valueLabelDisplay, value: score, onChange: handleScoreChange, onChangeCommitted: function () { return onChangeCommitted(score); } }), isShowLabel && ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ width: 80, flexShrink: 0, textAlign: "right", variant: "body2" }, { children: [score, "\u5206"] })))] })));
35
31
  };
36
32
  exports.default = ScoreSlider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",