eli-video-interview 1.1.9 → 1.2.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.
@@ -17,10 +17,10 @@ import { PostCommonUpload } from "../../../../services/ai-question";
17
17
  import { useUpdateQuestionStore } from "../../../../store/ai-question/question-update-store";
18
18
  import { isExceedMaxVideoFileSize } from "../../../../utils/utils";
19
19
  var VideoVoice = function () {
20
- var _a, _b, _c, _d;
21
- var _e = useUpdateQuestionStore(function (store) { return [store.questionState]; }), questionState = _e.questionState, updateQuestionState = _e.updateQuestionState;
20
+ var _a, _b, _c, _d, _e;
21
+ var _f = useUpdateQuestionStore(function (store) { return [store.questionState]; }), questionState = _f.questionState, updateQuestionState = _f.updateQuestionState;
22
22
  var item = questionState.item;
23
- var _f = useRequest(PostCommonUpload, {
23
+ var _g = useRequest(PostCommonUpload, {
24
24
  manual: true,
25
25
  onSuccess: function (_a) {
26
26
  var data = _a.data;
@@ -29,10 +29,11 @@ var VideoVoice = function () {
29
29
  item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoUrl: firstData.url }) }),
30
30
  });
31
31
  },
32
- }), loading = _f.loading, postCommonUpload = _f.run;
33
- var handleVideoRetry = function (e, checked) {
32
+ }), loading = _g.loading, postCommonUpload = _g.run;
33
+ var handleVideoBroadcastChange = function (key, checked) {
34
+ var _a;
34
35
  updateQuestionState({
35
- item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoRetry: checked ? 1 : 0 }) }),
36
+ item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
36
37
  });
37
38
  };
38
39
  var uploadProps = {
@@ -58,6 +59,6 @@ var VideoVoice = function () {
58
59
  multiline: true,
59
60
  placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
60
61
  sx: { padding: 0 },
61
- } }), _jsx(FormGroup, __assign({ sx: { mt: 9 } }, { children: _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: handleVideoRetry }) })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", sx: { mb: 1 } }, { children: "\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8BF4\u660E\uFF1A" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "1.\u89C6\u9891\u7D20\u6750\u5C3A\u5BF8\u5EFA\u8BAE\u4E3A\u7AD6\u7248\uFF0C\u6BD4\u4F8B\u63A7\u5236\u57289\uFF1A16 \uFF0C\u683C\u5F0F\u9650\u4E8E.mp4" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "2.\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8FC7\u7A0B\u4E2D\uFF0C\u9762\u8BD5\u5185\u5BB9\u5C06\u4E0D\u8FDB\u884CAI\u8BED\u97F3\u64AD\u62A5\u5904\u7406" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "3.\u5982\u5141\u8BB8\u5019\u9009\u4EBA\u91CD\u590D\u542C\u9898\uFF0C\u5355\u9898\u5168\u7A0B\u91CD\u590D\u6B21\u6570\u4E3A3\u6B21\u3002" }))] }))] })));
62
+ } }), _jsx(FormGroup, __assign({ sx: { mt: 9 } }, { children: _jsxs(Box, __assign({ display: "flex" }, { children: [_jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), _jsx(FormControlLabel, { control: _jsx(Checkbox, { checked: ((_e = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _e === void 0 ? void 0 : _e.videoSkip) === 1 }), label: _jsx(Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", sx: { mb: 1 } }, { children: "\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8BF4\u660E\uFF1A" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "1.\u89C6\u9891\u7D20\u6750\u5C3A\u5BF8\u5EFA\u8BAE\u4E3A\u7AD6\u7248\uFF0C\u6BD4\u4F8B\u63A7\u5236\u57289\uFF1A16 \uFF0C\u683C\u5F0F\u9650\u4E8E.mp4" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "2.\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8FC7\u7A0B\u4E2D\uFF0C\u9762\u8BD5\u5185\u5BB9\u5C06\u4E0D\u8FDB\u884CAI\u8BED\u97F3\u64AD\u62A5\u5904\u7406" })), _jsx(Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "3.\u5982\u5141\u8BB8\u5019\u9009\u4EBA\u91CD\u590D\u542C\u9898\uFF0C\u5355\u9898\u5168\u7A0B\u91CD\u590D\u6B21\u6570\u4E3A3\u6B21\u3002" }))] }))] })));
62
63
  };
63
64
  export default VideoVoice;
@@ -18,7 +18,8 @@ export var defaultQuestionParams = {
18
18
  prepareTime: 3,
19
19
  type: 1,
20
20
  videoBroadcast: {
21
- videoRetry: 0,
21
+ videoRetry: 2,
22
+ videoSkip: 2,
22
23
  videoUrl: '',
23
24
  },
24
25
  weight: 0,
@@ -2,6 +2,7 @@ import { BaseAiAbilityParams, BaseExtraParams } from '@/modules/ai-question/inte
2
2
  export interface VideoBroadcastParams {
3
3
  videoRetry?: number;
4
4
  videoUrl?: string;
5
+ videoSkip?: number;
5
6
  }
6
7
  export interface QuestionParams {
7
8
  name: string;
@@ -19,10 +19,10 @@ var ai_question_1 = require("../../../../services/ai-question");
19
19
  var question_update_store_1 = require("../../../../store/ai-question/question-update-store");
20
20
  var utils_1 = require("../../../../utils/utils");
21
21
  var VideoVoice = function () {
22
- var _a, _b, _c, _d;
23
- var _e = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }), questionState = _e.questionState, updateQuestionState = _e.updateQuestionState;
22
+ var _a, _b, _c, _d, _e;
23
+ var _f = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }), questionState = _f.questionState, updateQuestionState = _f.updateQuestionState;
24
24
  var item = questionState.item;
25
- var _f = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
25
+ var _g = (0, ahooks_1.useRequest)(ai_question_1.PostCommonUpload, {
26
26
  manual: true,
27
27
  onSuccess: function (_a) {
28
28
  var data = _a.data;
@@ -31,10 +31,11 @@ var VideoVoice = function () {
31
31
  item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoUrl: firstData.url }) }),
32
32
  });
33
33
  },
34
- }), loading = _f.loading, postCommonUpload = _f.run;
35
- var handleVideoRetry = function (e, checked) {
34
+ }), loading = _g.loading, postCommonUpload = _g.run;
35
+ var handleVideoBroadcastChange = function (key, checked) {
36
+ var _a;
36
37
  updateQuestionState({
37
- item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), { videoRetry: checked ? 1 : 0 }) }),
38
+ item: __assign(__assign({}, item), { videoBroadcast: __assign(__assign({}, item === null || item === void 0 ? void 0 : item.videoBroadcast), (_a = {}, _a[key] = checked ? 1 : 2, _a)) }),
38
39
  });
