eli-video-interview 1.2.15 → 1.2.17

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.
@@ -29,6 +29,6 @@ var Score = function (_a) {
29
29
  setOpenRefresh(false);
30
30
  }, [loading]);
31
31
  var content = (_jsxs(Box, __assign({ padding: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), _jsx(Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: _jsx(Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
32
- return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(score || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
32
+ return (_jsxs(Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [_jsx(RankingRange, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), _jsxs(Box, __assign({ flex: "1 0" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsxs(ScoreTypography, { children: [formatScore(score || 0), _jsx(ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), _jsx(Box, __assign({ width: 50, height: 50 }, { children: score && score >= 80 && _jsx("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && (_jsx(Button, __assign({ variant: "outlined", size: "small", icon: _jsx(DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), _jsxs(Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && (_jsx(Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: _jsx(RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), _jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", dayjs(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && (_jsx(Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), _jsx(Box, __assign({ width: 200 }, { children: _jsx(Bar, {}) }))] })));
33
33
  };
34
34
  export default Score;
@@ -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;
@@ -34,6 +34,6 @@ var Score = function (_a) {
34
34
  setOpenRefresh(false);
35
35
  }, [loading]);
36
36
  var content = ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ padding: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", color: "secondary" }, { children: "\u5237\u65B0\u540E\u5C06\u6309\u6700\u65B0\u7B97\u5206\u89C4\u5219\u8BA1\u7B97\uFF0C\u662F\u5426\u786E\u8BA4\u5237\u65B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ paddingTop: 1, textAlign: "right" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ loading: loading, onClick: onRefresh }, { children: "\u5237\u65B0" })) }))] })));
37
- return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [(0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreTypography, { children: [(0, utils_1.formatScore)(score || 0), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: (0, jsx_runtime_1.jsx)(styled_1.RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", (0, dayjs_1.default)(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200 }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, {}) }))] })));
37
+ return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", sx: { padding: '24px' } }, { children: [(0, jsx_runtime_1.jsx)(RankingRange_1.default, { open: openRankingRange, onClose: function () { return setOpenRankingRange(false); } }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(styled_1.ScoreTypography, { children: [(0, utils_1.formatScore)(score || 0), (0, jsx_runtime_1.jsx)(styled_1.ScoreUnitTypography, __assign({ variant: "caption" }, { children: "\u5206" }))] }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 50, height: 50 }, { children: score && score >= 80 && (0, jsx_runtime_1.jsx)("img", { src: "//webcdn.fbmms.cn/web/saas/asset/image/recommended.svg", alt: "" }) })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('export')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", size: "small", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.DownloadIcon, {}), sx: { ml: 1 }, onClick: onExportReportClick }, { children: "\u5BFC\u51FA\u62A5\u544A" })))] })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", mt: 1 }, { children: [(operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('refresh')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: openRefresh, content: content, onClickAway: function () { return setOpenRefresh(false); } }, { children: (0, jsx_runtime_1.jsx)(styled_1.RefreshIconRoot, { onClick: function () { return setOpenRefresh(true); } }) }))), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: 0.5 }, { children: ["\u62A5\u544A\u751F\u6210\u4E8E ", (0, dayjs_1.default)(createTime && createTime * 1000).format('YYYY-MM-DD HH:mm')] })), (operableButtons === null || operableButtons === void 0 ? void 0 : operableButtons.includes('scoreRank')) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", size: "small", sx: { textDecoration: 'underline' }, onClick: function () { return setOpenRankingRange(true); } }, { children: "\u6392\u540D\u533A\u95F4\u8BBE\u7F6E" })))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 200 }, { children: (0, jsx_runtime_1.jsx)(Bar_1.default, {}) }))] })));
38
38
  };
39
39
  exports.default = Score;
@@ -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.17",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",