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.
Files changed (149) hide show
  1. package/esm/components/Charts/ReportPie.js +21 -6
  2. package/esm/components/SvgIcon/index.js +17 -1
  3. package/esm/components/react-photo-view/PhotoBox.js +32 -7
  4. package/esm/components/react-photo-view/PhotoPage.js +18 -2
  5. package/esm/components/react-photo-view/PhotoProvider.js +17 -1
  6. package/esm/components/react-photo-view/PhotoSlider.js +19 -3
  7. package/esm/components/react-photo-view/hooks/useAnimationOrigin.js +18 -2
  8. package/esm/components/react-photo-view/hooks/useAnimationPosition.js +18 -2
  9. package/esm/components/react-photo-view/hooks/useAnimationVisible.js +19 -3
  10. package/esm/components/react-photo-view/hooks/useContinuousTap.js +28 -3
  11. package/esm/components/react-photo-view/hooks/useMethods.js +17 -1
  12. package/esm/components/react-photo-view/hooks/useScrollPosition.js +21 -5
  13. package/esm/components/react-photo-view/hooks/useTargetScale.js +17 -1
  14. package/esm/components/react-photo-view/utils/getPositionOnMoveOrScale.js +18 -2
  15. package/esm/components/react-photo-view/utils/getSuitableImageSize.js +17 -1
  16. package/esm/modules/ai-ability/Root.js +21 -5
  17. package/esm/modules/ai-ability/components/AbilityFormItem/index.js +18 -2
  18. package/esm/modules/ai-ability/components/AddAbility/index.js +19 -3
  19. package/esm/modules/ai-ability/components/UpdateAbility/index.js +21 -5
  20. package/esm/modules/ai-ability-select/components/AiAbilityItem/index.js +17 -1
  21. package/esm/modules/ai-question/components/AiAnalysis/MainPoints.js +17 -1
  22. package/esm/modules/ai-question/components/AiAnalysis/MainPointsItem.js +17 -1
  23. package/esm/modules/ai-question/components/AiAnalysis/index.js +17 -1
  24. package/esm/modules/ai-question/components/AiAssessmentCriteria/index.js +23 -7
  25. package/esm/modules/ai-question/components/AiAssessmentCriteria/utils.js +17 -1
  26. package/esm/modules/ai-question/components/BaseAccordion/index.js +19 -3
  27. package/esm/modules/ai-question/components/BootVideo/index.js +22 -6
  28. package/esm/modules/ai-question/components/QuestionModel/Interactive.js +17 -1
  29. package/esm/modules/ai-question/components/QuestionModel/Item.js +37 -3
  30. package/esm/modules/ai-question/components/QuestionPreview/index.js +18 -2
  31. package/esm/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +18 -2
  32. package/esm/modules/ai-question/components/QuestionUpdate/Chioce.js +17 -1
  33. package/esm/modules/ai-question/components/QuestionUpdate/Form.js +23 -6
  34. package/esm/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +17 -1
  35. package/esm/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
  36. package/esm/modules/ai-question/components/QuestionUpdate/Score.js +69 -0
  37. package/esm/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +18 -2
  38. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoice.js +20 -4
  39. package/esm/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +18 -2
  40. package/esm/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  41. package/esm/modules/ai-question/components/QuestionUpdate/index.js +18 -2
  42. package/esm/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
  43. package/esm/modules/ai-report/components/AIEvaluate/Evaluate.js +18 -2
  44. package/esm/modules/ai-report/components/AIEvaluate/Graph.js +18 -2
  45. package/esm/modules/ai-report/components/AIEvaluate/index.js +17 -1
  46. package/esm/modules/ai-report/components/MenuAnchor/index.js +18 -2
  47. package/esm/modules/ai-report/components/RankingRange/Item.js +17 -1
  48. package/esm/modules/ai-report/components/RankingRange/index.js +18 -2
  49. package/esm/modules/ai-report/components/ScoreReport/Bar.js +18 -2
  50. package/esm/modules/ai-report/components/ScoreReport/Score.js +19 -3
  51. package/esm/modules/ai-report/components/VideoQuestion/Abilities.js +3 -1
  52. package/esm/modules/ai-report/components/VideoQuestion/BodyImages.js +18 -2
  53. package/esm/modules/ai-report/components/VideoQuestion/QuestionItem.js +25 -5
  54. package/esm/modules/ai-report/components/VideoQuestion/ScoreSlider.js +17 -1
  55. package/esm/modules/ai-report/components/VideoQuestion/index.js +1 -1
  56. package/esm/modules/ai-report/components/WorkPlaces/WorkPlace.js +18 -2
  57. package/esm/modules/ai-report/interface.d.ts +1 -0
  58. package/esm/modules/ai-template/Root.js +18 -2
  59. package/esm/modules/ai-template/components/QuestionList/Item.js +17 -1
  60. package/esm/modules/ai-template/components/TemplateList/index.js +17 -1
  61. package/esm/modules/ai-template/components/TemplateMenu/index.js +19 -3
  62. package/esm/store/ai-ability/question-ability-store.js +19 -3
  63. package/esm/store/ai-ability-select/question-ability-store.js +20 -4
  64. package/esm/store/ai-question/ai-analysis-store.js +22 -6
  65. package/esm/store/ai-question/boot-video-store.js +20 -4
  66. package/esm/store/ai-question/global-store.js +20 -4
  67. package/esm/store/ai-question/interview-room-store.js +20 -4
  68. package/esm/store/ai-question/question-model-store.js +19 -3
  69. package/esm/store/ai-question/question-preview-store.js +20 -4
  70. package/esm/store/ai-question/question-template-store.js +19 -3
  71. package/esm/store/ai-question/question-update-store.js +20 -4
  72. package/esm/store/ai-report/global-store.js +21 -5
  73. package/esm/store/ai-template/global-store.js +20 -4
  74. package/esm/store/enterprise/enterprise-store.js +20 -4
  75. package/lib/components/Charts/ReportPie.js +21 -6
  76. package/lib/components/SvgIcon/index.js +17 -1
  77. package/lib/components/react-photo-view/PhotoBox.js +32 -7
  78. package/lib/components/react-photo-view/PhotoPage.js +18 -2
  79. package/lib/components/react-photo-view/PhotoProvider.js +17 -1
  80. package/lib/components/react-photo-view/PhotoSlider.js +19 -3
  81. package/lib/components/react-photo-view/hooks/useAnimationOrigin.js +18 -2
  82. package/lib/components/react-photo-view/hooks/useAnimationPosition.js +18 -2
  83. package/lib/components/react-photo-view/hooks/useAnimationVisible.js +19 -3
  84. package/lib/components/react-photo-view/hooks/useContinuousTap.js +28 -3
  85. package/lib/components/react-photo-view/hooks/useMethods.js +17 -1
  86. package/lib/components/react-photo-view/hooks/useScrollPosition.js +21 -5
  87. package/lib/components/react-photo-view/hooks/useTargetScale.js +17 -1
  88. package/lib/components/react-photo-view/utils/getPositionOnMoveOrScale.js +18 -2
  89. package/lib/components/react-photo-view/utils/getSuitableImageSize.js +17 -1
  90. package/lib/modules/ai-ability/Root.js +21 -5
  91. package/lib/modules/ai-ability/components/AbilityFormItem/index.js +18 -2
  92. package/lib/modules/ai-ability/components/AddAbility/index.js +19 -3
  93. package/lib/modules/ai-ability/components/UpdateAbility/index.js +21 -5
  94. package/lib/modules/ai-ability-select/components/AiAbilityItem/index.js +17 -1
  95. package/lib/modules/ai-question/components/AiAnalysis/MainPoints.js +17 -1
  96. package/lib/modules/ai-question/components/AiAnalysis/MainPointsItem.js +17 -1
  97. package/lib/modules/ai-question/components/AiAnalysis/index.js +17 -1
  98. package/lib/modules/ai-question/components/AiAssessmentCriteria/index.js +23 -7
  99. package/lib/modules/ai-question/components/AiAssessmentCriteria/utils.js +17 -1
  100. package/lib/modules/ai-question/components/BaseAccordion/index.js +19 -3
  101. package/lib/modules/ai-question/components/BootVideo/index.js +22 -6
  102. package/lib/modules/ai-question/components/QuestionModel/Interactive.js +17 -1
  103. package/lib/modules/ai-question/components/QuestionModel/Item.js +36 -2
  104. package/lib/modules/ai-question/components/QuestionPreview/index.js +18 -2
  105. package/lib/modules/ai-question/components/QuestionTemplate/AiEvaluation.js +18 -2
  106. package/lib/modules/ai-question/components/QuestionUpdate/Chioce.js +17 -1
  107. package/lib/modules/ai-question/components/QuestionUpdate/Form.js +23 -6
  108. package/lib/modules/ai-question/components/QuestionUpdate/RandomQuestion.js +17 -1
  109. package/lib/modules/ai-question/components/QuestionUpdate/Score.d.ts +15 -0
  110. package/lib/modules/ai-question/components/QuestionUpdate/Score.js +73 -0
  111. package/lib/modules/ai-question/components/QuestionUpdate/SelectQuestion.js +18 -2
  112. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoice.js +20 -4
  113. package/lib/modules/ai-question/components/QuestionUpdate/VideoVoiceUploader.js +18 -2
  114. package/lib/modules/ai-question/components/QuestionUpdate/const.js +1 -0
  115. package/lib/modules/ai-question/components/QuestionUpdate/index.js +18 -2
  116. package/lib/modules/ai-question/components/QuestionUpdate/interface.d.ts +1 -0
  117. package/lib/modules/ai-report/components/AIEvaluate/Evaluate.js +18 -2
  118. package/lib/modules/ai-report/components/AIEvaluate/Graph.js +18 -2
  119. package/lib/modules/ai-report/components/AIEvaluate/index.js +17 -1
  120. package/lib/modules/ai-report/components/MenuAnchor/index.js +18 -2
  121. package/lib/modules/ai-report/components/RankingRange/Item.js +17 -1
  122. package/lib/modules/ai-report/components/RankingRange/index.js +18 -2
  123. package/lib/modules/ai-report/components/ScoreReport/Bar.js +18 -2
  124. package/lib/modules/ai-report/components/ScoreReport/Score.js +19 -3
  125. package/lib/modules/ai-report/components/VideoQuestion/Abilities.js +3 -1
  126. package/lib/modules/ai-report/components/VideoQuestion/BodyImages.js +18 -2
  127. package/lib/modules/ai-report/components/VideoQuestion/QuestionItem.js +25 -5
  128. package/lib/modules/ai-report/components/VideoQuestion/ScoreSlider.js +17 -1
  129. package/lib/modules/ai-report/components/VideoQuestion/index.js +1 -1
  130. package/lib/modules/ai-report/components/WorkPlaces/WorkPlace.js +18 -2
  131. package/lib/modules/ai-report/interface.d.ts +1 -0
  132. package/lib/modules/ai-template/Root.js +18 -2
  133. package/lib/modules/ai-template/components/QuestionList/Item.js +17 -1
  134. package/lib/modules/ai-template/components/TemplateList/index.js +17 -1
  135. package/lib/modules/ai-template/components/TemplateMenu/index.js +19 -3
  136. package/lib/store/ai-ability/question-ability-store.js +19 -3
  137. package/lib/store/ai-ability-select/question-ability-store.js +20 -4
  138. package/lib/store/ai-question/ai-analysis-store.js +22 -6
  139. package/lib/store/ai-question/boot-video-store.js +20 -4
  140. package/lib/store/ai-question/global-store.js +20 -4
  141. package/lib/store/ai-question/interview-room-store.js +20 -4
  142. package/lib/store/ai-question/question-model-store.js +19 -3
  143. package/lib/store/ai-question/question-preview-store.js +20 -4
  144. package/lib/store/ai-question/question-template-store.js +19 -3
  145. package/lib/store/ai-question/question-update-store.js +20 -4
  146. package/lib/store/ai-report/global-store.js +21 -5
  147. package/lib/store/ai-template/global-store.js +20 -4
  148. package/lib/store/enterprise/enterprise-store.js +20 -4
  149. package/package.json +1 -1
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  Object.defineProperty(exports, "__esModule", { value: true });
14
30
  var jsx_runtime_1 = require("react/jsx-runtime");
