eli-video-interview 1.2.16 → 1.2.18
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.
- package/esm/components/Charts/ReportPie.js +10 -3
- package/esm/modules/ai-report/components/ScoreReport/Score.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +3 -0
- package/lib/components/Charts/ReportPie.js +10 -3
- package/lib/modules/ai-report/components/ScoreReport/Score.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +3 -0
- package/package.json +1 -1
|
@@ -23,6 +23,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import Chart from "./Chart";
|
|
25
25
|
import { levelMapping } from './const';
|
|
26
|
+
var formateTitle = function (originalTitle) {
|
|
27
|
+
var regex = /(\d+?)[.](.+)/;
|
|
28
|
+
if (!regex.test(originalTitle))
|
|
29
|
+
return originalTitle;
|
|
30
|
+
var _a = originalTitle.match(regex), no = _a[1];
|
|
31
|
+
return "\u7B2C".concat(no, "\u9898");
|
|
32
|
+
};
|
|
26
33
|
var ReportPie = function (props) {
|
|
27
34
|
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
|
|
28
35
|
var scores = source.map(function (_a) {
|
|
@@ -38,7 +45,7 @@ var ReportPie = function (props) {
|
|
|
38
45
|
var data = source
|
|
39
46
|
.map(function (_a) {
|
|
40
47
|
var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
|
|
41
|
-
return (__assign({ name: name, value: score }, params));
|
|
48
|
+
return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
|
|
42
49
|
})
|
|
43
50
|
.sort(function (a, b) {
|
|
44
51
|
return a.value - b.value;
|
|
@@ -47,8 +54,8 @@ var ReportPie = function (props) {
|
|
|
47
54
|
tooltip: {
|
|
48
55
|
trigger: 'item',
|
|
49
56
|
formatter: function (_a) {
|
|
50
|
-
var
|
|
51
|
-
return "".concat(
|
|
57
|
+
var value = _a.value, _b = _a.data, rank = _b.rank, total = _b.total, originalName = _b.originalName;
|
|
58
|
+
return "".concat(originalName, "<br />\u5F97\u5206\uFF1A").concat(value, "\u5206").concat(total > 0 ? "<br />\u6392\u540D\uFF1A".concat(rank, "/").concat(total) : '');
|
|
52
59
|
},
|
|
53
60
|
backgroundColor: 'rgba(0, 0, 0, 0.86)',
|
|
54
61
|
textStyle: {
|
|
@@ -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;
|
|
@@ -58,6 +58,9 @@ var QuestionItem = function (props) {
|
|
|
58
58
|
});
|
|
59
59
|
return content_1;
|
|
60
60
|
}
|
|
61
|
+
if (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.letter) {
|
|
62
|
+
return "\u6B63\u786E\u7B54\u6848\uFF1A".concat(analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.letter, " <br/> \u56DE\u7B54\uFF1A").concat(analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer);
|
|
63
|
+
}
|
|
61
64
|
return analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.text;
|
|
62
65
|
}, [analysisResult]);
|
|
63
66
|
var handleChangeCommitted = useCallback(function (score) {
|
|
@@ -28,6 +28,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
28
28
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
29
|
var Chart_1 = __importDefault(require("./Chart"));
|
|
30
30
|
var const_1 = require("./const");
|
|
31
|
+
var formateTitle = function (originalTitle) {
|
|
32
|
+
var regex = /(\d+?)[.](.+)/;
|
|
33
|
+
if (!regex.test(originalTitle))
|
|
34
|
+
return originalTitle;
|
|
35
|
+
var _a = originalTitle.match(regex), no = _a[1];
|
|
36
|
+
return "\u7B2C".concat(no, "\u9898");
|
|
37
|
+
};
|
|
31
38
|
var ReportPie = function (props) {
|
|
32
39
|
var id = props.id, _a = props.source, source = _a === void 0 ? [] : _a;
|
|
33
40
|
var scores = source.map(function (_a) {
|
|
@@ -43,7 +50,7 @@ var ReportPie = function (props) {
|
|
|
43
50
|
var data = source
|
|
44
51
|
.map(function (_a) {
|
|
45
52
|
var name = _a.name, score = _a.score, params = __rest(_a, ["name", "score"]);
|
|
46
|
-
return (__assign({ name: name, value: score }, params));
|
|
53
|
+
return (__assign({ name: formateTitle(name), originalName: name, value: score }, params));
|
|
47
54
|
})
|
|
48
55
|
.sort(function (a, b) {
|
|
49
56
|
return a.value - b.value;
|
|
@@ -52,8 +59,8 @@ var ReportPie = function (props) {
|
|
|
52
59
|
tooltip: {
|
|
53
60
|
trigger: 'item',
|
|
54
61
|
formatter: function (_a) {
|
|
55
|
-
var
|
|
56
|
-
return "".concat(
|
|
62
|
+
var value = _a.value, _b = _a.data, rank = _b.rank, total = _b.total, originalName = _b.originalName;
|
|
63
|
+
return "".concat(originalName, "<br />\u5F97\u5206\uFF1A").concat(value, "\u5206").concat(total > 0 ? "<br />\u6392\u540D\uFF1A".concat(rank, "/").concat(total) : '');
|
|
57
64
|
},
|
|
58
65
|
backgroundColor: 'rgba(0, 0, 0, 0.86)',
|
|
59
66
|
textStyle: {
|
|
@@ -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;
|
|
@@ -63,6 +63,9 @@ var QuestionItem = function (props) {
|
|
|
63
63
|
});
|
|
64
64
|
return content_1;
|
|
65
65
|
}
|
|
66
|
+
if (analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.letter) {
|
|
67
|
+
return "\u6B63\u786E\u7B54\u6848\uFF1A".concat(analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.letter, " <br/> \u56DE\u7B54\uFF1A").concat(analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.answer);
|
|
68
|
+
}
|
|
66
69
|
return analysisResult === null || analysisResult === void 0 ? void 0 : analysisResult.text;
|
|
67
70
|
}, [analysisResult]);
|
|
68
71
|
var handleChangeCommitted = (0, react_1.useCallback)(function (score) {
|