eli-video-interview 1.2.41-alpha.36 → 1.2.41-alpha.38

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.
@@ -67,10 +67,10 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
67
67
  var addModel = useQuestionModelStore(function (store) { return [store.addModel]; }).addModel;
68
68
  var selctedAbilitys = useAiAbilityListStore().selctedAbilitys;
69
69
  var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
70
- var questionModelData, _a, mediaUrl, thumbUrl, appliedAllPosition, steps;
70
+ var questionModelData, _a, pcUrl, pcThumbUrl, mediaUrl, thumbUrl, appliedAllPosition, steps;
71
71
  return __generator(this, function (_b) {
72
72
  questionModelData = (getQuestionModelStore() || {}).questionModelData;
73
- _a = getBootVideoStore() || {}, mediaUrl = _a.mediaUrl, thumbUrl = _a.thumbUrl, appliedAllPosition = _a.appliedAllPosition;
73
+ _a = getBootVideoStore() || {}, pcUrl = _a.pcUrl, pcThumbUrl = _a.pcThumbUrl, mediaUrl = _a.mediaUrl, thumbUrl = _a.thumbUrl, appliedAllPosition = _a.appliedAllPosition;
74
74
  steps = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps.map(function (item) {
75
75
  item.weight = Number(item.weight);
76
76
  item.aiAbilities = item.aiAbilities.map(function (aiAbility) {
@@ -82,6 +82,8 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
82
82
  return [2 /*return*/, Promise.resolve({
83
83
  data: __assign(__assign({}, questionModelData), { steps: steps }),
84
84
  media: {
85
+ pcUrl: pcUrl,
86
+ pcThumbUrl: pcThumbUrl,
85
87
  mediaUrl: mediaUrl,
86
88
  thumbUrl: thumbUrl,
87
89
  appliedAllPosition: appliedAllPosition,
@@ -93,12 +95,12 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
93
95
  handleValues: handleValues,
94
96
  handleTemplate: function (steps) { return addModel(steps); },
95
97
  handleSubmit: function () { return __awaiter(void 0, void 0, void 0, function () {
96
- var _a, _b, name, token, questions, aiModel, _c, mediaUrl, thumbUrl, appliedAllPosition, data, error_1;
98
+ var _a, _b, name, token, questions, aiModel, _c, pcUrl, pcThumbUrl, mediaUrl, thumbUrl, appliedAllPosition, data, error_1;
97
99
  return __generator(this, function (_d) {
98
100
  switch (_d.label) {
99
101
  case 0: return [4 /*yield*/, handleValues()];
100
102
  case 1:
101
- _a = _d.sent(), _b = _a.data, name = _b.name, token = _b.token, questions = _b.steps, aiModel = _b.aiModel, _c = _a.media, mediaUrl = _c.mediaUrl, thumbUrl = _c.thumbUrl, appliedAllPosition = _c.appliedAllPosition;
103
+ _a = _d.sent(), _b = _a.data, name = _b.name, token = _b.token, questions = _b.steps, aiModel = _b.aiModel, _c = _a.media, pcUrl = _c.pcUrl, pcThumbUrl = _c.pcThumbUrl, mediaUrl = _c.mediaUrl, thumbUrl = _c.thumbUrl, appliedAllPosition = _c.appliedAllPosition;
102
104
  if (!(questions === null || questions === void 0 ? void 0 : questions.length)) {
103
105
  Message.error('还未添加题目,请添加题目');
104
106
  return [2 /*return*/, Promise.reject()];
@@ -111,7 +113,7 @@ var AiQuestionRoot = forwardRef(function (props, ref) {
111
113
  data = (_d.sent()).data;
112
114
  return [2 /*return*/, Promise.resolve({
113
115
  code: 0,
114
- data: __assign(__assign({}, data), { mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: appliedAllPosition }),
116
+ data: __assign(__assign({}, data), { pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: appliedAllPosition }),
115
117
  message: '保存成功',
116
118
  })];
117
119
  case 4:
@@ -59,11 +59,11 @@ var BootVideo = function (props) {
59
59
  var _j = useInterviewRoomStore(), interactType = _j.interactType, aiInterviewerProfile = _j.aiInterviewerProfile, updateInterviewRoom = _j.updateInterviewRoom, interactionMethods = _j.interactionMethods;
60
60
  var _k = __read(useState({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _k[0], setInterviewRoomState = _k[1];
61
61
  var _l = __read(useState(interactionMethods || DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _l[0], setVirtualManList = _l[1];
62
- var _m = useBootVideoStore(), pcUrl = _m.pcUrl, mediaUrl = _m.mediaUrl, thumbUrl = _m.thumbUrl, updateBootVideo = _m.updateBootVideo;
62
+ var _m = useBootVideoStore(), pcUrl = _m.pcUrl, pcThumbUrl = _m.pcThumbUrl, mediaUrl = _m.mediaUrl, thumbUrl = _m.thumbUrl, updateBootVideo = _m.updateBootVideo;
63
63
  // 传统引导视频
64
64
  var _o = __read(useState(DEFAULT_GUIDE_VIDEO), 2), mediaList = _o[0], setMediaList = _o[1];
65
65
  var _p = __read(useState(DEFAULT_GUIDE_VIDEO), 2), pcMediaList = _p[0], setPcMediaList = _p[1];
66
- var _q = __read(useSetState({ pcUrl: pcUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
66
+ var _q = __read(useSetState({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
67
67
  var _r = useRequest(PostCommonUpload, {
68
68
  manual: true,
69
69
  onSuccess: function (_a) {
@@ -77,7 +77,7 @@ var BootVideo = function (props) {
77
77
  frameUrl: item.mineExtra.firstFrameUrl,
78
78
  },
79
79
  ]);
80
- setMediaState({ pcUrl: pcUrl, mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
80
+ setMediaState({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
81
81
  },
82
82
  }), loading = _r.loading, postCommonUpload = _r.run;
83
83
  var _s = useRequest(PostCommonUpload, {
@@ -93,7 +93,7 @@ var BootVideo = function (props) {
93
93
  frameUrl: item.mineExtra.firstFrameUrl,
94
94
  },
95
95
  ]);
96
- setMediaState({ pcUrl: item.url, mediaUrl: mediaUrl, thumbUrl: item.mineExtra.firstFrameUrl });
96
+ setMediaState({ pcUrl: item.url, pcThumbUrl: item.mineExtra.firstFrameUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl });
97
97
  },
98
98
  }), pcLoading = _s.loading, postPCCommonUpload = _s.run;
99
99
  var getAiInterviewerProfileList = useRequest(GetAiInterviewerProfileList, {
@@ -42,6 +42,7 @@ export interface SaveAiModelDataRes {
42
42
  }
43
43
  export interface Media {
44
44
  pcUrl?: string;
45
+ pcThumbUrl?: string;
45
46
  mediaUrl?: string;
46
47
  thumbUrl?: string;
47
48
  appliedAllPosition?: boolean;
@@ -2,18 +2,21 @@ import { Media } from '@/modules/ai-question/interface';
2
2
  export declare const useBootVideoStore: (depsFn?: import("hox/es/types").DepsFn<{
3
3
  updateBootVideo: (params: Media) => void;
4
4
  pcUrl?: string | undefined;
5
+ pcThumbUrl?: string | undefined;
5
6
  mediaUrl?: string | undefined;
6
7
  thumbUrl?: string | undefined;
7
8
  appliedAllPosition?: boolean | undefined;
8
9
  }> | undefined) => {
9
10
  updateBootVideo: (params: Media) => void;
10
11
  pcUrl?: string | undefined;
12
+ pcThumbUrl?: string | undefined;
11
13
  mediaUrl?: string | undefined;
12
14
  thumbUrl?: string | undefined;
13
15
  appliedAllPosition?: boolean | undefined;
14
16
  }, getBootVideoStore: () => {
15
17
  updateBootVideo: (params: Media) => void;
16
18
  pcUrl?: string | undefined;
19
+ pcThumbUrl?: string | undefined;
17
20
  mediaUrl?: string | undefined;
18
21
  thumbUrl?: string | undefined;
19
22
  appliedAllPosition?: boolean | undefined;
@@ -32,6 +32,7 @@ import { useState } from 'react';
32
32
  export var useBootVideoStore = (_a = __read(createGlobalStore(function () {
33
33
  var _a = __read(useState({
34
34
  pcUrl: DEFAULT_GUIDE_VIDEO_URL,
35
+ pcThumbUrl: DEFAULT_GUIDE_VIDEO_THUMB_URL,
35
36
  mediaUrl: DEFAULT_GUIDE_VIDEO_URL,
36
37
  thumbUrl: DEFAULT_GUIDE_VIDEO_THUMB_URL,
37
38
  appliedAllPosition: false,
@@ -72,10 +72,10 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
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
74
  var handleValues = function () { return __awaiter(void 0, void 0, void 0, function () {
75
- var questionModelData, _a, mediaUrl, thumbUrl, appliedAllPosition, steps;
75
+ var questionModelData, _a, pcUrl, pcThumbUrl, mediaUrl, thumbUrl, appliedAllPosition, steps;
76
76
  return __generator(this, function (_b) {
77
77
  questionModelData = ((0, question_model_store_1.getQuestionModelStore)() || {}).questionModelData;
78
- _a = (0, boot_video_store_1.getBootVideoStore)() || {}, mediaUrl = _a.mediaUrl, thumbUrl = _a.thumbUrl, appliedAllPosition = _a.appliedAllPosition;
78
+ _a = (0, boot_video_store_1.getBootVideoStore)() || {}, pcUrl = _a.pcUrl, pcThumbUrl = _a.pcThumbUrl, mediaUrl = _a.mediaUrl, thumbUrl = _a.thumbUrl, appliedAllPosition = _a.appliedAllPosition;
79
79
  steps = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.steps.map(function (item) {
80
80
  item.weight = Number(item.weight);
81
81
  item.aiAbilities = item.aiAbilities.map(function (aiAbility) {
@@ -87,6 +87,8 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
87
87
  return [2 /*return*/, Promise.resolve({
88
88
  data: __assign(__assign({}, questionModelData), { steps: steps }),
89
89
  media: {
90
+ pcUrl: pcUrl,
91
+ pcThumbUrl: pcThumbUrl,
90
92
  mediaUrl: mediaUrl,
91
93
  thumbUrl: thumbUrl,
92
94
  appliedAllPosition: appliedAllPosition,
@@ -98,12 +100,12 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
98
100
  handleValues: handleValues,
99
101
  handleTemplate: function (steps) { return addModel(steps); },
100
102
  handleSubmit: function () { return __awaiter(void 0, void 0, void 0, function () {
101
- var _a, _b, name, token, questions, aiModel, _c, mediaUrl, thumbUrl, appliedAllPosition, data, error_1;
103
+ var _a, _b, name, token, questions, aiModel, _c, pcUrl, pcThumbUrl, mediaUrl, thumbUrl, appliedAllPosition, data, error_1;
102
104
  return __generator(this, function (_d) {
103
105
  switch (_d.label) {
104
106
  case 0: return [4 /*yield*/, handleValues()];
105
107
  case 1:
106
- _a = _d.sent(), _b = _a.data, name = _b.name, token = _b.token, questions = _b.steps, aiModel = _b.aiModel, _c = _a.media, mediaUrl = _c.mediaUrl, thumbUrl = _c.thumbUrl, appliedAllPosition = _c.appliedAllPosition;
108
+ _a = _d.sent(), _b = _a.data, name = _b.name, token = _b.token, questions = _b.steps, aiModel = _b.aiModel, _c = _a.media, pcUrl = _c.pcUrl, pcThumbUrl = _c.pcThumbUrl, mediaUrl = _c.mediaUrl, thumbUrl = _c.thumbUrl, appliedAllPosition = _c.appliedAllPosition;
107
109
  if (!(questions === null || questions === void 0 ? void 0 : questions.length)) {
108
110
  fbm_ui_1.Message.error('还未添加题目,请添加题目');
109
111
  return [2 /*return*/, Promise.reject()];
@@ -116,7 +118,7 @@ var AiQuestionRoot = (0, react_1.forwardRef)(function (props, ref) {
116
118
  data = (_d.sent()).data;
117
119
  return [2 /*return*/, Promise.resolve({
118
120
  code: 0,
119
- data: __assign(__assign({}, data), { mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: appliedAllPosition }),
121
+ data: __assign(__assign({}, data), { pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: appliedAllPosition }),
120
122
  message: '保存成功',
121
123
  })];
122
124
  case 4:
@@ -64,11 +64,11 @@ var BootVideo = function (props) {
64
64
  var _j = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _j.interactType, aiInterviewerProfile = _j.aiInterviewerProfile, updateInterviewRoom = _j.updateInterviewRoom, interactionMethods = _j.interactionMethods;
65
65
  var _k = __read((0, react_1.useState)({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile, interactionMethods: interactionMethods }), 2), interviewRoomState = _k[0], setInterviewRoomState = _k[1];
66
66
  var _l = __read((0, react_1.useState)(interactionMethods || ai_question_1.DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _l[0], setVirtualManList = _l[1];
67
- var _m = (0, boot_video_store_1.useBootVideoStore)(), pcUrl = _m.pcUrl, mediaUrl = _m.mediaUrl, thumbUrl = _m.thumbUrl, updateBootVideo = _m.updateBootVideo;
67
+ var _m = (0, boot_video_store_1.useBootVideoStore)(), pcUrl = _m.pcUrl, pcThumbUrl = _m.pcThumbUrl, mediaUrl = _m.mediaUrl, thumbUrl = _m.thumbUrl, updateBootVideo = _m.updateBootVideo;
68
68
  // 传统引导视频
69
69
  var _o = __read((0, react_1.useState)(ai_question_1.DEFAULT_GUIDE_VIDEO), 2), mediaList = _o[0], setMediaList = _o[1];
70
70
  var _p = __read((0, react_1.useState)(ai_question_1.DEFAULT_GUIDE_VIDEO), 2), pcMediaList = _p[0], setPcMediaList = _p[1];
71
- var _q = __read((0, ahooks_1.useSetState)({ pcUrl: pcUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
71
+ var _q = __read((0, ahooks_1.useSetState)({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _q[0], setMediaState = _q[1];
72
72
  var _r = (0, ahooks_1.useRequest)(ai_question_2.PostCommonUpload, {
73
73
  manual: true,
74
74
  onSuccess: function (_a) {
@@ -82,7 +82,7 @@ var BootVideo = function (props) {
82
82
  frameUrl: item.mineExtra.firstFrameUrl,
83
83
  },
84
84
  ]);
85
- setMediaState({ pcUrl: pcUrl, mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
85
+ setMediaState({ pcUrl: pcUrl, pcThumbUrl: pcThumbUrl, mediaUrl: item.url, thumbUrl: item.mineExtra.firstFrameUrl });
86
86
  },
87
87
  }), loading = _r.loading, postCommonUpload = _r.run;
88
88
  var _s = (0, ahooks_1.useRequest)(ai_question_2.PostCommonUpload, {
@@ -98,7 +98,7 @@ var BootVideo = function (props) {
98
98
  frameUrl: item.mineExtra.firstFrameUrl,
99
99
  },
100
100
  ]);
101
- setMediaState({ pcUrl: item.url, mediaUrl: mediaUrl, thumbUrl: item.mineExtra.firstFrameUrl });
101
+ setMediaState({ pcUrl: item.url, pcThumbUrl: item.mineExtra.firstFrameUrl, mediaUrl: mediaUrl, thumbUrl: thumbUrl });
102
102
  },
103
103
  }), pcLoading = _s.loading, postPCCommonUpload = _s.run;
104
104
  var getAiInterviewerProfileList = (0, ahooks_1.useRequest)(ai_question_2.GetAiInterviewerProfileList, {
@@ -42,6 +42,7 @@ export interface SaveAiModelDataRes {
42
42
  }
43
43
  export interface Media {
44
44
  pcUrl?: string;
45
+ pcThumbUrl?: string;
45
46
  mediaUrl?: string;
46
47
  thumbUrl?: string;
47
48
  appliedAllPosition?: boolean;
@@ -2,18 +2,21 @@ import { Media } from '@/modules/ai-question/interface';
2
2
  export declare const useBootVideoStore: (depsFn?: import("hox/es/types").DepsFn<{
3
3
  updateBootVideo: (params: Media) => void;
4
4
  pcUrl?: string | undefined;
5
+ pcThumbUrl?: string | undefined;
5
6
  mediaUrl?: string | undefined;
6
7
  thumbUrl?: string | undefined;
7
8
  appliedAllPosition?: boolean | undefined;
8
9
  }> | undefined) => {
9
10
  updateBootVideo: (params: Media) => void;
10
11
  pcUrl?: string | undefined;
12
+ pcThumbUrl?: string | undefined;
11
13
  mediaUrl?: string | undefined;
12
14
  thumbUrl?: string | undefined;
13
15
  appliedAllPosition?: boolean | undefined;
14
16
  }, getBootVideoStore: () => {
15
17
  updateBootVideo: (params: Media) => void;
16
18
  pcUrl?: string | undefined;
19
+ pcThumbUrl?: string | undefined;
17
20
  mediaUrl?: string | undefined;
18
21
  thumbUrl?: string | undefined;
19
22
  appliedAllPosition?: boolean | undefined;
@@ -35,6 +35,7 @@ var react_1 = require("react");
35
35
  exports.useBootVideoStore = (_a = __read((0, hox_1.createGlobalStore)(function () {
36
36
  var _a = __read((0, react_1.useState)({
37
37
  pcUrl: ai_question_1.DEFAULT_GUIDE_VIDEO_URL,
38
+ pcThumbUrl: ai_question_1.DEFAULT_GUIDE_VIDEO_THUMB_URL,
38
39
  mediaUrl: ai_question_1.DEFAULT_GUIDE_VIDEO_URL,
39
40
  thumbUrl: ai_question_1.DEFAULT_GUIDE_VIDEO_THUMB_URL,
40
41
  appliedAllPosition: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.2.41-alpha.36",
3
+ "version": "1.2.41-alpha.38",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",