15
31
  var const_1 = require("../QuestionUpdate/const");
@@ -32,9 +48,9 @@ var BaseAccordion = function (props) {
32
48
  var isHovering = (0, ahooks_1.useHover)(ref);
33
49
  var updatePreview = (0, question_preview_store_1.useQuestionPreviewStore)().updatePreview;
34
50
  var _f = (0, question_model_store_1.useQuestionModelStore)(), questionModelData = _f.questionModelData, addModel = _f.addModel;
35
- var _g = (0, react_1.useState)(false), isPaging = _g[0], setIsPaging = _g[1];
36
- var _h = (0, react_1.useState)([]), questionsList = _h[0], setQuestionsList = _h[1];
37
- var _j = (0, react_1.useState)(), hoverItem = _j[0], setHoverItem = _j[1];
51
+ var _g = __read((0, react_1.useState)(false), 2), isPaging = _g[0], setIsPaging = _g[1];
52
+ var _h = __read((0, react_1.useState)([]), 2), questionsList = _h[0], setQuestionsList = _h[1];
53
+ var _j = __read((0, react_1.useState)(), 2), hoverItem = _j[0], setHoverItem = _j[1];
38
54
  var handlePreview = (0, ahooks_1.useDebounceFn)(function () {
39
55
  isShowPreview && updatePreview(isHovering, isHovering ? hoverItem : undefined);
40
56
  }, {
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
30
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
31
  if (ar || !(i in from)) {
@@ -40,16 +56,16 @@ var BootVideo = function (props) {
40
56
  var _a;
41
57
  var open = props.open, onClose = props.onClose;
42
58
  var _b = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _b.interactType, aiInterviewerProfile = _b.aiInterviewerProfile, updateInterviewRoom = _b.updateInterviewRoom;
43
- var _c = (0, react_1.useState)({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile }), interviewRoomState = _c[0], setInterviewRoomState = _c[1];
44
- var _d = (0, react_1.useState)(ai_question_1.DEFAULT_VITUAL_HUMAN_LIST), virtualManList = _d[0], setVirtualManList = _d[1];
59
+ var _c = __read((0, react_1.useState)({ interactType: interactType, aiInterviewerProfile: aiInterviewerProfile }), 2), interviewRoomState = _c[0], setInterviewRoomState = _c[1];
60
+ var _d = __read((0, react_1.useState)(ai_question_1.DEFAULT_VITUAL_HUMAN_LIST), 2), virtualManList = _d[0], setVirtualManList = _d[1];
45
61
  var _e = (0, boot_video_store_1.useBootVideoStore)(), mediaUrl = _e.mediaUrl, thumbUrl = _e.thumbUrl, updateBootVideo = _e.updateBootVideo;
46
- var _f = (0, react_1.useState)(ai_question_1.DEFAULT_GUIDE_VIDEO), mediaList = _f[0], setMediaList = _f[1];
47
- var _g = (0, ahooks_1.useSetState)({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), mediaState = _g[0], setMediaState = _g[1];
62
+ var _f = __read((0, react_1.useState)(ai_question_1.DEFAULT_GUIDE_VIDEO), 2), mediaList = _f[0], setMediaList = _f[1];
63
+ var _g = __read((0, ahooks_1.useSetState)({ mediaUrl: mediaUrl, thumbUrl: thumbUrl, appliedAllPosition: false }), 2), mediaState = _g[0], setMediaState = _g[1];
48
64
  var _h = (0, ahooks_1.useRequest)(ai_question_2.PostCommonUpload, {
49
65
  manual: true,
50
66
  onSuccess: function (_a) {
51
67
  var data = _a.data;
52
- var item = data[0];
68
+ var _b = __read(data, 1), item = _b[0];
53
69
  var OfficialMedia = mediaList[0];
54
70
  setMediaList([
55
71
  OfficialMedia,
@@ -116,7 +132,7 @@ var BootVideo = function (props) {
116
132
  getAiInterviewerProfileList();
117
133
  setMediaState({ mediaUrl: mediaUrl, thumbUrl: thumbUrl });
118
134
  if (mediaUrl && thumbUrl && mediaUrl !== mediaList[0].videoUrl) {
119
- setMediaList(__spreadArray(__spreadArray([], mediaList, true), [
135
+ setMediaList(__spreadArray(__spreadArray([], __read(mediaList), false), [
120
136
  {
121
137
  videoUrl: mediaUrl,
122
138
  frameUrl: thumbUrl,
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
31
  };
@@ -26,7 +42,7 @@ var Interactive = function () {
26
42
  var _a, _b;
27
43
  var questionModelData = (0, question_model_store_1.useQuestionModelStore)().questionModelData;
28
44
  var _c = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _c.interactType, aiInterviewerProfile = _c.aiInterviewerProfile;
29
- var _d = (0, react_1.useState)(false), bootVideoOpen = _d[0], setBootVideoOpen = _d[1];
45
+ var _d = __read((0, react_1.useState)(false), 2), bootVideoOpen = _d[0], setBootVideoOpen = _d[1];
30
46
  var ShowVideoStatus = (aiInterviewerProfile === null || aiInterviewerProfile === void 0 ? void 0 : aiInterviewerProfile.humanType) === 2 &&
31
47
  ((_a = questionModelData === null || questionModelData === void 0 ? void 0 : questionModelData.aiInterviewerProfile) === null || _a === void 0 ? void 0 : _a.humanToken) &&
32
48
  (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);
@@ -21,6 +21,31 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  }
22
22
  return t;
23
23
  };
24
+ var __read = (this && this.__read) || function (o, n) {
25
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
26
+ if (!m) return o;
27
+ var i = m.call(o), r, ar = [], e;
28
+ try {
29
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
30
+ }
31
+ catch (error) { e = { error: error }; }
32
+ finally {
33
+ try {
34
+ if (r && !r.done && (m = i["return"])) m.call(i);
35
+ }
36
+ finally { if (e) throw e.error; }
37
+ }
38
+ return ar;
39
+ };
40
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
41
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
42
+ if (ar || !(i in from)) {
43
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
44
+ ar[i] = from[i];
45
+ }
46
+ }
47
+ return to.concat(ar || Array.prototype.slice.call(from));
48
+ };
24
49
  Object.defineProperty(exports, "__esModule", { value: true });
25
50
  var jsx_runtime_1 = require("react/jsx-runtime");
26
51
  var interview_room_store_1 = require("../../../../store/ai-question/interview-room-store");
@@ -31,10 +56,15 @@ var utils_1 = require("../../../../utils/utils");
31
56
  var fbm_ui_1 = require("fbm-ui");
32
57
  var mui_1 = require("fbm-ui/lib/mui");
33
58
  var react_1 = require("react");
59
+ var options = __spreadArray(__spreadArray([], __read(__spreadArray([], __read(Array(6).keys()), false).map(function (v) {
60
+ return { label: "\u6700\u591A\u8FFD\u95EE".concat(v + 1, "\u6B21"), value: v + 1 };
61
+ })), false), [
62
+ { label: '直到充分为止', value: -1 },
63
+ ], false);
34
64
  var QuestionModelListItem = function (props) {
35
65
  var _a = (0, interview_room_store_1.useInterviewRoomStore)(), interactType = _a.interactType, aiInterviewerProfile = _a.aiInterviewerProfile;
36
66
  var index = props.index, disabledWeight = props.disabledWeight, steps = props.steps, step = __rest(props, ["index", "disabledWeight", "steps"]);
37
- 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;
67
+ 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;
38
68
  var isAiAnalysis = (0, ai_question_1.IS_AI_ANALYSIS)(step);
39
69
  var _b = (0, question_model_store_1.useQuestionModelStore)(), editModel = _b.editModel, removeModel = _b.removeModel, updateModelWeight = _b.updateModelWeight;
40
70
  var updateQuestionState = (0, question_update_store_1.useUpdateQuestionStore)().updateQuestionState;
@@ -73,6 +103,10 @@ var QuestionModelListItem = function (props) {
73
103
  var handleOpenAIFollowUpStatus = (0, react_1.useCallback)(function () {
74
104
  editModel(__assign(__assign({}, step), { isOpenAIFollowUp: !isOpenAIFollowUp }), index);
75
105
  }, [editModel, isOpenAIFollowUp, step, index]);
106
+ var handleOpenAIFollowUpMaximum = (0, react_1.useCallback)(function (e) {
107
+ var value = e.target.value;
108
+ editModel(__assign(__assign({}, step), { followUpMaximum: value }), index);
109
+ }, [editModel, step, index]);
76
110
  var formatQuestion = (0, react_1.useMemo)(function () {
77
111
  if ((questions === null || questions === void 0 ? void 0 : questions.length) > 1) {
78
112
  return ((0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ direction: "row", spacing: 1 }, { children: (0, jsx_runtime_1.jsx)(mui_1.Stack, __assign({ spacing: 1 }, { children: questions.map(function (v, i) { return ((0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "text.secondary" }, { children: ["\u2022\u00A0", v.content] }), i)); }) })) })));
@@ -81,6 +115,6 @@ var QuestionModelListItem = function (props) {
81
115
  }, [questions]);
82
116
  return ((0, jsx_runtime_1.jsxs)(mui_1.Paper, __assign({ variant: "outlined", sx: { display: 'block', mt: 2 } }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", borderBottom: !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis ? '1px solid rgba(0, 0, 0, 0.08)' : 'none' }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", padding: "8px 0px 16px 16px" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium" }, { children: ["\u9898\u76EE", index + 1] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ width: 40, display: "flex", alignItems: "center", justifyContent: "center", sx: { cursor: 'move' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DragHandleIcon, { className: "dragHandle" }) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ width: 62, mr: 1, textAlign: "right" }, { children: [!ai_question_1.TEST_TYPE_READONLY.includes(type) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleEdit }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.EditIcon, {}) }))), (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: handleRemove }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))] }))] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", justifyContent: "space-between" }, { children: (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ flex: "1 0", display: "flex", alignItems: "center" }, { children: [(0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "primary.main", fontWeight: "medium", mr: 0.5 }, { children: ["[", ai_question_1.QUESTION_TYPE_TITLE_MAP[aiShowType], "]"] })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "subtitle1" }, { children: name })), category === null || category === void 0 ? void 0 : category.map(function (label) {
83
117
  return label && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Tooltip, __assign({ title: "".concat(label), placement: "bottom" }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { color: "default", label: label, size: "medium", sx: { ml: 1, maxWidth: '158px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' } }, label) })));
84
- }), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] })) })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.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: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.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) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.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 }))] })))] })))] })));
118
+ }), aiType === 2 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "primary", label: "AI\u8BC4\u5206", size: "medium", sx: { ml: 1 } }), (questions === null || questions === void 0 ? void 0 : questions.length) > 1 && (0, jsx_runtime_1.jsx)(fbm_ui_1.Chip, { variant: "filled", color: "warning", label: "\u5185\u5BB9\u968F\u673A", size: "medium", sx: { ml: 1 } })] })) })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Box, __assign({ mt: 1, pr: 2, display: "flex", alignItems: "center", justifyContent: "space-between" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", color: "secondary" }, { children: formatQuestion })), (0, jsx_runtime_1.jsxs)(fbm_ui_1.Typography, __assign({ sx: { ml: 2, flexShrink: 0 }, variant: "caption", color: "secondary", alignSelf: "flex-end" }, { children: ["\u56DE\u7B54\u65F6\u957F:\u00A0", (0, utils_1.getSecondToTime)(Number(duration))] }))] }))] })) })), (!ai_question_1.DISABLED_REPEAT_TYPE.includes(type) || isAiAnalysis) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", justifyContent: "space-between", spacing: 1, height: 42 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", padding: "3px 0 3px 16px" }, { children: isAiAnalysis && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "body2", sx: { flexShrink: 0 } }, { children: "\u6743\u91CD\u5360\u6BD4\uFF1A" })), (0, jsx_runtime_1.jsx)(fbm_ui_1.Input, { sx: { width: 92 }, size: "small", value: weight, endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption", color: "textSecondary" }, { children: "%" })), disabled: disabledWeight, onChange: handleWeightChange, onBlur: handleWeightBlur }), (0, jsx_runtime_1.jsx)(fbm_ui_1.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: (0, jsx_runtime_1.jsx)("span", __assign({ style: { display: 'flex', alignItems: 'center', marginLeft: '8px' } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.InfoIcon, { sx: { fontSize: 14, color: 'rgba(0, 0, 0, 0.26)' } }) })) }))] })) })), !ai_question_1.DISABLED_REPEAT_TYPE.includes(type) && ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row" }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, ml: 2, mr: 2 }, size: "small", checked: answerStatus === 1, label: (0, jsx_runtime_1.jsx)(fbm_ui_1.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) && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Switch, { sx: { flexShrink: 0, mr: 2 }, size: "small", checked: isOpenAIFollowUp, label: (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ direction: "row", alignItems: "center", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ fontSize: 12, lineHeight: 1.5, color: "rgba(0, 0, 0, 0.56)" }, { children: "\u56DE\u7B54\u4E0D\u5145\u5206\u65F6\u8FFD\u95EE" })), isOpenAIFollowUp && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Select, { sx: { height: 'auto', width: 134 }, size: "small", value: followUpMaximum, options: options, onChange: handleOpenAIFollowUpMaximum }))] })), onChange: handleOpenAIFollowUpStatus }))] })))] })))] })));
85
119
  };
