eli-video-interview 1.2.41-alpha.40 → 1.2.41-alpha.41

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.
@@ -66,6 +66,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
66
66
  var interviewRoomState = useInterviewRoomStore().interviewRoomState;
67
67
  var addModel = useQuestionModelStore(function (store) { return [store.addModel]; }).addModel;
68
68
  var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
69
+ var isOem = props.isOem;
69
70
  var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
70
71
  var questionModelData, _a, pcUrl, pcThumbUrl, mediaUrl, thumbUrl, appliedAllPosition, steps;
71
72
  return __generator(this, function (_b) {
@@ -144,7 +145,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
144
145
  width: '256px',
145
146
  height: '100%',
146
147
  overflow: 'auto',
147
- } }, { children: _jsx(QuestionTemplate, {}) }))] })));
148
+ } }, { children: _jsx(QuestionTemplate, { isOem: isOem }) }))] })));
148
149
  });
149
150
  AiQuestionRoot.displayName = 'AiQuestionRoot';
150
151
  export default memo(AiQuestionRoot);
@@ -1,3 +1,5 @@
1
1
  import { FC } from 'react';
2
- declare const AiEvaluation: FC;
2
+ declare const AiEvaluation: FC<{
3
+ isOem?: boolean;
4
+ }>;
3
5
  export default AiEvaluation;
@@ -46,17 +46,18 @@ var ICONS = (_a = {},
46
46
  _a[ADD_QUESTION_TYPE.LANGUAGE] = _jsx(MicIcon, { color: "secondary" }),
47
47
  _a[ADD_QUESTION_TYPE.SINGLECHIOCE] = _jsx(RadioCheckedIcon, { color: "secondary" }),
48
48
  _a);
