eli-video-interview 1.2.42-alpha.43 → 1.2.42-alpha.45
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/Root.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +8 -3
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/lib/modules/ai-question/Root.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +7 -2
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -109,7 +109,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
|
109
109
|
_d.label = 2;
|
|
110
110
|
case 2:
|
|
111
111
|
_d.trys.push([2, 4, , 5]);
|
|
112
|
-
return [4 /*yield*/, PostAiModelUpsert(__assign(__assign({ name: name, thirdToken: '', aiModel: (props === null || props === void 0 ? void 0 : props.aiModel) || aiModel }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions }))];
|
|
112
|
+
return [4 /*yield*/, PostAiModelUpsert(__assign(__assign({ name: name, thirdToken: '', aiModel: (props === null || props === void 0 ? void 0 : props.aiModel) || aiModel }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions.map(function (item, i) { return (__assign(__assign({}, item), { selfIntroOpt: i < 2 ? item.selfIntroOpt : 0 })); }) }))];
|
|
113
113
|
case 3:
|
|
114
114
|
data = (_d.sent()).data;
|
|
115
115
|
return [2 /*return*/, Promise.resolve({
|
|
@@ -33,7 +33,7 @@ import { useUpdateQuestionStore } from "../../../../store/ai-question/question-u
|
|
|
33
33
|
import { AddIcon, Box, Button, Checkbox, InfoIcon, Layout, Message, Popactions, Tooltip } from 'fbm-ui';
|
|
34
34
|
import { Typography } from 'fbm-ui/lib/mui';
|
|
35
35
|
import { Stack } from 'fbm-ui/lib/mui';
|
|
36
|
-
import { useState } from 'react';
|
|
36
|
+
import { useCallback, useState } from 'react';
|
|
37
37
|
var RandomQuestion = function (_a) {
|
|
38
38
|
var _b, _c;
|
|
39
39
|
var broadcastType = _a.broadcastType, onAddCustonQuestion = _a.onAddCustonQuestion, onAddRandomQuestion = _a.onAddRandomQuestion, category = _a.category, aiShowType = _a.aiShowType;
|
|
@@ -76,10 +76,15 @@ var RandomQuestion = function (_a) {
|
|
|
76
76
|
item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
var handleSelfIntrosChange = useCallback(function () {
|
|
80
|
+
updateQuestionState({
|
|
81
|
+
item: __assign(__assign({}, item), { selfIntroOpt: item.selfIntroOpt ? 0 : 1 }),
|
|
82
|
+
});
|
|
83
|
+
}, [item, updateQuestionState]);
|
|
84
|
+
return (_jsxs(Layout, { children: [_jsxs(Stack, __assign({ mb: 1, justifyContent: "space-between", mt: 0.375 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Popactions, __assign({ actions: aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), _jsx(Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && (_jsxs(Stack, __assign({ spacing: 1, direction: "row" }, { children: [_jsx(Checkbox, { sx: {
|
|
80
85
|
mr: 0,
|
|
81
86
|
}, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(Checkbox, { sx: {
|
|
82
87
|
mr: 0,
|
|
83
|
-
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && (_jsx(Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", _jsx(Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus }))] }))] })), open && _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
88
|
+
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && (_jsx(Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", _jsx(Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus })), questionState.aiShowType === 1 && questionState.index < 2 && (_jsx(Checkbox, { checked: !!item.selfIntroOpt, label: _jsxs(Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u81EA\u6211\u4ECB\u7ECD", _jsx(Tooltip, __assign({ title: "\u52FE\u9009\u4E3A\u81EA\u6211\u4ECB\u7ECD\u9898\u540E,\u5C06\u5BF9\u5019\u9009\u4EBA\u56DE\u7B54\u4E2D\u7684\u59D3\u540D\u8FDB\u884C\u4FEE\u6B63\u3002" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleSelfIntrosChange }))] }))] })), open && _jsx(SelectQuestion, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
84
89
|
};
|
|
85
90
|
export default RandomQuestion;
|
|
@@ -114,7 +114,7 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
114
114
|
_d.label = 2;
|
|
115
115
|
case 2:
|
|
116
116
|
_d.trys.push([2, 4, , 5]);
|
|
117
|
-
return [4 /*yield*/, (0, ai_question_1.PostAiModelUpsert)(__assign(__assign({ name: name, thirdToken: '', aiModel: (props === null || props === void 0 ? void 0 : props.aiModel) || aiModel }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions }))];
|
|
117
|
+
return [4 /*yield*/, (0, ai_question_1.PostAiModelUpsert)(__assign(__assign({ name: name, thirdToken: '', aiModel: (props === null || props === void 0 ? void 0 : props.aiModel) || aiModel }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions.map(function (item, i) { return (__assign(__assign({}, item), { selfIntroOpt: i < 2 ? item.selfIntroOpt : 0 })); }) }))];
|
|
118
118
|
case 3:
|
|
119
119
|
data = (_d.sent()).data;
|
|
120
120
|
return [2 /*return*/, Promise.resolve({
|
|
@@ -81,10 +81,15 @@ var RandomQuestion = function (_a) {
|
|
|
81
81
|
item: __assign(__assign({}, item), { enableScoreOptimization: !item.enableScoreOptimization }),
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
var handleSelfIntrosChange = (0, react_1.useCallback)(function () {
|
|
85
|
+
updateQuestionState({
|
|
86
|
+
item: __assign(__assign({}, item), { selfIntroOpt: item.selfIntroOpt ? 0 : 1 }),
|
|
87
|
+
});
|
|
88
|
+
}, [item, updateQuestionState]);
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Layout, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ mb: 1, justifyContent: "space-between", mt: 0.375 }, { children: [(0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Popactions, __assign({ actions: aiShowType === ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE ? [actions[1]] : actions, trigger: "click", isClickAway: true, sx: { height: 1 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}) }, { children: "\u968F\u673A\u9762\u8BD5\u5185\u5BB9" })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: desc, placement: "bottom-start" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1, height: 48 } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), (0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center", mb: 2 }, { children: [isVideoBroadcast && ((0, jsx_runtime_1.jsxs)(mui_2.Stack, __assign({ spacing: 1, direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
|
|
85
90
|
mr: 0,
|
|
86
91
|
}, checked: ((_b = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _b === void 0 ? void 0 : _b.videoRetry) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { sx: {
|
|
87
92
|
mr: 0,
|
|
88
|
-
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus }))] }))] })), open && (0, jsx_runtime_1.jsx)(SelectQuestion_1.default, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
93
|
+
}, checked: ((_c = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _c === void 0 ? void 0 : _c.videoSkip) === 1, label: (0, jsx_runtime_1.jsx)(mui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] }))), item.type === 1 && item.aiShowType === 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: item === null || item === void 0 ? void 0 : item.enableScoreOptimization, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u56DE\u7B54\u8FC7\u77ED\u6263\u5206", (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u82E5\u5B57\u6570\u5C0F\u4E8E\u7B49\u4E8E80\u65F6\uFF0C\u5BF9AI\u5206\u6570\u8FDB\u884C\u4E00\u5B9A\u7684\u51CF\u5C11\uFF0C\u6700\u5C11\n\u51CF10\u5206\uFF0C\u6700\u9AD8\u51CF40\u5206\uFF0C\u6309\u7167\u5B57\u6570\u9010\u51CF\u3002" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleEnableScoreOptimizationStatus })), questionState.aiShowType === 1 && questionState.index < 2 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!item.selfIntroOpt, label: (0, jsx_runtime_1.jsxs)(mui_1.Typography, __assign({ variant: "body2", display: "flex" }, { children: ["\u81EA\u6211\u4ECB\u7ECD", (0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "\u52FE\u9009\u4E3A\u81EA\u6211\u4ECB\u7ECD\u9898\u540E,\u5C06\u5BF9\u5019\u9009\u4EBA\u56DE\u7B54\u4E2D\u7684\u59D3\u540D\u8FDB\u884C\u4FEE\u6B63\u3002" }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })), onChange: handleSelfIntrosChange }))] }))] })), open && (0, jsx_runtime_1.jsx)(SelectQuestion_1.default, { token: category === null || category === void 0 ? void 0 : category.token, open: open, onClose: function () { return setOpen(false); }, onOk: onAddRandomQuestion })] }));
|
|
89
94
|
};
|
|
90
95
|
exports.default = RandomQuestion;
|