eli-video-interview 1.2.42-alpha.35 → 1.2.42-alpha.37

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.
@@ -24,7 +24,9 @@ export declare enum LANGUAGE_TYPE {
24
24
  MANDARIN = 2,
25
25
  CANTONESE = 13,
26
26
  JAPANESE = 12,
27
- ENGLISH = 11
27
+ ENGLISH = 11,
28
+ KOREAN = 19,
29
+ SPANISH = 20
28
30
  }
29
31
  /**
30
32
  * 题目类型
@@ -28,6 +28,8 @@ export var LANGUAGE_TYPE;
28
28
  LANGUAGE_TYPE[LANGUAGE_TYPE["CANTONESE"] = 13] = "CANTONESE";
29
29
  LANGUAGE_TYPE[LANGUAGE_TYPE["JAPANESE"] = 12] = "JAPANESE";
30
30
  LANGUAGE_TYPE[LANGUAGE_TYPE["ENGLISH"] = 11] = "ENGLISH";
31
+ LANGUAGE_TYPE[LANGUAGE_TYPE["KOREAN"] = 19] = "KOREAN";
32
+ LANGUAGE_TYPE[LANGUAGE_TYPE["SPANISH"] = 20] = "SPANISH";
31
33
  })(LANGUAGE_TYPE || (LANGUAGE_TYPE = {}));
32
34
  /**
33
35
  * 题目类型
@@ -3,6 +3,8 @@ export declare const LANGUAGE_NAMES: {
3
3
  2: string;
4
4
  3: string;
5
5
  4: string;
6
+ 5: string;
7
+ 6: string;
6
8
  };
7
9
  export declare const CATEGORY_NAME: {
8
10
  1: string;
@@ -16,10 +18,22 @@ export declare const SERVER_LANGUAGE_TYPE: {
16
18
  12: number;
17
19
  11: number;
18
20
  13: number;
21
+ 19: number;
22
+ 20: number;
19
23
  };
20
24
  export declare const LANGUAGE_SHOW_NAME: {
21
25
  2: string;
22
26
  13: string;
23
27
  12: string;
24
28
  11: string;
29
+ 19: string;
30
+ 20: string;
31
+ };
32
+ export declare const LANGUAGE_SHOW_NAMES: {
33
+ 2: string;
34
+ 13: string;
35
+ 12: string;
36
+ 11: string;
37
+ 19: string;
38
+ 20: string;
25
39
  };
@@ -1,15 +1,17 @@
1
1
  var _a, _b;
2
2
  import { CATEGORY_TYPE, LANGUAGE_TYPE } from "../../../../enum/ai-question";
3
- var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE, JAPANESE = LANGUAGE_TYPE.JAPANESE, ENGLISH = LANGUAGE_TYPE.ENGLISH;
3
+ var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE, JAPANESE = LANGUAGE_TYPE.JAPANESE, ENGLISH = LANGUAGE_TYPE.ENGLISH, KOREAN = LANGUAGE_TYPE.KOREAN, SPANISH = LANGUAGE_TYPE.SPANISH;
4
4
  var LANGUAGE = CATEGORY_TYPE.LANGUAGE, SEMANTICS = CATEGORY_TYPE.SEMANTICS, EXPRESSION = CATEGORY_TYPE.EXPRESSION, FORM = CATEGORY_TYPE.FORM, LANGUAGE_ABILITY = CATEGORY_TYPE.LANGUAGE_ABILITY;
5
5
  export var LANGUAGE_NAMES = {
6
6
  1: '中文-普通话',
7
7
  2: '日语',
8
8
  3: '英语',
9
9
  4: '中文-粤语',
10
+ 5: '韩语',
11
+ 6: '西班牙语',
10
12
  };
11
13
  export var CATEGORY_NAME = (_a = {},
12
- _a[LANGUAGE] = '语种',
14
+ _a[LANGUAGE] = '候选人语种',
13
15
  _a[SEMANTICS] = '语意',
14
16
  _a[EXPRESSION] = '表达',
15
17
  _a[FORM] = '形象',
@@ -20,6 +22,8 @@ export var SERVER_LANGUAGE_TYPE = (_b = {},
20
22
  _b[JAPANESE] = 2,
21
23
  _b[ENGLISH] = 3,
22
24
  _b[CANTONESE] = 4,
25
+ _b[KOREAN] = 5,
26
+ _b[SPANISH] = 6,
23
27
  _b);
24
28
  // 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
25
29
  export var LANGUAGE_SHOW_NAME = {
@@ -27,4 +31,14 @@ export var LANGUAGE_SHOW_NAME = {
27
31
  13: '中文',
28
32
  12: '日语',
29
33
  11: '英文',
34
+ 19: '韩语',
35
+ 20: '西班牙',
36
+ };
37
+ export var LANGUAGE_SHOW_NAMES = {
38
+ 2: '普通话',
39
+ 13: '粤语',
40
+ 12: '日语',
41
+ 11: '英文',
42
+ 19: '韩语',
43
+ 20: '西班牙',
30
44
  };
@@ -35,15 +35,15 @@ 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, SERVER_LANGUAGE_TYPE } from './const';
38
+ import { CATEGORY_NAME, LANGUAGE_SHOW_NAME, LANGUAGE_SHOW_NAMES, SERVER_LANGUAGE_TYPE } 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";
42
42
  import { PostAiAbilities } from "../../../../services/ai-question";
43
43
  import { useAiAnalysisStore } from "../../../../store/ai-question/ai-analysis-store";
44
44
  import { useRequest, useSetState } from 'ahooks';
45
- import { Checkbox, Dialog, Loading, Radio, RadioGroup, Typography } from 'fbm-ui';
46
- import { Box, Divider, FormControl, FormLabel } from 'fbm-ui/lib/mui';
45
+ import { Checkbox, Dialog, Loading, Radio, RadioGroup, Select, Typography } from 'fbm-ui';
46
+ import { Box, Divider, FormControl, FormLabel, Stack } from 'fbm-ui/lib/mui';
47
47
  import { useCallback, useEffect, useState } from 'react';
48
48
  var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE;
49
49
  var AiAssessmentCriteria = function (props) {
@@ -51,9 +51,10 @@ var AiAssessmentCriteria = function (props) {
51
51
  var _a = useAiAnalysisStore(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState, updateState = _a.updateState, updateAiAbilities = _a.updateAiAbilities;
52
52
  var _b = __read(useState([]), 2), groupData = _b[0], setGroupData = _b[1];
53
53
  var _c = __read(useState(1), 2), language = _c[0], setLanguage = _c[1];
54
- var _d = __read(useState(false), 2), checkedChinese = _d[0], setCheckedChinese = _d[1];
55
- var _e = __read(useState([]), 2), relatedAbilities = _e[0], setRelatedAbilities = _e[1];
56
- var _f = __read(useSetState({}), 2), checkAbilities = _f[0], setCheckAbilities = _f[1];
54
+ var _d = __read(useState(2), 2), voiceLanguage = _d[0], setVoiceLanguage = _d[1];
55
+ var _e = __read(useState(false), 2), checkedChinese = _e[0], setCheckedChinese = _e[1];
56
+ var _f = __read(useState([]), 2), relatedAbilities = _f[0], setRelatedAbilities = _f[1];
57
+ var _g = __read(useSetState({}), 2), checkAbilities = _g[0], setCheckAbilities = _g[1];
57
58
  var loading = useRequest(PostAiAbilities, {
58
59
  manual: false,
59
60
  onSuccess: function (_a) {
@@ -64,6 +65,7 @@ var AiAssessmentCriteria = function (props) {
64
65
  return SERVER_LANGUAGE_TYPE[type] === (analysisState.language || language);
65
66
  }) || {}, type = _b.type, relatedAbilities = _b.relatedAbilities;
66
67
  setRelatedAbilities(relatedAbilities);
68
+ setVoiceLanguage(analysisState.voiceLanguage || 2);
67
69
  setLanguage(type || language);
68
70
  setCheckedChinese([MANDARIN, CANTONESE].includes(type || language));
69
71
  setGroupData(ret);
@@ -93,7 +95,6 @@ var AiAssessmentCriteria = function (props) {
93
95
  fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
94
96
  }
95
97
  });
96
- console.log(language);
97
98
  setLanguage(language);
98
99
  setCheckedChinese([MANDARIN, CANTONESE].includes(language));
99
100
  setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
@@ -102,47 +103,52 @@ var AiAssessmentCriteria = function (props) {
102
103
  updateAiAbilities(__spreadArray(__spreadArray([], __read(aiAbilities.filter(function (v) { return v.isWorkplace; })), false), __read(Object.values(checkAbilities)
103
104
  .filter(function (item) { return item; })
104
105
  .sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); })), false));
105
- updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
106
+ updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1, voiceLanguage: voiceLanguage });
106
107
  onClose();
107
- }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState]);
108
+ }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState, voiceLanguage]);
108
109
  useEffect(function () {
109
110
  aiAbilities.forEach(function (item) {
110
111
  var _a;
111
112
  return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
112
113
  });
113
114
  }, [aiAbilities, fixSetCheckAbilities]);
114
- 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 }) }))) : (groupData.map(function (_a) {
115
- var name = _a.name, type = _a.type, list = _a.list;
116
- return (_jsxs(Box, { children: [(list.filter(function (_a) {
117
- var type = _a.type;
118
- return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
119
- }).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsxs(FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: [type === CATEGORY_TYPE.LANGUAGE ? (_jsx(Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : (_jsx(Typography, { children: type === CATEGORY_TYPE.EXPRESSION ? LANGUAGE_SHOW_NAME[language] + name : name })), type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(Box, { children: [_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
120
- .filter(function (_a) {
121
- var type = _a.type;
122
- return [MANDARIN, CANTONESE].includes(type);
123
- })
124
- .map(function (_a) {
125
- var name = _a.name, type = _a.type, token = _a.token;
126
- return checkedChinese && _jsx(Radio, { value: type, label: name }, token);
127
- }) })), list
128
- .filter(function (_a) {
129
- var type = _a.type;
130
- return ![MANDARIN, CANTONESE].includes(type);
131
- })
132
- .map(function (_a) {
133
- var name = _a.name, type = _a.type, token = _a.token;
134
- return (_jsx(Radio, { value: type, label: name }, token));
135
- })] })), _jsx(Divider, { sx: { mb: 1 } }), _jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : (_jsx(_Fragment, { children: list.map(function (item) {
136
- var name = item.name, desc = item.desc, type = item.type, token = item.token;
137
- if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
138
- var isLanguageAbility = [14, 15].includes(type);
139
- return (_jsxs(Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [_jsx(Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
140
- var _a;
141
- return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
142
- } }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
143
- }
144
- return null;
145
- }) }))] }, "".concat(name, "-").concat(type)));
146
- })) }) })));
115
+ 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: Object.entries(LANGUAGE_SHOW_NAMES).map(function (_a) {
116
+ var _b = __read(_a, 2), value = _b[0], label = _b[1];
117
+ return ({ value: value, label: label });
118
+ }), sx: {
119
+ width: 240,
120
+ } })] })), groupData.map(function (_a) {
121
+ var name = _a.name, type = _a.type, list = _a.list;
122
+ return (_jsxs(Box, { children: [(list.filter(function (_a) {
123
+ var type = _a.type;
124
+ return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
125
+ }).length > 0 || type === CATEGORY_TYPE.LANGUAGE) && (_jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: _jsxs(Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === CATEGORY_TYPE.LANGUAGE ? (_jsx(Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : (_jsx(Typography, { children: type === CATEGORY_TYPE.EXPRESSION ? LANGUAGE_SHOW_NAME[language] + name : name })), type === CATEGORY_TYPE.LANGUAGE && (_jsx(Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === CATEGORY_TYPE.LANGUAGE ? (_jsxs(Box, { children: [_jsxs(RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [_jsx(Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), _jsx(RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
126
+ .filter(function (_a) {
127
+ var type = _a.type;
128
+ return [MANDARIN, CANTONESE].includes(type);
129
+ })
130
+ .map(function (_a) {
131
+ var name = _a.name, type = _a.type, token = _a.token;
132
+ return checkedChinese && _jsx(Radio, { value: type, label: name }, token);
133
+ }) })), list
134
+ .filter(function (_a) {
135
+ var type = _a.type;
136
+ return ![MANDARIN, CANTONESE].includes(type);
137
+ })
138
+ .map(function (_a) {
139
+ var name = _a.name, type = _a.type, token = _a.token;
140
+ return (_jsx(Radio, { value: type, label: name }, token));
141
+ })] })), _jsx(Divider, { sx: { mb: 1 } }), _jsx(FormControl, { children: _jsx(FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : (_jsx(_Fragment, { children: list.map(function (item) {
142
+ var name = item.name, desc = item.desc, type = item.type, token = item.token;
143
+ if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
144
+ var isLanguageAbility = [14, 15].includes(type);
145
+ return (_jsxs(Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [_jsx(Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
146
+ var _a;
147
+ return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
148
+ } }), _jsx(Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
149
+ }
150
+ return null;
151
+ }) }))] }, "".concat(name, "-").concat(type)));
152
+ })] })) }) })));
147
153
  };
148
154
  export default AiAssessmentCriteria;
@@ -37,6 +37,7 @@ export interface QuestionParams {
37
37
  aiType: number;
38
38
  weight: number | string;
39
39
  language?: number;
40
+ voiceLanguage?: number;
40
41
  aiShowType: number;
41
42
  videoBroadcast: VideoBroadcastParams;
42
43
  answerStatus: number;
@@ -235,6 +235,7 @@ var Graph = function (_a) {
235
235
  itemSpacing: 40,
236
236
  height: height,
237
237
  };
238
+ pathRef.current = [];
238
239
  draw(layout, items, pathRef.current, ctx);
239
240
  }
240
241
  }, [ctx, items, height]);
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AiAbilityItem, WorkplaceItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
3
3
  import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
4
- interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language'> {
4
+ interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language' | 'voiceLanguage'> {
5
5
  }
6
6
  export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn<{
7
7
  aiAbilities: AiAbilityItem[];
@@ -24,7 +24,9 @@ export declare enum LANGUAGE_TYPE {
24
24
  MANDARIN = 2,
25
25
  CANTONESE = 13,
26
26
  JAPANESE = 12,
27
- ENGLISH = 11
27
+ ENGLISH = 11,
28
+ KOREAN = 19,
29
+ SPANISH = 20
28
30
  }
29
31
  /**
30
32
  * 题目类型
@@ -31,6 +31,8 @@ var LANGUAGE_TYPE;
31
31
  LANGUAGE_TYPE[LANGUAGE_TYPE["CANTONESE"] = 13] = "CANTONESE";
32
32
  LANGUAGE_TYPE[LANGUAGE_TYPE["JAPANESE"] = 12] = "JAPANESE";
33
33
  LANGUAGE_TYPE[LANGUAGE_TYPE["ENGLISH"] = 11] = "ENGLISH";
34
+ LANGUAGE_TYPE[LANGUAGE_TYPE["KOREAN"] = 19] = "KOREAN";
35
+ LANGUAGE_TYPE[LANGUAGE_TYPE["SPANISH"] = 20] = "SPANISH";
34
36
  })(LANGUAGE_TYPE = exports.LANGUAGE_TYPE || (exports.LANGUAGE_TYPE = {}));
35
37
  /**
36
38
  * 题目类型
@@ -3,6 +3,8 @@ export declare const LANGUAGE_NAMES: {
3
3
  2: string;
4
4
  3: string;
5
5
  4: string;
6
+ 5: string;
7
+ 6: string;
6
8
  };
7
9
  export declare const CATEGORY_NAME: {
8
10
  1: string;
@@ -16,10 +18,22 @@ export declare const SERVER_LANGUAGE_TYPE: {
16
18
  12: number;
17
19
  11: number;
18
20
  13: number;
21
+ 19: number;
22
+ 20: number;
19
23
  };
20
24
  export declare const LANGUAGE_SHOW_NAME: {
21
25
  2: string;
22
26
  13: string;
23
27
  12: string;
24
28
  11: string;
29
+ 19: string;
30
+ 20: string;
31
+ };
32
+ export declare const LANGUAGE_SHOW_NAMES: {
33
+ 2: string;
34
+ 13: string;
35
+ 12: string;
36
+ 11: string;
37
+ 19: string;
38
+ 20: string;
25
39
  };
@@ -1,18 +1,20 @@
1
1
  "use strict";
2
2
  var _a, _b;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.LANGUAGE_SHOW_NAME = exports.SERVER_LANGUAGE_TYPE = exports.CATEGORY_NAME = exports.LANGUAGE_NAMES = void 0;
4
+ 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
- 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;
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;
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;
8
8
  exports.LANGUAGE_NAMES = {
9
9
  1: '中文-普通话',
10
10
  2: '日语',
11
11
  3: '英语',
12
12
  4: '中文-粤语',
13
+ 5: '韩语',
14
+ 6: '西班牙语',
13
15
  };
14
16
  exports.CATEGORY_NAME = (_a = {},
15
- _a[LANGUAGE] = '语种',
17
+ _a[LANGUAGE] = '候选人语种',
16
18
  _a[SEMANTICS] = '语意',
17
19
  _a[EXPRESSION] = '表达',
18
20
  _a[FORM] = '形象',
@@ -23,6 +25,8 @@ exports.SERVER_LANGUAGE_TYPE = (_b = {},
23
25
  _b[JAPANESE] = 2,
24
26
  _b[ENGLISH] = 3,
25
27
  _b[CANTONESE] = 4,
28
+ _b[KOREAN] = 5,
29
+ _b[SPANISH] = 6,
26
30
  _b);
27
31
  // 由于语种value 和 name的映射不对应,这里用于前端显示 AI基础能力 中文|英文表达
28
32
  exports.LANGUAGE_SHOW_NAME = {
@@ -30,4 +34,14 @@ exports.LANGUAGE_SHOW_NAME = {
30
34
  13: '中文',
31
35
  12: '日语',
32
36
  11: '英文',
37
+ 19: '韩语',
38
+ 20: '西班牙',
39
+ };
40
+ exports.LANGUAGE_SHOW_NAMES = {
41
+ 2: '普通话',
42
+ 13: '粤语',
43
+ 12: '日语',
44
+ 11: '英文',
45
+ 19: '韩语',
46
+ 20: '西班牙',
33
47
  };
@@ -56,9 +56,10 @@ var AiAssessmentCriteria = function (props) {
56
56
  var _a = (0, ai_analysis_store_1.useAiAnalysisStore)(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState, updateState = _a.updateState, updateAiAbilities = _a.updateAiAbilities;
57
57
  var _b = __read((0, react_1.useState)([]), 2), groupData = _b[0], setGroupData = _b[1];
58
58
  var _c = __read((0, react_1.useState)(1), 2), language = _c[0], setLanguage = _c[1];
59
- var _d = __read((0, react_1.useState)(false), 2), checkedChinese = _d[0], setCheckedChinese = _d[1];
60
- var _e = __read((0, react_1.useState)([]), 2), relatedAbilities = _e[0], setRelatedAbilities = _e[1];
61
- var _f = __read((0, ahooks_1.useSetState)({}), 2), checkAbilities = _f[0], setCheckAbilities = _f[1];
59
+ var _d = __read((0, react_1.useState)(2), 2), voiceLanguage = _d[0], setVoiceLanguage = _d[1];
60
+ var _e = __read((0, react_1.useState)(false), 2), checkedChinese = _e[0], setCheckedChinese = _e[1];
61
+ var _f = __read((0, react_1.useState)([]), 2), relatedAbilities = _f[0], setRelatedAbilities = _f[1];
62
+ var _g = __read((0, ahooks_1.useSetState)({}), 2), checkAbilities = _g[0], setCheckAbilities = _g[1];
62
63
  var loading = (0, ahooks_1.useRequest)(ai_question_2.PostAiAbilities, {
63
64
  manual: false,
64
65
  onSuccess: function (_a) {
@@ -69,6 +70,7 @@ var AiAssessmentCriteria = function (props) {
69
70
  return const_1.SERVER_LANGUAGE_TYPE[type] === (analysisState.language || language);
70
71
  }) || {}, type = _b.type, relatedAbilities = _b.relatedAbilities;
71
72
  setRelatedAbilities(relatedAbilities);
73
+ setVoiceLanguage(analysisState.voiceLanguage || 2);
72
74
  setLanguage(type || language);
73
75
  setCheckedChinese([MANDARIN, CANTONESE].includes(type || language));
74
76
  setGroupData(ret);
@@ -98,7 +100,6 @@ var AiAssessmentCriteria = function (props) {
98
100
  fixSetCheckAbilities((_a = {}, _a[key] = undefined, _a));
99
101
  }
100
102
  });
101
- console.log(language);
102
103
  setLanguage(language);
103
104
  setCheckedChinese([MANDARIN, CANTONESE].includes(language));
104
105
  setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
@@ -107,47 +108,52 @@ var AiAssessmentCriteria = function (props) {
107
108
  updateAiAbilities(__spreadArray(__spreadArray([], __read(aiAbilities.filter(function (v) { return v.isWorkplace; })), false), __read(Object.values(checkAbilities)
108
109
  .filter(function (item) { return item; })
109
110
  .sort(function (a, b) { return ((a === null || a === void 0 ? void 0 : a.sort) && (b === null || b === void 0 ? void 0 : b.sort) ? (a === null || a === void 0 ? void 0 : a.sort) - (b === null || b === void 0 ? void 0 : b.sort) : 0); })), false));
110
- updateState({ language: const_1.SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
111
+ updateState({ language: const_1.SERVER_LANGUAGE_TYPE[language], aiSwitch: 1, voiceLanguage: voiceLanguage });
111
112
  onClose();
112
- }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState]);
113
+ }, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState, voiceLanguage]);
113
114
  (0, react_1.useEffect)(function () {
114
115
  aiAbilities.forEach(function (item) {
115
116
  var _a;
116
117
  return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
117
118
  });
118
119
  }, [aiAbilities, fixSetCheckAbilities]);
119
- 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 }) }))) : (groupData.map(function (_a) {
120
- var name = _a.name, type = _a.type, list = _a.list;
121
- return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
122
- var type = _a.type;
123
- return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
124
- }).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsxs)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: [type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { children: type === ai_question_1.CATEGORY_TYPE.EXPRESSION ? const_1.LANGUAGE_SHOW_NAME[language] + name : name })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
125
- .filter(function (_a) {
126
- var type = _a.type;
127
- return [MANDARIN, CANTONESE].includes(type);
128
- })
129
- .map(function (_a) {
130
- var name = _a.name, type = _a.type, token = _a.token;
131
- return checkedChinese && (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token);
132
- }) })), list
133
- .filter(function (_a) {
134
- var type = _a.type;
135
- return ![MANDARIN, CANTONESE].includes(type);
136
- })
137
- .map(function (_a) {
138
- var name = _a.name, type = _a.type, token = _a.token;
139
- return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token));
140
- })] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: list.map(function (item) {
141
- var name = item.name, desc = item.desc, type = item.type, token = item.token;
142
- if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
143
- var isLanguageAbility = [14, 15].includes(type);
144
- return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
145
- var _a;
146
- return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
147
- } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
148
- }
149
- return null;
150
- }) }))] }, "".concat(name, "-").concat(type)));
151
- })) }) })));
120
+ 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: Object.entries(const_1.LANGUAGE_SHOW_NAMES).map(function (_a) {
121
+ var _b = __read(_a, 2), value = _b[0], label = _b[1];
122
+ return ({ value: value, label: label });
123
+ }), sx: {
124
+ width: 240,
125
+ } })] })), groupData.map(function (_a) {
126
+ var name = _a.name, type = _a.type, list = _a.list;
127
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(list.filter(function (_a) {
128
+ var type = _a.type;
129
+ return relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type);
130
+ }).length > 0 || type === ai_question_1.CATEGORY_TYPE.LANGUAGE) && ((0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 14, fontWeight: 400, color: 'rgba(0,0,0,0.86)' } }, { children: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ spacing: 1, direction: "row", alignItems: "center" }, { children: [type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ style: { fontSize: 16, fontWeight: 500 } }, { children: name }))) : ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, { children: type === ai_question_1.CATEGORY_TYPE.EXPRESSION ? const_1.LANGUAGE_SHOW_NAME[language] + name : name })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary", sx: { ml: 1 } }, { children: "\u4EE5\u6240\u9009\u8BED\u8A00\u8BC6\u522B\u5019\u9009\u4EBA\u56DE\u7B54\u5185\u5BB9\u5E76\u8F6C\u6362\u6587\u5B57" })))] })) })) })), type === ai_question_1.CATEGORY_TYPE.LANGUAGE ? ((0, jsx_runtime_1.jsxs)(mui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.RadioGroup, __assign({ sx: { mb: 1, ml: '4px' }, row: false, value: language, onChange: function (e) { return onLanguageChange(e, list); } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: "0", RadioProps: { checked: checkedChinese }, label: "\u4E2D\u6587" }), (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioGroup, __assign({ value: language, sx: { ml: 3 }, onChange: function (e) { return onLanguageChange(e, list); } }, { children: list
131
+ .filter(function (_a) {
132
+ var type = _a.type;
133
+ return [MANDARIN, CANTONESE].includes(type);
134
+ })
135
+ .map(function (_a) {
136
+ var name = _a.name, type = _a.type, token = _a.token;
137
+ return checkedChinese && (0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token);
138
+ }) })), list
139
+ .filter(function (_a) {
140
+ var type = _a.type;
141
+ return ![MANDARIN, CANTONESE].includes(type);
142
+ })
143
+ .map(function (_a) {
144
+ var name = _a.name, type = _a.type, token = _a.token;
145
+ return ((0, jsx_runtime_1.jsx)(fbm_ui_1.Radio, { value: type, label: name }, token));
146
+ })] })), (0, jsx_runtime_1.jsx)(mui_1.Divider, { sx: { mb: 1 } }), (0, jsx_runtime_1.jsx)(mui_1.FormControl, { children: (0, jsx_runtime_1.jsx)(mui_1.FormLabel, __assign({ component: "legend", style: { fontSize: 16, color: 'rgba(0,0,0,0.86)', fontWeight: 500, marginBottom: 16 } }, { children: "AI\u57FA\u7840\u80FD\u529B" })) })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: list.map(function (item) {
147
+ var name = item.name, desc = item.desc, type = item.type, token = item.token;
148
+ if (relatedAbilities === null || relatedAbilities === void 0 ? void 0 : relatedAbilities.includes(type)) {
149
+ var isLanguageAbility = [14, 15].includes(type);
150
+ return ((0, jsx_runtime_1.jsxs)(mui_1.Box, __assign({ padding: "4px 0 4px 4px", display: "flex", flexDirection: "column" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Checkbox, { checked: !!checkAbilities[type], label: isLanguageAbility ? desc : name, onChange: function (e, checked) {
151
+ var _a;
152
+ return fixSetCheckAbilities((_a = {}, _a[type] = checked ? item : undefined, _a));
153
+ } }), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "secondary", ml: "26px" }, { children: isLanguageAbility ? '' : desc }))] }), token));
154
+ }
155
+ return null;
156
+ }) }))] }, "".concat(name, "-").concat(type)));
157
+ })] })) }) })));
152
158
  };
153
159
  exports.default = AiAssessmentCriteria;
@@ -37,6 +37,7 @@ export interface QuestionParams {
37
37
  aiType: number;
38
38
  weight: number | string;
39
39
  language?: number;
40
+ voiceLanguage?: number;
40
41
  aiShowType: number;
41
42
  videoBroadcast: VideoBroadcastParams;
42
43
  answerStatus: number;
@@ -239,6 +239,7 @@ var Graph = function (_a) {
239
239
  itemSpacing: 40,
240
240
  height: height,
241
241
  };
242
+ pathRef.current = [];
242
243
  draw(layout, items, pathRef.current, ctx);
243
244
  }
244
245
  }, [ctx, items, height]);
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AiAbilityItem, WorkplaceItem } from '@/modules/ai-question/components/AiAssessmentCriteria/interface';
3
3
  import { QuestionParams } from '@/modules/ai-question/components/QuestionUpdate/interface';
4
- interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language'> {
4
+ interface AnalysisStateParams extends Pick<QuestionParams, 'aiSwitch' | 'language' | 'voiceLanguage'> {
5
5
  }
6
6
  export declare const useAiAnalysisStore: (depsFn?: import("hox/es/types").DepsFn<{
7
7
  aiAbilities: AiAbilityItem[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.42-alpha.35",
3
+ "version": "1.2.42-alpha.37",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",