49
- var AiEvaluation = function () {
49
+ var AiEvaluation = function (_a) {
50
+ var isOem = _a.isOem;
50
51
  var onOpenTemplate = useAiQuestionStore(function (store) { return [store.onOpenTemplate]; }).onOpenTemplate;
51
52
  var updateQuestionState = useUpdateQuestionStore(function (store) { return [store.updateQuestionState]; }).updateQuestionState;
52
53
  var questionModelData = useQuestionModelStore(function (store) { return [store.questionModelData]; }).questionModelData;
53
54
  var isEdit = (getQuestionModelStore() || {}).isEdit;
54
55
  var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
55
56
  var aiEvaluationData = useQuestionTemplateStore(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
56
- var _a = __read(useSetState({
57
+ var _b = __read(useSetState({
57
58
  addQuestionOpen: false,
58
59
  showOnlyAITest: false,
59
- }), 2), state = _a[0], setState = _a[1];
60
+ }), 2), state = _b[0], setState = _b[1];
60
61
  var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
61
62
  var handleClickAdd = useCallback(function (aiShowType) {
62
63
  setState({ addQuestionOpen: false });
@@ -75,6 +76,7 @@ var AiEvaluation = function () {
75
76
  return (_jsxs(Box, { children: [_jsxs(Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }, { children: [_jsx(Button, __assign({ variant: "outlined", color: "inherit", icon: _jsx(LayerOutlineIcon, {}), onClick: function () { return onOpenTemplate === null || onOpenTemplate === void 0 ? void 0 : onOpenTemplate(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps); } }, { children: "\u5C97\u4F4D\u6A21\u7248\u5E93" })), _jsx(Popover, __assign({ open: addQuestionOpen, arrow: false, content: content, onClickAway: function () { return setState({ addQuestionOpen: false }); } }, { children: _jsx(Button, __assign({ variant: "outlined", icon: _jsx(AddIcon, {}), onClick: function () { return setState({ addQuestionOpen: true }); } }, { children: "\u81EA\u5B9A\u4E49\u9898\u76EE" })) }))] })), aiEvaluationData.map(function (_a, index) {
76
77
  var name = _a.name, list = _a.list;
77
78
  return (_jsxs(Box, { children: [_jsx(Typography, __assign({ fontSize: 12, lineHeight: 1.5, weight: "500", mb: 2 }, { children: name })), list
79
+ .filter(function (v) { return !isOem || v.name !== '游戏测评'; })
78
80
  .filter(function (v) { return !isEdit || !v.isNew || selctedAbilitys.includes(v.token); })
79
81
  .map(function (item, i) { return (_jsx(BaseAccordion, __assign({ index: i, isShowOnlyAITest: showOnlyAITest, isShowDesc: index !== 0, isShowSummaryAction: index !== 0, isShowConfirm: index !== 0 }, item), item.name + i)); })] }, name));
80
82
  })] }));
@@ -18,7 +18,8 @@ import { PostAiModelQuestions } from "../../../../services/ai-question";
18
18
  import { useQuestionTemplateStore } from "../../../../store/ai-question/question-template-store";
19
19
  import { useRequest } from 'ahooks';
20
20
  import { Box } from 'fbm-ui';
21
- var QuestionTemplate = function () {
21
+ var QuestionTemplate = function (_a) {
22
+ var isOem = _a.isOem;
22
23
  var updateAiEvaluationData = useQuestionTemplateStore().updateAiEvaluationData;
23
24
  var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
24
25
  var enterprise = useEnterpriseStore().enterprise;
@@ -30,6 +31,6 @@ var QuestionTemplate = function () {
30
31
  return updateAiEvaluationData(data);
31
32
  },
32
33
  }).loading;
33
- return _jsx(Box, __assign({ sx: { position: 'relative' } }, { children: loading ? _jsx(Skeleton, {}) : _jsx(AiEvaluation, {}) }));
34
+ return _jsx(Box, __assign({ sx: { position: 'relative' } }, { children: loading ? _jsx(Skeleton, {}) : _jsx(AiEvaluation, { isOem: isOem }) }));
34
35
  };
35
36
  export default QuestionTemplate;
@@ -50,5 +50,6 @@ export interface AiEvaluationState {
50
50
  showOnlyAITest: boolean;
51
51
  }
52
52
  export interface QuestionTemplateProps {
53
+ isOem?: boolean;
53
54
  }
54
55
  export {};
@@ -53,6 +53,7 @@ export interface AiQuestionProps {
53
53
  aiModel?: string;
54
54
  extraAbilityTokens?: string[];
55
55
  templateList?: QuestionModelStep[];
56
+ isOem?: boolean;
56
57
  mediaList?: Array<{
57
58
  url: string;
58
59
  thumbUrl: string;
@@ -10,6 +10,7 @@ export declare const useAiQuestion: (props: AiQuestionProps) => {
10
10
  aiModel?: string | undefined;
11
11
  extraAbilityTokens?: string[] | undefined;
12
12
  templateList?: import("./components/QuestionModel/interface").QuestionModelStep[] | undefined;
13
+ isOem?: boolean | undefined;
13
14
  mediaList?: {
14
15
  url: string;
15
16
  thumbUrl: string;
@@ -6,6 +6,7 @@ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn
6
6
  aiModel?: string | undefined;
7
7
  extraAbilityTokens?: string[] | undefined;
8
8
  templateList?: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined;
9
+ isOem?: boolean | undefined;
9
10
  mediaList?: {
10
11
  url: string;
11
12
  thumbUrl: string;
@@ -21,6 +22,7 @@ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn
21
22
  aiModel?: string | undefined;
22
23
  extraAbilityTokens?: string[] | undefined;
23
24
  templateList?: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined;
25
+ isOem?: boolean | undefined;
24
26
  mediaList?: {
25
27
  url: string;
26
28
  thumbUrl: string;
@@ -36,6 +38,7 @@ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn
36
38
  aiModel?: string | undefined;
37
39
  extraAbilityTokens?: string[] | undefined;
38
40
  templateList?: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined;
41
+ isOem?: boolean | undefined;
39
42
  mediaList?: {
40
43
  url: string;
41
44
  thumbUrl: string;
@@ -71,6 +71,7 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
71
71
  var interviewRoomState = (0, interview_room_store_1.useInterviewRoomStore)().interviewRoomState;
72
72
  var addModel = (0, question_model_store_2.useQuestionModelStore)(function (store) { return [store.addModel]; }).addModel;
73
73
  var selctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().selctedAbilitys;
74
+ var isOem = props.isOem;
74
75
  var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
75
76
  var questionModelData, _a, pcUrl, pcThumbUrl, mediaUrl, thumbUrl, appliedAllPosition, steps;
76
77
  return __generator(this, function (_b) {
@@ -149,7 +150,7 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
149
150
  width: '256px',
150
151
  height: '100%',
151
152
  overflow: 'auto',
152
- } }, { children: (0, jsx_runtime_1.jsx)(QuestionTemplate_1.default, {}) }))] })));
153
+ } }, { children: (0, jsx_runtime_1.jsx)(QuestionTemplate_1.default, { isOem: isOem }) }))] })));
153
154
  });
