eli-video-interview 1.4.7 → 1.5.0
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 +13 -13
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +4 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/const.js +4 -0
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +2 -5
- package/esm/modules/ai-question/components/QuestionUpdate/AudioUploader.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/AudioUploader.js +74 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +16 -5
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -1
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -1
- package/lib/modules/ai-question/Root.js +13 -13
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.d.ts +4 -0
- package/lib/modules/ai-question/components/AiAssessmentCriteria/const.js +5 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +1 -4
- package/lib/modules/ai-question/components/QuestionUpdate/AudioUploader.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/AudioUploader.js +76 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +18 -7
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -1
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +3 -1
- package/package.json +5 -5
|
@@ -133,19 +133,19 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
|
133
133
|
}
|
|
134
134
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
135
135
|
}, [props]);
|
|
136
|
-
return (_jsxs(Box, __assign({ sx: {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
136
|
+
return (_jsx(AiAnalysisStoreProvider, { children: _jsxs(Box, __assign({ sx: {
|
|
137
|
+
display: 'flex',
|
|
138
|
+
height: '100%',
|
|
139
|
+
position: 'relative',
|
|
140
|
+
} }, { children: [_jsx(QuestionPreview, {}), _jsx(QuestionUpdate, {}), _jsx(Box, __assign({ sx: {
|
|
141
|
+
flex: '1 0',
|
|
142
|
+
height: '100%',
|
|
143
|
+
overflow: 'auto',
|
|
144
|
+
} }, { children: _jsx(QuestionModel, {}) })), _jsx(Box, __assign({ sx: {
|
|
145
|
+
width: '256px',
|
|
146
|
+
height: '100%',
|
|
147
|
+
overflow: 'auto',
|
|
148
|
+
} }, { children: _jsx(QuestionTemplate, { isOem: isOem }) }))] })) }));
|
|
149
149
|
});
|
|
150
150
|
AiQuestionRoot.displayName = 'AiQuestionRoot';
|
|
151
151
|
export default memo(AiQuestionRoot);
|
|
@@ -67,3 +67,7 @@ export var LANGUAGE_SHOW_NAMES = {
|
|
|
67
67
|
14: '斯瓦希里语',
|
|
68
68
|
};
|
|
69
69
|
export var LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
|
|
70
|
+
export var VOICE_LANGUAGE_OPTIONS = LANGUAGE_SHOW_NAMES_ORDER.map(function (ord) { return ({
|
|
71
|
+
value: ord,
|
|
72
|
+
label: LANGUAGE_SHOW_NAMES[ord],
|
|
73
|
+
}); });
|
|
@@ -35,7 +35,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
35
35
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
38
|
-
import { CATEGORY_NAME, LANGUAGE_SHOW_NAME,
|
|
38
|
+
import { CATEGORY_NAME, LANGUAGE_SHOW_NAME, SERVER_LANGUAGE_TYPE, VOICE_LANGUAGE_OPTIONS } from './const';
|
|
39
39
|
import { groupCategory } from './utils';
|
|
40
40
|
import ScrollDialogContent from "../../../../components/ScrollDialogContent";
|
|
41
41
|
import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
@@ -113,10 +113,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
113
113
|
return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
114
114
|
});
|
|
115
115
|
}, [aiAbilities, fixSetCheckAbilities]);
|
|
116
|
-
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (_jsxs(_Fragment, { children: [_jsxs(Stack, __assign({ spacing: 1, mb: 2 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), _jsx(Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options:
|
|
117
|
-
value: ord,
|
|
118
|
-
label: LANGUAGE_SHOW_NAMES[ord],
|
|
119
|
-
}); }), sx: {
|
|
116
|
+
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: _jsx(ScrollDialogContent, { children: loading ? (_jsx(Box, __assign({ height: 400 }, { children: _jsx(Loading, { size: 40 }) }))) : (_jsxs(_Fragment, { children: [_jsxs(Stack, __assign({ spacing: 1, mb: 2 }, { children: [_jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), _jsx(Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options: VOICE_LANGUAGE_OPTIONS, sx: {
|
|
120
117
|
width: 240,
|
|
121
118
|
} })] })), groupData.map(function (_a) {
|
|
122
119
|
var name = _a.name, type = _a.type, list = _a.list;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
+
if (!m) return o;
|
|
15
|
+
var i = m.call(o), r, ar = [], e;
|
|
16
|
+
try {
|
|
17
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
+
}
|
|
19
|
+
catch (error) { e = { error: error }; }
|
|
20
|
+
finally {
|
|
21
|
+
try {
|
|
22
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
+
}
|
|
24
|
+
finally { if (e) throw e.error; }
|
|
25
|
+
}
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
29
|
+
import { PostCommonUpload } from "../../../../services/ai-question";
|
|
30
|
+
import { isExceedMaxFileSize } from "../../../../utils/utils";
|
|
31
|
+
import { useRequest } from 'ahooks';
|
|
32
|
+
import { Box, Button, Message, Typography, Upload, UploadIcon } from 'fbm-ui';
|
|
33
|
+
import { CircularProgress, Stack } from 'fbm-ui/lib/mui';
|
|
34
|
+
var ACCEPT_AUDIO_TYPES = '.mp3,.wav,audio/mpeg,audio/wav,audio/x-wav';
|
|
35
|
+
var AUDIO_FILE_EXT_REG = /\.(mp3|wav)$/i;
|
|
36
|
+
var AudioUploader = function (_a) {
|
|
37
|
+
var audioUrl = _a.audioUrl, onChange = _a.onChange;
|
|
38
|
+
var _b = useRequest(PostCommonUpload, {
|
|
39
|
+
manual: true,
|
|
40
|
+
onSuccess: function (_a) {
|
|
41
|
+
var data = _a.data;
|
|
42
|
+
var _b = __read(data, 1), firstData = _b[0];
|
|
43
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((firstData === null || firstData === void 0 ? void 0 : firstData.url) || '');
|
|
44
|
+
},
|
|
45
|
+
}), loading = _b.loading, postCommonUpload = _b.run;
|
|
46
|
+
var uploadProps = {
|
|
47
|
+
type: 'custom',
|
|
48
|
+
showUploadList: false,
|
|
49
|
+
accept: ACCEPT_AUDIO_TYPES,
|
|
50
|
+
customRequest: function (_a) {
|
|
51
|
+
var file = _a.file;
|
|
52
|
+
var fileName = (file === null || file === void 0 ? void 0 : file.name) || '';
|
|
53
|
+
var fileType = (file === null || file === void 0 ? void 0 : file.type) || '';
|
|
54
|
+
var isValidType = AUDIO_FILE_EXT_REG.test(fileName) || ['audio/mpeg', 'audio/wav', 'audio/x-wav'].includes(fileType);
|
|
55
|
+
if (!isValidType) {
|
|
56
|
+
Message.error('仅支持上传MP3、WAV格式录音文件');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (isExceedMaxFileSize(file.size)) {
|
|
60
|
+
Message.error('录音文件大小超过20MB,请重新上传');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
var formData = new FormData();
|
|
64
|
+
formData.append('files', file);
|
|
65
|
+
postCommonUpload(formData);
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
return (_jsxs(Box, __assign({ mt: 1.5 }, { children: [_jsxs(Stack, __assign({ direction: "row", spacing: 1.5, alignItems: "center" }, { children: [_jsx(Upload, __assign({}, uploadProps, { children: _jsx(Button, __assign({ variant: "outlined", color: "inherit", size: "small", icon: !loading ? _jsx(UploadIcon, {}) : undefined }, { children: loading ? (_jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(CircularProgress, { size: 16, color: "inherit" }), _jsx("span", { children: "\u4E0A\u4F20\u4E2D..." })] }))) : ('上传录音') })) })), audioUrl && (_jsxs(_Fragment, { children: [_jsx("audio", { controls: true, src: audioUrl, style: {
|
|
69
|
+
width: 300,
|
|
70
|
+
maxWidth: '100%',
|
|
71
|
+
height: 35,
|
|
72
|
+
} }), _jsx(Button, __assign({ variant: "text", color: "error", size: "small", onClick: function () { return onChange === null || onChange === void 0 ? void 0 : onChange(''); } }, { children: "\u5220\u9664" }))] }))] })), _jsx(Typography, __assign({ variant: "caption", color: "text.secondary", display: "block", mt: 1 }, { children: "\u652F\u6301MP3\u3001WAV\u683C\u5F0F, \u6700\u592720MB" }))] })));
|
|
73
|
+
};
|
|
74
|
+
export default AudioUploader;
|
|
@@ -72,6 +72,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
72
72
|
};
|
|
73
73
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
74
74
|
import AiAnalysis from '../AiAnalysis';
|
|
75
|
+
import { VOICE_LANGUAGE_OPTIONS } from '../AiAssessmentCriteria/const';
|
|
76
|
+
import AudioUploader from './AudioUploader';
|
|
75
77
|
import Chioce from './Chioce';
|
|
76
78
|
import { broadcastModeOptions, durationOptions, prepareTimeOptions } from './const';
|
|
77
79
|
import FllowupSetting from './FllowupSetting';
|
|
@@ -81,15 +83,17 @@ import { useAiAbilityListStore } from "../../../../store/ai-ability-select/quest
|
|
|
81
83
|
import { useEnterpriseStore } from "../../../../store/enterprise/enterprise-store";
|
|
82
84
|
import { ADD_QUESTION_TYPE } from "../../../../enum/ai-question";
|
|
83
85
|
import { GetAiAbilityList } from "../../../../services/ai-ability";
|
|
86
|
+
import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
|
|
84
87
|
import { useRequest } from 'ahooks';
|
|
85
|
-
import { Autocomplete, Box, CloseIcon, DeleteIcon, Form, FormItem, IconButton, Select, useForm } from 'fbm-ui';
|
|
88
|
+
import { Autocomplete, Box, CloseIcon, DeleteIcon, Form, FormItem, IconButton, Select, Typography, useForm } from 'fbm-ui';
|
|
86
89
|
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
87
90
|
import { FieldArray } from 'formik';
|
|
88
91
|
import { forwardRef, memo, useEffect, useImperativeHandle } from 'react';
|
|
89
92
|
var QuestionForm = forwardRef(function (props, ref) {
|
|
90
93
|
var aiShowType = props.aiShowType, initialValues = props.initialValues, values = props.values, preview = props.preview, onValuesChange = props.onValuesChange, onSubmit = props.onSubmit, onCategoryChange = props.onCategoryChange;
|
|
91
94
|
var _a = useAiAbilityListStore(), aiAbilityList = _a.aiAbilityList, setSpecialAiAbilityList = _a.setSpecialAiAbilityList;
|
|
92
|
-
var _b =
|
|
95
|
+
var _b = useAiAnalysisStore(), analysisState = _b.analysisState, updateState = _b.updateState;
|
|
96
|
+
var _c = useEnterpriseStore().enterprise, jobToken = _c.jobToken, thirdToken = _c.thirdToken;
|
|
93
97
|
var data = useRequest(function () { return GetAiAbilityList({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
94
98
|
refreshDeps: [jobToken, thirdToken],
|
|
95
99
|
manual: preview,
|
|
@@ -187,15 +191,18 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
187
191
|
}, sx: {
|
|
188
192
|
flexGrow: 1,
|
|
189
193
|
height: 'auto',
|
|
194
|
+
} }), _jsx(AudioUploader, { audioUrl: v.audioUrl, onChange: function (audioUrl) {
|
|
195
|
+
form.values.questions[index] = __assign(__assign({}, form.values.questions[index]), { audioUrl: audioUrl });
|
|
196
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
|
|
190
197
|
} }), _jsx(Chioce, { index: index, item: v, onChange: function (_, options, i) {
|
|
191
198
|
form.values.questions[index].options = options;
|
|
192
199
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
|
|
193
200
|
} })] }), index));
|
|
194
201
|
});
|
|
195
202
|
} }) })), !preview && aiShowType !== ADD_QUESTION_TYPE.LANGUAGE && (_jsx(RandomQuestion, { aiShowType: aiShowType, category: aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
196
|
-
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '' }], false) }));
|
|
203
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '', videoURLWide: '', audioUrl: '' }], false) }));
|
|
197
204
|
}, onAddRandomQuestion: function (qs) {
|
|
198
|
-
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '' }); })), false) }));
|
|
205
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '', videoURLWide: '', audioUrl: '' }); })), false) }));
|
|
199
206
|
} })), aiShowType === ADD_QUESTION_TYPE.LANGUAGE && (_jsx(FormItem, { sx: { height: 'auto', mb: 2 }, required: true, name: "readText", label: "\u6717\u8BFB\u5185\u5BB9", max: 240, InputProps: {
|
|
200
207
|
rows: 3,
|
|
201
208
|
multiline: true,
|
|
@@ -213,7 +220,11 @@ var QuestionForm = forwardRef(function (props, ref) {
|
|
|
213
220
|
placeholder: '最少回答时长',
|
|
214
221
|
sx: { padding: 0, pr: 1 },
|
|
215
222
|
endAdornment: 's',
|
|
216
|
-
}, onChange: handleMinResponseDurationChange }))] }))
|
|
223
|
+
}, onChange: handleMinResponseDurationChange }))] })), aiShowType === ADD_QUESTION_TYPE.SINGLECHIOCE && (_jsx(Box, __assign({ display: "flex", mt: 2, mb: 2.5 }, { children: _jsxs(Box, __assign({ sx: { width: 'calc((100% - 32px) / 3)' } }, { children: [_jsx(Typography, __assign({ variant: "body2", sx: {
|
|
224
|
+
color: 'rgba(0, 0, 0, 0.6)',
|
|
225
|
+
lineHeight: '22px',
|
|
226
|
+
mb: 0.5,
|
|
227
|
+
} }, { children: "\u9898\u76EE\u8BED\u79CD" })), _jsx(Select, { value: analysisState.voiceLanguage || 1, options: VOICE_LANGUAGE_OPTIONS, onChange: function (e) { return updateState({ voiceLanguage: Number(e.target.value) }); } })] })) })))] })), !preview && _jsx(AiAnalysis, {})] }));
|
|
217
228
|
});
|
|
218
229
|
QuestionForm.displayName = 'QuestionForm';
|
|
219
230
|
export default memo(QuestionForm);
|
|
@@ -7,7 +7,7 @@ export var defaultQuestionParams = {
|
|
|
7
7
|
answerStatus: 2,
|
|
8
8
|
broadcastType: 1,
|
|
9
9
|
desc: '',
|
|
10
|
-
questions: [{ content: '', videoUrl: '' }],
|
|
10
|
+
questions: [{ content: '', videoUrl: '', videoURLWide: '', audioUrl: '' }],
|
|
11
11
|
duration: 30,
|
|
12
12
|
category: undefined,
|
|
13
13
|
extra: {
|
|
@@ -138,19 +138,19 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
138
138
|
}
|
|
139
139
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
140
140
|
}, [props]);
|
|
141
|
-
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
return ((0, jsx_runtime_1.jsx)(ai_analysis_store_1.AiAnalysisStoreProvider, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: {
|
|
142
|
+
display: 'flex',
|
|
143
|
+
height: '100%',
|
|
144
|
+
position: 'relative',
|
|
145
|
+
} }, { children: [(0, jsx_runtime_1.jsx)(QuestionPreview_1.default, {}), (0, jsx_runtime_1.jsx)(QuestionUpdate_1.default, {}), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: {
|
|
146
|
+
flex: '1 0',
|
|
147
|
+
height: '100%',
|
|
148
|
+
overflow: 'auto',
|
|
149
|
+
} }, { children: (0, jsx_runtime_1.jsx)(QuestionModel_1.default, {}) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: {
|
|
150
|
+
width: '256px',
|
|
151
|
+
height: '100%',
|
|
152
|
+
overflow: 'auto',
|
|
153
|
+
} }, { children: (0, jsx_runtime_1.jsx)(QuestionTemplate_1.default, { isOem: isOem }) }))] })) }));
|
|
154
154
|
});
|
|
155
155
|
AiQuestionRoot.displayName = 'AiQuestionRoot';
|
|
156
156
|
exports.default = (0, react_1.memo)(AiQuestionRoot);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a, _b;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.LANGUAGE_SHOW_NAMES_ORDER = exports.LANGUAGE_SHOW_NAMES = exports.LANGUAGE_SHOW_NAME = exports.SERVER_LANGUAGE_TYPE = exports.CATEGORY_NAME = exports.LANGUAGE_NAMES = void 0;
|
|
4
|
+
exports.VOICE_LANGUAGE_OPTIONS = exports.LANGUAGE_SHOW_NAMES_ORDER = exports.LANGUAGE_SHOW_NAMES = exports.LANGUAGE_SHOW_NAME = exports.SERVER_LANGUAGE_TYPE = exports.CATEGORY_NAME = exports.LANGUAGE_NAMES = void 0;
|
|
5
5
|
var ai_question_1 = require("../../../../enum/ai-question");
|
|
6
6
|
var MANDARIN = ai_question_1.LANGUAGE_TYPE.MANDARIN, CANTONESE = ai_question_1.LANGUAGE_TYPE.CANTONESE, JAPANESE = ai_question_1.LANGUAGE_TYPE.JAPANESE, ENGLISH = ai_question_1.LANGUAGE_TYPE.ENGLISH, KOREAN = ai_question_1.LANGUAGE_TYPE.KOREAN, SPANISH = ai_question_1.LANGUAGE_TYPE.SPANISH, ITALIAN = ai_question_1.LANGUAGE_TYPE.ITALIAN, RUSSIAN = ai_question_1.LANGUAGE_TYPE.RUSSIAN, FRENCH = ai_question_1.LANGUAGE_TYPE.FRENCH, GERMAN = ai_question_1.LANGUAGE_TYPE.GERMAN, THAILAND = ai_question_1.LANGUAGE_TYPE.THAILAND, VIETNAMESE = ai_question_1.LANGUAGE_TYPE.VIETNAMESE, INDONESIAN = ai_question_1.LANGUAGE_TYPE.INDONESIAN, SWAHILI = ai_question_1.LANGUAGE_TYPE.SWAHILI;
|
|
7
7
|
var LANGUAGE = ai_question_1.CATEGORY_TYPE.LANGUAGE, SEMANTICS = ai_question_1.CATEGORY_TYPE.SEMANTICS, EXPRESSION = ai_question_1.CATEGORY_TYPE.EXPRESSION, FORM = ai_question_1.CATEGORY_TYPE.FORM, LANGUAGE_ABILITY = ai_question_1.CATEGORY_TYPE.LANGUAGE_ABILITY;
|
|
@@ -70,3 +70,7 @@ exports.LANGUAGE_SHOW_NAMES = {
|
|
|
70
70
|
14: '斯瓦希里语',
|
|
71
71
|
};
|
|
72
72
|
exports.LANGUAGE_SHOW_NAMES_ORDER = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];
|
|
73
|
+
exports.VOICE_LANGUAGE_OPTIONS = exports.LANGUAGE_SHOW_NAMES_ORDER.map(function (ord) { return ({
|
|
74
|
+
value: ord,
|
|
75
|
+
label: exports.LANGUAGE_SHOW_NAMES[ord],
|
|
76
|
+
}); });
|
|
@@ -118,10 +118,7 @@ var AiAssessmentCriteria = function (props) {
|
|
|
118
118
|
return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
119
119
|
});
|
|
120
120
|
}, [aiAbilities, fixSetCheckAbilities]);
|
|
121
|
-
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: loading ? ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ height: 400 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Loading, { size: 40 }) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mb: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options: const_1.
|
|
122
|
-
value: ord,
|
|
123
|
-
label: const_1.LANGUAGE_SHOW_NAMES[ord],
|
|
124
|
-
}); }), sx: {
|
|
121
|
+
return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\u7EF4\u5EA6", size: "sm", okText: "\u786E\u8BA4", onClose: onClose, onOk: handleOk }, { children: (0, jsx_runtime_1.jsx)(ScrollDialogContent_1.default, { children: loading ? ((0, jsx_runtime_1.jsx)(mui_1.Box, __assign({ height: 400 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Loading, { size: 40 }) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, mb: 2 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u9898\u76EE\u8BED\u79CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary" }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8FDB\u884C\u8BFB\u9898" }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { onChange: function (e) { return setVoiceLanguage(Number(e.target.value)); }, value: voiceLanguage, options: const_1.VOICE_LANGUAGE_OPTIONS, sx: {
|
|
125
122
|
width: 240,
|
|
126
123
|
} })] })), groupData.map(function (_a) {
|
|
127
124
|
var name = _a.name, type = _a.type, list = _a.list;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
31
|
+
var ai_question_1 = require("../../../../services/ai-question");
|
|
32
|
+
var utils_1 = require("../../../../utils/utils");
|
|
33
|
+
var ahooks_1 = require("ahooks");
|
|
34
|
+
var fbm_ui_1 = require("fbm-ui");
|
|
35
|
+
var mui_1 = require("fbm-ui/lib/mui");
|
|
36
|
+
var ACCEPT_AUDIO_TYPES = '.mp3,.wav,audio/mpeg,audio/wav,audio/x-wav';
|
|
37
|
+
var AUDIO_FILE_EXT_REG = /\.(mp3|wav)$/i;
|
|
38
|
+
var AudioUploader = function (_a) {
|
|
39
|
+
var audioUrl = _a.audioUrl, onChange = _a.onChange;
|
|
40
|
+
var _b = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
|
|
41
|
+
manual: true,
|
|
42
|
+
onSuccess: function (_a) {
|
|
43
|
+
var data = _a.data;
|
|
44
|
+
var _b = __read(data, 1), firstData = _b[0];
|
|
45
|
+
onChange === null || onChange === void 0 ? void 0 : onChange((firstData === null || firstData === void 0 ? void 0 : firstData.url) || '');
|
|
46
|
+
},
|
|
47
|
+
}), loading = _b.loading, postCommonUpload = _b.run;
|
|
48
|
+
var uploadProps = {
|
|
49
|
+
type: 'custom',
|
|
50
|
+
showUploadList: false,
|
|
51
|
+
accept: ACCEPT_AUDIO_TYPES,
|
|
52
|
+
customRequest: function (_a) {
|
|
53
|
+
var file = _a.file;
|
|
54
|
+
var fileName = (file === null || file === void 0 ? void 0 : file.name) || '';
|
|
55
|
+
var fileType = (file === null || file === void 0 ? void 0 : file.type) || '';
|
|
56
|
+
var isValidType = AUDIO_FILE_EXT_REG.test(fileName) || ['audio/mpeg', 'audio/wav', 'audio/x-wav'].includes(fileType);
|
|
57
|
+
if (!isValidType) {
|
|
58
|
+
fbm_ui_1.Message.error('仅支持上传MP3、WAV格式录音文件');
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if ((0, utils_1.isExceedMaxFileSize)(file.size)) {
|
|
62
|
+
fbm_ui_1.Message.error('录音文件大小超过20MB,请重新上传');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
var formData = new FormData();
|
|
66
|
+
formData.append('files', file);
|
|
67
|
+
postCommonUpload(formData);
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1.5 }, { children: [(0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1.5, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Upload, __assign({}, uploadProps, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", size: "small", icon: !loading ? (0, jsx_runtime_1.jsx)(fbm_ui_1.UploadIcon, {}) : undefined }, { children: loading ? ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.CircularProgress, { size: 16, color: "inherit" }), (0, jsx_runtime_1.jsx)("span", { children: "\u4E0A\u4F20\u4E2D..." })] }))) : ('上传录音') })) })), audioUrl && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("audio", { controls: true, src: audioUrl, style: {
|
|
71
|
+
width: 300,
|
|
72
|
+
maxWidth: '100%',
|
|
73
|
+
height: 35,
|
|
74
|
+
} }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "text", color: "error", size: "small", onClick: function () { return onChange === null || onChange === void 0 ? void 0 : onChange(''); } }, { children: "\u5220\u9664" }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "text.secondary", display: "block", mt: 1 }, { children: "\u652F\u6301MP3\u3001WAV\u683C\u5F0F, \u6700\u592720MB" }))] })));
|
|
75
|
+
};
|
|
76
|
+
exports.default = AudioUploader;
|
|
@@ -77,8 +77,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
77
77
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
78
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
79
79
|
var AiAnalysis_1 = __importDefault(require("../AiAnalysis"));
|
|
80
|
+
var const_1 = require("../AiAssessmentCriteria/const");
|
|
81
|
+
var AudioUploader_1 = __importDefault(require("./AudioUploader"));
|
|
80
82
|
var Chioce_1 = __importDefault(require("./Chioce"));
|
|
81
|
-
var
|
|
83
|
+
var const_2 = require("./const");
|
|
82
84
|
var FllowupSetting_1 = __importDefault(require("./FllowupSetting"));
|
|
83
85
|
var RandomQuestion_1 = __importDefault(require("./RandomQuestion"));
|
|
84
86
|
var VideoVoice_1 = __importDefault(require("./VideoVoice"));
|
|
@@ -86,6 +88,7 @@ var question_ability_store_1 = require("../../../../store/ai-ability-select/ques
|
|
|
86
88
|
var enterprise_store_1 = require("../../../../store/enterprise/enterprise-store");
|
|
87
89
|
var ai_question_1 = require("../../../../enum/ai-question");
|
|
88
90
|
var ai_ability_1 = require("../../../../services/ai-ability");
|
|
91
|
+
var ai_analysis_store_1 = require("../../../../store/ai-question/ai-analysis-store");
|
|
89
92
|
var ahooks_1 = require("ahooks");
|
|
90
93
|
var fbm_ui_1 = require("fbm-ui");
|
|
91
94
|
var mui_1 = require("fbm-ui/lib/mui");
|
|
@@ -94,7 +97,8 @@ var react_1 = require("react");
|
|
|
94
97
|
var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
95
98
|
var aiShowType = props.aiShowType, initialValues = props.initialValues, values = props.values, preview = props.preview, onValuesChange = props.onValuesChange, onSubmit = props.onSubmit, onCategoryChange = props.onCategoryChange;
|
|
96
99
|
var _a = (0, question_ability_store_1.useAiAbilityListStore)(), aiAbilityList = _a.aiAbilityList, setSpecialAiAbilityList = _a.setSpecialAiAbilityList;
|
|
97
|
-
var _b = (0,
|
|
100
|
+
var _b = (0, ai_analysis_store_1.useAiAnalysisStore)(), analysisState = _b.analysisState, updateState = _b.updateState;
|
|
101
|
+
var _c = (0, enterprise_store_1.useEnterpriseStore)().enterprise, jobToken = _c.jobToken, thirdToken = _c.thirdToken;
|
|
98
102
|
var data = (0, ahooks_1.useRequest)(function () { return (0, ai_ability_1.GetAiAbilityList)({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
99
103
|
refreshDeps: [jobToken, thirdToken],
|
|
100
104
|
manual: preview,
|
|
@@ -152,7 +156,7 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
152
156
|
// console.log(form.values);
|
|
153
157
|
onValuesChange === null || onValuesChange === void 0 ? void 0 : onValuesChange(form.values);
|
|
154
158
|
}, [form.values, onValuesChange]);
|
|
155
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Form, __assign({}, form, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { required: true, disabled: preview, name: "name", label: "\u6807\u9898", placeholder: "\u6807\u9898\uFF08\u7528\u4E8E\u7CFB\u7EDF\u7BA1\u7406\uFF09", max: 15 }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [!preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ sx: { flex: '1 0', mr: 1 }, required: true, disabled: preview, name: "broadcastType", label: "\u64AD\u62A5\u65B9\u5F0F" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { placeholder: "\u64AD\u62A5\u65B9\u5F0F", options:
|
|
159
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Form, __assign({}, form, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { required: true, disabled: preview, name: "name", label: "\u6807\u9898", placeholder: "\u6807\u9898\uFF08\u7528\u4E8E\u7CFB\u7EDF\u7BA1\u7406\uFF09", max: 15 }), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [!preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.FREE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ sx: { flex: '1 0', mr: 1 }, required: true, disabled: preview, name: "broadcastType", label: "\u64AD\u62A5\u65B9\u5F0F" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { placeholder: "\u64AD\u62A5\u65B9\u5F0F", options: const_2.broadcastModeOptions }) }))), !preview && ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ style: { flex: '1 0' }, disabled: preview, name: "category", label: "\u8003\u5BDF\u80FD\u529B" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Autocomplete, { placeholder: "\u8003\u5BDF\u80FD\u529B", options: aiAbilityList.map(function (_a) {
|
|
156
160
|
var tag = _a.tag, token = _a.token, isWorkplace = _a.isWorkplace, define = _a.define, type = _a.type, child = _a.child;
|
|
157
161
|
return ({
|
|
158
162
|
label: tag,
|
|
@@ -192,21 +196,24 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
192
196
|
}, sx: {
|
|
193
197
|
flexGrow: 1,
|
|
194
198
|
height: 'auto',
|
|
199
|
+
} }), (0, jsx_runtime_1.jsx)(AudioUploader_1.default, { audioUrl: v.audioUrl, onChange: function (audioUrl) {
|
|
200
|
+
form.values.questions[index] = __assign(__assign({}, form.values.questions[index]), { audioUrl: audioUrl });
|
|
201
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
|
|
195
202
|
} }), (0, jsx_runtime_1.jsx)(Chioce_1.default, { index: index, item: v, onChange: function (_, options, i) {
|
|
196
203
|
form.values.questions[index].options = options;
|
|
197
204
|
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
|
|
198
205
|
} })] }), index));
|
|
199
206
|
});
|
|
200
207
|
} }) })), !preview && aiShowType !== ai_question_1.ADD_QUESTION_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(RandomQuestion_1.default, { aiShowType: aiShowType, category: aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
|
|
201
|
-
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '' }], false) }));
|
|
208
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '', videoURLWide: '', audioUrl: '' }], false) }));
|
|
202
209
|
}, onAddRandomQuestion: function (qs) {
|
|
203
|
-
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '' }); })), false) }));
|
|
210
|
+
form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '', videoURLWide: '', audioUrl: '' }); })), false) }));
|
|
204
211
|
} })), aiShowType === ai_question_1.ADD_QUESTION_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto', mb: 2 }, required: true, name: "readText", label: "\u6717\u8BFB\u5185\u5BB9", max: 240, InputProps: {
|
|
205
212
|
rows: 3,
|
|
206
213
|
multiline: true,
|
|
207
214
|
placeholder: '朗读内容(候选人将根据此内容进行朗读)',
|
|
208
215
|
sx: { padding: 0 },
|
|
209
|
-
} })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ sx: { height: 64, flex: '1 0', mr: 2 }, required: true, disabled: preview, name: "prepareTime", label: "\u51C6\u5907\u65F6\u957F" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { options:
|
|
216
|
+
} })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ sx: { height: 64, flex: '1 0', mr: 2 }, required: true, disabled: preview, name: "prepareTime", label: "\u51C6\u5907\u65F6\u957F" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { options: const_2.prepareTimeOptions }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, __assign({ sx: { height: 64, flex: '1 0' }, required: true, disabled: preview, name: "duration", label: "\u56DE\u7B54\u65F6\u957F" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { options: const_2.durationOptions }) })), aiShowType !== ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 64, flex: '1 0', ml: 2 }, name: "minResponseDuration", label: "\u6700\u5C11\u56DE\u7B54\u65F6\u957F", type: "number", disabled: preview,
|
|
210
217
|
// rules={[
|
|
211
218
|
// e => {
|
|
212
219
|
// if (!/^[1-9]\d*$/.test(e.value)) {
|
|
@@ -218,7 +225,11 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
218
225
|
placeholder: '最少回答时长',
|
|
219
226
|
sx: { padding: 0, pr: 1 },
|
|
220
227
|
endAdornment: 's',
|
|
221
|
-
}, onChange: handleMinResponseDurationChange }))] }))
|
|
228
|
+
}, onChange: handleMinResponseDurationChange }))] })), aiShowType === ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", mt: 2, mb: 2.5 }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ sx: { width: 'calc((100% - 32px) / 3)' } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: {
|
|
229
|
+
color: 'rgba(0, 0, 0, 0.6)',
|
|
230
|
+
lineHeight: '22px',
|
|
231
|
+
mb: 0.5,
|
|
232
|
+
} }, { children: "\u9898\u76EE\u8BED\u79CD" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { value: analysisState.voiceLanguage || 1, options: const_1.VOICE_LANGUAGE_OPTIONS, onChange: function (e) { return updateState({ voiceLanguage: Number(e.target.value) }); } })] })) })))] })), !preview && (0, jsx_runtime_1.jsx)(AiAnalysis_1.default, {})] }));
|
|
222
233
|
});
|
|
223
234
|
QuestionForm.displayName = 'QuestionForm';
|
|
224
235
|
exports.default = (0, react_1.memo)(QuestionForm);
|
|
@@ -10,7 +10,7 @@ exports.defaultQuestionParams = {
|
|
|
10
10
|
answerStatus: 2,
|
|
11
11
|
broadcastType: 1,
|
|
12
12
|
desc: '',
|
|
13
|
-
questions: [{ content: '', videoUrl: '' }],
|
|
13
|
+
questions: [{ content: '', videoUrl: '', videoURLWide: '', audioUrl: '' }],
|
|
14
14
|
duration: 30,
|
|
15
15
|
category: undefined,
|
|
16
16
|
extra: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eli-video-interview",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "鳄梨科技 AI视频面试 React SDK",
|
|
5
5
|
"author": "鳄梨科技",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"hox": "^2.1.0",
|
|
28
28
|
"immutability-helper": "^3.1.1",
|
|
29
29
|
"react-svg": "^15.1.3",
|
|
30
|
+
"react-virtualized-auto-sizer": "1.0.5",
|
|
31
|
+
"react-window": "1.8.10",
|
|
30
32
|
"sortablejs": "^1.15.0",
|
|
31
33
|
"typescript": "^4.7.2",
|
|
32
34
|
"use-immer": "^0.7.0",
|
|
33
|
-
"yup": "^1.3.3"
|
|
34
|
-
"react-window": "1.8.10",
|
|
35
|
-
"react-virtualized-auto-sizer": "1.0.5"
|
|
35
|
+
"yup": "^1.3.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/jest": "^27.5.1",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"type": "git",
|
|
67
67
|
"url": "https://jihulab.com/elihr/elifront/open/lerna-avocado-sdk.git"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "abb7c6d5688fd331fda7376b82cc9d1c93f4f3f5"
|
|
70
70
|
}
|