86
120
  exports.default = (0, react_1.memo)(QuestionModelListItem);
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
31
  };
@@ -25,8 +41,8 @@ var react_1 = require("react");
25
41
  var QuestionPreview = function () {
26
42
  var _a = (0, question_preview_store_1.useQuestionPreviewStore)(), visible = _a.visible, previewItem = _a.previewItem;
27
43
  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;
28
- var _k = (0, react_1.useState)(), values = _k[0], setValues = _k[1];
29
- var _l = (0, react_1.useState)('none'), display = _l[0], setDisplay = _l[1];
44
+ var _k = __read((0, react_1.useState)(), 2), values = _k[0], setValues = _k[1];
45
+ var _l = __read((0, react_1.useState)('none'), 2), display = _l[0], setDisplay = _l[1];
30
46
  (0, react_1.useEffect)(function () {
31
47
  setValues({ name: name, broadcastType: broadcastType, desc: desc, prepareTime: prepareTime, duration: duration, minResponseDuration: minResponseDuration, questions: [] });
32
48
  setDisplay(visible ? 'block' : 'none');
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
31
  };
@@ -42,10 +58,10 @@ var AiEvaluation = function () {
42
58
  var isEdit = ((0, question_model_store_1.getQuestionModelStore)() || {}).isEdit;
43
59
  var selctedAbilitys = (0, question_ability_store_1.useAiAbilityListStore)().selctedAbilitys;
44
60
  var aiEvaluationData = (0, question_template_store_1.useQuestionTemplateStore)(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
45
- var _a = (0, ahooks_1.useSetState)({
61
+ var _a = __read((0, ahooks_1.useSetState)({
46
62
  addQuestionOpen: false,
47
63
  showOnlyAITest: false,
48
- }), state = _a[0], setState = _a[1];
64
+ }), 2), state = _a[0], setState = _a[1];
49
65
  var addQuestionOpen = state.addQuestionOpen, showOnlyAITest = state.showOnlyAITest;
50
66
  var handleClickAdd = (0, react_1.useCallback)(function (aiShowType) {
51
67
  setState({ addQuestionOpen: false });
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
30
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
31
  if (ar || !(i in from)) {
@@ -96,7 +112,7 @@ var Choice = function (_a) {
96
112
  if ((0, exports.VERIFICATION_SCORE)(value) || Number(value) > exports.MAX_SCORE_VALUE || Number(value) < 1) {
97
113
  return;
98
114
  }
99
- onChange('options', __spreadArray([], ((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); }), true), index);
115
+ onChange('options', __spreadArray([], __read(((item === null || item === void 0 ? void 0 : item.options) || []).map(function (v, index) { return (i === index ? __assign(__assign({}, v), { score: Number(value) }) : v); })), false), index);
100
116
  } }, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, { size: "small", placeholder: "\u5206\u503C", endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption" }, { children: "\u5206" })) }) }))] }, v.key || (0, utils_1.uniqueId)()));
101
117
  });
102
118
  } })) })), (0, jsx_runtime_1.jsx)(styled_1.ChoiceItem, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.Button, __assign({ icon: (0, jsx_runtime_1.jsx)(fbm_ui_1.AddIcon, {}), variant: "outlined", color: "inherit", size: "small", onClick: handleOptionAdd, sx: { ml: -2 } }, { children: "\u6DFB\u52A0\u9009\u9879" })) })] })));