154
155
  AiQuestionRoot.displayName = 'AiQuestionRoot';
155
156
  exports.default = (0, react_1.memo)(AiQuestionRoot);
@@ -1,3 +1,5 @@
1
1
  import { FC } from 'react';
2
- declare const AiEvaluation: FC;
2
+ declare const AiEvaluation: FC<{
3
+ isOem?: boolean;
4
+ }>;
3
5
  export default AiEvaluation;
@@ -51,17 +51,18 @@ var ICONS = (_a = {},
51
51
  _a[ai_question_2.ADD_QUESTION_TYPE.LANGUAGE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.MicIcon, { color: "secondary" }),
52
52
  _a[ai_question_2.ADD_QUESTION_TYPE.SINGLECHIOCE] = (0, jsx_runtime_1.jsx)(fbm_ui_1.RadioCheckedIcon, { color: "secondary" }),
53
53
  _a);
54
- var AiEvaluation = function () {
54
+ var AiEvaluation = function (_a) {
55
+ var isOem = _a.isOem;
55
56
  var onOpenTemplate = (0, global_store_1.useAiQuestionStore)(function (store) { return [store.onOpenTemplate]; }).onOpenTemplate;
56
57
  var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.updateQuestionState]; }).updateQuestionState;
57
58
  var questionModelData = (0, question_model_store_1.useQuestionModelStore)(function (store) { return [store.questionModelData]; }).questionModelData;
58
59
  var isEdit = ((0, question_model_store_1.getQuestionModelStore)() || {}).isEdit;
59
60
  var selctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().selctedAbilitys;
60
61
  var aiEvaluationData = (0, question_template_store_1.useQuestionTemplateStore)(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
61
- var _a = __read((0, ahooks_1.useSetState)({
62
+ var _b = __read((0, ahooks_1.useSetState)({
62
63
  addQuestionOpen: false,
63
64
  showOnlyAITest: false,
64
- }), 2), state = _a[0], setState = _a[1];
65
+ }), 2), state = _b[0], setState = _b[1];
65
66
  var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
66
67
  var handleClickAdd = (0, react_1.useCallback)(function (aiShowType) {
67
68
  setState({ addQuestionOpen: false });
@@ -80,6 +81,7 @@ var AiEvaluation = function () {
80
81
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", color: "inherit", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.LayerOutlineIcon, {}), onClick: function () { return onOpenTemplate === null || onOpenTemplate === void 0 ? void 0 : onOpenTemplate(questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps); } }, { children: "\u5C97\u4F4D\u6A21\u7248\u5E93" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Popover, __assign({ open: addQuestionOpen, arrow: false, content: content, onClickAway: function () { return setState({ addQuestionOpen: false }); } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ variant: "outlined", icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), onClick: function () { return setState({ addQuestionOpen: true }); } }, { children: "\u81EA\u5B9A\u4E49\u9898\u76EE" })) }))] })), aiEvaluationData.map(function (_a, index) {
81
82
  var name = _a.name, list = _a.list;
82
83
  return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, weight: "500", mb: 2 }, { children: name })), list
84
+ .filter(function (v) { return !isOem || v.name !== '游戏测评'; })
83
85
  .filter(function (v) { return !isEdit || !v.isNew || selctedAbilitys.includes(v.token); })
84
86
  .map(function (item, i) { return ((0, jsx_runtime_1.jsx)(BaseAccordion_1.default, __assign({ index: i, isShowOnlyAITest: showOnlyAITest, isShowDesc: index !== 0, isShowSummaryAction: index !== 0, isShowConfirm: index !== 0 }, item), item.name + i)); })] }, name));