39
40
  };
40
41
  var uploadProps = {
@@ -60,6 +61,6 @@ var VideoVoice = function () {
60
61
  multiline: true,
61
62
  placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
62
63
  sx: { padding: 0 },
63
- } }), (0, jsx_runtime_1.jsx)(mui_1.FormGroup, __assign({ sx: { mt: 9 } }, { children: (0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: handleVideoRetry }) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", sx: { mb: 1 } }, { children: "\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8BF4\u660E\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "1.\u89C6\u9891\u7D20\u6750\u5C3A\u5BF8\u5EFA\u8BAE\u4E3A\u7AD6\u7248\uFF0C\u6BD4\u4F8B\u63A7\u5236\u57289\uFF1A16 \uFF0C\u683C\u5F0F\u9650\u4E8E.mp4" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "2.\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8FC7\u7A0B\u4E2D\uFF0C\u9762\u8BD5\u5185\u5BB9\u5C06\u4E0D\u8FDB\u884CAI\u8BED\u97F3\u64AD\u62A5\u5904\u7406" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "3.\u5982\u5141\u8BB8\u5019\u9009\u4EBA\u91CD\u590D\u542C\u9898\uFF0C\u5355\u9898\u5168\u7A0B\u91CD\u590D\u6B21\u6570\u4E3A3\u6B21\u3002" }))] }))] })));
64
+ } }), (0, jsx_runtime_1.jsx)(mui_1.FormGroup, __assign({ sx: { mt: 9 } }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_d = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _d === void 0 ? void 0 : _d.videoRetry) === 1 }), label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u91CD\u590D\u542C\u9898" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoRetry', checked); } }), (0, jsx_runtime_1.jsx)(mui_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(mui_1.Checkbox, { checked: ((_e = item === null || item === void 0 ? void 0 : item.videoBroadcast) === null || _e === void 0 ? void 0 : _e.videoSkip) === 1 }), label: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2" }, { children: "\u5141\u8BB8\u8DF3\u8FC7" })), onChange: function (e, checked) { return handleVideoBroadcastChange('videoSkip', checked); } })] })) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", sx: { mb: 1 } }, { children: "\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8BF4\u660E\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "1.\u89C6\u9891\u7D20\u6750\u5C3A\u5BF8\u5EFA\u8BAE\u4E3A\u7AD6\u7248\uFF0C\u6BD4\u4F8B\u63A7\u5236\u57289\uFF1A16 \uFF0C\u683C\u5F0F\u9650\u4E8E.mp4" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "2.\u89C6\u9891\u8BED\u97F3\u64AD\u62A5\u8FC7\u7A0B\u4E2D\uFF0C\u9762\u8BD5\u5185\u5BB9\u5C06\u4E0D\u8FDB\u884CAI\u8BED\u97F3\u64AD\u62A5\u5904\u7406" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, variant: "body2", color: "secondary" }, { children: "3.\u5982\u5141\u8BB8\u5019\u9009\u4EBA\u91CD\u590D\u542C\u9898\uFF0C\u5355\u9898\u5168\u7A0B\u91CD\u590D\u6B21\u6570\u4E3A3\u6B21\u3002" }))] }))] })));
64
65
  };
65
66
  exports.default = VideoVoice;
@@ -21,7 +21,8 @@ exports.defaultQuestionParams = {
21
21
  prepareTime: 3,
22
22
  type: 1,
23
23
  videoBroadcast: {
24
- videoRetry: 0,
24
+ videoRetry: 2,
25
+ videoSkip: 2,
25
26
  videoUrl: '',
26
27
  },
27
28
  weight: 0,
@@ -2,6 +2,7 @@ import { BaseAiAbilityParams, BaseExtraParams } from '@/modules/ai-question/inte
2
2
  export interface VideoBroadcastParams {
3
3
  videoRetry?: number;
4
4
  videoUrl?: string;
5
+ videoSkip?: number;
5
6
  }
6
7
  export interface QuestionParams {
7
8
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eli-video-interview",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "鳄梨科技 AI视频面试 React SDK",
5
5
  "author": "鳄梨科技",
6
6
  "license": "MIT",
@@ -55,5 +55,5 @@
55
55
  "type": "git",
56
56
  "url": "https://jihulab.com/elihr/elifront/open/lerna-avocado-sdk.git"
57
57
  },
58
- "gitHead": "2057483b47fc4c515d9fff20a6146aed1d39976d"
58
+ "gitHead": "a899beede4d71da37bfb3a4cb34bd745c4c29cef"
59
59
  }