@@ -46,6 +46,22 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
47
  }
48
48
  };
49
+ var __read = (this && this.__read) || function (o, n) {
50
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
51
+ if (!m) return o;
52
+ var i = m.call(o), r, ar = [], e;
53
+ try {
54
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
55
+ }
56
+ catch (error) { e = { error: error }; }
57
+ finally {
58
+ try {
59
+ if (r && !r.done && (m = i["return"])) m.call(i);
60
+ }
61
+ finally { if (e) throw e.error; }
62
+ }
63
+ return ar;
64
+ };
49
65
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
50
66
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
51
67
  if (ar || !(i in from)) {
@@ -104,12 +120,13 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
104
120
  onCategoryChange === null || onCategoryChange === void 0 ? void 0 : onCategoryChange(value);
105
121
  };
106
122
  var handleMinResponseDurationChange = function (e) {
123
+ var _a;
107
124
  var minResponseDurationValue = e.target.value;
108
125
  if (minResponseDurationValue && minResponseDurationValue.indexOf('-') > -1) {
109
126
  minResponseDurationValue = minResponseDurationValue.replaceAll('-', '');
110
127
  }
111
128
  if (minResponseDurationValue && minResponseDurationValue.indexOf('.') > -1) {
112
- minResponseDurationValue = minResponseDurationValue.split('.')[0];
129
+ _a = __read(minResponseDurationValue.split('.'), 1), minResponseDurationValue = _a[0];
113
130
  }
114
131
  if (/^[1-9]\d*$/.test(minResponseDurationValue)) {
115
132
  minResponseDurationValue = Number(minResponseDurationValue);
@@ -154,7 +171,7 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
154
171
  multiline: true,
155
172
  sx: { padding: 0 },
156
173
  }, sx: { flexGrow: 1, height: 120 } }), form.values.questions.length > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ height: 84, pt: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: function () {
157
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
174
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.filter(function (_, i) { return i !== index; })), false) }));
158
175
  } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) })))] }), index)); });