85
87
  })] }));
@@ -23,7 +23,8 @@ var ai_question_1 = require("../../../../services/ai-question");
23
23
  var question_template_store_1 = require("../../../../store/ai-question/question-template-store");
24
24
  var ahooks_1 = require("ahooks");
25
25
  var fbm_ui_1 = require("fbm-ui");
26
- var QuestionTemplate = function () {
26
+ var QuestionTemplate = function (_a) {
27
+ var isOem = _a.isOem;
27
28
  var updateAiEvaluationData = (0, question_template_store_1.useQuestionTemplateStore)().updateAiEvaluationData;
28
29
  var selctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().selctedAbilitys;
29
30
  var enterprise = (0, enterprise_store_1.useEnterpriseStore)().enterprise;
@@ -35,6 +36,6 @@ var QuestionTemplate = function () {
35
36
  return updateAiEvaluationData(data);
36
37
  },
37
38
  }).loading;
38
- return (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { position: 'relative' } }, { children: loading ? (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}) : (0, jsx_runtime_1.jsx)(AiEvaluation_1.default, {}) }));
39
+ return (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ sx: { position: 'relative' } }, { children: loading ? (0, jsx_runtime_1.jsx)(Skeleton_1.default, {}) : (0, jsx_runtime_1.jsx)(AiEvaluation_1.default, { isOem: isOem }) }));
39
40
  };
40
41
  exports.default = QuestionTemplate;
@@ -50,5 +50,6 @@ export interface AiEvaluationState {
50
50
  showOnlyAITest: boolean;
51
51
  }
52
52
  export interface QuestionTemplateProps {
53
+ isOem?: boolean;
53
54
  }
54
55
  export {};
@@ -53,6 +53,7 @@ export interface AiQuestionProps {
53
53
  aiModel?: string;
54
54
  extraAbilityTokens?: string[];
55
55
  templateList?: QuestionModelStep[];
56
+ isOem?: boolean;
56
57
  mediaList?: Array<{
57
58
  url: string;
58
59
  thumbUrl: string;
@@ -10,6 +10,7 @@ export declare const useAiQuestion: (props: AiQuestionProps) => {
10
10
  aiModel?: string | undefined;
11
11
  extraAbilityTokens?: string[] | undefined;
12
12
  templateList?: import("./components/QuestionModel/interface").QuestionModelStep[] | undefined;
13
+ isOem?: boolean | undefined;
13
14
  mediaList?: {
14
15
  url: string;
15
16
  thumbUrl: string;
@@ -6,6 +6,7 @@ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn
6
6
  aiModel?: string | undefined;
7
7
  extraAbilityTokens?: string[] | undefined;
8
8
  templateList?: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined;
9
+ isOem?: boolean | undefined;
9
10
  mediaList?: {
10
11
  url: string;
11
12
  thumbUrl: string;
@@ -21,6 +22,7 @@ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn
21
22
  aiModel?: string | undefined;
22
23
  extraAbilityTokens?: string[] | undefined;
23
24
  templateList?: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined;
25
+ isOem?: boolean | undefined;
24
26
  mediaList?: {
25
27
  url: string;
26
28
  thumbUrl: string;
@@ -36,6 +38,7 @@ export declare const useAiQuestionStore: (depsFn?: import("hox/es/types").DepsFn
36
38
  aiModel?: string | undefined;
37
39
  extraAbilityTokens?: string[] | undefined;
38
40
  templateList?: import("../../modules/ai-question/components/QuestionModel/interface").QuestionModelStep[] | undefined;
41
+ isOem?: boolean | undefined;
39
42
  mediaList?: {
40
43
  url: string;
41
44
  thumbUrl: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.41-alpha.40",
3
+ "version": "1.2.41-alpha.41",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",