eli-video-interview 1.2.18 → 1.2.19

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.
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ScoreProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const Score: FC<ScoreProps>;
4
4
  export default Score;
@@ -10,14 +10,14 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { useEffect, useState } from 'react';
14
- import { Box, Button, DownloadIcon, Popover, Typography } from 'fbm-ui';
15
- import dayjs from 'dayjs';
16
- import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
- import { formatScore } from "../../../../utils/utils";
18
13
  import RankingRange from '../RankingRange';
19
14
  import Bar from './Bar';
20
15
  import { RefreshIconRoot, ScoreTypography, ScoreUnitTypography } from './styled';
16
+ import { useAiReportStore } from "../../../../store/ai-report/global-store";
17
+ import { formatScore } from "../../../../utils/utils";
18
+ import dayjs from 'dayjs';
19
+ import { Box, Button, DownloadIcon, Popover, Typography } from 'fbm-ui';
20
+ import { useEffect, useState } from 'react';
21
21
  var Score = function (_a) {
22
22
  var loading = _a.loading, onRefresh = _a.onRefresh;
23
23
  var _b = useState(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
@@ -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(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, {}) }))] })));
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;
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
2
1
  import { ScoreProps } from './interface';
2
+ import { FC } from 'react';
3
3
  declare const Score: FC<ScoreProps>;
4
4
  export default Score;
@@ -15,14 +15,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
- var react_1 = require("react");
19
- var fbm_ui_1 = require("fbm-ui");
20
- var dayjs_1 = __importDefault(require("dayjs"));
21
- var global_store_1 = require("../../../../store/ai-report/global-store");
22
- var utils_1 = require("../../../../utils/utils");
23
18
  var RankingRange_1 = __importDefault(require("../RankingRange"));
24
19
  var Bar_1 = __importDefault(require("./Bar"));
25
20
  var styled_1 = require("./styled");
21
+ var global_store_1 = require("../../../../store/ai-report/global-store");
22
+ var utils_1 = require("../../../../utils/utils");
23
+ var dayjs_1 = __importDefault(require("dayjs"));
24
+ var fbm_ui_1 = require("fbm-ui");
25
+ var react_1 = require("react");
26
26
  var Score = function (_a) {
27
27
  var loading = _a.loading, onRefresh = _a.onRefresh;
28
28
  var _b = (0, react_1.useState)(false), openRankingRange = _b[0], setOpenRankingRange = _b[1];
@@ -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)(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, {}) }))] })));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.18",
3
+ "version": "1.2.19",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",