eli-video-interview 1.2.23 → 1.2.25
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/assets/icons/AI.svg +1 -0
- package/esm/components/AiHeaderTitle/index.d.ts +4 -0
- package/esm/components/AiHeaderTitle/index.js +19 -0
- package/esm/components/AiHeaderTitle/interface.d.ts +4 -0
- package/esm/components/AiHeaderTitle/interface.js +1 -0
- package/esm/components/Charts/Chart.d.ts +1 -1
- package/esm/components/Charts/Chart.js +8 -8
- package/esm/components/Charts/ReportPie.js +1 -1
- package/esm/modules/ai-ability/interface.d.ts +1 -0
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -7
- package/esm/modules/ai-question/components/AiAnalysis/index.js +9 -17
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +7 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +24 -23
- package/esm/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionModel/index.js +6 -6
- package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +19 -10
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +41 -8
- package/esm/modules/ai-question/interface.d.ts +2 -0
- package/esm/modules/ai-report/Root.js +7 -5
- package/esm/modules/ai-report/components/AIEvaluate/index.js +10 -9
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +3 -3
- package/esm/modules/ai-report/components/ScoreReport/Report.js +13 -5
- package/esm/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
- package/esm/modules/ai-report/components/Suggestion/Suggestion.js +29 -0
- package/esm/modules/ai-report/components/Suggestion/index.d.ts +2 -0
- package/esm/modules/ai-report/components/Suggestion/index.js +27 -0
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -9
- package/esm/modules/ai-report/components/VideoQuestion/index.js +4 -3
- package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/esm/modules/ai-report/components/WorkPlaces/ScoreSlider.js +24 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +55 -0
- package/esm/modules/ai-report/components/WorkPlaces/index.d.ts +2 -0
- package/esm/modules/ai-report/components/WorkPlaces/index.js +67 -0
- package/esm/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
- package/esm/modules/ai-report/components/WorkPlaces/interface.js +1 -0
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
- package/esm/modules/ai-report/components/WorkPlaces/styled.js +27 -0
- package/esm/modules/ai-report/interface.d.ts +38 -0
- package/esm/services/ai-ability.d.ts +1 -0
- package/esm/services/ai-report.d.ts +5 -0
- package/esm/services/ai-report.js +4 -0
- package/esm/store/ai-ability/question-ability-store.d.ts +12 -0
- package/esm/store/ai-ability/question-ability-store.js +10 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +7 -3
- package/esm/store/ai-question/ai-analysis-store.js +24 -10
- package/lib/assets/icons/AI.svg +1 -0
- package/lib/components/AiHeaderTitle/index.d.ts +4 -0
- package/lib/components/AiHeaderTitle/index.js +24 -0
- package/lib/components/AiHeaderTitle/interface.d.ts +4 -0
- package/lib/components/AiHeaderTitle/interface.js +2 -0
- package/lib/components/Charts/Chart.d.ts +1 -1
- package/lib/components/Charts/Chart.js +8 -8
- package/lib/components/Charts/ReportPie.js +1 -1
- package/lib/modules/ai-ability/interface.d.ts +1 -0
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +12 -7
- package/lib/modules/ai-question/components/AiAnalysis/index.js +8 -16
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +6 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +8 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.d.ts +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +24 -23
- package/lib/modules/ai-question/components/AiAssessmentCriteria/interface.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionModel/index.js +6 -6
- package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +19 -10
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +41 -8
- package/lib/modules/ai-question/interface.d.ts +2 -0
- package/lib/modules/ai-report/Root.js +7 -5
- package/lib/modules/ai-report/components/AIEvaluate/index.js +9 -8
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +3 -3
- package/lib/modules/ai-report/components/ScoreReport/Report.js +13 -5
- package/lib/modules/ai-report/components/Suggestion/Suggestion.d.ts +4 -0
- package/lib/modules/ai-report/components/Suggestion/Suggestion.js +31 -0
- package/lib/modules/ai-report/components/Suggestion/index.d.ts +2 -0
- package/lib/modules/ai-report/components/Suggestion/index.js +32 -0
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +5 -5
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.d.ts +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +9 -9
- package/lib/modules/ai-report/components/VideoQuestion/index.js +4 -3
- package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.d.ts +4 -0
- package/lib/modules/ai-report/components/WorkPlaces/ScoreSlider.js +26 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.d.ts +11 -0
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +57 -0
- package/lib/modules/ai-report/components/WorkPlaces/index.d.ts +2 -0
- package/lib/modules/ai-report/components/WorkPlaces/index.js +72 -0
- package/lib/modules/ai-report/components/WorkPlaces/interface.d.ts +7 -0
- package/lib/modules/ai-report/components/WorkPlaces/interface.js +2 -0
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +62 -0
- package/lib/modules/ai-report/components/WorkPlaces/styled.js +30 -0
- package/lib/modules/ai-report/interface.d.ts +38 -0
- package/lib/services/ai-ability.d.ts +1 -0
- package/lib/services/ai-report.d.ts +5 -0
- package/lib/services/ai-report.js +6 -1
- package/lib/store/ai-ability/question-ability-store.d.ts +12 -0
- package/lib/store/ai-ability/question-ability-store.js +13 -0
- package/lib/store/ai-question/ai-analysis-store.d.ts +7 -3
- package/lib/store/ai-question/ai-analysis-store.js +24 -10
- package/package.json +1 -7
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
var ai_report_1 = require("../../../../services/ai-report");
|
|
16
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
17
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
18
|
+
var react_1 = require("react");
|
|
19
|
+
var Evaluate = function (_a) {
|
|
20
|
+
var answer = _a.answer, token = _a.token, bgcolor = _a.bgcolor, _b = _a.mode, mode = _b === void 0 ? 'show' : _b, _c = _a.canEdit, canEdit = _c === void 0 ? 'true' : _c;
|
|
21
|
+
var _d = (0, react_1.useState)(answer), content = _d[0], setContent = _d[1];
|
|
22
|
+
var _e = (0, react_1.useState)('show'), internalMode = _e[0], setInternalMode = _e[1];
|
|
23
|
+
var handleChange = (0, react_1.useCallback)(function (e) {
|
|
24
|
+
var value = e.target.value;
|
|
25
|
+
setContent(value);
|
|
26
|
+
}, []);
|
|
27
|
+
var handleModeChange = (0, react_1.useCallback)(function () {
|
|
28
|
+
setInternalMode(internalMode === 'show' ? 'edit' : 'show');
|
|
29
|
+
}, [internalMode]);
|
|
30
|
+
var handleSubmit = (0, react_1.useCallback)(function () {
|
|
31
|
+
(0, fbm_ui_1.confirm)({
|
|
32
|
+
header: null,
|
|
33
|
+
content: '确认将评价内容修改吗?该动作无法被撤销。',
|
|
34
|
+
okText: '修改',
|
|
35
|
+
okProps: {
|
|
36
|
+
color: 'error',
|
|
37
|
+
variant: 'contained',
|
|
38
|
+
},
|
|
39
|
+
onOk: function (_a) {
|
|
40
|
+
var onClose = _a.onClose;
|
|
41
|
+
var data = {
|
|
42
|
+
token: token,
|
|
43
|
+
answer: content,
|
|
44
|
+
};
|
|
45
|
+
(0, ai_report_1.PostAiInterviewWorkplace)(data).then(handleModeChange).then(onClose).catch(console.log);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}, [token, content, handleModeChange]);
|
|
49
|
+
(0, react_1.useEffect)(function () {
|
|
50
|
+
setInternalMode(mode);
|
|
51
|
+
}, [mode]);
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", justifyContent: "flex-end" }, { children: canEdit && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ onClick: handleModeChange }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))) })), internalMode === 'edit' && ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ width: 1, pr: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto', pr: 0 }, multiline: true, rows: 3.5, required: true, name: "name", placeholder: "", value: content, onChange: handleChange }), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ boxSizing: "border-box", mr: 2, mt: 1, spacing: 1, direction: "row", width: 1, justifyContent: "flex-end" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ size: "medium", variant: "text", color: "secondary", onClick: function () {
|
|
53
|
+
handleModeChange();
|
|
54
|
+
setContent(answer);
|
|
55
|
+
} }, { 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)(mui_1.Box, __assign({ style: { padding: 8, borderRadius: 4, overflow: 'hidden', background: bgcolor } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { whiteSpace: 'pre-wrap', color: 'RGBA(0, 0, 0, 0.56)' } }, { children: content })) })))] }));
|
|
56
|
+
};
|
|
57
|
+
exports.default = Evaluate;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var ScoreSlider_1 = __importDefault(require("./ScoreSlider"));
|
|
19
|
+
var WorkPlace_1 = __importDefault(require("./WorkPlace"));
|
|
20
|
+
var global_store_1 = require("../../../../store/ai-report/global-store");
|
|
21
|
+
var AiHeaderTitle_1 = __importDefault(require("../../../../components/AiHeaderTitle"));
|
|
22
|
+
var colors_1 = require("@mui/material/colors");
|
|
23
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
24
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
25
|
+
var TagTitle = (0, fbm_ui_1.styled)(mui_1.Box)(function (bgcolor) { return ({
|
|
26
|
+
position: 'relative',
|
|
27
|
+
width: 100,
|
|
28
|
+
height: 32,
|
|
29
|
+
display: 'inline-block',
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
backgroundColor: bgcolor[200],
|
|
32
|
+
margin: '8px 0 16px',
|
|
33
|
+
'&:before': {
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
content: '""',
|
|
36
|
+
right: '-16px',
|
|
37
|
+
top: 0,
|
|
38
|
+
width: 0,
|
|
39
|
+
height: 0,
|
|
40
|
+
borderStyle: 'solid',
|
|
41
|
+
borderColor: 'transparent',
|
|
42
|
+
borderTop: 'solid #fff',
|
|
43
|
+
borderWidth: '16px',
|
|
44
|
+
},
|
|
45
|
+
'&:after': {
|
|
46
|
+
position: 'absolute',
|
|
47
|
+
content: '""',
|
|
48
|
+
right: '-16px',
|
|
49
|
+
top: 0,
|
|
50
|
+
width: 0,
|
|
51
|
+
height: 0,
|
|
52
|
+
borderStyle: 'solid',
|
|
53
|
+
borderColor: 'transparent',
|
|
54
|
+
borderBottom: 'solid #fff',
|
|
55
|
+
borderWidth: '16px',
|
|
56
|
+
},
|
|
57
|
+
}); });
|
|
58
|
+
var ColorIndexMap = {
|
|
59
|
+
0: colors_1.blue,
|
|
60
|
+
1: colors_1.orange,
|
|
61
|
+
2: colors_1.purple,
|
|
62
|
+
};
|
|
63
|
+
var Index = function () {
|
|
64
|
+
var _a;
|
|
65
|
+
var _b = (0, global_store_1.useAiReportStore)(function (store) { return [store.reportResult, store.operableButtons]; }), reportResult = _b.reportResult, showAiDimension = _b.showAiDimension, canEditAiDimension = _b.canEditAiDimension;
|
|
66
|
+
if (!showAiDimension)
|
|
67
|
+
return null;
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, variant: "outlined", px: 2, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", height: 56, alignItems: "center", spacing: 1, marginBottom: 1 }, { children: (0, jsx_runtime_1.jsx)(AiHeaderTitle_1.default, { name: "\u804C\u573A\u80FD\u529B\u8868\u73B0" }) })), (0, jsx_runtime_1.jsx)(mui_1.Collapse, __assign({ in: true }, { children: (_a = reportResult === null || reportResult === void 0 ? void 0 : reportResult.workplaces) === null || _a === void 0 ? void 0 : _a.map(function (v, idx) {
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ component: mui_1.Paper, variant: "outlined", elevation: 0, mb: 2, pb: 2, pr: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(TagTitle, __assign({ bgcolor: ColorIndexMap[idx % 3][200] }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1", fontWeight: "medium", style: { lineHeight: '32px', color: '#fff' } }, { children: v.dimensionName })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: (0, jsx_runtime_1.jsxs)("span", { children: ["\u9AD8\u5206\u8868\u73B0\uFF1A", v.abilityExpression.good, (0, jsx_runtime_1.jsx)("br", {}), "\u4F4E\u5206\u8868\u73B0\uFF1A", v.abilityExpression.bad] }) }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", style: { lineHeight: '32px' }, mr: 1 }, { children: "\u4F18\u6B21\u8868\u73B0" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoOutlineIcon, { sx: { fontSize: '16px' } })] })) }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary", ml: 2, style: { background: '#F5F5F5', borderRadius: 4, padding: 8 } }, { children: v.define })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ pl: 2 }, { children: [(0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(ScoreSlider_1.default, { width: "100%", isShowLabel: true, score: v.score, scoreText: v.scoreText, scoreLevel: v.scoreLevel }) })), (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 2 }, { children: (0, jsx_runtime_1.jsx)(WorkPlace_1.default, { token: v.token, canEdit: canEditAiDimension, answer: v.answer, mode: "show", bgcolor: ColorIndexMap[idx % 3][50] }) }))] }))] }), v.token));
|
|
70
|
+
}) }))] })));
|
|
71
|
+
};
|
|
72
|
+
exports.default = Index;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WorkPlaceScoreInfo } from '../../interface';
|
|
2
|
+
export interface ScoreSliderProps extends Pick<WorkPlaceScoreInfo, 'score' | 'scoreText' | 'scoreLevel'> {
|
|
3
|
+
width?: any;
|
|
4
|
+
valueLabelDisplay?: 'on' | 'off' | 'auto';
|
|
5
|
+
isShowLabel?: boolean;
|
|
6
|
+
onChangeCommitted?: (score: number) => void;
|
|
7
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WorkplaceStyledSlider: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
color?: "secondary" | "primary" | undefined;
|
|
4
|
+
classes?: (Partial<import("fbm-ui/lib/mui").SliderUnstyledClasses> & {
|
|
5
|
+
colorPrimary?: string | undefined;
|
|
6
|
+
colorSecondary?: string | undefined;
|
|
7
|
+
sizeSmall?: string | undefined;
|
|
8
|
+
thumbColorPrimary?: string | undefined;
|
|
9
|
+
thumbColorSecondary?: string | undefined;
|
|
10
|
+
thumbSizeSmall?: string | undefined;
|
|
11
|
+
}) | undefined;
|
|
12
|
+
size?: "small" | "medium" | undefined;
|
|
13
|
+
sx?: import("@mui/system").SxProps<import("fbm-ui/lib/mui").Theme> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
'aria-label'?: string | undefined;
|
|
16
|
+
'aria-labelledby'?: string | undefined;
|
|
17
|
+
'aria-valuetext'?: string | undefined;
|
|
18
|
+
classes?: Partial<import("fbm-ui/lib/mui").SliderUnstyledClasses> | undefined;
|
|
19
|
+
components?: {
|
|
20
|
+
Root?: import("react").ElementType<any> | undefined;
|
|
21
|
+
Track?: import("react").ElementType<any> | undefined;
|
|
22
|
+
Rail?: import("react").ElementType<any> | undefined;
|
|
23
|
+
Thumb?: import("react").ElementType<any> | undefined;
|
|
24
|
+
Mark?: import("react").ElementType<any> | undefined;
|
|
25
|
+
MarkLabel?: import("react").ElementType<any> | undefined;
|
|
26
|
+
ValueLabel?: import("react").ElementType<any> | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
componentsProps?: {
|
|
29
|
+
root?: (import("react").HTMLAttributes<HTMLSpanElement> & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
30
|
+
track?: (import("react").HTMLAttributes<HTMLSpanElement> & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
31
|
+
rail?: (import("react").HTMLAttributes<HTMLSpanElement> & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
32
|
+
thumb?: (import("react").HTMLAttributes<HTMLSpanElement> & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
33
|
+
mark?: (import("react").HTMLAttributes<HTMLSpanElement> & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
34
|
+
markLabel?: (import("react").HTMLAttributes<HTMLSpanElement> & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
35
|
+
valueLabel?: (import("fbm-ui/lib/mui").ValueLabelUnstyledProps & import("fbm-ui/lib/mui").SliderUnstyledComponentsPropsOverrides) | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
defaultValue?: number | number[] | undefined;
|
|
38
|
+
disabled?: boolean | undefined;
|
|
39
|
+
disableSwap?: boolean | undefined;
|
|
40
|
+
getAriaLabel?: ((index: number) => string) | undefined;
|
|
41
|
+
getAriaValueText?: ((value: number, index: number) => string) | undefined;
|
|
42
|
+
isRtl?: boolean | undefined;
|
|
43
|
+
marks?: boolean | import("fbm-ui/lib/mui").Mark[] | undefined;
|
|
44
|
+
max?: number | undefined;
|
|
45
|
+
min?: number | undefined;
|
|
46
|
+
name?: string | undefined;
|
|
47
|
+
onChange?: ((event: Event, value: number | number[], activeThumb: number) => void) | undefined;
|
|
48
|
+
onChangeCommitted?: ((event: Event | import("react").SyntheticEvent<Element, Event>, value: number | number[]) => void) | undefined;
|
|
49
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
50
|
+
scale?: ((value: number) => number) | undefined;
|
|
51
|
+
step?: number | null | undefined;
|
|
52
|
+
tabIndex?: number | undefined;
|
|
53
|
+
track?: false | "normal" | "inverted" | undefined;
|
|
54
|
+
value?: number | number[] | undefined;
|
|
55
|
+
valueLabelDisplay?: "on" | "off" | "auto" | undefined;
|
|
56
|
+
valueLabelFormat?: string | ((value: number, index: number) => import("react").ReactNode) | undefined;
|
|
57
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
58
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
59
|
+
}, "track" | "name" | "classes" | "color" | "scale" | "sx" | "defaultValue" | "tabIndex" | "aria-label" | "aria-labelledby" | "aria-valuetext" | "onChange" | "disabled" | "max" | "min" | "orientation" | "size" | "step" | "value" | "components" | "componentsProps" | "disableSwap" | "getAriaLabel" | "getAriaValueText" | "isRtl" | "marks" | "onChangeCommitted" | "valueLabelDisplay" | "valueLabelFormat"> & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
60
|
+
export declare const ScoreSliderRoot: import("@emotion/styled").StyledComponent<import("fbm-ui/lib/components/Box").BoxProps & {
|
|
61
|
+
children?: import("react").ReactNode;
|
|
62
|
+
} & import("@mui/system").MUIStyledCommonProps<import("fbm-ui/lib/mui").Theme>, {}, {}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScoreSliderRoot = exports.WorkplaceStyledSlider = void 0;
|
|
4
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
5
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
6
|
+
exports.WorkplaceStyledSlider = (0, fbm_ui_1.styled)(mui_1.Slider)(function () { return ({
|
|
7
|
+
color: 'transparent',
|
|
8
|
+
height: 8,
|
|
9
|
+
'& .MuiSlider-rail': {
|
|
10
|
+
// backgroundColor: '#ECEFF1',
|
|
11
|
+
opacity: 1,
|
|
12
|
+
background: 'linear-gradient(90deg, RGB(229, 115, 115), RGB(255, 183, 77) 50%, RGB(0, 217, 157))',
|
|
13
|
+
},
|
|
14
|
+
'& .MuiSlider-track': {
|
|
15
|
+
border: 'none',
|
|
16
|
+
background: 'transparent',
|
|
17
|
+
},
|
|
18
|
+
'& .MuiSlider-thumb': {
|
|
19
|
+
height: 16,
|
|
20
|
+
width: 16,
|
|
21
|
+
backgroundColor: '#fff',
|
|
22
|
+
zIndex: 2,
|
|
23
|
+
boxShadow: '0 4px 8px RGBA(0, 0, 0, 0.16)',
|
|
24
|
+
},
|
|
25
|
+
}); });
|
|
26
|
+
exports.ScoreSliderRoot = (0, fbm_ui_1.styled)(fbm_ui_1.Box)({
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
});
|
|
@@ -51,6 +51,7 @@ export interface ScoreInfo {
|
|
|
51
51
|
finalScore: number;
|
|
52
52
|
score: number;
|
|
53
53
|
abilities: Ability[];
|
|
54
|
+
workplaces: Ability[];
|
|
54
55
|
}
|
|
55
56
|
export interface AiEvaluation {
|
|
56
57
|
assessmentPoint: string[];
|
|
@@ -58,6 +59,36 @@ export interface AiEvaluation {
|
|
|
58
59
|
increasePoint: any[];
|
|
59
60
|
decreasePoint: any[];
|
|
60
61
|
}
|
|
62
|
+
export interface AbilityExpression {
|
|
63
|
+
bad: string;
|
|
64
|
+
good: string;
|
|
65
|
+
}
|
|
66
|
+
export interface WorkPlaceAbility {
|
|
67
|
+
abilityExpression: AbilityExpression;
|
|
68
|
+
answer: string;
|
|
69
|
+
define: string;
|
|
70
|
+
dimensionName: string;
|
|
71
|
+
dimensionType: number;
|
|
72
|
+
score: number;
|
|
73
|
+
scoreLevel: number;
|
|
74
|
+
scoreText: string;
|
|
75
|
+
token: string;
|
|
76
|
+
}
|
|
77
|
+
export interface WorkPlaceScoreInfo {
|
|
78
|
+
score: number;
|
|
79
|
+
scoreText: string;
|
|
80
|
+
scoreLevel: number;
|
|
81
|
+
}
|
|
82
|
+
export interface SuggestionAbility {
|
|
83
|
+
abilityName: string;
|
|
84
|
+
interviewQuestion: Array<string>;
|
|
85
|
+
keyPoints: Array<string>;
|
|
86
|
+
}
|
|
87
|
+
export interface Suggestion {
|
|
88
|
+
text: string;
|
|
89
|
+
show: boolean;
|
|
90
|
+
abilitys: SuggestionAbility[];
|
|
91
|
+
}
|
|
61
92
|
export interface AiInterviewReportStep {
|
|
62
93
|
token: string;
|
|
63
94
|
status: number;
|
|
@@ -70,6 +101,10 @@ export interface FaceAnalysis {
|
|
|
70
101
|
age: number;
|
|
71
102
|
beauty: number;
|
|
72
103
|
}
|
|
104
|
+
export interface SummaryText {
|
|
105
|
+
sprintf: string;
|
|
106
|
+
variables: Array<string>;
|
|
107
|
+
}
|
|
73
108
|
export interface AiInterviewReportList {
|
|
74
109
|
orderToken: string;
|
|
75
110
|
aiModel: AiModel;
|
|
@@ -77,6 +112,9 @@ export interface AiInterviewReportList {
|
|
|
77
112
|
faceUrl: string;
|
|
78
113
|
faceAnalysis: FaceAnalysis;
|
|
79
114
|
evaluations: Array<any>;
|
|
115
|
+
workplaces: WorkPlaceAbility[];
|
|
116
|
+
suggestion: Suggestion;
|
|
117
|
+
summaryText: SummaryText;
|
|
80
118
|
score: number;
|
|
81
119
|
status: number;
|
|
82
120
|
completedStatus: number;
|
|
@@ -6,4 +6,9 @@ interface PostAiInterviewEvaluationData {
|
|
|
6
6
|
manualSuggestions?: Array<string>;
|
|
7
7
|
}
|
|
8
8
|
export declare const PostAiInterviewEvaluation: <R>(data: PostAiInterviewEvaluationData) => import("axios").AxiosPromise<R>;
|
|
9
|
+
interface PostAiInterviewWorkplaceData {
|
|
10
|
+
token: string;
|
|
11
|
+
answer?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const PostAiInterviewWorkplace: <R>(data: PostAiInterviewWorkplaceData) => import("axios").AxiosPromise<R>;
|
|
9
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostAiInterviewEvaluation = exports.PostAiInterviewRefresh = exports.PostAiInterviewResult = void 0;
|
|
3
|
+
exports.PostAiInterviewWorkplace = exports.PostAiInterviewEvaluation = exports.PostAiInterviewRefresh = exports.PostAiInterviewResult = void 0;
|
|
4
4
|
var request_1 = require("../utils/request");
|
|
5
5
|
// 查询面试结果
|
|
6
6
|
var PostAiInterviewResult = function (orderTokens) { return (0, request_1.POST)({ url: "/standard/b/aiInterview/result", data: { orderTokens: orderTokens } }); };
|
|
@@ -13,3 +13,8 @@ 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
|
+
// 更新职场能力回答
|
|
17
|
+
var PostAiInterviewWorkplace = function (data) {
|
|
18
|
+
return (0, request_1.POST)({ url: "/standard/b/aiInterview/workplace/answer/modify", data: data });
|
|
19
|
+
};
|
|
20
|
+
exports.PostAiInterviewWorkplace = PostAiInterviewWorkplace;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { QuestionCollectionList } from '@/modules/ai-ability/interface';
|
|
3
|
+
export declare const useQuestionCollectionListStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
4
|
+
questionCollectionList: QuestionCollectionList[];
|
|
5
|
+
updateQuestionCollectionList: import("react").Dispatch<import("react").SetStateAction<QuestionCollectionList[]>>;
|
|
6
|
+
}> | undefined) => {
|
|
7
|
+
questionCollectionList: QuestionCollectionList[];
|
|
8
|
+
updateQuestionCollectionList: import("react").Dispatch<import("react").SetStateAction<QuestionCollectionList[]>>;
|
|
9
|
+
}, getQuestionCollectionListStore: () => {
|
|
10
|
+
questionCollectionList: QuestionCollectionList[];
|
|
11
|
+
updateQuestionCollectionList: import("react").Dispatch<import("react").SetStateAction<QuestionCollectionList[]>>;
|
|
12
|
+
} | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getQuestionCollectionListStore = exports.useQuestionCollectionListStore = void 0;
|
|
5
|
+
var hox_1 = require("hox");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
exports.useQuestionCollectionListStore = (_a = (0, hox_1.createGlobalStore)(function () {
|
|
8
|
+
var _a = (0, react_1.useState)([]), questionCollectionList = _a[0], updateQuestionCollectionList = _a[1];
|
|
9
|
+
return {
|
|
10
|
+
questionCollectionList: questionCollectionList,
|
|
11
|
+
updateQuestionCollectionList: updateQuestionCollectionList,
|
|
12
|
+
};
|
|
13
|
+
}), _a[0]), exports.getQuestionCollectionListStore = _a[1];
|
|
@@ -1,25 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AiAbilityItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
|
|
2
|
+
import { AiAbilityItem, WorkplaceItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
|
|
3
3
|
import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
|
|
4
4
|
interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn<{
|
|
7
7
|
aiAbilities: AiAbilityItem[];
|
|
8
|
+
workplaces: WorkplaceItem[];
|
|
8
9
|
analysisState: AnalysisStateParams;
|
|
9
10
|
keyPointAnalysisError: number[];
|
|
10
11
|
updateState: (params: Partial<AnalysisStateParams>) => void;
|
|
11
|
-
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
12
|
+
updateAiAbilities: (data: AiAbilityItem[], inInit?: any, isWorkplaceChange?: any) => void;
|
|
12
13
|
updateAiAbilitiesWeight: (value: string, index: number) => void;
|
|
13
14
|
removeAiAbilities: (index: number) => void;
|
|
15
|
+
updateWorkplaces: (data: WorkplaceItem[]) => void;
|
|
14
16
|
setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
15
17
|
}> | undefined) => {
|
|
16
18
|
aiAbilities: AiAbilityItem[];
|
|
19
|
+
workplaces: WorkplaceItem[];
|
|
17
20
|
analysisState: AnalysisStateParams;
|
|
18
21
|
keyPointAnalysisError: number[];
|
|
19
22
|
updateState: (params: Partial<AnalysisStateParams>) => void;
|
|
20
|
-
updateAiAbilities: (data: AiAbilityItem[], inInit?: any) => void;
|
|
23
|
+
updateAiAbilities: (data: AiAbilityItem[], inInit?: any, isWorkplaceChange?: any) => void;
|
|
21
24
|
updateAiAbilitiesWeight: (value: string, index: number) => void;
|
|
22
25
|
removeAiAbilities: (index: number) => void;
|
|
26
|
+
updateWorkplaces: (data: WorkplaceItem[]) => void;
|
|
23
27
|
setKeyPointAnalysisError: import("react").Dispatch<import("react").SetStateAction<number[]>>;
|
|
24
28
|
}, AiAnalysisStoreProvider: import("react").FC<{
|
|
25
29
|
children?: import("react").ReactNode;
|
|
@@ -16,25 +16,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
var _a;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.AiAnalysisStoreProvider = exports.useAiAnalysisStore = void 0;
|
|
19
|
-
var
|
|
19
|
+
var question_update_store_1 = require("./question-update-store");
|
|
20
|
+
var utils_1 = require("../../utils/utils");
|
|
20
21
|
var ahooks_1 = require("ahooks");
|
|
21
22
|
var hox_1 = require("hox");
|
|
22
23
|
var immutability_helper_1 = __importDefault(require("immutability-helper"));
|
|
23
|
-
var
|
|
24
|
-
var utils_1 = require("../../utils/utils");
|
|
24
|
+
var react_1 = require("react");
|
|
25
25
|
var defaultAnalysisState = { aiSwitch: 2, language: 1 };
|
|
26
26
|
exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
27
27
|
var questionState = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }).questionState;
|
|
28
28
|
var _a = (0, react_1.useState)([]), aiAbilities = _a[0], setAiAbilities = _a[1];
|
|
29
|
-
var _b = (0,
|
|
30
|
-
var _c = (0,
|
|
29
|
+
var _b = (0, react_1.useState)([]), workplaces = _b[0], setWorkplaces = _b[1];
|
|
30
|
+
var _c = (0, ahooks_1.useSetState)(defaultAnalysisState), analysisState = _c[0], setState = _c[1];
|
|
31
|
+
var _d = (0, react_1.useState)([]), keyPointAnalysisError = _d[0], setKeyPointAnalysisError = _d[1];
|
|
31
32
|
var updateState = function (params) { return setState(params); };
|
|
32
33
|
/**
|
|
33
34
|
* 权重值计算
|
|
34
35
|
* @param steps 模型数据
|
|
35
36
|
*/
|
|
36
|
-
var computeWeight = (0, react_1.useCallback)(function (data, inInit) {
|
|
37
|
+
var computeWeight = (0, react_1.useCallback)(function (data, inInit, isWorkplaceChange) {
|
|
37
38
|
if (inInit === void 0) { inInit = false; }
|
|
39
|
+
if (isWorkplaceChange === void 0) { isWorkplaceChange = false; }
|
|
38
40
|
var weightList = data.filter(function (_a) {
|
|
39
41
|
var isNotCompute = _a.isNotCompute;
|
|
40
42
|
return !isNotCompute;
|
|
@@ -50,7 +52,7 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
50
52
|
}).reduce(function (pv, i) { return pv + i; }, 0);
|
|
51
53
|
var getWeight = function (_a) {
|
|
52
54
|
var token = _a.token, weight = _a.weight;
|
|
53
|
-
if (weightsLen <= 1 && !inInit) {
|
|
55
|
+
if (weightsLen <= 1 && !inInit && isWorkplaceChange) {
|
|
54
56
|
var dataLength = data.length;
|
|
55
57
|
var averageWeight = Math.floor((100 / dataLength) * 100) / 100;
|
|
56
58
|
var disableWeight = 100 - Math.floor(averageWeight * (dataLength - 1) * 100) / 100;
|
|
@@ -65,7 +67,7 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
65
67
|
return [
|
|
66
68
|
i,
|
|
67
69
|
1,
|
|
68
|
-
__assign(__assign({}, item), { isNotCompute: false, weight: getWeight(item) }),
|
|
70
|
+
__assign(__assign({}, item), { isNotCompute: false, weight: isWorkplaceChange ? item.weight : getWeight(item) }),
|
|
69
71
|
];
|
|
70
72
|
});
|
|
71
73
|
setAiAbilities((0, immutability_helper_1.default)(data, { $splice: $splice }));
|
|
@@ -73,8 +75,9 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
73
75
|
/**
|
|
74
76
|
* 更新AI分析维度
|
|
75
77
|
*/
|
|
76
|
-
var updateAiAbilities = (0, react_1.useCallback)(function (data, inInit) {
|
|
78
|
+
var updateAiAbilities = (0, react_1.useCallback)(function (data, inInit, isWorkplaceChange) {
|
|
77
79
|
if (inInit === void 0) { inInit = false; }
|
|
80
|
+
if (isWorkplaceChange === void 0) { isWorkplaceChange = false; }
|
|
78
81
|
console.log(data);
|
|
79
82
|
data.forEach(function (item) {
|
|
80
83
|
if (item.isNotCompute === undefined) {
|
|
@@ -88,8 +91,11 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
88
91
|
item.extra = JSON.stringify({ expect: 'positive' });
|
|
89
92
|
}
|
|
90
93
|
}
|
|
94
|
+
if (item.abilityType === 2) {
|
|
95
|
+
// setWorkplaces([item]);
|
|
96
|
+
}
|
|
91
97
|
});
|
|
92
|
-
computeWeight(data, inInit);
|
|
98
|
+
computeWeight(data, inInit, isWorkplaceChange);
|
|
93
99
|
}, [computeWeight]);
|
|
94
100
|
/**
|
|
95
101
|
* 更新AI分析维度权重
|
|
@@ -117,6 +123,12 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
117
123
|
setAiAbilities(newAiAbilities);
|
|
118
124
|
}
|
|
119
125
|
}, [aiAbilities, computeWeight]);
|
|
126
|
+
/**
|
|
127
|
+
* 更新考察能力分析维度
|
|
128
|
+
*/
|
|
129
|
+
var updateWorkplaces = (0, react_1.useCallback)(function (data) {
|
|
130
|
+
setWorkplaces(data);
|
|
131
|
+
}, [setWorkplaces]);
|
|
120
132
|
(0, react_1.useEffect)(function () {
|
|
121
133
|
if (!questionState.open) {
|
|
122
134
|
setTimeout(function () {
|
|
@@ -128,12 +140,14 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
128
140
|
}, [questionState.open, setState]);
|
|
129
141
|
return {
|
|
130
142
|
aiAbilities: aiAbilities,
|
|
143
|
+
workplaces: workplaces,
|
|
131
144
|
analysisState: analysisState,
|
|
132
145
|
keyPointAnalysisError: keyPointAnalysisError,
|
|
133
146
|
updateState: updateState,
|
|
134
147
|
updateAiAbilities: updateAiAbilities,
|
|
135
148
|
updateAiAbilitiesWeight: updateAiAbilitiesWeight,
|
|
136
149
|
removeAiAbilities: removeAiAbilities,
|
|
150
|
+
updateWorkplaces: updateWorkplaces,
|
|
137
151
|
setKeyPointAnalysisError: setKeyPointAnalysisError,
|
|
138
152
|
};
|
|
139
153
|
}), _a[0]), exports.AiAnalysisStoreProvider = _a[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eli-video-interview",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
4
4
|
"description": "鳄梨科技 AI视频面试 React SDK",
|
|
5
5
|
"author": "鳄梨科技",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,12 +29,6 @@
|
|
|
29
29
|
"typescript": "^4.7.2",
|
|
30
30
|
"use-immer": "^0.7.0"
|
|
31
31
|
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@types/jest": "^27.5.1",
|
|
34
|
-
"@types/node": "^16.11.36",
|
|
35
|
-
"@types/react": "^17.0.0",
|
|
36
|
-
"@types/react-dom": "^17.0.0"
|
|
37
|
-
},
|
|
38
32
|
"scripts": {
|
|
39
33
|
"clean": "rimraf lib esm build",
|
|
40
34
|
"serve": "npm run dev",
|