159
176
  } })) : ((0, jsx_runtime_1.jsx)(VideoVoice_1.default, {}))), !preview && aiShowType === ai_question_1.ADD_QUESTION_TYPE.SINGLECHIOCE && (
160
177
  // @ts-ignore
@@ -163,7 +180,7 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
163
180
  return (_a = form.values.questions) === null || _a === void 0 ? void 0 : _a.map(function (v, index) {
164
181
  var _a, _b;
165
182
  return ((0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ px: 2, pb: 2, pt: 0.5, mb: 2, boxSizing: "border-box", component: mui_1.Paper, variant: "outlined", width: "100%", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ display: "flex", alignItems: "center", justifyContent: "flex-end" }, { children: ((_b = (_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.questions) === null || _b === void 0 ? void 0 : _b.length) > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", sx: { mr: -1 }, onClick: function () {
166
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
183
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.filter(function (_, i) { return i !== index; })), false) }));
167
184
  } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.DeleteIcon, {}) }))) })), (0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
168
185
  // rows: 3,
169
186
  maxRows: 3,
@@ -175,13 +192,13 @@ var QuestionForm = (0, react_1.forwardRef)(function (props, ref) {
175
192
  height: 'auto',
176
193
  } }), (0, jsx_runtime_1.jsx)(Chioce_1.default, { index: index, item: v, onChange: function (_, options, i) {
177
194
  form.values.questions[index].options = options;
178
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions, true) }));
195
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions), false) }));
179
196
  } })] }), index));
