eli-video-interview 1.2.40-alpha.8 → 1.2.41-alpha.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/components/Charts/ReportPie.js +21 -6
- package/esm/components/SvgIcon/index.js +17 -1
- package/esm/components/react-photo-view/PhotoBox.js +32 -7
- package/esm/components/react-photo-view/PhotoPage.js +18 -2
- package/esm/components/react-photo-view/PhotoProvider.js +17 -1
- package/esm/components/react-photo-view/PhotoSlider.js +19 -3
- package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +18 -2
- package/esm/components/react-photo-view/hooks/useAnimationPosition.js +18 -2
- package/esm/components/react-photo-view/hooks/useAnimationVisible.js +19 -3
- package/esm/components/react-photo-view/hooks/useContinuousTap.js +28 -3
- package/esm/components/react-photo-view/hooks/useMethods.js +17 -1
- package/esm/components/react-photo-view/hooks/useScrollPosition.js +21 -5
- package/esm/components/react-photo-view/hooks/useTargetScale.js +17 -1
- package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +18 -2
- package/esm/components/react-photo-view/utils/getSuitableImageSize.js +17 -1
- package/esm/modules/ai-ability/Root.js +21 -5
- package/esm/modules/ai-ability/components/AbilityFormItem/index.js +18 -2
- package/esm/modules/ai-ability/components/AddAbility/index.js +19 -3
- package/esm/modules/ai-ability/components/UpdateAbility/index.js +21 -5
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +17 -1
- package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +17 -1
- package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +17 -1
- package/esm/modules/ai-question/components/AiAnalysis/index.js +17 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +23 -7
- package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.js +17 -1
- package/esm/modules/ai-question/components/BaseAccordion/index.js +19 -3
- package/esm/modules/ai-question/components/BootVideo/index.js +22 -6
- package/esm/modules/ai-question/components/QuestionModel/Interactive.js +17 -1
- package/esm/modules/ai-question/components/QuestionModel/Item.js +37 -3
- package/esm/modules/ai-question/components/QuestionPreview/index.js +18 -2
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +18 -2
- package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +17 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +23 -6
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +17 -1
- package/esm/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Score.js +69 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +18 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +20 -4
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +18 -2
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +18 -2
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/esm/modules/ai-report/components/AIEvaluate/Evaluate.js +18 -2
- package/esm/modules/ai-report/components/AIEvaluate/Graph.js +18 -2
- package/esm/modules/ai-report/components/AIEvaluate/index.js +17 -1
- package/esm/modules/ai-report/components/MenuAnchor/index.js +18 -2
- package/esm/modules/ai-report/components/RankingRange/Item.js +17 -1
- package/esm/modules/ai-report/components/RankingRange/index.js +18 -2
- package/esm/modules/ai-report/components/ScoreReport/Bar.js +18 -2
- package/esm/modules/ai-report/components/ScoreReport/Score.js +19 -3
- package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +3 -1
- package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +18 -2
- package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +25 -5
- package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +17 -1
- package/esm/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +18 -2
- package/esm/modules/ai-report/interface.d.ts +1 -0
- package/esm/modules/ai-template/Root.js +18 -2
- package/esm/modules/ai-template/components/QuestionList/Item.js +17 -1
- package/esm/modules/ai-template/components/TemplateList/index.js +17 -1
- package/esm/modules/ai-template/components/TemplateMenu/index.js +19 -3
- package/esm/store/ai-ability/question-ability-store.js +19 -3
- package/esm/store/ai-ability-select/question-ability-store.js +20 -4
- package/esm/store/ai-question/ai-analysis-store.js +22 -6
- package/esm/store/ai-question/boot-video-store.js +20 -4
- package/esm/store/ai-question/global-store.js +20 -4
- package/esm/store/ai-question/interview-room-store.js +20 -4
- package/esm/store/ai-question/question-model-store.js +19 -3
- package/esm/store/ai-question/question-preview-store.js +20 -4
- package/esm/store/ai-question/question-template-store.js +19 -3
- package/esm/store/ai-question/question-update-store.js +20 -4
- package/esm/store/ai-report/global-store.js +21 -5
- package/esm/store/ai-template/global-store.js +20 -4
- package/esm/store/enterprise/enterprise-store.js +20 -4
- package/lib/components/Charts/ReportPie.js +21 -6
- package/lib/components/SvgIcon/index.js +17 -1
- package/lib/components/react-photo-view/PhotoBox.js +32 -7
- package/lib/components/react-photo-view/PhotoPage.js +18 -2
- package/lib/components/react-photo-view/PhotoProvider.js +17 -1
- package/lib/components/react-photo-view/PhotoSlider.js +19 -3
- package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +18 -2
- package/lib/components/react-photo-view/hooks/useAnimationPosition.js +18 -2
- package/lib/components/react-photo-view/hooks/useAnimationVisible.js +19 -3
- package/lib/components/react-photo-view/hooks/useContinuousTap.js +28 -3
- package/lib/components/react-photo-view/hooks/useMethods.js +17 -1
- package/lib/components/react-photo-view/hooks/useScrollPosition.js +21 -5
- package/lib/components/react-photo-view/hooks/useTargetScale.js +17 -1
- package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +18 -2
- package/lib/components/react-photo-view/utils/getSuitableImageSize.js +17 -1
- package/lib/modules/ai-ability/Root.js +21 -5
- package/lib/modules/ai-ability/components/AbilityFormItem/index.js +18 -2
- package/lib/modules/ai-ability/components/AddAbility/index.js +19 -3
- package/lib/modules/ai-ability/components/UpdateAbility/index.js +21 -5
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +17 -1
- package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +17 -1
- package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.js +17 -1
- package/lib/modules/ai-question/components/AiAnalysis/index.js +17 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +23 -7
- package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.js +17 -1
- package/lib/modules/ai-question/components/BaseAccordion/index.js +19 -3
- package/lib/modules/ai-question/components/BootVideo/index.js +22 -6
- package/lib/modules/ai-question/components/QuestionModel/Interactive.js +17 -1
- package/lib/modules/ai-question/components/QuestionModel/Item.js +36 -2
- package/lib/modules/ai-question/components/QuestionPreview/index.js +18 -2
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +18 -2
- package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +17 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +23 -6
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +17 -1
- package/lib/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Score.js +73 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +18 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +20 -4
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +18 -2
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +18 -2
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
- package/lib/modules/ai-report/components/AIEvaluate/Evaluate.js +18 -2
- package/lib/modules/ai-report/components/AIEvaluate/Graph.js +18 -2
- package/lib/modules/ai-report/components/AIEvaluate/index.js +17 -1
- package/lib/modules/ai-report/components/MenuAnchor/index.js +18 -2
- package/lib/modules/ai-report/components/RankingRange/Item.js +17 -1
- package/lib/modules/ai-report/components/RankingRange/index.js +18 -2
- package/lib/modules/ai-report/components/ScoreReport/Bar.js +18 -2
- package/lib/modules/ai-report/components/ScoreReport/Score.js +19 -3
- package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +3 -1
- package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +18 -2
- package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +25 -5
- package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +17 -1
- package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
- package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +18 -2
- package/lib/modules/ai-report/interface.d.ts +1 -0
- package/lib/modules/ai-template/Root.js +18 -2
- package/lib/modules/ai-template/components/QuestionList/Item.js +17 -1
- package/lib/modules/ai-template/components/TemplateList/index.js +17 -1
- package/lib/modules/ai-template/components/TemplateMenu/index.js +19 -3
- package/lib/store/ai-ability/question-ability-store.js +19 -3
- package/lib/store/ai-ability-select/question-ability-store.js +20 -4
- package/lib/store/ai-question/ai-analysis-store.js +22 -6
- package/lib/store/ai-question/boot-video-store.js +20 -4
- package/lib/store/ai-question/global-store.js +20 -4
- package/lib/store/ai-question/interview-room-store.js +20 -4
- package/lib/store/ai-question/question-model-store.js +19 -3
- package/lib/store/ai-question/question-preview-store.js +20 -4
- package/lib/store/ai-question/question-template-store.js +19 -3
- package/lib/store/ai-question/question-update-store.js +20 -4
- package/lib/store/ai-report/global-store.js +21 -5
- package/lib/store/ai-template/global-store.js +20 -4
- package/lib/store/enterprise/enterprise-store.js +20 -4
- package/package.json +1 -1
|
@@ -45,6 +45,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o), r, ar = [], e;
|
|
52
|
+
try {
|
|
53
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) { e = { error: error }; }
|
|
56
|
+
finally {
|
|
57
|
+
try {
|
|
58
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
59
|
+
}
|
|
60
|
+
finally { if (e) throw e.error; }
|
|
61
|
+
}
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
48
64
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
65
|
import { GetAiDefine } from "../../../../services/ai-ability";
|
|
50
66
|
import { useRequest } from 'ahooks';
|
|
@@ -53,8 +69,8 @@ import { Box, Stack } from 'fbm-ui/lib/mui';
|
|
|
53
69
|
import { useCallback, useEffect, useState } from 'react';
|
|
54
70
|
var AbilityFormItem = function (_a) {
|
|
55
71
|
var token = _a.token, title = _a.title, name = _a.name, type = _a.type, _b = _a.items, items = _b === void 0 ? [] : _b, _c = _a.mode, mode = _c === void 0 ? 'show' : _c, _d = _a.canReplace, canReplace = _d === void 0 ? false : _d, _e = _a.maxTextLength, maxTextLength = _e === void 0 ? 100 : _e, onChange = _a.onChange;
|
|
56
|
-
var _f = useState(items.length ? items.join('\n') : ''), content = _f[0], setContent = _f[1];
|
|
57
|
-
var _g = useState(mode), internalMode = _g[0], setMode = _g[1];
|
|
72
|
+
var _f = __read(useState(items.length ? items.join('\n') : ''), 2), content = _f[0], setContent = _f[1];
|
|
73
|
+
var _g = __read(useState(mode), 2), internalMode = _g[0], setMode = _g[1];
|
|
58
74
|
var _h = useRequest(GetAiDefine, {
|
|
59
75
|
manual: true,
|
|
60
76
|
onSuccess: function (_a) {
|
|
@@ -45,6 +45,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o), r, ar = [], e;
|
|
52
|
+
try {
|
|
53
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) { e = { error: error }; }
|
|
56
|
+
finally {
|
|
57
|
+
try {
|
|
58
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
59
|
+
}
|
|
60
|
+
finally { if (e) throw e.error; }
|
|
61
|
+
}
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
48
64
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
65
|
import AbilityFormItem from '../AbilityFormItem';
|
|
50
66
|
import { CheckDuplicateCollection, PostQuestionCollectionUpsert } from "../../../../services/ai-ability";
|
|
@@ -53,8 +69,8 @@ import { Box, Button, Drawer, Message, TextField, Typography, useTextField } fro
|
|
|
53
69
|
import { useCallback, useEffect, useState } from 'react';
|
|
54
70
|
var AddAbility = function (props) {
|
|
55
71
|
var open = props.open, _a = props.name, name = _a === void 0 ? '' : _a, _b = props.type, type = _b === void 0 ? 3 : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
|
|
56
|
-
var _c = useState(''), value = _c[0], setValue = _c[1];
|
|
57
|
-
var _d = useState(1), step = _d[0], setStep = _d[1];
|
|
72
|
+
var _c = __read(useState(''), 2), value = _c[0], setValue = _c[1];
|
|
73
|
+
var _d = __read(useState(1), 2), step = _d[0], setStep = _d[1];
|
|
58
74
|
// const [stepLoading, setStepLoading] = useState<boolean>(false);
|
|
59
75
|
var InitialValues = {
|
|
60
76
|
workPlaceItems: [
|
|
@@ -90,7 +106,7 @@ var AddAbility = function (props) {
|
|
|
90
106
|
},
|
|
91
107
|
],
|
|
92
108
|
};
|
|
93
|
-
var _e = useState(InitialValues.workPlaceItems), workPlaceItems = _e[0], setWorkPlaceItems = _e[1];
|
|
109
|
+
var _e = __read(useState(InitialValues.workPlaceItems), 2), workPlaceItems = _e[0], setWorkPlaceItems = _e[1];
|
|
94
110
|
var _f = useRequest(PostQuestionCollectionUpsert, {
|
|
95
111
|
manual: true,
|
|
96
112
|
onSuccess: function () {
|
|
@@ -45,6 +45,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
49
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
50
|
+
if (!m) return o;
|
|
51
|
+
var i = m.call(o), r, ar = [], e;
|
|
52
|
+
try {
|
|
53
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) { e = { error: error }; }
|
|
56
|
+
finally {
|
|
57
|
+
try {
|
|
58
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
59
|
+
}
|
|
60
|
+
finally { if (e) throw e.error; }
|
|
61
|
+
}
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
48
64
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
65
|
import { InitialValues } from '../../const';
|
|
50
66
|
import AbilityFormItem from '../AbilityFormItem';
|
|
@@ -54,13 +70,13 @@ import { Box, Button, Divider, Drawer, Message, TextField, Typography, useTextFi
|
|
|
54
70
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
55
71
|
var UpdateAbility = function (props) {
|
|
56
72
|
var open = props.open, _a = props.type, type = _a === void 0 ? 1 : _a, isWorkplace = props.isWorkplace, _b = props.name, name = _b === void 0 ? '' : _b, ablilityNameLength = props.ablilityNameLength, token = props.token, onClose = props.onClose, onSuccess = props.onSuccess;
|
|
57
|
-
var _c = useState(''), value = _c[0], setValue = _c[1];
|
|
58
|
-
var _d = useState(1), step = _d[0], setStep = _d[1];
|
|
59
|
-
var _e = useState('show'), mode = _e[0], setMode = _e[1];
|
|
73
|
+
var _c = __read(useState(''), 2), value = _c[0], setValue = _c[1];
|
|
74
|
+
var _d = __read(useState(1), 2), step = _d[0], setStep = _d[1];
|
|
75
|
+
var _e = __read(useState('show'), 2), mode = _e[0], setMode = _e[1];
|
|
60
76
|
var firstLoad = useRef(true);
|
|
61
|
-
var _f = useState(false), showAiDefineDetail = _f[0], setShowAiDefineDetail = _f[1];
|
|
77
|
+
var _f = __read(useState(false), 2), showAiDefineDetail = _f[0], setShowAiDefineDetail = _f[1];
|
|
62
78
|
// const [submitDisabled, setSubmitDisabled] = useState<boolean>(true);
|
|
63
|
-
var _g = useState(InitialValues.workPlaceItems), workPlaceItems = _g[0], setWorkPlaceItems = _g[1];
|
|
79
|
+
var _g = __read(useState(InitialValues.workPlaceItems), 2), workPlaceItems = _g[0], setWorkPlaceItems = _g[1];
|
|
64
80
|
var _h = useRequest(PostQuestionCollectionUpsert, {
|
|
65
81
|
manual: true,
|
|
66
82
|
onSuccess: function () {
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
29
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
30
|
if (ar || !(i in from)) {
|
|
@@ -27,7 +43,7 @@ var AiAbilityItem = function (_a) {
|
|
|
27
43
|
var name = _a.name, isNew = _a.isNew, token = _a.token, detail = _a.detail;
|
|
28
44
|
var _b = useAiAbilityListStore(), selctedAbilitys = _b.selctedAbilitys, setSelctedAbilitys = _b.setSelctedAbilitys;
|
|
29
45
|
var handleChange = function (_, checked) {
|
|
30
|
-
return setSelctedAbilitys(__spreadArray(__spreadArray([], selctedAbilitys.filter(function (v) { return v !== token; }),
|
|
46
|
+
return setSelctedAbilitys(__spreadArray(__spreadArray([], __read(selctedAbilitys.filter(function (v) { return v !== token; })), false), __read((checked ? [token] : [])), false));
|
|
31
47
|
};
|
|
32
48
|
return (_jsx(Paper, __assign({ variant: "outlined" }, { children: _jsxs(Box, __assign({ sx: { pl: 2, width: 240, height: 54, display: 'flex', alignItems: 'center', position: 'relative' } }, { children: [_jsx(Checkbox, { onChange: handleChange, label: _jsx(AiAbilityLable, { name: name, detail: detail }), checked: selctedAbilitys.includes(token),
|
|
33
49
|
// @ts-ignore
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
29
|
import { useCallback, useEffect } from 'react';
|
|
14
30
|
import { AddIcon, Box, Button } from 'fbm-ui';
|
|
@@ -20,7 +36,7 @@ var MainPoints = function (props) {
|
|
|
20
36
|
var extra = props.extra, index = props.index;
|
|
21
37
|
var _a = useAiAnalysisStore(function (store) { return [store.aiAbilities]; }), aiAbilities = _a.aiAbilities, updateAiAbilities = _a.updateAiAbilities;
|
|
22
38
|
var extraData = Object.entries(JSON.parse(extra)).map(function (_a) {
|
|
23
|
-
var words =
|
|
39
|
+
var _b = __read(_a, 2), words = _b[0], value = _b[1];
|
|
24
40
|
return (__assign({ words: words, id: uniqueId() }, value));
|
|
25
41
|
});
|
|
26
42
|
var handleValueChange = useCallback(function (key, value, i) {
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
29
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
30
|
if (ar || !(i in from)) {
|
|
@@ -30,7 +46,7 @@ var MainPointsItem = function (props) {
|
|
|
30
46
|
var handleChange = useCallback(function (key, value) {
|
|
31
47
|
if (key === 'words') {
|
|
32
48
|
var errorIndexes = keyPointAnalysisError.map(function (i) { return (i !== index ? i : -1); });
|
|
33
|
-
setKeyPointAnalysisError(__spreadArray([], errorIndexes,
|
|
49
|
+
setKeyPointAnalysisError(__spreadArray([], __read(errorIndexes), false));
|
|
34
50
|
}
|
|
35
51
|
onValueChange(key, value);
|
|
36
52
|
}, [index, keyPointAnalysisError, onValueChange, setKeyPointAnalysisError]);
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
29
|
import AiAssessmentCriteria from '../AiAssessmentCriteria';
|
|
14
30
|
import { LANGUAGE_NAMES } from '../AiAssessmentCriteria/const';
|
|
@@ -22,7 +38,7 @@ import { useState } from 'react';
|
|
|
22
38
|
var AiAnalysis = function () {
|
|
23
39
|
var aiShowType = useUpdateQuestionStore(function (store) { return [store.questionState]; }).questionState.aiShowType;
|
|
24
40
|
var _a = useAiAnalysisStore(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState;
|
|
25
|
-
var _b = useState(false), aiAnalysisOpen = _b[0], setAiAnalysisOpen = _b[1];
|
|
41
|
+
var _b = __read(useState(false), 2), aiAnalysisOpen = _b[0], setAiAnalysisOpen = _b[1];
|
|
26
42
|
var language = analysisState.language;
|
|
27
43
|
var isOpenAiAnalysis = aiAbilities.length > 0;
|
|
28
44
|
return (_jsxs(Box, { children: [aiAnalysisOpen && _jsx(AiAssessmentCriteria, { open: aiAnalysisOpen, onClose: function () { return setAiAnalysisOpen(false); } }), isOpenAiAnalysis && (_jsx(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle1" }, { children: "\u6743\u91CD\u8BBE\u7F6E" })), language && LANGUAGE_NAMES[language] ? (_jsxs(Typography, __assign({ variant: "caption", color: "secondary", ml: "8px" }, { children: ["\u8BED\u79CD\uFF1A", language && LANGUAGE_NAMES[language]] }))) : ('')] })) }))), aiAbilities.length > 0 && (_jsx(List, { children: aiAbilities.map(function (item, index) { return (_jsx(AnalysisItem, __assign({ index: index }, item), item.token)); }) })), _jsx(Divider, { sx: { mb: 1 } }), aiShowType !== ADD_QUESTION_TYPE.SINGLECHIOCE && (_jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u8003\u6838\u7EF4\u5EA6" })))] }));
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
29
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
30
|
if (ar || !(i in from)) {
|
|
@@ -33,11 +49,11 @@ var MANDARIN = LANGUAGE_TYPE.MANDARIN, CANTONESE = LANGUAGE_TYPE.CANTONESE;
|
|
|
33
49
|
var AiAssessmentCriteria = function (props) {
|
|
34
50
|
var open = props.open, onClose = props.onClose;
|
|
35
51
|
var _a = useAiAnalysisStore(function (store) { return [store.aiAbilities, store.analysisState]; }), aiAbilities = _a.aiAbilities, analysisState = _a.analysisState, updateState = _a.updateState, updateAiAbilities = _a.updateAiAbilities;
|
|
36
|
-
var _b = useState([]), groupData = _b[0], setGroupData = _b[1];
|
|
37
|
-
var _c = useState(1), language = _c[0], setLanguage = _c[1];
|
|
38
|
-
var _d = useState(false), checkedChinese = _d[0], setCheckedChinese = _d[1];
|
|
39
|
-
var _e = useState([]), relatedAbilities = _e[0], setRelatedAbilities = _e[1];
|
|
40
|
-
var _f = useSetState({}), checkAbilities = _f[0], setCheckAbilities = _f[1];
|
|
52
|
+
var _b = __read(useState([]), 2), groupData = _b[0], setGroupData = _b[1];
|
|
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];
|
|
41
57
|
var loading = useRequest(PostAiAbilities, {
|
|
42
58
|
manual: false,
|
|
43
59
|
onSuccess: function (_a) {
|
|
@@ -83,9 +99,9 @@ var AiAssessmentCriteria = function (props) {
|
|
|
83
99
|
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
84
100
|
};
|
|
85
101
|
var handleOk = useCallback(function () {
|
|
86
|
-
updateAiAbilities(__spreadArray(__spreadArray([], aiAbilities.filter(function (v) { return v.isWorkplace; }),
|
|
102
|
+
updateAiAbilities(__spreadArray(__spreadArray([], __read(aiAbilities.filter(function (v) { return v.isWorkplace; })), false), __read(Object.values(checkAbilities)
|
|
87
103
|
.filter(function (item) { return item; })
|
|
88
|
-
.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); }),
|
|
104
|
+
.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));
|
|
89
105
|
updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
|
|
90
106
|
onClose();
|
|
91
107
|
}, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
2
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
+
if (!m) return o;
|
|
4
|
+
var i = m.call(o), r, ar = [], e;
|
|
5
|
+
try {
|
|
6
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
7
|
+
}
|
|
8
|
+
catch (error) { e = { error: error }; }
|
|
9
|
+
finally {
|
|
10
|
+
try {
|
|
11
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12
|
+
}
|
|
13
|
+
finally { if (e) throw e.error; }
|
|
14
|
+
}
|
|
15
|
+
return ar;
|
|
16
|
+
};
|
|
1
17
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
18
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
19
|
if (ar || !(i in from)) {
|
|
@@ -24,6 +40,6 @@ export var groupCategory = function (list, field, mapping) {
|
|
|
24
40
|
return Array.from(map).map(function (item) { return ({
|
|
25
41
|
name: mapping[item[0]],
|
|
26
42
|
type: item[0],
|
|
27
|
-
list: __spreadArray([], item[1],
|
|
43
|
+
list: __spreadArray([], __read(item[1]), false),
|
|
28
44
|
}); });
|
|
29
45
|
};
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
29
|
import { defaultQuestionParams } from '../QuestionUpdate/const';
|
|
14
30
|
import { MAX_DISPLAY_SIZE } from './const';
|
|
@@ -30,9 +46,9 @@ var BaseAccordion = function (props) {
|
|
|
30
46
|
var isHovering = useHover(ref);
|
|
31
47
|
var updatePreview = useQuestionPreviewStore().updatePreview;
|
|
32
48
|
var _f = useQuestionModelStore(), questionModelData = _f.questionModelData, addModel = _f.addModel;
|
|
33
|
-
var _g = useState(false), isPaging = _g[0], setIsPaging = _g[1];
|
|
34
|
-
var _h = useState([]), questionsList = _h[0], setQuestionsList = _h[1];
|
|
35
|
-
var _j = useState(), hoverItem = _j[0], setHoverItem = _j[1];
|
|
49
|
+
var _g = __read(useState(false), 2), isPaging = _g[0], setIsPaging = _g[1];
|
|
50
|
+
var _h = __read(useState([]), 2), questionsList = _h[0], setQuestionsList = _h[1];
|
|
51
|
+
var _j = __read(useState(), 2), hoverItem = _j[0], setHoverItem = _j[1];
|
|
36
52
|
var handlePreview = useDebounceFn(function () {
|
|
37
53
|
isShowPreview && updatePreview(isHovering, isHovering ? hoverItem : undefined);
|
|
38
54
|
}, {
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
29
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
30
|
if (ar || !(i in from)) {
|
|
@@ -35,16 +51,16 @@ var BootVideo = function (props) {
|
|
|
35
51
|
var _a;
|
|
36
52
|
var open = props.open, onClose = props.onClose;
|
|
37
53
|
var _b = useInterviewRoomStore(), interactType = _b.interactType, aiInterviewerProfile = _b.aiInterviewerProfile, updateInterviewRoom = _b.updateInterviewRoom;
|
|
38
|
-
var _c = useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile }), interviewRoomState = _c[0], setInterviewRoomState = _c[1];
|
|
39
|
-
var _d = useState(DEFAULT_VITUAL_HUMAN_LIST), virtualManList = _d[0], setVirtualManList = _d[1];
|
|
54
|
+
var _c = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile }), 2), interviewRoomState = _c[0], setInterviewRoomState = _c[1];
|
|
55
|
+
var _d = __read(useState(DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _d[0], setVirtualManList = _d[1];
|
|
40
56
|
var _e = useBootVideoStore(), mediaUrl = _e.mediaUrl, thumbUrl = _e.thumbUrl, updateBootVideo = _e.updateBootVideo;
|
|
41
|
-
var _f = useState(DEFAULT_GUIDE_VIDEO), mediaList = _f[0], setMediaList = _f[1];
|
|
42
|
-
var _g = useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), mediaState = _g[0], setMediaState = _g[1];
|
|
57
|
+
var _f = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _f[0], setMediaList = _f[1];
|
|
58
|
+
var _g = __read(useSetState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _g[0], setMediaState = _g[1];
|
|
43
59
|
var _h = useRequest(PostCommonUpload, {
|
|
44
60
|
manual: true,
|
|
45
61
|
onSuccess: function (_a) {
|
|
46
62
|
var data = _a.data;
|
|
47
|
-
var item =
|
|
63
|
+
var _b = __read(data, 1), item = _b[0];
|
|
48
64
|
var OfficialMedia = mediaList[0];
|
|
49
65
|
setMediaList([
|
|
50
66
|
OfficialMedia,
|
|
@@ -111,7 +127,7 @@ var BootVideo = function (props) {
|
|
|
111
127
|
getAiInterviewerProfileList();
|
|
112
128
|
setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
|
|
113
129
|
if (mediaUrl && thumbUrl && mediaUrl !== mediaList[0].videoUrl) {
|
|
114
|
-
setMediaList(__spreadArray(__spreadArray([], mediaList,
|
|
130
|
+
setMediaList(__spreadArray(__spreadArray([], __read(mediaList), false), [
|
|
115
131
|
{
|
|
116
132
|
videoUrl: mediaUrl,
|
|
117
133
|
frameUrl: thumbUrl,
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
29
|
import BootVideo from '../BootVideo';
|
|
14
30
|
import { AiVideoStatus, InteractiveModes } from "../../../../constants/ai-question";
|
|
@@ -21,7 +37,7 @@ var Interactive = function () {
|
|
|
21
37
|
var _a, _b;
|
|
22
38
|
var questionModelData = useQuestionModelStore().questionModelData;
|
|
23
39
|
var _c = useInterviewRoomStore(), interactType = _c.interactType, aiInterviewerProfile = _c.aiInterviewerProfile;
|
|
24
|
-
var _d = useState(false), bootVideoOpen = _d[0], setBootVideoOpen = _d[1];
|
|
40
|
+
var _d = __read(useState(false), 2), bootVideoOpen = _d[0], setBootVideoOpen = _d[1];
|
|
25
41
|
var ShowVideoStatus = (aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) === 2 &&
|
|
26
42
|
((_a = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) &&
|
|
27
43
|
(aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanToken) === ((_b = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _b === void 0 ? void 0 : _b.humanToken);
|
|
@@ -20,19 +20,49 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
24
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
25
|
+
if (!m) return o;
|
|
26
|
+
var i = m.call(o), r, ar = [], e;
|
|
27
|
+
try {
|
|
28
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
29
|
+
}
|
|
30
|
+
catch (error) { e = { error: error }; }
|
|
31
|
+
finally {
|
|
32
|
+
try {
|
|
33
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
34
|
+
}
|
|
35
|
+
finally { if (e) throw e.error; }
|
|
36
|
+
}
|
|
37
|
+
return ar;
|
|
38
|
+
};
|
|
39
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
40
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
41
|
+
if (ar || !(i in from)) {
|
|
42
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
43
|
+
ar[i] = from[i];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
47
|
+
};
|
|
23
48
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
49
|
import { useInterviewRoomStore } from "../../../../store/ai-question/interview-room-store";
|
|
25
50
|
import { DISABLED_REPEAT_TYPE, IS_AI_ANALYSIS, QUESTION_TYPE_TITLE_MAP, TEST_TYPE_READONLY } from "../../../../constants/ai-question";
|
|
26
51
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
27
52
|
import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
|
|
28
53
|
import { getSecondToTime } from "../../../../utils/utils";
|
|
29
|
-
import { Box, Chip, confirm, DeleteIcon, DragHandleIcon, EditIcon, IconButton, InfoIcon, Input, Switch, Tooltip, Typography } from 'fbm-ui';
|
|
54
|
+
import { Box, Chip, confirm, DeleteIcon, DragHandleIcon, EditIcon, IconButton, InfoIcon, Input, Select, Switch, Tooltip, Typography } from 'fbm-ui';
|
|
30
55
|
import { Paper, Stack } from 'fbm-ui/lib/mui';
|
|
31
56
|
import { memo, useCallback, useMemo } from 'react';
|
|
57
|
+
var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(6).keys()), false).map(function (v) {
|
|
58
|
+
return { label: "\u6700\u591A\u8FFD\u95EE".concat(v + 1, "\u6B21"), value: v + 1 };
|
|
59
|
+
})), false), [
|
|
60
|
+
{ label: '直到充分为止', value: -1 },
|
|
61
|
+
], false);
|
|
32
62
|
var QuestionModelListItem = function (props) {
|
|
33
63
|
var _a = useInterviewRoomStore(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
|
|
34
64
|
var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
|
|
35
|
-
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp;
|
|
65
|
+
var token = step.token, name = step.name, questions = step.questions, duration = step.duration, weight = step.weight, type = step.type, aiShowType = step.aiShowType, aiType = step.aiType, answerStatus = step.answerStatus, category = step.category, isOpenAIFollowUp = step.isOpenAIFollowUp, followUpMaximum = step.followUpMaximum;
|
|
36
66
|
var isAiAnalysis = IS_AI_ANALYSIS(step);
|
|
37
67
|
var _b = useQuestionModelStore(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
|
|
38
68
|
var updateQuestionState = useUpdateQuestionStore().updateQuestionState;
|
|
@@ -71,6 +101,10 @@ var QuestionModelListItem = function (props) {
|
|
|
71
101
|
var handleOpenAIFollowUpStatus = useCallback(function () {
|
|
72
102
|
editModel(__assign(__assign({}, step), { isOpenAIFollowUp: !isOpenAIFollowUp }), index);
|
|
73
103
|
}, [editModel, isOpenAIFollowUp, step, index]);
|
|
104
|
+
var handleOpenAIFollowUpMaximum = useCallback(function (e) {
|
|
105
|
+
var value = e.target.value;
|
|
106
|
+
editModel(__assign(__assign({}, step), { followUpMaximum: value }), index);
|
|
107
|
+
}, [editModel, step, index]);
|
|
74
108
|
var formatQuestion = useMemo(function () {
|
|
75
109
|
if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
|
|
76
110
|
return (_jsx(Stack, __assign({ direction: "row", spacing: 1 }, { children: _jsx(Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, i) { return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), i)); }) })) })));
|
|
@@ -79,6 +113,6 @@ var QuestionModelListItem = function (props) {
|
|
|
79
113
|
}, [questions]);
|
|
80
114
|
return (_jsxs(Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [_jsx(Box, __assign({ display: "flex", borderBottom: !DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: _jsxs(Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [_jsxs(Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), _jsx(Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: _jsx(DragHandleIcon, { className: "dragHandle" }) })), _jsxs(Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!TEST_TYPE_READONLY.includes(type) && (_jsx(IconButton, __assign({ size: "small", onClick: handleEdit }, { children: _jsx(EditIcon, {}) }))), _jsx(IconButton, __assign({ size: "small", onClick: handleRemove }, { children: _jsx(DeleteIcon, {}) }))] }))] })), _jsx(Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [_jsxs(Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), _jsx(Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
|
|
81
115
|
return label && (_jsx(Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: _jsx(Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
|
|
82
|
-
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), type === 1 && aiShowType === 1 && ((aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) !== 2 || interactType === 1) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
116
|
+
}), aiType === 2 && _jsx(Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && _jsx(Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), _jsxs(Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [_jsx(Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), _jsxs(Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", getSecondToTime(Number(duration))] }))] }))] })) })), (!DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && (_jsxs(Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [_jsx(Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && (_jsxs(_Fragment, { children: [_jsx(Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), _jsx(Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), _jsx(Tooltip, __assign({ title: "AI\u6D4B\u8BC4\u9898\u53EF\u4EE5\u8BBE\u7F6E\u6743\u91CD\uFF0C\u7CFB\u7EDF\u5BF9\u5019\u9009\u4EBA\u89C6\u9891\u9762\u8BD5\u7ED3\u679C\u4F1A\u52A0\u5165\u6743\u91CD\u8FDB\u884C\u8BA1\u7B97\uFF0C\u5F97\u51FAAI\u89C6\u9891\u9762\u8BD5\u5F97\u5206\u3002\u8BBE\u7F6E\u540E5\u5206\u949F\u8D77\u6548" }, { children: _jsx("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: _jsx(InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !DISABLED_REPEAT_TYPE.includes(type) && (_jsxs(Stack, __assign({ direction: "row" }, { children: [_jsx(Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: _jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u5141\u8BB8\u91CD\u590D\u7B54\u9898" })), onChange: handleAnswerStatus }), type === 1 && aiShowType === 1 && ((aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) !== 2 || interactType === 1) && (_jsx(Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: _jsxs(Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && (_jsx(Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
|
|
83
117
|
};
|
|
84
118
|
export default memo(QuestionModelListItem);
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
29
|
import Form from '../QuestionUpdate/Form';
|
|
14
30
|
import { PreviewRoot } from './styled';
|
|
@@ -20,8 +36,8 @@ import { useEffect, useState } from 'react';
|
|
|
20
36
|
var QuestionPreview = function () {
|
|
21
37
|
var _a = useQuestionPreviewStore(), visible = _a.visible, previewItem = _a.previewItem;
|
|
22
38
|
var _b = previewItem || {}, _c = _b.name, name = _c === void 0 ? '' : _c, _d = _b.type, type = _d === void 0 ? 1 : _d, _e = _b.broadcastType, broadcastType = _e === void 0 ? 1 : _e, _f = _b.desc, desc = _f === void 0 ? '' : _f, _g = _b.prepareTime, prepareTime = _g === void 0 ? 3 : _g, _h = _b.minResponseDuration, minResponseDuration = _h === void 0 ? 3 : _h, _j = _b.duration, duration = _j === void 0 ? 30 : _j, extra = _b.extra;
|
|
23
|
-
var _k = useState(), values = _k[0], setValues = _k[1];
|
|
24
|
-
var _l = useState('none'), display = _l[0], setDisplay = _l[1];
|
|
39
|
+
var _k = __read(useState(), 2), values = _k[0], setValues = _k[1];
|
|
40
|
+
var _l = __read(useState('none'), 2), display = _l[0], setDisplay = _l[1];
|
|
25
41
|
useEffect(function () {
|
|
26
42
|
setValues({ name: name, broadcastType: broadcastType, desc: desc, prepareTime: prepareTime, duration: duration, minResponseDuration: minResponseDuration, questions: [] });
|
|
27
43
|
setDisplay(visible ? 'block' : 'none');
|
|
@@ -9,6 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
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
|
+
};
|
|
12
28
|
var _a;
|
|
13
29
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
30
|
import BaseAccordion from '../BaseAccordion';
|
|
@@ -37,10 +53,10 @@ var AiEvaluation = function () {
|
|
|
37
53
|
var isEdit = (getQuestionModelStore() || {}).isEdit;
|
|
38
54
|
var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
|
|
39
55
|
var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
|
|
40
|
-
var _a = useSetState({
|
|
56
|
+
var _a = __read(useSetState({
|
|
41
57
|
addQuestionOpen: false,
|
|
42
58
|
showOnlyAITest: false,
|
|
43
|
-
}), state = _a[0], setState = _a[1];
|
|
59
|
+
}), 2), state = _a[0], setState = _a[1];
|
|
44
60
|
var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
|
|
45
61
|
var handleClickAdd = useCallback(function (aiShowType) {
|
|
46
62
|
setState({ addQuestionOpen: false });
|