eli-video-interview 1.2.40-alpha.2 → 1.2.40-alpha.4
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/modules/ai-question/components/QuestionUpdate/Chioce.js +6 -5
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +1 -2
- package/esm/modules/ai-report/Root.js +1 -1
- package/esm/modules/ai-report/components/VideoQuestion/SingleChoice.js +7 -1
- package/esm/store/ai-question/ai-analysis-store.js +0 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +6 -5
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +1 -2
- package/lib/modules/ai-report/Root.js +1 -1
- package/lib/modules/ai-report/components/VideoQuestion/SingleChoice.js +7 -1
- package/lib/store/ai-question/ai-analysis-store.js +0 -1
- package/package.json +1 -1
|
@@ -56,17 +56,18 @@ var Choice = function (_a) {
|
|
|
56
56
|
onEnd: function (_a) {
|
|
57
57
|
var oldIndex = _a.oldIndex, newIndex = _a.newIndex;
|
|
58
58
|
if (helper.current) {
|
|
59
|
-
helper.current.
|
|
59
|
+
helper.current.move(oldIndex, newIndex);
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
});
|
|
63
|
-
}, [index, item, onChange]);
|
|
63
|
+
}, [index, item, onChange, helper]);
|
|
64
64
|
useEffect(function () {
|
|
65
65
|
var _a;
|
|
66
66
|
if (!((_a = item === null || item === void 0 ? void 0 : item.options) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
67
|
-
|
|
67
|
+
var optionItem = { key: uniqueId(), content: '', score: 0 };
|
|
68
|
+
onChange('options', [optionItem], index);
|
|
68
69
|
}
|
|
69
|
-
}, [item,
|
|
70
|
+
}, [item, onChange, index]);
|
|
70
71
|
return (_jsxs(Box, __assign({ width: "100%" }, { children: [_jsx(Box, __assign({ ref: ref }, { children: ((_b = item === null || item === void 0 ? void 0 : item.options) === null || _b === void 0 ? void 0 : _b.length) > 0 && (_jsx(FieldArray, { name: "questions.".concat(index, ".options"), render: function (p) {
|
|
71
72
|
var _a;
|
|
72
73
|
helper.current = p;
|
|
@@ -89,7 +90,7 @@ var Choice = function (_a) {
|
|
|
89
90
|
return;
|
|
90
91
|
}
|
|
91
92
|
onChange('options', __spreadArray([], ((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); }), true), index);
|
|
92
|
-
} }, { children: _jsx(ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] },
|
|
93
|
+
} }, { children: _jsx(ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] }, v.key || uniqueId()));
|
|
93
94
|
});
|
|
94
95
|
} })) })), _jsx(ChoiceItem, { children: _jsx(Button, __assign({ icon: _jsx(AddIcon, {}), variant: "outlined", color: "inherit", size: "small", onClick: handleOptionAdd, sx: { ml: -2 } }, { children: "\u6DFB\u52A0\u9009\u9879" })) })] })));
|
|
95
96
|
};
|
|
@@ -161,7 +161,7 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
161
161
|
var _a;
|
|
162
162
|
return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (v, index) {
|
|
163
163
|
var _a, _b;
|
|
164
|
-
return (_jsxs(Stack, __assign({ px: 2, pb: 2, pt: 0.5, mb: 2, boxSizing: "border-box", component: Paper, variant: "outlined", width: "100%", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "flex-end" }, { children: ((_b = (_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.questions) === null || _b === void 0 ? void 0 : _b.length) > 1 && (_jsx(IconButton, __assign({ sx: { mr: -1 }, onClick: function () {
|
|
164
|
+
return (_jsxs(Stack, __assign({ px: 2, pb: 2, pt: 0.5, mb: 2, boxSizing: "border-box", component: Paper, variant: "outlined", width: "100%", justifyContent: "space-between", spacing: 1 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "flex-end" }, { children: ((_b = (_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.questions) === null || _b === void 0 ? void 0 : _b.length) > 1 && (_jsx(IconButton, __assign({ size: "small", sx: { mr: -1 }, onClick: function () {
|
|
165
165
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
|
|
166
166
|
} }, { children: _jsx(DeleteIcon, {}) }))) })), _jsx(FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
|
|
167
167
|
// rows: 3,
|
|
@@ -174,7 +174,6 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
174
174
|
height: 'auto',
|
|
175
175
|
} }), _jsx(Chioce, { index: index, item: v, onChange: function (_, options, i) {
|
|
176
176
|
form.values.questions[index].options = options;
|
|
177
|
-
console.log(form.values.questions, options);
|
|
178
177
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions, true) }));
|
|
179
178
|
} })] }), index));
|
|
180
179
|
});
|
|
@@ -70,7 +70,7 @@ var AiReportRoot = forwardRef(function (props, ref) {
|
|
|
70
70
|
else {
|
|
71
71
|
return (_jsxs(Box, { children: [_jsx(NotFinish, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(ScoreReport, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && _jsx(WorkPlaces, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && _jsx(AIEvaluate, {}), _jsx(Suggestion, {}), _jsx(VideoQuestion, {})] }));
|
|
72
72
|
}
|
|
73
|
-
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
|
|
73
|
+
}, [handleRefreshSuccess, onSendReminderClick, customScore, reminderSent, status, operableButtons, collection, workplaces]);
|
|
74
74
|
return (_jsx(Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
75
75
|
});
|
|
76
76
|
AiReportRoot.displayName = 'AiReportRoot';
|
|
@@ -19,7 +19,13 @@ var SingleChoice = function (_a) {
|
|
|
19
19
|
width: '100%',
|
|
20
20
|
},
|
|
21
21
|
} }, { children: options.map(function (v, i) {
|
|
22
|
-
return (_jsx(Radio
|
|
22
|
+
return (_jsx(Radio
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
, {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
FormControlLabelProps: {
|
|
27
|
+
sx: { pointerEvents: 'none' },
|
|
28
|
+
}, value: i, label: _jsxs(Stack, __assign({ color: "".concat(i === selected[0] ? '#4caf50' : 'rgba(0,0,0,.56)'), fontWeight: "".concat(i === selected[0] ? 'medium' : 'normal'), width: "100%", direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ color: "inherit", fontWeight: "inherit", variant: "caption" }, { children: v.content })), _jsxs(Typography, __assign({ color: "inherit", fontWeight: "inherit", variant: "caption" }, { children: [v.score, "\u5206"] }))] })) }, i));
|
|
23
29
|
}) })) }));
|
|
24
30
|
};
|
|
25
31
|
export default SingleChoice;
|
|
@@ -63,17 +63,18 @@ var Choice = function (_a) {
|
|
|
63
63
|
onEnd: function (_a) {
|
|
64
64
|
var oldIndex = _a.oldIndex, newIndex = _a.newIndex;
|
|
65
65
|
if (helper.current) {
|
|
66
|
-
helper.current.
|
|
66
|
+
helper.current.move(oldIndex, newIndex);
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
});
|
|
70
|
-
}, [index, item, onChange]);
|
|
70
|
+
}, [index, item, onChange, helper]);
|
|
71
71
|
(0, react_1.useEffect)(function () {
|
|
72
72
|
var _a;
|
|
73
73
|
if (!((_a = item === null || item === void 0 ? void 0 : item.options) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
74
|
-
|
|
74
|
+
var optionItem = { key: (0, utils_1.uniqueId)(), content: '', score: 0 };
|
|
75
|
+
onChange('options', [optionItem], index);
|
|
75
76
|
}
|
|
76
|
-
}, [item,
|
|
77
|
+
}, [item, onChange, index]);
|
|
77
78
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: "100%" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ ref: ref }, { children: ((_b = item === null || item === void 0 ? void 0 : item.options) === null || _b === void 0 ? void 0 : _b.length) > 0 && ((0, jsx_runtime_1.jsx)(formik_1.FieldArray, { name: "questions.".concat(index, ".options"), render: function (p) {
|
|
78
79
|
var _a;
|
|
79
80
|
helper.current = p;
|
|
@@ -96,7 +97,7 @@ var Choice = function (_a) {
|
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
99
|
onChange('options', __spreadArray([], ((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); }), true), index);
|
|
99
|
-
} }, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] },
|
|
100
|
+
} }, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: "\u5206" }) }))] }, v.key || (0, utils_1.uniqueId)()));
|
|
100
101
|
});
|
|
101
102
|
} })) })), (0, jsx_runtime_1.jsx)(styled_1.ChoiceItem, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), variant: "outlined", color: "inherit", size: "small", onClick: handleOptionAdd, sx: { ml: -2 } }, { children: "\u6DFB\u52A0\u9009\u9879" })) })] })));
|
|
102
103
|
};
|
|
@@ -166,7 +166,7 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
166
166
|
var _a;
|
|
167
167
|
return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (v, index) {
|
|
168
168
|
var _a, _b;
|
|
169
|
-
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2, pb: 2, pt: 0.5, mb: 2, boxSizing: "border-box", component: mui_1.Paper, variant: "outlined", width: "100%", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "flex-end" }, { children: ((_b = (_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.questions) === null || _b === void 0 ? void 0 : _b.length) > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ sx: { mr: -1 }, onClick: function () {
|
|
169
|
+
return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2, pb: 2, pt: 0.5, mb: 2, boxSizing: "border-box", component: mui_1.Paper, variant: "outlined", width: "100%", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "flex-end" }, { children: ((_b = (_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.questions) === null || _b === void 0 ? void 0 : _b.length) > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", sx: { mr: -1 }, onClick: function () {
|
|
170
170
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
|
|
171
171
|
} }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
|
|
172
172
|
// rows: 3,
|
|
@@ -179,7 +179,6 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
179
179
|
height: 'auto',
|
|
180
180
|
} }), (0, jsx_runtime_1.jsx)(Chioce_1.default, { index: index, item: v, onChange: function (_, options, i) {
|
|
181
181
|
form.values.questions[index].options = options;
|
|
182
|
-
console.log(form.values.questions, options);
|
|
183
182
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions, true) }));
|
|
184
183
|
} })] }), index));
|
|
185
184
|
});
|
|
@@ -75,7 +75,7 @@ var AiReportRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
75
75
|
else {
|
|
76
76
|
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(NotFinish_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(ScoreReport_1.default, { customScore: customScore, onRefreshSuccess: handleRefreshSuccess }), (workplaces === null || workplaces === void 0 ? void 0 : workplaces.length) > 0 && (0, jsx_runtime_1.jsx)(WorkPlaces_1.default, {}), (collection === null || collection === void 0 ? void 0 : collection.length) > 0 && (0, jsx_runtime_1.jsx)(AIEvaluate_1.default, {}), (0, jsx_runtime_1.jsx)(Suggestion_1.default, {}), (0, jsx_runtime_1.jsx)(VideoQuestion_1.default, {})] }));
|
|
77
77
|
}
|
|
78
|
-
}, [handleRefreshSuccess, onSendReminderClick, reminderSent, status, operableButtons, collection, workplaces]);
|
|
78
|
+
}, [handleRefreshSuccess, onSendReminderClick, customScore, reminderSent, status, operableButtons, collection, workplaces]);
|
|
79
79
|
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ loading: firstLoad.current && loading, sx: { width: '100%', minHeight: '584px', height: '100%', margin: '0 auto', overflow: 'auto' } }, { children: aiReportResult })));
|
|
80
80
|
});
|
|
81
81
|
AiReportRoot.displayName = 'AiReportRoot';
|
|
@@ -21,7 +21,13 @@ var SingleChoice = function (_a) {
|
|
|
21
21
|
width: '100%',
|
|
22
22
|
},
|
|
23
23
|
} }, { children: options.map(function (v, i) {
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
, {
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
FormControlLabelProps: {
|
|
29
|
+
sx: { pointerEvents: 'none' },
|
|
30
|
+
}, value: i, label: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ color: "".concat(i === selected[0] ? '#4caf50' : 'rgba(0,0,0,.56)'), fontWeight: "".concat(i === selected[0] ? 'medium' : 'normal'), width: "100%", direction: "row", spacing: 1, alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ color: "inherit", fontWeight: "inherit", variant: "caption" }, { children: v.content })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ color: "inherit", fontWeight: "inherit", variant: "caption" }, { children: [v.score, "\u5206"] }))] })) }, i));
|
|
25
31
|
}) })) }));
|
|
26
32
|
};
|
|
27
33
|
exports.default = SingleChoice;
|
|
@@ -78,7 +78,6 @@ exports.useAiAnalysisStore = (_a = (0, hox_1.createStore)(function () {
|
|
|
78
78
|
];
|
|
79
79
|
});
|
|
80
80
|
var resAiAbilities = (0, immutability_helper_1.default)(data, { $splice: $splice });
|
|
81
|
-
console.log('resAiAbilities', resAiAbilities);
|
|
82
81
|
setAiAbilities(resAiAbilities);
|
|
83
82
|
}, []);
|
|
84
83
|
/**
|