180
197
  });
181
198
  } }) })), !preview && aiShowType !== ai_question_1.ADD_QUESTION_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(RandomQuestion_1.default, { aiShowType: aiShowType, category: aiAbilityList === null || aiAbilityList === void 0 ? void 0 : aiAbilityList.find(function (v) { var _a; return v.name === ((_a = form.values.category) === null || _a === void 0 ? void 0 : _a.value); }), broadcastType: form.values.broadcastType, onAddCustonQuestion: function () {
182
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), [{ content: '', videoUrl: '' }], false) }));
199
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), [{ content: '', videoUrl: '' }], false) }));
183
200
  }, onAddRandomQuestion: function (qs) {
184
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], form.values.questions, true), qs.map(function (v) { return ({ content: v, videoUrl: '' }); }), true) }));
201
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray(__spreadArray([], __read(form.values.questions), false), __read(qs.map(function (v) { return ({ content: v, videoUrl: '' }); })), false) }));
185
202
  } })), aiShowType === ai_question_1.ADD_QUESTION_TYPE.LANGUAGE && ((0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { sx: { height: 'auto', mb: 2 }, required: true, name: "readText", label: "\u6717\u8BFB\u5185\u5BB9", max: 240, InputProps: {
186
203
  rows: 3,
187
204
  multiline: true,
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __importDefault = (this && this.__importDefault) || function (mod) {
14
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
31
  };
@@ -26,7 +42,7 @@ var RandomQuestion = function (_a) {
26
42
  var _b, _c;
27
43
  var broadcastType = _a.broadcastType, onAddCustonQuestion = _a.onAddCustonQuestion, onAddRandomQuestion = _a.onAddRandomQuestion, category = _a.category, aiShowType = _a.aiShowType;
28
44
  var _d = (0, question_update_store_1.useUpdateQuestionStore)(function (store) { return [store.questionState]; }), questionState = _d.questionState, updateQuestionState = _d.updateQuestionState;
29
- var _e = (0, react_1.useState)(false), open = _e[0], setOpen = _e[1];
45
+ var _e = __read((0, react_1.useState)(false), 2), open = _e[0], setOpen = _e[1];
30
46
  var item = questionState.item;
31
47
  var actions = [
32
48
  {
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * 验证0-9的整数
4
+ */
5
+ export declare const IS_INTEGER_REG: RegExp;
6
+ /**
7
+ * 可输入最大分值
8
+ */
9
+ export declare const MAX_SCORE_VALUE = 100;
10
+ export declare const VERIFICATION_SCORE: (value: string) => boolean;
11
+ declare const Score: ({ label, ...props }: {
12
+ [x: string]: any;
13
+ label: any;
14
+ }) => JSX.Element;
15
+ export default Score;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ var __read = (this && this.__read) || function (o, n) {
25
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
26
+ if (!m) return o;
27
+ var i = m.call(o), r, ar = [], e;
28
+ try {
29
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
30
+ }
31
+ catch (error) { e = { error: error }; }
32
+ finally {
33
+ try {
34
+ if (r && !r.done && (m = i["return"])) m.call(i);
35
+ }
36
+ finally { if (e) throw e.error; }
37
+ }
38
+ return ar;
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.VERIFICATION_SCORE = exports.MAX_SCORE_VALUE = exports.IS_INTEGER_REG = void 0;
42
+ var jsx_runtime_1 = require("react/jsx-runtime");
43
+ var styled_1 = require("./styled");
44
+ var fbm_ui_1 = require("fbm-ui");
45
+ var formik_1 = require("formik");
46
+ /**
47
+ * 验证0-9的整数
48
+ */
49
+ exports.IS_INTEGER_REG = /^[0-9]\d*$/;
50
+ /**
51
+ * 可输入最大分值
52
+ */
53
+ exports.MAX_SCORE_VALUE = 100;
54
+ // rules={[({ value }) => VERIFICATION_SCORE(value as string)]}
55
+ // sx={{ height: 'auto', widht: 84 }}
56
+ // onChange={e => {
57
+ // const value = e.target.value;
58
+ // if (VERIFICATION_SCORE(value) || Number(value) > MAX_SCORE_VALUE || Number(value) < 1) {
59
+ // console.log('>>>>>>');
60
+ // return;
61
+ // }
62
+ // // onChange('options', [...(item?.options || []).map((v, index) => (i === index ? { ...v, score: Number(value) } : v))], index);
63
+ // }}
64
+ var VERIFICATION_SCORE = function (value) { return (value ? !exports.IS_INTEGER_REG.test(value) || Number(value) > exports.MAX_SCORE_VALUE : false); };
65
+ exports.VERIFICATION_SCORE = VERIFICATION_SCORE;
66
+ var Score = function (_a) {
67
+ var label = _a.label, props = __rest(_a, ["label"]);
68
+ // @ts-ignore
69
+ var _b = __read((0, formik_1.useField)(props), 3), field = _b[0], meta = _b[1], helpers = _b[2];
70
+ console.log(field, meta, helpers);
71
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(styled_1.ScoreInput, __assign({}, field, props, { size: "small", placeholder: "\u5206\u503C", endAdornment: (0, jsx_runtime_1.jsx)(fbm_ui_1.Typography, __assign({ variant: "caption" }, { children: "\u5206" })) })) }));
72
+ };
73
+ exports.default = Score;
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
30
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
31
  if (ar || !(i in from)) {
@@ -29,10 +45,10 @@ var formatQuestion = function (questions) { return questions === null || questio
29
45
  var SelectQuestion = function (_a) {
30
46
  var token = _a.token, open = _a.open, onClose = _a.onClose, onOk = _a.onOk;
31
47
  var aiEvaluationData = (0, question_template_store_1.useQuestionTemplateStore)(function (store) { return [store.aiEvaluationData]; }).aiEvaluationData;
32
- var _b = (0, react_1.useState)([]), questions = _b[0], setQuestions = _b[1];
48
+ var _b = __read((0, react_1.useState)([]), 2), questions = _b[0], setQuestions = _b[1];
33
49
  var handleChange = function (q, checked) {
34
50
  if (checked) {
35
- setQuestions(__spreadArray(__spreadArray([], questions, true), [q], false));
51
+ setQuestions(__spreadArray(__spreadArray([], __read(questions), false), [q], false));
36
52
  }
37
53
  else {
38
54
  setQuestions(questions.filter(function (v) { return v.token !== q.token; }));
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
30
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
31
  if (ar || !(i in from)) {
@@ -37,18 +53,18 @@ var VideoVoice = function () {
37
53
  borderRadius: 2,
38
54
  border: '1px dashed rgba(0,0,0, 0.08)',
39
55
  } }, { children: [q.videoUrl && ((0, jsx_runtime_1.jsx)(VideoVoicePreview_1.default, { onDel: function () {
40
- var questons = __spreadArray([], form.values.questions, true);
56
+ var questons = __spreadArray([], __read(form.values.questions), false);
41
57
  questons[index] = __assign(__assign({}, questons[index]), { videoUrl: '' });
42
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], questons, true) }));
58
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(questons), false) }));
43
59
  }, videoUrl: q.videoUrl })), (0, jsx_runtime_1.jsx)(VideoVoiceUploader_1.default, { index: index, questions: form.values.questions, setQuestions: function (qs) {
44
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], qs, true) }));
60
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(qs), false) }));
45
61
  } })] })), (0, jsx_runtime_1.jsxs)(mui_1.Stack, __assign({ flexGrow: 1, direction: "row", justifyContent: "space-between", spacing: 1 }, { children: [(0, jsx_runtime_1.jsx)(fbm_ui_1.FormItem, { required: true, name: "questions.".concat(index, ".content"), label: "\u9762\u8BD5\u5185\u5BB9", max: 300, placeholder: "\u9762\u8BD5\u5185\u5BB9\uFF08\u7CFB\u7EDF\u5C06\u6839\u636E\u6B64\u5185\u5BB9\u5411\u5019\u9009\u4EBA\u8FDB\u884C\u8BED\u97F3\u64AD\u62A5\uFF09", InputProps: {
46
62
  rows: 3,
47
63
  multiline: true,
48
64
  placeholder: '面试内容(系统将根据此内容向候选人进行语音播报)',
49
65
  sx: { padding: 0 },
50
66
  }, sx: { flexGrow: 1 } }), form.values.questions.length > 1 && ((0, jsx_runtime_1.jsx)(fbm_ui_1.Box, __assign({ height: 84, pt: 1 }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.IconButton, __assign({ size: "small", onClick: function () {
51
- form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], form.values.questions.filter(function (_, i) { return i !== index; }), true) }));
67
+ form.setValues(__assign(__assign({}, form.values), { questions: __spreadArray([], __read(form.values.questions.filter(function (_, i) { return i !== index; })), false) }));
52
68
  } }, { children: (0, jsx_runtime_1.jsx)(fbm_ui_1.CloseIcon, {}) })) })))] }))] }), index)); });
53
69
  } }));
54
70
  };
@@ -10,6 +10,22 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
13
29
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
30
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
31
  if (ar || !(i in from)) {
@@ -32,9 +48,9 @@ var VideoVoiceUploader = function (_a) {
32
48
  manual: true,
33
49
  onSuccess: function (_a) {
34
50
  var data = _a.data;
35
- var firstData = data[0];
51
+ var _b = __read(data, 1), firstData = _b[0];
36
52
  questions[index] = __assign(__assign({}, questions[index]), { videoUrl: firstData.url });
37
- setQuestions(__spreadArray([], questions, true));
53
+ setQuestions(__spreadArray([], __read(questions), false));
38
54
  },
39
55
  }), loading = _b.loading, postCommonUpload = _b.run;
40
56
  var uploadProps = {