eli-video-interview 1.2.36 → 1.2.37-beta.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/ScrollDialogContent/index.js +1 -1
- package/esm/constants/ai-question.d.ts +7 -0
- package/esm/constants/ai-question.js +10 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/modules/ai-ability-select/Root.d.ts +4 -0
- package/esm/modules/ai-ability-select/Root.js +47 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +22 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +42 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/interface.js +1 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
- package/esm/modules/ai-ability-select/components/AiAbilityItem/styled.js +8 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/index.js +19 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
- package/esm/modules/ai-ability-select/components/AiAbilityList/interface.js +1 -0
- package/esm/modules/ai-ability-select/index.d.ts +4 -0
- package/esm/modules/ai-ability-select/index.js +20 -0
- package/esm/modules/ai-ability-select/interface.d.ts +33 -0
- package/esm/modules/ai-ability-select/interface.js +1 -0
- package/esm/modules/ai-question/Root.js +5 -1
- package/esm/modules/ai-question/components/AiAnalysis/AnalysisItem.js +1 -1
- package/esm/modules/ai-question/components/AiAnalysis/index.js +1 -1
- package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +13 -4
- package/esm/modules/ai-question/components/BaseAccordion/index.d.ts +1 -1
- package/esm/modules/ai-question/components/BaseAccordion/index.js +22 -13
- package/esm/modules/ai-question/components/BootVideo/index.js +43 -24
- package/esm/modules/ai-question/components/BootVideo/styled.js +5 -4
- package/esm/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionModel/AutoCombine.js +19 -0
- package/esm/modules/ai-question/components/QuestionModel/Header.js +6 -6
- package/esm/modules/ai-question/components/QuestionModel/Interactive.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionModel/Interactive.js +26 -0
- package/esm/modules/ai-question/components/QuestionModel/Item.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionModel/Item.js +13 -8
- package/esm/modules/ai-question/components/QuestionModel/List.js +30 -8
- package/esm/modules/ai-question/components/QuestionModel/index.js +5 -1
- package/esm/modules/ai-question/components/QuestionModel/interface.d.ts +7 -0
- package/esm/modules/ai-question/components/QuestionPreview/index.js +1 -1
- package/esm/modules/ai-question/components/QuestionPreview/styled.d.ts +1 -1
- package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +13 -8
- package/esm/modules/ai-question/components/QuestionTemplate/index.d.ts +2 -1
- package/esm/modules/ai-question/components/QuestionTemplate/index.js +10 -5
- package/esm/modules/ai-question/components/QuestionTemplate/interface.d.ts +10 -0
- package/esm/modules/ai-question/components/QuestionUpdate/Form.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/Form.js +44 -10
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
- package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +58 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
- package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +62 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +2 -2
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +35 -49
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +47 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +7 -0
- package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +60 -0
- package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/esm/modules/ai-question/components/QuestionUpdate/index.js +9 -6
- package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +12 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
- package/esm/modules/ai-question/components/QuestionUpdate/styled.js +52 -0
- package/esm/modules/ai-question/index.js +3 -5
- package/esm/modules/ai-question/interface.d.ts +17 -0
- package/esm/modules/ai-question/useAiQuestion.d.ts +1 -0
- package/esm/modules/ai-report/components/ScoreReport/styled.d.ts +3 -3
- package/esm/modules/ai-report/components/VideoQuestion/styled.d.ts +2 -2
- package/esm/modules/ai-report/components/WorkPlaces/styled.d.ts +2 -2
- package/esm/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
- package/esm/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
- package/esm/services/ai-ability.d.ts +1 -0
- package/esm/services/ai-ability.js +3 -1
- package/esm/services/ai-question.d.ts +2 -1
- package/esm/services/ai-question.js +4 -2
- package/esm/store/ai-ability-select/question-ability-store.d.ts +21 -0
- package/esm/store/ai-ability-select/question-ability-store.js +21 -0
- package/esm/store/ai-question/ai-analysis-store.d.ts +2 -2
- package/esm/store/ai-question/boot-video-store.js +7 -2
- package/esm/store/ai-question/global-store.d.ts +3 -0
- package/esm/store/ai-question/global-store.js +1 -0
- package/esm/store/ai-question/interview-room-store.d.ts +17 -0
- package/esm/store/ai-question/interview-room-store.js +24 -0
- package/esm/store/ai-question/question-model-store.d.ts +3 -0
- package/esm/store/ai-question/question-model-store.js +5 -3
- package/esm/store/ai-question/question-template-store.js +1 -1
- package/esm/store/enterprise/enterprise-store.d.ts +29 -0
- package/esm/store/enterprise/enterprise-store.js +13 -0
- package/lib/components/ScrollDialogContent/index.js +1 -1
- package/lib/constants/ai-question.d.ts +7 -0
- package/lib/constants/ai-question.js +11 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/modules/ai-ability-select/Root.d.ts +4 -0
- package/lib/modules/ai-ability-select/Root.js +52 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/AiAbilityDetail.js +24 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +47 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.d.ts +13 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/interface.js +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.d.ts +2 -0
- package/lib/modules/ai-ability-select/components/AiAbilityItem/styled.js +11 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/index.js +24 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/interface.d.ts +4 -0
- package/lib/modules/ai-ability-select/components/AiAbilityList/interface.js +2 -0
- package/lib/modules/ai-ability-select/index.d.ts +4 -0
- package/lib/modules/ai-ability-select/index.js +25 -0
- package/lib/modules/ai-ability-select/interface.d.ts +33 -0
- package/lib/modules/ai-ability-select/interface.js +2 -0
- package/lib/modules/ai-question/Root.js +5 -1
- package/lib/modules/ai-question/components/AiAnalysis/AnalysisItem.js +1 -1
- package/lib/modules/ai-question/components/AiAnalysis/index.js +1 -1
- package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +13 -4
- package/lib/modules/ai-question/components/BaseAccordion/index.d.ts +1 -1
- package/lib/modules/ai-question/components/BaseAccordion/index.js +22 -13
- package/lib/modules/ai-question/components/BootVideo/index.js +38 -19
- package/lib/modules/ai-question/components/BootVideo/styled.js +5 -4
- package/lib/modules/ai-question/components/QuestionModel/AutoCombine.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionModel/AutoCombine.js +21 -0
- package/lib/modules/ai-question/components/QuestionModel/Header.js +5 -8
- package/lib/modules/ai-question/components/QuestionModel/Interactive.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionModel/Interactive.js +31 -0
- package/lib/modules/ai-question/components/QuestionModel/Item.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionModel/Item.js +9 -4
- package/lib/modules/ai-question/components/QuestionModel/List.js +30 -8
- package/lib/modules/ai-question/components/QuestionModel/index.js +5 -1
- package/lib/modules/ai-question/components/QuestionModel/interface.d.ts +7 -0
- package/lib/modules/ai-question/components/QuestionPreview/index.js +1 -1
- package/lib/modules/ai-question/components/QuestionPreview/styled.d.ts +1 -1
- package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +12 -7
- package/lib/modules/ai-question/components/QuestionTemplate/index.d.ts +2 -1
- package/lib/modules/ai-question/components/QuestionTemplate/index.js +10 -5
- package/lib/modules/ai-question/components/QuestionTemplate/interface.d.ts +10 -0
- package/lib/modules/ai-question/components/QuestionUpdate/Form.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/Form.js +42 -8
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.d.ts +4 -0
- package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +63 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.d.ts +8 -0
- package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +64 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.d.ts +2 -2
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +36 -47
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoicePreview.js +49 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.d.ts +7 -0
- package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +62 -0
- package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
- package/lib/modules/ai-question/components/QuestionUpdate/index.js +9 -6
- package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +12 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.d.ts +6 -0
- package/lib/modules/ai-question/components/QuestionUpdate/styled.js +55 -0
- package/lib/modules/ai-question/index.js +3 -5
- package/lib/modules/ai-question/interface.d.ts +17 -0
- package/lib/modules/ai-question/useAiQuestion.d.ts +1 -0
- package/lib/modules/ai-report/components/ScoreReport/styled.d.ts +3 -3
- package/lib/modules/ai-report/components/VideoQuestion/styled.d.ts +2 -2
- package/lib/modules/ai-report/components/WorkPlaces/styled.d.ts +2 -2
- package/lib/modules/ai-template/components/TemplateList/styled.d.ts +3 -3
- package/lib/modules/ai-template/components/TemplateMenu/styled.d.ts +1 -1
- package/lib/services/ai-ability.d.ts +1 -0
- package/lib/services/ai-ability.js +4 -1
- package/lib/services/ai-question.d.ts +2 -1
- package/lib/services/ai-question.js +5 -2
- package/lib/store/ai-ability-select/question-ability-store.d.ts +21 -0
- package/lib/store/ai-ability-select/question-ability-store.js +24 -0
- package/lib/store/ai-question/ai-analysis-store.d.ts +2 -2
- package/lib/store/ai-question/boot-video-store.js +7 -2
- package/lib/store/ai-question/global-store.d.ts +3 -0
- package/lib/store/ai-question/global-store.js +1 -0
- package/lib/store/ai-question/interview-room-store.d.ts +17 -0
- package/lib/store/ai-question/interview-room-store.js +27 -0
- package/lib/store/ai-question/question-model-store.d.ts +3 -0
- package/lib/store/ai-question/question-model-store.js +5 -3
- package/lib/store/ai-question/question-template-store.js +1 -1
- package/lib/store/enterprise/enterprise-store.d.ts +29 -0
- package/lib/store/enterprise/enterprise-store.js +16 -0
- package/package.json +1 -1
|
@@ -20,6 +20,13 @@ export declare const DEFAULT_GUIDE_VIDEO: {
|
|
|
20
20
|
videoUrl: string;
|
|
21
21
|
frameUrl: string;
|
|
22
22
|
}[];
|
|
23
|
+
export declare const DEFAULT_VITUAL_HUMAN_LIST: {
|
|
24
|
+
name: string;
|
|
25
|
+
humanToken: string;
|
|
26
|
+
humanType: number;
|
|
27
|
+
virtualHumanAvatar: string;
|
|
28
|
+
virtualPreviewMedia: string;
|
|
29
|
+
}[];
|
|
23
30
|
export declare const MAX_UPLOAD_FILE_SIZE: number;
|
|
24
31
|
export declare const MAX_UPLOAD_VIDEO_FILE_SIZE: number;
|
|
25
32
|
export declare const TEST_TYPE_READONLY: number[];
|
|
@@ -10,7 +10,7 @@ export var ADD_QUESTION_TYPE_LIST = [
|
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
type: LANGUAGE,
|
|
13
|
-
title: '
|
|
13
|
+
title: '朗读题',
|
|
14
14
|
desc: '候选人根据所提供的文案进行朗读。',
|
|
15
15
|
},
|
|
16
16
|
];
|
|
@@ -31,6 +31,15 @@ export var DEFAULT_GUIDE_VIDEO = [
|
|
|
31
31
|
frameUrl: DEFAULT_GUIDE_VIDEO_THUMB_URL,
|
|
32
32
|
},
|
|
33
33
|
];
|
|
34
|
+
export var DEFAULT_VITUAL_HUMAN_LIST = [
|
|
35
|
+
{
|
|
36
|
+
name: 'xuanxuan',
|
|
37
|
+
humanToken: '71c932a2db9e420ab8782d68861ad0ff',
|
|
38
|
+
humanType: 2,
|
|
39
|
+
virtualHumanAvatar: 'https://alicdn.fbmms.cn/virtual-human-20230720-112709.png',
|
|
40
|
+
virtualPreviewMedia: 'https://demo1-landing-page.oss-cn-beijing.aliyuncs.com/d5bcc15e-f42f-4bad-bde9-2d6c300bf9ca.mp4',
|
|
41
|
+
},
|
|
42
|
+
];
|
|
34
43
|
export var MAX_UPLOAD_FILE_SIZE = 1024 * 1024 * 20;
|
|
35
44
|
export var MAX_UPLOAD_VIDEO_FILE_SIZE = 1024 * 1024 * 500;
|
|
36
45
|
export var TEST_TYPE_READONLY = [2, 3, 4, 7, 8, 9, 10, 11, 12];
|
package/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as AiQuestion } from './modules/ai-question';
|
|
|
2
2
|
export { default as AiReport } from './modules/ai-report';
|
|
3
3
|
export { default as AiTemplate } from './modules/ai-template';
|
|
4
4
|
export { default as AiAbility } from './modules/ai-ability';
|
|
5
|
+
export { default as AiAbilitySelect } from './modules/ai-ability-select';
|
|
5
6
|
export { default as VideoPreview } from './components/VideoPreview';
|
|
6
7
|
export { useAiQuestion } from './modules/ai-question/useAiQuestion';
|
|
7
8
|
export { useAiReport } from './modules/ai-report/useAiReport';
|
package/esm/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as AiQuestion } from './modules/ai-question';
|
|
|
2
2
|
export { default as AiReport } from './modules/ai-report';
|
|
3
3
|
export { default as AiTemplate } from './modules/ai-template';
|
|
4
4
|
export { default as AiAbility } from './modules/ai-ability';
|
|
5
|
+
export { default as AiAbilitySelect } from './modules/ai-ability-select';
|
|
5
6
|
export { default as VideoPreview } from './components/VideoPreview';
|
|
6
7
|
export { useAiQuestion } from './modules/ai-question/useAiQuestion';
|
|
7
8
|
export { useAiReport } from './modules/ai-report/useAiReport';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AiAbilitySelectProps } from './interface';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiAbilitySelectProps & import("react").RefAttributes<any>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import AiAbilityList from './components/AiAbilityList';
|
|
14
|
+
import { GetAiAbilityList } from "../../services/ai-ability";
|
|
15
|
+
import { useAiAbilityListStore } from "../../store/ai-ability-select/question-ability-store";
|
|
16
|
+
import { useEnterpriseStore } from "../../store/enterprise/enterprise-store";
|
|
17
|
+
import { useRequest } from 'ahooks';
|
|
18
|
+
import { Box, Typography } from 'fbm-ui';
|
|
19
|
+
import { styled } from 'fbm-ui';
|
|
20
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
21
|
+
import { forwardRef, memo, useEffect } from 'react';
|
|
22
|
+
var ScrollDialogContent = styled(Box)({
|
|
23
|
+
maxHeight: 'calc(100vh - 192px)',
|
|
24
|
+
overflow: 'scroll',
|
|
25
|
+
});
|
|
26
|
+
var AiAbilitySelectRoot = forwardRef(function (_a, ref) {
|
|
27
|
+
var jobToken = _a.jobToken, thirdToken = _a.thirdToken, token = _a.token;
|
|
28
|
+
var _b = useAiAbilityListStore(), aiAbilityList = _b.aiAbilityList, setAiAbilityList = _b.setAiAbilityList, selctedAbilitys = _b.selctedAbilitys;
|
|
29
|
+
var setEnterprise = useEnterpriseStore().setEnterprise;
|
|
30
|
+
var data = useRequest(function () { return GetAiAbilityList({ jobToken: jobToken, thirdToken: thirdToken }); }, {
|
|
31
|
+
refreshDeps: [jobToken, thirdToken],
|
|
32
|
+
}).data;
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
var _a;
|
|
35
|
+
setAiAbilityList(((_a = data === null || data === void 0 ? void 0 : data.data.list) === null || _a === void 0 ? void 0 : _a.filter(function (v) {
|
|
36
|
+
return !token || !v.isNew || selctedAbilitys.includes(v.token);
|
|
37
|
+
})) || []);
|
|
38
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
|
+
}, [data, token, selctedAbilitys]);
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
setEnterprise({ jobToken: jobToken, thirdToken: thirdToken });
|
|
42
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
43
|
+
}, [jobToken, thirdToken]);
|
|
44
|
+
return (_jsx(ScrollDialogContent, __assign({ ref: ref }, { children: _jsxs(Box, __assign({ display: "flex", flexDirection: "column", width: 760 }, { children: [_jsxs(Stack, __assign({ spacing: 2, mb: 2 }, { children: [_jsx(Typography, __assign({ variant: "body1", fontWeight: 500 }, { children: "\u8BF7\u9009\u62E9\u8981\u4F18\u5148\u4F7F\u7528\u7684\u8003\u5BDF\u80FD\u529B\uFF0C\u4E5F\u53EF\u4EE5\u70B9\u51FB\u300C\u4E0B\u4E00\u6B65\u300D\u76F4\u63A5\u51FA\u9898" })), (aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.some(function (v) { return v.isNew; })) && (_jsxs(Stack, __assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx("img", { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn", alt: "", width: 38, height: 16 }), _jsx(Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "AI\u6839\u636E\u5C97\u4F4D\u4FE1\u606F\u751F\u6210\u7684\u80FD\u529B\uFF0C\u521B\u5EFA\u5B8C\u6B65\u9AA4\u540E\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9009\u62E9\u7684\u65B0\u589E\u80FD\u529B\u52A0\u5165\u5230\u8BBE\u7F6E\u9875\u7684\u8003\u5BDF\u80FD\u529B\u5217\u8868\u4E2D\u3002" }))] })))] })), _jsx(AiAbilityList, { items: aiAbilityList })] })) })));
|
|
45
|
+
});
|
|
46
|
+
AiAbilitySelectRoot.displayName = 'AiAbilitySelectRoot';
|
|
47
|
+
export default memo(AiAbilitySelectRoot);
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Box, Typography } from 'fbm-ui';
|
|
14
|
+
import { Stack } from 'fbm-ui/lib/mui';
|
|
15
|
+
var AiAbilityDetail = function (_a) {
|
|
16
|
+
var detail = _a.detail;
|
|
17
|
+
return (_jsx(Box, __assign({ p: 2, maxHeight: 582, overflow: "scroll" }, { children: detail === null || detail === void 0 ? void 0 : detail.map(function (v) {
|
|
18
|
+
var _a;
|
|
19
|
+
return (_jsxs(Stack, __assign({ mb: 2, spacing: 1, width: 300 }, { children: [_jsx(Typography, __assign({ variant: "body2", fontWeight: 500 }, { children: v.name })), _jsx(Typography, __assign({ variant: "body2", color: "textSecondary" }, { children: (_a = v.items) === null || _a === void 0 ? void 0 : _a.join('\n') }))] }), v.name));
|
|
20
|
+
}) })));
|
|
21
|
+
};
|
|
22
|
+
export default AiAbilityDetail;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import AiAbilityDetail from './AiAbilityDetail';
|
|
23
|
+
import { NewBadge } from './styled';
|
|
24
|
+
import { useAiAbilityListStore } from "../../../../store/ai-ability-select/question-ability-store";
|
|
25
|
+
import { Box, Checkbox, Paper, Popover, Typography } from 'fbm-ui';
|
|
26
|
+
var AiAbilityItem = function (_a) {
|
|
27
|
+
var name = _a.name, isNew = _a.isNew, token = _a.token, detail = _a.detail;
|
|
28
|
+
var _b = useAiAbilityListStore(), selctedAbilitys = _b.selctedAbilitys, setSelctedAbilitys = _b.setSelctedAbilitys;
|
|
29
|
+
var handleChange = function (_, checked) {
|
|
30
|
+
return setSelctedAbilitys(__spreadArray(__spreadArray([], selctedAbilitys.filter(function (v) { return v !== token; }), true), (checked ? [token] : []), true));
|
|
31
|
+
};
|
|
32
|
+
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
|
+
// @ts-ignore
|
|
34
|
+
sx: { width: 1, height: 1 } }), isNew && _jsx(NewBadge, { src: "//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn" })] })) })));
|
|
35
|
+
};
|
|
36
|
+
var AiAbilityLable = function (_a) {
|
|
37
|
+
var name = _a.name, detail = _a.detail;
|
|
38
|
+
if ((detail === null || detail === void 0 ? void 0 : detail.length) > 0)
|
|
39
|
+
return (_jsx(Popover, __assign({ content: _jsx(AiAbilityDetail, { detail: detail }), trigger: "hover", placement: "right" }, { children: _jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2", sx: { mt: 0.5 } }, { children: name })) })));
|
|
40
|
+
return (_jsx(Typography, __assign({ noWrap: true, maxWidth: 180, variant: "body2" }, { children: name })));
|
|
41
|
+
};
|
|
42
|
+
export default AiAbilityItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface AiAbilityDetail {
|
|
2
|
+
name: string;
|
|
3
|
+
items: string[];
|
|
4
|
+
}
|
|
5
|
+
export interface AiAbilityDetailProps {
|
|
6
|
+
detail: AiAbilityDetail[];
|
|
7
|
+
}
|
|
8
|
+
export interface AiAbilityItemProps extends AiAbilityDetailProps {
|
|
9
|
+
name: string;
|
|
10
|
+
isNew?: boolean;
|
|
11
|
+
token: string;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const NewBadge: import("@emotion/styled").StyledComponent<import("@mui/system/createStyled").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import AiAbilityItem from '../AiAbilityItem';
|
|
14
|
+
import { Grid } from 'fbm-ui';
|
|
15
|
+
var AiAbilityList = function (_a) {
|
|
16
|
+
var items = _a.items;
|
|
17
|
+
return (_jsx(Grid, __assign({ container: true, spacing: 1, rowSpacing: 1, columnSpacing: 1 }, { children: items === null || items === void 0 ? void 0 : items.map(function (item) { return (_jsx(Grid, __assign({ item: true }, { children: _jsx(AiAbilityItem, __assign({}, item)) }), item.token)); }) })));
|
|
18
|
+
};
|
|
19
|
+
export default AiAbilityList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AiAbilitySelectProps } from './interface';
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<AiAbilitySelectProps & import("react").RefAttributes<any>>>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import AiAbilitySelectRoot from './Root';
|
|
14
|
+
import RootProvider from "../../components/RootProvider";
|
|
15
|
+
import { forwardRef, memo } from 'react';
|
|
16
|
+
var AiAbilitySelect = forwardRef(function (props, ref) {
|
|
17
|
+
return (_jsx(RootProvider, { children: _jsx(AiAbilitySelectRoot, __assign({ ref: ref }, props)) }));
|
|
18
|
+
});
|
|
19
|
+
AiAbilitySelect.displayName = 'AiAbilitySelect';
|
|
20
|
+
export default memo(AiAbilitySelect);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface AiAbilitySelectProps {
|
|
2
|
+
jobToken?: string;
|
|
3
|
+
thirdToken?: string;
|
|
4
|
+
selectedTokens?: string[];
|
|
5
|
+
token?: string;
|
|
6
|
+
}
|
|
7
|
+
interface AiAbilityDetailInfo {
|
|
8
|
+
name: string;
|
|
9
|
+
items: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface AiAbilityDetail {
|
|
12
|
+
detail: AiAbilityDetailInfo[];
|
|
13
|
+
}
|
|
14
|
+
export interface AiAbility extends AiAbilityDetail {
|
|
15
|
+
name: string;
|
|
16
|
+
tag: string;
|
|
17
|
+
isWorkplace: boolean;
|
|
18
|
+
define: string;
|
|
19
|
+
isNew?: boolean;
|
|
20
|
+
isAI?: boolean;
|
|
21
|
+
token: string;
|
|
22
|
+
selected?: boolean;
|
|
23
|
+
type: number;
|
|
24
|
+
}
|
|
25
|
+
export declare type AiAbilityItemProps = AiAbility;
|
|
26
|
+
export interface AiAbilityListData {
|
|
27
|
+
list: AiAbility[];
|
|
28
|
+
total: number;
|
|
29
|
+
}
|
|
30
|
+
export interface AiAbilityListRes {
|
|
31
|
+
data: AiAbilityListData;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -50,10 +50,12 @@ import QuestionModel from './components/QuestionModel';
|
|
|
50
50
|
import QuestionPreview from './components/QuestionPreview';
|
|
51
51
|
import QuestionTemplate from './components/QuestionTemplate';
|
|
52
52
|
import QuestionUpdate from './components/QuestionUpdate';
|
|
53
|
+
import { useAiAbilityListStore } from "../../store/ai-ability-select/question-ability-store";
|
|
53
54
|
import { PostAiModelUpsert } from "../../services/ai-question";
|
|
54
55
|
import { AiAnalysisStoreProvider } from "../../store/ai-question/ai-analysis-store";
|
|
55
56
|
import { getBootVideoStore, useBootVideoStore } from "../../store/ai-question/boot-video-store";
|
|
56
57
|
import { useAiQuestionStore } from "../../store/ai-question/global-store";
|
|
58
|
+
import { useInterviewRoomStore } from "../../store/ai-question/interview-room-store";
|
|
57
59
|
import { getQuestionModelStore } from "../../store/ai-question/question-model-store";
|
|
58
60
|
import { useQuestionModelStore } from "../../store/ai-question/question-model-store";
|
|
59
61
|
import { Box, Message } from 'fbm-ui';
|
|
@@ -61,7 +63,9 @@ import { forwardRef, memo, useEffect, useImperativeHandle } from 'react';
|
|
|
61
63
|
var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
62
64
|
var updateState = useAiQuestionStore().updateState;
|
|
63
65
|
var updateBootVideo = useBootVideoStore().updateBootVideo;
|
|
66
|
+
var interviewRoomState = useInterviewRoomStore().interviewRoomState;
|
|
64
67
|
var addModel = useQuestionModelStore(function (store) { return [store.addModel]; }).addModel;
|
|
68
|
+
var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
|
|
65
69
|
var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
70
|
var questionModelData, _a, mediaUrl, thumbUrl, appliedAllPosition, steps;
|
|
67
71
|
return __generator(this, function (_b) {
|
|
@@ -102,7 +106,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
|
|
|
102
106
|
_d.label = 2;
|
|
103
107
|
case 2:
|
|
104
108
|
_d.trys.push([2, 4, , 5]);
|
|
105
|
-
return [4 /*yield*/, PostAiModelUpsert({ name: name, token: token, questions: questions })];
|
|
109
|
+
return [4 /*yield*/, PostAiModelUpsert(__assign(__assign({ name: name, thirdToken: '' }, interviewRoomState), { introductoryVideoSetting: {}, selectAbilities: selctedAbilitys, token: token, questions: questions }))];
|
|
106
110
|
case 3:
|
|
107
111
|
data = (_d.sent()).data;
|
|
108
112
|
return [2 /*return*/, Promise.resolve({
|
|
@@ -39,6 +39,6 @@ var AnalysisItem = function (props) {
|
|
|
39
39
|
var value = _a.target.value;
|
|
40
40
|
updateAiAbilitiesWeight(value, index);
|
|
41
41
|
}, [updateAiAbilitiesWeight, index]);
|
|
42
|
-
return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
|
|
42
|
+
return (_jsxs(Box, { children: [_jsxs(ListItem, __assign({ sx: { pl: 0, pr: 4 }, secondaryAction: _jsx(IconButton, __assign({ size: "small", sx: { position: 'relative', left: 16 }, onClick: handleRemove }, { children: _jsx(CloseIcon, {}) })) }, { children: [_jsx(ListItemText, { children: _jsxs(Box, __assign({ display: "flex", alignItems: "center" }, { children: [_jsx(Typography, __assign({ variant: "subtitle2", style: { maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, { children: name })), abilityType === 2 && !isWorkplace ? (_jsx(Typography, __assign({ variant: "body2", style: { color: 'RGBA(0, 0, 0, 0.26)', fontSize: 12 }, ml: 1 }, { children: desc }))) : (_jsxs(_Fragment, { children: [abilityType === 2 && isWorkplace && type === 3 && _jsx(Chip, { color: 'primary', label: '自定义', size: "small", sx: { ml: 1 } }), _jsx(Tooltip, __assign({ title: "".concat(desc), placement: "bottom-start" }, { children: _jsx(Box, __assign({ display: "flex", alignItems: "center", sx: { ml: 1 } }, { children: _jsx(InfoIcon, { sx: { color: 'rgba(0, 0, 0, 0.26)', fontSize: 16 } }) })) }))] })), type === 8 && (_jsx(Select, { sx: { width: 150, ml: 1 }, options: willOrNotOptions, value: (_a = JSON.parse(extra)) === null || _a === void 0 ? void 0 : _a.expect, size: "small", onChange: handleWillOrNotChange }))] })) }), (abilityType === 1 || (abilityType === 2 && isWorkplace)) && (_jsx(Input, { sx: { width: 84, mr: 1 }, value: weight, disabled: index === aiAbilities.length - 1, size: "small", endAdornment: "%", onChange: handleWeightChange }))] })), type === 6 && _jsx(MainPoints, { extra: extra, index: index })] }));
|
|
43
43
|
};
|
|
44
44
|
export default AnalysisItem;
|
|
@@ -22,6 +22,6 @@ var AiAnalysis = function () {
|
|
|
22
22
|
var _b = useState(false), aiAnalysisOpen = _b[0], setAiAnalysisOpen = _b[1];
|
|
23
23
|
var language = analysisState.language;
|
|
24
24
|
var isOpenAiAnalysis = aiAbilities.length > 0;
|
|
25
|
-
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 } }), _jsx(Button, __assign({ variant: "
|
|
25
|
+
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 } }), _jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(AddIcon, {}), onClick: function () { return setAiAnalysisOpen(true); } }, { children: "\u6DFB\u52A0AI\u8003\u6838\u7EF4\u5EA6" }))] }));
|
|
26
26
|
};
|
|
27
27
|
export default AiAnalysis;
|
|
@@ -9,6 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
12
21
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
22
|
import { CATEGORY_NAME, LANGUAGE_SHOW_NAME, SERVER_LANGUAGE_TYPE } from './const';
|
|
14
23
|
import { groupCategory } from './utils';
|
|
@@ -74,19 +83,19 @@ var AiAssessmentCriteria = function (props) {
|
|
|
74
83
|
setRelatedAbilities(item === null || item === void 0 ? void 0 : item.relatedAbilities);
|
|
75
84
|
};
|
|
76
85
|
var handleOk = useCallback(function () {
|
|
77
|
-
updateAiAbilities(Object.values(checkAbilities)
|
|
86
|
+
updateAiAbilities(__spreadArray(__spreadArray([], aiAbilities.filter(function (v) { return v.isWorkplace; }), true), Object.values(checkAbilities)
|
|
78
87
|
.filter(function (item) { return item; })
|
|
79
|
-
.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); }));
|
|
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); }), true));
|
|
80
89
|
updateState({ language: SERVER_LANGUAGE_TYPE[language], aiSwitch: 1 });
|
|
81
90
|
onClose();
|
|
82
|
-
}, [checkAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
91
|
+
}, [checkAbilities, aiAbilities, language, onClose, updateAiAbilities, updateState]);
|
|
83
92
|
useEffect(function () {
|
|
84
93
|
aiAbilities.forEach(function (item) {
|
|
85
94
|
var _a;
|
|
86
95
|
return fixSetCheckAbilities((_a = {}, _a[item.type] = item, _a));
|
|
87
96
|
});
|
|
88
97
|
}, [aiAbilities, fixSetCheckAbilities]);
|
|
89
|
-
return (_jsx(Dialog, __assign({ open: open, title: "\u9009\u62E9 AI \u8003\u6838\
|
|
98
|
+
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) {
|
|
90
99
|
var name = _a.name, type = _a.type, list = _a.list;
|
|
91
100
|
return (_jsxs(Box, { children: [(list.filter(function (_a) {
|
|
92
101
|
var type = _a.type;
|
|
@@ -10,29 +10,29 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { useDebounceFn, useHover } from 'ahooks';
|
|
13
|
+
import { defaultQuestionParams } from '../QuestionUpdate/const';
|
|
14
|
+
import { MAX_DISPLAY_SIZE } from './const';
|
|
15
|
+
import { AccordionRoot, AccordionSubTitle, AccordionTitle } from './styled';
|
|
17
16
|
import { IS_AI_ANALYSIS } from "../../../../constants/ai-question";
|
|
18
17
|
import { LANGUAGE_TYPE } from "../../../../enum/ai-question";
|
|
19
18
|
import { Done, ExpandMore } from '@mui/icons-material';
|
|
20
19
|
import { useQuestionModelStore } from "../../../../store/ai-question/question-model-store";
|
|
21
20
|
import { useQuestionPreviewStore } from "../../../../store/ai-question/question-preview-store";
|
|
22
21
|
import { uniqueId } from "../../../../utils/utils";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
22
|
+
import { useDebounceFn, useHover } from 'ahooks';
|
|
23
|
+
import { Box, Button, confirm } from 'fbm-ui';
|
|
24
|
+
import { Accordion, AccordionDetails, AccordionSummary, List, ListItem, ListItemText } from 'fbm-ui/lib/mui';
|
|
25
|
+
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
26
26
|
var LANGUAGE_TYPE_LIST = [LANGUAGE_TYPE.MANDARIN, LANGUAGE_TYPE.CANTONESE, LANGUAGE_TYPE.JAPANESE, LANGUAGE_TYPE.ENGLISH];
|
|
27
27
|
var BaseAccordion = function (props) {
|
|
28
|
-
var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d;
|
|
28
|
+
var name = props.name, positionName = props.positionName, list = props.list, index = props.index, isShowOnlyAITest = props.isShowOnlyAITest, _a = props.isShowDesc, isShowDesc = _a === void 0 ? false : _a, _b = props.isShowSummaryAction, isShowSummaryAction = _b === void 0 ? false : _b, _c = props.isShowConfirm, isShowConfirm = _c === void 0 ? false : _c, _d = props.isShowPreview, isShowPreview = _d === void 0 ? true : _d, _e = props.isNew, isNew = _e === void 0 ? false : _e;
|
|
29
29
|
var ref = useRef(null);
|
|
30
30
|
var isHovering = useHover(ref);
|
|
31
31
|
var updatePreview = useQuestionPreviewStore().updatePreview;
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
32
|
+
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];
|
|
36
36
|
var handlePreview = useDebounceFn(function () {
|
|
37
37
|
isShowPreview && updatePreview(isHovering, isHovering ? hoverItem : undefined);
|
|
38
38
|
}, {
|
|
@@ -86,7 +86,16 @@ var BaseAccordion = function (props) {
|
|
|
86
86
|
setQuestionsList(filterList);
|
|
87
87
|
}
|
|
88
88
|
}, [list, isShowOnlyAITest]);
|
|
89
|
-
return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0 }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {})
|
|
89
|
+
return (_jsx(_Fragment, { children: questionsList.length > 0 && (_jsx(AccordionRoot, { children: _jsxs(Accordion, __assign({ defaultExpanded: index === 0 }, { children: [_jsx(AccordionSummary, __assign({ expandIcon: _jsx(ExpandMore, {}), sx: {
|
|
90
|
+
'&:after': {
|
|
91
|
+
content: "".concat(isNew ? 'url(//webcdn.fbmms.cn/assets/XXRf/bdUI9qZoTx-l2k_OHTotn)' : '" "'),
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
top: -1,
|
|
94
|
+
right: 0,
|
|
95
|
+
width: 38,
|
|
96
|
+
height: 16,
|
|
97
|
+
},
|
|
98
|
+
} }, { children: _jsxs(Box, __assign({ flex: "1 0", display: "flex", justifyContent: "space-between", alignItems: "center", overflow: "hidden" }, { children: [_jsxs(Box, __assign({ flex: "1 0", overflow: "hidden" }, { children: [_jsx(AccordionTitle, { children: positionName || name }), positionName && _jsxs(AccordionSubTitle, __assign({ color: "secondary" }, { children: ["\u6B65\u9AA4\uFF1A", name] }))] })), isShowSummaryAction && (_jsx(Button, __assign({ sx: { mr: 1, flexShrink: 0, height: 24 }, variant: "outlined", color: "inherit", size: "small", onClick: handleUseAllQuestion }, { children: "\u4F7F\u7528" })))] })) })), _jsxs(AccordionDetails, { children: [_jsx(List, __assign({ ref: ref }, { children: questionsList.map(function (item) {
|
|
90
99
|
var token = item.token, name = item.name, category = item.category;
|
|
91
100
|
var isUsed = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps.find(function (step) { return step.originToken === token; });
|
|
92
101
|
return (_jsx(ListItem, __assign({ secondaryAction: [
|